1var Bo=Object.defineProperty;var Do=(c,i,n)=>i in c?Bo(c,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):c[i]=n;var x=(c,i,n)=>Do(c,typeof i!="symbol"?i+"":i,n);import{n as Hs,h as Rs,g as No,t as Ci,f as Ys,a as Ks,b as Js,c as Zo,e as Si,d as Fo,S as Ho,x as Ro,M as Qs,C as tn,L as Go}from"./_config-DGutaR08.js";import{A as en,N as sn}from"./a11y-C7zuodjt.js";import{P as nn}from"./pagination-S3HD4beh.js";import{i as Vo,b as Ti,l as Gs,r as Wo,a as qo}from"./form-9ARQW8Tv.js";function Uo(){const c=`${window.innerWidth-document.documentElement.clientWidth}px`;document.body.style.setProperty("--scrollbar-width-computed",c)}function jo(){const c="is-affixed",i="is-opened",n="is-visible",a={header:document.querySelector("[data-header]"),holder:document.querySelector('[data-header="holder"]'),backdrop:document.querySelector('[data-backdrop="header"]'),headerControls:document.querySelectorAll('[aria-controls="header"]')},h=new IntersectionObserver(m=>{m[0].isIntersecting?(a.header.classList.remove(c),document.dispatchEvent(new CustomEvent(Hs._headerAffixRemoved))):a.header.classList.add(c)},{root:null,threshold:0,rootMargin:"50px"});function o(){a.header.classList.add(i),a.backdrop.classList.add(n),a.headerControls.forEach(m=>{m.ariaExpanded="true",m.title=m.dataset.hamburgerCloseLabel})}function l(){a.header.classList.remove(i),a.backdrop.classList.remove(n),a.headerControls.forEach(m=>m.ariaExpanded="false"),a.headerControls.forEach(m=>{m.ariaExpanded="false",m.title=m.dataset.hamburgerOpenLabel})}function d(){a.header.classList.contains(i)?l():o()}function f(m=Rs){m.matches?h.observe(a.holder):(h.unobserve(a.holder),a.header.classList.remove(c))}a.header&&(a.headerControls.forEach(m=>m.addEventListener("click",()=>{var g;switch((g=m.dataset)==null?void 0:g.action){case"show":return o();case"hide":return l();default:return d()}})),f(),document.addEventListener(Hs._headerAffixRemoved,l),Rs.addEventListener("change",m=>{f(m.target)}))}function $o(){const i="is-active",n="is-visible";let a,h;const o=document.querySelector("[data-nav]");if(!o)return;const l=document.querySelector('[data-backdrop="header"]');let d=o.querySelectorAll("[aria-expanded]"),f=document.querySelectorAll("[data-nav-item-toggle]");const m=["mouseleave","focusout"],g=["mouseenter","focus"];function v(){o.classList.remove(i),S()}function y(){o.classList.add(i)}function S(){d.forEach(Z=>Z.setAttribute("aria-expanded","false")),l.classList.remove(n)}function w(Z){Z.setAttribute("aria-expanded","true"),l.classList.add(n)}function T(Z){Z.setAttribute("aria-expanded","false")}function A(){clearTimeout(a),clearTimeout(h),h=setTimeout(function(){v()},0)}function E(Z){a!=null&&clearTimeout(a),o.classList.contains(i)?(clearTimeout(a),clearTimeout(h),S(),w(Z),y()):a=setTimeout(function(){S(),w(Z),y()},0)}function D(){d=o.querySelectorAll(".level-1 > [aria-expanded]"),d.forEach(Z=>{m.forEach(J=>{Z.addEventListener(J,nt=>{nt.currentTarget.contains(nt.relatedTarget)||A(nt.target)})}),g.forEach(J=>{Z.addEventListener(J,nt=>E(nt.target))})})}function F(){f=document.querySelectorAll("[data-nav-item-toggle]"),f.forEach(Z=>{Z.addEventListener("click",J=>{const nt=Z.closest("[aria-expanded]");nt.getAttribute("aria-expanded")==="true"?T(nt):w(nt)})})}function Y(){d.forEach(Z=>{Z.replaceWith(Z.cloneNode(!0))})}function $(){f.forEach(Z=>{Z.replaceWith(Z.cloneNode(!0))})}function dt(Z){Z.matches?(Y(),F()):($(),D())}function it(Z){dt(Z),Z.addEventListener("change",J=>{dt(J)})}it(No)}function Xo(){document.querySelectorAll(".dialog").forEach(n=>{n.getAttribute("data-init-open")==="true"&&(n.close(),setTimeout(()=>{n.showModal()},250))}),document.querySelectorAll('[data-dialog="close"]').forEach(n=>{n.addEventListener("click",a=>{const h=a.target.closest("dialog");h.close(),h.removeAttribute("data-init-open")})}),document.addEventListener("click",n=>{if(!n.target.closest("[data-dialog-open]"))return;const a=n.target.closest("[data-dialog-open]").dataset.dialogOpen,h=document.getElementById(a);h&&h.showModal()})}function Yo(){const c=document.querySelectorAll("[data-collapsible]");function i(o){return o.hasAttribute("open")}function n(o){o.style.transitionDuration=`${Math.log(o.scrollHeight)*65}ms`}function a(o){o.style.maxHeight=`${o.scrollHeight}px`}function h(o,l,d,f,m){const g=d.querySelector("[data-collapsible-label]"),v=d.dataset.collapsibleTextLess,y=d.dataset.collapsibleTextMore;n(f),o?(a(f),l.setAttribute("open","")):(f.style.maxHeight=m,l.removeAttribute("open")),d.ariaExpanded=String(o),v&&y&&(d.title=o?v:y,g&&(g.textContent=o?v:y))}c.forEach(o=>{if(o.dataset.initialized==="true")return;const l=o.querySelector("[data-collapsible-btn]"),d=o.querySelector("[data-collapsible-body]");if(!d||!l)return;const f=`${d.offsetHeight}px`;l.addEventListener("click",()=>{const m=!i(o);h(m,o,l,d,f)}),o.dataset.initialized="true"}
1),window.addEventListener("load",function(){c.forEach(o=>{if(i(o)){const l=o.querySelector("[data-collapsible-body]");l&&a(l)}})},{once:!0})}function on({swiper:c,extendParams:i,on:n,emit:a,params:h}){c.autoplay={running:!1,paused:!1,timeLeft:0},i({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let o,l,d=h&&h.autoplay?h.autoplay.delay:3e3,f=h&&h.autoplay?h.autoplay.delay:3e3,m,g=new Date().getTime(),v,y,S,w,T,A;function E(G){!c||c.destroyed||!c.wrapperEl||G.target===c.wrapperEl&&(c.wrapperEl.removeEventListener("transitionend",E),!(A||G.detail&&G.detail.bySwiperTouchMove)&&J())}const D=()=>{if(c.destroyed||!c.autoplay.running)return;c.autoplay.paused?v=!0:v&&(f=m,v=!1);const G=c.autoplay.paused?m:g+f-new Date().getTime();c.autoplay.timeLeft=G,a("autoplayTimeLeft",G,G/d),l=requestAnimationFrame(()=>{D()})},F=()=>{let G;return c.virtual&&c.params.virtual.enabled?G=c.slides.find(mt=>mt.classList.contains("swiper-slide-active")):G=c.slides[c.activeIndex],G?parseInt(G.getAttribute("data-swiper-autoplay"),10):void 0},Y=()=>{let G=c.params.autoplay.delay;const M=F();return!Number.isNaN(M)&&M>0&&(G=M),G},$=G=>{if(c.destroyed||!c.autoplay.running)return;cancelAnimationFrame(l),D();let M=G;typeof M>"u"&&(M=Y(),d=M,f=M),m=M;const mt=c.params.speed,B=()=>{!c||c.destroyed||(c.params.autoplay.reverseDirection?!c.isBeginning||c.params.loop||c.params.rewind?(c.slidePrev(mt,!0,!0),a("autoplay")):c.params.autoplay.stopOnLastSlide||(c.slideTo(c.slides.length-1,mt,!0,!0),a("autoplay")):!c.isEnd||c.params.loop||c.params.rewind?(c.slideNext(mt,!0,!0),a("autoplay")):c.params.autoplay.stopOnLastSlide||(c.slideTo(0,mt,!0,!0),a("autoplay")),c.params.cssMode&&(g=new Date().getTime(),requestAnimationFrame(()=>{$()})))};return M>0?(clearTimeout(o),o=setTimeout(()=>{B()},M)):requestAnimationFrame(()=>{B()}),M},dt=()=>{g=new Date().getTime(),c.autoplay.running=!0,$(),a("autoplayStart")},it=()=>{c.autoplay.running=!1,clearTimeout(o),cancelAnimationFrame(l),a("autoplayStop")},Z=(G,M)=>{if(c.destroyed||!c.autoplay.running)return;clearTimeout(o),G||(T=!0);const mt=()=>{a("autoplayPause"),c.params.autoplay.waitForTransition?c.wrapperEl.addEventListener("transitionend",E):J()};if(c.autoplay.paused=!0,M){mt();return}m=(m||c.params.autoplay.delay)-(new Date().getTime()-g),!(c.isEnd&&m<0&&!c.params.loop)&&(m<0&&(m=0),mt())},J=()=>{c.isEnd&&m<0&&!c.params.loop||c.destroyed||!c.autoplay.running||(g=new Date().getTime(),T?(T=!1,$(m)):$(),c.autoplay.paused=!1,a("autoplayResume"))},nt=()=>{if(c.destroyed||!c.autoplay.running)return;const G=Ci();G.visibilityState==="hidden"&&(T=!0,Z(!0)),G.visibilityState==="visible"&&J()},K=G=>{G.pointerType==="mouse"&&(T=!0,A=!0,!(c.animating||c.autoplay.paused)&&Z(!0))},ht=G=>{G.pointerType==="mouse"&&(A=!1,c.autoplay.paused&&J())},ie=()=>{c.params.autoplay.pauseOnMouseEnter&&(c.el.addEventListener("pointerenter",K),c.el.addEventListener("pointerleave",ht))},yt=()=>{c.el&&typeof c.el!="string"&&(c.el.removeEventListener("pointerenter",K),c.el.removeEventListener("pointerleave",ht))},Ge=()=>{Ci().addEventListener("visibilitychange",nt)},ft=()=>{Ci().removeEventListener("visibilitychange",nt)};n("init",()=>{c.params.autoplay.enabled&&(ie(),Ge(),dt())}),n("destroy",()=>{yt(),ft(),c.autoplay.running&&it()}),n("_freeModeStaticRelease",()=>{(S||T)&&J()}),n("_freeModeNoMomentumRelease",()=>{c.params.autoplay.disableOnInteraction?it():Z(!0,!0)}),n("beforeTransitionStart",(G,M,mt)=>{c.destroyed||!c.autoplay.running||(mt||!c.params.autoplay.disableOnInteraction?Z(!0,!0):it())}),n("sliderFirstMove",()=>{if(!(c.destroyed||!c.autoplay.running)){if(c.params.autoplay.disableOnInteraction){it();return}y=!0,S=!1,T=!1,w=setTimeout(()=>{T=!0,S=!0,Z(!0)},200)}}),n("touchEnd",()=>{if(!(c.destroyed||!c.autoplay.running||!y)){if(clearTimeout(w),clearTimeout(o),c.params.autoplay.disableOnInteraction){S=!1,y=!1;return}S&&c.params.cssMode&&J(),S=!1,y=!1}}),n("slideChange",()=>{c.destroyed||!c.autoplay.running||c.autoplay.paused&&(m=Y(),d=Y())}),Object.assign(c.autoplay,{start:dt,stop:it,pause:Z,resume:J})}function Ko(){const c=document.querySelector('[data-swiper="infobar"]');
1if(!c)return;const i=document.querySelector('[data-swiper-nav-prev="infobar"]'),n=document.querySelector('[data-swiper-nav-next="infobar"]'),a=document.querySelector('[data-swiper-pag="infobar"]');new Ys(c,{modules:[en,on,sn,nn],loop:!0,speed:300,autoHeight:!0,watchOverflow:!0,A11y:{enable:!0},autoplay:Ho,navigation:{prevEl:i,nextEl:n,hiddenClass:Fo,lockClass:Si,disabledClass:Zo},pagination:{el:a,bulletClass:Js,bulletElement:"button",bulletActiveClass:Ks,clickable:!0},on:{afterInit:h=>Ro()}})}const Jo=function(){const c=document.querySelector('[data-swiper="dialog-banner"]');if(!c)return;const i=document.querySelector('[data-swiper-nav-prev="dialog-banner"]'),n=document.querySelector('[data-swiper-nav-next="dialog-banner"]'),a=document.querySelector('[data-swiper-pag="dialog-banner"]');new Ys(c,{modules:[en,on,sn,nn],loop:!0,speed:300,slidesPerView:1,spaceBetween:0,autoHeight:!0,a11y:{enabled:!0},navigation:{prevEl:i,nextEl:n,lockClass:Si},pagination:{el:a,bulletClass:Js,bulletElement:"li",bulletActiveClass:Ks,clickable:!0,lockClass:Si}})},Qo=()=>{document.querySelectorAll("[data-banner-close]").forEach(i=>{i.addEventListener("click",n=>{const a=i.dataset.bannerClose;fetch(a,{method:"PATCH"})})})};function tr(){document.querySelectorAll("[data-banner-wrapper]").forEach(i=>{const n=i.querySelector("[data-infobar-close]");n&&(n.onclick=a=>{if(!i.hasAttribute("data-action")){i.style.display="none";return}fetch(i.getAttribute("data-action"),{method:"POST",headers:{"X-Requested-With":"XMLHttpRequest"}}).then(function(h){i.style.display="none"}).catch(h=>{console.error(h)}),a.preventDefault()})})}function er(){if(!window.File||!window.FileList||!window.FileReader)return;const c=document.querySelector('[data-dropzone="wrapper"]');if(!c)return;const i=c.parentNode.querySelector('[data-dropzone="template"]'),n=c.querySelector('[data-dropzone="input"]'),a=c.querySelector('[data-dropzone="body"]'),h=c.querySelector('[data-dropzone="list"]');n.addEventListener("change",()=>{rn(n,h,i,a)})}function rn(c,i,n,a){const h=Array.from(c.files);for(;i.hasChildNodes();)i.removeChild(i.lastChild);if(!h.length){a.classList.add("d-none");return}const o=/(?:(.+)\.([^.]+))?$/;h.forEach(l=>{const d=n.content.cloneNode(!0),f=ir(l),m=o.exec(l.name)[1]||l.name,g=o.exec(l.name)[2]||"",v=sr(l.size),y=g?`${g.toUpperCase()}, ${v}`:v,S=d.querySelector('[data-dropzone="icon"]');S.setAttribute("href",S.getAttribute("href")+f),d.querySelector('[data-dropzone="name"]').textContent=m,d.querySelector('[data-dropzone="info"]').textContent=y;const w=d.querySelector('[data-dropzone="remove"]');w.onclick=T=>{T.preventDefault();const A=T.target.closest('[data-dropzone="item"]'),E=[...i.querySelectorAll('[data-dropzone="item"]')].indexOf(A),D=new DataTransfer;for(let F=0;F<c.files.length;F++){const Y=c.files[F];E!==F&&D.items.add(Y)}c.files=D.files,rn(c,i,n,a)},i.append(d)}),a.classList.remove("d-none")}function ir(c){return c.type.includes("image")?"file-image":c.type.includes("application/pdf")||c.type.includes("msword")||c.type.includes("officedocument")?"file-text":c.type.includes("text/plain")?"file":c.type.includes("opendocument")?"file-text":c.type.includes("application/zip")?"file-archive":"file"}function sr(c){const i=["b","kb","mb","gb"];let n=0;for(n;c>1024;n++)c/=1024;return`${c.toFixed(0)} ${i[n]}`.trim()}var ye={exports:{}};/* @preserve 2 * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com 3 * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade 4 */var nr=ye.exports,Vs;function or(){return Vs||(Vs=1,(function(c,i){(function(n,a){a(i)})(nr,(function(n){var a="1.9.4";function h(t){var e,s,r,u;for(s=1,r=arguments.length;s<r;s++){u=arguments[s];for(e in u)t[e]=u[e]}return t}var o=Object.create||(function(){function t(){}return function(e){return t.prototype=e,new t}})();function l(t,e){var s=Array.prototype.slice;if(t.bind)return t.bind.apply(t,s.call(arguments,1));var r=s.call(arguments,2);return function(){return t.apply(e,r.length?r.concat(s.call(arguments)):arguments)}}var d=0;function f(t){return"_leaflet_id"in t||(t._leaflet_id=++d),t._leaflet_id}function m(t,e,s){var r,u,p,_;return _=function(){r=!1,u&&(p.apply(s,u),u=!1)},p=function(){r?u=arguments:(t.apply(s,arguments),setTimeout(_,e),r=!0)},p}function g(t,e,s){var r=e[1],u=e[0],p=r-u;return t===r&&s?t:((t-u)%p+p)%p+u}function v(){return!1}function y(t,e){if(e===!1)return t;var s=Math.pow(10,e===void 0?6:e);return Math.round(t*s)/s}function S(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function w(t){return S(t).split(/\s+/)}function T(t,e){Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?o(t.options):{});for(var s in e)t.options[s]=e[s];return t.options}function A(t,e,s){var r=[];for(var u in t)r.push(encodeURIComponent(s?u.toUpperCase():u)+"="+encodeURIComponent(t[u]));return(!e||e.indexOf("?")===-1?"?":"&")+r.join("&")}var E=/\{ *([\w_ -]+) *\}/g;function D(t,e){return t.replace(E,function(s,r){var u=e[r];if(u===void 0)throw new Error("No value provided for variable "+s);return typeof u=="function"&&(u=u(e)),u})}var F=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function Y(t,e){for(var s=0;s<t.length;s++)if(t[s]===e)return s;return-1}var $="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function dt(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var it=0;function Z(t){var e=+new Date,s=Math.max(0,16-(e-it));return it=e+s,window.setTimeout(t,s)}var J=window.requestAnimationFrame||dt("RequestAnimationFrame")||Z,nt=window.cancelAnimationFrame||dt("CancelAnimationFrame")||dt("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function K(t,e,s){if(s&&J===Z)t.call(e);else return J.call(window,l(t,e))}function ht(t){t&&nt.call(window,t)}var ie={__proto__:null,extend:h,create:o,bind:l,get lastId(){return d},stamp:f,throttle:m,wrapNum:g,falseFn:v,formatNum:y,trim:S,splitWords:w,setOptions:T,getParamString:A,template:D,isArray:F,indexOf:Y,emptyImageUrl:$,requestFn:J,cancelFn:nt,requestAnimFrame:K,cancelAnimFrame:ht};function yt(){}yt.extend=function(t){var e=function(){T(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},s=e.__super__=this.prototype,r=o(s);r.constructor=e,e.prototype=r;for(var u in this)Object.prototype.hasOwnProperty.call(this,u)&&u!=="prototype"&&u!=="__super__"&&(e[u]=this[u]);return t.statics&&h(e,t.statics),t.includes&&(Ge(t.includes),h.apply(null,[r].concat(t.includes))),h(r,t),delete r.statics,delete r.includes,r.options&&(r.options=s.options?o(s.options):{},h(r.options,t.options)),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){s.callInitHooks&&s.callInitHooks.call(this),this._initHooksCalled=!0;for(var p=0,_=r._initHooks.length;p<_;p++)r._initHooks[p].call(this)}},e},yt.include=function(t){var e=this.prototype.options;return h(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},yt.mergeOptions=function(t){return h(this.prototype.options,t),this},yt.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1
4),s=typeof t=="function"?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(s),this};function Ge(t){if(!(typeof L>"u"||!L||!L.Mixin)){t=F(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var ft={on:function(t,e,s){if(typeof t=="object")for(var r in t)this._on(r,t[r],e);else{t=w(t);for(var u=0,p=t.length;u<p;u++)this._on(t[u],e,s)}return this},off:function(t,e,s){if(!arguments.length)delete this._events;else if(typeof t=="object")for(var r in t)this._off(r,t[r],e);else{t=w(t);for(var u=arguments.length===1,p=0,_=t.length;p<_;p++)u?this._off(t[p]):this._off(t[p],e,s)}return this},_on:function(t,e,s,r){if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}if(this._listens(t,e,s)===!1){s===this&&(s=void 0);var u={fn:e,ctx:s};r&&(u.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(u)}},_off:function(t,e,s){var r,u,p;if(this._events&&(r=this._events[t],!!r)){if(arguments.length===1){if(this._firingCount)for(u=0,p=r.length;u<p;u++)r[u].fn=v;delete this._events[t];return}if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}var _=this._listens(t,e,s);if(_!==!1){var b=r[_];this._firingCount&&(b.fn=v,this._events[t]=r=r.slice()),r.splice(_,1)}}},fire:function(t,e,s){if(!this.listens(t,s))return this;var r=h({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var u=this._events[t];if(u){this._firingCount=this._firingCount+1||1;for(var p=0,_=u.length;p<_;p++){var b=u[p],C=b.fn;b.once&&this.off(t,C,b.ctx),C.call(b.ctx||this,r)}this._firingCount--}}return s&&this._propagateEvent(r),this},listens:function(t,e,s,r){typeof t!="string"&&console.warn('"string" type argument expected');var u=e;typeof e!="function"&&(r=!!e,u=void 0,s=void 0);var p=this._events&&this._events[t];if(p&&p.length&&this._listens(t,u,s)!==!1)return!0;if(r){for(var _ in this._eventParents)if(this._eventParents[_].listens(t,e,s,r))return!0}return!1},_listens:function(t,e,s){if(!this._events)return!1;var r=this._events[t]||[];if(!e)return!!r.length;s===this&&(s=void 0);for(var u=0,p=r.length;u<p;u++)if(r[u].fn===e&&r[u].ctx===s)return u;return!1},once:function(t,e,s){if(typeof t=="object")for(var r in t)this._on(r,t[r],e,!0);else{t=w(t);for(var u=0,p=t.length;u<p;u++)this._on(t[u],e,s,!0)}return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[f(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[f(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,h({layer:t.target,propagatedFrom:t.target},t),!0)}};ft.addEventListener=ft.on,ft.removeEventListener=ft.clearAllEventListeners=ft.off,ft.addOneTimeEventListener=ft.once,ft.fireEvent=ft.fire,ft.hasEventListeners=ft.listens;var G=yt.extend(ft);function M(t,e,s){this.x=s?Math.round(t):t,this.y=s?Math.round(e):e}var mt=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};M.prototype={clone:function(){return new M(this.x,this.y)},add:function(t){return this.clone()._add(B(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(B(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new M(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new M(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=mt(this.x),this.y=mt(this.y),this},distanceTo:function(t){t=B(t);var e=t.x-this.x,s=t.y-this.y;return Math.sqrt(e*e+s*s)},equals:function(t){return t=B(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=B(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+y(this.x)+", "+y(this.y)+")"}};function B(t,e,s){return t instanceof M?t:F(t)?new M(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new M(t.x,t.y):new M(t,e,s)}function Q(t,e){if(t)for(var s=e?[t,e]:t,r=0,u=s.length;r<u;r++)this.extend(s[r])}Q.prototype={extend:function(t){var e,s;if(!t)return this;if(t instanceof M||typeof t[0]=="number"||"x"in t)e=s=B(t);else if(t=gt(t),e=t.min,s=t.max,!e||!s)return this;return!this.min&&!this.max?(this.min=e.clone(),this.max=s.clone()):(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(s.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(s.y,this.max.y)),this},getCenter:function(t){return B((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return B(this.min.x,this.max.y)},getTopRight:function(){return B(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,s;return typeof t[0]=="number"||t instanceof M?t=B(t):t=gt(t),t instanceof Q?(e=t.min,s=t.max):e=s=t,e.x>=this.min.x&&s.x<=this.max.x&&e.y>=this.min.y&&s.y<=this.max.y},intersects:function(t){t=gt(t);var e=this.min,s=this.max,r=t.min,u=t.max,p=u.x>=e.x&&r.x<=s.x,_=u.y>=e.y&&r.y<=s.y;return p&&_},overlaps:function(t){t=gt(t);var e=this.min,s=this.max,r=t.min,u=t.max,p=u.x>e.x&&r.x<s.x,_=u.y>e.y&&r.y<s.y;return p&&_},isValid:function(){return!!(this.min&&this.max)},pad:function(t){var e=this.min,s=this.max,r=Math.abs(e.x-s.x)*t,u=Math.abs(e.y-s.y)*t;return gt(B(e.x-r,e.y-u),B(s.x+r,s.y+u))},equals:function(t){return t?(t=gt(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight())):!1}};function gt(t,e){return!t||t instanceof Q?t:new Q(t,e)}function _t(t,e){if(t)for(var s=e?[t,e]:t,r=0,u=s.length;r<u;r++)this.extend(s[r])}_t.prototype={extend:function(t){var e=this._southWest,s=this._northEast,r,u;if(t instanceof U)r=t,u=t;else if(t instanceof _t){if(r=t._southWest,u=t._northEast,!r||!u)return this}else return t?this.extend(V(t)||ot(t)):this;return!e&&!s?(this._southWest=new U(r.lat,r.lng),this._northEast=new U(u.lat,u.lng)):(e.lat=Math.min(r.lat,e.lat),e.lng=Math.min(r.lng,e.lng),s.lat=Math.max(u.lat,s.lat),s.lng=Math.max(u.lng,s.lng)),this},pad:function(t){var e=this._southWest,s=this._northEast,r=Math.abs(e.lat-s.lat)*t,u=Math.abs(e.lng-s.lng)*t;return new _t(new U(e.lat-r,e.lng-u),new U(s.lat+r,s.lng+u))},getCenter:function(){return new U((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 U(this.getNorth(),this.getWest())},getSouthEast:function(){return new U(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat}
4,getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){typeof t[0]=="number"||t instanceof U||"lat"in t?t=V(t):t=ot(t);var e=this._southWest,s=this._northEast,r,u;return t instanceof _t?(r=t.getSouthWest(),u=t.getNorthEast()):r=u=t,r.lat>=e.lat&&u.lat<=s.lat&&r.lng>=e.lng&&u.lng<=s.lng},intersects:function(t){t=ot(t);var e=this._southWest,s=this._northEast,r=t.getSouthWest(),u=t.getNorthEast(),p=u.lat>=e.lat&&r.lat<=s.lat,_=u.lng>=e.lng&&r.lng<=s.lng;return p&&_},overlaps:function(t){t=ot(t);var e=this._southWest,s=this._northEast,r=t.getSouthWest(),u=t.getNorthEast(),p=u.lat>e.lat&&r.lat<s.lat,_=u.lng>e.lng&&r.lng<s.lng;return p&&_},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return t?(t=ot(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function ot(t,e){return t instanceof _t?t:new _t(t,e)}function U(t,e,s){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,s!==void 0&&(this.alt=+s)}U.prototype={equals:function(t,e){if(!t)return!1;t=V(t);var s=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return s<=(e===void 0?1e-9:e)},toString:function(t){return"LatLng("+y(this.lat,t)+", "+y(this.lng,t)+")"},distanceTo:function(t){return Dt.distance(this,V(t))},wrap:function(){return Dt.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,s=e/Math.cos(Math.PI/180*this.lat);return ot([this.lat-e,this.lng-s],[this.lat+e,this.lng+s])},clone:function(){return new U(this.lat,this.lng,this.alt)}};function V(t,e,s){return t instanceof U?t:F(t)&&typeof t[0]!="object"?t.length===3?new U(t[0],t[1],t[2]):t.length===2?new U(t[0],t[1]):null:t==null?t:typeof t=="object"&&"lat"in t?new U(t.lat,"lng"in t?t.lng:t.lon,t.alt):e===void 0?null:new U(t,e,s)}var kt={latLngToPoint:function(t,e){var s=this.projection.project(t),r=this.scale(e);return this.transformation._transform(s,r)},pointToLatLng:function(t,e){var s=this.scale(e),r=this.transformation.untransform(t,s);return this.projection.unproject(r)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,s=this.scale(t),r=this.transformation.transform(e.min,s),u=this.transformation.transform(e.max,s);return new Q(r,u)},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?g(t.lng,this.wrapLng,!0):t.lng,s=this.wrapLat?g(t.lat,this.wrapLat,!0):t.lat,r=t.alt;return new U(s,e,r)},wrapLatLngBounds:function(t){var e=t.getCenter(),s=this.wrapLatLng(e),r=e.lat-s.lat,u=e.lng-s.lng;if(r===0&&u===0)return t;
4var p=t.getSouthWest(),_=t.getNorthEast(),b=new U(p.lat-r,p.lng-u),C=new U(_.lat-r,_.lng-u);return new _t(b,C)}},Dt=h({},kt,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var s=Math.PI/180,r=t.lat*s,u=e.lat*s,p=Math.sin((e.lat-t.lat)*s/2),_=Math.sin((e.lng-t.lng)*s/2),b=p*p+Math.cos(r)*Math.cos(u)*_*_,C=2*Math.atan2(Math.sqrt(b),Math.sqrt(1-b));return this.R*C}}),Mi=6378137,Ve={R:Mi,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,s=this.MAX_LATITUDE,r=Math.max(Math.min(s,t.lat),-s),u=Math.sin(r*e);return new M(this.R*t.lng*e,this.R*Math.log((1+u)/(1-u))/2)},unproject:function(t){var e=180/Math.PI;return new U((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(function(){var t=Mi*Math.PI;return new Q([-t,-t],[t,t])})()};function We(t,e,s,r){if(F(t)){this._a=t[0],this._b=t[1],this._c=t[2],this._d=t[3];return}this._a=t,this._b=e,this._c=s,this._d=r}We.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new M((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};function se(t,e,s,r){return new We(t,e,s,r)}var qe=h({},Dt,{code:"EPSG:3857",projection:Ve,transformation:(function(){var t=.5/(Math.PI*Ve.R);return se(t,.5,-t,.5)})()}),un=h({},qe,{code:"EPSG:900913"});function ki(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Ii(t,e){var s="",r,u,p,_,b,C;for(r=0,p=t.length;r<p;r++){for(b=t[r],u=0,_=b.length;u<_;u++)C=b[u],s+=(u?"L":"M")+C.x+" "+C.y;s+=e?k.svg?"z":"x":""}return s||"M0 0"}var Ue=document.documentElement.style,Le="ActiveXObject"in window,cn=Le&&!document.addEventListener,Ai="msLaunchUri"in navigator&&!("documentMode"in document),je=Pt("webkit"),zi=Pt("android"),Bi=Pt("android 2")||Pt("android 3"),dn=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),fn=zi&&Pt("Google")&&dn<537&&!("AudioNode"in window),$e=!!window.opera,Di=!Ai&&Pt("chrome"),Ni=Pt("gecko")&&!je&&!$e&&!Le,pn=!Di&&Pt("safari"),Zi=Pt("phantom"),Fi="OTransition"in Ue,mn=navigator.platform.indexOf("Win")===0,Hi=Le&&"transition"in Ue,Xe="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Bi,Ri="MozPerspective"in Ue,gn=!window.L_DISABLE_3D&&(Hi||Xe||Ri)&&!Fi&&!Zi,ne=typeof orientation<"u"||Pt("mobile"),_n=ne&&je,vn=ne&&Xe,Gi=!window.PointerEvent&&window.MSPointerEvent,Vi=!!(window.PointerEvent||Gi),Wi="ontouchstart"in window||!!window.TouchEvent,yn=!window.L_NO_TOUCH&&(Wi||Vi),bn=ne&&$e,Ln=ne&&Ni,wn=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Cn=(function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",v,e),window.removeEventListener("testPassiveEventSupport",v,e)}catch{}return t})(),xn=(function(){return!!document.createElement("canvas").getContext})(),Ye=!!(document.createElementNS&&ki("svg").createSVGRect),Sn=!!Ye&&(function(){var t=document.createElement("div");return t.innerHTML="<svg/>",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),Tn=!Ye&&(function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&typeof e.adj=="object"}catch{return!1}})(),Pn=navigator.platform.indexOf("Mac")===0,En=navigator.platform.indexOf("Linux")===0;function Pt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var k={ie:Le,ielt9:cn,edge:Ai,webkit:je,android:zi,android23:Bi,androidStock:fn,opera:$e,chrome:Di,gecko:Ni,safari:pn,phantom:Zi,opera12:Fi,win:mn,ie3d:Hi,webkit3d:Xe,gecko3d:Ri,any3d:gn,mobile:ne,mobileWebkit:_n,mobileWebkit3d:vn,msPointer:Gi,pointer:Vi,touch:yn,touchNative:Wi,mobileOpera:bn,mobileGecko:Ln,retina:wn,passiveEvents:Cn,canvas:xn,svg:Ye,vml:Tn,inlineSvg:Sn,mac:Pn,linux:En},qi=k.msPointer?"MSPointerDown":"pointerdown",Ui=k.msPointer?"MSPointerMove":"pointermove",ji=k.msPointer?"MSPointerUp":"pointerup",$i=k.msPointer?"MSPointerCancel":"pointercancel",Ke={touchstart:qi,touchmove:Ui,touchend:ji,touchcancel:$i},Xi={touchstart:zn,touchmove:we,touchend:we,touchcancel:we},jt={},Yi=!1;function On(t,e,s){return e==="touchstart"&&An(),Xi[e]?(s=Xi[e].bind(this,s),t.addEventListener(Ke[e],s,!1),s):(console.warn("wrong event specified:",e),v)}function Mn(t,e,s){if(!Ke[e]){console.warn("wrong event specified:",e);return}t.removeEventListener(Ke[e],s,!1)}function kn(t){jt[t.pointerId]=t}function In(t){jt[t.pointerId]&&(jt[t.pointerId]=t)}function Ki(t){delete jt[t.pointerId]}function An(){Yi||(document.addEventListener(qi,kn,!0),document.addEventListener(Ui,In,!0),document.addEventListener(ji,Ki,!0),document.addEventListener($i,Ki,!0),Yi=!0)}function we(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){e.touches=[];for(var s in jt)e.touches.push(jt[s]);e.changedTouches=[e],t(e)}}function zn(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&ct(e),we(t,e)}function Bn(t){var e={},s,r;for(r in t)s=t[r],e[r]=s&&s.bind?s.bind(t):s;return t=e,e.type="dblclick",e.detail=2,e.isTrusted=!1,e._simulated=!0,e}var Dn=200;function Nn(t,e){t.addEventListener("dblclick",e);var s=0,r;function u(p){if(p.detail!==1){r=p.detail;return}if(!(p.pointerType==="mouse"||p.sourceCapabilities&&!p.sourceCapabilities.firesTouchEvents)){var _=is(p);if(!(_.some(function(C){return C instanceof HTMLLabelElement&&C.attributes.for})&&!_.some(function(C){return C instanceof HTMLInputElement||C instanceof HTMLSelectElement}))){var b=Date.now();b-s<=Dn?(r++,r===2&&e(Bn(p))):r=1,s=b}}}return t.addEventListener("click",u),{dblclick:e,simDblclick:u}}function Zn(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var Je=Se(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),oe=Se(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Ji=oe==="webkitTransition"||oe==="OTransition"?oe+"End":"transitionend";function Qi(t){return typeof t=="string"?document.getElementById(t):t}function re(t,e){var s=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!s||s==="auto")&&document.defaultView){var r=document.defaultView.getComputedStyle(t,null);s=r?r[e]:null}return s==="auto"?null:s}function q(t,e,s){var r=document.createElement(t);return r.className=e||"",s&&s.appendChild(r),r}function tt(t){var e=t.parentNode;e&&e.removeChild(t)}function Ce(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function $t(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function Xt(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function Qe(t,e){if(t.classList!==void 0)return t.classList.contains(e);var s=xe(t);return s.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(s)}function H(t,e){if(t.classList!==void 0)for(var s=w(e),r=0,u=s.length;r<u;r++)t.classList.add(s[r]);else if(!Qe(t,e)){var p=xe(t);ti(t,(p?p+" ":"")+e)}}function st(t,e){t.classList!==void 0?t.classList.remove(e):ti(t,S((" "+
4xe(t)+" ").replace(" "+e+" "," ")))}function ti(t,e){t.className.baseVal===void 0?t.className=e:t.className.baseVal=e}function xe(t){return t.correspondingElement&&(t=t.correspondingElement),t.className.baseVal===void 0?t.className:t.className.baseVal}function bt(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&Fn(t,e)}function Fn(t,e){var s=!1,r="DXImageTransform.Microsoft.Alpha";try{s=t.filters.item(r)}catch{if(e===1)return}e=Math.round(e*100),s?(s.Enabled=e!==100,s.Opacity=e):t.style.filter+=" progid:"+r+"(opacity="+e+")"}function Se(t){for(var e=document.documentElement.style,s=0;s<t.length;s++)if(t[s]in e)return t[s];return!1}function Ht(t,e,s){var r=e||new M(0,0);t.style[Je]=(k.ie3d?"translate("+r.x+"px,"+r.y+"px)":"translate3d("+r.x+"px,"+r.y+"px,0)")+(s?" scale("+s+")":"")}function rt(t,e){t._leaflet_pos=e,k.any3d?Ht(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Rt(t){return t._leaflet_pos||new M(0,0)}var ae,le,ei;if("onselectstart"in document)ae=function(){N(window,"selectstart",ct)},le=function(){j(window,"selectstart",ct)};else{var he=Se(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ae=function(){if(he){var t=document.documentElement.style;ei=t[he],t[he]="none"}},le=function(){he&&(document.documentElement.style[he]=ei,ei=void 0)}}function ii(){N(window,"dragstart",ct)}function si(){j(window,"dragstart",ct)}var Te,ni;function oi(t){for(;t.tabIndex===-1;)t=t.parentNode;t.style&&(Pe(),Te=t,ni=t.style.outlineStyle,t.style.outlineStyle="none",N(window,"keydown",Pe))}function Pe(){Te&&(Te.style.outlineStyle=ni,Te=void 0,ni=void 0,j(window,"keydown",Pe))}function ts(t){do t=t.parentNode;while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function ri(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Hn={__proto__:null,TRANSFORM:Je,TRANSITION:oe,TRANSITION_END:Ji,get:Qi,getStyle:re,create:q,remove:tt,empty:Ce,toFront:$t,toBack:Xt,hasClass:Qe,addClass:H,removeClass:st,setClass:ti,getClass:xe,setOpacity:bt,testProp:Se,setTransform:Ht,setPosition:rt,getPosition:Rt,get disableTextSelection(){return ae},get enableTextSelection(){return le},disableImageDrag:ii,enableImageDrag:si,preventOutline:oi,restoreOutline:Pe,getSizedParentNode:ts,getScale:ri};function N(t,e,s,r){if(e&&typeof e=="object")for(var u in e)li(t,u,e[u],s);else{e=w(e);for(var p=0,_=e.length;p<_;p++)li(t,e[p],s,r)}return this}var Et="_leaflet_events";function j(t,e,s,r){if(arguments.length===1)es(t),delete t[Et];else if(e&&typeof e=="object")for(var u in e)hi(t,u,e[u],s);else if(e=w(e),arguments.length===2)es(t,function(b){return Y(e,b)!==-1});else for(var p=0,_=e.length;p<_;p++)hi(t,e[p],s,r);return this}function es(t,e){for(var s in t[Et]){var r=s.split(/\d/)[0];(!e||e(r))&&hi(t,r,null,null,s)}}
4var ai={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function li(t,e,s,r){var u=e+f(s)+(r?"_"+f(r):"");if(t[Et]&&t[Et][u])return this;var p=function(b){return s.call(r||t,b||window.event)},_=p;!k.touchNative&&k.pointer&&e.indexOf("touch")===0?p=On(t,e,p):k.touch&&e==="dblclick"?p=Nn(t,p):"addEventListener"in t?e==="touchstart"||e==="touchmove"||e==="wheel"||e==="mousewheel"?t.addEventListener(ai[e]||e,p,k.passiveEvents?{passive:!1}:!1):e==="mouseenter"||e==="mouseleave"?(p=function(b){b=b||window.event,ci(t,b)&&_(b)},t.addEventListener(ai[e],p,!1)):t.addEventListener(e,_,!1):t.attachEvent("on"+e,p),t[Et]=t[Et]||{},t[Et][u]=p}function hi(t,e,s,r,u){u=u||e+f(s)+(r?"_"+f(r):"");var p=t[Et]&&t[Et][u];if(!p)return this;!k.touchNative&&k.pointer&&e.indexOf("touch")===0?Mn(t,e,p):k.touch&&e==="dblclick"?Zn(t,p):"removeEventListener"in t?t.removeEventListener(ai[e]||e,p,!1):t.detachEvent("on"+e,p),t[Et][u]=null}function Gt(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function ui(t){return li(t,"wheel",Gt),this}function ue(t){return N(t,"mousedown touchstart dblclick contextmenu",Gt),t._leaflet_disable_click=!0,this}function ct(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Vt(t){return ct(t),Gt(t),this}function is(t){if(t.composedPath)return t.composedPath();for(var e=[],s=t.target;s;)e.push(s),s=s.parentNode;return e}function ss(t,e){if(!e)return new M(t.clientX,t.clientY);var s=ri(e),r=s.boundingClientRect;return new M((t.clientX-r.left)/s.x-e.clientLeft,(t.clientY-r.top)/s.y-e.clientTop)}var Rn=k.linux&&k.chrome?window.devicePixelRatio:k.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function ns(t){return k.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/Rn:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function ci(t,e){var s=e.relatedTarget;if(!s)return!0;try{for(;s&&s!==t;)s=s.parentNode}catch{return!1}return s!==t}var Gn={__proto__:null,on:N,off:j,stopPropagation:Gt,disableScrollPropagation:ui,disableClickPropagation:ue,preventDefault:ct,stop:Vt,getPropagationPath:is,getMousePosition:ss,getWheelDelta:ns,isExternalTarget:ci,addListener:N,removeListener:j},os=G.extend({run:function(t,e,s,r){this.stop(),this._el=t,this._inProgress=!0,this._duration=s||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=Rt(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=K(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,s=this._duration*1e3;e<s?this._runFrame(this._easeOut(e/s),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var s=this._startPos.add(this._offset.multiplyBy(t));e&&s._round(),rt(this._el,s),this.fire("step")},_complete:function(){ht(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),W=G.extend({options:{crs:qe,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=T(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=l(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.zoom!==void 0&&(this._zoom=this._limitZoom(e.zoom)),e.center&&e.zoom!==void 0&&this.setView(V(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=oe&&k.any3d&&!k.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),N(this._proxy,Ji,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)}
4,setView:function(t,e,s){if(e=e===void 0?this._zoom:this._limitZoom(e),t=this._limitCenter(V(t),e,this.options.maxBounds),s=s||{},this._stop(),this._loaded&&!s.reset&&s!==!0){s.animate!==void 0&&(s.zoom=h({animate:s.animate},s.zoom),s.pan=h({animate:s.animate,duration:s.duration},s.pan));var r=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,s.zoom):this._tryAnimatedPan(t,s.pan);if(r)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e,s.pan&&s.pan.noMoveStart),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(k.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(k.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,s){var r=this.getZoomScale(e),u=this.getSize().divideBy(2),p=t instanceof M?t:this.latLngToContainerPoint(t),_=p.subtract(u).multiplyBy(1-1/r),b=this.containerPointToLatLng(u.add(_));return this.setView(b,e,{zoom:s})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():ot(t);var s=B(e.paddingTopLeft||e.padding||[0,0]),r=B(e.paddingBottomRight||e.padding||[0,0]),u=this.getBoundsZoom(t,!1,s.add(r));if(u=typeof e.maxZoom=="number"?Math.min(e.maxZoom,u):u,u===1/0)return{center:t.getCenter(),zoom:u};
4var p=r.subtract(s).divideBy(2),_=this.project(t.getSouthWest(),u),b=this.project(t.getNorthEast(),u),C=this.unproject(_.add(b).divideBy(2).add(p),u);return{center:C,zoom:u}},fitBounds:function(t,e){if(t=ot(t),!t.isValid())throw new Error("Bounds are not valid.");var s=this._getBoundsCenterZoom(t,e);return this.setView(s.center,s.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=B(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(e.animate!==!0&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new os,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){H(this._mapPane,"leaflet-pan-anim");var s=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,s,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,s){if(s=s||{},s.animate===!1||!k.any3d)return this.setView(t,e,s);this._stop();var r=this.project(this.getCenter()),u=this.project(t),p=this.getSize(),_=this._zoom;t=V(t),e=e===void 0?_:e;var b=Math.max(p.x,p.y),C=b*this.getZoomScale(_,e),P=u.distanceTo(r)||1,O=1.42,z=O*O;function R(at){var Fe=at?-1:1,ko=at?C:b,Io=C*C-b*b+Fe*z*z*P*P,Ao=2*ko*z*P,wi=Io/Ao,Fs=Math.sqrt(wi*wi+1)-wi,zo=Fs<1e-9?-18:Math.log(Fs);return zo}function pt(at){return(Math.exp(at)-Math.exp(-at))/2}function ut(at){return(Math.exp(at)+Math.exp(-at))/2}function wt(at){return pt(at)/ut(at)}var vt=R(0);function ee(at){return b*(ut(vt)/ut(vt+O*at))}function Po(at){return b*(ut(vt)*wt(vt+O*at)-pt(vt))/z}function Eo(at){return 1-Math.pow(1-at,1.5)}var Oo=Date.now(),Ns=(R(1)-vt)/O,Mo=s.duration?1e3*s.duration:1e3*Ns*.8;function Zs(){var at=(Date.now()-Oo)/Mo,Fe=Eo(at)*Ns;at<=1?(this._flyToFrame=K(Zs,this),this._move(this.unproject(r.add(u.subtract(r).multiplyBy(Po(Fe)/P)),_),this.getScaleZoom(b/ee(Fe),_),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,s.noMoveStart),Zs.call(this),this},flyToBounds:function(t,e){var s=this._getBoundsCenterZoom(t,e);return this.flyTo(s.center,s.zoom,e)},setMaxBounds:function(t){return t=ot(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var s=this.getCenter(),r=this._limitCenter(s,this._zoom,ot(t));return s.equals(r)||this.panTo(r,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var s=B(e.paddingTopLeft||e.padding||[0,0]),r=B(e.paddingBottomRight||e.padding||[0,0]),u=this.project(this.getCenter()),p=this.project(t),_=this.getPixelBounds(),b=gt([_.min.add(s),_.max.subtract(r)]),C=b.getSize();if(!b.contains(p)){this._enforcingBounds=!0;var P=p.subtract(b.getCenter()),O=b.extend(p).getSize().subtract(C);u.x+=P.x<0?-O.x:O.x,u.y+=P.y<0?-O.y:O.y,this.panTo(this.unproject(u),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=h({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var s=this.getSize(),r=e.divideBy(2).round(),u=s.divideBy(2).round(),p=r.subtract(u);return!p.x&&!p.y?this:(t.animate&&t.pan?this.panBy(p):(t.pan&&this._rawPanBy(p),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(l(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:s}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=h({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=l(this._handleGeolocationResponse,this),s=l(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,s,t):navigator.geolocation.getCurrentPosition(e,s,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,s=t.message||(e===1?"permission denied":e===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+s+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=t.coords.latitude,s=t.coords.longitude,r=new U(e,s),u=r.toBounds(t.coords.accuracy*2),p=this._locateOptions;
4if(p.setView){var _=this.getBoundsZoom(u);this.setView(r,p.maxZoom?Math.min(_,p.maxZoom):_)}var b={latlng:r,bounds:u,timestamp:t.timestamp};for(var C in t.coords)typeof t.coords[C]=="number"&&(b[C]=t.coords[C]);this.fire("locationfound",b)}},addHandler:function(t,e){if(!e)return this;var s=this[t]=new e(this);return this._handlers.push(s),this.options[t]&&s.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(),tt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(ht(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)tt(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var s="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),r=q("div",s,e||this._mapPane);return t&&(this._panes[t]=r),r},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),s=this.unproject(t.getTopRight());return new _t(e,s)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,s){t=ot(t),s=B(s||[0,0]);var r=this.getZoom()||0,u=this.getMinZoom(),p=this.getMaxZoom(),_=t.getNorthWest(),b=t.getSouthEast(),C=this.getSize().subtract(s),P=gt(this.project(b,r),this.project(_,r)).getSize(),O=k.any3d?this.options.zoomSnap:1,z=C.x/P.x,R=C.y/P.y,pt=e?Math.max(z,R):Math.min(z,R);return r=this.getScaleZoom(pt,r),O&&(r=Math.round(r/(O/100))*(O/100),r=e?Math.ceil(r/O)*O:Math.floor(r/O)*O),Math.max(u,Math.min(p,r))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new M(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var s=this._getTopLeftPoint(t,e);return new Q(s,s.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var s=this.options.crs;return e=e===void 0?this._zoom:e,s.scale(t)/s.scale(e)},getScaleZoom:function(t,e){var s=this.options.crs;e=e===void 0?this._zoom:e;var r=s.zoom(t*s.scale(e));return isNaN(r)?1/0:r},project:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.latLngToPoint(V(t),e)},unproject:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.pointToLatLng(B(t),e)},layerPointToLatLng:function(t){var e=B(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(V(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(V(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(ot(t))},distance:function(t,e){return this.options.crs.distance(V(t),V(e))},containerPointToLayerPoint:function(t){return B(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return B(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(B(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(V(t)))},mouseEventToContainerPoint:function(t){return ss(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=Qi(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");N(e,"scroll",this._onScroll,this),this._containerId=f(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&k.any3d,H(t,"leaflet-container"+(k.touch?" leaflet-touch":"")+(k.retina?" leaflet-retina":"")+(k.ielt9?" leaflet-oldie":"")+(k.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=re(t,"position");e!=="absolute"&&e!=="relative"&&e!=="fixed"&&e!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),rt(this._mapPane,new M(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(H(t.markerPane,"leaflet-zoom-hide"),H(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,s){rt(this._mapPane,new M(0,0));var r=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var u=this._zoom!==e;this._moveStart(u,s)._move(t,e)._moveEnd(u),this.fire("viewreset"),r&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,s,r){e===void 0&&(e=this._zoom);var u=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),r?s&&s.pinch&&this.fire("zoom",s):((u||s&&s.pinch)&&this.fire("zoom",s),this.fire("move",s)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return ht(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){rt(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[f(this._container)]=this;var e=t?j:N;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),k.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){ht(this._resizeRequest),this._resizeRequest=K(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var s=[],r,u=e==="mouseout"||e==="mouseover",p=t.target||t.srcElement,_=!1;p;){if(r=this._targets[f(p)],r&&(e==="click"||e==="preclick")&&this._draggableMoved(r)){_=!0;break}if(r&&r.listens(e,!0)&&(u&&!ci(p,t)||(s.push(r),u))||p===this._container)break;p=p.parentNode}return!s.length&&!_&&!u&&this.listens(e,!0)&&(s=[this]),s},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||t.type==="click"&&this._isCl
4ickDisabled(e))){var s=t.type;s==="mousedown"&&oi(e),this._fireDOMEvent(t,s)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,s){if(t.type==="click"){var r=h({},t);r.type="preclick",this._fireDOMEvent(r,r.type,s)}var u=this._findEventTargets(t,e);if(s){for(var p=[],_=0;_<s.length;_++)s[_].listens(e,!0)&&p.push(s[_]);u=p.concat(u)}if(u.length){e==="contextmenu"&&ct(t);var b=u[0],C={originalEvent:t};if(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"){var P=b.getLatLng&&(!b._radius||b._radius<=10);C.containerPoint=P?this.latLngToContainerPoint(b.getLatLng()):this.mouseEventToContainerPoint(t),C.layerPoint=this.containerPointToLayerPoint(C.containerPoint),C.latlng=P?b.getLatLng():this.layerPointToLatLng(C.layerPoint)}for(_=0;_<u.length;_++)if(u[_].fire(e,C,!0),C.originalEvent._stopped||u[_].options.bubblingMouseEvents===!1&&Y(this._mouseEvents,e)!==-1)return}},_draggableMoved:function(t){return t=t.dragging&&t.dragging.enabled()?t:this,t.dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Rt(this._mapPane)||new M(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var s=t&&e!==void 0?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return s.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var s=this.getSize()._divideBy(2);return this.project(t,e)._subtract(s)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,s){var r=this._getNewPixelOrigin(s,e);return this.project(t,e)._subtract(r)},_latLngBoundsToNewLayerBounds:function(t,e,s){var r=this._getNewPixelOrigin(s,e);
4return gt([this.project(t.getSouthWest(),e)._subtract(r),this.project(t.getNorthWest(),e)._subtract(r),this.project(t.getSouthEast(),e)._subtract(r),this.project(t.getNorthEast(),e)._subtract(r)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,s){if(!s)return t;var r=this.project(t,e),u=this.getSize().divideBy(2),p=new Q(r.subtract(u),r.add(u)),_=this._getBoundsOffset(p,s,e);return Math.abs(_.x)<=1&&Math.abs(_.y)<=1?t:this.unproject(r.add(_),e)},_limitOffset:function(t,e){if(!e)return t;var s=this.getPixelBounds(),r=new Q(s.min.add(t),s.max.add(t));return t.add(this._getBoundsOffset(r,e))},_getBoundsOffset:function(t,e,s){var r=gt(this.project(e.getNorthEast(),s),this.project(e.getSouthWest(),s)),u=r.min.subtract(t.min),p=r.max.subtract(t.max),_=this._rebound(u.x,-p.x),b=this._rebound(u.y,-p.y);return new M(_,b)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),s=this.getMaxZoom(),r=k.any3d?this.options.zoomSnap:1;return r&&(t=Math.round(t/r)*r),Math.max(e,Math.min(s,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){st(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var s=this._getCenterOffset(t)._trunc();return(e&&e.animate)!==!0&&!this.getSize().contains(s)?!1:(this.panBy(s,e),!0)},_createAnimProxy:function(){var t=this._proxy=q("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var s=Je,r=this._proxy.style[s];Ht(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),r===this._proxy.style[s]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){tt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Ht(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,s){if(this._animatingZoom)return!0;if(s=s||{},!this._zoomAnimated||s.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(e),u=this._getCenterOffset(t)._divideBy(1-1/r);return s.animate!==!0&&!this.getSize().contains(u)?!1:(K(function(){this._moveStart(!0,s.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,s,r){this._mapPane&&(s&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,H(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:r}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(l(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&st(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 Vn(t,e){return new W(t,e)}var xt=yt.extend({options:{position:"topright"},initialize:function(t){T(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),s=this.getPosition(),r=t._controlCorners[s];return H(e,"leaflet-control"),s.indexOf("bottom")!==-1?r.insertBefore(e,r.firstChild):r.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(tt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),ce=function(t){return new xt(t)};W.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this}
vendor: 8,692 bytes, line 4
4,_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",s=this._controlContainer=q("div",e+"control-container",this._container);function r(u,p){var _=e+u+" "+e+p;t[u+p]=q("div",_,s)}r("top","left"),r("top","right"),r("bottom","left"),r("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)tt(this._controlCorners[t]);tt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var rs=xt.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,s,r){return s<r?-1:r<s?1:0}},initialize:function(t,e,s){T(this,s),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var r in t)this._addLayer(t[r],r);for(r in e)this._addLayer(e[r],r,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return xt.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(f(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){H(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(H(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):st(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return st(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=q("div",t),s=this.options.collapsed;e.setAttribute("aria-haspopup",!0),ue(e),ui(e);var r=this._section=q("section",t+"-list");s&&(this._map.on("click",this.collapse,this),N(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var u=this._layersLink=q("a",t+"-toggle",e);u.href="#",u.title="Layers",u.setAttribute("role","button"),N(u,{keydown:function(p){p.keyCode===13&&this._expandSafely()},click:function(p){ct(p),this._expandSafely()}},this),s||this.expand(),this._baseLayersList=q("div",t+"-base",r),this._separator=q("div",t+"-separator",r),this._overlaysList=q("div",t+"-overlays",r),e.appendChild(r)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&f(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,s){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:s}),this.options.sortLayers&&this._layers.sort(l(function(r,u){return this.options.sortFunction(r.layer,u.layer,r.name,u.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Ce(this._baseLayersList),Ce(this._overlaysList),this._layerControlInputs=[];var t,e,s,r,u=0;for(s=0;s<this._layers.length;s++)r=this._layers[s],this._addItem(r),e=e||r.overlay,t=t||!r.overlay,u+=r.overlay?0:1;return this.options.hideSingleBase&&(t=t&&u>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(f(t.target)),s=e.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;s&&this._map.fire(s,e)},_createRadioElement:function(t,e){var s='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",r=document.createElement("div");return r.innerHTML=s,r.firstChild},_addItem:function(t){var e=document.createElement("label"),s=this._map.hasLayer(t.layer),r;t.overlay?(r=document.createElement("input"),r.type="checkbox",r.className="leaflet-control-layers-selector",r.defaultChecked=s):r=this._createRadioElement("leaflet-base-layers_"+f(this),s),this._layerControlInputs.push(r),r.layerId=f(t.layer),N(r,"click",this._onInputClick,this);var u=document.createElement("span");u.innerHTML=" "+t.name;var p=document.createElement("span");e.appendChild(p),p.appendChild(r),p.appendChild(u);var _=t.overlay?this._overlaysList:this._baseLayersList;return _.appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,e,s,r=[],u=[];this._handlingClick=!0;for(var p=t.length-1;p>=0;p--)e=t[p],s=this._getLayer(e.layerId).layer,e.checked?r.push(s):e.checked||u.push(s);for(p=0;p<u.length;p++)this._map.hasLayer(u[p])&&this._map.removeLayer(u[p]);for(p=0;p<r.length;p++)this._map.hasLayer(r[p])||this._map.addLayer(r[p]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t=this._layerControlInputs,e,s,r=this._map.getZoom(),u=t.length-1;u>=0;u--)e=t[u],s=this._getLayer(e.layerId).layer,e.disabled=s.options.minZoom!==void 0&&r<s.options.minZoom||s.options.maxZoom!==void 0&&r>s.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,N(t,"click",ct),this.expand();var e=this;setTimeout(function(){j(t,"click",ct),e._preventClick=!1})}}),Wn=function(t,e,s){return new rs(t,e,s)},di=xt.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",s=q("div",e+" leaflet-bar"),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,e+"-in",s,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,e+"-out",s,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),s},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,s,r,u){var p=q("a",s,r);return p.innerHTML=t,p.href="#",p.title=e,p.setAttribute("role","button"),p.setAttribute("aria-label",e),ue(p),N(p,"click",Vt),N(p,"click",u,this),N(p,"click",this._refocusOnMap,this),p},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";st(this._zoomInButton,e),st(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(H(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(H(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});W.mergeOptions({zoomControl:!0}),W.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new di,this.addControl(this.zoomControl))});var qn=function(t){return new di(t)},as=xt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",s=q("div",e),r=this.options;return this._addScales(r,e+"-line",s),t.on(r.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),s},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,s){t.metric&&(this._mScale=q("div",e,s)),t.imperial&&(this._iScale=q("div",e,s))},_update:function(){var t=this._map,e=t.getSize().y/2,s=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(s)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),s=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,s,e/t)}
4,_updateImperial:function(t){var e=t*3.2808399,s,r,u;e>5280?(s=e/5280,r=this._getRoundNum(s),this._updateScale(this._iScale,r+" mi",r/s)):(u=this._getRoundNum(e),this._updateScale(this._iScale,u+" ft",u/e))},_updateScale:function(t,e,s){t.style.width=Math.round(this.options.maxWidth*s)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),s=t/e;return s=s>=10?10:s>=5?5:s>=3?3:s>=2?2:1,e*s}}),Un=function(t){return new as(t)},jn='<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>',fi=xt.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(k.inlineSvg?jn+" ":"")+"Leaflet</a>"},initialize:function(t){T(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=q("div","leaflet-control-attribution"),ue(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var s=[];this.options.prefix&&s.push(this.options.prefix),t.length&&s.push(t.join(", ")),this._container.innerHTML=s.join(' <span aria-hidden="true">|</span> ')}}});W.mergeOptions({attributionControl:!0}),W.addInitHook(function(){this.options.attributionControl&&new fi().addTo(this)});var $n=function(t){return new fi(t)};xt.Layers=rs,xt.Zoom=di,xt.Scale=as,xt.Attribution=fi,ce.layers=Wn,ce.zoom=qn,ce.scale=Un,ce.attribution=$n;var Ot=yt.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Ot.addTo=function(t,e){return t.addHandler(e,this),this};var Xn={Events:ft},ls=k.touch?"touchstart mousedown":"mousedown",Nt=G.extend({options:{clickTolerance:3},initialize:function(t,e,s,r){T(this,r),this._element=t,this._dragStartTarget=e||t,this._preventOutline=s},enable:function(){this._enabled||(N(this._dragStartTarget,ls,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Nt._dragging===this&&this.finishDrag(!0),j(this._dragStartTarget,ls,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!Qe(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){Nt._dragging===this&&this.finishDrag();return}if(!(Nt._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(Nt._dragging=this,this._preventOutline&&oi(this._element),ii(),ae(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t,s=ts(this._element);this._startPoint=new M(e.clientX,e.clientY),this._startPos=Rt(this._element),this._parentScale=ri(s);var r=t.type==="mousedown";N(document,r?"mousemove":"touchmove",this._onMove,this),N(document,r?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var e=t.touches&&t.touches.length===1?t.touches[0]:t,s=new M(e.clientX,e.clientY)._subtract(this._startPoint);!s.x&&!s.y||Math.abs(s.x)+Math.abs(s.y)<this.options.clickTolerance||(s.x/=this._parentScale.x,s.y/=this._parentScale.y,ct(t),this._moved||(this.fire("dragstart"),this._moved=!0,H(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),H(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(s),this._moving=!0,this._lastEvent=t,this._updatePosition())}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),rt(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){st(document.body,"leaflet-dragging"),this._lastTarget&&(st(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),j(document,"mousemove touchmove",this._onMove,this),j(document,"mouseup touchend touchcancel",this._onUp,this),si(),le();var e=this._moved&&this._moving;this._moving=!1,Nt._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function hs(t,e,s){var r,u=[1,4,2,8],p,_,b,C,P,O,z,R;for(p=0,O=t.length;p<O;p++)t[p]._code=Wt(t[p],e);for(b=0;b<4;b++){for(z=u[b],r=[],p=0,O=t.length,_=O-1;p<O;
4_=p++)C=t[p],P=t[_],C._code&z?P._code&z||(R=Ee(P,C,z,e,s),R._code=Wt(R,e),r.push(R)):(P._code&z&&(R=Ee(P,C,z,e,s),R._code=Wt(R,e),r.push(R)),r.push(C));t=r}return t}function us(t,e){var s,r,u,p,_,b,C,P,O;if(!t||t.length===0)throw new Error("latlngs not passed");Lt(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var z=V([0,0]),R=ot(t),pt=R.getNorthWest().distanceTo(R.getSouthWest())*R.getNorthEast().distanceTo(R.getNorthWest());pt<1700&&(z=pi(t));var ut=t.length,wt=[];for(s=0;s<ut;s++){var vt=V(t[s]);wt.push(e.project(V([vt.lat-z.lat,vt.lng-z.lng])))}for(b=C=P=0,s=0,r=ut-1;s<ut;r=s++)u=wt[s],p=wt[r],_=u.y*p.x-p.y*u.x,C+=(u.x+p.x)*_,P+=(u.y+p.y)*_,b+=_*3;b===0?O=wt[0]:O=[C/b,P/b];var ee=e.unproject(B(O));return V([ee.lat+z.lat,ee.lng+z.lng])}function pi(t){for(var e=0,s=0,r=0,u=0;u<t.length;u++){var p=V(t[u]);e+=p.lat,s+=p.lng,r++}return V([e/r,s/r])}var Yn={__proto__:null,clipPolygon:hs,polygonCenter:us,centroid:pi};function cs(t,e){if(!e||!t.length)return t.slice();var s=e*e;return t=Qn(t,s),t=Jn(t,s),t}function ds(t,e,s){return Math.sqrt(de(t,e,s,!0))}function Kn(t,e,s){return de(t,e,s)}function Jn(t,e){var s=t.length,r=typeof Uint8Array<"u"?Uint8Array:Array,u=new r(s);u[0]=u[s-1]=1,mi(t,u,e,0,s-1);var p,_=[];for(p=0;p<s;p++)u[p]&&_.push(t[p]);return _}function mi(t,e,s,r,u){var p=0,_,b,C;for(b=r+1;b<=u-1;b++)C=de(t[b],t[r],t[u],!0),C>p&&(_=b,p=C);p>s&&(e[_]=1,mi(t,e,s,r,_),mi(t,e,s,_,u))}function Qn(t,e){for(var s=[t[0]],r=1,u=0,p=t.length;r<p;r++)to(t[r],t[u])>e&&(s.push(t[r]),u=r);return u<p-1&&s.push(t[p-1]),s}var fs;function ps(t,e,s,r,u){var p=r?fs:Wt(t,s),_=Wt(e,s),b,C,P;for(fs=_;;){if(!(p|_))return[t,e];if(p&_)return!1;b=p||_,C=Ee(t,e,b,s,u),P=Wt(C,s),b===p?(t=C,p=P):(e=C,_=P)}}function Ee(t,e,s,r,u){var p=e.x-t.x,_=e.y-t.y,b=r.min,C=r.max,P,O;return s&8?(P=t.x+p*(C.y-t.y)/_,O=C.y):s&4?(P=t.x+p*(b.y-t.y)/_,O=b.y):s&2?(P=C.x,O=t.y+_*(C.x-t.x)/p):s&1&&(P=b.x,O=t.y+_*(b.x-t.x)/p),new M(P,O,u)}function Wt(t,e){var s=0;return t.x<e.min.x?s|=1:t.x>e.max.x&&(s|=2),t.y<e.min.y?s|=4:t.y>e.max.y&&(s|=8),s}function to(t,e){var s=e.x-t.x,r=e.y-t.y;return s*s+r*r}function de(t,e,s,r){var u=e.x,p=e.y,_=s.x-u,b=s.y-p,C=_*_+b*b,P;return C>0&&(P=((t.x-u)*_+(t.y-p)*b)/C,P>1?(u=s.x,p=s.y):P>0&&(u+=_*P,p+=b*P)),_=t.x-u,b=t.y-p,r?_*_+b*b:new M(u,p)}function Lt(t){return!F(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function ms(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Lt(t)}function gs(t,e){var s,r,u,p,_,b,C,P;if(!t||t.length===0)throw new Error("latlngs not passed");Lt(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var O=V([0,0]),z=ot(t),R=z.getNorthWest().distanceTo(z.getSouthWest
4())*z.getNorthEast().distanceTo(z.getNorthWest());R<1700&&(O=pi(t));var pt=t.length,ut=[];for(s=0;s<pt;s++){var wt=V(t[s]);ut.push(e.project(V([wt.lat-O.lat,wt.lng-O.lng])))}for(s=0,r=0;s<pt-1;s++)r+=ut[s].distanceTo(ut[s+1])/2;if(r===0)P=ut[0];else for(s=0,p=0;s<pt-1;s++)if(_=ut[s],b=ut[s+1],u=_.distanceTo(b),p+=u,p>r){C=(p-r)/u,P=[b.x-C*(b.x-_.x),b.y-C*(b.y-_.y)];break}var vt=e.unproject(B(P));return V([vt.lat+O.lat,vt.lng+O.lng])}var eo={__proto__:null,simplify:cs,pointToSegmentDistance:ds,closestPointOnSegment:Kn,clipSegment:ps,_getEdgeIntersection:Ee,_getBitCode:Wt,_sqClosestPointOnSegment:de,isFlat:Lt,_flat:ms,polylineCenter:gs},gi={project:function(t){return new M(t.lng,t.lat)},unproject:function(t){return new U(t.y,t.x)},bounds:new Q([-180,-90],[180,90])},_i={R:6378137,R_MINOR:6356752314245179e-9,bounds:new Q([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var e=Math.PI/180,s=this.R,r=t.lat*e,u=this.R_MINOR/s,p=Math.sqrt(1-u*u),_=p*Math.sin(r),b=Math.tan(Math.PI/4-r/2)/Math.pow((1-_)/(1+_),p/2);return r=-s*Math.log(Math.max(b,1e-10)),new M(t.lng*e*s,r)},unproject:function(t){for(var e=180/Math.PI,s=this.R,r=this.R_MINOR/s,u=Math.sqrt(1-r*r),p=Math.exp(-t.y/s),_=Math.PI/2-2*Math.atan(p),b=0,C=.1,P;b<15&&Math.abs(C)>1e-7;b++)P=u*Math.sin(_),P=Math.pow((1-P)/(1+P),u/2),C=Math.PI/2-2*Math.atan(p*P)-_,_+=C;return new U(_*e,t.x*e/s)}},io={__proto__:null,LonLat:gi,Mercator:_i,SphericalMercator:Ve},so=h({},Dt,{code:"EPSG:3395",projection:_i,transformation:(function(){var t=.5/(Math.PI*_i.R);return se(t,.5,-t,.5)})()}),_s=h({},Dt,{code:"EPSG:4326",projection:gi,transformation:se(1/180,1,-1/180,.5)}),no=h({},kt,{projection:gi,transformation:se(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var s=e.lng-t.lng,r=e.lat-t.lat;return Math.sqrt(s*s+r*r)},infinite:!0});kt.Earth=Dt,kt.EPSG3395=so,kt.EPSG3857=qe,kt.EPSG900913=un,kt.EPSG4326=_s,kt.Simple=no;var St=G.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[f(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[f(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var s=this.getEvents();e.on(s,this),this.once("remove",function(){e.off(s,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});W.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=f(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=f(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return f(t)in this._layers},eachLayer:function(t,e){for(var s in this._layers)t.call(e,this._layers[s]);return this},_addLayers:function(t){t=t?F(t)?t:[t]:[];for(var e=0,s=t.length;e<s;e++)this.addLayer(t[e])},_addZoomLimit:function(t){(!isNaN(t.options.maxZoom)||!isNaN(t.options.minZoom))&&(this._zoomBoundLayers[f(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=f(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,s=this._getZoomSpan();for(var r in this._zoomBoundLayers){var u=this._zoomBoundLayers[r].options;t=u.minZoom===void 0?t:Math.min(t,u.minZoom),e=u.maxZoom===void 0?e:Math.max(e,u.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,s!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZo
4om&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Yt=St.extend({initialize:function(t,e){T(this,e),this._layers={};var s,r;if(t)for(s=0,r=t.length;s<r;s++)this.addLayer(t[s])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){var e=typeof t=="number"?t:this.getLayerId(t);return e in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e=Array.prototype.slice.call(arguments,1),s,r;for(s in this._layers)r=this._layers[s],r[t]&&r[t].apply(r,e);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var s in this._layers)t.call(e,this._layers[s]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return f(t)}}),oo=function(t,e){return new Yt(t,e)},It=Yt.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Yt.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Yt.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new _t;for(var e in this._layers){var s=this._layers[e];t.extend(s.getBounds?s.getBounds():s.getLatLng())}return t}}),ro=function(t,e){return new It(t,e)},Kt=yt.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){T(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var s=this._getIconUrl(t);if(!s){if(t==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var r=this._createImg(s,e&&e.tagName==="IMG"?e:null);return this._setIconStyles(r,t),(this.options.crossOrigin||this.options.crossOrigin==="")&&(r.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),r},_setIconStyles:function(t,e){var s=this.options,r=s[e+"Size"];typeof r=="number"&&(r=[r,r]);var u=B(r),p=B(e==="shadow"&&s.shadowAnchor||s.iconAnchor||u&&u.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(s.className||""),p&&(t.style.marginLeft=-p.x+"px",t.style.marginTop=-p.y+"px"),u&&(t.style.width=u.x+"px",t.style.height=u.y+"px")},_createImg:function(t,e){return e=e||document.createElement("img"),e.src=t,e},_getIconUrl:function(t){return k.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function ao(t){return new Kt(t)}var fe=Kt.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return typeof fe.imagePath!="string"&&(fe.imagePath=this._detectIconPath()),(this.options.imagePath||fe.imagePath)+Kt.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(s,r,u){var p=r.exec(s);return p&&p[u]};return t=e(t,/^url\((['"])?(.+)\1\)$/,2),t&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=q("div","leaflet-default-icon-path",document.body),e=re(t,"background-image")||re(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e),e)return e;var s=document.querySelector('link[href$="leaflet.css"]');return s?s.href.substring(0,s.href.length-11-1):""}}),vs=Ot.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Nt(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),H(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&st(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,s=e._map,r=this._marker.options.autoPanSpeed,u=this._marker.options.autoPanPadding,p=Rt(e._icon),_=s.getPixelBounds(),b=s.getPixelOrigin(),C=gt(_.min._subtract(b).add(u),_.max._subtract(b).subtract(u));if(!C.contains(p)){var P=B((Math.max(C.max.x,p.x)-C.max.x)/(_.max.x-C.max.x)-(Math.min(C.min.x,p.x)-C.min.x)/(_.min.x-C.min.x),(Math.max(C.max.y,p.y)-C.max.y)/(_.max.y-C.max.y)-(Math.min(C.min.y,p.y)-C.min.y)/(_.min.y-C.min.y)).multiplyBy(r);s.panBy(P,{animate:!1}),this._draggable._newPos._add(P),this._draggable._startPos._add(P),rt(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=K(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(ht(this._panRequest),this._panRequest=K(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,s=e._shadow,r=Rt(e._icon),u=e._map.layerPointToLatLng(r);s&&rt(s,r),e._latlng=u,t.latlng=u,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){ht(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Oe=St.extend({options:{icon:new fe,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){T(this,e),this._latlng=V(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=V(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),s=t.icon.createIcon(this._icon),r=!1;s!==this._icon&&(this._icon&&this._removeIcon(),r=!0,t.title&&(s.title=t.title),s.tagName==="IMG"&&(s.alt=t.alt||"")),H(s,e),t.keyboard&&(s.tabIndex="0",s.setAttribute("role","button")),this._icon=s,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&N(s,"focus",this._panOnFocus,this);var u=t.icon.createShadow(this._shadow),p=!1;u!==this._shadow&&(this._removeShadow(),p=!0),u&&(H(u,e),u.alt=""),this._shadow=u,t.opacity<1&&this._updateOpacity(),r&&this.getPane().appendChild(this._icon),this._initInteraction(),u&&p&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}
vendor: 3,110 bytes, line 4
4),this.options.autoPanOnFocus&&j(this._icon,"focus",this._panOnFocus,this),tt(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&tt(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&rt(this._icon,t),this._shadow&&rt(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(H(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),vs)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new vs(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&bt(this._icon,t),this._shadow&&bt(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,s=e.iconSize?B(e.iconSize):B(0,0),r=e.iconAnchor?B(e.iconAnchor):B(0,0);t.panInside(this._latlng,{paddingTopLeft:r,paddingBottomRight:s.subtract(r)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function lo(t,e){return new Oe(t,e)}var Zt=St.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return T(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Me=Zt.extend({options:{fill:!0,radius:10},initialize:function(t,e){T(this,e),this._latlng=V(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=V(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius}
4,setStyle:function(t){var e=t&&t.radius||this._radius;return Zt.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,s=this._clickTolerance(),r=[t+s,e+s];this._pxBounds=new Q(this._point.subtract(r),this._point.add(r))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function ho(t,e){return new Me(t,e)}var vi=Me.extend({initialize:function(t,e,s){if(typeof e=="number"&&(e=h({},s,{radius:e})),T(this,e),this._latlng=V(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new _t(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Zt.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,s=this._map,r=s.options.crs;if(r.distance===Dt.distance){var u=Math.PI/180,p=this._mRadius/Dt.R/u,_=s.project([e+p,t]),b=s.project([e-p,t]),C=_.add(b).divideBy(2),P=s.unproject(C).lat,O=Math.acos((Math.cos(p*u)-Math.sin(e*u)*Math.sin(P*u))/(Math.cos(e*u)*Math.cos(P*u)))/u;(isNaN(O)||O===0)&&(O=p/Math.cos(Math.PI/180*e)),this._point=C.subtract(s.getPixelOrigin()),this._radius=isNaN(O)?0:C.x-s.project([P,t-O]).x,this._radiusY=C.y-_.y}else{var z=r.unproject(r.project(this._latlng).subtract([this._mRadius,0]));this._point=s.latLngToLayerPoint(this._latlng),this._radius=this._point.x-s.latLngToLayerPoint(z).x}this._updateBounds()}});function uo(t,e,s){return new vi(t,e,s)}var At=Zt.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){T(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e=1/0,s=null,r=de,u,p,_=0,b=this._parts.length;_<b;_++)for(var C=this._parts[_],P=1,O=C.length;P<O;P++){u=C[P-1],p=C[P];var z=r(t,u,p,!0);z<e&&(e=z,s=r(t,u,p))}return s&&(s.distance=Math.sqrt(e)),s}
4,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return gs(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=V(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new _t,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Lt(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],s=Lt(t),r=0,u=t.length;r<u;r++)s?(e[r]=V(t[r]),this._bounds.extend(e[r])):e[r]=this._convertLatLngs(t[r]);return e},_project:function(){var t=new Q;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new M(t,t);this._rawPxBounds&&(this._pxBounds=new Q([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,s){var r=t[0]instanceof U,u=t.length,p,_;if(r){for(_=[],p=0;p<u;p++)_[p]=this._map.latLngToLayerPoint(t[p]),s.extend(_[p]);e.push(_)}else for(p=0;p<u;p++)this._projectLatlngs(t[p],e,s)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}var e=this._parts,s,r,u,p,_,b,C;for(s=0,u=0,p=this._rings.length;s<p;s++)for(C=this._rings[s],r=0,_=C.length;r<_-1;r++)b=ps(C[r],C[r+1],t,r,!0),b&&(e[u]=e[u]||[],e[u].push(b[0]),(b[1]!==C[r+1]||r===_-2)&&(e[u].push(b[1]),u++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,s=0,r=t.length;s<r;s++)t[s]=cs(t[s],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var s,r,u,p,_,b,C=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(s=0,p=this._parts.length;s<p;s++)for(b=this._parts[s],r=0,_=b.length,u=_-1;r<_;u=r++)if(!(!e&&r===0)&&ds(t,b[u],b[r])<=C)return!0;return!1}});function co(t,e){return new At(t,e)}At._flat=ms;var Jt=At.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length}
4,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return us(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=At.prototype._convertLatLngs.call(this,t),s=e.length;return s>=2&&e[0]instanceof U&&e[0].equals(e[s-1])&&e.pop(),e},_setLatLngs:function(t){At.prototype._setLatLngs.call(this,t),Lt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Lt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,s=new M(e,e);if(t=new Q(t.min.subtract(s),t.max.add(s)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var r=0,u=this._rings.length,p;r<u;r++)p=hs(this._rings[r],t,!0),p.length&&this._parts.push(p)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e=!1,s,r,u,p,_,b,C,P;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(p=0,C=this._parts.length;p<C;p++)for(s=this._parts[p],_=0,P=s.length,b=P-1;_<P;b=_++)r=s[_],u=s[b],r.y>t.y!=u.y>t.y&&t.x<(u.x-r.x)*(t.y-r.y)/(u.y-r.y)+r.x&&(e=!e);return e||At.prototype._containsPoint.call(this,t,!0)}});function fo(t,e){return new Jt(t,e)}var zt=It.extend({initialize:function(t,e){T(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e=F(t)?t:t.features,s,r,u;if(e){for(s=0,r=e.length;s<r;s++)u=e[s],(u.geometries||u.geometry||u.features||u.coordinates)&&this.addData(u);return this}var p=this.options;if(p.filter&&!p.filter(t))return this;var _=ke(t,p);return _?(_.feature=ze(t),_.defaultOptions=_.options,this.resetStyle(_),p.onEachFeature&&p.onEachFeature(t,_),this.addLayer(_)):this},resetStyle:function(t){return t===void 0?this.eachLayer(this.resetStyle,this):(t.options=h({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){t.setStyle&&(typeof e=="function"&&(e=e(t.feature)),t.setStyle(e))}});function ke(t,e){var s=t.type==="Feature"?t.geometry:t,r=s?s.coordinates:null,u=[],p=e&&e.pointToLayer,_=e&&e.coordsToLatLng||yi,b,C,P,O;if(!r&&!s)return null;switch(s.type){case"Point":return b=_(r),ys(p,t,b,e);case"MultiPoint":for(P=0,O=r.length;P<O;P++)b=_(r[P]),u.push(ys(p,t,b,e));return new It(u);case"LineString":case"MultiLineString":return C=Ie(r,s.type==="LineString"?0:1,_),new At(C,e);case"Polygon":case"MultiPolygon":return C=Ie(r,s.type==="Polygon"?1:2,_),new Jt(C,e);case"GeometryCollection":for(P=0,O=s.geometries.length;P<O;P++){var z=ke({geometry:s.geometries[P],type:"Feature",properties:t.properties},e);z&&u.push(z)}return new It(u);case"FeatureCollection":for(P=0,O=s.features.length;P<O;P++){var R=ke(s.features[P],e);R&&u.push(R)}return new It(u);default:throw new Error("Invalid GeoJSON object.")}}function ys(t,e,s,r){return t?t(e,s):new Oe(s,r&&r.markersInheritOptions&&r)}function yi(t){return new U(t[1],t[0],t[2])}function Ie(t,e,s){for(var r=[],u=0,p=t.length,_;u<p;u++)_=e?Ie(t[u],e-1,s):(s||yi)(t[u]),r.push(_);return r}function bi(t,e){return t=V(t),t.alt!==void 0?[y(t.lng,e),y(t.lat,e),y(t.alt,e)]:[y(t.lng,e),y(t.lat,e)]}function Ae(t,e,s,r){for(var u=[],p=0,_=t.length;p<_;p++)u.push(e?Ae(t[p],Lt(t[p])?0:e-1,s,r):bi(t[p],r));return!e&&s&&u.length>0&&u.push(u[0].slice()),u}function Qt(t,e){return t.feature?h({},t.feature,{geometry:e}):ze(e)}function ze(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var Li={toGeoJSON:function(t){return Qt(this,{type:"Point",coordinates:bi(this.getLatLng(),t)})}};Oe.include(Li),vi.include(Li),Me.include(Li),At.include({toGeoJSON:function(t){var e=!Lt(this._latlngs),s=Ae(this._latlngs,e?1:0,!1,t);return Qt(this,{type:(e?"Multi":"")+"LineString",coordinates:s})}}),Jt.include({toGeoJSON:function(t){var e=!Lt(this._latlngs),s=e&&!Lt(this._latlngs[0]),r=Ae(this._latlngs,s?2:e?1:0,!0,t);return e||(r=[r]),Qt(this,{type:(s?"Multi":"")+"Polygon",coordinates:r})}}),Yt.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(s){e.push(s.toGeoJSON(t).geometry.coordinates)}),Qt(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(e==="MultiPoint")return this.toMultiPoint(t);var s=e==="GeometryCollection",r=[];return this.eachLayer(function(u){if(u.toGeoJSON){var p=u.toGeoJSON(t);if(s)r.push(p.geometry);else{var _=ze(p);_.type==="FeatureCollection"?r.push.apply(r,_.features):r.push(_)}}}),s?Qt(this,{geometries:r,type:"GeometryCollection"}):{type:"FeatureCollection",features:r}}});function bs(t,e){return new zt(t,e)}var po=bs,Be=St.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""}
4,initialize:function(t,e,s){this._url=t,this._bounds=ot(e),T(this,s)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(H(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){tt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&$t(this._image),this},bringToBack:function(){return this._map&&Xt(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=ot(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",e=this._image=t?this._url:q("img");if(H(e,"leaflet-image-layer"),this._zoomAnimated&&H(e,"leaflet-zoom-animated"),this.options.className&&H(e,this.options.className),e.onselectstart=v,e.onmousemove=v,e.onload=l(this.fire,this,"load"),e.onerror=l(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(e.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=e.src;return}e.src=this._url,e.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),s=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Ht(this._image,s,e)},_reset:function(){var t=this._image,e=new Q(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),s=e.getSize();rt(t,e.min),t.style.width=s.x+"px",t.style.height=s.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 t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),mo=function(t,e,s){return new Be(t,e,s)},Ls=Be.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",e=this._image=t?this._url:q("video");if(H(e,"leaflet-image-layer"),this._zoomAnimated&&H(e,"leaflet-zoom-animated"),this.options.className&&H(e,this.options.className),e.onselectstart=v,e.onmousemove=v,e.onloadeddata=l(this.fire,this,"load"),t){for(var s=e.getElementsByTagName("source"),r=[],u=0;u<s.length;u++)r.push(s[u].src);this._url=s.length>0?r:[e.src];return}F(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var p=0;p<this._url.length;p++){var _=q("source");_.src=this._url[p],e.appendChild(_)}}});function go(t,e,s){return new Ls(t,e,s)}var ws=Be.extend({_initImage:function(){var t=this._image=this._url;H(t,"leaflet-image-layer"),this._zoomAnimated&&H(t,"leaflet-zoom-animated"),this.options.className&&H(t,this.options.className),t.onselectstart=v,t.onmousemove=v}});function _o(t,e,s){return new ws(t,e,s)}var Mt=St.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof U||F(t))?(this._latlng=V(t),T(this,e)):(T(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return t=arguments.length?t:this._source._map,t.hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&bt(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&bt(this._container,1),this.bringToFront(),this.options.interactive&&(H(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(bt(this._container,0),this._removeTimeout=setTimeout(l(tt,void 0,this._container),200)):tt(this._container),this.options.interactive&&(st(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=V(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&$t(this._container),this},bringToBack:function(){return this._map&&Xt(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof It){e=null;var s=this._source._layers;for(var r in s)if(s[r]._map){e=s[r];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else if(e.getBounds)t=e.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof e=="string")t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=B(this.options.offset),s=this._getAnchor();this._zoomAnimated?rt(this._container,t.add(s)):e=e.add(t).add(s);var r=this._containerBottom=-e.y,u=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=r+"px",this._container.style.left=u+"px"}},_getAnchor:function(){return[0,0]}});W.include({_initOverlay:function(t,e,s,r){var u=e;return u instanceof t||(u=new t(r).setContent(e)),s&&u.setLatLng(s),u}}),St.include({_initOverlay:function(t,e,s,r){var u=s;return u instanceof t?(T(u,r),u._source=this):(u=e&&!r?e:new t(r,this),u.setContent(s)),u}});var De=Mt.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t=arguments.length?t:this._source._map,!t.hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Mt.prototype.openOn.call(this,t)},onAdd:function(t){Mt.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Zt||this._source.on("preclick",Gt))},onRemove:function(t){Mt.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Zt||this._source.off("preclick",Gt))},getEvents:function(){var t=Mt.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&
4(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=q("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),s=this._wrapper=q("div",t+"-content-wrapper",e);if(this._contentNode=q("div",t+"-content",s),ue(e),ui(this._contentNode),N(e,"contextmenu",Gt),this._tipContainer=q("div",t+"-tip-container",e),this._tip=q("div",t+"-tip",this._tipContainer),this.options.closeButton){var r=this._closeButton=q("a",t+"-close-button",e);r.setAttribute("role","button"),r.setAttribute("aria-label","Close popup"),r.href="#close",r.innerHTML='<span aria-hidden="true">×</span>',N(r,"click",function(u){ct(u),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var s=t.offsetWidth;s=Math.min(s,this.options.maxWidth),s=Math.max(s,this.options.minWidth),e.width=s+1+"px",e.whiteSpace="",e.height="";var r=t.offsetHeight,u=this.options.maxHeight,p="leaflet-popup-scrolled";u&&r>u?(e.height=u+"px",H(t,p)):st(t,p),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),s=this._getAnchor();rt(this._container,e.add(s))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,e=parseInt(re(this._container,"marginBottom"),10)||0,s=this._container.offsetHeight+e,r=this._containerWidth,u=new M(this._containerLeft,-s-this._containerBottom);u._add(Rt(this._container));var p=t.layerPointToContainerPoint(u),_=B(this.options.autoPanPadding),b=B(this.options.autoPanPaddingTopLeft||_),C=B(this.options.autoPanPaddingBottomRight||_),P=t.getSize(),O=0,z=0;p.x+r+C.x>P.x&&(O=p.x+r-P.x+C.x),p.x-O-b.x<0&&(O=p.x-b.x),p.y+s+C.y>P.y&&(z=p.y+s-P.y+C.y),p.y-z-b.y<0&&(z=p.y-b.y),(O||z)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([O,z]))}},_getAnchor:function(){return B(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),vo=function(t,e){return new De(t,e)};W.mergeOptions({closePopupOnClick:!0}),W.include({openPopup:function(t,e,s){return this._initOverlay(De,t,e,s).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),St.include({bindPopup:function(t,e){return this._popup=this._initOverlay(De,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof It||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){Vt(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof Zt)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=e,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var Ne=Mt.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Mt.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Mt.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Mt.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",e=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=q("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+f(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,s,r=this._map,u=this._container,p=r.latLngToContainerPoint(r.getCenter()),_=r.layerPointToContainerPoint(t),b=this.options.direction,C=u.offsetWidth,P=u.offsetHeight,O=B(this.options.offset),z=this._getAnchor();b==="top"?(e=C/2,s=P):b==="bottom"?(e=C/2,s=0):b==="center"?(e=C/2,s=P/2):b==="right"?(e=0,s=P/2):b==="left"?
4(e=C,s=P/2):_.x<p.x?(b="right",e=0,s=P/2):(b="left",e=C+(O.x+z.x)*2,s=P/2),t=t.subtract(B(e,s,!0)).add(O).add(z),st(u,"leaflet-tooltip-right"),st(u,"leaflet-tooltip-left"),st(u,"leaflet-tooltip-top"),st(u,"leaflet-tooltip-bottom"),H(u,"leaflet-tooltip-"+b),rt(u,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&bt(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return B(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),yo=function(t,e){return new Ne(t,e)};W.include({openTooltip:function(t,e,s){return this._initOverlay(Ne,t,e,s).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),St.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ne,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(!(!t&&this._tooltipHandlersAdded)){var e=t?"off":"on",s={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?s.add=this._openTooltip:(s.mouseover=this._openTooltip,s.mouseout=this.closeTooltip,s.click=this._openTooltip,this._map?this._addFocusListeners():s.add=this._addFocusListeners),this._tooltip.options.sticky&&(s.mousemove=this._moveTooltip),this[e](s),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof It||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e=typeof t.getElement=="function"&&t.getElement();e&&(N(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),N(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e=typeof t.getElement=="function"&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",function(){e._openOnceFlag=!1,e._openTooltip(t)});return}this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)}},_moveTooltip:function(t){var e=t.latlng,s,r;this._tooltip.options.sticky&&t.originalEvent&&(s=this._map.mouseEventToContainerPoint(t.originalEvent),r=this._map.containerPointToLayerPoint(s),e=this._map.layerPointToLatLng(r)),this._tooltip.setLatLng(e)}});var Cs=Kt.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&t.tagName==="DIV"?t:document.createElement("div"),s=this.options;if(s.html instanceof Element?(Ce(e),e.appendChild(s.html)):e.innerHTML=s.html!==!1?s.html:"",s.bgPos){var r=B(s.bgPos);e.style.backgroundPosition=-r.x+"px "+-r.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function bo(t){return new Cs(t)}Kt.Default=fe;var pe=St.extend({options:{tileSize:256,opacity:1,updateWhenIdle:k.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){T(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),tt(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&($t(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Xt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=m(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof M?t:new M(t,t)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e=this.getPane().children,s=-t(-1/0,1/0),r=0,u=e.length,p;r<u;r++)p=e[r].style.zIndex,e[r]!==this._container&&p&&(s=t(s,+p));isFinite(s)&&(this.options.zIndex=s+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!k.ielt9){bt(this._container,this.options.opacity);var t=+new Date,e=!1,s=!1;for(var r in this._tiles){var u=this._tiles[r];if(!(!u.current||!u.loaded)){var p=Math.min(1,(t-u.loaded)/200);bt(u.el,p),p<1?e=!0:(u.active?s=!0:this._onOpaqueTile(u),u.active=!0)}}s&&!this._noPrune&&this._pruneTiles(),e&&(ht(this._fadeFrame),this._fadeFrame=K(this._updateOpacity,this))}},_onOpaqueTile:v,_initContainer:function(){this._container||(this._container=q("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(t!==void 0){for(var s in this._levels)s=Number(s),this._levels[s].el.children.length||s===t?(this._levels[s].el.style.zIndex=e-Math.abs(t-s),this._onUpdateLevel(s)):(tt(this._levels[s].el),this._removeTilesAtZoom(s),this._onRemoveLevel(s),delete this._levels[s]);var r=this._levels[t],u=this._map;return r||(r=this._levels[t]={},r.el=q("div","leaflet-tile-container leaflet-zoom-animated",this._container),r.el.style.zIndex=e,r.origin=u.project(u.unproject(u.getPixelOrigin()),t).round(),r.zoom=t,this._setZoomTransform(r,u.getCenter(),u.getZoom()),v(r.el.offsetWidth),this._onCreateLevel(r)),this._level=r,r}},_onUpdateLevel:v,_onRemoveLevel:v,_onCreateLevel:v,_pruneTiles:function(){if(this._map){var t,e,s=this._map.getZoom();if(s>this.options.maxZoom||s<this.options.minZoom){this._removeAllTiles();return}for(t in this._tiles)e=this._tiles[t],e.retain=e.current;for(t in this._tiles)if(e=this._tiles[t],e.current&&!e.active){var r=e.coords;this._retainParent(r.x,r.y,r.z,r.z-5)||this._retainChildren(r.x,r.y,r.z,r.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)tt(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,s,r){var u=Math.floor(t/2),p=Math.floor(e/2),_=s-1,b=new M(+u,+p);b.z=+_;var C=this._tileCoordsToKey(b),P=this._tiles[C];return P&&P.active?(P.retain=!0,!0):(P&&P.loaded&&(P.retain=!0),_>r?this._retainParent(u,p,_,r):!1)},_retainChildren:function(t,e,s,r){for(var u=2*t;u<2*t+2;u++)for(var p=2*e;p<2*e+2;p++){var _=new M(u,p);_.z=s+1;var b=this._tileCoordsToKey(_),C=this._tiles[b];if(C&&C.active){C.retain=!0;continue}else C&&C.loaded&&(C.retain=!0);s+1<r&&this._retainChildren(u,p,s+1,r)}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);
4this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return e.minNativeZoom!==void 0&&t<e.minNativeZoom?e.minNativeZoom:e.maxNativeZoom!==void 0&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,s,r){var u=Math.round(e);this.options.maxZoom!==void 0&&u>this.options.maxZoom||this.options.minZoom!==void 0&&u<this.options.minZoom?u=void 0:u=this._clampZoom(u);var p=this.options.updateWhenZooming&&u!==this._tileZoom;(!r||p)&&(this._tileZoom=u,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),u!==void 0&&this._update(t),s||this._pruneTiles(),this._noPrune=!!s),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var s in this._levels)this._setZoomTransform(this._levels[s],t,e)},_setZoomTransform:function(t,e,s){var r=this._map.getZoomScale(s,t.zoom),u=t.origin.multiplyBy(r).subtract(this._map._getNewPixelOrigin(e,s)).round();k.any3d?Ht(t.el,u,r):rt(t.el,u)},_resetGrid:function(){var t=this._map,e=t.options.crs,s=this._tileSize=this.getTileSize(),r=this._tileZoom,u=this._map.getPixelWorldBounds(this._tileZoom);u&&(this._globalTileRange=this._pxBoundsToTileRange(u)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],r).x/s.x),Math.ceil(t.project([0,e.wrapLng[1]],r).x/s.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],r).y/s.x),Math.ceil(t.project([e.wrapLat[1],0],r).y/s.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(t){var e=this._map,s=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),r=e.getZoomScale(s,this._tileZoom),u=e.project(t,this._tileZoom).floor(),p=e.getSize().divideBy(r*2);return new Q(u.subtract(p),u.add(p))},_update:function(t){var e=this._map;if(e){var s=this._clampZoom(e.getZoom());if(t===void 0&&(t=e.getCenter()),this._tileZoom!==void 0){var r=this._getTiledPixelBounds(t),u=this._pxBoundsToTileRange(r),p=u.getCenter(),_=[],b=this.options.keepBuffer,C=new Q(u.getBottomLeft().subtract([b,-b]),u.getTopRight().add([b,-b]));if(!(isFinite(u.min.x)&&isFinite(u.min.y)&&isFinite(u.max.x)&&isFinite(u.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var P in this._tiles){var O=this._tiles[P].coords;(O.z!==this._tileZoom||!C.contains(new M(O.x,O.y)))&&(this._tiles[P].current=!1)}if(Math.abs(s-this._tileZoom)>1){this._setView(t,s);return}for(var z=u.min.y;z<=u.max.y;z++)for(var R=u.min.x;R<=u.max.x;R++){var pt=new M(R,z);if(pt.z=this._tileZoom,!!this._isValidTile(pt)){var ut=this._tiles[this._tileCoordsToKey(pt)];ut?ut.current=!0:_.push(pt)}}if(_.sort(function(vt,ee){return vt.distanceTo(p)-ee.distanceTo(p)}),_.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var wt=document.createDocumentFragment();for(R=0;R<_.length;R++)this._addTile(_[R],wt);this._level.el.appendChild(wt)}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var s=this._globalTileRange;if(!e.wrapLng&&(t.x<s.min.x||t.x>s.max.x)||!e.wrapLat&&(t.y<s.min.y||t.y>s.max.y))return!1}if(!this.options.bounds)return!0;var r=this._tileCoordsToBounds(t);return ot(this.options.bounds).overlaps(r)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,s=this.getTileSize(),r=t.scaleBy(s),u=r.add(s),p=e.unproject(r,t.z),_=e.unproject(u,t.z);return[p,_]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),s=new _t(e[0],e[1]);return this.options.noWrap||(s=this._map.wrapLatLngBounds(s)),s},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),s=new M(+e[0],+e[1]);return s.z=+e[2],s},_removeTile:function(t){var e=this._tiles[t];e&&(tt(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){H(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=v,t.onmousemove=v,k.ielt9&&this.options.opacity<1&&bt(t,this.options.opacity)},_addTile:function(t,e){var s=this._getTilePos(t),r=this._tileCoordsToKey(t),u=this.createTile(this._wrapCoords(t),l(this._tileReady,this,t));this._initTile(u),this.createTile.length<2&&K(l(this._tileReady,this,t,null,u)),rt(u,s),this._tiles[r]={el:u,coords:t,current:!0},e.appendChild(u),this.fire("tileloadstart",{tile:u,coords:t})},_tileReady:function(t,e,s){e&&this.fire("tileerror",{error:e,tile:s,coords:t});var r=this._tileCoordsToKey(t);s=this._tiles[r],s&&(s.loaded=+new Date,this._map._fadeAnimated?(bt(s.el,0),ht(this._fadeFrame),this._fadeFrame=K(this._updateOpacity,this)):(s.active=!0,this._pruneTiles()),e||(H(s.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:s.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),k.ielt9||!this._map._fadeAnimated?K(this._pruneTiles,this):setTimeout(l(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new M(this._wrapX?g(t.x,this._wrapX):t.x,this._wrapY?g(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new Q(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Lo(t){return new pe(t)}var te=pe.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,e=T(this,e),e.detectRetina&&k.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),typeof e.subdomains=="string"&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&e===void 0&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var s=document.createElement("img");return N(s,"load",l(this._tileOnLoad,this,e,s)),N(s,"error",l(this._tileOnError,this,e,s)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(s.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(s.referrerPolicy=this.options.referrerPolicy),s.alt="",s.src=this.getTileUrl(t),s},getTileUrl:function(t){var e={r:k.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var s=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=s),e["-y"]=s}return D(this._url,h(e,this.options))}
4,_tileOnLoad:function(t,e){k.ielt9?setTimeout(l(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,s){var r=this.options.errorTileUrl;r&&e.getAttribute("src")!==r&&(e.src=r),t(s,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,s=this.options.zoomReverse,r=this.options.zoomOffset;return s&&(t=e-t),t+r},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=v,e.onerror=v,!e.complete)){e.src=$;var s=this._tiles[t].coords;tt(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:s})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",$),pe.prototype._removeTile.call(this,t)},_tileReady:function(t,e,s){if(!(!this._map||s&&s.getAttribute("src")===$))return pe.prototype._tileReady.call(this,t,e,s)}});function xs(t,e){return new te(t,e)}var Ss=te.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var s=h({},this.defaultWmsParams);for(var r in e)r in this.options||(s[r]=e[r]);e=T(this,e);var u=e.detectRetina&&k.retina?2:1,p=this.getTileSize();s.width=p.x*u,s.height=p.y*u,this.wmsParams=s},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,te.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),s=this._crs,r=gt(s.project(e[0]),s.project(e[1])),u=r.min,p=r.max,_=(this._wmsVersion>=1.3&&this._crs===_s?[u.y,u.x,p.y,p.x]:[u.x,u.y,p.x,p.y]).join(","),b=te.prototype.getTileUrl.call(this,t);return b+A(this.wmsParams,b,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+_},setParams:function(t,e){return h(this.wmsParams,t),e||this.redraw(),this}});function wo(t,e){return new Ss(t,e)}te.WMS=Ss,xs.wms=wo;var Bt=St.extend({options:{padding:.1},initialize:function(t){T(this,t),f(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),H(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var s=this._map.getZoomScale(e,this._zoom),r=this._map.getSize().multiplyBy(.5+this.options.padding),u=this._map.project(this._center,e),p=r.multiplyBy(-s).add(u).subtract(this._map._getNewPixelOrigin(t,e));k.any3d?Ht(this._container,p,s):rt(this._container,p)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),s=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new Q(s,s.add(e.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Ts=Bt.extend({options:{tolerance:0},getEvents:function(){var t=Bt.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Bt.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");N(t,"mousemove",this._onMouseMove,this),N(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),N(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){ht(this._redrawRequest),delete this._ctx,tt(this._container),j(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var e in this._layers)t=this._layers[e],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Bt.prototype._update.call(this);var t=this._bounds,e=this._container,s=t.getSize(),r=k.retina?2:1;rt(e,t.min),e.width=r*s.x,e.height=r*s.y,e.style.width=s.x+"px",e.style.height=s.y+"px",k.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Bt.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[f(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,s=e.next,r=e.prev;s?s.prev=r:this._drawLast=r,r?r.next=s:this._drawFirst=s,delete t._order,delete this._layers[f(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var e=t.options.dashArray.split(/[, ]+/),s=[],r,u;for(u=0;
4u<e.length;u++){if(r=Number(e[u]),isNaN(r))return;s.push(r)}t.options._dashArray=s}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||K(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new Q,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var s=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,s.x,s.y),this._ctx.clip()}this._drawing=!0;for(var r=this._drawFirst;r;r=r.next)t=r.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var s,r,u,p,_=t._parts,b=_.length,C=this._ctx;if(b){for(C.beginPath(),s=0;s<b;s++){for(r=0,u=_[s].length;r<u;r++)p=_[s][r],C[r?"lineTo":"moveTo"](p.x,p.y);e&&C.closePath()}this._fillStroke(C,t)}}},_updateCircle:function(t){if(!(!this._drawing||t._empty())){var e=t._point,s=this._ctx,r=Math.max(Math.round(t._radius),1),u=(Math.max(Math.round(t._radiusY),1)||r)/r;u!==1&&(s.save(),s.scale(1,u)),s.beginPath(),s.arc(e.x,e.y/u,r,0,Math.PI*2,!1),u!==1&&s.restore(),this._fillStroke(s,t)}},_fillStroke:function(t,e){var s=e.options;s.fill&&(t.globalAlpha=s.fillOpacity,t.fillStyle=s.fillColor||s.color,t.fill(s.fillRule||"evenodd")),s.stroke&&s.weight!==0&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=s.opacity,t.lineWidth=s.weight,t.strokeStyle=s.color,t.lineCap=s.lineCap,t.lineJoin=s.lineJoin,t.stroke())},_onClick:function(t){for(var e=this._map.mouseEventToLayerPoint(t),s,r,u=this._drawFirst;u;u=u.next)s=u.layer,s.options.interactive&&s._containsPoint(e)&&(!(t.type==="click"||t.type==="preclick")||!this._map._draggableMoved(s))&&(r=s);this._fireEvent(r?[r]:!1,t)},_onMouseMove:function(t){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(st(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var s,r,u=this._drawFirst;u;u=u.next)s=u.layer,s.options.interactive&&s._containsPoint(e)&&(r=s);r!==this._hoveredLayer&&(this._handleMouseOut(t),r&&(H(this._container,"leaflet-interactive"),this._fireEvent([r],t,"mouseover"),this._hoveredLayer=r)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,t),this._mouseHoverThrottled=!0,setTimeout(l(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,e,s){this._map._fireDOMEvent(e,s||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var s=e.next,r=e.prev;if(s)s.prev=r;else return;r?r.next=s:s&&(this._drawFirst=s),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t)}},_bringToBack:function(t){var e=t._order;if(e){var s=e.next,r=e.prev;if(r)r.next=s;else return;s?s.prev=r:r&&(this._drawLast=r),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t)}}});function Ps(t){return k.canvas?new Ts(t):null}var me=(function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),Co={_initContainer:function(){this._container=q("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Bt.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=me("shape");H(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=me("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[f(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;tt(e),t.removeInteractiveTarget(e),delete this._layers[f(t)]},_updateStyle:function(t){var e=t._stroke,s=t._fill,r=t.options,u=t._container;u.stroked=!!r.stroke,u.filled=!!r.fill,r.stroke?(e||(e=t._stroke=me("stroke")),u.appendChild(e),e.weight=r.weight+"px",e.color=r.color,e.opacity=r.opacity,r.dashArray?e.dashStyle=F(r.dashArray)?r.dashArray.join(" "):r.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=r.lineCap.replace("butt","flat"),e.joinstyle=r.lineJoin):e&&(u.removeChild(e),t._stroke=null),r.fill?(s||(s=t._fill=me("fill")),u.appendChild(s),s.color=r.fillColor||r.color,s.opacity=r.fillOpacity):s&&(u.removeChild(s),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),s=Math.round(t._radius),r=Math.round(t._radiusY||s);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+s+","+r+" 0,"+65535*360)},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){$t(t._container)},_bringToBack:function(t){Xt(t._container)}},Ze=k.vml?me:ki,ge=Bt.extend({_initContainer:function(){this._container=Ze("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ze("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){tt(this._container),j(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Bt.prototype._update.call(this);var t=this._bounds,e=t.getSize(),s=this._container;(!this._svgSize||!this._svgSize.equals(e))&&(this._svgSize=e,s.setAttribute("width",e.x),s.setAttribute("height",e.y)),rt(s,t.min),s.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Ze("path");t.options.className&&H(e,t.options.className),t.options.interactive&&H(e,"leaflet-interactive"),this._updateStyle(t),this._layers[f(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){tt(t._path),t.removeInteractiveTarget(t._path),delete this._layers[f(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,s=t.options;e&&(s.stroke?(e.setAttribute("stroke",s.color),e.setAttribute("stroke-opacity",s.opacity),e.setAttribute("stroke-width",s.weight),e.setAttribute("stroke-linecap",s.lineCap),e.setAttribute("stroke-linejoin",s.lineJoin),s.dashArray?e.setAttribute("stroke-dasharray",s.dashArray):e.removeAttribute("stroke-dasharray"),s.dashOffset?e.setAttribute("stroke-dashoffset",s.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),s.fill?(e.setAttribute("fill",s.fillColor||s.color),e.setAttribute("fill-opacity",s.fillOpacity),e.setAttribute("fill-rule",s.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,Ii(t._parts,e))},_updateCircle:function(t){var e=t._point,s=Math.max(Math.round(t._radius),1),r=Math.max(Math.round(t._radiusY),1)||s,u="a"+s+","+r+" 0 1,0 ",p=t._empty()?"M0 0":"M"+(e.x-s)+","+e.y+u+s*2+",0 "+u+-s*2+",0 ";this._setPath(t,p)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){$t(t._path)},_bringToBack:function(t){Xt(t._path)}});k.vml&&ge.include(Co);function Es(t){return k.svg||k.vml?new ge(t):null}W.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var e=this._paneRenderers[t];return e===void 0&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Ps(t)||Es(t)}});var Os=Jt.extend({initialize:function(t,e){Jt.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))}
vendor: 6,229 bytes, line 4
4,_boundsToLatLngs:function(t){return t=ot(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function xo(t,e){return new Os(t,e)}ge.create=Ze,ge.pointsToPath=Ii,zt.geometryToLayer=ke,zt.coordsToLatLng=yi,zt.coordsToLatLngs=Ie,zt.latLngToCoords=bi,zt.latLngsToCoords=Ae,zt.getFeature=Qt,zt.asFeature=ze,W.mergeOptions({boxZoom:!0});var Ms=Ot.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){N(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){j(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){tt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),ae(),ii(),this._startPoint=this._map.mouseEventToContainerPoint(t),N(document,{contextmenu:Vt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=q("div","leaflet-zoom-box",this._container),H(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new Q(this._point,this._startPoint),s=e.getSize();rt(this._box,e.min),this._box.style.width=s.x+"px",this._box.style.height=s.y+"px"},_finish:function(){this._moved&&(tt(this._box),st(this._container,"leaflet-crosshair")),le(),si(),j(document,{contextmenu:Vt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(l(this._resetState,this),0);var e=new _t(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});W.addInitHook("addHandler","boxZoom",Ms),W.mergeOptions({doubleClickZoom:!0});var ks=Ot.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,s=e.getZoom(),r=e.options.zoomDelta,u=t.originalEvent.shiftKey?s-r:s+r;e.options.doubleClickZoom==="center"?e.setZoom(u):e.setZoomAround(t.containerPoint,u)}});W.addInitHook("addHandler","doubleClickZoom",ks),W.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Is=Ot.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Nt(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}H(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){st(this._map._container,"leaflet-grab"),st(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=ot(this._map.options.maxBounds);this._offsetLimit=gt(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,s=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(s),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),s=this._initialWorldOffset,r=this._draggable._newPos.x,u=(r-e+s)%t+e-s,p=(r+e+s)%t-e-s,_=Math.abs(u+s)<Math.abs(p+s)?u:p;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=_},_onDragEnd:function(t){var e=this._map,s=e.options,r=!s.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),r)e.fire("moveend");else{this._prunePositions(+new Date);var u=this._lastPos.subtract(this._positions[0]),p=(this._lastTime-this._times[0])/1e3,_=s.easeLinearity,b=u.multiplyBy(_/p),C=b.distanceTo([0,0]),P=Math.min(s.inertiaMaxSpeed,C),O=b.multiplyBy(P/C),z=P/(s.inertiaDeceleration*_),R=O.multiplyBy(-z/2).round();!R.x&&!R.y?e.fire("moveend"):(R=e._limitOffset(R,e.options.maxBounds),K(function(){e.panBy(R,{duration:z,easeLinearity:_,noMoveStart:!0,animate:!0})}
4))}}});W.addInitHook("addHandler","dragging",Is),W.mergeOptions({keyboard:!0,keyboardPanDelta:80});var As=Ot.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),N(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),j(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,s=t.scrollTop||e.scrollTop,r=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(r,s)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e=this._panKeys={},s=this.keyCodes,r,u;for(r=0,u=s.left.length;r<u;r++)e[s.left[r]]=[-1*t,0];for(r=0,u=s.right.length;r<u;r++)e[s.right[r]]=[t,0];for(r=0,u=s.down.length;r<u;r++)e[s.down[r]]=[0,t];for(r=0,u=s.up.length;r<u;r++)e[s.up[r]]=[0,-1*t]},_setZoomDelta:function(t){var e=this._zoomKeys={},s=this.keyCodes,r,u;for(r=0,u=s.zoomIn.length;r<u;r++)e[s.zoomIn[r]]=t;for(r=0,u=s.zoomOut.length;r<u;r++)e[s.zoomOut[r]]=-t},_addHooks:function(){N(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){j(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=t.keyCode,s=this._map,r;if(e in this._panKeys){if(!s._panAnim||!s._panAnim._inProgress)if(r=this._panKeys[e],t.shiftKey&&(r=B(r).multiplyBy(3)),s.options.maxBounds&&(r=s._limitOffset(B(r),s.options.maxBounds)),s.options.worldCopyJump){var u=s.wrapLatLng(s.unproject(s.project(s.getCenter()).add(r)));s.panTo(u)}else s.panBy(r)}else if(e in this._zoomKeys)s.setZoom(s.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else if(e===27&&s._popup&&s._popup.options.closeOnEscapeKey)s.closePopup();else return;Vt(t)}}});W.addInitHook("addHandler","keyboard",As),W.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var zs=Ot.extend({addHooks:function(){N(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){j(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=ns(t),s=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var r=Math.max(s-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(l(this._performZoom,this),r),Vt(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),s=this._map.options.zoomSnap||0;t._stop();var r=this._delta/(this._map.options.wheelPxPerZoomLevel*4),u=4*Math.log(2/(1+Math.exp(-Math.abs(r))))/Math.LN2,p=s?Math.ceil(u/s)*s:u,_=t._limitZoom(e+(this._delta>0?p:-p))-e;this._delta=0,this._startTime=null,_&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+_):t.setZoomAround(this._lastMousePos,e+_))}});W.addInitHook("addHandler","scrollWheelZoom",zs);var So=600;W.mergeOptions({tapHold:k.touchNative&&k.safari&&k.mobile,tapTolerance:15});var Bs=Ot.extend({addHooks:function(){N(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){j(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var e=t.touches[0];this._startPos=this._newPos=new M(e.clientX,e.clientY),this._holdTimeout=setTimeout(l(function(){this._cancel(),this._isTapValid()&&(N(document,"touchend",ct),N(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),So),N(document,"touchend touchcancel contextmenu",this._cancel,this),N(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){j(document,"touchend",ct),j(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),j(document,"touchend touchcancel contextmenu",this._cancel,this),j(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new M(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var s=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});s._simulated=!0,e.target.dispatchEvent(s)}});W.addInitHook("addHandler","tapHold",Bs),W.mergeOptions({touchZoom:k.touch,bounceAtZoomLimits:!0});var Ds=Ot.extend({addHooks:function(){H(this._map._container,"leaflet-touch-zoom"),N(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){st(this._map._container,"leaflet-touch-zoom"),j(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(!(!t.touches||t.touches.length!==2||e._animatingZoom||this._zooming)){var s=e.mouseEventToContainerPoint(t.touches[0]),r
4=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),e.options.touchZoom!=="center"&&(this._pinchStartLatLng=e.containerPointToLatLng(s.add(r)._divideBy(2))),this._startDist=s.distanceTo(r),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),N(document,"touchmove",this._onTouchMove,this),N(document,"touchend touchcancel",this._onTouchEnd,this),ct(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var e=this._map,s=e.mouseEventToContainerPoint(t.touches[0]),r=e.mouseEventToContainerPoint(t.touches[1]),u=s.distanceTo(r)/this._startDist;if(this._zoom=e.getScaleZoom(u,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&u<1||this._zoom>e.getMaxZoom()&&u>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,u===1)return}else{var p=s._add(r)._divideBy(2)._subtract(this._centerPoint);if(u===1&&p.x===0&&p.y===0)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(p),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),ht(this._animRequest);var _=l(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=K(_,this,!0),ct(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,ht(this._animRequest),j(document,"touchmove",this._onTouchMove,this),j(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))}});W.addInitHook("addHandler","touchZoom",Ds),W.BoxZoom=Ms,W.DoubleClickZoom=ks,W.Drag=Is,W.Keyboard=As,W.ScrollWheelZoom=zs,W.TapHold=Bs,W.TouchZoom=Ds,n.Bounds=Q,n.Browser=k,n.CRS=kt,n.Canvas=Ts,n.Circle=vi,n.CircleMarker=Me,n.Class=yt,n.Control=xt,n.DivIcon=Cs,n.DivOverlay=Mt,n.DomEvent=Gn,n.DomUtil=Hn,n.Draggable=Nt,n.Evented=G,n.FeatureGroup=It,n.GeoJSON=zt,n.GridLayer=pe,n.Handler=Ot,n.Icon=Kt,n.ImageOverlay=Be,n.LatLng=U,n.LatLngBounds=_t,n.Layer=St,n.LayerGroup=Yt,n.LineUtil=eo,n.Map=W,n.Marker=Oe,n.Mixin=Xn,n.Path=Zt,n.Point=M,n.PolyUtil=Yn,n.Polygon=Jt,n.Polyline=At,n.Popup=De,n.PosAnimation=os,n.Projection=io,n.Rectangle=Os,n.Renderer=Bt,n.SVG=ge,n.SVGOverlay=ws,n.TileLayer=te,n.Tooltip=Ne,n.Transformation=We,n.Util=ie,n.VideoOverlay=Ls,n.bind=l,n.bounds=gt,n.canvas=Ps,n.circle=uo,n.circleMarker=ho,n.control=ce,n.divIcon=bo,n.extend=h,n.featureGroup=ro,n.geoJSON=bs,n.geoJson=po,n.gridLayer=Lo,n.icon=ao,n.imageOverlay=mo,n.latLng=V,n.latLngBounds=ot,n.layerGroup=oo,n.map=Vn,n.marker=lo,n.point=B,n.polygon=fo,n.polyline=co,n.popup=vo,n.rectangle=xo,n.setOptions=T,n.stamp=f,n.svg=Es,n.svgOverlay=_o,n.tileLayer=xs,n.tooltip=yo,n.transformation=se,n.version=a,n.videoOverlay=go;var To=window.L;n.noConflict=function(){return window.L=To,this},window.L=n}))})(ye,ye.exports)),ye.exports}var Tt=or();const Pi='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>',rr='© <a href="https://api.mapy.cz/copyright" target="_blank"> Seznam.cz a.s.</a> a dalÅ¡ÃÂ';function ar(c){L.control.attribution({attribution:Pi,position:"bottomright"}).addTo(c)}const lr=L.Control.extend({options:{position:"bottomright"}
4,onAdd:function(){const c=L.DomUtil.create("div"),i=L.DomUtil.create("a","",c);return i.setAttribute("href","http://mapy.cz/"),i.setAttribute("target","_blank"),i.setAttribute("class","mapy-logo"),i.innerHTML='<img src="https://api.mapy.cz/img/api/logo.svg" alt="Mapy.cz logo" />',L.DomEvent.disableClickPropagation(i),c}});async function hr(){try{if((await fetch(`https://api.mapy.cz/v1/maptiles/basic/256/16/35922/22353?apikey=${Qs}`)).ok)return!0}catch(c){console.log(c)}return!1}async function ur(c){fr().addTo(c),new lr().addTo(c)}const cr=()=>L.tileLayer(`https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png?key=${tn}`,{attribution:Pi,subdomains:"abcd"}),dr=()=>L.tileLayer(`https://{s}.basemaps.cartocdn.com/rastertiles/voyager_labels_under/{z}/{x}/{y}{r}.png?key=${tn}`,{attribution:Pi,subdomains:"abcd",maxZoom:20});L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:19,attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'});const fr=()=>{const c=Vo()?"256@2x":"256";return L.tileLayer(`https://api.mapy.cz/v1/maptiles/basic/${c}/{z}/{x}/{y}?apikey=${Qs}`,{minZoom:0,maxZoom:19,attribution:rr})};async function pr(c,i=!1){if(!i){cr().addTo(c);return}if(await hr()){await ur(c);return}dr().addTo(c)}/*! 5 * leaflet.fullscreen 6 * (c) Bruno B.; MIT License 7 * https://github.com/brunob/leaflet.fullscreen 8 *//*! GENERATED FILE - DO NOT EDIT DIRECTLY. Edit files in src/ and run 'npm run build' */typeof document>"u"&&console.warn('"window.document" is undefined; leaflet.fullscreen requires this object to access the DOM');const qt=(()=>{const c=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"]],i=c[0],n={};for(const a of c)if(a[1]in document){for(let h=0;h<a.length;h++)n[i[h]]=a[h];return n}return!1})(),Ws={change:qt.fullscreenchange,error:qt.fullscreenerror},an={async request(c,i){c=c||document.documentElement;const n=qt.requestFullscreen;await this._callNative(()=>c[n](i))},async exit(){if(!this.isFullscreen)return;const c=qt.exitFullscreen;await this._callNative(()=>document[c]())},async _callNative(c){const i=c();if(i instanceof Promise){await i;return}await new Promise(n=>{const a=()=>{this.off("change",a),n()};this.on("change",a)})},on(c,i){const n=Ws[c];n&&document.addEventListener(n,i)},off(c,i){const n=Ws[c];n&&document.removeEventListener(n,i)},nativeAPI:qt};Object.defineProperties(an,{isFullscreen:{get(){return!!document[qt.fullscreenElement]}},isEnabled:{enumerable:!0,get(){return!!document[qt.fullscreenEnabled]}}});const mr=Tt.Control.extend({options:{position:"topleft",title:"Full Screen",titleCancel:"Exit Full Screen",forceSeparateButton:!1,forcePseudoFullscreen:!1,fullscreenElement:!1},_screenfull:an,onAdd(c){let i="leaflet-control-zoom-fullscreen",n,a="";return c.zoomControl&&!this.options.forceSeparateButton?n=c.zoomControl._container:(n=document.createElement("div"),n.className="leaflet-bar"),this.options.content?a=this.options.content:i+=" leaflet-fullscreen-icon",this._createButton(this.options.title,i,a,n,this.toggleFullScreen,this),this._map.fullscreenControl=this,this._map.on("enterFullscreen exitFullscreen",this._toggleState,this),n},onRemove(){Tt.DomEvent.off(this.link,"click",Tt.DomEvent.stop).off(this.link,"click",this.toggleFullScreen,this),this._screenfull.isEnabled&&Tt.DomEvent.off(document,this._screenfull.nativeAPI.fullscreenchange,Tt.DomEvent.stop).off(document,this._screenfull.nativeAPI.fullscreenchange,this._handleFullscreenChange,this)},_createButton(c,i,n,a,h,o){return this.link=document.createElement("a"),this.link.className=i,a.appendChild(this.link),this.link.href="#",this.link.title=c,this.link.innerHTML=n,this.link.setAttribute("role","button"),this.link.setAttribute("aria-label",c),Tt.DomEvent.disableClickPropagation(a),Tt.DomEvent.on(this.link,"click",Tt.DomEvent.stop).on(this.link,"click",h,o),this._screenfull.isEnabled&&Tt.DomEvent.on(document,this._screenfull.nativeAPI.fullscreenchange,Tt.DomEvent.stop).on(document,this._screenfull.nativeAPI.fullscreenchange,this._handleFullscreenChange,o),this.link},async toggleFullScreen(){const c=this._map,{fullscreenElement:i,forcePseudoFullscreen:n}=this.options,a=i||c.getContainer(),h=this._screenfull.isEnabled&&!n;c._isFullscreen?(c._exitFired=!0,h?await this._screenfull.exit():a.classList.remove("leaflet-pseudo-fullscreen"),c.invalidateSize(),c._isFullscreen=!1,c.fire("exitFullscreen")):(c._exitFired=!1,h?await this._screenfull.request(a):a.classList.add("leaflet-pseudo-fullscreen"),c.invalidateSize(),c._isFullscreen=!0,c.fire("enterFullscreen"))},_toggleState(){const{title:c,titleCancel:i}=this.options,n=this._map._isFullscreen;this.link.title=n?i:c,this.link.setAttribute("aria-label",this.link.title),this.link.setAttribute("aria-pressed",n.toString()),this.link.classList.toggle("leaflet-fullscreen-on",n)},_handleFullscreenChange(){const c=this._map;!this._screenfull.isFullscreen&&c._isFullscreen&&!c._exitFired&&(c._exitFired=!0,c._isFullscreen=!1,c.fire("exitFullscreen"),c.invalidateSize())}});Tt.Map.include({toggleFullscreen(){this.fullscreenControl.toggleFullScreen()}});function gr(c,i){const n=`<svg class="sprite" aria-hidden="true"><use href="${i.assets.sprites}#maximize"></use></svg>`,a=`<svg class="sprite" aria-hidden="true"><use href="${i.assets.sprites}#minimize"></use></svg>`;c.addControl(new mr({position:"topright",title:i.translates.fullScreenOn,titleCancel:i.translates.fullScreenOff,content:n})),c.on("enterFullscreen",function(){c.fullscreenControl.link.innerHTML=a}),c.on("exitFullscreen",function(){c.fullscreenControl.link.innerHTML=n})}function _r(c,i){L.control.zoom({position:"topright",zoomInTitle:i.translates.zoomIn,zoomOutTitle:i.translates.zoomOut,zoomInText:`<svg class="sprite" aria-hidden="true"><use href="${i.assets.sprites}#plus"></use></svg>`,zoomOutText:`<svg class="sprite" aria-hidden="true"><use href="${i.assets.sprites}#minus"></use></svg>`}).addTo(c)}function vr(c){Ti()?c.on("click",function(){c.dragging.enable()}):["click","mousedown"].forEach(n=>{c.on(n,function(){c.scrollWheelZoom.enable()})}),new IntersectionObserver((n,a)=>{n[0].isIntersecting||(Ti()?c.dragging.disable():c.scrollWheelZoom.disable())}).observe(c.getContainer())}var be={exports:{}},yr=be.exports,qs;function br(){return qs||(qs=1,(function(c,i){(function(n,a){a(i)})(yr,function(n){var a=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(o){L.Util.setOptions(this,o),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var l=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,l?this._withAnimation:this._noAnimation),this._markerCluster
vendor: 29,916 bytes, line 8
8=l?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(o){if(o instanceof L.LayerGroup)return this.addLayers([o]);if(!o.getLatLng)return this._nonPointGroup.addLayer(o),this.fire("layeradd",{layer:o}),this;if(!this._map)return this._needsClustering.push(o),this.fire("layeradd",{layer:o}),this;if(this.hasLayer(o))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(o,this._maxZoom),this.fire("layeradd",{layer:o}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var l=o,d=this._zoom;if(o.__parent)for(;l.__parent._zoom>=d;)l=l.__parent;return this._currentShownBounds.contains(l.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(o,l):this._animationAddLayerNonAnimated(o,l)),this},removeLayer:function(o){return o instanceof L.LayerGroup?this.removeLayers([o]):(o.getLatLng?this._map?o.__parent&&(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(o)),this._removeLayer(o,!0),this.fire("layerremove",{layer:o}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),o.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(o)&&(this._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())):(!this._arraySplice(this._needsClustering,o)&&this.hasLayer(o)&&this._needsRemoving.push({layer:o,latlng:o._latlng}),this.fire("layerremove",{layer:o})):(this._nonPointGroup.removeLayer(o),this.fire("layerremove",{layer:o})),this)},addLayers:function(o,l){if(!L.Util.isArray(o))return this.addLayer(o);var d,f=this._featureGroup,m=this._nonPointGroup,g=this.options.chunkedLoading,v=this.options.chunkInterval,y=this.options.chunkProgress,S=o.length,w=0,T=!0;if(this._map){var A=new Date().getTime(),E=L.bind(function(){var F=new Date().getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();w<S;w++){if(g&&w%200==0){var Y=new Date().getTime()-F;if(v<Y)break}if((d=o[w])instanceof L.LayerGroup)T&&(o=o.slice(),T=!1),this._extractNonGroupLayers(d,o),S=o.length;else if(d.getLatLng){if(!this.hasLayer(d)&&(this._addLayer(d,this._maxZoom),l||this.fire("layeradd",{layer:d}),d.__parent&&d.__parent.getChildCount()===2)){var $=d.__parent.getAllChildMarkers(),dt=$[0]===d?$[1]:$[0];f.removeLayer(dt)}}else m.addLayer(d),l||this.fire("layeradd",{layer:d})}y&&y(w,S,new Date().getTime()-A),w===S?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(E,this.options.chunkDelay)},this);E()}else for(var D=this._needsClustering;w<S;w++)(d=o[w])instanceof L.LayerGroup?(T&&(o=o.slice(),T=!1),this._extractNonGroupLayers(d,o),S=o.length):d.getLatLng?this.hasLayer(d)||D.push(d):m.addLayer(d);return this},removeLayers:function(o){var l,d,f=o.length,m=this._featureGroup,g=this._nonPointGroup,v=!0;if(!this._map){for(l=0;l<f;l++)(d=o[l])instanceof L.LayerGroup?(v&&(o=o.slice(),v=!1),this._extractNonGroupLayers(d,o),f=o.length):(this._arraySplice(this._needsClustering,d),g.removeLayer(d),this.hasLayer(d)&&this._needsRemoving.push({layer:d,latlng:d._latlng}),this.fire("layerremove",{layer:d}));return this}if(this._unspiderfy){this._unspiderfy();var y=o.slice(),S=f;for(l=0;l<S;l++)(d=y[l])instanceof L.LayerGroup?(this._extractNonGroupLayers(d,y),S=y.length):this._unspiderfyLayer(d)}for(l=0;l<f;l++)(d=o[l])instanceof L.LayerGroup?(v&&(o=o.slice(),v=!1),this._extractNonGroupLayers(d,o),f=o.length):d.__parent?(this._removeLayer(d,!0,!0),this.fire("layerremove",{layer:d}),m.hasLayer(d)&&(m.removeLayer(d),d.clusterShow&&d.clusterShow())):(g.removeLayer(d),this.fire("layerremove",{layer:d}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(o){o.off(this._childMarkerEventHandlers,this),delete o.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var o=new L.LatLngBounds;this._topClusterLevel&&o.extend(this._topClusterLevel._bounds);for(var l=this._needsClustering.length-1;0<=l;l--)o.extend(this._needsClustering[l].getLatLng());return o.extend(this._nonPointGroup.getBounds()),o},eachLayer:function(o,l){var d,f,m,g=this._needsClustering.slice(),v=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(g),f=g.length-1;0<=f;f--){for(d=!0,m=v.length-1;0<=m;m--)if(v[m].layer===g[f]){d=!1;break}d&&o.call(l,g[f])}this._nonPointGroup.eachLayer(o,l)},getLayers:function(){var o=[];return this.eachLayer(function(l){o.push(l)}),o},getLayer:function(o){var l=null;return o=parseInt(o,10),this.eachLayer(function(d){L.stamp(d)===o&&(l=d)}),l},hasLayer:function(o){if(!o)return!1;var l,d=this._needsClustering;for(l=d.length-1;0<=l;l--)if(d[l]===o)return!0;for(l=(d=this._needsRemoving).length-1;0<=l;l--)if(d[l].layer===o)return!1;return!(!o.__parent||o.__parent._group!==this)||this._nonPointGroup.hasLayer(o)},zoomToShowLayer:function(o,l){var d=this._map;typeof l!="function"&&(l=function(){});var f=function(){!d.hasLayer(o)&&!d.hasLayer(o.__parent)||this._inZoomAnimation||(this._map.off("moveend",f,this),this.off("animationend",f,this),d.hasLayer(o)?l():o.__parent._icon&&(this.once("spiderfied",l,this),o.__parent.spiderfy()))};o._icon&&this._map.getBounds().contains(o.getLatLng())?l():o.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",f,this),this._map.panTo(o.getLatLng())):(this._map.on("moveend",f,this),this.on("animationend",f,this),o.__parent.zoomToBounds())},onAdd:function(o){var l,d,f;if(this._map=o,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(o),this._nonPointGroup.addTo(o),this._gridClusters||this._generateInitialClusters(),this._maxLat=o.options.crs.projection.MAX_LATITUDE,l=0,d=this._needsRemoving.length;l<d;l++)(f=this._needsRemoving[l]).newlatlng=f.layer._latlng,f.layer._latlng=f.latlng;for(l=0,d=this._needsRemoving.length;l<d;l++)f=this._needsRemoving[l],this._removeLayer(f.layer,!0),f.layer._latlng=f.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),d=this._needsClustering,this._needsClustering=[],this.addLayers(d,!0)},onRemove:function(o){o.off("zoomend",this._zoomEnd,this),o.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(o){for(var l=o;l&&!l._icon;)l=l.__parent;return l||null},_arraySplice:function(o,l){for(var d=o.length-1;0<=d;d--)if(o[d]===l)return o.splice(d,1),!0},_removeFromGridUnclustered:function(o,l){for(var d=this._map,f=this._gridUnclustered,m=Math.floor(this._map.getMinZoom());m<=l&&f[l].removeObject(o,d.project(o.getLatLng(),l));l--);},_childMarkerDragStart:function(o){o.target.__dragStart=o.target._latlng},_childMarkerMoved:function(o){if(!this._ignoreMove&&!o.target.__dragStart){var l=o.target._popup&&o.target._popup.isOpen();this._moveChild(o.target,o.oldLatLng,o.latlng),l&&o.target.openPopup()}},_moveChild:function(o,l,d){o._latlng=l,this.removeLayer(o),o._latlng=d,this.addLayer(o)},_childMarkerDragEnd:function(o){var l=o.target.__dragStart;delete o.target.__dragStart,l&&this._moveChild(o.target,l,o.target._latlng)},_removeLayer:function(o,l,d){var f=this._gridClusters,m=this._gridUnclustered,g=this._featureGroup,v=this._map,y=Math.floor(this._map.getMinZoom());l&&this._removeFromGridUnclustered(o,this._maxZoom);var S,w=o.__parent,T=w._markers;for(this._arraySplice(T,o);w&&(w._childCount--,w._boundsNeedUpdate=!0,!(w._zoom<y));)l&&w._childCount<=1?(S=w._markers[0]===o?w._markers[1]:w._markers[0],f[w._zoom].removeObject(w,v.project(w._cLatLng,w._zoom)),m[w._zoom].addObject(S,v.project(S.getLatLng(),w._zoom)),this._arraySplice(w.__parent._childClusters,w),w.__parent._markers.push(S),S.__parent=w.__parent,w._icon&&(g.removeLayer(w),d||g.addLayer(S))):w._iconNeedsUpdate=!0,w=w.__parent;delete o.__parent},_isOrIsParent:function(o,l){for(;l;){if(o===l)return!0;l=l.parentNode}return!1},fire:function(o,l,d){if(l&&l.layer instanceof L.MarkerCluster){if(l.originalEvent&&this._isOrIsParent(l.layer._icon,l.originalEvent.relatedTarget))return;o="cluster"+o}L.FeatureGroup.prototype.fire.call(this,o,l,d)},listens:function(o,l){return L.FeatureGroup.prototype.listens.call(this,o,l)||L.FeatureGroup.prototype.listens.call(this,"cluster"+o,l)},_defaultIconCreateFunction:function(o){var l=o.getChildCount(),d=" marker-cluster-";return d+=l<10?"small":l<100?"medium":"large",new L.DivIcon({html:"<div><span>"+l+"</span></div>",className:"marker-cluster"+d,iconSize:new L.Point(40,40)})},_bindEvents:function(){var o=this._map,l=this.options.spiderfyOnMaxZoom,d=this.options.showCoverageOnHover,f=this.options.zoomToBoundsOnClick,m=this.options.spiderfyOnEveryZoom;(l||f||m)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),d&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),o.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(o){var l=o.layer,d=l;if(o.type!=="clusterkeypress"||!o.originalEvent||o.originalEvent.keyCode===13){for(;d._childClusters.length===1;)d=d._childClusters[0];d._zoom===this._maxZoom&&d._childCount===l._childCount&&this.options.spiderfyOnMaxZoom?l.spiderfy():this.options.zoomToBoundsOnClick&&l.zoomToBounds(),this.options.spiderfyOnEveryZoom&&l.spiderfy(),o.originalEvent&&o.originalEvent.keyCode===13&&this._map._container.focus()}},_showCoverage:function(o){var l=this._map;this._inZoomAnimation||(this._shownPolygon&&l.removeLayer(this._shownPolygon),2<o.layer.getChildCount()&&o.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(o.layer.getConvexHull(),this.options.polygonOptions),l.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var o=this.options.spiderfyOnMaxZoom,l=this.options.showCoverageOnHover,d=this.options.zoomToBoundsOnClick,f=this.options.spiderfyOnEveryZoom,m=this._map;(o||d||f)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),l&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),m.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var o=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,o),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),o),this._currentShownBounds=o}},_generateInitialClusters:function(){var o=Math.ceil(this._map.getMaxZoom()),l=Math.floor(this._map.getMinZoom()),d=this.options.maxClusterRadius,f=d;typeof d!="function"&&(f=function(){return d}),this.options.disableClusteringAtZoom!==null&&(o=this.options.disableClusteringAtZoom-1),this._maxZoom=o,this._gridClusters={},this._gridUnclustered={};for(var m=o;l<=m;m--)this._gridClusters[m]=new L.DistanceGrid(f(m)),this._gridUnclustered[m]=new L.DistanceGrid(f(m));this._topClusterLevel=new this._markerCluster(this,l-1)},_addLayer:function(o,l){var d,f,m=this._gridClusters,g=this._gridUnclustered,v=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(o),o.on(this._childMarkerEventHandlers,this);v<=l;l--){d=this._map.project(o.getLatLng(),l);var y=m[l].getNearObject(d);if(y)return y._addChild(o),void(o.__parent=y);if(y=g[l].getNearObject(d)){var S=y.__parent;S&&this._removeLayer(y,!1);var w=new this._markerCluster(this,l,y,o);m[l].addObject(w,this._map.project(w._cLatLng,l)),y.__parent=w;var T=o.__parent=w;for(f=l-1;f>S._zoom;f--)T=new this._markerCluster(this,f,T),m[f].addObject(T,this._map.project(y.getLatLng(),f));return S._addChild(T),void this._removeFromGridUnclustered(y,l)}g[l].addObject(o,d)}this._topClusterLevel._addChild(o),o.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(o){o instanceof L.MarkerCluster&&o._iconNeedsUpdate&&o._updateIcon()})},_enqueue:function(o){this._queue.push(o),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var o=0;o<this._queue.length;o++)this._queue[o].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var o=Math.round(this._map._zoom);this._processQueue(),this._zoom<o&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,o)):this._zoom>o?(this._animationStart(),this._animationZoomOut(this._zoom,o)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(o){var l=this._maxLat;return l!==void 0&&(o.getNorth()>=l&&(o._northEast.lat=1/0),o.getSouth()<=-l&&(o._southWest.lat=-1/0)),o},_animationAddLayerNonAnimated:function(o,l){if(l===o)this._featureGroup.addLayer(o);else if(l._childCount===2){l._addToMap();var d=l.getAllChildMarkers();this._featureGroup.removeLayer(d[0]),this._featureGroup.removeLayer(d[1])}else l._updateIcon()},_extractNonGroupLayers:function(o,l){var d,f=o.getLayers(),m=0;for(l=l||[];m<f.length;m++)(d=f[m])instanceof L.LayerGroup?this._extractNonGroupLayers(d,l):l.push(d);return l},_overrideMarkerIcon:function(o){return o.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[o]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(o,l){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),o),this._topClusterLevel._recursivelyAddChildrenToMap(null,l,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(o,l){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),o),this._topClusterLevel._recursivelyAddChildrenToMap(null,l,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(o,l){this._animationAddLayerNonAnimated(o,l)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(o,l){var d,f=this._getExpandedVisibleBounds(),m=this._featureGroup,g=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(f,o,g,function(v){var y,S=v._latlng,w=v._markers;for(f.contains(S)||(S=null),v._isSingleParent()&&o+1===l?(m.removeLayer(v),v._recursivelyAddChildrenToMap(null,l,f)):(v.clusterHide(),v._recursivelyAddChildrenToMap(S,l,f)),d=w.length-1;0<=d;d--)y=w[d],f.contains(y._latlng)||m.removeLayer(y)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(f,l),m.eachLayer(function(v){v instanceof L.MarkerCluster||!v._icon||v.clusterShow()}),this._topClusterLevel._recursively(f,o,l,function(v){v._recursivelyRestoreChildPositions(l)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(f,o,g,function(v){m.removeLayer(v),v.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(o,l){this._animationZoomOutSingle(this._topClusterLevel,o-1,l),this._topClusterLevel._recursivelyAddChildrenToMap(null,l,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),o,this._getExpandedVisibleBounds())},_animationAddLayer:function(o,l){var d=this,f=this._featureGroup;f.addLayer(o),l!==o&&(2<l._childCount?(l._updateIcon(),this._forceLayout(),this._animationStart(),o._setPos(this._map.latLngToLayerPoint(l.getLatLng())),o.clusterHide(),this._enqueue(function(){f.removeLayer(o),o.clusterShow(),d._animationEnd()})):(this._forceLayout(),d._animationStart(),d._animationZoomOutSingle(l,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(o,l,d){var f=this._getExpandedVisibleBounds(),m=Math.floor(this._map.getMinZoom());o._recursivelyAnimateChildrenInAndAddSelfToMap(f,m,l+1,d);var g=this;this._forceLayout(),o._recursivelyBecomeVisible(f,d),this._enqueue(function(){if(o._childCount===1){var v=o._markers[0];this._ignoreMove=!0,v.setLatLng(v.getLatLng()),this._ignoreMove=!1,v.clusterShow&&v.clusterShow()}else o._recursively(f,d,m,function(y){y._recursivelyRemoveChildrenFromMap(f,m,l+1)});g._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(o){return new L.MarkerClusterGroup(o)};var h=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(o,l,d,f){L.Marker.prototype.initialize.call(this,d?d._cLatLng||d.getLatLng():new L.LatLng(0,0),{icon:this,pane:o.options.clusterPane}),this._group=o,this._zoom=l,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,d&&this._addChild(d),f&&this._addChild(f)},getAllChildMarkers:function(o,l){o=o||[];for(var d=this._childClusters.length-1;0<=d;d--)this._childClusters[d].getAllChildMarkers(o,l);for(var f=this._markers.length-1;0<=f;f--)l&&this._markers[f].__dragStart||o.push(this._markers[f]);return o},getChildCount:function(){return this._childCount},zoomToBounds:function(o){for(var l,d=this._childClusters.slice(),f=this._group._map,m=f.getBoundsZoom(this._bounds),g=this._zoom+1,v=f.getZoom();0<d.length&&g<m;){g++;var y=[];for(l=0;l<d.length;l++)y=y.concat(d[l]._childClusters);d=y}g<m?this._group._map.setView(this._latlng,g):m<=v?this._group._map.setView(this._latlng,v+1):this._group._map.fitBounds(this._bounds,o)},getBounds:function(){var o=new L.LatLngBounds;return o.extend(this._bounds),o},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(o,l){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(o),o instanceof L.MarkerCluster?(l||(this._childClusters.push(o),o.__parent=this),this._childCount+=o._childCount):(l||this._markers.push(o),this._childCount++),this.__parent&&this.__parent._addChild(o,!0)},_setClusterCenter:function(o){this._cLatLng||(this._cLatLng=o._cLatLng||o._latlng)},_resetBounds:function(){var o=this._bounds;o._southWest&&(o._southWest.lat=1/0,o._southWest.lng=1/0),o._northEast&&(o._northEast.lat=-1/0,o._northEast.lng=-1/0)},_recalculateBounds:function(){var o,l,d,f,m=this._markers,g=this._childClusters,v=0,y=0,S=this._childCount;if(S!==0){for(this._resetBounds(),o=0;o<m.length;o++)d=m[o]._latlng,this._bounds.extend(d),v+=d.lat,y+=d.lng;for(o=0;o<g.length;o++)(l=g[o])._boundsNeedUpdate&&l._recalculateBounds(),this._bounds.extend(l._bounds),d=l._wLatLng,f=l._childCount,v+=d.lat*f,y+=d.lng*f;this._latlng=this._wLatLng=new L.LatLng(v/S,y/S),this._boundsNeedUpdate=!1}},_addToMap:function(o){o&&(this._backupLatlng=this._latlng,this.setLatLng(o)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(o,l,d){this._recursively(o,this._group._map.getMinZoom(),d-1,function(f){var m,g,v=f._markers;for(m=v.length-1;0<=m;m--)(g=v[m])._icon&&(g._setPos(l),g.clusterHide())},function(f){var m,g,v=f._childClusters;for(m=v.length-1;0<=m;m--)(g=v[m])._icon&&(g._setPos(l),g.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(o,l,d,f){this._recursively(o,f,l,function(m){m._recursivelyAnimateChildrenIn(o,m._group._map.latLngToLayerPoint(m.getLatLng()).round(),d),m._isSingleParent()&&d-1===f?(m.clusterShow(),m._recursivelyRemoveChildrenFromMap(o,l,d)):m.clusterHide(),m._addToMap()})},_recursivelyBecomeVisible:function(o,l){this._recursively(o,this._group._map.getMinZoom(),l,null,function(d){d.clusterShow()})},_recursivelyAddChildrenToMap:function(o,l,d){this._recursively(d,this._group._map.getMinZoom()-1,l,function(f){if(l!==f._zoom)for(var m=f._markers.length-1;0<=m;m--){var g=f._markers[m];d.contains(g._latlng)&&(o&&(g._backupLatlng=g.getLatLng(),g.setLatLng(o),g.clusterHide&&g.clusterHide()),f._group._featureGroup.addLayer(g))}},function(f){f._addToMap(o)})},_recursivelyRestoreChildPositions:function(o){for(var l=this._markers.length-1;0<=l;l--){var d=this._markers[l];d._backupLatlng&&(d.setLatLng(d._backupLatlng),delete d._backupLatlng)}if(o-1===this._zoom)for(var f=this._childClusters.length-1;0<=f;f--)this._childClusters[f]._restorePosition();else for(var m=this._childClusters.length-1;0<=m;m--)this._childClusters[m]._recursivelyRestoreChildPositions(o)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(o,l,d,f){var m,g;this._recursively(o,l-1,d-1,function(v){for(g=v._markers.length-1;0<=g;g--)m=v._markers[g],f&&f.contains(m._latlng)||(v._group._featureGroup.removeLayer(m),m.clusterShow&&m.clusterShow())},function(v){for(g=v._childClusters.length-1;0<=g;g--)m=v._childClusters[g],f&&f.contains(m._latlng)||(v._group._featureGroup.removeLayer(m),m.clusterShow&&m.clusterShow())})},_recursively:function(o,l,d,f,m){var g,v,y=this._childClusters,S=this._zoom;if(l<=S&&(f&&f(this),m&&S===d&&m(this)),S<l||S<d)for(g=y.length-1;0<=g;g--)(v=y[g])._boundsNeedUpdate&&v._recalculateBounds(),o.intersects(v._bounds)&&v._recursively(o,l,d,f,m)},_isSingleParent:function(){return 0<this._childClusters.length&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var o=this.options.opacity;return this.setOpacity(0),this.options.opacity=o,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(o){this._cellSize=o,this._sqCellSize=o*o,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(o,l){var d=this._getCoord(l.x),f=this._getCoord(l.y),m=this._grid,g=m[f]=m[f]||{},v=g[d]=g[d]||[],y=L.Util.stamp(o);this._objectPoint[y]=l,v.push(o)},updateObject:function(o,l){this.removeObject(o),this.addObject(o,l)},removeObject:function(o,l){var d,f,m=this._getCoord(l.x),g=this._getCoord(l.y),v=this._grid,y=v[g]=v[g]||{},S=y[m]=y[m]||[];for(delete this._objectPoint[L.Util.stamp(o)],d=0,f=S.length;d<f;d++)if(S[d]===o)return S.splice(d,1),f===1&&delete y[m],!0},eachObject:function(o,l){var d,f,m,g,v,y,S=this._grid;for(d in S)for(f in v=S[d])for(m=0,g=(y=v[f]).length;m<g;m++)o.call(l,y[m])&&(m--,g--)},getNearObject:function(o){var l,d,f,m,g,v,y,S,w=this._getCoord(o.x),T=this._getCoord(o.y),A=this._objectPoint,E=this._sqCellSize,D=null;for(l=T-1;l<=T+1;l++)if(m=this._grid[l]){for(d=w-1;d<=w+1;d++)if(g=m[d])for(f=0,v=g.length;f<v;f++)y=g[f],((S=this._sqDist(A[L.Util.stamp(y)],o))<E||S<=E&&D===null)&&(E=S,D=y)}return D},_getCoord:function(o){var l=Math.floor(o/this._cellSize);return isFinite(l)?l:o},_sqDist:function(o,l){var d=l.x-o.x,f=l.y-o.y;return d*d+f*f}},L.QuickHull={getDistant:function(o,l){var d=l[1].lat-l[0].lat;return(l[0].lng-l[1].lng)*(o.lat-l[0].lat)+d*(o.lng-l[0].lng)},findMostDistantPointFromBaseLine:function(o,l){var d,f,m,g=0,v=null,y=[];for(d=l.length-1;0<=d;d--)f=l[d],0<(m=this.getDistant(f,o))&&(y.push(f),g<m&&(g=m,v=f));return{maxPoint:v,newPoints:y}},buildConvexHull:function(o,l){var d=[],f=this.findMostDistantPointFromBaseLine(o,l);return f.maxPoint?d=(d=d.concat(this.buildConvexHull([o[0],f.maxPoint],f.newPoints))).concat(this.buildConvexHull([f.maxPoint,o[1]],f.newPoints)):[o[0]]},getConvexHull:function(o){var l,d=!1,f=!1,m=!1,g=!1,v=null,y=null,S=null,w=null,T=null,A=null;for(l=o.length-1;0<=l;l--){var E=o[l];(d===!1||E.lat>d)&&(d=(v=E).lat),(f===!1||E.lat<f)&&(f=(y=E).lat),(m===!1||E.lng>m)&&(m=(S=E).lng),(g===!1||E.lng<g)&&(g=(w=E).lng)}return T=f!==d?(A=y,v):(A=w,S),[].concat(this.buildConvexHull([A,T],o),this.buildConvexHull([T,A],o))}},L.MarkerCluster.include({getConvexHull:function(){var o,l,d=this.getAllChildMarkers(),f=[];for(l=d.length-1;0<=l;l--)o=d[l].getLatLng(),f.push(o);return L.QuickHull.getConvexHull(f)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var o,l=this.getAllChildMarkers(null,!0),d=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),o=(this._group._spiderfied=this)._group.options.spiderfyShapePositions?this._group.options.spiderfyShapePositions(l.length,d):l.length>=this._circleSpiralSwitchover?this._generatePointsSpiral(l.length,d):(d.y+=10,this._generatePointsCircle(l.length,d)),this._animationSpiderfy(l,o)}},unspiderfy:function(o){this._group._inZoomAnimation||(this._animationUnspiderfy(o),this._group._spiderfied=null)},_generatePointsCircle:function(o,l){var d,f,m=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+o)/this._2PI,g=this._2PI/o,v=[];for(m=Math.max(m,35),v.length=o,d=0;d<o;d++)f=this._circleStartAngle+d*g,v[d]=new L.Point(l.x+m*Math.cos(f),l.y+m*Math.sin(f))._round();return v},_generatePointsSpiral:function(o,l){var d,f=this._group.options.spiderfyDistanceMultiplier,m=f*this._spiralLengthStart,g=f*this._spiralFootSeparation,v=f*this._spiralLengthFactor*this._2PI,y=0,S=[];for(d=S.length=o;0<=d;d--)d<o&&(S[d]=new L.Point(l.x+m*Math.cos(y),l.y+m*Math.sin(y))._round()),m+=v/(y+=g/m+5e-4*d);return S},_noanimationUnspiderfy:function(){var o,l,d=this._group,f=d._map,m=d._featureGroup,g=this.getAllChildMarkers(null,!0);for(d._ignoreMove=!0,this.setOpacity(1),l=g.length-1;0<=l;l--)o=g[l],m.removeLayer(o),o._preSpiderfyLatlng&&(o.setLatLng(o._preSpiderfyLatlng),delete o._preSpiderfyLatlng),o.setZIndexOffset&&o.setZIndexOffset(0),o._spiderLeg&&(f.removeLayer(o._spiderLeg),delete o._spiderLeg);d.fire("unspiderfied",{cluster:this,markers:g}),d._ignoreMove=!1,d._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(o,l){var d,f,m,g,v=this._group,y=v._map,S=v._featureGroup,w=this._group.options.spiderLegPolylineOptions;for(v._ignoreMove=!0,d=0;d<o.length;d++)g=y.layerPointToLatLng(l[d]),f=o[d],m=new L.Polyline([this._latlng,g],w),y.addLayer(m),f._spiderLeg=m,f._preSpiderfyLatlng=f._latlng,f.setLatLng(g),f.setZIndexOffset&&f.setZIndexOffset(1e6),S.addLayer(f);this.setOpacity(.3),v._ignoreMove=!1,v.fire("spiderfied",{cluster:this,markers:o})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(o,l){var d,f,m,g,v,y,S=this,w=this._group,T=w._map,A=w._featureGroup,E=this._latlng,D=T.latLngToLayerPoint(E),F=L.Path.SVG,Y=L.extend({},this._group.options.spiderLegPolylineOptions),$=Y.opacity;for($===void 0&&($=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),F?(Y.opacity=0,Y.className=(Y.className||"")+" leaflet-cluster-spider-leg"):Y.opacity=$,w._ignoreMove=!0,d=0;d<o.length;d++)f=o[d],y=T.layerPointToLatLng(l[d]),m=new L.Polyline([E,y],Y),T.addLayer(m),f._spiderLeg=m,F&&(v=(g=m._path).getTotalLength()+.1,g.style.strokeDasharray=v,g.style.strokeDashoffset=v),f.setZIndexOffset&&f.setZIndexOffset(1e6),f.clusterHide&&f.clusterHide(),A.addLayer(f),f._setPos&&f._setPos(D);for(w._forceLayout(),w._animationStart(),d=o.length-1;0<=d;d--)y=T.layerPointToLatLng(l[d]),(f=o[d])._preSpiderfyLatlng=f._latlng,f.setLatLng(y),f.clusterShow&&f.clusterShow(),F&&((g=(m=f._spiderLeg)._path).style.strokeDashoffset=0,m.setStyle({opacity:$}));this.setOpacity(.3),w._ignoreMove=!1,setTimeout(function(){w._animationEnd(),w.fire("spiderfied",{cluster:S,markers:o})},200)},_animationUnspiderfy:function(o){var l,d,f,m,g,v,y=this,S=this._group,w=S._map,T=S._featureGroup,A=o?w._latLngToNewLayerPoint(this._latlng,o.zoom,o.center):w.latLngToLayerPoint(this._latlng),E=this.getAllChildMarkers(null,!0),D=L.Path.SVG;for(S._ignoreMove=!0,S._animationStart(),this.setOpacity(1),d=E.length-1;0<=d;d--)(l=E[d])._preSpiderfyLatlng&&(l.closePopup(),l.setLatLng(l._preSpiderfyLatlng),delete l._preSpiderfyLatlng,v=!0,l._setPos&&(l._setPos(A),v=!1),l.clusterHide&&(l.clusterHide(),v=!1),v&&T.removeLayer(l),D&&(g=(m=(f=l._spiderLeg)._path).getTotalLength()+.1,m.style.strokeDashoffset=g,f.setStyle({opacity:0}
8)));S._ignoreMove=!1,setTimeout(function(){var F=0;for(d=E.length-1;0<=d;d--)(l=E[d])._spiderLeg&&F++;for(d=E.length-1;0<=d;d--)(l=E[d])._spiderLeg&&(l.clusterShow&&l.clusterShow(),l.setZIndexOffset&&l.setZIndexOffset(0),1<F&&T.removeLayer(l),w.removeLayer(l._spiderLeg),delete l._spiderLeg);S._animationEnd(),S.fire("unspiderfied",{cluster:y,markers:E})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(o){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(o))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(o){this._spiderfied&&this._spiderfied.unspiderfy(o)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(o){o._spiderLeg&&(this._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow(),o.setZIndexOffset&&o.setZIndexOffset(0),this._map.removeLayer(o._spiderLeg),delete o._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(o){return o?o instanceof L.MarkerClusterGroup?o=o._topClusterLevel.getAllChildMarkers():o instanceof L.LayerGroup?o=o._layers:o instanceof L.MarkerCluster?o=o.getAllChildMarkers():o instanceof L.Marker&&(o=[o]):o=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(o),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(o),this},_flagParentsIconsNeedUpdate:function(o){var l,d;for(l in o)for(d=o[l].__parent;d;)d._iconNeedsUpdate=!0,d=d.__parent},_refreshSingleMarkerModeMarkers:function(o){var l,d;for(l in o)d=o[l],this.hasLayer(d)&&d.setIcon(this._overrideMarkerIcon(d))}}),L.Marker.include({refreshIconOptions:function(o,l){var d=this.options.icon;return L.setOptions(d,o),this.setIcon(d),l&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),n.MarkerClusterGroup=a,n.MarkerCluster=h,Object.defineProperty(n,"__esModule",{value:!0})})})(be,be.exports)),be.exports}br();function Us(c,i){const n=i.icon.src??null,a=i.icon.width??40,h=i.icon.height??50,o=i.icon.alt,l=i.label??null,d=!!n,f=document.createElement("span");if(f.classList.add("map-point__wrap"),d){const m=document.createElement("img");m.src=n,m.alt=o||"",m.width=a,m.height=h,m.loading="lazy",f.appendChild(m)}else{const m=document.createElement("span");m.classList.add("map-point__label"),m.innerText=l.toString(),f.appendChild(m)}return L.divIcon({className:"map-point",iconSize:[a,h],iconAnchor:[a/2,h],html:f})}function Lr(c,i){const n=i.title??null,a=i.subtitle??null,h=i.content??null,o=i.image??null,l=i.icons??null,d=i.href??null,f=i.tagsPrimary??null,m=i.tagsSecondary??null,g=document.createElement("div"),v=document.createElement("div"),y=document.createElement("address");g.classList.add("map-popup-inner"),v.classList.add("map-popup__head"),y.classList.add("map-popup__body");const S=document.createElement("div");if(S.classList.add("map-popup__title","color-emphasis","lh-small"),S.textContent=n??"",y.appendChild(S),o){const w=document.createElement("picture"),T=document.createElement("img");T.setAttribute("src",o.src),T.setAttribute("alt",o.alt||""),T.setAttribute("width",o.width?o.width.toString():""),T.setAttribute("height",o.height?o.height.toString():""),T.setAttribute("loading","lazy"),T.classList.add("img-responsive"),w.appendChild(T),v.appendChild(w)}if(f||m){const w=document.createElement("div");w.classList.add("map-popup__overlay"),f.length&&w.appendChild(js(f,"primary")),m.length&&w.appendChild(js(m,"secondary")),v.appendChild(w)}if(a){const w=document.createElement("div");w.classList.add("map-popup__subtitle"),w.innerHTML=a,y.appendChild(w)}if(h){const w=document.createElement("div");w.classList.add("map-popup__content"),w.innerHTML=h,y.appendChild(w)}if(l){const w=document.createElement("div");w.classList.add("icon-list","icon-list--vertical","mt-3"),l.forEach(T=>{const A=document.createElement("div");A.classList.add("icon-item");const E=document.createElement("a"),D=T.url;E.setAttribute("href",D??""),E.setAttribute("target","_blank");const F=document.createElement("span");F.classList.add("icon-item__label"),F.textContent=T.label??"",E.innerHTML=` 9 <svg class="sprite icon-item__icon" aria-hidden="true" width="24" height="24"> 10 <use href="${c.assets.sprites}#${T.icon}"></use> 11 </svg>`,E.appendChild(F),A.appendChild(E),w.appendChild(A)}),y.appendChild(w)}if(d){const w=document.createElement("a");
11w.setAttribute("href",d),w.classList.add("btn-link","mt-3");const T=document.createElement("span");T.classList.add("btn__text"),T.textContent="Detail";const E=` 12 <svg class="sprite btn__icon btn__icon--dynamic" aria-hidden="true" width="24" height="24"> 13 <use href="${c.assets.sprites}#arrow-right"></use> 14 </svg>`;w.appendChild(T),w.insertAdjacentHTML("beforeend",E),y.appendChild(w)}return(o||f!=null&&f.length||m!=null&&m.length)&&g.appendChild(v),g.appendChild(y),Gs(v,d),Gs(S,d),g}function js(c,i){const n=document.createElement("div");return n.classList.add("tag-list","tag-list--vertical",i),c.forEach(a=>{const h=document.createElement("div"),o=document.createElement("span");h.classList.add("tag","tag--small"),a.background_color&&h.classList.add(`tag--${a.background_color}`),o.innerText=a.label??"",h.appendChild(o),n.appendChild(h)}),n}function wr(c,i,n){document.querySelectorAll("[data-locator-target]").forEach(h=>{h.addEventListener("click",o=>{const l=o.target.closest("[data-locator-target]").dataset.locatorTarget,d=n.get(l);if(!d){console.warn(`Marker pro id "${l}" nebyl nalezen.`);return}Cr(c,i,d)})})}function Cr(c,i,n){i.zoomToShowLayer(n,()=>{n.openPopup()})}const $s=new Map;function xr(c,i,n){const a=L.markerClusterGroup({showCoverageOnHover:!1,zoomToBoundsOnClick:!0,disableClusteringAtZoom:19,spiderfyOnMaxZoom:!0,animate:!0,spiderLegPolylineOptions:{opacity:0},iconCreateFunction:function(h){return Us(n,{label:h.getChildCount(),icon:{width:34,height:34}})}});for(const h of c){const o=h.icon??n.assets.defaultIcon,l={icon:o,title:h.title??""},d=L.marker([h.lat,h.lng],{icon:Us(n,l)}),f=L.popup({offset:[0,o.height*-1-4],className:"map-popup",closeButton:!1,autoPan:!0}).setContent(Lr(n,h));d.bindPopup(f),d.addTo(a),$s.set(String(h.id),d)}a.addTo(i),i.on("popupopen",function(h){const o=h.target._popup._latlng;if(i.getBounds().contains(o))return;const l=i.project(o);l.y-=h.target._popup._container.clientHeight/2,i.panTo(i.unproject(l),{animate:!0})}),wr(i,a,$s)}function Sr(){const c=new IntersectionObserver((i,n)=>{const a=i[0];a.isIntersecting&&(c.unobserve(a.target),Tr(a.target))});document.querySelectorAll("[data-map]").forEach(i=>c.observe(i))}function Tr(c){const i=Pr(c),n=Er(c),a=L.DomUtil.get(c);a!=null&&(a._leaflet_id=null);const h=L.map(c,{zoomControl:!1,scrollWheelZoom:!1,dragging:!Ti(),center:[i.centerLat,i.centerLng],attributionControl:!1,zoom:i.zoom,maxZoom:i.maxZoom});pr(h,!1),ar(h),gr(h,i),_r(h,i),vr(h),n&&xr(n.points??[],h,i)}function Pr(c){try{const i=`[data-map-config="${c.dataset.map}"]`;return JSON.parse(document.querySelector(i).innerHTML)}catch{console.error(`Bad map configuration for ${c.dataset.map}`)}}function Er(c){try{const i=`[data-map-data="${c.dataset.map}"]`;return JSON.parse(document.querySelector(i).innerHTML)}catch{console.error(`Bad map data for ${c.dataset.map}`)}}function Or(){document.querySelectorAll("[data-scrollto]").forEach(i=>{i.addEventListener("click",()=>{let n;i.dataset.scrollto==="top"?n=document.querySelector("body"):i.dataset.scrollto==="next"?n=i.closest("section, header").nextElementSibling:n=document.querySelector(i.dataset.scrollto),n&&n.scrollIntoView({behavior:"smooth"})})})}/*! 15 * lightgallery | 2.9.0 | October 1st 2025 16 * http://www.lightgalleryjs.com/ 17 * Copyright (c) 2020 Sachin Neravath; 18 * @license GPLv3 19 *//*! ***************************************************************************** 20Copyright (c) Microsoft Corporation. 21 22Permission to use, copy, modify, and/or distribute this software for any 23purpose with or without fee is hereby granted. 24 25THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 26REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 27AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 28INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 29LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 30OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 31PERFORMANCE OF THIS SOFTWARE. 32***************************************************************************** */var Ft=function(){return Ft=Object.assign||function(i){for(var n,a=1,h=arguments.length;a<h;a++){n=arguments[a];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])}return i},Ft.apply(this,arguments)};function Mr(){for(var c=0,i=0,n=arguments.length;i<n;i++)c+=arguments[i].length;for(var a=Array(c),h=0,i=0;i<n;i++)for(var o=arguments[i],l=0,d=o.length;l<d;l++,h++)a[h]=o[l];return a}var X={afterAppendSlide:"lgAfterAppendSlide",init:"lgInit",hasVideo:"lgHasVideo",containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",afterAppendSubHtml:"lgAfterAppendSubHtml",beforeOpen:"lgBeforeOpen",afterOpen:"lgAfterOpen",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick",dragStart:"lgDragStart",dragMove:"lgDragMove",dragEnd:"lgDragEnd",beforeNextSlide:"lgBeforeNextSlide",beforePrevSlide:"lgBeforePrevSlide",beforeClose:"lgBeforeClose",afterClose:"lgAfterClose"},kr={mode:"lg-slide",easing:"ease",speed:400,licenseKey:"0000-0000-000-0000",height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:300,container:"",startAnimationDuration:400,zoomFromOrigin:!0,hideBarsDelay:0,showBarsAfter:1e4,slideDelay:0,supportLegacyBrowser:!0,allowMediaOverlap:!1,videoMaxSize:"1280-720",loadYouTubePoster:!0,defaultCaptionHeight:0,ariaLabelledby:"",ariaDescribedby:"",resetScrollPosition:!0,hideScrollbar:!1,closable:!0,swipeToClose:!0,closeOnTap:!0,showCloseIcon:!0,showMaximizeIcon:!1,loop:!0,escKey:!0,keyPress:!0,trapFocus:!0,controls:!0,slideEndAnimation:!0,hideControlOnEnd:!1,mousewheel:!1,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:!1,preload:2,numberOfSlideItemsInDom:10,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:0,iframeWidth:"100%",iframeHeight:"100%",iframeMaxWidth:"100%",iframeMaxHeight:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],extraProps:[],exThumbImage:"",isMobile:void 0,mobileSettings:{controls:!1,showCloseIcon:!1,download:!1},plugins:[],strings:{closeGallery:"Close gallery",toggleMaximize:"Toggle maximize",previousSlide:"Previous slide",nextSlide:"Next slide",download:"Download",playVideo:"Play video",mediaLoadingFailed:"Oops... Failed to load content..."}};function Ir(){(function(){if(typeof window.CustomEvent=="function")return!1;function c(i,n){n=n||{bubbles:!1,cancelable:!1,detail:null};var a=document.createEvent("CustomEvent");return a.initCustomEvent(i,n.bubbles,n.cancelable,n.detail),a}window.CustomEvent=c})(),(function(){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector)})()}var ln=(function(){function c(i){return this.cssVenderPrefixes=["TransitionDuration","TransitionTimingFunction","Transform","Transition"],this.selector=this._getSelector(i),this.firstElement=this._getFirstEl(),this}return c.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){var n=Math.random()*16|0,a=i=="x"?n:n&3|8;return a.toString(16)})},c.prototype._getSelector=function(i,n){if(n===void 0&&(n=document),typeof i!="str
32ing")return i;n=n||document;var a=i.substring(0,1);return a==="#"?n.querySelector(i):n.querySelectorAll(i)},c.prototype._each=function(i){return this.selector?(this.selector.length!==void 0?[].forEach.call(this.selector,i):i(this.selector,0),this):this},c.prototype._setCssVendorPrefix=function(i,n,a){var h=n.replace(/-([a-z])/gi,function(o,l){return l.toUpperCase()});this.cssVenderPrefixes.indexOf(h)!==-1?(i.style[h.charAt(0).toLowerCase()+h.slice(1)]=a,i.style["webkit"+h]=a,i.style["moz"+h]=a,i.style["ms"+h]=a,i.style["o"+h]=a):i.style[h]=a},c.prototype._getFirstEl=function(){return this.selector&&this.selector.length!==void 0?this.selector[0]:this.selector},c.prototype.isEventMatched=function(i,n){var a=n.split(".");return i.split(".").filter(function(h){return h}).every(function(h){return a.indexOf(h)!==-1})},c.prototype.attr=function(i,n){return n===void 0?this.firstElement?this.firstElement.getAttribute(i):"":(this._each(function(a){a.setAttribute(i,n)}),this)},c.prototype.find=function(i){return I(this._getSelector(i,this.selector))},c.prototype.first=function(){return this.selector&&this.selector.length!==void 0?I(this.selector[0]):I(this.selector)},c.prototype.eq=function(i){return I(this.selector[i])},c.prototype.parent=function(){return I(this.selector.parentElement)},c.prototype.get=function(){return this._getFirstEl()},c.prototype.removeAttr=function(i){var n=i.split(" ");return this._each(function(a){n.forEach(function(h){return a.removeAttribute(h)})}),this},c.prototype.wrap=function(i){if(!this.firstElement)return this;var n=document.createElement("div");return n.className=i,this.firstElement.parentNode.insertBefore(n,this.firstElement),this.firstElement.parentNode.removeChild(this.firstElement),n.appendChild(this.firstElement),this},c.prototype.addClass=function(i){return i===void 0&&(i=""),this._each(function(n){i.split(" ").forEach(function(a){a&&n.classList.add(a)})}),this},c.prototype.removeClass=function(i){return this._each(function(n){i.split(" ").forEach(function(a){a&&n.classList.remove(a)})}),this},c.prototype.hasClass=function(i){return this.firstElement?this.firstElement.classList.contains(i):!1},c.prototype.hasAttribute=function(i){return this.firstElement?this.firstElement.hasAttribute(i):!1},c.prototype.toggleClass=function(i){return this.firstElement?(this.hasClass(i)?this.removeClass(i):this.addClass(i),this):this},c.prototype.css=function(i,n){var a=this;return this._each(function(h){a._setCssVendorPrefix(h,i,n)}),this},c.prototype.on=function(i,n){var a=this;return this.selector?(i.split(" ").forEach(function(h){Array.isArray(c.eventListeners[h])||(c.eventListeners[h]=[]),c.eventListeners[h].push(n),a.selector.addEventListener(h.split(".")[0],n)}),this):this},c.prototype.once=function(i,n){var a=this;return this.on(i,function(){a.off(i),n(i)}),this},c.prototype.off=function(i){var n=this;return this.selector?(Object.keys(c.eventListeners).forEach(function(a){n.isEventMatched(i,a)&&(c.eventListeners[a].forEach(function(h){n.selector.removeEventListener(a.split(".")[0],h)}),c.eventListeners[a]=[])}),this):this},c.prototype.trigger=function(i,n){if(!this.firstElement)return this;var a=new CustomEvent(i.split(".")[0],{detail:n||null});return this.firstElement.dispatchEvent(a),this},c.prototype.load=function(i){var n=this;return fetch(i).then(function(a){return a.text()}).then(function(a){n.selector.innerHTML=a}),this},c.prototype.html=function(i){return i===void 0?this.firstElement?this.firstElement.innerHTML:"":(this._each(function(n){n.innerHTML=i}),this)},c.prototype.append=function(i){return this._each(function(n){typeof i=="string"?n.insertAdjacentHTML("beforeend",i):n.appendChild(i)}),this},c.prototype.prepend=function(i){return this._each(function(n){typeof i=="string"?n.insertAdjacentHTML("afterbegin",i):i instanceof HTMLElement&&n.insertBefore(i.cloneNode(!0),n.firstChild)}),this},c.prototype.remove=function(){return this._each(function(i){i.parentNode.removeChild(i)}),this},c.prototype.empty=function(){return this._each(function(i){i.innerHTML=""}),this},c.prototype.scrollTop=function(i){return i!==void 0?(document.body.scrollTop=i,document.documentElement.scrollTop=i,this):window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},c.prototype.scrollLeft=function(i){return i!==void 0?(document.body.scrollLeft=i,document.documentElement.scrollLeft=i,this):window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},c.prototype.offset=function(){if(!this.firstElement)return{left:0,top:0};var i=this.firstElement.getBoundingClientRect(),n=I("body").style().marginLeft;return{left:i.left-parseFloat(n)+this.scrollLeft(),top:i.top+this.scrollTop()}},c.prototype.style=function(){return this.firstElement?this.firstElement.currentStyle||window.getComputedStyle(this.firstElement):{}},c.prototype.width=function(){var i=this.style();return this.firstElement.clientWidth-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)},c.prototype.height=function(){var i=this.style();return this.firstElement.clientHeight-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)},c.eventListeners={},c})();function I(c){return Ir(),new ln(c)}var Ar=["src","sources","subHtml","subHtmlUrl","html","video","poster","slideName","responsive","srcset","sizes","iframe","downloadUrl","download","width","facebookShareUrl","tweetText","iframeTitle","twitterShareUrl","pinterestShareUrl","pinterestText","fbHtml","disqusIdentifier","disqusUrl"];function zr(c){return c==="href"?"src":(c=c.replace("data-",""),c=c.charAt(0).toLowerCase()+c.slice(1),c=c.replace(/-([a-z])/g,function(i){return i[1].toUpperCase()}),c)}var lt={fetchCaptionFromUrl:function(c,i,n){fetch(c).then(function(a){return a.text()}
32).then(function(a){if(n==="append"){var h='<div class="lg-sub-html">'+a+"</div>";i.append(h)}else i.html(a)})},getSize:function(c,i,n,a){n===void 0&&(n=0);var h=I(c),o=h.attr("data-lg-size")||a;if(o){var l=o.split(",");if(l[1])for(var d=window.innerWidth,f=0;f<l.length;f++){var m=l[f],g=parseInt(m.split("-")[2],10);if(g>d){o=m;break}f===l.length-1&&(o=m)}var v=o.split("-"),y=parseInt(v[0],10),S=parseInt(v[1],10),w=i.width(),T=i.height()-n,A=Math.min(w,y),E=Math.min(T,S),D=Math.min(A/y,E/S);return{width:y*D,height:S*D}}},getTransform:function(c,i,n,a,h){if(h){var o=I(c).find("img").first();if(o.get()){var l=i.get().getBoundingClientRect(),d=l.width,f=i.height()-(n+a),m=o.width(),g=o.height(),v=o.style(),y=(d-m)/2-o.offset().left+(parseFloat(v.paddingLeft)||0)+(parseFloat(v.borderLeft)||0)+I(window).scrollLeft()+l.left,S=(f-g)/2-o.offset().top+(parseFloat(v.paddingTop)||0)+(parseFloat(v.borderTop)||0)+I(window).scrollTop()+n,w=m/h.width,T=g/h.height,A="translate3d("+(y*=-1)+"px, "+(S*=-1)+"px, 0) scale3d("+w+", "+T+", 1)";return A}}},getIframeMarkup:function(c,i,n,a,h,o){var l=o?'title="'+o+'"':"";return'<div class="lg-media-cont lg-has-iframe" style="width:'+c+"; max-width:"+n+"; height: "+i+"; max-height:"+a+`"> 33 <iframe class="lg-object" frameborder="0" `+l+' src="'+h+`" allowfullscreen="true"></iframe> 34 </div>`},getImgMarkup:function(c,i,n,a,h,o){var l=a?'srcset="'+a+'"':"",d=h?'sizes="'+h+'"':"",f="<img "+n+" "+l+" "+d+' class="lg-object lg-image" data-index="'+c+'" src="'+i+'" />',m="";if(o){var g=typeof o=="string"?JSON.parse(o):o;m=g.map(function(v){var y="";return Object.keys(v).forEach(function(S){y+=" "+S+'="'+v[S]+'"'}),"<source "+y+"></source>"})}return""+m+f},getResponsiveSrc:function(c){for(var i=[],n=[],a="",h=0;h<c.length;h++){var o=c[h].split(" ");o[0]===""&&o.splice(0,1),n.push(o[0]),i.push(o[1])}for(var l=window.innerWidth,d=0;d<i.length;d++)if(parseInt(i[d],10)>l){a=n[d];break}return a},isImageLoaded:function(c){return!(!c||!c.complete||c.naturalWidth===0)},getVideoPosterMarkup:function(c,i,n,a,h){var o="";h&&h.youtube?o="lg-has-youtube":h&&h.vimeo?o="lg-has-vimeo":o="lg-has-html5";var l=i;return typeof i!="string"&&(l=i.outerHTML),'<div class="lg-video-cont '+o+'" style="'+n+`"> 35 <div class="lg-video-play-button"> 36 <svg
37 viewBox="0 0 20 20" 38 preserveAspectRatio="xMidYMid" 39 focusable="false" 40 aria-labelledby="`+a+`" 41 role="img" 42 class="lg-video-play-icon" 43 > 44 <title>`+a+`</title> 45 <polygon class="lg-video-play-icon-inner" points="1,0 20,10 1,20"></polygon> 46 </svg> 47 <svg class="lg-video-play-icon-bg" viewBox="0 0 50 50" focusable="false"> 48 <circle cx="50%" cy="50%" r="20"></circle></svg> 49 <svg class="lg-video-play-icon-circle" viewBox="0 0 50 50" focusable="false"> 50 <circle cx="50%" cy="50%" r="20"></circle> 51 </svg> 52 </div> 53 `+l+` 54 <img class="lg-object lg-video-poster" src="`+c+`" /> 55 </div>`},getFocusableElements:function(c){var i=c.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])'),n=[].filter.call(i,function(a){var h=window.getComputedStyle(a);return h.display!=="none"&&h.visibility!=="hidden"});return n},getDynamicOptions:function(c,i,n,a){var h=[],o=Mr(Ar,i);return[].forEach.call(c,function(l){for(var d={},f=0;f<l.attributes.length;f++){var m=l.attributes[f];if(m.specified){var g=zr(m.name),v="";o.indexOf(g)>-1&&(v=g),v&&(d[v]=m.value)}}var y=I(l),S=y.find("img").first().attr("alt"),w=y.attr("title"),T=a?y.attr(a):y.find("img").first().attr("src");d.thumb=T,n&&!d.subHtml&&(d.subHtml=w||S||""),d.alt=S||w||"",h.push(d)}),h},isMobile:function(){return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)},isVideo:function(c,i,n){if(!c){if(i)return{html5:!0};console.error("lightGallery :- data-src is not provided on slide item "+(n+1)+". Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/");return}var a=c.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)([\&|?][\S]*)*/i),h=c.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)(.*)?/i),o=c.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);if(a)return{youtube:a};if(h)return{vimeo:h};if(o)return{wistia:o}}},Xs=0,Br=(function(){function c(i,n){if(this.lgOpened=!1,this.index=0,this.plugins=[],this.lGalleryOn=!1,this.lgBusy=!1,this.currentItemsInDom=[],this.prevScrollTop=0,this.bodyPaddingRight=0,this.isDummyImageRemoved=!1,this.dragOrSwipeEnabled=!1,this.mediaContainerPosition={top:0,bottom:0},!i)return this;if(Xs++,this.lgId=Xs,this.el=i,this.LGel=I(i),this.generateSettings(n),this.buildModules(),this.settings.dynamic&&this.settings.dynamicEl!==void 0&&!Array.isArray(this.settings.dynamicEl))throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.galleryItems=this.getItems(),this.normalizeSettings(),this.init(),this.validateLicense(),this}return c.prototype.generateSettings=function(i){if(this.settings=Ft(Ft({},kr),i),this.settings.isMobile&&typeof this.settings.isMobile=="function"?this.settings.isMobile():lt.isMobile()){var n=Ft(Ft({},this.settings.mobileSettings),this.settings.mobileSettings);this.settings=Ft(Ft({},this.settings),n)}},c.prototype.normalizeSettings=function(){if(this.settings.slideEndAnimation&&(this.settings.hideControlOnEnd=!1),this.settings.closable||(this.settings.swipeToClose=!1),this.zoomFromOrigin=this.settings.zoomFromOrigin,this.settings.dynamic&&(this.zoomFromOrigin=!1),this.settings.container){var i=this.settings.container;if(typeof i=="function")this.settings.container=i();else if(typeof i=="string"){var n=document.querySelector(i);this.settings.container=n??document.body}}else this.settings.container=document.body;this.settings.preload=Math.min(this.settings.preload,this.galleryItems.length)},c.prototype.init=function(){var i=this;this.addSlideVideoInfo(this.galleryItems),this.buildStructure(),this.LGel.trigger(X.init,{instance:this}),this.settings.keyPress&&this.keyPress(),setTimeout(function(){i.enableDrag(),i.enableSwipe(),i.triggerPosterClick()},50),this.arrow(),this.settings.mousewheel&&this.mousewheel(),this.settings.dynamic||this.openGalleryOnItemClick()},c.prototype.openGalleryOnItemClick=function(){for(var i=this,n=function(o){var l=a.items[o],d=I(l),f=ln.generateUUID();d.attr("data-lg-id",f).on("click.lgcustom-item-"+f,function(m){m.preventDefault();var g=i.settings.index||o;i.openGallery(g,l)})},a=this,h=0;h<this.items.length;h++)n(h)},c.prototype.buildModules=function(){var i=this;this.settings.plugins.forEach(function(n){i.plugins.push(new n(i,I))})},c.prototype.validateLicense=function(){this.settings.licenseKey?this.settings.licenseKey==="0000-0000-000-0000"&&console.warn("lightGallery: "+this.settings.licenseKey+" license key is not val
55id for production use"):console.error("Please provide a valid license key")},c.prototype.getSlideItem=function(i){return I(this.getSlideItemId(i))},c.prototype.getSlideItemId=function(i){return"#lg-item-"+this.lgId+"-"+i},c.prototype.getIdName=function(i){return i+"-"+this.lgId},c.prototype.getElementById=function(i){return I("#"+this.getIdName(i))},c.prototype.manageSingleSlideClassName=function(){this.galleryItems.length<2?this.outer.addClass("lg-single-item"):this.outer.removeClass("lg-single-item")},c.prototype.buildStructure=function(){var i=this,n=this.$container&&this.$container.get();if(!n){var a="",h="";this.settings.controls&&(a='<button type="button" id="'+this.getIdName("lg-prev")+'" aria-label="'+this.settings.strings.previousSlide+'" class="lg-prev lg-icon"> '+this.settings.prevHtml+` </button> 56 <button type="button" id="`+this.getIdName("lg-next")+'" aria-label="'+this.settings.strings.nextSlide+'" class="lg-next lg-icon"> '+this.settings.nextHtml+" </button>"),this.settings.appendSubHtmlTo!==".lg-item"&&(h='<div class="lg-sub-html" role="status" aria-live="polite"></div>');var o="";this.settings.allowMediaOverlap&&(o+="lg-media-overlap ");var l=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':"",d=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':"",f="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?"lg-inline":""),m=this.settings.closable&&this.settings.showCloseIcon?'<button type="button" aria-label="'+this.settings.strings.closeGallery+'" id="'+this.getIdName("lg-close")+'" class="lg-close lg-icon"></button>':"",g=this.settings.showMaximizeIcon?'<button type="button" aria-label="'+this.settings.strings.toggleMaximize+'" id="'+this.getIdName("lg-maximize")+'" class="lg-maximize lg-icon"></button>':"",v=` 57 <div class="`+f+'" id="'+this.getIdName("lg-container")+'" tabindex="-1" aria-modal="true" '+l+" "+d+` role="dialog" 58 > 59 <div id="`+this.getIdName("lg-backdrop")+`" class="lg-backdrop"></div> 60 61 <div id="`+this.getIdName("lg-outer")+'" class="lg-outer lg-use-css3 lg-css3 lg-hide-items '+o+` "> 62 63 <div id="`+this.getIdName("lg-content")+`" class="lg-content"> 64 <div id="`+this.getIdName("lg-inner")+`" class="lg-inner"> 65 </div> 66 `+a+` 67 </div> 68 <div id="`+this.getIdName("lg-toolbar")+`" class="lg-toolbar lg-group"> 69 `+g+` 70 `+m+` 71 </div> 72 `+(this.settings.appendSubHtmlTo===".lg-outer"?h:"")+` 73 <div id="`+this.getIdName("lg-components")+`" class="lg-components"> 74 `+(this.settings.appendSubHtmlTo===".lg-sub-html"?h:"")+` 75 </div> 76 </div> 77 </div> 78 `;I(this.settings.container).append(v),document.body!==this.settings.container&&I(this.settings.container).css("position","relative"),this.outer=this.getElementById("lg-outer"),this.$lgComponents=this.getElementById("lg-components"),this.$backdrop=this.getElementById("lg-backdrop"),this.$container=this.getElementById("lg-container"),this.$inner=this.getElementById("lg-inner"),this.$content=this.getElementById("lg-content"),this.$toolbar=this.getElementById("lg-toolbar"),this.$backdrop.css("transition-duration",this.settings.backdropDuration+"ms");var y=this.settings.mode+" ";this.manageSingleSlideClassName(),this.settings.enableDrag&&(y+="lg-grab "),this.outer.addClass(y),this.$inner.css("transition-timing-function",this.settings.easing),this.$inner.css("transition-duration",this.settings.speed+"ms"),this.settings.download&&this.$toolbar.append('<a id="'+this.getIdName("lg-download")+'" target="_blank" rel="noopener" aria-label="'+this.settings.strings.download+'" download class="lg-download lg-icon"></a>'),this.counter(),I(window).on("resize.lg.global"+this.lgId+" orientationchange.lg.global"+this.lgId,function(){i.refreshOnResize()}),this.hideBars(),this.manageCloseGallery(),this.toggleMaximize(),this.initModules()}},c.prototype.refreshOnResize=function(){if(this.lgOpened){var i=this.galleryItems[this.index],n=i.__slideVideoInfo;this.mediaContainerPosition=this.getMediaContainerPosition();var a=this.mediaContainerPosition,h=a.top,o=a.bottom;if(this.currentImageSize=lt.getSize(this.items[this.index],this.outer,h+o,n&&this.settings.videoMaxSize),n&&this.resizeVideoSlide(this.index,this.currentImageSize),this.zoomFromOrigin&&!this.isDummyImageRemoved){var l=this.getDummyImgStyles(this.currentImageSize);this.outer.find(".lg-current .lg-dummy-img").first().attr("style",l)}this.LGel.trigger(X.containerResize)}},c.prototype.resizeVideoSlide=function(i,n){var a=this.getVideoContStyle(n),h=this.getSlideItem(i);h.find(".lg-video-cont").attr("style",a)},c.prototype.updateSlides=function(i,n){if(this.index>i.length-1&&(this.index=i.length-1),i.length===1&&(this.index=0),!i.length){this.closeGallery();return}var a=this.galleryItems[n].src;this.galleryItems=i,this.updateControls(),this.$inner.empty(),this.currentItemsInDom=[];var h=0;this.galleryItems.some(function(o,l){return o.src===a?(h=l,!0):!1}),this.currentItemsInDom=this.organizeSlideItems(h,-1),this.loadContent(h,!0),this.get
vendor: 4,692 bytes, line 78
78SlideItem(h).addClass("lg-current"),this.index=h,this.updateCurrentCounter(h),this.LGel.trigger(X.updateSlides)},c.prototype.getItems=function(){if(this.items=[],this.settings.dynamic)return this.settings.dynamicEl||[];if(this.settings.selector==="this")this.items.push(this.el);else if(this.settings.selector)if(typeof this.settings.selector=="string")if(this.settings.selectWithin){var i=I(this.settings.selectWithin);this.items=i.find(this.settings.selector).get()}else this.items=this.el.querySelectorAll(this.settings.selector);else this.items=this.settings.selector;else this.items=this.el.children;return lt.getDynamicOptions(this.items,this.settings.extraProps,this.settings.getCaptionFromTitleOrAlt,this.settings.exThumbImage)},c.prototype.shouldHideScrollbar=function(){return this.settings.hideScrollbar&&document.body===this.settings.container},c.prototype.hideScrollbar=function(){if(this.shouldHideScrollbar()){this.bodyPaddingRight=parseFloat(I("body").style().paddingRight);var i=document.documentElement.getBoundingClientRect(),n=window.innerWidth-i.width;I(document.body).css("padding-right",n+this.bodyPaddingRight+"px"),I(document.body).addClass("lg-overlay-open")}},c.prototype.resetScrollBar=function(){this.shouldHideScrollbar()&&(I(document.body).css("padding-right",this.bodyPaddingRight+"px"),I(document.body).removeClass("lg-overlay-open"))},c.prototype.openGallery=function(i,n){var a=this;if(i===void 0&&(i=this.settings.index),!this.lgOpened){this.lgOpened=!0,this.outer.removeClass("lg-hide-items"),this.hideScrollbar(),this.$container.addClass("lg-show");var h=this.getItemsToBeInsertedToDom(i,i);this.currentItemsInDom=h;var o="";h.forEach(function(y){o=o+('<div id="'+y+'" class="lg-item"></div>')}),this.$inner.append(o),this.addHtml(i);var l="";this.mediaContainerPosition=this.getMediaContainerPosition();var d=this.mediaContainerPosition,f=d.top,m=d.bottom;this.settings.allowMediaOverlap||this.setMediaContainerPosition(f,m);var g=this.galleryItems[i].__slideVideoInfo;this.zoomFromOrigin&&n&&(this.currentImageSize=lt.getSize(n,this.outer,f+m,g&&this.settings.videoMaxSize),l=lt.getTransform(n,this.outer,f,m,this.currentImageSize)),(!this.zoomFromOrigin||!l)&&(this.outer.addClass(this.settings.startClass),this.getSlideItem(i).removeClass("lg-complete"));var v=this.settings.zoomFromOrigin?100:this.settings.backdropDuration;setTimeout(function(){a.outer.addClass("lg-components-open")},v),this.index=i,this.LGel.trigger(X.beforeOpen),this.getSlideItem(i).addClass("lg-current"),this.lGalleryOn=!1,this.prevScrollTop=I(window).scrollTop(),setTimeout(function(){if(a.zoomFromOrigin&&l){var y=a.getSlideItem(i);y.css("transform",l),setTimeout(function(){y.addClass("lg-start-progress lg-start-end-progress").css("transition-duration",a.settings.startAnimationDuration+"ms"),a.outer.addClass("lg-zoom-from-image")}),setTimeout(function(){y.css("transform","translate3d(0, 0, 0)")},100)}setTimeout(function(){a.$backdrop.addClass("in"),a.$container.addClass("lg-show-in")},10),setTimeout(function(){a.settings.trapFocus&&document.body===a.settings.container&&a.trapFocus()},a.settings.backdropDuration+50),(!a.zoomFromOrigin||!l)&&setTimeout(function(){a.outer.addClass("lg-visible")},a.settings.backdropDuration),a.slide(i,!1,!1,!1),a.LGel.trigger(X.afterOpen)}),document.body===this.settings.container&&I("html").addClass("lg-on")}},c.prototype.getMediaContainerPosition=function(){if(this.settings.allowMediaOverlap)return{top:0,bottom:0};var i=this.$toolbar.get().clientHeight||0,n=this.outer.find(".lg-components .lg-sub-html").get(),a=this.settings.defaultCaptionHeight||n&&n.clientHeight||0,h=this.outer.find(".lg-thumb-outer").get(),o=h?h.clientHeight:0,l=o+a;return{top:i,bottom:l}},c.prototype.setMediaContainerPosition=function(i,n){i===void 0&&(i=0),n===void 0&&(n=0),this.$content.css("top",i+"px").css("bottom",n+"px")},c.prototype.hideBars=function(){var i=this;setTimeout(function(){i.outer.removeClass("lg-hide-items"),i.settings.hideBarsDelay>0&&(i.outer.on("mousemove.lg click.lg touchstart.lg",function(){i.outer.removeClass("lg-hide-items"),clearTimeout(i.hideBarTimeout),i.hideBarTimeout=setTimeout(function(){i.outer.addClass("lg-hide-items")},i.settings.hideBarsDelay)}),i.outer.trigger("mousemove.lg"))},this.settings.showBarsAfter)},c.prototype.initPictureFill=function(i){if(this.settings.supportLegacyBrowser)try{picturefill({elements:[i.get()]})}catch{console.warn("lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.")}},c.prototype.counter=function(){if(this.settings.counter){var i=`<div class="lg-counter" role="status" aria-l
78ive="polite"> 79 <span id="`+this.getIdName("lg-counter-current")+'" class="lg-counter-current">'+(this.index+1)+` </span> / 80 <span id="`+this.getIdName("lg-counter-all")+'" class="lg-counter-all">'+this.galleryItems.length+" </span></div>";this.outer.find(this.settings.appendCounterTo).append(i)}},c.prototype.addHtml=function(i){var n,a;if(this.galleryItems[i].subHtmlUrl?a=this.galleryItems[i].subHtmlUrl:n=this.galleryItems[i].subHtml,!a)if(n){var h=n.substring(0,1);if(h==="."||h==="#")try{this.settings.subHtmlSelectorRelative&&!this.settings.dynamic?n=I(this.items).eq(i).find(n).first().html():n=I(n).first().html()}catch{console.warn('Error processing subHtml selector "'+n+'"'),n=""}}else n="";if(this.settings.appendSubHtmlTo!==".lg-item")a?lt.fetchCaptionFromUrl(a,this.outer.find(".lg-sub-html"),"replace"):this.outer.find(".lg-sub-html").html(n);else{var o=I(this.getSlideItemId(i));a?lt.fetchCaptionFromUrl(a,o,"append"):o.append('<div class="lg-sub-html">'+n+"</div>")}typeof n<"u"&&n!==null&&(n===""?this.outer.find(this.settings.appendSubHtmlTo).addClass("lg-empty-html"):this.outer.find(this.settings.appendSubHtmlTo).removeClass("lg-empty-html")),this.LGel.trigger(X.afterAppendSubHtml,{index:i})},c.prototype.preload=function(i){for(var n=1;n<=this.settings.preload&&!(n>=this.galleryItems.length-i);n++)this.loadContent(i+n,!1);for(var a=1;a<=this.settings.preload&&!(i-a<0);a++)this.loadContent(i-a,!1)},c.prototype.getDummyImgStyles=function(i){return i?"width:"+i.width+`px; 81 margin-left: -`+i.width/2+`px; 82 margin-top: -`+i.height/2+`px; 83 height:`+i.height+"px":""},c.prototype.getVideoContStyle=function(i){return i?"width:"+i.width+`px; 84 height:`+i.height+"px":""},c.prototype.getDummyImageContent=function(i,n,a){var h;if(this.settings.dynamic||(h=I(this.items).eq(n)),h){var o=void 0;if(this.settings.exThumbImage?o=h.attr(this.settings.exThumbImage):o=h.find("img").first().attr("src"),!o)return"";var l=this.getDummyImgStyles(this.currentImageSize),d=document.createElement("img");return d.alt=a||"",d.src=o,d.className="lg-dummy-img",d.style.cssText=l,i.addClass("lg-first-slide"),this.outer.addClass("lg-first-slide-loading"),d}return""},c.prototype.setImgMarkup=function(i,n,a){var h=this.galleryItems[a],o=h.alt,l=h.srcset,d=h.sizes,f=h.sources,m="",g=o?'alt="'+o+'"':"";this.isFirstSlideWithZoomAnimation()?m=this.getDummyImageContent(n,a,g):m=lt.getImgMarkup(a,i,g,l,d,f);var v=document.createElement("picture");v.className="lg-img-wrap",I(v).append(m),n.prepend(v)},c.prototype.onSlideObjectLoad=function(i,n,a,h){var o=i.find(".lg-object").first();lt.isImageLoaded(o.get())||n?a():(o.on("load.lg error.lg",function(){a&&a()}),o.on("error.lg",function(){h&&h()}))},c.prototype.onLgObjectLoad=function(i,n,a,h,o,l){var d=this;this.onSlideObjectLoad(i,l,function(){d.triggerSlideItemLoad(i,n,a,h,o)},function(){i.addClass("lg-complete lg-complete_"),i.html('<span class="lg-error-msg">'+d.settings.strings.mediaLoadingFailed+"</span>")})},c.prototype.triggerSlideItemLoad=function(i,n,a,h,o){var l=this,d=this.galleryItems[n],f=o&&this.getSlideType(d)==="video"&&!d.poster?h:0;setTimeout(function(){i.addClass("lg-complete lg-complete_"),l.LGel.trigger(X.slideItemLoad,{index:n,delay:a||0,isFirstSlide:o})},f)},c.prototype.isFirstSlideWithZoomAnimation=function(){return!!(!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize)},c.prototype.addSlideVideoInfo=function(i){var n=this;i.forEach(function(a,h){a.__slideVideoInfo=lt.isVideo(a.src,!!a.video,h),a.__slideVideoInfo&&n.settings.loadYouTubePoster&&!a.poster&&a.__slideVideoInfo.youtube&&(a.poster="//img.youtube.com/vi/"+a.__slideVideoInfo.youtube[1]+"/maxresdefault.jpg")})},c.prototype.loadContent=function(i,n){var a=this,h=this.galleryItems[i],o=I(this.getSlideItemId(i)),l=h.poster,d=h.srcset,f=h.sizes,m=h.sources,g=h.src,v=h.video,y=v&&typeof v=="string"?JSON.parse(v):v;if(h.responsive){var S=h.responsive.split(",");g=lt.getResponsiveSrc(S)||g}var w=h.__slideVideoInfo,T="",A=!!h.iframe,E=!this.lGalleryOn,D=0;if(E&&(this.zoomFromOrigin&&this.currentImageSize?D=this.settings.startAnimationDuration+10:D=this.settings.backdropDuration+10),!o.hasClass("lg-loaded")){if(w){var F=this.mediaContainerPosition,Y=F.top,$=F.bottom,dt=lt.getSize(this.items[i],this.outer,Y+$,w&&this.settings.videoMaxSize);T=this.getVideoContStyle(dt)}if(A){var it=lt.getIframeMarkup(this.settings.iframeWidth,this.settings.iframeHeight,this.settings.iframeMaxWidth,this.settings.iframeMaxHeight,g,h.iframeTitle);o.prepend(it)}else if(l){var Z="",J=E&&this.zoomFromOrigin&&this.currentImageSize;J&&(Z=this.getDummyImageContent(o,i,""));var it=lt.getVideoPosterMarkup(l,Z||"",T,this.settings.strings.playVideo,w);o.prepend(it)}else if(w){var it='<div class="lg-video-cont " style="'+T+'"></div>';o.prepend(it)}else if(this.setImgMarkup(g,o,i),d||m){var nt=o.find(".lg-object");this.initPictureFill(nt)}(l||w)&&this.LGel.trigger(X.hasVideo,{index:i,src:g,html5Video:y,hasPoster:!!l}),this.LGel.trigger(X.afterAppendSlide,{index:i}),this.lGalleryOn&&this.settings.appendSubHtmlTo===".lg-item"&&this.addHtml(i)}var K=0;D&&!I(document.body).hasClass("lg-from-hash")&&(K=D),this.isFirstSlideWithZoomAnimation()&&(setTimeout(function(){o.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style")},this.settings.startAnimationDuration+100),o.hasClass("lg-loaded")||setTimeout(function(){if(a.getSlideType(h)==="image"){var ht=h.alt,ie=ht?'alt="'+ht+'"':"";if(o.find(".lg-img-wrap").append(lt.getImgMarkup(i,g,ie,d,f,h.sources)),d||m){var yt=o.find(".lg-object");a.initPictureFill(yt)}}(a.getSlideType(h)==="image"||a.getSlideType(h)==="video"&&l)&&(a.onLgObjectLoad(o,i,D,K,!0,!1),a.onSlideObjectLoad(o,!!(w&&w.html5&&!l),function(){a.loadContentOnFirstSlideLoad(i,o,K)},function(){a.loadContentOnFirstSlideLoad(i,o,K)}))},this.settings.startAnimationDuration+100)),o.addClass("lg-loaded"),(!this.isFirstSlideWithZoomAnimation()||this.get
vendor: 13,097 bytes, line 84
84SlideType(h)==="video"&&!l)&&this.onLgObjectLoad(o,i,D,K,E,!!(w&&w.html5&&!l)),(!this.zoomFromOrigin||!this.currentImageSize)&&o.hasClass("lg-complete_")&&!this.lGalleryOn&&setTimeout(function(){o.addClass("lg-complete")},this.settings.backdropDuration),this.lGalleryOn=!0,n===!0&&(o.hasClass("lg-complete_")?this.preload(i):o.find(".lg-object").first().on("load.lg error.lg",function(){a.preload(i)}))},c.prototype.loadContentOnFirstSlideLoad=function(i,n,a){var h=this;setTimeout(function(){n.find(".lg-dummy-img").remove(),n.removeClass("lg-first-slide"),h.outer.removeClass("lg-first-slide-loading"),h.isDummyImageRemoved=!0,h.preload(i)},a+300)},c.prototype.getItemsToBeInsertedToDom=function(i,n,a){var h=this;a===void 0&&(a=0);var o=[],l=Math.max(a,3);l=Math.min(l,this.galleryItems.length);var d="lg-item-"+this.lgId+"-"+n;if(this.galleryItems.length<=3)return this.galleryItems.forEach(function(g,v){o.push("lg-item-"+h.lgId+"-"+v)}),o;if(i<(this.galleryItems.length-1)/2){for(var f=i;f>i-l/2&&f>=0;f--)o.push("lg-item-"+this.lgId+"-"+f);for(var m=o.length,f=0;f<l-m;f++)o.push("lg-item-"+this.lgId+"-"+(i+f+1))}else{for(var f=i;f<=this.galleryItems.length-1&&f<i+l/2;f++)o.push("lg-item-"+this.lgId+"-"+f);for(var m=o.length,f=0;f<l-m;f++)o.push("lg-item-"+this.lgId+"-"+(i-f-1))}return this.settings.loop&&(i===this.galleryItems.length-1?o.push("lg-item-"+this.lgId+"-0"):i===0&&o.push("lg-item-"+this.lgId+"-"+(this.galleryItems.length-1))),o.indexOf(d)===-1&&o.push("lg-item-"+this.lgId+"-"+n),o},c.prototype.organizeSlideItems=function(i,n){var a=this,h=this.getItemsToBeInsertedToDom(i,n,this.settings.numberOfSlideItemsInDom);return h.forEach(function(o){a.currentItemsInDom.indexOf(o)===-1&&a.$inner.append('<div id="'+o+'" class="lg-item"></div>')}),this.currentItemsInDom.forEach(function(o){h.indexOf(o)===-1&&I("#"+o).remove()}),h},c.prototype.getPreviousSlideIndex=function(){var i=0;try{var n=this.outer.find(".lg-current").first().attr("id");i=parseInt(n.split("-")[3])||0}catch{i=0}return i},c.prototype.setDownloadValue=function(i){if(this.settings.download){var n=this.galleryItems[i],a=n.downloadUrl===!1||n.downloadUrl==="false";if(a)this.outer.addClass("lg-hide-download");else{var h=this.getElementById("lg-download");this.outer.removeClass("lg-hide-download"),h.attr("href",n.downloadUrl||n.src),n.download&&h.attr("download",n.download)}}},c.prototype.makeSlideAnimation=function(i,n,a){var h=this;this.lGalleryOn&&a.addClass("lg-slide-progress"),setTimeout(function(){h.outer.addClass("lg-no-trans"),h.outer.find(".lg-item").removeClass("lg-prev-slide lg-next-slide"),i==="prev"?(n.addClass("lg-prev-slide"),a.addClass("lg-next-slide")):(n.addClass("lg-next-slide"),a.addClass("lg-prev-slide")),setTimeout(function(){h.outer.find(".lg-item").removeClass("lg-current"),n.addClass("lg-current"),h.outer.removeClass("lg-no-trans")},50)},this.lGalleryOn?this.settings.slideDelay:0)},c.prototype.slide=function(i,n,a,h){var o=this,l=this.getPreviousSlideIndex();if(this.currentItemsInDom=this.organizeSlideItems(i,l),!(this.lGalleryOn&&l===i)){var d=this.galleryItems.length;if(!this.lgBusy){this.settings.counter&&this.updateCurrentCounter(i);var f=this.getSlideItem(i),m=this.getSlideItem(l),g=this.galleryItems[i],v=g.__slideVideoInfo;if(this.outer.attr("data-lg-slide-type",this.getSlideType(g)),this.setDownloadValue(i),v){var y=this.mediaContainerPosition,S=y.top,w=y.bottom,T=lt.getSize(this.items[i],this.outer,S+w,v&&this.settings.videoMaxSize);this.resizeVideoSlide(i,T)}if(this.LGel.trigger(X.beforeSlide,{prevIndex:l,index:i,fromTouch:!!n,fromThumb:!!a}),this.lgBusy=!0,clearTimeout(this.hideBarTimeout),this.arrowDisable(i),h||(i<l?h="prev":i>l&&(h="next")),!n)this.makeSlideAnimation(h,f,m);else{this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide");var A=void 0,E=void 0;d>2?(A=i-1,E=i+1,(i===0&&l===d-1||i===d-1&&l===0)&&(E=0,A=d-1)):(A=0,E=1),h==="prev"?this.getSlideItem(E).addClass("lg-next-slide"):this.getSlideItem(A).addClass("lg-prev-slide"),f.addClass("lg-current")}this.lGalleryOn?setTimeout(function(){o.loadContent(i,!0),o.settings.appendSubHtmlTo!==".lg-item"&&o.addHtml(i)},this.settings.speed+50+(n?0:this.settings.slideDelay)):this.loadContent(i,!0),setTimeout(function(){o.lgBusy=!1,m.removeClass("lg-slide-progress"),o.LGel.trigger(X.afterSlide,{prevIndex:l,index:i,fromTouch:n,fromThumb:a})},(this.lGalleryOn?this.settings.speed+100:100)+(n?0:this.settings.slideDelay))}this.index=i}},c.prototype.updateCurrentCounter=function(i){this.getElementById("lg-counter-current").html(i+1+"")},c.prototype.updateCounterTotal=function(){this.getElementById("lg-counter-all").html(this.galleryItems.length+"")},c.prototype.getSlideType=function(i){return i.__slideVideoInfo?"video":i.iframe?"iframe":"image"},c.prototype.touchMove=function(i,n,a){var h=n.pageX-i.pageX,o=n.pageY-i.pageY,l=!1;if(this.swipeDirection?l=!0:Math.abs(h)>15?(this.swipeDirection="horizontal",l=!0):Math.abs(o)>15&&(this.swipeDirection="vertical",l=!0),!!l){var d=this.getSlideItem(this.index);if(this.swipeDirection==="horizontal"){a==null||a.preventDefault(),this.outer.addClass("lg-dragging"),this.setTranslate(d,h,0);var f=d.get().offsetWidth,m=f*15/100,g=m-Math.abs(h*10/100);this.setTranslate(this.outer.find(".lg-prev-slide").first(),-f+h-g,0),this.setTranslate(this.outer.find(".lg-next-slide").first(),f+h+g,0)}else if(this.swipeDirection==="vertical"&&this.settings.swipeToClose){a==null||a.preventDefault(),this.$container.addClass("lg-dragging-vertical");var v=1-Math.abs(o)/window.innerHeight;this.$backdrop.css("opacity",v);var y=1-Math.abs(o)/(window.innerWidth*2);this.setTranslate(d,0,o,y,y),Math.abs(o)>100&&this.outer.addClass("lg-hide-items").removeClass("lg-components-open")}}},c.prototype.touchEnd=function(i,n,a){var h=this,o;this.settings.mode!=="lg-slide"&&this.outer.addClass("lg-slide"),setTimeout(function(){h.$container.removeClass("lg-dragging-vertical"),h.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open");var l=!0;if(h.swipeDirection==="horizontal"){o=i.pageX-n.pageX;var d=Math.abs(i.pageX-n.pageX);o<0&&d>h.settings.swipeThreshold?(h.goToNextSlide(!0),l=!1):o>0&&d>h.settings.swipeThreshold&&(h.goToPrevSlide(!0),l=!1)}else if(h.swipeDirection==="vertical")if(o=Math.abs(i.pageY-n.pageY),h.settings.closable&&h.settings.swipeToClose&&o>100){h.closeGallery();return}else h.$backdrop.css("opacity",1);if(h.outer.find(".lg-item").removeAttr("style"),l&&Math.abs(i.pageX-n.pageX)<5){var f=I(a.target);h.isPosterElement(f)&&h.LGel.trigger(X.posterClick)}h.swipeDirection=void 0}),setTimeout(function(){!h.outer.hasClass("lg-dragging")&&h.settings.mode!=="lg-slide"&&h.outer.removeClass("lg-slide")},this.settings.speed+100)},c.prototype.enableSwipe=function(){var i=this,n={},a={},h=!1,o=!1;this.settings.enableSwipe&&(this.$inner.on("touchstart.lg",function(l){i.dragOrSwipeEnabled=!0;var d=i.getSlideItem(i.index);(I(l.target).hasClass("lg-item")||d.get().contains(l.target))&&!i.outer.hasClass("lg-zoomed")&&!i.lgBusy&&l.touches.length===1&&(o=!0,i.touchAction="swipe",i.manageSwipeClass(),n={pageX:l.touches[0].pageX,pageY:l.touches[0].pageY})}),this.$inner.on("touchmove.lg",function(l){o&&i.touchAction==="swipe"&&l.touches.length===1&&(a={pageX:l.touches[0].pageX,pageY:l.touches[0].pageY},i.touchMove(n,a,l),h=!0)}),this.$inner.on("touchend.lg",function(l){if(i.touchAction==="swipe"){if(h)h=!1,i.touchEnd(a,n,l);else if(o){var d=I(l.target);i.isPosterElement(d)&&i.LGel.trigger(X.posterClick)}i.touchAction=void 0,o=!1}}))},c.prototype.enableDrag=function(){var i=this,n={},a={},h=!1,o=!1;this.settings.enableDrag&&(this.outer.on("mousedown.lg",function(l){i.dragOrSwipeEnabled=!0;var d=i.getSlideItem(i.index);(I(l.target).hasClass("lg-item")||d.get().contains(l.target))&&!i.outer.hasClass("lg-zoomed")&&!i.lgBusy&&(l.preventDefault(),i.lgBusy||(i.manageSwipeClass(),n={pageX:l.pageX,pageY:l.pageY},h=!0,i.outer.get().scrollLeft+=1,i.outer.get().scrollLeft-=1,i.outer.removeClass("lg-grab").addClass("lg-grabbing"),i.LGel.trigger(X.dragStart)))}),I(window).on("mousemove.lg.global"+this.lgId,function(l){h&&i.lgOpened&&(o=!0,a={pageX:l.pageX,pageY:l.pageY},i.touchMove(n,a),i.LGel.trigger(X.dragMove))}),I(window).on("mouseup.lg.global"+this.lgId,function(l){if(i.lgOpened){var d=I(l.target);o?(o=!1,i.touchEnd(a,n,l),i.LGel.trigger(X.dragEnd)):i.isPosterElement(d)&&i.LGel.trigger(X.posterClick),h&&(h=!1,i.outer.removeClass("lg-grabbing").addClass("lg-grab"))}}))},c.prototype.triggerPosterClick=function(){var i=this;this.$inner.on("click.lg",function(n){!i.dragOrSwipeEnabled&&i.isPosterElement(I(n.target))&&i.LGel.trigger(X.posterClick)})},c.prototype.manageSwipeClass=function(){var i=this.index+1,n=this.index-1;this.settings.loop&&this.galleryItems.length>2&&(this.index===0?n=this.galleryItems.length-1:this.index===this.galleryItems.length-1&&(i=0)),this.outer.find(".lg-item").removeClass("lg-next-slide lg-prev-slide"),n>-1&&this.getSlideItem(n).addClass("lg-prev-slide"),this.getSlideItem(i).addClass("lg-next-slide")},c.prototype.goToNextSlide=function(i){var n=this,a=this.settings.loop;i&&this.galleryItems.length<3&&(a=!1),this.lgBusy||(this.index+1<this.galleryItems.length?(this.index++,this.LGel.trigger(X.beforeNextSlide,{index:this.index}),this.slide(this.index,!!i,!1,"next")):a?(this.index=0,this.LGel.trigger(X.beforeNextSlide,{index:this.index}),this.slide(this.index,!!i,!1,"next")):this.settings.slideEndAnimation&&!i&&(this.outer.addClass("lg-right-end"),setTimeout(function(){n.outer.removeClass("lg-right-end")},400)))},c.prototype.goToPrevSlide=function(i){var n=this,a=this.settings.loop;i&&this.galleryItems.length<3&&(a=!1),this.lgBusy||(this.index>0?(this.index--,this.LGel.trigger(X.beforePrevSlide,{index:this.index,fromTouch:i}),this.slide(this.index,!!i,!1,"prev")):a?(this.index=this.galleryItems.length-1,this.LGel.trigger(X.beforePrevSlide,{index:this.index,fromTouch:i}),this.slide(this.index,!!i,!1,"prev")):this.settings.slideEndAnimation&&!i&&(this.outer.addClass("lg-left-end"),setTimeout(function(){n.outer.removeClass("lg-left-end")},400)))},c.prototype.keyPress=function(){var i=this;I(window).on("keydown.lg.global"+this.lgId,function(n){i.lgOpened&&i.settings.escKey===!0&&n.keyCode===27&&(n.preventDefault(),i.settings.allowMediaOverlap&&i.outer.hasClass("lg-can-toggle")&&i.outer.hasClass("lg-components-open")?i.outer.removeClass("lg-components-open"):i.closeGallery()),i.lgOpened&&i.galleryItems.length>1&&(n.keyCode===37&&(n.preventDefault(),i.goToPrevSlide()),n.keyCode===39&&(n.preventDefault(),i.goToNextSlide()))})},c.prototype.arrow=function(){var i=this;this.getElementById("lg-prev").on("click.lg",function(){i.goToPrevSlide()}),this.getElementById("lg-next").on("click.lg",function(){i.goToNextSlide()})},c.prototype.arrowDisable=function(i){if(!this.settings.loop&&this.settings.hideControlOnEnd){var n=this.getElementById("lg-prev"),a=this.getElementById("lg-next");i+1===this.galleryItems.length?a.attr("disabled","disabled").addClass("disabled"):a.removeAttr("disabled").removeClass("disabled"),i===0?n.attr("disabled","disabled").addClass("disabled"):n.removeAttr("disabled").removeClass("disabled")}},c.prototype.setTranslate=function(i,n,a,h,o){h===void 0&&(h=1),o===void 0&&(o=1),i.css("transform","translate3d("+n+"px, "+a+"px, 0px) scale3d("+h+", "+o+", 1)")},c.prototype.mousewheel=function(){var i=this,n=0;this.outer.on("wheel.lg",function(a){if(!(!a.deltaY||i.galleryItems.length<2)){a.preventDefault();var h=new Date().getTime();h-n<1e3||(n=h,a.deltaY>0?i.goToNextSlide():a.deltaY<0&&i.goToPrevSlide())}})},c.prototype.isSlideElement=function(i){return i.hasClass("lg-outer")||i.hasClass("lg-item")||i.hasClass("lg-img-wrap")||i.hasClass("lg-img-rotate")},c.prototype.isPosterElement=function(i){var n=this.getSlideItem(this.index).find(".lg-video-play-button").get();return i.hasClass("lg-video-poster")||i.hasClass("lg-video-play-button")||n&&n.contains(i.get())},c.prototype.toggleMaximize=function(){var i=this;this.getElementById("lg-maximize").on("click.lg",function(){i.$container.toggleClass("lg-inline"),i.refreshOnResize()})},c.prototype.invalidateItems=function(){for(var i=0;i<this.items.length;i++){var n=this.items[i],a=I(n);a.off("click.lgcustom-item-"+a.attr("data-lg-id"))}},c.prototype.trapFocus=function(){var i=this;this.$container.get().focus({preventScroll:!0}),I(window).on("keydown.lg.global"+this.lgId,function(n){if(i.lgOpened){var a=n.key==="Tab"||n.keyCode===9;if(a){var h=lt.getFocusableElements(i.$container.get()),o=h[0],l=h[h.length-1];n.shiftKey?document.activeElement===o&&(l.focus(),n.preventDefault()):document.activeElement===l&&(o.focus(),n.preventDefault())}}})},c.prototype.manageCloseGallery=function(){var i=this;if(this.settings.closable){var n=!1;this.getElementById("lg-close").on("click.lg",function(){i.closeGallery()}),this.settings.closeOnTap&&(this.outer.on("mousedown.lg",function(a){var h=I(a.target);i.isSlideElement(h)?n=!0:n=!1}),this.outer.on("mousemove.lg",function(){n=!1}),this.outer.on("mouseup.lg",function(a){var h=I(a.target);
84i.isSlideElement(h)&&n&&(i.outer.hasClass("lg-dragging")||i.closeGallery())}))}},c.prototype.closeGallery=function(i){var n=this;if(!this.lgOpened||!this.settings.closable&&!i)return 0;this.LGel.trigger(X.beforeClose),this.settings.resetScrollPosition&&!this.settings.hideScrollbar&&I(window).scrollTop(this.prevScrollTop);var a=this.items[this.index],h;if(this.zoomFromOrigin&&a){var o=this.mediaContainerPosition,l=o.top,d=o.bottom,f=this.galleryItems[this.index],m=f.__slideVideoInfo,g=f.poster,v=lt.getSize(a,this.outer,l+d,m&&g&&this.settings.videoMaxSize);h=lt.getTransform(a,this.outer,l,d,v)}this.zoomFromOrigin&&h?(this.outer.addClass("lg-closing lg-zoom-from-image"),this.getSlideItem(this.index).addClass("lg-start-end-progress").css("transition-duration",this.settings.startAnimationDuration+"ms").css("transform",h)):(this.outer.addClass("lg-hide-items"),this.outer.removeClass("lg-zoom-from-image")),this.destroyModules(),this.lGalleryOn=!1,this.isDummyImageRemoved=!1,this.zoomFromOrigin=this.settings.zoomFromOrigin,clearTimeout(this.hideBarTimeout),this.hideBarTimeout=!1,I("html").removeClass("lg-on"),this.outer.removeClass("lg-visible lg-components-open"),this.$backdrop.removeClass("in").css("opacity",0);var y=this.zoomFromOrigin&&h?Math.max(this.settings.startAnimationDuration,this.settings.backdropDuration):this.settings.backdropDuration;return this.$container.removeClass("lg-show-in"),setTimeout(function(){n.zoomFromOrigin&&h&&n.outer.removeClass("lg-zoom-from-image"),n.$container.removeClass("lg-show"),n.resetScrollBar(),n.$backdrop.removeAttr("style").css("transition-duration",n.settings.backdropDuration+"ms"),n.outer.removeClass("lg-closing "+n.settings.startClass),n.getSlideItem(n.index).removeClass("lg-start-end-progress"),n.$inner.empty(),n.lgOpened&&n.LGel.trigger(X.afterClose,{instance:n}),n.$container.get()&&n.$container.get().blur(),n.lgOpened=!1},y+100),y+100},c.prototype.initModules=function(){this.plugins.forEach(function(i){try{i.init()}catch{console.warn("lightGallery:- make sure lightGallery module is properly initiated")}})},c.prototype.destroyModules=function(i){this.plugins.forEach(function(n){try{i?n.destroy():n.closeGallery&&n.closeGallery()}catch{console.warn("lightGallery:- make sure lightGallery module is properly destroyed")}})},c.prototype.refresh=function(i){this.settings.dynamic||this.invalidateItems(),i?this.galleryItems=i:this.galleryItems=this.getItems(),this.updateControls(),this.openGalleryOnItemClick(),this.LGel.trigger(X.updateSlides)},c.prototype.updateControls=function(){this.addSlideVideoInfo(this.galleryItems),this.updateCounterTotal(),this.manageSingleSlideClassName()},c.prototype.destroyGallery=function(){this.destroyModules(!0),this.settings.dynamic||this.invalidateItems(),I(window).off(".lg.global"+this.lgId),this.LGel.off(".lg"),this.$container.remove()},c.prototype.destroy=function(){var i=this.closeGallery(!0);return i?setTimeout(this.destroyGallery.bind(this),i):this.destroyGallery(),i},c})();function Dr(c,i){return new Br(c,i)}/*! 85 * lightgallery | 2.9.0 | October 1st 2025 86 * http://www.lightgalleryjs.com/ 87 * Copyright (c) 2020 Sachin Neravath; 88 * @license GPLv3 89 *//*! ***************************************************************************** 90Copyright (c) Microsoft Corporation. 91 92Permission to use, copy, modify, and/or distribute this software for any 93purpose with or without fee is hereby granted. 94 95THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 96REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 97AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 98INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 99LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 100OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 101PERFORMANCE OF THIS SOFTWARE. 102***************************************************************************** */var Ut=function(){return Ut=Object.assign||function(i){for(var n,a=1,h=arguments.length;a<h;a++){n=arguments[a];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])}return i},Ut.apply(this,arguments)},Nr={autoplayFirstVideo:!0,youTubePlayerParams:!1,vimeoPlayerParams:!1,wistiaPlayerParams:!1,gotoNextSlideOnVideoEnd:!0,autoplayVideoOnSlide:!1,videojs:!1,videojsTheme:"",videojsOptions:{}},_e={hasVideo:"lgHasVideo",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick"},Ei=function(c){return Object.keys(c).map(function(i){return encodeURIComponent(i)+"="+encodeURIComponent(c[i])}).join("&")},Zr=function(c){var i=c.slice(1).split("&").map(function(n){return n.split("=")}).reduce(function(n,a){var h=a.map(decodeURIComponent),o=h[0],l=h[1];return n[o]=l,n},{});return i},Fr=function(c,i){if(!c.youtube)return"";var n=c.youtube[2]?Zr(c.youtube[2]):"",a={wmode:"opaque",autoplay:0,mute:1,enablejsapi:1},h=i||{},o=Ut(Ut(Ut({},a),h),n),l="?"+Ei(o);return l},Hr=function(c){return c.includes("youtube-nocookie.com")},Rr=function(c,i){if(!i||!i.vimeo)return"";var n=i.vimeo[2]||"",a=Object.assign({},{autoplay:0,muted:1},c),h=a&&Object.keys(a).length!==0?Ei(a):"",o=i.vimeo[0].split("/").pop()||"",l=o.split("?")[0]||"",d=l.split("#")[0],f=i.vimeo[1]!==d;f&&(n=n.replace("/"+d,"")),n=n[0]=="?"?"&"+n.slice(1):n||"";var m=f?"h="+d:"";h=m?"&"+h:h;var g="?"+m+h+n;return g},Gr=(function(){function c(i){return this.core=i,this.settings=Ut(Ut({},Nr),this.core.settings),this}return c.prototype.init=function(){var i=this;this.core.LGel.on(_e.hasVideo+".video",this.onHasVideo.bind(this)),this.core.LGel.on(_e.posterClick+".video",function(){var n=i.core.getSlideItem(i.core.index);i.loadVideoOnPosterClick(n)}),this.core.LGel.on(_e.slideItemLoad+".video",this.onSlideItemLoad.bind(this)),this.core.LGel.on(_e.beforeSlide+".video",this.onBeforeSlide.bind(this)),this.core.LGel.on(_e.afterSlide+".video",this.onAfterSlide.bind(this))},c.prototype.onSlideItemLoad=function(i){var n=this,a=i.detail,h=a.isFirstSlide,o=a.index;this.settings.autoplayFirstVideo&&h&&o===this.core.index&&setTimeout(function(){n.loadAndPlayVideo(o)},200),!h&&this.settings.autoplayVideoOnSlide&&o===this.core.index&&this.loadAndPlayVideo(o)},c.prototype.onHasVideo=function(i){var n=i.detail,a=n.index,h=n.src,o=n.html5Video,l=n.hasPoster;l||(this.appendVideos(this.core.getSlideItem(a),{src:h,addClass:"lg-object",index:a,html5Video:o}),this.gotoNextSlideOnVideoEnd(h,a))},c.prototype.onBeforeSlide=function(i){if(this.core.lGalleryOn){var n=i.detail.prevIndex;this.pauseVideo(n)}},c.prototype.onAfterSlide=function(i){var n=this,a=i.detail,h=a.index,o=a.prevIndex,l=this.core.getSlideItem(h);this.settings.autoplayVideoOnSlide&&h!==o&&l.hasClass("lg-complete")&&setTimeout(function(){n.loadAndPlayVideo(h)},100)},c.prototype.loadAndPlayVideo=function(i){var n=this.core.getSlideItem(i),a=this.core.galleryItems[i];a.poster?this.loadVideoOnPosterClick(n,!0):this.playVideo(i)},c.prototype.playVideo=function(i){this.controlVideo(i,"play")},c.prototype.pauseVideo=function(i){this.controlVideo(i,"pause")},c.prototype.getVideoHtml=function(i,n,a,h){var o="",l=this.core.galleryItems[a].__slideVideoInfo||{},d=this.core.galleryItems[a],f=d.title||d.alt;f=f?'title="'+f+'"':"";var m=`allowtransparency="true" 103 frameborder="0" 104 scrolling="no" 105 allowfullscreen 106 mozallowfullscreen 107 webkitallowfullscreen 108 oallowfullscreen 109 msallowfullscreen`;if(l.youtube){var g="lg-youtube"+a,v=Fr(l,this.settings.youTubePlayerParams),y=Hr(i),S=y?"//www.youtube-nocookie.com/":"//www.youtube.com/";o='<iframe allow="autoplay" id='+g+' class="lg-video-object lg-youtube '+n+'" '+f+' src="'+S+"embed/"+(l.youtube[1]+v)+'" '+m+"></iframe>"}else if(l.vimeo){var g="lg-vimeo"+a,w=Rr(this.settings.vimeoPlayerParams,l);o='<iframe allow="autoplay" id='+g+' class="lg-video-object lg-vimeo '+n+'" '+f+' src="//player.vimeo.com/video/'+(l.vimeo[1]+w)+'" '+m+"></iframe>"}else if(l.wistia){var T="lg-wistia"+a,w=Ei(this.settings.wistiaPlayerParams);w=w?"?"+w:"",o='<iframe allow="autoplay" id="'+T+'" src="//fast.wistia.net/embed/iframe/'+(l.wistia[4]+w)+'" '+f+' class="wistia_embed lg-video-object lg-wistia '+n+'" name="wistia_embed" '+m+"></iframe>"}else if(l.html5){for(var A="",E=0;
109E<h.source.length;E++){var D=h.source[E].type,F=D?'type="'+D+'"':"";A+='<source src="'+h.source[E].src+'" '+F+">"}if(h.tracks)for(var Y=function(it){var Z="",J=h.tracks[it];Object.keys(J||{}).forEach(function(nt){Z+=nt+'="'+J[nt]+'" '}),A+="<track "+Z+">"},E=0;E<h.tracks.length;E++)Y(E);var $="",dt=h.attributes||{};Object.keys(dt||{}).forEach(function(it){$+=it+'="'+dt[it]+'" '}),o='<video class="lg-video-object lg-html5 '+(this.settings.videojs&&this.settings.videojsTheme?this.settings.videojsTheme+" ":"")+" "+(this.settings.videojs?" video-js":"")+'" '+$+`> 110 `+A+` 111 Your browser does not support HTML5 video. 112 </video>`}return o},c.prototype.appendVideos=function(i,n){var a,h=this.getVideoHtml(n.src,n.addClass,n.index,n.html5Video);i.find(".lg-video-cont").append(h);var o=i.find(".lg-video-object").first();if(n.html5Video&&o.on("mousedown.lg.video",function(l){l.stopPropagation()}),this.settings.videojs&&(!((a=this.core.galleryItems[n.index].__slideVideoInfo)===null||a===void 0)&&a.html5))try{return videojs(o.get(),this.settings.videojsOptions)}catch{console.error("lightGallery:- Make sure you have included videojs")}},c.prototype.gotoNextSlideOnVideoEnd=function(i,n){var a=this,h=this.core.getSlideItem(n).find(".lg-video-object").first(),o=this.core.galleryItems[n].__slideVideoInfo||{};if(this.settings.gotoNextSlideOnVideoEnd){if(o.html5)h.on("ended",function(){a.core.goToNextSlide()});else if(o.vimeo)try{new Vimeo.Player(h.get()).on("ended",function(){a.core.goToNextSlide()})}catch{console.error("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(o.wistia)try{window._wq=window._wq||[],window._wq.push({id:h.attr("id"),onReady:function(l){l.bind("end",function(){a.core.goToNextSlide()})}})}catch{console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}}},c.prototype.controlVideo=function(i,n){var a=this.core.getSlideItem(i).find(".lg-video-object").first(),h=this.core.galleryItems[i].__slideVideoInfo||{};if(a.get()){if(h.youtube)try{a.get().contentWindow.postMessage('{"event":"command","func":"'+n+'Video","args":""}',"*")}catch(o){console.error("lightGallery:- "+o)}else if(h.vimeo)try{new Vimeo.Player(a.get())[n]()}catch{console.error("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(h.html5)if(this.settings.videojs)try{videojs(a.get())[n]()}catch{console.error("lightGallery:- Make sure you have included videojs")}else a.get()[n]();else if(h.wistia)try{window._wq=window._wq||[],window._wq.push({id:a.attr("id"),onReady:function(o){o[n]()}})}catch{console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}}},c.prototype.loadVideoOnPosterClick=function(i,n){var a=this;if(i.hasClass("lg-video-loaded"))n&&this.playVideo(this.core.index);else if(i.hasClass("lg-has-video"))this.playVideo(this.core.index);else{i.addClass("lg-has-video");var h=void 0,o=this.core.galleryItems[this.core.index].src,l=this.core.galleryItems[this.core.index].video;l&&(h=typeof l=="string"?JSON.parse(l):l);var d=this.appendVideos(i,{src:o,addClass:"",index:this.core.index,html5Video:h});this.gotoNextSlideOnVideoEnd(o,this.core.index);var f=i.find(".lg-object").first().get();i.find(".lg-video-cont").first().append(f),i.addClass("lg-video-loading"),d&&d.ready(function(){d.on("loadedmetadata",function(){a.onVideoLoadAfterPosterClick(i,a.core.index)})}),i.find(".lg-video-object").first().on("load.lg error.lg loadedmetadata.lg",function(){setTimeout(function(){a.onVideoLoadAfterPosterClick(i,a.core.index)},50)})}},c.prototype.onVideoLoadAfterPosterClick=function(i,n){i.addClass("lg-video-loaded"),this.playVideo(n)},c.prototype.destroy=function(){this.core.LGel.off(".lg.video"),this.core.LGel.off(".video")},c})();/*! 113 * lightgallery | 2.9.0 | October 1st 2025 114 * http://www.lightgalleryjs.com/ 115 * Copyright (c) 2020 Sachin Neravath; 116 * @license GPLv3 117 *//*! ***************************************************************************** 118Copyright (c) Microsoft Corporation. 119 120Permission to use, copy, modify, and/or distribute this software for any 121purpose with or without fee is hereby granted. 122 123THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 124REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 125AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 126INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 127LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 128OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 129PERFORMANCE OF THIS SOFTWARE. 130***************************************************************************** */var Re=function(){return Re=Object.assign||function(i){for(var n,a=1,h=arguments.length;a<h;a++){n=arguments[a];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])}return i},Re.apply(this,arguments)},Vr={thumbnail:!0,animateThumb:!0,currentPagerPosition:"middle",alignThumbnails:"middle",thumbWidth:100,thumbHe
vendor: 6,589 bytes, lines 130-133
130ight:"80px",thumbMargin:5,appendThumbnailsTo:".lg-components",toggleThumb:!1,enableThumbDrag:!0,enableThumbSwipe:!0,thumbnailSwipeThreshold:10,loadYouTubeThumbnail:!0,youTubeThumbSize:1,thumbnailPluginStrings:{toggleThumbnails:"Toggle thumbnails"}},ve={containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",beforeOpen:"lgBeforeOpen",beforeSlide:"lgBeforeSlide"},Wr=(function(){function c(i,n){return this.thumbOuterWidth=0,this.thumbTotalWidth=0,this.translateX=0,this.thumbClickable=!1,this.core=i,this.$LG=n,this}return c.prototype.init=function(){this.settings=Re(Re({},Vr),this.core.settings),this.thumbOuterWidth=0,this.thumbTotalWidth=this.core.galleryItems.length*(this.settings.thumbWidth+this.settings.thumbMargin),this.translateX=0,this.setAnimateThumbStyles(),this.core.settings.allowMediaOverlap||(this.settings.toggleThumb=!1),this.settings.thumbnail&&(this.build(),this.settings.animateThumb?(this.settings.enableThumbDrag&&this.enableThumbDrag(),this.settings.enableThumbSwipe&&this.enableThumbSwipe(),this.thumbClickable=!1):this.thumbClickable=!0,this.toggleThumbBar(),this.thumbKeyPress())},c.prototype.build=function(){var i=this;this.setThumbMarkup(),this.manageActiveClassOnSlideChange(),this.$lgThumb.first().on("click.lg touchend.lg",function(n){var a=i.$LG(n.target);a.hasAttribute("data-lg-item-id")&&setTimeout(function(){if(i.thumbClickable&&!i.core.lgBusy){var h=parseInt(a.attr("data-lg-item-id"));i.core.slide(h,!1,!0,!1)}},50)}),this.core.LGel.on(ve.beforeSlide+".thumb",function(n){var a=n.detail.index;i.animateThumb(a)}),this.core.LGel.on(ve.beforeOpen+".thumb",function(){i.thumbOuterWidth=i.core.outer.get().offsetWidth}),this.core.LGel.on(ve.updateSlides+".thumb",function(){i.rebuildThumbnails()}),this.core.LGel.on(ve.containerResize+".thumb",function(){i.core.lgOpened&&setTimeout(function(){i.thumbOuterWidth=i.core.outer.get().offsetWidth,i.animateThumb(i.core.index),i.thumbOuterWidth=i.core.outer.get().offsetWidth},50)})},c.prototype.setThumbMarkup=function(){var i="lg-thumb-outer ";this.settings.alignThumbnails&&(i+="lg-thumb-align-"+this.settings.alignThumbnails);var n='<div class="'+i+`"> 131 <div class="lg-thumb lg-group"> 132 </div> 133 </div>`;this.core.outer.addClass("lg-has-thumb"),this.settings.appendThumbnailsTo===".lg-components"?this.core.$lgComponents.append(n):this.core.outer.append(n),this.$thumbOuter=this.core.outer.find(".lg-thumb-outer").first(),this.$lgThumb=this.core.outer.find(".lg-thumb").first(),this.settings.animateThumb&&this.core.outer.find(".lg-thumb").css("transition-duration",this.core.settings.speed+"ms").css("width",this.thumbTotalWidth+"px").css("position","relative"),this.setThumbItemHtml(this.core.galleryItems)},c.prototype.enableThumbDrag=function(){var i=this,n={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0},a=!1;this.$thumbOuter.addClass("lg-grab"),this.core.outer.find(".lg-thumb").first().on("mousedown.lg.thumb",function(h){i.thumbTotalWidth>i.thumbOuterWidth&&(h.preventDefault(),n.cords.startX=h.pageX,n.startTime=new Date,i.thumbClickable=!1,a=!0,i.core.outer.get().scrollLeft+=1,i.core.outer.get().scrollLeft-=1,i.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing"))}),this.$LG(window).on("mousemove.lg.thumb.global"+this.core.lgId,function(h){i.core.lgOpened&&a&&(n.cords.endX=h.pageX,n=i.onThumbTouchMove(n))}),this.$LG(window).on("mouseup.lg.thumb.global"+this.core.lgId,function(){i.core.lgOpened&&(n.isMoved?n=i.onThumbTouchEnd(n):i.thumbClickable=!0,a&&(a=!1,i.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab")))})},c.prototype.enableThumbSwipe=function(){var i=this,n={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0};this.$lgThumb.on("touchstart.lg",function(a){i.thumbTotalWidth>i.thumbOuterWidth&&(a.preventDefault(),n.cords.startX=a.targetTouches[0].pageX,i.thumbClickable=!1,n.startTime=new Date)}),this.$lgThumb.on("touchmove.lg",function(a){i.thumbTotalWidth>i.thumbOuterWidth&&(a.preventDefault(),n.cords.endX=a.targetTouches[0].pageX,n=i.onThumbTouchMove(n))}),this.$lgThumb.on("touchend.lg",function(){n.isMoved?n=i.onThumbTouchEnd(n):i.thumbClickable=!0})},c.prototype.rebuildThumbnails=function(){var i=this;this.$thumbOuter.addClass("lg-rebuilding-thumbnails"),setTimeout(function(){i.thumbTotalWidth=i.core.galleryItems.length*(i.settings.thumbWidth+i.settings.thumbMargin),i.$lgThumb.css("width",i.thumbTotalWidth+"px"),i.$lgThumb.empty(),i.setThumbItemHtml(i.core.galleryItems),i.animateThumb(i.core.index)},50),setTimeout(function(){i.$thumbOuter.removeClass("lg-rebuilding-thumbnails")},200)},c.prototype.setTranslate=function(i){this.$lgThumb.css("transform","translate3d(-"+i+"px, 0px, 0px)")},c.prototype.getPossibleTransformX=function(i){return i>this.thumbTotalWidth-this.thumbOuterWidth&&(i=this.thumbTotalWidth-this.thumbOuterWidth),i<0&&(i=0),i},c.prototype.animateThumb=function(i){if(this.$lgThumb.css("transition-duration",this.core.settings.speed+"ms"),this.settings.animateThumb){var n=0;switch(this.settings.currentPagerPosition){case"left":n=0;break;case"middle":n=this.thumbOuterWidth/2-this.settings.thumbWidth/2;break;case"right":n=this.thumbOuterWidth-this.settings.thumbWidth}this.translateX=(this.settings.thumbWidth+this.settings.thumbMargin)*i-1-n,this.translateX>this.thumbTotalWidth-this.thumbOuterWidth&&(this.translateX=this.thumbTotalWidth-this.thumbOuterWidth),this.translateX<0&&(this.translateX=0),this.setTranslate(this.translateX)}},c.prototype.onThumbTouchMove=function(i){return i.newTranslateX=this.translateX,i.isMoved=!0,i.touchMoveTime=new Date().valueOf(),i.newTranslateX-=i.cords.endX-i.cords.startX,i.newTranslateX=this.getPossibleTransformX(i.newTranslateX),this.setTranslate(i.newTranslateX),this.$thumbOuter.addClass("lg-dragging"),i},c.prototype.onThumbTouchEnd=function(i){i.isMoved=!1,i.endTime=new Date,this.$thumbOuter.removeClass("lg-dragging");var n=i.endTime.valueOf()-i.startTime.valueOf(),a=i.cords.endX-i.cords.startX,h=Math.abs(a)/n;return h>.15&&i.endTime.valueOf()-i.touchMoveTime<30?(h+=1,h>2&&(h+=1),h=h+h*(Math.abs(a)/this.thumbOuterWidth),this.$lgThumb.css("transition-duration",Math.min(h-1,2)+"settings"),a=a*h,this.translateX=this.getPossibleTransformX(this.translateX-a),this.setTranslate(this.translateX)):this.translateX=i.newTranslateX,Math.abs(i.cords.endX-i.cords.startX)<this.settings.thumbnailSwipeThreshold&&(this.thumbClickable=!0),i},c.prototype.getThumbHtml=function(i,n,a){var h=this.core.galleryItems[n].__slideVideoInfo||{},o;
133h.youtube&&this.settings.loadYouTubeThumbnail?o="//img.youtube.com/vi/"+h.youtube[1]+"/"+this.settings.youTubeThumbSize+".jpg":o=i;var l=document.createElement("div");l.setAttribute("data-lg-item-id",n+""),l.className="lg-thumb-item "+(n===this.core.index?"active":""),l.style.cssText="width: "+this.settings.thumbWidth+"px; height: "+this.settings.thumbHeight+"; margin-right: "+this.settings.thumbMargin+"px;";var d=document.createElement("img");return d.alt=a||"",d.setAttribute("data-lg-item-id",n+""),d.src=o,l.appendChild(d),l},c.prototype.setThumbItemHtml=function(i){for(var n=0;n<i.length;n++){var a=this.getThumbHtml(i[n].thumb,n,i[n].alt);this.$lgThumb.append(a)}},c.prototype.setAnimateThumbStyles=function(){this.settings.animateThumb&&this.core.outer.addClass("lg-animate-thumb")},c.prototype.manageActiveClassOnSlideChange=function(){var i=this;this.core.LGel.on(ve.beforeSlide+".thumb",function(n){var a=i.core.outer.find(".lg-thumb-item"),h=n.detail.index;a.removeClass("active"),a.eq(h).addClass("active")})},c.prototype.toggleThumbBar=function(){var i=this;this.settings.toggleThumb&&(this.core.outer.addClass("lg-can-toggle"),this.core.$toolbar.append('<button type="button" aria-label="'+this.settings.thumbnailPluginStrings.toggleThumbnails+'" class="lg-toggle-thumb lg-icon"></button>'),this.core.outer.find(".lg-toggle-thumb").first().on("click.lg",function(){i.core.outer.toggleClass("lg-components-open")}))},c.prototype.thumbKeyPress=function(){var i=this;this.$LG(window).on("keydown.lg.thumb.global"+this.core.lgId,function(n){!i.core.lgOpened||!i.settings.toggleThumb||(n.keyCode===38?(n.preventDefault(),i.core.outer.addClass("lg-components-open")):n.keyCode===40&&(n.preventDefault(),i.core.outer.removeClass("lg-components-open")))})},c.prototype.destroy=function(){this.settings.thumbnail&&(this.$LG(window).off(".lg.thumb.global"+this.core.lgId),this.core.LGel.off(".lg.thumb"),this.core.LGel.off(".thumb"),this.$thumbOuter.remove(),this.core.outer.removeClass("lg-has-thumb"))},c})();function qr(){const c={wrapper:'[data-lightgallery="wrapper"]',item:'[data-lightgallery="item"]',config:'[data-lightgallery="config"]'};document.querySelectorAll(c.wrapper).forEach(n=>{const a=n.querySelector(c.config),h=!!a,o={plugins:[Gr,Wr],licenseKey:Go,selector:c.item,getCaptionFromTitleOrAlt:!1,download:!1,counter:!1,speed:0,backdropDuration:0,startAnimationDuration:0,mobileSettings:{showCloseIcon:!0},zoomFromOrigin:!1,thumbnail:!1,animateThumb:!0,enableThumbSwipe:!0,enableThumbDrag:!0,allowMediaOverlap:!1,thumbHe
133ight:"100px",thumbMargin:12,dynamic:!!h,dynamicEl:h?JSON.parse(a.innerHTML):null},l=Dr(n,o);h&&n.querySelectorAll(c.item).forEach((d,f)=>{d.addEventListener("click",()=>{l.openGallery(d.dataset.lightgalleryTargetIndex??f)})})})}class Ur{constructor(i){x(this,"main");x(this,"placeholder");x(this,"values");x(this,"single");x(this,"max");x(this,"value");x(this,"valueText");x(this,"valueDelete");x(this,"valueOut");x(this,"deselect");x(this,"deselectPath");x(this,"arrow");x(this,"arrowClose");x(this,"arrowOpen");x(this,"content");x(this,"contentOpen");x(this,"dirAbove");x(this,"dirBelow");x(this,"search");x(this,"searchHighlighter");x(this,"searching");x(this,"addable");x(this,"addablePath");x(this,"list");x(this,"optgroup");x(this,"optgroupLabel");x(this,"optgroupLabelText");x(this,"optgroupActions");x(this,"optgroupSelectAll");x(this,"optgroupSelectAllBox");x(this,"optgroupSelectAllCheck");x(this,"optgroupClosable");x(this,"option");x(this,"optionDelete");x(this,"highlighted");x(this,"mainOpen");x(this,"close");x(this,"selected");x(this,"error");x(this,"disabled");x(this,"hide");i||(i={});let n=(a="",h="")=>`${a} ${h}`.trim();this.main=n("ss-main",i.main),this.placeholder=n("ss-placeholder",i.placeholder),this.values=n("ss-values",i.values),this.single=n("ss-single",i.single),this.max=n("ss-max",i.max),this.value=n("ss-value",i.value),this.valueText=n("ss-value-text",i.valueText),this.valueDelete=n("ss-value-delete",i.valueDelete),this.valueOut=n("ss-value-out",i.valueOut),this.deselect=n("ss-deselect",i.deselect),this.deselectPath=i.deselectPath||"M10,10 L90,90 M10,90 L90,10",this.arrow=n("ss-arrow",i.arrow),this.arrowClose=i.arrowClose||"M10,30 L50,70 L90,30",this.arrowOpen=i.arrowOpen||"M10,70 L50,30 L90,70",this.content=n("ss-content",i.content),this.contentOpen=n("ss-open",i.contentOpen),this.dirAbove=n("ss-dir-above",i.dirAbove),this.dirBelow=n("ss-dir-below",i.dirBelow),this.search=n("ss-search",i.search),this.searchHighlighter=n("ss-search-highlight",i.searchHighlighter),this.searching=n("ss-searching",i.searching),this.addable=n("ss-addable",i.addable),this.addablePath=i.addablePath||"M50,10 L50,90 M10,50 L90,50",this.list=n("ss-list",i.list),this.optgroup=n("ss-optgroup",i.optgroup),this.optgroupLabel=n("ss-optgroup-label",i.optgroupLabel),this.optgroupLabelText=n("ss-optgroup-label-text",i.optgroupLabelText),this.optgroupActions=n("ss-optgroup-actions",i.optgroupActions),this.optgroupSelectAll=n("ss-selectall",i.optgroupSelectAll),this.optgroupSelectAllBox=i.optgroupSelectAllBox||"M60,10 L10,10 L10,90 L90,90 L90,50",this.optgroupSelectAllCheck=i.optgroupSelectAllCheck||"M30,45 L50,70 L90,10",this.optgroupClosable=n("ss-closable",i.optgroupClosable),this.option=n("ss-option",i.option),this.optionDelete=i.optionDelete||"M10,10 L90,90 M10,90 L90,10",this.highlighted=n("ss-highlighted",i.highlighted),this.mainOpen=n("ss-open",i.mainOpen),this.close=n("ss-close",i.close),this.selected=n("ss-selected",i.selected),this.error=n("ss-error",i.error),this.disabled=n("ss-disabled",i.disabled),this.hide=n("ss-hide",i.hide)}getFirst(i){return this[i].split(" ")[0]}}function Oi(){return Math.random().toString(36).substring(2,10)}function hn(c,i){function n(h,o){return o&&h&&h.classList&&h.classList.contains(o)||o&&h&&h.dataset&&h.dataset.id&&h.dataset.id===i?h:null}function a(h,o){return!h||h===document?null:n(h,o)?h:a(h.parentNode,o)}return n(c,i)||a(c,i)}function He(c,i=50,n=!1){let a;return function(...h){const o=self,l=()=>{a=null,n||c.apply(o,h)},d=n&&!a;clearTimeout(a),a=setTimeout(l,i),d&&c.apply(o,h)}}function xi(c,i){return JSON.stringify(c)===JSON.stringify(i)}function jr(c){const i=c.replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g,n=>"-"+n.toLowerCase());return c[0]===c[0].toUpperCase()?i.substring(1):i}class et{constructor(i){x(this,"id");x(this,"value");x(this,"text");x(this,"html");x(this,"defaultSelected");x(this,"selected");x(this,"display");x(this,"disabled");x(this,"placeholder");x(this,"class");x(this,"style");x(this,"data");x(this,"mandatory");this.id=!i.id||i.id===""?Oi():i.id,this.value=i.value===void 0?i.text||"":i.value||"",this.text=i.text||"",this.html=i.html||"",this.defaultSelected=i.defaultSelected!==void 0?i.defaultSelected:!1,this.selected=i.selected!==void 0?i.selected:!1,this.display=i.display!==void 0?i.display:!0,this.disabled=i.disabled!==void 0?i.disabled:!1,this.mandatory=i.mandatory!==void 0?i.mandatory:!1,this.placeholder=i.placeholder!==void 0?i.placeholder:!1,this.class=i.class||"",this.style=i.style||"",this.data=i.data||{}}}class Ct{constructor(i){x(this,"id");x(this,"label");x(this,"selectAll");x(this,"selectAllText");x(this,"closable");x(this,"options");
133if(this.id=!i.id||i.id===""?Oi():i.id,this.label=i.label||"",this.selectAll=i.selectAll===void 0?!1:i.selectAll,this.selectAllText=i.selectAllText||"Select All",this.closable=i.closable||"off",this.options=[],i.options)for(const n of i.options)this.options.push(new et(n))}}class $r{constructor(i,n){x(this,"selectType","single");x(this,"data",[]);x(this,"selectedOrder",[]);this.selectType=i,this.setData(n)}validateDataArray(i){if(!Array.isArray(i))return new Error("Data must be an array");for(let n of i)if(n)if(n instanceof Ct||"label"in n){if(!("label"in n))return new Error("Optgroup must have a label");if("options"in n&&n.options)for(let a of n.options){const h=this.validateOption(a);if(h)return h}}else if(n instanceof et||"text"in n){const a=this.validateOption(n);if(a)return a}else return new Error("Data object must be a valid optgroup or option");return null}validateOption(i){return"text"in i?null:new Error("Option must have a text")}partialToFullData(i){let n=[];return i.forEach(a=>{if(a){if(a instanceof Ct||"label"in a){let h=[];"options"in a&&a.options&&a.options.forEach(o=>{h.push(new et(o))}),h.length>0&&n.push(new Ct(a))}(a instanceof et||"text"in a)&&n.push(new et(a))}}),n}setData(i,n=!1){const a=this.partialToFullData(i);let h=[];if(n){h=this.getSelectedOptions();const o=[];h.forEach(l=>{let d=!1;for(const f of a){if(f instanceof et&&f.id===l.id){d=!0;break}if(f instanceof Ct){for(const m of f.options)if(m.id===l.id){d=!0;break}}}d||o.push(l)}),this.data=[...o,...a]}else this.data=a;if(this.selectType==="single"){const o=n&&h.length===0;this.setSelectedBy("id",this.getSelected(),o)}}getData(){return this.filter(null,!0)}getDataOptions(){return this.filter(null,!1)}addOption(i,n=!1){if(n){let a=[new et(i)];this.setData(a.concat(this.getData()))}else this.setData(this.getData().concat(new et(i)))}setSelectedBy(i,n,a=!1){let h=null,o=!1;const l=[];for(let f of this.data){if(f instanceof Ct)for(let m of f.options){h||(h=m);let g=m[i]||"";m.selected=o?!1:n.includes(g),m.selected&&(l.push(m),this.selectType==="single"&&(o=!0))}f instanceof et&&(h||(h=f),f.selected=o?!1:n.includes(f[i]),f.selected&&(l.push(f),this.selectType==="single"&&(o=!0)))}this.selectType==="single"&&h&&!o&&!a&&(h.selected=!0,l.push(h));const d=n.map(f=>{var m;return((m=l.find(g=>g[i]===f))==null?void 0:m.id)||""});this.selectedOrder=d}getSelected(){return this.getSelectedOptions().map(i=>i.id)}getSelectedValues(){return this.getSelectedOptions().map(i=>i.value)}getSelectedOptions(){return this.filter(i=>i.selected,!1)}getOptgroupByID(i){for(let n of this.data)if(n instanceof Ct&&n.id===i)return n;return null}getOptionByID(i){let n=this.filter(a=>a.id===i,!1);return n.length?n[0]:null}getSelectType(){return this.selectType}getFirstOption(){let i=null;for(let n of this.data)if(n instanceof Ct?i=n.options[0]:n instanceof et&&(i=n),i)break;return i}search(i,n){return i=i.trim(),i===""?this.getData():this.filter(a=>n(a,i),!0)}filter(i,n){const a=[];return this.data.forEach(h=>{if(h instanceof Ct){let o=[];if(h.options.forEach(l=>{(!i||i(l))&&(n?o.push(new et(l)):a.push(new et(l)))}),o.length>0){let l=new Ct(h);l.options=o,a.push(l)}}h instanceof et&&(!i||i(h))&&a.push(new et(h))}),a}selectedOrderOptions(i){const n=[];return this.selectedOrder.forEach(a=>{const h=i.find(o=>o.id===a);h&&n.push(h)}
133),i.forEach(a=>{let h=!1;n.forEach(o=>{if(a.id===o.id){h=!0;return}}),h||n.push(a)}),n}}class Xr{constructor(i,n,a,h){x(this,"settings");x(this,"store");x(this,"callbacks");x(this,"lastSelectedOption");x(this,"lastRenderedOptions");x(this,"closeAnimationTimeout",null);x(this,"main");x(this,"content");x(this,"classes");this.store=a,this.settings=i,this.classes=n,this.callbacks=h,this.lastSelectedOption=null,this.lastRenderedOptions=[],this.main=this.mainDiv(),this.content=this.contentDiv(),this.updateClassStyles(),this.updateAriaAttributes(),this.settings.contentPosition!=="relative"&&(this.content.main.style.top="-9999px",this.content.main.style.left="-9999px",this.content.main.style.margin="0",this.content.main.style.width="auto"),this.settings.contentLocation&&this.settings.contentLocation.appendChild(this.content.main)}addClasses(i,n){if(!n||n.trim()==="")return;const a=n.split(" ").filter(h=>h.trim()!=="");for(const h of a)i.classList.add(h.trim())}removeClasses(i,n){if(!n||n.trim()==="")return;const a=n.split(" ").filter(h=>h.trim()!=="");for(const h of a)i.classList.remove(h.trim())}enable(){this.removeClasses(this.main.main,this.classes.disabled),this.main.main.setAttribute("aria-disabled","false"),this.content.search.input.disabled=!1}disable(){this.addClasses(this.main.main,this.classes.disabled),this.main.main.setAttribute("aria-disabled","true"),this.content.search.input.disabled=!0}open(){this.main.arrow.path.setAttribute("d",this.classes.arrowOpen),this.main.main.setAttribute("aria-expanded","true"),this.closeAnimationTimeout&&(clearTimeout(this.closeAnimationTimeout),this.closeAnimationTimeout=null);const i=this.settings.openPosition==="up"?this.classes.dirAbove:this.classes.dirBelow;this.addClasses(this.main.main,i),this.addClasses(this.content.main,i),this.addClasses(this.content.main,this.classes.contentOpen),this.content.search.input.removeAttribute("aria-hidden"),this.moveContent();const n=this.store.getSelectedOptions();if(n.length){const a=n[n.length-1].id,h=this.content.list.querySelector('[data-id="'+a+'"]');h&&this.ensureElementInView(this.content.list,h)}}close(){this.main.main.setAttribute("aria-expanded","false"),this.main.arrow.path.setAttribute("d",this.classes.arrowClose),this.removeClasses(this.content.main,this.classes.contentOpen),this.content.search.input.setAttribute("aria-hidden","true"),this.main.main.removeAttribute("aria-activedescendant");const i=this.getAnimationTiming();this.closeAnimationTimeout=setTimeout(()=>{this.removeClasses(this.main.main,this.classes.dirAbove),this.removeClasses(this.main.main,this.classes.dirBelow),this.removeClasses(this.content.main,this.classes.dirAbove),this.removeClasses(this.content.main,this.classes.dirBelow),this.closeAnimationTimeout=null},i)}getAnimationTiming(){const i=getComputedStyle(this.content.main).getPropertyValue("--ss-animation-timing").trim();if(i){if(i.endsWith("ms"))return parseFloat(i);if(i.endsWith("s"))return parseFloat(i)*1e3}return 200}updateClassStyles(){if(this.main.main.className="",this.main.main.removeAttribute("style"),this.content.main.className="",this.content.main.removeAttribute("style"),this.addClasses(this.main.main,this.classes.main),this.addClasses(this.content.main,this.classes.content),this.settings.style!==""&&(this.main.main.style.cssText=this.settings.style,this.content.main.style.cssText=this.settings.style),this.settings.class.length)for(const i of this.settings.class)i.trim()!==""&&(this.main.main.classList.add(i.trim()),this.content.main.classList.add(i.trim()));(this.settings.contentPosition==="relative"||this.settings.contentPosition==="fixed")&&this.content.main.classList.add("ss-"+this.settings.contentPosition)}updateAriaAttributes(){const i=this.content.list.id;this.main.main.role="combobox",this.main.main.setAttribute("aria-haspopup","listbox"),this.main.main.setAttribute("aria-controls",i),this.main.main.setAttribute("aria-expanded","false"),this.content.list.setAttribute("role","listbox"),this.content.list.setAttribute("aria-label",this.settings.ariaLabel+" listbox"),this.settings.isMultiple&&this.content.list.setAttribute("aria-multiselectable","true"),this.content.search.input.setAttribute("aria-controls",i)}mainDiv(){var m;const i=document.createElement("div");i.dataset.id=this.settings.id,i.setAttribute("aria-label",this.settings.ariaLabel),i.tabIndex=0,i.onkeydown=g=>{switch(g.key){case"ArrowUp":case"ArrowDown":return this.callbacks.open(),g.key==="ArrowDown"?this.highlight("down"):this.highlight("up"),!1;case"Tab":return this.callbacks.close(),!0;case"Enter":case" ":this.callbacks.open();const v=this.content.list.querySelector("."+this.classes.getFirst("highlighted"));return v&&v.click(),!1;case"Escape":return this.callbacks.close(),!1}return g.key.length===1&&this.callbacks.open(),!0},i.onclick=g=>{this.settings.disabled||(this.settings.isOpen?this.callbacks.close():this.callbacks.open())};const n=document.createElement("div");this.addClasses(n,this.classes.values),i.appendChild(n);const a=document.createElement("div");this.addClasses(a,this.classes.deselect);const h=(m=this.store)==null?void 0:m.getSelectedOptions();!this.settings.allowDeselect||this.settings.isMultiple&&h&&h.length<=0?this.addClasses(a,this.classes.hide):this.removeClasses(a,this.classes.hide),a.onclick=g=>{if(g.stopPropagation(),this.settings.disabled)return;let v=!0;const y=this.store.getSelectedOptions(),S=[];if(this.callbacks.beforeChange&&(v=this.callbacks.beforeChange(S,y)===!0),v){if(this.settings.isMultiple)this.callbacks.setSelected([],!1),this.updateDeselectAll();else{const w=this.store.getFirstOption(),T=w?w.id:"";this.callbacks.setSelected(T,!1)}this.settings.closeOnSelect&&this.callbacks.close(),this.callbacks.afterChange&&this.callbacks.afterChange(this.store.getSelectedOptions())}};const o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("viewBox","0 0 100 100");const l=document.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",this.classes.deselectPath),o.appendChild(l),a.appendChild(o),i.appendChild(a);const d=document.createElementNS("http://www.w3.org/2000/svg","svg");this.addClasses(d,this.classes.arrow),d.setAttribute("viewBox","0 0 100 100");const f=document.createElementNS("http://www.w3.org/2000/svg","path");return f.setAttribute("d",this.classes.arrowClose),this.settings.alwaysOpen&&this.addClasses(d,this.classes.hide),d.appendChild(f),i.appendChild(d),{main:i,values:n,deselect:{main:a,svg:o,path:l},arrow:{main:d,path:f}}}mainFocus(i){i!=="click"&&this.main.main.focus({preventScroll:!0})}placeholder(){const i=this.store.filter(h=>h.placeholder,!1);let n=this.settings.placeholderText;i.length&&(i[0].html!==""?n=i[0].html:i[0].text!==""&&(n=i[0].text));const a=document.createElement("div");return this.addClasses(a,this.classes.placeholder),a.innerHTML=n,a}renderValues(){if(!this.settings.isMultiple){this.renderSingleValue();return}this.renderMultipleValues(),this.updateDeselectAll()}renderSingleValue(){const i=this.store.filter(a=>a.selected&&!a.placeholder,!1),n=i.length>0?i[0]:null;if(!n)this.main.values.innerHTML=this.placeholder().outerHTML;else{const a=document.createElement("div");this.addClasses(a,this.classes.single),n.html?a.innerHTML=n.html:a.innerText=n.text,this.main.values.innerHTML=a.outerHTML}!this.settings.allowDeselect||!i.length?this.addClasses(this.main.deselect.main,this.classes.hide):this.removeClasses(this.main.deselect.main,this.classes.hide)}renderMultipleValues(){let i=this.main.values.childNodes,n=this.store.filter(h=>h.selected&&h.display,!1);if(n.length===0){this.main.values.innerHTML=this.placeholder().outerHTML;return}else{const h=this.main.values.querySelector("."+this.classes.getFirst("placeholder"));h&&h.remove()}if(n.length>this.settings.maxValuesShown){const h=document.createElement("div");this.addClasses(h,this.classes.max),h.textContent=this.settings.maxValuesMessage.replace("{number}",n.length.toString()),this.main.values.innerHTML=h.outerHTML;return}else{const h=this.main.values.querySelector("."+this.classes.getFirst("max"));h&&h.remove()}this.settings.keepOrder&&(n=this.store.selectedOrderOptions(n));let a=[];for(let h=0;h<i.length;h++){const o=i[h],l=o.getAttribute("data-id");l&&(n.filter(d=>d.id===l,!1).length||a.push(o))}for(const h of a)this.addClasses(h,this.classes.valueOut),setTimeout(()=>{this.main.values.hasChildNodes()&&this.main.values.contains(h)&&this.main.values.removeChild(h)},100);i=this.main.values.childNodes;for(let h=0;h<n.length;h++){let o=!0;for(let l=0;l<i.length;l++)n[h].id===String(i[l].dataset.id)&&(o=!1);o&&(this.settings.keepOrder?this.main.values.appendChild(this.multipleValue(n[h])):i.length===0?this.main.values.appendChild(this.multipleValue(n[h])):h===0?this.main.values.insertBefore(this.multipleValue(n[h]),i[h]):i[h-1].insertAdjacentElement("afterend",this.multipleValue(n[h])))}}multipleValue(i){const n=document.createElement("div");this.addClasses(n,this.classes.value),n.dataset.id=i.id;const a=document.createElement("div");if(this.addClasses(a,this.classes.valueText),a.textContent=i.text,n.appendChild(a),!i.mandatory){const h=document.createElement("div");this.addClasses(h,this.classes.valueDelete),h.setAttribute("tabindex","0"),h.onclick=d=>{if(d.preventDefault(),d.stopPropagation(),this.settings.disabled)return;let f=!0;const m=this.store.getSelectedOptions(),g=m.filter(v=>v.selected&&v.id!==i.id,!0);if(!(this.settings.minSelected&&g.length<this.settings.minSelected)&&(this.callbacks.beforeChange&&(f=this.callbacks.beforeChange(g,m)===!0),f)){let v=[];for(const y of g){if(y instanceof Ct)for(const S of y.options)S.id&&v.push(S.id);y instanceof et&&v.push(y.id)}this.callbacks.setSelected(v,!1),this.settings.closeOnSelect&&this.callbacks.close(),this.callbacks.afterChange&&this.callbacks.afterChange(g),this.updateDeselectAll()}};const o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("viewBox","0 0 100 100");const l=document.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",this.classes.optionDelete),o.appendChild(l),h.appendChild(o),n.appendChild(h),h.onkeydown=d=>{d.key==="Enter"&&h.click()}}return n}contentDiv(){const i=document.createElement("div");i.dataset.id=this.settings.id;const n=this.searchDiv();i.appendChild(n.main);const a=this.listDiv();return i.appendChild(a),{main:i,search:n,list:a}}moveContent(){if(this.settings.contentPosition==="relative"){this.moveContentBelow();return}if(this.settings.openPosition==="down"){this.moveContentBelow();return}else if(this.settings.openPosition==="up"){this.moveContentAbove();return}this.putContent()==="up"?this.moveContentAbove():this.moveContentBelow()}searchDiv(){const i=document.createElement("div"),n=document.createElement("input"),a=document.createElement("div");this.addClasses(i,this.classes.search);const h={main:i,input:n};if(this.settings.showSearch||(this.addClasses(i,this.classes.hide),n.readOnly=!0),n.type="search",n.placeholder=this.settings.searchPlaceholder,n.tabIndex=-1,n.setAttribute("aria-label",this.settings.searchPlaceholder),n.setAttribute("aria-autocomplete","list"),n.setAttribute("autocapitalize","off"),n.setAttribute("autocomplete","off"),n.setAttribute("autocorrect","off"),n.setAttribute("aria-hidden","true"),n.oninput=He(o=>{this.callbacks.search(o.target.value)},100),n.onkeydown=o=>{switch(o.key){case"ArrowUp":case"ArrowDown":return o.key==="ArrowDown"?this.highlight("down"):this.highlight("up"),!1;case"Tab":return this.callbacks.close(),!0;case"Escape":return this.callbacks.close(),!1;case" ":const l=this.content.list.querySelector("."+this.classes.getFirst("highlighted"));return l?(l.click(),!1):!0;case"Enter":const d=this.content.list.querySelector("."+this.classes.getFirst("highlighted"));
133return d?(d.click(),!1):this.callbacks.addable?(a.click(),!1):!0}return!0},i.appendChild(n),this.callbacks.addable){this.addClasses(a,this.classes.addable);const o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("viewBox","0 0 100 100");const l=document.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",this.classes.addablePath),o.appendChild(l),a.appendChild(o),a.onclick=d=>{if(d.preventDefault(),d.stopPropagation(),!this.callbacks.addable)return;const f=this.content.search.input.value.trim();if(f===""){this.content.search.input.focus();return}const m=v=>{let y=new et(v);if(this.callbacks.addOption(y),this.settings.isMultiple){let S=this.store.getSelected();S.push(y.id),this.callbacks.setSelected(S,!0)}else this.callbacks.setSelected([y.id],!0);this.callbacks.search(""),this.settings.closeOnSelect&&setTimeout(()=>{this.callbacks.close()},100)},g=this.callbacks.addable(f);g===!1||g===void 0||g===null||(g instanceof Promise?g.then(v=>{typeof v=="string"?m({text:v,value:v}):g instanceof Error?this.renderError(g.message):m(v)}):typeof g=="string"?m({text:g,value:g}):g instanceof Error?this.renderError(g.message):m(g))},i.appendChild(a),h.addable={main:a,svg:o,path:l}}return h}searchFocus(){this.content.search.input.focus({preventScroll:!0})}getOptions(i=!1,n=!1,a=!1){let h="."+this.classes.getFirst("option");return i&&(h+=":not(."+this.classes.getFirst("placeholder")+")"),n&&(h+=":not(."+this.classes.getFirst("disabled")+")"),a&&(h+=":not(."+this.classes.getFirst("hide")+")"),Array.from(this.content.list.querySelectorAll(h))}highlight(i){const n=this.getOptions(!0,!0,!0);if(n.length===0)return;if(n.length===1&&!n[0].classList.contains(this.classes.getFirst("highlighted"))){this.addClasses(n[0],this.classes.highlighted);return}let a=!1;for(const o of n)o.classList.contains(this.classes.getFirst("highlighted"))&&(a=!0);if(!a){for(const o of n)if(o.classList.contains(this.classes.getFirst("selected"))){this.addClasses(o,this.classes.highlighted);break}}for(let o=0;o<n.length;o++)if(n[o].classList.contains(this.classes.getFirst("highlighted"))){const l=n[o];this.removeClasses(l,this.classes.highlighted);const d=l.parentElement;if(d&&d.classList.contains(this.classes.getFirst("mainOpen"))){const g=d.querySelector("."+this.classes.getFirst("optgroupLabel"));g&&g.click()}let f=n[i==="down"?o+1<n.length?o+1:0:o-1>=0?o-1:n.length-1];this.addClasses(f,this.classes.highlighted),this.ensureElementInView(this.content.list,f),f.id&&this.main.main.setAttribute("aria-activedescendant",f.id);const m=f.parentElement;if(m&&m.classList.contains(this.classes.getFirst("close"))){const g=m.querySelector("."+this.classes.getFirst("optgroupLabel"));g&&g.click()}return}const h=n[i==="down"?0:n.length-1];this.addClasses(h,this.classes.highlighted),h.id&&this.main.main.setAttribute("aria-activedescendant",h.id),this.ensureElementInView(this.content.list,h)}listDiv(){const i=document.createElement("div");this.addClasses(i,this.classes.list);const n=this.settings.id+"-list";return i.id=n,i.dataset.id=n,i}renderError(i){this.content.list.innerHTML="";const n=document.createElement("div");this.addClasses(n,this.classes.error),n.textContent=i,this.content.list.appendChild(n)}renderSearching(){this.content.list.innerHTML="";const i=document.createElement("div");this.addClasses(i,this.classes.searching),i.textContent=this.settings.searchingText,this.content.list.appendChild(i)}renderOptions(i){if(this.lastRenderedOptions=i.map(a=>a instanceof et?[a]:a.options.map(h=>new et(h))).flat(),this.content.list.innerHTML="",i.length===0){const a=document.createElement("div");this.addClasses(a,this.classes.search),this.callbacks.addable?a.innerHTML=this.settings.addableText.replace("{value}",this.content.search.input.value):a.innerHTML=this.settings.searchText,this.content.list.appendChild(a);return}this.settings.allowDeselect&&!this.settings.isMultiple&&(this.store.filter(a=>a.placeholder,!1).length||this.store.addOption(new et({text:"",value:"",selected:!1,placeholder:!0}),!0));const n=document.createDocumentFragment();for(const a of i){if(a instanceof Ct){const h=document.createElement("div");this.addClasses(h,this.classes.optgroup);const o=document.createElement("div");this.addClasses(o,this.classes.optgroupLabel),h.appendChild(o);const l=document.createElement("div");this.addClasses(l,this.classes.optgroupLabelText),l.textContent=a.label,o.appendChild(l);const d=document.createElement("div");if(this.addClasses(d,this.classes.optgroupActions),o.appendChild(d),this.settings.isMultiple&&a.selectAll){const f=document.createElement("div");this.addClasses(f,this.classes.optgroupSelectAll);let m=!0;for(const w of a.options)if(!w.selected){m=!1;break}m&&this.addClasses(f,this.classes.selected);const g=document.createElement("span");g.textContent=a.selectAllText,f.appendChild(g);const v=document.createElementNS("http://www.w3.org/2000/svg","svg");v.setAttribute("viewBox","0 0 100 100"),f.appendChild(v);const y=document.createElementNS("http://www.w3.org/2000/svg","path");y.setAttribute("d",this.classes.optgroupSelectAllBox),v.appendChild(y);const S=document.createElementNS("http://www.w3.org/2000/svg","path");S.setAttribute("d",this.classes.optgroupSelectAllCheck),v.appendChild(S),f.addEventListener("click",w=>{w.preventDefault(),w.stopPropagation();const T=this.store.getSelected();if(m){const A=T.filter(E=>{for(const D of a.options)if(E===D.id)return!1;return!0});this.callbacks.setSelected(A,!0);return}else{let A=a.options.map(D=>D.id).filter(D=>D!==void 0);const E=T.concat(A);for(const D of a.options)D.id&&!this.store.getOptionByID(D.id)&&this.callbacks.addOption(new et(D));this.callbacks.setSelected(E,!0);return}}),d.appendChild(f)}if(a.closable!=="off"){const f=document.createElement("div");this.addClasses(f,this.classes.optgroupClosable);
133const m=document.createElementNS("http://www.w3.org/2000/svg","svg");m.setAttribute("viewBox","0 0 100 100"),this.addClasses(m,this.classes.arrow),f.appendChild(m);const g=document.createElementNS("http://www.w3.org/2000/svg","path");m.appendChild(g),a.options.some(v=>v.selected)||this.content.search.input.value.trim()!==""?(this.addClasses(f,this.classes.mainOpen),g.setAttribute("d",this.classes.arrowOpen)):a.closable==="open"?(this.addClasses(h,this.classes.mainOpen),g.setAttribute("d",this.classes.arrowOpen)):a.closable==="close"&&(this.addClasses(h,this.classes.close),g.setAttribute("d",this.classes.arrowClose)),o.addEventListener("click",v=>{v.preventDefault(),v.stopPropagation(),h.classList.contains(this.classes.getFirst("close"))?(this.removeClasses(h,this.classes.close),this.addClasses(h,this.classes.mainOpen),g.setAttribute("d",this.classes.arrowOpen)):(this.removeClasses(h,this.classes.mainOpen),this.addClasses(h,this.classes.close),g.setAttribute("d",this.classes.arrowClose))}),d.appendChild(f)}h.appendChild(o);for(const f of a.options)h.appendChild(this.option(new et(f))),n.appendChild(h)}a instanceof et&&n.appendChild(this.option(a))}this.content.list.appendChild(n)}option(i){if(i.placeholder){const a=document.createElement("div");return this.addClasses(a,this.classes.option),this.addClasses(a,this.classes.hide),a}const n=document.createElement("div");return n.dataset.id=i.id,n.id=this.settings.id+"-"+i.id,this.addClasses(n,this.classes.option),n.setAttribute("role","option"),i.class&&i.class.split(" ").forEach(a=>{n.classList.add(a)}),i.style&&(n.style.cssText=i.style),this.settings.searchHighlight&&this.content.search.input.value.trim()!==""?n.innerHTML=this.highlightText(i.html!==""?i.html:i.text,this.content.search.input.value,this.classes.searchHighlighter):i.html!==""?n.innerHTML=i.html:n.textContent=i.text,this.settings.showOptionTooltips&&n.textContent&&n.setAttribute("title",n.textContent),i.display||this.addClasses(n,this.classes.hide),i.disabled&&this.addClasses(n,this.classes.disabled),i.selected&&this.settings.hideSelected&&this.addClasses(n,this.classes.hide),i.selected?(this.addClasses(n,this.classes.selected),n.setAttribute("aria-selected","true"),this.main.main.setAttribute("aria-activedescendant",n.id)):(this.removeClasses(n,this.classes.selected),n.setAttribute("aria-selected","false")),n.addEventListener("click",a=>{a.preventDefault(),a.stopPropagation();const h=this.store.getSelected(),o=a.currentTarget,l=String(o.dataset.id),d=a.ctrlKey||a.metaKey;if(i.disabled||!this.settings.isMultiple&&i.selected&&!this.settings.allowDeselect||i.selected&&i.mandatory||this.settings.isMultiple&&this.settings.maxSelected<=h.length&&!i.selected||this.settings.isMultiple&&this.settings.minSelected>=h.length&&i.selected&&!d)return;let f=!1;const m=this.store.getSelectedOptions();let g=[];if(this.settings.isMultiple){const v=m.some(y=>y.id===l);if(a.shiftKey&&this.lastSelectedOption){const y=this.lastRenderedOptions,S=y.findIndex(T=>T.id===this.lastSelectedOption.id),w=y.findIndex(T=>T.id===i.id);if(S>=0&&w>=0){const T=Math.min(S,w),A=Math.max(S,w),E=y.slice(T,A+1).filter(D=>!m.find(F=>F.id===D.id));m.length+E.length<=this.settings.maxSelected?g=m.concat(E):g=m}else g=m}else d?(v?g=m.filter(y=>y.id!==l):g=m.concat(i),this.lastSelectedOption=i):(v?g=m.filter(y=>y.id!==l):g=m.concat(i),this.lastSelectedOption=i)}if(this.settings.isMultiple||(i.selected?g=[]:g=[i]),this.callbacks.beforeChange||(f=!0),this.callbacks.beforeChange&&(this.callbacks.beforeChange(g,m)===!1?f=!1:f=!0),f){this.store.getOptionByID(l)||this.callbacks.addOption(i),this.callbacks.setSelected(g.map(y=>y.id),!1);const v=a.ctrlKey||a.metaKey||a.shiftKey;this.settings.closeOnSelect&&!(this.settings.isMultiple&&v)&&this.callbacks.close(),this.callbacks.afterChange&&this.callbacks.afterChange(g)}}),n}destroy(){this.closeAnimationTimeout&&(clearTimeout(this.closeAnimationTimeout),this.closeAnimationTimeout=null),this.main.main.remove(),this.content.main.remove()}highlightText(i,n,a){const h=n.trim();if(h==="")return i;const o=h.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l=document.createElement("div");l.innerHTML=i;const d=f=>{var m;if(f.nodeType===Node.TEXT_NODE){const g=f.textContent||"",v=new RegExp("("+o+")","i");if(v.test(g)){const y=document.createElement("span");g.split(v).forEach((S,w)=>{if(S&&v.test(S)){const T=document.createElement("mark");T.className=a,T.textContent=S,y.appendChild(T)}else S&&y.appendChild(document.createTextNode(S))}),(m=f.parentNode)==null||m.replaceChild(y,f)}}else f.nodeType===Node.ELEMENT_NODE&&Array.from(f.childNodes).forEac
133h(g=>d(g))};return Array.from(l.childNodes).forEach(f=>d(f)),l.innerHTML}setContentDirection(i){const n=i==="above",a=n?this.classes.dirAbove:this.classes.dirBelow,h=n?this.classes.dirBelow:this.classes.dirAbove;if(this.removeClasses(this.main.main,h),this.addClasses(this.main.main,a),this.removeClasses(this.content.main,h),this.addClasses(this.content.main,a),n){const o=this.main.main.offsetHeight,l=this.content.main.offsetHeight;this.content.main.style.margin="-"+(o+l-1)+"px 0px 0px 0px"}else this.content.main.style.margin="-1px 0px 0px 0px"}setContentPosition(){if(this.settings.contentPosition==="relative")return;const i=this.main.main.getBoundingClientRect();let n,a;this.settings.contentPosition==="fixed"?(n=i.top+i.height,a=i.left):(n=i.top+window.scrollY+i.height,a=i.left+window.scrollX),this.content.main.style.top=n+"px",this.content.main.style.left=a+"px";const h=this.settings.contentWidth;this.content.main.style.width="",this.content.main.style.minWidth="",this.content.main.style.maxWidth="",h?h.startsWith(">")?this.content.main.style.minWidth=h.slice(1):h.startsWith("<")?this.content.main.style.maxWidth=h.slice(1):this.content.main.style.width=h:this.content.main.style.width=i.width+"px";const o=20,l=window.innerWidth-o,d=()=>{const f=this.content.main.getBoundingClientRect().right;if(f<=l)return;const m=f-l,g=parseFloat(this.content.main.style.left)||0;if(this.settings.contentPosition==="fixed"){const v=Math.max(o,g-m);this.content.main.style.left=v+"px"}else{const v=Math.max(window.scrollX+o,g-m);this.content.main.style.left=v+"px"}};requestAnimationFrame(()=>{d(),requestAnimationFrame(d)})}moveContentAbove(){this.setContentDirection("above"),this.setContentPosition()}moveContentBelow(){this.setContentDirection("below"),this.setContentPosition()}ensureElementInView(i,n){const a=i.scrollTop+i.offsetTop,h=a+i.clientHeight,o=n.offsetTop,l=o+n.clientHeight;o<a?i.scrollTop-=a-o:l>h&&(i.scrollTop+=l-h)}putContent(){const i=this.main.main.offsetHeight,n=this.main.main.getBoundingClientRect(),a=this.content.main.offsetHeight;return window.innerHeight-(n.top+i)<=a&&n.top>a?"up":"down"}updateDeselectAll(){if(!this.store||!this.settings)return;const i=this.store.getSelectedOptions(),n=i&&i.length>0,a=this.settings.isMultiple,h=this.settings.allowDeselect,o=this.main.deselect.main,l=this.classes.hide;h&&!(a&&!n)?this.removeClasses(o,l):this.addClasses(o,l)}}class Yr{constructor(i){x(this,"select");x(this,"onValueChange");x(this,"onClassChange");x(this,"onDisabledChange");x(this,"onOptionsChange");x(this,"onLabelClick");x(this,"listen",!1);x(this,"observer",null);x(this,"isUpdating",!1);x(this,"pendingOptionsChange",null);x(this,"preventNativeSelect",null);x(this,"preventNativeSelectMousedown",null);x(this,"preventNativeSelectFocus",null);this.select=i,this.valueChange=this.valueChange.bind(this),this.select.addEventListener("change",this.valueChange,{passive:!0}),this.observer=new MutationObserver(this.observeCall.bind(this)),this.changeListen(!0)}enable(){this.select.disabled=!1}disable(){this.select.disabled=!0}hideUI(){this.select.tabIndex=-1,this.select.style.position="absolute",this.select.style.width="1px",this.select.style.height="1px",this.select.style.opacity="0",this.select.style.overflow="hidden",this.select.style.pointerEvents="none",this.select.style.margin="0",this.select.style.padding="0",this.select.style.borderWidth="0",this.select.style.clip="rect(0 0 0 0)",this.select.setAttribute("aria-hidden","true"),this.preventNativeSelect||(this.preventNativeSelect=i=>{i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()},this.preventNativeSelectMousedown=i=>{i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()},this.preventNativeSelectFocus=i=>{i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()},this.select.addEventListener("click",this.preventNativeSelect,{capture:!0,passive:!1}),this.select.addEventListener("mousedown",this.preventNativeSelectMousedown,{capture:!0,passive:!1}),this.select.addEventListener("focus",this.preventNativeSelectFocus,{capture:!0,passive:!1}))}showUI(){this.select.removeAttribute("tabindex"),this.select.style.position="",this.select.style.width="",this.select.style.height="",this.select.style.opacity="",this.select.style.overflow="",this.select.style.pointerEvents="",this.select.style.margin="",this.select.style.padding="",this.select.style.borderWidth="",this.select.style.clip="",this.select.removeAttribute("aria-hidden"),this.preventNativeSelect&&(this.select.removeEventListener("click",this.preventNativeSelect,{capture:!0}),this.preventNativeSelect=null),this.preventNativeSelectMousedown&&(this.select.removeEventListener("mousedown",this.preventNativeSelectMousedown,{capture:!0}),this.preventNativeSelectMousedown=null),this.preventNativeSelectFocus&&(this.select.removeEventListener("focus",this.preventNativeSelectFocus,{capture:!0}),this.preventNativeSelectFocus=null)}changeListen(i){this.listen=i,i&&this.observer&&this.observer.observe(this.select,{subtree:!0,childList:!0,attributes:!0}),i||this.observer&&this.observer.disconnect()}valueChange(i){return this.listen&&this.onValueChange&&this.onValueChange(this.getSelectedOptions()),!0}observeCall(i){if(!this.listen)return;let n=!1,a=!1,h=!1,o=!1;for(const l of i){if(l.target===this.select&&(l.attributeName==="disabled"&&(
133a=!0),l.attributeName==="class"&&(n=!0),l.type==="childList")){for(const d of Array.from(l.addedNodes))if(d.nodeName==="OPTION"&&d.value===this.select.value){o=!0;break}h=!0}(l.target.nodeName==="OPTGROUP"||l.target.nodeName==="OPTION")&&(h=!0)}if(n&&this.onClassChange&&this.onClassChange(this.select.className.split(" ")),a&&this.onDisabledChange&&(this.changeListen(!1),this.onDisabledChange(this.select.disabled),this.changeListen(!0)),h&&this.onOptionsChange){if(this.isUpdating){if(this.select.options.length>0){const l=this.getData();l.length>0&&(this.pendingOptionsChange=l)}o&&this.select.dispatchEvent(new Event("change"));return}this.changeListen(!1),this.onOptionsChange(this.getData()),this.changeListen(!0)}o&&this.select.dispatchEvent(new Event("change"))}getData(){let i=[];const n=this.select.childNodes;for(const a of n)a.nodeName==="OPTGROUP"&&i.push(this.getDataFromOptgroup(a)),a.nodeName==="OPTION"&&i.push(this.getDataFromOption(a));return i}getDataFromOptgroup(i){let n={id:i.id,label:i.label,selectAll:i.dataset?i.dataset.selectall==="true":!1,selectAllText:i.dataset?i.dataset.selectalltext:"Select all",closable:i.dataset?i.dataset.closable:"off",options:[]};const a=i.childNodes;for(const h of a)h.nodeName==="OPTION"&&n.options.push(this.getDataFromOption(h));return n}getDataFromOption(i){return{id:i.id,value:i.value,text:i.text,html:i.dataset&&i.dataset.html?i.dataset.html:"",defaultSelected:i.defaultSelected,selected:i.selected,display:i.style.display!=="none",disabled:i.disabled,mandatory:i.dataset?i.dataset.mandatory==="true":!1,placeholder:i.dataset.placeholder==="true",class:i.className,style:i.style.cssText,data:i.dataset}}getSelectedOptions(){let i=[];const n=this.select.childNodes;for(const a of n){if(a.nodeName==="OPTGROUP"){const h=a.childNodes;for(const o of h)if(o.nodeName==="OPTION"){const l=o;l.selected&&i.push(this.getDataFromOption(l))}}if(a.nodeName==="OPTION"){const h=a;h.selected&&i.push(this.getDataFromOption(h))}}return i}getSelectedValues(){return this.getSelectedOptions().map(i=>i.value)}setSelected(i){this.changeListen(!1);const n=this.select.childNodes;for(const a of n){if(a.nodeName==="OPTGROUP"){const h=a.childNodes;for(const o of h)if(o.nodeName==="OPTION"){const l=o;l.selected=i.includes(l.id)}}if(a.nodeName==="OPTION"){const h=a;h.selected=i.includes(h.id)}}this.changeListen(!0)}setSelectedByValue(i){this.changeListen(!1);const n=this.select.childNodes;for(const a of n){if(a.nodeName==="OPTGROUP"){const h=a.childNodes;for(const o of h)if(o.nodeName==="OPTION"){const l=o;l.selected=i.includes(l.value)}}if(a.nodeName==="OPTION"){const h=a;h.selected=i.includes(h.value)}}this.changeListen(!0)}updateSelect(i,n,a){this.changeListen(!1),i&&(this.select.dataset.id=i),n&&(this.select.style.cssText=n),a&&(this.select.className="",a.forEach(h=>{h.trim()!==""&&this.select.classList.add(h.trim())})),this.changeListen(!0)}updateOptions(i){if(!(!i||i.length===0)){this.isUpdating=!0,this.pendingOptionsChange=null,this.changeListen(!1),this.select.innerHTML="";for(const n of i)n instanceof Ct&&this.select.appendChild(this.createOptgroup(n)),n instanceof et&&this.select.appendChild(this.createOption(n));if(this.select.dispatchEvent(new Event("change",{bubbles:!0})),this.changeListen(!0),this.isUpdating=!1,this.pendingOptionsChange!==null){const n=this.pendingOptionsChange;n.length>0&&this.onOptionsChange?(this.pendingOptionsChange=null,this.changeListen(!1),this.onOptionsChange(n),this.changeListen(!0)):this.pendingOptionsChange=null}}}createOptgroup(i){const n=document.createElement("optgroup");if(n.id=i.id,n.label=i.label,i.selectAll&&(n.dataset.selectAll="true"),i.closable!=="off"&&(n.dataset.closable=i.closable),i.options)for(const a of i.options)n.appendChild(this.createOption(a));return n}createOption(i){const n=document.createElement("option");return n.id=i.id,n.value=i.value,n.textContent=i.text,i.html!==""&&n.setAttribute("data-html",i.html),n.defaultSelected=i.defaultSelected,n.selected=i.selected,i.disabled&&(n.disabled=!0),i.display||(n.style.display="none"),i.placeholder&&n.setAttribute("data-placeholder","true"),i.mandatory&&n.setAttribute("data-mandatory","true"),i.class&&i.class.split(" ").forEach(a=>{n.classList.add(a)}
133),i.data&&typeof i.data=="object"&&Object.keys(i.data).forEach(a=>{n.setAttribute("data-"+jr(a),i.data[a])}),n}setupLabelHandlers(){const i=[],n=this.select.id;n&&document.querySelectorAll(`label[for="${n}"]`).forEach(h=>i.push(h));let a=this.select.parentElement;for(;a&&a!==document.body;){if(a.tagName==="LABEL"){i.push(a);break}a=a.parentElement}Array.from(new Set(i)).forEach(h=>{if(h.__slimSelectLabelHandler)return;const o=l=>{const d=l.target,f=hn(d,this.select.dataset.id);l.preventDefault(),!f&&this.onLabelClick&&this.onLabelClick()};h.__slimSelectLabelHandler=o,h.addEventListener("click",o,{capture:!0,passive:!1})})}removeLabelHandlers(){const i=[],n=this.select.id;n&&document.querySelectorAll(`label[for="${n}"]`).forEach(h=>i.push(h));let a=this.select.parentElement;for(;a&&a!==document.body;){if(a.tagName==="LABEL"){i.push(a);break}a=a.parentElement}Array.from(new Set(i)).forEach(h=>{const o=h.__slimSelectLabelHandler;o&&(h.removeEventListener("click",o,{capture:!0}),delete h.__slimSelectLabelHandler)})}destroy(){this.changeListen(!1),this.select.removeEventListener("change",this.valueChange),this.preventNativeSelect&&(this.select.removeEventListener("click",this.preventNativeSelect,{capture:!0}),this.preventNativeSelect=null),this.preventNativeSelectMousedown&&(this.select.removeEventListener("mousedown",this.preventNativeSelectMousedown,{capture:!0}),this.preventNativeSelectMousedown=null),this.preventNativeSelectFocus&&(this.select.removeEventListener("focus",this.preventNativeSelectFocus,{capture:!0}),this.preventNativeSelectFocus=null),this.observer&&(this.observer.disconnect(),this.observer=null),this.removeLabelHandlers(),delete this.select.dataset.id,this.showUI()}}class Kr{constructor(i){x(this,"id","");x(this,"style","");x(this,"class",[]);x(this,"isMultiple",!1);x(this,"isOpen",!1);x(this,"isFullOpen",!1);x(this,"intervalMove",null);x(this,"disabled");x(this,"alwaysOpen");x(this,"showSearch");x(this,"focusSearch");x(this,"keepSearch");x(this,"ariaLabel");x(this,"searchPlaceholder");x(this,"searchText");x(this,"searchingText");x(this,"searchHighlight");x(this,"closeOnSelect");x(this,"contentLocation");x(this,"contentPosition");x(this,"contentWidth");x(this,"openPosition");x(this,"placeholderText");x(this,"allowDeselect");x(this,"hideSelected");x(this,"keepOrder");x(this,"showOptionTooltips");x(this,"minSelected");x(this,"maxSelected");x(this,"timeoutDelay");x(this,"maxValuesShown");x(this,"maxValuesMessage");x(this,"addableText");i||(i={}),this.id="ss-"+Oi(),this.style=i.style||"",this.class=i.class||[],this.disabled=i.disabled!==void 0?i.disabled:!1,this.alwaysOpen=i.alwaysOpen!==void 0?i.alwaysOpen:!1,this.showSearch=i.showSearch!==void 0?i.showSearch:!0,this.focusSearch=i.focusSearch!==void 0?i.focusSearch:!0,this.keepSearch=i.keepSearch!==void 0?i.keepSearch:!1,this.ariaLabel=i.ariaLabel||"Combobox",this.searchPlaceholder=i.searchPlaceholder||"Search...",this.searchText=i.searchText||"No Results",this.searchingText=i.searchingText||"Searching...",this.searchHighlight=i.searchHighlight!==void 0?i.searchHighlight:!1,this.closeOnSelect=i.closeOnSelect!==void 0?i.closeOnSelect:!0,this.contentLocation=i.contentLocation||document.body,this.contentPosition=i.contentPosition||"absolute",this.contentWidth=i.contentWidth||"",this.openPosition=i.openPosition||"auto",this.placeholderText=i.placeholderText!==void 0?i.placeholderText:"Select Value",this.allowDeselect=i.allowDeselect!==void 0?i.allowDeselect:!1,this.hideSelected=i.hideSelected!==void 0?i.hideSelected:!1,this.keepOrder=i.keepOrder!==void 0?i.keepOrder:!1,this.showOptionTooltips=i.showOptionTooltips!==void 0?i.showOptionTooltips:!1,this.minSelected=i.minSelected||0,this.maxSelected=i.maxSelected||1e3,this.timeoutDelay=i.timeoutDelay||200,this.maxValuesShown=i.maxValuesShown||20,this.maxValuesMessage=i.maxValuesMessage||"{number} selected",this.addableText=i.addableText||'Press "Enter" to add {value}'}}class Jr{constructor(i){x(this,"selectEl");x(this,"settings");x(this,"cssClasses");x(this,"select");x(this,"store");x(this,"render");x(this,"openTimeout",null);x(this,"closeTimeout",null);x(this,"events",{search:void 0,searchFilter:(i,n)=>i.text.toLowerCase().indexOf(n.toLowerCase())!==-1,addable:void 0,beforeChange:void 0,afterChange:void 0,beforeOpen:void 0,afterOpen:void 0,beforeClose:void 0,afterClose:void 0});x(this,"windowResize",He(()=>{!this.settings.isOpen&&!this.settings.isFullOpen||this.render.moveContent()}));x(this,"windowScroll",He(()=>{!this.settings.isOpen&&!this.settings.isFullOpen||this.render.moveContent()}));x(this,"documentClick",i=>{this.settings.isOpen&&i.target&&!hn(i.target,this.settings.id)&&this.close(i.type)});x(this,"windowVisibilityChange",()=>{document.hidden&&this.close()});var d;if(this.selectEl=typeof i.select=="string"?document.querySelector(i.select):i.select,!this.selectEl){i.events&&i.events.error&&i.events.error(new Error("Could not find select element"));return}if(this.selectEl.tagName!=="SELECT"){i.events&&i.events.error&&i.events.error(new Error("Element isnt of type select"));return}this.selectEl.dataset.ssid&&this.destroy(),this.settings=new Kr(i.settings),this.cssClasse
133s=new Ur(i.cssClasses);const n=["beforeOpen","afterOpen","beforeClose","afterClose"];for(const f in i.events)i.events.hasOwnProperty(f)&&(n.indexOf(f)!==-1?this.events[f]=He(i.events[f],100):this.events[f]=i.events[f]);this.settings.disabled=(d=i.settings)!=null&&d.disabled?i.settings.disabled:this.selectEl.disabled,this.settings.isMultiple=this.selectEl.multiple,this.settings.style=this.selectEl.style.cssText,this.settings.class=this.selectEl.className.split(" "),this.select=new Yr(this.selectEl),this.selectEl.id||(this.selectEl.id=this.settings.id),this.select.updateSelect(this.settings.id,this.settings.style,this.settings.class),this.select.hideUI(),this.select.onValueChange=f=>{this.setSelected(f.map(m=>m.id))},this.select.onClassChange=f=>{this.settings.class=f,this.render.updateClassStyles()},this.select.onDisabledChange=f=>{f?this.disable():this.enable()},this.select.onOptionsChange=f=>{this.setData(f||[])},this.select.onLabelClick=()=>{this.settings.disabled||(this.settings.isOpen?this.close():this.open())};const a=i.data?i.data:this.select.getData();this.store=new $r(this.settings.isMultiple?"multiple":"single",a),i.data&&this.select.updateOptions(this.store.getData());const h={open:this.open.bind(this),close:this.close.bind(this),addable:this.events.addable?this.events.addable:void 0,setSelected:this.setSelected.bind(this),addOption:this.addOption.bind(this),search:this.search.bind(this),beforeChange:this.events.beforeChange,afterChange:this.events.afterChange};this.render=new Xr(this.settings,this.cssClasses,this.store,h),this.render.renderValues(),this.render.renderOptions(this.store.getData());const o=this.selectEl.getAttribute("aria-label"),l=this.selectEl.getAttribute("aria-labelledby");o?this.render.main.main.setAttribute("aria-label",o):l&&this.render.main.main.setAttribute("aria-labelledby",l),this.selectEl.parentNode&&this.selectEl.parentNode.insertBefore(this.render.main.main,this.selectEl.nextSibling),window.addEventListener("resize",this.windowResize,!1),this.settings.openPosition==="auto"&&window.addEventListener("scroll",this.windowScroll,!1),document.addEventListener("visibilitychange",this.windowVisibilityChange),this.settings.disabled&&this.disable(),this.settings.alwaysOpen&&this.open(),this.select.setupLabelHandlers(),this.selectEl.slim=this}enable(){this.settings.disabled=!1,this.select.enable(),this.render.enable()}disable(){this.settings.disabled=!0,this.select.disable(),this.render.disable()}getData(){return this.store.getData()}setData(i){const n=this.store.getSelected(),a=this.store.validateDataArray(i);if(a){this.events.error&&this.events.error(a);return}this.store.setData(i);const h=this.store.getData();this.select.updateOptions(h),this.render.renderValues(),this.render.renderOptions(h),this.events.afterChange&&!xi(n,this.store.getSelected())&&this.events.afterChange(this.store.getSelectedOptions())}getSelected(){let i=this.store.getSelectedOptions();return this.settings.keepOrder&&(i=this.store.selectedOrderOptions(i)),i.map(n=>n.value)}setSelected(i,n=!0){const a=this.store.getSelected(),h=this.store.getDataOptions();i=Array.isArray(i)?i:[i];const o=[];for(const d of i){if(h.find(f=>f.id==d)){o.push(d);continue}for(const f of h.filter(m=>m.value==d))o.push(f.id)}this.store.setSelectedBy("id",o);const l=this.store.getData();this.select.updateOptions(l),this.render.renderValues(),this.render.content.search.input.value!==""?this.search(this.render.content.search.input.value):this.render.renderOptions(l),n&&this.events.afterChange&&!xi(a,this.store.getSelected())&&this.events.afterChange(this.store.getSelectedOptions())}addOption(i){const n=this.store.getSelected();this.store.getDataOptions().some(h=>h.value===(i.value??i.text))||this.store.addOption(i);const a=this.store.getData();this.select.updateOptions(a),this.render.renderValues(),this.render.renderOptions(a),this.events.afterChange&&!xi(n,this.store.getSelected())&&this.events.afterChange(this.store.getSelectedOptions())}open(){this.settings.disabled||this.settings.isOpen||(this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null),this.events.beforeOpen&&this.events.beforeOpen(),this.render.open(),this.settings.showSearch&&this.settings.focusSearch&&this.render.searchFocus(),this.settings.isOpen=!0,this.openTimeout=setTimeout(()=>{this.events.afterOpen&&this.events.afterOpen(),this.settings.isOpen&&(this.settings.isFullOpen=!0),document.addEventListener("click",this.documentClick)},this.settings.timeoutDelay),this.settings.contentPosition==="absolute"&&(this.settings.intervalMove&&clearInterval(this.settings.intervalMove),this.settings.intervalMove=setInterval(this.render.moveContent.bind(this.render),500)))}close(i=null){!this.settings.isOpen||this.settings.alwaysOpen||(this.openTimeout&&(clearTimeout(this.openTimeout),this.openTimeout=null),this.events.beforeClose&&this.events.beforeClose(),this.render.close(),!this.settings.keepSearch&&this.render.content.search.input.value!==""&&this.search(""),this.render.mainFocus(i),this.settings.isOpen=!1,this.settings.isFullOpen=!1,this.closeTimeout=setTimeout(()=>{this.events.afterClose&&this.events.afterClose(),document.removeEventListener("click",this.documentClick)},this.settings.timeoutDelay),this.settings.intervalMove&&clearInterval(this.settings.intervalMove))}search(i){if(this.render.content.search.input.value!==i&&(this.render.content.search.input.value=i),i===""){this.render.renderOptions(this.store.getData());return}if(!this.events.search){const a=i===""?this.store.getData():this.store.search(i,this.events.searchFilter);this.render.renderOptions(a);return}this.render.renderSearching();const n=this.events.search(i,this.store.getSelectedOptions());if(n instanceof Promise){n.then(a=>{this.store.setData(a,!0),this.select.updateOptions(this.store.getData()),this.render.renderOptions(this.store.getData())}).catch(a=>
133{this.render.renderError(typeof a=="string"?a:a.message)});return}else Array.isArray(n)?(this.store.setData(n,!0),this.select.updateOptions(this.store.getData()),this.render.renderOptions(this.store.getData())):this.render.renderError("Search event must return a promise or an array of data")}destroy(){this.openTimeout&&(clearTimeout(this.openTimeout),this.openTimeout=null),this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null),this.settings.intervalMove&&(clearInterval(this.settings.intervalMove),this.settings.intervalMove=null),document.removeEventListener("click",this.documentClick),window.removeEventListener("resize",this.windowResize,!1),this.settings.openPosition==="auto"&&window.removeEventListener("scroll",this.windowScroll,!1),document.removeEventListener("visibilitychange",this.windowVisibilityChange),this.store.setData([]),this.render.destroy(),this.select.destroy()}}function Qr(){document.querySelectorAll("[data-slim-select]").forEach(i=>{if(i.hasAttribute("select-initialized"))return;const n=new Jr({select:i,settings:{showSearch:!1,contentLocation:i.closest(".input-select__wrapper"),contentPosition:"absolute",openPosition:"down",maxValuesShown:1,maxValuesMessage:`${i.dataset.slimSelectMaxValuesMessage??""} {number}`,allowDeselect:!1}});document.querySelector(`[data-id="${n.settings.id}"] .ss-arrow`).setAttribute("aria-hidden","true"),document.querySelector(`[for="${i.id}"]`).addEventListener("click",()=>{n.open()}),i.setAttribute("select-initialized","true")})}document.addEventListener("DOMContentLoaded",function(c){Uo(),jo(),$o(),Xo(),Yo(),Ko(),Jo(),Or(),Qo(),tr(),er(),Sr(),Wo(),qr(),Qr(),document.body.dataset.ready="true"});document.addEventListener("submit",qo);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.