@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.umd.js CHANGED
@@ -719,4 +719,4 @@ https://sweetalert2.github.io/#ajax-request`),Kue(e),typeof e.title=="string"&&(
719
719
  `).join("<br />")),Rce(e)}let Qa;var C8=new WeakMap;class Po{constructor(...t){if(Cce(this,C8,void 0),typeof window>"u")return;Qa=this;const n=Object.freeze(this.constructor.argsToParams(t));this.params=n,this.isAwaitingPromise=!1,Ace(C8,this,this._main(Qa.params))}_main(t,n={}){if(JL(Object.assign({},n,t)),Rn.currentInstance){const i=m5.swalPromiseResolve.get(Rn.currentInstance),{isAwaitingPromise:a}=Rn.currentInstance;Rn.currentInstance._destroy(),a||i({isDismissed:!0}),um()&&IL()}Rn.currentInstance=Qa;const r=Que(t,n);$ue(r),Object.freeze(r),Rn.timeout&&(Rn.timeout.stop(),delete Rn.timeout),clearTimeout(Rn.restoreFocusTimeout);const o=Wue(Qa);return HL(Qa,r),io.innerParams.set(Qa,r),Zue(Qa,o,r)}then(t){return aL(C8,this).then(t)}finally(t){return aL(C8,this).finally(t)}}const Zue=(e,t,n)=>new Promise((r,o)=>{const i=a=>{e.close({isDismissed:!0,dismiss:a})};m5.swalPromiseResolve.set(e,r),m5.swalPromiseReject.set(e,o),t.confirmButton.onclick=()=>{q6e(e)},t.denyButton.onclick=()=>{X6e(e)},t.cancelButton.onclick=()=>{J6e(e,i)},t.closeButton.onclick=()=>{i(g5.close)},due(n,t,i),v6e(Rn,n,i),V6e(e,n),Fue(n),Gue(Rn,n,i),Yue(t,n),setTimeout(()=>{t.container.scrollTop=0})}),Que=(e,t)=>{const n=Bue(e),r=Object.assign({},A5,t,n,e);return r.showClass=Object.assign({},A5.showClass,r.showClass),r.hideClass=Object.assign({},A5.hideClass,r.hideClass),r.animation===!1&&(r.showClass={backdrop:"swal2-noanimation"},r.hideClass={}),r},Wue=e=>{const t={popup:Tr(),container:ki(),actions:z4(),confirmButton:Za(),denyButton:Vs(),cancelButton:f5(),loader:h5(),closeButton:lm(),validationMessage:i8(),progressSteps:sm()};return io.domCache.set(e,t),t},Gue=(e,t,n)=>{const r=a8();bi(r),t.timer&&(e.timeout=new Oue(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(Xo(r),y1(r,t,"timerProgressBar"),setTimeout(()=>{e.timeout&&e.timeout.running&&hm(t.timer)})))},Yue=(e,t)=>{if(!t.toast){if(!o8(t.allowEnterKey)){uL("allowEnterKey"),Jue();return}que(e)||Xue(e,t)||vm(-1,1)}},que=e=>{const t=Array.from(e.popup.querySelectorAll("[autofocus]"));for(const n of t)if(n instanceof HTMLElement&&qi(n))return n.focus(),!0;return!1},Xue=(e,t)=>t.focusDeny&&qi(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&qi(e.cancelButton)?(e.cancelButton.focus(),!0):t.focusConfirm&&qi(e.confirmButton)?(e.confirmButton.focus(),!0):!1,Jue=()=>{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}`)}Po.prototype.disableButtons=$L,Po.prototype.enableButtons=KL,Po.prototype.getInput=jL,Po.prototype.disableInput=QL,Po.prototype.enableInput=ZL,Po.prototype.hideLoading=g8,Po.prototype.disableLoading=g8,Po.prototype.showValidationMessage=WL,Po.prototype.resetValidationMessage=GL,Po.prototype.close=N9,Po.prototype.closePopup=N9,Po.prototype.closeModal=N9,Po.prototype.closeToast=N9,Po.prototype.rejectPromise=DL,Po.prototype.update=eI,Po.prototype._destroy=tI,Object.assign(Po,Hue),Object.keys(uue).forEach(e=>{Po[e]=function(...t){return Qa&&Qa[e]?Qa[e](...t):null}}),Po.DismissReason=g5,Po.version="11.22.0";const v5=Po;v5.default=v5,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 b5={},uI;function e8e(){if(uI)return b5;uI=1;var e=yo;if(process.env.NODE_ENV==="production")b5.createRoot=e.createRoot,b5.hydrateRoot=e.hydrateRoot;else{var t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;b5.createRoot=function(n,r){t.usingClientEntryPoint=!0;try{return e.createRoot(n,r)}finally{t.usingClientEntryPoint=!1}},b5.hydrateRoot=function(n,r,o){t.usingClientEntryPoint=!0;try{return e.hydrateRoot(n,r,o)}finally{t.usingClientEntryPoint=!1}}}return b5}var t8e=e8e();const dI=[{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()}],wm=()=>{};function n8e(e){function t(o){const i={},a={},s=dI.map(l=>l.key);return Object.entries(o).forEach(l=>{let[u,d]=l;s.includes(u)&&P.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=dI.find(m=>m.key===s).getter(e),h=t8e.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(P.isValidElement(o[0])||P.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||wm,u=s.didOpen||wm,d=s.didDestroy||wm;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 r8e={custom_confirmation:"_custom_confirmation_11wic_1",customConfirmationWrapper:"_customConfirmationWrapper_11wic_5"},fI={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"}},o8e=n8e(v5),hI=({callback:e,children:t,trigger:n="DELETE",cancelCallBack:r=null,fireOnMount:o=!1,title:i="",text:a=""})=>{const s=P.useRef(!1),l=async u=>{var p,A;u&&((p=u==null?void 0:u.stopPropagation)==null||p.call(u),(A=u==null?void 0:u.preventDefault)==null||A.call(u));const d=fI[n]||fI.DELETE,h=W.jsxs(tc,{isBackdrop:!1,children:[W.jsx(rc,{title:d.title}),W.jsx(nc,{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(oc,{rightButtons:[{label:d.cancelButtonText,onClick:async()=>{v5.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()=>{v5.close(),e&&await e(u)},className:d==null?void 0:d.confirmButtonClass,borderColor:"transparent"}]})]}),m=await o8e.fire({showConfirmButton:!1,showCancelButton:!1,html:h});m.isConfirmed&&e&&await e(u),m.isDismissed&&typeof r=="function"&&await r()};return P.useEffect(()=>{o&&!s.current&&(s.current=!0,l(null))},[o]),W.jsx("div",{onClick:l,className:r8e.customConfirmationWrapper,title:i,children:t})},Em="/not_available.svg",i8e="/big_size_image.svg",Sm="/user.png",gI={HARDCODED_FALL_BACK_IMAGE:Em,HARDCODED_FALL_BACK_BIG_IMAGE:i8e,DEFAULT_AVATAR_IMAGE:Sm,generateImageUrl:(e,t=!1)=>e||Em,getImageKitUrl:(e,t=300,n=300,r=40)=>e||Em,getUserAvatar:e=>{var t;return!e||!((t=e.awi_personal_info)!=null&&t.awi_avatar)?Sm:e.awi_personal_info.awi_avatar||Sm}},a8e=1e-5,s8e=.99999,l8e=.001,c8e=.005,A8=(e,t)=>e/(t||1),mI=(e,t,n,r)=>Math.sqrt(Math.pow(Math.abs(n-e),2)+Math.pow(Math.abs(r-t),2)),Mm=(e,t,n)=>(t.x-e.x)*(n.y-e.y)-(n.x-e.x)*(t.y-e.y),u8e=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}},Hm=(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&&Mm(i,a,e)>0&&r++:a.y<=e.y-n&&Mm(i,a,e)<0&&r--}return r},Om=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 d8e(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 f8e=(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=d8e({x:e,y:t},n,r);break;case"polygon":h=Hm({x:e,y:t},n,r)!==0;break;case"circle":s=Om(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=A8(.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=Hm({x:e,y:t},n,r)!==0}return h},h8e=e=>!(!e||e.x>1||e.x<0||e.y1>1||e.y<0),g8e=e=>{if((e==null?void 0:e.length)<3)return!1;for(let t=0;t<e.length;t++)if(!h8e(e[t]))return!1;return!0},m8e=(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=A8(l8e,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=A8(c8e,r);Om(t)>h&&(i=!0);break;case"polygon":i=g8e(t);break;case"dot":i=!0;break;default:n&&(i=!0);break}return i},pI=(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,m=h!==0?d/h:-1;let p,A;m<0?(p=n,A=r):m>1?(p=o,A=i):(p=n+m*l,A=r+m*u);const b=e-p,C=t-A;return Math.sqrt(b*b+C*C)},p8e=(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=pI(t,n,s,l,u,d);h<r&&(r=h,o=a)}return{insertIndex:o,minDistance:r}},CI=(e,t)=>t===0?e:CI(t,e%t),C8e=(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}),A8e=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 v8e(e,t,n){return Math.min(n,Math.max(t,e))}function b8e(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,m=n.y;u=Math.max(-r,Math.min(1-o,h-(r+s/2))),d=Math.max(-i,Math.min(1-a,m-(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 _8e(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 AI([{x:t,y:r},{x:n,y:o}])}function y8e(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 Bm=(e,t)=>(e.x-t.x)**2+(e.y-t.y)**2,x8e=(e,t,n)=>{const r=Bm(t,n);if(r===0)return Bm(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 Bm(e,i)},w8e=(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=x8e(e,o,i);n=Math.min(n,a)}return Math.sqrt(n)},E8e=(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=mI(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}},Lm=(e=0)=>(e<=0?e=a8e:e>=1&&(e=s8e),e),S8e=e=>e.map(n=>({x:Lm(n.x),y:Lm(n.y)})),M8e=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},H8e=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 O8e(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 B8e=(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]},L8e=(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},AI=e=>{e=B8e(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,L8e(e,n)},I8e=(e,t,n)=>{let{x:r,y:o}=vI(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},vI=(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)}},Bn={gcd:CI,getDistance:mI,isLeft:Mm,windingNumber:Hm,getDiameter:Om,checkPointInsidePolygon:f8e,isAnnotationCoordinatesValid:m8e,distanceToSegment:pI,findClosestSegment:p8e,transformCoordinatesCheck:C8e,getBoundingBox:A8e,translateCoordinatesWithFixedWidth:b8e,clampValue:v8e,calculateCircleFromCoordinates:_8e,calculateCentroid:y8e,minDistanceToPolygon:w8e,closestCoordinates:E8e,fineTuneCoordinates:S8e,zoomLevelValue:A8,createPolygonLoop:M8e,breakPointCount:H8e,getBoundingBoxValues:u8e,shiftPolygon:O8e,getPerfectPointValue:Lm,adjustToCircle:AI,getMousePos:vI,getMousePosAbsolute:(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},getUpdatedCoordinates:I8e},P8e=({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:m="all",loggedUser:p,isCarousel:A=!1,classColorMap:b=null,disableAnnotation:C=!1,SAMToggle:w,imageNumber:x=0,togglePagination:y,handleSAMToggle:E,unSelectedAnnotationIDsSet:S=new Set,setMousePosition:M,allowedToCopyPreview:H=!1,copyCallBackHandler:B,annotationSession:k,SAMToggleValue:D,selectedSAMTool:T,handleCopyAnnotations:N,setOpenRequestDetails:z,openRequestDetails:V,handleNextPage:j,handlePreviousPage:R,currentPage:$,handleUpdateImageIndex:K,requestId:X,showPagination:Z,isAnnotationCreating:U,contentInfo:G,content_key:J,isAnnotationUpdating:Y,isDeleteAnnotationMutationLoading:ee,showGuidelinesFirst:oe,currentImage:ue=0,selectedContent:se=null,switchToEditMode:_e,switchToCreateMode:be,goToNextImage:me,goToPreviousImage:fe,handleGoToPendingAnnotations:ae,handlePasteAnnotationsByControlV:ie,annotationsResponse:Ae,isAnnotationFetching:Me,fetchAnnotationsKey:He,request:de,parentReqData:Ge,clearAnnotationCache:Je,RequestInfoModal:Ee,getAnnotationFromSAM:Pe,getAnnotationsFromSAMPrompt:De,fetchAnnotations:We,pageCount:Ye=10,annotationViewType:ct="atom",AnnotationPagination:rt,REACT_APP_SAM_ENABLED:wt="no",ImageGenerationHelper:ut=gI,fallbackImageUrl:Ke,activeColor:Re,Carousel:ot,showTool:Fe=!0})=>{var d0,W9,f,v,O,F,q,re,Oe,Qe,Xe,Bt,rn,kn,Yn,ho;const Te=Dm().isCtrlPressedFunc,Ve=Dm().isAltPressedFunc,[dt,$e]=P.useState(!1),[ft,Tt]=P.useState(!1),Qt=.007,sn=.03,Dn=.01,Gt=.005,An=.005,bn=.7,Wt=.005,Lt=.005,Ht=.003,yt=.01,Ut="#40ff00",gn="#fff",gt="#FFFF00",mt="red",Ot="rgba(0, 255, 255, 1)",Ze="rgba(0, 255, 255, 0.5)",Vt="#FF3131",pe=4,et=5,ze={DEFAULT:1.5,SELECTED:4.5,CAROUSAL:2.5,CIRCLE:2},vt=P.useRef(""),Ue=P.useRef(null),Et=P.useRef(null),It=P.useRef(null),zt=rL(),[Sn,Ct]=P.useState(!1),[At,Nt]=P.useState(!1),[qe,Rt]=P.useState([]),[Kt,_r]=P.useState(),[Lr,ar]=P.useState(),[er,Qn]=P.useState({x:-1,y:-1}),[yr,Wr]=P.useState(-1),[en,Mn]=P.useState({x:0,y:0}),[Dt,un]=P.useState(u),[Vn,Nr]=P.useState("-1"),[rr,xr]=P.useState([]),[mn,$t]=P.useState(!1),[_n,Hn]=P.useState(null),[bt,kt]=P.useState({width:0,height:0}),Ft=Or.INITIAL_ZOOM_PROPERTIES,[tt,pn]=P.useState(Ft),[Tn,Rr]=P.useState(!1),[ur,ao]=P.useState(!1),[dn,yn]=P.useState(-1),[nn,jt]=P.useState(!1),Yt=Or.INITIAL_ZOOM_LEVEL,Wn=12,Gn=bt.width*Yt,Mr=P.useRef(null),[vn,_i]=P.useState(Ae),[Fn,Jo]=P.useState(),[Cn,fn]=P.useState([]),[Ln,Ir]=P.useState(null),oo=Or.SAM_MODEL_NAME,Hr=Or.SAM_MODEL_CONFIDENCE,V1=Or.SAM_MODEL_MAX_RESULTS,[Di,zn]=P.useState(!1),[tr,Wa]=P.useState(-1),[Zs,F9]=P.useState(null),[U1,z9]=P.useState(null),[Qs,Ws]=P.useState(null),[gr,ko]=P.useState({modelName:"",modelConfidence:0,modelMaxResults:0,promptMessage:""}),[di,yi]=P.useState(null),[Ga,j9]=P.useState(!1),[bo,y5]=P.useState({x:-1,y:-1}),[Ji,x5]=P.useState({left:0,right:0,top:0,bottom:0}),[Ti,V9]=P.useState(null),[e1,so]=P.useState(""),w5={SELECT:2e3,NOT_SELECT:500},[Co,K1]=P.useState(""),Ya=window.devicePixelRatio,[jr,qa]=P.useState(window.innerWidth<768*Ya),[Gs,Jr]=P.useState(window.innerWidth<1200*Ya),fi=P.useRef(null),Xa=P.useRef(null),[E5,Ja]=P.useState(!1);P.useEffect(()=>{const Ce=()=>{qa(window.innerWidth<768*Ya),Jr(window.innerWidth<1200*Ya)};return window.addEventListener("resize",Ce),()=>window.removeEventListener("resize",Ce)},[]),P.useEffect(()=>{E5&&Y0()},[E5,tt,bt]),P.useEffect(()=>{if(!e1){Xa.current=null,Ja(!1);return}const Ce=new window.Image;Ce.onload=()=>{Xa.current=Ce,Ja(!0)},Ce.src=e1},[e1]),P.useEffect(()=>(st(qe),r0(),()=>{Ti&&clearTimeout(Ti)}),[Vn]),P.useEffect(()=>{A||document.fullscreenElement||p0.getItem("full_screen")=="yes"&&n1(!1),window.addEventListener("resize",Si)},[]),P.useEffect(()=>{console.log("Change"),Rt([]),V0(),setTimeout(()=>{st()},50)},[l]),P.useEffect(()=>{b&&st(qe)},[b]),P.useEffect(()=>{i&&(i==null?void 0:i.length)>0&&no()},[i]),P.useEffect(()=>{_i(Ae||null)},[Ae,i]),P.useEffect(()=>{if(e){const Ce=ut.generateImageUrl(ut.getImageKitUrl(e,-1,-1,-1));hi(Ce)}Rt([])},[e]),P.useEffect(()=>{e1&&(vt.current=e1,Pr())},[e1]),P.useEffect(()=>{vt.current&&Si()},[vt.current,e1]),P.useEffect(()=>{w=="SAM"?Rr(!0):Rr(!1),S5()},[w]),P.useEffect(()=>{tt.scale==1&&(tt.x!=0||tt.y!=0)&&no()},[tt.scale]),P.useEffect(()=>{if(((vn==null?void 0:vn.result)||[]).length>=0){const{x:Ce,y:he}=Bn.getMousePos(Ue.current,{clientX:Kt==null?void 0:Kt.x,clientY:Kt==null?void 0:Kt.y});Pr(qe,{x:Ce,y:he})}},[bt,t,tt.scale,Vn]),P.useEffect(()=>{V0(),((vn==null?void 0:vn.result)||[]).length>=0&&st()},[rr,Dt]),P.useEffect(()=>{if(de&&vn&&(vn!=null&&vn.result)&&((vn==null?void 0:vn.result)||[]).length>=0){st(qe);const Ce={},he={};for(let xe=0;xe<vn.result.length;xe++)Ce[vn.result[xe].awi_id]={...vn.result[xe],index:xe},(de==null?void 0:de.awi_annotation_type)=="polygon"&&(he[vn.result[xe].awi_id]=Bn.getBoundingBoxValues(vn.result[xe].awi_coords));z9(Ce),(de==null?void 0:de.awi_annotation_type)=="polygon"&&Ir(he),(de==null?void 0:de.awi_request_for)=="attributes"&&vn.result.length>0&&u=="-1"&&typeof d=="function"&&setTimeout(()=>{d(vn.result[0].awi_id)},100)}else z9(null),Ir(null);qs()},[de,vn]),P.useEffect(()=>{qs()},[S]),P.useEffect(()=>{console.log("Filter annotation change"),Pr(qe),setTimeout(()=>{Pr(qe)},100)},[Cn]),P.useEffect(()=>{u!=="-1"?typeof h=="function"&&(de==null?void 0:de.awi_request_for)!=="outline"&&h("edit"):xr([]),Tn&&typeof h=="function"&&un("-1"),un(u||"-1")},[u]),P.useEffect(()=>{A||x==0&&Tn!==void 0&&(Tn?Kr.success("Switched to Auto Annotation mode"):de!=null&&de.awi_annotation_type&&Kr.success(`Switched to ${de==null?void 0:de.awi_annotation_type} Annotation mode`))},[Tn]),P.useEffect(()=>{if(!M||typeof M!="function")return;o0();const Ce=setTimeout(()=>{const{x:he,y:xe}=Bn.getMousePosAbsolute(Ue.current,{clientX:Kt==null?void 0:Kt.x,clientY:Kt==null?void 0:Kt.y});M({x:he,y:xe})},30);return()=>clearTimeout(Ce)},[Kt]),P.useEffect(()=>{ur?o0():s0(-1,-1)},[ur]),P.useEffect(()=>{u!="-1"&&U1&&Jo(U1[u])},[u,U1]),P.useEffect(()=>{n0(),o0()},[tt,bt]);const $4=Ce=>{const he=Ce.message;K1(he)};P.useEffect(()=>{let Ce="";U?Ce="Creating Annotation...":ee?Ce="Deleting Annotation...":Y?Ce="Updating Annotation...":Me?Ce="Fetching Annotations...":nn&&(Ce="Generating AI Annotations..."),$4({message:Ce})},[U,Y,ee,Me,nn]),P.useEffect(()=>{Si()},[Z]);const e0=Pe&&typeof Pe=="function"?oL(Pe):null,t0=De&&typeof De=="function"?oL(De):null,xi=()=>!!(dt||Te()),ei=()=>!!(ft||Ve()),n0=()=>{const Ce=bt.width*tt.scale,he=bt.height*tt.scale;x5({left:Math.abs(tt.x),right:Math.max(0,Ce-bt.width+tt.x),top:Math.abs(tt.y),bottom:Math.max(0,he-bt.height+tt.y)})},j0=P.useMemo(()=>{const Ce=(vn==null?void 0:vn.result)||[];if(Ce.length>0&&Dt!=="-1"){let he=null,xe=null;const Ie=Ce.reduce((Be,at)=>{const{awi_id:_t}=at;return _t===Dt?he=at:_t===Vn?xe=at:S.has(_t)||Be.push(at),Be},[]);return xe&&Ie.push(xe),he&&Ie.push(he),Ie}else return Cn},[Dt,Vn,Cn]),hi=async Ce=>{IC.checkImageValidity(Ce,so,i,ct,Ke)},V0=()=>{Vn!="-1"&&(Ti&&clearTimeout(Ti),Nr("-1"))},r0=()=>{if(Vn!=="-1")if(Dt=="-1"||Or.HOVER_TO_SELECT_ON_ALREADY_SELECTED){const Ce=Dt=="-1"?w5.NOT_SELECT:w5.SELECT;Ti&&clearTimeout(Ti);const he=setTimeout(()=>{l&&Vn!="-1"&&Dt!=Vn&&(Dt=="-1"&&mn?r0():typeof d=="function"&&(d(Vn),Kr.success("Annotation selected successfully",Vn)))},Ce);V9(he)}else Ti&&clearTimeout(Ti);else Ti&&clearTimeout(Ti)},o0=()=>{const Ce=Et.current;if(!Ce)return;const he=bt.width*tt.scale,xe=bt.height*tt.scale;if(Ce.width=he,Ce.height=xe,ur){const{x:Ie,y:Be}=Bn.getMousePosAbsolute(Et.current,{clientX:Kt==null?void 0:Kt.x,clientY:Kt==null?void 0:Kt.y});s0(Ie,Be)}},wi=()=>{Rt([])},i0=(Ce=!1)=>{zt.invalidateQueries(He),Ce&&Rt([])},Ei=Ce=>{var he;if(U1&&U1[Ce])if(l){const xe=U1[Ce].index,Ie=vn==null?void 0:vn.result[xe];return Ie||((he=vn==null?void 0:vn.result)==null?void 0:he.find(Be=>Be.awi_id==Ce))}else return U1[Ce];else return null},Ys=Ce=>Qs&&Qs[Ce]?Qs[Ce].index:-1,S5=()=>{qe.length>0&&(console.log("clearCoordinate"),Rt([]),Pr([],{x:0,y:0},!0))},qs=()=>{if(de&&((vn==null?void 0:vn.result)||[]).length>=0){let Ce=[];(S==null?void 0:S.size)>0?Ce=((vn==null?void 0:vn.result)||[]).filter(xe=>!S.has(xe.awi_id)):Ce=(vn==null?void 0:vn.result)||[];const he={};for(let xe=0;xe<Ce.length;xe++)he[Ce[xe].awi_id]={...Ce[xe],index:xe};Ws(he),fn(Ce)}else fn([])},nr=Ce=>(jr&&(Ce=Ce*3),Bn.zoomLevelValue(Ce,tt.scale)),Ni=new Map,U0=Ce=>{try{if(!Ce)return Promise.resolve(Or.DEFAULT_CANVAS_RATION);if(Ni.has(Ce))return Ni.get(Ce);const he=new Promise((xe,Ie)=>{const Be=new Image;Be.onload=()=>{const _t={w:Be.width,h:Be.height};Ni.set(Ce,Promise.resolve(_t)),xe(_t)},Be.onerror=Ie;const at=ut.getImageKitUrl(Ce,-1,-1,1);at&&(Be.src=at)});return Ni.set(Ce,he),he}catch(he){return console.error(he),Promise.resolve(Or.DEFAULT_CANVAS_RATION)}},Si=async()=>{var Ce,he,xe,Ie,Be;if(console.log("updateDimensions called"),((Ce=vt.current)==null?void 0:Ce.length)>0){console.log("Canvas true");let at=Or.DEFAULT_CANVAS_RATION;j9(!0);try{at=await U0(vt.current)}catch(Zt){console.error("Error fetching image dimensions:",Zt,vt.current),at=Or.DEFAULT_CANVAS_RATION}const _t=Bn.gcd(at.w,at.h),qt={w:at.w/_t,h:at.h/_t};let hn=0,lt=0;if(lt=((he=It.current)==null?void 0:he.offsetHeight)||0,hn=lt*qt.w/qt.h,hn>(((xe=It.current)==null?void 0:xe.offsetWidth)||0)&&(hn=((Ie=It.current)==null?void 0:Ie.offsetWidth)||0,lt=hn*qt.h/qt.w),(Ue==null?void 0:Ue.current)!=null&&(Ue.current.width=hn,Ue.current.height=lt,di==null)){const Zt=(Be=Ue.current)==null?void 0:Be.getBoundingClientRect();yi({left:Zt==null?void 0:Zt.left,top:Zt==null?void 0:Zt.top})}kt({width:hn,height:lt}),j9(!1),Pr(qe)}},$1=P.useCallback((Ce,he,xe,Ie,Be,at)=>Bn.checkPointInsidePolygon(Ce,he,xe,Ie,Be,at,tt.scale),[]),x1=(Ce,he=!0)=>{const{x:xe,y:Ie}=Bn.getMousePos(Ue.current,Ce);let Be="",at=1/0;if(l&&a0(xe,Ie))return[Dt];const _t=Cn||[];if(!he&&(_t==null?void 0:_t.length)>Or.MAX_ANNOTATIONS_TO_HOVER)return[];switch(de==null?void 0:de.awi_annotation_type){case"circle":{_t.forEach(({awi_coords:qt,awi_id:hn})=>{if($1(xe,Ie,qt,0,0,de)){const lt=Bn.minDistanceToPolygon({x:xe,y:Ie},qt);lt<at&&(Be=hn,at=lt)}});break}case"dot":{const qt=nr(An);_t.forEach(({awi_coords:hn,awi_id:lt})=>{if($1(xe,Ie,hn,qt,qt,de)){const Zt=Bn.minDistanceToPolygon({x:xe,y:Ie},hn);Zt<at&&(Be=lt,at=Zt)}});break}case"rectangle":{const qt=nr(Wt)/2;for(let hn=0;hn<_t.length;hn++){const{awi_coords:lt,awi_id:Zt}=_t[hn];if($1(xe,Ie,lt,qt,0,de)){const Er=Bn.minDistanceToPolygon({x:xe,y:Ie},lt);Er<at&&(Be=Zt,at=Er)}}break}case"polygon":{for(let qt=0;qt<_t.length;qt++){const{awi_coords:hn,awi_id:lt}=_t[qt];if(Ln){const Zt=Ln[lt];if(Zt){const{minX:Er,minY:le,maxX:go,maxY:Do}=Zt;if(xe<Er||xe>go||Ie<le||Ie>Do)continue}}if($1(xe,Ie,hn,0,0,de)){const Zt=Bn.minDistanceToPolygon({x:xe,y:Ie},hn);Zt<at&&(Be=lt,at=Zt)}}break}default:console.warn(`Unknown annotation type: ${de==null?void 0:de.awi_annotation_type}`);break}return Be&&Be.length>0?(he&&un(Be),[Be]):(he&&(console.log("setSelectAnnotationId "),typeof d=="function"&&u!="-1"&&d("-1",!1)),[])},Z4=w2.throttle(x1,50),a0=(Ce,he)=>{const xe=Ei(u);if(xe){const Ie=xe.awi_coords;if((de==null?void 0:de.awi_annotation_type)=="polygon"){const Be=Bn.minDistanceToPolygon({x:Ce,y:he},Ie),at=nr(Lt);return Be<=at}else if((de==null?void 0:de.awi_annotation_type)=="rectangle"){const{insertIndex:Be,minDistance:at}=Bn.closestCoordinates({x:Ce,y:he},Ie),_t=nr(Lt);return console.log(Be),at<=_t}}else return!1},M5=(Ce,he)=>{const{x:xe,y:Ie}=Bn.getMousePos(Ue.current,Ce),Be=Ei(he);if(console.log("selectAnnotation",Be),Be){const{awi_coords:at}=Be;if(at.length===1){const lt=nr(Gt);$1(xe,Ie,at,lt,lt,de)&&(Nt(!0),$t(!0),ar({x:xe,y:Ie}),Rt(at));return}if(at.length===2){const{x:lt,y:Zt}=at[0],{x:Er,y:le}=at[1],go=Bn.getDiameter([{x:lt,y:Zt},{x:Er,y:le}])/2,Do=(lt+Er)/2,Cr=(Zt+le)/2;Nt(!0),$t(!0),ar({x:xe,y:Ie}),Qn({x:xe,y:Ie}),Rt(at);const on=(xe-Do)*(xe-Do)+(Ie-Cr)*(Ie-Cr),So=nr(bn);on>So*So*go*go&&$t(!1);return}const _t=xi()?0:nr(Qt),qt=$1(xe,Ie,at,_t,0,de),hn=a0(xe,Ie);if(!qt&&!hn)Qn({x:-1,y:-1}),ar({x:0,y:0}),$t(!1);else{if(ar({x:xe,y:Ie}),Nt(!0),(de==null?void 0:de.awi_annotation_type)=="polygon")if(xi())$t(!0);else if($1(xe,Ie,at,_t,0,de)){const{minDistance:Zt}=Bn.findClosestSegment(at,xe,Ie),Er=nr(yt);Zt>=Er?$t(!0):$t(!1)}else $t(!1);else $t(!0);Rt(at),Qn({x:-1,y:-1}),xi()||at.forEach((lt,Zt)=>{if(xe<=lt.x+_t&&xe>=lt.x&&Ie<=lt.y+_t&&Ie>=lt.y||xe>=lt.x-_t&&xe<=lt.x&&Ie>=lt.y-_t&&Ie<=lt.y||xe<=lt.x+_t&&xe>=lt.x&&Ie>=lt.y-_t&&Ie<=lt.y||xe>=lt.x-_t&&xe<=lt.x&&Ie<=lt.y+_t&&Ie>=lt.y){if((de==null?void 0:de.awi_annotation_type)==="polygon")l?(Qn({x:xe,y:Ie}),Wr(Zt)):(Wr(Zt),Qn(at[Zt])),console.log("setSelectCornerCoordinates");else if((de==null?void 0:de.awi_annotation_type)==="rectangle"&&!Tn){const Er=at[(Zt+2)%4];Qn(Er)}else if(l){const Er=at[(Zt+2)%4];Qn(Er)}else Wr(Zt),Qn(at[Zt]);$t(!1),Rt([])}})}}},K0=(Ce="all")=>{const he=window.devicePixelRatio;if(Ce!="cross"&&Ue.current)if(tt.scale==1){const xe=+getComputedStyle(Ue.current).getPropertyValue("height").slice(0,-2),Ie=+getComputedStyle(Ue.current).getPropertyValue("width").slice(0,-2);Ue.current.setAttribute("height",(xe*he).toString()),Ue.current.setAttribute("width",(Ie*he).toString())}else{const xe=bt.height*tt.scale,Ie=bt.width*tt.scale;Ue.current.setAttribute("height",(xe*he).toString()),Ue.current.setAttribute("width",(Ie*he).toString())}if(Et.current)if(tt.scale==1){const xe=+getComputedStyle(Et.current).getPropertyValue("height").slice(0,-2),Ie=+getComputedStyle(Et.current).getPropertyValue("width").slice(0,-2);Et.current.setAttribute("height",(xe*he).toString()),Et.current.setAttribute("width",(Ie*he).toString())}else{const xe=bt.height*tt.scale,Ie=bt.width*tt.scale;Et.current.setAttribute("height",(xe*he).toString()),Et.current.setAttribute("width",(Ie*he).toString())}},Aa=(Ce,he)=>{const xe=Bn.getDistance(Ce.x,Ce.y,he.x,he.y),Ie=nr(Qt),Be=nr(Dn);if(xe<=Be){let at=!1;return xe<=Ie?at=!1:xe<=Be&&(at=!0),{success:!0,distance:xe,zoomClosePoint:Ie,zoomPointAnnotationValue:Be,isExtraPointNeeded:at}}else return{success:!1,distance:xe,zoomClosePoint:Ie,zoomPointAnnotationValue:Be,isExtraPointNeeded:!1}},Z1=(Ce=[],he={x:0,y:0},xe=!1,Ie=!1,Be)=>{if((Ce||[]).length>0){Be.beginPath();const at=Mi(Ce);if((de==null?void 0:de.awi_annotation_type)==="rectangle")if(Tn){if(l){Be.moveTo(at[0].x,at[0].y);for(let _t=1;_t<at.length;_t++)Be.lineTo(at[_t].x,at[_t].y);Be.closePath()}else if(Tn){console.log("Sam function");const _t=Mi(Ce);Be.clearRect(0,0,Be.canvas.width,Be.canvas.height),Be.fillStyle="rgba(0, 0, 0, 0.35)",Be.strokeStyle=Ut,Be.lineWidth=ze.DEFAULT,_t.forEach(qt=>{Be.beginPath(),Be.arc(qt.x,qt.y,et,0,Or.TWO_PIE,!0),Be.fill(),Be.stroke()})}}else{Be.moveTo(at[0].x,at[0].y);for(let _t=1;_t<at.length;_t++)Be.lineTo(at[_t].x,at[_t].y);Be.closePath()}else if((de==null?void 0:de.awi_annotation_type)==="circle")if(Tn&&!l){const _t=Mi(Ce);console.log("coordinatesVal ",_t),Be.clearRect(0,0,Be.canvas.width,Be.canvas.height),Be.fillStyle="rgba(0, 0, 0, 0.35)",Be.strokeStyle=Ut,Be.lineWidth=ze.DEFAULT,_t.forEach(qt=>{Be.beginPath(),Be.arc(qt.x,qt.y,et,0,Or.TWO_PIE,!0),Be.fill(),Be.stroke()})}else{const _t=Bn.getDiameter(at);Be.arc((at[0].x+at[1].x)/2,(at[0].y+at[1].y)/2,Math.floor(_t/2),0,Or.TWO_PIE)}Be.save(),Be.lineWidth=ze.DEFAULT,Be.strokeStyle=Ut,Be.stroke()}if((de==null?void 0:de.awi_annotation_type)==="polygon"&&(qe||[]).length>0&&!xe&&!l){if(!Tn){const at=Mi(qe);if(Be.beginPath(),Be.lineWidth=ze.DEFAULT,Be.strokeStyle=Ut,at.forEach((_t,qt)=>{if(qt>0){const hn=at[qt-1];Be.moveTo(hn.x,hn.y),Be.lineTo(_t.x,_t.y)}}),Be.stroke(),at.forEach((_t,qt)=>{Be.beginPath(),Be.arc(_t.x,_t.y,et,0,Or.TWO_PIE,!0),Be.fillStyle=qt===0?gt:Ut,Be.fill()}),!ei()&&!Ie&&he&&he.x>0&&he.y>0&&!(he.x>.998||he.y>.998||he.x<.002||he.y<.002)){const _t=Mi([he]);Be.beginPath();const qt=Aa(qe[0],he);qt!=null&&qt.success&&(qe==null?void 0:qe.length)>2?qt.isExtraPointNeeded?(Be.beginPath(),Be.rect(_t[0].x-pe*3,_t[0].y-pe*3,pe*6,pe*6),Be.fillStyle=mt,Be.fill(),Be.lineWidth=4,Be.strokeStyle=mt,Be.stroke()):(Be.beginPath(),Be.rect(_t[0].x-pe*3,_t[0].y-pe*3,pe*6,pe*6),Be.fillStyle=gt,Be.fill(),Be.lineWidth=2,Be.strokeStyle=gt,Be.stroke()):Be.arc(_t[0].x,_t[0].y,pe,0,Or.TWO_PIE,!0),Be.fillStyle="rgba(0,0,0,0.35)",Be.fill(),Be.strokeStyle=Ut,Be.stroke();const hn=at[at.length-1];Be.beginPath(),Be.moveTo(hn.x,hn.y),Be.lineTo(_t[0].x,_t[0].y),Be.strokeStyle="#ff0000",Be.setLineDash([5,5]),Be.lineWidth=ze.DEFAULT,Be.stroke(),Be.setLineDash([])}Be.closePath(),Be.lineWidth=ze.DEFAULT,Be.stroke(),Be.save()}if(Tn){const at=Mi(Ce);Be.clearRect(0,0,Be.canvas.width,Be.canvas.height),Be.fillStyle="rgba(0, 0, 0, 0.35)",Be.strokeStyle=Ut,Be.lineWidth=ze.DEFAULT,at.forEach(_t=>{Be.beginPath(),Be.arc(_t.x,_t.y,et,0,Or.TWO_PIE,!0),Be.fill(),Be.stroke()})}}},s0=(Ce,he)=>{const xe=Et.current;if(!xe)return;const Ie=xe.getContext("2d");if(!Ie||(Ie.clearRect(0,0,xe.width,xe.height),Ce==-1&&he==-1))return;K0("cross");const Be=Mi([{x:Ce,y:he}])[0],at=Be.x,_t=Be.y;Ie.strokeStyle="#800080",Ie.lineWidth=ze.CAROUSAL,Ie.setLineDash([3,3]),Ie.beginPath(),Ie.moveTo(at,0),Ie.lineTo(at,xe.height),Ie.stroke(),Ie.beginPath(),Ie.moveTo(0,_t),Ie.lineTo(xe.width,_t),Ie.stroke(),Ie.setLineDash([])},Pr=(Ce=[],he={x:0,y:0},xe=!1,Ie=!1,Be=0)=>{var at,_t,qt,hn;if(de&&!Ga){const lt=(at=Ue.current)==null?void 0:at.getContext("2d");if(K0(),lt!=null){lt.imageSmoothingEnabled=!1,lt.clearRect(0,0,bt.width,bt.height),!l&&(de==null?void 0:de.awi_request_for)!="attributes"&&Z1(Ce,he,xe,Ie,lt);const Zt=j0||[];for(let Er=0;Er<Zt.length;Er++){const le=Zt[Er],{awi_coords:go,awi_id:Do,awi_status:Cr}=le;if(go.length===0)return;const on=Mi(go);lt.beginPath(),lt.lineJoin="round";let So=!1,ri="",zi="";if(m==="all"||Cr===m){le.awi_status==="pending"?ri=le.awi_outline_status==="approved"?"rgba(214, 204, 60, 0.3)":"rgba(0, 0, 0,0)":ri=Or.STATUS_COLOR_MAP[le.awi_status]||"rgba(0, 0, 0,0)",zi=ri;let q1=!1;if(Do===Dt?(lt.lineWidth=ze.SELECTED,lt.strokeStyle=Ut,lt.fillStyle="rgba(0,0,0,0.40)",q1=!0):Do===Vn&&(lt.lineWidth=ze.DEFAULT,lt.strokeStyle=Ot,lt.fillStyle=Ze,q1=!0),!q1)if(lt.fillStyle=ri,A?lt.lineWidth=ze.CAROUSAL:lt.lineWidth=ze.DEFAULT,b){const oi=b[le.awi_classes[0].awi_id];oi?(zi=oi,lt.strokeStyle=oi):(zi=le.awi_classes[0].awi_color,lt.strokeStyle=le.awi_classes[0].awi_color)}else zi=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 oi=(on[0].x+on[1].x)/2,f0=(on[0].y+on[1].y)/2,L5=Math.sqrt(Math.pow(on[1].x-on[0].x,2)+Math.pow(on[1].y-on[0].y,2));lt.beginPath(),lt.arc(oi,f0,L5/2,0,Or.TWO_PIE),lt.stroke(),lt.closePath(),So=!0;break}case"dot":{lt.beginPath(),lt.moveTo(on[0].x,on[0].y),lt.arc(on[0].x,on[0].y,pe,0,Or.TWO_PIE,!0),lt.stroke(),lt.closePath(),So=!0;break}case"rectangle":{lt.beginPath(),lt.moveTo((_t=on[0])==null?void 0:_t.x,(qt=on[0])==null?void 0:qt.y);for(let oi=1;oi<on.length;oi++)lt.lineTo(on[oi].x,on[oi].y);lt.closePath(),lt.stroke(),So=!0;break}case"polygon":{So=!0,lt.moveTo(on[0].x,on[0].y);const oi=on.length;for(let f0=0;f0<oi;f0++)lt.lineTo(on[f0].x,on[f0].y);break}}if(lt.fill(),lt.save(),lt.stroke(),So){lt.save();const oi=Do===Dt,f0=Do===Vn,L5=le.sam_status==="yes";on.forEach((w8,W4)=>{lt.beginPath();let Hi=pe,X1="";oi?on.length==1&&(de==null?void 0:de.awi_annotation_type)=="dot"||Ie&&W4%(on.length-1)==Be?(Hi=pe*2,X1=Ut):(X1=Ut,Hi=pe):f0?(X1=Ot,Hi=pe):(X1=zi,Hi=pe),(de==null?void 0:de.awi_annotation_type)==="polygon"?W4%(on.length-1)==0&&(L5?X1=Vt:X1=gt):W4==0&&on.length>1&&L5&&(X1=Vt),lt.arc(w8.x,w8.y,Hi,0,2*Math.PI,!0),lt.fillStyle=X1,lt.strokeStyle=X1,lt.fill(),lt.stroke(),lt.restore()})}else console.log("Error")}}}o0()}if(tt.scale==1&&(Ue!=null&&Ue.current)){const lt=(hn=Ue==null?void 0:Ue.current)==null?void 0:hn.getBoundingClientRect();yi({top:lt==null?void 0:lt.top,left:lt==null?void 0:lt.left})}},Mi=Ce=>Ce.map(xe=>({x:xe.x*Ue.current.width,y:xe.y*Ue.current.height})),Q1=Ce=>{const{x:he,y:xe}=Bn.getMousePos(Ue.current,Ce);Rt(Ie=>{const Be=[...Ie];return Be[1].x=he,Be[1].y=xe,Bn.adjustToCircle(Be)})},lo=Ce=>{if(Ce.length===0)return!1;const he=Bn.isAnnotationCoordinatesValid(de,Ce,Tn,tt.scale);return he||Pr(),he},H5=(Ce,he)=>(console.log("Has Moved checking"),Math.abs(Ce.x-he.x)>0||Math.abs(Ce.y-he.y)>0),va=()=>{if((qe==null?void 0:qe.length)>1){const Ce=qe[qe.length-1],he=[];let xe=!1;for(let Ie=0;Ie<qe.length-1;Ie++){const Be=qe[Ie],at=nr(Gt);if(Math.abs(Ce.x-Be.x)<=at&&Math.abs(Ce.y-Be.y)<=at){xe=!0;continue}else he.push({x:Be.x,y:Be.y})}return xe||he.push(qe[qe.length-1]),Rt(he),he}else return qe},O5=()=>{if(typeof n=="function")if(qe.length>3){const Ce=Aa(qe[0],qe[qe.length-1]);let he=[];Ce.success&&(Ce.isExtraPointNeeded==!1?(qe[qe.length-1].x=qe[0].x,qe[qe.length-1].y=qe[0].y,he=qe):Ce.isExtraPointNeeded&&(he=[...qe,{x:qe[0].x,y:qe[0].y}])),(he==null?void 0:he.length)>0?(Rt([]),n(he,null,!1,()=>{wi()})):Pr(qe)}else Pr(qe)},Zo=(Ce,he)=>{console.log("deletePolygonPoint"),console.log("selectIndex ",he);const xe=[];for(let Ie=0;Ie<Ce.length;Ie++)Ie!=he&&xe.push(Ce[Ie]);he==0&&(xe[xe.length-1]=xe[0]),Rt(xe),(xe==null?void 0:xe.length)>3?(Pr(xe),typeof o=="function"&&lo(xe)&&!C&&(Kr.success("Point deleted successfully"),o(xe,u,()=>{wi()}))):Kr.error("Point can not be deleted, as polygon need minimum of three points"),Wa(-1),F9(null)};function ti(Ce,he){console.log("handleAddAnnotationPoint");const xe=Ce.target;if(!(xe!=null&&xe.getBoundingClientRect))return;const Ie=xe.getBoundingClientRect(),Be=(Ce.clientX-Ie.left)/Ie.width,at=(Ce.clientY-Ie.top)/Ie.height,{insertIndex:_t,minDistance:qt}=Bn.closestCoordinates({x:Be,y:at},he),hn=nr(Qt);if(qt<hn){console.log("Very close point to insert"),console.log("minDistanceMin",qt);const le=nr(sn);if(qt<le&&xi())console.log("We can remove this"),(he==null?void 0:he.length)>3&&(F9(he),Or.POLYGON_POINT_REMOVE_CONFIRM_PROMPT?Wa(_t):Zo(he,_t));else{if(qt<le)Kr.error("Press CTRL and then click to prompt for point deletion");else{const go=(qt*100).toFixed(1);Kr.error("Very close point to draw "+go+" it should be more than "+Qt*100)}Wa(-1),F9(null)}return}if(xi())return;Wa(-1),F9(null);const{insertIndex:lt,minDistance:Zt}=Bn.findClosestSegment(he,Be,at),Er=nr(yt);Zt>=Er||(he.splice(lt,0,{x:Be,y:at}),Rt(he),Pr(he),typeof o=="function"&&lo(qe)&&!C&&o(qe,u,()=>{wi()}))}const l0=Ce=>{M&&typeof M<"u"&&typeof M=="function"&&(M({x:-1,y:-1}),s0(-1,-1)),Z0(Ce,!0),Vn!="-1"?V0():(de==null?void 0:de.awi_annotation_type)=="polygon"&&!l&&!A&&!Tn&&qe.length>0&&setTimeout(()=>{Pr(qe)},200)},$0=Ce=>{if(!Tn){if((mn||At&&er.x!==-1&&er.y!==-1)&&H5(Lr,Bn.getMousePos(Ue.current,Ce))){const he=Ei(u);if(he){const xe=lo(he.awi_coords);if(typeof o=="function"&&xe)if(er.x!==-1&&er.y!==-1)if((de==null?void 0:de.awi_annotation_type)=="polygon")o(he.awi_coords,Dt);else{const Ie=Bn.getUpdatedCoordinates(Ue,Ce,er);o(Ie,Dt)}else o(he.awi_coords,Dt);else xe||((de==null?void 0:de.awi_annotation_type)=="polygon"&&Ri(he.awi_coords,Ce),i0(!0))}}Sn?(Ct(!1),typeof n=="function"&&lo(qe)&&((de==null?void 0:de.awi_annotation_type)==="polygon"?O5():n(qe,null,!1,()=>{wi()}))):At&&(Nt(!1),un("-1"),xr([]),typeof d=="function"&&d("-1"))}},U9=Ce=>{if(!(Ue!=null&&Ue.current))return;const he=Z4(Ce,!1);(he==null?void 0:he.length)>0&&he[0]!=Dt?(r0(),Nr(he[0]),Ue.current.style.cursor="pointer"):Vn!="-1"&&(Nr("-1"),Dt=="-1"&&(Ue.current.style.cursor="default"))},Xs=(Ce,he=!1)=>{if(he){st(qe);return}const{x:xe,y:Ie}=Bn.getMousePos(Ue.current,Ce),Be=Ei(u);if(Be){const at=Be.awi_coords,{minDistance:_t,insertIndex:qt}=Bn.closestCoordinates({x:xe,y:Ie},at),hn=nr(Wt);if(_t<=hn&&Ue.current){const lt=Ue.current.getContext("2d");if(!lt||qt==dn)return;Ue.current.style.cursor="pointer",yn(qt),Ue.current.title="Point "+(qt+1);const Zt=Mi([at[qt]])[0];lt.fillStyle=gn,lt.beginPath(),lt.arc(Zt.x,Zt.y,pe*2.5,0,Or.TWO_PIE),lt.strokeStyle="black",lt.lineWidth=ze.SELECTED,lt.stroke(),lt.fill()}else if(Ue.current){if(!Ue.current.getContext("2d"))return;const Zt=nr(Ht);dn!==-1&&(st(),yn(-1)),(de==null?void 0:de.awi_annotation_type)=="polygon"&&Bn.findClosestSegment(at,xe,Ie).minDistance<=Zt?(Ue.current.style.cursor="pointer",Ue.current.title="Add point"):(Ue.current.style.cursor="default",Ue.current.title="")}}},Z0=l1.useThrottle(Xs,100),c0=l1.useThrottle(U9,100),Ri=(Ce,he)=>{if(Bn.breakPointCount(Ce)>0){console.log("================================BREAK================================"),$t(!1),he&&he.stopPropagation&&(he==null||he.stopPropagation());const Ie=Bn.shiftPolygon(Ce);if(typeof o=="function"&&lo(Ie)){const Be=u;o(Ie,u,()=>{Dt!=Be&&un(Be),wi()})}}},Ne=()=>Cn.length>Or.MAX_ANNOTATIONS_TO_RUN_FAST?st:Pr,st=l1.useThrottle((Ce,he,xe=!1,Ie=!1,Be=-1)=>{Pr(Ce,he,xe,Ie,Be)},50),nt=(Ce="forward")=>{if((Cn||[]).length!=0)if(Ce=="last_update"){const he=Cn==null?void 0:Cn.reduce((xe,Ie)=>{const Be=new Date(xe.awi_last_updation).getTime();return new Date(Ie.awi_last_updation).getTime()>Be?Ie:xe});he&&(un(he.awi_id),typeof d=="function"&&d(he.awi_id))}else if(u==="-1")(Cn||[]).length>0&&(un(Cn[0].awi_id),typeof d=="function"&&d(Cn[0].awi_id));else{const he=Ys(u);Ce=="backward"?he!==-1?he>0?(un(Cn[he-1].awi_id),typeof d=="function"&&d(Cn[he-1].awi_id)):(un(Cn[Cn.length-1].awi_id),typeof d=="function"&&d(Cn[Cn.length-1].awi_id)):(Cn||[]).length>0&&(un(Cn[Cn.length-1].awi_id),typeof d=="function"&&d(Cn[Cn.length-1].awi_id)):he!==-1?(Cn||[]).length>he+1?(un((Cn||[])[he+1].awi_id),typeof d=="function"&&d((Cn||[])[he+1].awi_id)):(un((Cn||[])[0].awi_id),typeof d=="function"&&d((Cn||[])[0].awi_id)):(Cn||[]).length>0&&(un(Cn[0].awi_id),typeof d=="function"&&d(Cn[0].awi_id))}},ln=()=>{if(console.log("handleCompleteAnnotation"),!(!de||l))if(w==="SAM"){xa();return}else{if((de==null?void 0:de.awi_annotation_type)!="polygon")return;if(typeof n=="function"&&lo(qe))if((qe==null?void 0:qe.length)>2){const Ce=[...qe,{x:qe[0].x,y:qe[0].y}];Rt([]),n(Ce,null,!1,()=>{wi()})}else{Kr.error("Polygon requires minimum of three coordinates");return}else Kr.error("Invalid coordinates, please create valid coordinates")}},$n=Ce=>{console.log("handle Complete Multiple Annotation SAM");const he=[];for(let xe=0;xe<(Ce==null?void 0:Ce.length);xe++){const Ie=Ce[xe].outline,Be=Ce[xe].classId;if(lo(Ie)){const _t={coords:(de==null?void 0:de.awi_annotation_type)=="polygon"?Bn.createPolygonLoop(Ie):Ie,classId:Be,isSam:!0};he.push(_t)}}(he==null?void 0:he.length)>0&&typeof r=="function"&&(Rt([]),r(he,()=>{(he==null?void 0:he.length)>0&&i0()}))},mr=()=>{if(console.log("undoAnnotationPoint"),console.log("coordinates ------>",qe),u!="-1"){$9();return}if(qe.length>0&&(de==null?void 0:de.awi_annotation_type)==="polygon")qe.pop(),Rt([...qe]),Pr(qe);else if(qe.length>0&&Tn)qe.pop(),Rt([...qe]),Pr(qe);else return},no=()=>{pn(Ft)},kr=(Ce,he="zoom-in")=>{if(Ue.current&&Ue)if(he=="zoom-in"){const xe=Yt,Ie=tt.scale+xe,Be=Ue.current.getBoundingClientRect(),at=Ce.clientX-Be.left,_t=Ce.clientY-Be.top,qt=Ie/tt.scale,hn=tt.x-at*(qt-1),lt=tt.y-_t*(qt-1),Zt={scale:+Ie.toFixed(2),x:hn,y:lt};pn(Zt),y5({x:Ce.clientX,y:Ce.clientY})}else{const xe=Yt,Ie=tt.scale-xe;if(Ie==1)no();else{const Be=Ue.current.getBoundingClientRect();(bo.x==-1||bo.y==-1)&&console.log("zoomTimeMousePoint");const at=bo.x!=-1?bo.x:Ce.clientX,_t=bo.y!=-1?bo.y:Ce.clientY,qt=at-Be.left,hn=_t-Be.top,lt=Ie/tt.scale,Zt=-Math.abs(tt.x+qt*(1-lt)),Er=-Math.abs(tt.y+hn*(1-lt)),le=bt.width*(tt.scale+Yt-1),go=bt.height*(tt.scale+Yt-1),{newXTransform:Do,newYTransform:Cr}=Bn.transformCoordinatesCheck(Zt,Er,le,go),on={scale:+Ie.toFixed(2),x:Do,y:Cr};pn(on)}}},ba=(Ce=null)=>{if(tt.scale!==Wn&&Ue.current)if(!Ce||!Ce.clientX||!Ce.clientY||Ce.type=="click"){const he=bt.width*(tt.scale+Yt-1),xe=bt.height*(tt.scale+Yt-1),Ie=tt.x-bt.width*Yt/2,Be=tt.y-bt.height*Yt/2,{newXTransform:at,newYTransform:_t}=Bn.transformCoordinatesCheck(Ie,Be,he,xe),qt={scale:+(tt.scale+Yt).toFixed(2),x:at,y:_t};pn(qt)}else kr(Ce,"zoom-in")},ni=(Ce=null)=>{if(tt.scale!==1&&Ue.current)if(!Ce||!Ce.clientX||!Ce.clientY||Ce.type=="click"){const he=bt.width*(tt.scale-Yt-1),xe=bt.height*(tt.scale-Yt-1),Ie=tt.x+bt.width*Yt/2,Be=tt.y+bt.height*Yt/2,{newXTransform:at,newYTransform:_t}=Bn.transformCoordinatesCheck(Ie,Be,he,xe);pn({scale:+(tt.scale-Yt).toFixed(2),x:at,y:_t})}else kr(Ce,"zoom-out")},Eo=Ce=>{Ce.deltaY<0?ba(Ce):ni(Ce)},_a=()=>{const Ce=bt.width*(tt.scale-1),he=bt.height*(tt.scale-1),xe=tt.x+Gn,Ie=tt.y,{newXTransform:Be,newYTransform:at}=Bn.transformCoordinatesCheck(xe,Ie,Ce,he);pn({...tt,x:Be,y:at})},ya=()=>{const Ce=bt.width*(tt.scale-1),he=bt.height*(tt.scale-1),xe=tt.x-Gn,Ie=tt.y,{newXTransform:Be,newYTransform:at}=Bn.transformCoordinatesCheck(xe,Ie,Ce,he);pn({...tt,x:Be,y:at})},w1=()=>{const Ce=bt.width*(tt.scale-1),he=bt.height*(tt.scale-1),xe=tt.x,Ie=tt.y+Gn,{newXTransform:Be,newYTransform:at}=Bn.transformCoordinatesCheck(xe,Ie,Ce,he);pn({...tt,x:Be,y:at})},W1=()=>{const Ce=bt.width*(tt.scale-1),he=bt.height*(tt.scale-1),xe=tt.x,Ie=tt.y-Gn,{newXTransform:Be,newYTransform:at}=Bn.transformCoordinatesCheck(xe,Ie,Ce,he);pn({...tt,x:Be,y:at})};if(!e||!i)return null;const xa=()=>{if(nn){Kr.error("Request already in progress");return}if(!(qe!=null&&qe.length)){Kr.error("No points to send");return}const Ce={};Ce.image_url=e,Ce.coords=qe,console.log("Sent to SAM",Ce),Q0(),typeof h=="function"&&h("annotate")},dr=()=>{if(Di?zn(!1):Di||zn(!0),nn){Kr.error("Request already in progress");return}typeof h=="function"&&h("annotate")},Q4=Ce=>{console.log("Submitted data from SAMModal:",Ce),wa(Ce),typeof h=="function"&&h("annotate")},wa=Ce=>{if(!t0||!(t0!=null&&t0.mutate)){Kr.error("SAM Prompt is not available");return}console.log("getSAMAnnotationsPrompt");const he=Ce.awi_annotation_prompt,xe=Ce.model_confidence,Ie=Ce.model_name,Be=Ce.model_max_results;ko({modelName:Ie,modelConfidence:xe,modelMaxResults:Be,promptMessage:he});const at=ut.generateImageUrl(ut.getImageKitUrl(e,-1,-1,-1)),qt={requestId:a||0,contents:[{url:e1||at,contentKey:i,directPrompt:he||""}],confidence:xe||Hr,modelName:Ie||oo,modelMaxResults:Be||V1};jt(!0),t0.mutate(qt,{onSuccess:hn=>{var lt,Zt,Er,le,go;if(jt(!1),!hn.success)Kr.error(hn.message);else{zn(!1);const Do=((Er=(Zt=(lt=hn.data)==null?void 0:lt[0])==null?void 0:Zt.contours)==null?void 0:Er[0])??null;if(Do){const Cr=Do.coordinates;if((Cr==null?void 0:Cr.length)==0||!((go=(le=Cr[0])==null?void 0:le.box)!=null&&go.length))Kr.error("No auto annotation is possible to create");else{const on=[];(de==null?void 0:de.awi_annotation_type)=="polygon"?(console.log("coordinates",Cr),Cr.forEach(So=>{var ri;(ri=So==null?void 0:So.mask_polygon)==null||ri.forEach(zi=>{const oi={outline:zi.outline,classId:Cr.classId};on.push(oi)})})):(de==null?void 0:de.awi_annotation_type)=="rectangle"?Cr.forEach(So=>{const ri=Bn.getBoundingBox(So.box);Rt(ri);const zi={outline:ri,classId:Cr.classId};on.push(zi)}):(de==null?void 0:de.awi_annotation_type)=="circle"?Cr.forEach(So=>{const ri=Bn.calculateCircleFromCoordinates(Bn.getBoundingBox(So.box));Rt(ri);const zi={outline:ri,classId:Cr.classId};on.push(zi)}):(de==null?void 0:de.awi_annotation_type)=="dot"&&Cr.forEach(So=>{const ri=Bn.calculateCentroid(So.box);Rt(ri);const zi={outline:ri,classId:Cr.classId};on.push(zi)}),$n(on),typeof E=="function"&&E("Normal")}}else Kr.error("No Auto Annotation found")}},onError:hn=>{Kr.exception(hn),jt(!1)}})},Q0=()=>{if(!e0||!(e0!=null&&e0.mutate)){Kr.error("SAM is not available");return}const Ce=ut.generateImageUrl(ut.getImageKitUrl(e,-1,-1,-1)),he=e1||Ce,xe=l1.chunkArray(qe),Ie={img_url:he,coords:qe,coordinates:xe};jt(!0),e0.mutate(Ie,{onSuccess:Be=>{var at;if(jt(!1),!Be.success)Kr.error(Be.message);else if(console.log("this is the SAM data",Be),((at=Be==null?void 0:Be.data)==null?void 0:at.length)>0){const _t=[];(de==null?void 0:de.awi_annotation_type)=="polygon"?Be.data.forEach(qt=>{qt.contours.forEach(hn=>{Rt(hn.outline);const Zt={outline:hn.outline,classId:null};_t.push(Zt)})}):(de==null?void 0:de.awi_annotation_type)=="rectangle"?Be.data.forEach(qt=>{Rt(qt.bbox),console.log("this si the bbox",qt.bbox);const lt={outline:qt.bbox,classId:null};_t.push(lt)}):(de==null?void 0:de.awi_annotation_type)=="circle"?Be.data.forEach(qt=>{const hn=Bn.calculateCircleFromCoordinates(qt.bbox);Rt(hn);const lt={outline:hn,classId:null};_t.push(lt)}):(de==null?void 0:de.awi_annotation_type)=="dot"&&Be.data.forEach(qt=>{const hn=Bn.calculateCentroid(qt.bbox);Rt(hn);const lt={outline:hn,classId:null};_t.push(lt)}),$n(_t)}else Kr.error("No annotations found from SAM")},onError:Be=>{Kr.exception(Be),jt(!1)}})},K9=async()=>{if(Je&&typeof Je=="function"){Kr.success("Loading Annotations...");const Ce=await Je();console.log("cacheRemoveAnnotationResponse ",Ce),Ce!=null&&Ce.success?(Kr.success((Ce==null?void 0:Ce.message)+" and now loading final annotations..."),i0(!0)):Kr.error(Ce==null?void 0:Ce.message)}},$9=()=>{var he;console.log("Undo last state annotation");const Ce=Ei(u);if(((he=Ce.past_coords)==null?void 0:he.length)>0){const xe=Ce.past_coords[Ce.past_coords.length-1];typeof o=="function"&&lo(xe)&&!C&&o(xe,u,()=>{wi()})}},E1=Ce=>{console.log("Control p"),Ue.current&&ba(Ce)},W0=Ce=>{console.log("Control m"),ni(Ce)},Fi=()=>{const Ce={clientX:(Kt==null?void 0:Kt.x)||0,clientY:(Kt==null?void 0:Kt.y)||0};E1(Ce)},t1=()=>{const Ce={clientX:(Kt==null?void 0:Kt.x)||0,clientY:(Kt==null?void 0:Kt.y)||0};W0(Ce)},B5=()=>{console.log("Copying annotations"),B&&typeof B=="function"&&B((vn==null?void 0:vn.result)||[])},n1=(Ce=!0)=>{try{document.fullscreenElement?(document.exitFullscreen().then(()=>{console.log("Fullscreen exited")}).catch(he=>{console.log(he)}),Ce&&p0.setItem("full_screen","no")):(document.documentElement.requestFullscreen().then(()=>{console.log("Fullscreen entered")}).catch(he=>{console.log(he)}),Ce&&p0.setItem("full_screen","yes"))}catch(he){console.log(he)}},S1=Ce=>{var he;if(!(!A&&!["awi_annotator","awi_verifier","awi_developer"].includes(p.userObj.awi_level))){if((de==null?void 0:de.awi_request_for)=="attributes"){const xe=x1(Ce)||[];console.log("This is the temp annotation",xe),xe.length>0&&(xr(xe),typeof d=="function"&&d(xe[0]),Pr()),mn&&$t(!1),Nt(!1);return}if(Sn)if(Ct(!1),Tn){if(qe&&(qe==null?void 0:qe.length)>0){let xe=[];jr?xi()?xe=va():xe=qe:xe=va(),Pr(xe)}}else console.log("creating new annotation"),typeof n=="function"&&lo(qe)&&((de==null?void 0:de.awi_annotation_type)==="polygon"?O5():(Rt([]),n(qe,null,!1,()=>{wi()})));else if(l&&Dt!=="-1"||A){if((mn||er.x!==-1&&er.y!==-1)&&H5(Lr,Bn.getMousePos(Ue.current,Ce))){const xe=Ei(Dt);if(xe){const Ie=[...xe.awi_coords],Be=lo(Ie);typeof o=="function"&&Be&&!C?o(Ie,u,()=>{wi()}):Be||((de==null?void 0:de.awi_annotation_type)=="polygon"?Ri(Ie,Ce):i0(!0))}}else{const xe=x1(Ce)||[];if(xe.length>0)if(xe.every(Ie=>rr.includes(Ie))&&rr.every(Ie=>xe.includes(Ie))){if(un(Ie=>(typeof d=="function"&&d(rr[(rr.indexOf(Ie)+1)%rr.length]),st(),rr[(rr.indexOf(Ie)+1)%rr.length]==="-1"&&(ar({x:0,y:0}),Qn({x:-1,y:-1})),rr[(rr.indexOf(Ie)+1)%rr.length])),(!mn||xi())&&(de==null?void 0:de.awi_annotation_type)=="polygon"){const Ie=(he=Ei(u))==null?void 0:he.awi_coords;ti(Ce,Ie)}}else console.log("Selecting first temp"),un(xe[0]),typeof d=="function"&&d(xe[0]),Pr();else un("-1"),Pr();xr(xe)}mn&&$t(!1),Nt(!1)}else if(l){const xe=x1(Ce)||[];console.log("This is the temp annotation",xe),xe.length>0&&(xr(xe),typeof d=="function"&&d(xe[0]),Pr()),Nt(!1)}}},u0=Ce=>{if(console.log("Handle Mouse Down"),Ce.button==0&&!ei()){if(!["awi_annotator","awi_verifier","awi_developer"].includes(p.userObj.awi_level))return;if(!l&&!A){Ct(!0),console.log("Mouse down");const{x:he,y:xe}=Bn.getMousePosAbsolute(Ue.current,Ce);Mn({x:he,y:xe}),Tn?jr&&xi()||Rt(Ie=>[...Ie||[],{x:he,y:xe}]):(de==null?void 0:de.awi_annotation_type)==="rectangle"?Rt([{x:he,y:xe},{x:he,y:xe},{x:he,y:xe},{x:he,y:xe}]):(de==null?void 0:de.awi_annotation_type)==="circle"?Rt([{x:he,y:xe},{x:he,y:xe}]):(de==null?void 0:de.awi_annotation_type)==="dot"?Rt([{x:he,y:xe}]):(de==null?void 0:de.awi_annotation_type)==="polygon"&&Rt(Ie=>[...Ie,{x:he,y:xe}])}else A||(M5(Ce,Dt),Nt(!0))}else if(Ce.button===1||Ce.button==0){const{clientX:he,clientY:xe}=Ce,{x:Ie,y:Be}=tt,at=qt=>{console.log("PANNING!!!!!");const hn=qt.clientX-he,lt=qt.clientY-xe,Zt=Ie+hn,Er=Be+lt,le=Math.max(Math.min(Zt,0),bt.width-bt.width*tt.scale),go=Math.max(Math.min(Er,0),bt.height-bt.height*tt.scale);pn({scale:tt.scale,x:le,y:go})},_t=()=>{window.removeEventListener("mousemove",at),window.removeEventListener("mouseup",_t),window.addEventListener("touchmove",at,{passive:!1}),window.addEventListener("touchend",_t)};tt.scale>1&&(window.addEventListener("mousemove",at),window.addEventListener("touchmove",at,{passive:!1})),window.addEventListener("mouseup",_t),window.addEventListener("touchend",_t)}},G1=Ce=>{if(Ue!=null&&Ue.current&&_r({x:Ce.clientX,y:Ce.clientY}),l&&(Dt!="-1"&&(Cn==null?void 0:Cn.length)<=Or.MAX_ANNOTATIONS_TO_HOVER&&Z0(Ce),!mn&&!At?(Cn==null?void 0:Cn.length)<=Or.MAX_ANNOTATIONS_TO_HOVER&&c0(Ce):Vn!="-1"&&Nr("-1")),C)return;let he=[];if(Sn){Tn?(he.length==0&&(he=[en]),Rt(xe=>xe.length==0?[en]:xe),Pr(qe)):(de==null?void 0:de.awi_annotation_type)==="rectangle"?(he=Bn.getUpdatedCoordinates(Ue,Ce,en),Rt(he),Pr(he)):(de==null?void 0:de.awi_annotation_type)==="circle"?(Q1(Ce),Pr(qe)):(de==null||de.awi_annotation_type,Pr(qe));return}else if(l&&Dt!=="-1"&&At){if(console.log("isDrawingAnnotation",Sn),mn){const{x:xe,y:Ie}=Bn.getMousePos(Ue.current,Ce),Be=xe-(Lr.x||0),at=Ie-(Lr.y||0);if(u!=="-1"){he=[...qe].map(hn=>({x:hn.x+Be,y:hn.y+at}));const _t=Ei(u);if(_t)switch(_t.awi_coords=[...he],de==null?void 0:de.awi_annotation_type){case"dot":{he.length===1&&(he[0].x=Bn.getPerfectPointValue(he[0].x),he[0].y=Bn.getPerfectPointValue(he[0].y));break}case"circle":{he.length===2&&(he=[...Bn.adjustToCircle(he)],_t.awi_coords=[...he]);break}case"rectangle":{if(he.length===4){const hn=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=hn,he[2].x=hn,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-hn,he[3].x=1-hn,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&&Ri(he,Ce);break}default:{console.log("Unknown request type");break}}Ne()(he)}}else if(er.x!==-1&&er.y!==-1&&u!=="-1"){console.log("Corner coordinates");const xe=Ei(u);if((de==null?void 0:de.awi_annotation_type)==="circle"){const Ie=Bn.getMousePos(Ue.current,Ce);if(xe){he=xe.awi_coords;const Be=(he[0].x+he[1].x)/2,at=(he[0].y+he[1].y)/2,_t=Bn.getDistance(Ie.x,Ie.y,Be,at);Be-_t<0?(he[0]={x:0,y:at},he[1]={x:2*_t,y:at}):Be+_t>1?(he[0]={x:1-2*_t,y:at},he[1]={x:1,y:at}):at-_t<0?(he[0]={x:Be,y:0},he[1]={x:Be,y:2*_t}):at+_t>1?(he[0]={x:Be,y:1-2*_t},he[1]={x:Be,y:1}):(he[0]={x:Be-_t,y:at},he[1]={x:Be+_t,y:at}),he=[...Bn.adjustToCircle(he)]}}else if((de==null?void 0:de.awi_annotation_type)==="polygon"&&!Tn){const Ie=Bn.getMousePos(Ue.current,Ce);xe!=null&&xe.awi_coords&&(he=[...xe.awi_coords],yr>-1&&(yr===0||yr===he.length-1?(he[0]={x:Ie.x,y:Ie.y},he[he.length-1]={x:Ie.x,y:Ie.y}):he[yr]={x:Ie.x,y:Ie.y},Qn({x:Ie.x,y:Ie.y})))}else he=Bn.getUpdatedCoordinates(Ue,Ce,er);if(lo(he)){Rt([...he]);const Ie=Ei(u);Ie&&(Ie.awi_coords=he,Pr(he))}}}else if((de==null?void 0:de.awi_annotation_type)==="polygon"&&!l&&(qe==null?void 0:qe.length)>1){const{x:xe,y:Ie}=Bn.getMousePos(Ue.current,Ce);st(qe,{x:xe,y:Ie})}},Z9=Ce=>{if(Ce.touches.length===1){const he=Ce.touches[0];if(ei()){if(tt.scale==1)return;Mr.current||(Mr.current={x:he.clientX,y:he.clientY})}else{const xe={...he,clientX:he.clientX,clientY:he.clientY,currentTarget:Ce.currentTarget,button:0};u0(xe)}}},Y1=Ce=>{if(Ce.preventDefault(),Ce.touches.length>=2){const[he,xe]=[Ce.touches[0],Ce.touches[1]],Ie=xe.clientX-he.clientX,Be=xe.clientY-he.clientY,at=Math.hypot(Ie,Be);if(_n!==null){const _t=at-_n,qt=(he.clientX+xe.clientX)/2,hn=(he.clientY+xe.clientY)/2;Eo({deltaY:-_t,clientX:qt,clientY:hn,currentTarget:Ce.currentTarget})}Hn(at)}if(Ce.touches.length===1){const he=Ce.touches[0];if(ei()){if(Mr.current){console.log("PANNING!!!!!");const xe=he.clientX-Mr.current.x,Ie=he.clientY-Mr.current.y,{x:Be,y:at}=tt,_t=Be+xe,qt=at+Ie,hn=Math.max(Math.min(_t,0),bt.width-bt.width*tt.scale),lt=Math.max(Math.min(qt,0),bt.height-bt.height*tt.scale);pn({scale:tt.scale,x:hn,y:lt}),Mr.current={x:he.clientX,y:he.clientY}}}else{Mr.current&&(Mr.current=null);const xe={...he,clientX:he.clientX,clientY:he.clientY,currentTarget:Ce.currentTarget};G1(xe)}}},r1=Ce=>{if(Mr.current&&(Mr.current=null),Ce.touches.length<2&&Hn(null),ei()){Ce.preventDefault();return}const he=Ce.touches[0]||Ce.changedTouches[0],xe={...he,clientX:he.clientX,clientY:he.clientY,currentTarget:Ce.currentTarget};S1(xe)},Ea=Ce=>{const he=Ce.touches[0]||Ce.changedTouches[0],xe={...he,clientX:he.clientX,clientY:he.clientY,currentTarget:Ce.currentTarget};l0(xe)},G0=(Ce="")=>{switch(Ce){case"left":_a();break;case"right":ya();break;case"top":w1();break;case"bottom":W1();break;default:console.warn(`Unknown pan direction: ${Ce}`)}},Q9=()=>{typeof y=="function"&&y(Ce=>!Ce)},Js=()=>{if(!u||u=="-1"){Kr.error("Control copy will be work only when you have a selected annotation");return}else N&&typeof N=="function"&&N(vn==null?void 0:vn.result,!1)},Y0=()=>{if(!fi.current||!Xa.current)return;const Ce=fi.current,he=Ce.getContext("2d");if(!he)return;const xe=bt.width*tt.scale,Ie=bt.height*tt.scale;!xe||!Ie||(Ce.width=xe,Ce.height=Ie,he.clearRect(0,0,xe,Ie),he.save(),he.setTransform(1,0,0,1,0,0),he.clearRect(0,0,xe,Ie),he.translate(tt.x,tt.y),he.scale(tt.scale,tt.scale),he.drawImage(Xa.current,0,0,bt.width,bt.height),he.restore())};return W.jsxs(W.Fragment,{children:[Di&&W.jsx(VA,{closeSAMPromptModal:()=>zn(!1),onSubmit:Q4,directPrompt:gr,isLoading:nn,requestInfo:de}),A&&H&&(vn==null?void 0:vn.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:B5,children:"Copy Annotations"})})})}),A&&W.jsx("div",{className:qn(En.canvasContainer,{[s]:!!s}),ref:It,style:{minHeight:jr?"50vh":"unset",touchAction:"none !important",position:"relative"},children:Ga?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:"})," ",l1.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(Gu,{isEditing:l,handleSelectTool:h,annotator_name:((f=(W9=(d0=k==null?void 0:k.result)==null?void 0:d0.annotatorInfo)==null?void 0:W9.awi_personal_info)==null?void 0:f.awi_full_name)||"",handleSAMToggle:E,hasAnnotation:vn,SAMToggleValue:D,currentSelectedSAMTool:T,handleCopyAnnotations:N,setOpenRequestDetails:z,openRequestDetails:V,show_guidelines_first:oe,handleZoomInClick:ba,zoomProperties:tt,handleReset:no,handleZoomOutClick:ni,handleCompleteAnnotation:ln,toggleFullscreen:n1,selectAnnotationId:Dt,selectedAnnotationInfo:Fn,undoLastStateAnnotation:$9,usingSamFunction:Tn,samAPIactive:nn,handleSendToSamFunction:xa,coordinates:qe,reLoadAndReDrawAnnotations:K9,showGuidelinesFirst:oe,handleSendToSamFunctionPrompt:dr,isMobile:jr,toggleSelectAnnotation:nt,handleLeftKeyDown:_a,handleRightKeyDown:ya,handleUpKeyDown:w1,handleDownKeyDown:W1,undoAnnotationPoint:mr,togglePagination:Q9,switchToEditMode:_e,switchToCreateMode:be,goToNextImage:me,goToPreviousImage:fe,handleGoToPendingAnnotations:ae,handleCopyByCtrlC:Js,handlePasteAnnotationsByControlV:ie,showPagination:Z,isControlViaToolPress:dt,setIsControlViaToolPress:$e,isAltViaToolPress:ft,setIsAltViaToolPress:Tt,isCarousel:A,allowedToCopyPreview:H,classColorMapToSend:b,request:de,parentReqData:Ge,RequestInfoModal:Ee,setCrossHair:ao,isCrossHair:ur,annotationViewType:ct,REACT_APP_SAM_ENABLED:wt,loggedUser:p,controlMinusHotkey:t1,controlPlusHotkey:Fi,Carousel:ot},i),W.jsx(qu,{canvasDimensions:bt,zoomProperties:tt,isEditing:l,canvasRef:Ue,bgCanvasRef:fi,overlayCanvasRef:Et,handleMouseDown:u0,handleMouseUp:S1,handleMouseMove:G1,handleMouseMoveOut:$0,handleOnMouseLeave:l0,handleWheel:Eo,handleTouchStart:Z9,handleTouchMove:Y1,handleTouchEnd:r1,handleTouchCancel:Ea})]})}),!A&&ct=="atom"&&W.jsxs("div",{style:{display:"flex",flexDirection:jr?"column":"row"},children:[W.jsx("div",{style:{height:jr?"unset":"100%",width:jr?"100%":"5.4%",border:"1px solid #E4E0E6",backgroundColor:"white"},children:["awi_annotator","awi_verifier","awi_developer"].includes(p.userObj.awi_level)&&W.jsx("div",{style:{width:"100%",gap:"10px",marginTop:"2px",height:"100% ",display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:jr?"row":"column"},children:Fe&&W.jsx(Gu,{isEditing:l,handleSelectTool:h,annotator_name:((F=(O=(v=k==null?void 0:k.result)==null?void 0:v.annotatorInfo)==null?void 0:O.awi_personal_info)==null?void 0:F.awi_full_name)||"",handleSAMToggle:E,hasAnnotation:vn,SAMToggleValue:D,currentSelectedSAMTool:T,handleCopyAnnotations:N,setOpenRequestDetails:z,openRequestDetails:V,show_guidelines_first:oe,handleZoomInClick:ba,zoomProperties:tt,handleReset:no,handleZoomOutClick:ni,handleCompleteAnnotation:ln,toggleFullscreen:n1,selectAnnotationId:Dt,selectedAnnotationInfo:Fn,undoLastStateAnnotation:$9,usingSamFunction:Tn,samAPIactive:nn,handleSendToSamFunction:xa,coordinates:qe,reLoadAndReDrawAnnotations:K9,showGuidelinesFirst:oe,handleSendToSamFunctionPrompt:dr,isMobile:jr,toggleSelectAnnotation:nt,handleLeftKeyDown:_a,handleRightKeyDown:ya,handleUpKeyDown:w1,handleDownKeyDown:W1,undoAnnotationPoint:mr,togglePagination:Q9,switchToEditMode:_e,switchToCreateMode:be,goToNextImage:me,goToPreviousImage:fe,handleGoToPendingAnnotations:ae,handleCopyByCtrlC:Js,handlePasteAnnotationsByControlV:ie,showPagination:Z,isControlViaToolPress:dt,setIsControlViaToolPress:$e,isAltViaToolPress:ft,setIsAltViaToolPress:Tt,isCarousel:A,allowedToCopyPreview:H,classColorMapToSend:b,request:de,parentReqData:Ge,RequestInfoModal:Ee,setCrossHair:ao,isCrossHair:ur,annotationViewType:ct,REACT_APP_SAM_ENABLED:wt,loggedUser:p,controlMinusHotkey:t1,controlPlusHotkey:Fi,Carousel:ot},i)})}),W.jsxs("div",{style:jr?{height:"100%",width:"100%"}:{width:"94.6%"},children:[!jr&&W.jsxs("div",{style:{width:"100%",display:"flex",alignItems:"center",height:jr?"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:Re||"rgba(111, 41, 169, 0.1)",height:"100%"},children:(((q=k==null?void 0:k.result)==null?void 0:q.awi_contents)||[]).length})]}),W.jsxs("p",{className:"color-black",style:{marginLeft:"1rem"},title:((re=G==null?void 0:G.awi_label)==null?void 0:re.length)>20?G.awi_label:J.length>20?J:"",children:["Image -"," ",((Oe=G==null?void 0:G.awi_label)==null?void 0:Oe.length)>0?G.awi_label.length>20?G.awi_label.substring(0,20)+"...":G.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:Co}),(Co==null?void 0:Co.length)>0&&W.jsx(C7,{color:"#000"})]})})]}),W.jsx("div",{children:Z&&jr&&rt&&W.jsx("div",{style:{border:"1px solid #E4E0E6"},children:W.jsx(rt,{handleNextPage:j,handlePreviousPage:R,currentPage:$,images:(Qe=k==null?void 0:k.result)==null?void 0:Qe.awi_contents,handleIndexUpdate:K,currentIndex:ue,request_id:X,requestFor:(Xe=k==null?void 0:k.result)==null?void 0:Xe.awi_request_for,imagePagination:Z,showImages:!0,fetchAnnotations:We,pageCount:Ye})})}),W.jsx("div",{style:{height:jr||Gs?"25px":"3%",border:"1px solid #E4E0E6",justifyContent:"space-between",paddingLeft:"10px",paddingRight:"10px",backgroundColor:"#fff"},children:jr&&(Co==null?void 0:Co.length)>0?W.jsx(W.Fragment,{children:W.jsx("div",{className:qn(En.zoom__container,"color-black"),style:{height:"25px",justifyContent:"center",alignItems:"center",fontWeight:"bold"},children:Co})}):W.jsx(W.Fragment,{children:tt.scale>1?W.jsx(W.Fragment,{children:W.jsxs("div",{className:qn(En.zoom__container,"color-black"),style:{height:"25px",justifyContent:"space-between",alignItems:"center"},children:[W.jsx("button",{className:"modalButton modalButton__tertiaryChoice pan_small",onClick:()=>G0("left"),children:"Left"}),W.jsx("progress",{value:Ji.left,max:bt.width,title:Ji.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:()=>G0("right"),children:"Right"}),W.jsx("progress",{value:Ji.right,max:bt.width,title:Ji.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:()=>G0("top"),children:"Top"}),W.jsx("progress",{value:Ji.top,max:bt.height,title:Ji.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:()=>G0("bottom"),children:"Bottom"}),W.jsx("progress",{value:Ji.bottom,max:bt.height,title:Ji.bottom==0?"You can not move bottom more":"Showing how much you can move bottom more"})]})}):W.jsx("div",{className:qn(En.zoom__container,"color-black"),style:{height:"25px",justifyContent:"center",alignItems:"center"},children:"Zoom in to see image pan progress"})})}),W.jsx("div",{className:qn(En.canvasContainer,{[s]:!!s}),ref:It,style:{height:Z?"80%":"90%",width:"100%",touchAction:"none !important",minHeight:jr?"50vh":"unset",position:"relative"},children:Ga?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:"})," ",l1.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(qu,{canvasDimensions:bt,zoomProperties:tt,isEditing:l,canvasRef:Ue,bgCanvasRef:fi,overlayCanvasRef:Et,handleMouseDown:u0,handleMouseUp:S1,handleMouseMove:G1,handleMouseMoveOut:$0,handleOnMouseLeave:l0,handleWheel:Eo,handleTouchStart:Z9,handleTouchMove:Y1,handleTouchEnd:r1,handleTouchCancel:Ea})}),Z&&!jr&&rt&&W.jsx("div",{children:Z&&W.jsx("div",{style:{border:"1px solid #E4E0E6"},children:W.jsx(rt,{handleNextPage:j,handlePreviousPage:R,currentPage:$,images:(Bt=k==null?void 0:k.result)==null?void 0:Bt.awi_contents,handleIndexUpdate:K,currentIndex:ue,request_id:X,requestFor:(rn=k==null?void 0:k.result)==null?void 0:rn.awi_request_for,imagePagination:Z,showImages:!0,fetchAnnotations:We,pageCount:Ye})})})]})]}),!A&&ct=="library"&&W.jsxs(W.Fragment,{children:[Fe&&W.jsx(Gu,{isEditing:l,handleSelectTool:h,annotator_name:((ho=(Yn=(kn=k==null?void 0:k.result)==null?void 0:kn.annotatorInfo)==null?void 0:Yn.awi_personal_info)==null?void 0:ho.awi_full_name)||"",handleSAMToggle:E,hasAnnotation:vn,SAMToggleValue:D,currentSelectedSAMTool:T,handleCopyAnnotations:N,setOpenRequestDetails:z,openRequestDetails:V,show_guidelines_first:oe,handleZoomInClick:ba,zoomProperties:tt,handleReset:no,handleZoomOutClick:ni,handleCompleteAnnotation:ln,toggleFullscreen:n1,selectAnnotationId:Dt,selectedAnnotationInfo:Fn,undoLastStateAnnotation:$9,usingSamFunction:Tn,samAPIactive:nn,handleSendToSamFunction:xa,coordinates:qe,reLoadAndReDrawAnnotations:K9,showGuidelinesFirst:oe,handleSendToSamFunctionPrompt:dr,isMobile:!0,toggleSelectAnnotation:nt,handleLeftKeyDown:_a,handleRightKeyDown:ya,handleUpKeyDown:w1,handleDownKeyDown:W1,undoAnnotationPoint:mr,togglePagination:Q9,switchToEditMode:_e,switchToCreateMode:be,goToNextImage:me,goToPreviousImage:fe,handleGoToPendingAnnotations:ae,handleCopyByCtrlC:Js,handlePasteAnnotationsByControlV:ie,showPagination:Z,isControlViaToolPress:dt,setIsControlViaToolPress:$e,isAltViaToolPress:ft,setIsAltViaToolPress:Tt,isCarousel:A,allowedToCopyPreview:H,classColorMapToSend:b,request:de,parentReqData:Ge,RequestInfoModal:Ee,setCrossHair:ao,isCrossHair:ur,annotationViewType:ct,REACT_APP_SAM_ENABLED:wt,loggedUser:p,controlMinusHotkey:t1,controlPlusHotkey:Fi,Carousel:ot},i),W.jsx("div",{className:qn(En.canvasContainer,{[s]:!!s}),ref:It,style:{height:Z?"80%":"90%",width:"100%",touchAction:"none !important",minHeight:jr?"50vh":"unset",position:"relative"},children:Ga?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:"})," ",l1.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(qu,{canvasDimensions:bt,zoomProperties:tt,isEditing:l,canvasRef:Ue,bgCanvasRef:fi,overlayCanvasRef:Et,handleMouseDown:u0,handleMouseUp:S1,handleMouseMove:G1,handleMouseMoveOut:$0,handleOnMouseLeave:l0,handleWheel:Eo,handleTouchStart:Z9,handleTouchMove:Y1,handleTouchEnd:r1,handleTouchCancel:Ea})})]}),tr!=-1&&Zs&&W.jsx(hI,{callback:()=>Zo(Zs,tr),cancelCallBack:()=>{Wa(-1)},trigger:"REMOVE_POLYGON_POINT",fireOnMount:!0,children:W.jsx(W.Fragment,{})})]})},Xi={tableBar:"_tableBar_103oy_1",buttonGroup:"_buttonGroup_103oy_13",btnIcon:"_btnIcon_103oy_34",searchBar:"_searchBar_103oy_41",searchInput:"_searchInput_103oy_53",searchIcon:"_searchIcon_103oy_58",removeBorder:"_removeBorder_103oy_63",button:"_button_103oy_13",isSelected:"_isSelected_103oy_74",isDisabled:"_isDisabled_103oy_80",isActive:"_isActive_103oy_85",isText:"_isText_103oy_92"},k8e=({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=P.useCallback(w2.debounce((A,b)=>{typeof b=="function"&&b(A)},o),[o]),h=A=>{const b=A.currentTarget.value.trim();d(b,r)},m=()=>{typeof i=="function"&&i()};if(!t.length&&!n.length&&!e)return null;const p=(A,b)=>{const C=A.type==="text";return W.jsxs("button",{onClick:!C&&!A.isDisabled?A.onClick:void 0,title:A.title||"",disabled:A.isDisabled,className:qn(Xi.button,{[Xi.isText]:C,[Xi.isSelected]:A.isSelected,[Xi.isDisabled]:A.isDisabled,[Xi.isActive]:A.isActive&&!A.isSelected}),children:[A.icon&&W.jsx("img",{src:A.icon,alt:A.name,className:Xi.btnIcon}),W.jsx("div",{children:A.name})]},b)};return W.jsxs("div",{className:qn(Xi.tableBar,!l&&Xi.removeBorder),style:{borderColor:l?u||"#909090":void 0},children:[W.jsxs("div",{className:Xi.buttonGroup,children:[t.map(p)," "]}),W.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:"10px"},children:[W.jsx("div",{className:Xi.buttonGroup,children:n.map(p)}),e&&W.jsx("div",{className:Xi.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:Xi.searchInput,onKeyUp:h}),s&&W.jsx("img",{src:Nn.searchUrl.IconComponent,alt:a,className:qn(Xi.btnIcon,"cursor-pointer",Xi.searchIcon),onClick:m})]})})]})]})};function bI(e,t){const n=P.useRef(t);P.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 D8e=1;function T8e(e){return Object.freeze({__version:D8e,map:e})}function N8e(e,t){return Object.freeze({...e,...t})}const _I=P.createContext(null),yI=_I.Provider;function v8(){const e=P.useContext(_I);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}function R8e(e){function t(n,r){const{instance:o,context:i}=e(n).current;return P.useImperativeHandle(r,()=>o),n.children==null?null:P.createElement(yI,{value:i},n.children)}return P.forwardRef(t)}function F8e(e){function t(n,r){const[o,i]=P.useState(!1),{instance:a}=e(n,i).current;P.useImperativeHandle(r,()=>a),P.useEffect(function(){o&&a.update()},[a,o,n.children]);const s=a._contentNode;return s?yo.createPortal(n.children,s):null}return P.forwardRef(t)}function xI(e){function t(n,r){const{instance:o}=e(n).current;return P.useImperativeHandle(r,()=>o),null}return P.forwardRef(t)}function z8e(e){return function(n){const r=v8(),o=e(n,r),{instance:i}=o.current,a=P.useRef(n.position),{position:s}=n;return P.useEffect(function(){return i.addTo(r.map),function(){i.remove()}},[r.map,i]),P.useEffect(function(){s!=null&&s!==a.current&&(i.setPosition(s),a.current=s)},[i,s]),o}}function wI(e,t){const n=P.useRef();P.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 Im(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function j8e(e,t){return function(r,o){const i=v8(),a=e(Im(r,i),i);return bI(i.map,r.attribution),wI(a.current,r.eventHandlers),t(a.current,i,r,o),a}}var K4={exports:{}};/* @preserve
720
720
  * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
721
721
  * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
722
- */var V8e=K4.exports,EI;function U8e(){return EI||(EI=1,function(e,t){(function(n,r){r(t)})(V8e,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 m(f,v){if(v===!1)return f;var O=Math.pow(10,v===void 0?6:v);return Math.round(f*O)/O}function p(f){return f.trim?f.trim():f.replace(/^\s+|\s+$/g,"")}function A(f){return p(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 C(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=/\{ *([\w_ -]+) *\}/g;function x(f,v){return f.replace(w,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 y=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 k=window.requestAnimationFrame||M("RequestAnimationFrame")||B,D=window.cancelAnimationFrame||M("CancelAnimationFrame")||M("CancelRequestAnimationFrame")||function(f){window.clearTimeout(f)};function T(f,v,O){if(O&&k===B)f.call(v);else return k.call(window,a(f,v))}function N(f){f&&D.call(window,f)}var z={__proto__:null,extend:o,create:i,bind:a,get lastId(){return s},stamp:l,throttle:u,wrapNum:d,falseFn:h,formatNum:m,trim:p,splitWords:A,setOptions:b,getParamString:C,template:x,isArray:y,indexOf:E,emptyImageUrl:S,requestFn:k,cancelFn:D,requestAnimFrame:T,cancelAnimFrame:N};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&&(j(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 j(f){if(!(typeof L>"u"||!L||!L.Mixin)){f=y(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 R={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)}};R.addEventListener=R.on,R.removeEventListener=R.clearAllEventListeners=R.off,R.addOneTimeEventListener=R.once,R.fireEvent=R.fire,R.hasEventListeners=R.listens;var $=V.extend(R);function K(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)};K.prototype={clone:function(){return new K(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 K(this.x*f.x,this.y*f.y)},unscaleBy:function(f){return new K(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("+m(this.x)+", "+m(this.y)+")"}};function Z(f,v,O){return f instanceof K?f:y(f)?new K(f[0],f[1]):f==null?f:typeof f=="object"&&"x"in f&&"y"in f?new K(f.x,f.y):new K(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 K||typeof f[0]=="number"||"x"in f)v=O=Z(f);else if(f=G(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 K?f=Z(f):f=G(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=G(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=G(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 G(Z(v.x-F,v.y-q),Z(O.x+F,O.y+q))},equals:function(f){return f?(f=G(f),this.min.equals(f.getTopLeft())&&this.max.equals(f.getBottomRight())):!1}};function G(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)||Y(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=Y(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=Y(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=Y(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=Y(f),this._southWest.equals(f.getSouthWest(),v)&&this._northEast.equals(f.getNorthEast(),v)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function Y(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("+m(this.lat,f)+", "+m(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 Y([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:y(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}}),_e=6378137,be={R:_e,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 K(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=_e*Math.PI;return new U([-f,-f],[f,f])}()};function me(f,v,O,F){if(y(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}me.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 K((f.x/v-this._b)/this._a,(f.y/v-this._d)/this._c)}};function fe(f,v,O,F){return new me(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,Ge=de&&!document.addEventListener,Je="msLaunchUri"in navigator&&!("documentMode"in document),Ee=Ot("webkit"),Pe=Ot("android"),De=Ot("android 2")||Ot("android 3"),We=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Ye=Pe&&Ot("Google")&&We<537&&!("AudioNode"in window),ct=!!window.opera,rt=!Je&&Ot("chrome"),wt=Ot("gecko")&&!Ee&&!ct&&!de,ut=!rt&&Ot("safari"),Ke=Ot("phantom"),Re="OTransition"in He,ot=navigator.platform.indexOf("Win")===0,Fe=de&&"transition"in He,Te="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!De,Ve="MozPerspective"in He,dt=!window.L_DISABLE_3D&&(Fe||Te||Ve)&&!Re&&!Ke,$e=typeof orientation<"u"||Ot("mobile"),ft=$e&&Ee,Tt=$e&&Te,Qt=!window.PointerEvent&&window.MSPointerEvent,sn=!!(window.PointerEvent||Qt),Dn="ontouchstart"in window||!!window.TouchEvent,Gt=!window.L_NO_TOUCH&&(Dn||sn),An=$e&&ct,bn=$e&&wt,Wt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Lt=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}(),yt=!!(document.createElementNS&&Ae("svg").createSVGRect),Ut=!!yt&&function(){var f=document.createElement("div");return f.innerHTML="<svg/>",(f.firstChild&&f.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),gn=!yt&&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,mt=navigator.platform.indexOf("Linux")===0;function Ot(f){return navigator.userAgent.toLowerCase().indexOf(f)>=0}var Ze={ie:de,ielt9:Ge,edge:Je,webkit:Ee,android:Pe,android23:De,androidStock:Ye,opera:ct,chrome:rt,gecko:wt,safari:ut,phantom:Ke,opera12:Re,win:ot,ie3d:Fe,webkit3d:Te,gecko3d:Ve,any3d:dt,mobile:$e,mobileWebkit:ft,mobileWebkit3d:Tt,msPointer:Qt,pointer:sn,touch:Gt,touchNative:Dn,mobileOpera:An,mobileGecko:bn,retina:Wt,passiveEvents:Lt,canvas:Ht,svg:yt,vml:gn,inlineSvg:Ut,mac:gt,linux:mt},Vt=Ze.msPointer?"MSPointerDown":"pointerdown",pe=Ze.msPointer?"MSPointerMove":"pointermove",et=Ze.msPointer?"MSPointerUp":"pointerup",ze=Ze.msPointer?"MSPointerCancel":"pointercancel",vt={touchstart:Vt,touchmove:pe,touchend:et,touchcancel:ze},Ue={touchstart:Kt,touchmove:Rt,touchend:Rt,touchcancel:Rt},Et={},It=!1;function zt(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 Sn(f,v,O){if(!vt[v]){console.warn("wrong event specified:",v);return}f.removeEventListener(vt[v],O,!1)}function Ct(f){Et[f.pointerId]=f}function At(f){Et[f.pointerId]&&(Et[f.pointerId]=f)}function Nt(f){delete Et[f.pointerId]}function qe(){It||(document.addEventListener(Vt,Ct,!0),document.addEventListener(pe,At,!0),document.addEventListener(et,Nt,!0),document.addEventListener(ze,Nt,!0),It=!0)}function Rt(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 Kt(f,v){v.MSPOINTER_TYPE_TOUCH&&v.pointerType===v.MSPOINTER_TYPE_TOUCH&&zn(v),Rt(f,v)}function _r(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 Lr=200;function ar(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=Wa(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<=Lr?(F++,F===2&&v(_r(re))):F=1,O=Qe}}}return f.addEventListener("click",q),{dblclick:v,simDblclick:q}}function er(f,v){f.removeEventListener("dblclick",v.dblclick),f.removeEventListener("click",v.simDblclick)}var Qn=Ft(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),yr=Ft(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Wr=yr==="webkitTransition"||yr==="OTransition"?yr+"End":"transitionend";function en(f){return typeof f=="string"?document.getElementById(f):f}function Mn(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 un(f){var v=f.parentNode;v&&v.removeChild(f)}function Vn(f){for(;f.firstChild;)f.removeChild(f.firstChild)}function Nr(f){var v=f.parentNode;v&&v.lastChild!==f&&v.appendChild(f)}function rr(f){var v=f.parentNode;v&&v.firstChild!==f&&v.insertBefore(f,v.firstChild)}function xr(f,v){if(f.classList!==void 0)return f.classList.contains(v);var O=Hn(f);return O.length>0&&new RegExp("(^|\\s)"+v+"(\\s|$)").test(O)}function mn(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(!xr(f,v)){var re=Hn(f);_n(f,(re?re+" ":"")+v)}}function $t(f,v){f.classList!==void 0?f.classList.remove(v):_n(f,p((" "+Hn(f)+" ").replace(" "+v+" "," ")))}function _n(f,v){f.className.baseVal===void 0?f.className=v:f.className.baseVal=v}function Hn(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&&kt(f,v)}function kt(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 K(0,0);f.style[Qn]=(Ze.ie3d?"translate("+F.x+"px,"+F.y+"px)":"translate3d("+F.x+"px,"+F.y+"px,0)")+(O?" scale("+O+")":"")}function pn(f,v){f._leaflet_pos=v,Ze.any3d?tt(f,v):(f.style.left=v.x+"px",f.style.top=v.y+"px")}function Tn(f){return f._leaflet_pos||new K(0,0)}var Rr,ur,ao;if("onselectstart"in document)Rr=function(){Fn(window,"selectstart",zn)},ur=function(){Cn(window,"selectstart",zn)};else{var dn=Ft(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Rr=function(){if(dn){var f=document.documentElement.style;ao=f[dn],f[dn]="none"}},ur=function(){dn&&(document.documentElement.style[dn]=ao,ao=void 0)}}function yn(){Fn(window,"dragstart",zn)}function nn(){Cn(window,"dragstart",zn)}var jt,Yt;function Wn(f){for(;f.tabIndex===-1;)f=f.parentNode;f.style&&(Gn(),jt=f,Yt=f.style.outlineStyle,f.style.outlineStyle="none",Fn(window,"keydown",Gn))}function Gn(){jt&&(jt.style.outlineStyle=Yt,jt=void 0,Yt=void 0,Cn(window,"keydown",Gn))}function Mr(f){do f=f.parentNode;while((!f.offsetWidth||!f.offsetHeight)&&f!==document.body);return f}function vn(f){var v=f.getBoundingClientRect();return{x:v.width/f.offsetWidth||1,y:v.height/f.offsetHeight||1,boundingClientRect:v}}var _i={__proto__:null,TRANSFORM:Qn,TRANSITION:yr,TRANSITION_END:Wr,get:en,getStyle:Mn,create:Dt,remove:un,empty:Vn,toFront:Nr,toBack:rr,hasClass:xr,addClass:mn,removeClass:$t,setClass:_n,getClass:Hn,setOpacity:bt,testProp:Ft,setTransform:tt,setPosition:pn,getPosition:Tn,get disableTextSelection(){return Rr},get enableTextSelection(){return ur},disableImageDrag:yn,enableImageDrag:nn,preventOutline:Wn,restoreOutline:Gn,getSizedParentNode:Mr,getScale:vn};function Fn(f,v,O,F){if(v&&typeof v=="object")for(var q in v)Ir(f,q,v[q],O);else{v=A(v);for(var re=0,Oe=v.length;re<Oe;re++)Ir(f,v[re],O,F)}return this}var Jo="_leaflet_events";function Cn(f,v,O,F){if(arguments.length===1)fn(f),delete f[Jo];else if(v&&typeof v=="object")for(var q in v)oo(f,q,v[q],O);else if(v=A(v),arguments.length===2)fn(f,function(Qe){return E(v,Qe)!==-1});else for(var re=0,Oe=v.length;re<Oe;re++)oo(f,v[re],O,F);return this}function fn(f,v){for(var O in f[Jo]){var F=O.split(/\d/)[0];(!v||v(F))&&oo(f,F,null,null,O)}}var Ln={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ir(f,v,O,F){var q=v+l(O)+(F?"_"+l(F):"");if(f[Jo]&&f[Jo][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=zt(f,v,re):Ze.touch&&v==="dblclick"?re=ar(f,re):"addEventListener"in f?v==="touchstart"||v==="touchmove"||v==="wheel"||v==="mousewheel"?f.addEventListener(Ln[v]||v,re,Ze.passiveEvents?{passive:!1}:!1):v==="mouseenter"||v==="mouseleave"?(re=function(Qe){Qe=Qe||window.event,z9(f,Qe)&&Oe(Qe)},f.addEventListener(Ln[v],re,!1)):f.addEventListener(v,Oe,!1):f.attachEvent("on"+v,re),f[Jo]=f[Jo]||{},f[Jo][q]=re}function oo(f,v,O,F,q){q=q||v+l(O)+(F?"_"+l(F):"");var re=f[Jo]&&f[Jo][q];if(!re)return this;!Ze.touchNative&&Ze.pointer&&v.indexOf("touch")===0?Sn(f,v,re):Ze.touch&&v==="dblclick"?er(f,re):"removeEventListener"in f?f.removeEventListener(Ln[v]||v,re,!1):f.detachEvent("on"+v,re),f[Jo][q]=null}function Hr(f){return f.stopPropagation?f.stopPropagation():f.originalEvent?f.originalEvent._stopped=!0:f.cancelBubble=!0,this}function V1(f){return Ir(f,"wheel",Hr),this}function Di(f){return Fn(f,"mousedown touchstart dblclick contextmenu",Hr),f._leaflet_disable_click=!0,this}function zn(f){return f.preventDefault?f.preventDefault():f.returnValue=!1,this}function tr(f){return zn(f),Hr(f),this}function Wa(f){if(f.composedPath)return f.composedPath();for(var v=[],O=f.target;O;)v.push(O),O=O.parentNode;return v}function Zs(f,v){if(!v)return new K(f.clientX,f.clientY);var O=vn(v),F=O.boundingClientRect;return new K((f.clientX-F.left)/O.x-v.clientLeft,(f.clientY-F.top)/O.y-v.clientTop)}var F9=Ze.linux&&Ze.chrome?window.devicePixelRatio:Ze.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function U1(f){return Ze.edge?f.wheelDeltaY/2:f.deltaY&&f.deltaMode===0?-f.deltaY/F9: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 z9(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 Qs={__proto__:null,on:Fn,off:Cn,stopPropagation:Hr,disableScrollPropagation:V1,disableClickPropagation:Di,preventDefault:zn,stop:tr,getPropagationPath:Wa,getMousePosition:Zs,getWheelDelta:U1,isExternalTarget:z9,addListener:Fn,removeListener:Cn},Ws=$.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=Tn(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=T(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(),pn(this._el,O),this.fire("step")},_complete:function(){N(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(f){return 1-Math.pow(1-f,this._easeOutPower)}}),gr=$.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=yr&&Ze.any3d&&!Ze.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Fn(this._proxy,Wr,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 K?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():Y(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=Y(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 Ws,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),v.noMoveStart||this.fire("movestart"),v.animate!==!1){mn(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),Bt=q.distanceTo(F)||1,rn=1.42,kn=rn*rn;function Yn(Zt){var Er=Zt?-1:1,le=Zt?Xe:Qe,go=Xe*Xe-Qe*Qe+Er*kn*kn*Bt*Bt,Do=2*le*kn*Bt,Cr=go/Do,on=Math.sqrt(Cr*Cr+1)-Cr,So=on<1e-9?-18:Math.log(on);return So}function ho(Zt){return(Math.exp(Zt)-Math.exp(-Zt))/2}function Ce(Zt){return(Math.exp(Zt)+Math.exp(-Zt))/2}function he(Zt){return ho(Zt)/Ce(Zt)}var xe=Yn(0);function Ie(Zt){return Qe*(Ce(xe)/Ce(xe+rn*Zt))}function Be(Zt){return Qe*(Ce(xe)*he(xe+rn*Zt)-ho(xe))/kn}function at(Zt){return 1-Math.pow(1-Zt,1.5)}var _t=Date.now(),qt=(Yn(1)-xe)/rn,hn=O.duration?1e3*O.duration:1e3*qt*.8;function lt(){var Zt=(Date.now()-_t)/hn,Er=at(Zt)*qt;Zt<=1?(this._flyToFrame=T(lt,this),this._move(this.unproject(F.add(q.subtract(F).multiplyBy(Be(Er)/Bt)),Oe),this.getScaleZoom(Qe/Ie(Er),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=Y(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,Y(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=G([Oe.min.add(O),Oe.max.subtract(F)]),Xe=Qe.getSize();if(!Qe.contains(re)){this._enforcingBounds=!0;var Bt=re.subtract(Qe.getCenter()),rn=Qe.extend(re).getSize().subtract(Xe);q.x+=Bt.x<0?-rn.x:rn.x,q.y+=Bt.y<0?-rn.y:rn.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(),un(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(N(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)un(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=Y(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),Bt=G(this.project(Qe,F),this.project(Oe,F)).getSize(),rn=Ze.any3d?this.options.zoomSnap:1,kn=Xe.x/Bt.x,Yn=Xe.y/Bt.y,ho=v?Math.max(kn,Yn):Math.min(kn,Yn);return F=this.getScaleZoom(ho,F),rn&&(F=Math.round(F/(rn/100))*(rn/100),F=v?Math.ceil(F/rn)*rn:Math.floor(F/rn)*rn),Math.max(q,Math.min(re,F))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new K(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(Y(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 Zs(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=en(f);if(v){if(v._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Fn(v,"scroll",this._onScroll,this),this._containerId=l(v)},_initLayout:function(){var f=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ze.any3d,mn(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=Mn(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),pn(this._mapPane,new K(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(mn(f.markerPane,"leaflet-zoom-hide"),mn(f.shadowPane,"leaflet-zoom-hide"))},_resetView:function(f,v,O){pn(this._mapPane,new K(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 N(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(f){pn(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?Cn:Fn;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(){N(this._resizeRequest),this._resizeRequest=T(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&&!z9(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"&&Wn(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"&&zn(f);var Qe=q[0],Xe={originalEvent:f};if(f.type!=="keypress"&&f.type!=="keydown"&&f.type!=="keyup"){var Bt=Qe.getLatLng&&(!Qe._radius||Qe._radius<=10);Xe.containerPoint=Bt?this.latLngToContainerPoint(Qe.getLatLng()):this.mouseEventToContainerPoint(f),Xe.layerPoint=this.containerPointToLayerPoint(Xe.containerPoint),Xe.latlng=Bt?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 Tn(this._mapPane)||new K(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 G([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=G(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 K(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(){$t(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=Qn,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(){un(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:(T(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,mn(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&&$t(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 ko(f,v){return new gr(f,v)}var di=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 mn(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?(un(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()}}),yi=function(f){return new di(f)};gr.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)un(this._controlCorners[f]);un(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ga=di.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 di.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(){mn(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?(mn(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=f+"px"):$t(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return $t(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),Di(v),V1(v);var F=this._section=Dt("section",f+"-list");O&&(this._map.on("click",this.collapse,this),Fn(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"),Fn(q,{keydown:function(re){re.keyCode===13&&this._expandSafely()},click:function(re){zn(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;Vn(this._baseLayersList),Vn(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),Fn(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,Fn(f,"click",zn),this.expand();var v=this;setTimeout(function(){Cn(f,"click",zn),v._preventClick=!1})}}),j9=function(f,v,O){return new Ga(f,v,O)},bo=di.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),Di(re),Fn(re,"click",tr),Fn(re,"click",q,this),Fn(re,"click",this._refocusOnMap,this),re},_updateDisabled:function(){var f=this._map,v="leaflet-disabled";$t(this._zoomInButton,v),$t(this._zoomOutButton,v),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||f._zoom===f.getMinZoom())&&(mn(this._zoomOutButton,v),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||f._zoom===f.getMaxZoom())&&(mn(this._zoomInButton,v),this._zoomInButton.setAttribute("aria-disabled","true"))}});gr.mergeOptions({zoomControl:!0}),gr.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new bo,this.addControl(this.zoomControl))});var y5=function(f){return new bo(f)},Ji=di.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}}),x5=function(f){return new Ji(f)},Ti='<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>',V9=di.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Ze.inlineSvg?Ti+" ":"")+"Leaflet</a>"},initialize:function(f){b(this,f),this._attributions={}},onAdd:function(f){f.attributionControl=this,this._container=Dt("div","leaflet-control-attribution"),Di(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> ')}}});gr.mergeOptions({attributionControl:!0}),gr.addInitHook(function(){this.options.attributionControl&&new V9().addTo(this)});var e1=function(f){return new V9(f)};di.Layers=Ga,di.Zoom=bo,di.Scale=Ji,di.Attribution=V9,yi.layers=j9,yi.zoom=y5,yi.scale=x5,yi.attribution=e1;var so=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}});so.addTo=function(f,v){return f.addHandler(v,this),this};var w5={Events:R},Co=Ze.touch?"touchstart mousedown":"mousedown",K1=$.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||(Fn(this._dragStartTarget,Co,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(K1._dragging===this&&this.finishDrag(!0),Cn(this._dragStartTarget,Co,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(f){if(this._enabled&&(this._moved=!1,!xr(this._element,"leaflet-zoom-anim"))){if(f.touches&&f.touches.length!==1){K1._dragging===this&&this.finishDrag();return}if(!(K1._dragging||f.shiftKey||f.which!==1&&f.button!==1&&!f.touches)&&(K1._dragging=this,this._preventOutline&&Wn(this._element),yn(),Rr(),!this._moving)){this.fire("down");var v=f.touches?f.touches[0]:f,O=Mr(this._element);this._startPoint=new K(v.clientX,v.clientY),this._startPos=Tn(this._element),this._parentScale=vn(O);var F=f.type==="mousedown";Fn(document,F?"mousemove":"touchmove",this._onMove,this),Fn(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 K(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,zn(f),this._moved||(this.fire("dragstart"),this._moved=!0,mn(document.body,"leaflet-dragging"),this._lastTarget=f.target||f.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),mn(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),pn(this._element,this._newPos),this.fire("drag",f)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(f){$t(document.body,"leaflet-dragging"),this._lastTarget&&($t(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Cn(document,"mousemove touchmove",this._onMove,this),Cn(document,"mouseup touchend touchcancel",this._onUp,this),nn(),ur();var v=this._moved&&this._moving;this._moving=!1,K1._dragging=!1,v&&this.fire("dragend",{noInertia:f,distance:this._newPos.distanceTo(this._startPos)})}});function Ya(f,v,O){var F,q=[1,4,2,8],re,Oe,Qe,Xe,Bt,rn,kn,Yn;for(re=0,rn=f.length;re<rn;re++)f[re]._code=ei(f[re],v);for(Qe=0;Qe<4;Qe++){for(kn=q[Qe],F=[],re=0,rn=f.length,Oe=rn-1;re<rn;Oe=re++)Xe=f[re],Bt=f[Oe],Xe._code&kn?Bt._code&kn||(Yn=xi(Bt,Xe,kn,v,O),Yn._code=ei(Yn,v),F.push(Yn)):(Bt._code&kn&&(Yn=xi(Bt,Xe,kn,v,O),Yn._code=ei(Yn,v),F.push(Yn)),F.push(Xe));f=F}return f}function jr(f,v){var O,F,q,re,Oe,Qe,Xe,Bt,rn;if(!f||f.length===0)throw new Error("latlngs not passed");hi(f)||(console.warn("latlngs are not flat! Only the first ring will be used"),f=f[0]);var kn=oe([0,0]),Yn=Y(f),ho=Yn.getNorthWest().distanceTo(Yn.getSouthWest())*Yn.getNorthEast().distanceTo(Yn.getNorthWest());ho<1700&&(kn=qa(f));var Ce=f.length,he=[];for(O=0;O<Ce;O++){var xe=oe(f[O]);he.push(v.project(oe([xe.lat-kn.lat,xe.lng-kn.lng])))}for(Qe=Xe=Bt=0,O=0,F=Ce-1;O<Ce;F=O++)q=he[O],re=he[F],Oe=q.y*re.x-re.y*q.x,Xe+=(q.x+re.x)*Oe,Bt+=(q.y+re.y)*Oe,Qe+=Oe*3;Qe===0?rn=he[0]:rn=[Xe/Qe,Bt/Qe];var Ie=v.unproject(Z(rn));return oe([Ie.lat+kn.lat,Ie.lng+kn.lng])}function qa(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 Gs={__proto__:null,clipPolygon:Ya,polygonCenter:jr,centroid:qa};function Jr(f,v){if(!v||!f.length)return f.slice();var O=v*v;return f=$4(f,O),f=E5(f,O),f}function fi(f,v,O){return Math.sqrt(j0(f,v,O,!0))}function Xa(f,v,O){return j0(f,v,O)}function E5(f,v){var O=f.length,F=typeof Uint8Array<"u"?Uint8Array:Array,q=new F(O);q[0]=q[O-1]=1,Ja(f,q,v,0,O-1);var re,Oe=[];for(re=0;re<O;re++)q[re]&&Oe.push(f[re]);return Oe}function Ja(f,v,O,F,q){var re=0,Oe,Qe,Xe;for(Qe=F+1;Qe<=q-1;Qe++)Xe=j0(f[Qe],f[F],f[q],!0),Xe>re&&(Oe=Qe,re=Xe);re>O&&(v[Oe]=1,Ja(f,v,O,F,Oe),Ja(f,v,O,Oe,q))}function $4(f,v){for(var O=[f[0]],F=1,q=0,re=f.length;F<re;F++)n0(f[F],f[q])>v&&(O.push(f[F]),q=F);return q<re-1&&O.push(f[re-1]),O}var e0;function t0(f,v,O,F,q){var re=F?e0:ei(f,O),Oe=ei(v,O),Qe,Xe,Bt;for(e0=Oe;;){if(!(re|Oe))return[f,v];if(re&Oe)return!1;Qe=re||Oe,Xe=xi(f,v,Qe,O,q),Bt=ei(Xe,O),Qe===re?(f=Xe,re=Bt):(v=Xe,Oe=Bt)}}function xi(f,v,O,F,q){var re=v.x-f.x,Oe=v.y-f.y,Qe=F.min,Xe=F.max,Bt,rn;return O&8?(Bt=f.x+re*(Xe.y-f.y)/Oe,rn=Xe.y):O&4?(Bt=f.x+re*(Qe.y-f.y)/Oe,rn=Qe.y):O&2?(Bt=Xe.x,rn=f.y+Oe*(Xe.x-f.x)/re):O&1&&(Bt=Qe.x,rn=f.y+Oe*(Qe.x-f.x)/re),new K(Bt,rn,q)}function ei(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 n0(f,v){var O=v.x-f.x,F=v.y-f.y;return O*O+F*F}function j0(f,v,O,F){var q=v.x,re=v.y,Oe=O.x-q,Qe=O.y-re,Xe=Oe*Oe+Qe*Qe,Bt;return Xe>0&&(Bt=((f.x-q)*Oe+(f.y-re)*Qe)/Xe,Bt>1?(q=O.x,re=O.y):Bt>0&&(q+=Oe*Bt,re+=Qe*Bt)),Oe=f.x-q,Qe=f.y-re,F?Oe*Oe+Qe*Qe:new K(q,re)}function hi(f){return!y(f[0])||typeof f[0][0]!="object"&&typeof f[0][0]<"u"}function V0(f){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),hi(f)}function r0(f,v){var O,F,q,re,Oe,Qe,Xe,Bt;if(!f||f.length===0)throw new Error("latlngs not passed");hi(f)||(console.warn("latlngs are not flat! Only the first ring will be used"),f=f[0]);var rn=oe([0,0]),kn=Y(f),Yn=kn.getNorthWest().distanceTo(kn.getSouthWest())*kn.getNorthEast().distanceTo(kn.getNorthWest());Yn<1700&&(rn=qa(f));var ho=f.length,Ce=[];for(O=0;O<ho;O++){var he=oe(f[O]);Ce.push(v.project(oe([he.lat-rn.lat,he.lng-rn.lng])))}for(O=0,F=0;O<ho-1;O++)F+=Ce[O].distanceTo(Ce[O+1])/2;if(F===0)Bt=Ce[0];else for(O=0,re=0;O<ho-1;O++)if(Oe=Ce[O],Qe=Ce[O+1],q=Oe.distanceTo(Qe),re+=q,re>F){Xe=(re-F)/q,Bt=[Qe.x-Xe*(Qe.x-Oe.x),Qe.y-Xe*(Qe.y-Oe.y)];break}var xe=v.unproject(Z(Bt));return oe([xe.lat+rn.lat,xe.lng+rn.lng])}var o0={__proto__:null,simplify:Jr,pointToSegmentDistance:fi,closestPointOnSegment:Xa,clipSegment:t0,_getEdgeIntersection:xi,_getBitCode:ei,_sqClosestPointOnSegment:j0,isFlat:hi,_flat:V0,polylineCenter:r0},wi={project:function(f){return new K(f.lng,f.lat)},unproject:function(f){return new ee(f.y,f.x)},bounds:new U([-180,-90],[180,90])},i0={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 K(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,Bt;Qe<15&&Math.abs(Xe)>1e-7;Qe++)Bt=q*Math.sin(Oe),Bt=Math.pow((1-Bt)/(1+Bt),q/2),Xe=Math.PI/2-2*Math.atan(re*Bt)-Oe,Oe+=Xe;return new ee(Oe*v,f.x*v/O)}},Ei={__proto__:null,LonLat:wi,Mercator:i0,SphericalMercator:be},Ys=o({},se,{code:"EPSG:3395",projection:i0,transformation:function(){var f=.5/(Math.PI*i0.R);return fe(f,.5,-f,.5)}()}),S5=o({},se,{code:"EPSG:4326",projection:wi,transformation:fe(1/180,1,-1/180,.5)}),qs=o({},ue,{projection:wi,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=Ys,ue.EPSG3857=ae,ue.EPSG900913=ie,ue.EPSG4326=S5,ue.Simple=qs;var nr=$.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})}}});gr.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?y(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 Ni=nr.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)}}),U0=function(f,v){return new Ni(f,v)},Si=Ni.extend({addLayer:function(f){return this.hasLayer(f)?this:(f.addEventParent(this),Ni.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),Ni.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}}),$1=function(f,v){return new Si(f,v)},x1=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 Z4(f){return new x1(f)}var a0=x1.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 a0.imagePath!="string"&&(a0.imagePath=this._detectIconPath()),(this.options.imagePath||a0.imagePath)+x1.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=Mn(f,"background-image")||Mn(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):""}}),M5=so.extend({initialize:function(f){this._marker=f},addHooks:function(){var f=this._marker._icon;this._draggable||(this._draggable=new K1(f,f,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),mn(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&&$t(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=Tn(v._icon),Oe=O.getPixelBounds(),Qe=O.getPixelOrigin(),Xe=G(Oe.min._subtract(Qe).add(q),Oe.max._subtract(Qe).subtract(q));if(!Xe.contains(re)){var Bt=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(Bt,{animate:!1}),this._draggable._newPos._add(Bt),this._draggable._startPos._add(Bt),pn(v._icon,this._draggable._newPos),this._onDrag(f),this._panRequest=T(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&&(N(this._panRequest),this._panRequest=T(this._adjustPan.bind(this,f)))},_onDrag:function(f){var v=this._marker,O=v._shadow,F=Tn(v._icon),q=v._map.layerPointToLatLng(F);O&&pn(O,F),v._latlng=q,f.latlng=q,f.oldLatLng=this._oldLatLng,v.fire("move",f).fire("drag",f)},_onDragEnd:function(f){N(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",f)}}),K0=nr.extend({options:{icon:new a0,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||"")),mn(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&&Fn(O,"focus",this._panOnFocus,this);var q=f.icon.createShadow(this._shadow),re=!1;q!==this._shadow&&(this._removeShadow(),re=!0),q&&(mn(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&&Cn(this._icon,"focus",this._panOnFocus,this),un(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&un(this._shadow),this._shadow=null},_setPos:function(f){this._icon&&pn(this._icon,f),this._shadow&&pn(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&&(mn(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),M5)){var f=this.options.draggable;this.dragging&&(f=this.dragging.enabled(),this.dragging.disable()),this.dragging=new M5(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 Aa(f,v){return new K0(f,v)}var Z1=nr.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)}}),s0=Z1.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 Z1.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 Pr(f,v){return new s0(f,v)}var Mi=s0.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:Z1.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),Bt=O.unproject(Xe).lat,rn=Math.acos((Math.cos(re*q)-Math.sin(v*q)*Math.sin(Bt*q))/(Math.cos(v*q)*Math.cos(Bt*q)))/q;(isNaN(rn)||rn===0)&&(rn=re/Math.cos(Math.PI/180*v)),this._point=Xe.subtract(O.getPixelOrigin()),this._radius=isNaN(rn)?0:Xe.x-O.project([Bt,f-rn]).x,this._radiusY=Xe.y-Oe.y}else{var kn=F.unproject(F.project(this._latlng).subtract([this._mRadius,0]));this._point=O.latLngToLayerPoint(this._latlng),this._radius=this._point.x-O.latLngToLayerPoint(kn).x}this._updateBounds()}});function Q1(f,v,O){return new Mi(f,v,O)}var lo=Z1.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=j0,q,re,Oe=0,Qe=this._parts.length;Oe<Qe;Oe++)for(var Xe=this._parts[Oe],Bt=1,rn=Xe.length;Bt<rn;Bt++){q=Xe[Bt-1],re=Xe[Bt];var kn=F(f,q,re,!0);kn<v&&(v=kn,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 r0(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 hi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(f){for(var v=[],O=hi(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 K(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=t0(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]=Jr(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)&&fi(f,Qe[q],Qe[F])<=Xe)return!0;return!1}});function H5(f,v){return new lo(f,v)}lo._flat=V0;var va=lo.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 jr(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(f){var v=lo.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){lo.prototype._setLatLngs.call(this,f),hi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return hi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var f=this._renderer._bounds,v=this.options.weight,O=new K(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=Ya(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,Bt;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,Bt=O.length,Qe=Bt-1;Oe<Bt;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||lo.prototype._containsPoint.call(this,f,!0)}});function O5(f,v){return new va(f,v)}var Zo=Si.extend({initialize:function(f,v){b(this,v),this._layers={},f&&this.addData(f)},addData:function(f){var v=y(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=ti(f,re);return Oe?(Oe.feature=Ri(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 ti(f,v){var O=f.type==="Feature"?f.geometry:f,F=O?O.coordinates:null,q=[],re=v&&v.pointToLayer,Oe=v&&v.coordsToLatLng||$0,Qe,Xe,Bt,rn;if(!F&&!O)return null;switch(O.type){case"Point":return Qe=Oe(F),l0(re,f,Qe,v);case"MultiPoint":for(Bt=0,rn=F.length;Bt<rn;Bt++)Qe=Oe(F[Bt]),q.push(l0(re,f,Qe,v));return new Si(q);case"LineString":case"MultiLineString":return Xe=U9(F,O.type==="LineString"?0:1,Oe),new lo(Xe,v);case"Polygon":case"MultiPolygon":return Xe=U9(F,O.type==="Polygon"?1:2,Oe),new va(Xe,v);case"GeometryCollection":for(Bt=0,rn=O.geometries.length;Bt<rn;Bt++){var kn=ti({geometry:O.geometries[Bt],type:"Feature",properties:f.properties},v);kn&&q.push(kn)}return new Si(q);case"FeatureCollection":for(Bt=0,rn=O.features.length;Bt<rn;Bt++){var Yn=ti(O.features[Bt],v);Yn&&q.push(Yn)}return new Si(q);default:throw new Error("Invalid GeoJSON object.")}}function l0(f,v,O,F){return f?f(v,O):new K0(O,F&&F.markersInheritOptions&&F)}function $0(f){return new ee(f[1],f[0],f[2])}function U9(f,v,O){for(var F=[],q=0,re=f.length,Oe;q<re;q++)Oe=v?U9(f[q],v-1,O):(O||$0)(f[q]),F.push(Oe);return F}function Xs(f,v){return f=oe(f),f.alt!==void 0?[m(f.lng,v),m(f.lat,v),m(f.alt,v)]:[m(f.lng,v),m(f.lat,v)]}function Z0(f,v,O,F){for(var q=[],re=0,Oe=f.length;re<Oe;re++)q.push(v?Z0(f[re],hi(f[re])?0:v-1,O,F):Xs(f[re],F));return!v&&O&&q.length>0&&q.push(q[0].slice()),q}function c0(f,v){return f.feature?o({},f.feature,{geometry:v}):Ri(v)}function Ri(f){return f.type==="Feature"||f.type==="FeatureCollection"?f:{type:"Feature",properties:{},geometry:f}}var Ne={toGeoJSON:function(f){return c0(this,{type:"Point",coordinates:Xs(this.getLatLng(),f)})}};K0.include(Ne),Mi.include(Ne),s0.include(Ne),lo.include({toGeoJSON:function(f){var v=!hi(this._latlngs),O=Z0(this._latlngs,v?1:0,!1,f);return c0(this,{type:(v?"Multi":"")+"LineString",coordinates:O})}}),va.include({toGeoJSON:function(f){var v=!hi(this._latlngs),O=v&&!hi(this._latlngs[0]),F=Z0(this._latlngs,O?2:v?1:0,!0,f);return v||(F=[F]),c0(this,{type:(O?"Multi":"")+"Polygon",coordinates:F})}}),Ni.include({toMultiPoint:function(f){var v=[];return this.eachLayer(function(O){v.push(O.toGeoJSON(f).geometry.coordinates)}),c0(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=Ri(re);Oe.type==="FeatureCollection"?F.push.apply(F,Oe.features):F.push(Oe)}}}),O?c0(this,{geometries:F,type:"GeometryCollection"}):{type:"FeatureCollection",features:F}}});function st(f,v){return new Zo(f,v)}var nt=st,ln=nr.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(f,v,O){this._url=f,this._bounds=Y(v),b(this,O)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(mn(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){un(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&&Nr(this._image),this},bringToBack:function(){return this._map&&rr(this._image),this},setUrl:function(f){return this._url=f,this._image&&(this._image.src=f),this},setBounds:function(f){return this._bounds=Y(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(mn(v,"leaflet-image-layer"),this._zoomAnimated&&mn(v,"leaflet-zoom-animated"),this.options.className&&mn(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();pn(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 ln(f,v,O)},mr=ln.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(mn(v,"leaflet-image-layer"),this._zoomAnimated&&mn(v,"leaflet-zoom-animated"),this.options.className&&mn(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}y(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 no(f,v,O){return new mr(f,v,O)}var kr=ln.extend({_initImage:function(){var f=this._image=this._url;mn(f,"leaflet-image-layer"),this._zoomAnimated&&mn(f,"leaflet-zoom-animated"),this.options.className&&mn(f,this.options.className),f.onselectstart=h,f.onmousemove=h}});function ba(f,v,O){return new kr(f,v,O)}var ni=nr.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(f,v){f&&(f instanceof ee||y(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&&(mn(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(f){f._fadeAnimated?(bt(this._container,0),this._removeTimeout=setTimeout(a(un,void 0,this._container),200)):un(this._container),this.options.interactive&&($t(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&&Nr(this._container),this},bringToBack:function(){return this._map&&rr(this._container),this},_prepareOpen:function(f){var v=this._source;if(!v._map)return!1;if(v instanceof Si){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?pn(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]}});gr.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}}),nr.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 Eo=ni.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,ni.prototype.openOn.call(this,f)},onAdd:function(f){ni.prototype.onAdd.call(this,f),f.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Z1||this._source.on("preclick",Hr))},onRemove:function(f){ni.prototype.onRemove.call(this,f),f.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Z1||this._source.off("preclick",Hr))},getEvents:function(){var f=ni.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),Di(v),V1(this._contentNode),Fn(v,"contextmenu",Hr),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>',Fn(F,"click",function(q){zn(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",mn(f,re)):$t(f,re),this._containerWidth=this._container.offsetWidth},_animateZoom:function(f){var v=this._map._latLngToNewLayerPoint(this._latlng,f.zoom,f.center),O=this._getAnchor();pn(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(Mn(this._container,"marginBottom"),10)||0,O=this._container.offsetHeight+v,F=this._containerWidth,q=new K(this._containerLeft,-O-this._containerBottom);q._add(Tn(this._container));var re=f.layerPointToContainerPoint(q),Oe=Z(this.options.autoPanPadding),Qe=Z(this.options.autoPanPaddingTopLeft||Oe),Xe=Z(this.options.autoPanPaddingBottomRight||Oe),Bt=f.getSize(),rn=0,kn=0;re.x+F+Xe.x>Bt.x&&(rn=re.x+F-Bt.x+Xe.x),re.x-rn-Qe.x<0&&(rn=re.x-Qe.x),re.y+O+Xe.y>Bt.y&&(kn=re.y+O-Bt.y+Xe.y),re.y-kn-Qe.y<0&&(kn=re.y-Qe.y),(rn||kn)&&(this.options.keepInView&&(this._autopanning=!0),f.fire("autopanstart").panBy([rn,kn]))}},_getAnchor:function(){return Z(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),_a=function(f,v){return new Eo(f,v)};gr.mergeOptions({closePopupOnClick:!0}),gr.include({openPopup:function(f,v,O){return this._initOverlay(Eo,f,v,O).openOn(this),this},closePopup:function(f){return f=arguments.length?f:this._popup,f&&f.close(),this}}),nr.include({bindPopup:function(f,v){return this._popup=this._initOverlay(Eo,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 Si||(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)){tr(f);var v=f.layer||f.target;if(this._popup._source===v&&!(v instanceof Z1)){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 ya=ni.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(f){ni.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){ni.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=ni.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,Bt=q.offsetHeight,rn=Z(this.options.offset),kn=this._getAnchor();Qe==="top"?(v=Xe/2,O=Bt):Qe==="bottom"?(v=Xe/2,O=0):Qe==="center"?(v=Xe/2,O=Bt/2):Qe==="right"?(v=0,O=Bt/2):Qe==="left"?(v=Xe,O=Bt/2):Oe.x<re.x?(Qe="right",v=0,O=Bt/2):(Qe="left",v=Xe+(rn.x+kn.x)*2,O=Bt/2),f=f.subtract(Z(v,O,!0)).add(rn).add(kn),$t(q,"leaflet-tooltip-right"),$t(q,"leaflet-tooltip-left"),$t(q,"leaflet-tooltip-top"),$t(q,"leaflet-tooltip-bottom"),mn(q,"leaflet-tooltip-"+Qe),pn(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])}}),w1=function(f,v){return new ya(f,v)};gr.include({openTooltip:function(f,v,O){return this._initOverlay(ya,f,v,O).openOn(this),this},closeTooltip:function(f){return f.close(),this}}),nr.include({bindTooltip:function(f,v){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(ya,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 Si||(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&&(Fn(v,"focus",function(){this._tooltip._source=f,this.openTooltip()},this),Fn(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 W1=x1.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?(Vn(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 xa(f){return new W1(f)}x1.Default=a0;var dr=nr.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(),un(this._container),f._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Nr(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(rr(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 K?f:new K(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&&(N(this._fadeFrame),this._fadeFrame=T(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)):(un(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)un(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 K(+q,+re);Qe.z=+Oe;var Xe=this._tileCoordsToKey(Qe),Bt=this._tiles[Xe];return Bt&&Bt.active?(Bt.retain=!0,!0):(Bt&&Bt.loaded&&(Bt.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 K(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):pn(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 Bt in this._tiles){var rn=this._tiles[Bt].coords;(rn.z!==this._tileZoom||!Xe.contains(new K(rn.x,rn.y)))&&(this._tiles[Bt].current=!1)}if(Math.abs(O-this._tileZoom)>1){this._setView(f,O);return}for(var kn=q.min.y;kn<=q.max.y;kn++)for(var Yn=q.min.x;Yn<=q.max.x;Yn++){var ho=new K(Yn,kn);if(ho.z=this._tileZoom,!!this._isValidTile(ho)){var Ce=this._tiles[this._tileCoordsToKey(ho)];Ce?Ce.current=!0:Oe.push(ho)}}if(Oe.sort(function(xe,Ie){return xe.distanceTo(re)-Ie.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 Y(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 K(+v[0],+v[1]);return O.z=+v[2],O},_removeTile:function(f){var v=this._tiles[f];v&&(un(v.el),delete this._tiles[f],this.fire("tileunload",{tile:v.el,coords:this._keyToTileCoords(f)}))},_initTile:function(f){mn(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&&T(a(this._tileReady,this,f,null,q)),pn(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),N(this._fadeFrame),this._fadeFrame=T(this._updateOpacity,this)):(O.active=!0,this._pruneTiles()),v||(mn(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?T(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 K(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 Q4(f){return new dr(f)}var wa=dr.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 Fn(O,"load",a(this._tileOnLoad,this,v,O)),Fn(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 x(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;un(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),dr.prototype._removeTile.call(this,f)},_tileReady:function(f,v,O){if(!(!this._map||O&&O.getAttribute("src")===S))return dr.prototype._tileReady.call(this,f,v,O)}});function Q0(f,v){return new wa(f,v)}var K9=wa.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,wa.prototype.onAdd.call(this,f)},getTileUrl:function(f){var v=this._tileCoordsToNwSe(f),O=this._crs,F=G(O.project(v[0]),O.project(v[1])),q=F.min,re=F.max,Oe=(this._wmsVersion>=1.3&&this._crs===S5?[q.y,q.x,re.y,re.x]:[q.x,q.y,re.x,re.y]).join(","),Qe=wa.prototype.getTileUrl.call(this,f);return Qe+C(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 $9(f,v){return new K9(f,v)}wa.WMS=K9,Q0.wms=$9;var E1=nr.extend({options:{padding:.1},initialize:function(f){b(this,f),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),mn(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):pn(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()}}),W0=E1.extend({options:{tolerance:0},getEvents:function(){var f=E1.prototype.getEvents.call(this);return f.viewprereset=this._onViewPreReset,f},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){E1.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var f=this._container=document.createElement("canvas");Fn(f,"mousemove",this._onMouseMove,this),Fn(f,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Fn(f,"mouseout",this._handleMouseOut,this),f._leaflet_disable_events=!0,this._ctx=f.getContext("2d")},_destroyContainer:function(){N(this._redrawRequest),delete this._ctx,un(this._container),Cn(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)){E1.prototype._update.call(this);var f=this._bounds,v=this._container,O=f.getSize(),F=Ze.retina?2:1;pn(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(){E1.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||T(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&&($t(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&&(mn(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 Fi(f){return Ze.canvas?new W0(f):null}var t1=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">')}}(),B5={_initContainer:function(){this._container=Dt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(E1.prototype._update.call(this),this.fire("update"))},_initPath:function(f){var v=f._container=t1("shape");mn(v,"leaflet-vml-shape "+(this.options.className||"")),v.coordsize="1 1",f._path=t1("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;un(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=t1("stroke")),q.appendChild(v),v.weight=F.weight+"px",v.color=F.color,v.opacity=F.opacity,F.dashArray?v.dashStyle=y(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=t1("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){Nr(f._container)},_bringToBack:function(f){rr(f._container)}},n1=Ze.vml?t1:Ae,S1=E1.extend({_initContainer:function(){this._container=n1("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=n1("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){un(this._container),Cn(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){E1.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)),pn(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=n1("path");f.options.className&&mn(v,f.options.className),f.options.interactive&&mn(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){un(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){Nr(f._path)},_bringToBack:function(f){rr(f._path)}});Ze.vml&&S1.include(B5);function u0(f){return Ze.svg||Ze.vml?new S1(f):null}gr.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&&Fi(f)||u0(f)}});var G1=va.extend({initialize:function(f,v){va.prototype.initialize.call(this,this._boundsToLatLngs(f),v)},setBounds:function(f){return this.setLatLngs(this._boundsToLatLngs(f))},_boundsToLatLngs:function(f){return f=Y(f),[f.getSouthWest(),f.getNorthWest(),f.getNorthEast(),f.getSouthEast()]}});function Z9(f,v){return new G1(f,v)}S1.create=n1,S1.pointsToPath=Me,Zo.geometryToLayer=ti,Zo.coordsToLatLng=$0,Zo.coordsToLatLngs=U9,Zo.latLngToCoords=Xs,Zo.latLngsToCoords=Z0,Zo.getFeature=c0,Zo.asFeature=Ri,gr.mergeOptions({boxZoom:!0});var Y1=so.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(){Fn(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Cn(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){un(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(),Rr(),yn(),this._startPoint=this._map.mouseEventToContainerPoint(f),Fn(document,{contextmenu:tr,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),mn(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();pn(this._box,v.min),this._box.style.width=O.x+"px",this._box.style.height=O.y+"px"},_finish:function(){this._moved&&(un(this._box),$t(this._container,"leaflet-crosshair")),ur(),nn(),Cn(document,{contextmenu:tr,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())}});gr.addInitHook("addHandler","boxZoom",Y1),gr.mergeOptions({doubleClickZoom:!0});var r1=so.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)}});gr.addInitHook("addHandler","doubleClickZoom",r1),gr.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Ea=so.extend({addHooks:function(){if(!this._draggable){var f=this._map;this._draggable=new K1(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))}mn(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){$t(this._map._container,"leaflet-grab"),$t(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=Y(this._map.options.maxBounds);this._offsetLimit=G(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]),Bt=Math.min(O.inertiaMaxSpeed,Xe),rn=Qe.multiplyBy(Bt/Xe),kn=Bt/(O.inertiaDeceleration*Oe),Yn=rn.multiplyBy(-kn/2).round();!Yn.x&&!Yn.y?v.fire("moveend"):(Yn=v._limitOffset(Yn,v.options.maxBounds),T(function(){v.panBy(Yn,{duration:kn,easeLinearity:Oe,noMoveStart:!0,animate:!0})}))}}});gr.addInitHook("addHandler","dragging",Ea),gr.mergeOptions({keyboard:!0,keyboardPanDelta:80});var G0=so.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"),Fn(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(),Cn(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(){Fn(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Cn(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;tr(f)}}});gr.addInitHook("addHandler","keyboard",G0),gr.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Q9=so.extend({addHooks:function(){Fn(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Cn(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(f){var v=U1(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),tr(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))}});gr.addInitHook("addHandler","scrollWheelZoom",Q9);var Js=600;gr.mergeOptions({tapHold:Ze.touchNative&&Ze.safari&&Ze.mobile,tapTolerance:15});var Y0=so.extend({addHooks:function(){Fn(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Cn(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 K(v.clientX,v.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(Fn(document,"touchend",zn),Fn(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",v))},this),Js),Fn(document,"touchend touchcancel contextmenu",this._cancel,this),Fn(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function f(){Cn(document,"touchend",zn),Cn(document,"touchend touchcancel",f)},_cancel:function(){clearTimeout(this._holdTimeout),Cn(document,"touchend touchcancel contextmenu",this._cancel,this),Cn(document,"touchmove",this._onMove,this)},_onMove:function(f){var v=f.touches[0];this._newPos=new K(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)}});gr.addInitHook("addHandler","tapHold",Y0),gr.mergeOptions({touchZoom:Ze.touch,bounceAtZoomLimits:!0});var d0=so.extend({addHooks:function(){mn(this._map._container,"leaflet-touch-zoom"),Fn(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){$t(this._map._container,"leaflet-touch-zoom"),Cn(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(),Fn(document,"touchmove",this._onTouchMove,this),Fn(document,"touchend touchcancel",this._onTouchEnd,this),zn(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),N(this._animRequest);var Oe=a(v._move,v,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=T(Oe,this,!0),zn(f)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,N(this._animRequest),Cn(document,"touchmove",this._onTouchMove,this),Cn(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))}});gr.addInitHook("addHandler","touchZoom",d0),gr.BoxZoom=Y1,gr.DoubleClickZoom=r1,gr.Drag=Ea,gr.Keyboard=G0,gr.ScrollWheelZoom=Q9,gr.TapHold=Y0,gr.TouchZoom=d0,n.Bounds=U,n.Browser=Ze,n.CRS=ue,n.Canvas=W0,n.Circle=Mi,n.CircleMarker=s0,n.Class=V,n.Control=di,n.DivIcon=W1,n.DivOverlay=ni,n.DomEvent=Qs,n.DomUtil=_i,n.Draggable=K1,n.Evented=$,n.FeatureGroup=Si,n.GeoJSON=Zo,n.GridLayer=dr,n.Handler=so,n.Icon=x1,n.ImageOverlay=ln,n.LatLng=ee,n.LatLngBounds=J,n.Layer=nr,n.LayerGroup=Ni,n.LineUtil=o0,n.Map=gr,n.Marker=K0,n.Mixin=w5,n.Path=Z1,n.Point=K,n.PolyUtil=Gs,n.Polygon=va,n.Polyline=lo,n.Popup=Eo,n.PosAnimation=Ws,n.Projection=Ei,n.Rectangle=G1,n.Renderer=E1,n.SVG=S1,n.SVGOverlay=kr,n.TileLayer=wa,n.Tooltip=ya,n.Transformation=me,n.Util=z,n.VideoOverlay=mr,n.bind=a,n.bounds=G,n.canvas=Fi,n.circle=Q1,n.circleMarker=Pr,n.control=yi,n.divIcon=xa,n.extend=o,n.featureGroup=$1,n.geoJSON=st,n.geoJson=nt,n.gridLayer=Q4,n.icon=Z4,n.imageOverlay=$n,n.latLng=oe,n.latLngBounds=Y,n.layerGroup=U0,n.map=ko,n.marker=Aa,n.point=Z,n.polygon=O5,n.polyline=H5,n.popup=_a,n.rectangle=Z9,n.setOptions=b,n.stamp=l,n.svg=u0,n.svgOverlay=ba,n.tileLayer=Q0,n.tooltip=w1,n.transformation=fe,n.version=r,n.videoOverlay=no;var W9=window.L;n.noConflict=function(){return window.L=W9,this},window.L=n})}(K4,K4.exports)),K4.exports}var _5=U8e();const b8=L1(_5);function _8(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function y8(e,t){return t==null?function(r,o){const i=P.useRef();return i.current||(i.current=e(r,o)),i}:function(r,o){const i=P.useRef();i.current||(i.current=e(r,o));const a=P.useRef(r),{instance:s}=i.current;return P.useEffect(function(){a.current!==r&&(t(s,r,a.current),a.current=r)},[s,r,o]),i}}function K8e(e,t){P.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 SI(e){return function(n){const r=v8(),o=e(Im(n,r),r);return bI(r.map,n.attribution),wI(o.current,n.eventHandlers),K8e(o.current,r),o}}function $8e(e){function t(o,i){return _8(e(o),i)}const n=y8(t),r=z8e(n);return xI(r)}function Z8e(e,t){const n=y8(e,t),r=SI(n);return R8e(r)}function Q8e(e,t){const n=y8(e),r=j8e(n,t);return F8e(r)}function W8e(e,t){const n=y8(e,t),r=SI(n);return xI(r)}function G8e(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 MI(){return v8().map}function Pm(){return Pm=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},Pm.apply(this,arguments)}function Y8e({bounds:e,boundsOptions:t,center:n,children:r,className:o,id:i,placeholder:a,style:s,whenReady:l,zoom:u,...d},h){const[m]=P.useState({className:o,id:i,style:s}),[p,A]=P.useState(null);P.useImperativeHandle(h,()=>(p==null?void 0:p.map)??null,[p]);const b=P.useCallback(w=>{if(w!==null&&p===null){const x=new _5.Map(w,d);n!=null&&u!=null?x.setView(n,u):e!=null&&x.fitBounds(e,t),l!=null&&x.whenReady(l),A(T8e(x))}},[]);P.useEffect(()=>()=>{p==null||p.map.remove()},[p]);const C=p?P.createElement(yI,{value:p},r):a??null;return P.createElement("div",Pm({},m,{ref:b}),C)}const q8e=P.forwardRef(Y8e),X8e=Z8e(function({position:t,...n},r){const o=new _5.Marker(t,n);return _8(o,N8e(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())}),J8e=Q8e(function(t,n){const r=new _5.Popup(t,n.overlayContainer);return _8(r,n)},function(t,n,{position:r},o){P.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])}),e7e=W8e(function({url:t,...n},r){const o=new _5.TileLayer(t,Im(n,r));return _8(o,r)},function(t,n,r){G8e(t,n,r);const{url:o}=n;o!=null&&o!==r.url&&t.setUrl(o)}),t7e=$8e(function(t){return new _5.Control.Zoom(t)}),km={defaultZoom:5,defaultCenter:{lat:20.5937,lng:78.9629},defaultMapProvider:{osm:{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'&copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors'}}.osm},n7e="../../src/assets/images/map_pin.svg",r7e=new b8.Icon({iconUrl:n7e,iconSize:new b8.Point(32,32),iconAnchor:new b8.Point(16,32),className:"leaflet-div-icon",attribution:'<a href="https://www.flaticon.com/free-icons/location" title="location icons">@adrianadam - Flaticon</a>'}),HI=P.forwardRef(({position:e,children:t,...n},r)=>W.jsx(X8e,{position:e,icon:r7e,draggable:!1,ref:r,...n,children:t})),o7e=({items:e})=>{const t=MI();return P.useEffect(()=>{if(!(e!=null&&e.length))return;const n=b8.latLngBounds(e==null?void 0:e.map(r=>r==null?void 0:r.position));t.fitBounds(n,{padding:[50,50]})},[e,t]),null},i7e=({mapRef:e})=>{const t=MI();return P.useEffect(()=>{e.current=t},[t]),null},a7e=({items:e,width:t="500px",height:n="500px",showCardPopup:r=!0,showNavigation:o=!0,navClassName:i,navButtonColor:a,className:s})=>{const[l,u]=P.useState(!1),[d,h]=P.useState(0);P.useEffect(()=>{u(!0)},[]);const m=()=>{h(x=>(x-1+(e==null?void 0:e.length))%(e==null?void 0:e.length))},p=()=>{h(x=>(x+1)%(e==null?void 0:e.length))},A=P.useMemo(()=>e==null?void 0:e[d],[e,d]),b=P.useRef(null);P.useEffect(()=>{if(!l)return;const x=requestAnimationFrame(()=>{var y;(y=b==null?void 0:b.current)==null||y.openPopup()});return()=>cancelAnimationFrame(x)},[d,l]);const C=a||"var(--awi-color-common-highlight, #ffcc00)",w=P.useRef(null);return P.useEffect(()=>{const x=w.current;x&&(A!=null&&A.position)&&x.setView(A.position,x.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(q8e,{center:A==null?void 0:A.position,zoom:km.defaultZoom,className:"static_map",zoomControl:!1,style:{width:"100%",height:"100%"},children:[W.jsx(e7e,{url:km.defaultMapProvider.url,attribution:km.defaultMapProvider.attribution}),W.jsx(i7e,{mapRef:w}),W.jsx(o7e,{items:e}),W.jsx(t7e,{position:"bottomright"}),e==null?void 0:e.map((x,y)=>y===d?W.jsx(HI,{position:x==null?void 0:x.position,ref:b,children:r?W.jsx(J8e,{closeButton:!1,autoPan:!1,children:x==null?void 0:x.element}):W.jsx(W.Fragment,{})},y):W.jsx(HI,{position:x==null?void 0:x.position},y))]}),o?W.jsxs("div",{className:`map_view_nav_container ${i||""}`,children:[W.jsx(Ki,{variant:"primary",onClick:m,size:"s",icon:"leftArrow",backgroundColor:C,borderColor:C,title:"Previous"}),W.jsx(Ki,{variant:"primary",onClick:p,size:"s",icon:"rightArrow",iconPosition:"after",backgroundColor:C,borderColor:C,title:"Next"})]}):W.jsx(W.Fragment,{})]})},Dm=()=>{const e=P.useRef(!1),t=P.useRef(!1);return P.useEffect(()=>{const o=l=>{l.key==="Control"&&(e.current=!0,Kr.success("Control pressed, Handling control press events")),l.key==="Alt"&&(t.current=!0,Kr.success("Alt pressed, Handling alt press events")),l.key==="Command"&&(e.current=!0,Kr.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 s7e(e=1,t=1){const[n,r]=P.useState(e),[o,i]=P.useState(t),a=P.useCallback(u=>{u>=1&&u<=o?r(u):console.error(`Invalid page number: ${u}`)},[o]),s=P.useCallback(()=>{a(n+1)},[n,a]),l=P.useCallback(()=>{a(n-1)},[n,a]);return{currentPage:n,setPage:a,nextPage:s,prevPage:l,totalPages:o,setTotalPages:i}}const OI=(e,t="",n)=>{!n||!e||Da.forEach(e,(r,o)=>{const i=`--${t}${o}`;Da.isObject(r)&&!Da.isArray(r)?OI(r,`${t}${o}-`,n):typeof r=="string"&&n.style.setProperty(i,r)})},BI=(e,t="",n)=>{!n||!e||Da.forEach(e,(r,o)=>{const i=`--${t}${o}`;Da.isObject(r)&&!Da.isArray(r)?BI(r,`${t}${o}-`,n):n.style.removeProperty(i)})},l7e=(e,t="")=>{const n={},r=(o,i)=>{Da.forEach(o,(a,s)=>{const l=`--${t}${i}${s}`;Da.isObject(a)&&!Da.isArray(a)?r(a,`${i}${s}-`):typeof a=="string"&&(n[`${i}${s}`.toUpperCase().replace(/-/g,"_")]=`var(${l})`)})};return r(e,""),n},LI=P.createContext({}),c7e="awi-color-",u7e="awi-size-",d7e="awi-weight-",Tm=(e,t,n)=>(P.useEffect(()=>{if(Da.isEqual(n.current,e))return;const r=document.documentElement;return OI(e,t,r),()=>BI(e,t,r)},[e,n,t]),e?l7e(e,t):{}),f7e=({theme:e=Pp,log:t=!0,children:n})=>{const r=P.useRef(null),o=P.useRef(null),i=P.useRef(null),a=Tm(e.colors,c7e,r),s=Tm(e.sizes,u7e,o),l=Tm(e.weights,d7e,i),u=new uce;return t&&(console.group("Theme Variables"),console.table(a),console.table(s),console.table(l),console.groupEnd()),W.jsx(gce,{client:u,children:W.jsxs(LI.Provider,{value:{...a,...s,...l},children:[W.jsx(KA,{}),n]})})},h7e=()=>{const e=P.useContext(LI);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},g7e=()=>({success:(e,t)=>Wu("success",e,t),error:(e,t)=>Wu("error",e,t),info:(e,t)=>Wu("info",e,t),warning:(e,t)=>Wu("warning",e,t)});an.AWI_ALL_GLOBALS=Or,an.AWI_IMAGE_VALIDITY_HELPER=IC,an.AnnotationComponentLibrary=P8e,an.AwiAnnotationHotkeys=A7,an.AwiAnnotationTools=Gu,an.AwiCanvasContainer=qu,an.AwiCustomConfirmation=hI,an.AwiEmptyState=zK,an.AwiGenerateHeader=yA,an.AwiHelperMethods=l1,an.AwiInput=zA,an.AwiLoadMoreButton=jK,an.AwiMessageScreen=ic,an.AwiModal=tc,an.AwiModalBody=nc,an.AwiModalFooter=oc,an.AwiModalHeader=rc,an.AwiModalRow=J5,an.AwiPagination=UA,an.AwiSafeLocalStorage=p0,an.AwiSamModal=VA,an.AwiScrollableTableCellList=VK,an.AwiSlider=jA,an.AwiTableBar=k8e,an.AwiTableBody=vA,an.AwiTableCell=Y5,an.AwiTableHeader=bA,an.AwiTableHeaders=_A,an.AwiTableInfinite=AA,an.AwiTableRow=h7,an.AwiToastMessage=Kr,an.AwiUseKeyChecker=Dm,an.Backdrop=xA,an.Badge=UK,an.Button=Ki,an.ButtonGroup=KK,an.Chart=DG,an.CompactEventCard=d_,an.ContactInput=n3e,an.DEFAULT_THEME=Pp,an.DateRangePicker=s3e,an.DetectionCarousel=MB,an.EventPreview=l3e,an.Heatmap=D3e,an.Icon=h9,an.Input=E2,an.MapView=a7e,an.MathAnnotationHelper=Bn,an.MockImageGenerationHelper=gI,an.Modal=N3e,an.Multiselect=R3e,an.Pagination=F3e,an.Select=wB,an.Sidebar=z3e,an.Spinner=C7,an.Switch=j3e,an.Table=V3e,an.ThemeProvider=f7e,an.Toast=RB,an.ToastProvider=KA,an.usePagination=s7e,an.useTheme=h7e,an.useToast=g7e,Object.defineProperty(an,Symbol.toStringTag,{value:"Module"})});
722
+ */var V8e=K4.exports,EI;function U8e(){return EI||(EI=1,function(e,t){(function(n,r){r(t)})(V8e,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 m(f,v){if(v===!1)return f;var O=Math.pow(10,v===void 0?6:v);return Math.round(f*O)/O}function p(f){return f.trim?f.trim():f.replace(/^\s+|\s+$/g,"")}function A(f){return p(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 C(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=/\{ *([\w_ -]+) *\}/g;function x(f,v){return f.replace(w,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 y=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 k=window.requestAnimationFrame||M("RequestAnimationFrame")||B,D=window.cancelAnimationFrame||M("CancelAnimationFrame")||M("CancelRequestAnimationFrame")||function(f){window.clearTimeout(f)};function T(f,v,O){if(O&&k===B)f.call(v);else return k.call(window,a(f,v))}function N(f){f&&D.call(window,f)}var z={__proto__:null,extend:o,create:i,bind:a,get lastId(){return s},stamp:l,throttle:u,wrapNum:d,falseFn:h,formatNum:m,trim:p,splitWords:A,setOptions:b,getParamString:C,template:x,isArray:y,indexOf:E,emptyImageUrl:S,requestFn:k,cancelFn:D,requestAnimFrame:T,cancelAnimFrame:N};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&&(j(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 j(f){if(!(typeof L>"u"||!L||!L.Mixin)){f=y(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 R={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)}};R.addEventListener=R.on,R.removeEventListener=R.clearAllEventListeners=R.off,R.addOneTimeEventListener=R.once,R.fireEvent=R.fire,R.hasEventListeners=R.listens;var $=V.extend(R);function K(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)};K.prototype={clone:function(){return new K(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 K(this.x*f.x,this.y*f.y)},unscaleBy:function(f){return new K(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("+m(this.x)+", "+m(this.y)+")"}};function Z(f,v,O){return f instanceof K?f:y(f)?new K(f[0],f[1]):f==null?f:typeof f=="object"&&"x"in f&&"y"in f?new K(f.x,f.y):new K(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 K||typeof f[0]=="number"||"x"in f)v=O=Z(f);else if(f=G(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 K?f=Z(f):f=G(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=G(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=G(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 G(Z(v.x-F,v.y-q),Z(O.x+F,O.y+q))},equals:function(f){return f?(f=G(f),this.min.equals(f.getTopLeft())&&this.max.equals(f.getBottomRight())):!1}};function G(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)||Y(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=Y(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=Y(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=Y(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=Y(f),this._southWest.equals(f.getSouthWest(),v)&&this._northEast.equals(f.getNorthEast(),v)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function Y(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("+m(this.lat,f)+", "+m(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 Y([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:y(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}}),_e=6378137,be={R:_e,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 K(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=_e*Math.PI;return new U([-f,-f],[f,f])}()};function me(f,v,O,F){if(y(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}me.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 K((f.x/v-this._b)/this._a,(f.y/v-this._d)/this._c)}};function fe(f,v,O,F){return new me(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,Ge=de&&!document.addEventListener,Je="msLaunchUri"in navigator&&!("documentMode"in document),Ee=Ot("webkit"),Pe=Ot("android"),De=Ot("android 2")||Ot("android 3"),We=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Ye=Pe&&Ot("Google")&&We<537&&!("AudioNode"in window),ct=!!window.opera,rt=!Je&&Ot("chrome"),wt=Ot("gecko")&&!Ee&&!ct&&!de,ut=!rt&&Ot("safari"),Ke=Ot("phantom"),Re="OTransition"in He,ot=navigator.platform.indexOf("Win")===0,Fe=de&&"transition"in He,Te="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!De,Ve="MozPerspective"in He,dt=!window.L_DISABLE_3D&&(Fe||Te||Ve)&&!Re&&!Ke,$e=typeof orientation<"u"||Ot("mobile"),ft=$e&&Ee,Tt=$e&&Te,Qt=!window.PointerEvent&&window.MSPointerEvent,sn=!!(window.PointerEvent||Qt),Dn="ontouchstart"in window||!!window.TouchEvent,Gt=!window.L_NO_TOUCH&&(Dn||sn),An=$e&&ct,bn=$e&&wt,Wt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Lt=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}(),yt=!!(document.createElementNS&&Ae("svg").createSVGRect),Ut=!!yt&&function(){var f=document.createElement("div");return f.innerHTML="<svg/>",(f.firstChild&&f.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),gn=!yt&&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,mt=navigator.platform.indexOf("Linux")===0;function Ot(f){return navigator.userAgent.toLowerCase().indexOf(f)>=0}var Ze={ie:de,ielt9:Ge,edge:Je,webkit:Ee,android:Pe,android23:De,androidStock:Ye,opera:ct,chrome:rt,gecko:wt,safari:ut,phantom:Ke,opera12:Re,win:ot,ie3d:Fe,webkit3d:Te,gecko3d:Ve,any3d:dt,mobile:$e,mobileWebkit:ft,mobileWebkit3d:Tt,msPointer:Qt,pointer:sn,touch:Gt,touchNative:Dn,mobileOpera:An,mobileGecko:bn,retina:Wt,passiveEvents:Lt,canvas:Ht,svg:yt,vml:gn,inlineSvg:Ut,mac:gt,linux:mt},Vt=Ze.msPointer?"MSPointerDown":"pointerdown",pe=Ze.msPointer?"MSPointerMove":"pointermove",et=Ze.msPointer?"MSPointerUp":"pointerup",ze=Ze.msPointer?"MSPointerCancel":"pointercancel",vt={touchstart:Vt,touchmove:pe,touchend:et,touchcancel:ze},Ue={touchstart:Kt,touchmove:Rt,touchend:Rt,touchcancel:Rt},Et={},It=!1;function zt(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 Sn(f,v,O){if(!vt[v]){console.warn("wrong event specified:",v);return}f.removeEventListener(vt[v],O,!1)}function Ct(f){Et[f.pointerId]=f}function At(f){Et[f.pointerId]&&(Et[f.pointerId]=f)}function Nt(f){delete Et[f.pointerId]}function qe(){It||(document.addEventListener(Vt,Ct,!0),document.addEventListener(pe,At,!0),document.addEventListener(et,Nt,!0),document.addEventListener(ze,Nt,!0),It=!0)}function Rt(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 Kt(f,v){v.MSPOINTER_TYPE_TOUCH&&v.pointerType===v.MSPOINTER_TYPE_TOUCH&&zn(v),Rt(f,v)}function _r(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 Lr=200;function ar(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=Wa(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<=Lr?(F++,F===2&&v(_r(re))):F=1,O=Qe}}}return f.addEventListener("click",q),{dblclick:v,simDblclick:q}}function er(f,v){f.removeEventListener("dblclick",v.dblclick),f.removeEventListener("click",v.simDblclick)}var Qn=Ft(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),yr=Ft(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Wr=yr==="webkitTransition"||yr==="OTransition"?yr+"End":"transitionend";function en(f){return typeof f=="string"?document.getElementById(f):f}function Mn(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 un(f){var v=f.parentNode;v&&v.removeChild(f)}function Vn(f){for(;f.firstChild;)f.removeChild(f.firstChild)}function Nr(f){var v=f.parentNode;v&&v.lastChild!==f&&v.appendChild(f)}function rr(f){var v=f.parentNode;v&&v.firstChild!==f&&v.insertBefore(f,v.firstChild)}function xr(f,v){if(f.classList!==void 0)return f.classList.contains(v);var O=Hn(f);return O.length>0&&new RegExp("(^|\\s)"+v+"(\\s|$)").test(O)}function mn(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(!xr(f,v)){var re=Hn(f);_n(f,(re?re+" ":"")+v)}}function $t(f,v){f.classList!==void 0?f.classList.remove(v):_n(f,p((" "+Hn(f)+" ").replace(" "+v+" "," ")))}function _n(f,v){f.className.baseVal===void 0?f.className=v:f.className.baseVal=v}function Hn(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&&kt(f,v)}function kt(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 K(0,0);f.style[Qn]=(Ze.ie3d?"translate("+F.x+"px,"+F.y+"px)":"translate3d("+F.x+"px,"+F.y+"px,0)")+(O?" scale("+O+")":"")}function pn(f,v){f._leaflet_pos=v,Ze.any3d?tt(f,v):(f.style.left=v.x+"px",f.style.top=v.y+"px")}function Tn(f){return f._leaflet_pos||new K(0,0)}var Rr,ur,ao;if("onselectstart"in document)Rr=function(){Fn(window,"selectstart",zn)},ur=function(){Cn(window,"selectstart",zn)};else{var dn=Ft(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Rr=function(){if(dn){var f=document.documentElement.style;ao=f[dn],f[dn]="none"}},ur=function(){dn&&(document.documentElement.style[dn]=ao,ao=void 0)}}function yn(){Fn(window,"dragstart",zn)}function nn(){Cn(window,"dragstart",zn)}var jt,Yt;function Wn(f){for(;f.tabIndex===-1;)f=f.parentNode;f.style&&(Gn(),jt=f,Yt=f.style.outlineStyle,f.style.outlineStyle="none",Fn(window,"keydown",Gn))}function Gn(){jt&&(jt.style.outlineStyle=Yt,jt=void 0,Yt=void 0,Cn(window,"keydown",Gn))}function Mr(f){do f=f.parentNode;while((!f.offsetWidth||!f.offsetHeight)&&f!==document.body);return f}function vn(f){var v=f.getBoundingClientRect();return{x:v.width/f.offsetWidth||1,y:v.height/f.offsetHeight||1,boundingClientRect:v}}var _i={__proto__:null,TRANSFORM:Qn,TRANSITION:yr,TRANSITION_END:Wr,get:en,getStyle:Mn,create:Dt,remove:un,empty:Vn,toFront:Nr,toBack:rr,hasClass:xr,addClass:mn,removeClass:$t,setClass:_n,getClass:Hn,setOpacity:bt,testProp:Ft,setTransform:tt,setPosition:pn,getPosition:Tn,get disableTextSelection(){return Rr},get enableTextSelection(){return ur},disableImageDrag:yn,enableImageDrag:nn,preventOutline:Wn,restoreOutline:Gn,getSizedParentNode:Mr,getScale:vn};function Fn(f,v,O,F){if(v&&typeof v=="object")for(var q in v)Ir(f,q,v[q],O);else{v=A(v);for(var re=0,Oe=v.length;re<Oe;re++)Ir(f,v[re],O,F)}return this}var Jo="_leaflet_events";function Cn(f,v,O,F){if(arguments.length===1)fn(f),delete f[Jo];else if(v&&typeof v=="object")for(var q in v)oo(f,q,v[q],O);else if(v=A(v),arguments.length===2)fn(f,function(Qe){return E(v,Qe)!==-1});else for(var re=0,Oe=v.length;re<Oe;re++)oo(f,v[re],O,F);return this}function fn(f,v){for(var O in f[Jo]){var F=O.split(/\d/)[0];(!v||v(F))&&oo(f,F,null,null,O)}}var Ln={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ir(f,v,O,F){var q=v+l(O)+(F?"_"+l(F):"");if(f[Jo]&&f[Jo][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=zt(f,v,re):Ze.touch&&v==="dblclick"?re=ar(f,re):"addEventListener"in f?v==="touchstart"||v==="touchmove"||v==="wheel"||v==="mousewheel"?f.addEventListener(Ln[v]||v,re,Ze.passiveEvents?{passive:!1}:!1):v==="mouseenter"||v==="mouseleave"?(re=function(Qe){Qe=Qe||window.event,z9(f,Qe)&&Oe(Qe)},f.addEventListener(Ln[v],re,!1)):f.addEventListener(v,Oe,!1):f.attachEvent("on"+v,re),f[Jo]=f[Jo]||{},f[Jo][q]=re}function oo(f,v,O,F,q){q=q||v+l(O)+(F?"_"+l(F):"");var re=f[Jo]&&f[Jo][q];if(!re)return this;!Ze.touchNative&&Ze.pointer&&v.indexOf("touch")===0?Sn(f,v,re):Ze.touch&&v==="dblclick"?er(f,re):"removeEventListener"in f?f.removeEventListener(Ln[v]||v,re,!1):f.detachEvent("on"+v,re),f[Jo][q]=null}function Hr(f){return f.stopPropagation?f.stopPropagation():f.originalEvent?f.originalEvent._stopped=!0:f.cancelBubble=!0,this}function V1(f){return Ir(f,"wheel",Hr),this}function Di(f){return Fn(f,"mousedown touchstart dblclick contextmenu",Hr),f._leaflet_disable_click=!0,this}function zn(f){return f.preventDefault?f.preventDefault():f.returnValue=!1,this}function tr(f){return zn(f),Hr(f),this}function Wa(f){if(f.composedPath)return f.composedPath();for(var v=[],O=f.target;O;)v.push(O),O=O.parentNode;return v}function Zs(f,v){if(!v)return new K(f.clientX,f.clientY);var O=vn(v),F=O.boundingClientRect;return new K((f.clientX-F.left)/O.x-v.clientLeft,(f.clientY-F.top)/O.y-v.clientTop)}var F9=Ze.linux&&Ze.chrome?window.devicePixelRatio:Ze.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function U1(f){return Ze.edge?f.wheelDeltaY/2:f.deltaY&&f.deltaMode===0?-f.deltaY/F9: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 z9(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 Qs={__proto__:null,on:Fn,off:Cn,stopPropagation:Hr,disableScrollPropagation:V1,disableClickPropagation:Di,preventDefault:zn,stop:tr,getPropagationPath:Wa,getMousePosition:Zs,getWheelDelta:U1,isExternalTarget:z9,addListener:Fn,removeListener:Cn},Ws=$.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=Tn(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=T(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(),pn(this._el,O),this.fire("step")},_complete:function(){N(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(f){return 1-Math.pow(1-f,this._easeOutPower)}}),gr=$.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=yr&&Ze.any3d&&!Ze.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Fn(this._proxy,Wr,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 K?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():Y(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=Y(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 Ws,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),v.noMoveStart||this.fire("movestart"),v.animate!==!1){mn(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),Bt=q.distanceTo(F)||1,rn=1.42,kn=rn*rn;function Yn(Zt){var Er=Zt?-1:1,le=Zt?Xe:Qe,go=Xe*Xe-Qe*Qe+Er*kn*kn*Bt*Bt,Do=2*le*kn*Bt,Cr=go/Do,on=Math.sqrt(Cr*Cr+1)-Cr,So=on<1e-9?-18:Math.log(on);return So}function ho(Zt){return(Math.exp(Zt)-Math.exp(-Zt))/2}function Ce(Zt){return(Math.exp(Zt)+Math.exp(-Zt))/2}function he(Zt){return ho(Zt)/Ce(Zt)}var xe=Yn(0);function Ie(Zt){return Qe*(Ce(xe)/Ce(xe+rn*Zt))}function Be(Zt){return Qe*(Ce(xe)*he(xe+rn*Zt)-ho(xe))/kn}function at(Zt){return 1-Math.pow(1-Zt,1.5)}var _t=Date.now(),qt=(Yn(1)-xe)/rn,hn=O.duration?1e3*O.duration:1e3*qt*.8;function lt(){var Zt=(Date.now()-_t)/hn,Er=at(Zt)*qt;Zt<=1?(this._flyToFrame=T(lt,this),this._move(this.unproject(F.add(q.subtract(F).multiplyBy(Be(Er)/Bt)),Oe),this.getScaleZoom(Qe/Ie(Er),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=Y(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,Y(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=G([Oe.min.add(O),Oe.max.subtract(F)]),Xe=Qe.getSize();if(!Qe.contains(re)){this._enforcingBounds=!0;var Bt=re.subtract(Qe.getCenter()),rn=Qe.extend(re).getSize().subtract(Xe);q.x+=Bt.x<0?-rn.x:rn.x,q.y+=Bt.y<0?-rn.y:rn.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(),un(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(N(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)un(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=Y(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),Bt=G(this.project(Qe,F),this.project(Oe,F)).getSize(),rn=Ze.any3d?this.options.zoomSnap:1,kn=Xe.x/Bt.x,Yn=Xe.y/Bt.y,ho=v?Math.max(kn,Yn):Math.min(kn,Yn);return F=this.getScaleZoom(ho,F),rn&&(F=Math.round(F/(rn/100))*(rn/100),F=v?Math.ceil(F/rn)*rn:Math.floor(F/rn)*rn),Math.max(q,Math.min(re,F))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new K(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(Y(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 Zs(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=en(f);if(v){if(v._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Fn(v,"scroll",this._onScroll,this),this._containerId=l(v)},_initLayout:function(){var f=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ze.any3d,mn(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=Mn(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),pn(this._mapPane,new K(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(mn(f.markerPane,"leaflet-zoom-hide"),mn(f.shadowPane,"leaflet-zoom-hide"))},_resetView:function(f,v,O){pn(this._mapPane,new K(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 N(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(f){pn(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?Cn:Fn;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(){N(this._resizeRequest),this._resizeRequest=T(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&&!z9(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"&&Wn(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"&&zn(f);var Qe=q[0],Xe={originalEvent:f};if(f.type!=="keypress"&&f.type!=="keydown"&&f.type!=="keyup"){var Bt=Qe.getLatLng&&(!Qe._radius||Qe._radius<=10);Xe.containerPoint=Bt?this.latLngToContainerPoint(Qe.getLatLng()):this.mouseEventToContainerPoint(f),Xe.layerPoint=this.containerPointToLayerPoint(Xe.containerPoint),Xe.latlng=Bt?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 Tn(this._mapPane)||new K(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 G([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=G(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 K(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(){$t(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=Qn,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(){un(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:(T(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,mn(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&&$t(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 ko(f,v){return new gr(f,v)}var di=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 mn(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?(un(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()}}),yi=function(f){return new di(f)};gr.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)un(this._controlCorners[f]);un(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ga=di.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 di.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(){mn(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?(mn(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=f+"px"):$t(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return $t(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),Di(v),V1(v);var F=this._section=Dt("section",f+"-list");O&&(this._map.on("click",this.collapse,this),Fn(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"),Fn(q,{keydown:function(re){re.keyCode===13&&this._expandSafely()},click:function(re){zn(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;Vn(this._baseLayersList),Vn(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),Fn(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,Fn(f,"click",zn),this.expand();var v=this;setTimeout(function(){Cn(f,"click",zn),v._preventClick=!1})}}),j9=function(f,v,O){return new Ga(f,v,O)},bo=di.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),Di(re),Fn(re,"click",tr),Fn(re,"click",q,this),Fn(re,"click",this._refocusOnMap,this),re},_updateDisabled:function(){var f=this._map,v="leaflet-disabled";$t(this._zoomInButton,v),$t(this._zoomOutButton,v),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||f._zoom===f.getMinZoom())&&(mn(this._zoomOutButton,v),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||f._zoom===f.getMaxZoom())&&(mn(this._zoomInButton,v),this._zoomInButton.setAttribute("aria-disabled","true"))}});gr.mergeOptions({zoomControl:!0}),gr.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new bo,this.addControl(this.zoomControl))});var y5=function(f){return new bo(f)},Ji=di.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}}),x5=function(f){return new Ji(f)},Ti='<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>',V9=di.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Ze.inlineSvg?Ti+" ":"")+"Leaflet</a>"},initialize:function(f){b(this,f),this._attributions={}},onAdd:function(f){f.attributionControl=this,this._container=Dt("div","leaflet-control-attribution"),Di(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> ')}}});gr.mergeOptions({attributionControl:!0}),gr.addInitHook(function(){this.options.attributionControl&&new V9().addTo(this)});var e1=function(f){return new V9(f)};di.Layers=Ga,di.Zoom=bo,di.Scale=Ji,di.Attribution=V9,yi.layers=j9,yi.zoom=y5,yi.scale=x5,yi.attribution=e1;var so=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}});so.addTo=function(f,v){return f.addHandler(v,this),this};var w5={Events:R},Co=Ze.touch?"touchstart mousedown":"mousedown",K1=$.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||(Fn(this._dragStartTarget,Co,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(K1._dragging===this&&this.finishDrag(!0),Cn(this._dragStartTarget,Co,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(f){if(this._enabled&&(this._moved=!1,!xr(this._element,"leaflet-zoom-anim"))){if(f.touches&&f.touches.length!==1){K1._dragging===this&&this.finishDrag();return}if(!(K1._dragging||f.shiftKey||f.which!==1&&f.button!==1&&!f.touches)&&(K1._dragging=this,this._preventOutline&&Wn(this._element),yn(),Rr(),!this._moving)){this.fire("down");var v=f.touches?f.touches[0]:f,O=Mr(this._element);this._startPoint=new K(v.clientX,v.clientY),this._startPos=Tn(this._element),this._parentScale=vn(O);var F=f.type==="mousedown";Fn(document,F?"mousemove":"touchmove",this._onMove,this),Fn(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 K(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,zn(f),this._moved||(this.fire("dragstart"),this._moved=!0,mn(document.body,"leaflet-dragging"),this._lastTarget=f.target||f.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),mn(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),pn(this._element,this._newPos),this.fire("drag",f)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(f){$t(document.body,"leaflet-dragging"),this._lastTarget&&($t(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Cn(document,"mousemove touchmove",this._onMove,this),Cn(document,"mouseup touchend touchcancel",this._onUp,this),nn(),ur();var v=this._moved&&this._moving;this._moving=!1,K1._dragging=!1,v&&this.fire("dragend",{noInertia:f,distance:this._newPos.distanceTo(this._startPos)})}});function Ya(f,v,O){var F,q=[1,4,2,8],re,Oe,Qe,Xe,Bt,rn,kn,Yn;for(re=0,rn=f.length;re<rn;re++)f[re]._code=ei(f[re],v);for(Qe=0;Qe<4;Qe++){for(kn=q[Qe],F=[],re=0,rn=f.length,Oe=rn-1;re<rn;Oe=re++)Xe=f[re],Bt=f[Oe],Xe._code&kn?Bt._code&kn||(Yn=xi(Bt,Xe,kn,v,O),Yn._code=ei(Yn,v),F.push(Yn)):(Bt._code&kn&&(Yn=xi(Bt,Xe,kn,v,O),Yn._code=ei(Yn,v),F.push(Yn)),F.push(Xe));f=F}return f}function jr(f,v){var O,F,q,re,Oe,Qe,Xe,Bt,rn;if(!f||f.length===0)throw new Error("latlngs not passed");hi(f)||(console.warn("latlngs are not flat! Only the first ring will be used"),f=f[0]);var kn=oe([0,0]),Yn=Y(f),ho=Yn.getNorthWest().distanceTo(Yn.getSouthWest())*Yn.getNorthEast().distanceTo(Yn.getNorthWest());ho<1700&&(kn=qa(f));var Ce=f.length,he=[];for(O=0;O<Ce;O++){var xe=oe(f[O]);he.push(v.project(oe([xe.lat-kn.lat,xe.lng-kn.lng])))}for(Qe=Xe=Bt=0,O=0,F=Ce-1;O<Ce;F=O++)q=he[O],re=he[F],Oe=q.y*re.x-re.y*q.x,Xe+=(q.x+re.x)*Oe,Bt+=(q.y+re.y)*Oe,Qe+=Oe*3;Qe===0?rn=he[0]:rn=[Xe/Qe,Bt/Qe];var Ie=v.unproject(Z(rn));return oe([Ie.lat+kn.lat,Ie.lng+kn.lng])}function qa(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 Gs={__proto__:null,clipPolygon:Ya,polygonCenter:jr,centroid:qa};function Jr(f,v){if(!v||!f.length)return f.slice();var O=v*v;return f=$4(f,O),f=E5(f,O),f}function fi(f,v,O){return Math.sqrt(j0(f,v,O,!0))}function Xa(f,v,O){return j0(f,v,O)}function E5(f,v){var O=f.length,F=typeof Uint8Array<"u"?Uint8Array:Array,q=new F(O);q[0]=q[O-1]=1,Ja(f,q,v,0,O-1);var re,Oe=[];for(re=0;re<O;re++)q[re]&&Oe.push(f[re]);return Oe}function Ja(f,v,O,F,q){var re=0,Oe,Qe,Xe;for(Qe=F+1;Qe<=q-1;Qe++)Xe=j0(f[Qe],f[F],f[q],!0),Xe>re&&(Oe=Qe,re=Xe);re>O&&(v[Oe]=1,Ja(f,v,O,F,Oe),Ja(f,v,O,Oe,q))}function $4(f,v){for(var O=[f[0]],F=1,q=0,re=f.length;F<re;F++)n0(f[F],f[q])>v&&(O.push(f[F]),q=F);return q<re-1&&O.push(f[re-1]),O}var e0;function t0(f,v,O,F,q){var re=F?e0:ei(f,O),Oe=ei(v,O),Qe,Xe,Bt;for(e0=Oe;;){if(!(re|Oe))return[f,v];if(re&Oe)return!1;Qe=re||Oe,Xe=xi(f,v,Qe,O,q),Bt=ei(Xe,O),Qe===re?(f=Xe,re=Bt):(v=Xe,Oe=Bt)}}function xi(f,v,O,F,q){var re=v.x-f.x,Oe=v.y-f.y,Qe=F.min,Xe=F.max,Bt,rn;return O&8?(Bt=f.x+re*(Xe.y-f.y)/Oe,rn=Xe.y):O&4?(Bt=f.x+re*(Qe.y-f.y)/Oe,rn=Qe.y):O&2?(Bt=Xe.x,rn=f.y+Oe*(Xe.x-f.x)/re):O&1&&(Bt=Qe.x,rn=f.y+Oe*(Qe.x-f.x)/re),new K(Bt,rn,q)}function ei(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 n0(f,v){var O=v.x-f.x,F=v.y-f.y;return O*O+F*F}function j0(f,v,O,F){var q=v.x,re=v.y,Oe=O.x-q,Qe=O.y-re,Xe=Oe*Oe+Qe*Qe,Bt;return Xe>0&&(Bt=((f.x-q)*Oe+(f.y-re)*Qe)/Xe,Bt>1?(q=O.x,re=O.y):Bt>0&&(q+=Oe*Bt,re+=Qe*Bt)),Oe=f.x-q,Qe=f.y-re,F?Oe*Oe+Qe*Qe:new K(q,re)}function hi(f){return!y(f[0])||typeof f[0][0]!="object"&&typeof f[0][0]<"u"}function V0(f){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),hi(f)}function r0(f,v){var O,F,q,re,Oe,Qe,Xe,Bt;if(!f||f.length===0)throw new Error("latlngs not passed");hi(f)||(console.warn("latlngs are not flat! Only the first ring will be used"),f=f[0]);var rn=oe([0,0]),kn=Y(f),Yn=kn.getNorthWest().distanceTo(kn.getSouthWest())*kn.getNorthEast().distanceTo(kn.getNorthWest());Yn<1700&&(rn=qa(f));var ho=f.length,Ce=[];for(O=0;O<ho;O++){var he=oe(f[O]);Ce.push(v.project(oe([he.lat-rn.lat,he.lng-rn.lng])))}for(O=0,F=0;O<ho-1;O++)F+=Ce[O].distanceTo(Ce[O+1])/2;if(F===0)Bt=Ce[0];else for(O=0,re=0;O<ho-1;O++)if(Oe=Ce[O],Qe=Ce[O+1],q=Oe.distanceTo(Qe),re+=q,re>F){Xe=(re-F)/q,Bt=[Qe.x-Xe*(Qe.x-Oe.x),Qe.y-Xe*(Qe.y-Oe.y)];break}var xe=v.unproject(Z(Bt));return oe([xe.lat+rn.lat,xe.lng+rn.lng])}var o0={__proto__:null,simplify:Jr,pointToSegmentDistance:fi,closestPointOnSegment:Xa,clipSegment:t0,_getEdgeIntersection:xi,_getBitCode:ei,_sqClosestPointOnSegment:j0,isFlat:hi,_flat:V0,polylineCenter:r0},wi={project:function(f){return new K(f.lng,f.lat)},unproject:function(f){return new ee(f.y,f.x)},bounds:new U([-180,-90],[180,90])},i0={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 K(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,Bt;Qe<15&&Math.abs(Xe)>1e-7;Qe++)Bt=q*Math.sin(Oe),Bt=Math.pow((1-Bt)/(1+Bt),q/2),Xe=Math.PI/2-2*Math.atan(re*Bt)-Oe,Oe+=Xe;return new ee(Oe*v,f.x*v/O)}},Ei={__proto__:null,LonLat:wi,Mercator:i0,SphericalMercator:be},Ys=o({},se,{code:"EPSG:3395",projection:i0,transformation:function(){var f=.5/(Math.PI*i0.R);return fe(f,.5,-f,.5)}()}),S5=o({},se,{code:"EPSG:4326",projection:wi,transformation:fe(1/180,1,-1/180,.5)}),qs=o({},ue,{projection:wi,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=Ys,ue.EPSG3857=ae,ue.EPSG900913=ie,ue.EPSG4326=S5,ue.Simple=qs;var nr=$.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})}}});gr.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?y(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 Ni=nr.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)}}),U0=function(f,v){return new Ni(f,v)},Si=Ni.extend({addLayer:function(f){return this.hasLayer(f)?this:(f.addEventParent(this),Ni.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),Ni.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}}),$1=function(f,v){return new Si(f,v)},x1=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 Z4(f){return new x1(f)}var a0=x1.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 a0.imagePath!="string"&&(a0.imagePath=this._detectIconPath()),(this.options.imagePath||a0.imagePath)+x1.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=Mn(f,"background-image")||Mn(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):""}}),M5=so.extend({initialize:function(f){this._marker=f},addHooks:function(){var f=this._marker._icon;this._draggable||(this._draggable=new K1(f,f,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),mn(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&&$t(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=Tn(v._icon),Oe=O.getPixelBounds(),Qe=O.getPixelOrigin(),Xe=G(Oe.min._subtract(Qe).add(q),Oe.max._subtract(Qe).subtract(q));if(!Xe.contains(re)){var Bt=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(Bt,{animate:!1}),this._draggable._newPos._add(Bt),this._draggable._startPos._add(Bt),pn(v._icon,this._draggable._newPos),this._onDrag(f),this._panRequest=T(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&&(N(this._panRequest),this._panRequest=T(this._adjustPan.bind(this,f)))},_onDrag:function(f){var v=this._marker,O=v._shadow,F=Tn(v._icon),q=v._map.layerPointToLatLng(F);O&&pn(O,F),v._latlng=q,f.latlng=q,f.oldLatLng=this._oldLatLng,v.fire("move",f).fire("drag",f)},_onDragEnd:function(f){N(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",f)}}),K0=nr.extend({options:{icon:new a0,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||"")),mn(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&&Fn(O,"focus",this._panOnFocus,this);var q=f.icon.createShadow(this._shadow),re=!1;q!==this._shadow&&(this._removeShadow(),re=!0),q&&(mn(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&&Cn(this._icon,"focus",this._panOnFocus,this),un(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&un(this._shadow),this._shadow=null},_setPos:function(f){this._icon&&pn(this._icon,f),this._shadow&&pn(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&&(mn(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),M5)){var f=this.options.draggable;this.dragging&&(f=this.dragging.enabled(),this.dragging.disable()),this.dragging=new M5(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 Aa(f,v){return new K0(f,v)}var Z1=nr.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)}}),s0=Z1.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 Z1.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 Pr(f,v){return new s0(f,v)}var Mi=s0.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:Z1.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),Bt=O.unproject(Xe).lat,rn=Math.acos((Math.cos(re*q)-Math.sin(v*q)*Math.sin(Bt*q))/(Math.cos(v*q)*Math.cos(Bt*q)))/q;(isNaN(rn)||rn===0)&&(rn=re/Math.cos(Math.PI/180*v)),this._point=Xe.subtract(O.getPixelOrigin()),this._radius=isNaN(rn)?0:Xe.x-O.project([Bt,f-rn]).x,this._radiusY=Xe.y-Oe.y}else{var kn=F.unproject(F.project(this._latlng).subtract([this._mRadius,0]));this._point=O.latLngToLayerPoint(this._latlng),this._radius=this._point.x-O.latLngToLayerPoint(kn).x}this._updateBounds()}});function Q1(f,v,O){return new Mi(f,v,O)}var lo=Z1.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=j0,q,re,Oe=0,Qe=this._parts.length;Oe<Qe;Oe++)for(var Xe=this._parts[Oe],Bt=1,rn=Xe.length;Bt<rn;Bt++){q=Xe[Bt-1],re=Xe[Bt];var kn=F(f,q,re,!0);kn<v&&(v=kn,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 r0(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 hi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(f){for(var v=[],O=hi(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 K(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=t0(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]=Jr(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)&&fi(f,Qe[q],Qe[F])<=Xe)return!0;return!1}});function H5(f,v){return new lo(f,v)}lo._flat=V0;var va=lo.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 jr(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(f){var v=lo.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){lo.prototype._setLatLngs.call(this,f),hi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return hi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var f=this._renderer._bounds,v=this.options.weight,O=new K(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=Ya(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,Bt;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,Bt=O.length,Qe=Bt-1;Oe<Bt;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||lo.prototype._containsPoint.call(this,f,!0)}});function O5(f,v){return new va(f,v)}var Zo=Si.extend({initialize:function(f,v){b(this,v),this._layers={},f&&this.addData(f)},addData:function(f){var v=y(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=ti(f,re);return Oe?(Oe.feature=Ri(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 ti(f,v){var O=f.type==="Feature"?f.geometry:f,F=O?O.coordinates:null,q=[],re=v&&v.pointToLayer,Oe=v&&v.coordsToLatLng||$0,Qe,Xe,Bt,rn;if(!F&&!O)return null;switch(O.type){case"Point":return Qe=Oe(F),l0(re,f,Qe,v);case"MultiPoint":for(Bt=0,rn=F.length;Bt<rn;Bt++)Qe=Oe(F[Bt]),q.push(l0(re,f,Qe,v));return new Si(q);case"LineString":case"MultiLineString":return Xe=U9(F,O.type==="LineString"?0:1,Oe),new lo(Xe,v);case"Polygon":case"MultiPolygon":return Xe=U9(F,O.type==="Polygon"?1:2,Oe),new va(Xe,v);case"GeometryCollection":for(Bt=0,rn=O.geometries.length;Bt<rn;Bt++){var kn=ti({geometry:O.geometries[Bt],type:"Feature",properties:f.properties},v);kn&&q.push(kn)}return new Si(q);case"FeatureCollection":for(Bt=0,rn=O.features.length;Bt<rn;Bt++){var Yn=ti(O.features[Bt],v);Yn&&q.push(Yn)}return new Si(q);default:throw new Error("Invalid GeoJSON object.")}}function l0(f,v,O,F){return f?f(v,O):new K0(O,F&&F.markersInheritOptions&&F)}function $0(f){return new ee(f[1],f[0],f[2])}function U9(f,v,O){for(var F=[],q=0,re=f.length,Oe;q<re;q++)Oe=v?U9(f[q],v-1,O):(O||$0)(f[q]),F.push(Oe);return F}function Xs(f,v){return f=oe(f),f.alt!==void 0?[m(f.lng,v),m(f.lat,v),m(f.alt,v)]:[m(f.lng,v),m(f.lat,v)]}function Z0(f,v,O,F){for(var q=[],re=0,Oe=f.length;re<Oe;re++)q.push(v?Z0(f[re],hi(f[re])?0:v-1,O,F):Xs(f[re],F));return!v&&O&&q.length>0&&q.push(q[0].slice()),q}function c0(f,v){return f.feature?o({},f.feature,{geometry:v}):Ri(v)}function Ri(f){return f.type==="Feature"||f.type==="FeatureCollection"?f:{type:"Feature",properties:{},geometry:f}}var Ne={toGeoJSON:function(f){return c0(this,{type:"Point",coordinates:Xs(this.getLatLng(),f)})}};K0.include(Ne),Mi.include(Ne),s0.include(Ne),lo.include({toGeoJSON:function(f){var v=!hi(this._latlngs),O=Z0(this._latlngs,v?1:0,!1,f);return c0(this,{type:(v?"Multi":"")+"LineString",coordinates:O})}}),va.include({toGeoJSON:function(f){var v=!hi(this._latlngs),O=v&&!hi(this._latlngs[0]),F=Z0(this._latlngs,O?2:v?1:0,!0,f);return v||(F=[F]),c0(this,{type:(O?"Multi":"")+"Polygon",coordinates:F})}}),Ni.include({toMultiPoint:function(f){var v=[];return this.eachLayer(function(O){v.push(O.toGeoJSON(f).geometry.coordinates)}),c0(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=Ri(re);Oe.type==="FeatureCollection"?F.push.apply(F,Oe.features):F.push(Oe)}}}),O?c0(this,{geometries:F,type:"GeometryCollection"}):{type:"FeatureCollection",features:F}}});function st(f,v){return new Zo(f,v)}var nt=st,ln=nr.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(f,v,O){this._url=f,this._bounds=Y(v),b(this,O)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(mn(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){un(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&&Nr(this._image),this},bringToBack:function(){return this._map&&rr(this._image),this},setUrl:function(f){return this._url=f,this._image&&(this._image.src=f),this},setBounds:function(f){return this._bounds=Y(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(mn(v,"leaflet-image-layer"),this._zoomAnimated&&mn(v,"leaflet-zoom-animated"),this.options.className&&mn(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();pn(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 ln(f,v,O)},mr=ln.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(mn(v,"leaflet-image-layer"),this._zoomAnimated&&mn(v,"leaflet-zoom-animated"),this.options.className&&mn(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}y(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 no(f,v,O){return new mr(f,v,O)}var kr=ln.extend({_initImage:function(){var f=this._image=this._url;mn(f,"leaflet-image-layer"),this._zoomAnimated&&mn(f,"leaflet-zoom-animated"),this.options.className&&mn(f,this.options.className),f.onselectstart=h,f.onmousemove=h}});function ba(f,v,O){return new kr(f,v,O)}var ni=nr.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(f,v){f&&(f instanceof ee||y(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&&(mn(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(f){f._fadeAnimated?(bt(this._container,0),this._removeTimeout=setTimeout(a(un,void 0,this._container),200)):un(this._container),this.options.interactive&&($t(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&&Nr(this._container),this},bringToBack:function(){return this._map&&rr(this._container),this},_prepareOpen:function(f){var v=this._source;if(!v._map)return!1;if(v instanceof Si){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?pn(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]}});gr.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}}),nr.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 Eo=ni.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,ni.prototype.openOn.call(this,f)},onAdd:function(f){ni.prototype.onAdd.call(this,f),f.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Z1||this._source.on("preclick",Hr))},onRemove:function(f){ni.prototype.onRemove.call(this,f),f.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Z1||this._source.off("preclick",Hr))},getEvents:function(){var f=ni.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),Di(v),V1(this._contentNode),Fn(v,"contextmenu",Hr),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>',Fn(F,"click",function(q){zn(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",mn(f,re)):$t(f,re),this._containerWidth=this._container.offsetWidth},_animateZoom:function(f){var v=this._map._latLngToNewLayerPoint(this._latlng,f.zoom,f.center),O=this._getAnchor();pn(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(Mn(this._container,"marginBottom"),10)||0,O=this._container.offsetHeight+v,F=this._containerWidth,q=new K(this._containerLeft,-O-this._containerBottom);q._add(Tn(this._container));var re=f.layerPointToContainerPoint(q),Oe=Z(this.options.autoPanPadding),Qe=Z(this.options.autoPanPaddingTopLeft||Oe),Xe=Z(this.options.autoPanPaddingBottomRight||Oe),Bt=f.getSize(),rn=0,kn=0;re.x+F+Xe.x>Bt.x&&(rn=re.x+F-Bt.x+Xe.x),re.x-rn-Qe.x<0&&(rn=re.x-Qe.x),re.y+O+Xe.y>Bt.y&&(kn=re.y+O-Bt.y+Xe.y),re.y-kn-Qe.y<0&&(kn=re.y-Qe.y),(rn||kn)&&(this.options.keepInView&&(this._autopanning=!0),f.fire("autopanstart").panBy([rn,kn]))}},_getAnchor:function(){return Z(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),_a=function(f,v){return new Eo(f,v)};gr.mergeOptions({closePopupOnClick:!0}),gr.include({openPopup:function(f,v,O){return this._initOverlay(Eo,f,v,O).openOn(this),this},closePopup:function(f){return f=arguments.length?f:this._popup,f&&f.close(),this}}),nr.include({bindPopup:function(f,v){return this._popup=this._initOverlay(Eo,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 Si||(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)){tr(f);var v=f.layer||f.target;if(this._popup._source===v&&!(v instanceof Z1)){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 ya=ni.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(f){ni.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){ni.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=ni.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,Bt=q.offsetHeight,rn=Z(this.options.offset),kn=this._getAnchor();Qe==="top"?(v=Xe/2,O=Bt):Qe==="bottom"?(v=Xe/2,O=0):Qe==="center"?(v=Xe/2,O=Bt/2):Qe==="right"?(v=0,O=Bt/2):Qe==="left"?(v=Xe,O=Bt/2):Oe.x<re.x?(Qe="right",v=0,O=Bt/2):(Qe="left",v=Xe+(rn.x+kn.x)*2,O=Bt/2),f=f.subtract(Z(v,O,!0)).add(rn).add(kn),$t(q,"leaflet-tooltip-right"),$t(q,"leaflet-tooltip-left"),$t(q,"leaflet-tooltip-top"),$t(q,"leaflet-tooltip-bottom"),mn(q,"leaflet-tooltip-"+Qe),pn(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])}}),w1=function(f,v){return new ya(f,v)};gr.include({openTooltip:function(f,v,O){return this._initOverlay(ya,f,v,O).openOn(this),this},closeTooltip:function(f){return f.close(),this}}),nr.include({bindTooltip:function(f,v){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(ya,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 Si||(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&&(Fn(v,"focus",function(){this._tooltip._source=f,this.openTooltip()},this),Fn(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 W1=x1.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?(Vn(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 xa(f){return new W1(f)}x1.Default=a0;var dr=nr.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(),un(this._container),f._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Nr(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(rr(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 K?f:new K(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&&(N(this._fadeFrame),this._fadeFrame=T(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)):(un(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)un(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 K(+q,+re);Qe.z=+Oe;var Xe=this._tileCoordsToKey(Qe),Bt=this._tiles[Xe];return Bt&&Bt.active?(Bt.retain=!0,!0):(Bt&&Bt.loaded&&(Bt.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 K(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):pn(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 Bt in this._tiles){var rn=this._tiles[Bt].coords;(rn.z!==this._tileZoom||!Xe.contains(new K(rn.x,rn.y)))&&(this._tiles[Bt].current=!1)}if(Math.abs(O-this._tileZoom)>1){this._setView(f,O);return}for(var kn=q.min.y;kn<=q.max.y;kn++)for(var Yn=q.min.x;Yn<=q.max.x;Yn++){var ho=new K(Yn,kn);if(ho.z=this._tileZoom,!!this._isValidTile(ho)){var Ce=this._tiles[this._tileCoordsToKey(ho)];Ce?Ce.current=!0:Oe.push(ho)}}if(Oe.sort(function(xe,Ie){return xe.distanceTo(re)-Ie.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 Y(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 K(+v[0],+v[1]);return O.z=+v[2],O},_removeTile:function(f){var v=this._tiles[f];v&&(un(v.el),delete this._tiles[f],this.fire("tileunload",{tile:v.el,coords:this._keyToTileCoords(f)}))},_initTile:function(f){mn(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&&T(a(this._tileReady,this,f,null,q)),pn(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),N(this._fadeFrame),this._fadeFrame=T(this._updateOpacity,this)):(O.active=!0,this._pruneTiles()),v||(mn(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?T(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 K(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 Q4(f){return new dr(f)}var wa=dr.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 Fn(O,"load",a(this._tileOnLoad,this,v,O)),Fn(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 x(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;un(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),dr.prototype._removeTile.call(this,f)},_tileReady:function(f,v,O){if(!(!this._map||O&&O.getAttribute("src")===S))return dr.prototype._tileReady.call(this,f,v,O)}});function Q0(f,v){return new wa(f,v)}var K9=wa.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,wa.prototype.onAdd.call(this,f)},getTileUrl:function(f){var v=this._tileCoordsToNwSe(f),O=this._crs,F=G(O.project(v[0]),O.project(v[1])),q=F.min,re=F.max,Oe=(this._wmsVersion>=1.3&&this._crs===S5?[q.y,q.x,re.y,re.x]:[q.x,q.y,re.x,re.y]).join(","),Qe=wa.prototype.getTileUrl.call(this,f);return Qe+C(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 $9(f,v){return new K9(f,v)}wa.WMS=K9,Q0.wms=$9;var E1=nr.extend({options:{padding:.1},initialize:function(f){b(this,f),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),mn(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):pn(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()}}),W0=E1.extend({options:{tolerance:0},getEvents:function(){var f=E1.prototype.getEvents.call(this);return f.viewprereset=this._onViewPreReset,f},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){E1.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var f=this._container=document.createElement("canvas");Fn(f,"mousemove",this._onMouseMove,this),Fn(f,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Fn(f,"mouseout",this._handleMouseOut,this),f._leaflet_disable_events=!0,this._ctx=f.getContext("2d")},_destroyContainer:function(){N(this._redrawRequest),delete this._ctx,un(this._container),Cn(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)){E1.prototype._update.call(this);var f=this._bounds,v=this._container,O=f.getSize(),F=Ze.retina?2:1;pn(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(){E1.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||T(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&&($t(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&&(mn(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 Fi(f){return Ze.canvas?new W0(f):null}var t1=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">')}}(),B5={_initContainer:function(){this._container=Dt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(E1.prototype._update.call(this),this.fire("update"))},_initPath:function(f){var v=f._container=t1("shape");mn(v,"leaflet-vml-shape "+(this.options.className||"")),v.coordsize="1 1",f._path=t1("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;un(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=t1("stroke")),q.appendChild(v),v.weight=F.weight+"px",v.color=F.color,v.opacity=F.opacity,F.dashArray?v.dashStyle=y(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=t1("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){Nr(f._container)},_bringToBack:function(f){rr(f._container)}},n1=Ze.vml?t1:Ae,S1=E1.extend({_initContainer:function(){this._container=n1("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=n1("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){un(this._container),Cn(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){E1.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)),pn(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=n1("path");f.options.className&&mn(v,f.options.className),f.options.interactive&&mn(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){un(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){Nr(f._path)},_bringToBack:function(f){rr(f._path)}});Ze.vml&&S1.include(B5);function u0(f){return Ze.svg||Ze.vml?new S1(f):null}gr.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&&Fi(f)||u0(f)}});var G1=va.extend({initialize:function(f,v){va.prototype.initialize.call(this,this._boundsToLatLngs(f),v)},setBounds:function(f){return this.setLatLngs(this._boundsToLatLngs(f))},_boundsToLatLngs:function(f){return f=Y(f),[f.getSouthWest(),f.getNorthWest(),f.getNorthEast(),f.getSouthEast()]}});function Z9(f,v){return new G1(f,v)}S1.create=n1,S1.pointsToPath=Me,Zo.geometryToLayer=ti,Zo.coordsToLatLng=$0,Zo.coordsToLatLngs=U9,Zo.latLngToCoords=Xs,Zo.latLngsToCoords=Z0,Zo.getFeature=c0,Zo.asFeature=Ri,gr.mergeOptions({boxZoom:!0});var Y1=so.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(){Fn(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Cn(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){un(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(),Rr(),yn(),this._startPoint=this._map.mouseEventToContainerPoint(f),Fn(document,{contextmenu:tr,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),mn(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();pn(this._box,v.min),this._box.style.width=O.x+"px",this._box.style.height=O.y+"px"},_finish:function(){this._moved&&(un(this._box),$t(this._container,"leaflet-crosshair")),ur(),nn(),Cn(document,{contextmenu:tr,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())}});gr.addInitHook("addHandler","boxZoom",Y1),gr.mergeOptions({doubleClickZoom:!0});var r1=so.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)}});gr.addInitHook("addHandler","doubleClickZoom",r1),gr.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Ea=so.extend({addHooks:function(){if(!this._draggable){var f=this._map;this._draggable=new K1(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))}mn(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){$t(this._map._container,"leaflet-grab"),$t(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=Y(this._map.options.maxBounds);this._offsetLimit=G(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]),Bt=Math.min(O.inertiaMaxSpeed,Xe),rn=Qe.multiplyBy(Bt/Xe),kn=Bt/(O.inertiaDeceleration*Oe),Yn=rn.multiplyBy(-kn/2).round();!Yn.x&&!Yn.y?v.fire("moveend"):(Yn=v._limitOffset(Yn,v.options.maxBounds),T(function(){v.panBy(Yn,{duration:kn,easeLinearity:Oe,noMoveStart:!0,animate:!0})}))}}});gr.addInitHook("addHandler","dragging",Ea),gr.mergeOptions({keyboard:!0,keyboardPanDelta:80});var G0=so.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"),Fn(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(),Cn(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(){Fn(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Cn(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;tr(f)}}});gr.addInitHook("addHandler","keyboard",G0),gr.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Q9=so.extend({addHooks:function(){Fn(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Cn(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(f){var v=U1(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),tr(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))}});gr.addInitHook("addHandler","scrollWheelZoom",Q9);var Js=600;gr.mergeOptions({tapHold:Ze.touchNative&&Ze.safari&&Ze.mobile,tapTolerance:15});var Y0=so.extend({addHooks:function(){Fn(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Cn(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 K(v.clientX,v.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(Fn(document,"touchend",zn),Fn(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",v))},this),Js),Fn(document,"touchend touchcancel contextmenu",this._cancel,this),Fn(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function f(){Cn(document,"touchend",zn),Cn(document,"touchend touchcancel",f)},_cancel:function(){clearTimeout(this._holdTimeout),Cn(document,"touchend touchcancel contextmenu",this._cancel,this),Cn(document,"touchmove",this._onMove,this)},_onMove:function(f){var v=f.touches[0];this._newPos=new K(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)}});gr.addInitHook("addHandler","tapHold",Y0),gr.mergeOptions({touchZoom:Ze.touch,bounceAtZoomLimits:!0});var d0=so.extend({addHooks:function(){mn(this._map._container,"leaflet-touch-zoom"),Fn(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){$t(this._map._container,"leaflet-touch-zoom"),Cn(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(),Fn(document,"touchmove",this._onTouchMove,this),Fn(document,"touchend touchcancel",this._onTouchEnd,this),zn(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),N(this._animRequest);var Oe=a(v._move,v,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=T(Oe,this,!0),zn(f)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,N(this._animRequest),Cn(document,"touchmove",this._onTouchMove,this),Cn(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))}});gr.addInitHook("addHandler","touchZoom",d0),gr.BoxZoom=Y1,gr.DoubleClickZoom=r1,gr.Drag=Ea,gr.Keyboard=G0,gr.ScrollWheelZoom=Q9,gr.TapHold=Y0,gr.TouchZoom=d0,n.Bounds=U,n.Browser=Ze,n.CRS=ue,n.Canvas=W0,n.Circle=Mi,n.CircleMarker=s0,n.Class=V,n.Control=di,n.DivIcon=W1,n.DivOverlay=ni,n.DomEvent=Qs,n.DomUtil=_i,n.Draggable=K1,n.Evented=$,n.FeatureGroup=Si,n.GeoJSON=Zo,n.GridLayer=dr,n.Handler=so,n.Icon=x1,n.ImageOverlay=ln,n.LatLng=ee,n.LatLngBounds=J,n.Layer=nr,n.LayerGroup=Ni,n.LineUtil=o0,n.Map=gr,n.Marker=K0,n.Mixin=w5,n.Path=Z1,n.Point=K,n.PolyUtil=Gs,n.Polygon=va,n.Polyline=lo,n.Popup=Eo,n.PosAnimation=Ws,n.Projection=Ei,n.Rectangle=G1,n.Renderer=E1,n.SVG=S1,n.SVGOverlay=kr,n.TileLayer=wa,n.Tooltip=ya,n.Transformation=me,n.Util=z,n.VideoOverlay=mr,n.bind=a,n.bounds=G,n.canvas=Fi,n.circle=Q1,n.circleMarker=Pr,n.control=yi,n.divIcon=xa,n.extend=o,n.featureGroup=$1,n.geoJSON=st,n.geoJson=nt,n.gridLayer=Q4,n.icon=Z4,n.imageOverlay=$n,n.latLng=oe,n.latLngBounds=Y,n.layerGroup=U0,n.map=ko,n.marker=Aa,n.point=Z,n.polygon=O5,n.polyline=H5,n.popup=_a,n.rectangle=Z9,n.setOptions=b,n.stamp=l,n.svg=u0,n.svgOverlay=ba,n.tileLayer=Q0,n.tooltip=w1,n.transformation=fe,n.version=r,n.videoOverlay=no;var W9=window.L;n.noConflict=function(){return window.L=W9,this},window.L=n})}(K4,K4.exports)),K4.exports}var _5=U8e();const b8=L1(_5);function _8(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function y8(e,t){return t==null?function(r,o){const i=P.useRef();return i.current||(i.current=e(r,o)),i}:function(r,o){const i=P.useRef();i.current||(i.current=e(r,o));const a=P.useRef(r),{instance:s}=i.current;return P.useEffect(function(){a.current!==r&&(t(s,r,a.current),a.current=r)},[s,r,o]),i}}function K8e(e,t){P.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 SI(e){return function(n){const r=v8(),o=e(Im(n,r),r);return bI(r.map,n.attribution),wI(o.current,n.eventHandlers),K8e(o.current,r),o}}function $8e(e){function t(o,i){return _8(e(o),i)}const n=y8(t),r=z8e(n);return xI(r)}function Z8e(e,t){const n=y8(e,t),r=SI(n);return R8e(r)}function Q8e(e,t){const n=y8(e),r=j8e(n,t);return F8e(r)}function W8e(e,t){const n=y8(e,t),r=SI(n);return xI(r)}function G8e(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 MI(){return v8().map}function Pm(){return Pm=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},Pm.apply(this,arguments)}function Y8e({bounds:e,boundsOptions:t,center:n,children:r,className:o,id:i,placeholder:a,style:s,whenReady:l,zoom:u,...d},h){const[m]=P.useState({className:o,id:i,style:s}),[p,A]=P.useState(null);P.useImperativeHandle(h,()=>(p==null?void 0:p.map)??null,[p]);const b=P.useCallback(w=>{if(w!==null&&p===null){const x=new _5.Map(w,d);n!=null&&u!=null?x.setView(n,u):e!=null&&x.fitBounds(e,t),l!=null&&x.whenReady(l),A(T8e(x))}},[]);P.useEffect(()=>()=>{p==null||p.map.remove()},[p]);const C=p?P.createElement(yI,{value:p},r):a??null;return P.createElement("div",Pm({},m,{ref:b}),C)}const q8e=P.forwardRef(Y8e),X8e=Z8e(function({position:t,...n},r){const o=new _5.Marker(t,n);return _8(o,N8e(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())}),J8e=Q8e(function(t,n){const r=new _5.Popup(t,n.overlayContainer);return _8(r,n)},function(t,n,{position:r},o){P.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])}),e7e=W8e(function({url:t,...n},r){const o=new _5.TileLayer(t,Im(n,r));return _8(o,r)},function(t,n,r){G8e(t,n,r);const{url:o}=n;o!=null&&o!==r.url&&t.setUrl(o)}),t7e=$8e(function(t){return new _5.Control.Zoom(t)}),km={defaultZoom:5,defaultCenter:{lat:20.5937,lng:78.9629},defaultMapProvider:{osm:{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'&copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors'}}.osm},n7e=({items:e})=>{const t=MI();return P.useEffect(()=>{if(!(e!=null&&e.length))return;const n=b8.latLngBounds(e==null?void 0:e.map(r=>r==null?void 0:r.position));t.fitBounds(n,{padding:[50,50]})},[e,t]),null},r7e=({mapRef:e})=>{const t=MI();return P.useEffect(()=>{e.current=t},[t]),null},o7e="../../src/assets/images/map_pin.svg",i7e=new b8.Icon({iconUrl:o7e,iconSize:new b8.Point(32,32),iconAnchor:new b8.Point(16,32),className:"leaflet-div-icon",attribution:'<a href="https://www.flaticon.com/free-icons/location" title="location icons">@adrianadam - Flaticon</a>'}),HI=P.forwardRef(({position:e,children:t,...n},r)=>W.jsx(X8e,{position:e,icon:i7e,draggable:!1,ref:r,...n,children:t})),a7e=({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]=P.useState(!1),[m,p]=P.useState(0),A=typeof l=="number",b=A?l:m;P.useEffect(()=>{h(!0)},[]);const C=()=>{const M=(b-1+e.length)%e.length;A&&u?u(M):p(M)},w=()=>{const M=(b+1)%e.length;A&&u?u(M):p(M)},x=P.useMemo(()=>e==null?void 0:e[b],[e,b]),y=P.useRef(null);P.useEffect(()=>{if(!d)return;const M=requestAnimationFrame(()=>{var H;(H=y==null?void 0:y.current)==null||H.openPopup()});return()=>cancelAnimationFrame(M)},[b,d]);const E=a||"var(--awi-color-common-highlight, #ffcc00)",S=P.useRef(null);return P.useEffect(()=>{const M=S.current;M&&(x!=null&&x.position)&&M.setView(x.position,M.getZoom(),{animate:!0})},[x,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(q8e,{center:x==null?void 0:x.position,zoom:km.defaultZoom,className:"static_map",zoomControl:!1,style:{width:"100%",height:"100%"},children:[W.jsx(e7e,{url:km.defaultMapProvider.url,attribution:km.defaultMapProvider.attribution}),W.jsx(r7e,{mapRef:S}),W.jsx(n7e,{items:e}),W.jsx(t7e,{position:"bottomright"}),e==null?void 0:e.map((M,H)=>H===b?W.jsx(HI,{position:M==null?void 0:M.position,ref:y,children:r?W.jsx(J8e,{closeButton:!1,autoPan:!1,children:M==null?void 0:M.element}):null},H):W.jsx(HI,{position:M==null?void 0:M.position},H))]}),o?W.jsxs("div",{className:`map_view_nav_container ${i??""}`,children:[W.jsx(Ki,{variant:"primary",onClick:C,size:"s",icon:"leftArrow",backgroundColor:E,borderColor:E,title:"Previous"}),W.jsx(Ki,{variant:"primary",onClick:w,size:"s",icon:"rightArrow",iconPosition:"after",backgroundColor:E,borderColor:E,title:"Next"})]}):null]})},Dm=()=>{const e=P.useRef(!1),t=P.useRef(!1);return P.useEffect(()=>{const o=l=>{l.key==="Control"&&(e.current=!0,Kr.success("Control pressed, Handling control press events")),l.key==="Alt"&&(t.current=!0,Kr.success("Alt pressed, Handling alt press events")),l.key==="Command"&&(e.current=!0,Kr.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 s7e(e=1,t=1){const[n,r]=P.useState(e),[o,i]=P.useState(t),a=P.useCallback(u=>{u>=1&&u<=o?r(u):console.error(`Invalid page number: ${u}`)},[o]),s=P.useCallback(()=>{a(n+1)},[n,a]),l=P.useCallback(()=>{a(n-1)},[n,a]);return{currentPage:n,setPage:a,nextPage:s,prevPage:l,totalPages:o,setTotalPages:i}}const OI=(e,t="",n)=>{!n||!e||Da.forEach(e,(r,o)=>{const i=`--${t}${o}`;Da.isObject(r)&&!Da.isArray(r)?OI(r,`${t}${o}-`,n):typeof r=="string"&&n.style.setProperty(i,r)})},BI=(e,t="",n)=>{!n||!e||Da.forEach(e,(r,o)=>{const i=`--${t}${o}`;Da.isObject(r)&&!Da.isArray(r)?BI(r,`${t}${o}-`,n):n.style.removeProperty(i)})},l7e=(e,t="")=>{const n={},r=(o,i)=>{Da.forEach(o,(a,s)=>{const l=`--${t}${i}${s}`;Da.isObject(a)&&!Da.isArray(a)?r(a,`${i}${s}-`):typeof a=="string"&&(n[`${i}${s}`.toUpperCase().replace(/-/g,"_")]=`var(${l})`)})};return r(e,""),n},LI=P.createContext({}),c7e="awi-color-",u7e="awi-size-",d7e="awi-weight-",Tm=(e,t,n)=>(P.useEffect(()=>{if(Da.isEqual(n.current,e))return;const r=document.documentElement;return OI(e,t,r),()=>BI(e,t,r)},[e,n,t]),e?l7e(e,t):{}),f7e=({theme:e=Pp,log:t=!0,children:n})=>{const r=P.useRef(null),o=P.useRef(null),i=P.useRef(null),a=Tm(e.colors,c7e,r),s=Tm(e.sizes,u7e,o),l=Tm(e.weights,d7e,i),u=new uce;return t&&(console.group("Theme Variables"),console.table(a),console.table(s),console.table(l),console.groupEnd()),W.jsx(gce,{client:u,children:W.jsxs(LI.Provider,{value:{...a,...s,...l},children:[W.jsx(KA,{}),n]})})},h7e=()=>{const e=P.useContext(LI);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},g7e=()=>({success:(e,t)=>Wu("success",e,t),error:(e,t)=>Wu("error",e,t),info:(e,t)=>Wu("info",e,t),warning:(e,t)=>Wu("warning",e,t)});an.AWI_ALL_GLOBALS=Or,an.AWI_IMAGE_VALIDITY_HELPER=IC,an.AnnotationComponentLibrary=P8e,an.AwiAnnotationHotkeys=A7,an.AwiAnnotationTools=Gu,an.AwiCanvasContainer=qu,an.AwiCustomConfirmation=hI,an.AwiEmptyState=zK,an.AwiGenerateHeader=yA,an.AwiHelperMethods=l1,an.AwiInput=zA,an.AwiLoadMoreButton=jK,an.AwiMessageScreen=ic,an.AwiModal=tc,an.AwiModalBody=nc,an.AwiModalFooter=oc,an.AwiModalHeader=rc,an.AwiModalRow=J5,an.AwiPagination=UA,an.AwiSafeLocalStorage=p0,an.AwiSamModal=VA,an.AwiScrollableTableCellList=VK,an.AwiSlider=jA,an.AwiTableBar=k8e,an.AwiTableBody=vA,an.AwiTableCell=Y5,an.AwiTableHeader=bA,an.AwiTableHeaders=_A,an.AwiTableInfinite=AA,an.AwiTableRow=h7,an.AwiToastMessage=Kr,an.AwiUseKeyChecker=Dm,an.Backdrop=xA,an.Badge=UK,an.Button=Ki,an.ButtonGroup=KK,an.Chart=DG,an.CompactEventCard=d_,an.ContactInput=n3e,an.DEFAULT_THEME=Pp,an.DateRangePicker=s3e,an.DetectionCarousel=MB,an.EventPreview=l3e,an.Heatmap=D3e,an.Icon=h9,an.Input=E2,an.MapView=a7e,an.MathAnnotationHelper=Bn,an.MockImageGenerationHelper=gI,an.Modal=N3e,an.Multiselect=R3e,an.Pagination=F3e,an.Select=wB,an.Sidebar=z3e,an.Spinner=C7,an.Switch=j3e,an.Table=V3e,an.ThemeProvider=f7e,an.Toast=RB,an.ToastProvider=KA,an.usePagination=s7e,an.useTheme=h7e,an.useToast=g7e,Object.defineProperty(an,Symbol.toStringTag,{value:"Module"})});