vendor: 11,308 bytes, line 1
1var Ur,K,Od,xi,Xc,Fd,jd,Ho,Ns,br,Nd,bl,za,Wa,zd,Bs={},$s=[],Pf=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Yr=Array.isArray;function Lt(n,e){for(var t in e)n[t]=e[t];return n}function El(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function F(n,e,t){var i,r,s,o={};for(s in e)s=="key"?i=e[s]:s=="ref"?r=e[s]:o[s]=e[s];if(arguments.length>2&&(o.children=arguments.length>3?Ur.call(arguments,2):t),typeof n=="function"&&n.defaultProps!=null)for(s in n.defaultProps)o[s]===void 0&&(o[s]=n.defaultProps[s]);return Er(n,o,i,r,null)}function Er(n,e,t,i,r){var s={type:n,props:e,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r??++Od,__i:-1,__u:0};return r==null&&K.vnode!=null&&K.vnode(s),s}function On(){return{current:null}}function j(n){return n.children}function Ve(n,e){this.props=n,this.context=e}function Gn(n,e){if(e==null)return n.__?Gn(n.__,n.__i+1):null;for(var t;e<n.__k.length;e++)if((t=n.__k[e])!=null&&t.__e!=null)return t.__e;return typeof n.type=="function"?Gn(n):null}function Lf(n){if(n.__P&&n.__d){var e=n.__v,t=e.__e,i=[],r=[],s=Lt({},e);s.__v=e.__v+1,K.vnode&&K.vnode(s),Cl(n.__P,s,e,n.__n,n.__P.namespaceURI,32&e.__u?[t]:null,i,t??Gn(e),!!(32&e.__u),r),s.__v=e.__v,s.__.__k[s.__i]=s,$d(i,s,r),e.__e=e.__=null,s.__e!=t&&Wd(s)}}function Wd(n){if((n=n.__)!=null&&n.__c!=null)return n.__e=n.__c.base=null,n.__k.some(function(e){if(e!=null&&e.__e!=null)return n.__e=n.__c.base=e.__e}),Wd(n)}function Ga(n){(!n.__d&&(n.__d=!0)&&xi.push(n)&&!Vs.__r++||Xc!=K.debounceRendering)&&((Xc=K.debounceRendering)||Fd)(Vs)}function Vs(){try{for(var n,e=1;xi.length;)xi.length>e&&xi.sort(jd),n=xi.shift(),e=xi.length,Lf(n)}finally{xi.length=Vs.__r=0}}function Gd(n,e,t,i,r,s,o,a,l,h,d){var u,g,f,m,_,p,v,w=i&&i.__k||$s,x=e.length;for(l=Af(t,e,w,l,x),u=0;u<x;u++)(f=t.__k[u])!=null&&(g=f.__i!=-1&&w[f.__i]||Bs,f.__i=u,p=Cl(n,f,g,r,s,o,a,l,h,d),m=f.__e,f.ref&&g.ref!=f.ref&&(g.ref&&kl(g.ref,null,f),d.push(f.ref,f.__c||m,f)),_==null&&m!=null&&(_=m),(v=!!(4&f.__u))||g.__k===f.__k?(l=Bd(f,l,n,v),v&&g.__e&&(g.__e=null)):typeof f.type=="function"&&p!==void 0?l=p:m&&(l=m.nextSibling),f.__u&=-7);return t.__e=_,l}function Af(n,e,t,i,r){var s,o,a,l,h,d=t.length,u=d,g=0;for(n.__k=new Array(r),s=0;s<r;s++)(o=e[s])!=null&&typeof o!="boolean"&&typeof o!="function"?(typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?o=n.__k[s]=Er(null,o,null,null,null):Yr(o)?o=n.__k[s]=Er(j,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=n.__k[s]=Er(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):n.__k[s]=o,l=s+g,o.__=n,o.__b=n.__b+1,a=null,(h=o.__i=Df(o,t,l,u))!=-1&&(u--,(a=t[h])&&(a.__u|=2)),a==null||a.__v==null?(h==-1&&(r>d?g--:r<d&&g++),typeof o.type!="function"&&(o.__u|=4)):h!=l&&(h==l-1?g--:h==l+1?g++:(h>l?g--:g++,o.__u|=4))):n.__k[s]=null;if(u)for(s=0;s<d;s++)(a=t[s])!=null&&(2&a.__u)==0&&(a.__e==i&&(i=Gn(a)),Xd(a,a));return i}function Bd(n,e,t,i){var r,s;if(typeof n.type=="function"){for(r=n.__k,s=0;r&&s<r.length;s++)r[s]&&(r[s].__=n,e=Bd(r[s],e,t,i));return e}n.__e!=e&&(i&&(e&&n.type&&!e.parentNode&&(e=Gn(n)),t.insertBefore(n.__e,e||null)),e=n.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Dt(n,e){return e=e||[],n==null||typeof n=="boolean"||(Yr(n)?n.some(function(t){Dt(t,e)}):e.push(n)),e}function Df(n,e,t,i){var r,s,o,a=n.key,l=n.type,h=e[t],d=h!=null&&(2&h.__u)==0;if(h===null&&a==null||d&&a==h.key&&l==h.type)return t;if(i>(d?1:0)){for(r=t-1,s=t+1;r>=0||s<e.length;)if((h=e[o=r>=0?r--:s++])!=null&&(2&h.__u)==0&&a==h.key&&l==h.type)return o}return-1}function Uc(n,e,t){e[0]=="-"?n.setProperty(e,t??""):n[e]=t==null?"":typeof t!="number"||Pf.test(e)?t:t+"px"}function ms(n,e,t,i,r){var s,o;e:if(e=="style")if(typeof t=="string")n.style.cssText=t;else{if(typeof i=="string"&&(n.style.cssText=i=""),i)for(e in i)t&&e in t||Uc(n.style,e,"");if(t)for(e in t)i&&t[e]==i[e]||Uc(n.style,e,t[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(Nd,"$1")),o=e.toLowerCase(),e=o in n||e=="onFocusOut"||e=="onFocusIn"?o.slice(2):e.slice(2),n.l||(n.l={}),n.l[e+s]=t,t?i?t[br]=i[br]:(t[br]=bl,n.addEventListener(e,s?Wa:za,s)):n.removeEventListener(e,s?Wa:za,s);else{if(r=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in n)try{n[e]=t??"";break e}catch{}typeof t=="function"||(t==null||t===!1&&e[4]!="-"?n.removeAttribute(e):n.setAttribute(e,e=="popover"&&t==1?"":t))}}function Yc(n){return function(e){if(this.l){var t=this.l[e.type+n];if(e[Ns]==null)e[Ns]=bl++;else if(e[Ns]<t[br])return;return t(K.event?K.event(e):e)}}}function Cl(n,e,t,i,r,s,o,a,l,h){var d,u,g,f,m,_,p,v,w,x,y,b,k,R,T,E=e.type;if(e.constructor!==void 0)return null;128&t.__u&&(l=!!(32&t.__u),s=[a=e.__e=t.__e]),(d=K.__b)&&d(e);e:if(typeof E=="function")try{if(v=e.props,w=E.prototype&&E.prototype.render,x=(d=E.contextType)&&i[d.__c],y=d?x?x.props.value:d.__:i,t.__c?p=(u=e.__c=t.__c).__=u.__E:(w?e.__c=u=new E(v,y):(e.__c=u=new Ve(v,y),u.constructor=E,u.render=Ff),x&&x.sub(u),u.state||(u.state={}),u.__n=i,g=u.__d=!0,u.__h=[],u._sb=[]),w&&u.__s==null&&(u.__s=u.state),w&&E.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Lt({},u.__s)),Lt(u.__s,E.getDerivedStateFromProps(v,u.__s))),f=u.props,m=u.state,u.__v=e,g)w&&E.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),w&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(w&&E.getDerivedStateFromProps==null&&v!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(v,y),e.__v==t.__v||!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(v,u.__s,y)===!1){e.__v!=t.__v&&(u.props=v,u.state=u.__s,u.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.some(function(C){C&&(C.__=e)}),$s.push.apply(u.__h,u._sb),u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(v,u.__s,y),w&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(f,m,_)})}if(u.context=y,u.props=v,u.__P=n,u.__e=!1,b=K.__r,k=0,w)u.state=u.__s,u.__d=!1,b&&b(e),d=u.render(u.props,u.state,u.context),$s.push.apply(u.__h,u._sb),u._sb=[];else do u.__d=!1,b&&b(e),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++k<25);u.state=u.__s,u.getChildContext!=null&&(i=Lt(Lt({},i),u.getChildContext())),w&&!g&&u.getSnapshotBeforeUpdate!=null&&(_=u.getSnapshotBeforeUpdate(f,m)),R=d!=null&&d.type===j&&d.key==null?Vd(d.props.children):d,a=Gd(n,Yr(R)?R:[R],e,t,i,r,s,o,a,l,h),u.base=e.__e,e.__u&=-161,u.__h.length&&o.push(u),p&&(u.__E=u.__=null)}catch(C){if(e.__v=null,l||s!=null)if(C.then){for(e.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,e.__e=a}else{for(T=s.length;T--;)El(s[T]);Ba(e)}else e.__e=t.__e,e.__k=t.__k,C.then||Ba(e);K.__e(C,e,t)}else s==null&&e.__v==t.__v?(e.__k=t.__k,e.__e=t.__e):a=e.__e=Of(t.__e,e,t,i,r,s,o,l,h);return(d=K.diffed)&&d(e),128&e.__u?void 0:a}function Ba(n){n&&(n.__c&&(n.__c.__e=!0),n.__k&&n.__k.some(Ba))}function $d(n,e,t){for(var i=0;i<t.length;i++)kl(t[i],t[++i],t[++i]);K.__c&&K.__c(e,n),n.some(function(r){try{n=r.__h,r.__h=[],n.some(function(s){s.call(r)})}catch(s){K.__e(s,r.__v)}})}function Vd(n){return typeof n!="object"||n==null||n.__b>0?n:Yr(n)?n.map(Vd):n.constructor!==void 0?null:Lt({},n)}function Of(n,e,t,i,r,s,o,a,l){var h,d,u,g,f,m,_,p=t.props||Bs,v=e.props,w=e.type;if(w=="svg"?r="http://www.w3.org/2000/svg":w=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),s!=null){for(h=0;h<s.length;h++)if((f=s[h])&&"setAttribute"in f==!!w&&(w?f.localName==w:f.nodeType==3)){n=f,s[h]=null;break}}if(n==null){if(w==null)return document.createTextNode(v);n=document.createElementNS(r,w,v.is&&v),a&&(K.__m&&K.__m(e,s),a=!1),s=null}if(w==null)p===v||a&&n.data==v||(n.data=v);else{if(s=w=="textarea"&&v.defaultValue!=null?null:s&&Ur.call(n.childNodes),!a&&s!=null)for(p={},h=0;h<n.attributes.length;h++)p[(f=n.attributes[h]).name]=f.value;for(h in p)f=p[h],h=="dangerouslySetInnerHTML"?u=f:h=="children"||h in v||h=="value"&&"defaultValue"in v||h=="checked"&&"defaultChecked"in v||ms(n,h,null,f,r);for(h in v)f=v[h],h=="children"?g=f:h=="dangerouslySetInnerHTML"?d=f:h=="value"?m=f:h=="checked"?_=f:a&&typeof f!="function"||p[h]===f||ms(n,h,f,p[h],r);if(d)a||u&&(d.__html==u.__html||d.__html==n.innerHTML)||(n.innerHTML=d.__html),e.__k=[];else if(u&&(n.innerHTML=""),Gd(e.type=="template"?n.content:n,Yr(g)?g:[g],e,t,i,w=="foreignObject"?"http://www.w3.org/1999/xhtml":r,s,o,s?s[0]:t.__k&&Gn(t,0),a,l),s!=null)for(h=s.length;h--;)El(s[h]);a&&w!="textarea"||(h="value",w=="progress"&&m==null?n.removeAttribute("value"):m!=null&&(m!==n[h]||w=="progress"&&!m||w=="option"&&m!=p[h])&&ms(n,h,m,p[h],r),h="checked",_!=null&&_!=n[h]&&ms(n,h,_,p[h],r))}return n}function kl(n,e,t){try{if(typeof n=="function"){var i=typeof n.__u=="function";i&&n.__u(),i&&e==null||(n.__u=n(e))}else n.current=e}catch(r){K.__e(r,t)}}function Xd(n,e,t){var i,r;if(K.unmount&&K.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||kl(i,null,e)),(i=n.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(s){K.__e(s,e)}i.base=i.__P=null}if(i=n.__k)for(r=0;r<i.length;r++)i[r]&&Xd(i[r],e,t||typeof n.type!="function");t||El(n.__e),n.__c=n.__=n.__e=void 0}function Ff(n,e,t){return this.constructor(n,t)}function Bn(n,e,t){var i,r,s,o;e==document&&(e=document.documentElement),K.__&&K.__(n,e),r=(i=typeof t=="function")?null:t&&t.__k||e.__k,s=[],o=[],Cl(e,n=(!i&&t||e).__k=F(j,null,[n]),r||Bs,Bs,e.namespaceURI,!i&&t?[t]:r?null:e.firstChild?Ur.call(e.childNodes):null,s,!i&&t?t:r?r.__e:e.firstChild,i,o),$d(s,n,o)}function Sl(n,e){Bn(n,e,Sl)}function $a(n,e,t){var i,r,s,o,a=Lt({},n.props);for(s in n.type&&n.type.defaultProps&&(o=n.type.defaultProps),e)s=="key"?i=e[s]:s=="ref"?r=e[s]:a[s]=e[s]===void 0&&o!=null?o[s]:e[s];return arguments.length>2&&(a.children=arguments.length>3?Ur.call(arguments,2):t),Er(n.type,a,i||n.key,r||n.ref,null)}function ze(n){function e(t){var i,r;return this.getChildContext||(i=new Set,(r={})[e.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(s){this.props.value!=s.value&&i.forEach(function(o){o.__e=!0,Ga(o)})},this.sub=function(s){i.add(s);var o=s.componentWillUnmount;s.componentWillUnmount=function(){i&&i.delete(s),o&&o.call(s)}}),t.children}return e.__c="__cC"+zd++,e.__=n,e.Provider=e.__l=(e.Consumer=function(t,i){return t.children(i)}).contextType=e,e}Ur=$s.slice,K={__e:function(n,e,t,i){for(var r,s,o;e=e.__;)if((r=e.__c)&&!r.__)try{if((s=r.constructor)&&s.getDerivedStateFromError!=null&&(r.setState(s.getDerivedStateFromError(n)),o=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(n,i||{}),o=r.__d),o)return r.__E=r}catch(a){n=a}throw n}},Od=0,Ve.prototype.setState=function(n,e){var t;t=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Lt({},this.state),typeof n=="function"&&(n=n(Lt({},t),this.props)),n&&Lt(t,n),n!=null&&this.__v&&(e&&this._sb.push(e),Ga(this))},Ve.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),Ga(this))},Ve.prototype.render=j,xi=[],Fd=typeof Promise=="function"?Promise.prototype.then.bind(Prom
1ise.resolve()):setTimeout,jd=function(n,e){return n.__v.__b-e.__v.__b},Vs.__r=0,Ho=Math.random().toString(8),Ns="__d"+Ho,br="__a"+Ho,Nd=/(PointerCapture)$|Capture$/i,bl=0,za=Yc(!1),Wa=Yc(!0),zd=0;var jf=0;function c(n,e,t,i,r,s){e||(e={});var o,a,l=e;if("ref"in l)for(a in l={},e)a=="ref"?o=e[a]:l[a]=e[a];var h={type:n,props:l,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--jf,__i:-1,__u:0,__source:r,__self:s};if(typeof n=="function"&&(o=n.defaultProps))for(a in o)l[a]===void 0&&(l[a]=o[a]);return K.vnode&&K.vnode(h),h}const Nf="modulepreload",zf=function(n){return"/"+n},Kc={},Wf=function(e,t,i){let r=Promise.resolve();if(t&&t.length>0&&typeof window<"u"){let l=function(h){return Promise.all(h.map(d=>Promise.resolve(d).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=o?.nonce||o?.getAttribute("nonce");r=l(t.map(h=>{if(h=zf(h),h in Kc)return;Kc[h]=!0;const d=h.endsWith(".css"),u=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${u}`))return;const g=document.createElement("link");if(g.rel=d?"stylesheet":Nf,d||(g.as="script"),g.crossOrigin="",g.href=h,a&&g.setAttribute("nonce",a),document.head.appendChild(g),d)return new Promise((f,m)=>{g.addEventListener("load",f),g.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return r.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})};var si,ge,qo,Zc,$n=0,Ud=[],pe=K,Hc=pe.__b,qc=pe.__r,Jc=pe.diffed,Qc=pe.__c,eh=pe.unmount,th=pe.__;function ln(n,e){pe.__h&&pe.__h(ge,n,$n||e),$n=0;var t=ge.__H||(ge.__H={__:[],__h:[]});return n>=t.__.length&&t.__.push({}),t.__[n]}function J(n){return $n=1,cn(Yd,n)}function cn(n,e,t){var i=ln(si++,2);if(i.t=n,!i.__c&&(i.__=[t?t(e):Yd(void 0,e),function(a){var l=i.__N?i.__N[0]:i.__[0],h=i.t(l,a);l!==h&&(i.__N=[h,i.__[1]],i.__c.setState({}))}],i.__c=ge,!ge.__f)){var r=function(a,l,h){if(!i.__c.__H)return!0;var d=i.__c.__H.__.filter(function(g){return g.__c});if(d.every(function(g){return!g.__N}))return!s||s.call(this,a,l,h);var u=i.__c.props!==a;return d.some(function(g){if(g.__N){var f=g.__[0];g.__=g.__N,g.__N=void 0,f!==g.__[0]&&(u=!0)}}),s&&s.call(this,a,l,h)||u};ge.__f=!0;var s=ge.shouldComponentUpdate,o=ge.componentWillUpdate;ge.componentWillUpdate=function(a,l,h){if(this.__e){var d=s;s=void 0,r(a,l,h),s=d}o&&o.call(this,a,l,h)},ge.shouldComponentUpdate=r}return i.__N||i.__}function le(n,e){var t=ln(si++,3);!pe.__s&&Il(t.__H,e)&&(t.__=n,t.u=e,ge.__H.__h.push(t))}function zt(n,e){var t=ln(si++,4);!pe.__s&&Il(t.__H,e)&&(t.__=n,t.u=e,ge.__h.push(t))}function Y(n){return $n=5,Ne(function(){return{current:n}},[])}function Tl(n,e,t){$n=6,zt(function(){if(typeof n=="function"){var i=n(e());return function(){n(null),i&&typeof i=="function"&&i()}}if(n)return n.current=e(),function(){return n.current=null}},t==null?t:t.concat(n))}function Ne(n,e){var t=ln(si++,7);return Il(t.__H,e)&&(t.__=n(),t.__H=e,t.__h=n),t.__}function Ke(n,e){return $n=8,Ne(function(){return n},e)}function Me(n){var e=ge.context[n.__c],t=ln(si++,9);return t.c=n,e?(t.__==null&&(t.__=!0,e.sub(ge)),e.props.value):n.__}function Rl(n,e){pe.useDebugValue&&pe.useDebugValue(e?e(n):n)}function Gf(n){var e=ln(si++,10),t=J();return e.__=n,ge.componentDidCatch||(ge.componentDidCatch=function(i,r){e.__&&e.__(i,r),t[1](i)}),[t[0],function(){t[1](void 0)}]}function Oi(){var n=ln(si++,11);if(!n.__){for(var e=ge.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var t=e.__m||(e.__m=[0,0]);n.__="P"+t[0]+"-"+t[1]++}return n.__}function Bf(){for(var n;n=Ud.shift();){var e=n.__H;if(n.__P&&e)try{e.__h.some(zs),e.__h.some(Va),e.__h=[]}catch(t){e.__h=[],pe.__e(t,n.__v)}}}pe.__b=function(n){ge=null,Hc&&Hc(n)},pe.__=function(n,e){n&&e.__k&&e.__k.__m&&(n.__m=e.__k.__m),th&&th(n,e)},pe.__r=function(n){qc&&qc(n),si=0;var e=(ge=n.__c).__H;e&&(qo===ge?(e.__h=[],ge.__h=[],e.__.some(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(e.__h.some(zs),e.__h.some(Va),e.__h=[],si=0)),qo=ge},pe.diffed=function(n){Jc&&Jc(n);var e=n.__c;e&&e.__H&&(e.__H.__h.length&&(Ud.push(e)!==1&&Zc===pe.requestAnimationFrame||((Zc=pe.requestAnimationFrame)||$f)(Bf)),e.__H.__.some(function(t){t.u&&(t.__H=t.u),t.u=void 0})),qo=ge=null},pe.__c=function(n,e){e.some(function(t){try{t.__h.some(zs),t.__h=t.__h.filter(function(i){return!i.__||Va(i)})}catch(i){e.some(function(r){r.__h&&(r.__h=[])}),e=[],pe.__e(i,t.__v)}}),Qc&&Qc(n,e)},pe.unmount=function(n){eh&&eh(n);var e,t=n.__c;t&&t.__H&&(t.__H.__.some(function(i){try{zs(i)}catch(r){e=r}}),t.__H=void 0,e&&pe.__e(e,t.__v))};var ih=typeof requestAnimationFrame=="function";function $f(n){var e,t=function(){clearTimeout(i),ih&&cancelAnimationFrame(e),setTimeout(n)},i=setTimeout(t,35);ih&&(e=requestAnimationFrame(t))}function zs(n){var e=ge,t=n.__c;typeof t=="function"&&(n.__c=void 0,t()),ge=e}function Va(n){var e=ge;n.__c=n.__(),ge=e}function Il(n,e){return!n||n.length!==e.length||e.some(function(t,i){return t!==n[i]})}function Yd(n,e){return typeof e=="function"?e(n):e}let Sn,dr;function Vf(n){return!dr||(typeof dr=="string"?n.startsWith(dr):dr.test(n))}function Xf(n,e){let t="";if(Sn=void 0,e&&e.type==="click"){if(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||e.button!==0)return n;const i=e.composedPath().find(s=>s.nodeName=="A"&&s.href),r=i&&i.getAttribute("href");if(!i||i.origin!=location.origin||/^#/.test(r)||!/^(_?self)?$/i.test(i.target)||!Vf(r)||i.download)return n;Sn=!0,e.preventDefault(),t=i.href.replace(location.origin,"")}else e&&e.url?(Sn=!e.replace,t=e.url):t=location.pathname+location.search;return Sn===!0?history.pushState(null,"",t):Sn===!1&&history.replaceState(null,"",t),t}const Uf=(n,e,t={})=>
1{n=n.split("/").filter(Boolean),e=(e||"").split("/").filter(Boolean),t.params||(t.params={});for(let i=0,r,s;i<Math.max(n.length,e.length);i++){let[,o,a,l]=(e[i]||"").match(/^(:?)(.*?)([+*?]?)$/);if(r=n[i],!(!o&&a==r)){if(!o&&r&&l=="*"){t.rest="/"+n.slice(i).join("/");break}if(!o||!r&&l!="?"&&l!="*")return;if(s=l=="+"||l=="*",s?r=n.slice(i).map(decodeURIComponent).join("/")||void 0:r&&(r=decodeURIComponent(r)),t.params[a]=r,a in t||(t[a]=r),s)break}}return t};function Kr(n){const[e,t]=cn(Xf,n.url||location.pathname+location.search);n.scope&&(dr=n.scope);const i=Sn===!0,r=Ne(()=>{const s=new URL(e,location.origin),o=s.pathname.replace(/\/+$/g,"")||"/";return{url:e,path:o,query:Object.fromEntries(s.searchParams),route:(a,l)=>t({url:a,replace:l}),back:()=>{history.back()},forward:()=>{history.forward()},wasPush:i}},[e]);return zt(()=>(addEventListener("click",t),addEventListener("popstate",t),()=>{removeEventListener("click",t),removeEventListener("popstate",t)}),[]),F(Kr.ctx.Provider,{value:r},n.children)}const Yf=Promise.resolve();function Kd(n){const[e,t]=cn(E=>E+1,0),{url:i,query:r,wasPush:s,path:o}=Ml();if(!i)throw new Error("preact-iso's <Router> must be used within a <LocationProvider>, see: https://github.com/preactjs/preact-iso#locationprovider");const{rest:a=o,params:l={}}=Me(nh),h=Y(!1),d=Y(o),u=Y(0),g=Y(),f=Y(),m=Y(),_=Y(!1),p=Y();p.current=!1;let v,w,x;Dt(n.children).some(E=>{if(Uf(a,E.props.path,x={...E.props,path:a,query:r,params:Object.assign({},l),rest:""}))return v=$a(E,x);E.props.default&&(w=$a(E,x))});let y=v||w;const b=g.current&&g.current.__u&ps&&g.current.__u&_s,k=g.current&&g.current.__h,R=Ne(()=>{f.current=g.current,g.current=F(nh.Provider,{value:x},y);const E=f.current&&f.current.props.children;return!E||!y||y.type!==E.type||y.props.component!==E.props.component?(this.__v&&this.__v.__k&&this.__v.__k.reverse(),u.current++,!0):!1},[i,JSON.stringify(x)]);b?(g.current.__u|=ps,g.current.__u|=_s):k&&(g.current.__h=!0);const T=f.current;return f.current=null,this.__c=(E,C)=>{p.current=!0,f.current=T,n.onLoadStart&&n.onLoadStart(i),h.current=!0;let M=u.current;E.then(()=>{M===u.current&&(f.current=null,g.current&&(C.__h&&(g.current.__h=C.__h),C.__u&_s&&(g.current.__u|=_s),C.__u&ps&&(g.current.__u|=ps)),Yf.then(t))})},zt(()=>{const E=this.__v&&this.__v.__e;if(p.current){!_.current&&!m.current&&(m.current=E);return}!_.current&&m.current&&(m.current!==E&&m.current.remove(),m.current=null),_.current=!0,d.current!==o&&(s&&scrollTo(0,0),n.onRouteChange&&n.onRouteChange(i),d.current=o),n.onLoadEnd&&h.current&&n.onLoadEnd(i),h.current=!1},[o,s,e]),R?[F(Jo,{r:g}),F(Jo,{r:f})]:F(Jo,{r:g})}const ps=32,_s=128,Jo=({r:n})=>n.current;Kd.Provider=Kr;Kr.ctx=ze({});const nh=ze({}),Wi=n=>F(n.component,n),Ml=()=>Me(Kr.ctx);let rh;function Kf(n,e){if(typeof window>"u")return;let t=document.querySelector("script[type=isodata]");e=e||t&&t.parentNode||document.body,!rh&&t?Sl(n,e):Bn(n,e),rh=!0}function Zf(n,e){return Wf(()=>import("./prerender-DI-Tf01F.js"),[]).then(t=>t.default(n,e))}function Zd(n,e){for(var t in e)n[t]=e[t];return n}function Xa(n,e){for(var t in n)if(t!=="__source"&&!(t in e))return!0;for(var i in e)if(i!=="__source"&&n[i]!==e[i])return!0;return!1}function ho(n,e){var t=e(),i=J({t:{__:t,u:e}}),r=i[0].t,s=i[1];return zt(function(){r.__=t,r.u=e,Qo(r)&&s({t:r})},[n,t,e]),le(function(){return Qo(r)&&s({t:r}),n(function(){Qo(r)&&s({t:r})})},[n]),t}function Qo(n){try{return!((e=n.__)===(t=n.u())&&(e!==0||1/e==1/t)||e!=e&&t!=t)}catch{return!0}var e,t}function Pl(n){n()}function Ll(n){return n}function Al(){return[!1,Pl]}var Dl=zt;function Xs(n,e){this.props=n,this.context=e}function Hd(n,e){function t(r){var s=this.props.ref;return s!=r.ref&&s&&(typeof s=="function"?s(null):s.current=null),e?!e(this.props,r)||s!=r.ref:Xa(this.props,r)}function i(r){return this.shouldComponentUpdate=t,F(n,r)}return i.displayName="Memo("+(n.displayName||n.name)+")",i.__f=i.prototype.isReactComponent=!0,i.type=n,i}(Xs.prototype=new Ve).isPureReactComponent=!0,Xs.prototype.shouldComponentUpdate=function(n,e){return Xa(this.props,n)||Xa(this.state,e)};var sh=K.__b;K.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),sh&&sh(n)};var Hf=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Pe(n){function e(t){var i=Zd({},t);return delete i.ref,n(i,t.ref||null)}return e.$$typeof=Hf,e.render=n,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(n.displayName||n.name)+")",e}var oh=function(n,e){return n==null?null:Dt(Dt(n).map(e))}
vendor: 8,540 bytes, line 1
1,qd={map:oh,forEach:oh,count:function(n){return n?Dt(n).length:0},only:function(n){var e=Dt(n);if(e.length!==1)throw"Children.only";return e[0]},toArray:Dt},qf=K.__e;K.__e=function(n,e,t,i){if(n.then){for(var r,s=e;s=s.__;)if((r=s.__c)&&r.__c)return e.__e==null&&(e.__e=t.__e,e.__k=t.__k),r.__c(n,e)}qf(n,e,t,i)};var ah=K.unmount;function Jd(n,e,t){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(i){typeof i.__c=="function"&&i.__c()}),n.__c.__H=null),(n=Zd({},n)).__c!=null&&(n.__c.__P===t&&(n.__c.__P=e),n.__c.__e=!0,n.__c=null),n.__k=n.__k&&n.__k.map(function(i){return Jd(i,e,t)})),n}function Qd(n,e,t){return n&&t&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(i){return Qd(i,e,t)}),n.__c&&n.__c.__P===e&&(n.__e&&t.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=t)),n}function Cr(){this.__u=0,this.o=null,this.__b=null}function eu(n){var e=n.__&&n.__.__c;return e&&e.__a&&e.__a(n)}function tu(n){var e,t,i,r=null;function s(o){if(e||(e=n()).then(function(a){a&&(r=a.default||a),i=!0},function(a){t=a,i=!0}),t)throw t;if(!i)throw e;return r?F(r,o):null}return s.displayName="Lazy",s.__f=!0,s}function Pn(){this.i=null,this.l=null}K.unmount=function(n){var e=n.__c;e&&(e.__z=!0),e&&e.__R&&e.__R(),e&&32&n.__u&&(n.type=null),ah&&ah(n)},(Cr.prototype=new Ve).__c=function(n,e){var t=e.__c,i=this;i.o==null&&(i.o=[]),i.o.push(t);var r=eu(i.__v),s=!1,o=function(){s||i.__z||(s=!0,t.__R=null,r?r(l):l())};t.__R=o;var a=t.__P;t.__P=null;var l=function(){if(!--i.__u){if(i.state.__a){var h=i.state.__a;i.__v.__k[0]=Qd(h,h.__c.__P,h.__c.__O)}var d;for(i.setState({__a:i.__b=null});d=i.o.pop();)d.__P=a,d.forceUpdate()}};i.__u++||32&e.__u||i.setState({__a:i.__b=i.__v.__k[0]}),n.then(o,o)},Cr.prototype.componentWillUnmount=function(){this.o=[]},Cr.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=Jd(this.__b,t,i.__O=i.__P)}this.__b=null}var r=e.__a&&F(j,null,n.fallback);return r&&(r.__u&=-33),[F(j,null,e.__a?null:n.children),r]};var lh=function(n,e,t){if(++t[1]===t[0]&&n.l.delete(e),n.props.revealOrder&&(n.props.revealOrder[0]!=="t"||!n.l.size))for(t=n.i;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;n.i=t=t[2]}};function Jf(n){return this.getChildContext=function(){return n.context},n.children}function Qf(n){var e=this,t=n.h;if(e.componentWillUnmount=function(){Bn(null,e.v),e.v=null,e.h=null},e.h&&e.h!==t&&e.componentWillUnmount(),!e.v){for(var i=e.__v;i!==null&&!i.__m&&i.__!==null;)i=i.__;e.h=t,e.v={nodeType:1,parentNode:t,childNodes:[],__k:{__m:i.__m},contains:function(){return!0},namespaceURI:t.namespaceURI,insertBefore:function(r,s){this.childNodes.push(r),e.h.insertBefore(r,s)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),e.h.removeChild(r)}}}Bn(F(Jf,{context:e.context},n.__v),e.v)}function Ol(n,e){var t=F(Qf,{__v:n,h:e});return t.containerInfo=e,t}(Pn.prototype=new Ve).__a=function(n){var e=this,t=eu(e.__v),i=e.l.get(n);return i[0]++,function(r){var s=function(){e.props.revealOrder?(i.push(r),lh(e,n,i)):r()};t?t(s):s()}},Pn.prototype.render=function(n){this.i=null,this.l=new Map;var e=Dt(n.children);n.revealOrder&&n.revealOrder[0]==="b"&&e.reverse();for(var t=e.length;t--;)this.l.set(e[t],this.i=[1,0,this.i]);return n.children},Pn.prototype.componentDidUpdate=Pn.prototype.componentDidMount=function(){var n=this;this.l.forEach(function(e,t){lh(n,t,e)})};var iu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,em=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,tm=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,im=/[A-Z0-9]/g,nm=typeof document<"u",rm=function(n){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(n)};function nu(n,e,t){return e.__k==null&&(e.textContent=""),Bn(n,e),typeof t=="function"&&t(),n?n.__c:null}function ru(n,e,t){return Sl(n,e),typeof t=="function"&&t(),n?n.__c:null}Ve.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(n){Object.defineProperty(Ve.prototype,n,{configurable:!0,get:function(){return this["UNSAFE_"+n]},set:function(e){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:e})}})});var ch=K.event;K.event=function(n){return ch&&(n=ch(n)),n.persist=function(){},n.isPropagationStopped=function(){return this.cancelBubble},n.isDefaultPrevented=function(){return this.defaultPrevented},n.nativeEvent=n};var Fl,sm={configurable:!0,get:function(){return this.class}},hh=K.vnode;K.vnode=function(n){typeof n.type=="string"&&(function(e){var t=e.props,i=e.type,r={},s=i.indexOf("-")==-1;for(var o in t){var a=t[o];if(!(o==="value"&&"defaultValue"in t&&a==null||nm&&o==="children"&&i==="noscript"||o==="class"||o==="className")){var l=o.toLowerCase();o==="defaultValue"&&"value"in t&&t.value==null?o="value":o==="download"&&a===!0?a="":l==="translate"&&a==="no"?a=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?o="ondblclick":l!=="onchange"||i!=="input"&&i!=="textarea"||rm(t.type)?l==="onfocus"?o="onfocusin":l==="onblur"?o="onfocusout":tm.test(o)&&(o=l):l=o="oninput":s&&em.test(o)?o=o.replace(im,"-$&").toLowerCase():a===null&&(a=void 0),l==="oninput"&&r[o=l]&&(o="oninputCapture"),r[o]=a}}i=="select"&&(r.multiple&&Array.isArray(r.value)&&(r.value=Dt(t.children).forEach(function(h){h.props.selected=r.value.indexOf(h.props.value)!=-1})),r.defaultValue!=null&&(r.value=Dt(t.children).forEach(function(h){h.props.selected=r.multiple?r.defaultValue.indexOf(h.props.value)!=-1:r.defaultValue==h.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",sm)):t.className&&(r.class=r.className=t.className),e.props=r})(n),n.$$typeof=iu,hh&&hh(n)};var dh=K.__r;K.__r=function(n){dh&&dh(n),Fl=n.__c};var uh=K.diffed;K.diffed=function(n){uh&&uh(n);var e=n.props,t=n.__e;t!=null&&n.type==="textarea"&&"value"in e&&e.value!==t.value&&(t.value=e.value==null?"":e.value),Fl=null};var su={ReactCurrentDispatcher:{current:{readContext:function(n){return Fl.__n[n.__c].props.value},useCallback:Ke,useContext:Me,useDebugValue:Rl,useDeferredValue:Ll,useEffect:le,useId:Oi,useImperativeHandle:Tl,useInsertionEffect:Dl,useLayoutEffect:zt,useMemo:Ne,useReducer:cn,useRef:Y,useState:J,useSyncExternalStore:ho,useTransition:Al}}},om="18.3.1";function ou(n){return F.bind(null,n)}function Zn(n){return!!n&&n.$$typeof===iu}function au(n){return Zn(n)&&n.type===j}function lu(n){return!!n&&typeof n.displayName=="string"&&n.displayName.indexOf("Memo(")==0}function jl(n){return Zn(n)?$a.apply(null,arguments):n}function cu(n){return!!n.__k&&(Bn(null,n),!0)}function hu(n){return n&&(n.base||n.nodeType===1&&n)||null}var du=function(n,e){return n(e)},uu=function(n,e){var t=K.debounceRendering;K.debounceRendering=function(r){return r()};var i=n(e);return K.debounceRendering=t,i},gu=Zn,U={useState:J,useId:Oi,useReducer:cn,useEffect:le,useLayoutEffect:zt,useInsertionEffect:Dl,useTransition:Al,useDeferredValue:Ll,useSyncExternalStore:ho,startTransition:Pl,useRef:Y,useImperativeHandle:Tl,useMemo:Ne,useCallback:Ke,useContext:Me,useDebugValue:Rl,version:"18.3.1",Children:qd,render:nu,hydrate:ru,unmountComponentAtNode:cu,createPortal:Ol,createElement:F,createContext:ze,createFactory:ou,cloneElement:jl,createRef:On,Fragment:j,isValidElement:Zn,isElement:gu,isFragment:au,isMemo:lu,findDOMNode:hu,Component:Ve,PureComponent:Xs,memo:Hd,forwardRef:Pe,flushSync:uu,unstable_batchedUpdates:du,StrictMode:j,Suspense:Cr,SuspenseList:Pn,lazy:tu,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:su};const fu=Object.freeze(Object.defineProperty({__proto__:null,Children:qd,Component:Ve,Fragment:j,PureComponent:Xs,StrictMode:j,Suspense:Cr,SuspenseList:Pn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:su,cloneElement:jl,createContext:ze,createElement:F,createFactory:ou,createPortal:Ol,createRef:On,default:U,findDOMNode:hu,flushSync:uu,forwardRef:Pe,hydrate:ru,isElement:gu,isFragment:au,isMemo:lu,isValidElement:Zn,lazy:tu,memo:Hd,render:nu,startTransition:Pl,unmountComponentAtNode:cu,unstable_batchedUpdates:du,useCallback:Ke,useContext:Me,useDebugValue:Rl,useDeferredValue:Ll,useEffect:le,useErrorBoundary:Gf,useId:Oi,useImperativeHandle:Tl,useInsertionEffect:Dl,useLayoutEffect:zt,useMemo:Ne,useReducer:cn,useRef:Y,useState:J,useSyncExternalStore:ho,useTransition:Al,ver
1sion:om},Symbol.toStringTag,{value:"Module"}));function am({title:n,titleId:e,...t},i){return F("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":e},t),n?F("title",{id:e},n):null,F("path",{fillRule:"evenodd",d:"M12 2.25a.75.75 0 0 1 .75.75v11.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-4.5-4.5a.75.75 0 1 1 1.06-1.06l3.22 3.22V3a.75.75 0 0 1 .75-.75Zm-9 13.5a.75.75 0 0 1 .75.75v2.25a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5V16.5a.75.75 0 0 1 1.5 0v2.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V16.5a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"}))}const lm=Pe(am);function cm({title:n,titleId:e,...t},i){return F("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":e},t),n?F("title",{id:e},n):null,F("path",{fillRule:"evenodd",d:"M15.75 2.25H21a.75.75 0 0 1 .75.75v5.25a.75.75 0 0 1-1.5 0V4.81L8.03 17.03a.75.75 0 0 1-1.06-1.06L19.19 3.75h-3.44a.75.75 0 0 1 0-1.5Zm-10.5 4.5a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h10.5a1.5 1.5 0 0 0 1.5-1.5V10.5a.75.75 0 0 1 1.5 0v8.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V8.25a3 3 0 0 1 3-3h8.25a.75.75 0 0 1 0 1.5H5.25Z",clipRule:"evenodd"}))}const hm=Pe(cm);function dm({title:n,titleId:e,...t},i){return F("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":e},t),n?F("title",{id:e},n):null,F("path",{fillRule:"evenodd",d:"M20.239 20.25a.75.75 0 0 1-.75-.75V8.999H5.549l2.47 2.47a.75.75 0 0 1-1.06 1.06l-3.75-3.75a.75.75 0 0 1 0-1.06l3.75-3.75a.75.75 0 1 1 1.06 1.06l-2.47 2.47h14.69a.75.75 0 0 1 .75.75V19.5a.75.75 0 0 1-.75.75Z",clipRule:"evenodd"}))}const um=Pe(dm);function gm({title:n,titleId:e,...t},i){return F("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":e},t),n?F("title",{id:e},n):null,F("path",{d:"M12.75 12.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM7.5 15.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM8.25 17.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM9.75 15.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM10.5 17.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM12 15.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM12.75 17.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM14.25 15.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM15 17.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM16.5 15.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM15 12.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM16.5 13.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z"}),F("path",{fillRule:"evenodd",d:"M6.75 2.25A.75.75 0 0 1 7.5 3v1.5h9V3A.75.75 0 0 1 18 3v1.5h.75a3 3 0 0 1 3 3v11.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V7.5a3 3 0 0 1 3-3H6V3a.75.75 0 0 1 .75-.75Zm13.5 9a1.5 1.5 0 0 0-1.5-1.5H5.25a1.5 1.5 0 0 0-1.5 1.5v7.5a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5v-7.5Z",clipRule:"evenodd"}))}const fm=Pe(gm);function mm({title:n,titleId:e,...t},i){return F("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":e},t),n?F("title",{id:e},n):null,F("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const pm=Pe(mm);function _m({title:n,titleId:e,...t},i){return F("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":e},t),n?F("title",{id:e},n):null,F("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25ZM12.75 6a.75.75 0 0 0-1.5 0v6c0 .414.336.75.75.75h4.5a.75.75 0 0 0 0-1.5h-3.75V6Z",clipRule:"evenodd"}))}const vm=Pe(_m);function wm({title:n,titleId:e,...t},i){return F("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
1currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":e},t),n?F("title",{id:e},n):null,F("path",{d:"M1.5 8.67v8.58a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V8.67l-8.928 5.493a3 3 0 0 1-3.144 0L1.5 8.67Z"}),F("path",{d:"M22.5 6.908V6.75a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3v.158l9.714 5.978a1.5 1.5 0 0 0 1.572 0L22.5 6.908Z"}))}const Ua=Pe(wm);function ym({title:n,titleId:e,...t},i){return F("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":e},t),n?F("title",{id:e},n):null,F("path",{d:"M21.721 12.752a9.711 9.711 0 0 0-.945-5.003 12.754 12.754 0 0 1-4.339 2.708 18.991 18.991 0 0 1-.214 4.772 17.165 17.165 0 0 0 5.498-2.477ZM14.634 15.55a17.324 17.324 0 0 0 .332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 0 0 .332 4.647 17.385 17.385 0 0 0 5.268 0ZM9.772 17.119a18.963 18.963 0 0 0 4.456 0A17.182 17.182 0 0 1 12 21.724a17.18 17.18 0 0 1-2.228-4.605ZM7.777 15.23a18.87 18.87 0 0 1-.214-4.774 12.753 12.753 0 0 1-4.34-2.708 9.711 9.711 0 0 0-.944 5.004 17.165 17.165 0 0 0 5.498 2.477ZM21.356 14.752a9.765 9.765 0 0 1-7.478 6.817 18.64 18.64 0 0 0 1.988-4.718 18.627 18.627 0 0 0 5.49-2.098ZM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 0 0 1.988 4.718 9.765 9.765 0 0 1-7.478-6.816ZM13.878 2.43a9.755 9.755 0 0 1 6.116 3.986 11.267 11.267 0 0 1-3.746 2.504 18.63 18.63 0 0 0-2.37-6.49ZM12 2.276a17.152 17.152 0 0 1 2.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0 1 12 2.276ZM10.122 2.43a18.629 18.629 0 0 0-2.37 6.49 11.266 11.266 0 0 1-3.746-2.504 9.754 9.754 0 0 1 6.116-3.985Z"}))}const xm=Pe(ym);function bm({title:n,titleId:e,...t},i){return F("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":e},t),n?F("title",{id:e},n):null,F("path",{fillRule:"evenodd",d:"m11.54 22.351.07.04.028.016a.76.76 0 0 0 .723 0l.028-.015.071-.041a16.975 16.975 0 0 0 1.144-.742 19.58 19.58 0 0 0 2.683-2.282c1.944-1.99 3.963-4.98 3.963-8.827a8.25 8.25 0 0 0-16.5 0c0 3.846 2.02 6.837 3.963 8.827a19.58 19.58 0 0 0 2.682 2.282 16.975 16.975 0 0 0 1.145.742ZM12 13.5a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",clipRule:"evenodd"}))}const Em=Pe(bm);function Cm({title:n,titleId:e,...t},i){return F("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":e},t),n?F("title",{id:e},n):null,F("path",{d:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32L19.513 8.2Z"}))}const km=Pe(Cm);function Sm({title:n,titleId:e,...t},i){return F("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":e},t),n?F("title",{id:e},n):null,F("path",{fillRule:"evenodd",d:"M1.5 4.5a3 3 0 0 1 3-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 0 1-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 0 0 6.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 0 1 1.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 0 1-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5Z",clipRule:"evenodd"}))}const Ya=Pe(Sm);function Tm({title:n,titleId:e,...t},i){return F("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":e},t),n?F("title",{id:e},n):null,F("path",{fillRule:"evenodd",d:"M16.5 4.478v.227a48.816 48.816 0 0 1 3.878.512.75.75 0 1 1-.256 1.478l-.209-.035-1.005 13.07a3 3 0 0 1-2.991 2.77H8.084a3 3 0 0 1-2.991-2.77L4.087 6.66l-.209.035a.75.75 0 0 1-.256-1.478A48.567 48.567 0 0 1 7.5 4.705v-.227c0-1.564 1.213-2.9 2.816-2.951a52.662 52.662 0 0 1 3.369 0c1.603.051 2.815 1.387 2.815 2.951Zm-6.136-1.452a51.196 51.196 0 0 1 3.273 0C14.39 3.05 15 3.684 15 4.478v.113a49.488 49.488 0 0 0-6 0v-.113c0-.794.609-1.428 1.364-1.452Zm-.355 5.945a.75.75 0 1 0-1.5.058l.347 9a.75.75 0 1 0 1.499-.058l-.346-9Zm5.48.058a.75.75 0 1 0-1.498-.058l-.347 9a.75.75 0 0 0 1.5.058l.345-9Z",clipRule:"evenodd"}))}const Rm=Pe(Tm);function Im({title:n,titleId:e,...t},i){return F("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
1currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":e},t),n?F("title",{id:e},n):null,F("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const Nl=Pe(Im);function Mm(){const[n,e]=J(""),[t,i]=J(!1),[r,s]=J(!1);le(()=>{const a=localStorage.getItem("api_url")+"api/1/dpp";fetch(a).then(l=>l.text()).then(l=>{e(l)})},[]);const o=a=>{a.preventDefault();const l=new FormData(a.target),h={};for(const[u,g]of l)h[u]=g;const d=localStorage.getItem("api_url")+"api/1/dpp";fetch(d,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(h)}).then(u=>{if(u.status==200)return u.json();i(!0)}).then(u=>{u&&s(!0)})};return r?c("p",{class:"py-8 text-white text-lg flex",children:[c(pm,{class:"w-6 mr-2 text-bww-yellow"}),"Aangemeld!"]}):c("form",{action:"#",method:"POST",class:"mx-auto mt-8 pr-12",onSubmit:o,children:[c("input",{type:"hidden",name:"addresCode",value:n}),c("input",{type:"hidden",name:"phone",value:""}),c("div",{class:"grid md:grid-cols-2 gap-x-8 gap-y-6 sm:grid-cols-2",children:[c("div",{class:"",children:[c("label",{for:"company",class:"block text-sm/6 font-semibold text-white",children:"Naam"}),c("div",{class:"mt-2.5",children:c("input",{id:"name",required:!0,type:"text",name:"name",autocomplete:"Naam",class:"block w-full rounded-md bg-white/5 px-3.5 py-2 text-base text-white outline-1 -outline-offset-1 outline-white/10 placeholder:text-gray-500 focus:outline-2 focus:-outline-offset-2 focus:outline-bww-blue"})})]}),c("div",{class:"",children:[c("label",{for:"email",class:"block text-sm/6 font-semibold text-white",children:"E-mailadres"}),c("div",{class:"mt-2.5",children:c("input",{id:"email",required:!0,type:"email",name:"email",autocomplete:"email",class:"block w-full rounded-md bg-white/5 px-3.5 py-2 text-base text-white outline-1 -outline-offset-1 outline-white/10 placeholder:text-gray-500 focus:outline-2 focus:-outline-offset-2 focus:outline-bww-blue"})})]})]}),c("div",{class:"mt-10",children:c("button",{type:"submit",class:"block w-full rounded-md bg-bww-blue px-3.5 py-2.5 text-center text-sm lg:text-base font-semibold text-white shadow-xs hover:bg-bww-blue/70 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bww-blue cursor-pointer",children:"Aanmelden"})}),t?"Er gaat iets niet goed....":""]})}function Pm(){const{url:n}=Ml();return c(j,{children:[c("footer",{class:"bg-zinc-950 px-6 lg:px-8 py-12 sm:py-18 lg:py-24",children:c("div",{class:"xl:min-w-7xl lg:max-w-7xl mx-auto",children:c("div",{class:"grid lg:grid-cols-2 gap-12 text-white",children:[c("div",{class:"lg:col-span-1 order-2 lg:order-1",children:[c("img",{class:"h-8",src:"/svg/logo.svg"}),c("p",{class:"pt-6 pb-12",children:"De BuurtWarmteWijzer is een product van TheEarlybirds en is initieel ontwikkeld in samenwerking met TNO, Communicatiebureau VONC en Ediso en ondersteund met een subsidie van het ministerie van Economische Zaken en Klimaat."})]}),c("div",{class:" order-1 lg:order-2",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-white flex items-start mb-6 ",children:[c("span",{class:"h-6 w-1.5 bg-bww-blue -skew-x-12 mr-3 mt-1 "}),"Word een voorloper"]}),c("p",{children:["Sluit je aan bij de koplopers van de warmtetransitie",c("br",{}),c("br",{}),"Blijf iedere maand op de hoogte van de laatste ontwikkelingen. Je ontvangt praktijkvoorbeelden, inzichten en data die je meteen kunt toepassen in je dagelijkse werk."]}),c("div",{class:"isolate",children:c(Mm,{})})]})]})})}),c("div",{class:"xl:min-w-7xl lg:max-w-7xl mx-auto py-12 px-6 xl:px-0",children:c("div",{class:"grid lg:grid-cols-2 gap-12 text-white ",children:[c("div",{class:"",children:[c("div",{class:"max-w-4xl text-left pb-6 lg:pb-8",children:c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-white flex items-start",children:[c("span",{class:"h-6 w-1.5 bg-bww-blue -skew-x-12 mr-3 mt-1 "}),"Wetenschappelijke onderzoekspartners"]})}
1),c("div",{class:"grid grid-cols-4 md:grid-cols-5 gap-6",children:[c("div",{class:"aspect-square bg-white p-2 lg:p-4",children:c("img",{class:"h-full w-full object-contain",src:"/images/logos/A4E-logo-vierkant.jpg"})}),c("div",{class:"aspect-square bg-white p-4",children:c("img",{class:"h-full w-full object-contain",src:"/images/logos/deltares.png"})}),c("div",{class:"aspect-square bg-white p-4",children:c("img",{class:"h-full w-full object-contain",src:"/images/logos/TU-Delft.jpg"})}),c("div",{class:"aspect-square bg-white p-4",children:c("img",{class:"h-full w-full object-contain",src:"/images/logos/TU-eindhoven.jpg"})}),c("div",{class:"aspect-square bg-white p-4",children:c("img",{class:"h-full w-full object-contain",src:"/images/logos/VU Amsterdam.jpg"})}),c("div",{class:"aspect-square bg-white p-4",children:c("img",{class:"h-full w-full object-contain",src:"/images/logos/TNO200.jpg"})}),c("div",{class:"aspect-square bg-white p-4",children:c("img",{class:"h-full w-full object-contain",src:"/images/logos/AMS.png"})})]})]}),c("div",{class:"",children:[c("div",{class:"max-w-4xl text-left pb-6 lg:pb-8",children:c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-white flex items-start",children:[c("span",{class:"h-6 w-1.5 bg-bww-blue -skew-x-12 mr-3 mt-1 "}),"We koppelen met"]})}),c("div",{class:"grid grid-cols-4 md:grid-cols-5 gap-6",children:[c("div",{class:"aspect-square bg-white p-2 lg:p-4",children:c("img",{class:"h-full w-full object-contain",src:"/images/logos/IQgeo_400x400.png"})}),c("div",{class:"aspect-square bg-white p-4",children:c("img",{class:"h-full w-full object-contain",src:"/images/logos/The-People-Group200.jpg"})}),c("div",{class:"aspect-square bg-white p-4",children:c("img",{class:"h-full w-full object-contain",src:"/images/logos/npro.jpg"})})]})]})]})}),c("div",{class:"bg-black text-sm text-white/70 flex justify-center py-6 px-4",children:c("div",{children:["De BuurtWarmteWijzer is een product van ",c("a",{href:"https://theearlybirds.nl/",target:"_blank",class:"underline hover:text-white",children:"TheEarlybirds"})]})})]})}var Lm=Object.defineProperty,Am=(n,e,t)=>e in n?Lm(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ea=(n,e,t)=>(Am(n,typeof e!="symbol"?e+"":e,t),t);let Dm=class{constructor(){ea(this,"current",this.detect()),ea(this,"handoffState","pending"),ea(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Ot=new Dm;function Zr(n){var e;return Ot.isServer?null:n==null?document:(e=n?.ownerDocument)!=null?e:document}function Ka(n){var e,t;return Ot.isServer?null:n==null?document:(t=(e=n?.getRootNode)==null?void 0:e.call(n))!=null?t:document}function mu(n){var e,t;return(t=(e=Ka(n))==null?void 0:e.activeElement)!=null?t:null}function Om(n){return mu(n)===n}function uo(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(e=>setTimeout(()=>{throw e}))}function hi(){let n=[],e={addEventListener(t,i,r,s){return t.addEventListener(i,r,s),e.add(()=>t.removeEventListener(i,r,s))},requestAnimationFrame(...t){let i=requestAnimationFrame(...t);return e.add(()=>cancelAnimationFrame(i))},nextFrame(...t){return e.requestAnimationFrame(()=>e.requestAnimationFrame(...t))},setTimeout(...t){let i=setTimeout(...t);return e.add(()=>clearTimeout(i))},microTask(...t){let i={current:!0};return uo(()=>{i.current&&t[0]()}),e.add(()=>{i.current=!1})},style(t,i,r){let s=t.style.getPropertyValue(i);return Object.assign(t.style,{[i]:r}),this.add(()=>{Object.assign(t.style,{[i]:s})})},group(t){let i=hi();return t(i),this.add(()=>i.dispose())},add(t){return n.includes(t)||n.push(t),()=>{let i=n.indexOf(t);if(i>=0)for(let r of n.splice(i,1))r()}},dispose(){for(let t of n.splice(0))t()}};return e}function go(){let[n]=J(hi);return le(()=>()=>n.dispose(),[n]),n}let qe=(n,e)=>{Ot.isServer?le(n,e):zt(n,e)};function hn(n){let e=Y(n);return qe(()=>{e.current=n},[n]),e}let fe=function(n){let e=hn(n);return U.useCallback((...t)=>e.current(...t),[e])};function Hr(n){return Ne(()=>n,Object.values(n))}let Fm=ze(void 0);function jm(){return Me(Fm)}function Za(...n){return Array.from(new Set(n.flatMap(e=>
1typeof e=="string"?e.split(" "):[]))).filter(Boolean).join(" ")}function oi(n,e,...t){if(n in e){let r=e[n];return typeof r=="function"?r(...t):r}let i=new Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(r=>`"${r}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,oi),i}var Us=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(Us||{}),Ci=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(Ci||{});function ft(){let n=zm();return Ke(e=>Nm({mergeRefs:n,...e}),[n])}function Nm({ourProps:n,theirProps:e,slot:t,defaultTag:i,features:r,visible:s=!0,name:o,mergeRefs:a}){a=a??Wm;let l=pu(e,n);if(s)return vs(l,t,i,o,a);let h=r??0;if(h&2){let{static:d=!1,...u}=l;if(d)return vs(u,t,i,o,a)}if(h&1){let{unmount:d=!0,...u}=l;return oi(d?0:1,{0(){return null},1(){return vs({...u,hidden:!0,style:{display:"none"}},t,i,o,a)}})}return vs(l,t,i,o,a)}function vs(n,e={},t,i,r){let{as:s=t,children:o,refName:a="ref",...l}=ta(n,["unmount","static"]),h=n.ref!==void 0?{[a]:n.ref}:{},d=typeof o=="function"?o(e):o;d=_u(d),"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(e)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let u={};if(e){let g=!1,f=[];for(let[m,_]of Object.entries(e))typeof _=="boolean"&&(g=!0),_===!0&&f.push(m.replace(/([A-Z])/g,p=>`-${p.toLowerCase()}`));if(g){u["data-headlessui-state"]=f.join(" ");for(let m of f)u[`data-${m}`]=""}}if(kr(s)&&(Object.keys($i(l)).length>0||Object.keys($i(u)).length>0))if(!Zn(d)||Array.isArray(d)&&d.length>1||Bm(d)){if(Object.keys($i(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${i} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys($i(l)).concat(Object.keys($i(u))).map(g=>` - ${g}`).join(` 2`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(g=>` - ${g}`).join(` 3`)].join(` 4`))}else{let g=d.props,f=g?.className,m=typeof f=="function"?(...v)=>Za(f(...v),l.className):Za(f,l.className),_=m?{className:m}:{},p=pu(d.props,$i(ta(l,["ref"])));for(let v in u)v in p&&delete u[v];return jl(d,Object.assign({},p,u,h,{ref:r(Gm(d),h.ref)},_))}return F(s,Object.assign({},ta(l,["ref"]),!kr(s)&&h,!kr(s)&&u),d)}function zm(){let n=Y([]),e=Ke(t=>{for(let i of n.current)i!=null&&(typeof i=="function"?i(t):i.current=t)},[]);return(...t)=>{if(!t.every(i=>i==null))return n.current=t,e}}function Wm(...n){return n.every(e=>e==null)?void 0:e=>{for(let t of n)t!=null&&(typeof t=="function"?t(e):t.current=e)}}function pu(...n){if(n.length===0)return{};if(n.length===1)return n[0];let e={},t={};for(let i of n)for(let r in i)r.startsWith("on")&&typeof i[r]=="function"?(t[r]!=null||(t[r]=[]),t[r].push(i[r])):e[r]=i[r];if(e.disabled||e["aria-disabled"])for(let i in t)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(i)&&(t[i]=[r=>{var s;return(s=r?.preventDefault)==null?void 0:s.call(r)}]);for(let i in t)Object.assign(e,{[i](r,...s){let o=t[i];for(let a of o){if((r instanceof Event||r?.nativeEvent instanceof Event)&&r.defaultPrevented)return;a(r,...s)}}});return e}function Qe(n){var e;return Object.assign(Pe(n),{displayName:(e=n.displayName)!=null?e:n.name})}function $i(n){let e=Object.assign({},n);for(let t in e)e[t]===void 0&&delete e[t];return e}function ta(n,e=[]){let t=Object.assign({},n);for(let i of e)i in t&&delete t[i];return t}function Gm(n){return U.version.split(".")[0]>="19"?n.props.ref:n.ref}function _u(n){if(n!=null&&n.$$typeof===Symbol.for("react.lazy")){let e=n._payload;if(e!=null&&e.status==="fulfilled")return _u(e.value)}return n}function kr(n){return n===j||n===Symbol.for("react.fragment")}function Bm(n){return kr(n.type)}let $m="span";var Ys=(n=>(n[n.None=1]="None",n[n.Focusable=2]="Focusable",n[n.Hidden=4]="Hidden",n))(Ys||{});function Vm(n,e){var t;let{features:i=1,...r}=n,s={ref:e,"aria-hidden":(i&2)===2?!0:(t=r["aria-hidden"])!=null?t:void 0,hidden:(i&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(i&4)===4&&(i&2)!==2&&{display:"none"}}};return ft()({ourProps:s,theirProps:r,slot:{},defaultTag:$m,name:"Hidden"})}let Ha=Qe(Vm);function Xm(n){return typeof n!="object"||n===null?!1:"nodeType"in n}function Pi(n){return Xm(n)&&"tagName"in n}function tn(n){return Pi(n)&&"accessKey"in n}function ki(n){return Pi(n)&&"tabIndex"in n}function Um(n){return Pi(n)&&"style"in n}function Ym(n){return tn(n)&&n.nodeName==="IFRAME"}function Km(n){return tn(n)&&n.nodeName==="INPUT"}let vu=Symbol();function Zm(n,e=!0){return Object.assign(n,{[vu]:e})}function Wt(...n){let e=Y(n);le(()=>{e.current=n},[n]);let t=fe(i=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(i):r.current=i)});return n.every(i=>i==null||i?.[vu])?void 0:t}let zl=ze(null);zl.displayName="DescriptionContext";function wu(){let n=Me(zl);if(n===null){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,wu),e}return n}function Hm(){let[n,e]=J([]);return[n.length>0?n.join(" "):void 0,Ne(()=>function(t){let i=fe(s=>(e(o=>[...o,s]),()=>e(o=>{let a=o.slice(),l=a.indexOf(s);return l!==-1&&a.splice(l,1),a}))),r=Ne(()=>
4({register:i,slot:t.slot,name:t.name,props:t.props,value:t.value}),[i,t.slot,t.name,t.props,t.value]);return U.createElement(zl.Provider,{value:r},t.children)},[e])]}let qm="p";function Jm(n,e){let t=Oi(),i=jm(),{id:r=`headlessui-description-${t}`,...s}=n,o=wu(),a=Wt(e);qe(()=>o.register(r),[r,o.register]);let l=Hr({...o.slot,disabled:i||!1}),h={ref:a,...o.props,id:r};return ft()({ourProps:h,theirProps:s,slot:l,defaultTag:qm,name:o.name||"Description"})}let Qm=Qe(Jm),ep=Object.assign(Qm,{});var yu=(n=>(n.Space=" ",n.Enter="Enter",n.Escape="Escape",n.Backspace="Backspace",n.Delete="Delete",n.ArrowLeft="ArrowLeft",n.ArrowUp="ArrowUp",n.ArrowRight="ArrowRight",n.ArrowDown="ArrowDown",n.Home="Home",n.End="End",n.PageUp="PageUp",n.PageDown="PageDown",n.Tab="Tab",n))(yu||{});let tp=ze(()=>{});function ip({value:n,children:e}){return U.createElement(tp.Provider,{value:n},e)}let xu=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return t===void 0&&(t=this.factory(e),this.set(e,t)),t}};var np=Object.defineProperty,rp=(n,e,t)=>e in n?np(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,sp=(n,e,t)=>(rp(n,e+"",t),t),bu=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},at=(n,e,t)=>(bu(n,e,"read from private field"),t?t.call(n):e.get(n)),ia=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},gh=(n,e,t,i)=>(bu(n,e,"write to private field"),e.set(n,t),t),It,ur,gr;let op=class{constructor(e){ia(this,It,{}),ia(this,ur,new xu(()=>new Set)),ia(this,gr,new Set),sp(this,"disposables",hi()),gh(this,It,e),Ot.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return at(this,It)}subscribe(e,t){if(Ot.isServer)return()=>{};let i={selector:e,callback:t,current:e(at(this,It))};return at(this,gr).add(i),this.disposables.add(()=>{at(this,gr).delete(i)})}on(e,t){return Ot.isServer?()=>{}:(at(this,ur).get(e).add(t),this.disposables.add(()=>{at(this,ur).get(e).delete(t)}))}send(e){let t=this.reduce(at(this,It),e);if(t!==at(this,It)){gh(this,It,t);for(let i of at(this,gr)){let r=i.selector(at(this,It));Eu(i.current,r)||(i.current=r,i.callback(r))}for(let i of at(this,ur).get(e.type))i(at(this,It),e)}}};It=new WeakMap,ur=new WeakMap,gr=new WeakMap;function Eu(n,e){return Object.is(n,e)?!0:typeof n!="object"||n===null||typeof e!="object"||e===null?!1:Array.isArray(n)&&Array.isArray(e)?n.length!==e.length?!1:na(n[Symbol.iterator](),e[Symbol.iterator]()):n instanceof Map&&e instanceof Map||n instanceof Set&&e instanceof Set?n.size!==e.size?!1:na(n.entries(),e.entries()):fh(n)&&fh(e)?na(Object.entries(n)[Symbol.iterator](),Object.entries(e)[Symbol.iterator]()):!1}function na(n,e){do{let t=n.next(),i=e.next();if(t.done&&i.done)return!0;if(t.done||i.done||!Object.is(t.value,i.value))return!1}while(!0)}function fh(n){if(Object.prototype.toString.call(n)!=="[object Object]")return!1;let e=Object.getPrototypeOf(n);return e===null||Object.getPrototypeOf(e)===null}var ap=Object.defineProperty,lp=(n,e,t)=>e in n?ap(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,mh=(n,e,t)=>(lp(n,typeof e!="symbol"?e+"":e,t),t),cp=(n=>(n[n.Push=0]="Push",n[n.Pop=1]="Pop",n))(cp||{});let hp={0(n,e){let t=e.id,i=n.stack,r=n.stack.indexOf(t);if(r!==-1){let s=n.stack.slice();return s.splice(r,1),s.push(t),i=s,{...n,stack:i}}return{...n,stack:[...n.stack,t]}},1(n,e){let t=e.id,i=n.stack.indexOf(t);if(i===-1)return n;let r=n.stack.slice();return r.splice(i,1),{...n,stack:r}}},dp=class Cu extends op{constructor(){super(...arguments),mh(this,"actions",{push:e=>this.send({type:0,id:e}),pop:e=>this.send({type:1,id:e})}),mh(this,"selectors",{isTop:(e,t)=>e.stack[e.stack.length-1]===t,inStack:(e,t)=>e.stack.includes(t)})}static new(){return new Cu({stack:[]})}reduce(e,t){return oi(t.type,hp,e,t)}};const ku=new xu(()=>dp.new());function up(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var e=n.default;if(typeof e=="function"){var t=function i(){var r=!1;try{r=this instanceof i}catch{}return r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};
4return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var r=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return n[i]}})}),t}var ra={exports:{}},sa={};const gp=up(fu);var ph;function fp(){if(ph)return sa;ph=1;var n=gp;function e(l,h){return l===h&&(l!==0||1/l===1/h)||l!==l&&h!==h}var t=typeof Object.is=="function"?Object.is:e,i=n.useSyncExternalStore,r=n.useRef,s=n.useEffect,o=n.useMemo,a=n.useDebugValue;return sa.useSyncExternalStoreWithSelector=function(l,h,d,u,g){var f=r(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=o(function(){function p(b){if(!v){if(v=!0,w=b,b=u(b),g!==void 0&&m.hasValue){var k=m.value;if(g(k,b))return x=k}return x=b}if(k=x,t(w,b))return k;var R=u(b);return g!==void 0&&g(k,R)?(w=b,k):(w=b,x=R)}var v=!1,w,x,y=d===void 0?null:d;return[function(){return p(h())},y===null?void 0:function(){return p(y())}]},[h,d,u,g]);var _=i(l,f[0],f[1]);return s(function(){m.hasValue=!0,m.value=_},[_]),a(_),_},sa}var _h;function mp(){return _h||(_h=1,ra.exports=fp()),ra.exports}var pp=mp();function Su(n,e,t=Eu){return pp.useSyncExternalStoreWithSelector(fe(i=>n.subscribe(_p,i)),fe(()=>n.state),fe(()=>n.state),fe(e),t)}function _p(n){return n}function qr(n,e){let t=Oi(),i=ku.get(e),[r,s]=Su(i,Ke(o=>[i.selectors.isTop(o,t),i.selectors.inStack(o,t)],[i,t]));return qe(()=>{if(n)return i.actions.push(t),()=>i.actions.pop(t)},[i,n,t]),n?s?r:!0:!1}let qa=new Map,Sr=new Map;function vh(n){var e;let t=(e=Sr.get(n))!=null?e:0;return Sr.set(n,t+1),t!==0?()=>wh(n):(qa.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0,()=>wh(n))}function wh(n){var e;let t=(e=Sr.get(n))!=null?e:1;if(t===1?Sr.delete(n):Sr.set(n,t-1),t!==1)return;let i=qa.get(n);i&&(i["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",i["aria-hidden"]),n.inert=i.inert,qa.delete(n))}function vp(n,{allowed:e,disallowed:t}={}){let i=qr(n,"inert-others");qe(()=>{var r,s;if(!i)return;let o=hi();for(let l of(r=t?.())!=null?r:[])l&&o.add(vh(l));let a=(s=e?.())!=null?s:[];for(let l of a){if(!l)continue;let h=Zr(l);if(!h)continue;let d=l.parentElement;for(;d&&d!==h.body;){for(let u of d.children)a.some(g=>u.contains(g))||o.add(vh(u));d=d.parentElement}}return o.dispose},[i,e,t])}function wp(n,e,t){let i=hn(r=>{let s=r.getBoundingClientRect();s.x===0&&s.y===0&&s.width===0&&s.height===0&&t()});le(()=>{if(!n)return;let r=e===null?null:tn(e)?e:e.current;if(!r)return;let s=hi();if(typeof ResizeObserver<"u"){let o=new ResizeObserver(()=>i.current(r));o.observe(r),s.add(()=>o.disconnect())}if(typeof IntersectionObserver<"u"){let o=new IntersectionObserver(()=>i.current(r));o.observe(r),s.add(()=>o.disconnect())}return()=>s.dispose()},[e,i,n])}let Ks=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(n=>`${n}:not([tabindex='-1'])`).join(","),yp=["[data-autofocus]"].map(n=>`${n}:not([tabindex='-1'])`).join(",");var Ht=(n=>(n[n.First=1]="First",n[n.Previous=2]="Previous",n[n.Next=4]="Next",n[n.Last=8]="Last",n[n.WrapAround=16]="WrapAround",n[n.NoScroll=32]="NoScroll",n[n.AutoFocus=64]="AutoFocus",n))(Ht||{}),Ja=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(Ja||{}),xp=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(xp||{});function bp(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(Ks)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}function Ep(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(yp)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var Tu=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))(Tu||{});function Cp(n,e=0){var t;return n===((t=Zr(n))==null?void 0:t.body)?!1:oi(e,{0(){return n.matches(Ks)},1(){let i=n;for(;i!==null;){if(i.matches(Ks))return!0;
4i=i.parentElement}return!1}})}var kp=(n=>(n[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n))(kp||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",n=>{n.metaKey||n.altKey||n.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",n=>{n.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:n.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function qt(n){n?.focus({preventScroll:!0})}let Sp=["textarea","input"].join(",");function Tp(n){var e,t;return(t=(e=n?.matches)==null?void 0:e.call(n,Sp))!=null?t:!1}function Rp(n,e=t=>t){return n.slice().sort((t,i)=>{let r=e(t),s=e(i);if(r===null||s===null)return 0;let o=r.compareDocumentPosition(s);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Tr(n,e,{sorted:t=!0,relativeTo:i=null,skipElements:r=[]}={}){let s=Array.isArray(n)?n.length>0?Ka(n[0]):document:Ka(n),o=Array.isArray(n)?t?Rp(n):n:e&64?Ep(n):bp(n);r.length>0&&o.length>1&&(o=o.filter(f=>!r.some(m=>m!=null&&"current"in m?m?.current===f:m===f))),i=i??s?.activeElement;let a=(()=>{if(e&5)return 1;if(e&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(e&1)return 0;if(e&2)return Math.max(0,o.indexOf(i))-1;if(e&4)return Math.max(0,o.indexOf(i))+1;if(e&8)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),h=e&32?{preventScroll:!0}:{},d=0,u=o.length,g;do{if(d>=u||d+u<=0)return 0;let f=l+d;if(e&16)f=(f+u)%u;else{if(f<0)return 3;if(f>=u)return 1}g=o[f],g?.focus(h),d+=a}while(g!==mu(g));return e&6&&Tp(g)&&g.select(),2}function Ru(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Ip(){return/Android/gi.test(window.navigator.userAgent)}function yh(){return Ru()||Ip()}function ws(n,e,t,i){let r=hn(t);le(()=>{if(!n)return;function s(o){r.current(o)}return document.addEventListener(e,s,i),()=>document.removeEventListener(e,s,i)},[n,e,i])}function Iu(n,e,t,i){let r=hn(t);le(()=>{if(!n)return;function s(o){r.current(o)}return window.addEventListener(e,s,i),()=>window.removeEventListener(e,s,i)},[n,e,i])}const xh=30;function Mp(n,e,t){let i=hn(t),r=Ke(function(a,l){if(a.defaultPrevented)return;let h=l(a);if(h===null||!h.getRootNode().contains(h)||!h.isConnected)return;let d=(function u(g){return typeof g=="function"?u(g()):Array.isArray(g)||g instanceof Set?g:[g]})(e);for(let u of d)if(u!==null&&(u.contains(h)||a.composed&&a.composedPath().includes(u)))return;return!Cp(h,Tu.Loose)&&h.tabIndex!==-1&&a.preventDefault(),i.current(a,h)},[i,e]),s=Y(null);ws(n,"pointerdown",a=>{var l,h;yh()||(s.current=((h=(l=a.composedPath)==null?void 0:l.call(a))==null?void 0:h[0])||a.target)},!0),ws(n,"pointerup",a=>{if(yh()||!s.current)return;let l=s.current;return s.current=null,r(a,()=>l)},!0);let o=Y({x:0,y:0});ws(n,"touchstart",a=>{o.current.x=a.touches[0].clientX,o.current.y=a.touches[0].clientY},!0),ws(n,"touchend",a=>{let l={x:a.changedTouches[0].clientX,y:a.changedTouches[0].clientY};if(!(Math.abs(l.x-o.current.x)>=xh||Math.abs(l.y-o.current.y)>=xh))return r(a,()=>ki(a.target)?a.target:null)},!0),Iu(n,"blur",a=>r(a,()=>Ym(window.document.activeElement)?window.document.activeElement:null),!0)}function Wl(...n){return Ne(()=>Zr(...n),[...n])}function Mu(n,e,t,i){let r=hn(t);le(()=>{n=n??window;function s(o){r.current(o)}return n.addEventListener(e,s,i),()=>n.removeEventListener(e,s,i)},[n,e,i])}function Pp(n){return ho(n.subscribe,n.getSnapshot,n.getSnapshot)}function Lp(n,e){let t=n(),i=new Set;return{getSnapshot(){return t},subscribe(r){return i.add(r),()=>i.delete(r)},dispatch(r,...s){let o=e[r].call(t,...s);
vendor: 7,270 bytes, lines 4-5
4o&&(t=o,i.forEach(a=>a()))}}}function Ap(){let n;return{before({doc:e}){var t;let i=e.documentElement,r=(t=e.defaultView)!=null?t:window;n=Math.max(0,r.innerWidth-i.clientWidth)},after({doc:e,d:t}){let i=e.documentElement,r=Math.max(0,i.clientWidth-i.offsetWidth),s=Math.max(0,n-r);t.style(i,"paddingRight",`${s}px`)}}}function Dp(){return Ru()?{before({doc:n,d:e,meta:t}){function i(r){for(let s of t().containers)for(let o of s())if(o.contains(r))return!0;return!1}e.microTask(()=>{var r;if(window.getComputedStyle(n.documentElement).scrollBehavior!=="auto"){let a=hi();a.style(n.documentElement,"scrollBehavior","auto"),e.add(()=>e.microTask(()=>a.dispose()))}let s=(r=window.scrollY)!=null?r:window.pageYOffset,o=null;e.addEventListener(n,"click",a=>{if(ki(a.target))try{let l=a.target.closest("a");if(!l)return;let{hash:h}=new URL(l.href),d=n.querySelector(h);ki(d)&&!i(d)&&(o=d)}catch{}},!0),e.group(a=>{e.addEventListener(n,"touchstart",l=>{if(a.dispose(),ki(l.target)&&Um(l.target))if(i(l.target)){let h=l.target;for(;h.parentElement&&i(h.parentElement);)h=h.parentElement;a.style(h,"overscrollBehavior","contain")}else a.style(l.target,"touchAction","none")})}),e.addEventListener(n,"touchmove",a=>{if(ki(a.target)){if(Km(a.target))return;if(i(a.target)){let l=a.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),e.add(()=>{var a;let l=(a=window.scrollY)!=null?a:window.pageYOffset;s!==l&&window.scrollTo(0,s),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)})})}}:{}}function Op(){return{before({doc:n,d:e}){e.style(n.documentElement,"overflow","hidden")}}}function bh(n){let e={};for(let t of n)Object.assign(e,t(e));return e}let Yi=Lp(()=>new Map,{PUSH(n,e){var t;let i=(t=this.get(n))!=null?t:{doc:n,count:0,d:hi(),meta:new Set,computedMeta:{}};return i.count++,i.meta.add(e),i.computedMeta=bh(i.meta),this.set(n,i),this},POP(n,e){let t=this.get(n);return t&&(t.count--,t.meta.delete(e),t.computedMeta=bh(t.meta)),this},SCROLL_PREVENT(n){let e={doc:n.doc,d:n.d,meta(){return n.computedMeta}},t=[Dp(),Ap(),Op()];t.forEach(({before:i})=>i?.(e)),t.forEach(({after:i})=>i?.(e))},SCROLL_ALLOW({d:n}){n.dispose()},TEARDOWN({doc:n}){this.delete(n)}});Yi.subscribe(()=>{let n=Yi.getSnapshot(),e=new Map;for(let[t]of n)e.set(t,t.documentElement.style.overflow);for(let t of n.values()){let i=e.get(t.doc)==="hidden",r=t.count!==0;(r&&!i||!r&&i)&&Yi.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&Yi.dispatch("TEARDOWN",t)}});function Fp(n,e,t=()=>({containers:[]})){let i=Pp(Yi),r=e?i.get(e):void 0,s=r?r.count>0:!1;return qe(()=>{if(!(!e||!n))return Yi.dispatch("PUSH",e,t),()=>Yi.dispatch("POP",e,t)},[n,e]),s}function jp(n,e,t=()=>[document.body]){let i=qr(n,"scroll-lock");Fp(i,e,r=>{var s;return{containers:[...(s=r.containers)!=null?s:[],t]}})}function Np(n=0){let[e,t]=J(n),i=Ke(l=>t(l),[]),r=Ke(l=>t(h=>h|l),[]),s=Ke(l=>(e&l)===l,[e]),o=Ke(l=>t(h=>h&~l),[]),a=Ke(l=>t(h=>h^l),[]);return{flags:e,setFlag:i,addFlag:r,hasFlag:s,removeFlag:o,toggleFlag:a}}var zp={},Eh,Ch;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Eh=process==null?void 0:zp)==null?void 0:Eh.NODE_ENV)==="test"&&typeof((Ch=Element?.prototype)==null?void 0:Ch.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(` 5`)),[]});var Wp=(n=>(n[n.None=0]="None",n[n.Closed=1]="Closed",n[n.Enter=2]="Enter",n[n.Leave=4]="Leave",n))(Wp||{});function Gp(n){let e={};for(let t in n)n[t]===!0&&(e[`data-${t}`]="");return e}function Bp(n,e,t,i){let[r,s]=J(t),{hasFlag:o,addFlag:a,removeFlag:l}=Np(n&&r?3:0),h=Y(!1),d=Y(!1),u=go();return qe(()=>{var g;if(n){if(t&&s(!0),!e){t&&a(3);return}return(g=i?.start)==null||g.call(i,t),$p(e,{inFlight:h,prepare(){d.current?d.current=!1:d.current=h.current,h.current=!0,!d.current&&(t?(a(3),l(4)):(a(4),l(2)))},run(){d.current?t?(l(3),a(4)):(l(4),a(3)):t?l(1):a(1)},done(){var f;d.current&&Up(e)||(h.current=!1,l(7),t||s(!1),(f=i?.end)==null||f.call(i,t))}})}},[n,t,e,u]),n?[r,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[t,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function $p(n,{prepare:e,run:t,done:i,inFlight:r}){let s=hi();return Xp(n,{prepare:e,inFlight:r}),s.nextFrame(()=>{t(),s.requestAnimationFrame(()=>{s.add(Vp(n,i))})}),s.dispose}function Vp(n,e){var t,i;let r=hi();if(!n)return r.dispose;let s=!1;r.add(()=>{s=!0});let o=(i=(t=n.getAnimations)==null?void 0:t.call(n).filter(a=>a instanceof CSSTransition))!=null?i:[];return o.length===0?(e(),r.dispose):(Promise.allSettled(o.map(a=>a.finished)).then(()=>{s||e()}),r.dispose)}function Xp(n,{inFlight:e,prepare:t}){if(e!=null&&e.current){t();return}let i=n.style.transition;n.style.transition="none",t(),n.offsetHeight,n.style.transition=i}function Up(n){var e,t;return((t=(e=n.getAnimations)==null?void 0:e.call(n))!=null?t:[]).some(i=>i instanceof CSSTransition&&i.playState!=="finished")}function Gl(n,e){let t=Y([]),i=fe(n);le(()=>{let r=[...t.current];for(let[s,o]of e.entries())if(t.current[s]!==o){let a=i(e,r);return t.current=e,a}},[i,...e])}let fo=ze(null);fo.displayName="OpenClosedContext";var bt=(n=>(n[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n))(bt||{});function mo(){return Me(fo)}function Yp({value:n,children:e}){return U.createElement(fo.Provider,{value:n},e)}function Kp({children:n}){return U.createElement(fo.Provider,{value:null},n)}function Zp(n){function e(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",e))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",e),e())}let Ei=[];Zp(()=>{function n(e){if(!ki(e.target)||e.target===document.body||Ei[0]===e.target)return;let t=e.target;t=t.closest(Ks),Ei.unshift(t??e.target),Ei=Ei.filter(i=>i!=null&&i.isConnected),Ei.splice(10)}window.addEventListener("click",n,{capture:!0}),window.addEventListener("mousedown",n,{capture:!0}),window.addEventListener("focus",n,{capture:!0}),document.body.addEventListener("click",n,{capture:!0}),document.body.addEventListener("mousedown",n,{capture:!0}),document.body.addEventListener("focus",n,{capture:!0})});function Pu(n){let e=fe(n),t=Y(!1);le(()=>(t.current=!1,()=>{t.current=!0,uo(()=>{t.current&&e()})}),[e])}function Hp(){let n=typeof document>"u";return(e=>e.useSyncExternalStore)(fu)(()=>()=>{},()=>!1,()=>!n)}function Jr(){let n=Hp(),[e,t]=J(Ot.isHandoffComplete);return e&&Ot.isHandoffComplete===!1&&t(!1),le(()=>{e!==!0&&t(!0)},[e]),le(()=>Ot.handoff(),[]),n?!1:e}let Lu=ze(!1);function qp(){return Me(Lu)}function kh(n){return U.createElement(Lu.Provider,{value:n.force},n.children)}function Jp(n){let e=qp(),t=Me(Du),[i,r]=J(()=>{var s;if(!e&&t!==null)return(s=t.current)!=null?s:null;if(Ot.isServer)return null;let o=n?.getElementById("headlessui-portal-root");
5if(o)return o;if(n===null)return null;let a=n.createElement("div");return a.setAttribute("id","headlessui-portal-root"),n.body.appendChild(a)});return le(()=>{i!==null&&(n!=null&&n.body.contains(i)||n==null||n.body.appendChild(i))},[i,n]),le(()=>{e||t!==null&&r(t.current)},[t,r,e]),i}let Au=j,Qp=Qe(function(n,e){let{ownerDocument:t=null,...i}=n,r=Y(null),s=Wt(Zm(f=>{r.current=f}),e),o=Wl(r.current),a=t??o,l=Jp(a),h=Me(Qa),d=go(),u=Jr(),g=ft();return Pu(()=>{var f;l&&l.childNodes.length<=0&&((f=l.parentElement)==null||f.removeChild(l))}),!l||!u?null:Ol(U.createElement("div",{"data-headlessui-portal":"",ref:f=>{d.dispose(),h&&f&&d.add(h.register(f))}},g({ourProps:{ref:s},theirProps:i,slot:{},defaultTag:Au,name:"Portal"})),l)});function e0(n,e){let t=Wt(e),{enabled:i=!0,ownerDocument:r,...s}=n,o=ft();return i?U.createElement(Qp,{...s,ownerDocument:r,ref:t}):o({ourProps:{ref:t},theirProps:s,slot:{},defaultTag:Au,name:"Portal"})}let t0=j,Du=ze(null);function i0(n,e){let{target:t,...i}=n,r={ref:Wt(e)},s=ft();return U.createElement(Du.Provider,{value:t},s({ourProps:r,theirProps:i,defaultTag:t0,name:"Popover.Group"}))}let Qa=ze(null);function n0(){let n=Me(Qa),e=Y([]),t=fe(s=>(e.current.push(s),n&&n.register(s),()=>i(s))),i=fe(s=>{let o=e.current.indexOf(s);o!==-1&&e.current.splice(o,1),n&&n.unregister(s)}),r=Ne(()=>({register:t,unregister:i,portals:e}),[t,i,e]);return[e,Ne(()=>function({children:s}){return U.createElement(Qa.Provider,{value:r},s)},[r])]}let r0=Qe(e0),Ou=Qe(i0),s0=Object.assign(r0,{Group:Ou});function o0(n,e=typeof document<"u"?document.defaultView:null,t){let i=qr(n,"escape");Mu(e,"keydown",r=>{i&&(r.defaultPrevented||r.key===yu.Escape&&t(r))})}function a0(){var n;let[e]=J(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[t,i]=J((n=e?.matches)!=null?n:!1);return qe(()=>{if(!e)return;function r(s){i(s.matches)}return e.addEventListener("change",r),()=>e.removeEventListener("change",r)},[e]),t}function l0({defaultContainers:n=[],portals:e,mainTreeNode:t}={}){let i=fe(()=>{var r,s;let o=Zr(t),a=[];for(let l of n)l!==null&&(Pi(l)?a.push(l):"current"in l&&Pi(l.current)&&a.push(l.current));if(e!=null&&e.current)for(let l of e.current)a.push(l);for(let l of(r=o?.querySelectorAll("html > *, body > *"))!=null?r:[])l!==document.body&&l!==document.head&&Pi(l)&&l.id!=="headlessui-portal-root"&&(t&&(l.contains(t)||l.contains((s=t?.getRootNode())==null?void 0:s.host))||a.some(h=>l.contains(h))||a.push(l));return a});
5return{resolveContainers:i,contains:fe(r=>i().some(s=>s.contains(r)))}}let Fu=ze(null);function Sh({children:n,node:e}){let[t,i]=J(null),r=ju(e??t);return U.createElement(Fu.Provider,{value:r},n,r===null&&U.createElement(Ha,{features:Ys.Hidden,ref:s=>{var o,a;if(s){for(let l of(a=(o=Zr(s))==null?void 0:o.querySelectorAll("html > *, body > *"))!=null?a:[])if(l!==document.body&&l!==document.head&&Pi(l)&&l!=null&&l.contains(s)){i(l);break}}}}))}function ju(n=null){var e;return(e=Me(Fu))!=null?e:n}function Bl(){let n=Y(!1);return qe(()=>(n.current=!0,()=>{n.current=!1}),[]),n}var fr=(n=>(n[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n))(fr||{});function c0(){let n=Y(0);return Iu(!0,"keydown",e=>{e.key==="Tab"&&(n.current=e.shiftKey?1:0)},!0),n}function Nu(n){if(!n)return new Set;if(typeof n=="function")return new Set(n());let e=new Set;for(let t of n.current)Pi(t.current)&&e.add(t.current);return e}let h0="div";var Xi=(n=>(n[n.None=0]="None",n[n.InitialFocus=1]="InitialFocus",n[n.TabLock=2]="TabLock",n[n.FocusLock=4]="FocusLock",n[n.RestoreFocus=8]="RestoreFocus",n[n.AutoFocus=16]="AutoFocus",n))(Xi||{});function d0(n,e){let t=Y(null),i=Wt(t,e),{initialFocus:r,initialFocusFallback:s,containers:o,features:a=15,...l}=n;Jr()||(a=0);let h=Wl(t.current);m0(a,{ownerDocument:h});let d=p0(a,{ownerDocument:h,container:t,initialFocus:r,initialFocusFallback:s});_0(a,{ownerDocument:h,container:t,containers:o,previousActiveElement:d});let u=c0(),g=fe(w=>{if(!tn(t.current))return;let x=t.current;(y=>y())(()=>{oi(u.current,{[fr.Forwards]:()=>{Tr(x,Ht.First,{skipElements:[w.relatedTarget,s]})},[fr.Backwards]:()=>{Tr(x,Ht.Last,{skipElements:[w.relatedTarget,s]})}})})}),f=qr(!!(a&2),"focus-trap#tab-lock"),m=go(),_=Y(!1),p={ref:i,onKeyDown(w){w.key=="Tab"&&(_.current=!0,m.requestAnimationFrame(()=>{_.current=!1}))},onBlur(w){if(!(a&4))return;let x=Nu(o);tn(t.current)&&x.add(t.current);let y=w.relatedTarget;ki(y)&&y.dataset.headlessuiFocusGuard!=="true"&&(zu(x,y)||(_.current?Tr(t.current,oi(u.current,{[fr.Forwards]:()=>Ht.Next,[fr.Backwards]:()=>Ht.Previous})|Ht.WrapAround,{relativeTo:w.target}):ki(w.target)&&qt(w.target)))}},v=ft();return U.createElement(U.Fragment,null,f&&U.createElement(Ha,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:g,features:Ys.Focusable}),v({ourProps:p,theirProps:l,defaultTag:h0,name:"FocusTrap"}),f&&U.createElement(Ha,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:g,features:Ys.Focusable}))}let u0=Qe(d0),g0=Object.assign(u0,{features:Xi});function f0(n=!0){let e=Y(Ei.slice());return Gl(([t],[i])=>{i===!0&&t===!1&&uo(()=>{e.current.splice(0)}),i===!1&&t===!0&&(e.current=Ei.slice())},[n,Ei,e]),fe(()=>{var t;return(t=e.current.find(i=>i!=null&&i.isConnected))!=null?t:null})}function m0(n,{ownerDocument:e}){let t=!!(n&8),i=f0(t);Gl(()=>{t||Om(e?.body)&&qt(i())},[t]),Pu(()=>{t&&qt(i())})}function p0(n,{ownerDocument:e,container:t,initialFocus:i,initialFocusFallback:r}){let s=Y(null),o=qr(!!(n&1),"focus-trap#initial-focus"),a=Bl();return Gl(()=>{if(n===0)return;if(!o){r!=null&&r.current&&qt(r.current);return}let l=t.current;l&&uo(()=>{if(!a.current)return;let h=e?.activeElement;if(i!=null&&i.current){if(i?.current===h){s.current=h;return}}else if(l.contains(h)){s.current=h;return}if(i!=null&&i.current)qt(i.current);else{if(n&16){if(Tr(l,Ht.First|Ht.AutoFocus)!==Ja.Error)return}else if(Tr(l,Ht.First)!==Ja.Error)return;if(r!=null&&r.current&&(qt(r.current),e?.activeElement===r.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}s.current=e?.activeElement})},[r,o,n]),s}function _0(n,{ownerDocument:e,container:t,containers:i,previousActiveElement:r}){let s=Bl(),o=!!(n&4);Mu(e?.defaultView,"focus",a=>{if(!o||!s.current)return;let l=Nu(i);tn(t.current)&&l.add(t.current);let h=r.current;if(!h)return;let d=a.target;tn(d)?zu(l,d)?(r.current=d,qt(d)):(a.preventDefault(),a.stopPropagation(),qt(h)):qt(r.current)},!0)}function zu(n,e){for(let t of n)if(t.contains(e))return!0;return!1}function Wu(n){var e;return!!(n.enter||n.enterFrom||n.enterTo||n.leave||n.leaveFrom||n.leaveTo)||!kr((e
5=n.as)!=null?e:Bu)||U.Children.count(n.children)===1}let po=ze(null);po.displayName="TransitionContext";var v0=(n=>(n.Visible="visible",n.Hidden="hidden",n))(v0||{});function w0(){let n=Me(po);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}function y0(){let n=Me(_o);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}let _o=ze(null);_o.displayName="NestingContext";function vo(n){return"children"in n?vo(n.children):n.current.filter(({el:e})=>e.current!==null).filter(({state:e})=>e==="visible").length>0}function Gu(n,e){let t=hn(n),i=Y([]),r=Bl(),s=go(),o=fe((f,m=Ci.Hidden)=>{let _=i.current.findIndex(({el:p})=>p===f);_!==-1&&(oi(m,{[Ci.Unmount](){i.current.splice(_,1)},[Ci.Hidden](){i.current[_].state="hidden"}}),s.microTask(()=>{var p;!vo(i)&&r.current&&((p=t.current)==null||p.call(t))}))}),a=fe(f=>{let m=i.current.find(({el:_})=>_===f);return m?m.state!=="visible"&&(m.state="visible"):i.current.push({el:f,state:"visible"}),()=>o(f,Ci.Unmount)}),l=Y([]),h=Y(Promise.resolve()),d=Y({enter:[],leave:[]}),u=fe((f,m,_)=>{l.current.splice(0),e&&(e.chains.current[m]=e.chains.current[m].filter(([p])=>p!==f)),e?.chains.current[m].push([f,new Promise(p=>{l.current.push(p)})]),e?.chains.current[m].push([f,new Promise(p=>{Promise.all(d.current[m].map(([v,w])=>w)).then(()=>p())})]),m==="enter"?h.current=h.current.then(()=>e?.wait.current).then(()=>_(m)):_(m)}),g=fe((f,m,_)=>{Promise.all(d.current[m].splice(0).map(([p,v])=>v)).then(()=>{var p;(p=l.current.shift())==null||p()}).then(()=>_(m))});return Ne(()=>({children:i,register:a,unregister:o,onStart:u,onStop:g,wait:h,chains:d}),[a,o,i,u,g,d,h])}let Bu=j,$u=Us.RenderStrategy;function x0(n,e){var t,i;let{transition:r=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l,enter:h,enterFrom:d,enterTo:u,entered:g,leave:f,leaveFrom:m,leaveTo:_,...p}=n,[v,w]=J(null),x=Y(null),y=Wu(n),b=Wt(...y?[x,e,w]:e===null?[]:[e]),k=(t=p.unmount)==null||t?Ci.Unmount:Ci.Hidden,{show:R,appear:T,initial:E}=w0(),[C,M]=J(R?"visible":"hidden"),I=y0(),{register:L,unregister:A}=I;qe(()=>L(x),[L,x]),qe(()=>{if(k===Ci.Hidden&&x.current){if(R&&C!=="visible"){M("visible");return}return oi(C,{hidden:()=>A(x),visible:()=>L(x)})}},[C,x,L,A,R,k]);let D=Jr();qe(()=>{if(y&&D&&C==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,C,D,y]);let z=E&&!T,O=T&&R&&E,N=Y(!1),G=Gu(()=>{N.current||(M("hidden"),A(x))},I),te=fe(Ee=>{N.current=!0;let Se=Ee?"enter":"leave";G.onStart(x,Se,tt=>{tt==="enter"?s?.():tt==="leave"&&a?.()})}),Z=fe(Ee=>{let Se=Ee?"enter":"leave";N.current=!1,G.onStop(x,Se,tt=>{tt==="enter"?o?.():tt==="leave"&&l?.()}),Se==="leave"&&!vo(G)&&(M("hidden"),A(x))});le(()=>{y&&r||(te(R),Z(R))},[R,y,r]);let ce=!(!r||!y||!D||z),[,$]=Bp(ce,v,R,{start:te,end:Z}),P=$i({ref:b,className:((i=Za(p.className,O&&h,O&&d,$.enter&&h,$.enter&&$.closed&&d,$.enter&&!$.closed&&u,$.leave&&f,$.leave&&!$.closed&&m,$.leave&&$.closed&&_,!$.transition&&R&&g))==null?void 0:i.trim())||void 0,...Gp($)}),_e=0;C==="visible"&&(_e|=bt.Open),C==="hidden"&&(_e|=bt.Closed),R&&C==="hidden"&&(_e|=bt.Opening),!R&&C==="visible"&&(_e|=bt.Closing);let be=ft();return U.createElement(_o.Provider,{value:G},U.createElement(Yp,{value:_e},be({ourProps:P,theirProps:p,defaultTag:Bu,features:$u,visible:C==="visible",name:"Transition.Child"})))}function b0(n,e){let{show:t,appear:i=!1,unmount:r=!0,...s}=n,o=Y(null),a=Wu(n),l=Wt(...a?[o,e]:e===null?[]:[e]);Jr();let h=mo();if(t===void 0&&h!==null&&(t=(h&bt.Open)===bt.Open),t===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,u]=J(t?"visible":"hidden"),g=Gu(()=>{t||u("hidden")}),[f,m]=J(!0),_=Y([t]);qe(()=>{f!==!1&&_.current[_.current.length-1]!==t&&(_.current.push(t),m(!1))},[_,t]);let p=Ne(()=>({show:t,appear:i,initial:f}),[t,i,f]);qe(()=>{t?u("visible"):!vo(g)&&o.current!==null&&u("hidden")},[t,g]);let v={unmount:r},w=fe(()=>{var b;f&&m(!1),(b=n.beforeEnter)==null||b.call(n)}),x=fe(()=>{var b;f&&m(!1),(b=n.beforeLeave)==null||b.call(n)}),y=ft();return U.createElement(_o.Provider,{value:g},U.createElement(po.Provider,{value:p},y({ourProps:{...v,as:j,children:U.createElement(Vu,{ref:l,...v,...s,beforeEnter:w,beforeLeave:x})},theirProps:{},defaultTag:j,features:$u,visible:d==="visible",name:"Transition"})))}function E0(n,e){let t=Me(po)!==null,i=mo()!==null;return U.createElement(U.Fragment,null,!t&&i?U.createElement(el,{ref:e,...n}):U.createElement(Vu,{ref:e,...n}))}let el=Qe(b0),Vu=Qe(x0),$l=Qe(E0),C0=Object.assign(el,{Child:$l,Root:el});var k0=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(k0||{}),S0=(n=>(n[n.SetTitleId=0]="SetTitleId",n))(S0||{});let T0={0(n,e){return n.titleId===e.id?n:{...n,titleId:e.id}}},Vl=ze(null);Vl.displayName="DialogContext";function wo(n){let e=Me(Vl);if(e===null){let t=new Error(`<${n} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,wo),t}return e}function R0(n,e){return oi(e.type,T0,n,e)}let Th=Qe(function(n,e){let t=Oi(),{id:i=`headlessui-dialog-${t}`,open:r,onClose:s,initialFocus:o,role:a="dialog",autoFocus:l=!0,__demoMode:h=!1,unmount:d=!1,...u}=n,g=Y(!1);a=(function(){return a==="dialog"||a==="alertdialog"?a:(g.current||(g.current=!0,
vendor: 4,254 bytes, line 5
5console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let f=mo();r===void 0&&f!==null&&(r=(f&bt.Open)===bt.Open);let m=Y(null),_=Wt(m,e),p=Wl(m.current),v=r?0:1,[w,x]=cn(R0,{titleId:null,descriptionId:null,panelRef:On()}),y=fe(()=>s(!1)),b=fe($=>x({type:0,id:$})),k=Jr()?v===0:!1,[R,T]=n0(),E={get current(){var $;return($=w.panelRef.current)!=null?$:m.current}},C=ju(),{resolveContainers:M}=l0({mainTreeNode:C,portals:R,defaultContainers:[E]}),I=f!==null?(f&bt.Closing)===bt.Closing:!1;vp(h||I?!1:k,{allowed:fe(()=>{var $,P;return[(P=($=m.current)==null?void 0:$.closest("[data-headlessui-portal]"))!=null?P:null]}),disallowed:fe(()=>{var $;return[($=C?.closest("body > *:not(#headlessui-portal-root)"))!=null?$:null]})});let L=ku.get(null);qe(()=>{if(k)return L.actions.push(i),()=>L.actions.pop(i)},[L,i,k]);let A=Su(L,Ke($=>L.selectors.isTop($,i),[L,i]));Mp(A,M,$=>{$.preventDefault(),y()}),o0(A,p?.defaultView,$=>{$.preventDefault(),$.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),y()}),jp(h||I?!1:k,p,M),wp(k,m,y);let[D,z]=Hm(),O=Ne(()=>[{dialogState:v,close:y,setTitleId:b,unmount:d},w],[v,y,b,d,w]),N=Hr({open:v===0}),G={ref:_,id:i,role:a,tabIndex:-1,"aria-modal":h?void 0:v===0?!0:void 0,"aria-labelledby":w.titleId,"aria-describedby":D,unmount:d},te=!a0(),Z=Xi.None;k&&!h&&(Z|=Xi.RestoreFocus,Z|=Xi.TabLock,l&&(Z|=Xi.AutoFocus),te&&(Z|=Xi.InitialFocus));let ce=ft();return U.createElement(Kp,null,U.createElement(kh,{force:!0},U.createElement(s0,null,U.createElement(Vl.Provider,{value:O},U.createElement(Ou,{target:m},U.createElement(kh,{force:!1},U.createElement(z,{slot:N},U.createElement(T,null,U.createElement(g0,{initialFocus:o,initialFocusFallback:m,containers:M,features:Z},U.createElement(ip,{value:y},ce({ourProps:G,theirProps:u,slot:N,defaultTag:I0,features:M0,visible:v===0,name:"Dialog"})))))))))))}),I0="div",M0=Us.RenderStrategy|Us.Static;function P0(n,e){let{transition:t=!1,open:i,...r}=n,s=mo(),o=n.hasOwnProperty("open")||s!==null,a=n.hasOwnProperty("onClose");if(!o&&!a)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!o)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!a)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!s&&typeof n.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${n.open}`);if(typeof n.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${n.onClose}`);return(i!==void 0||t)&&!r.static?U.createElement(Sh,null,U.createElement(C0,{show:i,transition:t,unmount:r.unmount},U.createElement(Th,{ref:e,...r}))):U.createElement(Sh,null,U.createElement(Th,{ref:e,open:i,...r}))}let L0="div";function A0(n,e){let t=Oi(),{id:i=`headlessui-dialog-panel-${t}`,transition:r=!1,...s}=n,[{dialogState:o,unmount:a},l]=wo("Dialog.Panel"),h=Wt(e,l.panelRef),d=Hr({open:o===0}),u=fe(p=>{p.stopPropagation()}),g={ref:h,id:i,onClick:u},f=r?$l:j,m=r?{unmount:a}:{},_=ft();return U.createElement(f,{...m},_({ourProps:g,theirProps:s,slot:d,defaultTag:L0,name:"Dialog.Panel"}))}let D0="div";function O0(n,e){let{transition:t=!1,...i}=n,[{dialogState:r,unmount:s}]=wo("Dialog.Backdrop"),o=Hr({open:r===0}),a={ref:e,"aria-hidden":!0},l=t?$l:j,h=t?{unmount:s}:{},d=ft();return U.createElement(l,{...h},d({ourProps:a,theirProps:i,slot:o,defaultTag:D0,name:"Dialog.Backdrop"}))}let F0="h2";function j0(n,e){let t=Oi(),{id:i=`headlessui-dialog-title-${t}`,...r}=n,[{dialogState:s,setTitleId:o}]=wo("Dialog.Title"),a=Wt(e);le(()=>(o(i),()=>o(null)),[i,o]);let l=Hr({open:s===0}),h={ref:a,id:i};return ft()({ourProps:h,theirProps:r,slot:l,defaultTag:F0,name:"Dialog.Title"})}let N0=Qe(P0),yo=Qe(A0);Qe(O0);let Xl=Qe(j0),Ul=Object.assign(N0,{Panel:yo,Title:Xl,Description:ep});const Rh=[{name:"Home",href:"/"},{name:"Hoe werkt het",href:"/hoe-werkt-het"},{name:"Partners",href:"/partners"},{name:"Webinars",href:"/webinars"}];
5function z0(){const[n,e]=J(!1),t=Y(),i=Y(),r=Y(),s=Ml(),o=a=>a==="/"&&s.path==="/"?!0:s.path.indexOf(a)===0&&a!=="/";return zt(()=>{let a=!1;const l=()=>{a||(a=!0,requestAnimationFrame(()=>{const h=window.scrollY||0;n||(h>80?(i.current.classList.add("lg:hidden"),t.current.classList.remove("p-6"),t.current.classList.add("p-2","shadow-xl","bg-gray-900/90"),r.current.classList.add("w-22")):(i.current.classList.remove("lg:hidden"),t.current.classList.add("p-6"),t.current.classList.remove("p-2","shadow-xl","bg-gray-900/90"),r.current.classList.remove("w-22"))),a=!1}))};return window.addEventListener("scroll",l,{passive:!0}),()=>{window.removeEventListener("scroll",l)}},[]),c("nav",{class:"absolute inset-x-0 top-0 z-50 transition-all",children:[c("div",{ref:i,class:"hidden lg:block px-6 py-2 lg:py-3 lg:px-8 bg-black text-sm text-white shadow-xxl",children:c("div",{class:"flex items-center justify-between max-w-7xl mx-auto",children:[c("div",{}),c("div",{class:"flex items-center",children:[c("a",{href:"https://id.buurtwarmtewijzer.nl",target:"_blank",class:"flex items-center hover:text-white/70",children:[c("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-5 mr-1 text-white/70",children:c("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"})}),"Inloggen op ons portaal"]}),c("a",{href:"https://kennisbank.buurtwarmtewijzer.nl/",target:"_blank",class:"flex items-center ml-4 hover:text-white/70",children:[c("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-5 mr-1 text-white/70",children:c("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25"})}),"Kennisbank"]})]})]})}),c("div",{ref:t,"aria-label":"Global",class:"flex items-center justify-between p-6 lg:px-8 fixed w-full",children:c("div",{class:"flex items-center justify-between w-full xl:min-w-7xl lg:max-w-7xl mx-auto",children:[c("div",{class:"flex lg:flex-1",children:c("a",{ref:r,"aria-label":"Home",href:"/",class:"-m-1.5 p-1.5",children:[c("span",{class:"sr-only",children:"BWW"}),c("img",{src:"/svg/logo.svg",alt:"logo",class:"h-8 w-auto"})]})}),c("div",{class:"flex lg:hidden",children:c("button",{type:"button",onClick:()=>e(!0),class:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-200 relative cursor-pointer",children:[c("span",{class:"sr-only",children:"Open menu"}),c("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5","data-slot":"icon","aria-hidden":"true",class:"size-6",children:c("path",{d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5","stroke-linecap":"round","stroke-linejoin":"round"})}),c("span",{class:"absolute -left-11",children:"MENU"})]})}),c("div",{class:"hidden lg:flex lg:gap-x-12 items-center",children:[Rh.map(a=>c("a",{href:a.href,className:"text-sm/6 lg:text-base font-semibold flex items-center hover:text-bww-yellow "+(o(a.href)?"text-bww-yellow":"text-white "),children:[c("span",{class:"h-4 w-1 bg-bww-blue -skew-x-12 mr-3"}),a.name]},a.name)),c("a",{href:"/prijsindicatie-aanvragen",class:"rounded-md bg-bww-yellow hover:bg-bww-yellow/90 px-3.5 py-2.5 text-sm lg:text-base font-semibold text-black shadow-xs focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bww-yellow",children:"Prijsindicatie aanvragen"})]})]})}),c(Ul,{open:n,onClose:e,className:"lg:hidden",children:[c("div",{className:"fixed inset-0 z-50"}),c(yo,{className:"fixed inset-y-0 right-0 z-50 w-full overflow-y-auto bg-gray-900 p-6 sm:max-w-md sm:ring-1 sm:ring-gray-100/10",children:[c("div",{class:"flex items-center justify-between",children:[c("a",{href:"#",class:"-m-1.5 p-1.5",children:[c("span",{class:"sr-only",children:"BWW"}),c("img",{src:"svg/logo.svg",alt:"",class:"h-8 w-auto"})]}),c("button",{type:"button",onClick:()=>e(!1),className:"-m-2.5 rounded-md p-2.5 text-gray-700",children:[c("span",{className:"sr-only",children:"Close menu"}),c(Nl,{"aria-hidden":"true",className:"size-6 text-white cursor-pointer"})]})]}),c("div",{class:"mt-6 flow-root",children:c("div",{class:"-my-6 divide-y divide-white/10",children:[c("div",{class:"space-y-2 py-6",children:[Rh.map(a=>c("a",{href:a.href,className:"-mx-3 block rounded-lg px-3 py-2 text-base/7 font-semibold "+(o(a.href)?"text-bww-yellow":"text-white hover:bg-gray-800 "),children:a.name},a.name)),c("a",{href:"/prijsindicatie-aanvragen",class:"rounded-md bg-bww-yellow px-3.5 py-2.5 text-sm font-semibold text-black shadow-xs hover:bg-bww-yellow focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bww-yellow mt-4 inline-block ",children:"Vraag direct een prijsindicatie aan"})]}),c("div",{class:"text-white py-8",children:[c("a",{href:"https://kennisbank.buurtwarmtewijzer.nl/",class:"flex items-center py-3",children:[c("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-5 mr-1",children:c("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25"})}),"Kennisbank"]}),c("a",{href:"https://id.buurtwarmtewijzer.nl",class:"flex items-center py-3",children:[c("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-5 mr-1",children:c("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"})}),"Inloggen op ons portaal"]})]})]})})]})]})]})}function Xu(){return c(j,{children:c("div",{class:"relative z-10 px-6 xl:px-0 xl:min-w-7xl lg:max-w-7xl mx-auto",children:c("div",{class:"py-12 sm:py-18 lg:pt-48",children:[c("div",{class:"max-w-4xl text-left pb-12 lg:pb-18",children:c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-white sm:text-4xl flex items-start",children:[c("span",{class:"h-6 w-1.5 sm:h-8 sm:w-3 bg-bww-blue -skew-x-12 mr-3 mt-1 sm:mt-3.5"}),"Gemeenten die je voorgingen"]})}),c("div",{class:"grid grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-6 xl:min-w-7xl",children:[c("div",{class:"aspect-square bg-white p-2 lg:p-4",children:c("img",{class:"h-full w-full object-contain",src:"/images/logos/alkmaar.png"})}),c("div",{class:"aspect-square bg-white p-4",children:c("img",{class:"h-full w-full object-contain",src:"/images/logos/Gemeente-Almere.png"})}),c("div",{class:"aspect-square bg-white p-4",children:c("img",{class:"h-full w-full object-contain",src:"/images/logos/cuijk.png"})}),c("div",{class:"aspect-square bg-white p-4",children:c("img",{class:"h-full w-full object-contain",src:"/images/logos/gemeente-den-haag.png"})}),c("div",{class:"aspect-square bg-white p-4",children:c("img",{class:"h-full w-full object-contain",src:"/images/logos/Epe.jpg"})}),c("div",{class:"aspect-square bg-white p-4",children:c("img",{class:"h-full w-full object-contain",src:"/images/logos/Gouda.png"})}),c("div",{class:"aspect-square bg-white p-4",children:c("img",{class:"h-full w-full object-contain",src:"/images/logos/leiden.png"})}),c("div",{class:"aspect-square bg-white p-4",children:c("img",{class:"h-full w-full object-contain",src:"/images/logos/oosterhout.png"})}),c("div",{class:"aspect-square bg-white p-4",children:c("img",{class:"h-full w-full object-contain",src:"/images/logos/Gemeente-Wijk-bij-Duurstede.png"})}),c("div",{class:"aspect-square bg-white p-4",children:c("img",{class:"h-full w-full object-contain",src:"/images/logos/logo-zoeterwoude.svg"})})]})]})})})}function W0(){return le(()=>{document.title="BuurtWarmteWijzer: Het bewonersgerichte proces voor gemeenten om tot een draagvlakrijk warmteplan te komen"},[]),c(j,{children:[c("div",{class:"relative bg-bww-blue",children:[c("div",{class:"absolute inset-0 z-0",children:[c("video",{autoplay:!0,loop:!0,muted:!0,playsinline:!0,class:"absolute right-0 bottom-0",src:"/video/bg_1080.mp4"}),c("div",{class:"absolute inset-0 bg-linear-to-t from-bww-blue/0 to-gray-900/30"})]}),c("div",{class:"relative z-10 isolate px-6 pt-14 xl:px-0 xl:min-w-7xl lg:max-w-7xl mx-auto",children:c("div",{class:" max-w-2xl py-32 sm:py-48 lg:py-56",children:c("div",{class:"text-left",children:[c("h1",{class:"font-sans font-semibold text-5xl tracking-tight text-balance text-white sm:text-7xl",children:["Buurt",c("br",{class:"md:hidden"}),"Warmte",c("br",{class:"md:hidden"}),c("span",{class:"text-bww-yellow",children:"Wijzer"})]}),c("p",{class:"my-4 text-lg font-medium text-white sm:text-xl/8",children:"Maak samen met de buurt een warmteplan."}),c("p",{class:"mt-8 text-lg font-medium text-white sm:text-md/8",children:"De BuurtWarmteWijzer stelt gemeenten en energiecoöperaties in staat om samen met alle stakeholders van de buurt zelfstandig een warmteplan op te stellen. Dankzij een schaalbare participatieaanpak kunnen snel veel mensen worden betrokken en ontstaat breed draagvlak. Dit ondersteunt besluitvorming en versnelt de uitvoering van gedragen warmteplannen."}),c("div",{class:"mt-10 md:flex items-center justify-left gap-x-6",children:[c("a",{href:"/prijsindicatie-aanvragen",class:"block text-center rounded-md bg-bww-yellow hover:bg-bww-yellow/90 px-3.5 py-2.5 text-sm lg:text-base font-semibold text-black shadow-xs hover:bg-bww-yellow focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bww-yellow",children:"Vraag direct een prijsindicatie aan"}),c("div",{class:"flex items-center justify-center pt-6 md:pt-0",children:[c("span",{class:"mr-2 md:pt-0 inline-block text-sm/6 lg:text-base text-white",children:"of"}),c("a",{href:"/webinars",class:" text-sm/6 lg:text-base font-semibold text-white hover:text-bww-yellow flex items-center",children:["meld je aan voor een webinar ",c("span",{"aria-hidden":"true",children:c("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-5 ml-1",children:c("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.25 8.25 21 12m0 0-3.75 3.75M21 12H3"})})})]})]})]})]})})})]}),c("div",{class:"relative isolate overflow-hidden",children:[c("div",{"aria-hidden":"true",class:"absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80",children:c("div",{style:"clip-path: polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",class:"relative left-[calc(50%-11rem)] aspect-1155/678 w-144.5 -translate-x-1/2 rotate-30 bg-linear-to-tr from-bww-blue to-bww-blue opacity-10 sm:left-[calc(50%-30rem)] sm:w-288.75"})}),c("div",{"aria-hidden":"true",class:"absolute inset-x-0 top-[calc(100%-13rem)] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[calc(100%-30rem)]",children:c("div",{style:"clip-path: polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",class:"relative left-[calc(50%+3rem)] aspect-1155/678 w-144.5 -translate-x-1/2 bg-linear-to-tr from-from-bww-blue to-bww-blue opacity-10 sm:left-[calc(50%+36rem)] sm:w-288.75"})}),c("div",{class:"relative px-6 xl:px-0 xl:min-w-7xl lg:max-w-7xl mx-auto z-10",children:c("div",{class:"py-12 sm:py-18 lg:py-24",children:[c("div",{class:"max-w-4xl text-left pb-12 lg:pb-18",children:c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-white sm:text-4xl flex items-start",children:[c("span",{class:"h-6 w-1.5 sm:h-8 sm:w-3 bg-bww-blue -skew-x-12 mr-3 mt-1 sm:mt-3.5"}),"Wat maakt de warmtetransitie zo lastig?"]})}),c("div",{class:"grid grid-cols-1 lg:grid-cols-3 gap-12 lg:min-w-7xl text-white/90 text-xl",children:[c("div",{class:"relative p-8 pt-12 shadow-xl rounded-xl border-4 border-gray-700/10 bg-gray-800/90",children:[c("div",{class:"absolute -top-8 inset-x-0 w-full flex items-center justify-center ",children:c("div",{class:"h-16 w-16 bg-bww-yellow border-4 border-gray-700 rounded-full flex items-center justify-center text-gray-800 text-base",children:c("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"46",height:"46",fill:"currentColor",stroke:"currentColor",viewBox:"0 0 95 94.318",children:c("path",{d:"M68.786,18.503c3.98,3.959,5.259,9.805,4.355,15.259-.604,3.648-3.1,6.515-5.977,8.64-.711.525-2.296,1.301-2.802,1.808-.108.109-.187.12-.138.319,2.902,1.961,5.328,4.557,7.647,7.17,5.592,1.19,11.559,2.368,16.123,6.001.191-1.624-1.
5043-4.172-.697-5.7.255-1.13,2.465-1.709,2.965.14.812,3.003.988,6.524,1.749,9.579-.114.69-.398,1.482-1.179,1.584-2.916.21-6.034,1.168-8.913,1.359-1.155.077-2.062-.047-2.311-1.353-.178-.933.325-1.423,1.176-1.625,1.727-.409,3.829-.507,5.627-.828.185-.033.388.126.331-.191-3.423-2.973-8.001-4.325-12.378-5.202,3.619,5.83,2.245,13.123-2.039,18.174-5.742,6.769-15.881,9.473-24.163,5.986-.567-.239-2.074-1.166-2.469-1.22-.506-.07-2.388.449-3.134.499-13.096.879-27.108-6.851-27.853-21.068-1.976-.01-4.03-.246-5.731-1.315-2.557-1.607-3.402-4.8-2.976-7.68-1.543-1.083-2.775-2.6-2.975-4.541-.581-5.621,6.674-8.548,10.158-4.101,2.873,3.667.403,8.843-4.131,9.213-.53,3.809,2.081,5.63,5.643,5.247.647-6.241,2.602-12.489,7.451-16.714,3.309-2.883,7.709-4.212,12.046-4.481-.319-3.149-.149-6.313,1.08-9.259,5.05-12.101,24.548-14.622,33.517-5.701ZM37.388,33.439c2.625.294,5.215.706,7.768,1.385,5.797,1.542,11.144,4.311,16.213,7.441,4.498-2.355,8.577-5.171,8.917-10.699,1.29-20.962-33.115-19.531-33.203-.927l.305,2.801ZM34.85,36.636c-2.827-.034-5.812.674-8.294,2.033-5.667,3.104-8.08,9.592-8.689,15.739,7.337-.906,14.796-2.17,22.178-.922.437-.04,1.248-.935,1.669-1.239,1.313-.949,2.712-1.932,4.203-2.581-.852-.654-1.914-1.103-2.835-1.707-3.982-2.61-7.186-6.607-8.232-11.324ZM58.033,43.743c-6.149-3.498-12.76-6.363-19.884-7.113,1.113,4.443,4.935,8.078,8.951,10.077.652.325,2.102,1.099,2.77.926,2.432-1.23,5.003-2.17,7.461-3.342.131-.062.914-.323.701-.548ZM8.218,41.14c-.91.153-1.917,1.099-2.064,2.017-.483,3.024,3.366,4.307,4.817,1.789,1.101-1.911-.626-4.163-2.753-3.806ZM67.119,51.116c.144-.146-.706-.918-.852-1.056-.601-.574-4.668-4.047-5.135-4.069l-7.049,3.217c4.26,1.13,8.681,1.34,13.036,1.908ZM70.375,54.71c-6.868-1.161-13.984-1.151-20.596-3.56-2.061.875-4.02,2.014-5.835,3.325,3.801,1.486,6.95,3.948,8.889,7.569,2.529,4.722,3.248,9.976-1.323,13.696l-1.71,1.189c10.258,4.264,24.601-3.749,23.506-15.604-.214-2.318-1.714-4.699-2.932-6.615ZM37.752,56.253c-6.711-.564-13.39.407-20.017,1.318.243,2.194.64,4.282,1.52,6.316,3.451,7.981,13.991,12.714,22.384,11.989.132-.011.704-.064.59-.328-.062-.144-1.241-1.326-1.499-1.662-2.438-3.172-4.836-8.646-4.555-12.693.125-1.797.852-3.336,1.578-4.939ZM41.24,56.955c-.936.893-1.749,2.559-1.893,3.855-.484,4.355,2.61,10.636,5.91,13.421.141.119.72.624.796.659.459.213,2.113-.684,2.586-.968,3.73-2.238,3.663-5.536,2.042-9.198-1.78-4.02-5.214-6.683-9.441-7.769Z"})})})}),"Het beleid en het speelveld veranderen continu. Hoe houd je alles actueel?"]}),c("div",{class:"relative p-8 pt-12 shadow-xl rounded-xl border-2 border-gray-800 bg-gray-800/90",children:[c("div",{class:"absolute -top-8 inset-x-0 w-full flex items-center justify-center ",children:c("div",{class:"h-16 w-16 bg-bww-yellow border-4 border-gray-700 rounded-full flex items-center justify-center text-gray-900 text-base",children:c("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"36",height:"36",fill:"currentColor",stroke:"currentColor",viewBox:"0 0 94 89.729",children:[c("path",{d:"M0,37.905c.595-2.04,1.865-3.784,4.002-4.352,2.034-.541,10.614-.467,12.988-.245,1.916.179,2.523,1.738.872,2.722l-12.612.056c-3.555.892-3.302,5.288.537,5.673,1.412.142,4.141-.294,5.284.04.869.254,1.098,1.48.415,2.176-1.327,1.353-5.825-.245-7.616,1.012-1.394.978-1.503,3.159-.24,4.305,1.622,1.472,5.22.32,7.256.771.99.219,1.305,1.498.687,2.261-.996,1.231-5.99-.426-7.85,1.125-1.31,1.092-1.303,3.228.044,4.284,1.819,1.426,6.545-.355,7.805,1.19.629.772.26,1.94-.65,2.111-2.17.406-6.387-.943-7.77,1.409-1.038,1.766.115,4,2.1,4.27,4.822.657,11-.482,15.954.018,2.324.235,4.211,2.207,4.48,4.516.425,3.641-.928,11.515.968,14.27.785,1.14,2.421,2.247,3.314.62,2.446-6.733,3.663-14.536,6.195-21.16.391-1.023,2.211-3.274,2.211-3.481v-21.205c-.711-.107-1.304-.571-2.059-.514-2.774.208-6.738,2.457-9.605,2.36-1.964-.066-3.607-1.71-3.526-3.726.109-2.725,2.14-6.747,2.493-9.598-4.94-11.707,1.71-25.208,14.05-28.202,14.511-3.521,27.711,8.675,25.453,23.339,1.095-.028,2.132-.427,3.215-.547,10.84-1.203,20.983,5.286,24.454,15.564l1.155,5.179v3.305c-.513.708-1.059,1.178-1.973.78-1.195-.521-.676-2.379-.783-3.44-1.347-13.389-13.906-21.899-26.799-17.623-2.11,5.91-6.615,10.762-12.548,12.926-.227.19-.769,2.917-.837,3.431-2.758,21.086,25.106,31.505,36.813,13.864.45-.678,1.719-3.366,2.13-3.56,1.027-.485,2.237.213,2.122,1.381-.077.788-1.604,3.182-2.124,3.94-8.259,12.018-25.522,13.363-35.567,2.806-.094,2.44-1.237,3.67-3.664,3.861-2.021.16-8.856.244-10.512-.334-.322-.112-.634-.351-.878-.588-.494.514-.648,1.229-.874,1.876-2.339,6.701-3.751,13.975-6.1,20.705-2.026,3.382-5.711,2.654-7.881-.202-2.916-3.838-1.013-11.039-1.572-15.686-.133-1.104-.996-1.977-2.111-2.111-4.713-.568-10.572.392-15.433.011-2.859-.224-4.638-1.899-5.409-4.596v-2.02c.463-1.147.861-2.221,1.823-3.054-.827-.999-1.398-1.95-1.823-3.188v-2.02c.403-1.24.87-2.287,1.823-3.213-.953-.926-1.419-1.973-1.823-3.213v-2.02c.425-1.238.996-2.189,1.823-3.188-.962-.833-1.36-1.907-1.823-3.054v-2.02ZM42.372,2.893c-12.221,1.244-18.888,15.047-13.917,25.924l-2.48,9.621c.098.917.614.989,1.422.892,2.83-.338,7.559-2.777,10.174-2.186,5.571,1.258,8.182,2.506,14.014.116C70.331,29.576,63.846.707,42.372,2.893ZM41.125,41.026v21.848h10.465v-4.682c0-.128-1.072-1.806-1.259-2.229-2.149-4.864-2.671-9.691-1.68-14.936-2.503.416-5.027.503-7.526,0Z"}),c("path",{d:"M70.278,48.793c3.792-.189,7.869,1.183,10.773,3.622.916.77,2.852,2.396,2.013,3.656-1.184,1.779-2.776-.716-3.665-1.453-5.297-4.389-12.201-3.956-17.251.546-.703.627-1.09,1.958-2.476,1.372-2.379-1.006,1.07-3.847,2.031-4.57,2.456-1.846,5.483-3.02,8.575-3.174Z"}),c("path",{d:"M77.803,39.61c1.826-.216,3.843.402,5.161,1.711,1.169,1.161.87,3.007-.757,2.793-1.161-.152-1.679-1.868-3.721-1.818-1.95.048-3.081,2.599-4.494,1.57-2.312-1.685,2.179-4.063,3.811-4.256Z"}),c("path",{d:"M58.802,43.729c-1.791-1.795,2.582-3.996,4.098-4.151,1.624-.166,3.623.446,4.848,1.538.855.762,1.556,2.142.249,2.822-1.29.671-1.787-.82-2.878-1.294-.995-.432-2.008-.434-3.006,0-1.035.45-2.034,2.364-3.311,1.085Z"}),c("path",{d:"M37.401,12.609c.268-.062.603-.089.872-.039.911.172,5.078,5.271,6.274,6.044l6.095-5.8c1.486-.862,2.902.443,1.95,1.95l-5.955,5.975,5.954,5.975c.914,1.321-.603,2.822-1.911,1.911l-5.975-5.954-5.796,5.767c-1.
5698,1.165-3.126-.31-1.898-2.082.676-.976,5.497-5.234,5.569-5.642l-5.838-6.056c-.434-.742-.253-1.84.658-2.049Z"})]})})}),"Veel bewoners zijn nog niet bezig met een aardgasvrije toekomst. Hoe kunnen je hen activeren?"]}),c("div",{class:"relative p-8 pt-12 shadow-xl rounded-xl border-2 border-gray-800 bg-gray-800/90",children:[c("div",{class:"absolute -top-8 inset-x-0 w-full flex items-center justify-center ",children:c("div",{class:"h-16 w-16 bg-bww-yellow border-4 border-gray-700 rounded-full flex items-center justify-center text-gray-900 text-base",children:c("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"36",height:"36",fill:"currentColor",viewBox:"0 0 24.284 24.284",children:[c("path",{d:"M0,14.466c.097-.121.181-.239.355-.238,1.05.064,2.19-.082,3.228,0,1.224.095,1.758.964,2.276,1.946.722-.542,1.584-.986,2.393-1.4.09-.046.411-.235.476-.193.058.185.276.367.343.517.021.046.044.063-.008.104-.718.472-1.643.787-2.344,1.264-.129.088-.387.278-.436.421-.097.279,1.295,1.704.465,1.885-.189.041-.322-.01-.433-.164-.571-.789-1.391-3.04-2.157-3.44-.082-.043-.419-.181-.483-.181H.949c.173.727.913,1.213,1.637,1.28.264.024.689-.083.878.118l2.125,3.993c.118.186.156.306.411.305.337-.002,1.164-.582,1.542-.691.196-.22-.22-1.187.404-1.213.27-.011.382.156.404.404.136,1.507-.107,3.217-.001,4.746.001.174-.117.258-.238.355h-.285c-.058-.05-.237-.193-.237-.261v-3.201c-.836.341-1.762,1.123-2.514.166l-2.094-3.953c-1.001.04-1.919-.361-2.478-1.198-.234-.349-.315-.719-.502-1.087v-.285Z"}),c("path",{d:"M24.284,14.466v.285c-.187.368-.268.738-.502,1.087-.56.837-1.478,1.238-2.478,1.198l-2.094,3.953c-.755.961-1.676.171-2.514-.166v3.201c0,.068-.179.211-.237.261h-.285c-.121-.097-.239-.181-.238-.355.106-1.529-.138-3.239-.001-4.746.022-.248.135-.415.404-.404.623.026.208.994.404,1.213.557.12,1.588,1.151,1.953.387l2.125-3.993c.189-.202.614-.094.878-.118.733-.068,1.453-.548,1.637-1.28h-2.727c-.064,0-.401.139-.483.181-.766.4-1.586,2.651-2.157,3.44-.25.345-.755.158-.703-.273.035-.29.605-1.003.723-1.324.09-.271-.463-.569-.663-.687-.67-.394-1.419-.72-2.098-1.105l.33-.66c.975.495,2.001.944,2.868,1.613.513-.977,1.059-1.85,2.276-1.946,1.037-.082,2.179.065,3.228,0,.174-.001.258.117.355.238Z"}),c("path",{d:"M4.648,0c1.579.407,1.667,2.506.103,2.996-.058.094.031.878-.018,1.097-.081.364-.657.363-.739,0-.04-.178-.04-1.367,0-1.545.09-.402.707-.144,1.007-.605.551-.849-.737-1.679-1.276-.849-.19.292-.017.829-.523.807-.457-.019-.381-.543-.283-.855.177-.566.62-.872,1.16-1.046h.569Z"}),c("path",{d:"M12.047,0c1.579.407,1.667,2.506.103,2.996-.058.094.031.878-.018,1.097-.081.364-.657.363-.739,0-.04-.178-.04-1.367,0-1.545.09-.402.707-.144,1.007-.605.551-.849-.737-1.679-1.276-.849-.19.292-.017.829-.523.807-.457-.019-.381-.543-.283-.855.177-.566.62-.872,1.16-1.046h.569Z"}),c("path",{d:"M19.446,0c1.579.407,1.667,2.506.103,2.996-.058.094.031.878-.018,1.097-.081.364-.657.363-.739,0-.04-.178-.04-1.367,0-1.545.09-.402.707-.144,1.007-.605.551-.849-.737-1.679-1.276-.849-.19.292-.017.829-.523.807-.457-.019-.381-.543-.283-.855.177-.566.62-.872,1.16-1.046h.569Z"}),c("path",{d:"M9.188,7.977c.371-.081.458.258.702.464,1.552,1.316,4.139-.986,5.059,1.392.444,1.147.389,3.932-.389,4.94-1.099,1.424-2.397,2.66-4.007.927-1.136-1.223-1.46-1.775-1.489-3.492-.003-.184.083-.395.042-.611-.018-.092-.283-.42-.354-.595-.274-.678-.197-1.5-.011-2.191.063-.236.186-.777.448-.834ZM14.418,11.762h-4.553v1.399c0,.057.084.379.109.461.117.385,1.012,1.484,1.331,1.776.525.479,1.197.479,1.722,0,.518-.473,1.392-1.565,1.392-2.284v-1.352Z"}),c("path",{d:"M8.545,6.79c-.067.312.102,1.022-.102,1.25-.207.232-.613.121-.662-.194-.031-.198-.026-1.435.033-1.574.137-.322.747-.071,1.017-.595.36-.698-.432-1.436-1.098-1.003-.485.315-.169,1.045-.736,1.021-.546-.024-.348-.765-.185-1.089.544-1.08,2.147-1.081,2.693,0,.455.902-.019,1.898-.959,2.184Z"}),c("path",{d:"M15.944,6.79c-.067.312.102,1.022-.102,1.25-.207.232-.613.121-.662-.194-.031-.198-.026-1.435.033-1.574.137-.322.747-.071,1.017-.595.36-.698-.432-1.436-1.098-1.003-.485.315-.169,1.045-.736,1.021-.546-.024-.348-.765-.185-1.089.544-1.08,2.147-1.081,2.693,0,.455.902-.019,1.898-.959,2.184Z"}
5),c("path",{d:"M12.034,17.273c.556-.121.652.645.216.74-.556.121-.652-.645-.216-.74Z"}),c("path",{d:"M12.034,18.791c.556-.121.652.645.216.74-.556.121-.652-.645-.216-.74Z"}),c("path",{d:"M12.034,20.309c.556-.121.652.645.216.74-.556.121-.652-.645-.216-.74Z"})]})})}),"Zoveel warmteoplossingen, zoveel belangen. Hoe maak je de juiste keuze?"]})]})]})})]}),c("div",{class:"relative",children:[c("div",{class:"absolute inset-0 z-0",children:[c("img",{class:"object-cover h-full w-full grayscale",src:"/images/Van ingewikkeld naar duidelijk.jpg"}),c("div",{class:"absolute inset-0 bg-gray-900/90"})]}),c("div",{class:"relative z-10 px-6 xl:px-0 xl:min-w-7xl lg:max-w-7xl mx-auto py-12 sm:py-18 lg:py-48",children:c("div",{class:"grid grid-cols-1 lg:grid-cols-5 gap-12",children:[c("div",{class:"lg:col-span-2 text-white",children:[c("div",{class:"max-w-4xl text-left pb-8",children:c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-white sm:text-4xl flex items-start",children:"De aanpak van de BuurtWarmteWijzer"})}),c("p",{class:"pb-12 text-md lg:text-lg",children:"De BuurtWarmteWijzer zet de bewoner of eigenaar centraal en rekent per huishouden, zodat plannen aansluiten bij de situatie van zowel bewoners als de buurt. Bewoners geven hun woondata, wensen en voorkeuren door, waarmee een gedragen warmteplan ontstaat en collectieve kansen benut worden."}),c("a",{href:"/hoe-werkt-het",class:" text-center rounded-md bg-bww-yellow px-3.5 py-2.5 text-sm lg:text-base font-semibold text-black shadow-xs hover:bg-bww-yellow/90 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bww-yellow flex items-center justify-center",children:"Zo werkt het BuurtWarmteWijzer proces"})]}),c("div",{class:"lg:col-span-3",children:c("div",{class:"aspect-video rounded-2xl overflow-hidden border-3 border-gray-800 shadow-xl shadow-white/10",children:c("iframe",{class:"w-full h-full",src:"https://www.youtube-nocookie.com/embed/j20lI9Z_WUU?autoplay=0&mute=1&rel=0"})})})]})})]}),c("div",{class:"relative isolate overflow-hidden",children:[c("div",{"aria-hidden":"true",class:"absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80",children:c("div",{style:"clip-path: polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",class:"relative left-[calc(50%-11rem)] aspect-1155/678 w-144.5 -translate-x-1/2 rotate-30 bg-linear-to-tr from-bww-blue to-bww-blue opacity-10 sm:left-[calc(50%-30rem)] sm:w-288.75"})}),c("div",{class:"relative z-10 px-6 xl:px-0 xl:min-w-7xl lg:max-w-7xl mx-auto",children:c("div",{class:" max-w-4xl mx-auto py-12 sm:py-18 lg:py-24",children:[c("div",{class:"max-w-4xl text-left pb-12 lg:pb-18",children:c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-white sm:text-4xl flex items-start",children:[c("span",{class:"h-6 w-1.5 sm:h-8 sm:w-3 bg-bww-blue -skew-x-12 mr-3 mt-1 sm:mt-3.5"}),"In 3 stappen naar een gedragen warmteplan"]})}),c("div",{class:"grid grid-cols-1 lg:grid-cols-1 gap-12",children:[c("div",{class:"relative p-8 px-12 lg:px-8 shadow-xl rounded-xl border-2 border-gray-800 bg-gray-800/90",children:[c("div",{class:"absolute top-8 lg:-left-8 -left-4 h-16 w-16 bg-bww-yellow border-4 border-gray-700 rounded-full flex items-center justify-center text-gray-700 text-2xl font-bold",children:"1"}),c("div",{class:"pl-6 text-white",children:[c("div",{class:"text-2xl font-bold text-white block",children:["Vraag ",c("a",{href:"/prijsindicatie-aanvragen",class:"underline text-bww-yellow",children:"een prijsindicatie aan"})," "]}),c("p",{class:"text-lg pt-2 block text-gray-200",children:"Ontvang binnen 5 minuten een overzicht van de kosten."})]})]}),c("div",{class:"relative p-8 px-12 lg:px-8 shadow-xl rounded-xl border-2 border-gray-800 bg-gray-800/90",children:[c("div",{class:"absolute top-8 lg:-left-8 -left-4 h-16 w-16 bg-bww-yellow border-4 border-gray-700 rounded-full flex items-center justify-center text-gray-700 text-2xl font-bold",children:"2"}),c("div",{class:"pl-6",children:[c("div",{class:"text-2xl font-bold text-white block",children:"Doorloop het BuurtWarmteWijzer-proces met de buurt"}),c("p",{class:"text-lg pt-2 block text-gray-200",children:["Stap voor stap ontdekken ",c("a",{href:"/hoe-werkt-het",class:"underline text-bww-yellow",children:"hoe het werkt"})]})]})]}),c("div",{class:"relative p-8 px-12 lg:px-8 shadow-xl rounded-xl border-2 border-gray-800 bg-gray-800/90",children:[c("div",{class:"absolute top-8 lg:-left-8 -left-4 h-16 w-16 bg-bww-yellow border-4 border-gray-700 rounded-full flex items-center justify-center text-gray-700 text-2xl font-bold",children:"3"}),c("div",{class:"pl-6",children:[c("div",{class:"text-2xl font-bold text-white block",children:"Maak een warmteplan dat werkt "}),c("p",{class:"text-lg pt-2 block text-gray-200",children:"Alle ingrediënten voor een uitvoerbaar en gedragen warmteplan."})]})]})]}),c("div",{class:"pt-12 text-white",children:c("p",{children:["Vragen of meer weten: kijk op ",c("a",{href:"https://kennisbank.buurtwarmtewijzer.nl/",class:"text-bww-yellow underline",children:"de Kennisbank"})," of neem ",c("a",{href:"mailto:[email protected]",class:"text-bww-yellow underline",children:"contact"})," met ons op."]})})]})}),c("div",{"aria-hidden":"true",class:"absolute inset-x-0 top-[calc(100%-13rem)] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[calc(100%-30rem)]",children:c("div",{style:"clip-path: polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",class:"relative left-[calc(50%+3rem)] aspect-1155/678 w-144.5 -translate-x-1/2 bg-linear-to-tr from-from-bww-blue to-bww-blue opacity-10 sm:left-[calc(50%+36rem)] sm:w-288.75"})})]}),c("div",{class:"relative",children:[c("div",{class:"absolute inset-0 z-0",children:[c("img",{class:"object-cover h-full w-full grayscale",src:"/images/PeVa_CWI_Science_Park_02-29-2024-3_A4E.jpg"}),c("div",{class:"absolute inset-0 bg-gray-900/90"})]}),c("div",{class:"grid grid-cols-1 lg:grid-cols-2 gap-12 px-6 xl:px-0 lg:min-w-7xl lg:max-w-7xl mx-auto py-12 sm:py-18 lg:py-48",children:[c("div",{class:"relative p-8 lg:p-12 shadow-xl rounded-xl overflow-hidden bg-gray-800",children:c("div",{class:"relative z-10",children:c("div",{class:"",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-white flex items-start",children:[c("span",{class:"h-6 w-1.5 bg-bww-blue -skew-x-12 mr-3 mt-1 "}),"Wat bespaar je?"]}),c("ul",{class:"pt-8 pl-4 lg:pl-8 list-disc text-white text-xl leading-10 marker:text-bww-yellow",children:[c("li",{children:"Weerstand en protest uit de buurt"}),c("li",{children:"Veel tijd, geld en rapporten"}),c("li",{children:"Risico's a.g.v. te weinig participatie"}),c("li",{children:"Lastige vragen vanuit de Raad"})]})]})})}),c("div",{class:"relative p-8 lg:p-12 shadow-xl rounded-xl overflow-hidden bg-gray-800",children:c("div",{class:"relative z-10",children:c("div",{class:"",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-white flex items-start",children:[c("span",{class:"h-6 w-1.5 bg-bww-blue -skew-x-12 mr-3 mt-1 "}),"Wat levert het op?"]}),c("ul",{class:"pt-8 pl-4 lg:pl-8 list-disc text-white text-xl leading-10 marker:text-bww-yellow",children:[c("li",{children:"Een zorgvuldige afweg
5ing van warmteoplossingen"}),c("li",{children:"Een vooraf duidelijk proces"}),c("li",{children:"Berekeningen op basis van werkelijke data"}),c("li",{children:"Een warmteplan dat door de buurt wordt gedragen"})]})]})})})]})]}),c("div",{class:"relative bg-gray-900 isolate overflow-hidden",children:[c("div",{"aria-hidden":"true",class:"absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80",children:c("div",{style:"clip-path: polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",class:"relative left-[calc(50%-11rem)] aspect-1155/678 w-144.5 -translate-x-1/2 rotate-30 bg-linear-to-tr from-bww-blue to-bww-blue opacity-10 sm:left-[calc(50%-30rem)] sm:w-288.75"})}),c(Xu,{}),c("div",{"aria-hidden":"true",class:"absolute inset-x-0 top-[calc(100%-13rem)] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[calc(100%-30rem)]",children:c("div",{style:"clip-path: polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",class:"relative left-[calc(50%+3rem)] aspect-1155/678 w-144.5 -translate-x-1/2 bg-linear-to-tr from-from-bww-blue to-bww-blue opacity-10 sm:left-[calc(50%+36rem)] sm:w-288.75"})})]}),c("div",{class:"relative",children:[c("div",{class:"absolute inset-0 z-0",children:[c("img",{class:"object-cover h-full w-full",src:"/images/usp.jpg"}),c("div",{class:"absolute inset-0 bg-gray-900/80"})]}),c("div",{class:"relative z-10 px-6 py-12 sm:py-18 lg:py-24 xl:px-0 max-w-4xl mx-auto",children:c("div",{class:"mt-10 md:flex items-center justify-center gap-x-6",children:[c("a",{href:"/prijsindicatie-aanvragen",class:"block text-center rounded-md bg-bww-yellow hover:bg-bww-yellow/90 px-3.5 py-2.5 text-sm lg:text-base font-semibold text-black shadow-xs hover:bg-bww-yellow focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bww-yellow",children:"Vraag direct een prijsindicatie aan"}),c("div",{class:"flex items-center justify-center pt-6 md:pt-0",children:[c("span",{class:"mr-2 md:pt-0 inline-block text-sm/6 lg:text-base text-white",children:"of"}),c("a",{href:"/webinars",class:" text-sm/6 lg:text-base font-semibold text-white hover:text-bww-yellow flex items-center",children:["meld je aan voor een webinar ",c("span",{"aria-hidden":"true",children:c("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-5 ml-1",children:c("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.25 8.25 21 12m0 0-3.75 3.75M21 12H3"})})})]})]})]})})]})]})}function Xe({name:n,title:e,children:t}){const[i,r]=J(!1);return c(j,{children:[c("button",{type:"button",className:"underline text-bww-yellow font-semibold cursor-pointer text-left",onClick:()=>r(!0),children:n}),c(Ul,{open:i,onClose:()=>r(!1),className:"relative z-50 text-gray-900",children:[c("div",{class:"fixed inset-0"}),c("div",{class:"fixed inset-0 overflow-hidden",children:c("div",{class:"absolute inset-0 overflow-hidden",children:c("div",{class:"pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10 sm:pl-16",children:c(yo,{transition:!0,className:"pointer-events-auto w-screen max-w-4xl transform transition duration-500 ease-in-out data-[closed]:translate-x-full sm:duration-700 ",children:c("div",{class:"relative flex h-full flex-col overflow-y-auto bg-white shadow-2xl p-4 lg:p-8",children:[c("div",{class:"flex items-start justify-between",children:[c(Xl,{className:"font-semibold"}),c("div",{class:"ml-3 flex h-7 items-center",children:c("button",{type:"button",onClick:()=>r(!1),class:"cursor-pointer",children:c(Nl,{className:"w-6"})})})]}),c("div",{class:"relative mt-6 flex-1 px-4 md:px-8",children:t})]})})})})})]})]})}function et(){return c(j,{children:window.location.pathname.indexOf("offerte/")>-1?"":c("div",{class:"pb-12",children:[c("div",{class:"max-w-4xl py-8",children:[c("h2",{class:"font-sans font-semibold text-xl tracking-tight text-balance text-gray-900 sm:text-2xl",children:"Klaar om van visie naar uitvoering te gaan?"}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:"Met heldere stappen, digitale tools en brede betrokkenheid bouw je aan draagvlak en versnel je de besluitvorming. Ontdek wat we voor jouw buurt kunnen doen."})]}),c("div",{class:"mt-6 md:flex items-center justify-start gap-x-6",children:[c("a",{href:"/prijsindicatie-aanvragen",class:"block text-center rounded-md bg-bww-yellow hover:bg-bww-yellow/90 px-3.5 py-2.5 text-sm lg:text-base font-semibold text-black shadow-xs hover:bg-bww-yellow focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bww-yellow",children:"Vraag direct een prijsindicatie aan"}),c("div",{class:"flex items-center justify-center pt-6 md:pt-0",children:[c("span",{class:"mr-2 md:pt-0 inline-block text-sm/6 lg:text-base text-text-gray-900",children:"of"}),c("a",{href:"/webinars",class:" text-sm/6 lg:text-base font-semibold text-text-gray-900 hover:text-bww-yellow flex items-center",children:["meld je aan voor een webinar ",c("span",{"aria-hidden":"true",children:c("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-5 ml-1",children:c("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.25 8.25 21 12m0 0-3.75 3.75M21 12H3"})})})]})]})]})]})})}function G0(){return c("div",{class:"-my-6 divide-y divide-gray-900/10 ",children:[c("div",{children:c("div",{class:"max-w-4xl py-8",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-gray-900 sm:text-4xl",children:"Het digitale portaal"}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:"Het digitale portaal biedt jou en de werkgroep alle functionaliteiten om het proces vlot te laten verlopen. Zo richt je eenvoudig de BWW-app in voor jouw buurt, met een eigen buurt-URL en een omschrijving van de werkgroep. Daarnaast deel je de planning met alle buurtbewoners en koppel je hulpvragen uit de app direct door naar het mailadres van de werkgroep."}),c("div",{class:"py-12",children:c("div",{children:c("div",{class:"rounded-2xl overflow-hidden shadow",children:c("img",{class:"object-cover w-full",src:"/images/hoe-werkt-het/portaal.png"})})})})]})}),c(et,{})]})}function B0(){return c("div",{class:"-my-6 divide-y divide-gray-900/10 ",children:[c("div",{children:c("div",{class:"max-w-4xl py-8",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-gray-900 sm:text-4xl",children:"De Digital twin"}),c("p",{class:"font-bold py-4",children:"De Digital Twin verzamelt en visualiseert alle beschikbare open data van jouw buurt, op basis van buurtcontouren die je zelf kunt intekenen. Ontbrekende maar relevante gegevens voor de warmtetransitie kun je eenvoudig zelf toevoegen, zoals:"}),c("ul",{class:"pt-2 pl-4 list-disc leading-10 marker:text-bww-blue",children:[c("li",{children:"Collectief eigendom en (gemeentelijke) monumenten"}),c("li",{children:"Adressen die al aardgasvrij zijn of zijn aangesloten op een warmtenet"}),c("li",{children:"Collectieve verwarmingssystemen"}),c("li",{children:"Het energieverbruik van utiliteitsgebouwen"}),c("li",{children:"Data van woningcorporaties of grote verhuurders"}),c("li",{children:"Adressen met geplande sloop"})]}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:"In stap 3 gebruik je dit model om berekeningen en analyses uit te voeren."})]})}),c("div",{class:"py-12",children:c("div",{children:c("div",{class:"aspect-video rounded-2xl overflow-hidden border-3 border-gray-800 shadow-xl shadow-white/10",children:c("iframe",{class:"w-full h-full",src:"https://www.youtube-nocookie.com/embed/urExjc3PjmU?autoplay=0&mute=1&rel=0"})})})}),c(et,{})]})}function $0(){return c("div",{class:"-my-6 divide-y divide-gray-900/10 ",children:[c("div",{children:c("div",{class:"max-w-4xl py-8",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-gray-900 sm:text-4xl",children:"De BuurtWarmteWijzer-app"}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:["Met een persoonlijke activatiecode loggen bewoners in op de BuurtWarmteWijzer-app. Via een interactief chatgesprek beantwoorden zij drie vragenrondes over energieverbruik, woningkenmerken en wat ze belangrijk vinden. Na elke ronde ontvangen ze persoonlijke inzichten en verdienen ze medailles (brons, zilver en goud). Tegelijkertijd kunnen bewoners deelnemen aan buurtbijeenkomsten. Dit bevordert de betrokkenheid en het gesprek over duurzame warmteoplossingen. De werkgroep blijft beschikbaar voor vragen en ondersteuning. Indien nodig ontvangen de bewoners een tweede uitnodigingsbrief met een link naar het uitlegfilmpje ",c("strong",{children:'"Doe mee met de BuurtWarmteWijzer!"'}),"."]})]})}),c("div",{class:"py-12",children:c("div",{children:c("div",{class:"aspect-video rounded-2xl overflow-hidden border-3 border-gray-800 shadow-xl shadow-white/10",children:c("iframe",{class:"w-full h-full",src:"https://www.youtube-nocookie.com/embed/JMkoaQhhR28?autoplay=0&mute=1&rel=0"})})})}),c(et,{})]})}function V0(){return c("div",{class:"-my-6 divide-y divide-gray-900/10 ",children:[c("div",{children:c("div",{class:"max-w-4xl py-8",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-gray-900 sm:text-4xl",children:"Het handboek"}),c("p",{class:"font-bold py-4",children:"Het BuurtWarmteWijzer-handboek beschrijft alle stappen van het proces. er stap wordt ingegaan op Weten, Doen en Resultaat. Het is geen vaste blauwdruk, maar een reisgids: vol tips, voorbeelden en handige documenten om het proces zelf in te kleuren en vorm te geven."}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:"Elke buurt doorloopt het proces op eigen wijze, en iedere ervaring levert nieuwe inzichten op. Lessen en goede voorbeelden uit de praktijk worden continu toegevoegd aan het handboek, zodat je indirect kennis deelt en deze direct kunt toepassen in je eigen buurt."}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:"Naast praktijkervaringen nemen we ook inzichten mee uit lopend onderzoek van TheEarlybirds, de ontwikkelaars van de BuurtWarmteWijzer. Denk bijvoorbeeld aan het CHILL-project over ZLT-netten en Align4Energy, gericht op AI-voorspellingen voor netcongestie. Ook deze kennis wordt vertaald naar het handboek en de bijbehorende tools."})]})}),c("div",{class:"py-12",children:c("div",{children:c("div",{class:"aspect-video rounded-2xl overflow-hidden border-3 border-gray-800 shadow-xl shadow-white/10",children:c("iframe",{class:"w-full h-full",src:"https://www.youtube-nocookie.com/embed/k8fyNb751b8?autoplay=0&mute=1&rel=0"})})})}),c(et,{})]})}function X0(){return c("div",{class:"-my-6 divide-y divide-gray-900/10 ",children:[c("div",{children:c("div",{class:"max-w-4xl py-8",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-gray-900 sm:text-4xl",children:"Warmte-koudeoplossingen"}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:"Als werkgroep kun je bepalen welke warmtetechnieken worden meegenomen in de berekeningen voor de buurt. Om draagvlak te creëren, is het belangrijk om zoveel mogelijk duurzame opties op te nemen. Uiteindelijk willen bewoners keuzevrijheid hebben. Niet alle warmtetechnieken zijn voor elke buurt beschikbaar of wenselijk. Technisch onmogelijke of zeer onwenselijke opties kun je van tevoren uitsluiten, voor de hele buurt of voor specifieke delen ervan. Het handboek helpt je hierbij en geeft aan hoe je dit kunt invoeren in de rekenmotor van de digital twin."})]})}),c("div",{class:"py-12",children:c("div",{children:c("div",{class:"aspect-video rounded-2xl overflow-hidden shadow",children:c("img",{class:"object-cover w-full h-full",src:"/images/hoe-werkt-het/deelgebieden.png"})})})}),c(et,{})]})}function U0(){return c("div",{class:"-my-6 divide-y divide-gray-900/10 ",children:[c("div",{children:c("div",{class:"max-w-4xl py-8",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-gray-900 sm:text-4xl",children:"Rekenuitgangspunten"}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:"Als werkgroep heb je de taak om de rekenuitgangspunten voor het onderzoek naar warmteoplossingen in te stellen en af te stemmen. Dit betekent dat je keuzes maakt over zaken als toekomstige energieprijzen, investeringskosten en eventuele woningwaardestijging. Deze uitgangspunten vormen de basis voor de berekeningen en moeten goed worden onderbouwd, zodat je ze kunt uitleggen aan buurtbewoners. De BuurtWarmteWijzer biedt standaard uitgangspunten, maar deze kun je aanpassen als de werkgroep daar andere inzichten over heeft. Alle kentallen zijn transparant en, indien nodig, aanpasbaar. De gekozen uitgangspunten kun je vervolgens voorleggen aan de klankbordgroep voor feedback."})]})}),c("div",{class:"py-12",children:c("div",{children:c("div",{class:"aspect-video rounded-2xl overflow-hidden shadow",children:c("img",{class:"object-cover w-full h-full",src:"/images/hoe-werkt-het/projectinstellingen.jpg"})})})}),c(et,{})]})}function Y0(){return c("div",{class:"-my-6 divide-y divide-gray-900/10 ",children:[c("div",{children:c("div",{class:"max-w-4xl py-8",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-gray-900 sm:text-4xl",children:"Haalbaarheid collectieve infrastru
5ctuur"}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:"Bijna elke keuze voor een warmteoplossing heeft invloed op de collectieve infrastructuur. Denk aan de beschikbare capaciteit op het elektriciteitsnet, het behoud van het gasnet of de aanleg van een nieuw warmte-koudenet. Voordat je berekeningen per huishouden doorstuurt naar de appomgeving voor bewoners, wil je daarom zo goed mogelijk in beeld hebben welke infrastructuur haalbaar is. Met de berekeningen in de Digital Twin kun je verkennen wat de mogelijke keuzes van bewoners betekenen voor de infrastructuur. Zo kun je samen met de netbeheerder bepalen wat haalbaar is in relatie tot netcongestie. Ook kun je alle verschillende warmte-koudenetten vooraf toetsen op basis van minimale randvoorwaarden, zoals dichtheid, verwachte betaalbaarheid en de omvang van de warmtekavel. Op die manier blijven alleen de meest kansrijke opties over om aan bewoners voor te leggen."})]})}),c("div",{class:"py-12",children:c("div",{children:c("div",{class:"aspect-video rounded-2xl overflow-hidden shadow",children:c("img",{class:"object-cover w-full h-full",src:"/images/hoe-werkt-het/COLONY_op_laptop.jpg"})})})}),c(et,{})]})}function K0(){return c("div",{class:"-my-6 divide-y divide-gray-900/10 ",children:[c("div",{children:c("div",{class:"max-w-4xl py-8",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-gray-900 sm:text-4xl",children:"Doorrekenen"}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:"Zodra de rekenuitgangspunten zijn afgestemd met de klankbordgroep, de netbeheerder en evt. getoetst door een warmtebedrijf of een lokale energiecoöperatie, kan de werkgroep de definitieve doorrekening uitvoeren. Deze wordt gedaan met de rekenkern van de Digital Twin en vindt plaats op het niveau van individuele woningen. Daarnaast geeft het de totalen weer van de hele buurt (alle woningen bij elkaar). Voor elke woning worden alle mogelijke combinaties doorgerekend, zoals verschillende warmtetechnieken, stappen in de gebouwschil en benodigde voorzieningen (bijvoorbeeld afgiftesystemen). De resultaten verschijnen vervolgens per woning in de BWW-appomgeving, waar bewoners hun voorkeuren kunnen aangeven."})]})}),c("div",{class:"py-12",children:c("div",{children:c("div",{class:"aspect-video rounded-2xl overflow-hidden shadow",children:c("img",{class:"object-cover w-full h-full",src:"/images/hoe-werkt-het/doorrekenen.png"})})})}),c(et,{})]})}function Z0(){return c("div",{class:"-my-6 divide-y divide-gray-900/10 ",children:[c("div",{children:c("div",{class:"max-w-4xl py-8",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-gray-900 sm:text-4xl",children:"Brief"}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:["De startbrief, ondertekend door gemeente en werkgroep, wordt verspreid naar de bewoners. Met een persoonlijke activatiecode loggen bewoners in op de BuurtWarmteWijzer-app. Via een interactief chatgesprek beantwoorden zij drie vragenrondes over energieverbruik, woningkenmerken en wat ze belangrijk vinden. Na elke ronde ontvangen ze persoonlijke inzichten en verdienen ze medailles (brons, zilver en goud). Tegelijkertijd kunnen bewoners deelnemen aan buurtbijeenkomsten. Dit bevordert de betrokkenheid en het gesprek over duurzame warmteoplossingen. De werkgroep blijft beschikbaar voor vragen en ondersteuning. Indien nodig ontvangen de bewoners een tweede uitnodigingsbrief met een link naar het uitlegfilmpje ",c("strong",{children:'"Doe mee met de BuurtWarmteWijzer!"'}),"."]})]})}),c("div",{class:"py-12",children:c("div",{children:c("div",{class:"aspect-video rounded-2xl overflow-hidden border-3 border-gray-800 shadow-xl shadow-white/10",children:c("iframe",{class:"w-full h-full",src:"https://www.youtube-nocookie.com/embed/Bcfk1Xz_-lA?autoplay=0&mute=1&rel=0"})})})}),c(et,{})]})}function H0(){return c("div",{class:"-my-6 divide-y divide-gray-900/10 ",children:[c("div",{children:c("div",{class:"max-w-4xl py-8",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-gray-900 sm:text-4xl",children:"Communicatie"}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:"Er wordt een activiteitenkalender opgesteld en communicatiemiddelen ontwikkeld. Het BuurtWarmteWijzer-handboek biedt daarvoor praktische formats en tools."}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:"Een activiteitenkalender geeft het overzicht van de belangrijke gebeurtenisse
5n, acties en mijlpalen binnen de projectperiode in de buurt. Dit kunnen bijvoorbeeld bijeenkomsten, brieven, promotie-acties of deadlines zijn. Een activiteitenkalender geeft je inzicht in wat er wanneer gebeurt. Zo kun je op tijd beginnen met de voorbereidingen en voorkom je dat je iets over het hoofd ziet. Het helpt ook om collegaâs, partners en buurtbewoners tijdig te informeren en om ruimte te houden voor eventuele veranderingen. Op deze manier werk je gestructureerd en behoud je overzicht en rust tijdens de uitvoering. De activiteitenkalender geeft ook input voor de contentkalender, die wordt opgesteld voor de communicatiemonumenten met de buurtbewoners."}),c("p",{class:"text-gray-900 pt-4 sm:text-base font-bold",children:"Bijeenkomst met rondleiding en informatiemarkt Posteractie per brief Lokale energiebeurs Warmtescan actie"}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:["Ook wordt het uitlegfilmpje ",c("strong",{children:'"Welkom bij de BuurtWarmteWijzer!"'})," gedeeld om bewoners te informeren over het traject."]})]})}),c("div",{class:"py-12",children:c("div",{children:c("div",{class:"aspect-video rounded-2xl overflow-hidden border-3 border-gray-800 shadow-xl shadow-white/10",children:c("iframe",{class:"w-full h-full",src:"https://www.youtube-nocookie.com/embed/MogslMaqiqs?autoplay=0&mute=1&rel=0"})})})}),c(et,{})]})}function q0(){return c("div",{class:"-my-6 divide-y divide-gray-900/10 ",children:[c("div",{children:c("div",{class:"max-w-4xl py-8",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-gray-900 sm:text-4xl",children:"Activiteiten en communicatie"}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:["Het onderzoek naar de beste warmteoplossingen voor de buurt kan soms veel tijd in beslag nemen - vooral als er gekeken wordt of een warmtenet haalbaar is. Deze periode is ideaal om bewoners ",c("strong",{children:"actief te betrekken"})," bij de warmtetransitie."]}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:["Daarom organiseert de werkgroep ",c("strong",{children:"activiteiten"})," zoals:"]}),c("ul",{class:"pt-2 pl-4 list-disc leading-10 marker:text-bww-blue",children:[c("li",{children:[c("strong",{children:"Gluren bij de buren"}),": bewoners zien welke verduurzamingsstappen buurtgenoten al hebben gezet"]}),c("li",{children:[c("strong",{children:"Workshop inductiekoken"}),": uitleg over hoe koken zonder aardgas werkt"]})]}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:["Om bewoners ",c("strong",{children:"op de hoogte te houden"})," van de ontwikkelingen, wordt er regelmatig een ",c("strong",{children:"nieuwsbrief"})," verstuurd."]})]})}),c("div",{class:"py-12",children:c("div",{children:c("div",{class:"aspect-video rounded-2xl overflow-hidden shadow",children:c("img",{class:"object-cover w-full h-full",src:"/images/hoe-werkt-het/5.jpg"})})})}),c(et,{})]})}function J0(){return c("div",{class:"-my-6 divide-y divide-gray-900/10 ",children:[c("div",{children:c("div",{class:"max-w-4xl py-8",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-gray-900 sm:text-4xl",children:"Bericht over warmteoplossingen"}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:["Zodra de werkgroep de ",c("strong",{children:"voorkeursverkenning"})," heeft vastgesteld, worden alle buurtbewoners uitgenodigd om hun ",c("strong",{children:"voorkeuren te selecteren"})," uit de beschikbare warmteoplossingen."]}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:["Deelnemers aan de ",c("strong",{children:"BWW-app"})," ontvangen hiervoor een ",c("strong",{children:"notificatie"}),", zodat ze direct op de hoogte zijn dat de berekeningen zijn afgerond en de warmteoplossingen klaarstaan."]}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:["Bewoners die ",c("strong",{children:"geen persoonlijke data"})," hebben ingevuld, kunnen alsnog een voorkeur aangeven. Zij krijgen hiervoor een ",c("strong",{children:"brief"})," en worden in de app gevraagd om alsnog hun ",c("strong",{children:"persoonlijke waarden"})," in te vullen. De mogelijke warmteoplossingen worden dan niet gebaseerd op hun data, maar op ",c("strong",{children:"publieke data"}),", en staan gesorteerd op wat voor hen het belangrijkst is."]}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:"Een instructiefilmpje legt in het kort uit wat van de bewoners w
5ordt gevraagd."})]})}),c("div",{class:"py-12",children:c("div",{children:c("div",{class:"aspect-video rounded-2xl overflow-hidden border-3 border-gray-800 shadow-xl shadow-white/10",children:c("iframe",{class:"w-full h-full",src:"https://www.youtube-nocookie.com/embed/CGEUDaDL3x8?autoplay=0&mute=1&rel=0"})})})}),c(et,{})]})}function Q0(){return c("div",{class:"-my-6 divide-y divide-gray-900/10 ",children:[c("div",{children:c("div",{class:"max-w-4xl py-8",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-gray-900 sm:text-4xl",children:"Enthousiast, neutraal, of afwijzing"}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:["Nadat de bewoners per infrastructuur hun ",c("strong",{children:"favoriete warmteoplossing"})," hebben gekozen, kunnen ze met behulp van een ",c("strong",{children:"smiley"})," (ð / ð / ð) aangeven of ze er enthousiast, neutraal of juist negatief staan tegenover de geselecteerde warmteoplossing."]}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:["Het kan bijvoorbeeld zijn dat je geen brandstof meer wilt gebruiken als warmtebron of dat je juist warm wordt van het verwarmen met een warmtenet. De werkgroep gebruikt deze ",c("strong",{children:"smileys"})," om een ",c("strong",{children:"duidelijk beeld"})," te krijgen van de ",c("strong",{children:"algemene voorkeuren"})," in de buurt. Zo kan worden bepaald of er voldoende ",c("strong",{children:"steun"})," is voor bijvoorbeeld de aanleg van een warmtenet."]})]})}),c("div",{class:"py-12",children:c("div",{children:c("div",{class:"aspect-video rounded-2xl overflow-hidden shadow",children:c("img",{class:"object-cover w-full h-full",src:"/images/hoe-werkt-het/voorkeuren.png"})})})}),c(et,{})]})}function e_(){return c("div",{class:"-my-6 divide-y divide-gray-900/10 ",children:[c("div",{children:c("div",{class:"max-w-4xl py-8",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-gray-900 sm:text-4xl",children:"Kiezen favoriete warmteoplossingen"}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:["Nadat de werkgroep de voorkeursverkenning heeft vastgesteld, vindt elke bewoner in de ",c("strong",{children:"BWW-app"})," een overzicht van alle ",c("strong",{children:"mogelijke warmteoplossingen"})," die voor hun woning haalbaar zijn."]}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:["Via een ",c("strong",{children:"chatgesprek"})," worden bewoners -net als in de eerste fase- meegenomen in de verschillen tussen de warmteoplossingen, zoals:"]}),c("ul",{class:"pt-2 pl-4 list-disc leading-10 marker:text-bww-blue",children:[c("li",{children:c("strong",{children:["Kosten, comfort, impact op de woningwaarde en CO",c("sub",{children:"2"}),"-uitstoot"]})}),c("li",{children:[c("strong",{children:"Wat de oplossing vereist van de collectieve infrastructuur"})," (bijvoorbeeld aanpassingen in de straat)"]})]}),c("p",{class:"text-gray-900 pt-4 sm:text-base",children:["Bewoners zien welke warmteoplossingen het beste aansluiten bij hun eerder opgegeven waarden. ",c("strong",{children:"Per infrastructuur"})," kunnen ze aangeven welke warmteoplossing het beste bij hun woonsituatie past."]})]})}),c("div",{class:"py-12",children:c("div",{children:c("div",{class:"aspect-video rounded-2xl overflow-hidden shadow",children:c("img",{class:"object-cover w-full h-full",src:"/images/hoe-werkt-het/BWW-PC_top10.jpg"})})})}),c(et,{})]})}const Uu=[{title:"Werkgroep doet voorbereidende werkzaamheden",category:"",content:c(j,{children:c("ul",{class:"pt-4 pl-4 lg:pl-8 list-disc leading-10 marker:text-bww-yellow",children:[c("li",{children:[c(Xe,{name:"Digital twin",title:"Digital twin",children:c(B0,{})})," ","verrijken met lokale buurtgegevens"]}),c("li",{children:["Activiteitenkalender en communicatieplan opstellen m.b.v. het"," ",c(Xe,{name:"handboek",title:"handboek",children:c(V0,{})})," "]}),c("li",{children:[c(Xe,{name:"Digitaal portaal",title:"Digitaal portaal",children:c(G0,{})})," ","inrichten, startbrieven versturen en BWW-app lanceren"]})]})})},{title:c(j,{children:"Bewoners geven data door en doen mee aan activiteiten"}),category:"",content:c(j,{children:c("ul",{class:"pt-4 pl-4 lg:pl-8 list-disc leading-10 marker:text-bww-yellow",children:[c("li",{children:["Werkgroep organiseert activiteiten en"," ",c(Xe,{name:"communicatie",title:"communicatie",children:c(H0,{})})]}),c("li",{children:[c(Xe,{name:"Brief",title:"Brief",children:c(Z0,{})}
5)," "," ","met persoonlijke inlogcodes wordt bezorgd aan alle bewoners"]}),c("li",{children:["Bewoners vullen data in via de "," ",c(Xe,{name:"BWW-app",title:"BWW-app",children:c($0,{})})]})]})})},{title:c(j,{children:"Werkgroep berekent warmte/-koude oplossingen"}),category:"",content:c(j,{children:c("div",{class:"text-lg pt-4 block",children:c("ul",{class:"pt-2 pl-4 lg:pl-8 list-disc leading-10 marker:text-bww-yellow",children:[c("li",{children:["Uitsluiten onmogelijke "," ",c(Xe,{name:"warmte-koudeoplossingen",title:"warmte-koudeoplossingen",children:c(X0,{})})," "," per gebied"]}),c("li",{children:["Aannames en "," ",c(Xe,{name:"rekenuitgangspunten",title:"rekenuitgangspunten",children:c(U0,{})})," "," vaststellen en afstemmen met klankbordgroep"]}),c("li",{children:[c(Xe,{name:"Haalbaarheid collectieve infrastructuur",title:"Haalbaarheid collectieve infrastructuur",children:c(Y0,{})})," "," vaststellen en afstemmen met netbeheerder/warmtebedrijf"]}),c("li",{children:["Oplossingen "," ",c(Xe,{name:"doorrekenen",title:"doorrekenen",children:c(K0,{})})," "," en publiceren in BWW-app"]})]})})})},{title:c(j,{children:"Bewoners geven voorkeuren door en doen mee aan activiteiten"}),category:"",content:c(j,{children:c("div",{class:"text-lg pt-4 block",children:c("ul",{class:"pt-2 pl-4 lg:pl-8 list-disc leading-10 marker:text-bww-yellow",children:[c("li",{children:["Werkgroep organiseert "," ",c(Xe,{name:"activiteiten",title:"activiteiten",children:c(q0,{})})," "," en communicatie"]}),c("li",{children:["Bewoners ontvangen "," ",c(Xe,{name:"bericht",title:"bericht",children:c(J0,{})})," "," over berekende warmteoplossingen voor hun woning"]}),c("li",{children:["Bewoners geven hun "," ",c(Xe,{name:"favoriete warmteoplossingen",title:"favoriete warmteoplossingen",children:c(e_,{})})," "," door via de BWW-app"]}),c("li",{children:["Bewoners "," ",c(Xe,{name:"scoren infrastructuur",title:"scoren infrastructuur",children:c(Q0,{})})," "," met een smiley (ð / ð / ð)"]})]})})})},{title:c(j,{children:"Werkgroep maakt het warmteplan"}),category:"",content:c(j,{children:c("ul",{class:"pt-4 pl-4 lg:pl-8 list-disc leading-10 marker:text-bww-yellow",children:[c("li",{children:"Selecteren haalbare infrastructuur op basis van voorkeuren bewoners en stakeholders"}),c("li",{children:"Opstellen WUP met de ingrediënten van het BuurtWarmteWijzer-proces"}),c("li",{children:"Voorleggen WUP aan de gemeenteraad en terugkoppeling aan bewoners"})]})})}];function t_(){return le(()=>{document.title="Hoe werkt de BuurtWarmteWijzer? In 7 heldere stappen kom je tot een warmteplan"},[]),c(j,{children:[c("div",{class:"header relative bg-bww-blue py-20 sm:py-28 lg:py-48 px-6 xl:px-0 ",children:[c("div",{class:"absolute inset-0 z-0",children:[c("img",{class:"object-cover h-full w-full",src:"/images/5.jpg"}),c("div",{class:"absolute inset-0 bg-linear-to-t from-bww-blue/90 to-gray-900"})]}),c("div",{class:"relative z-10 isolate pt-16 xl:min-w-7xl lg:max-w-7xl mx-auto",children:c("div",{class:" max-w-4xl",children:c("div",{class:"text-left",children:[c("h1",{class:"font-sans font-semibold text-5xl tracking-tight text-balance text-white sm:text-5xl",children:["In ",c("span",{class:"text-bww-yellow",children:"5 stappen"})," naar een gedragen warmteplan"]}),c("p",{class:"mt-8 text-lg font-medium text-white sm:text-md/8",children:"De warmtetransitie is een complexe opgave. Met de BuurtWarmteWijzer breng je structuur, snelheid en draagvlak in het proces. In vijf heldere stappen werk je samen met buurtbewoners en andere stakeholders toe naar een warmteplan dat zowel technisch onderbouwd is als breed wordt gedragen."})]})})})]}),c("div",{class:"timeline relative isolate overflow-hidden",children:[c("div",{"aria-hidden":"true",class:"absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80",children:c("div",{style:"clip-path: polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",class:"relative left-[calc(50%-11rem)] aspect-1155/678 w-144.5 -translate-x-1/2 rotate-30 bg-linear-to-tr from-bww-blue to-bww-blue opacity-10 sm:left-[calc(50%-30rem)] sm:w-288.75"})}),c("div",{class:"relative z-10 px-6 xl:px-0 xl:min-w-4xl lg:max-w-4xl mx-auto",children:c("div",{class:" max-w-4xl mx-auto py-12 sm:py-18 lg:py-24",children:[c("div",{class:"max-w-4xl text-left pb-12 lg:pb-18",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-white sm:text-4xl flex items-start",children:[c("span",{class:"h-6 w-1.5 sm:h-8 sm:w-3 bg-bww-blue -skew-x-12 mr-3 mt-1 sm:mt-3.5"}),"Tijdlijn van het proces"]}),c("p",{class:"text-white pt-6 sm:text-base leading-8",children:["In de onderstaande tijdlijn zie je welke stappen je doorloopt om tot een gedragen warmteplan te komen. Voordat je begint, richt je een werkgroep op met buurtbewoners, een gemeentelijke vertegenwoordiger en eventueel een ",c("a",{href:"/partners",class:"underline font-bold",children:"externe begeleider"}),".",c("br",{}),c("br",{})," Is er nog geen actieve bewonersgroep? Dan benader je de buurt via kanalen zoals een buurtkrant, kick-offbijeenkomst, sociale media en de gemeentewebsite om een werkgroep te werven. Daarnaast kun je een klankbordgroep oprichten, waarmee de werkgroep haar werkzaamheden kan afstemmen. Bewoners kunnen zich hiervoor direct of later, bijvoorbeeld via de app, aanmelden. ",c("br",{}),c("br",{}),"De werkgroep volgt instructiesessies over technische, economische en participatie-aspecten, stelt een globale planning op en benadert belangrijke stakeholders zoals woningcorporaties en netbeheerders. Daarna start het proces:"]})]}),c("div",{class:"grid grid-cols-1 lg:grid-cols-1 gap-12",children:Uu.map((n,e)=>c("div",{class:"relative p-6 lg:p-8 lg:px-8 shadow-xl rounded-xl border-2 border-gray-800 bg-gray-800/90",children:[c("div",{class:"absolute -top-4 lg:top-8 lg:-left-8 -left-4 h-16 w-16 bg-bww-yellow border-4 border-gray-700 rounded-full flex items-center justify-center text-gray-700 text-2xl font-bold",children:e+1}),c("div",{class:"md:pl-6 pt-8 md:pt-0 text-gray-100",children:[c("div",{class:"text-xl md:text-2xl font-bold text-white block",children:[n.title," "]}),c("div",{class:"text-lg pt-2 block ",children:n.content})]})]}))}),c("div",{class:"max-w-4xl text-left py-12 lg:pt-18",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-white sm:text-4xl flex items-start",children:[c("span",{class:"h-6 w-1.5 sm:h-8 sm:w-3 bg-bww-blue -skew-x-12 mr-3 mt-1 sm:mt-3.5"}),"Eindresultaat"]}),c("p",{class:"text-white pt-6 sm:text-base leading-8",children:"Samen met de buurt is een warmteplan opgesteld, waarbij alle bewoners betrokken zijn en hun voorkeuren voor toekomstige energieoplossingen hebben aangegeven. Het plan is afgestemd met belangrijke partijen zoals netbeheerders en woningcorporaties. Collectieve mogelijkheden zijn onderzocht op haalbaarheid en draagvlak. Het resultaat is vastgelegd in een Warmte Uitvoeringsplan (WUP), klaar voor de gemeenteraad en terugkoppeling aan de buurt."})]})]})}),c("div",{"aria-hidden":"true",class:"absolute inset-x-0 top-[calc(100%-13rem)] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[calc(100%-30rem)]",children:c("div",{style:"clip-path: polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",class:"relative left-[calc(50%+3rem)] aspect-1155/678 w-144.5 -translate-x-1/2 bg-linear-to-tr from-from-bww-blue to-bww-blue opacity-10 sm:left-[calc(50%+36rem)] sm:w-288.75"})})]}),c("div",{class:"cta relative",children:[c("div",{class:"absolute inset-0 z-0",children:[c("img",{class:"object-cover h-full w-full",src:"/images/usp.jpg"}),c("div",{class:"absolute inset-0 bg-gray-900/80"})]}),c("div",{class:"relative z-10 px-6 py-12 sm:py-18 lg:py-24 xl:px-0 max-w-4xl mx-auto",children:[c("div",{class:"max-w-4xl lg:text-center pb-12",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-white sm:text-4xl",children:"Klaar om van visie naar uitvoering te gaan?"}),c("p",{class:"text-white pt-6 sm:text-base leading-8",children:"Met heldere stappen, digitale tools en brede betrokkenheid bouw je aan draagvlak en versnel je de besluitvorming. Ontdek wat we voor jouw buurt kunnen doen."})]}),c("div",{class:"mt-10 md:flex items-center justify-center gap-x-6",children:[c("a",{href:"/prijsindicatie-aanvragen",class:"block text-center rounded-md bg-bww-yellow hover:bg-bww-yellow/90 px-3.5 py-2.5 text-sm lg:text-base font-semibold text-black shadow-xs hover:bg-bww-yellow focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bww-yellow",children:"Vraag direct een prijsindicatie aan"}),c("div",{class:"flex items-center justify-center pt-6 md:pt-0",children:[c("span",{class:"mr-2 md:pt-0 inline-block text-sm/6 lg:text-base text-white",children:"of"}),c("a",{href:"/webinars",class:" text-sm/6 lg:text-base font-semibold text-white hover:text-bww-yellow flex items-center",children:["meld je aan voor een webinar ",c("span",{"aria-hidden":"true",children:c("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-5 ml-1",children:c("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.25 8.25 21 12m0 0-3.75 3.75M21 12H3"})})})]})]})]})]})]}),c("div",{class:"logos relative bg-gray-900 isolate overflow-hidden",children:[c("div",{"aria-hidden":"true",class:"absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80",children:c("div",{style:"clip-path: polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",class:"relative left-[calc(50%-11rem)] aspect-1155/678 w-144.5 -translate-x-1/2 rotate-30 bg-linear-to-tr from-bww-blue to-bww-blue opacity-10 sm:left-[calc(50%-30rem)] sm:w-288.75"})}),c(Xu,{}),c("div",{"aria-hidden":"true",class:"absolute inset-x-0 top-[calc(100%-13rem)] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[calc(100%-30rem)]",children:c("div",{style:"clip-path: polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",class:"relative left-[calc(50%+3rem)] aspect-1155/678 w-144.5 -translate-x-1/2 bg-linear-to-tr from-from-bww-blue to-bww-blue opacity-10 sm:left-[calc(50%+36rem)] sm:w-288.75"})})]})]})}function i_({company:n,title:e,children:t,imageUrl:i,content:r,linkedin:s,email:o,telephone:a,website:l,name:h}){const[d,u]=J(!1);return c(j,{children:[c("button",{type:"button",className:"w-1/2 m-auto block text-center rounded-md bg-bww-yellow hover:bg-bww-yellow/90 px-3.5 py-2.5 text-sm lg:text-base font-semibold text-black shadow-xs focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bww-yellow cursor-pointer",onClick:()=>u(!0),children:"Bekijk"}),c(Ul,{open:d,onClose:()=>u(!1),className:"relative z-50 text-gray-900",children:[c("div",{class:"fixed inset-0"}),c("div",{class:"fixed inset-0 overflow-hidden",children:c("div",{class:"absolute inset-0 overflow-hidden",children:c("div",{class:"pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10 sm:pl-16",children:c(yo,{transition:!0,className:"pointer-events-auto w-screen max-w-xl transform transition duration-500 ease-in-out data-closed:translate-x-full sm:duration-700 ",children:c("div",{class:"relative flex h-full flex-col overflow-y-auto bg-white shadow-2xl p-4 lg:p-8",children:[c("div",{class:"flex items-start justify-between",children:[c(Xl,{}),c("div",{class:"ml-3 flex h-7 items-center",children:c("button",{type:"button",onClick:()=>u(!1),class:"cursor-pointer",children:c(Nl,{className:"w-6 cursor-pointer"})})})]}),c("div",{class:"relative mt-6 flex-1 ",children:[c("div",{class:"pb-8",children:c("div",{class:"flex items-center ",children:[c("div",{class:" min-w-20 min-h-20 relative border-4 border-bww-blue mr-6 rounded-full overflow-hidden",children:c("img",{class:"object-cover object-center min-h-20 max-h-20 min-w-20",src:i,alt:e})}),c("div",{children:[c("h3",{className:"font-semibold text-2xl",children:e}),c("span",{class:"text-gray-500",children:[n," "]})]})]})}),c("div",{class:" mb-8",children:r}),c("div",{class:"pt-8",children:[t,c("div",{className:"border-t border-gray-900/10 mt-8",children:c("div",{className:"grid grid-cols-1 gap-6 py-6 text-gray-900",children:[s&&s.length>0&&c("a",{href:s,target:"_blank",class:"flex items-center ",children:[c("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"
5currentColor",width:"24",height:"24",viewBox:"0 0 24 24",className:"w-6 cursor-pointer text-gray-800 mr-3",children:c("path",{d:"M12 0c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm-2 16h-2v-6h2v6zm-1-6.891c-.607 0-1.1-.496-1.1-1.109 0-.612.492-1.109 1.1-1.109s1.1.497 1.1 1.109c0 .613-.493 1.109-1.1 1.109zm8 6.891h-1.998v-2.861c0-1.881-2.002-1.722-2.002 0v2.861h-2v-6h2v1.093c.872-1.616 4-1.736 4 1.548v3.359z"})}),h]}),o&&o.length>0&&c("a",{href:"mailto:"+o,class:"flex items-center ",children:[c(Ua,{className:"w-6 cursor-pointer text-gray-800 mr-3"}),o]}),a&&a.length>0&&c("a",{href:"tel:"+a.replace("0","").replace(" ","").replace("-",""),class:"flex items-center ",children:[c(Ya,{className:"w-6 cursor-pointer text-gray-800 mr-3"}),a]}),l&&l.length>0&&c("a",{href:l,target:"_blank",class:"flex items-center ",children:[c(xm,{className:"w-6 cursor-pointer text-gray-800 mr-3"}),l.replace("https://","")]})]})})]})]})]})})})})})]})]})}const n_=[{name:"Baktash Ibrahimi",company:"iVenture energie en duurzaamheid ",imageUrl:"/images/partners/Baktash.jpg",content:c(j,{children:c("ul",{class:" pl-4 list-disc leading-10 marker:text-bww-blue",children:[c("li",{children:"Procesbegeleider"}),c("li",{children:"Projectmananger"})]})}),children:c(j,{children:c("p",{children:"Op interim basis ondersteun ik overheden bij de transitie, bouw en deel ik mijn kennis. Als bouwkundig ingenieur begonnen met het verduurzamen van gemeentelijk vastgoed. Tegenwoordig breed inzetbaar binnen energietransitie. Voornamelijk als proces- en projectmanager bezig met het aardgasvrij maken van buurten van een paar honderd tot wijken met duizenden woningen en gebouwen. Daarnaast hou ik me bezig met strategische ruimtelijke vraagstukken, energiemanagement (congestie), Isolatieprogramma, beleid en strategie."})}),linkedin:"https://www.linkedin.com/in/baktash-ibrahimi-1260a842",telephone:"+31 0611108553",email:"[email protected]",website:""},{name:"Karlijn Arkesteijn",company:"Ekiep",imageUrl:"/images/partners/Karlijn.jpg",content:c(j,{children:c("ul",{class:" pl-4 list-disc leading-10 marker:text-bww-blue",children:c("li",{children:"Procesbegeleider"})})}),children:c(j,{children:c("p",{children:"Als procesbegeleider zet ik bewoners in beweging en zorg voor een goed proces tussen bewonersinitiatieven en de gemeente. Ik breng focus in complexe trajecten, verbind belangen en vertaal inzichten naar concrete oplossingen. Ik combineer mijn analytische scherpte met menselijk, voelend inzicht. Hierbij maak ik gebruik van mijn technische achtergrond (MSC Innovation Management TUE), mijn ondernemerschap (runnen van zonne-energiebedrijf in Tanzania), corporate ervaring (innovatie manager Essent) en buurtaanpak inzichten (vanuit bewoners, bewonersinitiatieven of energiecoöperaties)."})}),linkedin:"https://www.linkedin.com/in/karlijn-arkesteijn/",telephone:"+31 0611788607",email:"[email protected]"},{name:"Sarolta van Beek",company:"Vonc Communicatie",imageUrl:"/images/partners/Sarolta.JPG",content:c(j,{children:c("ul",{class:" pl-4 list-disc leading-10 marker:text-bww-blue",children:c("li",{children:"Participatie/communicatie expert"})})}),children:c(j,{children:c("p",{children:"Een strategische verbinder die weet wat er speelt in de wereld van de energietransitie. Sarolta schakelt moeiteloos tussen verschillende organisatielagen en zorgt ervoor dat alle neuzen dezelfde kant op staan. Jarenlange ervaring in participatie- en communicatietrajecten voor gemeenten, provincies, waterschappen. Mede-eigenaar van het bureau Vonc Communicatie bestaande uit 20 professionals op het gebied van participatie en communicatie en mede-grondlegger van de BuurtWarmteWijzer."})}),linkedin:"https://www.linkedin.com/in/sarolta/",telephone:"+31 0513 640017",email:"[email protected]",website:"https://www.vonc.nl"},{name:"Lieke Noij",company:"Noij Expertise",imageUrl:"/images/partners/Lieke.jpeg",content:c(j,{children:c("ul",{class:" pl-4 list-disc leading-10 marker:text-bww-blue",children:[c("li",{children:"Procesbegeleider"}),c("li",{children:"Projectmananger"})]})}),children:c(j,{children:c("p",{children:"Enthousiaste vrouw met meerdere jaren ervaring op het gebied van de energietransitie met een civieltechnische achtergrond. Mijn dagelijkse werkzaamheden bestaan voornamelijk uit het leiden van projecten en ondersteunen van overheden op het gebied van de warmtetransitie."})}),linkedin:"https://www.linkedin.com/in/liekenoij/",telephone:"+31 0651102562",email:"[email protected]",website:"www.noijexpertise.nl"},{name:"Kelly Koculak",company:"Windkracht 5",imageUrl:"/images/partners/Kelly2.jpg",content:c(j,{children:c("ul",{class:" pl-4 list-disc leading-10 marker:text-bww-blue",children:[c("li",{children:"Procesbegeleider"}),c("li",{children:"Projectmananger"}),c("li",{children:"Participatie/communicatie expert"})]})}),children:c(j,{children:c("p",{children:"Mijn naam is Kelly Koculak. Na een aantal jaar werkzaam te zijn geweest bij Liander in de rol van teamleider, heb ik recent de overstap gemaakt naar de rol van senior consultant bij Windkracht 5. Mijn ervaring in de energietransitie ligt voornamelijk in het onderhoud van energienetten en het aansturen van de storingsorganisatie in Amsterdam en omgeving die 24/7 verantwoordelijk is voor het oplossen van kleine storingen, zoals die bij particulieren, alsmede grotere storingen, zoals de stroomuitval van een volledige wijk. Ik ben sociaal en communicatief erg sterk en kan me daardoor goed in alle lagen van een organisatie bewegen om gedragen oplossingen te creëren."})}),linkedin:"https://www.linkedin.com/in/kelly-koculak-b229526b/?originalSubdomain=nl",telephone:"",email:"[email protected]",website:"https://windkrachtvijf.com"},{name:"Jacoline Kool",company:"Windkracht 5",imageUrl:"/images/partners/jacolinekool.jpg",content:c(j,{children:c("ul",{class:" pl-4 list-disc leading-10 marker:text-bww-blue",children:[c("li",{children:"Procesbegeleider"}),c("li",{children:"Projectmananger"})]})}),children:c(j,{children:c("p",{children:"Met mijn achtergrond in de humanitaire sector ben ik gewend om snel te kunnen schakelen en me aan te passen aan een cultureel diverse context. Inmiddels heb ik meer dan 10 jaar ervaring in projectmanagement, zowel in de energiesector in Nederland als internationale grote noodhulpprojecten. Ik ben altijd op zoek naar verbetering in organisatieprocessen, en houd daarbij in het oog dat de verschillende belanghebbenden op tijd in het proces worden betrokken. In mijn vrije tijd ben ik actief als commissielid in de gemeente Utrecht en zodoende begrijp ik goed hoe lokale politiek werkt en welke dynamieken op de achtergrond mee kunnen spelen bij het maken van keuzes rondom het duurzamer inrichten van wijken."})}),linkedin:"https://www.linkedin.com/in/jacolinekool/",telephone:"+31 0627234215",email:"[email protected]",website:"https://windkrachtvijf.com"},{name:"Henk Looijen",company:"Waterprof",imageUrl:"/images/partners/Henk.jpg",linkedin:"https://www.linkedin.com/in/henklooijen/",telephone:"+31 0627883932",email:"[email protected]",website:"https://www.waterprof.nl",content:c(j,{children:c("ul",{class:" pl-4 list-disc leading-10 marker:text-bww-blue",children:[c("li",{children:"Procesbegeleider"}),c("li",{children:"Projectmananger"}),c("li",{children:"Technisch/economisch expert"})]})}),children:c(j,{children:[c("p",{class:"mb-6",children:"Even voorstellen: ik ben een teamplayer en een netwerker. Inhoudelijk gedreven om de wereld te verduurzamen. Ik bouw aan netwerken en relaties, omdat we een duurzame wereld alleen kunnen realiseren als we dat in gezamenlijkheid doen. Dat doe ik met overheden, bedrijfsleven, NGO's,
5kenniswereld en burgerinitiatieven, en liefst in een open, losse sfeer. Water is in mijn werkende leven een belangrijk verbindend element."}),c("p",{children:"Mijn ervaring met de warmtetransitie is de afgelopen acht jaar vormgegeven. Ik heb vanuit Rijkswaterstaat aquathermie mede op de kaart gezet. Ik heb de landelijke Green Deal Aquathermie geschreven en het Netwerk Aquathermie (NAT) opgetuigd met vele anderen. Tot eind 2023 heb ik vanuit het NAT zorggedragen voor de kennisagenda aquathermie, het agenderen van vraagstukken op diverse plekken en het trekken van enkele inhoudelijke projecten. Daarnaast heb ik ervaring opgebouwd bij enkele initiatieven om aquathermie toe te passen. Zoals bij alle concrete projecten krijg je daarbij het beste zicht op de omvang van de opgave om van fossiele bronnen los te komen."})]})},{name:"Sebastian Baes",company:"EXTRAQT",imageUrl:"/images/partners/Sebastian-Baes.jpg",linkedin:"https://www.linkedin.com/company/extraqt",telephone:"+32 496 86 36 48",email:"[email protected]",website:"https://www.extraqt.be",content:c(j,{children:c("ul",{class:" pl-4 list-disc leading-10 marker:text-bww-blue",children:[c("li",{children:"Technisch/economisch expert"}),c("li",{children:"Expert aquathermie "})]})}),children:c(j,{children:[c("p",{class:"mb-6",children:"Mijn naam is Sebastian Baes, één van de co-founders van EXTRAQT en een duurzame warmte enthousiast! EXTRAQT is een bedrijf gespecialiseerd in aquathermie, verwarmen en koelen aan de hand van oppervlaktewater. In onze ambitie richting CO2-neutraal verwarmen en koelen schuiven we deze alternatieve duurzame bron voor een warmtepomp naar voren."}),c("p",{children:"EXTRAQT specialiseert zich hierbij in masterplanning en projectontwikkeling, gaande van gedetailleerde Digital Twin simulaties, businesscases van warmtenetten op aquathermie tot operationele aquathermie-installaties. EXTRAQT neemt de unieke praktijkervaring van hun operationele aquathermiesystemen mee in het studiewerk dat ze uitvoeren."})]})}];function r_(){return le(()=>{document.title="Partners van de BuurtWarmteWijzer"},[]),c(j,{children:[c("div",{class:"relative bg-bww-blue py-20 sm:py-28 lg:py-48 px-6 xl:px-0 ",children:[c("div",{class:"absolute inset-0 z-0",children:[c("img",{class:"object-cover h-full w-full",src:"/images/Van ingewikkeld naar duidelijk.JPG"}),c("div",{class:"absolute inset-0 bg-linear-to-t from-bww-blue/90 to-gray-900"})]}),c("div",{class:"relative z-10 isolate pt-16 xl:min-w-7xl lg:max-w-7xl mx-auto",children:c("div",{class:" max-w-4xl",children:c("div",{class:"text-left",children:[c("h1",{class:"font-sans font-semibold text-5xl tracking-tight text-balance text-white sm:text-5xl",children:"Partners"}),c("p",{class:"mt-8 text-lg font-medium text-white sm:text-md/8",children:"Heb je extra kennis of capaciteit nodig in je werkgroep? Onze BuurtWarmteWijzer-professionals staan klaar om je te ondersteunen. BuurtWarmteWijzer-professionals zijn ervaren adviseurs die de BuurtWarmteWijzer-trajecten ondersteunen. Ze zijn gespecialiseerd in verschillende gebieden, waaronder procesbegeleiding, projectmanagement, technische en economische expertise, en participatie en communicatie. Neem contact op met het BuurtWarmteWijzer-team voor verdere afstemming of benader de professionals direct om te ontdekken hoe zij je kunnen ondersteunen bij een BuurtWarmteWijzer-traject."})]})})})]}),c("div",{class:"relative z-10 pb-12 sm:pb-18 lg:pb-48 pt-12",children:c("div",{class:"px-6 xl:px-0 xl:min-w-7xl lg:max-w-7xl mx-auto grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-16",children:n_.map((n,e)=>c(j,{children:c("div",{class:"max-w-2xl sm:max-w-sm md:max-w-sm lg:max-w-sm xl:max-w-sm sm:mx-auto md:mx-auto lg:mx-auto xl:mx-auto bg-white shadow-xl rounded-lg text-gray-900 relative",children:[c("div",{class:"rounded-t-lg h-32 overflow-hidden",children:c("img",{class:"object-cover w-full",src:"/images/usp.jpg",alt:""})}),c("div",{class:"mx-auto w-32 h-32 relative -mt-16 border-4 border-white rounded-full overflow-hidden",children:c("img",{class:"object-cover object-center h-32 w-32",src:n.imageUrl,alt:n.name})}),c("div",{class:"text-center mt-2",children:[c("h2",{class:"font-semibold",children:[n.name," "]}),c("p",{class:"text-gray-500",children:n.company})]}),c("div",{class:"flex pl-8 pt-4 pb-30 items-center ",children:n.content}),c("div",{class:"absolute bottom-4 inset-x-0",children:c(i_,{company:n.company,title:n.name,imageUrl:n.imageUrl,content:n.content,children:n.children,linkedin:n.linkedin,email:n.email,telephone:n.telep
5hone,website:n.website,name:n.name})})]})}))})})]})}function s_(){const[n,e]=J([]);return le(()=>{document.title="Webinars";const t=localStorage.getItem("api_url")+"api/1/dpp/events";fetch(t).then(i=>i.json()).then(i=>{const r=i.sort((s,o)=>new Date(s.startTime).getTime()-new Date(o.startTime).getTime());e(r)})},[]),c(j,{children:[c("div",{class:"relative bg-bww-blue py-20 sm:py-28 lg:py-48 px-6 xl:px-0 ",children:[c("div",{class:"absolute inset-0 z-0",children:[c("img",{class:"object-cover h-full w-full",src:"/images/Van ingewikkeld naar duidelijk.JPG"}),c("div",{class:"absolute inset-0 bg-linear-to-t from-bww-blue/90 to-gray-900"})]}),c("div",{class:"relative z-10 isolate pt-16 xl:min-w-7xl lg:max-w-7xl mx-auto",children:c("div",{class:" max-w-4xl",children:c("div",{class:"text-left",children:[c("h1",{class:"font-sans font-semibold text-5xl tracking-tight text-balance text-white sm:text-5xl",children:"Webinars"}),c("p",{class:"mt-8 text-lg font-medium text-white sm:text-md/8",children:"Houd deze pagina in de gaten voor de nieuwste activiteiten. Onze activiteiten zijn bedoeld om kennis te delen, vragen te beantwoorden en om samen stappen te zetten richting een duurzame toekomst. Je kunt je per activiteit aanmelden waarna je zo snel mogelijk een bevestiging van je inschrijving ontvangt."})]})})})]}),c("div",{class:"relative z-10 pb-12 sm:pb-18 lg:pb-48 pt-12",children:c("div",{class:"px-6 xl:px-0 xl:min-w-7xl lg:max-w-7xl mx-auto grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-16",children:n.map((t,i)=>{function r(o){const a=new Date(o);return new Intl.DateTimeFormat("nl-NL",{day:"2-digit",month:"long",year:"numeric"}).format(a)}function s(o){const a=new Date(o);return new Intl.DateTimeFormat("nl-NL",{hour:"2-digit",minute:"2-digit"}).format(a)}return c(j,{children:c("div",{class:"max-w-2xl sm:max-w-sm md:max-w-sm lg:max-w-sm xl:max-w-sm sm:mx-auto md:mx-auto lg:mx-auto xl:mx-auto bg-white shadow-xl rounded-lg text-gray-900 relative",children:[c("div",{class:"rounded-t-lg aspect-video overflow-hidden relative",children:c("img",{class:"object-cover w-full",src:t.thumbnail,alt:t.name})}),c("div",{class:"mt-2 p-6 pb-26",children:[c("p",{class:"text-sm",children:t.typeName}),c("h2",{class:"font-semibold text-2xl leading-7 pb-6",children:[t.name," "]}),c("p",{class:"flex items-center mb-3",children:[c(fm,{class:"w-6 mr-3"}),r(t.startTime)]}),c("p",{class:"flex items-center mb-3",children:[c(vm,{class:"w-6 mr-3"}),s(t.startTime)," - ",s(t.endTime)]}),c("p",{class:"flex items-center",children:[c(Em,{class:"w-6 mr-3"}),t.fields.locationStreet," ",t.fields.locationHouseNumber]}),c("p",{children:[t.fields.locationPostalCode," ",t.fields.locationCity]})]}),c("div",{class:"absolute bottom-4 inset-x-0",children:c("a",{href:t.url,target:"_blank",className:"w-1/2 m-auto flex items-center justify-center rounded-md bg-bww-yellow hover:bg-bww-yellow/90 px-3.5 py-2.5 text-sm lg:text-base font-semibold text-black shadow-xs focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bww-yellow cursor-pointer",children:["Opgeven",c(hm,{class:"w-5 h-5 inline ml-2"})]})})]})})})})}),c("div",{class:"relative",children:[c("div",{class:"absolute inset-0 z-0",children:[c("img",{class:"object-cover h-full w-full grayscale",src:"/images/5.jpg"}),c("div",{class:"absolute inset-0 bg-gray-900/95"})]}),c("div",{class:"relative z-10 px-6 xl:px-0 xl:min-w-7xl lg:max-w-7xl mx-auto py-12 sm:py-18 lg:py-48",children:[c("div",{class:"grid grid-cols-1 ",children:[c("div",{class:"lg:col-span-2 text-white",children:c("div",{class:"max-w-4xl text-left pb-6",children:[c("span",{class:"block",children:"Webinar"}),c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-white sm:text-4xl flex items-start",children:"Kies de haalbare warmteoplossing met bewoners"})]})}),c("div",{class:"max-w-4xl mb-12",children:[c("p",{class:"pb-8 text-md lg:text-lg",children:"Samen met Deltares presenteerden we een vergelijking tussen 10 warmte/koude oplossingen, bestaande uit MT-, LT- en ZLT-warmtenetten en all-electric oplossingen, en andere interessante bevindingen over effecten van voorkeuren van bewoners, zoals de voorkeur voor levering van koeling."}),c("a",{href:"https://topsectorenergie.nl/documents/1770/2026_rapport_Deltares_en_the_early_birds_-_Kies_de_haalbare_warmteoplossing_me_y0HK0DA.pdf",target:"_blank",class:" text-center rounded-md bg-bww-yellow px-3.5 py-2.5 text-sm lg:text-base font-semibold text-black shadow-xs hover:bg-bww-yellow/90 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bww-yellow inline-flex items-center justify-center",children:["Download het rapport ",c(lm,{class:"w-5 h-5 inline ml-2"})]})]})]}),c("div",{class:"lg:col-span-3",children:[c("div",{class:"aspect-video rounded-2xl overflow-hidden border-3 border-gray-800 shadow-xl shadow-white/10",children:c("iframe",{class:"w-full h-full",src:"https://www.youtube-nocookie.com/embed/Ymk40tMZTDI?autoplay=0&mute=1&rel=0"})}),c("div",{class:"flex pl-1",children:[c("div",{class:"pt-4 pr-8",children:[c("p",{class:"pb-2 text-sm",children:"In opdracht van"}),c("img",{class:"h-12 md:h-18 bg-white",src:"/images/logos/logo-RVO.png"})]}),c("div",{class:"pt-4",children:[c("p",{class:"pb-2 text-sm",children:"i.s.m. de expertcomissie van:"}),c("div",{class:"grid grid-cols-2 gap-2 lg:flex lg:gap-4",children:[c("img",{class:"h-12 md:h-18 bg-white",src:"/images/logos/tki.png"}),c("img",{class:"h-12 md:h-18 bg-white",src:"/images/logos/mvkegg.png"}),c("img",{class:"h-12 md:h-18 bg-white",src:"/images/logos/Ministerie_van_Binnenlandse_Zaken_en_Koninkrijksrelaties_Logo.jpg"}),c("img",{class:"h-12 md:h-18 bg-white",src:"/images/logos/nplw.png"})]})]})]})]})]})]})]})}function o_(){return c("section",{className:"py-64",children:c("div",{class:"flex justify-center items-center",children:c("div",{class:"text-center",children:[c("h1",{class:"text-3xl font-bold",children:"404: Not Found"}),c("p",{class:"text-lg",children:"It's gone :("})]})})})}class a_ extends Ve{replaceDynamicText=e=>(typeof window<"u"&&(e.indexOf("{bww_duration}")>-1&&(e=e.replace("{bww_duration}",sessionStorage.getItem("bww_duration"))),e.indexOf("{bww_interest}")>-1&&(e=e.replace("{bww_interest}
5",sessionStorage.getItem("bww_interest"))),e.indexOf("{bww_company}")>0&&(e=e.replace("{bww_company}",sessionStorage.getItem("bww_company")))),e);render({text:e}){return c("section",{class:"animate-appear relative pl-16 @lg:pl-20 mb-8 @md:mb-10 @lg:mb-12 ",children:[c("img",{class:"absolute bottom-0 left-0 block h-12 w-12 @lg:h-16 @lg:w-16 border border-slate-400 rounded-full",src:sessionStorage.getItem("bww_chatimage"),alt:"avatar"}),c("div",{class:" relative p-4 @md:p-6 bg-white rounded-xl shadow-lg",children:[c("p",{class:"text-slate-800",dangerouslySetInnerHTML:{__html:this.replaceDynamicText(e)}}),c("div",{class:"absolute bottom-4 @lg:bottom-6 -left-2 w-4 h-4 bg-white rotate-45 shadow-lg"})]})]})}}const l_=n=>c("section",{class:"block relative pl-10 mb-8 @md:mb-10 @lg:mb-12",children:[c("img",{class:"absolute bottom-0 left-0 block h-8 w-8 border border-slate-400 rounded-full opacity-50",src:sessionStorage.getItem("bww_chatimage"),alt:""}),c("div",{class:"relative h-8 flex items-center",children:[c("div",{class:"w-2 h-2 bg-brand2-300 animate-bounce rounded-full ml-1"}),c("div",{class:"w-2 h-2 bg-brand2-400 animation-delay-25 animate-bounce rounded-full ml-1"}),c("div",{class:"w-2 h-2 bg-brand2-500 animation-delay-50 animate-bounce rounded-full ml-1"})]})]});class c_ extends Ve{state={isNew:!0};componentDidMount(){var e=this.props.text.length*7.75;setTimeout(()=>{this.setState({isNew:!1},()=>{this.props.afterRender()})},e)}render({text:e},{isNew:t}){return t?c(l_,{}):c(a_,{text:e})}}
5const Fe={ANIMATING:0,INTERACTING:1};function h_(n,e,t){let i,r;t=t||Jt;let s=0,o=n.length,a=!1;for(;s<o;)i=s+(o-s>>1),r=+t(n[i],e),r<0?s=i+1:(o=i,a=!r);return a?s:~s}function Jt(n,e){return n>e?1:n<e?-1:0}function d_(n,e){return n<e?1:n>e?-1:0}function Yl(n,e,t){if(n[0]<=e)return 0;const i=n.length;if(e<=n[i-1])return i-1;if(typeof t=="function"){for(let r=1;r<i;++r){const s=n[r];if(s===e)return r;if(s<e)return t(e,n[r-1],s)>0?r-1:r}return i-1}if(t>0){for(let r=1;r<i;++r)if(n[r]<e)return r-1;return i-1}if(t<0){for(let r=1;r<i;++r)if(n[r]<=e)return r;return i-1}for(let r=1;r<i;++r){if(n[r]==e)return r;if(n[r]<e)return n[r-1]-e<e-n[r]?r-1:r}return i-1}function u_(n,e,t){for(;e<t;){const i=n[e];n[e]=n[t],n[t]=i,++e,--t}}function Ft(n,e){const t=Array.isArray(e)?e:[e],i=t.length;for(let r=0;r<i;r++)n[n.length]=t[r]}function di(n,e){const t=n.length;if(t!==e.length)return!1;for(let i=0;i<t;i++)if(n[i]!==e[i])return!1;return!0}function g_(n,e,t){const i=e||Jt;return n.every(function(r,s){if(s===0)return!0;const o=i(n[s-1],r);return!(o>0||o===0)})}const Re={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function ke(n){const e=rt();for(let t=0,i=n.length;t<i;++t)Ir(e,n[t]);return e}function Qr(n,e,t){return t?(t[0]=n[0]-e,t[1]=n[1]-e,t[2]=n[2]+e,t[3]=n[3]+e,t):[n[0]-e,n[1]-e,n[2]+e,n[3]+e]}function Yu(n,e){return e?(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e):n.slice()}function dn(n,e,t){let i,r;return e<n[0]?i=n[0]-e:n[2]<e?i=e-n[2]:i=0,t<n[1]?r=n[1]-t:n[3]<t?r=t-n[3]:r=0,i*i+r*r}function Vn(n,e){return Kl(n,e[0],e[1])}function mr(n,e){return n[0]<=e[0]&&e[2]<=n[2]&&n[1]<=e[1]&&e[3]<=n[3]}function Kl(n,e,t){return n[0]<=e&&e<=n[2]&&n[1]<=t&&t<=n[3]}function tl(n,e){const t=n[0],i=n[1],r=n[2],s=n[3],o=e[0],a=e[1];let l=Re.UNKNOWN;return o<t?l=l|Re.LEFT:o>r&&(l=l|Re.RIGHT),a<i?l=l|Re.BELOW:a>s&&(l=l|Re.ABOVE),l===Re.UNKNOWN&&(l=Re.INTERSECTING),l}function rt(){return[1/0,1/0,-1/0,-1/0]}function ai(n,e,t,i,r){return r?(r[0]=n,r[1]=e,r[2]=t,r[3]=i,r):[n,e,t,i]}function es(n){return ai(1/0,1/0,-1/0,-1/0,n)}function Rr(n,e){const t=n[0],i=n[1];return ai(t,i,t,i,e)}function Zl(n,e,t,i,r){const s=es(r);return Ku(s,n,e,t,i)}function Ar(n,e){return n[0]==e[0]&&n[2]==e[2]&&n[1]==e[1]&&n[3]==e[3]}function Hl(n,e){return e[0]<n[0]&&(n[0]=e[0]),e[2]>n[2]&&(n[2]=e[2]),e[1]<n[1]&&(n[1]=e[1]),e[3]>n[3]&&(n[3]=e[3]),n}function Ir(n,e){e[0]<n[0]&&(n[0]=e[0]),e[0]>n[2]&&(n[2]=e[0]),e[1]<n[1]&&(n[1]=e[1]),e[1]>n[3]&&(n[3]=e[1])}function Ku(n,e,t,i,r){for(;t<i;t+=r)f_(n,e[t],e[t+1]);return n}function f_(n,e,t){n[0]=Math.min(n[0],e),n[1]=Math.min(n[1],t),n[2]=Math.max(n[2],e),n[3]=Math.max(n[3],t)}function ql(n,e){let t;return t=e(xo(n)),t||(t=e(bo(n)),t)||(t=e(Eo(n)),t)||(t=e(un(n)),t)?t:!1}function il(n){let e=0;return ts(n)||(e=de(n)*Be(n)),e}function xo(n){return[n[0],n[1]]}function bo(n){return[n[2],n[1]]}function li(n){return[(n[0]+n[2])/2,(n[1]+n[3])/2]}function m_(n,e){let t;if(e==="bottom-left")t=xo(n);else if(e==="bottom-right")t=bo(n);else if(e==="top-left")t=un(n);else if(e==="top-right")t=Eo(n);else throw new Error("Invalid corner");return t}function nl(n,e,t,i,r){const[s,o,a,l,h,d,u,g]=Zu(n,e,t,i);return ai(Math.min(s,a,h,u),Math.min(o,l,d,g),Math.max(s,a,h,u),Math.max(o,l,d,g),r)}function Zu(n,e,t,i){const r=e*i[0]/2,s=e*i[1]/2,o=Math.cos(t),a=Math.sin(t),l=r*o,h=r*a,d=s*o,u=s*a,g=n[0],f=n[1];return[g-l+u,f-h-d,g-l-u,f-h+d,g+l-u,f+h+d,g+l+u,f+h-d,g-l+u,f-h-d]}function Be(n){return n[3]-n[1]}function Ji(n,e,t){const i=t||rt();return je(n,e)?(n[0]>e[0]?i[0]=n[0]:i[0]=e[0],n[1]>e[1]?i[1]=n[1]:i[1]=e[1],n[2]<e[2]?i[2]=n[2]:i[2]=e[2],n[3]<e[3]?i[3]=n[3]:i[3]=e[3]):es(i),i}function un(n){return[n[0],n[3]]}function Eo(n){return[n[2],n[3]]}function de(n){return n[2]-n[0]}function je(n,e){return n[0]<=e[2]&&n[2]>=e[0]&&n[1]<=e[3]&&n[3]>=e[1]}function ts(n){return n[2]<n[0]||n[3]<n[1]}function p_(n,e){return e?(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e):n}function __(n,e,t){let i=!1;const r=tl(n,e),s=tl(n,t);if(r===Re.INTERSECTING||s===Re.INTERSECTING)i=!0;else{const o=n[0],a=n[1],l=n[2],h=n[3],d=e[0],u=e[1],g=t[0],f=t[1],m=(f-u)/(g-d);let _,p;s&Re.ABOVE&&!(r&Re.ABOVE)&&(_=g-(f-h)/m,i=_>=o&&_<=l),!i&&s&Re.RIGHT&&!(r&Re.RIGHT)&&(p=f-(g-l)*m,i=p>=a&&p<=h),!i&&s&Re.BELOW&&!(r&Re.BELOW)&&(_=g-(f-a)/m,i=_>=o&&_<=l),!i&&s&Re.LEFT&&!(r&Re.LEFT)&&(p=f-(g-o)*m,i=p>=a&&p<=h)}return i}function Hu(n,e){const t=e.getExtent(),i=li(n);if(e.canWrapX()&&(i[0]<t[0]||i[0]>=t[2])){const r=de(t),o=Math.floor((i[0]-t[0])/r)*r;n[0]-=o,n[2]-=o}return n}function qu(n,e,t){if(e.canWrapX()){const i=e.getExtent();if(!isFinite(n[0])||!isFinite(n[2]))return[[i[0],n[1],i[2],n[3]]];Hu(n,e);const r=de(i);if(de(n)>r&&!t)return[[i[0],n[1],i[2],n[3]]];if(n[0]<i[0])return[[n[0]+r,n[1],i[2],n[3]],[i[0],n[1],n[2],n[3]]];if(n[2]>i[2])return[[n[0],n[1],i[2],n[3]],[i[0],n[1],n[2]-r,n[3]]]}return[n]}function me(n,e,t){return Math.min(Math.max(n,e),t)}function v_(n,e,t,i,r,s){const o=r-t,a=s-i;if(o!==0||a!==0){const l=((n-t)*o+(e-i)*a)/(o*o+a*a);l>1?(t=r,i=s):l>
50&&(t+=o*l,i+=a*l)}return Qt(n,e,t,i)}function Qt(n,e,t,i){const r=t-n,s=i-e;return r*r+s*s}function w_(n){const e=n.length;for(let i=0;i<e;i++){let r=i,s=Math.abs(n[i][i]);for(let a=i+1;a<e;a++){const l=Math.abs(n[a][i]);l>s&&(s=l,r=a)}if(s===0)return null;const o=n[r];n[r]=n[i],n[i]=o;for(let a=i+1;a<e;a++){const l=-n[a][i]/n[i][i];for(let h=i;h<e+1;h++)i==h?n[a][h]=0:n[a][h]+=l*n[i][h]}}const t=new Array(e);for(let i=e-1;i>=0;i--){t[i]=n[i][e]/n[i][i];for(let r=i-1;r>=0;r--)n[r][e]-=n[r][i]*t[i]}return t}function Ih(n){return n*180/Math.PI}function Li(n){return n*Math.PI/180}function Qi(n,e){const t=n%e;return t*e<0?t+e:t}function nt(n,e,t){return n+t*(e-n)}function is(n,e){const t=Math.pow(10,e);return Math.round(n*t)/t}function ys(n,e){return Math.floor(is(n,e))}function xs(n,e){return Math.ceil(is(n,e))}function rl(n,e,t){if(n>=e&&n<t)return n;const i=t-e;return((n-e)%i+i)%i+e}function y_(n,e){return n[0]+=+e[0],n[1]+=+e[1],n}function x_(n,e){const t=e.getRadius(),i=e.getCenter(),r=i[0],s=i[1],o=n[0],a=n[1];let l=o-r;const h=a-s;l===0&&h===0&&(l=1);const d=Math.sqrt(l*l+h*h),u=r+t*l/d,g=s+t*h/d;return[u,g]}function Co(n,e){const t=n[0],i=n[1],r=e[0],s=e[1],o=r[0],a=r[1],l=s[0],h=s[1],d=l-o,u=h-a,g=d===0&&u===0?0:(d*(t-o)+u*(i-a))/(d*d+u*u||0);let f,m;return g<=0?(f=o,m=a):g>=1?(f=l,m=h):(f=o+g*d,m=a+g*u),[f,m]}function Dr(n,e){let t=!0;for(let i=n.length-1;i>=0;--i)if(n[i]!=e[i]){t=!1;break}return t}function Jl(n,e){const t=Math.cos(e),i=Math.sin(e),r=n[0]*t-n[1]*i,s=n[1]*t+n[0]*i;return n[0]=r,n[1]=s,n}function b_(n,e){return n[0]*=e,n[1]*=e,n}function ei(n,e){const t=n[0]-e[0],i=n[1]-e[1];return t*t+i*i}function Ln(n,e){return Math.sqrt(ei(n,e))}function E_(n,e){return ei(n,Co(n,e))}function Ju(n,e){if(e.canWrapX()){const t=de(e.getExtent()),i=C_(n,e,t);i&&(n[0]-=i*t)}return n}function C_(n,e,t){const i=e.getExtent();let r=0;return e.canWrapX()&&(n[0]<i[0]||n[0]>
5i[2])&&(t=t||de(i),r=Math.floor((n[0]-i[0])/t)),r}function k_(n,e,t){const i=Math.sqrt((e[0]-n[0])*(e[0]-n[0])+(e[1]-n[1])*(e[1]-n[1])),r=[(e[0]-n[0])/i,(e[1]-n[1])/i],s=[-r[1],r[0]],o=Math.sqrt((t[0]-n[0])*(t[0]-n[0])+(t[1]-n[1])*(t[1]-n[1])),a=[(t[0]-n[0])/o,(t[1]-n[1])/o];let l=i===0||o===0?0:Math.acos(me(a[0]*r[0]+a[1]*r[1],-1,1));return l=Math.max(l,1e-5),a[0]*s[0]+a[1]*s[1]>0?l:Math.PI*2-l}const nn=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",S_=nn.includes("safari")&&!nn.includes("chrom");S_&&(nn.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(nn));const T_=nn.includes("webkit")&&!nn.includes("edge"),Qu=nn.includes("macintosh"),R_=typeof devicePixelRatio<"u"?devicePixelRatio:1,lt=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,eg=typeof Image<"u"&&Image.prototype.decode,tg=(function(){let n=!1;try{const e=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return n})();function xe(n,e,t,i){let r;return t&&t.length?r=t.shift():lt?r=new class extends OffscreenCanvas{style={}}(n??300,e??150):r=document.createElement("canvas"),n&&(r.width=n),e&&(r.height=e),r.getContext("2d",i)}let oa;function Zs(){return oa||(oa=xe(1,1)),oa}function ko(n){const e=n.canvas;e.width=1,e.height=1,n.clearRect(0,0,1,1)}function Mh(n,e){const t=e.parentNode;t&&t.replaceChild(n,e)}function I_(n){for(;n.lastChild;)n.lastChild.remove()}function M_(n,e){const t=n.childNodes;for(let i=0;;++i){const r=t[i],s=e[i];if(!r&&!s)break;if(r!==s){if(!r){n.appendChild(s);continue}if(!s){n.removeChild(r),--i;continue}n.insertBefore(s,r)}}}function ig(){return new Proxy({childNodes:[],appendChild:function(e){return this.childNodes.push(e),e},remove:function(){},removeChild:function(e){const t=this.childNodes.indexOf(e);if(t===-1)throw new Error("Node to remove was not found");return this.childNodes.splice(t,1),e},insertBefore:function(e,t){const i=this.childNodes.indexOf(t);if(i===-1)throw new Error("Reference node not found");return this.childNodes.splice(i,0,e),e},style:{}},{get(e,t,i){return t==="firstElementChild"?e.childNodes.length>0?e.childNodes[0]:null:Reflect.get(e,t,i)}})}function Si(n){return typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas}function ng(...n){console.warn(...n)}const Ql={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class ec{constructor(e){this.code_=e.code,this.units_=e.units,this.extent_=e.extent!==void 0?e.extent:null,this.worldExtent_=e.worldExtent!==void 0?e.worldExtent:null,this.axisOrientation_=e.axisOrientation!==void 0?e.axisOrientation:"enu",this.global_=e.global!==void 0?e.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Ql[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(e){this.global_=e,this.canWrapX_=!!(e&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(e){this.defaultTileGrid_=e}setExtent(e){this.extent_=e,this.canWrapX_=!!(this.global_&&e)}setWorldExtent(e){this.worldExtent_=e}setGetPointResolution(e){this.getPointResolutionFunc_=e}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const ns=6378137,An=Math.PI*ns,P_=[-An,-An,An,An],L_=[-180,-85,180,85],bs=ns*Math.log(Math.tan(Math.PI/2));class vn extends ec{constructor(e){super({code:e,units:"m",extent:P_,global:!0,worldExtent:L_,getPointResolution:function(t,i){return t/Math.cosh(i[1]/ns)}})}}const Ph=[new vn("EPSG:3857"),new vn("EPSG:102100"),new vn("EPSG:102113"),new vn("EPSG:900913"),new vn("http://www.opengis.net/def/crs/EPSG/0/3857"),new vn("http://www.opengis.net/gml/srs/epsg.xml#3857")];function A_(n,e,t,i){const r=n.length;t=t>1?t:2,i=i??t,e===void 0&&(t>2?e=n.slice():e=new Array(r));for(let s=0;s<r;s+=i){e[s]=An*n[s]/180;let o=ns*Math.log(Math.tan(Math.PI*(+n[s+1]+90)/360));o>bs?o=bs:o<-bs&&(o=-bs),e[s+1]=o}return e}function D_(n,e,t,i){const r=n.length;t=t>1?t:2,i=i??t,e===void 0&&(t>2?e=n.slice():e=new Array(r));for(let s=0;s<r;s+=i)e[s]=180*n[s]/An,e[s+1]=360*Math.atan(Math.exp(n[s+1]/ns))/Math.PI-90;return e}
5const O_=6378137,Lh=[-180,-90,180,90],F_=Math.PI*O_/180;class Gi extends ec{constructor(e,t){super({code:e,units:"degrees",extent:Lh,axisOrientation:t,global:!0,metersPerUnit:F_,worldExtent:Lh})}}const Ah=[new Gi("CRS:84"),new Gi("EPSG:4326","neu"),new Gi("urn:ogc:def:crs:OGC:1.3:CRS84"),new Gi("urn:ogc:def:crs:OGC:2:84"),new Gi("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Gi("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Gi("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let sl={};function j_(n){return sl[n]||sl[n.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function N_(n,e){sl[n]=e}function Hn(n){for(const e in n)delete n[e]}function Xn(n){let e;for(e in n)return!1;return!e}let Fn={};function Or(n,e,t){const i=n.getCode(),r=e.getCode();i in Fn||(Fn[i]={}),Fn[i][r]=t}function aa(n,e){return n in Fn&&e in Fn[n]?Fn[n][e]:null}const Hs=.9996,dt=.00669438,So=dt*dt,To=So*dt,Ki=dt/(1-dt),Dh=Math.sqrt(1-dt),Un=(1-Dh)/(1+Dh),rg=Un*Un,tc=rg*Un,ic=tc*Un,sg=ic*Un,og=1-dt/4-3*So/64-5*To/256,z_=3*dt/8+3*So/32+45*To/1024,W_=15*So/256+45*To/1024,G_=35*To/3072,B_=3/2*Un-27/32*tc+269/512*sg,$_=21/16*rg-55/32*ic,V_=151/96*tc-417/128*sg,X_=1097/512*ic,qs=6378137;function U_(n,e,t){const i=n-5e5,o=(t.north?e:e-1e7)/Hs/(qs*og),a=o+B_*Math.sin(2*o)+$_*Math.sin(4*o)+V_*Math.sin(6*o)+X_*Math.sin(8*o),l=Math.sin(a),h=l*l,d=Math.cos(a),u=l/d,g=u*u,f=g*g,m=1-dt*h,_=Math.sqrt(1-dt*h),p=qs/_,v=(1-dt)/m,w=Ki*d**2,x=w*w,y=i/(p*Hs),b=y*y,k=b*y,R=k*y,T=R*y,E=T*y,C=a-u/v*(b/2-R/24*(5+3*g+10*w-4*x-9*Ki))+E/720*(61+90*g+298*w+45*f-252*Ki-3*x);let M=(y-k/6*(1+2*g+w)+T/120*(5-2*w+28*g-3*x+8*Ki+24*f))/d;return M=rl(M+Li(ag(t.number)),-Math.PI,Math.PI),[Ih(M),Ih(C)]}const Oh=-80,Fh=84,Y_=-180,K_=180;function Z_(n,e,t){n=rl(n,Y_,K_),e<Oh?e=Oh:e>Fh&&(e=Fh);const i=Li(e),r=Math.sin(i),s=Math.cos(i),o=r/s,a=o*o,l=a*a,h=Li(n),d=ag(t.number),u=Li(d),g=qs/Math.sqrt(1-dt*r**2),f=Ki*s**2,m=s*rl(h-u,-Math.PI,Math.PI),_=m*m,p=_*m,v=p*m,w=v*m,x=w*m,y=qs*(og*i-z_*Math.sin(2*i)+W_*Math.sin(4*i)-G_*Math.sin(6*i)),b=Hs*g*(m+p/6*(1-a+f)+w/120*(5-18*a+l+72*f-58*Ki))+5e5;let k=Hs*(y+g*o*(_/2+v/24*(5-a+9*f+4*f**2)+x/720*(61-58*a+l+600*f-330*Ki)));return t.north||(k+=1e7),[b,k]}function ag(n){return(n-1)*6-180+3}const H_=[/^EPSG:(\d+)$/,/^urn:ogc:def:crs:EPSG::(\d+)$/,/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/];function lg(n){let e=0;for(const r of H_){const s=n.match(r);if(s){e=parseInt(s[1]);break}}if(!e)return null;let t=0,i=!1;return e>32700&&e<32761?t=e-32700:e>32600&&e<32661&&(i=!0,t=e-32600),t?{number:t,north:i}:null}function jh(n,e){return function(t,i,r,s){const o=t.length;r=r>1?r:2,s=s??r,i||(r>2?i=t.slice():i=new Array(o));for(let a=0;a<o;a+=s){const l=t[a],h=t[a+1],d=n(l,h,e);i[a]=d[0],i[a+1]=d[1]}return i}}function q_(n){return lg(n)?new ec({code:n,units:"m"}):null}function J_(n){const e=lg(n.getCode());return e?{forward:jh(Z_,e),inverse:jh(U_,e)}:null}const Q_=63710088e-1;function Nh(n,e,t){t=t||Q_;const i=Li(n[1]),r=Li(e[1]),s=(r-i)/2,o=Li(e[0]-n[0])/2,a=Math.sin(s)*Math.sin(s)+Math.sin(o)*Math.sin(o)*Math.cos(i)*Math.cos(r);return 2*t*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}const ev=[J_],tv=[q_];let ol=!0;function iv(n){ol=!1}function nc(n,e){if(e!==void 0){for(let t=0,i=n.length;t<i;++t)e[t]=n[t];e=e}else e=n.slice();return e}function al(n){N_(n.getCode(),n),Or(n,n,nc)}function nv(n){n.forEach(al)}function Je(n){if(typeof n!="string")return n;const e=j_(n);if(e)return e;for(const t of tv){const i=t(n);if(i)return i}return null}function zh(n,e,t,i){n=Je(n);let r;const s=n.getPointResolutionFunc();if(s)r=s(e,t);else{const o=n.getUnits();if(o=="degrees"&&!i||i=="degrees")r=e;else{const a=sc(n,Je("EPSG:4326"));if(!a&&o!=="degrees")r=e*n.getMetersPerUnit();else{let h=[t[0]-e/2,t[1],t[0]+e/2,t[1],t[0],t[1]-e/2,t[0],t[1]+e/2];h=a(h,h,2);const d=Nh(h.slice(0,2),h.slice(2,4)),u=Nh(h.slice(4,6),h.slice(6,8));r=(d+u)/2}const l=n.getMetersPerUnit();l!==void 0&&(r/=l)}}return r}function Wh(n){nv(n),n.forEach(function(e){n.forEach(function(t){e!==t&&Or(e,t,nc)})})}function rv(n,e,t,i){n.forEach(function(r){e.forEach(function(s){Or(r,s,t),Or(s,r,i)})})}function rc(n,e){return n?typeof n=="string"?Je(n):n:Je(e)}function sv(n){return(function(e,t,i,r){const s=e.length;i=i!==void 0?i:2,r=r??i,t=t!==void 0?t:new Array(s);for(let o=0;o<s;o+=r){const a=n(e.slice(o,o+i)),l=a.length;for(let h=0,d=r;h<d;++h)t[o+h]=h>=l?e[o+h]:a[h]}return t})}function Ws(n,e){if(n===e)return!0;const t=n.getUnits()===e.getUnits();return(n.getCode()===e.getCode()||sc(n,e)===nc)&&t}function sc(n,e){const t=n.getCode(),i=e.getCode();let r=aa(t,i);if(r)return r;let s=null,o=null;for(const l of ev)s||(s=l(n)),o||(o=l(e));if(!s&&!o)return null;const a="EPSG:4326";if(o)if(s)r=la(s.inverse,o.forward);else{const l=aa(t,a);l&&(r=la(l,o.forward))}else{const l=aa(a,i);l&&(r=la(s.inverse,l))}return r&&(al(n),al(e),Or(n,e,r)),r}function la(n,e){return function(t,i,r,s){return i=n(t,i,r,s),e(i,i,r,s)}}function Js(n,e){const t=Je(n),i=Je(e);return sc(t,i)}function cg(n,e,t){const i=Js(e,t);if(!i){const r=Je(e).getCode(),s=Je(t).getCode();throw new Error(`No transform available between ${r} and ${s}`)}return i(n,void 0,n.length)}function Di(n,e){return n}function ue(n,e){return ol&&!Dr(n,[0,0])&&n[0]>=-180&&n[0]<=180&&n[1]>=-90&&n[1]<=90&&(ol=!1,ng("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),n}function Ro(n,e){return n}function Ti(n,e){return n}function ov(){Wh(Ph),Wh(Ah),rv(Ah,Ph,A_,D_)}ov();const ct={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},q={IDLE:0,LOADING:1,LOADED:2,ERROR:3},oc=[NaN,NaN,NaN,0];let ca;
5function av(){return ca||(ca=xe(1,1,void 0,{willReadFrequently:!0,desynchronized:!0})),ca}const lv=/^rgba?\(\s*(\d+%?)\s+(\d+%?)\s+(\d+%?)(?:\s*\/\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,cv=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,hv=/^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,dv=/^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i;function Es(n,e){return n.endsWith("%")?Number(n.substring(0,n.length-1))/e:Number(n)}function Mr(n){throw new Error('failed to parse "'+n+'" as color')}function hg(n){if(n.toLowerCase().startsWith("rgb")){const s=n.match(cv)||n.match(lv)||n.match(hv);if(s){const o=s[4],a=100/255;return[me(Es(s[1],a)+.5|0,0,255),me(Es(s[2],a)+.5|0,0,255),me(Es(s[3],a)+.5|0,0,255),o!==void 0?me(Es(o,100),0,1):1]}Mr(n)}if(n.startsWith("#")){if(dv.test(n)){const s=n.substring(1),o=s.length<=4?1:2,a=[0,0,0,255];for(let l=0,h=s.length;l<h;l+=o){let d=parseInt(s.substring(l,l+o),16);o===1&&(d+=d<<4),a[l/o]=d}return a[3]=a[3]/255,a}Mr(n)}const e=av();e.fillStyle="#abcdef";let t=e.fillStyle;e.fillStyle=n,e.fillStyle===t&&(e.fillStyle="#fedcba",t=e.fillStyle,e.fillStyle=n,e.fillStyle===t&&Mr(n));const i=e.fillStyle;if(i.startsWith("#")||i.startsWith("rgba"))return hg(i);e.clearRect(0,0,1,1),e.fillRect(0,0,1,1);const r=Array.from(e.getImageData(0,0,1,1).data);return r[3]=is(r[3]/255,3),r}function uv(n){return typeof n=="string"?n:lc(n)}const gv=1024,or={};let ha=0;function fv(n){if(n.length===4)return n;const e=n.slice();return e[3]=1,e}function da(n){return n>.0031308?Math.pow(n,1/2.4)*269.025-14.025:n*3294.6}function ua(n){return n>.2068965?Math.pow(n,3):(n-4/29)*(108/841)}function ga(n){return n>10.314724?Math.pow((n+14.025)/269.025,2.4):n/3294.6}function fa(n){return n>.0088564?Math.pow(n,1/3):n/(108/841)+4/29}function Gh(n){const e=ga(n[0]),t=ga(n[1]),i=ga(n[2]),r=fa(e*.222488403+t*.716873169+i*.06060791),s=500*(fa(e*.452247074+t*.399439023+i*.148375274)-r),o=200*(r-fa(e*.016863605+t*.117638439+i*.865350722)),a=Math.atan2(o,s)*(180/Math.PI);return[116*r-16,Math.sqrt(s*s+o*o),a<0?a+360:a,n[3]]}function mv(n){const e=(n[0]+16)/116,t=n[1],i=n[2]*Math.PI/180,r=ua(e),s=ua(e+t/500*Math.cos(i)),o=ua(e-t/200*Math.sin(i)),a=da(s*3.021973625-r*1.617392459-o*.404875592),l=da(s*-.943766287+r*1.916279586+o*.027607165),h=da(s*.069407491-r*.22898585+o*1.159737864);return[me(a+.5|0,0,255),me(l+.5|0,0,255),me(h+.5|0,0,255),n[3]]}function ac(n){if(n==="none")return oc;if(or.hasOwnProperty(n))return or[n];if(ha>=gv){let t=0;for(const i in or)(t++&3)===0&&(delete or[i],--ha)}const e=hg(n);e.length!==4&&Mr(n);for(const t of e)isNaN(t)&&Mr(n);return or[n]=e,++ha,e}function rn(n){return Array.isArray(n)?n:ac(n)}function lc(n){let e=n[0];e!=(e|0)&&(e=e+.5|0);let t=n[1];t!=(t|0)&&(t=t+.5|0);let i=n[2];i!=(i|0)&&(i=i+.5|0);const r=n[3]===void 0?1:Math.round(n[3]*1e3)/1e3;return"rgba("+e+","+t+","+i+","+r+")"}function ee(n,e,t,i,r){if(r){const o=t;t=function(a){return n.removeEventListener(e,t),o.call(i??this,a)}}else i&&i!==n&&(t=t.bind(i));const s={target:n,type:e,listener:t};return n.addEventListener(e,t),s}function Qs(n,e,t,i){return ee(n,e,t,i,!0)}function ae(n){n&&n.target&&(n.target.removeEventListener(n.type,n.listener),Hn(n))}const V={CHANGE:"change",ERROR:"error",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",TOUCHMOVE:"touchmove",WHEEL:"wheel"};class Io{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function sn(){return!0}function gn(){return!1}function Fr(){}function dg(n){let e,t,i;return function(){const r=Array.prototype.slice.call(arguments);return(!t||this!==i||!di(r,t))&&(i=this,t=r,e=n.apply(this,arguments)),e}}function pv(n){function e(){let t;try{t=n()}catch(i){return Promise.reject(i)}return t instanceof Promise?t:Promise.resolve(t)}return e()}class mt{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}class Mo extends Io{constructor(e){super(),this.eventTarget_=e,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(e,t){if(!e||!t)return;const i=this.listeners_||(this.listeners_={}),r=i[e]||(i[e]=[]);r.includes(t)||r.push(t)}
5dispatchEvent(e){const t=typeof e=="string",i=t?e:e.type,r=this.listeners_&&this.listeners_[i];if(!r)return;const s=t?new mt(e):e;s.target||(s.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});i in o||(o[i]=0,a[i]=0),++o[i];let l;for(let h=0,d=r.length;h<d;++h)if("handleEvent"in r[h]?l=r[h].handleEvent(s):l=r[h].call(this,s),l===!1||s.propagationStopped){l=!1;break}if(--o[i]===0){let h=a[i];for(delete a[i];h--;)this.removeEventListener(i,Fr);delete o[i]}return l}disposeInternal(){this.listeners_&&Hn(this.listeners_)}getListeners(e){return this.listeners_&&this.listeners_[e]||void 0}hasListener(e){return this.listeners_?e?e in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(e,t){if(!this.listeners_)return;const i=this.listeners_[e];if(!i)return;const r=i.indexOf(t);r!==-1&&(this.pendingRemovals_&&e in this.pendingRemovals_?(i[r]=Fr,++this.pendingRemovals_[e]):(i.splice(r,1),i.length===0&&delete this.listeners_[e]))}}function _v(n,e,t){const i=n;let r=!0,s=!1,o=!1;const a=[Qs(i,V.LOAD,function(){o=!0,s||e()})];return i.src&&eg?(s=!0,i.decode().then(function(){r&&e()}).catch(function(l){r&&(o?e():t())})):a.push(Qs(i,V.ERROR,t)),function(){r=!1,a.forEach(ae)}}function vv(n,e){return new Promise((t,i)=>{function r(){o(),t(n)}function s(){o(),i(new Error("Image load error"))}function o(){n.removeEventListener("load",r),n.removeEventListener("error",s)}n.addEventListener("load",r),n.addEventListener("error",s)})}function wv(n,e){return e&&(n.src=e),n.src&&eg?new Promise((t,i)=>n.decode().then(()=>t(n)).catch(r=>n.complete&&n.width?t(n):i(r))):vv(n)}class yv{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=1024}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let e=0;for(const t in this.cache_){const i=this.cache_[t];(e++&3)===0&&!i.hasListener()&&(delete this.cache_[t],delete this.patternCache_[t],--this.cacheSize_)}}}get(e,t){const i=ma(e,t);return i in this.cache_?this.cache_[i]:null}getPattern(e,t){const i=ma(e,t);return i in this.patternCache_?this.patternCache_[i]:null}set(e,t,i,r){const s=ma(e,t),o=s in this.cache_;this.cache_[s]=i,r&&(i.getImageState()===q.IDLE&&i.load(),i.getImageState()===q.LOADING?i.ready().then(()=>{this.patternCache_[s]=Zs().createPattern(i.getImage(1),"repeat")}):this.patternCache_[s]=Zs().createPattern(i.getImage(1),"repeat")),o||++this.cacheSize_}setSize(e){this.maxCacheSize_=e,this.expire()}}function ma(n,e){const t=e?rn(e):"null";return n+":"+t}const ht=new yv;let ar=null;class ug extends Mo{constructor(e,t,i,r,s){super(),this.hitDetectionImage_=null,this.image_=e,this.crossOrigin_=i?.crossOrigin,this.referrerPolicy_=i?.referrerPolicy,this.canvas_={},this.color_=s,this.imageState_=r===void 0?q.IDLE:r,this.size_=e&&e.width&&e.height?[e.width,e.height]:null,this.src_=t,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_),this.referrerPolicy_!==void 0&&(this.image_.referrerPolicy=this.referrerPolicy_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===q.LOADED){ar||(ar=xe(1,1,void 0,{willReadFrequently:!0})),ar.drawImage(this.image_,0,0);try{ar.getImageData(0,0,1,1),this.tainted_=!1}catch{ar=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(V.CHANGE)}handleImageError_(){this.imageState_=q.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=q.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(e){return this.image_||this.initializeImage_(),this.replaceColor_(e),this.canvas_[e]?this.canvas_[e]:this.image_}setImage(e){this.image_=e}getPixelRatio(e){return this.replaceColor_(e),this.canvas_[e]?e:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const e=this.size_[0],t=this.size_[1],i=xe(e,t);i.fillRect(0,0,e,t),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===q.IDLE){this.image_||this.initializeImage_(),this.imageState_=q.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&wv(this.image_,this.src_).then(e=>{this.image_=e,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(e){if(!this.color_||this.canvas_[e]||this.imageState_!==q.LOADED)return;const t=this.image_,i=xe(Math.ceil(t.width*e),Math.ceil(t.height*e)),r=i.canvas;i.scale(e,e),i.drawImage(t,0,0),i.globalCompositeOperation="multiply",i.fillStyle=uv(this.color_),i.fillRect(0,0,r.width/e,r.height/e),i.globalCompositeOperation="destination-in",i.drawImage(t,0,0),this.canvas_[e]=r}ready(){return this.ready_||(this.ready_=new Promise(e=>{if(this.imageState_===q.LOADED||this.imageState_===q.ERROR)e();else{const t=()=>{(this.imageState_===q.LOADED||this.imageState_===q.ERROR)&&(this.removeEventListener(V.CHANGE,t),e())};this.addEventListener(V.CHANGE,t)}})),this.ready_}}function Pr(n,e,t,i,r,s){let o=e===void 0?void 0:ht.get(e,r);return o||(o=new ug(n,n&&"src"in n?n.src||void 0:e,t,i,r),ht.set(e,r,o,s)),s&&o&&!ht.getPattern(e,r)&&ht.set(e,r,o,s),o}function At(n){return n?Array.isArray(n)?lc(n):typeof n=="object"&&"src"in n?xv(n):n:null}function xv(n){if(!n.offset||!n.size)return ht.getPattern(n.src,n.color);const e=n.src+":"+n.offset,t=ht.getPattern(e,n.color);if(t)return t;const i=ht.get(n.src,null);if(i.getImageState()!==q.LOADED)return null;const r=xe(n.size[0],n.size[1]);return r.drawImage(i.getImage(1),n.offset[0],n.offset[1],n.size[0],n.size[1],0,0,n.size[0],n.size[1]),Pr(r.canvas,e,void 0,q.LOADED,n.color,!0),ht.getPattern(e,n.color)}function Ri(n,e,t,i,r){r=r!==void 0?r:[];let s=0;for(let o=e;o<t;o+=i)r[s++]=n.slice(o,o+i);return r.length=s,r}function jr(n,e,t,i,r){r=r!==void 0?r:[];let s=0;for(let o=0,a=t.length;o<a;++o){const l=t[o];
5r[s++]=Ri(n,e,l,i,r[s]),e=l}return r.length=s,r}function ll(n,e,t,i,r){r=r!==void 0?r:[];let s=0;for(let o=0,a=t.length;o<a;++o){const l=t[o];r[s++]=l.length===1&&l[0]===e?[]:jr(n,e,l,i,r[s]),e=l[l.length-1]}return r.length=s,r}class gg{drawCustom(e,t,i,r,s){}drawGeometry(e){}setStyle(e){}drawCircle(e,t,i){}drawFeature(e,t,i){}drawGeometryCollection(e,t,i){}drawLineString(e,t,i){}drawMultiLineString(e,t,i){}drawMultiPoint(e,t,i){}drawMultiPolygon(e,t,i){}drawPoint(e,t,i){}drawPolygon(e,t,i){}drawText(e,t,i){}setFillStrokeStyle(e,t){}setImageStyle(e,t){}setTextStyle(e,t){}}const wt={PROPERTYCHANGE:"propertychange"};class rs extends Mo{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(V.CHANGE)}getRevision(){return this.revision_}onInternal(e,t){if(Array.isArray(e)){const i=e.length,r=new Array(i);for(let s=0;s<i;++s)r[s]=ee(this,e[s],t);return r}return ee(this,e,t)}onceInternal(e,t){let i;if(Array.isArray(e)){const r=e.length;i=new Array(r);for(let s=0;s<r;++s)i[s]=Qs(this,e[s],t)}else i=Qs(this,e,t);return t.ol_key=i,i}unInternal(e,t){const i=t.ol_key;if(i)bv(i);else if(Array.isArray(e))for(let r=0,s=e.length;r<s;++r)this.removeEventListener(e[r],t);else this.removeEventListener(e,t)}}rs.prototype.on;rs.prototype.once;rs.prototype.un;function bv(n){if(Array.isArray(n))for(let e=0,t=n.length;e<t;++e)ae(n[e]);else ae(n)}function re(){throw new Error("Unimplemented abstract method.")}let Ev=0;function H(n){return n.ol_uid||(n.ol_uid=String(++Ev))}class Bh extends mt{constructor(e,t,i){super(e),this.key=t,this.oldValue=i}}class Gt extends rs{constructor(e){super(),this.on,this.once,this.un,H(this),this.values_=null,e!==void 0&&this.setProperties(e)}get(e){let t;return this.values_&&this.values_.hasOwnProperty(e)&&(t=this.values_[e]),t}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(e,t){let i;i=`change:${e}`,this.hasListener(i)&&this.dispatchEvent(new Bh(i,e,t)),i=wt.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new Bh(i,e,t))}addChangeListener(e,t){this.addEventListener(`change:${e}`,t)}removeChangeListener(e,t){this.removeEventListener(`change:${e}`,t)}set(e,t,i){const r=this.values_||(this.values_={});if(i)r[e]=t;else{const s=r[e];r[e]=t,s!==t&&this.notify(e,s)}}setProperties(e,t){for(const i in e)this.set(i,e[i],t)}applyProperties(e){e.values_&&Object.assign(this.values_||(this.values_={}),e.values_)}unset(e,t){if(this.values_&&e in this.values_){const i=this.values_[e];delete this.values_[e],Xn(this.values_)&&(this.values_=null),t||this.notify(e,i)}}}const Cs="ol-hidden",Po="ol-unselectable",cc="ol-control",$h="ol-collapsed",Cv=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z0-9]+?)\\s*$`].join(""),"i"),Vh=["style","variant","weight","size","lineHeight","family"],cl={normal:400,bold:700},hl=function(n){const e=n.match(Cv);if(!e)return null;const t={lineHeight:"normal",size:"1.2em",style:"normal",weight:"400",variant:"normal"};for(let i=0,r=Vh.length;i<r;++i){const s=e[i+1];s!==void 0&&(t[Vh[i]]=typeof s=="string"?s.trim():s)}return isNaN(Number(t.weight))&&t.weight in cl&&(t.weight=cl[t.weight]),t.families=t.family.split(/,\s?/).map(i=>i.trim().replace(/^['"]|['"]$/g,"")),t},fg="10px sans-serif",Ue="#000",Yn="round",ti=[],ii=0,Kn="round",Nr=10,kv=0,jt="#000",zr="center",eo="middle",Zi=[0,0,0,0],Wr=1,Tn=new Gt;let lr=null,Xh;const dl={},Sv=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function Tv(n,e,t){return`${n} ${e} 16px "${t}"`}const Rv=(function(){let e,t;async function i(s){await t.ready;const o=await t.load(s);if(o.length===0)return!1;const a=hl(s),l=a.families[0].toLowerCase(),h=a.weight;return o.some(d=>{const u=d.family.replace(/^['"]|['"]$/g,"").toLowerCase(),g=cl[d.weight]||d.weight;return u===l&&d.style===a.style&&g==h})}async function r(){await t.ready;let s=!0;const o=Tn.getProperties(),a=Object.keys(o).filter(l=>o[l]<100);for(let l=a.length-1;l>=0;--l){const h=a[l];let d=o[h];d<100&&(await i(h)?(Hn(dl),Tn.set(h,100)):(d+=10,Tn.set(h,d,!0),d<100&&(s=!1)))}e=void 0,s||(e=setTimeout(r,100))}return async function(s){t||(t=lt?self.fonts:document.fonts);const o=hl(s);if(!o)return;const a=o.families;let l=!1;for(const h of a){if(Sv.has(h))continue;const d=Tv(o.style,o.weight,h);Tn.get(d)===void 0&&(Tn.set(d,0,!0),l=!0)}l&&(clearTimeout(e),e=setTimeout(r,100))}})(),Iv=(function(){let n;return function(e){let t=dl[e];if(t==null){if(lt){const i=hl(e),r=mg(e,"Žg");t=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)}else n||(n=document.createElement("div"),n.innerHTML="M",n.style.minHeight="0",n.style.maxHeight="none",n.style.height="auto",n.style.padding="0",n.style.border="none",n.style.position="absolute",n.style.display="block",n.style.left="-99999px"),n.style.font=e,document.body.appendChild(n),t=n.offsetHeight,document.body.removeChild(n);dl[e]=t}return t}})();function mg(n,e){return lr||(lr=xe(1,1)),n!=Xh&&(lr.font=n,Xh=lr.font),lr.measureText(e)}function pg(n,e){return mg(n,e).width}function Uh(n,e,t){if(e in t)return t[e];const i=e.split(` 6`).reduce((r,s)=>Math.max(r,pg(n,s)),0);return t[e]=i,i}function Mv(n,e){const t=[],i=[],r=[];let s=0,o=0,a=0,l=0;for(let h=0,d=e.length;h<=d;h+=2){const u=e[h];if(u===` 7`||h===d){s=Math.max(s,o),r.push(o),o=0,a+=l,l=0;continue}const g=e[h+1]||n.font,f=pg(g,u);t.push(f),o+=f;const m=Iv(g);i.push(m),l=Math.max(l,m)}return{width:s,height:a,widths:t,heights:i,lineWidths:r}}function Pv(n,e,t,i,r,s,o,a,l,h,d){n.save(),t!==1&&(n.globalAlpha===void 0?n.globalAlpha=u=>u.globalAlpha*=t:n.globalAlpha*=t),e&&n.transform.apply(n,e),i.contextInstructions?(n.translate(l,h),n.scale(d[0],d[1]),Lv(i,n)):d[0]<0||d[1]<0?(n.translate(l,h),n.scale(d[0],d[1]),n.drawImage(i,r,s,o,a,0,0,o,a)):n.drawImage(i,r,s,o,a,l,h,o*d[0],a*d[1]),n.restore(
7)}function Lv(n,e){const t=n.contextInstructions;for(let i=0,r=t.length;i<r;i+=2)Array.isArray(t[i+1])?e[t[i]].apply(e,t[i+1]):e[t[i]]=t[i+1]}const W={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},ks=[W.FILL],Ii=[W.STROKE],Hi=[W.BEGIN_PATH],Yh=[W.CLOSE_PATH];class ss extends gg{constructor(e,t,i,r){super(),this.tolerance=e,this.maxExtent=t,this.pixelRatio=r,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(e){const t=this.pixelRatio;return t==1?e:e.map(function(i){return i*t})}appendFlatPointCoordinates(e,t){const i=this.getBufferedMaxExtent(),r=this.tmpCoordinate_,s=this.coordinates;let o=s.length;for(let a=0,l=e.length;a<l;a+=t)r[0]=e[a],r[1]=e[a+1],Vn(i,r)&&(s[o++]=r[0],s[o++]=r[1]);return o}appendFlatLineCoordinates(e,t,i,r,s,o){const a=this.coordinates;let l=a.length;const h=this.getBufferedMaxExtent();o&&(t+=r);let d=e[t],u=e[t+1];const g=this.tmpCoordinate_;let f=!0,m,_,p;for(m=t+r;m<i;m+=r)g[0]=e[m],g[1]=e[m+1],p=tl(h,g),p!==_?(f&&(a[l++]=d,a[l++]=u,f=!1),a[l++]=g[0],a[l++]=g[1]):p===Re.INTERSECTING?(a[l++]=g[0],a[l++]=g[1],f=!1):f=!0,d=g[0],u=g[1],_=p;return(s&&f||m===t+r)&&(a[l++]=d,a[l++]=u),l}drawCustomCoordinates_(e,t,i,r,s){for(let o=0,a=i.length;o<a;++o){const l=i[o],h=this.appendFlatLineCoordinates(e,t,l,r,!1,!1);s.push(h),t=l}return t}drawCustom(e,t,i,r,s){this.beginGeometry(e,t,s);const o=e.getType(),a=e.getStride(),l=this.coordinates.length;let h,d,u,g,f;switch(o){case"MultiPolygon":h=e.getOrientedFlatCoordinates(),g=[];const m=e.getEndss();f=0;for(let _=0,p=m.length;_<p;++_){const v=[];f=this.drawCustomCoordinates_(h,f,m[_],a,v),g.push(v)}this.instructions.push([W.CUSTOM,l,g,e,i,ll,s]),this.hitDetectionInstructions.push([W.CUSTOM,l,g,e,r||i,ll,s]);break;case"Polygon":case"MultiLineString":u=[],h=o=="Polygon"?e.getOrientedFlatCoordinates():e.getFlatCoordinates(),f=this.drawCustomCoordinates_(h,0,e.getEnds(),a,u),this.instructions.push([W.CUSTOM,l,u,e,i,jr,s]),this.hitDetectionInstructions.push([W.CUSTOM,l,u,e,r||i,jr,s]);break;case"LineString":case"Circle":h=e.getFlatCoordinates(),d=this.appendFlatLineCoordinates(h,0,h.length,a,!1,!1),this.instructions.push([W.CUSTOM,l,d,e,i,Ri,s]),this.hitDetectionInstructions.push([W.CUSTOM,l,d,e,r||i,Ri,s]);break;case"MultiPoint":h=e.getFlatCoordinates(),d=this.appendFlatPointCoordinates(h,a),d>l&&(this.instructions.push([W.CUSTOM,l,d,e,i,Ri,s]),this.hitDetectionInstructions.push([W.CUSTOM,l,d,e,r||i,Ri,s]));break;case"Point":h=e.getFlatCoordinates(),this.coordinates.push(h[0],h[1]),d=this.coordinates.length,this.instructions.push([W.CUSTOM,l,d,e,i,void 0,s]),this.hitDetectionInstructions.push([W.CUSTOM,l,d,e,r||i,void 0,s]);break}this.endGeometry(t)}beginGeometry(e,t,i){this.beginGeometryInstruction1_=[W.BEGIN_GEOMETRY,t,0,e,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[W.BEGIN_GEOMETRY,t,0,e,i],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const e=this.hitDetectionInstructions;e.reverse();let t;const i=e.length;let r,s,o=-1;for(t=0;t<i;++t)r=e[t],s=r[0],s==W.END_GEOMETRY?o=t:s==W.BEGIN_GEOMETRY&&(r[2]=t,u_(this.hitDetectionInstructions,o,t),o=-1)}fillStyleToState(e,t={}){if(e){const i=e.getColor();t.fillPatternScale=i&&typeof i=="object"&&"src"in i?this.pixelRatio:1,t.fillStyle=At(i||Ue)??void 0}else t.fillStyle=void 0;return t}strokeStyleToState(e,t={}){if(e){const i=e.getColor();t.strokeStyle=At(i||jt);const r=e.getLineCap();t.lineCap=r!==void 0?r:Yn;const s=e.getLineDash();t.lineDash=s?s.slice():ti;const o=e.getLineDashOffset();t.lineDashOffset=o||ii;const a=e.getLineJoin();t.lineJoin=a!==void 0?a:Kn;const l=e.getWidth();t.lineWidth=l!==void 0?l:Wr;const h=e.getMiterLimit();
7t.miterLimit=h!==void 0?h:Nr;const d=e.getOffset();t.strokeOffset=d??kv,t.lineWidth>this.maxLineWidth&&(this.maxLineWidth=t.lineWidth,this.bufferedMaxExtent_=null)}else t.strokeStyle=void 0,t.lineCap=void 0,t.lineDash=null,t.lineDashOffset=void 0,t.lineJoin=void 0,t.lineWidth=void 0,t.miterLimit=void 0,t.strokeOffset=void 0;return t}setFillStrokeStyle(e,t){const i=this.state;this.fillStyleToState(e,i),this.strokeStyleToState(t,i)}createFill(e){const t=e.fillStyle,i=[W.SET_FILL_STYLE,t];return typeof t!="string"&&i.push(e.fillPatternScale),i}applyStroke(e){this.instructions.push(this.createStroke(e))}createStroke(e){return[W.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth*this.pixelRatio,e.lineCap,e.lineJoin,e.miterLimit,e.lineDash?this.applyPixelRatio(e.lineDash):null,e.lineDashOffset*this.pixelRatio]}updateFillStyle(e,t){const i=e.fillStyle;(i!==void 0&&typeof i!="string"||e.currentFillStyle!=i)&&(this.instructions.push(t.call(this,e)),e.currentFillStyle=i)}updateStrokeStyle(e,t){const i=e.strokeStyle,r=e.lineCap,s=e.lineDash,o=e.lineDashOffset,a=e.lineJoin,l=e.lineWidth,h=e.miter
7Limit,d=e.strokeOffset;(e.currentStrokeStyle!=i||e.currentLineCap!=r||s!=e.currentLineDash&&!di(e.currentLineDash,s)||e.currentLineDashOffset!=o||e.currentLineJoin!=a||e.currentLineWidth!=l||e.currentMiterLimit!=h||e.currentStrokeOffset!=d)&&(t.call(this,e),e.currentStrokeStyle=i,e.currentLineCap=r,e.currentLineDash=s,e.currentLineDashOffset=o,e.currentLineJoin=a,e.currentLineWidth=l,e.currentMiterLimit=h,e.currentStrokeOffset=d)}endGeometry(e){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const t=[W.END_GEOMETRY,e];this.instructions.push(t),this.hitDetectionInstructions.push(t)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Yu(this.maxExtent),this.maxLineWidth>0)){const e=this.resolution*(this.maxLineWidth+1)/2;Qr(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class Av extends ss{constructor(e,t,i,r){super(e,t,i,r),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(e,t,i){if(!this.image_||this.maxExtent&&!Vn(this.maxExtent,e.getFlatCoordinates()))return;this.beginGeometry(e,t,i);const r=e.getFlatCoordinates(),s=e.getStride(),o=this.coordinates.length,a=this.appendFlatPointCoordinates(r,s);this.instructions.push([W.DRAW_IMAGE,o,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([W.DRAW_IMAGE,o,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(t)}drawMultiPoint(e,t,i){if(!this.image_)return;this.beginGeometry(e,t,i);const r=e.getFlatCoordinates(),s=[];for(let l=0,h=r.length;l<h;l+=e.getStride())(!this.maxExtent||Vn(this.maxExtent,r.slice(l,l+2)))&&s.push(r[l],r[l+1]);const o=this.coordinates.length,a=this.appendFlatPointCoordinates(s,2);this.instructions.push([W.DRAW_IMAGE,o,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([W.DRAW_IMAGE,o,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(t)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(e,t){const i=e.getAnchor(),r=e.getSize(),s=e.getOrigin();this.imagePixelRatio_=e.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=e.getHitDetectionImage(),this.image_=e.getImage(this.pixelRatio),this.height_=r[1],this.opacity_=e.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=e.getRotateWithView(),this.rotation_=e.getRotation(),this.scale_=e.getScaleArray(),this.width_=r[0],this.declutterMode_=e.getDeclutterMode(),this.declutterImageWithText_=t}}class Dv extends ss{constructor(e,t,i,r){super(e,t,i,r)}drawFlatCoordinates_(e,t,i,r,s){const o=this.coordinates.length,a=this.appendFlatLineCoordinates(e,t,i,r,!1,!1);return this.instructions.push([W.MOVE_TO_LINE_TO,o,a,s*this.pixelRatio]),this.hitDetectionInstructions.push([W.MOVE_TO_LINE_TO,o,a,s]),i}drawLineString(e,t,i){const r=this.state,s=r.strokeStyle,o=r.lineWidth,a=r.strokeOffset;if(s===void 0||o===void 0)return;this.updateStrokeStyle(r,this.applyStroke),this.beginGeometry(e,t,i),this.hitDetectionInstructions.push([W.SET_STROKE_STYLE,jt,r.lineWidth,r.lineCap,r.lineJoin,r.miter
7Limit,ti,ii],Hi);const l=e.getFlatCoordinates(),h=e.getStride();this.drawFlatCoordinates_(l,0,l.length,h,a),this.hitDetectionInstructions.push(Ii),this.endGeometry(t)}drawMultiLineString(e,t,i){const r=this.state,s=r.strokeStyle,o=r.lineWidth,a=r.strokeOffset;if(s===void 0||o===void 0)return;this.updateStrokeStyle(r,this.applyStroke),this.beginGeometry(e,t,i),this.hitDetectionInstructions.push([W.SET_STROKE_STYLE,jt,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,ti,ii],Hi);const l=e.getEnds(),h=e.getFlatCoordinates(),d=e.getStride();let u=0;for(let g=0,f=l.length;g<f;++g)u=this.drawFlatCoordinates_(h,u,l[g],d,a);this.hitDetectionInstructions.push(Ii),this.endGeometry(t)}finish(){const e=this.state;return e.lastStroke!=null&&e.lastStroke!=this.coordinates.length&&this.instructions.push(Ii),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(e){e.lastStroke!=null&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(Ii),e.lastStroke=this.coordinates.length),e.lastStroke=0,super.applyStroke(e),this.instructions.push(Hi)}}function Lo(n,e,t,i,r,s,o){const a=(t-e)/i;if(a<3){for(;e<t;e+=i)s[o++]=n[e],s[o++]=n[e+1];return o}const l=new Array(a);l[0]=1,l[a-1]=1;const h=[e,t-i];let d=0;for(;h.length>0;){const u=h.pop(),g=h.pop();let f=0;const m=n[g],_=n[g+1],p=n[u],v=n[u+1];for(let w=g+i;w<u;w+=i){const x=n[w],y=n[w+1],b=v_(x,y,m,_,p,v);b>f&&(d=w,f=b)}f>r&&(l[(d-e)/i]=1,g+i<d&&h.push(g,d),d+i<u&&h.push(d,u))}for(let u=0;u<a;++u)l[u]&&(s[o++]=n[e+u*i],s[o++]=n[e+u*i+1]);return o}function _g(n,e,t,i,r,s,o,a){for(let l=0,h=t.length;l<h;++l){const d=t[l];o=Lo(n,e,d,i,r,s,o),a.push(o),e=d}return o}function Vi(n,e){return e*Math.round(n/e)}function Ov(n,e,t,i,r,s,o){if(e==t)return o;let a=Vi(n[e],r),l=Vi(n[e+1],r);e+=i,s[o++]=a,s[o++]=l;let h,d;do if(h=Vi(n[e],r),d=Vi(n[e+1],r),e+=i,e==t)return s[o++]=h,s[o++]=d,o;while(h==a&&d==l);for(;e<t;){const u=Vi(n[e],r),g=Vi(n[e+1],r);if(e+=i,u==h&&g==d)continue;const f=h-a,m=d-l,_=u-a,p=g-l;if(f*p==m*_&&(f<0&&_<f||f==_||f>0&&_>f)&&(m<0&&p<m||m==p||m>0&&p>m)){h=u,d=g;continue}s[o++]=h,s[o++]=d,a=h,l=d,h=u,d=g}return s[o++]=h,s[o++]=d,o}function hc(n,e,t,i,r,s,o,a){for(let l=0,h=t.length;l<h;++l){const d=t[l];o=Ov(n,e,d,i,r,s,o),a.push(o),e=d}return o}function Fv(n,e,t,i,r,s,o,a){for(let l=0,h=t.length;l<h;++l){const d=t[l],u=[];o=hc(n,e,d,i,r,s,o,u),a.push(u),e=d[d.length-1]}return o}class Kh extends ss{constructor(e,t,i,r){super(e,t,i,r)}drawFlatCoordinatess_(e,t,i,r,s){const o=this.state,a=o.fillStyle!==void 0,l=o.strokeStyle!==void 0,h=i.length;this.instructions.push(Hi),this.hitDetectionInstructions.push(Hi);for(let d=0;d<h;++d){const u=i[d],g=this.coordinates.length,f=this.appendFlatLineCoordinates(e,t,u,r,!0,!l);this.instructions.push([W.MOVE_TO_LINE_TO,g,f,s*this.pixelRatio,!0]),this.hitDetectionInstructions.push([W.MOVE_TO_LINE_TO,g,f,s,!0]),l&&(this.instructions.push(Yh),this.hitDetectionInstructions.push(Yh)),t=u}return a&&(this.instructions.push(ks),this.hitDetectionInstructions.push(ks)),l&&(this.instructions.push(Ii),this.hitDetectionInstructions.push(Ii)),t}drawCircle(e,t,i){const r=this.state,s=r.fillStyle,o=r.strokeStyle,a=r.strokeOffset;if(s===void 0&&o===void 0||this.handleStrokeOffset_(()=>this.drawCircle(e,t,i)))return;this.setFillStrokeStyles_(),this.beginGeometry(e,t,i),r.fillStyle!==void 0&&this.hitDetectionInstructions.push([W.SET_FILL_STYLE,Ue]),r.strokeStyle!==void 0&&this.hitDetectionInstructions.push([W.SET_STROKE_STYLE,jt,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,ti,ii]);const l=e.getFlatCoordinates(),h=e.getStride(),d=this.coordinates.length;this.appendFlatLineCoordinates(l,0,l.length,h,!1,!1);const u=[W.CIRCLE,d,a];this.instructions.push(Hi,u),this.hitDetectionInstructions.push(Hi,u),r.fillStyle!==void 0&&(this.instructions.push(ks),this.hitDetectionInstructions.push(ks)),r.strokeStyle!==void 0&&(this.instructions.push(Ii),this.hitDetectionInstructions.push(Ii)),this.endGeometry(t)}drawPolygon(e,t,i){const r=this.state,s=r.fillStyle,o=r.strokeStyle,a=r.strokeOffset;if(s===void 0&&o===void 0||this.handleStrokeOffset_(()=>this.drawPolygon(e,t,i)))return;this.setFillStrokeStyles_(),this.beginGeometry(e,t,i),r.fillStyle!==void 0&&this.hitDetectionInstructions.push([W.SET_FILL_STYLE,Ue]),r.strokeStyle!==void 0&&this.hitDetectionInstructions.push([W.SET_STROKE_STYLE,jt,r.lineWidth,r.lineCap,r.lineJoin,r.miter
7Limit,ti,ii]);const l=e.getEnds(),h=e.getOrientedFlatCoordinates(),d=e.getStride();this.drawFlatCoordinatess_(h,0,l,d,a),this.endGeometry(t)}drawMultiPolygon(e,t,i){const r=this.state,s=r.fillStyle,o=r.strokeStyle,a=r.strokeOffset;if(s===void 0&&o===void 0||this.handleStrokeOffset_(()=>this.drawMultiPolygon(e,t,i)))return;this.setFillStrokeStyles_(),this.beginGeometry(e,t,i),r.fillStyle!==void 0&&this.hitDetectionInstructions.push([W.SET_FILL_STYLE,Ue]),r.strokeStyle!==void 0&&this.hitDetectionInstructions.push([W.SET_STROKE_STYLE,jt,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,ti,ii]);const l=e.getEndss(),h=e.getOrientedFlatCoordinates(),d=e.getStride();let u=0;for(let g=0,f=l.length;g<f;++g)u=this.drawFlatCoordinatess_(h,u,l[g],d,a);this.endGeometry(t)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const e=this.tolerance;if(e!==0){const t=this.coordinates;for(let i=0,r=t.length;i<r;++i)t[i]=Vi(t[i],e)}return super.finish()}setFillStrokeStyles_(){const e=this.state;this.updateFillStyle(e,this.createFill),this.updateStrokeStyle(e,this.applyStroke)}handleStrokeOffset_(e){const t=this.state,i=t.fillStyle,r=t.strokeStyle,s=t.strokeOffset;return Math.abs(s)>0&&i!==void 0&&r!==void 0?(t.strokeStyle=void 0,t.strokeOffset=0,e(),t.fillStyle=void 0,t.strokeStyle=r,t.strokeOffset=s,e(),t.fillStyle=i,!0):!1}}function jv(n,e,t,i,r){const s=[];let o=t,a=0,l=e.slice(t,2);for(;a<n&&o+r<i;){const[h,d]=l.slice(-2),u=e[o+r],g=e[o+r+1],f=Math.sqrt((u-h)*(u-h)+(g-d)*(g-d));if(a+=f,a>=n){const m=(n-a+f)/f,_=nt(h,u,m),p=nt(d,g,m);l.push(_,p),s.push(l),l=[_,p],a==n&&(o+=r),a=0}else if(a<n)l.push(e[o+r],e[o+r+1]),o+=r;else{const m=f-a,_=nt(h,u,m/f),p=nt(d,g,m/f);l.push(_,p),s.push(l),l=[_,p],a=0,o+=r}}return a>0&&s.push(l),s}function Nv(n,e,t,i,r){let s=t,o=t,a=0,l=0,h=t,d,u,g,f,m,_,p,v,w,x;for(u=t;u<i;u+=r){const y=e[u],b=e[u+1];m!==void 0&&(w=y-m,x=b-_,f=Math.sqrt(w*w+x*x),p!==void 0&&(l+=g,d=Math.acos((p*w+v*x)/(g*f)),d>n&&(l>a&&(a=l,s=h,o=u),l=0,h=u-r)),g=f,p=w,v=x),m=y,_=b}return l+=f,l>a?[h,u]:[s,o]}const to={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class zv extends ss{constructor(e,t,i,r){super(e,t,i,r),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textKeepUpright_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[Ue]={fillStyle:Ue},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const e=super.finish();return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e}drawText(e,t,i){const r=this.textFillState_,s=this.textStrokeState_,o=this.textState_;if(this.text_===""||!o||!r&&!s)return;const a=this.coordinates;let l=a.length;const h=e.getType();let d=null,u=e.getStride();if(o.placement==="line"&&(h=="LineString"||h=="MultiLineString"||h=="Polygon"||h=="MultiPolygon")){if(!je(this.maxExtent,e.getExtent()))return;let g;if(d=e.getFlatCoordinates(),h=="LineString")g=[d.length];else if(h=="MultiLineString")g=e.getEnds();else if(h=="Polygon")g=e.getEnds().slice(0,1);else if(h=="MultiPolygon"){const p=e.getEndss();g=[];for(let v=0,w=p.length;v<w;++v)g.push(p[v][0])}this.beginGeometry(e,t,i);const f=o.repeat,m=f?void 0:o.textAlign;let _=0;for(let p=0,v=g.length;p<v;++p){let w;f?w=jv(f*this.resolution,d,_,g[p],u):w=[d.slice(_,g[p])];for(let x=0,y=w.length;x<y;++x){const b=w[x];let k=0,R=b.length;if(m==null){const E=Nv(o.maxAngle,b,0,b.length,2);k=E[0],R=E[1]}for(let E=k;E<R;E+=u)a.push(b[E],b[E+1]);const T=a.length;_=g[p],this.drawChars_(l,T),l=T}}this.endGeometry(t)}else{let g=o.overflow?null:[];switch(h){case"Point":case"MultiPoint":d=e.getFlatCoordinates();break;case"LineString":d=e.getFlatMidpoint();break;case"Circle":d=e.getCenter();break;case"MultiLineString":d=e.getFlatMidpoints(),u=2;break;case"Polygon":d=e.getFlatInteriorPoint(),o.overflow||g.push(d[2]/this.resolution),u=3;break;case"MultiPolygon":const y=e.getFlatInteriorPoints();d=[];for(let b=0,k=y.length;b<k;b+=3)o.overflow||g.push(y[b+2]/this.resolution),d.push(y[b],y[b+1]);if(d.length===0)return;u=2;break}const f=this.appendFlatPointCoordinates(d,u);if(f===l)return;if(g&&(f-l)/2!==d.length/u){let y=l/2;g=g.filter((b,k)=>{const R=a[(y+k)*2]===d[k*u]&&a[(y+k)*2+1]===d[k*u+1];return R||--y,R})}this.saveTextStates_();const m=o.backgroundFill?this.createFill(this.fillStyleToState(o.backgroundFill)):null,_=o.backgroundStroke?this.createStroke(this.strokeStyleToState(o.backgroundStroke)):null;this.beginGeometry(e,t,i);let p=o.padding;if(p!=Zi&&(o.scale[0]<0||o.scale[1]<0)){let y=o.padding[0],b=o.padding[1],k=o.padding[2],R=o.padding[3];o.scale[0]<0&&(b=-b,R=-R),o.scale[1]<0&&(y=-y,k=-k),p=[y,b,k,R]}const v=this.pixelRatio;this.instructions.push([W.DRAW_IMAGE,l,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,p==Zi?Zi:p.map(function(y){return y*v}),m,_,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,g]);const w=1/v,x=m?m.slice(0):null;x&&(x[1]=Ue),this.hitDetectionInstructions.push([W.DRAW_IMAGE,l,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[w,w],NaN,this.declutterMode_,this.declutterImageWithText_,p,x,_,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?Ue:this.fillKey_,this.textOffsetX_,this.textOffsetY_,g]),this.endGeometry(t)}}saveTextStates_(){const e=this.textStrokeState_,t=this.textState_,i=this.textFillState_,r=this.strokeKey_;e&&(r in this.strokeStates||(this.strokeStates[r]={strokeStyle:e.strokeStyle,lineCap:e.lineCap,lineDashOffset:e.lineDashOffset,lineWidth:e.lineWidth,lineJoin:e.lineJoin,miterLimit:e.miterLimit,lineDash:e.lineDash}));const s=this.textKey_;s in this.textStates||(this.textStates[s]={font:t.font,textAlign:t.textAlign||zr,justify:t.justify,textBaseline:t.textBaseline||eo,scale:t.scale});const o=this.fillKey_;i&&(o in this.fillStates||(this.fillStates[o]={fillStyle:i.fillStyle}))}drawChars_(e,t){const i=this.textStrokeState_,r=this.textState_,s=this.strokeKey_,o=this.textKey_,a=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,h=to[r.textBaseline],d=this.textOffsetY_*l,u=this.text_,g=i?i.lineWidth*Math.abs(r.scale[0])/2:0;this.instructions.push([W.DRAW_CHARS,e,t,h,r.overflow,a,r.maxAngle,l,d,s,g*l,u,o,1,this.declutterMode_,this.textKeepUpright_]),this.hitDetectionInstructions.push([W.DRAW_CHARS,e,t,h,r.overflow,a&&Ue,r.maxAngle,l,d,s,g*l,u,o,1/l,this.declutterMode_,this.textKeepUpright_])}setTextStyle(e,t){let i,r,s;if(!e)this.text_="";
7else{const o=e.getFill();o?(r=this.textFillState_,r||(r={},this.textFillState_=r),r.fillStyle=At(o.getColor()||Ue)):(r=null,this.textFillState_=r);const a=e.getStroke();if(!a)s=null,this.textStrokeState_=s;else{s=this.textStrokeState_,s||(s={},this.textStrokeState_=s);const _=a.getLineDash(),p=a.getLineDashOffset(),v=a.getWidth(),w=a.getMiterLimit();s.lineCap=a.getLineCap()||Yn,s.lineDash=_?_.slice():ti,s.lineDashOffset=p===void 0?ii:p,s.lineJoin=a.getLineJoin()||Kn,s.lineWidth=v===void 0?Wr:v,s.miterLimit=w===void 0?Nr:w,s.strokeStyle=At(a.getColor()||jt)}i=this.textState_;const l=e.getFont()||fg;Rv(l);const h=e.getScaleArray();i.overflow=e.getOverflow(),i.font=l,i.maxAngle=e.getMaxAngle(),i.placement=e.getPlacement(),i.textAlign=e.getTextAlign(),i.repeat=e.getRepeat(),i.justify=e.getJustify(),i.textBaseline=e.getTextBaseline()||eo,i.backgroundFill=e.getBackgroundFill(),i.backgroundStroke=e.getBackgroundStroke(),i.padding=e.getPadding()||Zi,i.scale=h===void 0?[1,1]:h;const d=e.getOffsetX(),u=e.getOffsetY(),g=e.getRotateWithView(),f=e.getKeepUpright(),m=e.getRotation();this.text_=e.getText()||"",this.textOffsetX_=d===void 0?0:d,this.textOffsetY_=u===void 0?0:u,this.textRotateWithView_=g===void 0?!1:g,this.textKeepUpright_=f===void 0?!0:f,this.textRotation_=m===void 0?0:m,this.strokeKey_=s?(typeof s.strokeStyle=="string"?s.strokeStyle:H(s.strokeStyle))+s.lineCap+s.lineDashOffset+"|"+s.lineWidth+s.lineJoin+s.miterLimit+"["+s.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=r&&r.fillStyle?typeof r.fillStyle=="string"?r.fillStyle:"|"+H(r.fillStyle):""}this.declutterMode_=e.getDeclutterMode(),this.declutterImageWithText_=t}}const Wv={Circle:Kh,Default:ss,Image:Av,LineString:Dv,Polygon:Kh,Text:zv};class Gv{constructor(e,t,i,r){this.tolerance_=e,this.maxExtent_=t,this.pixelRatio_=r,this.resolution_=i,this.buildersByZIndex_={}}finish(){const e={};for(const t in this.buildersByZIndex_){e[t]=e[t]||{};const i=this.buildersByZIndex_[t];for(const r in i){const s=i[r].finish();e[t][r]=s}}return e}getBuilder(e,t){const i=e!==void 0?e.toString():"0";let r=this.buildersByZIndex_[i];r===void 0&&(r={},this.buildersByZIndex_[i]=r);let s=r[t];if(s===void 0){const o=Wv[t];s=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),r[t]=s}return s}}function Ai(n,e,t,i,r,s,o){s=s||[],o=o||2;let a=0;for(let l=e;l<t;l+=i){const h=n[l],d=n[l+1];s[a++]=r[0]*h+r[2]*d+r[4],s[a++]=r[1]*h+r[3]*d+r[5];for(let u=2;u<o;u++)s[a++]=n[l+u]}return s&&s.length!=a&&(s.length=a),s}function dc(n,e,t,i,r,s,o){o=o||[];const a=Math.cos(r),l=Math.sin(r),h=s[0],d=s[1];let u=0;for(let g=e;g<t;g+=i){const f=n[g]-h,m=n[g+1]-d;o[u++]=h+f*a-m*l,o[u++]=d+f*l+m*a;for(let _=g+2;_<g+i;++_)o[u++]=n[_]}return o&&o.length!=u&&(o.length=u),o}function Bv(n,e,t,i,r,s,o,a){a=a||[];const l=o[0],h=o[1];let d=0;for(let u=e;u<t;u+=i){const g=n[u]-l,f=n[u+1]-h;a[d++]=l+r*g,a[d++]=h+s*f;for(let m=u+2;m<u+i;++m)a[d++]=n[m]}return a&&a.length!=d&&(a.length=d),a}function $v(n,e,t,i,r,s,o){o=o||[];let a=0;for(let l=e;l<t;l+=i){o[a++]=n[l]+r,o[a++]=n[l+1]+s;for(let h=l+2;h<l+i;++h)o[a++]=n[h]}return o&&o.length!=a&&(o.length=a),o}function oe(n,e){if(!n)throw new Error(e)}new Array(6);function Et(){return[1,0,0,1,0,0]}function Vv(n,e){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n}function Ie(n,e){const t=e[0],i=e[1];return e[0]=n[0]*t+n[2]*i+n[4],e[1]=n[1]*t+n[3]*i+n[5],e}function ci(n,e,t,i,r,s,o,a){const l=Math.sin(s),h=Math.cos(s);return n[0]=i*h,n[1]=r*l,n[2]=-i*l,n[3]=r*h,n[4]=o*i*h-a*i*l+e,n[5]=o*r*l+a*r*h+t,n}function vg(n,e){const t=Xv(e);oe(t!==0,"Transformation matrix cannot be inverted");const i=e[0],r=e[1],s=e[2],o=e[3],a=e[4],l=e[5];return n[0]=o/t,n[1]=-r/t,n[2]=-s/t,n[3]=i/t,n[4]=(s*l-o*a)/t,n[5]=-(i*l-r*a)/t,n}function Xv(n){return n[0]*n[3]-n[1]*n[2]}const Uv=[1e5,1e5,1e5,1e5,2,2];function Yv(n){return"matrix("+n.join(", ")+")"}function ul(n){return n.substring(7,n.length-1).split(",").map(parseFloat)}function Kv(n,e){const t=ul(n),i=ul(e);for(let r=0;r<6;++r)if(Math.round((t[r]-i[r])*Uv[r])!==0)return!1;return!0}function uc(n,e,t,i){let r=n[e],s=n[e+1],o=0;for(let a=e+i;a<t;a+=i){const l=n[a],h=n[a+1];o+=Math.sqrt((l-r)*(l-r)+(h-s)*(h-s)),r=l,s=h}return o}function wg(n,e,t,i,r,s,o,a){o=o??[],a=a??i;const l=n[e+i],h=n[e+i+1],d=n[t-2*i],u=n[t-2*i+1];let g,f,m,_,p,v,w,x,y=0;for(let b=e;b<t;b+=i){m=g,_=f,p=void 0,v=void 0,b+i<t&&(p=n[b+i],v=n[b+i+1]),s&&b===e&&(m=d,_=u),s&&b===t-i&&(p=l,v=h),g=n[b],f=n[b+1],[w,x]=Zv(g,f,m,_,p,v,r),o[y++]=w,o[y++]=x;for(let k=2;k<a;k++)o[y++]=n[b+k]}return o.length!=y&&(o.length=y),o}function Zv(n,e,t,i,r,s,o){let a,l;t!==void 0&&i!==void 0?(a=n-t,l=e-i):r!==void 0&&s!==void 0?(a=r-n,l=s-e):(a=1,l=0);const h=Math.hypot(a,l),d=a/h,u=l/h;if(a=-u,l=d,t===void 0||i===void 0)return[n+a*o,e+l*o];if(r===void 0||s===void 0)return[n+a*o,e+l*o];const g=k_([n,e],[t,i],[r,s]);if(Math.cos(g)>.998)return[n+d*o,e+u*o];const f=Math.cos(g/2),m=Math.sin(g/2),_=m*a+f*l,p=-f*a+m*l,v=_*(1/m),w=p*(1/m);
7return[n+v*o,e+w*o]}function yg(n,e){for(let t=0,i=n.length-2;t<i;t+=e)for(let r=n.length-2*e;r>t+e;r-=e){const s=n[t],o=n[t+1],a=n[t+e],l=n[t+e+1],h=n[r],d=n[r+1],u=n[r+e],g=n[r+e+1],f=(g-d)*(a-s)-(u-h)*(l-o);if(f===0)continue;const m=((u-h)*(o-d)-(g-d)*(s-h))/f,_=((a-s)*(o-d)-(l-o)*(s-h))/f;if(m>0&&m<1&&_>0&&_<1){const p=s+m*(a-s),v=o+m*(l-o);n[t+e]=p,n[t+e+1]=v,n.splice(t+2*e,r-t-e);break}}return n}function Hv(n,e,t,i,r,s,o,a,l,h,d,u,g=!0){let f=n[e],m=n[e+1],_=0,p=0,v=0,w=0;function x(){_=f,p=m,e+=i,f=n[e],m=n[e+1],w+=v,v=Math.sqrt((f-_)*(f-_)+(m-p)*(m-p))}do x();while(e<t-i&&w+v<s);let y=v===0?0:(s-w)/v;const b=nt(_,f,y),k=nt(p,m,y),R=e-i,T=w,E=s+a*l(h,r,d);for(;e<t-i&&w+v<E;)x();y=v===0?0:(E-w)/v;const C=nt(_,f,y),M=nt(p,m,y);let I=!1;if(g)if(u){const O=[b,k,C,M];dc(O,0,4,2,u,O,O),I=O[0]>O[2]}else I=b>C;const L=Math.PI,A=[],D=R+i===e;e=R,v=0,w=T,f=n[e],m=n[e+1];let z;if(D){x(),z=Math.atan2(m-p,f-_),I&&(z+=z>0?-L:L);const O=(C+b)/2,N=(M+k)/2;return A[0]=[O,N,(E-s)/2,z,r],A}r=r.replace(/\n/g," ");for(let O=0,N=r.length;O<N;){x();let G=Math.atan2(m-p,f-_);if(I&&(G+=G>0?-L:L),z!==void 0){let _e=G-z;if(_e+=_e>L?-2*L:_e<-L?2*L:0,Math.abs(_e)>o)return null}z=G;const te=O;let Z=0;for(;O<N;++O){const _e=I?N-O-1:O,be=a*l(h,r[_e],d);if(e+i<t&&w+v<s+Z+be/2)break;Z+=be}if(O===te)continue;const ce=I?r.substring(N-te,N-O):r.substring(te,O);y=v===0?0:(s+Z/2-w)/v;const $=nt(_,f,y),P=nt(p,m,y);A.push([$,P,Z/2,G,ce]),s+=Z}return A}class xg{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(Zs(),{get:(e,t)=>{if(typeof Zs()[t]=="function")return this.push_(t),this.pushMethodArgs_},set:(e,t,i)=>(this.push_(t,i),!0)})}push_(...e){const t=this.instructions_,i=this.zIndex+this.offset_;t[i]||(t[i]=[]),t[i].push(...e)}pushMethodArgs_=(...e)=>(this.push_(e),this);pushFunction(e){this.push_(e)}getContext(){return this.context_}draw(e){this.instructions_.forEach(t=>{for(let i=0,r=t.length;i<r;++i){const s=t[i];if(typeof s=="function"){s(e);continue}const o=t[++i];if(typeof e[s]=="function")e[s](...o);else{if(typeof o=="function"){e[s]=o(e);continue}e[s]=o}}})}clear(){this.instructions_.length=0,this.zIndex=0,this.offset_=0}offset(){this.offset_=this.instructions_.length,this.zIndex=0}}const wn=rt(),fi=[],Xt=[],Ut=[],mi=[];function Zh(n){return n[3].declutterBox}const Hh=new RegExp("[Ö-ࣿï¬-ï·¿ï¹°-ﻼà -à¿¿î -î¿¿]");function pa(n,e){return e==="start"?e=Hh.test(n)?"right":"left":e==="end"&&(e=Hh.test(n)?"left":"right"),to[e]}function qv(n,e,t){return t>0&&n.push(` 8`,""),n.push(e,""),n}function Jv(n,e,t){return t%2===0&&(n+=e),n}class Qv{constructor(e,t,i,r,s){this.overlaps=i,this.pixelRatio=t,this.resolution=e,this.alignAndScaleFill_,this.instructions=r.instructions,this.coordinates=r.coordinates,this.coordinateCache_={},this.renderedTransform_=Et(),this.hitDetectionInstructions=r.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=r.fillStates||{},this.strokeStates=r.strokeStates||{},this.textStates=r.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=s?new xg:null}getZIndexContext(){return this.zIndexContext_}createLabel(e,t,i,r){const s=e+t+i+r;if(this.labels_[s])return this.labels_[s];const o=r?this.strokeStates[r]:null,a=i?this.fillStates[i]:null,l=this.textStates[t],h=this.pixelRatio,d=[l.scale[0]*h,l.scale[1]*h],u=l.justify?to[l.justify]:pa(Array.isArray(e)?e[0]:e,l.textAlign||zr),g=r&&o.lineWidth?o.lineWidth:0,f=Array.isArray(e)?e:String(e).split(` 9`).reduce(qv,[]),{width:m,height:_,widths:p,heights:v,lineWidths:w}=Mv(l,f),x=m+g,y=[],b=(x+2)*d[0],k=(_+g)*d[1],R={width:b<0?Math.floor(b):Math.ceil(b),height:k<0?Math.floor(k):Math.ceil(k),contextInstructions:y};(d[0]!=1||d[1]!=1)&&y.push("scale",d),r&&(y.push("strokeStyle",o.strokeStyle),y.push("lineWidth",g),y.push("lineCap",o.lineCap),y.push("lineJoin",o.lineJoin),y.push("miterLimit",o.miterLimit),y.push("setLineDash",[o.lineDash]),y.push("lineDashOffset",o.lineDashOffset)),i&&y.push("fillStyle",a.fillStyle),y.push("textBaseline","middle"),y.push("textAlign","center");const T=.5-u;let E=u*x+T*g;const C=[],M=[];let I=0,L=0,A=0,D=0,z;for(let O=0,N=f.length;O<N;O+=2){const G=f[O];if(G===` 10`){L+=I,I=0,E=u*x+T*g,++D;continue}const te=f[O+1]||l.font;te!==z&&(r&&C.push("font",te),i&&M.push("font",te),z=te),I=Math.max(I,v[A]);const Z=[G,E+T*p[A]+u*(p[A]-w[D]),.5*(g+I)+L];E+=p[A],r&&C.push("strokeText",Z),i&&M.push("fillText",Z),++A}return Array.prototype.push.apply(y,C),Array.prototype.push.apply(y,M),this.labels_[s]=R,R}
10replayTextBackground_(e,t,i,r,s,o,a){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,i),e.lineTo.apply(e,r),e.lineTo.apply(e,s),e.lineTo.apply(e,t),o&&(this.alignAndScaleFill_=o[2],e.fillStyle=o[1],this.fill_(e)),a&&(this.setStrokeStyle_(e,a),e.stroke())}calculateImageOrLabelDimensions_(e,t,i,r,s,o,a,l,h,d,u,g,f,m,_,p){a*=g[0],l*=g[1];let v=i-a,w=r-l;const x=s+h>e?e-h:s,y=o+d>t?t-d:o,b=m[3]+x*g[0]+m[1],k=m[0]+y*g[1]+m[2],R=v-m[3],T=w-m[0];(_||u!==0)&&(fi[0]=R,mi[0]=R,fi[1]=T,Xt[1]=T,Xt[0]=R+b,Ut[0]=Xt[0],Ut[1]=T+k,mi[1]=Ut[1]);let E;return u!==0?(E=ci(Et(),i,r,1,1,u,-i,-r),Ie(E,fi),Ie(E,Xt),Ie(E,Ut),Ie(E,mi),ai(Math.min(fi[0],Xt[0],Ut[0],mi[0]),Math.min(fi[1],Xt[1],Ut[1],mi[1]),Math.max(fi[0],Xt[0],Ut[0],mi[0]),Math.max(fi[1],Xt[1],Ut[1],mi[1]),wn)):ai(Math.min(R,R+b),Math.min(T,T+k),Math.max(R,R+b),Math.max(T,T+k),wn),f&&(v=Math.round(v),w=Math.round(w)),{drawImageX:v,drawImageY:w,drawImageW:x,drawImageH:y,originX:h,originY:d,declutterBox:{minX:wn[0],minY:wn[1],maxX:wn[2],maxY:wn[3],value:p},canvasTransform:E,scale:g}}replayImageOrLabel_(e,t,i,r,s,o,a){const l=!!(o||a),h=r.declutterBox,d=a?a[2]*r.scale[0]/2:0;return h.minX-d<=t[0]&&h.maxX+d>=0&&h.minY-d<=t[1]&&h.maxY+d>=0&&(l&&this.replayTextBackground_(e,fi,Xt,Ut,mi,o,a),Pv(e,r.canvasTransform,s,i,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0}fill_(e){const t=this.alignAndScaleFill_;if(t){const i=Ie(this.renderedTransform_,[0,0]),r=512*this.pixelRatio;e.save(),e.translate(i[0]%r,i[1]%r),t!==1&&e.scale(t,t)}e.fill(),t&&e.restore()}setStrokeStyle_(e,t){e.strokeStyle=t[1],t[1]&&(e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],e.lineDashOffset=t[7],e.setLineDash(t[6]))}drawLabelWithPointPlacement_(e,t,i,r){const s=this.textStates[t],o=this.createLabel(e,t,r,i),a=this.strokeStates[i],l=this.pixelRatio,h=pa(Array.isArray(e)?e[0]:e,s.textAlign||zr),d=to[s.textBaseline||eo],u=a&&a.lineWidth?a.lineWidth:0,g=o.width/l-2*s.scale[0],f=h*g+2*(.5-h)*u,m=d*o.height/l+2*(.5-d)*u;return{label:o,anchorX:f,anchorY:m}}execute_(e,t,i,r,s,o,a,l){const h=this.zIndexContext_;let d;this.pixelCoordinates_&&di(i,this.renderedTransform_)?d=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),d=Ai(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),Vv(this.renderedTransform_,i));let u=0;const g=r.length;let f=0,m;const _=[];let p,v,w,x,y,b,k,R,T,E,C,M,I,L=0,A=0;const D=this.coordinateCache_,z=this.viewRotation_,O=Math.round(Math.atan2(-i[1],i[0])*1e12)/1e12,N={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:z},G=this.instructions!=r||this.overlaps?0:200;let te,Z,ce,$;for(;u<g;){const P=r[u];switch(P[0]){case W.BEGIN_GEOMETRY:te=P[1],$=P[3],te.getGeometry()?a!==void 0&&!je(a,$.getExtent())?u=P[2]+1:++u:u=P[2],h&&(h.zIndex=P[4]);break;case W.BEGIN_PATH:L>G&&(this.fill_(e),L=0),A>G&&(e.stroke(),A=0),!L&&!A&&(e.beginPath(),y=NaN,b=NaN),++u;break;case W.CIRCLE:f=P[1],w=P[2]??0;const be=d[f],Ee=d[f+1],Se=d[f+2]-w,tt=d[f+3]-w,it=Se-be,ls=tt-Ee,Qn=Math.sqrt(it*it+ls*ls);e.moveTo(be+Qn,Ee),e.arc(be,Ee,Qn,0,2*Math.PI,!0),++u;break;case W.CLOSE_PATH:e.closePath(),++u;break;case W.CUSTOM:f=P[1],m=P[2];const Vo=P[3],St=P[4],pt=P[5];N.geometry=Vo,N.feature=te,u in D||(D[u]=[]);const Tt=D[u];pt?pt(d,f,m,2,Tt):(Tt[0]=d[f],Tt[1]=d[f+1],Tt.length=2),h&&(h.zIndex=P[6]),St(Tt,N),++u;break;case W.DRAW_IMAGE:f=P[1],m=P[2],T=P[3],p=P[4],v=P[5];let gi=P[6];const cs=P[7],er=P[8],_n=P[9],hs=P[10];let De=P[11];const kf=P[12];let ds=P[13];x=P[14]||"declutter";const tr=P[15];if(!T&&P.length>=20){E=P[19],C=P[20],M=P[21],I=P[22];const we=this.drawLabelWithPointPlacement_(E,C,M,I);T=we.label,P[3]=T;const zi=P[23];p=(we.anchorX-zi)*this.pixelRatio,P[4]=p;const st=P[24];v=(we.anchorY-st)*this.pixelRatio,P[5]=v,gi=T.height,P[6]=gi,ds=T.width,P[13]=ds}let Xo;P.length>25&&(Xo=P[25]);let Uo,us,gs;P.length>17?(Uo=P[16],us=P[17],gs=P[18]):(Uo=Zi,us=null,gs=null),hs&&O?De+=z:!hs&&!O&&(De-=z);let Sf=0;for(;f<m;f+=2){if(Xo&&Xo[Sf++]<ds/this.pixelRatio)continue;const we=this.calculateImageOrLabelDimensions_(T.width,T.height,d[f],d[f+1],ds,gi,p,v,er,_n,De,kf,s,Uo,!!us||!!gs,te),zi=[e,t,T,we,cs,us,gs];if(l){let st,Rt,ot;if(tr){const ve=m-f;if(!tr[ve]){tr[ve]={args:zi,declutterMode:x};continue}const We=tr[ve];st=We.args,Rt=We.declutterMode,delete tr[ve],ot=Zh(st)}let Bt,$t;if(st&&(Rt!=="declutter"||!l.collides(ot))&&(Bt=!0),(x!=="declutter"||!l.collides(we.declutterBox))&&($t=!0),Rt==="declutter"&&x==="declutter"){const ve=Bt&&$t;Bt=ve,$t=ve}Bt&&(Rt!=="none"&&l.insert(ot),this.replayImageOrLabel_.apply(this,st)),$t&&(x!=="none"&&l.insert(we.declutterBox),this.replayImageOrLabel_.apply(this,zi))}else this.replayImageOrLabel_.apply(this,zi)}++u;break;case W.DRAW_CHARS:const Nc=P[1],zc=P[2],Yo=P[3],Tf=P[4];I=P[5];const Rf=P[6],Wc=P[7],Gc=P[8];M=P[9];const Ko=P[10];E=P[11],Array.isArray(E)&&(E=E.reduce(Jv,"")),C=P[12];const Bc=[P[13],P[13]];x=P[14]||"declutter";const If=P[15],Zo=this.textStates[C],ir=Zo.font,nr=[Zo.scale[0]*Wc,Zo.scale[1]*Wc];let rr;ir in this.widths_?rr=this.widths_[ir]:(rr={},this.widths_[ir]=rr);const $c=uc(d,Nc,zc,2),Vc=Math.abs(nr[0])*Uh(ir,E,rr);if(Tf||Vc<=$c){const we=this.textStates[C].textAlign,zi=($c-Vc)*pa(E,we),st=Hv(d,Nc,zc,2,E,zi,Rf,Math.abs(nr[0]),Uh,ir,rr,O?0:this.viewRotation_,If);e:if(st){const Rt=[];let ot,Bt,$t,ve,We;if(M)for(ot=0,Bt=st.length;ot<Bt;++ot){We=st[ot],$t=We[4],ve=this.createLabel($t,C,"",M),p=We[2]+(nr[0]<0?-Ko:Ko),v=Yo*ve.height+(.5-Yo)*2*Ko*nr[1]/nr[0]-Gc;const Vt=this.calculateImageOrLabelDimensions_(ve.width,ve.height,We[0],We[1],ve.width,ve.height,p,v,0,0,We[3],Bc,!1,Zi,!1,te);if(l&&x==="declutter"&&l.collides(Vt.declutterBox))break e;Rt.push([e,t,ve,Vt,1,null,null])}if(I)for(ot=0,Bt=st.length;ot<Bt;++ot){We=st[ot],$t=We[4],ve=this.createLabel($t,C,I,""),p=We[2],v=Yo*ve.height-Gc;const Vt=this.calculateImageOrLabelDimensions_(ve.width,ve.height,We[0],We[1],ve.width,ve.height,p,v,0,0,We[3],Bc,!1,Zi,!1,te);if(l&&x==="declutter"&&l.collides(Vt.declutterBox))break e;Rt.push([e,t,ve,Vt,1,null,null])}l&&x!=="none"&&l.load(Rt.map(Zh));for(let Vt=0,Mf=Rt.length;Vt<Mf;++Vt)this.replayImageOrLabel_.apply(this,Rt[Vt])}}++u;break;case W.END_GEOMETRY:if(o!==void 0){te=P[1];const we=o(te,$,x);if(we)return we}++u;break;case W.FILL:G?L++:this.fill_(e),++u;break;case W.MOVE_TO_LINE_TO:f=P[1],m=P[2],w=P[3];let Ni,sr,fs;if(w){const we=P[4]??!1;wg(d,f,m,2,w,we,_),yg(_,2),Ni=_,sr=0,fs=Ni.length}else Ni=d,sr=f,fs=m;Z=Ni[sr],ce=Ni[sr+1],e.moveTo(Z,ce),y=Z+.5|0,b=ce+.5|0;for(let we=sr+2;we<fs;we+=2)Z=Ni[we],ce=Ni[we+1],k=Z+.5|0,R=ce+.5|0,(we==fs-2||k!==y||R!==b)&&(e.lineTo(Z,ce),y=k,b=R);++u;break;case W.SET_FILL_STYLE:this.alignAndScaleFill_=P[2],L?(this.fill_(e),L=0,A&&(e.stroke(),A=0)):A&&P[1]&&(e.stroke(),A=0),e.fillStyle=P[1],++u;break;case W.SET_STROKE_STYLE:L&&P[1]&&(this.fill_(e),L=0),A&&(e.stroke(),A=0),this.setStrokeStyle_(e,P),++u;break;case W.STROKE:G?A++:e.stroke(),++u;break;default:++u;break}}L&&this.fill_(e),A&&e.stroke()}execute(e,t,i,r,s,o){this.viewRotation_=r,this.execute_(e,t,i,this.instructions,s,void 0,void 0,o)}executeHitDetection(e,t,i,r,s){return this.viewRotation_=i,this.execute_(e,[e.canvas.width,e.canvas.height],t,this.hitDetectionInstructions,!0,r,s)}}const Ui=["Polygon","Circle","LineString","Image","Text","Default"],bg=["Image","Text"],e1=Ui.filter(n=>!bg.includes(n));let Eg=!1,Cg=!1;function t1(){let n=0;const e=i=>{const r=xe(1,1,null,{willReadFrequently:i});let s=0;const o=performance.now();for(;performance.now()-o<50;++s)r.fillStyle=`rgba(255,0,${s%256},1)`,r.fillRect(0,0,1,1),r.getImageData(0,0,1,1);return n=s>n?s:n,s};Eg={[e(!0)]:!0,[e(!1)]:!1,[e(void 0)]:void 0}[n],Cg=!0}class i1{constructor(e,t,i,r,s,o,a){this.maxExtent_=e,this.overlaps_=r,this.pixelRatio_=i,this.resolution_=t,this.renderBuffer_=o,this.executorsByZIndex_
10={},this.hitDetectionContext_=null,this.hitDetectionTransform_=Et(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(s,a)}clip(e,t){const i=this.getClipCoords(t);e.beginPath(),e.moveTo(i[0],i[1]),e.lineTo(i[2],i[3]),e.lineTo(i[4],i[5]),e.lineTo(i[6],i[7]),e.clip()}createExecutors_(e,t){for(const i in e){let r=this.executorsByZIndex_[i];r===void 0&&(r={},this.executorsByZIndex_[i]=r);const s=e[i];for(const o in s){const a=s[o];r[o]=new Qv(this.resolution_,this.pixelRatio_,this.overlaps_,a,t)}}}hasExecutors(e){for(const t in this.executorsByZIndex_){const i=this.executorsByZIndex_[t];for(let r=0,s=e.length;r<s;++r)if(e[r]in i)return!0}return!1}forEachFeatureAtCoordinate(e,t,i,r,s,o){Cg===!1&&t1(),r=Math.round(r);const a=r*2+1,l=ci(this.hitDetectionTransform_,r+.5,r+.5,1/t,-1/t,-i,-e[0],-e[1]),h=!this.hitDetectionContext_;h&&(this.hitDetectionContext_=xe(a,a,null,{willReadFrequently:Eg}));const d=this.hitDetectionContext_;d.canvas.width!==a||d.canvas.height!==a?(d.canvas.width=a,d.canvas.height=a):h||d.clearRect(0,0,a,a);let u;this.renderBuffer_!==void 0&&(u=rt(),Ir(u,e),Qr(u,t*(this.renderBuffer_+r),u));const g=n1(r);let f;function m(b,k,R){const T=d.getImageData(0,0,a,a).data;for(let E=0,C=g.length;E<C;E++)if(T[g[E]]>0){if(!o||R==="none"||f!=="Image"&&f!=="Text"||o.includes(b)){const M=(g[E]-3)/4,I=r-M%a,L=r-(M/a|0),A=s(b,k,I*I+L*L);if(A)return A}d.clearRect(0,0,a,a);break}}const _=Object.keys(this.executorsByZIndex_).map(Number);_.sort(Jt);let p,v,w,x,y;for(p=_.length-1;p>=0;--p){const b=_[p].toString();for(w=this.executorsByZIndex_[b],v=Ui.length-1;v>=0;--v)if(f=Ui[v],x=w[f],x!==void 0&&(y=x.executeHitDetection(d,l,i,m,u),y))return y}}getClipCoords(e){const t=this.maxExtent_;if(!t)return null;const i=t[0],r=t[1],s=t[2],o=t[3],a=[i,r,i,o,s,o,s,r];return Ai(a,0,8,2,e,a),a}isEmpty(){return Xn(this.executorsByZIndex_)}execute(e,t,i,r,s,o,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(a?d_:Jt),o=o||Ui;const h=Ui.length;for(let d=0,u=l.length;d<u;++d){const g=l[d].toString(),f=this.executorsByZIndex_[g];for(let m=0,_=o.length;m<_;++m){const p=o[m],v=f[p];if(v!==void 0){const w=a===null?void 0:v.getZIndexContext(),x=w?w.getContext():e,y=this.maxExtent_&&p!=="Image"&&p!=="Text";if(y&&(x.save(),this.clip(x,i)),!w||p==="Text"||p==="Image"?v.execute(x,t,i,r,s,a):w.pushFunction(b=>v.execute(b,t,i,r,s,a)),y&&x.restore(),w){w.offset();const b=l[d]*h+Ui.indexOf(p);this.deferredZIndexContexts_[b]||(this.deferredZIndexContexts_[b]=[]),this.deferredZIndexContexts_[b].push(w)}}}}this.renderedContext_=e}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const e=this.deferredZIndexContexts_,t=Object.keys(e).map(Number).sort(Jt);for(let i=0,r=t.length;i<r;++i)e[t[i]].forEach(s=>{s.draw(this.renderedContext_),s.clear()}),e[t[i]].length=0}}const _a={};function n1(n){if(_a[n]!==void 0)return _a[n];const e=n*2+1,t=n*n,i=new Array(t+1);for(let s=0;s<=n;++s)for(let o=0;o<=n;++o){const a=s*s+o*o;if(a>t)break;let l=i[a];l||(l=[],i[a]=l),l.push(((n+s)*e+(n+o))*4+3),s>0&&l.push(((n-s)*e+(n+o))*4+3),o>0&&(l.push(((n+s)*e+(n-o))*4+3),s>0&&l.push(((n-s)*e+(n-o))*4+3))}const r=[];for(let s=0,o=i.length;s<o;++s)i[s]&&r.push(...i[s]);return _a[n]=r,r}function qh(n){return n[0]>0&&n[1]>0}function r1(n,e,t){return t===void 0&&(t=[0,0]),t[0]=n[0]*e+.5|0,t[1]=n[1]*e+.5|0,t}function Ze(n,e){return Array.isArray(n)?n:(e===void 0?e=[n,n]:(e[0]=n,e[1]=n),e)}class Ao{constructor(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=Ze(e.scale),this.displacement_=e.displacement,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new Ao({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return re()}getImage(e){return re()}getHitDetectionImage(){return re()}getPixelRatio(e){return 1}getImageState(){return re()}getImageSize(){return re()}getOrigin(){return re()}getSize(){return re()}setDisplacement(e){this.displacement_=e}setOpacity(e){this.opacity_=e}setRotateWithView(e){this.rotateWithView_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=Ze(e)}listenImageChange(e){re()}load(){re()}unlistenImageChange(e){re()}ready(){return Promise.resolve()}}function Jh(n,e,t,i){return t!==void 0&&i!==void 0?[t/n,i/e]:t!==void 0?t/n:i!==void 0?i/e:1}class Do extends Ao{constructor(e){e=e||{};const t=e.opacity!==void 0?e.opacity:1,i=e.rotation!==void 0?e.rotation:0,r=e.scale!==void 0?e.scale:1,s=e.rotateWithView!==void 0?e.rotateWithView:!1;super({opacity:t,rotation:i,scale:r,displacement:e.displacement!==void 0?e.displacement:[0,0],rotateWithView:s,declutterMode:e.declutterMode}),this.anchor_=e.anchor!==void 0?e.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=e.anchorOrigin!==void 0?e.anchorOrigin:"top-left",this.anchorXUnits_=e.anchorXUnits!==void 0?e.anchorXUnits:"fraction",this.anchorYUnits_=e.anchorYUnits!==void 0?e.anchorYUnits:"fraction",this.crossOrigin_=e.crossOrigin!==void 0?e.crossOrigin:null,this.referrerPolicy_=e.referrerPolicy;const o=e.img!==void 0?e.img:null;let a=e.src;oe(!(a!==void 0&&o),"`image` and `src` cannot be provided at the same time"),(a===void 0||a.length===0)&&o&&(a=o.src||H(o)),oe(a!==void 0&&a.length>0,"A defined and non-empty `src` or `image` must be provided"),oe(!((e.width!==void 0||e.height!==void 0)&&e.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let l;if(e.src!==void 0?l=q.IDLE:o!==void 0&&("complete"in o?o.complete?l=o.src?q.LOADED:q.IDLE:l=q.LOADING:l=q.LOADED),this.color_=e.color!==void 0?rn(e.color):null,this.iconImage_=Pr(o,a,{crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_},l,this.color_),this.offset_=e.offset!==void 0?e.offset:[0,0],this.offsetOrigin_=e.offsetOrigin!==void 0?e.offsetOrigin:"top-left",this.origin_=null,this.size_=e.size!==void 0?e.size:null,this.initialOptions_,e.width!==void 0||e.height!==void 0){let h,d;if(e.size)[h,d]=e.size;else{const u=this.getImage(1);if(u.width&&u.height)h=u.width,d=u.height;else if(u instanceof HTMLImageElement){this.initialOptions_=e;
10const g=()=>{if(this.unlistenImageChange(g),!this.initialOptions_)return;const f=this.iconImage_.getSize();this.setScale(Jh(f[0],f[1],e.width,e.height))};this.listenImageChange(g);return}}h!==void 0&&this.setScale(Jh(h,d,e.width,e.height))}}clone(){let e,t,i;return this.initialOptions_?(t=this.initialOptions_.width,i=this.initialOptions_.height):(e=this.getScale(),e=Array.isArray(e)?e.slice():e),new Do({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:e,width:t,height:i,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let e=this.normalizedAnchor_;if(!e){e=this.anchor_;const r=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!r)return null;e=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(e[0]*=r[0]),this.anchorYUnits_=="fraction"&&(e[1]*=r[1])}if(this.anchorOrigin_!="top-left"){if(!r)return null;e===this.anchor_&&(e=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(e[0]=-e[0]+r[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(e[1]=-e[1]+r[1])}this.normalizedAnchor_=e}const t=this.getDisplacement(),i=this.getScaleArray();return[e[0]-t[0]/i[0],e[1]+t[1]/i[1]]}setAnchor(e){this.anchor_=e,this.normalizedAnchor_=null}getColor(){return this.color_}setColor(e){const t=e?rn(e):null;if(this.color_===t||this.color_&&t&&this.color_.length===t.length&&this.color_.every((o,a)=>o===t[a]))return;this.color_=t;const i=this.getSrc(),r=i!==void 0?null:this.getHitDetectionImage(),s=i!==void 0?q.IDLE:this.iconImage_.getImageState();this.iconImage_=Pr(r,i,{crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_},s,this.color_)}getImage(e){return this.iconImage_.getImage(e)}getPixelRatio(e){return this.iconImage_.getPixelRatio(e)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let e=this.offset_;if(this.offsetOrigin_!="top-left"){const t=this.getSize(),i=this.iconImage_.getSize();if(!t||!i)return null;e=e.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(e[0]=i[0]-t[0]-e[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(e[1]=i[1]-t[1]-e[1])}return this.origin_=e,this.origin_}getSrc(){return this.iconImage_.getSrc()}setSrc(e){this.iconImage_=Pr(null,e,{crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_},q.IDLE,this.color_)}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const e=this.getScaleArray();if(this.size_)return this.size_[0]*e[0];if(this.iconImage_.getImageState()==q.LOADED)return this.iconImage_.getSize()[0]*e[0]}getHeight(){const e=this.getScaleArray();if(this.size_)return this.size_[1]*e[1];if(this.iconImage_.getImageState()==q.LOADED)return this.iconImage_.getSize()[1]*e[1]}setScale(e){delete this.initialOptions_,super.setScale(e)}listenImageChange(e){this.iconImage_.addEventListener(V.CHANGE,e)}load(){this.iconImage_.load()}unlistenImageChange(e){this.iconImage_.removeEventListener(V.CHANGE,e)}ready(){return this.iconImage_.ready()}}const Qh=Et(),s1=[NaN,NaN];class kg extends Gt{constructor(){super(),this.extent_=rt(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=dg((e,t,i)=>{if(!i)return this.getSimplifiedGeometry(t);const r=this.clone();return r.applyTransform(i),r.getSimplifiedGeometry(t)})}simplifyTransformed(e,t){return this.simplifyTransformedInternal(this.getRevision(),e,t)}clone(){return re()}closestPointXY(e,t,i,r){return re()}containsXY(e,t){return this.closestPointXY(e,t,s1,Number.MIN_VALUE)===0}getClosestPoint(e,t){return t=t||[NaN,NaN],this.closestPointXY(e[0],e[1],t,1/0),t}intersectsCoordinate(e){return this.containsXY(e[0],e[1])}computeExtent(e){return re()}getExtent(e){if(this.extentRevision_!=this.getRevision()){const t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&es(t),this.extentRevision_=this.getRevision()}return p_(this.extent_,e)}rotate(e,t){re()}scale(e,t,i){re()}
10simplify(e){return this.getSimplifiedGeometry(e*e)}getSimplifiedGeometry(e){return re()}getType(){return re()}applyTransform(e){re()}intersectsExtent(e){return re()}translate(e,t){re()}transform(e,t){const i=Je(e),r=i.getUnits()=="tile-pixels"?function(s,o,a){const l=i.getExtent(),h=i.getWorldExtent(),d=Be(h)/Be(l);ci(Qh,h[0],h[3],d,-d,0,0,0);const u=Ai(s,0,s.length,a,Qh,o),g=Js(i,t);return g?g(u,u,a):u}:Js(i,t);return this.applyTransform(r),this}}class Fi extends kg{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(e){return Zl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinates(){return re()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const t=this.getSimplifiedGeometryInternal(e);return t.getFlatCoordinates().length<this.flatCoordinates.length?t:(this.simplifiedGeometryMaxMinSquaredTolerance=e,this)}getSimplifiedGeometryInternal(e){return this}getStride(){return this.stride}setFlatCoordinates(e,t){this.stride=io(e),this.layout=e,this.flatCoordinates=t}setCoordinates(e,t){re()}setLayout(e,t,i){let r;if(e)r=io(e);else{for(let s=0;s<i;++s){if(t.length===0){this.layout="XY",this.stride=2;return}t=t[0]}r=t.length,e=o1(r)}this.layout=e,this.stride=r}applyTransform(e){this.flatCoordinates&&(e(this.flatCoordinates,this.flatCoordinates,this.layout.startsWith("XYZ")?3:2,this.stride),this.changed())}rotate(e,t){const i=this.getFlatCoordinates();if(i){const r=this.getStride();dc(i,0,i.length,r,e,t,i),this.changed()}}scale(e,t,i){t===void 0&&(t=e),i||(i=li(this.getExtent()));const r=this.getFlatCoordinates();if(r){const s=this.getStride();Bv(r,0,r.length,s,e,t,i,r),this.changed()}}translate(e,t){const i=this.getFlatCoordinates();if(i){const r=this.getStride();$v(i,0,i.length,r,e,t,i),this.changed()}}}function o1(n){let e;return n==2?e="XY":n==3?e="XYZ":n==4&&(e="XYZM"),e}function io(n){let e;return n=="XY"?e=2:n=="XYZ"||n=="XYM"?e=3:n=="XYZM"&&(e=4),e}function a1(n,e,t){const i=n.getFlatCoordinates();if(!i)return null;const r=n.getStride();return Ai(i,0,i.length,r,e,t)}class l1 extends gg{constructor(e,t,i,r,s,o,a){super(),this.context_=e,this.pixelRatio_=t,this.extent_=i,this.transform_=r,this.transformRotation_=r?is(Math.atan2(r[1],r[0]),10):0,this.viewRotation_=s,this.squaredTolerance_=o,this.userTransform_=a,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=Et()}drawImages_(e,t,i,r){if(!this.image_)return;const s=Ai(e,t,i,r,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.tmpLocalTransform_,l=o.globalAlpha;this.imageOpacity_!=1&&(o.globalAlpha=l*this.imageOpacity_);let h=this.imageRotation_;this.transformRotation_===0&&(h-=this.viewRotation_),this.imageRotateWithView_&&(h+=this.viewRotation_);for(let d=0,u=s.length;d<u;d+=2){const g=s[d]-this.imageAnchorX_,f=s[d+1]-this.imageAnchorY_;if(h!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const m=g+this.imageAnchorX_,_=f+this.imageAnchorY_;ci(a,m,_,1,1,h,-m,-_),o.save(),o.transform.apply(o,a),o.translate(m,_),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.restore(
10)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,g,f,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(o.globalAlpha=l)}drawText_(e,t,i,r){if(!this.textState_||this.text_==="")return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const s=Ai(e,t,i,r,this.transform_,this.pixelCoordinates_),o=this.context_;let a=this.textRotation_;for(this.transformRotation_===0&&(a-=this.viewRotation_),this.textRotateWithView_&&(a+=this.viewRotation_);t<i;t+=r){const l=s[t]+this.textOffsetX_,h=s[t+1]+this.textOffsetY_;a!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(o.save(),o.translate(l-this.textOffsetX_,h-this.textOffsetY_),o.rotate(a),o.translate(this.textOffsetX_,this.textOffsetY_),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0),this.textFillState_&&o.fillText(this.text_,0,0),o.restore()):(this.textStrokeState_&&o.strokeText(this.text_,l,h),this.textFillState_&&o.fillText(this.text_,l,h))}}moveToLineTo_(e,t,i,r,s,o){const a=this.context_;let l=Ai(e,t,i,r,this.transform_,this.pixelCoordinates_);Math.abs(o)>0&&(l=wg(l,0,l.length,2,o,s,l),yg(l,2)),a.moveTo(l[0],l[1]);let h=l.length;s&&(h-=2);for(let d=2;d<h;d+=2)a.lineTo(l[d],l[d+1]);return s&&a.closePath(),i}drawRings_(e,t,i,r,s){for(let o=0,a=i.length;o<a;++o)t=this.moveToLineTo_(e,t,i[o],r,!0,s);return t}drawCircle(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!je(this.extent_,e.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const t=a1(e,this.transform_,this.pixelCoordinates_),i=t[2]-t[0],r=t[3]-t[1],s=Math.sqrt(i*i+r*r),o=this.context_;o.beginPath(),o.arc(t[0],t[1],s,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}this.text_!==""&&this.drawText_(e.getCenter(),0,2,2)}}setStyle(e){this.setFillStrokeStyle(e.getFill(),e.getStroke()),this.setImageStyle(e.getImage()),this.setTextStyle(e.getText())}setTransform(e){this.transform_=e}drawGeometry(e){switch(e.getType()){case"Point":this.drawPoint(e);break;case"LineString":this.drawLineString(e);break;case"Polygon":this.drawPolygon(e);break;case"MultiPoint":this.drawMultiPoint(e);break;case"MultiLineString":this.drawMultiLineString(e);break;case"MultiPolygon":this.drawMultiPolygon(e);break;case"GeometryCollection":this.drawGeometryCollection(e);break;case"Circle":this.drawCircle(e);break}}drawFeature(e,t){const i=t.getGeometryFunction()(e);i&&(this.setStyle(t),this.drawGeometry(i))}drawGeometryCollection(e){const t=e.getGeometriesArray();for(let i=0,r=t.length;i<r;++i)this.drawGeometry(t[i])}drawPoint(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const t=e.getFlatCoordinates(),i=e.getStride();this.image_&&this.drawImages_(t,0,t.length,i),this.text_!==""&&this.drawText_(t,0,t.length,i)}drawMultiPoint(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const t=e.getFlatCoordinates(),i=e.getStride();this.image_&&this.drawImages_(t,0,t.length,i),this.text_!==""&&this.drawText_(t,0,t.length,i)}drawLineString(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!je(this.extent_,e.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const t=this.context_,i=e.getFlatCoordinates();t.beginPath(),this.moveToLineTo_(i,0,i.length,e.getStride(),!1,this.strokeState_.strokeOffset),t.stroke()}if(this.text_!==""){const t=e.getFlatMidpoint();this.drawText_(t,0,2,2)}}}drawMultiLineString(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const t=e.getExtent();if(je(this.extent_,t)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const i=this.context_,r=e.getFlatCoordinates();let s=0;const o=e.getEnds(),a=e.getStride();i.beginPath();for(let l=0,h=o.length;l<h;++l)s=this.moveToLineTo_(r,s,o[l],a,!1,this.strokeState_.strokeOffset);i.stroke()}if(this.text_!==""){const i=e.getFlatMidpoints();this.drawText_(i,0,i.length,2)}}}drawPolygon(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!je(this.extent_,e.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const t=this.context_;t.beginPath(),this.drawRings_(e.getOrientedFlatCoordinates(),0,e.getEnds(),e.getStride(),this.strokeState_?.strokeOffset),this.fillState_&&t.fill(),this.strokeState_&&t.stroke()}if(this.text_!==""){const t=e.getFlatInteriorPoint();this.drawText_(t,0,2,2)}}}drawMultiPolygon(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!je(this.extent_,e.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const t=this.context_,i=e.getOrientedFlatCoordinates();let r=0;const s=e.getEndss(),o=e.getStride();t.beginPath();for(let a=0,l=s.length;a<l;++a){const h=s[a];r=this.drawRings_(i,r,h,o,this.strokeState_?.strokeOffset)}this.fillState_&&t.fill(),this.strokeState_&&t.stroke()}if(this.text_!==""){const t=e.getFlatInteriorPoints();this.drawText_(t,0,t.length,2)}}}setContextFillState_(e){const t=this.context_,i=this.contextFillState_;i?i.fillStyle!=e.fillStyle&&(i.fillStyle=e.fillStyle,t.fillStyle=e.fillStyle):(t.fillStyle=e.fillStyle,this.contextFillState_={fillStyle:e.fillStyle})}setContextStrokeState_(e){const t=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=e.lineCap&&(i.lineCap=e.lineCap,t.lineCap=e.lineCap),di(i.lineDash,e.lineDash)||t.setLineDash(i.lineDash=e.lineDash),i.lineDashOffset!=e.lineDashOffset&&(i.lineDashOffset=e.lineDashOffset,t.lineDashOffset=e.lineDashOffset),i.lineJoin!=e.lineJoin&&(i.lineJoin=e.lineJoin,t.lineJoin=e.lineJoin),i.lineWidth!=e.lineWidth&&(i.lineWidth=e.lineWidth,t.lineWidth=e.lineWidth),i.miterLimit!=e.miter
10Limit&&(i.miterLimit=e.miterLimit,t.miterLimit=e.miterLimit),i.strokeStyle!=e.strokeStyle&&(i.strokeStyle=e.strokeStyle,t.strokeStyle=e.strokeStyle)):(t.lineCap=e.lineCap,t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset,t.lineJoin=e.lineJoin,t.lineWidth=e.lineWidth,t.miterLimit=e.miterLimit,t.strokeStyle=e.strokeStyle,this.contextStrokeState_={lineCap:e.lineCap,lineDash:e.lineDash,lineDashOffset:e.lineDashOffset,lineJoin:e.lineJoin,lineWidth:e.lineWidth,miterLimit:e.miterLimit,strokeStyle:e.strokeStyle})}setContextTextState_(e){const t=this.context_,i=this.contextTextState_,r=e.textAlign?e.textAlign:zr;i?(i.font!=e.font&&(i.font=e.font,t.font=e.font),i.textAlign!=r&&(i.textAlign=r,t.textAlign=r),i.textBaseline!=e.textBaseline&&(i.textBaseline=e.textBaseline,t.textBaseline=e.textBaseline)):(t.font=e.font,t.textAlign=r,t.textBaseline=e.textBaseline,this.contextTextState_={font:e.font,textAlign:r,textBaseline:e.textBaseline})}setFillStrokeStyle(e,t){if(!e)this.fillState_=null;else{const i=e.getColor();this.fillState_={fillStyle:At(i||Ue)}}if(!t)this.strokeState_=null;else{const i=t.getColor(),r=t.getLineCap(),s=t.getLineDash(),o=t.getLineDashOffset(),a=t.getLineJoin(),l=t.getWidth(),h=t.getMiterLimit(),d=s||ti,u=t.getOffset();this.strokeState_={lineCap:r!==void 0?r:Yn,lineDash:this.pixelRatio_===1?d:d.map(g=>g*this.pixelRatio_),lineDashOffset:(o||ii)*this.pixelRatio_,lineJoin:a!==void 0?a:Kn,lineWidth:(l!==void 0?l:Wr)*this.pixelRatio_,miter
10Limit:h!==void 0?h:Nr,strokeStyle:At(i||jt),strokeOffset:(u??0)*this.pixelRatio_}}}setImageStyle(e){let t;if(!e||!(t=e.getSize())){this.image_=null;return}const i=e.getPixelRatio(this.pixelRatio_),r=e.getAnchor(),s=e.getOrigin();this.image_=e.getImage(this.pixelRatio_),this.imageAnchorX_=r[0]*i,this.imageAnchorY_=r[1]*i,this.imageHeight_=t[1]*i,this.imageOpacity_=e.getOpacity(),this.imageOriginX_=s[0],this.imageOriginY_=s[1],this.imageRotateWithView_=e.getRotateWithView(),this.imageRotation_=e.getRotation();const o=e.getScaleArray();this.imageScale_=[o[0]*this.pixelRatio_/i,o[1]*this.pixelRatio_/i],this.imageWidth_=t[0]*i}setTextStyle(e){if(!e)this.text_="";else{const t=e.getFill();if(!t)this.textFillState_=null;else{const f=t.getColor();this.textFillState_={fillStyle:At(f||Ue)}}const i=e.getStroke();if(!i)this.textStrokeState_=null;else{const f=i.getColor(),m=i.getLineCap(),_=i.getLineDash(),p=i.getLineDashOffset(),v=i.getLineJoin(),w=i.getWidth(),x=i.getMiterLimit();this.textStrokeState_={lineCap:m!==void 0?m:Yn,lineDash:_||ti,lineDashOffset:p||ii,lineJoin:v!==void 0?v:Kn,lineWidth:w!==void 0?w:Wr,miterLimit:x!==void 0?x:Nr,strokeStyle:At(f||jt)}}const r=e.getFont(),s=e.getOffsetX(),o=e.getOffsetY(),a=e.getRotateWithView(),l=e.getRotation(),h=e.getScaleArray(),d=e.getText(),u=e.getTextAlign(),g=e.getTextBaseline();this.textState_={font:r!==void 0?r:fg,textAlign:u!==void 0?u:zr,textBaseline:g!==void 0?g:eo},this.text_=d!==void 0?Array.isArray(d)?d.reduce((f,m,_)=>f+=_%2?" ":m,""):d:"",this.textOffsetX_=s!==void 0?this.pixelRatio_*s:0,this.textOffsetY_=o!==void 0?this.pixelRatio_*o:0,this.textRotateWithView_=a!==void 0?a:!1,this.textRotation_=l!==void 0?l:0,this.textScale_=[this.pixelRatio_*h[0],this.pixelRatio_*h[1]]}}}const Mt=.5;function c1(n,e,t,i,r,s,o,a,l){const h=r,d=n[0]*Mt,u=n[1]*Mt,g=xe(d,u);g.imageSmoothingEnabled=!1;const f=g.canvas,m=new l1(g,Mt,r,null,o,a,null),_=t.length,p=Math.floor((256*256*256-1)/_),v={};for(let x=1;x<=_;++x){const y=t[x-1],b=y.getStyleFunction()||i;if(!b)continue;let k=b(y,s);if(!k)continue;Array.isArray(k)||(k=[k]);const T=(x*p).toString(16).padStart(7,"#00000");for(let E=0,C=k.length;E<C;++E){const M=k[E],I=M.getGeometryFunction()(y);if(!I||!je(h,I.getExtent()))continue;const L=M.clone(),A=L.getFill();A&&A.setColor(T);const D=L.getStroke();D&&(D.setColor(T),D.setLineDash(null)),L.setText(void 0);const z=M.getImage();if(z){const te=z.getImageSize();if(!te)continue;const Z=xe(te[0],te[1],void 0,{alpha:!1}),ce=Z.canvas;Z.fillStyle=T,Z.fillRect(0,0,ce.width,ce.height),L.setImage(new Do({img:ce,anchor:z.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:z.getOrigin(),opacity:1,size:z.getSize(),scale:z.getScale(),rotation:z.getRotation(),rotateWithView:z.getRotateWithView()}))}const O=L.getZIndex()||0;let N=v[O];N||(N={},v[O]=N,N.Polygon=[],N.Circle=[],N.LineString=[],N.Point=[]);const G=I.getType();if(G==="GeometryCollection"){const te=I.getGeometriesArrayRecursive();for(let Z=0,ce=te.length;Z<ce;++Z){const $=te[Z];N[$.getType().replace("Multi","")].push($,L)}}else N[G.replace("Multi","")].push(I,L)}}const w=Object.keys(v).map(Number).sort(Jt);for(let x=0,y=w.length;x<y;++x){const b=v[w[x]];for(const k in b){const R=b[k];for(let T=0,E=R.length;T<E;T+=2){m.setStyle(R[T+1]);for(let C=0,M=e.length;C<M;++C)m.setTransform(e[C]),m.drawGeometry(R[T])}}}return g.getImageData(0,0,f.width,f.height)}function h1(n,e,t){const i=[];if(t){const r=Math.floor(Math.round(n[0])*Mt),s=Math.floor(Math.round(n[1])*Mt),o=(me(r,0,t.width-1)+me(s,0,t.height-1)*t.width)*4,a=t.data[o],l=t.data[o+1],d=t.data[o+2]+256*(l+256*a),u=Math.floor((256*256*256-1)/e.length);d&&d%u===0&&i.push(e[d/u-1])}return i}const d1=.5,Sg={Point:w1,LineString:p1,Polygon:x1,MultiPoint:y1,MultiLineString:_1,MultiPolygon:v1,GeometryCollection:m1,Circle:g1};function u1(n,e){return parseInt(H(n),10)-parseInt(H(e),10)}function ed(n,e){const t=Tg(n,e);return t*t}function Tg(n,e){return d1*n/e}function g1(n,e,t,i,r){const s=t.getFill(),o=t.getStroke();if(s||o){const l=n.getBuilder(t.getZIndex(),"Circle");l.setFillStrokeStyle(s,o),l.drawCircle(e,i,r)}const a=t.getText();if(a&&a.getText()){const l=n.getBuilder(t.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,i,r)}}function td(n,e,t,i,r,s,o,a){const l=[],h=t.getImage();if(h){let g=!0;const f=h.getImageState();f==q.LOADED||f==q.ERROR?g=!1:f==q.IDLE&&h.load(),g&&l.push(h.ready())}
10const d=t.getFill();d&&d.loading()&&l.push(d.ready());const u=l.length>0;return u&&Promise.all(l).then(()=>r(null)),f1(n,e,t,i,s,o,a),u}function f1(n,e,t,i,r,s,o){const a=t.getGeometryFunction()(e);if(!a)return;const l=a.simplifyTransformed(i,r);if(t.getRenderer())Rg(n,l,t,e,o);else{const d=Sg[l.getType()];d(n,l,t,e,o,s)}}function Rg(n,e,t,i,r){if(e.getType()=="GeometryCollection"){const o=e.getGeometries();for(let a=0,l=o.length;a<l;++a)Rg(n,o[a],t,i,r);return}n.getBuilder(t.getZIndex(),"Default").drawCustom(e,i,t.getRenderer(),t.getHitDetectionRenderer(),r)}function m1(n,e,t,i,r,s){const o=e.getGeometriesArray();let a,l;for(a=0,l=o.length;a<l;++a){const h=Sg[o[a].getType()];h(n,o[a],t,i,r,s)}}function p1(n,e,t,i,r){const s=t.getStroke();if(s){const a=n.getBuilder(t.getZIndex(),"LineString");a.setFillStrokeStyle(null,s),a.drawLineString(e,i,r)}const o=t.getText();if(o&&o.getText()){const a=n.getBuilder(t.getZIndex(),"Text");a.setTextStyle(o),a.drawText(e,i,r)}}function _1(n,e,t,i,r){const s=t.getStroke();if(s){const a=n.getBuilder(t.getZIndex(),"LineString");a.setFillStrokeStyle(null,s),a.drawMultiLineString(e,i,r)}const o=t.getText();if(o&&o.getText()){const a=n.getBuilder(t.getZIndex(),"Text");a.setTextStyle(o),a.drawText(e,i,r)}}function v1(n,e,t,i,r){const s=t.getFill(),o=t.getStroke();if(o||s){const l=n.getBuilder(t.getZIndex(),"Polygon");l.setFillStrokeStyle(s,o),l.drawMultiPolygon(e,i,r)}const a=t.getText();if(a&&a.getText()){const l=n.getBuilder(t.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,i,r)}}function w1(n,e,t,i,r,s){const o=t.getImage(),a=t.getText(),l=a&&a.getText(),h=s&&o&&l?{}:void 0;if(o){if(o.getImageState()!=q.LOADED)return;const d=n.getBuilder(t.getZIndex(),"Image");d.setImageStyle(o,h),d.drawPoint(e,i,r)}if(l){const d=n.getBuilder(t.getZIndex(),"Text");d.setTextStyle(a,h),d.drawText(e,i,r)}}function y1(n,e,t,i,r,s){const o=t.getImage(),a=o&&o.getOpacity()!==0,l=t.getText(),h=l&&l.getText(),d=s&&a&&h?{}:void 0;if(a){if(o.getImageState()!=q.LOADED)return;const u=n.getBuilder(t.getZIndex(),"Image");u.setImageStyle(o,d),u.drawMultiPoint(e,i,r)}if(h){const u=n.getBuilder(t.getZIndex(),"Text");u.setTextStyle(l,d),u.drawText(e,i,r)}}function x1(n,e,t,i,r){const s=t.getFill(),o=t.getStroke();if(s||o){const l=n.getBuilder(t.getZIndex(),"Polygon");l.setFillStrokeStyle(s,o),l.drawPolygon(e,i,r)}const a=t.getText();if(a&&a.getText()){const l=n.getBuilder(t.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,i,r)}}class Ig extends mt{constructor(e,t,i,r){super(e),this.inversePixelTransform=t,this.frameState=i,this.context=r}}const b1=5;class E1 extends rs{constructor(e){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=e,this.staleKeys_=new Array,this.maxStaleKeys=b1}getStaleKeys(){return this.staleKeys_}prependStaleKey(e){this.staleKeys_.unshift(e),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}getFeatures(e){return re()}getData(e){return null}prepareFrame(e){return re()}renderFrame(e,t){return re()}forEachFeatureAtCoordinate(e,t,i,r,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(e){const t=e.target;(t.getState()===q.LOADED||t.getState()===q.ERROR)&&this.renderIfReadyAndVisible()}loadImage(e){let t=e.getState();return t!=q.LOADED&&t!=q.ERROR&&e.addEventListener(V.CHANGE,this.boundHandleImageChange_),t==q.IDLE&&(e.load(),t=e.getState()),t==q.LOADED}renderIfReadyAndVisible(){const e=this.getLayer();e&&e.getVisible()&&e.getSourceState()==="ready"&&e.changed()}renderDeferred(e){}disposeInternal(){delete this.layer_,super.disposeInternal()}}const id=[];let Rn=null;function C1(){Rn=xe(1,1,void 0,{willReadFrequently:!0})}class Mg extends E1{constructor(e){super(e),this.container=null,this.renderedResolution,this.tempTransform=Et(),this.pixelTransform=Et(),this.inversePixelTransform=Et(),this.context=null,this.deferredContext_=null,this.containerReused=!1,this.frameState=null}getImageData(e,t,i){Rn||C1(),Rn.clearRect(0,0,1,1);let r;try{Rn.drawImage(e,t,i,1,1,0,0,1,1),r=Rn.getImageData(0,0,1,1).data}catch{return Rn=null,null}return r}
10getBackground(e){let i=this.getLayer().getBackground();return typeof i=="function"&&(i=i(e.viewState.resolution)),i||void 0}useContainer(e,t,i){const r=this.getLayer().getClassName();let s,o;if(e&&e.className===r&&(!i||e&&e.style.backgroundColor&&di(rn(e.style.backgroundColor),rn(i)))){const a=e.firstElementChild;Si(a)&&(o=a.getContext("2d"))}if(o&&Kv(o.canvas.style.transform,t)?(this.container=e,this.context=o,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){s=lt?ig():document.createElement("div"),s.className=r;let a=s.style;a.position="absolute",a.width="100%",a.height="100%",o=xe();const l=o.canvas;s.appendChild(l),a=l.style,a.position="absolute",a.left="0",a.transformOrigin="top left",this.container=s,this.context=o}!this.containerReused&&i&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=i)}clipUnrotated(e,t,i){const r=un(i),s=Eo(i),o=bo(i),a=xo(i);Ie(t.coordinateToPixelTransform,r),Ie(t.coordinateToPixelTransform,s),Ie(t.coordinateToPixelTransform,o),Ie(t.coordinateToPixelTransform,a);const l=this.inversePixelTransform;Ie(l,r),Ie(l,s),Ie(l,o),Ie(l,a),e.save(),e.beginPath(),e.moveTo(Math.round(r[0]),Math.round(r[1])
10),e.lineTo(Math.round(s[0]),Math.round(s[1])),e.lineTo(Math.round(o[0]),Math.round(o[1])),e.lineTo(Math.round(a[0]),Math.round(a[1])),e.clip()}prepareContainer(e,t){const i=e.extent,r=e.viewState.resolution,s=e.viewState.rotation,o=e.pixelRatio,a=Math.round(de(i)/r*o),l=Math.round(Be(i)/r*o);ci(this.pixelTransform,e.size[0]/2,e.size[1]/2,1/o,1/o,s,-a/2,-l/2),vg(this.inversePixelTransform,this.pixelTransform);const h=Yv(this.pixelTransform);if(this.useContainer(t,h,this.getBackground(e)),!this.containerReused){const d=this.context.canvas;d.width!=a||d.height!=l?(d.width=a,d.height=l):this.context.clearRect(0,0,a,l),h!==d.style.transform&&(d.style.transform=h)}}dispatchRenderEvent_(e,t,i){const r=this.getLayer();if(r.hasListener(e)){const s=new Ig(e,this.inversePixelTransform,i,t);r.dispatchEvent(s)}}preRender(e,t){this.frameState=t,!t.declutter&&this.dispatchRenderEvent_(ct.PRERENDER,e,t)}postRender(e,t){t.declutter||this.dispatchRenderEvent_(ct.POSTRENDER,e,t)}renderDeferredInternal(e){}getRenderContext(e){return e.declutter&&!this.deferredContext_&&(this.deferredContext_=new xg),e.declutter?this.deferredContext_.getContext():this.context}renderDeferred(e){e.declutter&&(this.dispatchRenderEvent_(ct.PRERENDER,this.context,e),e.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(e),this.dispatchRenderEvent_(ct.POSTRENDER,this.context,e))}getRenderTransform(e,t,i,r,s,o,a){const l=s/2,h=o/2,d=r/t,u=-d,g=-e[0]+a,f=-e[1];return ci(this.tempTransform,l,h,d,u,-i,g,f)}disposeInternal(){delete this.frameState,super.disposeInternal()}}class k1 extends Mg{constructor(e){super(e),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.clipExtent_=null,this.extendX_=!1,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=rt(),this.wrappedRenderedExtent_=rt(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedPixelRatio_=1,this.renderedRenderOrder_=null,this.renderedFrameDeclutter_,this.replayGroup_=null,this.replayGroupChanged=!0,this.clipping=!0,this.targetContext_=null,this.opacity_=1}renderWorlds(e,t,i){const r=t.extent,s=t.viewState,o=s.center,a=s.resolution,l=s.projection,h=s.rotation,d=l.getExtent(),u=this.getLayer().getSource(),g=this.getLayer().getDeclutter(),f=t.pixelRatio,m=t.viewHints,_=!(m[Fe.ANIMATING]||m[Fe.INTERACTING]),p=this.context,v=Math.round(de(r)/a*f),w=Math.round(Be(r)/a*f),x=u.getWrapX()&&l.canWrapX(),y=x?de(d):null,b=x?Math.ceil((r[2]-d[2])/y)+(this.extendX_?2:1):1;let k=x?Math.floor((r[0]-d[0])/y)-(this.extendX_?1:0):0;do{let R=this.getRenderTransform(o,a,0,f,v,w,k*y);t.declutter&&(R=R.slice(0)),e.execute(p,[p.canvas.width,p.canvas.height],R,h,_,i===void 0?Ui:i?bg:e1,i?g&&t.declutter[g]:void 0)}while(++k<b)}setDrawContext_(){this.opacity_!==1&&(this.targetContext_=this.context,this.context=xe(this.context.canvas.width,this.context.canvas.height,id))}resetDrawContext_(){if(this.opacity_!==1&&this.targetContext_){const e=this.targetContext_.globalAlpha;this.targetContext_.globalAlpha=this.opacity_,this.targetContext_.drawImage(this.context.canvas,0,0),this.targetContext_.globalAlpha=e,ko(this.context),id.push(this.context.canvas),this.context=this.targetContext_,this.targetContext_=null}}renderDeclutter(e){!this.replayGroup_||!this.getLayer().getDeclutter()||this.renderWorlds(this.replayGroup_,e,!0)}renderDeferredInternal(e){this.replayGroup_&&(this.clipExtent_&&this.clipUnrotated(this.context,e,this.clipExtent_),this.replayGroup_.renderDeferred(),this.clipExtent_&&(this.context.restore(),this.clipExtent_=null),this.resetDrawContext_())}renderFrame(e,t){const i=e.layerStatesArray[e.layerIndex];this.opacity_=i.opacity;const r=e.viewState;this.prepareContainer(e,t);const s=this.context,o=this.replayGroup_;let a=o&&!o.isEmpty();if(!a&&!(this.getLayer().hasListener(ct.PRERENDER)||this.getLayer().hasListener(ct.POSTRENDER)))return this.container;this.setDrawContext_(),this.preRender(s,e),r.projection,this.clipExtent_=null;let l=!1;if(a&&i.extent&&this.clipping){const h=Ti(i.extent);a=je(h,e.extent),a&&!mr(h,e.extent)&&(e.declutter?this.clipExtent_=h:(this.clipUnrotated(s,e,h),l=!0))}return a&&this.renderWorlds(o,e,this.getLayer().getDeclutter()?!1:void 0),l&&s.restore(
10),this.postRender(s,e),this.renderedRotation_!==r.rotation&&(this.renderedRotation_=r.rotation,this.hitDetectionImageData_=null),e.declutter||this.resetDrawContext_(),this.container}getFeatures(e){return new Promise(t=>{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const i=this.frameState.size.slice(),r=this.renderedCenter_,s=this.renderedResolution_,o=this.renderedRotation_,a=this.renderedProjection_,l=this.wrappedRenderedExtent_,h=this.getLayer(),d=[],u=i[0]*Mt,g=i[1]*Mt;d.push(this.getRenderTransform(r,s,o,Mt,u,g,0).slice());const f=h.getSource(),m=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!mr(m,l)){let _=l[0];const p=de(m);let v=0,w;for(;_<m[0];)--v,w=p*v,d.push(this.getRenderTransform(r,s,o,Mt,u,g,w).slice()),_+=p;for(v=0,_=l[2];_>m[2];)++v,w=p*v,d.push(this.getRenderTransform(r,s,o,Mt,u,g,w).slice()),_-=p}this.hitDetectionImageData_=c1(i,d,this.renderedFeatures_,h.getStyleFunction(),l,s,o,ed(s,this.renderedPixelRatio_))}t(h1(e,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(e,t,i,r,s){if(!this.replayGroup_)return;const o=t.viewState.resolution,a=t.viewState.rotation,l=this.getLayer(),h={},d=function(g,f,m){const _=H(g),p=h[_];if(p){if(p!==!0&&m<p.distanceSq){if(m===0)return h[_]=!0,s.splice(s.lastIndexOf(p),1),r(g,l,f);p.geometry=f,p.distanceSq=m}}else{if(m===0)return h[_]=!0,r(g,l,f);s.push(h[_]={feature:g,layer:l,geometry:f,distanceSq:m,callback:r})}},u=this.getLayer().getDeclutter();return this.replayGroup_.forEachFeatureAtCoordinate(e,o,a,i,d,u?t.declutter?.[u]?.all().map(g=>g.value):null)}handleFontsChanged(){const e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()}handleStyleImageChange_(e){this.renderIfReadyAndVisible()}prepareFrame(e){const t=this.getLayer(),i=t.getSource();if(!i)return!1;const r=e.viewHints[Fe.ANIMATING],s=e.viewHints[Fe.INTERACTING],o=t.getUpdateWhileAnimating(),a=t.getUpdateWhileInteracting();if(this.ready&&!o&&r||!a&&s)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=e.extent,h=e.viewState,d=h.projection,u=h.resolution,g=e.pixelRatio,f=t.getRevision(),m=t.getRenderBuffer();let _=t.getRenderOrder();_===void 0&&(_=u1);const p=h.center.slice(),v=Qr(l,m*u),w=v.slice(),x=[v.slice()],y=d.getExtent(),b=i.getWrapX()&&d.canWrapX();if(this.extendX_=!1,b){const D=i.getExtent();D&&!ts(D)&&(this.extendX_=D[0]<y[0]||D[2]>y[2])}if(b&&(!mr(y,e.extent)||this.extendX_)){const D=de(y),z=Math.max(de(v)/2,D);let O=y[0],N=y[2];this.extendX_&&(O-=D,N+=D),v[0]=O-z,v[2]=N+z,Ju(p,d);const G=Hu(x[0],d);G[0]<y[0]&&G[2]<y[2]?x.push([G[0]+D,G[1],G[2]+D,G[3]]):G[0]>y[0]&&G[2]>y[2]&&x.push([G[0]-D,G[1],G[2]-D,G[3]])}if(this.ready&&this.renderedResolution_==u&&this.renderedPixelRatio_===g&&this.renderedRevision_==f&&this.renderedRenderOrder_==_&&this.renderedFrameDeclutter_===!!e.declutter&&mr(this.wrappedRenderedExtent_,v))return di(this.renderedExtent_,w)||(this.hitDetectionImageData_=null,this.renderedExtent_=w),this.renderedCenter_=p,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const k=new Gv(Tg(u,g),v,u,g);let R;for(let D=0,z=x.length;D<z;++D)i.loadFeatures(x[D],u,d);const T=ed(u,g);let E=!0;const C=((D,z)=>{let O;const N=D.getStyleFunction()||t.getStyleFunction();if(N&&(O=N(D,u)),O){const G=this.renderFeature(D,T,O,k,R,this.getLayer().getDeclutter(),z);E=E&&!G}}),M=Ro(v),I=i.getFeaturesInExtent(M);_&&I.sort(_);for(let D=0,z=I.length;D<z;++D)C(I[D],D);this.renderedFeatures_=I,this.ready=E;const L=k.finish(),A=new i1(v,u,g,i.getOverlaps(),L,t.getRenderBuffer(),!!e.declutter);return this.renderedResolution_=u,this.renderedRevision_=f,this.renderedRenderOrder_=_,this.renderedFrameDeclutter_=!!e.declutter,this.renderedExtent_=w,this.wrappedRenderedExtent_=v,this.renderedCenter_=p,this.renderedProjection_=d,this.renderedPixelRatio_=g,this.replayGroup_=A,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(e,t,i,r,s,o,a){if(!i)return!1;let l=!1;if(Array.isArray(i))for(let h=0,d=i.length;h<d;++h)l=td(r,e,i[h],t,this.boundHandleStyleImageChange_,s,o,a)||l;else l=td(r,e,i,t,this.boundHandleStyleImageChange_,s,o,a);return l}}function Pg(n,e,t=0,i=n.length-1,r=S1){for(;i>t;){if(i-t>600){const l=i-t+1,h=e-t+1,d=Math.log(l),u=.5*Math.exp(2*d/3),g=.5*Math.sqrt(d*u*(l-u)/l)*(h-l/2<0?-1:1),f=Math.max(t,Math.floor(e-h*u/l+g)),m=Math.min(i,Math.floor(e+(l-h)*u/l+g));Pg(n,e,f,m,r)}const s=n[e];let o=t,a=i;for(cr(n,t,e),r(n[i],s)>0&&cr(n,t,i);o<a;){for(cr(n,o,a),o++,a--;r(n[o],s)<0;)o++;for(;r(n[a],s)>0;)a--}r(n[t],s)===0?cr(n,t,a):(a++,cr(n,a,i)),a<=e&&(t=a+1),e<=a&&(i=a-1)}}function cr(n,e,t){const i=n[e];n[e]=n[t],n[t]=i}function S1(n,e){return n<e?-1:n>e?1:0}let Lg=class{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let t=this.data;const i=[];if(!Ts(e,t))return i;const r=this.toBBox,s=[];for(;t;){for(let o=0;o<t.children.length;o++){const a=t.children[o],l=t.leaf?r(a):a;Ts(e,l)&&(t.leaf?i.push(a):wa(e,l)?this._all(a,i):s.push(a))}t=s.pop()}return i}collides(e){let t=this.data;if(!Ts(e,t))return!1;const i=[];for(;t;){for(let r=0;r<t.children.length;r++){const s=t.children[r],o=t.leaf?this.toBBox(s):s;
vendor: 4,607 bytes, line 10
10if(Ts(e,o)){if(t.leaf||wa(e,o))return!0;i.push(s)}}t=i.pop()}return!1}load(e){if(!(e&&e.length))return this;if(e.length<this._minEntries){for(let i=0;i<e.length;i++)this.insert(e[i]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(!this.data.children.length)this.data=t;else if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){const i=this.data;this.data=t,t=i}this._insert(t,this.data.height-t.height-1,!0)}return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=In([]),this}remove(e,t){if(!e)return this;let i=this.data;const r=this.toBBox(e),s=[],o=[];let a,l,h;for(;i||s.length;){if(i||(i=s.pop(),l=s[s.length-1],a=o.pop(),h=!0),i.leaf){const d=T1(e,i.children,t);if(d!==-1)return i.children.splice(d,1),s.push(i),this._condense(s),this}!h&&!i.leaf&&wa(i,r)?(s.push(i),o.push(a),a=0,l=i,i=i.children[0]):l?(a++,i=l.children[a],h=!1):i=null}return this}toBBox(e){return e}compareMinX(e,t){return e.minX-t.minX}compareMinY(e,t){return e.minY-t.minY}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,t){const i=[];for(;e;)e.leaf?t.push(...e.children):i.push(...e.children),e=i.pop();return t}_build(e,t,i,r){const s=i-t+1;let o=this._maxEntries,a;if(s<=o)return a=In(e.slice(t,i+1)),yn(a,this.toBBox),a;r||(r=Math.ceil(Math.log(s)/Math.log(o)),o=Math.ceil(s/Math.pow(o,r-1))),a=In([]),a.leaf=!1,a.height=r;const l=Math.ceil(s/o),h=l*Math.ceil(Math.sqrt(o));nd(e,t,i,h,this.compareMinX);for(let d=t;d<=i;d+=h){const u=Math.min(d+h-1,i);nd(e,d,u,l,this.compareMinY);for(let g=d;g<=u;g+=l){const f=Math.min(g+l-1,u);a.children.push(this._build(e,g,f,r-1))}}return yn(a,this.toBBox),a}_chooseSubtree(e,t,i,r){for(;r.push(t),!(t.leaf||r.length-1===i);){let s=1/0,o=1/0,a;for(let l=0;l<t.children.length;l++){const h=t.children[l],d=va(h),u=M1(e,h)-d;u<o?(o=u,s=d<s?d:s,a=h):u===o&&d<s&&(s=d,a=h)}t=a||t.children[0]}return t}_insert(e,t,i){const r=i?e:this.toBBox(e),s=[],o=this._chooseSubtree(r,this.data,t,s);for(o.children.push(e),_r(o,r);t>=0&&s[t].children.length>this._maxEntries;)this._split(s,t),t--;this._adjustParentBBoxes(r,s,t)}_split(e,t){const i=e[t],r=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,r);const o=this._chooseSplitIndex(i,s,r),a=In(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,yn(i,this.toBBox),yn(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this.data=In([e,t]),this.data.height=e.height+1,this.data.leaf=!1,yn(this.data,this.toBBox)}_chooseSplitIndex(e,t,i){let r,s=1/0,o=1/0;for(let a=t;a<=i-t;a++){const l=pr(e,0,a,this.toBBox),h=pr(e,a,i,this.toBBox),d=P1(l,h),u=va(l)+va(h);d<s?(s=d,r=a,o=u<o?u:o):d===s&&u<o&&(o=u,r=a)}return r||i-t}_chooseSplitAxis(e,t,i){const r=e.leaf?this.compareMinX:R1,s=e.leaf?this.compareMinY:I1,o=this._allDistMargin(e,t,i,r),a=this._allDistMargin(e,t,i,s);o<a&&e.children.sort(r)}_allDistMargin(e,t,i,r){e.children.sort(r);const s=this.toBBox,o=pr(e,0,t,s),a=pr(e,i-t,i,s);let l=Ss(o)+Ss(a);for(let h=t;h<i-t;h++){const d=e.children[h];_r(o,e.leaf?s(d):d),l+=Ss(o)}for(let h=i-t-1;h>=t;h--){const d=e.children[h];_r(a,e.leaf?s(d):d),l+=Ss(a)}return l}_adjustParentBBoxes(e,t,i){for(let r=i;r>=0;r--)_r(t[r],e)}_condense(e){for(let t=e.length-1,i;t>=0;t--)e[t].children.length===0?t>0?(i=e[t-1].children,i.splice(i.indexOf(e[t]),1)):this.clear():yn(e[t],this.toBBox)}};function T1(n,e,t){if(!t)return e.indexOf(n);for(let i=0;i<e.length;i++)if(t(n,e[i]))return i;return-1}function yn(n,e){pr(n,0,n.children.length,e,n)}function pr(n,e,t,i,r){r||(r=In(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s=e;s<t;s++){const o=n.children[s];_r(r,n.leaf?i(o):o)}return r}function _r(n,e){return n.minX=Math.min(n.minX,e.minX),n.minY=Math.min(n.minY,e.minY),n.maxX=Math.max(n.maxX,e.maxX),n.maxY=Math.max(n.maxY,e.maxY),n}function R1(n,e){return n.minX-e.minX}function I1(n,e){return n.minY-e.minY}function va(n){return(n.maxX-n.minX)*(n.maxY-n.minY)}function Ss(n){return n.maxX-n.minX+(n.maxY-n.minY)}function M1(n,e){return(Math.max(e.maxX,n.maxX)-Math.min(e.minX,n.minX))*(Math.max(e.maxY,n.maxY)-Math.min(e.minY,n.minY))}function P1(n,e){const t=Math.max(n.minX,e.minX),i=Math.max(n.minY,e.minY),r=Math.min(n.maxX,e.maxX),s=Math.min(n.maxY,e.maxY);return Math.max(0,r-t)*Math.max(0,s-i)}function wa(n,e){return n.minX<=e.minX&&n.minY<=e.minY&&e.maxX<=n.maxX&&e.maxY<=n.maxY}function Ts(n,e){return e.minX<=n.maxX&&e.minY<=n.maxY&&e.maxX>=n.minX&&e.maxY>=n.minY}function In(n){return{children:n,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}
10function nd(n,e,t,i,r){const s=[e,t];for(;s.length;){if(t=s.pop(),e=s.pop(),t-e<=i)continue;const o=e+Math.ceil((t-e)/i/2)*i;Pg(n,o,e,t,r),s.push(e,o,o,t)}}let fn=0;const Ge=1<<fn++,ie=1<<fn++,Ye=1<<fn++,yt=1<<fn++,on=1<<fn++,vr=1<<fn++,Rs=Math.pow(2,fn)-1,gc={[Ge]:"boolean",[ie]:"number",[Ye]:"string",[yt]:"color",[on]:"number[]",[vr]:"size"},L1=Object.keys(gc).map(Number).sort(Jt);function A1(n){return n in gc}function wr(n){const e=[];for(const t of L1)yr(n,t)&&e.push(gc[t]);return e.length===0?"untyped":e.length<3?e.join(" or "):e.slice(0,-1).join(", ")+", or "+e[e.length-1]}function yr(n,e){return(n&e)===e}function pi(n,e){return n===e}class Ce{constructor(e,t){if(!A1(e))throw new Error(`literal expressions must have a specific type, got ${wr(e)}`);this.type=e,this.value=t}}class D1{constructor(e,t,...i){this.type=e,this.operator=t,this.args=i}}function Ag(){return{variables:new Set,properties:new Set,featureId:!1,geometryType:!1,mCoordinate:!1,mapState:!1}}function Ae(n,e,t){switch(typeof n){case"boolean":{if(pi(e,Ye))return new Ce(Ye,n?"true":"false");if(!yr(e,Ge))throw new Error(`got a boolean, but expected ${wr(e)}`);return new Ce(Ge,n)}case"number":{if(pi(e,vr))return new Ce(vr,Ze(n));if(pi(e,Ge))return new Ce(Ge,!!n);if(pi(e,Ye))return new Ce(Ye,n.toString());if(!yr(e,ie))throw new Error(`got a number, but expected ${wr(e)}`);return new Ce(ie,n)}case"string":{if(pi(e,yt))return new Ce(yt,ac(n));if(pi(e,Ge))return new Ce(Ge,!!n);if(!yr(e,Ye))throw new Error(`got a string, but expected ${wr(e)}`);return new Ce(Ye,n)}}if(!Array.isArray(n))throw new Error("expression must be an array or a primitive value");if(n.length===0)throw new Error("empty expression");if(typeof n[0]=="string")return U1(n,e,t);for(const i of n)if(typeof i!="number")throw new Error("expected an array of numbers");if(pi(e,vr)){if(n.length!==2)throw new Error(`expected an array of two values for a size, got ${n.length}`);return new Ce(vr,n)}if(pi(e,yt)){if(n.length===3)return new Ce(yt,[...n,1]);if(n.length===4)return new Ce(yt,n);throw new Error(`expected an array of 3 or 4 values for a color, got ${n.length}`)}if(!yr(e,on))throw new Error(`got an array of numbers, but expected ${wr(e)}`);return new Ce(on,n)}const S={Get:"get",Var:"var",Concat:"concat",GeometryType:"geometry-type",LineMetric:"line-metric",Any:"any",All:"all",Not:"!",Resolution:"resolution",Zoom:"zoom",Time:"time",Equal:"==",NotEqual:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string",Has:"has"},O1={[S.Get]:X(Q(1,1/0),rd),[S.Var]:X(Q(1,1),F1),[S.Has]:X(Q(1,1/0),rd),[S.Id]:X(j1,xn),[S.Concat]:X(Q(2,1/0),se(Ye)),[S.GeometryType]:X(N1,xn),[S.LineMetric]:X(z1,xn),[S.Resolution]:X(ya,xn),[S.Zoom]:X(ya,xn),[S.Time]:X(ya,xn),[S.Any]:X(Q(2,1/0),se(Ge)),[S.All]:X(Q(2,1/0),se(Ge)),[S.Not]:X(Q(1,1),se(Ge)),[S.Equal]:X(Q(2,2),se(Rs)),[S.NotEqual]:X(Q(2,2),se(Rs)),[S.GreaterThan]:X(Q(2,2),se(ie)),[S.GreaterThanOrEqualTo]:X(Q(2,2),se(ie)),[S.LessThan]:X(Q(2,2),se(ie)),[S.LessThanOrEqualTo]:X(Q(2,2),se(ie)),[S.Multiply]:X(Q(2,1/0),sd),[S.Coalesce]:X(Q(2,1/0),sd),[S.Divide]:X(Q(2,2),se(ie)),[S.Add]:X(Q(2,1/0),se(ie)),[S.Subtract]:X(Q(2,2),se(ie)),[S.Clamp]:X(Q(3,3),se(ie)),[S.Mod]:X(Q(2,2),se(ie)),[S.Pow]:X(Q(2,2),se(ie)),[S.Abs]:X(Q(1,1),se(ie)),[S.Floor]:X(Q(1,1),se(ie)),[S.Ceil]:X(Q(1,1),se(ie)),[S.Round]:X(Q(1,1),se(ie)),[S.Sin]:X(Q(1,1),se(ie)),[S.Cos]:X(Q(1,1),se(ie)),[S.Atan]:X(Q(1,2),se(ie)),[S.Sqrt]:X(Q(1,1),se(ie)),[S.Match]:X(Q(4,1/0),od,G1),[S.Between]:X(Q(3,3),se(ie)),[S.Interpolate]:X(Q(6,1/0),od,B1),[S.Case]:X(Q(3,1/0),W1,$1),[S.In]:X(Q(2,2),V1),[S.Number]:X(Q(1,1/0),se(Rs)),[S.String]:X(Q(1,1/0),se(Rs)),[S.Array]:X(Q(1,1/0),se(ie)),[S.Color]:X(Q(1,4),se(ie)),[S.Band]:X(Q(1,3),se(ie)),[S.Palette]:X(Q(2,2),X1),[S.ToString]:X(Q(1,1),se(Ge|ie|Ye|yt))};function rd(n,e,t){const i=n.length-1,r=new Array(i);for(let s=0;s<i;++s){const o=n[s+1];switch(typeof o){case"number":{r[s]=new Ce(ie,o);break}case"string":{r[s]=new Ce(Ye,o);break}default:throw new Error(`expected a string key or numeric array index for a get operation, got ${o}`)}s===0&&t.properties.add(String(o))}return r}function F1(n,e,t){const i=n[1];
10if(typeof i!="string")throw new Error("expected a string argument for var operation");return t.variables.add(i),[new Ce(Ye,i)]}function j1(n,e,t){t.featureId=!0}function N1(n,e,t){t.geometryType=!0}function z1(n,e,t){t.mCoordinate=!0}function ya(n,e,t){t.mapState=!0}function xn(n,e,t){const i=n[0];if(n.length!==1)throw new Error(`expected no arguments for ${i} operation`);return[]}function Q(n,e){return function(t,i,r){const s=t[0],o=t.length-1;if(n===e){if(o!==n){const a=n===1?"":"s";throw new Error(`expected ${n} argument${a} for ${s}, got ${o}`)}}else if(o<n||o>e){const a=e===1/0?`${n} or more`:`${n} to ${e}`;throw new Error(`expected ${a} arguments for ${s}, got ${o}`)}}}function sd(n,e,t){const i=n.length-1,r=new Array(i);for(let s=0;s<i;++s){const o=Ae(n[s+1],e,t);r[s]=o}return r}function se(n){return function(e,t,i){const r=e.length-1,s=new Array(r);for(let o=0;o<r;++o){const a=Ae(e[o+1],n,i);s[o]=a}return s}}function W1(n,e,t){const i=n[0],r=n.length-1;if(r%2===0)throw new Error(`expected an odd number of arguments for ${i}, got ${r} instead`)}function od(n,e,t){const i=n[0],r=n.length-1;if(r%2===1)throw new Error(`expected an even number of arguments for operation ${i}, got ${r} instead`)}function G1(n,e,t){const i=n.length-1,r=Ye|ie|Ge,s=Ae(n[1],r,t),o=Ae(n[n.length-1],e,t),a=new Array(i-2);for(let l=0;l<i-2;l+=2){try{const h=Ae(n[l+2],s.type,t);a[l]=h}catch(h){throw new Error(`failed to parse argument ${l+1} of match expression: ${h.message}`)}try{const h=Ae(n[l+3],o.type,t);a[l+1]=h}catch(h){throw new Error(`failed to parse argument ${l+2} of match expression: ${h.message}`)}}return[s,...a,o]}function B1(n,e,t){const i=n[1];let r;switch(i[0]){case"linear":r=1;break;case"exponential":const l=i[1];if(typeof l!="number"||l<=0)throw new Error(`expected a number base for exponential interpolation, got ${JSON.stringify(l)} instead`);r=l;break;default:throw new Error(`invalid interpolation type: ${JSON.stringify(i)}`)}const s=new Ce(ie,r);let o;try{o=Ae(n[2],ie,t)}catch(l){throw new Error(`failed to parse argument 1 in interpolate expression: ${l.message}`)}const a=new Array(n.length-3);for(let l=0;l<a.length;l+=2){try{const h=Ae(n[l+3],ie,t);a[l]=h}catch(h){throw new Error(`failed to parse argument ${l+2} for interpolate expression: ${h.message}`)}try{const h=Ae(n[l+4],e,t);a[l+1]=h}catch(h){throw new Error(`failed to parse argument ${l+3} for interpolate expression: ${h.message}`)}}return[s,o,...a]}function $1(n,e,t){const i=Ae(n[n.length-1],e,t),r=new Array(n.length-1);for(let s=0;s<r.length-1;s+=2){try{const o=Ae(n[s+1],Ge,t);r[s]=o}catch(o){throw new Error(`failed to parse argument ${s} of case expression: ${o.message}`)}try{const o=Ae(n[s+2],i.type,t);r[s+1]=o}catch(o){throw new Error(`failed to parse argument ${s+1} of case expression: ${o.message}`)}}return r[r.length-1]=i,r}function V1(n,e,t){let i=n[2];if(!Array.isArray(i))throw new Error('the second argument for the "in" operator must be an array');let r;if(i[0]==="literal"){if(i=i[1],!Array.isArray(i))throw new Error('failed to parse "in" expression: the literal operator must be followed by an array')}else if(typeof i[0]=="string")throw new Error('for the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions');typeof i[0]=="string"?r=Ye:r=ie;const s=new Array(i.length);for(let a=0;a<s.length;a++)try{const l=Ae(i[a],r,t);s[a]=l}catch(l){throw new Error(`failed to parse haystack item ${a} for "in" expression: ${l.message}`)}return[Ae(n[1],r,t),...s]}function X1(n,e,t){let i;try{i=Ae(n[1],ie,t)}catch(o){throw new Error(`failed to parse first argument in palette expression: ${o.message}`)}const r=n[2];if(!Array.isArray(r))throw new Error("the second argument of palette must be an array");const s=new Array(r.length);for(let o=0;o<s.length;o++){let a;try{a=Ae(r[o],yt,t)}catch(l){throw new Error(`failed to parse color at index ${o} in palette expression: ${l.message}`)}if(!(a instanceof Ce))throw new Error(`the palette color at index ${o} must be a literal value`);s[o]=a}return[i,...s]}function X(...n){return function(e,t,i){const r=e[0];let s;for(let o=0;o<n.length;o++){const a=n[o](e,t,i);if(o==n.length-1){if(!a)throw new Error("expected last argument validator to return the parsed args");s=a}}return new D1(t,r,...s)}}function U1(n,e,t){const i=n[0],r=O1[i];if(!r)throw new Error(`unknown operator: ${i}`);return r(n,e,t)}function Dg(n){if(!n)return"";const e=n.getType();switch(e){case"Point":case"LineString":case"Polygon":return e;case"MultiPoint":case"MultiLineString":case"MultiPolygon":return e.substring(5);case"Circle":return"Polygon";
10case"GeometryCollection":return Dg(n.getGeometries()[0]);default:return""}}function Og(){return{variables:{},properties:{},resolution:NaN,featureId:null,geometryType:""}}function Nt(n,e,t){const i=Ae(n,e,t);return Ct(i)}function Ct(n,e){if(n instanceof Ce){if(n.type===yt&&typeof n.value=="string"){const i=ac(n.value);return function(){return i}}return function(){return n.value}}const t=n.operator;switch(t){case S.Number:case S.String:case S.Coalesce:return Y1(n);case S.Get:case S.Var:case S.Has:return K1(n);case S.Id:return i=>i.featureId;case S.GeometryType:return i=>i.geometryType;case S.Concat:{const i=n.args.map(r=>Ct(r));return r=>"".concat(...i.map(s=>s(r).toString()))}case S.Resolution:return i=>i.resolution;case S.Any:case S.All:case S.Between:case S.In:case S.Not:return H1(n);case S.Equal:case S.NotEqual:case S.LessThan:case S.LessThanOrEqualTo:case S.GreaterThan:case S.GreaterThanOrEqualTo:return Z1(n);case S.Multiply:case S.Divide:case S.Add:case S.Subtract:case S.Clamp:case S.Mod:case S.Pow:case S.Abs:case S.Floor:case S.Ceil:case S.Round:case S.Sin:case S.Cos:case S.Atan:case S.Sqrt:return q1(n);case S.Case:return J1(n);case S.Match:return Q1(n);case S.Interpolate:return ew(n);case S.ToString:return tw(n);default:throw new Error(`Unsupported operator ${t}`)}}function Y1(n,e){const t=n.operator,i=n.args.length,r=new Array(i);for(let s=0;s<i;++s)r[s]=Ct(n.args[s]);switch(t){case S.Coalesce:return s=>{for(let o=0;o<i;++o){const a=r[o](s);if(typeof a<"u"&&a!==null)return a}throw new Error("Expected one of the values to be non-null")};case S.Number:case S.String:return s=>{for(let o=0;o<i;++o){const a=r[o](s);if(typeof a===t)return a}throw new Error(`Expected one of the values to be a ${t}`)};default:throw new Error(`Unsupported assertion operator ${t}`)}}function K1(n,e){const i=n.args[0].value;switch(n.operator){case S.Get:return r=>{const s=n.args;let o=r.properties[i];for(let a=1,l=s.length;a<l;++a){const d=s[a].value;o=o[d]}return o};case S.Var:return r=>r.variables[i];case S.Has:return r=>{const s=n.args;if(!(i in r.properties))return!1;let o=r.properties[i];for(let a=1,l=s.length;a<l;++a){const d=s[a].value;if(!o||!Object.hasOwn(o,d))return!1;o=o[d]}return!0};default:throw new Error(`Unsupported accessor operator ${n.operator}`)}}function Z1(n,e){const t=n.operator,i=Ct(n.args[0]),r=Ct(n.args[1]);switch(t){case S.Equal:return s=>i(s)===r(s);case S.NotEqual:return s=>i(s)!==r(s);case S.LessThan:return s=>i(s)<r(s);case S.LessThanOrEqualTo:return s=>i(s)<=r(s);case S.GreaterThan:return s=>i(s)>r(s);case S.GreaterThanOrEqualTo:return s=>i(s)>=r(s);default:throw new Error(`Unsupported comparison operator ${t}`)}}function H1(n,e){const t=n.operator,i=n.args.length,r=new Array(i);for(let s=0;s<i;++s)r[s]=Ct(n.args[s]);switch(t){case S.Any:return s=>{for(let o=0;o<i;++o)if(r[o](s))return!0;return!1};case S.All:return s=>{for(let o=0;o<i;++o)if(!r[o](s))return!1;return!0};case S.Between:return s=>{const o=r[0](s),a=r[1](s),l=r[2](s);return o>=a&&o<=l};case S.In:return s=>{const o=r[0](s);for(let a=1;a<i;++a)if(o===r[a](s))return!0;return!1};case S.Not:return s=>!r[0](s);default:throw new Error(`Unsupported logical operator ${t}`)}}function q1(n,e){const t=n.operator,i=n.args.length,r=new Array(i);for(let s=0;s<i;++s)r[s]=Ct(n.args[s]);switch(t){case S.Multiply:return s=>{let o=1;for(let a=0;a<i;++a)o*=r[a](s);return o};case S.Divide:return s=>r[0](s)/r[1](s);case S.Add:return s=>{let o=0;for(let a=0;a<i;++a)o+=r[a](s);return o};case S.Subtract:return s=>r[0](s)-r[1](s);case S.Clamp:return s=>{const o=r[0](s),a=r[1](s);if(o<a)return a;const l=r[2](s);return o>l?l:o};case S.Mod:return s=>r[0](s)%r[1](s);case S.Pow:return s=>Math.pow(r[0](s),r[1](s));case S.Abs:return s=>Math.abs(r[0](s));case S.Floor:return s=>Math.floor(r[0](s));case S.Ceil:return s=>Math.ceil(r[0](s));case S.Round:return s=>Math.round(r[0](s));case S.Sin:return s=>Math.sin(r[0](s));case S.Cos:return s=>Math.cos(r[0](s));case S.Atan:return i===2?s=>Math.atan2(r[0](s),r[1](s)):s=>Math.atan(r[0](s));case S.Sqrt:return s=>Math.sqrt(r[0](s));default:throw new Error(`Unsupported numeric operator ${t}`)}}function J1(n,e){const t=n.args.length,i=new Array(t);for(let r=0;r<t;++r)i[r]=Ct(n.args[r]);return r=>{for(let s=0;s<t-1;s+=2)if(i[s](r))return i[s+1](r);return i[t-1](r)}}function Q1(n,e){const t=n.args.length,i=new Array(t);for(let r=0;r<t;++r)i[r]=Ct(n.args[r]);return r=>{const s=i[0](r);for(let o=1;o<t-1;o+=2)if(s===i[o](r))return i[o+1](r);return i[t-1](r)}}function ew(n,e){const t=n.args.length,i=new Array(t);for(let r=0;r<t;++r)i[r]=Ct(n.args[r]);return r=>{const s=i[0](r),o=i[1](r);let a,l;for(let h=2;h<t;h+=2){const d=i[h](r);let u=i[h+1](r);const g=Array.isArray(u);if(g&&(u=fv(u)),d>=o)return h===2?u:g?iw(s,o,a,l,d,u):xr(s,o,a,l,d,u);a=d,l=u}return l}}function tw(n,e){const t=n.operator,i=n.args.length,r=new Array(i);for(let s=0;s<i;++s)r[s]=Ct(n.args[s]);if(t===S.ToString)return s=>{const o=r[0](s);return n.args[0].type===yt?lc(o):o.toString()};throw new Error(`Unsupported convert operator ${t}`)}function xr(n,e,t,i,r,s){const o=r-t;if(o===0)return i;const a=e-t,l=n===1?a/o:(Math.pow(n,a)-1)/(Math.pow(n,o)-1);return i+l*(s-i)}function iw(n,e,t,i,r,s){if(r-t===0)return i;const a=Gh(i),l=Gh(s);let h=l[2]-a[2];h>180?h-=360:h<-180&&(h+=360);const d=[xr(n,e,t,a[0],r,l[0]),xr(n,e,t,a[1],r,l[1]),a[2]+xr(n,e,t,0,r,h),xr(n,e,t,i[3],r,s[3])];return mv(d)}class Oo extends Ao{constructor(e){super({opacity:1,rotateWithView:e.rotateWithView!==void 0?e.rotateWithView:!1,rotation:e.rotation!==void 0?e.rotation:0,scale:e.scale!==void 0?e.scale:1,displacement:e.displacement!==void 0?e.displacement:[0,0],declutterMode:e.declutterMode}),this.hitDetectionCanvas_=null,this.fill_=e.fill!==void 0?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius=e.radius,this.radius2_=e.radiu
10s2,this.angle_=e.angle!==void 0?e.angle:0,this.stroke_=e.stroke!==void 0?e.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?q.LOADING:q.LOADED,this.imageState_===q.LOADING&&this.ready().then(()=>this.imageState_=q.LOADED),this.render()}clone(){const e=this.getScale(),t=new Oo({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return t.setOpacity(this.getOpacity()),t}getAnchor(){const e=this.size_,t=this.getDisplacement(),i=this.getScaleArray();return[e[0]/2-t[0]/i[0],e[1]/2+t[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(e){this.fill_=e,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(e){const t=this.fill_?.getKey(),i=`${e},${this.angle_},${this.radius},${this.radius2_},${this.points_},${t}`+Object.values(this.renderOptions_).join(",");let r=ht.get(i,null)?.getImage(1);if(!r){const s=this.renderOptions_,o=Math.ceil(s.size*e),a=xe(o,o);this.draw_(s,a,e),r=a.canvas;const l=new ug(r,void 0,null,q.LOADED,null);ht.set(i,null,l),createImageBitmap(r).then(h=>{l.setImage(h)})}return r}getPixelRatio(e){return e}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}setRadius(e){this.radius!==e&&(this.radius=e,this.render())}getRadius2(){return this.radius2_}setRadius2(e){this.radius2_!==e&&(this.radius2_=e,this.render())}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e,this.render()}listenImageChange(e){}load(){}unlistenImageChange(e){}calculateLineJoinSize_(e,t,i){if(t===0||this.points_===1/0||e!=="bevel"&&e!=="miter")return t;let r=this.radius,s=this.radius2_===void 0?r:this.radius2_;if(r<s){const k=r;r=s,s=k}const o=this.radius2_===void 0?this.points_:this.points_*2,a=2*Math.PI/o,l=s*Math.sin(a),h=Math.sqrt(s*s-l*l),d=r-h,u=Math.sqrt(l*l+d*d),g=u/l;if(e==="miter"&&g<=i)return g*t;const f=t/2/g,m=t/2*(d/u),p=Math.sqrt((r+f)*(r+f)+m*m)-r;if(this.radius2_===void 0||e==="bevel")return p*2;const v=r*Math.sin(a),w=Math.sqrt(r*r-v*v),x=s-w,b=Math.sqrt(v*v+x*x)/v;if(b<=i){const k=b*t/2-s-r;return 2*Math.max(p,k)}return p*2}createRenderOptions(){let e=Yn,t=Kn,i=0,r=null,s=0,o,a=0;this.stroke_&&(o=At(this.stroke_.getColor()??jt),a=this.stroke_.getWidth()??Wr,r=this.stroke_.getLineDash(),s=this.stroke_.getLineDashOffset()??0,t=this.stroke_.getLineJoin()??Kn,e=this.stroke_.getLineCap()??Yn,i=this.stroke_.getMiterLimit()??Nr);const l=this.calculateLineJoinSize_(t,a,i),h=Math.max(this.radius,this.radius2_||0),d=Math.ceil(2*h+l);return{strokeStyle:o,strokeWidth:a,size:d,lineCap:e,lineDash:r,lineDashOffset:s,lineJoin:t,miterLimit:i}}render(){this.renderOptions_=this.createRenderOptions();const e=this.renderOptions_.size;this.hitDetectionCanvas_=null,this.size_=[e,e]}draw_(e,t,i){if(t.scale(i,i),t.translate(e.size/2,e.size/2),this.createPath_(t),this.fill_){let r=this.fill_.getColor();r===null&&(r=Ue),t.fillStyle=At(r),t.fill()}e.strokeStyle&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke())}createHitDetectionCanvas_(e){let t;if(this.fill_){let i=this.fill_.getColor(),r=0;typeof i=="string"&&(i=rn(i)),i===null?r=1:Array.isArray(i)&&(r=i.length===4?i[3]:1),r===0&&(t=xe(e.size,e.size),this.drawHitDetectionCanvas_(e,t))}return t?t.canvas:this.getImage(1)}createPath_(e){let t=this.points_;const i=this.radius;if(t===1/0)e.arc(0,0,i,0,2*Math.PI);else{const r=this.radius2_===void 0?i:this.radius2_;this.radius2_!==void 0&&(t*=2);const s=this.angle_-Math.PI/2,o=2*Math.PI/t;for(let a=0;a<t;
10a++){const l=s+a*o,h=a%2===0?i:r;e.lineTo(h*Math.cos(l),h*Math.sin(l))}e.closePath()}}drawHitDetectionCanvas_(e,t){t.translate(e.size/2,e.size/2),this.createPath_(t),t.fillStyle=Ue,t.fill(),e.strokeStyle&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke())}ready(){return this.fill_?this.fill_.ready():Promise.resolve()}}class mn extends Oo{constructor(e){e=e||{radius:5},super({points:1/0,fill:e.fill,radius:e.radius,stroke:e.stroke,scale:e.scale!==void 0?e.scale:1,rotation:e.rotation!==void 0?e.rotation:0,rotateWithView:e.rotateWithView!==void 0?e.rotateWithView:!1,displacement:e.displacement!==void 0?e.displacement:[0,0],declutterMode:e.declutterMode})}clone(){const e=this.getScale(),t=new mn({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return t.setOpacity(this.getOpacity()),t}}class gt{constructor(e){e=e||{},this.patternImage_=null,this.color_=null,e.color!==void 0&&this.setColor(e.color)}clone(){const e=this.getColor();return new gt({color:Array.isArray(e)?e.slice():e||void 0})}getColor(){return this.color_}setColor(e){if(e!==null&&typeof e=="object"&&"src"in e){const t=Pr(null,e.src,{crossOrigin:"anonymous"},void 0,e.offset?null:e.color?e.color:null,!(e.offset&&e.size));t.ready().then(()=>{this.patternImage_=null}),t.getImageState()===q.IDLE&&t.load(),t.getImageState()===q.LOADING&&(this.patternImage_=t)}this.color_=e}getKey(){const e=this.getColor();return e?e instanceof CanvasPattern||e instanceof CanvasGradient?H(e):typeof e=="object"&&"src"in e?e.src+":"+e.offset:rn(e).toString():""}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}class ni{constructor(e){e=e||{},this.color_=e.color!==void 0?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=e.lineDash!==void 0?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.offset_=e.offset,this.width_=e.width}clone(){const e=this.getColor();return new ni({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),offset:this.getOffset(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getOffset(){return this.offset_}getWidth(){return this.width_}setColor(e){this.color_=e}setLineCap(e){this.lineCap_=e}setLineDash(e){this.lineDash_=e}setLineDashOffset(e){this.lineDashOffset_=e}setLineJoin(e){this.lineJoin_=e}setMiterLimit(e){this.miterLimit_=e}setOffset(e){this.offset_=e}setWidth(e){this.width_=e}}class $e{constructor(e){e=e||{},this.geometry_=null,this.geometryFunction_=ad,e.geometry!==void 0&&this.setGeometry(e.geometry),this.fill_=e.fill!==void 0?e.fill:null,this.image_=e.image!==void 0?e.image:null,this.renderer_=e.renderer!==void 0?e.renderer:null,this.hitDetectionRenderer_=e.hitDetectionRenderer!==void 0?e.hitDetectionRenderer:null,this.stroke_=e.stroke!==void 0?e.stroke:null,this.text_=e.text!==void 0?e.text:null,this.zIndex_=e.zIndex}clone(){let e=this.getGeometry();return e&&typeof e=="object"&&(e=e.clone()),new $e({geometry:e??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(e){this.renderer_=e}setHitDetectionRenderer(e){this.hitDetectionRenderer_=e}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(e){this.fill_=e}getImage(){return this.image_}setImage(e){this.image_=e}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e}getText(){return this.text_}setText(e){this.text_=e}getZIndex(){return this.zIndex_}setGeometry(e){typeof e=="function"?this.geometryFunction_=e:typeof e=="string"?this.geometryFunction_=function(t){return t.get(e)}:e?e!==void 0&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=ad,this.geometry_=e}setZIndex(e){this.zIndex_=e}}function nw(n){let e;if(typeof n=="function")e=n;else{let t;Array.isArray(n)?t=n:(oe(typeof n.getZIndex=="function","Expected an `Style` or an array of `Style`"),t=[n]),e=function(){return t}}return e}let xa=null;function Fg(n,e){if(!xa){const t=new gt({color:"rgba(255,255,255,0.4)"}),i=new ni({color:"#3399CC",width:1.25});xa=[new $e({image:new mn({fill:t,stroke:i,radius:5}),fill:t,stroke:i})]}return xa}function jg(){const n={},e=[255,255,255,1],t=[0,153,255,1],i=3;return n.Polygon=[new $e({fill:new gt({color:[255,255,255,.5]})})],n.MultiPolygon=n.Polygon,n.LineString=[new $e({stroke:new ni({color:e,width:i+2})}),new $e({stroke:new ni({color:t,width:i})})],n.MultiLineString=n.LineString,n.Circle=n.Polygon.concat(n.LineString),n.Point=[new $e({image:new mn({radius:i*2,fill:new gt({color:t}),stroke:new ni({color:e,width:i/2})}),zIndex:1/0})],n.MultiPoint=n.Point,n.GeometryCollection=n.Polygon.concat(n.LineString,n.Point),n}function ad(n){return n.getGeometry()}const rw="#333";class fc{constructor(e){e=e||{},this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.keepUpright_=e.keepUpright,this.scale_=e.scale,this.scaleArray_=Ze(e.scale!==void 0?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.justify_=e.justify,this.repeat_=e.repeat,this.textBaseline_=e.textBaseline,this.fill_=e.fill!==void 0?e.fill:new gt({color:rw}),this.maxAngle_=e.maxAngle!==void 0?e.maxAngle:Math.PI/4,this.placement_=e.placement!==void 0?e.placement:"point",this.overflow_=!!e.overflow,this.stroke_=e.stroke!==void 0?e.stroke:null,this.offsetX_=e.offsetX!==void 0?e.offsetX:0,this.offsetY_=e.offsetY!==void 0?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=e.padding===void 0?null:e.padding,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new fc({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),keepUpright:this.getKeepUpright(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()instanceof gt?this.getFill().clone():this.getFill(),stroke:this.getStroke()?this.get
10Stroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getKeepUpright(){return this.keepUpright_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(e){this.overflow_=e}setFont(e){this.font_=e}setMaxAngle(e){this.maxAngle_=e}setOffsetX(e){this.offsetX_=e}setOffsetY(e){this.offsetY_=e}setPlacement(e){this.placement_=e}setRepeat(e){this.repeat_=e}setRotateWithView(e){this.rotateWithView_=e}setKeepUpright(e){this.keepUpright_=e}setFill(e){this.fill_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=Ze(e!==void 0?e:1)}setStroke(e){this.stroke_=e}setText(e){this.text_=e}setTextAlign(e){this.textAlign_=e}setJustify(e){this.justify_=e}setTextBaseline(e){this.textBaseline_=e}setBackgroundFill(e){this.backgroundFill_=e}setBackgroundStroke(e){this.backgroundStroke_=e}setPadding(e){this.padding_=e}}function sw(n){return!0}function ow(n){const e=Ag(),t=aw(n,e),i=Og();return function(r,s){if(i.properties=r.getPropertiesInternal(),i.resolution=s,e.featureId){const o=r.getId();o!==void 0?i.featureId=o:i.featureId=null}return e.geometryType&&(i.geometryType=Dg(r.getGeometry())),t(i)}}function ld(n){const e=Ag(),t=n.length,i=new Array(t);for(let o=0;o<t;++o)i[o]=gl(n[o],e);const r=Og(),s=new Array(t);return function(o,a){if(r.properties=o.getPropertiesInternal(),r.resolution=a,e.featureId){const h=o.getId();h!==void 0?r.featureId=h:r.featureId=null}let l=0;for(let h=0;h<t;++h){const d=i[h](r);d&&(s[l]=d,l+=1)}return s.length=l,s}}function aw(n,e){const t=n.length,i=new Array(t);for(let r=0;r<t;++r){const s=n[r],o="filter"in s?Nt(s.filter,Ge,e):sw;let a;if(Array.isArray(s.style)){const l=s.style.length;a=new Array(l);for(let h=0;h<l;++h)a[h]=gl(s.style[h],e)}else a=[gl(s.style,e)];i[r]={filter:o,styles:a}}return function(r){const s=[];let o=!1;for(let a=0;a<t;++a){const l=i[a].filter;if(l(r)&&!(n[a].else&&o)){o=!0;for(const h of i[a].styles){const d=h(r);d&&s.push(d)}}}return s}}function gl(n,e){const t=Gr(n,"",e),i=Br(n,"",e),r=lw(n,e),s=cw(n,e),o=Le(n,"z-index",e);if(!t&&!i&&!r&&!s&&!Xn(n))throw new Error("No fill, stroke, point, or text symbolizer properties in style: "+JSON.stringify(n));const a=new $e;return function(l){let h=!0;if(t){const d=t(l);d&&(h=!1),a.setFill(d)}if(i){const d=i(l);d&&(h=!1),a.setStroke(d)}if(r){const d=r(l);d&&(h=!1),a.setText(d)}if(s){const d=s(l);d&&(h=!1),a.setImage(d)}return o&&a.setZIndex(o(l)),h?null:a}}function Gr(n,e,t){let i;if(e+"fill-pattern-src"in n)i=gw(n,e+"fill-",t);else{if(n[e+"fill-color"]==="none")return s=>null;i=Fo(n,e+"fill-color",t)}if(!i)return null;const r=new gt;return function(s){const o=i(s);return o===oc?null:(r.setColor(o),r)}}function Br(n,e,t){const i=Le(n,e+"stroke-width",t),r=Fo(n,e+"stroke-color",t);if(!i&&!r)return null;const s=Zt(n,e+"stroke-line-cap",t),o=Zt(n,e+"stroke-line-join",t),a=Ng(n,e+"stroke-line-dash",t),l=Le(n,e+"stroke-line-dash-offset",t),h=Le(n,e+"stroke-miter-limit",t),d=Le(n,e+"stroke-offset",t),u=new ni;return function(g){if(r){const f=r(g);if(f===oc)return null;u.setColor(f)}if(i&&u.setWidth(i(g)),s){const f=s(g);if(f!=="butt"&&f!=="round"&&f!=="square")throw new Error("Expected butt, round, or square line cap");u.setLineCap(f)}if(o){const f=o(g);if(f!=="bevel"&&f!=="round"&&f!=="miter")throw new Error("Expected bevel, round, or miter line join");u.setLineJoin(f)}return a&&u.setLineDash(a(g)),l&&u.setLineDashOffset(l(g)),h&&u.setMiterLimit(h(g)),d&&u.setOffset(d(g)),u}}function lw(n,e){const t="text-",i=Zt(n,t+"value",e);if(!i)return null;const r=Gr(n,t,e),s=Gr(n,t+"background-",e),o=Br(n,t,e),a=Br(n,t+"background-",e),l=Zt
10(n,t+"font",e),h=Le(n,t+"max-angle",e),d=Le(n,t+"offset-x",e),u=Le(n,t+"offset-y",e),g=jn(n,t+"overflow",e),f=Zt(n,t+"placement",e),m=Le(n,t+"repeat",e),_=jo(n,t+"scale",e),p=jn(n,t+"rotate-with-view",e),v=Le(n,t+"rotation",e),w=Zt(n,t+"align",e),x=Zt(n,t+"justify",e),y=Zt(n,t+"baseline",e),b=jn(n,t+"keep-upright",e),k=Ng(n,t+"padding",e),R=No(n,t+"declutter-mode"),T=new fc({declutterMode:R});return function(E){if(T.setText(i(E)),r&&T.setFill(r(E)),s&&T.setBackgroundFill(s(E)),o&&T.setStroke(o(E)),a&&T.setBackgroundStroke(a(E)),l&&T.setFont(l(E)),h&&T.setMaxAngle(h(E)),d&&T.setOffsetX(d(E)),u&&T.setOffsetY(u(E)),g&&T.setOverflow(g(E)),f){const C=f(E);if(C!=="point"&&C!=="line")throw new Error("Expected point or line for text-placement");T.setPlacement(C)}if(m&&T.setRepeat(m(E)),_&&T.setScale(_(E)),p&&T.setRotateWithView(p(E)),v&&T.setRotation(v(E)),w){const C=w(E);if(C!=="left"&&C!=="center"&&C!=="right"&&C!=="end"&&C!=="start")throw new Error("Expected left, right, center, start, or end for text-align");T.setTextAlign(C)}if(x){const C=x(E);if(C!=="left"&&C!=="right"&&C!=="center")throw new Error("Expected left, right, or center for text-justify");T.setJustify(C)}if(y){const C=y(E);if(C!=="bottom"&&C!=="top"&&C!=="middle"&&C!=="alphabetic"&&C!=="hanging")throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");T.setTextBaseline(C)}return k&&T.setPadding(k(E)),b&&T.setKeepUpright(b(E)),T}}function cw(n,e){return"icon-src"in n?hw(n,e):"shape-points"in n?dw(n,e):"circle-radius"in n?uw(n,e):null}function hw(n,e){const t="icon-",i=t+"src",r=zg(n[i],i),s=no(n,t+"anchor",e),o=jo(n,t+"scale",e),a=Le(n,t+"opacity",e),l=no(n,t+"displacement",e),h=Le(n,t+"rotation",e),d=jn(n,t+"rotate-with-view",e),u=hd(n,t+"anchor-origin"),g=dd(n,t+"anchor-x-units"),f=dd(n,t+"anchor-y-units"),m=ui(n,t+"color");let _,p=null;m!==void 0&&(Array.isArray(m)&&m.length>0&&typeof m[0]=="string"?p=Fo(n,t+"color",e):_=Wg(m,t+"color"));const v=mw(n,t+"cross-origin"),w=pw(n,t+"offset"),x=hd(n,t+"offset-origin"),y=fl(n,t+"width"),b=fl(n,t+"height"),k=fw(n,t+"size"),R=No(n,t+"declutter-mode"),T={src:r,anchorOrigin:u,anchorXUnits:g,anchorYUnits:f,crossOrigin:v,offset:w,offsetOrigin:x,height:b,width:y,size:k,declutterMode:R};let E=null;return function(C){if(E)p&&E.setColor(p(C));else{const M=p?p(C):_;E=new Do(M!==void 0?Object.assign({},T,{color:M}):Object.assign({},T))}return a&&E.setOpacity(a(C)),l&&E.setDisplacement(l(C)),h&&E.setRotation(h(C)),d&&E.setRotateWithView(d(C)),o&&E.setScale(o(C)),s&&E.setAnchor(s(C)),E}}function dw(n,e){const t="shape-",i=t+"points",r=t+"radius",s=mc(n[i],i);if(!(r in n))throw new Error(`Expected a number for ${r}`);const o=Le(n,r,e),a=typeof n[r]=="number"?n[r]:5,l=t+"radius2",h=Le(n,l,e),d=typeof n[l]=="number"?n[l]:void 0,u=Gr(n,t,e),g=Br(n,t,e),f=jo(n,t+"scale",e),m=no(n,t+"displacement",e),_=Le(n,t+"rotation",e),p=jn(n,t+"rotate-with-view",e),v=fl(n,t+"angle"),w=No(n,t+"declutter-mode"),x=new Oo({points:s,radius:a,radius2:d,angle:v,declutterMode:w});return function(y){return o&&x.setRadius(o(y)),h&&x.setRadius2(h(y)),u&&x.setFill(u(y)),g&&x.setStroke(g(y)),m&&x.setDisplacement(m(y)),_&&x.setRotation(_(y)),p&&x.setRotateWithView(p(y)),f&&x.setScale(f(y)),x}}function uw(n,e){const t="circle-",i=Gr(n,t,e),r=Br(n,t,e),s=Le(n,t+"radius",e),o=jo(n,t+"scale",e),a=no(n,t+"displacement",e),l=Le(n,t+"rotation",e),h=jn(n,t+"rotate-with-view",e),d=No(n,t+"declutter-mode"),u=new mn({radius:5,declutterMode:d});return function(g){return s&&u.setRadius(s(g)),i&&u.setFill(i(g)),r&&u.setStroke(r(g)),a&&u.setDisplacement(a(g)),l&&u.setRotation(l(g)),h&&u.setRotateWithView(h(g)),o&&u.setScale(o(g)),u}}function ui(n,e){if(!(e in n))return;const t=n[e];return t===void 0?void 0:t}function Le(n,e,t){const i=ui(n,e);if(i===void 0)return;const r=Nt(i,ie,t);return function(s){return mc(r(s),e)}}function Zt(n,e,t){const i=ui(n,e);if(i===void 0)return null;const r=Nt(i,Ye,t);return function(s){return zg(r(s),e)}}function gw(n,e,t){const i=Zt(n,e+"pattern-src",t),r=cd(n,e+"pattern-offset",t),s=cd(n,e+"pattern-size",t),o=Fo(n,e+"color",t);return function(a){return{src:i(a),offset:r&&r(a),size:s&&s(a),color:o&&o(a)}}}function jn(n,e,t){const i=ui(n,e);if(i===void 0)return null;const r=Nt(i,Ge,t);return function(s){const o=r(s);if(typeof o!="boolean")throw new Error(`Expected a boolean for ${e}`);return o}}function Fo(n,e,t){const i=ui(n,e);if(i===void 0)return null;const r=Nt(i,yt,t);return function(s){return Wg(r(s),e)}}function Ng(n,e,t){const i=ui(n,e);if(i===void 0)return null;
10if(Array.isArray(i)&&(i.length===0||typeof i[0]!="string")){const s=i.map((o,a)=>{if(typeof o=="number")return()=>o;const l=Nt(o,ie,t);return function(h){return mc(l(h),`${e}[${a}]`)}});return function(o){const a=new Array(s.length);for(let l=0;l<s.length;++l)a[l]=s[l](o);return a}}const r=Nt(i,on,t);return function(s){return os(r(s),e)}}function no(n,e,t){const i=ui(n,e);if(i===void 0)return null;const r=Nt(i,on,t);return function(s){const o=os(r(s),e);if(o.length!==2)throw new Error(`Expected two numbers for ${e}`);return o}}function cd(n,e,t){const i=ui(n,e);if(i===void 0)return null;const r=Nt(i,on,t);return function(s){return Gg(r(s),e)}}function jo(n,e,t){const i=ui(n,e);if(i===void 0)return null;const r=Nt(i,on|ie,t);return function(s){return _w(r(s),e)}}function fl(n,e){const t=n[e];if(t!==void 0){if(typeof t!="number")throw new Error(`Expected a number for ${e}`);return t}}function fw(n,e){const t=n[e];if(t!==void 0){if(typeof t=="number")return Ze(t);if(!Array.isArray(t))throw new Error(`Expected a number or size array for ${e}`);if(t.length!==2||typeof t[0]!="number"||typeof t[1]!="number")throw new Error(`Expected a number or size array for ${e}`);return t}}function mw(n,e){const t=n[e];if(t!==void 0){if(typeof t!="string")throw new Error(`Expected a string for ${e}`);return t}}function hd(n,e){const t=n[e];if(t!==void 0){if(t!=="bottom-left"&&t!=="bottom-right"&&t!=="top-left"&&t!=="top-right")throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${e}`);return t}}function dd(n,e){const t=n[e];if(t!==void 0){if(t!=="pixels"&&t!=="fraction")throw new Error(`Expected pixels or fraction for ${e}`);return t}}function pw(n,e){const t=n[e];if(t!==void 0)return os(t,e)}function No(n,e){const t=n[e];if(t!==void 0){if(typeof t!="string")throw new Error(`Expected a string for ${e}`);if(t!=="declutter"&&t!=="obstacle"&&t!=="none")throw new Error(`Expected declutter, obstacle, or none for ${e}`);return t}}function os(n,e){if(!Array.isArray(n))throw new Error(`Expected an array for ${e}`);const t=n.length;for(let i=0;i<t;++i)if(typeof n[i]!="number")throw new Error(`Expected an array of numbers for ${e}`);return n}function zg(n,e){if(typeof n!="string")throw new Error(`Expected a string for ${e}`);return n}function mc(n,e){if(typeof n!="number")throw new Error(`Expected a number for ${e}`);return n}function Wg(n,e){if(typeof n=="string")return n;const t=os(n,e),i=t.length;if(i<3||i>4)throw new Error(`Expected a color with 3 or 4 values for ${e}`);return t}function Gg(n,e){const t=os(n,e);if(t.length!==2)throw new Error(`Expected an array of two numbers for ${e}`);return t}function _w(n,e){return typeof n=="number"?n:Gg(n,e)}const _t={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};function ud(n,e,t){return(function(i,r,s,o,a){if(!i)return;if(!r&&!e)return i;const l=e?0:s[0]*r,h=e?0:s[1]*r,d=a?a[0]:0,u=a?a[1]:0;let g=n[0]+l/2+d,f=n[2]-l/2+d,m=n[1]+h/2+u,_=n[3]-h/2+u;g>f&&(g=(f+g)/2,f=g),m>_&&(m=(_+m)/2,_=m);let p=me(i[0],g,f),v=me(i[1],m,_);if(o&&t&&r){const w=30*r;p+=-w*Math.log(1+Math.max(0,g-i[0])/w)+w*Math.log(1+Math.max(0,i[0]-f)/w),v+=-w*Math.log(1+Math.max(0,m-i[1])/w)+w*Math.log(1+Math.max(0,i[1]-_)/w)}return[p,v]})}function vw(n){return n}function Bg(n){return Math.pow(n,3)}function qn(n){return 1-Bg(1-n)}function ww(n){return 3*n*n-2*n*n*n}function yw(n){return n}function $g(n,e,t,i){let r=0;const s=n[t-i],o=n[t-i+1];let a=0,l=0;for(;e<t;e+=i){const h=n[e]-s,d=n[e+1]-o;r+=l*h-a*d,a=h,l=d}return r/2}function Vg(n,e,t,i){let r=0;for(let s=0,o=t.length;s<o;++s){const a=t[s];r+=$g(n,e,a,i),e=a}return r}function xw(n,e,t,i){let r=0;for(let s=0,o=t.length;s<o;++s){const a=t[s];r+=Vg(n,e,a,i),e=a[a.length-1]}return r}function gd(n,e,t,i,r,s,o){const a=n[e],l=n[e+1],h=n[t]-a,d=n[t+1]-l;let u;if(h===0&&d===0)u=e;else{const g=((r-a)*h+(s-l)*d)/(h*h+d*d);if(g>1)u=t;else if(g>0){for(let f=0;f<i;++f)o[f]=nt(n[e+f],n[t+f],g);o.length=i;return}else u=e}for(let g=0;g<i;++g)o[g]=n[u+g];o.length=i}function pc(n,e,t,i,r){let s=n[e],o=n[e+1];for(e+=i;e<t;e+=i){const a=n[e],l=n[e+1],h=Qt(s,o,a,l);h>r&&(r=h),s=a,o=l}return r}function _c(n,e,t,i,r){for(let s=0,o=t.length;s<o;++s){const a=t[s];r=pc(n,e,a,i,r),e=a}return r}function bw(n,e,t,i,r){for(let s=0,o=t.length;s<o;++s){const a=t[s];r=_c(n,e,a,i,r),e=a[a.length-1]}return r}function vc(n,e,t,i,r,s,o,a,l,h,d){if(e==t)return h;let u,g;if(r===0){if(g=Qt(o,a,n[e],n[e+1]),g<h){for(u=0;
vendor: 4,678 bytes, line 10
10u<i;++u)l[u]=n[e+u];return l.length=i,g}return h}d=d||[NaN,NaN];let f=e+i;for(;f<t;)if(gd(n,f-i,f,i,o,a,d),g=Qt(o,a,d[0],d[1]),g<h){for(h=g,u=0;u<i;++u)l[u]=d[u];l.length=i,f+=i}else f+=i*Math.max((Math.sqrt(g)-Math.sqrt(h))/r|0,1);if(s&&(gd(n,t-i,e,i,o,a,d),g=Qt(o,a,d[0],d[1]),g<h)){for(h=g,u=0;u<i;++u)l[u]=d[u];l.length=i}return h}function wc(n,e,t,i,r,s,o,a,l,h,d){d=d||[NaN,NaN];for(let u=0,g=t.length;u<g;++u){const f=t[u];h=vc(n,e,f,i,r,s,o,a,l,h,d),e=f}return h}function Ew(n,e,t,i,r,s,o,a,l,h,d){d=d||[NaN,NaN];for(let u=0,g=t.length;u<g;++u){const f=t[u];h=wc(n,e,f,i,r,s,o,a,l,h,d),e=f[f.length-1]}return h}function Xg(n,e,t,i){for(let r=0,s=t.length;r<s;++r)n[e++]=t[r];return e}function zo(n,e,t,i){for(let r=0,s=t.length;r<s;++r){const o=t[r];for(let a=0;a<i;++a)n[e++]=o[a]}return e}function yc(n,e,t,i,r){r=r||[];let s=0;for(let o=0,a=t.length;o<a;++o){const l=zo(n,e,t[o],i);r[s++]=l,e=l}return r.length=s,r}function Cw(n,e,t,i,r){r=r||[];let s=0;for(let o=0,a=t.length;o<a;++o){const l=yc(n,e,t[o],i,r[s]);l.length===0&&(l[0]=e),r[s++]=l,e=l[l.length-1]}return r.length=s,r}class $r extends Fi{constructor(e,t){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,t!==void 0&&!Array.isArray(e[0])?this.setFlatCoordinates(t,e):this.setCoordinates(e,t)}clone(){return new $r(this.flatCoordinates.slice(),this.layout)}closestPointXY(e,t,i,r){return r<dn(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(pc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),vc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,e,t,i,r))}getArea(){return $g(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return Ri(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(e){const t=[];return t.length=Lo(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0),new $r(t,"XY")}getType(){return"LinearRing"}intersectsExtent(e){return!1}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=zo(this.flatCoordinates,0,e,this.stride),this.changed()}}class ut extends Fi{constructor(e,t){super(),this.setCoordinates(e,t)}clone(){const e=new ut(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,i,r){const s=this.flatCoordinates,o=Qt(e,t,s[0],s[1]);if(o<r){const a=this.stride;for(let l=0;l<a;++l)i[l]=s[l];return i.length=a,o}return r}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(e){return Rr(this.flatCoordinates,e)}getType(){return"Point"}intersectsExtent(e){return Kl(e,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(e,t){this.setLayout(t,e,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Xg(this.flatCoordinates,0,e,this.stride),this.changed()}}function kw(n,e,t,i,r){return!ql(r,function(o){return!qi(n,e,t,i,o[0],o[1])})}function qi(n,e,t,i,r,s){let o=0,a=n[t-i],l=n[t-i+1];for(;e<t;e+=i){const h=n[e],d=n[e+1];l<=s?d>s&&(h-a)*(s-l)-(r-a)*(d-l)>0&&o++:d<=s&&(h-a)*(s-l)-(r-a)*(d-l)<0&&o--,a=h,l=d}return o!==0}function xc(n,e,t,i,r,s){if(t.length===0||!qi(n,e,t[0],i,r,s))return!1;for(let o=1,a=t.length;o<a;++o)if(qi(n,t[o-1],t[o],i,r,s))return!1;return!0}function Sw(n,e,t,i,r,s){if(t.length===0)return!1;for(let o=0,a=t.length;o<a;++o){const l=t[o];if(xc(n,e,l,i,r,s))return!0;e=l[l.length-1]}return!1}function bc(n,e,t,i,r,s,o){let a,l,h,d,u,g,f;const m=r[s+1],_=[];for(let w=0,x=t.length;w<x;++w){const y=t[w];for(d=n[y-i],g=n[y-i+1],a=e;a<y;a+=i)u=n[a],f=n[a+1],(m<=g&&f<=m||g<=m&&m<=f)&&(h=(m-g)/(f-g)*(u-d)+d,_.push(h)),d=u,g=f}let p=NaN,v=-1/0;for(_.sort(Jt),d=_[0],a=1,l=_.length;a<l;++a){u=_[a];const w=Math.abs(u-d);w>v&&(h=(d+u)/2,xc(n,e,t,i,h,m)&&(p=h,v=w)),d=u}return isNaN(p)&&(p=r[s]),o?(o.push(p,m,v),o):[p,m,v]}function Ug(n,e,t,i,r){let s=[];for(let o=0,a=t.length;o<a;++o){const l=t[o];s=bc(n,e,l,i,r,2*o,s),e=l[l.length-1]}return s}function Yg(n,e,t,i,r){let s;for(e+=i;e<t;e+=i)if(s=r(n.slice(e-i,e),n.slice(e,e+i)),s)return s;return!1}function fd(n,e){const[t,i]=n,[r,s]=e,o=((t[0]-r[0])*(r[1]-s[1])-(t[1]-r[1])*(r[0]-s[0]))/((t[0]-i[0])*(r[1]-s[1])-(t[1]-i[1])*(r[0]-s[0])),a=((t[0]-r[0])*(t[1]-i[1])-(t[1]-r[1])*(t[0]-i[0]))/((t[0]-i[0])*(r[1]-s[1])-(t[1]-i[1])*(r[0]-s[0]));if(0<=o&&o<=1&&0<=a&&a<=1)return[t[0]+o*(i[0]-t[0]),t[1]+o*(i[1]-t[1])]}function Wo(n,e,t,i,r,s){return s=s??Ku(rt(),n,e,t,i),je(r,s)?s[0]>=r[0]&&s[2]<=r[2]||s[1]>=r[1]&&s[3]<=r[3]?!0:Yg(n,e,t,i,function(o,a){return __(r,o,a)}):!1}function Tw(n,e,t,i,r){for(let s=0,o=t.length;s<o;
10++s){if(Wo(n,e,t[s],i,r))return!0;e=t[s]}return!1}function Kg(n,e,t,i,r){return!!(Wo(n,e,t,i,r)||qi(n,e,t,i,r[0],r[1])||qi(n,e,t,i,r[0],r[3])||qi(n,e,t,i,r[2],r[1])||qi(n,e,t,i,r[2],r[3]))}function Zg(n,e,t,i,r){if(!Kg(n,e,t[0],i,r))return!1;if(t.length===1)return!0;for(let s=1,o=t.length;s<o;++s)if(kw(n,t[s-1],t[s],i,r)&&!Wo(n,t[s-1],t[s],i,r))return!1;return!0}function Rw(n,e,t,i,r){for(let s=0,o=t.length;s<o;++s){const a=t[s];if(Zg(n,e,a,i,r))return!0;e=a[a.length-1]}return!1}function Iw(n,e,t,i){for(;e<t-i;){for(let r=0;r<i;++r){const s=n[e+r];n[e+r]=n[t-i+r],n[t-i+r]=s}e+=i,t-=i}}function Ec(n,e,t,i){let r=0,s=n[t-i],o=n[t-i+1];for(;e<t;e+=i){const a=n[e],l=n[e+1];r+=(a-s)*(l+o),s=a,o=l}return r===0?void 0:r>0}function Hg(n,e,t,i,r){r=r!==void 0?r:!1;for(let s=0,o=t.length;s<o;++s){const a=t[s],l=Ec(n,e,a,i);if(s===0){if(r&&l||!r&&!l)return!1}else if(r&&!l||!r&&l)return!1;e=a}return!0}function Mw(n,e,t,i,r){for(let s=0,o=t.length;s<o;++s){const a=t[s];if(!Hg(n,e,a,i,r))return!1;a.length&&(e=a[a.length-1])}return!0}function ml(n,e,t,i,r){r=r!==void 0?r:!1;for(let s=0,o=t.length;s<o;++s){const a=t[s],l=Ec(n,e,a,i);(s===0?r&&l||!r&&!l:r&&!l||!r&&l)&&Iw(n,e,a,i),e=a}return e}function md(n,e,t,i,r){for(let s=0,o=t.length;s<o;++s)e=ml(n,e,t[s],i,r);return e}function Pw(n,e){const t=[];let i=0,r=0,s;for(let o=0,a=e.length;o<a;++o){const l=e[o],h=Ec(n,i,l,2);if(s===void 0&&(s=h),h===s)t.push(e.slice(r,o+1));else{if(t.length===0)continue;t[t.length-1].push(e[r])}r=o+1,i=l}return t}class kt extends Fi{constructor(e,t,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,t!==void 0&&i?(this.setFlatCoordinates(t,e),this.ends_=i):this.setCoordinates(e,t)}appendLinearRing(e){this.flatCoordinates?Ft(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const e=new kt(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}closestPointXY(e,t,i,r){return r<dn(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(_c(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),wc(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,e,t,i,r))}containsXY(e,t){return xc(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,t)}getArea(){return Vg(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(e){let t;return e!==void 0?(t=this.getOrientedFlatCoordinates().slice(),ml(t,0,this.ends_,this.stride,e)):t=this.flatCoordinates,jr(t,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const e=li(this.getExtent());this.flatInteriorPoint_=bc(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new ut(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(e){return e<0||this.ends_.length<=e?null:new $r(this.flatCoordinates.slice(e===0?0:this.ends_[e-1],this.ends_[e]),this.layout)}getLinearRings(){const e=this.layout,t=this.flatCoordinates,i=this.ends_,r=[];let s=0;for(let o=0,a=i.length;o<a;++o){const l=i[o],h=new $r(t.slice(s,l),e);r.push(h),s=l}return r}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const e=this.flatCoordinates;Hg(e,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=ml(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(e){const t=[],i=[];return t.length=hc(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(e),t,0,i),new kt(t,"XY",i)}getType(){return"Polygon"}intersectsExtent(e){return Zg(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=yc(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()}}function pd(n){if(ts(n))throw new Error("Cannot create polygon from empty extent");const e=n[0],t=n[1],i=n[2],r=n[3],s=[e,t,e,r,i,r,i,t,e,t];return new kt(s,"XY",[s.length])}function Lw(n,e,t){e=e||32;const i=n.getStride(),r=n.getLayout(),s=n.getCenter(),o=i*(e+1),a=new Array(o);for(let d=0;d<o;d+=i){a[d]=0,a[d+1]=0;for(let u=2;u<i;u++)a[d+u]=s[u]}const l=[a.length],h=new kt(a,r,l);return Aw(h,s,n.getRadius()),h}function Aw(n,e,t,i){const r=n.getFlatCoordinates(),s=n.getStride(),o=r.length/s-1,a=0;for(let l=0;l<=o;++l){const h=l*s,d=a+Qi(l,o)*2*Math.PI/o;r[h]=e[0]+t*Math.cos(d),r[h+1]=e[1]+t*Math.sin(d)}n.changed()}function Cc(n,e,t,i){const r=de(e)/t[0],s=Be(e)/t[1];return i?Math.min(n,Math.max(r,s)):Math.min(n,Math.min(r,s))}function kc(n,e,t){let i=Math.min(n,e);const r=50;return i*=Math.log(1+r*Math.max(0,n/e-1))/r+1,t&&(i=Math.max(i,t),i/=Math.log(1+r*Math.max(0,t/n-1))/r+1),me(i,t/2,e*2)}function Dw(n,e,t,i){return e=e!==void 0?e:!0,(function(r,s,o,a){if(r!==void 0){const l=n[0],h=n[n.length-1],d=t?Cc(l,t,o,i):l;if(a)return e?kc(r,d,h):me(r,h,d);const u=Math.min(d,r),g=Math.floor(Yl(n,u,s));return n[g]>d&&g<n.length-1?n[g+1]:n[g]}})}function Ow(n,e,t,i,r,s){return i=i!==void 0?i:!0,t=t!==void 0?t:0,(function(o,a,l,h){if(o!==void 0){const d=r?Cc(e,r,l,s):e;if(h)return i?kc(o,d,t):me(o,t,d);const u=1e-9,g=Math.ceil(Math.log(e/d)/Math.log(n)-u),f=-a*(.5-u)+.5,m=Math.min(d,o),_=Math.floor(Math.log(e/m)/Math.log(n)+f),p=Math.max(g,_),v=e/Math.pow(n,p);return me(v,t,d)}})}function _d(n,e,t,i,r){return t=t!==void 0?t:!0,(function(s,o,a,l){if(s!==void 0){const h=i?Cc(n,i,a,r):n;return!t||!l?me(s,e,h):kc(s,h,e)}})}function Sc(n){if(n!==void 0)return 0}function vd(n){if(n!==void 0)return n}function Fw(n){const e=2*Math.PI/n;return(function(t,i){if(i)return t;if(t!==void 0)return t=Math.floor(t/e+.5)*e,t})}function jw(n){const e=Li(5);return(function(t,i){return i||t===void 0?t:Math.abs(t)<=e?0:t})}const Nw=42,Tc=256,ba=0;class xt extends Gt{constructor(e){super(),this.on,this.once,this.un,e=Object.assign({},e),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=rc(e.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,e.projection&&iv(),e.center&&(e.center=ue(e.center,this.projection_)),e.extent&&(e.extent=Ti(e.extent,this.projection_)),this.applyOptions_(e)}
10applyOptions_(e){const t=Object.assign({},e);for(const a in _t)delete t[a];this.setProperties(t,!0);const i=Ww(e);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=e.resolutions,this.padding_=e.padding,this.minZoom_=i.minZoom;const r=zw(e),s=i.constraint,o=Gw(e);this.constraints_={center:r,resolution:s,rotation:o},this.setRotation(e.rotation!==void 0?e.rotation:0),this.setCenterInternal(e.center!==void 0?e.center:null),e.resolution!==void 0?this.setResolution(e.resolution):e.zoom!==void 0&&this.setZoom(e.zoom)}get padding(){return this.padding_}set padding(e){let t=this.padding_;this.padding_=e;const i=this.getCenterInternal();if(i){const r=e||[0,0,0,0];t=t||[0,0,0,0];const s=this.getResolution(),o=s/2*(r[3]-t[3]+t[1]-r[1]),a=s/2*(r[0]-t[0]+t[2]-r[2]);this.setCenterInternal([i[0]+o,i[1]-a])}}getUpdatedOptions_(e){const t=this.getProperties();return t.resolution!==void 0?t.resolution=this.getResolution():t.zoom=this.getZoom(),t.center=this.getCenterInternal(),t.rotation=this.getRotation(),Object.assign({},t,e)}animate(e){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const t=new Array(arguments.length);for(let i=0;i<t.length;++i){let r=arguments[i];r.center&&(r=Object.assign({},r),r.center=ue(r.center,this.getProjection())),r.anchor&&(r=Object.assign({},r),r.anchor=ue(r.anchor,this.getProjection())),t[i]=r}this.animateInternal.apply(this,t)}animateInternal(e){let t=arguments.length,i;t>1&&typeof arguments[t-1]=="function"&&(i=arguments[t-1],--t);let r=0;for(;r<t&&!this.isDef();++r){const d=arguments[r];d.center&&this.setCenterInternal(d.center),d.zoom!==void 0?this.setZoom(d.zoom):d.resolution&&this.setResolution(d.resolution),d.rotation!==void 0&&this.setRotation(d.rotation)}if(r===t){i&&Is(i,!0);return}let s=Date.now(),o=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_;const h=[];for(;r<t;++r){const d=arguments[r],u={start:s,complete:!1,anchor:d.anchor,duration:d.duration!==void 0?d.duration:1e3,easing:d.easing||ww,callback:i};if(d.center&&(u.sourceCenter=o,u.targetCenter=d.center.slice(),o=u.targetCenter),d.zoom!==void 0?(u.sourceResolution=a,u.targetResolution=this.getResolutionForZoom(d.zoom),a=u.targetResolution):d.resolution&&(u.sourceResolution=a,u.targetResolution=d.resolution,a=u.targetResolution),d.rotation!==void 0){u.sourceRotation=l;const g=Qi(d.rotation-l+Math.PI,2*Math.PI)-Math.PI;u.targetRotation=l+g,l=u.targetRotation}Bw(u)?u.complete=!0:s+=u.duration,h.push(u)}this.animations_.push(h),this.setHint(Fe.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[Fe.ANIMATING]>0}getInteracting(){return this.hints_[Fe.INTERACTING]>0}cancelAnimations(){this.setHint(Fe.ANIMATING,-this.hints_[Fe.ANIMATING]);let e;for(let t=0,i=this.animations_.length;t<i;++t){const r=this.animations_[t];if(r[0].callback&&Is(r[0].callback,!1),!e)for(let s=0,o=r.length;s<o;++s){const a=r[s];if(!a.complete){e=a.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=e,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(this.updateAnimationKey_!==void 0&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;const e=Date.now();let t=!1;for(let i=this.animations_.length-1;i>=0;--i){const r=this.animations_[i];let s=!0;for(let o=0,a=r.length;o<a;++o){const l=r[o];if(l.complete)continue;const h=e-l.start;let d=l.duration>0?h/l.duration:1;d>=1?(l.complete=!0,d=1):s=!1;const u=l.easing(d);if(l.sourceCenter){const g=l.sourceCenter[0],f=l.sourceCenter[1],m=l.targetCenter[0],_=l.targetCenter[1];this.nextCenter_=l.targetCenter;const p=g+u*(m-g),v=f+u*(_-f);this.targetCenter_=[p,v]}if(l.sourceResolution&&l.targetResolution){const g=u===1?l.targetResolution:l.sourceResolution+u*(l.targetResolution-l.sourceResolution);if(l.anchor){const f=this.getViewportSize_(this.getRotation()),m=this.constraints_.resolution(g,0,f,!0);this.targetCenter_=this.calculateCenterZoom(m,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=g,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const g=u===1?Qi(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+u*(l.targetRotation-l.sourceRotation);if(l.anchor){const f=this.constraints_.rotation(g,!0);this.targetCenter_=this.calculateCenterRotate(f,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=g}if(this.applyTargetState_(!0),t=!0,!l.complete)break}if(s){this.animations_[i]=null,this.setHint(Fe.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const o=r[0].callback;o&&Is(o,!0)}}this.animations_=this.animations_.filter(Boolean),t&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(e,t){let i;const r=this.getCenterInternal();return r!==void 0&&(i=[r[0]-t[0],r[1]-t[1]],Jl(i,e-this.getRotation()),y_(i,t)),i}calculateCenterZoom(e,t){let i;const r=this.getCenterInternal(),s=this.getResolution();if(r!==void 0&&s!==void 0){const o=t[0]-e*(t[0]-r[0])/s,a=t[1]-e*(t[1]-r[1])/s;i=[o,a]}return i}getViewportSize_(e){const t=this.viewportSize_;if(e){const i=t[0],r=t[1];return[Math.abs(i*Math.cos(e))+Math.abs(r*Math.sin(e)),Math.abs(i*Math.sin(e))+Math.abs(r*Math.cos(e))]}return t}setViewportSize(e){this.viewportSize_=Array.isArray(e)?e.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const e=this.getCenterInternal();return e&&Di(e,this.getProjection())}getCenterInternal(){return this.get(_t.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(e){return e!==void 0?(e[0]=this.hints_[0],e[1]=this.hints_[1],e):this.hints_.slice()}calculateExtent(e){const t=this.calculateExtentInternal(e);return Ro(t,this.getProjection())}calculateExtentInternal(e){e=e||this.getViewportSizeMinusPadding_();const t=this.getCenterInternal();oe(t,"The view center is not defined");const i=this.getResolution();oe(i!==void 0,"The view resolution is not defined");const r=this.getRotation();return oe(r!==void 0,"The view rotation is not defined"),nl(t,i,r,e)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(e){this.applyOptions_(this.getUpdatedOptions_({maxZoom:e}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(e){this.applyOptions_(this.getUpdatedOptions_({minZoom:e}))}setConstrainResolution(e){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:e}))}getProjection(){return this.projection_}getResolution(){return this.get(_t.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(e,t){return this.getResolutionForExtentInternal(Ti(e,this.getProjection()),t)}getResolutionForExtentInternal(e,t){t=t||this.getViewportSizeMinusPadding_();const i=de(e)/t[0],r=Be(e)/t[1];return Math.max(i,r)}getResolutionForValueFunction(e){e=e||2;const t=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,r=Math.log(t/i)/Math.log(e);return(function(s){return t/Math.pow(e,s*r)})}getRotation(){return this.get(_t.ROTATION)}getValueForResolutionFunction(e){const t=Math.log(e||2),i=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,s=Math.log(i/r)/t;return(function(o){return Math.log(i/o)/t/s})}getViewportSizeMinusPadding_(e){let t=this.getViewportSize_(e);const i=this.padding_;return i&&(t=[t[0]-i[1]-i[3],t[1]-i[0]-i[2]]),t}getState(){const e=this.getProjection(),t=this.getResolution(),i=this.getRotation();let r=this.getCenterInternal();const s=this.padding_;if(s){const o=this.getViewportSizeMinusPadding_();r=Ea(r,this.getViewportSize_(),[o[0]/2+s[3],o[1]/2+s[0]],t,i)}return{center:r.slice(0),projection:e!==void 0?e:null,resolution:t,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let e;const t=this.getResolution();return t!==void 0&&(e=this.getZoomForResolution(t)),e}getZoomForResolution(e){let t=this.minZoom_||0,i,r;if(this.resolutions_){const s=Yl(this.resolutions_,e,1);t=s,i=this.resolutions_[s],s==this.resolutions_.length-1?r=2:r=i/this.resolutions_[s+1]}else i=this.maxResolution_,r=this.zoomFactor_;return t+Math.log(i/e)/Math.log(r)}getResolutionForZoom(e){if(this.resolutions_?.length){if(this.resolutions_.length===1)return this.resolutions_[0];const t=me(Math.floor(e),0,this.resolutions_.length-2),i=this.resolutions_[t]/this.resolutions_[t+1];return this.resolutions_[t]/Math.pow(i,me(e-t,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,e-this.minZoom_)}
10fit(e,t){let i;if(oe(Array.isArray(e)||typeof e.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(e)){oe(!ts(e),"Cannot fit empty extent provided as `geometry`");const r=Ti(e,this.getProjection());i=pd(r)}else if(e.getType()==="Circle"){const r=Ti(e.getExtent(),this.getProjection());i=pd(r),i.rotate(this.getRotation(),li(r))}else i=e;this.fitInternal(i,t)}rotatedExtentForGeometry(e){const t=this.getRotation(),i=Math.cos(t),r=Math.sin(-t),s=e.getFlatCoordinates(),o=e.getStride();let a=1/0,l=1/0,h=-1/0,d=-1/0;for(let u=0,g=s.length;u<g;u+=o){const f=s[u]*i-s[u+1]*r,m=s[u]*r+s[u+1]*i;a=Math.min(a,f),l=Math.min(l,m),h=Math.max(h,f),d=Math.max(d,m)}return[a,l,h,d]}fitInternal(e,t){t=t||{};let i=t.size;i||(i=this.getViewportSizeMinusPadding_());const r=t.padding!==void 0?t.padding:[0,0,0,0],s=t.nearest!==void 0?t.nearest:!1;let o;t.minResolution!==void 0?o=t.minResolution:t.maxZoom!==void 0?o=this.getResolutionForZoom(t.maxZoom):o=0;const a=this.rotatedExtentForGeometry(e);let l=this.getResolutionForExtentInternal(a,[i[0]-r[1]-r[3],i[1]-r[0]-r[2]]);l=isNaN(l)?o:Math.max(l,o),l=this.getConstrainedResolution(l,s?0:1);const h=this.getRotation(),d=Math.sin(h),u=Math.cos(h),g=li(a);g[0]+=(r[1]-r[3])/2*l,g[1]+=(r[0]-r[2])/2*l;const f=g[0]*u-g[1]*d,m=g[1]*u+g[0]*d,_=this.getConstrainedCenter([f,m],l),p=t.callback?t.callback:Fr;t.duration!==void 0?this.animateInternal({resolution:l,center:_,duration:t.duration,easing:t.easing},p):(this.targetResolution_=l,this.targetCenter_=_,this.applyTargetState_(!1,!0),Is(p,!0))}centerOn(e,t,i){this.centerOnInternal(ue(e,this.getProjection()),t,i)}centerOnInternal(e,t,i){this.setCenterInternal(Ea(e,t,i,this.getResolution(),this.getRotation()))}calculateCenterShift(e,t,i,r){let s;const o=this.padding_;if(o&&e){const a=this.getViewportSizeMinusPadding_(-i),l=Ea(e,r,[a[0]/2+o[3],a[1]/2+o[0]],t,i);s=[e[0]-l[0],e[1]-l[1]]}return s}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(e){const t=Di(this.targetCenter_,this.getProjection());this.setCenter([t[0]+e[0],t[1]+e[1]])}adjustCenterInternal(e){const t=this.targetCenter_;this.setCenterInternal([t[0]+e[0],t[1]+e[1]])}adjustResolution(e,t){t=t&&ue(t,this.getProjection()),this.adjustResolutionInternal(e,t)}adjustResolutionInternal(e,t){const i=this.getAnimating()||this.getInteracting(),r=this.getViewportSize_(this.getRotation()),s=this.constraints_.resolution(this.targetResolution_*e,0,r,i);t&&(this.targetCenter_=this.calculateCenterZoom(s,t)),this.targetResolution_*=e,this.applyTargetState_()}adjustZoom(e,t){this.adjustResolution(Math.pow(this.zoomFactor_,-e),t)}adjustRotation(e,t){t&&(t=ue(t,this.getProjection())),this.adjustRotationInternal(e,t)}adjustRotationInternal(e,t){const i=this.getAnimating()||this.getInteracting(),r=this.constraints_.rotation(this.targetRotation_+e,i);t&&(this.targetCenter_=this.calculateCenterRotate(r,t)),this.targetRotation_+=e,this.applyTargetState_()}setCenter(e){this.setCenterInternal(e&&ue(e,this.getProjection()))}setCenterInternal(e){this.targetCenter_=e,this.applyTargetState_()}setHint(e,t){return this.hints_[e]+=t,this.changed(),this.hints_[e]}setResolution(e){this.targetResolution_=e,this.applyTargetState_()}setRotation(e){this.targetRotation_=e,this.applyTargetState_()}setZoom(e){this.setResolution(this.getResolutionForZoom(e))}applyTargetState_(e,t){const i=this.getAnimating()||this.getInteracting()||t,r=this.constraints_.rotation(this.targetRotation_,i),s=this.getViewportSize_(r),o=this.constraints_.resolution(this.targetResolution_,0,s,i),a=this.constraints_.center(this.targetCenter_,o,s,i,this.calculateCenterShift(this.targetCenter_,o,r,s));this.get(_t.ROTATION)!==r&&this.set(_t.ROTATION,r),this.get(_t.RESOLUTION)!==o&&(this.set(_t.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),(!a||!this.get(_t.CENTER)||!Dr(this.get(_t.CENTER),a))&&this.set(_t.CENTER,a),this.getAnimating()&&!e&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(e,t,i){e=e!==void 0?e:200;const r=t||0,s=this.constraints_.rotation(this.targetRotation_),o=this.getViewportSize_(s),a=this.constraints_.resolution(this.targetResolution_,r,o),l=this.constraints_.center(this.targetCenter_,a,o,!1,this.calculateCenterShift(this.targetCenter_,a,s,o));if(e===0&&!this.cancelAnchor_){this.targetResolution_=a,this.targetRotation_=s,this.targetCenter_=l,this.applyTargetState_();return}i=i||(e===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==a||this.getRotation()!==s||!this.getCenterInternal()||!Dr(this.getCenterInternal(),l))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:l,resolution:a,duration:e,easing:qn,anchor:i}))}beginInteraction(){this.resolveConstraints(0),this.setHint(Fe.INTERACTING,1)}endInteraction(e,t,i){i=i&&ue(i,this.getProjection()),this.endInteractionInternal(e,t,i)}endInteractionInternal(e,t,i){this.getInteracting()&&(this.setHint(Fe.INTERACTING,-1),this.resolveConstraints(e,t,i))}getConstrainedCenter(e,t){const i=this.getViewportSize_(this.getRotation());return this.constraints_.center(e,t||this.getResolution(),i)}getConstrainedZoom(e,t){const i=this.getResolutionForZoom(e);return this.getZoomForResolution(this.getConstrainedResolution(i,t))}getConstrainedResolution(e,t){t=t||0;const i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(e,t,i)}}function Is(n,e){setTimeout(function(){n(e)},0)}
10function zw(n){if(n.extent!==void 0){const t=n.smoothExtentConstraint!==void 0?n.smoothExtentConstraint:!0;return ud(n.extent,n.constrainOnlyCenter,t)}const e=rc(n.projection,"EPSG:3857");if(n.multiWorld!==!0&&e.isGlobal()){const t=e.getExtent().slice();return t[0]=-1/0,t[2]=1/0,ud(t,!1,!1)}return vw}function Ww(n){let e,t,i,o=n.minZoom!==void 0?n.minZoom:ba,a=n.maxZoom!==void 0?n.maxZoom:28;const l=n.zoomFactor!==void 0?n.zoomFactor:2,h=n.multiWorld!==void 0?n.multiWorld:!1,d=n.smoothResolutionConstraint!==void 0?n.smoothResolutionConstraint:!0,u=n.showFullExtent!==void 0?n.showFullExtent:!1,g=rc(n.projection,"EPSG:3857"),f=g.getExtent();let m=n.constrainOnlyCenter,_=n.extent;if(!h&&!_&&g.isGlobal()&&(m=!1,_=f),n.resolutions!==void 0){const p=n.resolutions;t=p[o],i=p[a]!==void 0?p[a]:p[p.length-1],n.constrainResolution?e=Dw(p,d,!m&&_,u):e=_d(t,i,d,!m&&_,u)}else{const v=(f?Math.max(de(f),Be(f)):360*Ql.degrees/g.getMetersPerUnit())/Tc/Math.pow(2,ba),w=v/Math.pow(2,28-ba);t=n.maxResolution,t!==void 0?o=0:t=v/Math.pow(l,o),i=n.minResolution,i===void 0&&(n.maxZoom!==void 0?n.maxResolution!==void 0?i=t/Math.pow(l,a):i=v/Math.pow(l,a):i=w),a=o+Math.floor(Math.log(t/i)/Math.log(l)),i=t/Math.pow(l,a-o),n.constrainResolution?e=Ow(l,t,i,d,!m&&_,u):e=_d(t,i,d,!m&&_,u)}return{constraint:e,maxResolution:t,minResolution:i,minZoom:o,zoomFactor:l}}function Gw(n){if(n.enableRotation!==void 0?n.enableRotation:!0){const t=n.constrainRotation;return t===void 0||t===!0?jw():t===!1?vd:typeof t=="number"?Fw(t):vd}return Sc}function Bw(n){return!(n.sourceCenter&&n.targetCenter&&!Dr(n.sourceCenter,n.targetCenter)||n.sourceResolution!==n.targetResolution||n.sourceRotation!==n.targetRotation)}function Ea(n,e,t,i,r){const s=Math.cos(-r);let o=Math.sin(-r),a=n[0]*s-n[1]*o,l=n[1]*s+n[0]*o;a+=(e[0]/2-t[0])*i,l+=(t[1]-e[1]/2)*i,o=-o;const h=a*s-l*o,d=l*s+a*o;return[h,d]}const he={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};class qg extends Gt{constructor(e){super(),this.on,this.once,this.un,this.background_=e.background;const t=Object.assign({},e);typeof e.properties=="object"&&(delete t.properties,Object.assign(t,e.properties)),t[he.OPACITY]=e.opacity!==void 0?e.opacity:1,oe(typeof t[he.OPACITY]=="number","Layer opacity must be a number"),t[he.VISIBLE]=e.visible!==void 0?e.visible:!0,t[he.Z_INDEX]=e.zIndex,t[he.MAX_RESOLUTION]=e.maxResolution!==void 0?e.maxResolution:1/0,t[he.MIN_RESOLUTION]=e.minResolution!==void 0?e.minResolution:0,t[he.MIN_ZOOM]=e.minZoom!==void 0?e.minZoom:-1/0,t[he.MAX_ZOOM]=e.maxZoom!==void 0?e.maxZoom:1/0,this.className_=t.className!==void 0?t.className:"ol-layer",delete t.className,this.setProperties(t),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(e){const t=this.state_||{layer:this,managed:e===void 0?!0:e},i=this.getZIndex();return t.opacity=me(Math.round(this.getOpacity()*100)/100,0,1),t.visible=this.getVisible(),t.extent=this.getExtent(),t.zIndex=i===void 0&&!t.managed?1/0:i,t.maxResolution=this.getMaxResolution(),t.minResolution=Math.max(this.getMinResolution(),0),t.minZoom=this.getMinZoom(),t.maxZoom=this.getMaxZoom(),this.state_=t,t}getLayersArray(e){return re()}getLayerStatesArray(e){return re()}getExtent(){return this.get(he.EXTENT)}getMaxResolution(){return this.get(he.MAX_RESOLUTION)}getMinResolution(){return this.get(he.MIN_RESOLUTION)}getMinZoom(){return this.get(he.MIN_ZOOM)}getMaxZoom(){return this.get(he.MAX_ZOOM)}getOpacity(){return this.get(he.OPACITY)}getSourceState(){return re()}getVisible(){return this.get(he.VISIBLE)}getZIndex(){return this.get(he.Z_INDEX)}setBackground(e){this.background_=e,this.changed()}setExtent(e){this.set(he.EXTENT,e)}setMaxResolution(e){this.set(he.MAX_RESOLUTION,e)}setMinResolution(e){this.set(he.MIN_RESOLUTION,e)}setMaxZoom(e){this.set(he.MAX_ZOOM,e)}setMinZoom(e){this.set(he.MIN_ZOOM,e)}setOpacity(e){oe(typeof e=="number","Layer opacity must be a number"),this.set(he.OPACITY,e)}setVisible(e){this.set(he.VISIBLE,e)}setZIndex(e){this.set(he.Z_INDEX,e)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}class Go extends qg{constructor(e){const t=Object.assign({},e);delete t.source,super(t),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,e.render&&(this.render=e.render),e.map&&this.setMap(e.map),this.addChangeListener(he.SOURCE,this.handleSourcePropertyChange_);const i=e.source?e.source:null;this.setSource(i)}getLayersArray(e){return e=e||[],e.push(this),e}getLayerStatesArray(e){return e=e||[],e.push(this.getLayerState()),e}getSource(){return this.get(he.SOURCE)||null}
10getRenderSource(){return this.getSource()}getSourceState(){const e=this.getSource();return e?e.getState():"undefined"}handleSourceChange_(){this.changed(),!(this.sourceReady_||this.getSource().getState()!=="ready")&&(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(ae(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const e=this.getSource();e&&(this.sourceChangeKey_=ee(e,V.CHANGE,this.handleSourceChange_,this),e.getState()==="ready"&&(this.sourceReady_=!0,setTimeout(()=>{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(e){return this.renderer_?this.renderer_.getFeatures(e):Promise.resolve([])}getData(e){return!this.renderer_||!this.rendered?null:this.renderer_.getData(e)}isVisible(e){let t;const i=this.getMapInternal();!e&&i&&(e=i.getView()),e instanceof xt?t={viewState:e.getState(),extent:e.calculateExtent()}:t=e,!t.layerStatesArray&&i&&(t.layerStatesArray=i.getLayerGroup().getLayerStatesArray());let r;if(t.layerStatesArray){if(r=t.layerStatesArray.find(o=>o.layer===this),!r)return!1}else r=this.getLayerState();const s=this.getExtent();return Rc(r,t.viewState)&&(!s||je(s,t.extent))}getAttributions(e){if(!this.isVisible(e))return[];const t=this.getSource()?.getAttributions();if(!t)return[];const i=e instanceof xt?e.getViewStateAndExtent():e;let r=t(i);return Array.isArray(r)||(r=[r]),r}render(e,t){const i=this.getRenderer();return i.prepareFrame(e)?(this.rendered=!0,i.renderFrame(e,t)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(e,t){}renderDeferred(e){const t=this.getRenderer();t&&t.renderDeferred(e)}setMapInternal(e){e||this.unrender(),this.set(he.MAP,e)}getMapInternal(){return this.get(he.MAP)}setMap(e){this.mapPrecomposeKey_&&(ae(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&(ae(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=ee(e,ct.PRECOMPOSE,this.handlePrecompose_,this),this.mapRenderKey_=ee(this,V.CHANGE,e.render,e),this.changed())}handlePrecompose_(e){const t=e.frameState.layerStatesArray,i=this.getLayerState(!1);oe(!t.some(r=>r.layer===i.layer),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),t.push(i)}setSource(e){this.set(he.SOURCE,e)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}clearRenderer(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_)}disposeInternal(){this.clearRenderer(),this.setSource(null),super.disposeInternal()}}function Rc(n,e){if(!n.visible)return!1;const t=e.resolution;if(t<n.minResolution||t>=n.maxResolution)return!1;const i=e.zoom;return i>n.minZoom&&i<=n.maxZoom}const wd={RENDER_ORDER:"renderOrder"};class Jg extends Go{constructor(e){e=e||{};const t=Object.assign({},e);delete t.style,delete t.renderBuffer,delete t.updateWhileAnimating,delete t.updateWhileInteracting,super(t),this.declutter_=e.declutter?String(e.declutter):void 0,this.renderBuffer_=e.renderBuffer!==void 0?e.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(e.style),this.updateWhileAnimating_=e.updateWhileAnimating!==void 0?e.updateWhileAnimating:!1,this.updateWhileInteracting_=e.updateWhileInteracting!==void 0?e.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(e){return super.getFeatures(e)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(wd.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(e,t){const i=this.getDeclutter();i in e.declutter||(e.declutter[i]=new Lg(9)),this.getRenderer().renderDeclutter(e,t)}setRenderOrder(e){this.set(wd.RENDER_ORDER,e)}setStyle(e){this.style_=e===void 0?Fg:e;const t=$w(e);this.styleFunction_=e===null?void 0:nw(t),this.changed()}setDeclutter(e){this.declutter_=e?String(e):void 0,this.changed()}}function $w(n){if(n===void 0)return Fg;if(!n)return null;if(typeof n=="function"||n instanceof $e)return n;if(!Array.isArray(n))return ld([n]);if(n.length===0)return[];const e=n.length,t=n[0];if(t instanceof $e){const r=new Array(e);for(let s=0;s<e;++s){const o=n[s];if(!(o instanceof $e))throw new Error("Expected a list of style instances");r[s]=o}return r}if("style"in t){const r=new Array(e);for(let s=0;s<e;++s){const o=n[s];if(!("style"in o))throw new Error("Expected a list of rules with a style property");r[s]=o}return ow(r)}return ld(n)}class an extends Jg{constructor(e){super(e)}createRenderer(){return new k1(this)}}const ye={ADD:"add",REMOVE:"remove"},yd={LENGTH:"length"};class Ms extends mt{constructor(e,t,i){super(e),this.element=t,this.index=i}}class He extends Gt{constructor(e,t){if(super(),this.on,this.once,this.un,t=t||{},this.unique_=!!t.unique,this.array_=e??[],this.unique_)for(let i=1,r=this.array_.length;i<r;++i)this.assertUnique_(this.array_[i],i);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(e){for(let t=0,i=e.length;t<i;++t)this.push(e[t]);return this}forEach(e){const t=this.array_;for(let i=0,r=t.length;i<r;++i)e(t[i],i,t)}getArray(){return this.array_}item(e){return this.array_[e]}getLength(){return this.get(yd.LENGTH)}insertAt(e,t){if(e<0||e>this.getLength())throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(t),this.array_.splice(e,0,t),this.updateLength_(),this.dispatchEvent(new Ms(ye.ADD,t,e))}pop(){return this.removeAt(this.getLength()-1)}push(e){const t=this.getLength();return this.insertAt(t,e),this.getLength()}remove(e){const t=this.array_;for(let i=0,r=t.length;i<r;++i)if(t[i]===e)return this.removeAt(i)}removeAt(e){if(e<0||e>=this.getLength())return;const t=this.array_[e];return this.array_.splice(e,1),this.updateLength_(),this.dispatchEvent(new Ms(ye.REMOVE,t,e)),t}setAt(e,t){const i=this.getLength();if(e>=i){this.insertAt(e,t);return}if(e<0)throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(t,e);const r=this.array_[e];this.array_[e]=t,this.dispatchEvent(new Ms(ye.REMOVE,r,e)),this.dispatchEvent(new Ms(ye.ADD,t,e))}updateLength_(){this.set(yd.LENGTH,this.array_.length)}assertUnique_(e,t){const i=this.array_;for(let r=0,s=i.length;r<s;++r)if(i[r]===e&&r!==t)throw new Error("Duplicate item added to a unique collection")}}let Vw=!1;function Xw(n,e,t,i,r,s,o){const a=new XMLHttpRequest;a.open("GET",typeof n=="function"?n(t,i,r):n,!0),e.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=Vw,a.onload=function(l){if(!a.status||a.status>=200&&a.status<300){const h=e.getType();try{let d;h=="text"||h=="json"?d=a.responseText:h=="xml"?d=a.responseXML||a.responseText:h=="arraybuffer"&&(d=a.response),d?s(e.readFeatures(d,{extent:t,featureProjection:r}),e.readProjection(d)):o()}catch{o()}}else o()},a.onerror=o,a.send()}function xd(n,e){return function(t,i,r,s,o){Xw(n,e,t,i,r,(a,l)=>{this.addFeatures(a),s!==void 0&&s(a)},()=>{this.changed(),o!==void 0&&o()})}}function Uw(n,e){return[[-1/0,-1/0,1/0,1/0]]}class Pt extends Gt{constructor(e){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),e)if(typeof e.getSimplifiedGeometry=="function"){const t=e;this.setGeometry(t)}else{const t=e;this.setProperties(t)}}clone(){const e=new Pt,t=this.geometryName_;e.setGeometryName(t);const i=this.getPropertiesInternal();if(i){const s=this.getGeometry();for(const o in i)o===t&&s?e.set(o,s.clone()):e.set(o,i[o],!0)}const r=this.getStyle();return r&&e.setStyle(r),e}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(ae(this.geometryChangeKey_),this.geometryChangeKey_=null);const e=this.getGeometry();e&&(this.geometryChangeKey_=ee(e,V.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(e){this.set(this.geometryName_,e)}setStyle(e){this.style_=e,this.styleFunction_=e?Yw(e):void 0,this.changed()}setId(e){this.id_=e,this.changed()}setGeometryName(e){e!==this.geometryName_&&(this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=e,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_())}}function Yw(n){if(typeof n=="function")return n;let e;return Array.isArray(n)?e=n:(oe(typeof n.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),e=[n]),function(){return e}}function ro(n,e,t,i,r,s,o){let a,l;const h=(t-e)/i;if(h===1)a=e;else if(h===2)a=e,l=r;else if(h!==0){let d=n[e],u=n[e+1],g=0;const f=[0];for(let p=e+i;p<t;p+=i){const v=n[p],w=n[p+1];g+=Math.sqrt((v-d)*(v-d)+(w-u)*(w-u)),f.push(g),d=v,u=w}const m=r*g,_=h_(f,m);_<0?(l=(m-f[-_-2])/(f[-_-1]-f[-_-2]),a=e+(-_-2)*i):a=e+_*i}o=o>1?o:2,s=s||new Array(o);for(let d=0;d<o;++d)s[d]=a===void 0?NaN:l===void 0?n[a+d]:nt(n[a+d],n[a+i+d],l);return s}function pl(n,e,t,i,r,s){if(t==e)return null;let o;if(r<n[e+i-1])return s?(o=n.slice(e,e+i),o[i-1]=r,o):null;if(n[t-1]<r)return s?(o=n.slice(t-i,t),o[i-1]=r,o):null;if(r==n[e+i-1])return n.slice(e,e+i);let a=e/i,l=t/i;for(;a<l;){const g=a+l>>1;r<n[(g+1)*i-1]?l=g:a=g+1}const h=n[a*i-1];
10if(r==h)return n.slice((a-1)*i,(a-1)*i+i);const d=n[(a+1)*i-1],u=(r-h)/(d-h);o=[];for(let g=0;g<i-1;++g)o.push(nt(n[(a-1)*i+g],n[a*i+g],u));return o.push(r),o}function Kw(n,e,t,i,r,s,o){if(o)return pl(n,e,t[t.length-1],i,r,s);let a;if(r<n[i-1])return s?(a=n.slice(0,i),a[i-1]=r,a):null;if(n[n.length-1]<r)return s?(a=n.slice(n.length-i),a[i-1]=r,a):null;for(let l=0,h=t.length;l<h;++l){const d=t[l];if(e!=d){if(r<n[e+i-1])return null;if(r<=n[d-1])return pl(n,e,d,i,r,!1);e=d}}return null}class ri extends Fi{constructor(e,t){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,t!==void 0&&!Array.isArray(e[0])?this.setFlatCoordinates(t,e):this.setCoordinates(e,t)}appendCoordinate(e){Ft(this.flatCoordinates,e),this.changed()}clone(){const e=new ri(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,i,r){return r<dn(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(pc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),vc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,e,t,i,r))}forEachSegment(e){return Yg(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinateAtM(e,t){return this.layout!="XYM"&&this.layout!="XYZM"?null:(t=t!==void 0?t:!1,pl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t))}getCoordinates(){return Ri(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(e,t){return ro(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,this.stride)}getLength(){return uc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(e){const t=[];return t.length=Lo(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0),new ri(t,"XY")}getType(){return"LineString"}intersectsExtent(e){return Wo(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,this.getExtent())}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=zo(this.flatCoordinates,0,e,this.stride),this.changed()}}class Vr extends Fi{constructor(e,t,i){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(e[0]))this.setCoordinates(e,t);else if(t!==void 0&&i)this.setFlatCoordinates(t,e),this.ends_=i;else{const r=e,s=[],o=[];for(let l=0,h=r.length;l<h;++l){const d=r[l];Ft(s,d.getFlatCoordinates()),o.push(s.length)}const a=r.length===0?this.getLayout():r[0].getLayout();this.setFlatCoordinates(a,s),this.ends_=o}}appendLineString(e){Ft(this.flatCoordinates,e.getFlatCoordinates().slice()),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const e=new Vr(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}closestPointXY(e,t,i,r){return r<dn(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(_c(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),wc(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,e,t,i,r))}getCoordinateAtM(e,t,i){return this.layout!="XYM"&&this.layout!="XYZM"||this.flatCoordinates.length===0?null:(t=t!==void 0?t:!1,i=i!==void 0?i:!1,Kw(this.flatCoordinates,0,this.ends_,this.stride,e,t,i))}getCoordinates(){return jr(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(e){return e<0||this.ends_.length<=e?null:new ri(this.flatCoordinates.slice(e===0?0:this.ends_[e-1],this.ends_[e]),this.layout)}getLineStrings(){const e=this.flatCoordinates,t=this.ends_,i=this.layout,r=[];let s=0;for(let o=0,a=t.length;o<a;++o){const l=t[o],h=new ri(e.slice(s,l),i);r.push(h),s=l}return r}getLength(){const e=this.ends_;let t=0,i=0;for(let r=0,s=e.length;r<s;++r)i+=uc(this.flatCoordinates,t,e[r],this.stride),t=e[r];return i}getFlatMidpoints(){const e=[],t=this.flatCoordinates;let i=0;const r=this.ends_,s=this.stride;for(let o=0,a=r.length;o<a;
vendor: 11,049 bytes, line 10
10++o){const l=r[o],h=ro(t,i,l,s,.5);Ft(e,h),i=l}return e}getSimplifiedGeometryInternal(e){const t=[],i=[];return t.length=_g(this.flatCoordinates,0,this.ends_,this.stride,e,t,0,i),new Vr(t,"XY",i)}getType(){return"MultiLineString"}intersectsExtent(e){return Tw(this.flatCoordinates,0,this.ends_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=yc(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()}}class Jn extends Fi{constructor(e,t){super(),t&&!Array.isArray(e[0])?this.setFlatCoordinates(t,e):this.setCoordinates(e,t)}appendPoint(e){Ft(this.flatCoordinates,e.getFlatCoordinates()),this.changed()}clone(){const e=new Jn(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,i,r){if(r<dn(this.getExtent(),e,t))return r;const s=this.flatCoordinates,o=this.stride;for(let a=0,l=s.length;a<l;a+=o){const h=Qt(e,t,s[a],s[a+1]);if(h<r){r=h;for(let d=0;d<o;++d)i[d]=s[a+d];i.length=o}}return r}getCoordinates(){return Ri(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(e){const t=this.flatCoordinates.length/this.stride;return e<0||t<=e?null:new ut(this.flatCoordinates.slice(e*this.stride,(e+1)*this.stride),this.layout)}getPoints(){const e=this.flatCoordinates,t=this.layout,i=this.stride,r=[];for(let s=0,o=e.length;s<o;s+=i){const a=new ut(e.slice(s,s+i),t);r.push(a)}return r}getType(){return"MultiPoint"}intersectsExtent(e){const t=this.flatCoordinates,i=this.stride;for(let r=0,s=t.length;r<s;r+=i){const o=t[r],a=t[r+1];if(Kl(e,o,a))return!0}return!1}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=zo(this.flatCoordinates,0,e,this.stride),this.changed()}}function Qg(n,e,t,i){const r=[];let s=rt();for(let o=0,a=t.length;o<a;++o){const l=t[o];s=Zl(n,e,l[0],i),r.push((s[0]+s[2])/2,(s[1]+s[3])/2),e=l[l.length-1]}return r}class Xr extends Fi{constructor(e,t,i){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!i&&!Array.isArray(e[0])){const r=e,s=[],o=[];for(let a=0,l=r.length;a<l;++a){const h=r[a],d=s.length,u=h.getEnds();for(let g=0,f=u.length;g<f;++g)u[g]+=d;Ft(s,h.getFlatCoordinates()),o.push(u)}t=r.length===0?this.getLayout():r[0].getLayout(),e=s,i=o}t!==void 0&&i?(this.setFlatCoordinates(t,e),this.endss_=i):this.setCoordinates(e,t)}appendPolygon(e){let t;if(!this.flatCoordinates)this.flatCoordinates=e.getFlatCoordinates().slice(),t=e.getEnds().slice(),this.endss_.push();else{const i=this.flatCoordinates.length;Ft(this.flatCoordinates,e.getFlatCoordinates()),t=e.getEnds().slice();for(let r=0,s=t.length;r<s;++r)t[r]+=i}this.endss_.push(t),this.changed()}clone(){const e=this.endss_.length,t=new Array(e);for(let r=0;r<e;++r)t[r]=this.endss_[r].slice();const i=new Xr(this.flatCoordinates.slice(),this.layout,t);return i.applyProperties(this),i}closestPointXY(e,t,i,r){return r<dn(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(bw(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Ew(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,e,t,i,r))}containsXY(e,t){return Sw(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e,t)}getArea(){return xw(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(e){let t;return e!==void 0?(t=this.getOrientedFlatCoordinates().slice(),md(t,0,this.endss_,this.stride,e)):t=this.flatCoordinates,ll(t,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const e=Qg(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=Ug(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new Jn(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const e=this.flatCoordinates;Mw(e,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=md(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(e){const t=[],i=[];return t.length=Fv(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(e),t,0,i),new Xr(t,"XY",i)}getPolygon(e){if(e<0||this.endss_.length<=e)return null;let t;if(e===0)t=0;else{const s=this.endss_[e-1];t=s[s.length-1]}const i=this.endss_[e].slice(),r=i[i.length-1];if(t!==0)for(let s=0,o=i.length;s<o;++s)i[s]-=t;return new kt(this.flatCoordinates.slice(t,r),this.layout,i)}getPolygons(){const e=this.layout,t=this.flatCoordinates,i=this.endss_,r=[];let s=0;for(let o=0,a=i.length;o<a;++o){const l=i[o].slice(),h=l[l.length-1];if(s!==0)for(let u=0,g=l.length;u<g;++u)l[u]-=s;const d=new kt(t.slice(s,h),e,l);r.push(d),s=h}return r}getType(){return"MultiPolygon"}intersectsExtent(e){return Rw(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,3),this.flatCoordinates||(this.flatCoordinates=[]);const i=Cw(this.flatCoordinates,0,e,this.stride,this.endss_);if(i.length===0)this.flatCoordinates.length=0;else{const r=i[i.length-1];this.flatCoordinates.length=r.length===0?0:r[r.length-1]}this.changed()}}const bd=Et();class vt{constructor(e,t,i,r,s,o){this.styleFunction,this.extent_,this.id_=o,this.type_=e,this.flatCoordinates_=t,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i||null,this.properties_=s,this.squaredTolerance_,this.stride_=r,this.simplifiedGeometry_}get(e){return this.properties_[e]}getExtent(){return this.extent_||(this.extent_=this.type_==="Point"?Rr(this.flatCoordinates_):Zl(this.flatCoordinates_,0,this.flatCoordinates_.length,this.stride_)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const e=li(this.getExtent());this.flatInteriorPoints_=bc(this.flatCoordinates_,0,this.ends_,this.stride_,e,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const e=Pw(this.flatCoordinates_,this.ends_),t=Qg(this.flatCoordinates_,0,e,this.stride_);this.flatInteriorPoints_=Ug(this.flatCoordinates_,0,e,this.stride_,t)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=ro(this.flatCoordinates_,0,this.flatCoordinates_.length,this.stride_,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const e=this.flatCoordinates_;let t=0;const i=this.ends_;for(let r=0,s=i.length;r<s;++r){const o=i[r],a=ro(e,t,o,this.stride_,.5);Ft(this.flatMidpoints_,a),t=o}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(e){return this}simplifyTransformed(e,t){return this}getProperties(){return this.properties_}getPropertiesInternal(){return this.properties_}getStride(){return this.stride_}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(e){e=Je(e);const t=e.getExtent(),i=e.getWorldExtent();if(t&&i){const r=Be(i)/Be(t);ci(bd,i[0],i[3],r,-r,0,0,0),Ai(this.flatCoordinates_,0,this.flatCoordinates_.length,this.stride_,bd,this.flatCoordinates_)}}applyTransform(e){e(this.flatCoordinates_,this.flatCoordinates_,this.stride_)}clone(){return new vt(this.type_,this.flatCoordinates_.slice(),this.ends_?.slice(),this.stride_,Object.assign({},this.properties_),this.id_)}getEnds(){return this.ends_}enableSimplifyTransformed(){return this.simplifyTransformed=dg((e,t)=>{if(e===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),t&&this.simplifiedGeometry_.applyTransform(t);const i=this.simplifiedGeometry_.getFlatCoordinates();let r;switch(this.type_){case"LineString":i.length=Lo(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,e,i,0),r=[i.length];break;case"MultiLineString":r=[],i.length=_g(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,e,i,0,r);break;case"Polygon":r=[],i.length=hc(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(e),i,0,r);break}return r&&(this.simplifiedGeometry_=new vt(this.type_,i,r,this.stride_,this.properties_,this.id_)),this.squaredTolerance_=e,this.simplifiedGeometry_}),this}}vt.prototype.getFlatCoordinates=vt.prototype.getOrientedFlatCoordinates;class so{constructor(e){this.rbush_=new Lg(e),this.items_={}}insert(e,t){const i={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3],value:t};this.rbush_.insert(i),this.items_[H(t)]=i}load(e,t){const i=new Array(t.length);for(let r=0,s=t.length;r<s;r++){const o=e[r],a=t[r],l={minX:o[0],minY:o[1],maxX:o[2],maxY:o[3],value:a};i[r]=l,this.items_[H(a)]=l}this.rbush_.load(i)}remove(e){const t=H(e),i=this.items_[t];return delete this.items_[t],this.rbush_.remove(i)!==null}update(e,t){const i=this.items_[H(t)],r=[i.minX,i.minY,i.maxX,i.maxY];Ar(r,e)||(this.remove(t),this.insert(e,t))}getAll(){return this.rbush_.all().map(function(t){return t.value})}getInExtent(e){const t={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]};return this.rbush_.search(t).map(function(r){return r.value})}forEach(e){return this.forEach_(this.getAll(),e)}forEachInExtent(e,t){return this.forEach_(this.getInExtent(e),t)}forEach_(e,t){let i;for(let r=0,s=e.length;r<s;r++)if(i=t(e[r]),i)return i;return i}isEmpty(){return Xn(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(e){const t=this.rbush_.toJSON();return ai(t.minX,t.minY,t.maxX,t.maxY,e)}concat(e){this.rbush_.load(e.rbush_.all());for(const t in e.items_)this.items_[t]=e.items_[t]}}class ef extends Gt{constructor(e){super(),this.projection=Je(e.projection),this.attributions_=Ed(e.attributions),this.attributionsCollapsible_=e.attributionsCollapsible??!0,this.loading=!1,this.state_=e.state!==void 0?e.state:"ready",this.wrapX_=e.wrapX!==void 0?e.wrapX:!1,this.interpolate_=!!e.interpolate,this.viewResolver=null,this.viewRejector=null;const t=this;this.viewPromise_=new Promise(function(i,r){t.viewResolver=i,t.viewRejector=r})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(e){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(e){this.attributions_=Ed(e),this.changed()}setState(e){this.state_=e,this.changed()}}function Ed(n){return n?typeof n=="function"?n:(Array.isArray(n)||(n=[n]),e=>n):null}const Te={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVE
10FEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};class _i extends mt{constructor(e,t,i){super(e),this.feature=t,this.features=i}}class en extends ef{constructor(e){e=e||{},super({attributions:e.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:e.wrapX!==void 0?e.wrapX:!0}),this.on,this.once,this.un,this.loader_=Fr,this.format_=e.format||null,this.overlaps_=e.overlaps===void 0?!0:e.overlaps,this.url_=e.url,e.loader!==void 0?this.loader_=e.loader:this.url_!==void 0&&(oe(this.format_,"`format` must be set when `url` is set"),this.loader_=xd(this.url_,this.format_)),this.strategy_=e.strategy!==void 0?e.strategy:Uw;const t=e.useSpatialIndex!==void 0?e.useSpatialIndex:!0;this.featuresRtree_=t?new so:null,this.loadedExtentsRtree_=new so,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let i,r;Array.isArray(e.features)?r=e.features:e.features&&(i=e.features,r=i.getArray()),!t&&i===void 0&&(i=new He(r)),r!==void 0&&this.addFeaturesInternal(r),i!==void 0&&this.bindFeaturesCollection_(i)}addFeature(e){this.addFeatureInternal(e),this.changed()}addFeatureInternal(e){const t=H(e);if(!this.addToIndex_(t,e)){this.featuresCollection_&&this.featuresCollection_.remove(e);return}this.setupChangeEvents_(t,e);const i=e.getGeometry();if(i){const r=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(r,e)}else this.nullGeometryFeatures_[t]=e;this.dispatchEvent(new _i(Te.ADDFEATURE,e))}setupChangeEvents_(e,t){t instanceof vt||(this.featureChangeKeys_[e]=[ee(t,V.CHANGE,this.handleFeatureChange_,this),ee(t,wt.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(e,t){let i=!0;if(t.getId()!==void 0){const r=String(t.getId());if(!(r in this.idIndex_))this.idIndex_[r]=t;else if(t instanceof vt){const s=this.idIndex_[r];s instanceof vt?Array.isArray(s)?s.push(t):this.idIndex_[r]=[s,t]:i=!1}else i=!1}return i&&(oe(!(e in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[e]=t),i}addFeatures(e){this.addFeaturesInternal(e),this.changed()}addFeaturesInternal(e){const t=[],i=[],r=[];for(let s=0,o=e.length;s<o;s++){const a=e[s],l=H(a);this.addToIndex_(l,a)&&i.push(a)}for(let s=0,o=i.length;s<o;s++){const a=i[s],l=H(a);this.setupChangeEvents_(l,a);const h=a.getGeometry();if(h){const d=h.getExtent();t.push(d),r.push(a)}else this.nullGeometryFeatures_[l]=a}if(this.featuresRtree_&&this.featuresRtree_.load(t,r),this.hasListener(Te.ADDFEATURE))for(let s=0,o=i.length;s<o;s++)this.dispatchEvent(new _i(Te.ADDFEATURE,i[s]))}bindFeaturesCollection_(e){let t=!1;this.addEventListener(Te.ADDFEATURE,function(i){t||(t=!0,e.push(i.feature),t=!1)}),this.addEventListener(Te.REMOVEFEATURE,function(i){t||(t=!0,e.remove(i.feature),t=!1)}),e.addEventListener(ye.ADD,i=>{t||(t=!0,this.addFeature(i.element),t=!1)}),e.addEventListener(ye.REMOVE,i=>{t||(t=!0,this.removeFeature(i.element),t=!1)}),this.featuresCollection_=e}clear(e){if(e){for(const i in this.featureChangeKeys_)this.featureChangeKeys_[i].forEach(ae);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){this.featuresRtree_.forEach(i=>{this.removeFeatureInternal(i)});for(const i in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[i])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const t=new _i(Te.CLEAR);this.dispatchEvent(t),this.changed()}forEachFeature(e){if(this.featuresRtree_)return this.featuresRtree_.forEach(e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureAtCoordinateDirect(e,t){const i=[e[0],e[1],e[0],e[1]];return this.forEachFeatureInExtent(i,function(r){const s=r.getGeometry();if(s instanceof vt||s.intersectsCoordinate(e))return t(r)})}forEachFeatureInExtent(e,t){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(e,t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureIntersectingExtent(e,t){return this.forEachFeatureInExtent(e,function(i){const r=i.getGeometry();if(r instanceof vt||r.intersectsExtent(e)){const s=t(i);if(s)return s}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let e;return this.featuresCollection_?e=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(e=this.featuresRtree_.getAll(),Xn(this.nullGeometryFeatures_)||Ft(e,Object.values(this.nullGeometryFeatures_))),e}getFeaturesAtCoordinate(e){const t=[];return this.forEachFeatureAtCoordinateDirect(e,function(i){t.push(i)}),t}getFeaturesInExtent(e,t){if(this.featuresRtree_){if(!(t&&t.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(e);const r=qu(e,t);return[].concat(...r.map(s=>this.featuresRtree_.getInExtent(s)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(e,t){const i=e[0],r=e[1];let s=null;const o=[NaN,NaN];let a=1/0;const l=[-1/0,-1/0,1/0,1/0];return t=t||sn,this.featuresRtree_.forEachInExtent(l,function(h){if(t(h)){const d=h.getGeometry(),u=a;if(a=d instanceof vt?0:d.closestPointXY(i,r,o,a),a<u){s=h;const g=Math.sqrt(a);l[0]=i-g,l[1]=r-g,l[2]=i+g,l[3]=r+g}}}),s}getExtent(e){return this.featuresRtree_?.getExtent(e)??null}getFeatureById(e){const t=this.idIndex_[e.toString()];return t!==void 0?t:null}getFeatureByUid(e){const t=this.uidIndex_[e];return t!==void 0?t:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(e){const t=e.target,i=H(t),r=t.getGeometry();if(!r)i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(t),this.nullGeometryFeatures_[i]=t);else{const o=r.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(o,t)):this.featuresRtree_&&this.featuresRtree_.update(o,t)}const s=t.getId();if(s!==void 0){const o=s.toString();this.idIndex_[o]!==t&&(this.removeFromIdIndex_(t),this.idIndex_[o]=t)}
10else this.removeFromIdIndex_(t),this.uidIndex_[i]=t;this.changed(),this.dispatchEvent(new _i(Te.CHANGEFEATURE,t))}hasFeature(e){const t=e.getId();return t!==void 0?t in this.idIndex_:H(e)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&Xn(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(e,t,i){const r=this.loadedExtentsRtree_,s=this.strategy_(e,t,i);for(let o=0,a=s.length;o<a;++o){const l=s[o];if(!r.forEachInExtent(l,function(d){return mr(d.extent,l)})){this.loading=Number(this.loading)+1,this.dispatchEvent(new _i(Te.FEATURESLOADSTART));const d=m=>{this.loading=Number(this.loading)-1,this.dispatchEvent(new _i(Te.FEATURESLOADEND,void 0,m))},u=()=>{this.changed(),this.loading=Number(this.loading)-1,this.dispatchEvent(new _i(Te.FEATURESLOADERROR))};let g=!1;const f=this.loader_.call(this,l,t,i,m=>g||d(m),()=>g||u());f instanceof Promise?(g=!0,f.then(m=>{this.addFeatures(m),d(m)}).catch(u)):this.loader_.length<4&&(this.loading=!1),r.insert(l,{extent:l.slice()})}}}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(e){const t=this.loadedExtentsRtree_,i=t.forEachInExtent(e,function(r){if(Ar(r.extent,e))return r});i&&t.remove(i)}removeFeatures(e){let t=!1;for(let i=0,r=e.length;i<r;++i)t=this.removeFeatureInternal(e[i])||t;t&&this.changed()}removeFeature(e){if(!e)return;this.removeFeatureInternal(e)&&this.changed()}removeFeatureInternal(e){const t=H(e);if(!(t in this.uidIndex_))return!1;t in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[t]:this.featuresRtree_&&this.featuresRtree_.remove(e),this.featureChangeKeys_[t]?.forEach(ae),delete this.featureChangeKeys_[t];const r=e.getId();if(r!==void 0){const s=r.toString(),o=this.idIndex_[s];o===e?delete this.idIndex_[s]:Array.isArray(o)&&(o.splice(o.indexOf(e),1),o.length===1&&(this.idIndex_[s]=o[0]))}return delete this.uidIndex_[t],this.hasListener(Te.REMOVEFEATURE)&&this.dispatchEvent(new _i(Te.REMOVEFEATURE,e)),!0}removeFromIdIndex_(e){for(const t in this.idIndex_)if(this.idIndex_[t]===e){delete this.idIndex_[t];break}}setLoader(e){this.loader_=e}setUrl(e){oe(this.format_,"`format` must be set when `url` is set"),this.url_=e,this.setLoader(xd(e,this.format_))}setOverlaps(e){this.overlaps_=e,this.changed()}}class Mn extends mt{constructor(e,t,i){super(e),this.map=t,this.frameState=i!==void 0?i:null}}class Kt extends Mn{constructor(e,t,i,r,s,o){super(e,t,s),this.originalEvent=i,this.pixel_=null,this.coordinate_=null,this.dragging=r!==void 0?r:!1,this.activePointers=o}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(e){this.pixel_=e}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(e){this.coordinate_=e}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}const ne={SINGLECLICK:"singleclick",CLICK:V.CLICK,DBLCLICK:V.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},_l={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown"};class Zw extends Mo{constructor(e,t){super(e),this.map_=e,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=t===void 0?1:t,this.down_=null;const i=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=i,this.pointerdownListenerKey_=ee(i,_l.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=ee(i,_l.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(V.TOUCHMOVE,this.boundHandleTouchMove_,tg?{passive:!1}:!1)}emulateClick_(e){let t=new Kt(ne.CLICK,this.map_,e);this.dispatchEvent(t),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,t=new Kt(ne.DBLCLICK,this.map_,e),this.dispatchEvent(t)):this.clickTimeoutId_=setTimeout(()=>{this.clickTimeoutId_=void 0;const i=new Kt(ne.SINGLECLICK,this.map_,e);this.dispatchEvent(i)},250)}updateActivePointers_(e){const t=e,i=t.pointerId;if(t.type==ne.POINTERUP||t.type==ne.POINTERCANCEL){delete this.trackedTouches_[i];for(const r in this.trackedTouches_)if(this.trackedTouches_[r].target!==t.target){delete this.trackedTouches_[r];break}}else(t.type==ne.POINTERDOWN||t.type==ne.POINTERMOVE)&&(this.trackedTouches_[i]=t);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(e){this.updateActivePointers_(e);const t=new Kt(ne.POINTERUP,this.map_,e,void 0,void 0,this.activePointers_);this.dispatchEvent(t),this.emulateClicks_&&!t.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(e)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(ae),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(e){return e.button===0}handlePointerDown_(e){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(e);const t=new Kt(ne.POINTERDOWN,this.map_,e,void 0,void 0,this.activePointers_);
10if(this.dispatchEvent(t),this.down_=new PointerEvent(e.type,e),Object.defineProperty(this.down_,"target",{writable:!1,value:e.target}),this.dragListenerKeys_.length===0){const i=this.map_.getOwnerDocument();this.dragListenerKeys_.push(ee(i,ne.POINTERMOVE,this.handlePointerMove_,this),ee(i,ne.POINTERUP,this.handlePointerUp_,this),ee(this.element_,ne.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==i&&this.dragListenerKeys_.push(ee(this.element_.getRootNode(),ne.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(e){if(this.isMoving_(e)){this.updateActivePointers_(e),this.dragging_=!0;const t=new Kt(ne.POINTERDRAG,this.map_,e,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(t)}}relayMoveEvent_(e){this.originalPointerMoveEvent_=e;const t=!!(this.down_&&this.isMoving_(e));this.dispatchEvent(new Kt(ne.POINTERMOVE,this.map_,e,t))}handleTouchMove_(e){const t=this.originalPointerMoveEvent_;(!t||t.defaultPrevented)&&(typeof e.cancelable!="boolean"||e.cancelable===!0)&&e.preventDefault()}isMoving_(e){return this.dragging_||Math.abs(e.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(e.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(ae(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(V.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(ae(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(ae),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const yi={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Oe={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},B={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},oo=1/0;class Hw{constructor(e,t){this.priorityFunction_=e,this.keyFunction_=t,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,Hn(this.queuedElements_)}dequeue(){const e=this.elements_,t=this.priorities_,i=e[0];e.length==1?(e.length=0,t.length=0):(e[0]=e.pop(),t[0]=t.pop(),this.siftUp_(0));const r=this.keyFunction_(i);return delete this.queuedElements_[r],i}enqueue(e){oe(!(this.keyFunction_(e)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const t=this.priorityFunction_(e);return t!=oo?(this.elements_.push(e),this.priorities_.push(t),this.queuedElements_[this.keyFunction_(e)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(e){return e*2+1}getRightChildIndex_(e){return e*2+2}getParentIndex_(e){return e-1>>1}heapify_(){let e;for(e=(this.elements_.length>>1)-1;e>=0;e--)this.siftUp_(e)}isEmpty(){return this.elements_.length===0}isKeyQueued(e){return e in this.queuedElements_}isQueued(e){return this.isKeyQueued(this.keyFunction_(e))}siftUp_(e){const t=this.elements_,i=this.priorities_,r=t.length,s=t[e],o=i[e],a=e;for(;e<r>>1;){const l=this.getLeftChildIndex_(e),h=this.getRightChildIndex_(e),d=h<r&&i[h]<i[l]?h:l;t[e]=t[d],i[e]=i[d],e=d}t[e]=s,i[e]=o,this.siftDown_(a,e)}siftDown_(e,t){const i=this.elements_,r=this.priorities_,s=i[t],o=r[t];for(;t>e;){const a=this.getParentIndex_(t);if(r[a]>o)i[t]=i[a],r[t]=r[a],t=a;else break}i[t]=s,r[t]=o}reprioritize(){const e=this.priorityFunction_,t=this.elements_,i=this.priorities_;let r=0;const s=t.length;let o,a,l;for(a=0;a<s;++a)o=t[a],l=e(o),l==oo?delete this.queuedElements_[this.keyFunction_(o)]:(i[r]=l,t[r++]=o);t.length=r,i.length=r,this.heapify_()}}class qw extends Hw{constructor(e,t){super(i=>e.apply(null,i),i=>i[0].getKey()),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=t,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(e){const t=super.enqueue(e);return t&&e[0].addEventListener(V.CHANGE,this.boundHandleTileChange_),t}getTilesLoading(){return this.tilesLoading_}handleTileChange(e){const t=e.target,i=t.getState();if(i===B.LOADED||i===B.ERROR||i===B.EMPTY){i!==B.ERROR&&t.removeEventListener(V.CHANGE,this.boundHandleTileChange_);const r=t.getKey();r in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[r],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(e,t){let i=0;for(;this.tilesLoading_<e&&i<t&&this.getCount()>0;){const r=this.dequeue()[0],s=r.getKey();r.getState()===B.IDLE&&!(s in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++i,r.load())}}}function Jw(n,e,t,i,r){if(!n||!(t in n.wantedTiles)||!n.wantedTiles[t][e.getKey()])return oo;const s=n.viewState.center,o=i[0]-s[0],a=i[1]-s[1];return 65536*Math.log(r)+Math.sqrt(o*o+a*a)/r}class Ic extends Gt{constructor(e){super();const t=e.element;t&&!e.target&&!t.style.pointerEvents&&(t.style.pointerEvents="auto"),this.element=t||null,this.target_=null,this.map_=null,this.listenerKeys=[],e.render&&(this.render=e.render),e.target&&this.setTarget(e.target)}disposeInternal(){this.element?.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(e){this.map_&&this.element?.remove();for(let t=0,i=this.listenerKeys.length;t<i;++t)ae(this.listenerKeys[t]);if(this.listenerKeys.length=0,this.map_=e,e){const t=this.target_??e.getOverlayContainerStopEvent();this.element&&t.appendChild(this.element),this.render!==Fr&&this.listenerKeys.push(ee(e,yi.POSTRENDER,this.render,this)),e.render()}}render(e){}setTarget(e){this.target_=typeof e=="string"?document.getElementById(e):e}}class Qw extends Ic{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=e.collapsed!==void 0?e.collapsed:!0,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=e.collapsible!==void 0,this.collapsible_=e.collapsible!==void 0?e.collapsible:!0,this.collapsible_||(this.collapsed_=!1),this.attributions_=e.attributions;const t=e.className!==void 0?e.className:"ol-attribution",i=e.tipLabel!==void 0?e.tipLabel:"Attributions",r=e.expandClassName!==void 0?e.expandClassName:t+"-expand",s=e.collapseLabel!==void 0?e.collapseLabel:"âº",o=e.collapseClassName!==void 0?e.collapseClassName:t+"-collapse";typeof s=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s,this.collapseLabel_.className=o):this.collapseLabel_=s;const a=e.label!==void 0?e.label:"i";
10typeof a=="string"?(this.label_=document.createElement("span"),this.label_.textContent=a,this.label_.className=r):this.label_=a;const l=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=i,this.toggleButton_.appendChild(l),this.toggleButton_.addEventListener(V.CLICK,this.handleClick_.bind(this),!1);const h=t+" "+Po+" "+cc+(this.collapsed_&&this.collapsible_?" "+$h:"")+(this.collapsible_?"":" ol-uncollapsible"),d=this.element;d.className=h,d.appendChild(this.toggleButton_),d.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(e){const t=this.getMap().getAllLayers(),i=new Set(t.flatMap(r=>r.getAttributions(e)));if(this.attributions_!==void 0&&(Array.isArray(this.attributions_)?this.attributions_.forEach(r=>i.add(r)):i.add(this.attributions_)),!this.overrideCollapsible_){const r=!t.some(s=>s.getSource()?.getAttributionsCollapsible()===!1);this.setCollapsible(r)}return Array.from(i)}async updateElement_(e){if(!e){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const t=await Promise.all(this.collectSourceAttributions_(e).map(r=>pv(()=>r))),i=t.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!di(t,this.renderedAttributions_)){I_(this.ulElement_);for(let r=0,s=t.length;r<s;++r){const o=document.createElement("li");o.innerHTML=t[r],this.ulElement_.appendChild(o)}this.renderedAttributions_=t}}handleClick_(e){e.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle($h),this.collapsed_?Mh(this.collapseLabel_,this.label_):Mh(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(e){this.collapsible_!==e&&(this.collapsible_=e,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(e){this.userCollapsed_=e,!(!this.collapsible_||this.collapsed_===e)&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(e){this.updateElement_(e.frameState)}}class ey extends Ic{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target});const t=e.className!==void 0?e.className:"ol-rotate",i=e.label!==void 0?e.label:"â§",r=e.compassClassName!==void 0?e.compassClassName:"ol-compass";this.label_=null,typeof i=="string"?(this.label_=document.createElement("span"),this.label_.className=r,this.label_.textContent=i):(this.label_=i,this.label_.classList.add(r));const s=e.tipLabel?e.tipLabel:"Reset rotation",o=document.createElement("button");o.className=t+"-reset",o.setAttribute("type","button"),o.title=s,o.appendChild(this.label_),o.addEventListener(V.CLICK,this.handleClick_.bind(this),!1);const a=t+" "+Po+" "+cc,l=this.element;l.className=a,l.appendChild(o),this.callResetNorth_=e.resetNorth?e.resetNorth:void 0,this.duration_=e.duration!==void 0?e.duration:250,this.autoHide_=e.autoHide!==void 0?e.autoHide:!0,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(Cs)}handleClick_(e){e.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const t=this.getMap().getView();if(!t)return;const i=t.getRotation();i!==void 0&&(this.duration_>0&&i%(2*Math.PI)!==0?t.animate({rotation:0,duration:this.duration_,easing:qn}):t.setRotation(0))}render(e){const t=e.frameState;if(!t)return;const i=t.viewState.rotation;if(i!=this.rotation_){const r="rotate("+i+"rad)";if(this.autoHide_){const s=this.element.classList.contains(Cs);!s&&i===0?this.element.classList.add(Cs):s&&i!==0&&this.element.classList.remove(Cs)}this.label_.style.transform=r}this.rotation_=i}}class ty extends Ic{constructor(e){e=e||{},super({element:document.createElement("div"),target:e.target});const t=e.className!==void 0?e.className:"ol-zoom",i=e.delta!==void 0?e.delta:1,r=e.zoomInClassName!==void 0?e.zoomInClassName:t+"-in",s=e.zoomOutClassName!==void 0?e.zoomOutClassName:t+"-out",o=e.zoomInLabel!==void 0?e.zoomInLabel:"+",a=e.zoomOutLabel!==void 0?e.zoomOutLabel:"â",l=e.zoomInTipLabel!==void 0?e.zoomInTipLabel:"Zoom in",h=e.zoomOutTipLabel!==void 0?e.zoomOutTipLabel:"Zoom out",d=document.createElement("button");d.className=r,d.setAttribute("type","button"),d.title=l,d.appendChild(typeof o=="str
10ing"?document.createTextNode(o):o),d.addEventListener(V.CLICK,this.handleClick_.bind(this,i),!1);const u=document.createElement("button");u.className=s,u.setAttribute("type","button"),u.title=h,u.appendChild(typeof a=="string"?document.createTextNode(a):a),u.addEventListener(V.CLICK,this.handleClick_.bind(this,-i),!1);const g=t+" "+Po+" "+cc,f=this.element;f.className=g,f.appendChild(d),f.appendChild(u),this.duration_=e.duration!==void 0?e.duration:250}handleClick_(e,t){t.preventDefault(),this.zoomByDelta_(e)}zoomByDelta_(e){const i=this.getMap().getView();if(!i)return;const r=i.getZoom();if(r!==void 0){const s=i.getConstrainedZoom(r+e);this.duration_>0?(i.getAnimating()&&i.cancelAnimations(),i.animate({zoom:s,duration:this.duration_,easing:qn})):i.setZoom(s)}}}function iy(n){n=n||{};const e=new He;return(n.zoom===void 0||n.zoom)&&e.push(new ty(n.zoomOptions)),(n.rotate===void 0||n.rotate)&&e.push(new ey(n.rotateOptions)),(n.attribution===void 0||n.attribution)&&e.push(new Qw(n.attributionOptions)),e}class ny{constructor(e,t,i){this.decay_=e,this.minVelocity_=t,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(e,t){this.points_.push(e,t,Date.now())}end(){if(this.points_.length<6)return!1;const e=Date.now()-this.delay_,t=this.points_.length-3;if(this.points_[t+2]<e)return!1;let i=t-3;for(;i>0&&this.points_[i+2]>e;)i-=3;const r=this.points_[t+2]-this.points_[i+2];if(r<1e3/60)return!1;const s=this.points_[t]-this.points_[i],o=this.points_[t+1]-this.points_[i+1];return this.angle_=Math.atan2(o,s),this.initialVelocity_=Math.sqrt(s*s+o*o)/r,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}const vl={ACTIVE:"active"};class as extends Gt{constructor(e){super(),this.on,this.once,this.un,e&&e.handleEvent&&(this.handleEvent=e.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(vl.ACTIVE)}getMap(){return this.map_}handleEvent(e){return!0}setActive(e){this.set(vl.ACTIVE,e)}setMap(e){this.map_=e}}function ry(n,e,t){const i=n.getCenterInternal();if(i){const r=[i[0]+e[0],i[1]+e[1]];n.animateInternal({duration:t!==void 0?t:250,easing:yw,center:n.getConstrainedCenter(r)})}}function Mc(n,e,t,i){const r=n.getZoom();if(r===void 0)return;const s=n.getConstrainedZoom(r+e),o=n.getResolutionForZoom(s);n.getAnimating()&&n.cancelAnimations(),n.animate({resolution:o,anchor:t,duration:i!==void 0?i:250,easing:qn})}class sy extends as{constructor(e){super(),e=e||{},this.delta_=e.delta?e.delta:1,this.duration_=e.duration!==void 0?e.duration:250}handleEvent(e){let t=!1;if(e.type==ne.DBLCLICK){const i=e.originalEvent,r=e.map,s=e.coordinate,o=i.shiftKey?-this.delta_:this.delta_,a=r.getView();Mc(a,o,s,this.duration_),i.preventDefault(),t=!0}return!t}}function wl(n){const e=arguments;return function(t){let i=!0;for(let r=0,s=e.length;r<s&&(i=i&&e[r](t),!!i);++r);return i}}const tf=function(n){const e=n.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},oy=function(n){const e=n.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},ay=function(n){const e=n.map.getTargetElement(),t=e.getRootNode(),i=n.map.getOwnerDocument().activeElement;return t instanceof ShadowRoot?t.host.contains(i):e.contains(i)},nf=function(n){const e=n.map.getTargetElement(),t=e.getRootNode();return(t instanceof ShadowRoot?t.host:e).hasAttribute("tabindex")?ay(n):!0},Nn=sn,rf=function(n){const e=n.originalEvent;return"pointerId"in e&&e.button==0&&!(T_&&Qu&&e.ctrlKey)},sf=gn,of=function(n){return n.type==ne.SINGLECLICK},Pc=function(n){const e=n.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},ly=function(n){const e=n.originalEvent;return Qu?e.metaKey:e.ctrlKey},yl=function(n){const e=n.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},af=function(n){const e=n.originalEvent,t=e.target.tagName;return t!=="INPUT"&&t!=="SELECT"&&t!=="TEXTAREA"&&!e.target.isContentEditable},Ca=function(n){const e=n.originalEvent;return"pointerId"in e&&e.pointerType=="mouse"},lf=function(n){const e=n.originalEvent;
10return"pointerId"in e&&e.isPrimary&&e.button===0};class ji extends as{constructor(e){e=e||{},super(e),e.handleDownEvent&&(this.handleDownEvent=e.handleDownEvent),e.handleDragEvent&&(this.handleDragEvent=e.handleDragEvent),e.handleMoveEvent&&(this.handleMoveEvent=e.handleMoveEvent),e.handleUpEvent&&(this.handleUpEvent=e.handleUpEvent),e.stopDown&&(this.stopDown=e.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(e){return!1}handleDragEvent(e){}handleEvent(e){if(!e.originalEvent)return!0;let t=!1;if(this.updateTrackedPointers_(e),this.handlingDownUpSequence){if(e.type==ne.POINTERDRAG)this.handleDragEvent(e),e.originalEvent.preventDefault();else if(e.type==ne.POINTERUP){const i=this.handleUpEvent(e);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(e.type==ne.POINTERDOWN){const i=this.handleDownEvent(e);this.handlingDownUpSequence=i,t=this.stopDown(i)}else e.type==ne.POINTERMOVE&&this.handleMoveEvent(e);return!t}handleMoveEvent(e){}handleUpEvent(e){return!1}stopDown(e){return e}updateTrackedPointers_(e){e.activePointers&&(this.targetPointers=e.activePointers)}}function Lc(n){const e=n.length;let t=0,i=0;for(let r=0;r<e;r++)t+=n[r].clientX,i+=n[r].clientY;return{clientX:t/e,clientY:i/e}}class cy extends ji{constructor(e){super({stopDown:gn}),e=e||{},this.kinetic_=e.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const t=e.condition?e.condition:wl(Pc,lf);this.condition_=e.onFocusOnly?wl(nf,t):t,this.noKinetic_=!1}handleDragEvent(e){const t=e.map;this.panning_||(this.panning_=!0,t.getView().beginInteraction());const i=this.targetPointers,r=t.getEventPixel(Lc(i));if(i.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(r[0],r[1]),this.lastCentroid){const s=[this.lastCentroid[0]-r[0],r[1]-this.lastCentroid[1]],a=e.map.getView();b_(s,a.getResolution()),Jl(s,a.getRotation()),a.adjustCenterInternal(s)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=r,this.lastPointersCount_=i.length,e.originalEvent.preventDefault()}handleUpEvent(e){const t=e.map,i=t.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const r=this.kinetic_.getDistance(),s=this.kinetic_.getAngle(),o=i.getCenterInternal(),a=t.getPixelFromCoordinateInternal(o),l=t.getCoordinateFromPixelInternal([a[0]-r*Math.cos(s),a[1]-r*Math.sin(s)]);i.animateInternal({center:i.getConstrainedCenter(l),duration:500,easing:qn})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(e){if(this.targetPointers.length>0&&this.condition_(e)){const i=e.map.getView();return this.lastCentroid=null,i.getAnimating()&&i.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}class hy extends ji{constructor(e){e=e||{},super({stopDown:gn}),this.condition_=e.condition?e.condition:oy,this.lastAngle_=void 0,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){if(!Ca(e))return;const t=e.map,i=t.getView();if(i.getConstraints().rotation===Sc)return;const r=t.getSize(),s=e.pixel,o=Math.atan2(r[1]/2-s[1],s[0]-r[0]/2);if(this.lastAngle_!==void 0){const a=o-this.lastAngle_;i.adjustRotationInternal(-a)}this.lastAngle_=o}handleUpEvent(e){return Ca(e)?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){return Ca(e)&&rf(e)&&this.condition_(e)?(e.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}class dy extends Io{constructor(e){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+e,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const e=this.startPixel_,t=this.endPixel_,i="px",r=this.element_.style;r.left=Math.min(e[0],t[0])+i,r.top=Math.min(e[1],t[1])+i,r.width=Math.abs(t[0]-e[0])+i,r.height=Math.abs(t[1]-e[1])+i}setMap(e){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=e,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(e,t){this.startPixel_=e,this.endPixel_=t,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const e=this.startPixel_,t=this.endPixel_,r=[e,[e[0],t[1]],t,[t[0],e[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);r[4]=r[0].slice(),this.geometry_?this.geometry_.setCoordinates([r]):this.geometry_=new kt([r])}getGeometry(){return this.geometry_}}const bn={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class hr extends mt{constructor(e,t,i){super(e),this.coordinate=t,this.mapBrowserEvent=i}}class uy extends ji{constructor(e){super(),this.on,this.once,this.un,e=e??{},this.box_=new dy(e.className||"ol-dragbox"),this.minArea_=e.minArea??
1064,e.onBoxEnd&&(this.onBoxEnd=e.onBoxEnd),this.startPixel_=null,this.condition_=e.condition??rf,this.boxEndCondition_=e.boxEndCondition??this.defaultBoxEndCondition}defaultBoxEndCondition(e,t,i){const r=i[0]-t[0],s=i[1]-t[1];return r*r+s*s>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(e){this.startPixel_&&(this.box_.setPixels(this.startPixel_,e.pixel),this.dispatchEvent(new hr(bn.BOXDRAG,e.coordinate,e)))}handleUpEvent(e){if(!this.startPixel_)return!1;const t=this.boxEndCondition_(e,this.startPixel_,e.pixel);return t&&this.onBoxEnd(e),this.dispatchEvent(new hr(t?bn.BOXEND:bn.BOXCANCEL,e.coordinate,e)),this.box_.setMap(null),this.startPixel_=null,!1}handleDownEvent(e){return this.condition_(e)?(this.startPixel_=e.pixel,this.box_.setMap(e.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new hr(bn.BOXSTART,e.coordinate,e)),!0):!1}onBoxEnd(e){}setActive(e){e||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new hr(bn.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setActive(e)}setMap(e){this.getMap()&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new hr(bn.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setMap(e)}}class gy extends uy{constructor(e){e=e||{};const t=e.condition?e.condition:yl;super({condition:t,className:e.className||"ol-dragzoom",minArea:e.minArea}),this.duration_=e.duration!==void 0?e.duration:200,this.out_=e.out!==void 0?e.out:!1}onBoxEnd(e){const i=this.getMap().getView();let r=this.getGeometry();if(this.out_){const s=i.rotatedExtentForGeometry(r),o=i.getResolutionForExtentInternal(s),a=i.getResolution()/o;r=r.clone(),r.scale(a*a)}i.fitInternal(r,{duration:this.duration_,easing:qn})}}const Bi={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class fy extends as{constructor(e){super(),e=e||{},this.defaultCondition_=function(t){return Pc(t)&&af(t)},this.condition_=e.condition!==void 0?e.condition:this.defaultCondition_,this.duration_=e.duration!==void 0?e.duration:100,this.pixelDelta_=e.pixelDelta!==void 0?e.pixelDelta:128}handleEvent(e){let t=!1;if(e.type==V.KEYDOWN){const i=e.originalEvent,r=i.key;if(this.condition_(e)&&(r==Bi.DOWN||r==Bi.LEFT||r==Bi.RIGHT||r==Bi.UP)){const o=e.map.getView(),a=o.getResolution()*this.pixelDelta_;let l=0,h=0;r==Bi.DOWN?h=-a:r==Bi.LEFT?l=-a:r==Bi.RIGHT?l=a:h=a;const d=[l,h];Jl(d,o.getRotation()),ry(o,d,this.duration_),i.preventDefault(),t=!0}}return!t}}class my extends as{constructor(e){super(),e=e||{},this.condition_=e.condition?e.condition:function(t){return!ly(t)&&af(t)},this.delta_=e.delta?e.delta:1,this.duration_=e.duration!==void 0?e.duration:100}handleEvent(e){let t=!1;if(e.type==V.KEYDOWN||e.type==V.KEYPRESS){const i=e.originalEvent,r=i.key;if(this.condition_(e)&&(r==="+"||r==="-")){const s=e.map,o=r==="+"?this.delta_:-this.delta_,a=s.getView();Mc(a,o,void 0,this.duration_),i.preventDefault(),t=!0}}return!t}}const py=40,_y=300,vy=3;class wy extends as{constructor(e){e=e||{},super(e),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=e.maxDelta!==void 0?e.maxDelta:1,this.duration_=e.duration!==void 0?e.duration:250,this.timeout_=e.timeout!==void 0?e.timeout:80,this.useAnchor_=e.useAnchor!==void 0?e.useAnchor:!0,this.constrainResolution_=e.constrainResolution!==void 0?e.constrainResolution:!1;const t=e.condition?e.condition:Nn;this.condition_=e.onFocusOnly?wl(nf,t):t,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300,this.ctrlKeyPressed_=!1,this.ctrlKeyListenerKeys_=[]}setMap(e){if(this.ctrlKeyListenerKeys_.forEach(ae),this.ctrlKeyListenerKeys_.length=0,this.ctrlKeyPressed_=!1,super.setMap(e),e){const t=e.getOwnerDocument();this.ctrlKeyListenerKeys_.push(ee(t,"keydown",i=>{i.key==="Control"&&(this.ctrlKeyPressed_=!0)}),ee(t,"keyup",i=>{i.key==="Control"&&(this.ctrlKeyPressed_=!1)}))}}endInteraction_(){this.trackpadTimeoutId_=void 0;const e=this.getMap();if(!e)return;const t=e.getView(),i=this.lastDelta_?this.lastDelta_>0?1:-1:0;t.endInteraction(this.constrainResolution_||t.getConstrainResolution()?100:void 0,i,this.lastAnchor_?e.getCoordinateFromPixel(this.lastAnchor_):null)}handleEvent(e){if(!this.condition_(e)||e.type!==V.WHEEL)return!0;const i=e.map,r=e.originalEvent;r.preventDefault();const s=r.ctrlKey&&!this.ctrlKeyPressed_;r.ctrlKey||(this.ctrlKeyPressed_=!1),this.useAnchor_&&(this.lastAnchor_=e.pixel);let o=r.deltaY;switch(r.deltaMode){case WheelEvent.DOM_DELTA_LINE:o*=py;break;case WheelEvent.DOM_DELTA_PAGE:o*=_y;break}if(o===0)return!1;this.lastDelta_=o;const a=Date.now();this.startTime_===void 0&&(this.startTime_=a),(!this.mode_||a-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(o)<4?"trackpad":"wheel");const l=i.getView();if(this.mode_==="trackpad")return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(l.getAnimating()&&l.cancelAnimations(),l.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),s&&(o=o*vy),l.adjustZoom(-o/this.deltaPerZoom_,this.lastAnchor_?i.getCoordinateFromPixel(this.lastAnchor_):null),this.startTime_=a,!1;this.totalDelta_+=o;const h=Math.max(this.timeout_-(a-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),h),!1}handleWheelZoom_(e){const t=e.getView();t.getAnimating()&&t.cancelAnimations();
10let i=-me(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(t.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),Mc(t,i,this.lastAnchor_?e.getCoordinateFromPixel(this.lastAnchor_):null,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(e){this.useAnchor_=e,e||(this.lastAnchor_=null)}}class yy extends ji{constructor(e){e=e||{};const t=e;t.stopDown||(t.stopDown=gn),super(t),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=e.threshold!==void 0?e.threshold:.3,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){let t=0;const i=this.targetPointers[0],r=this.targetPointers[1],s=Math.atan2(r.clientY-i.clientY,r.clientX-i.clientX);if(this.lastAngle_!==void 0){const l=s-this.lastAngle_;this.rotationDelta_+=l,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),t=l}this.lastAngle_=s;const o=e.map,a=o.getView();a.getConstraints().rotation!==Sc&&(this.anchor_=o.getCoordinateFromPixelInternal(o.getEventPixel(Lc(this.targetPointers))),this.rotating_&&(o.render(),a.adjustRotationInternal(t,this.anchor_)))}handleUpEvent(e){return this.targetPointers.length<2?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){if(this.targetPointers.length>=2){const t=e.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||t.getView().beginInteraction(),!0}return!1}}class xy extends ji{constructor(e){e=e||{};const t=e;t.stopDown||(t.stopDown=gn),super(t),this.anchor_=null,this.duration_=e.duration!==void 0?e.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(e){let t=1;const i=this.targetPointers[0],r=this.targetPointers[1],s=i.clientX-r.clientX,o=i.clientY-r.clientY,a=Math.sqrt(s*s+o*o);this.lastDistance_!==void 0&&(t=this.lastDistance_/a),this.lastDistance_=a;const l=e.map,h=l.getView();t!=1&&(this.lastScaleDelta_=t),this.anchor_=l.getCoordinateFromPixelInternal(l.getEventPixel(Lc(this.targetPointers))),l.render(),h.adjustResolutionInternal(t,this.anchor_)}handleUpEvent(e){if(this.targetPointers.length<2){const i=e.map.getView(),r=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,r),!1}return!0}handleDownEvent(e){if(this.targetPointers.length>=2){const t=e.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||t.getView().beginInteraction(),!0}return!1}}function by(n){n=n||{};const e=new He,t=new ny(-.005,.05,100);return(n.altShiftDragRotate===void 0||n.altShiftDragRotate)&&e.push(new hy),(n.doubleClickZoom===void 0||n.doubleClickZoom)&&e.push(new sy({delta:n.zoomDelta,duration:n.zoomDuration})),(n.dragPan===void 0||n.dragPan)&&e.push(new cy({onFocusOnly:n.onFocusOnly,kinetic:t})),(n.pinchRotate===void 0||n.pinchRotate)&&e.push(new yy),(n.pinchZoom===void 0||n.pinchZoom)&&e.push(new xy({duration:n.zoomDuration})),(n.keyboard===void 0||n.keyboard)&&(e.push(new fy),e.push(new my({delta:n.zoomDelta,duration:n.zoomDuration}))),(n.mouseWheelZoom===void 0||n.mouseWheelZoom)&&e.push(new wy({onFocusOnly:n.onFocusOnly,duration:n.zoomDuration})),(n.shiftDragZoom===void 0||n.shiftDragZoom)&&e.push(new gy({duration:n.zoomDuration})),e}const vi={ADDLAYER:"addlayer",REMOVELAYER:"removelayer"};class bi extends mt{constructor(e,t){super(e),this.layer=t}}const ka={LAYERS:"layers"};class pn extends qg{constructor(e){e=e||{};const t=Object.assign({},e);delete t.layers;let i=e.layers;super(t),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(ka.LAYERS,this.handleLayersChanged_),i?Array.isArray(i)?i=new He(i.slice(),{unique:!0}):oe(typeof i.getArray=="function","Expected `layers` to be an array or a `Collection`"):i=new He(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(ae),this.layersListenerKeys_.length=0;const e=this.getLayers();this.layersListenerKeys_.push(ee(e,ye.ADD,this.handleLayersAdd_,this),ee(e,ye.REMOVE,this.handleLayersRemove_,this));
10for(const i in this.listenerKeys_)this.listenerKeys_[i].forEach(ae);Hn(this.listenerKeys_);const t=e.getArray();for(let i=0,r=t.length;i<r;i++){const s=t[i];this.registerLayerListeners_(s),this.dispatchEvent(new bi(vi.ADDLAYER,s))}this.changed()}registerLayerListeners_(e){const t=[ee(e,wt.PROPERTYCHANGE,this.handleLayerChange_,this),ee(e,V.CHANGE,this.handleLayerChange_,this)];e instanceof pn&&t.push(ee(e,vi.ADDLAYER,this.handleLayerGroupAdd_,this),ee(e,vi.REMOVELAYER,this.handleLayerGroupRemove_,this)),this.listenerKeys_[H(e)]=t}handleLayerGroupAdd_(e){this.dispatchEvent(new bi(vi.ADDLAYER,e.layer))}handleLayerGroupRemove_(e){this.dispatchEvent(new bi(vi.REMOVELAYER,e.layer))}handleLayersAdd_(e){const t=e.element;this.registerLayerListeners_(t),this.dispatchEvent(new bi(vi.ADDLAYER,t)),this.changed()}handleLayersRemove_(e){const t=e.element,i=H(t);this.listenerKeys_[i].forEach(ae),delete this.listenerKeys_[i],this.dispatchEvent(new bi(vi.REMOVELAYER,t)),this.changed()}getLayers(){return this.get(ka.LAYERS)}setLayers(e){const t=this.getLayers();if(t){const i=t.getArray();for(let r=0,s=i.length;r<s;++r)this.dispatchEvent(new bi(vi.REMOVELAYER,i[r]))}this.set(ka.LAYERS,e)}getLayersArray(e){return e=e!==void 0?e:[],this.getLayers().forEach(function(t){t.getLayersArray(e)}),e}getLayerStatesArray(e){const t=e!==void 0?e:[],i=t.length;this.getLayers().forEach(function(o){o.getLayerStatesArray(t)});const r=this.getLayerState();let s=r.zIndex;!e&&r.zIndex===void 0&&(s=0);for(let o=i,a=t.length;o<a;o++){const l=t[o];l.opacity*=r.opacity,l.visible=l.visible&&r.visible,l.maxResolution=Math.min(l.maxResolution,r.maxResolution),l.minResolution=Math.max(l.minResolution,r.minResolution),l.minZoom=Math.max(l.minZoom,r.minZoom),l.maxZoom=Math.min(l.maxZoom,r.maxZoom),r.extent!==void 0&&(l.extent!==void 0?l.extent=Ji(l.extent,r.extent):l.extent=r.extent),l.zIndex===void 0&&(l.zIndex=s)}return t}getSourceState(){return"ready"}}class Ey extends Io{constructor(e){super(),this.map_=e}dispatchRenderEvent(e,t){re()}calculateMatrices2D(e){const t=e.viewState,i=e.coordinateToPixelTransform,r=e.pixelToCoordinateTransform;ci(i,e.size[0]/2,e.size[1]/2,1/t.resolution,-1/t.resolution,-t.rotation,-t.center[0],-t.center[1]),vg(r,i)}forEachFeatureAtCoordinate(e,t,i,r,s,o,a,l){let h;const d=t.viewState;function u(y,b,k,R){return s.call(o,b,y?k:null,R)}const g=d.projection,f=Ju(e.slice(),g),m=[[0,0]];if(g.canWrapX()&&r){const y=g.getExtent(),b=de(y);m.push([-b,0],[b,0])}const _=t.layerStatesArray,p=_.length,v=[],w=[];for(let y=0;y<m.length;y++)for(let b=p-1;b>=0;--b){const k=_[b],R=k.layer;if(R.hasRenderer()&&Rc(k,d)&&a.call(l,R)){const T=R.getRenderer(),E=R.getSource();if(T&&E){const C=E.getWrapX()?f:e,M=u.bind(null,k.managed);w[0]=C[0]+m[y][0],w[1]=C[1]+m[y][1],h=T.forEachFeatureAtCoordinate(w,t,i,M,v)}if(h)return h}}if(v.length===0)return;const x=1/v.length;return v.forEach((y,b)=>y.distanceSq+=b*x),v.sort((y,b)=>y.distanceSq-b.distanceSq),v.some(y=>h=y.callback(y.feature,y.layer,y.geometry)),h}hasFeatureAtCoordinate(e,t,i,r,s,o){return this.forEachFeatureAtCoordinate(e,t,i,r,sn,this,s,o)!==void 0}getMap(){return this.map_}renderFrame(e){re()}scheduleExpireIconCache(e){ht.canExpireCache()&&e.postRenderFunctions.push(Cy)}}function Cy(n,e){ht.expire()}
10class ky extends Ey{constructor(e){super(e),this.fontChangeListenerKey_=ee(Tn,wt.PROPERTYCHANGE,e.redrawText,e),this.element_=lt?ig():document.createElement("div");const t=this.element_.style;t.position="absolute",t.width="100%",t.height="100%",t.zIndex="0",this.element_.className=Po+" ol-layers";const i=e.getViewport();i&&i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(e,t){const i=this.getMap();if(i.hasListener(e)){const r=new Ig(e,void 0,t);i.dispatchEvent(r)}}disposeInternal(){ae(this.fontChangeListenerKey_),this.element_.remove(),super.disposeInternal()}renderFrame(e){if(!e){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(e),this.dispatchRenderEvent(ct.PRECOMPOSE,e);const t=e.layerStatesArray.sort((h,d)=>h.zIndex-d.zIndex);t.some(h=>h.layer instanceof Jg&&h.layer.getDeclutter())&&(e.declutter={});const r=e.viewState;this.children_.length=0;const s=[];let o=null;for(let h=0,d=t.length;h<d;++h){const u=t[h];e.layerIndex=h;const g=u.layer,f=g.getSourceState();if(!Rc(u,r)||f!="ready"&&f!="undefined"){g.unrender();continue}const m=g.render(e,o);m&&(m!==o&&(this.children_.push(m),o=m),s.push(u))}this.declutter(e,s),M_(this.element_,this.children_);const l=this.getMap().getTargetElement();if(Si(l)){const h=l.getContext("2d");for(const d of this.children_){const u=d.firstElementChild||d,g=d.style.backgroundColor;if(g&&(!Si(u)||u.width>0)&&(h.fillStyle=g,h.fillRect(0,0,l.width,l.height)),Si(u)&&u.width>0){h.save();const f=d.style.opacity||u.style.opacity;h.globalAlpha=f===""?1:Number(f);const m=u.style.transform;if(m)h.transform(...ul(m));else{const _=parseFloat(u.style.width)/u.width,p=parseFloat(u.style.height)/u.height;h.transform(_,0,0,p,0,0)}h.drawImage(u,0,0),h.restore()}}}this.dispatchRenderEvent(ct.POSTCOMPOSE,e),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(e)}declutter(e,t){if(e.declutter){for(let i=t.length-1;i>=0;--i){const r=t[i],s=r.layer;s.getDeclutter()&&s.renderDeclutter(e,r)}t.forEach(i=>i.layer.renderDeferred(e))}}}function cf(n){if(n instanceof Go){n.setMapInternal(null);return}n instanceof pn&&n.getLayers().forEach(cf)}function hf(n,e){if(n instanceof Go){n.setMapInternal(e);return}if(n instanceof pn){const t=n.getLayers().getArray();for(let i=0,r=t.length;i<r;++i)hf(t[i],e)}}let Sy=class extends Gt{constructor(e){super(),e=e||{},this.on,this.once,this.un;const t=Ty(e);this.renderComplete_=!1,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=e.maxTilesLoading!==void 0?e.maxTilesLoading:16,this.pixelRatio_=e.pixelRatio!==void 0?e.pixelRatio:R_,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=Et(),this.pixelToCoordinateTransform_=Et(),this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,lt||(this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_)),this.mapBrowserEventHandler_=null,this.moveTolerance_=e.moveTolerance,this.keyboardEventTarget_=t.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,lt||(this.resizeObserver_=new ResizeObserver(()=>this.updateSize())),this.controls=t.controls||(lt?new He:iy()),this.interactions=t.interactions||(lt?new He:by({onFocusOnly:!0}
10)),this.overlays_=t.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new qw(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(Oe.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(Oe.VIEW,this.handleViewChanged_),this.addChangeListener(Oe.SIZE,this.handleSizeChanged_),this.addChangeListener(Oe.TARGET,this.handleTargetChanged_),this.setProperties(t.values);const i=this;e.view&&!(e.view instanceof xt)&&e.view.then(function(r){i.setView(new xt(r))}),this.controls.addEventListener(ye.ADD,r=>{r.element.setMap(this)}),this.controls.addEventListener(ye.REMOVE,r=>{r.element.setMap(null)}),this.interactions.addEventListener(ye.ADD,r=>{r.element.setMap(this)}),this.interactions.addEventListener(ye.REMOVE,r=>{r.element.setMap(null)}),this.overlays_.addEventListener(ye.ADD,r=>{this.addOverlayInternal_(r.element)}),this.overlays_.addEventListener(ye.REMOVE,r=>{const s=r.element.getId();s!==void 0&&delete this.overlayIdIndex_[s.toString()],r.element.setMap(null)}),this.controls.forEach(r=>{r.setMap(this)}),this.interactions.forEach(r=>{r.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(e){this.getControls().push(e)}addInteraction(e){this.getInteractions().push(e)}addLayer(e){this.getLayerGroup().getLayers().push(e)}handleLayerAdd_(e){hf(e.layer,this)}addOverlay(e){this.getOverlays().push(e)}addOverlayInternal_(e){const t=e.getId();t!==void 0&&(this.overlayIdIndex_[t.toString()]=e),e.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_?.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(e,t,i){if(!this.frameState_||!this.renderer_)return;const r=this.getCoordinateFromPixelInternal(e);i=i!==void 0?i:{};const s=i.hitTolerance!==void 0?i.hitTolerance:0,o=i.layerFilter!==void 0?i.layerFilter:sn,a=i.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(r,this.frameState_,s,a,t,null,o,null)}getFeaturesAtPixel(e,t){const i=[];return this.forEachFeatureAtPixel(e,function(r){i.push(r)},t),i}getAllLayers(){const e=[];function t(i){i.forEach(function(r){r instanceof pn?t(r.getLayers()):e.push(r)})}return t(this.getLayers()),e}hasFeatureAtPixel(e,t){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(e);t=t!==void 0?t:{};const r=t.layerFilter!==void 0?t.layerFilter:sn,s=t.hitTolerance!==void 0?t.hitTolerance:0,o=t.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,s,o,r,null)}getEventCoordinate(e){return this.getCoordinateFromPixel(this.getEventPixel(e))}getEventCoordinateInternal(e){return this.getCoordinateFromPixelInternal(this.getEventPixel(e))}getEventPixel(e){const i=this.viewport_.getBoundingClientRect(),r=this.getSize(),s=i.width/r[0],o=i.height/r[1],a="changedTouches"in e?e.changedTouches[0]:e;return[(a.clientX-i.left)/s,(a.clientY-i.top)/o]}getTarget(){return this.get(Oe.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(e){return Di(this.getCoordinateFromPixelInternal(e),this.getView().getProjection())}getCoordinateFromPixelInternal(e){const t=this.frameState_;return t?Ie(t.pixelToCoordinateTransform,e.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(e){const t=this.overlayIdIndex_[e.toString()];return t!==void 0?t:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(Oe.LAYERGROUP)}setLayers(e){const t=this.getLayerGroup();if(e instanceof He){t.setLayers(e);return}const i=t.getLayers();i.clear(),i.extend(e)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const e=this.getLayerGroup().getLayerStatesArray();for(let t=0,i=e.length;t<i;++t){const r=e[t];if(!r.visible)continue;const s=r.layer.getRenderer();if(s&&!s.ready)return!0;const o=r.layer.getSource();if(o&&o.loading)return!0}return!1}getPixelFromCoordinate(e){const t=ue(e,this.getView().getProjection());return this.getPixelFromCoordinateInternal(t)}
10getPixelFromCoordinateInternal(e){const t=this.frameState_;return t?Ie(t.coordinateToPixelTransform,e.slice(0,2)):null}getPixelRatio(){return this.pixelRatio_}setPixelRatio(e){this.pixelRatio_!==e&&(this.pixelRatio_=e,this.render())}getRenderer(){return this.renderer_}getSize(){return this.get(Oe.SIZE)}getView(){return this.get(Oe.VIEW)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const e=this.getTargetElement();return e?e.ownerDocument:document}getTilePriority(e,t,i,r){return Jw(this.frameState_,e,t,i,r)}handleBrowserEvent(e,t){t=t||e.type;const i=new Kt(t,this,e);this.handleMapBrowserEvent(i)}handleMapBrowserEvent(e){if(!this.frameState_)return;const t=e.originalEvent,i=t.type;if(i===_l.POINTERDOWN||i===V.WHEEL||i===V.KEYDOWN){const r=this.getOwnerDocument(),s=this.viewport_.getRootNode?this.viewport_.getRootNode():r,o=t.target,a=s instanceof ShadowRoot?s.host===o?s.host.ownerDocument:s:s===r?r.documentElement:s;if(this.overlayContainerStopEvent_.contains(o)||!a.contains(o))return}if(e.frameState=this.frameState_,this.dispatchEvent(e)!==!1){const r=this.getInteractions().getArray().slice();for(let s=r.length-1;s>=0;s--){const o=r[s];if(o.getMap()!==this||!o.getActive()||!this.getTargetElement())continue;if(!o.handleEvent(e)||e.propagationStopped)break}}}handlePostRender(){const e=this.frameState_,t=this.tileQueue_;if(!t.isEmpty()){let r=this.maxTilesLoading_,s=r;const o=e?e.viewHints:void 0,a=o?o[Fe.ANIMATING]||o[Fe.INTERACTING]:!1;if(a){const l=Date.now()-e.time>8;r=l?0:8,s=l?0:2}t.getTilesLoading()<r&&(a&&t.reprioritize(),t.loadMoreTiles(r,s))}e&&this.renderer_&&!e.animate&&(this.renderComplete_?(this.hasListener(ct.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(ct.RENDERCOMPLETE,e),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new Mn(yi.LOADEND,this,e)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new Mn(yi.LOADSTART,this,e))));const i=this.postRenderFunctions_;if(e)for(let r=0,s=i.length;r<s;++r)i[r](this,e);i.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let i=0,r=this.targetChangeHandlerKeys_.length;i<r;++i)ae(this.targetChangeHandlerKeys_[i]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(V.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(V.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,this.viewport_.remove()}if(this.targetElement_&&!Si(this.targetElement_)){this.resizeObserver_?.unobserve(this.targetElement_);const i=this.targetElement_.getRootNode();i instanceof ShadowRoot&&this.resizeObserver_.unobserve(i.host),this.setSize(void 0)}const e=this.getTarget(),t=typeof e=="string"?document.getElementById(e):e;if(this.targetElement_=t,!t)this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);else{if(Si(t)||t.appendChild(this.viewport_),this.renderer_||(this.renderer_=new ky(this)),!Si(t)){this.mapBrowserEventHandler_=new Zw(this,this.moveTolerance_);for(const r in ne)this.mapBrowserEventHandler_.addEventListener(ne[r],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(V.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(V.WHEEL,this.boundHandleBrowserEvent_,tg?{passive:!1}:!1);let i;if(this.keyboardEventTarget_)i=this.keyboardEventTarget_;else{const r=t.getRootNode();i=r instanceof ShadowRoot?r.host:t}if(this.targetChangeHandlerKeys_=[ee(i,V.KEYDOWN,this.handleBrowserEvent,this),ee(i,V.KEYPRESS,this.handleBrowserEvent,this)],t instanceof HTMLElement){const r=t.getRootNode();r instanceof ShadowRoot&&this.resizeObserver_.observe(r.host),this.resizeObserver_?.observe(t)}}this.updateSize()}}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(ae(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(ae(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const e=this.getView();e&&(this.updateViewportSize_(this.getSize()),this.viewPropertyListenerKey_=ee(e,wt.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=ee(e,V.CHANGE,this.handleViewPropertyChanged_,this),e.resolve
10Constraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(ae),this.layerGroupPropertyListenerKeys_=null);const e=this.getLayerGroup();e&&(this.handleLayerAdd_(new bi("addlayer",e)),this.layerGroupPropertyListenerKeys_=[ee(e,wt.PROPERTYCHANGE,this.render,this),ee(e,V.CHANGE,this.render,this),ee(e,"addlayer",this.handleLayerAdd_,this),ee(e,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){if(!this.frameState_)return;const e=this.frameState_.layerStatesArray;for(let t=0,i=e.length;t<i;++t){const r=e[t].layer;r.hasRenderer()&&r.getRenderer().handleFontsChanged()}}render(){this.renderer_&&this.animationDelayKey_===void 0&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}removeControl(e){return this.getControls().remove(e)}removeInteraction(e){return this.getInteractions().remove(e)}removeLayer(e){return this.getLayerGroup().getLayers().remove(e)}handleLayerRemove_(e){cf(e.layer)}removeOverlay(e){return this.getOverlays().remove(e)}renderFrame_(e){const t=this.getSize(),i=this.getView(),r=this.frameState_;let s=null;if(t!==void 0&&qh(t)&&i&&i.isDef()){const o=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=i.getState();if(s={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutter:null,extent:nl(a.center,a.resolution,a.rotation,t),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:t,tileQueue:this.tileQueue_,time:e,usedTiles:{},viewState:a,viewHints:o,wantedTiles:{},mapId:H(this),renderTargets:{}},a.nextCenter&&a.nextResolution){const l=isNaN(a.nextRotation)?a.rotation:a.nextRotation;s.nextExtent=nl(a.nextCenter,a.nextResolution,l,t)}}this.frameState_=s,this.renderer_.renderFrame(s),s&&(s.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,s.postRenderFunctions),r&&(!this.previousExtent_||!ts(this.previousExtent_)&&!Ar(s.extent,this.previousExtent_))&&(this.dispatchEvent(new Mn(yi.MOVESTART,this,r)),this.previousExtent_=es(this.previousExtent_)),this.previousExtent_&&!s.viewHints[Fe.ANIMATING]&&!s.viewHints[Fe.INTERACTING]&&!Ar(s.extent,this.previousExtent_)&&(this.dispatchEvent(new Mn(yi.MOVEEND,this,s)),Yu(s.extent,this.previousExtent_))),this.dispatchEvent(new Mn(yi.POSTRENDER,this,s)),this.renderComplete_=(this.hasListener(yi.LOADSTART)||this.hasListener(yi.LOADEND)||this.hasListener(ct.RENDERCOMPLETE))&&!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady(),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(e){const t=this.getLayerGroup();t&&this.handleLayerRemove_(new bi("removelayer",t)),this.set(Oe.LAYERGROUP,e)}setSize(e){this.set(Oe.SIZE,e)}setTarget(e){this.set(Oe.TARGET,e)}setView(e){if(!e||e instanceof xt){this.set(Oe.VIEW,e);return}this.set(Oe.VIEW,new xt);const t=this;e.then(function(i){t.setView(new xt(i))})}updateSize(){const e=this.getTargetElement();let t;if(e){let r,s;if(Si(e)){const o=e.getContext("2d").getTransform();r=e.width/o.a,s=e.height/o.d}else{const o=getComputedStyle(e);r=e.offsetWidth-parseFloat(o.borderLeftWidth)-parseFloat(o.paddingLeft)-parseFloat(o.paddingRight)-parseFloat(o.borderRightWidth),s=e.offsetHeight-parseFloat(o.borderTopWidth)-parseFloat(o.paddingTop)-parseFloat(o.paddingBottom)-parseFloat(o.borderBottomWidth)}!isNaN(r)&&!isNaN(s)&&(t=[Math.max(0,r),Math.max(0,s)],!qh(t)&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)&&ng("No map visible because the map container's width or height are 0."))}const i=this.getSize();t&&(!i||!di(t,i))&&(this.updateViewportSize_(t),this.setSize(t))}updateViewportSize_(e){const t=this.getView();t&&t.setViewportSize(e)}};function Ty(n){let e=null;n.keyboardEventTarget!==void 0&&(e=typeof n.keyboardEventTarget=="string"?document.getElementById(n.keyboardEventTarget):n.keyboardEventTarget);const t={},i=n.layers&&typeof n.layers.getLayers=="function"?n.layers:new pn({layers:n.layers});t[Oe.LAYERGROUP]=i,t[Oe.TARGET]=n.target,t[Oe.VIEW]=n.view instanceof xt?n.view:new xt;let r;n.controls!==void 0&&(Array.isArray(n.controls)?r=new He(n.controls.slice()):(oe(typeof n.controls.getArray=="function","Expected `controls` to be an array or an `ol/Collection.js`"),r=n.controls));let s;n.interactions!==void 0&&(Array.isArray(n.interactions)?s=new He(n.interactions.slice()):(oe(typeof n.interactions.getArray=="function","Expected `interactions` to be an array or an `ol/Collection.js`"),s=n.interactions));let o;return n.overlays!==void 0?Array.isArray(n.overlays)?o=new He(n.overlays.slice()):(oe(typeof n.overlays.getArray=="function","Expected `overlays` to be an array or an `ol/Collection.js`"),o=n.overlays):o=new He,{controls:r,interactions:s,keyboardEventTarget:e,overlays:o,values:t}}class Ac extends Mo{constructor(e,t,i){super(),i=i||{},this.tileCoord=e,this.state=t,this.key="",this.transition_=i.transition===void 0?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(V.CHANGE)}release(){this.setState(B.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(e){if(this.state!==B.EMPTY){if(this.state!==B.ERROR&&this.state>e)throw new Error("Tile load sequence violation");this.state=e,this.changed()}}load(){re()}getAlpha(e,t){if(!this.transition_)return 1;let i=this.transitionStarts_[e];if(!i)i=t,this.transitionStarts_[e]=i;else if(i===-1)return 1;const r=t-i+1e3/60;return r>=this.transition_?1:Bg(r/this.transition_)}inTransition(e){return this.transition_?this.transitionStarts_[e]!==-1:!1}endTransition(e){this.transition_&&(this.transitionStarts_[e]=-1)}disposeInternal(){this.release(),super.disposeInternal()}}function xl(n){return n instanceof Image||n instanceof HTMLCanvasElement||n instanceof HTMLVideoElement||n instanceof ImageBitmap?n:null}const Ry=new Error("disposed"),Iy=[256,256];class Cd extends Ac{constructor(e){const t=B.IDLE;super(e.tileCoord,t,{transition:e.transition,interpolate:e.interpolate}),this.loader_=e.loader,this.data_=null,this.error_=null,this.size_=e.size||null,this.controller_=e.controller||null}getSize(){if(this.size_)return this.size_;const e=xl(this.data_);return e?[e.width,e.height]:Iy}getData(){return this.data_}getError(){return this.error_}load(){if(this.state!==B.IDLE&&this.state!==B.ERROR)return;this.state=B.LOADING,this.changed();const e=this;this.loader_().then(function(t){e.data_=t,e.state=B.LOADED,e.changed()}).catch(function(t){e.error_=t,e.state=B.ERROR,e.changed()})}disposeInternal(){this.controller_&&(this.controller_.abort(Ry),this.controller_=null),super.disposeInternal()}}class df extends Ac{constructor(e,t,i,r,s,o){super(e,t,o),this.crossOrigin_=r?.crossOrigin,this.referrerPolicy_=r?.referrerPolicy,this.src_=i,this.key=i,this.image_,lt?this.image_=new OffscreenCanvas(1,1):(this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_),this.referrerPolicy_!==void 0&&(this.image_.referrerPolicy=this.referrerPolicy_)),this.unlisten_=null,this.tileLoadFunction_=s}getImage(){return this.image_}setImage(e){this.image_=e,this.state=B.LOADED,this.unlistenImage_(),this.changed()}getCrossOrigin(){return this.crossOrigin_}getReferrerPolicy(){return this.referrerPolicy_}handleImageError_(){this.state=B.ERROR,this.unlistenImage_(),this.image_=My(),this.changed()}handleImageLoad_(){if(lt)this.state=B.LOADED;else{const e=this.image_;
10e.naturalWidth&&e.naturalHeight?this.state=B.LOADED:this.state=B.EMPTY}this.unlistenImage_(),this.changed()}load(){this.state==B.ERROR&&(this.state=B.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_),this.referrerPolicy_!==void 0&&(this.image_.referrerPolicy=this.referrerPolicy_)),this.state==B.IDLE&&(this.state=B.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=_v(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}disposeInternal(){this.unlistenImage_(),this.image_=null,super.disposeInternal()}}function My(){const n=xe(1,1);return n.fillStyle="rgba(0,0,0,0)",n.fillRect(0,0,1,1),n.canvas}class Dc{constructor(e,t,i,r){this.minX=e,this.maxX=t,this.minY=i,this.maxY=r}contains(e){return this.containsXY(e[1],e[2])}containsTileRange(e){return this.minX<=e.minX&&e.maxX<=this.maxX&&this.minY<=e.minY&&e.maxY<=this.maxY}containsXY(e,t){return this.minX<=e&&e<=this.maxX&&this.minY<=t&&t<=this.maxY}equals(e){return this.minX==e.minX&&this.minY==e.minY&&this.maxX==e.maxX&&this.maxY==e.maxY}extend(e){e.minX<this.minX&&(this.minX=e.minX),e.maxX>this.maxX&&(this.maxX=e.maxX),e.minY<this.minY&&(this.minY=e.minY),e.maxY>this.maxY&&(this.maxY=e.maxY)}
10getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(e){return this.minX<=e.maxX&&this.maxX>=e.minX&&this.minY<=e.maxY&&this.maxY>=e.minY}}function En(n,e,t,i,r){return r!==void 0?(r.minX=n,r.maxX=e,r.minY=t,r.maxY=i,r):new Dc(n,e,t,i)}let Sa;const zn=[];function kd(n,e,t,i,r){n.beginPath(),n.moveTo(0,0),n.lineTo(e,t),n.lineTo(i,r),n.closePath(),n.save(),n.clip(),n.fillRect(0,0,Math.max(e,i)+1,Math.max(t,r)),n.restore()}function Ta(n,e){return Math.abs(n[e*4]-210)>2||Math.abs(n[e*4+3]-.75*255)>2}function Py(){if(Sa===void 0){const n=xe(6,6,zn);n.globalCompositeOperation="lighter",n.fillStyle="rgba(210, 0, 0, 0.75)",kd(n,4,5,4,0),kd(n,4,5,0,5);const e=n.getImageData(0,0,3,3).data;Sa=Ta(e,0)||Ta(e,4)||Ta(e,8),ko(n),zn.push(n.canvas)}return Sa}function Sd(n,e,t,i){const r=cg(t,e,n);let s=zh(e,i,t);const o=e.getMetersPerUnit();o!==void 0&&(s*=o);const a=n.getMetersPerUnit();a!==void 0&&(s/=a);const l=n.getExtent();if(!l||Vn(l,r)){const h=zh(n,s,r)/s;isFinite(h)&&h>0&&(s/=h)}return s}function Ly(n,e,t,i){const r=li(t);let s=Sd(n,e,r,i);return(!isFinite(s)||s<=0)&&ql(t,function(o){return s=Sd(n,e,o,i),isFinite(s)&&s>0}),s}function Ay(n,e,t,i,r,s,o,a,l,h,d,u,g,f){const m=xe(Math.round(t*n),Math.round(t*e),zn);if(u||(m.imageSmoothingEnabled=!1),l.length===0)return m.canvas;m.scale(t,t);function _(b){return Math.round(b*t)/t}m.globalCompositeOperation="lighter";const p=rt();l.forEach(function(b,k,R){Hl(p,b.extent)});let v;const w=t/i,x=(u?1:1+Math.pow(2,-24))/w;v=xe(Math.round(de(p)*w),Math.round(Be(p)*w),zn),u||(v.imageSmoothingEnabled=!1),l.forEach(function(b,k,R){if(b.image.width>0&&b.image.height>0){if(b.clipExtent){v.save();const I=(b.clipExtent[0]-p[0])*w,L=-(b.clipExtent[3]-p[3])*w,A=de(b.clipExtent)*w,D=Be(b.clipExtent)*w;v.rect(u?I:Math.round(I),u?L:Math.round(L),u?A:Math.round(I+A)-Math.round(I),u?D:Math.round(L+D)-Math.round(L)),v.clip()}const T=(b.extent[0]-p[0])*w,E=-(b.extent[3]-p[3])*w,C=de(b.extent)*w,M=Be(b.extent)*w;v.drawImage(b.image,h,h,b.image.width-2*h,b.image.height-2*h,u?T:Math.round(T),u?E:Math.round(E),u?C:Math.round(T+C)-Math.round(T),u?M:Math.round(E+M)-Math.round(E)),b.clipExtent&&v.restore()}});const y=un(o);
10return a.getTriangles().forEach(function(b,k,R){const T=b.source,E=b.target;let C=T[0][0],M=T[0][1],I=T[1][0],L=T[1][1],A=T[2][0],D=T[2][1];const z=_((E[0][0]-y[0])/s),O=_(-(E[0][1]-y[1])/s),N=_((E[1][0]-y[0])/s),G=_(-(E[1][1]-y[1])/s),te=_((E[2][0]-y[0])/s),Z=_(-(E[2][1]-y[1])/s),ce=C,$=M;C=0,M=0,I-=ce,L-=$,A-=ce,D-=$;const P=[[I,L,0,0,N-z],[A,D,0,0,te-z],[0,0,I,L,G-O],[0,0,A,D,Z-O]],_e=w_(P);if(!_e)return;if(m.save(),m.beginPath(),Py()||!u){m.moveTo(N,G);const Ee=4,Se=z-N,tt=O-G;for(let it=0;it<Ee;it++)m.lineTo(N+_((it+1)*Se/Ee),G+_(it*tt/(Ee-1))),it!=Ee-1&&m.lineTo(N+_((it+1)*Se/Ee),G+_((it+1)*tt/(Ee-1)));m.lineTo(te,Z)}else m.moveTo(N,G),m.lineTo(z,O),m.lineTo(te,Z);m.clip(),m.transform(_e[0],_e[2],_e[1],_e[3],z,O),m.translate(p[0]-ce,p[3]-$);let be;if(v)be=v.canvas,m.scale(x,-x);else{const Ee=l[0],Se=Ee.extent;be=Ee.image,m.scale(de(Se)/be.width,-Be(Se)/be.height)}m.drawImage(be,0,0),m.restore()}),v&&(ko(v),zn.push(v.canvas)),d&&(m.save(),m.globalCompositeOperation="source-over",m.strokeStyle="black",m.lineWidth=1,a.getTriangles().forEac
10h(function(b,k,R){const T=b.target,E=(T[0][0]-y[0])/s,C=-(T[0][1]-y[1])/s,M=(T[1][0]-y[0])/s,I=-(T[1][1]-y[1])/s,L=(T[2][0]-y[0])/s,A=-(T[2][1]-y[1])/s;m.beginPath(),m.moveTo(M,I),m.lineTo(E,C),m.lineTo(L,A),m.closePath(),m.stroke()}),m.restore()),m.canvas}const Dy=10,Td=.25;class Oy{constructor(e,t,i,r,s,o,a){this.sourceProj_=e,this.targetProj_=t;let l={};const h=a?sv(x=>Ie(a,cg(x,this.targetProj_,this.sourceProj_))):Js(this.targetProj_,this.sourceProj_);this.transformInv_=function(x){const y=x[0]+"/"+x[1];return l[y]||(l[y]=h(x)),l[y]},this.maxSourceExtent_=r,this.errorThresholdSquared_=s*s,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&de(r)>=de(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?de(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?de(this.targetProj_.getExtent()):null;const d=un(i),u=Eo(i),g=bo(i),f=xo(i),m=this.transformInv_(d),_=this.transformInv_(u),p=this.transformInv_(g),v=this.transformInv_(f),w=Dy+(o?Math.max(0,Math.ceil(Math.log2(il(i)/(o*o*256*256)))):0);if(this.addQuad_(d,u,g,f,m,_,p,v,w),this.wrapsXInSource_){let x=1/0;this.triangles_.forEach(function(y,b,k){x=Math.min(x,y.source[0][0],y.source[1][0],y.source[2][0])}),this.triangles_.forEach(y=>{if(Math.max(y.source[0][0],y.source[1][0],y.source[2][0])-x>this.sourceWorldWidth_/2){const b=[[y.source[0][0],y.source[0][1]],[y.source[1][0],y.source[1][1]],[y.source[2][0],y.source[2][1]]];b[0][0]-x>this.sourceWorldWidth_/2&&(b[0][0]-=this.sourceWorldWidth_),b[1][0]-x>this.sourceWorldWidth_/2&&(b[1][0]-=this.sourceWorldWidth_),b[2][0]-x>this.sourceWorldWidth_/2&&(b[2][0]-=this.sourceWorldWidth_);const k=Math.min(b[0][0],b[1][0],b[2][0]);Math.max(b[0][0],b[1][0],b[2][0])-k<this.sourceWorldWidth_/2&&(y.source=b)}})}l={}}addTriangle_(e,t,i,r,s,o){this.triangles_.push({source:[r,s,o],target:[e,t,i]})}addQuad_(e,t,i,r,s,o,a,l,h){const d=ke([s,o,a,l]),u=this.sourceWorldWidth_?de(d)/this.sourceWorldWidth_:null,g=this.sourceWorldWidth_,f=this.sourceProj_.canWrapX()&&u>.5&&u<1;let m=!1;if(h>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const p=ke([e,t,i,r]);m=de(p)/this.targetWorldWidth_>Td||m}!f&&this.sourceProj_.isGlobal()&&u&&(m=u>Td||m)}if(!m&&this.maxSourceExtent_&&isFinite(d[0])&&isFinite(d[1])&&isFinite(d[2])&&isFinite(d[3])&&!je(d,this.maxSourceExtent_))return;let _=0;if(!m&&(!isFinite(s[0])||!isFinite(s[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(l[0])||!isFinite(l[1]))){if(h>0)m=!0;else if(_=(!isFinite(s[0])||!isFinite(s[1])?8:0)+(!isFinite(o[0])||!isFinite(o[1])?4:0)+(!isFinite(a[0])||!isFinite(a[1])?2:0)+(!isFinite(l[0])||!isFinite(l[1])?1:0),_!=1&&_!=2&&_!=4&&_!=8)return}if(h>0){if(!m){const p=[(e[0]+i[0])/2,(e[1]+i[1])/2],v=this.transformInv_(p);let w;f?w=(Qi(s[0],g)+Qi(a[0],g))/2-Qi(v[0],g):w=(s[0]+a[0])/2-v[0];const x=(s[1]+a[1])/2-v[1];m=w*w+x*x>this.errorThresholdSquared_}if(m){if(Math.abs(e[0]-i[0])<=Math.abs(e[1]-i[1])){const p=[(t[0]+i[0])/2,(t[1]+i[1])/2],v=this.transformInv_(p),w=[(r[0]+e[0])/2,(r[1]+e[1])/2],x=this.transformInv_(w);this.addQuad_(e,t,p,w,s,o,v,x,h-1),this.addQuad_(w,p,i,r,x,v,a,l,h-1)}else{const p=[(e[0]+t[0])/2,(e[1]+t[1])/2],v=this.transformInv_(p),w=[(i[0]+r[0])/2,(i[1]+r[1])/2],x=this.transformInv_(w);this.addQuad_(e,p,w,r,s,v,x,l,h-1),this.addQuad_(p,t,i,w,v,o,a,x,h-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}(_&11)==0&&this.addTriangle_(e,i,r,s,a,l),(_&14)==0&&this.addTriangle_(e,i,t,s,a,o),_&&((_&13)==0&&this.addTriangle_(t,r,e,o,l,s),(_&7)==0&&this.addTriangle_(t,r,i,o,l,a))}calculateSourceExtent(){const e=rt();return this.triangles_.forEach(function(t,i,r){const s=t.source;Ir(e,s[0]),Ir(e,s[1]),Ir(e,s[2])}),e}getTriangles(){return this.triangles_}}const Fy=.5;class uf extends Ac{constructor(e,t,i,r,s,o,a,l,h,d,u,g){super(s,B.IDLE,g),this.renderEdges_=u!==void 0?u:!1,this.pixelRatio_=a,this.gutter_=l,this.canvas_=null,this.sourceTileGrid_=t,this.targetTileGrid_=r,this.wrappedTileCoord_=o||s,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0,this.clipExtent_=e.canWrapX()?e.getExtent():void 0;const f=r.getTileCoordExtent(this.wrappedTileCoord_),m=this.targetTileGrid_.getExtent();let _=this.sourceTileGrid_.getExtent();const p=m?Ji(f,m):f;if(il(p)===0){this.state=B.EMPTY;return}const v=e.getExtent();v&&(_?_=Ji(_,v):_=v);const w=r.getResolution(this.wrappedTileCoord_[0]),x=Ly(e,i,p,w);if(!isFinite(x)||x<=0){this.state=B.EMPTY;return}const y=d!==void 0?d:Fy;if(this.triangulation_=new Oy(e,i,p,_,x*y,w),this.triangulation_.getTr
10iangles().length===0){this.state=B.EMPTY;return}this.sourceZ_=t.getZForResolution(x);let b=this.triangulation_.calculateSourceExtent();if(_&&(e.canWrapX()?(b[1]=me(b[1],_[1],_[3]),b[3]=me(b[3],_[1],_[3])):b=Ji(b,_)),!il(b))this.state=B.EMPTY;else{let k=0,R=0;e.canWrapX()&&(k=de(v),R=Math.floor((b[0]-v[0])/k)),qu(b.slice(),e,!0).forEach(E=>{const C=t.getTileRangeForExtentAndZ(E,this.sourceZ_);for(let M=C.minX;M<=C.maxX;M++)for(let I=C.minY;I<=C.maxY;I++){const L=R*k;this.sourceTiles_.push({getTile:()=>h(this.sourceZ_,M,I,a),offset:L})}++R}),this.sourceTiles_.length===0&&(this.state=B.EMPTY)}}getImage(){return this.canvas_}reproject_(){const e=[];if(this.sourceTiles_.forEach(t=>{const i=t.tile;if(i&&i.getState()==B.LOADED){const r=this.sourceTileGrid_.getTileCoordExtent(i.tileCoord);r[0]+=t.offset,r[2]+=t.offset;const s=this.clipExtent_?.slice();s&&(s[0]+=t.offset,s[2]+=t.offset),e.push({extent:r,clipExtent:s,image:i.getImage()})}}),this.sourceTiles_.length=0,e.length===0)this.state=B.ERROR;else{const t=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(t),r=typeof i=="number"?i:i[0],s=typeof i=="number"?i:i[1],o=this.targetTileGrid_.getResolution(t),a=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Ay(r,s,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,l,this.triangulation_,e,this.gutter_,this.renderEdges_,this.interpolate),this.state=B.LOADED}this.changed()}load(){for(const e of this.sourceTiles_)e.tile=e.getTile();if(this.state==B.IDLE){this.state=B.LOADING,this.changed();let e=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(({tile:t})=>{const i=t.getState();if(i==B.IDLE||i==B.LOADING){e++;const r=ee(t,V.CHANGE,s=>{const o=t.getState();(o==B.LOADED||o==B.ERROR||o==B.EMPTY)&&(ae(r),e--,e===0&&(this.unlistenSources_(),this.reproject_()))});this.sourcesListenerKeys_.push(r)}}),e===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:t},i,r){t.getState()==B.IDLE&&t.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(ae),this.sourcesListenerKeys_=null}release(){this.canvas_&&(ko(this.canvas_.getContext("2d")),zn.push(this.canvas_),this.canvas_=null),this.sourceTiles_.length=0,super.release()}}class Rd{constructor(e){this.highWaterMark=e!==void 0?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}deleteOldest(){const e=this.pop();e instanceof Io&&e.dispose()}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(e){for(;this.canExpireCache();)this.deleteOldest()}clear(){for(;this.oldest_;)this.deleteOldest()}containsKey(e){return this.entries_.hasOwnProperty(e)}forEach(e){let t=this.oldest_;for(;t;)e(t.value_,t.key_,this),t=t.newer}get(e,t){const i=this.entries_[e];return oe(i!==void 0,"Tried to get a value for a key that does not exist in the cache"),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(e){const t=this.entries_[e];return oe(t!==void 0,"Tried to get a value for a key that does not exist in the cache"),t===this.newest_?(this.newest_=t.older,this.newest_&&(this.newest_.newer=null)):t===this.oldest_?(this.oldest_=t.newer,this.oldest_&&(this.oldest_.older=null)):(t.newer.older=t.older,t.older.newer=t.newer),delete this.entries_[e],--this.count_,t.value_}getCount(){return this.count_}getKeys(){const e=new Array(this.count_);let t=0,i;for(i=this.newest_;i;i=i.older)e[t++]=i.key_;return e}getValues(){const e=new Array(this.count_);let t=0,i;for(i=this.newest_;i;i=i.older)e[t++]=i.value_;return e}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(e){return this.entries_[e]?.value_}pop(){const e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_}replace(e,t){this.get(e),this.entries_[e].value_=t}set(e,t){oe(!(e in this.entries_),"Tried to set a value for a key that is used already");const i={key_:e,newer:null,older:this.newest_,value_:t};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[e]=i,++this.count_}setSize(e){this.highWaterMark=e}}function ao(n,e,t,i){return i!==void 0?(i[0]=n,i[1]=e,i[2]=t,i):[n,e,t]}function jy(n,e,t){return n+"/"+e+"/"+t}function Gs(n,e,t,i,r){return`${H(n)},${e},${jy(t,i,r)}`}function Ny(n){return zy(n[0],n[1],n[2])}function zy(n,e,t){return(e<<n)+t}function Wy(n,e){const t=n[0],i=n[1],r=n[2];
vendor: 5,312 bytes, line 10
10if(e.getMinZoom()>t||t>e.getMaxZoom())return!1;const s=e.getFullTileRange(t);return s?s.containsXY(i,r):!0}function Ra(n,e,t){if(!(t in n))return n[t]=new Set([e]),!0;const i=n[t],r=i.has(e);return r||i.add(e),!r}function Gy(n,e,t){const i=n[t];return i?i.delete(e):!1}function Id(n,e){const t=n.layerStatesArray[n.layerIndex];t.extent&&(e=Ji(e,Ti(t.extent,n.viewState.projection)));const i=t.layer.getRenderSource();if(!i.getWrapX()){const r=i.getTileGridForProjection(n.viewState.projection).getExtent();r&&(e=Ji(e,r))}return e}class By extends Mg{constructor(e,t){super(e),t=t||{},this.extentChanged=!0,this.renderComplete=!1,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedTiles=[],this.renderedSourceKey_,this.renderedSourceRevision_,this.tempExtent=rt(),this.tempTileRange_=new Dc(0,0,0,0),this.tempTileCoord_=ao(0,0,0);const i=t.cacheSize!==void 0?t.cacheSize:512;this.tileCache_=new Rd(i),this.sourceTileCache_=null,this.layerExtent=null,this.maxStaleKeys=i*.5}getTileCache(){return this.tileCache_}getSourceTileCache(){return this.sourceTileCache_||(this.sourceTileCache_=new Rd(512)),this.sourceTileCache_}getOrCreateTile(e,t,i,r){const s=this.tileCache_,a=this.getLayer().getSource(),l=Gs(a,a.getKey(),e,t,i);let h;if(s.containsKey(l))h=s.get(l);else{const d=r.viewState.projection,u=a.getProjection();if(h=a.getTile(e,t,i,r.pixelRatio,d,!u||Ws(u,d)?void 0:this.getSourceTileCache()),!h)return null;s.set(l,h)}return h}getTile(e,t,i,r){const s=this.getOrCreateTile(e,t,i,r);return s||null}getData(e){const t=this.frameState;if(!t)return null;const i=this.getLayer(),r=Ie(t.pixelToCoordinateTransform,e.slice()),s=i.getExtent();if(s&&!Vn(s,r))return null;const o=t.viewState,a=i.getRenderSource(),l=a.getTileGridForProjection(o.projection),h=a.getTilePixelRatio(t.pixelRatio);for(let d=l.getZForResolution(o.resolution);d>=l.getMinZoom();--d){const u=l.getTileCoordForCoordAndZ(r,d),g=this.getTile(d,u[1],u[2],t);if(!g||g.getState()!==B.LOADED)continue;const f=l.getOrigin(d),m=Ze(l.getTileSize(d)),_=l.getResolution(d);let p;if(g instanceof df||g instanceof uf)p=g.getImage();else if(g instanceof Cd){if(p=xl(g.getData()),!p)continue}else continue;const v=Math.floor(h*((r[0]-f[0])/_-u[1]*m[0])),w=Math.floor(h*((f[1]-r[1])/_-u[2]*m[1])),x=Math.round(h*a.getGutterForProjection(o.projection));return this.getImageData(p,v+x,w+x)}return null}prepareFrame(e){this.renderedProjection?e.viewState.projection!==this.renderedProjection&&(this.tileCache_.clear(),this.renderedProjection=e.viewState.projection):this.renderedProjection=e.viewState.projection;const t=this.getLayer().getSource();if(!t)return!1;const i=t.getRevision();return this.renderedSourceRevision_?this.renderedSourceRevision_!==i&&(this.renderedSourceRevision_=i,this.renderedSourceKey_===t.getKey()&&(this.tileCache_.clear(),this.sourceTileCache_?.clear())):this.renderedSourceRevision_=i,!0}enqueueTilesForNextExtent(){return!0}enqueueTiles(e,t,i,r,s){const o=e.viewState,a=this.getLayer(),l=a.getRenderSource(),h=l.getTileGridForProjection(o.projection),d=H(l);d in e.wantedTiles||(e.wantedTiles[d]={});const u=e.wantedTiles[d],g=a.getMapInternal(),f=Math.max(i-s,h.getMinZoom(),h.getZForResolution(Math.min(a.getMaxResolution(),g?g.getView().getResolutionForZoom(Math.max(a.getMinZoom(),0)):h.getResolution(0)),l.zDirection)),m=o.rotation,_=m?Zu(o.center,o.resolution,m,e.size):void 0;for(let p=i;p>=f;--p){const v=h.getTileRangeForExtentAndZ(t,p,this.tempTileRange_),w=h.getResolution(p);for(let x=v.minX;x<=v.maxX;++x)for(let y=v.minY;y<=v.maxY;++y){if(m&&!h.tileCoordIntersectsViewport([p,x,y],_))continue;const b=this.getTile(p,x,y,e);if(!b||!Ra(r,b,p))continue;const R=b.getKey();if(u[R]=!0,b.getState()===B.IDLE&&!e.tileQueue.isKeyQueued(R)){const T=ao(p,x,y,this.tempTileCoord_);e.tileQueue.enqueue([b,d,h.getTileCoordCenter(T),w])}}}}findStaleTile_(e,t){const i=this.tileCache_,r=e[0],s=e[1],o=e[2],a=this.getStaleKeys();for(let l=0;l<a.length;++l){const h=Gs(this.getLayer().getSource(),a[l],r,s,o);if(i.containsKey(h)){const d=i.peek(h);if(d.getState()===B.LOADED)return d.endTransition(H(this)),Ra(t,d,r),!0}}return!1}findAltTiles_(e,t,i,r){const s=e.getTileRangeForTileCoordAndZ(t,i,this.tempTileRange_);if(!s)return!1;let o=!0;const a=this.tileCache_,l=this.getLayer().getRenderSource(),h=l.getKey();for(let d=s.minX;d<=s.maxX;++d)for(let u=s.minY;u<=s.maxY;++u){const g=Gs(l,h,i,d,u);let f=!1;if(a.containsKey(g)){const m=a.peek(g);m.getState()===B.LOADED&&(Ra(r,m,i),f=!0)}f||(o=!1)}return o}renderFrame(e,t){this.renderComplete=!0;const i=e.layerStatesArray[e.layerIndex],r=e.viewState,s=r.projection,o=r.resolution,a=r.center,l=e.pixelRatio,h=this.getLayer(),d=h.getSource(),u=d.getTileGridForProjection(s),g=u.getZForResolution(o,d.zDirection),f=u.getResolution(g),m=d.getKey();this.renderedSourceKey_?this.renderedSourceKey_!==m&&(this.prependStaleKey(this.renderedSourceKey_),this.renderedSourceKey_=m):this.renderedSourceKey_=m;let _=e.extent;const p=d.getTilePixelRatio(l);this.prepareContainer(e,t);const v=this.context.canvas.width,w=this.context.canvas.height;this.layerExtent=i.extent?Ti(i.extent):null,this.layerExtent&&(_=Ji(_,this.layerExtent));const x=f*v/2/p,y=f*w/2/p,b=[a[0]-x,a[1]-y,a[0]+x,a[1]+y],k={};this.renderedTiles.length=0;const R=h.getPreload();
10if(e.nextExtent&&this.enqueueTilesForNextExtent()){const O=u.getZForResolution(r.nextResolution,d.zDirection),N=Id(e,e.nextExtent);this.enqueueTiles(e,N,O,k,R)}const T=Id(e,_);if(this.enqueueTiles(e,T,g,k,0),R>0&&setTimeout(()=>{this.enqueueTiles(e,T,g-1,k,R-1)},0),!(g in k))return this.container;const E=H(this),C=e.time;for(const O of k[g]){const N=O.getState();if(N===B.EMPTY)continue;const G=O.tileCoord;if(N===B.LOADED&&O.getAlpha(E,C)===1){O.endTransition(E);continue}if(N!==B.ERROR&&(this.renderComplete=!1),this.findStaleTile_(G,k)){Gy(k,O,g),e.animate=!0;continue}if(this.findAltTiles_(u,G,g+1,k))continue;const ce=u.getMinZoom();for(let $=g-1;$>=ce&&!this.findAltTiles_(u,G,$,k);--$);}const M=f/o*l/p,I=this.getRenderContext(e);ci(this.tempTransform,v/2,w/2,M,M,0,-v/2,-w/2),this.layerExtent&&this.clipUnrotated(I,e,this.layerExtent),d.getInterpolate()||(I.imageSmoothingEnabled=!1),this.preRender(I,e);const L=Object.keys(k).map(Number);L.sort(Jt);let A;const D=[],z=[];for(let O=L.length-1;O>=0;--O){const N=L[O],G=d.getTilePixelSize(N,l,s),Z=u.getResolution(N)/f,ce=G[0]*Z*M,$=G[1]*Z*M,P=u.getTileCoordForCoordAndZ(un(b),N),_e=u.getTileCoordExtent(P),be=Ie(this.tempTransform,[p*(_e[0]-b[0])/f,p*(b[3]-_e[3])/f]),Ee=p*d.getGutterForProjection(s);for(const Se of k[N]){if(Se.getState()!==B.LOADED)continue;const tt=Se.tileCoord,it=P[1]-tt[1],ls=Math.round(be[0]-(it-1)*ce),Qn=P[2]-tt[2],Vo=Math.round(be[1]-(Qn-1)*$),St=Math.round(be[0]-it*ce),pt=Math.round(be[1]-Qn*$),Tt=ls-St,gi=Vo-pt,cs=L.length===1;let er=!1;A=[St,pt,St+Tt,pt,St+Tt,pt+gi,St,pt+gi];for(let _n=0,hs=D.length;_n<hs;++_n)if(!cs&&N<z[_n]){const De=D[_n];je([St,pt,St+Tt,pt+gi],[De[0],De[3],De[4],De[7]])&&(er||(I.save(),er=!0),I.beginPath(),I.moveTo(A[0],A[1]),I.lineTo(A[2],A[3]),I.lineTo(A[4],A[5]),I.lineTo(A[6],A[7]),I.moveTo(De[6],De[7]),I.lineTo(De[4],De[5]),I.lineTo(De[2],De[3]),I.lineTo(De[0],De[1]),I.clip())}D.push(A),z.push(N),this.drawTile(Se,e,St,pt,Tt,gi,Ee,cs),er&&I.restore(),this.renderedTiles.unshift(Se),this.updateUsedTiles(e.usedTiles,d,Se)}}if(this.renderedResolution=f,this.extentChanged=!this.renderedExtent_||!Ar(this.renderedExtent_,b),this.renderedExtent_=b,this.renderedPixelRatio=l,this.postRender(this.context,e),this.layerExtent&&I.restore(),I.imageSmoothingEnabled=!0,this.renderComplete){const O=(N,G)=>{const te=H(d),Z=G.wantedTiles[te],ce=Z?Object.keys(Z).length:0;this.updateCacheSize(ce),this.tileCache_.expireCache(),this.sourceTileCache_?.expireCache()};e.postRenderFunctions.push(O)}return this.container}updateCacheSize(e){this.tileCache_.highWaterMark=Math.max(this.tileCache_.highWaterMark,e*2)}drawTile(e,t,i,r,s,o,a,l){let h;if(e instanceof Cd){if(h=xl(e.getData()),!h)throw new Error("Rendering array data is not yet supported")}else h=this.getTileImage(e);if(!h)return;const d=this.getRenderContext(t),u=H(this),g=t.layerStatesArray[t.layerIndex],f=g.opacity*(l?e.getAlpha(u,t.time):1),m=f!==d.globalAlpha;m&&(d.save(),d.globalAlpha=f),d.drawImage(h,a,a,h.width-2*a,h.height-2*a,i,r,s,o),m&&d.restore(),f!==g.opacity?t.animate=!0:l&&e.endTransition(u)}getImage(){const e=this.context;return e?e.canvas:null}getTileImage(e){return e.getImage()}updateUsedTiles(e,t,i){const r=H(t);r in e||(e[r]={}),e[r][i.getKey()]=!0}}const Ps={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class $y extends Go{constructor(e){e=e||{};const t=Object.assign({},e),i=e.cacheSize;delete e.cacheSize,delete t.preload,delete t.useInterimTilesOnError,super(t),this.on,this.once,this.un,this.cacheSize_=i,this.setPreload(e.preload!==void 0?e.preload:0),this.setUseInterimTilesOnError(e.useInterimTilesOnError!==void 0?e.useInterimTilesOnError:!0)}getCacheSize(){return this.cacheSize_}getPreload(){return this.get(Ps.PRELOAD)}setPreload(e){this.set(Ps.PRELOAD,e)}getUseInterimTilesOnError(){return this.get(Ps.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(e){this.set(Ps.USE_INTERIM_TILES_ON_ERROR,e)}getData(e){return super.getData(e)}}class Vy extends $y{constructor(e){super(e)}createRenderer(){return new By(this,{cacheSize:this.getCacheSize()})}}const Cn=[0,0,0],wi=5;class gf{constructor(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,oe(g_(this.resolutions_,(r,s)=>s-r),"`resolutions` must be sorted in descending order");let t;if(!e.origins){for(let r=0,s=this.resolutions_.length-1;r<s;++r)if(!t)t=this.resolutions_[r]/this.resolutions_[r+1];else if(this.resolutions_[r]/this.resolutions_[r+1]!==t){t=void 0;break}}this.zoomFactor_=t,this.maxZoom=this.resolutions_.length-1,this.origin_=e.origin!==void 0?e.origin:null,this.origins_=null,e.origins!==void 0&&(this.origins_=e.origins,oe(this.origins_.length==this.resolutions_.length,"Number of `origins` and `resolutions` must be equal"));const i=e.extent;i!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=un(i)),oe(!this.origin_&&this.origins_||this.origin_&&!this.origins_,"Either `origin` or `origins` must be configured, never both"),this.tileSizes_=null,e.tileSizes!==void 0&&(this.tileSizes_=e.tileSizes,oe(this.tileSizes_.length==this.resolutions_.length,"Number of `tileSizes` and `resolutions` must be equal")),this.tileSize_=e.tileSize!==void 0?e.tileSize:this.tileSizes_?null:Tc,oe(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,"Either `tileSize` or `tileSizes` must be configured, never both"),this.extent_=i!==void 0?i:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],e.sizes!==void 0?this.fullTileRanges_=e.sizes.map((r,s)=>{const o=new Dc(Math.min(0,r[0]),Math.max(r[0]-1,-1),Math.min(0,r[1]),Math.max(r[1]-1,-1));if(i){const a=this.getTileRangeForExtentAndZ(i,s);o.minX=Math.max(a.minX,o.minX),o.maxX=Math.min(a.maxX,o.maxX),o.minY=Math.max(a.minY,o.minY),o.maxY=Math.min(a.maxY,o.maxY)}return o}
10):i&&this.calculateTileRanges_(i)}forEachTileCoord(e,t,i){const r=this.getTileRangeForExtentAndZ(e,t);for(let s=r.minX,o=r.maxX;s<=o;++s)for(let a=r.minY,l=r.maxY;a<=l;++a)i([t,s,a])}forEachTileCoordParentTileRange(e,t,i,r){let s,o,a,l=null,h=e[0]-1;for(this.zoomFactor_===2?(o=e[1],a=e[2]):l=this.getTileCoordExtent(e,r);h>=this.minZoom;){if(o!==void 0&&a!==void 0?(o=Math.floor(o/2),a=Math.floor(a/2),s=En(o,o,a,a,i)):s=this.getTileRangeForExtentAndZ(l,h,i),t(h,s))return!0;--h}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(e){return this.origin_?this.origin_:this.origins_[e]}getOrigins(){return this.origins_}getResolution(e){return this.resolutions_[e]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(e,t,i){if(e[0]<this.maxZoom){if(this.zoomFactor_===2){const s=e[1]*2,o=e[2]*2;return En(s,s+1,o,o+1,t)}const r=this.getTileCoordExtent(e,i||this.tmpExtent_);return this.getTileRangeForExtentAndZ(r,e[0]+1,t)}return null}getTileRangeForTileCoordAndZ(e,t,i){if(t>this.maxZoom||t<this.minZoom)return null;const r=e[0],s=e[1],o=e[2];if(t===r)return En(s,o,s,o,i);if(this.zoomFactor_){const l=Math.pow(this.zoomFactor_,t-r),h=Math.floor(s*l),d=Math.floor(o*l);if(t<r)return En(h,h,d,d,i);const u=Math.floor(l*(s+1))-1,g=Math.floor(l*(o+1))-1;return En(h,u,d,g,i)}const a=this.getTileCoordExtent(e,this.tmpExtent_);return this.getTileRangeForExtentAndZ(a,t,i)}getTileRangeForExtentAndZ(e,t,i){this.getTileCoordForXYAndZ_(e[0],e[3],t,!1,Cn);const r=Cn[1],s=Cn[2];this.getTileCoordForXYAndZ_(e[2],e[1],t,!0,Cn);const o=Cn[1],a=Cn[2];return En(r,o,s,a,i)}getTileCoordCenter(e){const t=this.getOrigin(e[0]),i=this.getResolution(e[0]),r=Ze(this.getTileSize(e[0]),this.tmpSize_);return[t[0]+(e[1]+.5)*r[0]*i,t[1]-(e[2]+.5)*r[1]*i]}getTileCoordExtent(e,t){const i=this.getOrigin(e[0]),r=this.getResolution(e[0]),s=Ze(this.getTileSize(e[0]),this.tmpSize_),o=i[0]+e[1]*s[0]*r,a=i[1]-(e[2]+1)*s[1]*r,l=o+s[0]*r,h=a+s[1]*r;return ai(o,a,l,h,t)}getTileCoordForCoordAndResolution(e,t,i){return this.getTileCoordForXYAndResolution_(e[0],e[1],t,!1,i)}getTileCoordForXYAndResolution_(e,t,i,r,s){const o=this.getZForResolution(i),a=i/this.getResolution(o),l=this.getOrigin(o),h=Ze(this.getTileSize(o),this.tmpSize_);let d=a*(e-l[0])/i/h[0],u=a*(l[1]-t)/i/h[1];return r?(d=xs(d,wi)-1,u=xs(u,wi)-1):(d=ys(d,wi),u=ys(u,wi)),ao(o,d,u,s)}getTileCoordForXYAndZ_(e,t,i,r,s){const o=this.getOrigin(i),a=this.getResolution(i),l=Ze(this.getTileSize(i),this.tmpSize_);let h=(e-o[0])/a/l[0],d=(o[1]-t)/a/l[1];return r?(h=xs(h,wi)-1,d=xs(d,wi)-1):(h=ys(h,wi),d=ys(d,wi)),ao(i,h,d,s)}getTileCoordForCoordAndZ(e,t,i){return this.getTileCoordForXYAndZ_(e[0],e[1],t,!1,i)}getTileCoordResolution(e){return this.resolutions_[e[0]]}getTileSize(e){return this.tileSize_?this.tileSize_:this.tileSizes_[e]}getFullTileRange(e){return this.fullTileRanges_?this.fullTileRanges_[e]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,e):null}getZForResolution(e,t){const i=Yl(this.resolutions_,e,t||0);return me(i,this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(e,t){return Kg(t,0,t.length,2,this.getTileCoordExtent(e))}calculateTileRanges_(e){const t=this.resolutions_.length,i=new Array(t);for(let r=this.minZoom;r<t;++r)i[r]=this.getTileRangeForExtentAndZ(e,r);this.fullTileRanges_=i}}function ff(n){let e=n.getDefaultTileGrid();return e||(e=Ky(n),n.setDefaultTileGrid(e)),e}function Xy(n,e,t){const i=e[0],r=n.getTileCoordCenter(e),s=Oc(t);if(!Vn(s,r)){const o=de(s),a=Math.ceil((s[0]-r[0])/o);return r[0]+=o*a,n.getTileCoordForCoordAndZ(r,i)}return e}function Uy(n,e,t,i){i=i!==void 0?i:"top-left";const r=mf(n,e,t);return new gf({extent:n,origin:m_(n,i),resolutions:r,tileSize:t})}function Yy(n){const e=n||{},t=e.extent||Je("EPSG:3857").getExtent(),i={extent:t,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:mf(t,e.maxZoom,e.tileSize,e.maxResolution)};return new gf(i)}function mf(n,e,t,i){e=e!==void 0?e:Nw,t=Ze(t!==void 0?t:Tc);const r=Be(n),s=de(n);i=i>0?i:Math.max(s/t[0],r/t[1]);const o=e+1,a=new Array(o);for(let l=0;l<o;++l)a[l]=i/Math.pow(2,l);return a}function Ky(n,e,t,i){const r=Oc(n);return Uy(r,e,t,i)}function Oc(n){n=Je(n);let e=n.getExtent();if(!e){const t=180*Ql.degrees/n.getMetersPerUnit();e=ai(-t,-t,t,t)}return e}const Zy=/\{z\}/g,Hy=/\{x\}/g,qy=/\{y\}/g,Jy=/\{-y\}/g;function Qy(n,e,t,i,r){return n.replace(Zy,e.toString()).replace(Hy,t.toString()).replace(qy,i.toString()).replace(Jy,function(){if(r===void 0)throw new Error("If the URL template has a {-y} placeholder, the grid extent must be known");return(r-i).toString()})}function ex(n){const e=[];let t=/\{([a-z])-([a-z])\}/.exec(n);
10if(t){const i=t[1].charCodeAt(0),r=t[2].charCodeAt(0);let s;for(s=i;s<=r;++s)e.push(n.replace(t[0],String.fromCharCode(s)));return e}if(t=/\{(\d+)-(\d+)\}/.exec(n),t){const i=parseInt(t[2],10);for(let r=parseInt(t[1],10);r<=i;r++)e.push(n.replace(t[0],r.toString()));return e}return e.push(n),e}function tx(n,e){return(function(t,i,r){if(!t)return;let s;const o=t[0];if(e){const a=e.getFullTileRange(o);a&&(s=a.getHeight()-1)}return Qy(n,o,t[1],t[2],s)})}function ix(n,e){const t=n.length,i=new Array(t);for(let r=0;r<t;++r)i[r]=tx(n[r],e);return nx(i)}function nx(n){return n.length===1?n[0]:(function(e,t,i){if(!e)return;const r=Ny(e),s=Qi(r,n.length);return n[s](e,t,i)})}class rx extends ef{constructor(e){super({attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX,interpolate:e.interpolate}),this.on,this.once,this.un,this.tilePixelRatio_=e.tilePixelRatio!==void 0?e.tilePixelRatio:1,this.tileGrid=e.tileGrid!==void 0?e.tileGrid:null;const t=[256,256];this.tileGrid&&Ze(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),t),this.tmpSize=[0,0],this.key_=e.key||H(this),this.tileOptions={transition:e.transition,interpolate:e.interpolate},this.zDirection=e.zDirection?e.zDirection:0}getGutterForProjection(e){return 0}getKey(){return this.key_}setKey(e){this.key_!==e&&(this.key_=e,this.changed())}getResolutions(e){const t=e?this.getTileGridForProjection(e):this.tileGrid;return t?t.getResolutions():null}getTile(e,t,i,r,s,o){return re()}getTileGrid(){return this.tileGrid}getTileGridForProjection(e){return this.tileGrid?this.tileGrid:ff(e)}getTilePixelRatio(e){return this.tilePixelRatio_}getTilePixelSize(e,t,i){const r=this.getTileGridForProjection(i),s=this.getTilePixelRatio(t),o=Ze(r.getTileSize(e),this.tmpSize);return s==1?o:r1(o,s,this.tmpSize)}getTileCoordForTileUrlFunction(e,t){const i=t!==void 0?t:this.getProjection(),r=t!==void 0?this.getTileGridForProjection(i):this.tileGrid||this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(e=Xy(r,e,i)),Wy(e,r)?e:null}clear(){}refresh(){this.clear(),super.refresh()}}class sx extends mt{constructor(e,t){super(e),this.tile=t}}const Ia={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};class Fc extends rx{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===Fc.prototype.tileUrlFunction,this.tileLoadFunction=e.tileLoadFunction,e.tileUrlFunction&&(this.tileUrlFunction=e.tileUrlFunction),this.urls=null,e.urls?this.setUrls(e.urls):e.url&&this.setUrl(e.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(e){const t=e.target,i=H(t),r=t.getState();let s;r==B.LOADING?(this.tileLoadingKeys_[i]=!0,s=Ia.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],s=r==B.ERROR?Ia.TILELOADERROR:r==B.LOADED?Ia.TILELOADEND:void 0),s!=null&&this.dispatchEvent(new sx(s,t))}setTileLoadFunction(e){this.tileLoadFunction=e,this.changed()}setTileUrlFunction(e,t){this.tileUrlFunction=e,typeof t<"u"?this.setKey(t):this.changed()}setUrl(e){const t=ex(e);this.urls=t,this.setUrls(t)}setUrls(e){this.urls=e;const t=e.join(` 11`);this.generateTileUrlFunction_?this.setTileUrlFunction(ix(e,this.tileGrid),t):this.setKey(t)}tileUrlFunction(e,t,i){}}class ox extends Fc{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:ax,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate!==void 0?e.interpolate:!0,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.crossOrigin=e.crossOrigin!==void 0?e.crossOrigin:null,this.referrerPolicy=e.referrerPolicy,this.tileClass=e.tileClass!==void 0?e.tileClass:df,this.tileGridForProjection={},this.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}getGutterForProjection(e){return this.getProjection()&&e&&!Ws(this.getProjection(),e)?0:this.getGutter()}getGutter(){return 0}getKey(){let e=super.getKey();return this.getInterpolate()||(e+=":disable-interpolation"),e}getTileGridForProjection(e){const t=this.getProjection();
11if(this.tileGrid&&(!t||Ws(t,e)))return this.tileGrid;const i=H(e);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=ff(e)),this.tileGridForProjection[i]}createTile_(e,t,i,r,s,o){const a=[e,t,i],l=this.getTileCoordForTileUrlFunction(a,s),h=l?this.tileUrlFunction(l,r,s):void 0,d=new this.tileClass(a,h!==void 0?B.IDLE:B.EMPTY,h!==void 0?h:"",{crossOrigin:this.crossOrigin,referrerPolicy:this.referrerPolicy},this.tileLoadFunction,this.tileOptions);return d.key=o,d.addEventListener(V.CHANGE,this.handleTileChange.bind(this)),d}getTile(e,t,i,r,s,o){const a=this.getProjection();if(!a||!s||Ws(a,s))return this.getTileInternal(e,t,i,r,a||s);const l=[e,t,i],h=this.getKey(),d=this.getTileGridForProjection(a),u=this.getTileGridForProjection(s),g=this.getTileCoordForTileUrlFunction(l,s),f=new uf(a,d,s,u,l,g,this.getTilePixelRatio(r),this.getGutter(),(m,_,p,v)=>this.getTileInternal(m,_,p,v,a,o),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return f.key=h,f}getTileInternal(e,t,i,r,s,o){const a=this.getKey(),l=Gs(this,a,e,t,i);if(o&&o.containsKey(l))return o.get(l);const h=this.createTile_(e,t,i,r,s,a);return o?.set(l,h),h}setRenderReprojectionEdges(e){this.renderReprojectionEdges_!=e&&(this.renderReprojectionEdges_=e,this.changed())}setTileGridForProjection(e,t){const i=Je(e);if(i){const r=H(i);r in this.tileGridForProjection||(this.tileGridForProjection[r]=t)}}}function ax(n,e){if(lt){const t=n.getCrossOrigin();let i="same-origin",r="same-origin";t==="anonymous"||t===""?(i="cors",r="omit"):t==="use-credentials"&&(i="cors",r="include");const s={mode:i,credentials:r,referrerPolicy:n.getReferrerPolicy()};fetch(e,s).then(o=>{if(!o.ok)throw new Error(`HTTP ${o.status}`);return o.blob()}).then(o=>createImageBitmap(o)).then(o=>{const a=n.getImage();a.width=o.width,a.height=o.height,a.getContext("2d").drawImage(o,0,0),o.close?.(),a.dispatchEvent(new Event("load"))}).catch(()=>{n.getImage().dispatchEvent(new Event("error"))});return}n.getImage().src=e}class lx extends ox{constructor(e){e=e||{};const t=e.projection!==void 0?e.projection:"EPSG:3857",i=e.tileGrid!==void 0?e.tileGrid:Yy({extent:Oc(t),maxResolution:e.maxResolution,maxZoom:e.maxZoom,minZoom:e.minZoom,tileSize:e.tileSize});super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,referrerPolicy:e.referrerPolicy,interpolate:e.interpolate,projection:t,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX!==void 0?e.wrapX:!0,transition:e.transition,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.gutter_=e.gutter!==void 0?e.gutter:0}getGutter(){return this.gutter_}}const cx='© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class hx extends lx{constructor(e){e=e||{};let t;e.attributions!==void 0?t=e.attributions:t=[cx];const i=e.url!==void 0?e.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:t,attributionsCollapsible:!1,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin!==void 0?e.crossOrigin:"anonymous",referrerPolicy:e.referrerPolicy||"origin-when-cross-origin",interpolate:e.interpolate,maxZoom:e.maxZoom!==void 0?e.maxZoom:19,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:i,wrapX:e.wrapX,zDirection:e.zDirection})}}const pf=ze({instance:null,zoomLevel:null,do:null}),Bo=()=>Me(pf);class $o extends Fi{constructor(e,t,i){super(),i!==void 0&&t===void 0?this.setFlatCoordinates(i,e):(t=t||0,this.setCenterAndRadius(e,t,i))}clone(){const e=new $o(this.flatCoordinates.slice(),void 0,this.layout);return e.applyProperties(this),e}closestPointXY(e,t,i,r){const s=this.flatCoordinates,o=e-s[0],a=t-s[1],l=o*o+a*a;if(l<r){if(l===0)for(let h=0;h<this.stride;++h)i[h]=s[h];else{const h=this.getRadius()/Math.sqrt(l);i[0]=s[0]+h*o,i[1]=s[1]+h*a;for(let d=2;d<this.stride;++d)i[d]=s[d]}return i.length=this.stride,l}return r}containsXY(e,t){const i=this.flatCoordinates,r=e-i[0],s=t-i[1];return r*r+s*s<=this.getRadiusSquared_()}getCenter(){return this.flatCoordinates.slice(0,this.stride)}computeExtent(e){const t=this.flatCoordinates,i=t[this.stride]-t[0];return ai(t[0]-i,t[1]-i,t[0]+i,t[1]+i,e)}getRadius(){return Math.sqrt(this.getRadiusSquared_())}getRadiusSquared_(){const e=this.flatCoordinates[this.stride]-this.flatCoordinates[0],t=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return e*e+t*t}getType(){return"Circle"}intersectsExtent(e){const t=this.getExtent();if(je(e,t)){const i=this.getCenter();return e[0]<=i[0]&&e[2]>=i[0]||e[1]<=i[1]&&e[3]>=i[1]?!0:ql(e,this.intersectsCoordinate.bind(this))}return!1}setCenter(e){const t=this.stride,i=this.flatCoordinates[t]-this.flatCoordinates[0],r=e.slice();r[t]=r[0]+i;for(let s=1;s<t;++s)r[t+s]=e[s];this.setFlatCoordinates(this.layout,r),this.changed()}setCenterAndRadius(e,t,i){this.setLayout(i,e,0),this.flatCoordinates||(this.flatCoordinates=[]);const r=this.flatCoordinates;let s=Xg(r,0,e,this.stride);r[s++]=r[0]+t;for(let o=1,a=this.stride;o<a;++o)r[s++]=r[o];r.length=s,this.changed()}getCoordinates(){return null}setCoordinates(e,t){}setRadius(e){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+e,this.changed()}rotate(e,t){const i=this.getCenter(),r=this.getStride();this.setCenter(dc(i,0,i.length,r,e,t,i)),this.changed()}}$o.prototype.transform;class lo extends kg{constructor(e){super(),this.geometries_=e,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(ae),this.changeEventsKeys_.length=0}listenGeometriesChange_(){const e=this.geometries_;for(let t=0,i=e.length;t<i;++t)this.changeEventsKeys_.push(ee(e[t],V.CHANGE,this.changed,this))}clone(){const e=new lo(Ma(this.geometries_));return e.applyProperties(this),e}closestPointXY(e,t,i,r){if(r<dn(this.getExtent(),e,t))return r;const s=this.geometries_;for(let o=0,a=s.length;o<a;++o)r=s[o].closestPointXY(e,t,i,r);return r}containsXY(e,t){const i=this.geometries_;for(let r=0,s=i.length;r<s;++r)if(i[r].containsXY(e,t))return!0;return!1}computeExtent(e){es(e);const t=this.geometries_;for(let i=0,r=t.length;i<r;++i)Hl(e,t[i].getExtent());return e}getGeometries(){return Ma(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let e=[];const t=this.geometries_;for(let i=0,r=t.length;i<r;++i)t[i].getType()===this.getType()?e=e.concat(t[i].getGeometriesArrayRecursive()):e.push(t[i]);return e}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const t=[],i=this.geometries_;let r=!1;for(let s=0,o=i.length;s<o;++s){const a=i[s],l=a.getSimplifiedGeometry(e);t.push(l),l!==a&&(r=!0)}return r?new lo(t):(this.simplifiedGeometryMaxMinSquaredTolerance=e,this)}getType(){return"GeometryCollection"}intersectsExtent(e){const t=this.geometries_;for(let i=0,r=t.length;i<r;++i)if(t[i].intersectsExtent(e))return!0;return!1}isEmpty(){return this.geometries_.length===0}rotate(e,t){const i=this.geometries_;for(let r=0,s=i.length;r<s;++r)i[r].rotate(e,t);this.changed()}scale(e,t,i){i||(i=li(this.getExtent()));const r=this.geometries_;for(let s=0,o=r.length;s<o;++s)r[s].scale(e,t,i);this.changed()}setGeometries(e){this.setGeometriesArray(Ma(e))}setGeometriesArray(e){this.unlistenGeometriesChange_(),this.geometries_=e,this.listenGeometriesChange_(),this.changed()}applyTransform(e){const t=this.geometries_;for(let i=0,r=t.length;i<r;++i)t[i].applyTransform(e);this.changed()}translate(e,t){const i=this.geometries_;for(let r=0,s=i.length;r<s;++r)i[r].translate(e,t);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function Ma(n){return n.map(e=>e.clone())}const Pa={SNAP:"snap",UNSNAP:"unsnap"};class La extends mt{constructor(e,t){super(e),this.vertex=t.vertex,this.vertexPixel=t.vertexPixel,this.feature=t.feature,this.segment=t.segment}}const _f={Circle(n,e){const i=Lw(n);return _f.Polygon(i)},GeometryCollection(n,e){const t=[],i=n.getGeometriesArray();for(let r=0;r<i.length;++r){const s=this[i[r].getType()];
11s&&t.push(s(i[r],e))}return t.flat()},LineString(n){const e=[],t=n.getFlatCoordinates(),i=n.getStride();for(let r=0,s=t.length-i;r<s;r+=i)e.push([t.slice(r,r+2),t.slice(r+i,r+i+2)]);return e},MultiLineString(n){const e=[],t=n.getFlatCoordinates(),i=n.getStride(),r=n.getEnds();let s=0;for(let o=0,a=r.length;o<a;++o){const l=r[o];for(let h=s,d=l-i;h<d;h+=i)e.push([t.slice(h,h+2),t.slice(h+i,h+i+2)]);s=l}return e},MultiPoint(n){const e=[],t=n.getFlatCoordinates(),i=n.getStride();for(let r=0,s=t.length;r<s;r+=i)e.push([t.slice(r,r+2)]);return e},MultiPolygon(n){const e=[],t=n.getFlatCoordinates(),i=n.getStride(),r=n.getEndss();let s=0;for(let o=0,a=r.length;o<a;++o){const l=r[o];for(let h=0,d=l.length;h<d;++h){const u=l[h];for(let g=s,f=u-i;g<f;g+=i)e.push([t.slice(g,g+2),t.slice(g+i,g+i+2)]);s=u}}return e},Point(n){return[[n.getFlatCoordinates().slice(0,2)]]},Polygon(n){const e=[],t=n.getFlatCoordinates(),i=n.getStride(),r=n.getEnds();let s=0;for(let o=0,a=r.length;o<a;++o){const l=r[o];for(let h=s,d=l-i;h<d;h+=i)e.push([t.slice(h,h+2),t.slice(h+i,h+i+2)]);s=l}return e}};function Md(n){return n.feature?n.feature:n.element?n.element:null}const Aa=[],Yt=[],kn=[];class dx extends ji{constructor(e){e=e||{},super({handleDownEvent:sn,stopDown:gn}),this.on,this.once,this.un,this.source_=e.source?e.source:null,this.vertex_=e.vertex!==void 0?e.vertex:!0,this.edge_=e.edge!==void 0?e.edge:!0,this.intersection_=e.intersection!==void 0?e.intersection:!1,this.features_=e.features?e.features:null,this.featuresListenerKeys_=[],this.featureChangeListenerKeys_={},this.indexedFeaturesExtents_={},this.pendingFeatures_={},this.pixelTolerance_=e.pixelTolerance!==void 0?e.pixelTolerance:10,this.rBush_=new so,this.snapped_=null,this.segmenters_=Object.assign({},_f,e.segmenters)}addFeature(e,t){t=t!==void 0?t:!0;const i=H(e),r=e.getGeometry();if(r){const s=this.segmenters_[r.getType()];if(s){this.indexedFeaturesExtents_[i]=r.getExtent(rt());const o=s.call(this.segmenters_,r,this.getMap().getView().getProjection());let a=o.length;for(let l=0;l<a;++l){const h=o[l];Yt[l]=ke(h),kn[l]={feature:e,segment:h}}if(this.intersection_)for(let l=0,h=o.length;l<h;++l){const d=o[l];if(d.length===1)continue;const u=Yt[l];for(let f=0,m=l-1;f<m;++f){const _=o[f];if(_.length===1||!je(u,Yt[f]))continue;const p=fd(d,_);if(!p)continue;const v=[p];Yt[a]=ke(v),kn[a++]={feature:e,intersectionFeature:e,segment:v}}const g=this.rBush_.getInExtent(Yt[l]);for(let f=0,m=g.length;f<m;++f){const _=g[f].segment;if(_.length===1)continue;const p=fd(d,_);if(!p)continue;const v=[p];Yt[a]=ke(v),kn[a++]={feature:e,intersectionFeature:g[f].feature,segment:v}}}a===1?this.rBush_.insert(Yt[0],kn[0]):(Yt.length=a,kn.length=a,this.rBush_.load(Yt,kn))}}t&&(this.featureChangeListenerKeys_[i]&&ae(this.featureChangeListenerKeys_[i]),this.featureChangeListenerKeys_[i]=ee(e,V.CHANGE,this.handleFeatureChange_,this))}getFeatures_(){let e;return this.features_?e=this.features_:this.source_&&(e=this.source_.getFeatures()),e}areSnapDataEqual_(e,t){return e.segment===t.segment&&e.feature===t.feature}handleEvent(e){const t=this.snapTo(e.pixel,e.coordinate,e.map);return t?(e.coordinate=t.vertex.slice(0,2),e.pixel=t.vertexPixel,this.snapped_&&!this.areSnapDataEqual_(this.snapped_,t)&&this.dispatchEvent(new La(Pa.UNSNAP,this.snapped_)),this.snapped_={vertex:e.coordinate,vertexPixel:e.pixel,feature:t.feature,segment:t.segment},this.dispatchEvent(new La(Pa.SNAP,this.snapped_))):this.snapped_&&(this.dispatchEvent(new La(Pa.UNSNAP,this.snapped_)),this.snapped_=null),super.handleEvent(e)}handleFeatureAdd_(e){const t=Md(e);t&&this.addFeature(t)}handleFeatureRemove_(e){const t=Md(e);t&&(this.removeFeature(t),delete this.pendingFeatures_[H(t)])}handleFeatureChange_(e){const t=e.target;this.handlingDownUpSequence?this.pendingFeatures_[H(t)]=t:this.updateFeature_(t)}handleUpEvent(e){const t=Object.values(this.pendingFeatures_);if(t.length){for(const i of t)this.updateFeature_(i);Hn(this.pendingFeatures_)}return!1}removeFeature(e,t){const i=t!==void 0?t:!0,r=H(e),s=this.indexedFeaturesExtents_[r];if(s){const o=this.rBush_;
11o.getInExtent(s).forEach(a=>{(e===a.feature||e===a.intersectionFeature)&&o.remove(a)})}i&&(ae(this.featureChangeListenerKeys_[r]),delete this.featureChangeListenerKeys_[r])}setMap(e){const t=this.getMap(),i=this.featuresListenerKeys_;let r=this.getFeatures_();if(Array.isArray(r)||(r=r.getArray()),t&&(i.forEach(ae),i.length=0,this.rBush_.clear(),Object.values(this.featureChangeListenerKeys_).forEach(ae),this.featureChangeListenerKeys_={}),super.setMap(e),e){this.features_?i.push(ee(this.features_,ye.ADD,this.handleFeatureAdd_,this),ee(this.features_,ye.REMOVE,this.handleFeatureRemove_,this)):this.source_&&i.push(ee(this.source_,Te.ADDFEATURE,this.handleFeatureAdd_,this),ee(this.source_,Te.REMOVEFEATURE,this.handleFeatureRemove_,this));for(const s of r)this.addFeature(s)}}snapTo(e,t,i){i.getView().getProjection();const r=ue(t),s=Ro(Qr(ke([r]),i.getView().getResolution()*this.pixelTolerance_)),o=this.rBush_.getInExtent(s),a=o.length;if(a===0)return null;let l,h=1/0,d,u=null;const g=this.pixelTolerance_*this.pixelTolerance_,f=()=>{if(!l)return null;const m=i.getPixelFromCoordinate(l);return ei(e,m)>g?null:{vertex:l,vertexPixel:[Math.round(m[0]),Math.round(m[1])],feature:d,segment:u}};if(this.vertex_||this.intersection_){for(let _=0;_<a;++_){const p=o[_];if(p.feature.getGeometry().getType()!=="Circle")for(const v of p.segment){const w=ue(v),x=ei(r,w);x<h&&(this.intersection_&&p.intersectionFeature||this.vertex_&&!p.intersectionFeature)&&(l=v,h=x,d=p.feature)}}const m=f();if(m)return m}if(this.edge_){for(let _=0;_<a;++_){let p=null;const v=o[_];if(v.feature.getGeometry().getType()==="Circle"){let w=v.feature.getGeometry();p=x_(r,w)}else{const[w,x]=v.segment;x&&(Aa[0]=ue(w),Aa[1]=ue(x),p=Co(r,Aa))}if(p){const w=ei(r,p);w<h&&(l=Di(p),u=v.feature.getGeometry().getType()==="Circle"?null:v.segment,h=w,d=v.feature)}}const m=f();if(m)return m}return null}updateFeature_(e){this.removeFeature(e,!1),this.addFeature(e,!1)}}function Mi(n,e){const t=n.length;return e<0?n[e+t]:e>=t?n[e-t]:n[e]}function Dn(n,e){const t=n.length;let i=Math.floor(e);const r=e-i;i>=t?i-=t:i<0&&(i+=t);let s=i+1;s>=t&&(s-=t);const o=n[i],a=o[0],l=o[1],h=n[s],d=h[0]-a,u=h[1]-l;return[a+d*r,l+u*r]}const Ls={index:-1,endIndex:NaN,closestTargetDistance:1/0};function vf(n,e,t,i){const r=n[0],s=n[1];let o=1/0,a=-1,l=NaN;for(let u=0;u<e.targets.length;++u){const g=e.targets[u],f=g.coordinates;let m=1/0,_;for(let p=0;p<f.length-1;++p){const v=f[p],w=f[p+1],x=xf(r,s,v,w);x.squaredDistance<m&&(m=x.squaredDistance,_=p+x.along)}m<o&&(o=m,g.ring&&e.targetIndex===u&&(g.endIndex>g.startIndex?_<g.startIndex&&(_+=f.length):g.endIndex<g.startIndex&&_>g.startIndex&&(_-=f.length)),l=_,a=u)}const h=e.targets[a];let d=h.ring;if(e.targetIndex===a&&d){const u=Dn(h.coordinates,l),g=t.getPixelFromCoordinate(u),f=t.getPixelFromCoordinate(e.startCoord);Ln(g,f)>i&&(d=!1)}if(d){const u=h.coordinates,g=u.length,f=h.startIndex,m=l;if(f<m){const _=Os(u,f,m);Os(u,f,m-g)<_&&(l-=g)}else{const _=Os(u,f,m);Os(u,f,m+g)<_&&(l+=g)}}return Ls.index=a,Ls.endIndex=l,Ls.closestTargetDistance=o,Ls}function wf(n,e){const t=[];for(let i=0;i<e.length;++i){const s=e[i].getGeometry();yf(n,s,t)}return t}function yf(n,e,t){if(e instanceof ri){As(n,e.getCoordinates(),!1,t);return}if(e instanceof Vr){const i=e.getCoordinates();for(let r=0,s=i.length;r<s;++r)As(n,i[r],!1,t);return}if(e instanceof kt){const i=e.getCoordinates();for(let r=0,s=i.length;r<s;++r)As(n,i[r],!0,t);return}if(e instanceof Xr){const i=e.getCoordinates();for(let r=0,s=i.length;r<s;++r){const o=i[r];for(let a=0,l=o.length;a<l;++a)As(n,o[a],!0,t)}return}if(e instanceof lo){const i=e.getGeometries();for(let r=0;r<i.length;++r)yf(n,i[r],t);return}}function As(n,e,t,i){const r=n[0],s=n[1];for(let o=0,a=e.length-1;o<a;++o){const l=e[o],h=e[o+1],d=xf(r,s,l,h);if(d.squaredDistance===0){const u=o+d.along;i.push({coordinates:e,ring:t,startIndex:u,endIndex:u});return}}}function Ds(n,e){return Qt(n[0],n[1],e[0],e[1])}function Os(n,e,t){let i,r;e<t?(i=e,r=t):(i=t,r=e);const s=Math.ceil(i),o=Math.floor(r);if(s>o){const l=Dn(n,i),h=Dn(n,r);return Ds(l,h)}let a=0;if(i<s){const l=Dn(n,i),h=Mi(n,s);a+=Ds(l,h)}if(o<r){const l=Mi(n,o),h=Dn(n,r);a+=Ds(l,h)}for(let l=s;l<o-1;++l){const h=Mi(n,l),d=Mi(n,l+1);a+=Ds(h,d)}return a}const Da={along:0,squaredDistance:0};function xf(n,e,t,i){const r=t[0],s=t[1],o=i[0],a=i[1],l=o-r,h=a-s;let d=0,u=r,g=s;return(l!==0||h!==0)&&(d=me(((n-r)*l+(e-s)*h)/(l*l+h*h),0,1),u+=l*d,g+=h*d),Da.along=d,Da.squaredDistance=is(Qt(n,e,u,g),10),Da}const Pd=0,Lr=1,Ld=[0,0,0,0],Wn=[],Oa={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"};function Fa(n,e,t){let i;switch(e){case"LineString":i=n;break;case"MultiLineString":case"Polygon":i=n[t[0]];break;case"MultiPolygon":i=n[t[1]][t[0]];break}return i}class ja extends mt{constructor(e,t,i){super(e),this.features=t,this.mapBrowserEvent=i}}class ux extends ji{constructor(e){if(super(e),this.handleSourceAdd_=this.handleSourceAdd_.bind(this),this.handleSourceRemove_=this.handleSourceRemove_.bind(this),this.handleExternalCollectionAdd_=this.handleExternalCollectionAdd_.bind(this),this.handleExternalCollectionRemove_=this.handleExternalCollectionRemove_.bind(this),this.handleFeatureChange_=this.handleFeatureChange_.bind(this),this.on,this.once,this.un,this.condition_=e.condition?e.condition:lf,this.defaultDeleteCondition_=function(i){return tf(i)&&of(i)},this.deleteCondition_=e.deleteCondition?e.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=e.insertVertexCondition?e.insertVertexCondition:Nn,this.vertexFeature_=null,this.vertexSegments_=null,this.lastCoordinate_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new so,this.pixelTolerance_=e.pixelTolerance!==void 0?e.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new an({source:new en({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.style?e.style:fx(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.SEGMENT_WRITERS_={Point:this.writePointGeometry_.bind(this),LineString:this.writeLineStringGeometry_.bind(this),LinearRing:this.writeLineStringGeometry_.bind(this),Polygon:this.writePolygonGeometry_.bind(this),MultiPoint:this.writeMultiPointGeometry_.bind(this),MultiLineString:this.writeMultiLineStringGeometry_.bind(this),MultiPolygon:this.writeMultiPolygonGeometry_.bind(this),Circle:this.writeCircleGeometry_.bind(this),GeometryCollection:this.writeGeometryCollectionGeometry_.bind(this)}
11,this.source_=null,this.traceSource_=e.traceSource||e.source||null,this.traceCondition_,this.setTrace(e.trace||!1),this.traceState_={active:!1},this.traceSegments_=null,this.hitDetection_=null,this.filterFunctionWasSupplied_=e.filter!=null,this.filter_=e.filter?e.filter:()=>!0,this.coordinatesEqual_=e.sharedVerticesEqual?e.sharedVerticesEqual:Dr,!(e.features||e.source))throw new Error("The modify interaction requires features collection or a source");let t;e.features?(t=e.features.getArray(),e.features.addEventListener(ye.ADD,this.handleExternalCollectionAdd_),e.features.addEventListener(ye.REMOVE,this.handleExternalCollectionRemove_),this.featuresCollection_=e.features):e.source&&(t=e.source.getFeatures(),e.source.addEventListener(Te.ADDFEATURE,this.handleSourceAdd_),e.source.addEventListener(Te.REMOVEFEATURE,this.handleSourceRemove_),this.source_=e.source),t.forEach(i=>{i.addEventListener(V.CHANGE,this.handleFeatureChange_),this.filterFunctionWasSupplied_&&i.addEventListener(wt.PROPERTYCHANGE,this.handleFeatureChange_)}),e.hitDetection&&(this.hitDetection_=e.hitDetection),this.features_=[],t.filter(this.filter_).forEach(i=>this.addFeature_(i)),this.lastPointerEvent_=null,this.delta_=[0,0],this.snapToPointer_=e.snapToPointer===void 0?!this.hitDetection_:e.snapToPointer}setTrace(e){let t;e?e===!0?t=Nn:t=e:t=sf,this.traceCondition_=t}addFeature_(e){this.features_.push(e);const t=e.getGeometry();if(t){const r=this.SEGMENT_WRITERS_[t.getType()];r&&r(e,t)}const i=this.getMap();i&&i.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastCoordinate_)}willModifyFeatures_(e,t){if(!this.featuresBeingModified_){this.featuresBeingModified_=new He;const i=this.featuresBeingModified_.getArray();for(let r=0,s=t.length;r<s;++r){const o=t[r].feature;o&&!i.includes(o)&&this.featuresBeingModified_.push(o)}this.featuresBeingModified_.getLength()===0?this.featuresBeingModified_=null:this.dispatchEvent(new ja(Oa.MODIFYSTART,this.featuresBeingModified_,e))}}removeFeature_(e){const t=this.features_.indexOf(e);this.features_.splice(t,1),this.removeFeatureSegmentData_(e),this.vertexFeature_&&this.features_.length===0&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)}removeFeatureSegmentData_(e){const t=this.rBush_,i=[];t.forEach(function(r){e===r.feature&&i.push(r)});for(let r=i.length-1;r>=0;--r){const s=i[r];for(let o=this.dragSegments_.length-1;o>=0;--o)this.dragSegments_[o][0]===s&&this.dragSegments_.splice(o,1);t.remove(s)}}setActive(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(e)}setMap(e){this.overlay_.setMap(e),super.setMap(e)}getOverlay(){return this.overlay_}handleSourceAdd_(e){const t=e.feature;t&&this.externalAddFeatureHandler_(t)}handleSourceRemove_(e){const t=e.feature;t&&this.externalRemoveFeatureHandler_(t)}handleExternalCollectionAdd_(e){const t=e.element;t&&this.externalAddFeatureHandler_(t)}handleExternalCollectionRemove_(e){const t=e.element;t&&this.externalRemoveFeatureHandler_(t)}externalAddFeatureHandler_(e){e.addEventListener(V.CHANGE,this.handleFeatureChange_),this.filterFunctionWasSupplied_&&e.addEventListener(wt.PROPERTYCHANGE,this.handleFeatureChange_),this.filter_(e)&&this.addFeature_(e)}externalRemoveFeatureHandler_(e){e.removeEventListener(V.CHANGE,this.handleFeatureChange_),this.filterFunctionWasSupplied_&&e.removeEventListener(wt.PROPERTYCHANGE,this.handleFeatureChange_),this.removeFeature_(e)}handleFeatureChange_(e){if(!this.changingFeature_){const t=e.target;this.removeFeature_(t),this.filter_(t)&&this.addFeature_(t)}}writePointGeometry_(e,t){const i=t.getCoordinates(),r={feature:e,geometry:t,segment:[i,i]};this.rBush_.insert(t.getExtent(),r)}writeMultiPointGeometry_(e,t){const i=t.getCoordinates();for(let r=0,s=i.length;r<s;++r){const o=i[r],a={feature:e,geometry:t,depth:[r],index:r,segment:[o,o]};this.rBush_.insert(t.getExtent(),a)}}writeLineStringGeometry_(e,t){const i=t.getCoordinates();for(let r=0,s=i.length-1;r<s;++r){const o=i.slice(r,r+2),a={feature:e,geometry:t,index:r,segment:o};this.rBush_.insert(ke(o),a)}}writeMultiLineStringGeometry_(e,t){const i=t.getCoordinates();for(let r=0,s=i.length;r<s;++r){const o=i[r];for(let a=0,l=o.length-1;a<l;++a){const h=o.slice(a,a+2),d={feature:e,geometry:t,depth:[r],index:a,segment:h};this.rBush_.insert(ke(h),d)}}}writePolygonGeometry_(e,t){const i=t.getCoordinates();for(let r=0,s=i.length;r<s;++r){const o=i[r];for(let a=0,l=o.length-1;a<l;++a){const h=o.slice(a,a+2),d={feature:e,geometry:t,depth:[r],index:a,segment:h};this.rBush_.insert(ke(h),d)}}}writeMultiPolygonGeometry_(e,t){const i=t.getCoordinates();for(let r=0,s=i.length;r<s;++r){const o=i[r];for(let a=0,l=o.length;a<l;++a){const h=o[a];for(let d=0,u=h.length-1;d<u;++d){const g=h.slice(d,d+2),f={feature:e,geometry:t,depth:[a,r],index:d,segment:g};this.rBush_.insert(ke(g),f)}}}}writeCircleGeometry_(e,t){const i=t.getCenter(),r={feature:e,geometry:t,index:Pd,segment:[i,i]},s={feature:e,geometry:t,index:Lr,segment:[i,i]},o=[r,s];r.featureSegments=o,s.featureSegments=o,this.rBush_.insert(Rr(i),r);let a=t;this.rBush_.insert(a.getExtent(),s)}writeGeometryCollectionGeometry_(e,t){const i=t.getGeometriesArray();for(let r=0;r<i.length;++r){const s=i[r],o=this.SEGMENT_WRITERS_[s.getType()];o(e,s)}}createOrUpdateVertexFeature_(e,t,i,r){let s=this.vertexFeature_;return s?s.getGeometry().setCoordinates(e):(s=new Pt(new ut(e)),this.vertexFeature_=s,this.overlay_.getSource().addFeature(s)),s.set("features",t),s.set("geometries",i),s.set("existing",r),s}handleEvent(e){if(!e.originalEvent)return!0;this.lastPointerEvent_=e;let t;return!e.map.getView().getInteracting()&&e.type==ne.POINTERMOVE&&!this.handlingDownUpSequence&&this.handlePointerMove_(e),this.vertexFeature_&&this.deleteCondition_(e)&&(e.type!=ne.SINGLECLICK||!this.ignoreNextSingleClick_?t=this.removePoint():t=!0),e.type==ne.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),super.handleEvent(e)&&!t}findInsertVerticesAndUpdateDragSegments_(e){if(this.handlePointerAtPixel_(e),this.dragSegments_.length=0,this.featuresBeingModified_=null,!this.vertexFeature_)return;this.getMap().getView().getProjection();const i=[],r=this.vertexFeature_.getGeometry().getCoordinates(),s=ke([r]),o=this.rBush_.getInExtent(s),a={};o.sort(gx);for(let l=0,h=o.length;l<h;++l){const d=o[l],u=d.segment;let g=H(d.geometry);const f=d.depth;if(f&&(g+="-"+f.join("-")),a[g]||(a[g]=new Array(2)),d.geometry.getType()==="Circle"&&d.index===Lr){const m=Dd(e,d);
11this.coordinatesEqual_(m,r)&&!a[g][0]&&(this.dragSegments_.push([d,0]),a[g][0]=d);continue}if(this.coordinatesEqual_(u[0],r)&&!a[g][0]){this.dragSegments_.push([d,0]),a[g][0]=d;continue}if(this.coordinatesEqual_(u[1],r)&&!a[g][1]){if(a[g][0]&&a[g][0].index===0){let m=d.geometry.getCoordinates();switch(d.geometry.getType()){case"LineString":case"MultiLineString":continue;case"MultiPolygon":m=m[f[1]];case"Polygon":if(d.index!==m[f[0]].length-2)continue;break}}this.dragSegments_.push([d,1]),a[g][1]=d;continue}H(u)in this.vertexSegments_&&!a[g][0]&&!a[g][1]&&i.push(d)}return i}deactivateTrace_(){this.traceState_={active:!1}}updateTrace_(e){const t=this.traceState_;if(!t.active)return;if(t.targetIndex===-1){const s=e.map.getPixelFromCoordinate(t.startCoord);if(Ln(s,e.pixel)<this.pixelTolerance_)return}const i=vf(e.coordinate,t,e.map,this.pixelTolerance_);if(t.targetIndex===-1&&Math.sqrt(i.closestTargetDistance)/e.map.getView().getResolution()>this.pixelTolerance_)return;if(t.targetIndex!==i.index){if(t.targetIndex!==-1){const o=t.targets[t.targetIndex];this.removeTracedCoordinates_(o.startIndex,o.endIndex)}else for(const o of this.traceSegments_){const a=o[0],l=a.geometry,h=o[1],d=l.getCoordinates();Fa(d,l.getType(),a.depth).splice(a.index+h,1),l.setCoordinates(d),h===0&&(a.index-=1)}const s=t.targets[i.index];this.addTracedCoordinates_(s,s.startIndex,i.endIndex)}else{const s=t.targets[t.targetIndex];this.addOrRemoveTracedCoordinates_(s,i.endIndex)}t.targetIndex=i.index;const r=t.targets[t.targetIndex];r.endIndex=i.endIndex}getTraceCandidates_(e){const t=this.getMap(),i=this.pixelTolerance_,r=t.getCoordinateFromPixel([e.pixel[0]-i,e.pixel[1]+i]),s=t.getCoordinateFromPixel([e.pixel[0]+i,e.pixel[1]-i]),o=ke([r,s]);return this.traceSource_.getFeaturesInExtent(o)}
11toggleTraceState_(e){if(!this.traceSource_||!this.traceCondition_(e))return;if(this.traceState_.active){this.deactivateTrace_(),this.traceSegments_=null;return}const t=this.getTraceCandidates_(e);if(t.length===0)return;const i=wf(e.coordinate,t);i.length&&(this.traceState_={active:!0,startCoord:e.coordinate.slice(),targets:i,targetIndex:-1})}addOrRemoveTracedCoordinates_(e,t){const i=e.startIndex<=e.endIndex,r=e.startIndex<=t;i===r?i&&t>e.endIndex||!i&&t<e.endIndex?this.addTracedCoordinates_(e,e.endIndex,t):(i&&t<e.endIndex||!i&&t>e.endIndex)&&this.removeTracedCoordinates_(t,e.endIndex):(this.removeTracedCoordinates_(e.startIndex,e.endIndex),this.addTracedCoordinates_(e,e.startIndex,t))}removeTracedCoordinates_(e,t){if(e===t)return;let i=0;if(e<t){const r=Math.ceil(e);let s=Math.floor(t);s===t&&(s-=1),i=s-r+1}else{const r=Math.floor(e);let s=Math.ceil(t);s===t&&(s+=1),i=r-s+1}if(i>0)for(const r of this.traceSegments_){const s=r[0],o=s.geometry,a=r[1];let l=r[0].index+1;a===1&&(l-=i);const h=o.getCoordinates();Fa(h,o.getType(),s.depth).splice(l,i),o.setCoordinates(h),a===1&&(s.index-=i)}}addTracedCoordinates_(e,t,i){if(t===i)return;const r=[];if(t<i){const s=Math.ceil(t);let o=Math.floor(i);o===i&&(o-=1);for(let a=s;a<=o;++a)r.push(Mi(e.coordinates,a))}else{const s=Math.floor(t);let o=Math.ceil(i);o===i&&(o+=1);for(let a=s;a>=o;--a)r.push(Mi(e.coordinates,a))}if(r.length)for(const s of this.traceSegments_){const o=s[0],a=o.geometry,l=s[1],h=o.index+1;l===0&&r.reverse();const d=a.getCoordinates();Fa(d,a.getType(),o.depth).splice(h,0,...r),a.setCoordinates(d),l===1&&(o.index+=r.length)}}updateGeometry_(e,t){const i=t[0],r=i.depth;let s;const o=i.segment,a=i.geometry,l=t[1],h=a.getStride();for(let d=2;d<h;++d)e[d]=o[l][d];switch(e.length=h,a.getType()){case"Point":s=e,o[0]=e,o[1]=e;break;case"MultiPoint":s=a.getCoordinates(),s[i.index]=e,o[0]=e,o[1]=e;break;case"LineString":s=a.getCoordinates(),s[i.index+l]=e,o[l]=e;break;case"MultiLineString":s=a.getCoordinates(),s[r[0]][i.index+l]=e,o[l]=e;break;case"Polygon":{s=a.getCoordinates();const u=s[r[0]],g=i.index+l;u[g][0]===e[0]&&u[g][1]===e[1]?s=null:(u[g]=e,g===0?u[u.length-1]=e:g===u.length-1&&(u[0]=e)),o[l]=e;break}case"MultiPolygon":{s=a.getCoordinates();const u=s[r[1]][r[0]],g=i.index+l;u[g][0]===e[0]&&u[g][1]===e[1]?s=null:(u[g]=e,g===0?u[u.length-1]=e:g===u.length-1&&(u[0]=e)),o[l]=e;break}case"Circle":const d=a;if(o[0]=e,o[1]=e,i.index===Pd)this.changingFeature_=!0,d.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0,this.getMap().getView().getProjection();let u=Ln(ue(d.getCenter()),ue(e));d.setRadius(u),this.changingFeature_=!1}break}s&&this.setGeometryCoordinates_(a,s)}handleDragEvent(e){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(e,this.dragSegments_.map(([o])=>o));const t=[e.coordinate[0]+this.delta_[0],e.coordinate[1]+this.delta_[1]],i=[],r=[],s=this.traceState_.active&&!this.traceSegments_?this.traceState_.startCoord:null;if(s){this.traceSegments_=[];for(const o of this.dragSegments_){const a=o[0];Ln(Co(s,a.segment),s)/e.map.getView().getResolution()<1&&this.traceSegments_.push(o)}}for(let o=0,a=this.dragSegments_.length;o<a;++o){const l=this.dragSegments_[o],h=l[0],d=h.feature;i.includes(d)||i.push(d);const u=h.geometry;r.includes(u)||r.push(u),this.updateGeometry_(t,l)}this.updateTrace_(e),this.createOrUpdateVertexFeature_(t,i,r,!0)}handleDownEvent(e){if(!this.condition_(e))return!1;const t=e.coordinate,i=this.findInsertVerticesAndUpdateDragSegments_(t);if(i?.length&&this.insertVertexCondition_(e)&&(this.willModifyFeatures_(e,i),this.vertexFeature_)){const r=this.vertexFeature_.getGeometry().getCoordinates();for(let s=i.length-1;s>=0;--s)this.insertVertex_(i[s],r);this.ignoreNextSingleClick_=!0}return!!this.vertexFeature_}handleUpEvent(e){for(let t=this.dragSegments_.length-1;t>=0;--t){const i=this.dragSegments_[t][0],r=i.geometry;if(r.getType()==="Circle"){const s=r,o=s.getCenter(),a=i.featureSegments[0],l=i.featureSegments[1];a.segment[0]=o,a.segment[1]=o,l.segment[0]=o,l.segment[1]=o,this.rBush_.update(Rr(o),a);let h=s;this.rBush_.update(h.getExtent(),l)}else this.rBush_.update(ke(i.segment),i)}return this.featuresBeingModified_&&(this.toggleTraceState_(e),this.dispatchEvent(new ja(Oa.MODIFYEND,this.featuresBeingModified_,e)),this.featuresBeingModified_=null),!1}
11handlePointerMove_(e){this.lastCoordinate_=e.coordinate,this.handlePointerAtPixel_(this.lastCoordinate_)}handlePointerAtPixel_(e){const t=this.getMap(),i=t.getPixelFromCoordinate(e);t.getView().getProjection();const r=function(a,l){return Ad(e,a)-Ad(e,l)};let s,o;if(this.hitDetection_){const a=typeof this.hitDetection_=="object"?l=>l===this.hitDetection_:void 0;t.forEachFeatureAtPixel(i,(l,h,d)=>{d&&d.getType()==="Point"&&(d=new ut(Di(d.getCoordinates())));const u=d||l.getGeometry();if(u&&u.getType()==="Point"&&l instanceof Pt&&this.features_.includes(l)){o=u;const g=l.getGeometry().getFlatCoordinates().slice(0,2);s=[{feature:l,geometry:o,segment:[g,g]}]}return!0},{layerFilter:a})}if(!s){const a=Ti(Rr(e,Ld)),l=t.getView().getResolution()*this.pixelTolerance_,h=Ro(Qr(a,l,Ld));s=this.rBush_.getInExtent(h)}if(s&&s.length>0){const a=s.sort(r)[0],l=a.segment;let h=Dd(e,a);const d=t.getPixelFromCoordinate(h);let u=Ln(i,d);if(o||u<=this.pixelTolerance_){const g={};if(g[H(l)]=!0,this.snapToPointer_||(this.delta_[0]=h[0]-e[0],this.delta_[1]=h[1]-e[1]),a.geometry.getType()==="Circle"&&a.index===Lr)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(h,[a.feature],[a.geometry],this.snappedToVertex_);else{const f=t.getPixelFromCoordinate(l[0]),m=t.getPixelFromCoordinate(l[1]),_=ei(d,f),p=ei(d,m);if(u=Math.sqrt(Math.min(_,p)),this.snappedToVertex_=u<=this.pixelTolerance_,!this.snappedToVertex_&&!this.insertVertexCondition_(this.lastPointerEvent_)){this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null);return}this.snappedToVertex_&&(h=_>p?l[1]:l[0]),this.createOrUpdateVertexFeature_(h,[a.feature],[a.geometry],this.snappedToVertex_);const v={};v[H(a.geometry)]=!0;for(let w=1,x=s.length;w<x;++w){const y=s[w].segment;if(this.coordinatesEqual_(l[0],y[0])&&this.coordinatesEqual_(l[1],y[1])||this.coordinatesEqual_(l[0],y[1])&&this.coordinatesEqual_(l[1],y[0])){const b=H(s[w].geometry);b in v||(v[b]=!0,g[H(y)]=!0)}else break}}this.vertexSegments_=g;return}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)}insertVertex_(e,t){const i=e.segment,r=e.feature,s=e.geometry,o=e.depth,a=e.index;let l;for(;t.length<s.getStride();)t.push(0);switch(s.getType()){case"MultiLineString":l=s.getCoordinates(),l[o[0]].splice(a+1,0,t);break;case"Polygon":l=s.getCoordinates(),l[o[0]].splice(a+1,0,t);break;case"MultiPolygon":l=s.getCoordinates(),l[o[1]][o[0]].splice(a+1,0,t);break;case"LineString":l=s.getCoordinates(),l.splice(a+1,0,t);break;default:return!1}this.setGeometryCoordinates_(s,l);const h=this.rBush_;h.remove(e),this.updateSegmentIndices_(s,a,o,1);const d={segment:[i[0],t],feature:r,geometry:s,depth:o,index:a};h.insert(ke(d.segment),d),this.dragSegments_.push([d,1]);const u={segment:[t,i[1]],feature:r,geometry:s,depth:o,index:a+1};return h.insert(ke(u.segment),u),this.dragSegments_.push([u,0]),!0}updatePointer_(e){return e&&this.findInsertVerticesAndUpdateDragSegments_(e),this.vertexFeature_?.getGeometry().getCoordinates()}getPoint(){const e=this.vertexFeature_?.getGeometry().getCoordinates();return e?Di(e,this.getMap().getView().getProjection()):null}canRemovePoint(){if(!this.vertexFeature_||this.vertexFeature_.get("geometries").every(i=>i.getType()==="Circle"||i.getType().endsWith("Point")))return!1;const e=this.vertexFeature_.getGeometry().getCoordinates();return this.rBush_.getInExtent(ke([e])).some(({segment:i})=>this.coordinatesEqual_(i[0],e)||this.coordinatesEqual_(i[1],e))}removePoint(e){if(e&&(e=ue(e,this.getMap().getView().getProjection()),this.updatePointer_(e)),!this.lastPointerEvent_||this.lastPointerEvent_&&this.lastPointerEvent_.type!=ne.POINTERDRAG){const t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_.map(([r])=>r));const i=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new ja(Oa.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null,i}return!1}removeVertex_(){const e=this.dragSegments_,t={};let i=!1,r,s,o,a,l,h,d,u,g,f,m;for(l=e.length-1;l>=0;--l)o=e[l],f=o[0],m=H(f.feature),f.depth&&(m+="-"+f.depth.join("-")),m in t||(t[m]={}),o[1]===0?(t[m].right=f,t[m].index=f.index):o[1]==1&&(t[m].left=f,t[m].index=f.index+1);for(m in t){switch(g=t[m].right,d=t[m].left,h=t[m].index,u=h-1,d!==void 0?f=d:f=g,u<0&&(u=0),a=f.geometry,s=a.getCoordinates(),r=s,i=!1,a.getType()){case"MultiLineString":s[f.depth[0]].length>2&&(s[f.depth[0]].splice(h,1),i=!0);break;case"LineString":s.length>2&&(s.splice(h,1),i=!0);break;case"MultiPolygon":r=r[f.depth[1]];case"Polygon":r=r[f.depth[0]],r.length>4&&(h==r.length-1&&(h=0),r.splice(h,1),i=!0,h===0&&(r.pop(),r.push(r[0]),u=r.length-1));break}if(i){this.setGeometryCoordinates_(a,s);const _=[];
11if(d!==void 0&&(this.rBush_.remove(d),_.push(d.segment[0])),g!==void 0&&(this.rBush_.remove(g),_.push(g.segment[1])),d!==void 0&&g!==void 0){const p={depth:f.depth,feature:f.feature,geometry:f.geometry,index:u,segment:_};this.rBush_.insert(ke(p.segment),p)}this.updateSegmentIndices_(a,h,f.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),e.length=0}}return i}canInsertPoint(){if(!this.vertexFeature_||this.vertexFeature_.get("geometries").every(i=>i.getType()==="Circle"||i.getType().endsWith("Point")))return!1;const e=this.vertexFeature_.getGeometry().getCoordinates();return this.rBush_.getInExtent(ke([e])).some(({segment:i})=>!(this.coordinatesEqual_(i[0],e)||this.coordinatesEqual_(i[1],e)))}insertPoint(e){const t=e?ue(e,this.getMap().getView().getProjection()):this.vertexFeature_?.getGeometry().getCoordinates();return t?this.findInsertVerticesAndUpdateDragSegments_(t).reduce((r,s)=>r||this.insertVertex_(s,t),!1):!1}setGeometryCoordinates_(e,t){this.changingFeature_=!0,e.setCoordinates(t),this.changingFeature_=!1}updateSegmentIndices_(e,t,i,r){this.rBush_.forEachInExtent(e.getExtent(),function(s){s.geometry===e&&(i===void 0||s.depth===void 0||di(s.depth,i))&&s.index>t&&(s.index+=r)})}disposeInternal(){if(super.disposeInternal(),this.featuresCollection_){this.featuresCollection_.removeEventListener(ye.ADD,this.handleExternalCollectionAdd_),this.featuresCollection_.removeEventListener(ye.REMOVE,this.handleExternalCollectionRemove_);for(const e of this.featuresCollection_.getArray())e.removeEventListener(V.CHANGE,this.handleFeatureChange_),this.filterFunctionWasSupplied_&&e.removeEventListener(wt.PROPERTYCHANGE,this.handleFeatureChange_)}else if(this.source_){this.source_.removeEventListener(Te.ADDFEATURE,this.handleSourceAdd_),this.source_.removeEventListener(Te.REMOVEFEATURE,this.handleSourceRemove_);for(const e of this.source_.getFeatures())e.removeEventListener(V.CHANGE,this.handleFeatureChange_),this.filterFunctionWasSupplied_&&e.removeEventListener(wt.PROPERTYCHANGE,this.handleFeatureChange_)}}}function gx(n,e){return n.index-e.index}function Ad(n,e,t){const i=e.geometry;if(i.getType()==="Circle"){let s=i;if(e.index===Lr){const o=ei(s.getCenter(),ue(n)),a=Math.sqrt(o)-s.getRadius();return a*a}}const r=ue(n);return Wn[0]=ue(e.segment[0]),Wn[1]=ue(e.segment[1]),E_(r,Wn)}function Dd(n,e,t){const i=e.geometry;if(i.getType()==="Circle"&&e.index===Lr)return Di(i.getClosestPoint(ue(n)));const r=ue(n);return Wn[0]=ue(e.segment[0]),Wn[1]=ue(e.segment[1]),Di(Co(r,Wn))}function fx(){const n=jg();return function(e,t){return n.Point}}function bf({id:n="map",extent:e=[356331.324838078,65735371475899e-7,817706.2507926861,7114302198124453e-9],initialZoomLevel:t=1,centerPoint:i=[0,0],layers:r=[],className:s=null,children:o}){const a=Y(null),[l,h]=J(t),[d,u]=J(!1);Ke(()=>()=>{d&&a.current.getView().un("change:resolution",_)},[]);const g=()=>{if(d)return;const C=m(),M=new hx,I=new Vy({className:s,source:M});a.current=new Sy({view:C,layers:[I],target:n,controls:[]}),a.current.on("pointermove",L=>{}),r.length>0&&r.forEach(L=>a.current.addLayer(L)),C.on("change:resolution",_),u(!0)},f=C=>{var M,I=[],L=A=>{var D=A.getSource();if(D instanceof en){var z=D.getFeatures();z.length>0&&I.push({layer:A,features:z})}};return a.current.getLayers().forEach(A=>{A instanceof pn?A.getLayers().forEach(L):L(A)}),I.forEach(A=>{var D=A.features.some(z=>C===z);D&&(M=A.layer)}),M},m=()=>i.length===2&&(i[0]!==0||i[1]!==0)?new xt({center:i,zoom:l}):new xt({extent:e,center:li(e),showFullExtent:!0,zoom:1}),_=C=>{const M=Math.round(Math.log2(156543.03390625)-Math.log2(C.oldValue));h(M)},p=({layerId:C,style:M=null})=>{const I=new en({wrapX:!1}),L=new an({source:I,visible:!0,properties:{id:C}});M!==null&&Array.isArray(M)&&L.setStyle(M),a.current.addLayer(L)},v=({layerId:C,onPolygonChanged:M=I=>{}})=>{const I=R(C).getSource(),L=new dx({source:I});a.current.addInteraction(L);const A=new ux({source:I,deleteCondition:function(D){return tf(D)&&of(D)}});A.on("modifyend",()=>{const z=I.getFeatures()[0].getGeometry().getCoordinates()[0];M(z)}),a.current.addInteraction(A)},w=({layerId:C="polygon",coordinates:M,polygonStyle:I=null})=>{typeof R(C)<"u"&&b(C),p({layerId:C,style:I});const A=R(C).getSource(),D=new kt([M]),z=new Pt({geometry:D,properties:{id:Date.now()}});A.addFeature(z);const O=z.getGeometry().getExtent();
11A.getFeatures().forEach(N=>{Hl(O,N.getGeometry().getExtent())}),x(O)},x=(C=null)=>{const M=L=>L instanceof Array&&L.length===4?(a.current.getView().fit(L,{size:a.current.getSize(),padding:[100,30,30,30],duration:100}),!0):!1;if(!M(C)){const L=a.current.getView().getProperties();if("extent"in L){C=L.extent,M(C);return}}},y=(C="polygon")=>{const M=new en({wrapX:!1}),I=new an({source:M,visible:!0,properties:{id:C}});a.current.addLayer(I)},b=C=>{const M=R(C);if(typeof M>"u")throw`Layer with id: '${C}' not found`;a.current.removeLayer(M)},k=C=>{const M=a.current.getLayers().getArray().find(I=>I.get(C)===C);M.setVisible(!M.isVisble())},R=C=>T().find(M=>M.get("id")===C),T=(C=!0)=>{const M=a.current.getLayers().getArray();return C?M.filter(I=>I.isVisible()):M},E={instance:a?.current,id:n,initMap:g,zoomLevel:l,isInitialized:d,do:{addVectorLayerToMap:p,addModifyInteractionsToMap:v,drawPolygonOnMap:w,fitMapViewToExtent:x,addLayer:y,removeLayer:b,toogleLayer:k,getLayerById:R,getLayerByFeature:f,listLayers:T}};return c(pf.Provider,{value:E,children:o})}function mx({title:n,titleId:e,...t},i){return F("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":e},t),n?F("title",{id:e},n):null,F("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const px=Pe(mx);function _x({title:n,titleId:e,...t},i){return F("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":e},t),n?F("title",{id:e},n):null,F("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const vx=Pe(_x);async function Na(n,e,t){const i=new Headers;return fetch(e,{method:n,headers:i,body:null}).then(s=>{if(!s.ok)throw console.log(s.text().then(o=>console.log(`Response: 12`,o))),new Error("Error fetching data");return s.json()}).catch(s=>console.log(s))}function wx({className:n="absolute top-0 z-1 p-3 w-full bg-linear-0 from-white/10 to-white",onLocationFound:e=t=>{}}){const[t,i]=J(!1),[r,s]=J([]),o=Y(null),a=Y(null),l=g=>{g.preventDefault();const f=g.target.value;f.length?Na("GET",`https://api.pdok.nl/bzk/locatieserver/search/v3_1/suggest?fq=type:buurt+type:wijk&rows=6&q=${f}&fl=id,weergavenaam,type,score,gemeentenaam,provincienaam`).then(v=>{v.response.docs.length?i(!0):i(!1),s(v.response.docs)}):i(!1)},h=g=>{g.preventDefault();const f=g.target.tagName=="A"?g.target:g.target.closest("a");sessionStorage.setItem("bww_neighbourhoodName",f.dataset.name);const m=f.id;Na("GET",`https://api.pdok.nl/bzk/locatieserver/search/v3_1/lookup?&id=${m}`).then(_=>{let p=_.response.docs[0].identificatie;const v=p.startsWith("BU"),w=p.startsWith("WK");p="*"+p.slice(2,p.length);const x="epsg:3857",y=`<Filter><PropertyIsLike matchCase="false" wildCard="*" singleChar="." escapeChar="!"><PropertyName>cbsgebiedsindelingen:statcode</PropertyName><Literal>${p}</Literal></PropertyIsLike></Filter>`;let b;v?b="buurt_gegeneraliseerd":w&&(b="wijk_gegeneraliseerd");const k=`https://service.pdok.nl/cbs/gebiedsindelingen/2025/wfs/v1_0?service=wfs&version=2.0.0&request=GetFeature&propertyName=statcode,statnaam,geom&typeName=${b}&outputFormat=json&srsName=${x}&filter=${y}`;Na("GET",k).then(R=>{R.features[0].properties;const T=R.features[0].geometry,E=T.type=="MultiPolygon"?T.coordinates[0][0]:T.coordinates[0];e(E),o.current.value="",i(!1)})})},d=g=>{g.preventDefault(),t&&(a.current.remove(),o.current.value="",i(!1))},u=({type:g,name:f,municipality:m,province:_,id:p})=>c("a",{onClick:h,"data-name":f,type:"button",tabindex:"0",role:"option",id:p,class:"cursor-pointer hover:bg-gray-100 no-underline flex px-4 py-1 min-h-[3.313rem]","aria-selected":"false",children:[c("div",{class:"flex flex-col justify-center pr-4",children:c("svg",{width:"13.3375",height:"19.1105",viewBox:"0 0 26.675 38.221",children:c("g",{id:"HR-positie-fill",transform:"translate(-158.369 -98.095)",children:c("path",{id:"Path_644","data-name":"Path 644",d:"M171.707,98.095a13.353,13.353,0,0,0-13.338,13.338c0,7.075,12.076,23.794,12.59,24.5a.924.924,0,0,0,1.495,0c.514-.708,12.59-17.427,12.59-24.5a13.353,13.353,0,0,0-13.338-13.338Zm0,18.189a4.851,4.851,0,1,1,4.851-4.851A4.856,4.856,0,0,1,171.707,116.283Z",transform:"translate(0)",fill:"#008cd4"})})})}),c("div",{class:"flex flex-row items-center text-left truncate",children:c("div",{children:[c("div",{children:f}),c("div",{class:"text-sm option-subtitle",children:[g=="wijk"?c("b",{children:g}):g,` (${m}, ${_})`]})]})})]});return c("div",{className:n,children:[c("label",{class:"block mb-2 text-left hidden",for:"locationSearchField",children:"Zoek een buurt"}),c("div",{class:"flex flex-wrap w-full relative items-stretch text-4",children:[c("input",{ref:o,onKeyUp:l,type:"text",class:"outline-none focus:rounded-b-none w-full h-12 px-4 py-3 z-0 bg-white rounded-sm appearance-none border border-gray-300",id:"locationSearchField",placeholder:"Zoek een buurt",autocomplete:"off","aria-expanded":"true"}),c("span",{class:"absolute right-4 top-4 z-1 w-4",children:t?c(vx,{onClick:d,className:"cursor-pointer"}):c(px,{})})]}),t?c("div",{ref:a,class:"box-border rounded-t-none rounded-b-sm z-4 bg-white border",children:c("div",{class:"max-h-[50vh] header-options header-control-item",children:r.map(g=>c(u,{type:g.type,name:g.weergavenaam,municipality:g.gemeentenaam,province:g.provincienaam,id:g.id}))})}):c(j,{})]})}function Ef({className:n="size-80",polygon:e=null,polygonLayerId:t="polygon",polygonStyle:i=null,canModifyPolygon:r=!1,onPolygonChanged:s=o=>{}}){const o=Bo();return le(()=>{o.initMap()},[]),le(()=>{e!==null&&Array.isArray(e)&&(i=i||null,o.do.drawPolygonOnMap({layerId:t,coordinates:e,polygonStyle:i}),r&&o.do.addModifyInteractionsToMap({layerId:t,onPolygonChanged:s}))},[e]),c("div",{id:o?.id,class:n})}const Fs={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"};class js extends mt{constructor(e,t){super(e),this.feature=t}}class co extends ji{constructor(e){const t=e;t.stopDown||(t.stopDown=gn),super(t),this.on,this.once,this.un,this.options_=e,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=e.source?e.source:null,this.features_=e.features?e.features:null,this.snapTolerance_=e.snapTolerance?e.snapTolerance:12,this.type_=e.type,this.mode_=xx(this.type_),this.stopClick_=!!e.stopClick,this.ignoreNextUpEvent_=!1,this.minPoints_=e.minPoints?e.minPoints:this.mode_==="Polygon"?3:2,this.maxPoints_=this.mode_==="Circle"?2:e.maxPoints?e.maxPoints:1/0,this.finishCondition_=e.finishCondition?e.finishCondition:sn,this.geometryLayout_=e.geometryLayout?e.geometryLayout:"XY";let i=e.geometryFunction;if(!i){const r=this.mode_;if(r==="Circle")i=(s,o,a)=>{const l=o||new $o([NaN,NaN]),h=ue(s[0]),d=ei(h,ue(s[s.length-1]));return l.setCenterAndRadius(h,Math.sqrt(d),this.geometryLayout_),l};else{let s;r==="Point"?s=ut:r==="LineString"?s=ri:r==="Polygon"&&(s=kt),i=(o,a,l)=>(a?r==="Polygon"?o[0].length?a.setCoordinates([o[0].concat([o[0][0]])],this.geometryLayout_):a.setCoordinates([],this.geometryLayout_):a.setCoordinates(o,this.geometryLayout_):a=new s(o,this.geometryLayout_),a)}}this.geometryFunction_=i,this.dragVertexDelay_=e.dragVertexDelay!==void 0?e.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=e.clickTolerance?e.clickTolerance*e.clickTolerance:36,this.overlay_=new an({source:new en({useSpatialIndex:!1,wrapX:e.wrapX?e.wrapX:!1}),style:e.style?e.style:yx(),updateWhileInteracting:!0}),this.geometryName_=e.geometryName,this.condition_=e.condition?e.condition:Pc,this.freehandCondition_,e.freehand?this.freehandCondition_=Nn:this.freehandCondition_=e.freehandCondition?e.freehandCondition:yl,this.traceCondition_,this.setTrace(e.trace||!1),this.traceState_={active:!1}
12,this.traceSource_=e.traceSource||e.source||null,this.addChangeListener(vl.ACTIVE,this.updateState_)}setTrace(e){let t;e?e===!0?t=Nn:t=e:t=sf,this.traceCondition_=t}setMap(e){super.setMap(e),this.updateState_()}setFreehand(e){this.freehand_=e,this.freehand_?this.freehandCondition_=Nn:this.freehandCondition_=this.options_&&this.options_.freehandCondition?this.options_.freehandCondition:yl}getOverlay(){return this.overlay_}getFreehand(){return this.freehand_}handleEvent(e){e.originalEvent.type===V.CONTEXTMENU&&e.originalEvent.preventDefault(),this.freehand_=this.mode_!=="Point"&&this.freehandCondition_(e);let t=e.type===ne.POINTERMOVE,i=!0;return!this.freehand_&&this.lastDragTime_&&e.type===ne.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,t=!0):this.lastDragTime_=void 0,this.shouldHandle_&&this.downTimeout_!==void 0&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&e.type===ne.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(e.coordinate),i=!1):this.freehand_&&e.type===ne.POINTERDOWN?i=!1:t&&this.getPointerCount()<2?(i=e.type===ne.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(e),this.shouldHandle_&&e.originalEvent.preventDefault()):(e.originalEvent.pointerType==="mouse"||e.type===ne.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(e)):e.type===ne.DBLCLICK&&(i=!1),super.handleEvent(e)&&i}handleDownEvent(e){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=e.pixel,this.finishCoordinate_||this.startDrawing_(e.coordinate),!0):this.condition_(e)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(()=>{this.handlePointerMove_(new Kt(ne.POINTERMOVE,e.map,e.originalEvent,!1,e.frameState))},this.dragVertexDelay_),this.downPx_=e.pixel,!0):(this.lastDragTime_=void 0,!1)}deactivateTrace_(){this.traceState_={active:!1}}
12toggleTraceState_(e){if(!this.traceSource_||!this.traceCondition_(e))return;if(this.traceState_.active){this.deactivateTrace_();return}const t=this.getMap(),i=t.getCoordinateFromPixel([e.pixel[0]-this.snapTolerance_,e.pixel[1]+this.snapTolerance_]),r=t.getCoordinateFromPixel([e.pixel[0]+this.snapTolerance_,e.pixel[1]-this.snapTolerance_]),s=ke([i,r]),o=this.traceSource_.getFeaturesInExtent(s);if(o.length===0)return;const a=wf(e.coordinate,o);a.length&&(this.traceState_={active:!0,startCoord:e.coordinate.slice(),targets:a,targetIndex:-1})}addOrRemoveTracedCoordinates_(e,t){const i=e.startIndex<=e.endIndex,r=e.startIndex<=t;i===r?i&&t>e.endIndex||!i&&t<e.endIndex?this.addTracedCoordinates_(e,e.endIndex,t):(i&&t<e.endIndex||!i&&t>e.endIndex)&&this.removeTracedCoordinates_(t,e.endIndex):(this.removeTracedCoordinates_(e.startIndex,e.endIndex),this.addTracedCoordinates_(e,e.startIndex,t))}removeTracedCoordinates_(e,t){if(e===t)return;let i=0;if(e<t){const r=Math.ceil(e);let s=Math.floor(t);s===t&&(s-=1),i=s-r+1}else{const r=Math.floor(e);let s=Math.ceil(t);s===t&&(s+=1),i=r-s+1}i>0&&this.removeLastPoints_(i)}addTracedCoordinates_(e,t,i){if(t===i)return;const r=[];if(t<i){const s=Math.ceil(t);let o=Math.floor(i);o===i&&(o-=1);for(let a=s;a<=o;++a)r.push(Mi(e.coordinates,a))}else{const s=Math.floor(t);let o=Math.ceil(i);o===i&&(o+=1);for(let a=s;a>=o;--a)r.push(Mi(e.coordinates,a))}r.length&&this.appendCoordinates(r)}updateTrace_(e){const t=this.traceState_;if(!t.active)return;if(t.targetIndex===-1){const a=e.map.getPixelFromCoordinate(t.startCoord);if(Ln(a,e.pixel)<this.snapTolerance_)return}const i=vf(e.coordinate,t,this.getMap(),this.snapTolerance_);if(t.targetIndex!==i.index){if(t.targetIndex!==-1){const l=t.targets[t.targetIndex];this.removeTracedCoordinates_(l.startIndex,l.endIndex)}const a=t.targets[i.index];this.addTracedCoordinates_(a,a.startIndex,i.endIndex)}else{const a=t.targets[t.targetIndex];this.addOrRemoveTracedCoordinates_(a,i.endIndex)}t.targetIndex=i.index;const r=t.targets[t.targetIndex];r.endIndex=i.endIndex;const s=Dn(r.coordinates,r.endIndex),o=this.getMap().getPixelFromCoordinate(s);e.coordinate=s,e.pixel=[Math.round(o[0]),Math.round(o[1])]}handleDragEvent(e){this.ignoreNextUpEvent_=!0,super.handleDragEvent(e)}handleUpEvent(e){let t=!0;if(this.getPointerCount()===0){this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(e);const i=this.traceState_.active;if(this.ignoreNextUpEvent_||this.toggleTraceState_(e),this.shouldHandle_){const r=!this.finishCoordinate_;r&&this.startDrawing_(e.coordinate),!r&&this.freehand_?this.finishDrawing():!this.freehand_&&(!r||this.mode_==="Point")&&(this.atFinish_(e.pixel,i)?this.finishCondition_(e)&&this.finishDrawing():this.addToDrawing_(e.coordinate)),t=!1}else this.freehand_&&this.abortDrawing()}return this.ignoreNextUpEvent_=!1,!t&&this.stopClick_&&e.preventDefault(),t}handlePointerMove_(e){if(this.pointerType_=e.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){const t=this.downPx_,i=e.pixel,r=t[0]-i[0],s=t[1]-i[1],o=r*r+s*s;if(this.shouldHandle_=this.freehand_?o>this.squaredClickTolerance_:o<=this.squaredClickTolerance_,!this.shouldHandle_)return}if(!this.finishCoordinate_){this.createOrUpdateSketchPoint_(e.coordinate.slice());return}this.updateTrace_(e),this.modifyDrawing_(e.coordinate)}atFinish_(e,t){let i=!1;if(this.sketchFeature_){let r=!1,s=[this.finishCoordinate_];const o=this.mode_;if(o==="Point")i=!0;else if(o==="Circle")i=this.sketchCoords_.length===2;else if(o==="LineString")r=!t&&this.sketchCoords_.length>this.minPoints_;else if(o==="Polygon"){const a=this.sketchCoords_;r=a[0].length>this.minPoints_,s=[a[0][0],a[0][a[0].length-2]],t?s=[a[0][0]]:s=[a[0][0],a[0][a[0].length-2]]}if(r){const a=this.getMap();for(let l=0,h=s.length;l<h;l++){const d=s[l],u=a.getPixelFromCoordinate(d),g=e[0]-u[0],f=e[1]-u[1],m=this.freehand_?1:this.snapTolerance_;if(i=Math.sqrt(g*g+f*f)<=m,i){this.finishCoordinate_=d;break}}}}return i}createOrUpdateSketchPoint_(e){this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(e):(this.sketchPoint_=new Pt(new ut(e)),this.updateSketchFeatures_())}createOrUpdateCustomSketchLine_(e){this.sketchLine_||(this.sketchLine_=new Pt);const t=e.getLinearRing(0);let i=this.sketchLine_.getGeometry();i?(i.setFlatCoordinates(t.getLayout(),t.getFlatCoordinates()),i.changed()):(i=new ri(t.getFlatCoordinates(),t.getLayout()),this.sketchLine_.setGeometry(i))}startDrawing_(e){const t=this.getMap().getView().getProjection(),i=io(this.geometryLayout_);for(;e.length<i;)e.push(0);this.finishCoordinate_=e,this.mode_==="Point"?this.sketchCoords_=e.slice():this.mode_==="Polygon"?(this.sketchCoords_=[[e.slice(),e.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[e.slice(),e.slice()],this.sketchLineCoords_&&(this.sketchLine_=new Pt(new ri(this.sketchLineCoords_)));const r=this.geometryFunction_(this.sketchCoords_,void 0,t);this.sketchFeature_=new Pt,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(r),this.updateSketchFeatures_(),this.dispatchEvent(new js(
12Fs.DRAWSTART,this.sketchFeature_))}modifyDrawing_(e){const t=this.getMap(),i=this.sketchFeature_.getGeometry(),r=t.getView().getProjection(),s=io(this.geometryLayout_);let o,a;for(;e.length<s;)e.push(0);this.mode_==="Point"?a=this.sketchCoords_:this.mode_==="Polygon"?(o=this.sketchCoords_[0],a=o[o.length-1],this.atFinish_(t.getPixelFromCoordinate(e))&&(e=this.finishCoordinate_.slice())):(o=this.sketchCoords_,a=o[o.length-1]),a[0]=e[0],a[1]=e[1],this.geometryFunction_(this.sketchCoords_,i,r),this.sketchPoint_&&this.sketchPoint_.getGeometry().setCoordinates(e),i.getType()==="Polygon"&&this.mode_!=="Polygon"?this.createOrUpdateCustomSketchLine_(i):this.sketchLineCoords_&&this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_),this.updateSketchFeatures_()}addToDrawing_(e){const t=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection();let r,s;const o=this.mode_;return o==="LineString"||o==="Circle"?(this.finishCoordinate_=e.slice(),s=this.sketchCoords_,s.length>=this.maxPoints_&&(this.freehand_?s.pop():r=!0),s.push(e.slice()),this.geometryFunction_(s,t,i)):o==="Polygon"&&(s=this.sketchCoords_[0],s.length>=this.maxPoints_&&(this.freehand_?s.pop():r=!0),s.push(e.slice()),r&&(this.finishCoordinate_=s[0]),this.geometryFunction_(this.sketchCoords_,t,i)),this.createOrUpdateSketchPoint_(e.slice()),this.updateSketchFeatures_(),r?this.finishDrawing():this.sketchFeature_}removeLastPoints_(e){if(!this.sketchFeature_)return;const t=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),r=this.mode_;for(let s=0;s<e;++s){let o;if(r==="LineString"||r==="Circle"){if(o=this.sketchCoords_,o.splice(-2,1),o.length>=2){this.finishCoordinate_=o[o.length-2].slice();const a=this.finishCoordinate_.slice();o[o.length-1]=a,this.createOrUpdateSketchPoint_(a)}this.geometryFunction_(o,t,i),t.getType()==="Polygon"&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(r==="Polygon"){o=this.sketchCoords_[0],o.splice(-2,1);const a=this.sketchLine_.getGeometry();if(o.length>=2){const l=o[o.length-2].slice();o[o.length-1]=l,this.createOrUpdateSketchPoint_(l)}a.setCoordinates(o),this.geometryFunction_(this.sketchCoords_,t,i)}if(o.length===1){this.abortDrawing();break}}this.updateSketchFeatures_()}removeLastPoint(){this.removeLastPoints_(1)}finishDrawing(){const e=this.abortDrawing_();if(!e)return null;let t=this.sketchCoords_;const i=e.getGeometry(),r=this.getMap().getView().getProjection();return this.mode_==="LineString"?(t.pop(),this.geometryFunction_(t,i,r)):this.mode_==="Polygon"&&(t[0].pop(),this.geometryFunction_(t,i,r),t=i.getCoordinates()),this.type_==="MultiPoint"?e.setGeometry(new Jn([t])):this.type_==="MultiLineString"?e.setGeometry(new Vr([t])):this.type_==="MultiPolygon"&&e.setGeometry(new Xr([t])),this.dispatchEvent(new js(Fs.DRAWEND,e)),this.features_&&this.features_.push(e),this.source_&&this.source_.addFeature(e),e}abortDrawing_(){this.finishCoordinate_=null;const e=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),this.deactivateTrace_(),e}abortDrawing(){const e=this.abortDrawing_();e&&this.dispatchEvent(new js(Fs.DRAWABORT,e))}appendCoordinates(e){const t=this.mode_,i=!this.sketchFeature_;i&&this.startDrawing_(e[0]);let r;if(t==="LineString"||t==="Circle")r=this.sketchCoords_;else if(t==="Polygon")r=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;i&&r.shift(),r.pop();for(let o=0;o<e.length;o++)this.addToDrawing_(e[o]);const s=e[e.length-1];this.sketchFeature_=this.addToDrawing_(s),this.modifyDrawing_(s)}extend(e){const i=e.getGeometry();this.sketchFeature_=e,this.sketchCoords_=i.getCoordinates();const r=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=r.slice(),this.sketchCoords_.push(r.slice()),this.sketchPoint_=new Pt(new ut(r)),this.updateSketchFeatures_(),this.dispatchEvent(new js(Fs.DRAWSTART,this.sketchFeature_))}updateSketchFeatures_(){const e=[];this.sketchFeature_&&e.push(this.sketchFeature_),this.sketchLine_&&e.push(this.sketchLine_),this.sketchPoint_&&e.push(this.sketchPoint_);const t=this.overlay_.getSource();t.clear(!0),t.addFeatures(e)}updateState_(){const e=this.getMap(),t=this.getActive();(!e||!t)&&this.abortDrawing(),this.overlay_.setMap(t?e:null)}}function yx(){const n=jg();return function(e,t){return n[e.getGeometry().getType()]}}function xx(n){switch(n){case"Point":case"MultiPoint":return"Point";case"LineString":case"MultiLineString":return"LineString";case"Polygon":case"MultiPolygon":return"Polygon";
12case"Circle":return"Circle";default:throw new Error("Invalid type: "+n)}}function bx({minZoomLevel:n=14,layerId:e="polygon",polygonStyle:t=null,className:i="size-fit disabled:cursor-not-allowed disabled:bg-brand1-200 cursor-pointer rounded-md bg-brand1-500 px-4 py-2 font-semibold text-white shadow-sm hover:bg-brand1-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand1-700",onPolygonDrawStart:r=()=>{},onPolygonDrawn:s=l=>{},onPolygonChanged:o=l=>{},children:a=null}){var l=Bo();const h=g=>{let f=l.do.getLayerById(e);typeof f>"u"&&l.do.addLayer(e),f=l.do.getLayerById(e),t!==null&&f.setStyle(t),d(),l.do.addModifyInteractionsToMap({layerId:e,onPolygonChanged:o})},d=()=>{const g=l.do.getLayerById(e).getSource(),f=new co({source:g,type:"Polygon",style:t||null,features:new He});l.instance.addInteraction(f),f.on("drawstart",function(m){if(r(),g.getFeatures().length>0){this.abortDrawing();return}}),f.on("drawend",m=>{const _=u();s(_),o(_)})},u=()=>{const g=l.instance.getLayers().getArray().find(_=>_ instanceof an).getSource().getFeatures(),f=l.instance.getInteractions().getArray().find(_=>_ instanceof co);let m;if(g.length===0&&f!==null)return m=f.sketchCoords_[0].map(_=>_),m.push(m[0]),m;if(g.length>0)return m=g[0].getGeometry().getCoordinates()[0],m};return c("button",{onClick:h,title:"Draw polygon",disabled:l.zoomLevel<n,className:i,children:a})}function Ex({className:n="disabled:cursor-not-allowed disabled:bg-brand1-200 cursor-pointer rounded-md bg-brand1-500 px-4 py-2 font-semibold text-white shadow-sm hover:bg-brand1-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand1-700",children:e=null}){const t=Bo();return c("button",{onClick:r=>{t.instance.getInteractions().getArray().find(o=>o instanceof co).removeLastPoint()},title:"Remove last point",className:n,children:e})}function Cx({className:n="disabled:cursor-not-allowed disabled:bg-brand1-200 cursor-pointer rounded-md bg-brand1-500 px-4 py-2 font-semibold text-white shadow-sm hover:bg-brand1-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand1-700",layerId:e="polygon",children:t=null,onMapReset:i=()=>{}}){const r=Bo(),s=l=>{o(),a(),r.do.removeLayer(e),i()},o=()=>{const h=r.instance.getInteractions().getArray().find(d=>d instanceof co);typeof h<"u"&&(h.abortDrawing(),r.instance.removeInteraction(h))},a=()=>{const l=r.do.getLayerById(e).getSource(),h=l.getFeatures();l.removeFeatures(h)};return c("button",{onClick:s,title:"Reset",className:n,children:t})}function kx({goTo:n}){const[e,t]=J(!0),[i,r]=J(!1),[s,o]=J(!1),[a,l]=J(null);le(()=>{var w=sessionStorage.getItem("bww_wkt");w!=null&&l(JSON.parse(w))},[]);const h=()=>{const w=new en({wrapX:!1});return new an({source:w,visible:!0,properties:{id:"1"}})},d=()=>{r(!0),o(!0),t(!1)},u=w=>{r(!1),l(w),_(w)},g=w=>{l(w),_(w)},f=()=>{t(!0),r(!1),o(!1),l(null),sessionStorage.removeItem("bww_wkt")},m=w=>{o(!0),l(w),_(w)},_=w=>{sessionStorage.setItem("bww_wkt",JSON.stringify(w))},p=({color:w="rgb(0, 161, 228)",circleColor:x="orange",width:y=3})=>[new $e({stroke:new ni({color:w,width:y}),fill:new gt({color:w.replace(")",", 0.1)")})}),new $e({image:new mn({radius:5,fill:new gt({color:x})}),geometry:function(b){const k=b.getGeometry(),R=k.getType(),T=k.getCoordinates();if(R==="Point")return new ut(T);if(R==="Polygon")return new Jn(T[0])}})],v=()=>{const w=new CustomEvent("rs_goTo",{detail:{goTo:n},bubbles:!0,cancelable:!0,composed:!1});window.dispatchEvent(w)};return c("section",{class:"block relative mb-8 md:mb-10 lg:mb-12",children:c("div",{class:"relative bg-white rounded-lg shadow-lg text-slate-800",children:[c("div",{class:"p-2",children:c(bf,{id:"chat-map-question",layers:[h()],className:"saturate-50",children:c("div",{class:"flex flex-col w-full h-150 relative",children:[c(wx,{onLocationFound:m}),c(Ef,{className:"relative grow",polygon:a,canModifyPolygon:!0,polygonStyle:p({color:"rgb(0, 161, 228)"}),onPolygonChanged:u}),c("div",{class:"items-center flex flex-row gap-2 px-3 h-14 w-full bg-slate-100",children:[e?c(bx,{polygonStyle:p({color:"rgb(0, 161, 228)"}),onPolygonChanged:u,onPolygonDrawStart:d,onPolygonDrawn:g,children:c(km,{className:"size-6 "})}):c(j,{}),i?c(Ex,{children:c(um,{className:"size-6 "})}):c(j,{}),s?c(Cx,{onMapReset:f,children:c(Rm,{className:"size-6 "})}):c(j,{})]})]})})}),a!==null?c("div",{class:"p-4 md:p-6 lg:p-8 text-right",children:c("button",{onClick:v,type:"button",class:"inline-flex items-center rounded border border-transparent bg-brand2-500 px-6 py-3 text-base font-bold text-white shadow-sm hover:bg-brand1-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",children:"Volgende"})}):""]})})}const jc=({extraClass:n="text-white"})=>c("svg",{class:"animate-spin -ml-1 mr-3 h-6 w-6 "+n,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[c("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),c("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});function Sx({goTo:n}){const[e,t]=J(!1),[i,r]=J(null),s=a=>
12{if(!Array.isArray(a)||a.length<3)throw new Error("Invalid polygon coordinate list");const l=p=>{if(!Array.isArray(p))throw new Error("Coordinate must be array");for(;Array.isArray(p[0]);)p=p[0];if(p.length<2)throw new Error("Coordinate missing values");const v=Number(p[0]),w=Number(p[1]);if(Number.isNaN(v)||Number.isNaN(w))throw new Error("Invalid coordinate numeric values");return[v,w]},h=a.map(l),[d,u]=h[0],[g,f]=h[h.length-1];return`POLYGON((${(d===g&&u===f?h:[...h,h[0]]).map(([p,v])=>`${p} ${v}`).join(", ")}))`};return c("section",{class:"block relative mb-8 md:mb-10 lg:mb-12",children:c("div",{class:"relative bg-white rounded-lg shadow-lg text-slate-800",children:c("form",{onSubmit:a=>{console.log(a),a.preventDefault(),t(!0);const l=s(JSON.parse(sessionStorage.getItem("bww_wkt")));var h=new FormData(a.target);h.append("wktShape",l);var d={};h.forEach((m,_)=>d[_]=m);var u=JSON.stringify(d);const g=new Headers;g.append("Content-Type","application/json");const f=localStorage.getItem("api_url")+"api/1/proposal/";fetch(f,{method:"POST",body:u,headers:g}).then(m=>{const _=new CustomEvent("rs_goTo",{detail:{goTo:n},bubbles:!0,cancelable:!0,composed:!1});window.dispatchEvent(_)}).catch(()=>{t(!1),r(!0)})},children:c("div",{class:"p-4 md:p-6 lg:p-8",children:[c("div",{class:"relative mb-4 md:mb-6 lg:mb-8",children:c("div",{class:"mt-10 grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-6",children:[c("div",{class:"sm:col-span-3 sm:col-start-1",children:[c("label",{for:"contactName",class:"block text-sm font-medium leading-6 text-gray-900",children:"Je naam *"}),c("div",{class:"mt-2",children:c("input",{type:"text",name:"contactName",id:"contactName",required:!0,autocomplete:"contactName",class:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-brand1-600 sm:text-sm sm:leading-6"})})]}),c("div",{class:"sm:col-span-3",children:[c("label",{for:"contactEmail",class:"block text-sm font-medium leading-6 text-gray-900",children:"E-mailadres *"}),c("div",{class:"mt-2",children:c("input",{id:"contactEmail",name:"contactEmail",type:"email",autocomplete:"contactEmail",required:!0,class:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-brand1-600 sm:text-sm sm:leading-6"})})]}),c("div",{class:"sm:col-span-3",children:[c("label",{for:"contactEmail",class:"block text-sm font-medium leading-6 text-gray-900",children:"Telefoonnummer *"}),c("div",{class:"mt-2",children:c("input",{id:"contactPhoneNumber",name:"contactPhoneNumber",type:"phone",autocomplete:"contactPhoneNumber",required:!0,class:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-brand1-600 sm:text-sm sm:leading-6"})})]}),c("div",{class:"sm:col-span-3",children:[c("label",{for:"organizationName",class:"block text-sm font-medium leading-6 text-gray-900",children:"Gemeente/Organisatie *"}),c("div",{class:"mt-2",children:c("input",{type:"text",name:"organizationName",required:!0,id:"organizationName",autocomplete:"organizationName",class:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-brand1-600 sm:text-sm sm:leading-6"})})]}),c("div",{class:"sm:col-span-3",children:[c("label",{for:"neighbourhoodName",class:"block text-sm font-medium leading-6 text-gray-900",children:"Buurtnaam *"}),c("div",{class:"mt-2",children:c("input",{id:"neighbourhoodName",name:"neighbourhoodName",type:"text",required:!0,autocomplete:"neighbourhoodName",class:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-brand1-600 sm:text-sm sm:leading-6",value:sessionStorage.getItem("bww_neighbourhoodName")})})]})]})}),c("div",{class:"mt-5 sm:mt-6 sm:grid sm:grid-cols-2 sm:gap-3 lg:gap-6 sm:grid-flow-row-dense",children:c("button",{type:"submit",class:"w-full inline-flex justify-center items-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-brand2-500 text-base font-bold text-white hover:bg-brand2-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-brand2-500 sm:col-start-2 sm:text-sm lg:text-lg",children:e?c(jc,{}):"Prijsindicatie aanvragen"})}),i==null?"":c("div",{class:"rounded-md bg-red-50 p-4 mt-4",children:c("div",{class:"flex",children:[c("div",{class:"flex-shrink-0",children:c("svg",{class:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:c("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z","clip-rule":"evenodd"})})}),c("div",{class:"ml-3",children:c("h3",{class:"text-sm font-medium text-red-800",children:"Oh nee! Er lijkt iets mis te gaan."})})]})})]})})})})}class Tx extends Ve{state={isSubmitting:!1};handleClick=(e,t)=>{e.preventDefault(),this.setState({isSubmitting:!0}),(typeof t>"u"||t==null||t.length==0)&&(t=this.props.goTo);const i=new CustomEvent("rs_goTo",{detail:{goTo:t,isInForEach:!1},bubbles:!0,cancelable:!0,composed:!1});window.dispatchEvent(i)};render({options:e}){return c("section",{class:"block relative mb-8 md:mb-10 lg:mb-12",children:c("div",{class:"relative bg-white rounded-lg shadow-lg text-slate-800",children:c("div",{class:"p-4 md:p-6 lg:p-8",children:c("div",{class:"sm:grid sm:grid-cols-2 sm:gap-3 lg:gap-6 sm:grid-flow-row-dense",children:e.map(t=>c("button",{type:"button",onClick:i=>this.handleClick(i,t.goTo),class:t.isPrimary?"my-2 w-full inline-flex justify-center items-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-brand2-500 text-base font-bold text-white hover:bg-brand2-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:col-start-2 sm:text-sm lg:text-lg cursor-pointer":"my-2 w-full inline-flex justify-center items-center rounded-md border border-brand1-500 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 lg:text-lg cursor-pointer",children:this.state.isSubmitting&&t.isPrimary?c(jc,{}):t.label}))})})})})}}const Rx={RadioChoise:Tx,WktQuestion:kx,ProposalQuestion:Sx};function Ix(n){const[e,t]=J(!0);e&&(t(!1),n.afterRender());const i=Rx[n.type];return c(i,{...n})}async function Mx(n,e,t){const i=new Headers;return fetch(e,{method:n,headers:i,body:t}).then(s=>s!=null&&typeof s<"u"?s.json():{}).catch(s=>console.log(s))}class Px extends Ve{state={messages:[],history:[],progress:0,isInBackButtonTimeout:!1,isRendering:!0,script:0,totalscriptLength:0,chapterName:""};ref=On();bar=On();container=On();compoments={ChatMessage:c_,Question:Ix};componentDidMount(){var e=this.props.list;this.loadQuestionList(e);var t=this;window.addEventListener("rs_goTo",function(i){t.goToFlowItem(i.detail.goTo)})}componentDidUpdate(){}scrollToBottom=()=>{var e=this.container.current;typeof e>"u"||this.script[this.state.script].content.length>1&&e.scrollTo({top:e.scrollHeight,left:0,behavior:"smooth"})};loadQuestionList=e=>{Mx("get","/assets/flows/"+e+".json?v=6").then(t=>{this.setState({progress:0,script:0,totalscriptLength:t.conversation.length},()=>{this.script=t.conversation;var i=sessionStorage.getItem("bww_questionlist");if(i!=null&&i==e){var r=sessionStorage.getItem("bww_questionlistHistory")?.split(",")??[];this.setState({history:r},()=>{r.length>1?this.goToFlowItem(r[r.length-1]):this.showNext()})}else sessionStorage.setItem("bww_questionlist",e),sessionStorage.setItem("bww_questionlistHistory",""),this.showNext()})})};goToFlowItem=e=>{if(this.ref?.current?.classList?.add("animate-disappear"),e.length==0)this.setState({messages:[],progress:0,script:0,history:[]},()=>{this.ref.current.classList.remove("animate-disappear"),this.bar.current.style.width="0%",this.storeProgress(0),this.showNext(),this.storeHistory()});else for(var t=0;t<this.script.length;t++){var i=this.script[t];if(i.id==e){var r=this.state.history;r.indexOf(e)==-1&&r.push(e),this.setState({messages:[],progress:0,script:t,history:r},()=>{this.ref.current.classList.remove("animate-disappear");var s=this.state.script/this.script.length*100;this.bar.current.style.width=s+"%",this.storeProgress(s),this.showNext(),this.storeHistory()})}}};storeHistory=()=>{sessionStorage.setItem("bww_questionlistHistory",this.state.history.join(","))};storeProgress=e=>{};onAfterItemRender=()=>{this.forceUpdate(),this.setState({progress:this.state.progress+1},()=>{setTimeout(this.showNext,1500),this.bar.current.style.width=(this.state.script/this.script.length+this.state.progress/this.script[this.state.script].content.length/this.script.length)*100+"%",this.scrollToBottom()})};onAfterItemRenderChatOrDisplay=()=>
12{if(this.forceUpdate(),this.setState({},()=>{this.bar.current.style.width=(this.state.script/this.script.length+this.state.progress/this.script[this.state.script].content.length/this.script.length)*100+"%"}),this.state.progress==this.script[this.state.script].content.length-1){this.setState({isRendering:!1});return}};showNext=()=>{var e=this.state.messages.slice(),t=this.script[this.state.script];e.push(t.content[this.state.progress]);var i=t.chapterName;if(t.chapter>0&&(i=t.chapter+". "+t.chapterName),this.setState({isRendering:!0,messages:e,chapterName:i}),this.state.progress==this.script[this.state.script].content.length){this.setState({isRendering:!1});return}};goBack=e=>{e.preventDefault(),!(this.state.isInBackButtonTimeout||this.state.isRendering)&&this.setState({isInBackButtonTimeout:!0},()=>{var t=this.state.history;if(t.pop(),t.length==0)this.setState({history:[],progress:0,messages:[],script:0},()=>{this.showNext(),this.storeHistory();var r=this;setTimeout(()=>{r.setState({isInBackButtonTimeout:!1})},350)});else{for(;t[t.length-1].startsWith("check")||t[t.length-1].startsWith("Check");)t.pop();this.setState({history:t},()=>{this.goToFlowItem(t[t.length-1]),this.storeHistory()});var i=this;setTimeout(()=>{i.setState({isInBackButtonTimeout:!1})},350)}})};render({showBarBottom:e=!1},{messages:t}){return c("div",{class:"w-full overflow-y-scroll text-base p-2 md:p-4 lg:p-8 @container rounded ",ref:this.container,children:[e?"":c("div",{class:"h-2 @md:h-3 @lg:h-4 bg-slate-200 sticky top-0 left-0 right-0 z-10",children:c("div",{ref:this.bar,style:"width: 0%;",class:"h-full transition-all bg-brand1-500"})}),c("div",{class:"px-4 @lg:px-4 pt-8 @lg:pt-16",children:[c("div",{ref:this.ref,class:"z-0 relative max-w-4xl mx-auto",children:[this.state.script>0&&this.state.totalscriptLength-this.state.script>1?c("div",{class:"mb-8 @md:mb-10 @lg:mb-12 text-right",children:c("a",{href:"#",class:"inline-flex items-center rounded-full border border-transparent text-slate-800 bg-slate-200 px-6 py-3 text-base font-bold hover:text-white shadow-sm hover:bg-brand1-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",onClick:this.goBack,children:[c("svg",{"clip-rule":"evenodd",class:"w-4 h-4 mr-1","fill-rule":"evenodd","stroke-linejoin":"round","stroke-miterlimit":"2",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:c("path",{class:"fill-current",d:"m18.787 9.473s-4.505-4.502-6.259-6.255c-.
12147-.146-.339-.22-.53-.22-.192 0-.384.074-.531.22-1.753 1.753-6.256 6.252-6.256 6.252-.147.147-.219.339-.217.532.001.19.075.38.221.525.292.293.766.295 1.056.004l4.977-4.976v14.692c0 .414.336.75.75.75.413 0 .75-.336.75-.75v-14.692l4.978 4.978c.289.29.762.287 1.055-.006.145-.145.219-.335.221-.525.002-.192-.07-.384-.215-.529z","fill-rule":"nonzero"})}),"Terug"]})}):"",t.map(i=>{if(typeof i<"u"){var r=this.compoments[i.display];return c(r,{...i.props,afterRender:i.display=="ChatMessage"?this.onAfterItemRender:this.onAfterItemRenderChatOrDisplay})}})]}),c("div",{ref:i=>{this.el=i}})]}),e?c("div",{class:"h-2 @md:h-3 @lg:h-4 bg-slate-200 sticky top-0 left-0 right-0 z-10 mt-16",children:c("div",{ref:this.bar,style:"width: 0%;",class:"h-full transition-all bg-brand1-500"})}):""]})}}function Lx(){return le(()=>{document.title="Vraag een prijsindicatie aan voor de BuurtWarmteWijzer"},[]),c("div",{class:"header relative bg-gray-900",children:c("div",{class:"timeline relative isolate overflow-hidden",children:[c("div",{"aria-hidden":"true",class:"absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80",children:c("div",{style:"clip-path: polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",class:"relative left-[calc(50%-11rem)] aspect-1155/678 w-144.5 -translate-x-1/2 rotate-30 bg-linear-to-tr from-bww-blue to-bww-blue opacity-10 sm:left-[calc(50%-30rem)] sm:w-288.75"})}),c("div",{class:"relative z-10 px-6 xl:px-0 xl:min-w-4xl lg:max-w-4xl mx-auto py-20 sm:py-28 lg:py-48",children:c("div",{class:" max-w-4xl mx-auto py-12 sm:py-18 lg:py-24",children:c("div",{class:"text-left",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-white sm:text-4xl flex items-start",children:[c("span",{class:"h-6 w-1.5 sm:h-8 sm:w-3 bg-bww-blue -skew-x-12 mr-3 mt-1 sm:mt-3.5"}),"Vraag een prijsindicatie aan"]}),c("div",{class:"bg-slate-100 rounded mt-6 overflow-hidden",children:c(Px,{list:"proposal"})})]})})}),c("div",{"aria-hidden":"true",class:"absolute inset-x-0 top-[calc(100%-13rem)] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[calc(100%-30rem)]",children:c("div",{style:"clip-path: polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",class:"relative left-[calc(50%+3rem)] aspect-1155/678 w-144.5 -translate-x-1/2 bg-linear-to-tr from-from-bww-blue to-bww-blue opacity-10 sm:left-[calc(50%+36rem)] sm:w-288.75"})})]})})}function Ax(){const[n,e]=J(!0);return c(j,{children:[c("button",{className:`flex items-center justify-center py-12 w-full cursor-pointer ${n?"active":""}`,onClick:()=>{e(i=>!i)},class:"flex items-center justify-between w-full p-5 font-medium rtl:text-right text-body rounded-t-base hover:text-heading hover:bg-neutral-secondary-medium gap-3",children:c("span",{class:"text-white border border-white/50 flex items-center justify-between py-3 px-4 transition-all rounded-md hover:bg-white/10",children:[c("span",{children:"Pakket BuurtWarmteWijzer"}),c("svg",{class:`w-5 h-5 shrink-0 ml-4 ${n?"rotate-180":" "}`,"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:c("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m5 15 7-7 7 7"})})]})}),c("div",{className:`px-4 lg:px-0 ${n?"hidden":"block"}`,children:c("div",{class:"block max-w-7xl m-auto pt-12 pb-32 text-white ",children:[c("div",{class:"max-w-4xl",children:[c("h2",{class:"text-4xl pb-4 font-bold",children:[c("span",{class:" text-bww-yellow",children:"Basispakket "}),"BuurtWarmteWijzer"]}),c("p",{class:"text-white sm:text-base",children:"Na de afname van een licentie kun je al snel starten met de BuurtWarmteWijzer. Deze licentie loopt per jaar en is in de vorm van een basispakket met daarbij de mogelijkheid deze aan te vullen met extra functionaliteiten en begeleidingsmogelijkheden. Je vindt de inhoud ervan hieronder op een rij."})]}),c("div",{class:"pt-16 grid grid-cols-1 lg:grid-cols-2 gap-16",children:[c("div",{children:[c("h5",{class:"text-bww-yellow font-bold pb-4 text-xl",children:"Functionaliteiten"}),c("div",{class:"mb-4 pb-4 border-b border-white/30",children:[c("p",{class:"font-bold pb-2",children:"Toegang gebruikers"}),c("p",{children:"Toegang tot de 9 stappen van het BWW-handboek en COLONY"})]}),c("div",{class:"mb-4 pb-4 border-b border-white/30",children:[c("p",{class:"font-bold pb-2",children:"Templates te gebruiken"}),c("p",{children:"O.a. gedetailleerde planning, posters in de buurt, e-mails aan stakeholders, startbrief bewoners"})]}),c("div",{class:"mb-4 pb-4 border-b border-white/30",children:[c("p",{class:"font-bold pb-2",children:"Logo weergave"}),c("p",{children:"Plaatsen van een eigen logo in het COLONY-model"})]}),c("div",{class:"mb-4 pb-4 border-b border-white/30",children:[c("p",{class:"font-bold pb-2",children:" Kaartlagen open data"}),c("p",{children:"O.a. gebouwkenmerken, energieverbruik, CO2-emissie, gasleidingen, Electra-kabels, monumenten"})]}),c("div",{class:"mb-4 pb-4 border-b border-white/30",children:[c("p",{class:"font-bold pb-2",children:"Data woningcorporaties"}),c("p",{children:" Aanduiding welke panden in eigendom van woningcorporaties en VvEâs zijn."})]}),c("div",{class:"mb-4 pb-4 border-b border-white/30",children:[c("p",{class:"font-bold pb-2",children:"Warmteverkenning"}),c("p",{children:" De resultaten van warmteverkenningen in COLONY (naast elkaar) kunnen weergeven"})]}),c("div",{class:"mb-4 pb-4 border-b border-white/30",children:[c("p",{class:"font-bold pb-2",children:" Data-export naar warmtenetsoftware"}),c("p",{children:"Exporteren van data ten behoeve van een warmtenet-ontwerp (GSD Heat, COMSOF heat, nPro)"})]}),c("div",{class:"mb-4 pb-4 border-b border-white/30",children:[c("p",{class:"font-bold pb-2",children:"Demo-omgeving app"}),c("p",{children:"Doorlopen BWW-app met werkgroep/energiecoaches vooraf aan toegang bewoners."})]}),c("div",{class:"mb-4 pb-4 border-b border-white/30",children:[c("p",{class:"font-bold pb-2",children:"Helpdesk bewoners voor werkgroep"}),c("p",{children:"Helpdesk in de BWW-app voor de bewoners om de werkgroep om hulp te vragen"})]})]}),c("div",{children:[c("h5",{class:"text-bww-yellow font-bold pb-4 text-xl",children:"Training, advies en begeleiding"}),c("div",{class:"mb-4 pb-4 border-b border-white/30",children:[c("p",{class:"font-bold pb-2",children:"Instructiesessie techniek-economie"}),c("p",{children:"Online sessie van 2-3 uur waarin de technische stappen van het handboek doorgenomen worden"})]}),c("div",{class:"mb-4 pb-4 border-b border-white/30",children:[c("p",{class:"font-bold pb-2",children:"Instructiesessie participatie-communicatie"}),c("p",{children:"Online sessie van 2-3 uur waarin de participatie stappen van het handboek doorgenomen worden"})]}),c("div",{class:"mb-4 pb-4 border-b border-white/30",children:[c("p",{class:"font-bold pb-2",children:"Cursus 'rekenen met de BuurtWarmteWijzer'"}),c("p",{children:"In een intensieve online sessie van 3 uur wordt je wegwijs gemaakt in het rekenmodel"})]}),c("div",{class:"mb-4 pb-4 border-b border-white/30",children:[c("p",{class:"font-bold pb-2",children:"Helpdesk BWW-app"}),c("p",{children:" helpdesk werkgroep over toepassing van de BWW-app (geen helpdesk voor vragen bewoners)"})]})]})]})]})})]})}function Dx(){const[n,e]=J(!0);return c(j,{children:[c("button",{className:`flex items-center justify-center py-12 w-full cursor-pointer ${n?"active":""}`,onClick:()=>{e(i=>!i)},class:" w-full p-5 font-medium rtl:text-right text-body rounded-t-base hover:text-heading hover:bg-neutral-secondary-medium gap-3",children:c("span",{class:"text-white border border-white/50 flex items-center justify-between py-3 px-4 transition-all rounded-md hover:bg-white/10",children:[c("span",{children:"De 3 tools van de BuurtWarmteWijzer"}),c("svg",{class:`w-5 h-5 shrink-0 ml-4 ${n?"rotate-180":" "}`,"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:c("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m5 15 7-7 7 7"})})]})}),c("div",{className:`text-white px-4 lg:px-0 ${n?"hidden":"block"}`,children:c("div",{class:"block max-w-7xl m-auto pt-12 pb-32",children:[c("div",{class:"max-w-4xl",children:c("h2",{class:"text-4xl pb-12 font-bold",children:["Van ingewikkeld naar",c("span",{class:" text-bww-yellow",children:" dui
12delijk "}),"met:"]})}),c("div",{class:"grid grid-cols-1 lg:grid-cols-2 gap-16",children:[c("div",{class:"order-1",children:[c("strong",{class:"block text-bww-yellow pb-4 text-xl",children:"Rekenmodel COLONY"}),c("p",{class:"pb-8",children:"Met publieke en persoonlijke data uit de BWW-app brengt COLONY de huidige buurt in beeld. Voor een aardgasvrije toekomst rekent het COLONY-model voor elk adres alle denkbare combinaties van isolatieniveau en warmtetechniek uit en zet ze op een rij. Ook brengt COLONY in beeld wat dat betekent voor collectieve voorzieningen zoals een warmtenet of het lokale elektriciteitsnet."})]}),c("div",{class:"order-2",children:c("img",{src:"/images/COLONY op laptop.jpg",class:"rounded-2xl overflow-hidden",alt:""})}),c("div",{class:"order-4 lg:order-3",children:c("img",{src:"/images/bww-app.png",class:"rounded-2xl overflow-hidden",alt:""})}),c("div",{class:"order-3 lg:order-4",children:[c("strong",{class:"block text-bww-yellow pb-4 text-xl",children:"De BWW-app"}),c("p",{class:"pb-8",children:"In een enthousiasmerende en begrijpelijke chatvorm nodigt de BWW-app de bewoner uit om de eigen woonsituatie aan te vullen. Later wordt de bewoner in de app meegenomen om te leren welke warmteoplossingen er voor zijn woning zijn en welke het beste bij zijn persoonlijke voorkeuren passen. Uiteindelijk vraagt de app de bewoner om de warmteoplossingen aan te geven die het best passen bij de eigen woning als bij de buurt."})]}),c("div",{class:"order-5",children:[c("strong",{class:"block text-bww-yellow pb-4 text-xl",children:"Het BWW-handboek"}),c("p",{class:"pb-8",children:["Het BuurtWarmteWijzer-handboek neemt de werkgroep stapsgewijs mee in het proces naar een Warmteplan. Het behandelt de technisch-economische verkenningen, de participatiemogelijkheden en de communicatie met de buurt. Het handboek geeft met zijn stappenplan de leden van de werkgroep een mooi overzicht wat er in welke volgorde staat te gebeuren en een houvast om geen zaken te vergeten.",c("br",{}),"In het BWW-handboek zijn allerlei handige voorbeelddocumenten te vinden zodat de werkgroep die niet geheel zelf hoeft te bedenken."]})]}),c("div",{class:"order-6",children:c("img",{src:"/images/handboek.png",class:"rounded-2xl overflow-hidden",alt:""})})]})]})})]})}function Ox(){const[n,e]=J(!0);return c(j,{children:[c("button",{className:`flex items-center justify-center py-12 w-full cursor-pointer ${n?"active":""}`,onClick:()=>{e(i=>!i)},class:"flex items-center justify-between w-full p-5 font-medium rtl:text-right text-body rounded-t-base hover:text-heading hover:bg-neutral-secondary-medium gap-3",children:c("span",{class:"text-white border border-white/50 flex items-center justify-between py-3 px-4 transition-all rounded-md hover:bg-white/10",children:[c("span",{children:"Algemene bepalingen"}),c("svg",{class:`w-5 h-5 shrink-0 ml-4 ${n?"rotate-180":" "}`,"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:c("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m5 15 7-7 7 7"})})]})}),c("div",{className:`text-white px-4 lg:px-0 ${n?"hidden":"block"}`,children:c("div",{class:" max-w-7xl m-auto pt-12 pb-32 grid grid-cols-1 lg:grid-cols-5 gap-16",children:[c("div",{class:"col-span-2",children:c("h2",{class:"text-4xl pb-12 font-bold",children:"Algemene bepalingen"})}),c("div",{class:"text-sm col-span-3",children:[c("strong",{children:"Product"}),c("p",{class:"pb-8",children:"Het product de BuurtWarmteWijzer is eigendom van TheEarlybirds b.v. De basis van de BuurtWarmteWijzer is initieel ontwikkeld in samenwerking met gedragswetenschappers van TNO, communicatie-experts van VONC en app-bouwer Ediso op basis van een subsidie van EZK. BuurtWarmteWijzer is tevens een handelsnaam van TheEarlybirds b.v."}),c("strong",{children:"âOpdrachtnemer"}),c("p",{class:"pb-8",children:["De opdrachtnemer van een opgave is:",c("br",{}),"TheEarlybirds b.v.",c("br",{}),"Bongapaed 9, 8736 JE Roodhuis",c("br",{}),"KvK 93206070",c("br",{}),"IBAN NL49REVO0602292980"]}),c("strong",{children:"âSamenwerking"}),c("p",{class:"pb-8",children:" Bij de mensen van BuurtWarmteWijzer is een flinke kennis en expertise opgebouwd in de warmtetransitie. Ook is er ruime expertise op het gebied van het bouwproces aanwezig. In elke opgave vinden we een goede samenwerking met de opdrachtgever van belang. We gaan er bij deze opgave vanuit dat de opdrachtgever actief bij het proces betrokken zal zijn en daar waar nodig zijn/ haar expertise zal inzetten."}),c("strong",{children:"âEigenaarschap"}),c("p",{class:"pb-8",children:"De producten zoals de modellen en de data, een eventuele presentatie of andere door de mensen van de BuurtWarmteWijzer geproduceerde documenten zullen eigend
12om zijn en blijven van de BuurtWarmteWijzer. Het staat opdrachtgever vrij van de producten gebruik te maken t.b.v. de eigen dienstverlening."}),c("strong",{children:"âBeschikbaarheid data "}),c("p",{class:"pb-8",children:"BuurtWarmteWijzer werkt met data. In het privacy statement van de BuurtWarmteWijzer gaan we in op het gebruik van deze data en hoe de BuurtWarmteWijzer met de data omgaat."}),c("strong",{children:"âAVG"}),c("p",{class:"pb-8",children:"Binnen de BuurtWarmteWijzer vindt verwerking van persoonsgegevens plaats. De BuurtWarmteWijzer gaat daar veilig mee om en handelt conform de geldende AVG-regels uit de Wet Persoonsgegevens en Geheimhouding. In de privacy statement staat in meer detail beschreven hoe de BuurtWarmteWijzer met de verwerking van persoonsgegevens omgaat."}),c("strong",{children:"âAanvang opdracht"}),c("p",{class:"pb-8",children:" Onze werkzaamheden zullen aanvang nemen na accordering van deze opdracht. Deze opdrachtverstrekking betreft zowel het inhoudelijke als het financiële deel van deze . De licentie gaat lopen zodra het BuurtWarmteWijzer=portaal beschikbaar is gesteld d.m.v. een inlog- mogelijkheid."}),c("strong",{children:"âContact"}),c("p",{class:"pb-8",children:" De projectleider van de opdrachtgever neemt zelf contact op voor het inplannen van instructiesessies of/en cursus. De opdrachtgever zorgt voor eventuele organisatie en aanwezigen van deze activiteiten; mensen van de BuurtWarmteWijzer zorgen voor de inhoudelijke invulling."}),c("strong",{children:"âHelpdesk"}),c("p",{class:"pb-8",children:"Vragen die bewoners hebben n.a.v. de BWW-app komen terecht bij de werkgroep en zullen door de werkgroep worden beantwoord. Vragen betrekking hebbende op de functionaliteit van de BWW kunnen aan TheEarlybirds worden gesteld via [email protected]."}),c("strong",{children:"âGeldigheid"}),c("p",{class:"pb-8",children:"Iedere aanbieding is geldig tot 60 dagen na ontvangst van de link óf tot de datum van prijswijzigingen van de producten of diensten."}),c("strong",{children:"âUurtarieven"}),c("p",{class:"pb-8",children:[" Uurtarieven waarmee in 2026 wordt gerekend zijn:",c("br",{}),"⪠senior adviseur: ⬠180,-",c("br",{}),"⪠medior adviseur / programmeur: ⬠135,-"]}),c("strong",{children:"âFacturering, betaling en toegang"}),c("p",{children:"Facturering voor het gebruik van producten vindt plaats na opdrachtverlening. Er wordt een betalingstermijn van 2 weken gehanteerd. Zodra de factuur is betaald zal toegang worden verschaft tot portaal, handboek en rekenmodel van de BuurtWarmteWijzer."}),c("p",{class:"pb-8",children:"Facturering van onderzoeken vindt in termijnen plaats. Termijnen zijn maximaal 1 maand groot en er wordt aan het begin van elke termijn gefactureerd. De eerste factuur zal bij de start van een onderzoek worden gefactureerd. Facturering van bestede uren zal naar rato plaatsvinden. Facturering van beperkt meerwerk en andere diensten zoals opleiding zal direct na afloop geschieden."}),c("strong",{children:"âAlgemene regelingen "}),c("p",{class:"pb-8",children:"Voor zover niets anders vermeld in deze offerte zijn op deze aanbieding de Algemene voorwaarden van de DNR 2011 (âRechtsverhouding opdrachtgever-architect, ingenieur en adviseur DNR 2011â) van toepassing. Op verzoek kan een exemplaar van de DNR 2011 worden toegezonden."}),c("strong",{children:"âWijzigingen"}),c("p",{class:"pb-8",children:"Wijzigingen in omvang of tijdspad of andere aspecten van de opgave die door opdrachtgever worden gevraagd, binden TheEarlybirds niet, tenzij deze door TheEarlybirds schriftelijk zijn aanvaard. Wijzigingen kunnen leiden tot extra werkzaamheden. Als er extra werkzaamheden, voor zover niet beschreven in deze offerte, voor de voortgang van het planproces noodzakelijk zijn, dan zullen TheEarlybirds daar vooraf melding en indien mogelijk een inschatting van maken en dienen door opdrachtgever en TheEarlybirds worden overeengekomen."}),c("strong",{children:"âBepalingen van financiële aard "}),c("p",{class:"pb-8",children:"Eventuele nationale prijsbeschikkingen omtrent BTW en/of overige kosten kunnen het geoffreerde bedrag tijdens het planproces doen wijzigen."})]})]})})]})}function Fx(n){const[e,t]=J(null),[i,r]=J(!1);le(()=>{document.title="Offerte / Prijsindicatie van de BuurtWarmteWijzer";const h=localStorage.getItem("api_url")+"api/1/proposal/"+n.id;fetch(h).then(d=>d.json()).then(d=>{t(d),d.status==404&&r(!0)}).catch(()=>{r(!0)})},[n.id]);const s=()=>{const h=e.proposal.wktShape.trim().replace(/^SRID=\d+;\s*/i,"").replace(/\s+/g," ");
12if(!/^polygon\s*\(/i.test(h))throw new Error("Not a WKT POLYGON");const d=h.match(/^polygon\s*\(\s*(.+)\s*\)\s*$/i);if(!d)throw new Error("Malformed POLYGON WKT");const u=d[1],g=[],f=/\(\s*([^\(\)]*?)\s*\)/g;let m;for(;(m=f.exec(u))!==null;)g.push(m[1]);if(g.length===0)throw new Error("No rings found in POLYGON");return g.map((p,v)=>{const x=p.split(",").map(y=>y.trim()).filter(Boolean).map((y,b)=>{const R=y.trim().split(/\s+/).map(Number),T=R[0],E=R[1];return!Number.isFinite(T)||!Number.isFinite(E)?(console.warn(`Invalid coordinate at ring ${v}, index ${b}:`,y),null):[T,E]}).filter(Boolean);if(x.length<4&&console.warn(`Ring ${v} has too few valid coordinates (found ${x.length}).`),x.length>=1){const[y,b]=x[0],[k,R]=x[x.length-1];(y!==k||b!==R)&&x.push([y,b])}return x})[0]},o=()=>{const h=new en({wrapX:!1});return new an({source:h,visible:!0,properties:{id:"1"}})},a=({color:h="rgb(0, 161, 228)",circleColor:d="orange",width:u=3})=>[new $e({stroke:new ni({color:h,width:u}),fill:new gt({color:h.replace(")",", 0.1)")})}),new $e({image:new mn({radius:5,fill:new gt({color:d})}),geometry:function(g){const f=g.getGeometry(),m=f.getType(),_=f.getCoordinates();if(m==="Point")return new ut(_);if(m==="Polygon")return new Jn(_[0])}})],l=h=>h.toLocaleString("nl-BL",{style:"currency",currency:"EUR"});return e==null?c("div",{class:"flex justify-center p-12",children:c(jc,{})}):i?c("div",{class:"flex justify-center p-12",children:c("p",{children:"Deze link is niet (meer) actief."})}):c(j,{children:[c("div",{class:"relative bg-bww-blue",children:[c("div",{class:"absolute inset-0 z-0",children:[c("video",{autoplay:!0,loop:!0,muted:!0,playsinline:!0,class:"absolute right-0 bottom-0",src:"/video/bg_1080.mp4"}),c("div",{class:"absolute inset-0 bg-linear-to-t from-bww-blue/0 to-gray-900/30"})]}),c("div",{class:"relative z-10 isolate px-6 pt-14 xl:px-0 xl:min-w-7xl lg:max-w-7xl mx-auto",children:c("div",{class:" max-w-2xl py-16 ",children:c("div",{class:"text-left",children:[c("h1",{class:"font-sans font-semibold text-5xl tracking-tight text-balance text-white sm:text-7xl",children:["Buurt",c("br",{class:"md:hidden"}),"Warmte",c("br",{class:"md:hidden"}),c("span",{class:"text-bww-yellow",children:"Wijzer"})]}),c("p",{class:"my-4 text-lg font-bold text-white sm:text-xl/8",children:"Met de BuurtWarmteWijzer maak je voor iedere inwoner en de hele buurt de weg vrij naar duurzame warmte."}),c("p",{class:"mt-8 text-lg font-medium text-white sm:text-md/8",children:"Eline en Arnold van de BuurtWarmteWijzer bieden je graag deze offerte aan."}),c("div",{class:"mt-8 flex",children:[c("div",{class:"w-20 h-20 rounded-full overflow-hidden",children:c("img",{src:"/images/eline.jpeg",class:"object-cover w-full h-full",alt:"eline"})}),c("div",{class:"w-20 h-20 rounded-full overflow-hidden ml-8",children:c("img",{src:"/images/arnold.jpeg",class:"object-cover w-full h-full",alt:"arnold"})})]})]})})})]}),c("div",{class:"py-32 px-4 lg:px-0 bg-white",children:c("div",{class:"max-w-4xl m-auto text-gray-900 text-xl",children:[c("h2",{class:"text-4xl text-bww-blue pb-8",children:["Beste ",c("span",{class:"font-bold",children:e.proposal.contactName}),","]}),c("p",{class:"pb-8",children:["Leuk dat je via onze website een offerte hebt aangevraagd en enthousiast bent geworden om de BuurtWarmteWijzer in te zetten voor de zoektocht naar duurzame warmte in de wijk ",e.proposal.neighbourhoodName,"!"]}),c("p",{class:"pb-8",children:"Met deze aanbieding schetsen we bondig het stappenplan van de inzet van de BuurtWarmteWijzer. Dit stappenplan wordt uitgebreid beschreven in het handboek van de BuurtWarmteWijzer die je kan gebruiken bij aanvang van dit project."}),c("p",{class:"pb-8",children:"We kijken ernaar uit om samen met je aan de slag te gaan!"}),c("img",{src:"/images/signature.png",class:"w-56",alt:""}),c("p",{class:"py-8 text-sm",children:"Arnold Burger | Partner namens TheEarlybirds"}),c("img",{src:"/svg/theEarlyBirds-logo.svg",class:"w-40",alt:"theEarlyBirds"})]})}),c("div",{class:"py-32 px-4 lg:px-0 bg-gray-900",children:c("div",{class:"max-w-4xl m-auto text-white text-xl",children:[c("h2",{class:"text-white text-4xl pb-8 font-bold",children:["De ",c("span",{class:" text-bww-yellow",children:"BuurtWarmteWijzer"})]}),c("p",{class:"pb-8",children:"De BuurtWarmteWijzer biedt een online en offline buurtaanpak om voor en door de buurtbewoners tot een gedragen warmteplan te komen. Die is gebaseerd op de best passende warmteoplossingen voor de buurtbewoners zelf én voor hun buurt als geheel. Een werkgroep die onder andere uit bewoners bestaat, is in de lead."}),c("p",{class:"pb-8",children:"De aanpak stelt de overwegingen van bewoners centraal. Ze krijgen een persoonlijk warmte-advies op basis van hun voorkeuren, woon- en leefsituatie. Voor elke woning worden alle reëel mogelijke warmteopties doorgerekend. Daarmee worden de kansen voor individuele en collectieve oplossingen inzichtelijk gemaakt."}),c("p",{class:"pb-8",children:"De BWW-app verleidt bewoners de publiek bekende gegevens over hun woningen te laten corrigeren en aanvullen. Bewoners krijgen daarmee zelf de eerste inzichten over hun energieverbruik & -besparingskansen terug. Een 'whatsapp conversatie' zorgt voor een begrijpelijke en motiverende gebruikerservaring van de BWW-app."}),c("p",{class:"pb-8",children:"Hoe beter de bewoner de BWW-app invult, des te beter sluit het advies aan o
12p zijn persoonlijke situatie. Iedere bewoner wordt per infrastructuur (gasnet, warmtenet, elektriciteitsnet en geen net) meegenomen in de aard van de warmteoplossingen. Op basis van zijn persoonlijke waardes worden de warmteoplossingen gepresenteerd en gevraagd zijn voorkeuren door te geven. De werkgroep kan zo bijvoorbeeld het draagvlak voor een warmtenet toetsen, een gerichte communicatiecampagne voeren, kennissessies houden en collectieve inkoopacties opstarten."}),c("p",{class:"pb-8",children:["De BuurtWarmteWijzer is een schaalbare aanpak, dat betekent dat de aanpak ook voor andere buurten ingezet kan worden. Meer informatie, veel gestelde vragen en antwoorden is te vinden op de ",c("a",{href:"https://kennisbank.buurtwarmtewijzer.nl",target:"_blank",rel:"noreferrer",class:"underline text-bww-yellow",children:"BuurtWarmteWijzer Kennisbank"})]}),c("div",{class:"mt-12 grid grid-cols-1 lg:grid-cols-3 gap-16",children:[c("p",{class:"col-span-1 text-base",children:["Kijk ",c("span",{class:"hidden lg:inline",children:"hiernaast"})," ",c("span",{class:"inline lg:hidden",children:"hieronder"})," naar het eerste van de drie ",c("span",{class:"text-bww-yellow",children:"filmpjes "}),"die gemaakt zijn om aan bewoners uit te leggen hoe de BuurtWarmteWijzer werkt."]}),c("div",{class:"col-span-2 aspect-video rounded-2xl overflow-hidden border-3 border-gray-800 shadow-xl shadow-white/10",children:c("iframe",{class:"w-full h-full",src:"https://www.youtube-nocookie.com/embed/MogslMaqiqs?autoplay=0&mute=1&rel=0"})})]})]})}),c("div",{class:"relative py-32 px-4 lg:px-0",children:[c("div",{class:"absolute inset-0 z-0",children:[c("img",{src:"/images/Van ingewikkeld naar duidelijk.JPG",class:"object-cover h-full w-full grayscale"}),c("div",{class:"absolute inset-0 bg-gray-900/90"})]}),c("div",{class:"max-w-7xl m-auto text-white text-xl z-10 relative",children:[c("h2",{class:"text-4xl pb-8 font-bold",children:["Aan de slag in ",c("span",{class:" text-bww-yellow",children:[" ",e.proposal.neighbourhoodName]})]}),c("div",{class:"grid grid-cols-1 lg:grid-cols-1 gap-16",children:[c("div",{children:c(bf,{id:"map",layers:[o()],className:"saturate-50",children:c("div",{class:"flex flex-col w-full h-150 relative",children:c(Ef,{className:"relative grow",polygon:s(),canModifyPolygon:!1,polygonStyle:a({color:"rgb(0, 161, 228)"})})})})}),c("div",{children:c("p",{class:"pb-8",children:[e.proposal.organizationName," heeft plannen voor het ontwikkelen van een warmteplan voor de wijk ",e.proposal.neighbourhoodName,". De wijk telt ",e.proposal.totalNumberOfObjects," verblijfsobjecten."]})})]})]})]}),c("div",{class:"timeline relative isolate overflow-hidden",children:[c("div",{class:"relative z-10 px-6 xl:px-0 xl:min-w-4xl lg:max-w-4xl mx-auto",children:c("div",{class:" max-w-4xl mx-auto py-12 sm:py-18 lg:py-24",children:[c("div",{class:"max-w-4xl text-left pb-12 lg:pb-18",children:[c("h2",{class:"text-4xl pb-4 font-bold",children:["Het ",c("span",{class:" text-bww-yellow",children:"BWW-stappenplan"})]}),c("p",{class:"text-white sm:text-base",children:"Hieronder volgen in het kort de processtappen van de BuurtWarmteWijzer."})]}),c("div",{class:"grid grid-cols-1 lg:grid-cols-1 gap-12",children:Uu.map((h,d)=>c("div",{class:"relative p-6 lg:p-8 lg:px-8 shadow-xl rounded-xl border-2 border-gray-800 bg-gray-800/90",children:[c("div",{class:"absolute -top-4 lg:top-8 lg:-left-8 -left-4 h-16 w-16 bg-bww-yellow border-4 border-gray-700 rounded-full flex items-center justify-center text-gray-700 text-2xl font-bold",children:d+1}),c("div",{class:"md:pl-6 pt-8 md:pt-0 text-gray-100",children:[c("div",{class:"text-xl md:text-2xl font-bold text-white block",children:[h.title," "]}),c("div",{class:"text-lg pt-2 block ",children:h.content})]})]}))}),c("div",{class:"max-w-4xl text-left py-12 lg:pt-18",children:[c("h2",{class:"font-sans font-semibold text-2xl tracking-tight text-balance text-white sm:text-4xl flex items-start",children:"Eindresultaat"}),c("p",{class:"text-white pt-6 sm:text-base",children:"Een technisch haalbaar én maatschappelijk gedragen warmteplan - klaar voor besluitvorming én uitvoering."})]})]})}),c("div",{"aria-hidden":"true",class:"absolute inset-x-0 top-[calc(100%-13rem)] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[calc(100%-30rem)]",children:c("div",{style:"clip-path: polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",class:"relative left-[calc(50%+3rem)] aspect-1155/678 w-144.5 -translate-x-1/2 bg-linear-to-tr from-from-bww-blue to-bww-blue opacity-10 sm:left-[calc(50%+36rem)] sm:w-288.75"})})]}),c("div",{class:"bg-black",children:c(Ax,{})}),c("div",{class:"relative py-32 px-4 lg:px-0",children:[c("div",{class:"absolute inset-0 z-0",children:[c("img",{src:"/images/COLONY op laptop.jpg",class:"object-cover h-full w-full grayscale"}),c("div",{class:"absolute inset-0 bg-gray-900/95"})]}),c("div",{class:"max-w-7xl m-auto text-white text-xl z-10 relative",children:[c("h2",{class:"text-4xl pb-16 font-bold",children:[c("span",{class:" text-bww-yellow",children:"Aanvullende"})," mogelijkheden: "]}),c("div",{class:"grid grid-cols-1 lg:grid-cols-2 gap-16",children:[c("div",{class:"order-1",children:[c("strong",{class:"block text-bww-yellow pb-4",children:"Berekening kosten warmtenet"}),c("p",{class:"pb-8",children:["Er is een speciale warmteverkenning in het COLONY-model opgenomen dat de prijsstelling voor de hoogste opbrengsten van een warmtenet kan berekenen. De data kunnen worden geëxporteerd en ingelezen in warmtenet-software zoals ",c("a",{href:"https://www.npro.energy/",target:"_blank",class:"underline",children:"nPro Energy"})," en ",c("a",{href:"https://www.thepeoplegroup.nl/software/gsd-heat/",target:"_blank",class:"underline",children:"GSD Heat"}),". M.b.v. deze software kan snel een ontwerp van het warmtenet worden gemaakt en de kosten ervan worden bepaald. Daarmee ontstaat een volledige business case. We kunnen één van onze partners hier een offerte voor laten doen."]})]}),c("div",{class:"order-2",children:c("img",{src:"/images/aanvullnde-mogelijkheden-1.jpeg",class:"rounded-2xl overflow-hidden",alt:""})}),c("div",{class:"order-4 lg:order-3",children:c("img",{src:"/images/aanvullnde-mogelijkheden-2.jpeg",class:"rounded-2xl overflow-hidden",alt:""})}),c("div",{class:"order-3 lg:order-4",children:[c("strong",{class:"block text-bww-yellow pb-4",children:"Procesbegeleiding"}),c("p",{class:"pb-8",children:["Er kan behoefte zijn om de werkgroep te begeleiden d.m.v. specifieke trainingen, expert-advies op het gebied van techniek-economie of project management. Dan proberen we daar in overleg invulling aan te geven en zetten graag onze ",c("a",{href:"https://www.buurtwarmtewijzer.nl/partners",class:"text-bww-yellow underline",target:"_blank",children:"BWW-partners"})," voor u in."]})]}),c("div",{class:"order-5",children:[c("strong",{class:"block text-bww-yellow pb-4",children:"Techniek-expertadvies"}),c("p",{class:"pb-8",children:"Het kan soms handig zijn om wat extra ondersteuning te krijgen van een expert op het gebied van techniek-economie. Dat kan op aanvraag. Het is ook mogelijk om op voorhand een post met verrekenbare experttijd beschikbaar te stellen aan de werkgroep, zodat die de expert kan inschakelen wanneer dat de werkgroep een stap verder kan helpen."})]}),c("div",{class:"order-6",children:c("img",{src:"/images/aanvullnde-mogelijkheden-3.png",class:"rounded-2xl overflow-hidden",alt:""})})]})]})]}),c("div",{class:"bg-black",children:c(Dx,{})}),c("div",{class:"py-32 px-4 lg:px-0 bg-white",children:c("div",{class:"max-w-4xl m-auto text-gray-900 text-xl",children:[c("h2",{class:"text-4xl text-bww-blue pb-8",children:c("span",{class:"font-bold",children:"Kostenplan"})}),c("p",{class:"",children:"In onderstaand overzicht vind je een overzicht van de door ons ingeschatte kosten voor het werken met de BuurtWarmteWijzer. Bij deze kostenopstelling zijn we uitgegaan van een traject van 1 jaar. De licentie is per jaar te verlengen."}),c("div",{class:"mt-12 relative overflow-x-auto bg-neutral-primary-soft shadow-xs rounded-xl overflow-hidden border border-default border-gray-200",children:[c("caption",{class:"w-full items-center flex justify-between bg-bww-blue text-white p-5 text-lg font-medium text-left rtl:text-right text-heading",children:c("p",{children:"BuurtWarmteWijzer"})}),c("table",{class:"w-full text-sm text-left rtl:text-right text-body",children:[c("thead",{class:"text-sm text-body bg-neutral-secondary-medium border-b border-t border-default-medium border-gray-200",children:c("tr",{class:"",children:[c("th",{scope:"col",class:"px-6 py-3 font-medium",children:"Omschrijving"}),c("th",{scope:"col",class:"px-6 py-3 font-medium text-right",children:"Onderdeel"}),c("th",{scope:"col",class:"px-6 py-3 font-medium text-right",children:"Aantal"}),c("th",{scope:"col",class:"px-6 py-3 font-medium text-right",children:"Prijs"})]})}),c("tbody",{class:"text-sm p-4",children:[c("tr",{class:"bg-neutral-primary-soft border-b border-default border-gray-200",children:[c("td",{scope:"row",class:"px-6 py-4 font-medium text-heading whitespace-nowrap",children:c("strong",{children:"Eenmalige kosten"})}),c("td",{class:"px-6 py-4"}),c("td",{class:"px-6 py-4"}),c("td",{class:"px-6 py-4"})]}),e.items.filter(h=>h.amountType=="OneOff"&&h.isOptional===!1).map(h=>c("tr",{class:"bg-neutral-primary-soft border-b border-default border-gray-200",children:[c("td",{class:"px-6 py-4",children:h.description}),c("td",{class:"px-6 py-4 text-right",children:l(h.amountInEur)}),c("td",{class:"px-6 py-4 text-right",children:"1 buurt"}),c("td",{class:"px-6 py-4 text-right",children:l(h.amountInEur)})]})),c("tr",{class:"bg-neutral-primary-soft border-b border-default border-gray-200",children:[c("td",{class:"px-6 py-4",children:c("strong",{children:"Licentiekosten per jaar"})}),c("td",{class:"px-6 py-4"}),c("td",{class:"px-6 py-4"}),c("td",{class:"px-6 py-4"})]}),e.items.filter(h=>h.amountType=="PerYear"&&h.isOptional===!1).map(h=>c("tr",{class:"bg-neutral-primary-soft border-b border-default border-gray-200",children:[c("td",{class:"px-6 py-4",children:h.description}),c("td",{class:"px-6 py-4 text-right",children:l(h.amountInEur)}),c("td",{class:"px-6 py-4 text-right",children:"1 jaar"}),c("td",{class:"px-6 py-4 text-right",children:l(h.amountInEur)})]})),c("tr",{class:"bg-neutral-primary-soft border-b border-default border-gray-200",children:[c("td",{class:"px-6 py-4",children:[c("p",{children:" Op aanvraag:"}),c("p",{children:"- Ontwerp warmtenet en kostenraming"}),c("p",{children:"- Participatie en communicatieplan"}),c("p",{children:"- Communicatie-expertadvies"}),c("p",{children:"- Techniek-expertadvies"})]}),c("td",{class:"px-6 py-4"}),c("td",{class:"px-6 py-4"}),c("td",{class:"px-6 py-4"})]})]})]})]}),c("div",{class:"max-w-xl m-auto bg-bww-blue rounded-2xl p-8 mt-16 text-base",children:[c("div",{class:"flex justify-between text-white mb-8",children:[c("p",{children:"Totaal excl. BTW"}),c("p",{children:l(e.items.map(h=>h.amountInEur).reduce((h,d)=>h+d))})]}),c("div",{class:"flex justify-between text-white mb-8",children:[c("p",{children:"BTW"}),c("p",{children:l(e.items.map(h=>h.amountInEur).reduce((h,d)=>h+d)*.21)})]}),c("div",{class:"flex justify-between text-white",children:[c("p",{class:"font-bold",children:"Totaal"}),c("p",{children:l(e.items.map(h=>h.amountInEur).reduce((h,d)=>h+d)*1.21)})]})]})]})}),c("div",{class:"text-center py-32",children:[c("h2",{class:"text-white text-4xl font-bold mb-12",children:"Klaar om te starten?"}),c("a",{href:`mailto:[email protected]?subject=Ik%20accepteer%20hierbij%20de%20BWW%20offerte%20voor%20${e.proposal.neighbourhoodName}&body=Beste%20Arnold%2C%0A%0AIk%20accepteer%20hierbij%20de%20BWW%20offerte%20(%23${e.proposal.id})%20voor%20${e.proposal.neighbourhoodName}.`,class:"text-center rounded-md bg-bww-yellow hover:bg-bww-yellow/90 px-5.5 py-3.5 text-xl lg:text-2xl font-semibold text-black shadow-xs focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bww-yellow",children:"Accepteren"})]}),c("div",{class:"bg-black",children:c(Ox,{})}),c("div",{class:"relative py-32 px-4 lg:px-0",children:[c("div",{class:"absolute inset-0 z-0",children:[c("img",{src:"/images/contact.jpeg",class:"object-cover h-full w-full grayscale"}),c("div",{class:"absolute inset-0 bg-gray-900/90"})]}),c("div",{class:"max-w-7xl m-auto text-white text-xl z-10 relative",children:[c("h2",{class:"text-4xl pb-8 font-bold",children:"Contactgegevens"}),c("div",{class:"grid grid-cols-1 lg:grid-cols-2 gap-16",children:[c("div",{children:[c("p",{class:"text-xl mb-4",children:"Werk met ons mee aan een duurzame leefomgeving."}),c("p",{class:"text-base mb-4",children:"We helpen je graag vooruit."}),c("p",{class:"text-base",children:["Heb je nog vragen? Kijk dan op de BuurtWarmteWijzer ",c("a",{href:"https://kennisbank.buurtwarmtewijzer.nl/",class:"text-bww-yellow underline",children:"Kennisbank"})," of neem ",c("a",{href:"mailto:[email protected]",class:"text-bww-yellow underline",children:"contact"})," met ons op. Wij beantwoorden jouw vragen binnen 2 werkdagen."]})]}),c("div",{children:[c("div",{class:"flex items-center mb-8",children:[c("div",{class:"w-20 h-20 rounded-full overflow-hidden",children:c("img",{src:"/images/eline.jpeg",class:"object-cover w-full h-full",alt:"arnold"})}),c("div",{class:"ml-4",children:[c("span",{class:"flex items-center",children:[c(Ua,{class:"w-4 mr-3"}),c("a",{href:"mailto:[email protected]",children:"[email protected]"})]}),c("span",{class:"flex items-center",children:[c(Ya,{class:"w-4 mr-3"}),c("a",{href:"tel:+316 31 085 184",children:"+316 31 085 184"})]})]})]}),c("div",{class:"flex items-center mb-8",children:[c("div",{class:"w-20 h-20 rounded-full overflow-hidden",children:c("img",{src:"/images/arnold.jpeg",class:"object-cover w-full h-full",alt:"arnold"})}),c("div",{class:"ml-4",children:[c("span",{class:"flex items-center",children:[c(Ua,{class:"w-4 mr-3"}),c("a",{href:"mailto:[email protected]",children:"[email protected]"})]}),c("span",{class:"flex items-center",children:[c(Ya,{class:"w-4 mr-3"}),c("a",{href:"tel:+316 55 710 150",children:"+316 55 710 150"})]})]})]}),c("div",{class:"text-sm flex items-center",children:[c("a",{href:"https://www.buurtwarmtewijzer.nl/home",target:"_blank",class:"mr-2 hover:text-bww-yellow",children:"Website"}),c("span",{class:" block",children:"|"}),c("a",{href:"https://www.linkedin.com/company/buurtwarmtewijzer/",target:"_blank",class:"ml-2 hover:text-bww-yellow",children:"LinkedIn"})]})]})]})]})]})]})}function Cf(){const[n,e]=J(!0);le(()=>{typeof window<"u"&&t()?localStorage.setItem("api_url","https://localhost:7286/"):localStorage.setItem("api_url","/"),sessionStorage.setItem("bww_chatimage","/images/eline.jpg"),i(window?.location?.pathname)},[]);const t=()=>{const r=window.location.hostname;
12return r==="localhost"||r==="127.0.0.1"||r==="[::1]"},i=r=>{r.indexOf("/offerte/")===0?e(!1):e(!0)};return c(Kr,{children:[n?c(z0,{}):"",c("main",{children:c(Kd,{onRouteChange:i,children:[c(Wi,{path:"/",component:W0}),c(Wi,{path:"/hoe-werkt-het",component:t_}),c(Wi,{path:"/partners",component:r_}),c(Wi,{path:"/webinars",component:s_}),c(Wi,{path:"/prijsindicatie-aanvragen",component:Lx}),c(Wi,{path:"/offerte/:id",component:Fx}),c(Wi,{default:!0,component:o_})]})}),c(Pm,{})]})}typeof window<"u"&&Kf(c(Cf,{}),document.getElementById("app"));async function Bx(n){return await Zf(c(Cf,{...n}))}export{Cf as App,j as S,$a as W,F as k,K as l,Bx as prerender};
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.