@opensystemslab/map 0.5.8 → 0.5.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,23 +2,23 @@
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const Gi=window,hl=Gi.ShadowRoot&&(Gi.ShadyCSS===void 0||Gi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ul=Symbol(),wd=new WeakMap;class Md{constructor(t,e,n){if(this._$cssResult$=!0,n!==ul)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(hl&&t===void 0){const n=e!==void 0&&e.length===1;n&&(t=wd.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&wd.set(e,t))}return t}toString(){return this.cssText}}const Ss=i=>new Md(typeof i=="string"?i:i+"",void 0,ul),zp=(i,...t)=>{const e=i.length===1?i[0]:t.reduce((n,r,o)=>n+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[o+1],i[0]);return new Md(e,i,ul)},Rp=(i,t)=>{hl?i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const n=document.createElement("style"),r=Gi.litNonce;r!==void 0&&n.setAttribute("nonce",r),n.textContent=e.cssText,i.appendChild(n)})},Ed=hl?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return Ss(e)})(i):i;/**
5
+ */const Gi=window,hl=Gi.ShadowRoot&&(Gi.ShadyCSS===void 0||Gi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ul=Symbol(),wd=new WeakMap;class Ed{constructor(t,e,n){if(this._$cssResult$=!0,n!==ul)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(hl&&t===void 0){const n=e!==void 0&&e.length===1;n&&(t=wd.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&wd.set(e,t))}return t}toString(){return this.cssText}}const Cs=i=>new Ed(typeof i=="string"?i:i+"",void 0,ul),Tp=(i,...t)=>{const e=i.length===1?i[0]:t.reduce((n,r,o)=>n+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[o+1],i[0]);return new Ed(e,i,ul)},zp=(i,t)=>{hl?i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const n=document.createElement("style"),r=Gi.litNonce;r!==void 0&&n.setAttribute("nonce",r),n.textContent=e.cssText,i.appendChild(n)})},Md=hl?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return Cs(e)})(i):i;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */var dl;const Ts=window,Cd=Ts.trustedTypes,Ip=Cd?Cd.emptyScript:"",Sd=Ts.reactiveElementPolyfillSupport,cl={toAttribute(i,t){switch(t){case Boolean:i=i?Ip:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},Td=(i,t)=>t!==i&&(t==t||i==i),fl={attribute:!0,type:String,converter:cl,reflect:!1,hasChanged:Td};class cr extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;(e=this.h)!==null&&e!==void 0||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,n)=>{const r=this._$Ep(n,e);r!==void 0&&(this._$Ev.set(r,n),t.push(r))}),t}static createProperty(t,e=fl){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const n=typeof t=="symbol"?Symbol():"__"+t,r=this.getPropertyDescriptor(t,n,e);r!==void 0&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){return{get(){return this[e]},set(r){const o=this[t];this[e]=r,this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||fl}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,n=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const r of n)this.createProperty(r,e[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const r of n)e.unshift(Ed(r))}else t!==void 0&&e.push(Ed(t));return e}static _$Ep(t,e){const n=e.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,n;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((n=t.hostConnected)===null||n===void 0||n.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Rp(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var n;return(n=e.hostConnected)===null||n===void 0?void 0:n.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var n;return(n=e.hostDisconnected)===null||n===void 0?void 0:n.call(e)})}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$EO(t,e,n=fl){var r;const o=this.constructor._$Ep(t,n);if(o!==void 0&&n.reflect===!0){const s=(((r=n.converter)===null||r===void 0?void 0:r.toAttribute)!==void 0?n.converter:cl).toAttribute(e,n.type);this._$El=t,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$El=null}}_$AK(t,e){var n;const r=this.constructor,o=r._$Ev.get(t);if(o!==void 0&&this._$El!==o){const s=r.getPropertyOptions(o),a=typeof s.converter=="function"?{fromAttribute:s.converter}:((n=s.converter)===null||n===void 0?void 0:n.fromAttribute)!==void 0?s.converter:cl;this._$El=o,this[o]=a.fromAttribute(e,s.type),this._$El=null}}requestUpdate(t,e,n){let r=!0;t!==void 0&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||Td)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),n.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,n))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((r,o)=>this[o]=r),this._$Ei=void 0);let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),(t=this._$ES)===null||t===void 0||t.forEach(r=>{var o;return(o=r.hostUpdate)===null||o===void 0?void 0:o.call(r)}),this.update(n)):this._$Ek()}catch(r){throw e=!1,this._$Ek(),r}e&&this._$AE(n)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(n=>{var r;return(r=n.hostUpdated)===null||r===void 0?void 0:r.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,n)=>this._$EO(n,this[n],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}cr.finalized=!0,cr.elementProperties=new Map,cr.elementStyles=[],cr.shadowRootOptions={mode:"open"},Sd==null||Sd({ReactiveElement:cr}),((dl=Ts.reactiveElementVersions)!==null&&dl!==void 0?dl:Ts.reactiveElementVersions=[]).push("1.4.1");/**
9
+ */var dl;const Ss=window,Cd=Ss.trustedTypes,Ip=Cd?Cd.emptyScript:"",Sd=Ss.reactiveElementPolyfillSupport,cl={toAttribute(i,t){switch(t){case Boolean:i=i?Ip:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},Td=(i,t)=>t!==i&&(t==t||i==i),fl={attribute:!0,type:String,converter:cl,reflect:!1,hasChanged:Td};class cr extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;(e=this.h)!==null&&e!==void 0||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,n)=>{const r=this._$Ep(n,e);r!==void 0&&(this._$Ev.set(r,n),t.push(r))}),t}static createProperty(t,e=fl){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const n=typeof t=="symbol"?Symbol():"__"+t,r=this.getPropertyDescriptor(t,n,e);r!==void 0&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){return{get(){return this[e]},set(r){const o=this[t];this[e]=r,this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||fl}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,n=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const r of n)this.createProperty(r,e[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const r of n)e.unshift(Md(r))}else t!==void 0&&e.push(Md(t));return e}static _$Ep(t,e){const n=e.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,n;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((n=t.hostConnected)===null||n===void 0||n.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return zp(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var n;return(n=e.hostConnected)===null||n===void 0?void 0:n.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var n;return(n=e.hostDisconnected)===null||n===void 0?void 0:n.call(e)})}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$EO(t,e,n=fl){var r;const o=this.constructor._$Ep(t,n);if(o!==void 0&&n.reflect===!0){const s=(((r=n.converter)===null||r===void 0?void 0:r.toAttribute)!==void 0?n.converter:cl).toAttribute(e,n.type);this._$El=t,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$El=null}}_$AK(t,e){var n;const r=this.constructor,o=r._$Ev.get(t);if(o!==void 0&&this._$El!==o){const s=r.getPropertyOptions(o),a=typeof s.converter=="function"?{fromAttribute:s.converter}:((n=s.converter)===null||n===void 0?void 0:n.fromAttribute)!==void 0?s.converter:cl;this._$El=o,this[o]=a.fromAttribute(e,s.type),this._$El=null}}requestUpdate(t,e,n){let r=!0;t!==void 0&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||Td)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),n.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,n))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((r,o)=>this[o]=r),this._$Ei=void 0);let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),(t=this._$ES)===null||t===void 0||t.forEach(r=>{var o;return(o=r.hostUpdate)===null||o===void 0?void 0:o.call(r)}),this.update(n)):this._$Ek()}catch(r){throw e=!1,this._$Ek(),r}e&&this._$AE(n)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(n=>{var r;return(r=n.hostUpdated)===null||r===void 0?void 0:r.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,n)=>this._$EO(n,this[n],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}cr.finalized=!0,cr.elementProperties=new Map,cr.elementStyles=[],cr.shadowRootOptions={mode:"open"},Sd==null||Sd({ReactiveElement:cr}),((dl=Ss.reactiveElementVersions)!==null&&dl!==void 0?dl:Ss.reactiveElementVersions=[]).push("1.4.1");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */var gl;const zs=window,fr=zs.trustedTypes,zd=fr?fr.createPolicy("lit-html",{createHTML:i=>i}):void 0,ji=`lit$${(Math.random()+"").slice(9)}$`,Rd="?"+ji,Pp=`<${Rd}>`,gr=document,ho=(i="")=>gr.createComment(i),uo=i=>i===null||typeof i!="object"&&typeof i!="function",Id=Array.isArray,Ap=i=>Id(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",co=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Pd=/-->/g,Ad=/>/g,In=RegExp(`>|[
13
+ */var gl;const Ts=window,fr=Ts.trustedTypes,zd=fr?fr.createPolicy("lit-html",{createHTML:i=>i}):void 0,ji=`lit$${(Math.random()+"").slice(9)}$`,Id="?"+ji,Rp=`<${Id}>`,gr=document,lo=(i="")=>gr.createComment(i),ho=i=>i===null||typeof i!="object"&&typeof i!="function",Rd=Array.isArray,Pp=i=>Rd(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",uo=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Pd=/-->/g,Ad=/>/g,Rn=RegExp(`>|[
14
14
  \f\r](?:([^\\s"'>=/]+)([
15
15
  \f\r]*=[
16
16
  \f\r]*(?:[^
17
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Dd=/'/g,Ld=/"/g,Fd=/^(?:script|style|textarea|title)$/i,Dp=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),Bi=Dp(1),mr=Symbol.for("lit-noChange"),ie=Symbol.for("lit-nothing"),Od=new WeakMap,Lp=(i,t,e)=>{var n,r;const o=(n=e==null?void 0:e.renderBefore)!==null&&n!==void 0?n:t;let s=o._$litPart$;if(s===void 0){const a=(r=e==null?void 0:e.renderBefore)!==null&&r!==void 0?r:null;o._$litPart$=s=new go(t.insertBefore(ho(),a),a,void 0,e!=null?e:{})}return s._$AI(i),s},pr=gr.createTreeWalker(gr,129,null,!1),Fp=(i,t)=>{const e=i.length-1,n=[];let r,o=t===2?"<svg>":"",s=co;for(let l=0;l<e;l++){const h=i[l];let u,d,c=-1,f=0;for(;f<h.length&&(s.lastIndex=f,d=s.exec(h),d!==null);)f=s.lastIndex,s===co?d[1]==="!--"?s=Pd:d[1]!==void 0?s=Ad:d[2]!==void 0?(Fd.test(d[2])&&(r=RegExp("</"+d[2],"g")),s=In):d[3]!==void 0&&(s=In):s===In?d[0]===">"?(s=r!=null?r:co,c=-1):d[1]===void 0?c=-2:(c=s.lastIndex-d[2].length,u=d[1],s=d[3]===void 0?In:d[3]==='"'?Ld:Dd):s===Ld||s===Dd?s=In:s===Pd||s===Ad?s=co:(s=In,r=void 0);const g=s===In&&i[l+1].startsWith("/>")?" ":"";o+=s===co?h+Pp:c>=0?(n.push(u),h.slice(0,c)+"$lit$"+h.slice(c)+ji+g):h+ji+(c===-2?(n.push(void 0),l):g)}const a=o+(i[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return[zd!==void 0?zd.createHTML(a):a,n]};class fo{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let o=0,s=0;const a=t.length-1,l=this.parts,[h,u]=Fp(t,e);if(this.el=fo.createElement(h,n),pr.currentNode=this.el.content,e===2){const d=this.el.content,c=d.firstChild;c.remove(),d.append(...c.childNodes)}for(;(r=pr.nextNode())!==null&&l.length<a;){if(r.nodeType===1){if(r.hasAttributes()){const d=[];for(const c of r.getAttributeNames())if(c.endsWith("$lit$")||c.startsWith(ji)){const f=u[s++];if(d.push(c),f!==void 0){const g=r.getAttribute(f.toLowerCase()+"$lit$").split(ji),m=/([.?@])?(.*)/.exec(f);l.push({type:1,index:o,name:m[2],strings:g,ctor:m[1]==="."?Np:m[1]==="?"?jp:m[1]==="@"?Bp:Rs})}else l.push({type:6,index:o})}for(const c of d)r.removeAttribute(c)}if(Fd.test(r.tagName)){const d=r.textContent.split(ji),c=d.length-1;if(c>0){r.textContent=fr?fr.emptyScript:"";for(let f=0;f<c;f++)r.append(d[f],ho()),pr.nextNode(),l.push({type:2,index:++o});r.append(d[c],ho())}}}else if(r.nodeType===8)if(r.data===Rd)l.push({type:2,index:o});else{let d=-1;for(;(d=r.data.indexOf(ji,d+1))!==-1;)l.push({type:7,index:o}),d+=ji.length-1}o++}}static createElement(t,e){const n=gr.createElement("template");return n.innerHTML=t,n}}function vr(i,t,e=i,n){var r,o,s,a;if(t===mr)return t;let l=n!==void 0?(r=e._$Cl)===null||r===void 0?void 0:r[n]:e._$Cu;const h=uo(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((o=l==null?void 0:l._$AO)===null||o===void 0||o.call(l,!1),h===void 0?l=void 0:(l=new h(i),l._$AT(i,e,n)),n!==void 0?((s=(a=e)._$Cl)!==null&&s!==void 0?s:a._$Cl=[])[n]=l:e._$Cu=l),l!==void 0&&(t=vr(i,l._$AS(i,t.values),l,n)),t}class Op{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:n},parts:r}=this._$AD,o=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:gr).importNode(n,!0);pr.currentNode=o;let s=pr.nextNode(),a=0,l=0,h=r[0];for(;h!==void 0;){if(a===h.index){let u;h.type===2?u=new go(s,s.nextSibling,this,t):h.type===1?u=new h.ctor(s,h.name,h.strings,this,t):h.type===6&&(u=new Up(s,this,t)),this.v.push(u),h=r[++l]}a!==(h==null?void 0:h.index)&&(s=pr.nextNode(),a++)}return o}m(t){let e=0;for(const n of this.v)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class go{constructor(t,e,n,r){var o;this.type=2,this._$AH=ie,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$C_=(o=r==null?void 0:r.isConnected)===null||o===void 0||o}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$C_}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=vr(this,t,e),uo(t)?t===ie||t==null||t===""?(this._$AH!==ie&&this._$AR(),this._$AH=ie):t!==this._$AH&&t!==mr&&this.$(t):t._$litType$!==void 0?this.T(t):t.nodeType!==void 0?this.k(t):Ap(t)?this.O(t):this.$(t)}S(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}$(t){this._$AH!==ie&&uo(this._$AH)?this._$AA.nextSibling.data=t:this.k(gr.createTextNode(t)),this._$AH=t}T(t){var e;const{values:n,_$litType$:r}=t,o=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=fo.createElement(r.h,this.options)),r);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===o)this._$AH.m(n);else{const s=new Op(o,this),a=s.p(this.options);s.m(n),this.k(a),this._$AH=s}}_$AC(t){let e=Od.get(t.strings);return e===void 0&&Od.set(t.strings,e=new fo(t)),e}O(t){Id(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const o of t)r===e.length?e.push(n=new go(this.S(ho()),this.S(ho()),this,this.options)):n=e[r],n._$AI(o),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var n;for((n=this._$AP)===null||n===void 0||n.call(this,!1,!0,e);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$C_=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class Rs{constructor(t,e,n,r,o){this.type=1,this._$AH=ie,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=ie}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,r){const o=this.strings;let s=!1;if(o===void 0)t=vr(this,t,e,0),s=!uo(t)||t!==this._$AH&&t!==mr,s&&(this._$AH=t);else{const a=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=vr(this,a[n+l],e,l),h===mr&&(h=this._$AH[l]),s||(s=!uo(h)||h!==this._$AH[l]),h===ie?t=ie:t!==ie&&(t+=(h!=null?h:"")+o[l+1]),this._$AH[l]=h}s&&!r&&this.P(t)}P(t){t===ie?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}}class Np extends Rs{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===ie?void 0:t}}const Gp=fr?fr.emptyScript:"";class jp extends Rs{constructor(){super(...arguments),this.type=4}P(t){t&&t!==ie?this.element.setAttribute(this.name,Gp):this.element.removeAttribute(this.name)}}class Bp extends Rs{constructor(t,e,n,r,o){super(t,e,n,r,o),this.type=5}_$AI(t,e=this){var n;if((t=(n=vr(this,t,e,0))!==null&&n!==void 0?n:ie)===mr)return;const r=this._$AH,o=t===ie&&r!==ie||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==ie&&(r===ie||o);o&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,n;typeof this._$AH=="function"?this._$AH.call((n=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&n!==void 0?n:this.element,t):this._$AH.handleEvent(t)}}class Up{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){vr(this,t)}}const Nd=zs.litHtmlPolyfillSupport;Nd==null||Nd(fo,go),((gl=zs.litHtmlVersions)!==null&&gl!==void 0?gl:zs.litHtmlVersions=[]).push("2.3.1");/**
17
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Dd=/'/g,Ld=/"/g,Fd=/^(?:script|style|textarea|title)$/i,Ap=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),Bi=Ap(1),mr=Symbol.for("lit-noChange"),ie=Symbol.for("lit-nothing"),Od=new WeakMap,Dp=(i,t,e)=>{var n,r;const o=(n=e==null?void 0:e.renderBefore)!==null&&n!==void 0?n:t;let s=o._$litPart$;if(s===void 0){const a=(r=e==null?void 0:e.renderBefore)!==null&&r!==void 0?r:null;o._$litPart$=s=new fo(t.insertBefore(lo(),a),a,void 0,e!=null?e:{})}return s._$AI(i),s},pr=gr.createTreeWalker(gr,129,null,!1),Lp=(i,t)=>{const e=i.length-1,n=[];let r,o=t===2?"<svg>":"",s=uo;for(let l=0;l<e;l++){const h=i[l];let u,d,c=-1,f=0;for(;f<h.length&&(s.lastIndex=f,d=s.exec(h),d!==null);)f=s.lastIndex,s===uo?d[1]==="!--"?s=Pd:d[1]!==void 0?s=Ad:d[2]!==void 0?(Fd.test(d[2])&&(r=RegExp("</"+d[2],"g")),s=Rn):d[3]!==void 0&&(s=Rn):s===Rn?d[0]===">"?(s=r!=null?r:uo,c=-1):d[1]===void 0?c=-2:(c=s.lastIndex-d[2].length,u=d[1],s=d[3]===void 0?Rn:d[3]==='"'?Ld:Dd):s===Ld||s===Dd?s=Rn:s===Pd||s===Ad?s=uo:(s=Rn,r=void 0);const g=s===Rn&&i[l+1].startsWith("/>")?" ":"";o+=s===uo?h+Rp:c>=0?(n.push(u),h.slice(0,c)+"$lit$"+h.slice(c)+ji+g):h+ji+(c===-2?(n.push(void 0),l):g)}const a=o+(i[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return[zd!==void 0?zd.createHTML(a):a,n]};class co{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let o=0,s=0;const a=t.length-1,l=this.parts,[h,u]=Lp(t,e);if(this.el=co.createElement(h,n),pr.currentNode=this.el.content,e===2){const d=this.el.content,c=d.firstChild;c.remove(),d.append(...c.childNodes)}for(;(r=pr.nextNode())!==null&&l.length<a;){if(r.nodeType===1){if(r.hasAttributes()){const d=[];for(const c of r.getAttributeNames())if(c.endsWith("$lit$")||c.startsWith(ji)){const f=u[s++];if(d.push(c),f!==void 0){const g=r.getAttribute(f.toLowerCase()+"$lit$").split(ji),m=/([.?@])?(.*)/.exec(f);l.push({type:1,index:o,name:m[2],strings:g,ctor:m[1]==="."?Op:m[1]==="?"?Gp:m[1]==="@"?jp:zs})}else l.push({type:6,index:o})}for(const c of d)r.removeAttribute(c)}if(Fd.test(r.tagName)){const d=r.textContent.split(ji),c=d.length-1;if(c>0){r.textContent=fr?fr.emptyScript:"";for(let f=0;f<c;f++)r.append(d[f],lo()),pr.nextNode(),l.push({type:2,index:++o});r.append(d[c],lo())}}}else if(r.nodeType===8)if(r.data===Id)l.push({type:2,index:o});else{let d=-1;for(;(d=r.data.indexOf(ji,d+1))!==-1;)l.push({type:7,index:o}),d+=ji.length-1}o++}}static createElement(t,e){const n=gr.createElement("template");return n.innerHTML=t,n}}function vr(i,t,e=i,n){var r,o,s,a;if(t===mr)return t;let l=n!==void 0?(r=e._$Cl)===null||r===void 0?void 0:r[n]:e._$Cu;const h=ho(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((o=l==null?void 0:l._$AO)===null||o===void 0||o.call(l,!1),h===void 0?l=void 0:(l=new h(i),l._$AT(i,e,n)),n!==void 0?((s=(a=e)._$Cl)!==null&&s!==void 0?s:a._$Cl=[])[n]=l:e._$Cu=l),l!==void 0&&(t=vr(i,l._$AS(i,t.values),l,n)),t}class Fp{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:n},parts:r}=this._$AD,o=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:gr).importNode(n,!0);pr.currentNode=o;let s=pr.nextNode(),a=0,l=0,h=r[0];for(;h!==void 0;){if(a===h.index){let u;h.type===2?u=new fo(s,s.nextSibling,this,t):h.type===1?u=new h.ctor(s,h.name,h.strings,this,t):h.type===6&&(u=new Bp(s,this,t)),this.v.push(u),h=r[++l]}a!==(h==null?void 0:h.index)&&(s=pr.nextNode(),a++)}return o}m(t){let e=0;for(const n of this.v)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class fo{constructor(t,e,n,r){var o;this.type=2,this._$AH=ie,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$C_=(o=r==null?void 0:r.isConnected)===null||o===void 0||o}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$C_}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=vr(this,t,e),ho(t)?t===ie||t==null||t===""?(this._$AH!==ie&&this._$AR(),this._$AH=ie):t!==this._$AH&&t!==mr&&this.$(t):t._$litType$!==void 0?this.T(t):t.nodeType!==void 0?this.k(t):Pp(t)?this.O(t):this.$(t)}S(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}$(t){this._$AH!==ie&&ho(this._$AH)?this._$AA.nextSibling.data=t:this.k(gr.createTextNode(t)),this._$AH=t}T(t){var e;const{values:n,_$litType$:r}=t,o=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=co.createElement(r.h,this.options)),r);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===o)this._$AH.m(n);else{const s=new Fp(o,this),a=s.p(this.options);s.m(n),this.k(a),this._$AH=s}}_$AC(t){let e=Od.get(t.strings);return e===void 0&&Od.set(t.strings,e=new co(t)),e}O(t){Rd(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const o of t)r===e.length?e.push(n=new fo(this.S(lo()),this.S(lo()),this,this.options)):n=e[r],n._$AI(o),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var n;for((n=this._$AP)===null||n===void 0||n.call(this,!1,!0,e);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$C_=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class zs{constructor(t,e,n,r,o){this.type=1,this._$AH=ie,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=ie}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,r){const o=this.strings;let s=!1;if(o===void 0)t=vr(this,t,e,0),s=!ho(t)||t!==this._$AH&&t!==mr,s&&(this._$AH=t);else{const a=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=vr(this,a[n+l],e,l),h===mr&&(h=this._$AH[l]),s||(s=!ho(h)||h!==this._$AH[l]),h===ie?t=ie:t!==ie&&(t+=(h!=null?h:"")+o[l+1]),this._$AH[l]=h}s&&!r&&this.P(t)}P(t){t===ie?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}}class Op extends zs{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===ie?void 0:t}}const Np=fr?fr.emptyScript:"";class Gp extends zs{constructor(){super(...arguments),this.type=4}P(t){t&&t!==ie?this.element.setAttribute(this.name,Np):this.element.removeAttribute(this.name)}}class jp extends zs{constructor(t,e,n,r,o){super(t,e,n,r,o),this.type=5}_$AI(t,e=this){var n;if((t=(n=vr(this,t,e,0))!==null&&n!==void 0?n:ie)===mr)return;const r=this._$AH,o=t===ie&&r!==ie||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==ie&&(r===ie||o);o&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,n;typeof this._$AH=="function"?this._$AH.call((n=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&n!==void 0?n:this.element,t):this._$AH.handleEvent(t)}}class Bp{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){vr(this,t)}}const Nd=Ts.litHtmlPolyfillSupport;Nd==null||Nd(co,fo),((gl=Ts.litHtmlVersions)!==null&&gl!==void 0?gl:Ts.litHtmlVersions=[]).push("2.3.1");/**
18
18
  * @license
19
19
  * Copyright 2017 Google LLC
20
20
  * SPDX-License-Identifier: BSD-3-Clause
21
- */var ml,pl;class Pn extends cr{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const n=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=n.firstChild),n}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Lp(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return mr}}Pn.finalized=!0,Pn._$litElement$=!0,(ml=globalThis.litElementHydrateSupport)===null||ml===void 0||ml.call(globalThis,{LitElement:Pn});const Gd=globalThis.litElementPolyfillSupport;Gd==null||Gd({LitElement:Pn}),((pl=globalThis.litElementVersions)!==null&&pl!==void 0?pl:globalThis.litElementVersions=[]).push("3.2.2");/**
21
+ */var ml,pl;class Pn extends cr{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const n=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=n.firstChild),n}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Dp(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return mr}}Pn.finalized=!0,Pn._$litElement$=!0,(ml=globalThis.litElementHydrateSupport)===null||ml===void 0||ml.call(globalThis,{LitElement:Pn});const Gd=globalThis.litElementPolyfillSupport;Gd==null||Gd({LitElement:Pn}),((pl=globalThis.litElementVersions)!==null&&pl!==void 0?pl:globalThis.litElementVersions=[]).push("3.2.2");/**
22
22
  * @license
23
23
  * Copyright 2017 Google LLC
24
24
  * SPDX-License-Identifier: BSD-3-Clause
@@ -26,7 +26,7 @@
26
26
  * @license
27
27
  * Copyright 2017 Google LLC
28
28
  * SPDX-License-Identifier: BSD-3-Clause
29
- */const Vp=(i,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(e){e.createProperty(t.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(e){e.createProperty(t.key,i)}};function J(i){return(t,e)=>e!==void 0?((n,r,o)=>{r.constructor.createProperty(o,n)})(i,t,e):Vp(i,t)}/**
29
+ */const Up=(i,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(e){e.createProperty(t.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(e){e.createProperty(t.key,i)}};function J(i){return(t,e)=>e!==void 0?((n,r,o)=>{r.constructor.createProperty(o,n)})(i,t,e):Up(i,t)}/**
30
30
  * @license
31
31
  * Copyright 2017 Google LLC
32
32
  * SPDX-License-Identifier: BSD-3-Clause
@@ -34,56 +34,56 @@
34
34
  * @license
35
35
  * Copyright 2021 Google LLC
36
36
  * SPDX-License-Identifier: BSD-3-Clause
37
- */var _l;((_l=window.HTMLSlotElement)===null||_l===void 0?void 0:_l.prototype.assignedElements)!=null;class qp{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const Qe=qp,_r={PROPERTYCHANGE:"propertychange"};class Xp{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}const yl=Xp;function $p(i,t,e){let n,r;e=e||An;let o=0,s=i.length,a=!1;for(;o<s;)n=o+(s-o>>1),r=+e(i[n],t),r<0?o=n+1:(s=n,a=!r);return a?o:~o}function An(i,t){return i>t?1:i<t?-1:0}function xl(i,t,e){const n=i.length;if(i[0]<=t)return 0;if(t<=i[n-1])return n-1;{let r;if(e>0){for(r=1;r<n;++r)if(i[r]<t)return r-1}else if(e<0){for(r=1;r<n;++r)if(i[r]<=t)return r}else for(r=1;r<n;++r){if(i[r]==t)return r;if(i[r]<t)return typeof e=="function"?e(t,i[r-1],i[r])>0?r-1:r:i[r-1]-t<t-i[r]?r-1:r}return n-1}}function Wp(i,t,e){for(;t<e;){const n=i[t];i[t]=i[e],i[e]=n,++t,--e}}function li(i,t){const e=Array.isArray(t)?t:[t],n=e.length;for(let r=0;r<n;r++)i[i.length]=e[r]}function Vi(i,t){const e=i.length;if(e!==t.length)return!1;for(let n=0;n<e;n++)if(i[n]!==t[n])return!1;return!0}function Yp(i,t,e){const n=t||An;return i.every(function(r,o){if(o===0)return!0;const s=n(i[o-1],r);return!(s>0||e&&s===0)})}function Dn(){return!0}function yr(){return!1}function Ln(){}function Kp(i){let t=!1,e,n,r;return function(){const o=Array.prototype.slice.call(arguments);return(!t||this!==r||!Vi(o,n))&&(t=!0,r=this,n=o,e=i.apply(this,arguments)),e}}function mo(i){for(const t in i)delete i[t]}function Fn(i){let t;for(t in i)return!1;return!t}class Zp extends yl{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const n=this.listeners_||(this.listeners_={}),r=n[t]||(n[t]=[]);r.includes(e)||r.push(e)}dispatchEvent(t){const e=typeof t=="string",n=e?t:t.type,r=this.listeners_&&this.listeners_[n];if(!r)return;const o=e?new Qe(t):t;o.target||(o.target=this.eventTarget_||this);const s=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});n in s||(s[n]=0,a[n]=0),++s[n];let l;for(let h=0,u=r.length;h<u;++h)if("handleEvent"in r[h]?l=r[h].handleEvent(o):l=r[h].call(this,o),l===!1||o.propagationStopped){l=!1;break}if(--s[n]===0){let h=a[n];for(delete a[n];h--;)this.removeEventListener(n,Ln);delete s[n]}return l}disposeInternal(){this.listeners_&&mo(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return this.listeners_?t?t in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(t,e){const n=this.listeners_&&this.listeners_[t];if(n){const r=n.indexOf(e);r!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[r]=Ln,++this.pendingRemovals_[t]):(n.splice(r,1),n.length===0&&delete this.listeners_[t]))}}}const Is=Zp,tt={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function gt(i,t,e,n,r){if(n&&n!==i&&(e=e.bind(n)),r){const s=e;e=function(){i.removeEventListener(t,e),s.apply(this,arguments)}}const o={target:i,type:t,listener:e};return i.addEventListener(t,e),o}function Ps(i,t,e,n){return gt(i,t,e,n,!0)}function Ot(i){i&&i.target&&(i.target.removeEventListener(i.type,i.listener),mo(i))}class As extends Is{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(tt.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const n=t.length,r=new Array(n);for(let o=0;o<n;++o)r[o]=gt(this,t[o],e);return r}else return gt(this,t,e)}onceInternal(t,e){let n;if(Array.isArray(t)){const r=t.length;n=new Array(r);for(let o=0;o<r;++o)n[o]=Ps(this,t[o],e)}else n=Ps(this,t,e);return e.ol_key=n,n}unInternal(t,e){const n=e.ol_key;if(n)Hp(n);else if(Array.isArray(t))for(let r=0,o=t.length;r<o;++r)this.removeEventListener(t[r],e);else this.removeEventListener(t,e)}}As.prototype.on,As.prototype.once,As.prototype.un;function Hp(i){if(Array.isArray(i))for(let t=0,e=i.length;t<e;++t)Ot(i[t]);else Ot(i)}const jd=As;function et(){throw new Error("Unimplemented abstract method.")}let Jp=0;function K(i){return i.ol_uid||(i.ol_uid=String(++Jp))}const Qp="7.0.0";class Bd extends Qe{constructor(t,e,n){super(t),this.key=e,this.oldValue=n}}class t0 extends jd{constructor(t){super(),this.on,this.once,this.un,K(this),this.values_=null,t!==void 0&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}hasProperties(){return!!this.values_}notify(t,e){let n;n=`change:${t}`,this.hasListener(n)&&this.dispatchEvent(new Bd(n,t,e)),n=_r.PROPERTYCHANGE,this.hasListener(n)&&this.dispatchEvent(new Bd(n,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,n){const r=this.values_||(this.values_={});if(n)r[t]=e;else{const o=r[t];r[t]=e,o!==e&&this.notify(t,o)}}setProperties(t,e){for(const n in t)this.set(n,t[n],e)}applyProperties(t){!t.values_||Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const n=this.values_[t];delete this.values_[t],Fn(this.values_)&&(this.values_=null),e||this.notify(t,n)}}}const hi=t0,qi={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Xi=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",e0=Xi.includes("firefox");Xi.includes("safari")&&!Xi.includes("chrom")&&(Xi.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(Xi));const i0=Xi.includes("webkit")&&!Xi.includes("edge"),n0=Xi.includes("macintosh"),Ud=typeof devicePixelRatio<"u"?devicePixelRatio:1,bl=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,r0=typeof Image<"u"&&Image.prototype.decode,Vd=function(){let i=!1;try{const t=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return i}();function Pe(i,t,e,n){let r;return e&&e.length?r=e.shift():bl?r=new OffscreenCanvas(i||300,t||300):r=document.createElement("canvas"),i&&(r.width=i),t&&(r.height=t),r.getContext("2d",n)}function kl(i){const t=i.canvas;t.width=1,t.height=1,i.clearRect(0,0,1,1)}function qd(i,t){const e=t.parentNode;e&&e.replaceChild(i,t)}function wl(i){return i&&i.parentNode?i.parentNode.removeChild(i):null}function o0(i){for(;i.lastChild;)i.removeChild(i.lastChild)}function s0(i,t){const e=i.childNodes;for(let n=0;;++n){const r=e[n],o=t[n];if(!r&&!o)break;if(r!==o){if(!r){i.appendChild(o);continue}if(!o){i.removeChild(r),--n;continue}i.insertBefore(o,r)}}}class a0 extends hi{constructor(t){super();const e=t.element;e&&!t.target&&!e.style.pointerEvents&&(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){wl(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&wl(this.element);for(let e=0,n=this.listenerKeys.length;e<n;++e)Ot(this.listenerKeys[e]);this.listenerKeys.length=0,this.map_=t,t&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==Ln&&this.listenerKeys.push(gt(t,qi.POSTRENDER,this.render,this)),t.render())}render(t){}setTarget(t){this.target_=typeof t=="string"?document.getElementById(t):t}}const po=a0,Ds="ol-hidden",vo="ol-unselectable",Ml="ol-control",Xd="ol-collapsed",l0=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-z]+?)\\s*$`].join(""),"i"),$d=["style","variant","weight","size","lineHeight","family"],Wd=function(i){const t=i.match(l0);if(!t)return null;const e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let n=0,r=$d.length;n<r;++n){const o=t[n+1];o!==void 0&&(e[$d[n]]=o)}return e.families=e.family.split(/,\s?/),e},At={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 h0 extends Error{constructor(t){const e="v"+Qp.split("-")[0],n="Assertion failed. See https://openlayers.org/en/"+e+"/doc/errors/#"+t+" for details.";super(n),this.code=t,this.name="AssertionError",this.message=n}}const Yd=h0;function ft(i,t){if(!i)throw new Yd(t)}function Wt(i,t,e){return Math.min(Math.max(i,t),e)}function u0(i,t,e,n,r,o){const s=r-e,a=o-n;if(s!==0||a!==0){const l=((i-e)*s+(t-n)*a)/(s*s+a*a);l>1?(e=r,n=o):l>0&&(e+=s*l,n+=a*l)}return On(i,t,e,n)}function On(i,t,e,n){const r=e-i,o=n-t;return r*r+o*o}function d0(i){const t=i.length;for(let n=0;n<t;n++){let r=n,o=Math.abs(i[n][n]);for(let a=n+1;a<t;a++){const l=Math.abs(i[a][n]);l>o&&(o=l,r=a)}if(o===0)return null;const s=i[r];i[r]=i[n],i[n]=s;for(let a=n+1;a<t;a++){const l=-i[a][n]/i[n][n];for(let h=n;h<t+1;h++)n==h?i[a][h]=0:i[a][h]+=l*i[n][h]}}const e=new Array(t);for(let n=t-1;n>=0;n--){e[n]=i[n][t]/i[n][n];for(let r=n-1;r>=0;r--)i[r][t]-=i[r][n]*e[n]}return e}function Nn(i){return i*Math.PI/180}function $i(i,t){const e=i%t;return e*t<0?e+t:e}function ki(i,t,e){return i+e*(t-i)}function Kd(i,t){const e=Math.pow(10,t);return Math.round(i*e)/e}function Ls(i,t){return Math.floor(Kd(i,t))}function Fs(i,t){return Math.ceil(Kd(i,t))}class c0 extends hi{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);typeof t.properties=="object"&&(delete e.properties,Object.assign(e,t.properties)),e[At.OPACITY]=t.opacity!==void 0?t.opacity:1,ft(typeof e[At.OPACITY]=="number",64),e[At.VISIBLE]=t.visible!==void 0?t.visible:!0,e[At.Z_INDEX]=t.zIndex,e[At.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[At.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[At.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[At.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=e.className!==void 0?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:t===void 0?!0:t},n=this.getZIndex();return e.opacity=Wt(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=n===void 0&&!e.managed?1/0:n,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return et()}getLayerStatesArray(t){return et()}getExtent(){return this.get(At.EXTENT)}getMaxResolution(){return this.get(At.MAX_RESOLUTION)}getMinResolution(){return this.get(At.MIN_RESOLUTION)}getMinZoom(){return this.get(At.MIN_ZOOM)}getMaxZoom(){return this.get(At.MAX_ZOOM)}getOpacity(){return this.get(At.OPACITY)}getSourceState(){return et()}getVisible(){return this.get(At.VISIBLE)}getZIndex(){return this.get(At.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(At.EXTENT,t)}setMaxResolution(t){this.set(At.MAX_RESOLUTION,t)}setMinResolution(t){this.set(At.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(At.MAX_ZOOM,t)}setMinZoom(t){this.set(At.MIN_ZOOM,t)}setOpacity(t){ft(typeof t=="number",64),this.set(At.OPACITY,t)}setVisible(t){this.set(At.VISIBLE,t)}setZIndex(t){this.set(At.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const Zd=c0,Wi={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};class f0 extends Zd{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(At.SOURCE,this.handleSourcePropertyChange_);const n=t.source?t.source:null;this.setSource(n)}getLayersArray(t){return t=t||[],t.push(this),t}getLayerStatesArray(t){return t=t||[],t.push(this.getLayerState()),t}getSource(){return this.get(At.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed()}handleSourcePropertyChange_(){this.sourceChangeKey_&&(Ot(this.sourceChangeKey_),this.sourceChangeKey_=null);const t=this.getSource();t&&(this.sourceChangeKey_=gt(t,tt.CHANGE,this.handleSourceChange_,this)),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise(e=>e([]))}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}render(t,e){const n=this.getRenderer();if(n.prepareFrame(t))return this.rendered=!0,n.renderFrame(t,e)}unrender(){this.rendered=!1}setMapInternal(t){t||this.unrender(),this.set(At.MAP,t)}getMapInternal(){return this.get(At.MAP)}setMap(t){this.mapPrecomposeKey_&&(Ot(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Ot(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=gt(t,Wi.PRECOMPOSE,function(e){const r=e.frameState.layerStatesArray,o=this.getLayerState(!1);ft(!r.some(function(s){return s.layer===o.layer}),67),r.push(o)},this),this.mapRenderKey_=gt(this,tt.CHANGE,t.render,t),this.changed())}setSource(t){this.set(At.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function El(i,t){if(!i.visible)return!1;const e=t.resolution;if(e<i.minResolution||e>=i.maxResolution)return!1;const n=t.zoom;return n>i.minZoom&&n<=i.maxZoom}const Os=f0;class g0 extends po{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=t.collapsed!==void 0?t.collapsed:!0,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=t.collapsible!==void 0,this.collapsible_=t.collapsible!==void 0?t.collapsible:!0,this.collapsible_||(this.collapsed_=!1);const e=t.className!==void 0?t.className:"ol-attribution",n=t.tipLabel!==void 0?t.tipLabel:"Attributions",r=t.expandClassName!==void 0?t.expandClassName:e+"-expand",o=t.collapseLabel!==void 0?t.collapseLabel:"\u203A",s=t.collapseClassName!==void 0?t.collapseClassName:e+"-collapse";typeof o=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=o,this.collapseLabel_.className=s):this.collapseLabel_=o;const a=t.label!==void 0?t.label:"i";typeof 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=n,this.toggleButton_.appendChild(l),this.toggleButton_.addEventListener(tt.CLICK,this.handleClick_.bind(this),!1);const h=e+" "+vo+" "+Ml+(this.collapsed_&&this.collapsible_?" "+Xd:"")+(this.collapsible_?"":" ol-uncollapsible"),u=this.element;u.className=h,u.appendChild(this.toggleButton_),u.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e={},n=[];let r=!0;const o=t.layerStatesArray;for(let s=0,a=o.length;s<a;++s){const l=o[s];if(!El(l,t.viewState))continue;const h=l.layer.getSource();if(!h)continue;const u=h.getAttributions();if(!u)continue;const d=u(t);if(!!d)if(r=r&&h.getAttributionsCollapsible()!==!1,Array.isArray(d))for(let c=0,f=d.length;c<f;++c)d[c]in e||(n.push(d[c]),e[d[c]]=!0);else d in e||(n.push(d),e[d]=!0)}return this.overrideCollapsible_||this.setCollapsible(r),n}updateElement_(t){if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=this.collectSourceAttributions_(t),n=e.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!Vi(e,this.renderedAttributions_)){o0(this.ulElement_);for(let r=0,o=e.length;r<o;++r){const s=document.createElement("li");s.innerHTML=e[r],this.ulElement_.appendChild(s)}this.renderedAttributions_=e}}handleClick_(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(Xd),this.collapsed_?qd(this.collapseLabel_,this.label_):qd(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(t){this.userCollapsed_=t,!(!this.collapsible_||this.collapsed_===t)&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(t){this.updateElement_(t.frameState)}}const m0=g0,fe={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},Cl={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},xr={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class p0{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||xr[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const Ns=p0,_o=6378137,br=Math.PI*_o,v0=[-br,-br,br,br],_0=[-180,-85,180,85],Gs=_o*Math.log(Math.tan(Math.PI/2));class kr extends Ns{constructor(t){super({code:t,units:"m",extent:v0,global:!0,worldExtent:_0,getPointResolution:function(e,n){return e/Math.cosh(n[1]/_o)}})}}const Hd=[new kr("EPSG:3857"),new kr("EPSG:102100"),new kr("EPSG:102113"),new kr("EPSG:900913"),new kr("http://www.opengis.net/def/crs/EPSG/0/3857"),new kr("http://www.opengis.net/gml/srs/epsg.xml#3857")];function y0(i,t,e){const n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let r=0;r<n;r+=e){t[r]=br*i[r]/180;let o=_o*Math.log(Math.tan(Math.PI*(+i[r+1]+90)/360));o>Gs?o=Gs:o<-Gs&&(o=-Gs),t[r+1]=o}return t}function x0(i,t,e){const n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let r=0;r<n;r+=e)t[r]=180*i[r]/br,t[r+1]=360*Math.atan(Math.exp(i[r+1]/_o))/Math.PI-90;return t}const b0=6378137,Jd=[-180,-90,180,90],k0=Math.PI*b0/180;class Gn extends Ns{constructor(t,e){super({code:t,units:"degrees",extent:Jd,axisOrientation:e,global:!0,metersPerUnit:k0,worldExtent:Jd})}}const Qd=[new Gn("CRS:84"),new Gn("EPSG:4326","neu"),new Gn("urn:ogc:def:crs:OGC:1.3:CRS84"),new Gn("urn:ogc:def:crs:OGC:2:84"),new Gn("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Gn("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Gn("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Sl={};function w0(i){return Sl[i]||Sl[i.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function M0(i,t){Sl[i]=t}let wr={};function Mr(i,t,e){const n=i.getCode(),r=t.getCode();n in wr||(wr[n]={}),wr[n][r]=e}function tc(i,t){let e;return i in wr&&t in wr[i]&&(e=wr[i][t]),e}const ne={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function xe(i){const t=Ge();for(let e=0,n=i.length;e<n;++e)bo(t,i[e]);return t}function E0(i,t,e){const n=Math.min.apply(null,i),r=Math.min.apply(null,t),o=Math.max.apply(null,i),s=Math.max.apply(null,t);return ti(n,r,o,s,e)}function ui(i,t,e){return e?(e[0]=i[0]-t,e[1]=i[1]-t,e[2]=i[2]+t,e[3]=i[3]+t,e):[i[0]-t,i[1]-t,i[2]+t,i[3]+t]}function ec(i,t){return t?(t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t):i.slice()}function jn(i,t,e){let n,r;return t<i[0]?n=i[0]-t:i[2]<t?n=t-i[2]:n=0,e<i[1]?r=i[1]-e:i[3]<e?r=e-i[3]:r=0,n*n+r*r}function js(i,t){return Tl(i,t[0],t[1])}function Bn(i,t){return i[0]<=t[0]&&t[2]<=i[2]&&i[1]<=t[1]&&t[3]<=i[3]}function Tl(i,t,e){return i[0]<=t&&t<=i[2]&&i[1]<=e&&e<=i[3]}function zl(i,t){const e=i[0],n=i[1],r=i[2],o=i[3],s=t[0],a=t[1];let l=ne.UNKNOWN;return s<e?l=l|ne.LEFT:s>r&&(l=l|ne.RIGHT),a<n?l=l|ne.BELOW:a>o&&(l=l|ne.ABOVE),l===ne.UNKNOWN&&(l=ne.INTERSECTING),l}function Ge(){return[1/0,1/0,-1/0,-1/0]}function ti(i,t,e,n,r){return r?(r[0]=i,r[1]=t,r[2]=e,r[3]=n,r):[i,t,e,n]}function yo(i){return ti(1/0,1/0,-1/0,-1/0,i)}function xo(i,t){const e=i[0],n=i[1];return ti(e,n,e,n,t)}function Rl(i,t,e,n,r){const o=yo(r);return nc(o,i,t,e,n)}function Er(i,t){return i[0]==t[0]&&i[2]==t[2]&&i[1]==t[1]&&i[3]==t[3]}function ic(i,t){return t[0]<i[0]&&(i[0]=t[0]),t[2]>i[2]&&(i[2]=t[2]),t[1]<i[1]&&(i[1]=t[1]),t[3]>i[3]&&(i[3]=t[3]),i}function bo(i,t){t[0]<i[0]&&(i[0]=t[0]),t[0]>i[2]&&(i[2]=t[0]),t[1]<i[1]&&(i[1]=t[1]),t[1]>i[3]&&(i[3]=t[1])}function nc(i,t,e,n,r){for(;e<n;e+=r)C0(i,t[e],t[e+1]);return i}function C0(i,t,e){i[0]=Math.min(i[0],t),i[1]=Math.min(i[1],e),i[2]=Math.max(i[2],t),i[3]=Math.max(i[3],e)}function Il(i,t){let e;return e=t(Bs(i)),e||(e=t(Us(i)),e)||(e=t(Vs(i)),e)||(e=t(Ki(i)),e)?e:!1}function Pl(i){let t=0;return Ll(i)||(t=Nt(i)*$e(i)),t}function Bs(i){return[i[0],i[1]]}function Us(i){return[i[2],i[1]]}function Yi(i){return[(i[0]+i[2])/2,(i[1]+i[3])/2]}function S0(i,t){let e;return t==="bottom-left"?e=Bs(i):t==="bottom-right"?e=Us(i):t==="top-left"?e=Ki(i):t==="top-right"?e=Vs(i):ft(!1,13),e}function Al(i,t,e,n,r){const[o,s,a,l,h,u,d,c]=Dl(i,t,e,n);return ti(Math.min(o,a,h,d),Math.min(s,l,u,c),Math.max(o,a,h,d),Math.max(s,l,u,c),r)}function Dl(i,t,e,n){const r=t*n[0]/2,o=t*n[1]/2,s=Math.cos(e),a=Math.sin(e),l=r*s,h=r*a,u=o*s,d=o*a,c=i[0],f=i[1];return[c-l+d,f-h-u,c-l-d,f-h+u,c+l-d,f+h+u,c+l+d,f+h-u,c-l+d,f-h-u]}function $e(i){return i[3]-i[1]}function Un(i,t,e){const n=e||Ge();return Kt(i,t)?(i[0]>t[0]?n[0]=i[0]:n[0]=t[0],i[1]>t[1]?n[1]=i[1]:n[1]=t[1],i[2]<t[2]?n[2]=i[2]:n[2]=t[2],i[3]<t[3]?n[3]=i[3]:n[3]=t[3]):yo(n),n}function Ki(i){return[i[0],i[3]]}function Vs(i){return[i[2],i[3]]}function Nt(i){return i[2]-i[0]}function Kt(i,t){return i[0]<=t[2]&&i[2]>=t[0]&&i[1]<=t[3]&&i[3]>=t[1]}function Ll(i){return i[2]<i[0]||i[3]<i[1]}function T0(i,t){return t?(t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t):i}function z0(i,t,e){let n=!1;const r=zl(i,t),o=zl(i,e);if(r===ne.INTERSECTING||o===ne.INTERSECTING)n=!0;else{const s=i[0],a=i[1],l=i[2],h=i[3],u=t[0],d=t[1],c=e[0],f=e[1],g=(f-d)/(c-u);let m,p;!!(o&ne.ABOVE)&&!(r&ne.ABOVE)&&(m=c-(f-h)/g,n=m>=s&&m<=l),!n&&!!(o&ne.RIGHT)&&!(r&ne.RIGHT)&&(p=f-(c-l)*g,n=p>=a&&p<=h),!n&&!!(o&ne.BELOW)&&!(r&ne.BELOW)&&(m=c-(f-a)/g,n=m>=s&&m<=l),!n&&!!(o&ne.LEFT)&&!(r&ne.LEFT)&&(p=f-(c-s)*g,n=p>=a&&p<=h)}return n}function R0(i,t,e,n){let r=[];if(n>1){const a=i[2]-i[0],l=i[3]-i[1];for(let h=0;h<n;++h)r.push(i[0]+a*h/n,i[1],i[2],i[1]+l*h/n,i[2]-a*h/n,i[3],i[0],i[3]-l*h/n)}else r=[i[0],i[1],i[2],i[1],i[2],i[3],i[0],i[3]];t(r,r,2);const o=[],s=[];for(let a=0,l=r.length;a<l;a+=2)o.push(r[a]),s.push(r[a+1]);return E0(o,s,e)}function rc(i,t){const e=t.getExtent(),n=Yi(i);if(t.canWrapX()&&(n[0]<e[0]||n[0]>=e[2])){const r=Nt(e),s=Math.floor((n[0]-e[0])/r)*r;i[0]-=s,i[2]-=s}return i}function I0(i,t){if(t.canWrapX()){const e=t.getExtent();if(!isFinite(i[0])||!isFinite(i[2]))return[[e[0],i[1],e[2],i[3]]];rc(i,t);const n=Nt(e);if(Nt(i)>n)return[[e[0],i[1],e[2],i[3]]];if(i[0]<e[0])return[[i[0]+n,i[1],e[2],i[3]],[e[0],i[1],i[2],i[3]]];if(i[2]>e[2])return[[i[0],i[1],e[2],i[3]],[e[0],i[1],i[2]-n,i[3]]]}return[i]}function P0(i,t){return i[0]+=+t[0],i[1]+=+t[1],i}function A0(i,t){const e=t.getRadius(),n=t.getCenter(),r=n[0],o=n[1],s=i[0],a=i[1];let l=s-r;const h=a-o;l===0&&h===0&&(l=1);const u=Math.sqrt(l*l+h*h),d=r+e*l/u,c=o+e*h/u;return[d,c]}function Fl(i,t){const e=i[0],n=i[1],r=t[0],o=t[1],s=r[0],a=r[1],l=o[0],h=o[1],u=l-s,d=h-a,c=u===0&&d===0?0:(u*(e-s)+d*(n-a))/(u*u+d*d||0);let f,g;return c<=0?(f=s,g=a):c>=1?(f=l,g=h):(f=s+c*u,g=a+c*d),[f,g]}function ei(i,t){let e=!0;for(let n=i.length-1;n>=0;--n)if(i[n]!=t[n]){e=!1;break}return e}function Ol(i,t){const e=Math.cos(t),n=Math.sin(t),r=i[0]*e-i[1]*n,o=i[1]*e+i[0]*n;return i[0]=r,i[1]=o,i}function D0(i,t){return i[0]*=t,i[1]*=t,i}function wi(i,t){const e=i[0]-t[0],n=i[1]-t[1];return e*e+n*n}function oc(i,t){return Math.sqrt(wi(i,t))}function L0(i,t){return wi(i,Fl(i,t))}function Nl(i,t){if(t.canWrapX()){const e=Nt(t.getExtent()),n=sc(i,t,e);n&&(i[0]-=n*e)}return i}function sc(i,t,e){const n=t.getExtent();let r=0;return t.canWrapX()&&(i[0]<n[0]||i[0]>n[2])&&(e=e||Nt(n),r=Math.floor((i[0]-n[0])/e)),r}const ac=63710088e-1;function lc(i,t,e){e=e||ac;const n=Nn(i[1]),r=Nn(t[1]),o=(r-n)/2,s=Nn(t[0]-i[0])/2,a=Math.sin(o)*Math.sin(o)+Math.sin(s)*Math.sin(s)*Math.cos(n)*Math.cos(r);return 2*e*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function qs(i,t){let e=0;const n=i.length;let r=i[n-1][0],o=i[n-1][1];for(let s=0;s<n;s++){const a=i[s][0],l=i[s][1];e+=Nn(a-r)*(2+Math.sin(Nn(o))+Math.sin(Nn(l))),r=a,o=l}return e*t*t/2}function hc(i,t){t=t||{};const e=t.radius||ac,n=t.projection||"EPSG:3857",r=i.getType();r!=="GeometryCollection"&&(i=i.clone().transform(n,"EPSG:4326"));let o=0,s,a,l,h,u,d;switch(r){case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"LinearRing":break;case"Polygon":{for(s=i.getCoordinates(),o=Math.abs(qs(s[0],e)),l=1,h=s.length;l<h;++l)o-=Math.abs(qs(s[l],e));break}case"MultiPolygon":{for(s=i.getCoordinates(),l=0,h=s.length;l<h;++l)for(a=s[l],o+=Math.abs(qs(a[0],e)),u=1,d=a.length;u<d;++u)o-=Math.abs(qs(a[u],e));break}case"GeometryCollection":{const c=i.getGeometries();for(l=0,h=c.length;l<h;++l)o+=hc(c[l],t);break}default:throw new Error("Unsupported geometry type: "+r)}return o}let Gl=!0;function F0(i){Gl=!(i===void 0?!0:i)}function jl(i,t,e){if(t!==void 0){for(let n=0,r=i.length;n<r;++n)t[n]=i[n];t=t}else t=i.slice();return t}function uc(i,t,e){if(t!==void 0&&i!==t){for(let n=0,r=i.length;n<r;++n)t[n]=i[n];i=t}return i}function dc(i){M0(i.getCode(),i),Mr(i,i,jl)}function O0(i){i.forEach(dc)}function Gt(i){return typeof i=="string"?w0(i):i||null}function Xs(i,t,e,n){i=Gt(i);let r;const o=i.getPointResolutionFunc();if(o){if(r=o(t,e),n&&n!==i.getUnits()){const s=i.getMetersPerUnit();s&&(r=r*s/xr[n])}}else{const s=i.getUnits();if(s=="degrees"&&!n||n=="degrees")r=t;else{const a=Vl(i,Gt("EPSG:4326"));if(a===uc&&s!=="degrees")r=t*i.getMetersPerUnit();else{let h=[e[0]-t/2,e[1],e[0]+t/2,e[1],e[0],e[1]-t/2,e[0],e[1]+t/2];h=a(h,h,2);const u=lc(h.slice(0,2),h.slice(2,4)),d=lc(h.slice(4,6),h.slice(6,8));r=(u+d)/2}const l=n?xr[n]:i.getMetersPerUnit();l!==void 0&&(r/=l)}}return r}function Bl(i){O0(i),i.forEach(function(t){i.forEach(function(e){t!==e&&Mr(t,e,jl)})})}function N0(i,t,e,n){i.forEach(function(r){t.forEach(function(o){Mr(r,o,e),Mr(o,r,n)})})}function Ul(i,t){return i?typeof i=="string"?Gt(i):i:Gt(t)}function cc(i){return function(t,e,n){const r=t.length;n=n!==void 0?n:2,e=e!==void 0?e:new Array(r);for(let o=0;o<r;o+=n){const s=i(t.slice(o,o+n)),a=s.length;for(let l=0,h=n;l<h;++l)e[o+l]=l>=a?t[o+l]:s[l]}return e}}function G0(i,t,e,n){const r=Gt(i),o=Gt(t);Mr(r,o,cc(e)),Mr(o,r,cc(n))}function j0(i,t){const e=$s(i,t!==void 0?t:"EPSG:3857","EPSG:4326"),n=e[0];return(n<-180||n>180)&&(e[0]=$i(n+180,360)-180),e}function Vn(i,t){if(i===t)return!0;const e=i.getUnits()===t.getUnits();return(i.getCode()===t.getCode()||Vl(i,t)===jl)&&e}function Vl(i,t){const e=i.getCode(),n=t.getCode();let r=tc(e,n);return r||(r=uc),r}function ko(i,t){const e=Gt(i),n=Gt(t);return Vl(e,n)}function $s(i,t,e){return ko(t,e)(i,void 0,i.length)}function B0(i,t,e,n){const r=ko(t,e);return R0(i,r,void 0,n)}function Cr(i,t){return i}function Vt(i,t){return Gl&&!ei(i,[0,0])&&i[0]>=-180&&i[0]<=180&&i[1]>=-90&&i[1]<=90&&(Gl=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),i}function ql(i,t){return i}function Zi(i,t){return i}function fc(i,t,e){return function(n){let r,o;if(i.canWrapX()){const s=i.getExtent(),a=Nt(s);n=n.slice(0),o=sc(n,i,a),o&&(n[0]=n[0]-o*a),n[0]=Wt(n[0],s[0],s[2]),n[1]=Wt(n[1],s[1],s[3]),r=e(n)}else r=e(n);return o&&t.canWrapX()&&(r[0]+=o*Nt(t.getExtent())),r}}function U0(){Bl(Hd),Bl(Qd),N0(Qd,Hd,y0,x0)}U0();const re={ADD:"add",REMOVE:"remove"},gc={LENGTH:"length"};class Ws extends Qe{constructor(t,e,n){super(t),this.element=e,this.index=n}}class V0 extends hi{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let n=0,r=this.array_.length;n<r;++n)this.assertUnique_(this.array_[n],n);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(t){for(let e=0,n=t.length;e<n;++e)this.push(t[e]);return this}forEach(t){const e=this.array_;for(let n=0,r=e.length;n<r;++n)t(e[n],n,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(gc.LENGTH)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new Ws(re.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let n=0,r=e.length;n<r;++n)if(e[n]===t)return this.removeAt(n)}removeAt(t){if(t<0||t>=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new Ws(re.REMOVE,e,t)),e}setAt(t,e){const n=this.getLength();if(t>=n){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const r=this.array_[t];this.array_[t]=e,this.dispatchEvent(new Ws(re.REMOVE,r,t)),this.dispatchEvent(new Ws(re.ADD,e,t))}updateLength_(){this.set(gc.LENGTH,this.array_.length)}assertUnique_(t,e){for(let n=0,r=this.array_.length;n<r;++n)if(this.array_[n]===t&&n!==e)throw new Yd(58)}}const We=V0,mc=new Array(6);function Ye(){return[1,0,0,1,0,0]}function pc(i){return Ys(i,1,0,0,1,0,0)}function Xl(i,t){const e=i[0],n=i[1],r=i[2],o=i[3],s=i[4],a=i[5],l=t[0],h=t[1],u=t[2],d=t[3],c=t[4],f=t[5];return i[0]=e*l+r*h,i[1]=n*l+o*h,i[2]=e*u+r*d,i[3]=n*u+o*d,i[4]=e*c+r*f+s,i[5]=n*c+o*f+a,i}function Ys(i,t,e,n,r,o,s){return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i[4]=o,i[5]=s,i}function q0(i,t){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i}function Jt(i,t){const e=t[0],n=t[1];return t[0]=i[0]*e+i[2]*n+i[4],t[1]=i[1]*e+i[3]*n+i[5],t}function $l(i,t,e){return Xl(i,Ys(mc,t,0,0,e,0,0))}function X0(i,t,e){return Ys(i,t,0,0,e,0,0)}function $0(i,t,e){return Xl(i,Ys(mc,1,0,0,1,t,e))}function Mi(i,t,e,n,r,o,s,a){const l=Math.sin(o),h=Math.cos(o);return i[0]=n*h,i[1]=r*l,i[2]=-n*l,i[3]=r*h,i[4]=s*n*h-a*n*l+t,i[5]=s*r*l+a*r*h+e,i}function Wl(i,t){const e=W0(t);ft(e!==0,32);const n=t[0],r=t[1],o=t[2],s=t[3],a=t[4],l=t[5];return i[0]=s/e,i[1]=-r/e,i[2]=-o/e,i[3]=n/e,i[4]=(o*l-s*a)/e,i[5]=-(n*l-r*a)/e,i}function W0(i){return i[0]*i[3]-i[1]*i[2]}let vc;function _c(i){const t="matrix("+i.join(", ")+")";if(bl)return t;const e=vc||(vc=document.createElement("div"));return e.style.transform=t,e.style.transform}const Y0=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,K0=/^([a-z]*)$|^hsla?\(.*\)$/i;function Yl(i){return typeof i=="string"?i:xc(i)}function Z0(i){const t=document.createElement("div");if(t.style.color=i,t.style.color!==""){document.body.appendChild(t);const e=getComputedStyle(t).color;return document.body.removeChild(t),e}else return""}const H0=function(){const t={};let e=0;return function(n){let r;if(t.hasOwnProperty(n))r=t[n];else{if(e>=1024){let o=0;for(const s in t)(o++&3)===0&&(delete t[s],--e)}r=J0(n),t[n]=r,++e}return r}}();function wo(i){return Array.isArray(i)?i:H0(i)}function J0(i){let t,e,n,r,o;if(K0.exec(i)&&(i=Z0(i)),Y0.exec(i)){const s=i.length-1;let a;s<=4?a=1:a=2;const l=s===4||s===8;t=parseInt(i.substr(1+0*a,a),16),e=parseInt(i.substr(1+1*a,a),16),n=parseInt(i.substr(1+2*a,a),16),l?r=parseInt(i.substr(1+3*a,a),16):r=255,a==1&&(t=(t<<4)+t,e=(e<<4)+e,n=(n<<4)+n,l&&(r=(r<<4)+r)),o=[t,e,n,r/255]}else i.startsWith("rgba(")?(o=i.slice(5,-1).split(",").map(Number),yc(o)):i.startsWith("rgb(")?(o=i.slice(4,-1).split(",").map(Number),o.push(1),yc(o)):ft(!1,14);return o}function yc(i){return i[0]=Wt(i[0]+.5|0,0,255),i[1]=Wt(i[1]+.5|0,0,255),i[2]=Wt(i[2]+.5|0,0,255),i[3]=Wt(i[3],0,1),i}function xc(i){let t=i[0];t!=(t|0)&&(t=t+.5|0);let e=i[1];e!=(e|0)&&(e=e+.5|0);let n=i[2];n!=(n|0)&&(n=n+.5|0);const r=i[3]===void 0?1:Math.round(i[3]*100)/100;return"rgba("+t+","+e+","+n+","+r+")"}class Q0{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const n=this.cache_[e];(t++&3)===0&&!n.hasListener()&&(delete this.cache_[e],--this.cacheSize_)}}}get(t,e,n){const r=bc(t,e,n);return r in this.cache_?this.cache_[r]:null}set(t,e,n,r){const o=bc(t,e,n);this.cache_[o]=r,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function bc(i,t,e){const n=e?Yl(e):"null";return t+":"+i+":"+n}const Ks=new Q0;class tv extends yl{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){et()}calculateMatrices2D(t){const e=t.viewState,n=t.coordinateToPixelTransform,r=t.pixelToCoordinateTransform;Mi(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Wl(r,n)}forEachFeatureAtCoordinate(t,e,n,r,o,s,a,l){let h;const u=e.viewState;function d(x,k,w,C){return o.call(s,k,x?w:null,C)}const c=u.projection,f=Nl(t.slice(),c),g=[[0,0]];if(c.canWrapX()&&r){const x=c.getExtent(),k=Nt(x);g.push([-k,0],[k,0])}const m=e.layerStatesArray,p=m.length,_=[],v=[];for(let x=0;x<g.length;x++)for(let k=p-1;k>=0;--k){const w=m[k],C=w.layer;if(C.hasRenderer()&&El(w,u)&&a.call(l,C)){const M=C.getRenderer(),S=C.getSource();if(M&&S){const R=S.getWrapX()?f:t,A=d.bind(null,w.managed);v[0]=R[0]+g[x][0],v[1]=R[1]+g[x][1],h=M.forEachFeatureAtCoordinate(v,e,n,A,_)}if(h)return h}}if(_.length===0)return;const y=1/_.length;return _.forEach((x,k)=>x.distanceSq+=k*y),_.sort((x,k)=>x.distanceSq-k.distanceSq),_.some(x=>h=x.callback(x.feature,x.layer,x.geometry)),h}hasFeatureAtCoordinate(t,e,n,r,o,s){return this.forEachFeatureAtCoordinate(t,e,n,r,Dn,this,o,s)!==void 0}getMap(){return this.map_}renderFrame(t){et()}scheduleExpireIconCache(t){Ks.canExpireCache()&&t.postRenderFunctions.push(ev)}}function ev(i,t){Ks.expire()}const iv=tv;class nv extends Qe{constructor(t,e,n,r){super(t),this.inversePixelTransform=e,this.frameState=n,this.context=r}}const kc=nv,wc="10px sans-serif",Ei="#000",Zs="round",Mo=[],Eo=0,Sr="round",Co=10,So="#000",To="center",Hs="middle",qn=[0,0,0,0],zo=1,Ci=new hi;let Tr=null,Kl;const Zl={},rv=function(){const t="32px ",e=["monospace","serif"],n=e.length,r="wmytzilWMYTZIL@#/&?$%10\uF013";let o,s;function a(h,u,d){let c=!0;for(let f=0;f<n;++f){const g=e[f];if(s=Js(h+" "+u+" "+t+g,r),d!=g){const m=Js(h+" "+u+" "+t+d+","+g,r);c=c&&m!=s}}return!!c}function l(){let h=!0;const u=Ci.getKeys();for(let d=0,c=u.length;d<c;++d){const f=u[d];Ci.get(f)<100&&(a.apply(this,f.split(`
38
- `))?(mo(Zl),Tr=null,Kl=void 0,Ci.set(f,100)):(Ci.set(f,Ci.get(f)+1,!0),h=!1))}h&&(clearInterval(o),o=void 0)}return function(h){const u=Wd(h);if(!u)return;const d=u.families;for(let c=0,f=d.length;c<f;++c){const g=d[c],m=u.style+`
37
+ */var _l;((_l=window.HTMLSlotElement)===null||_l===void 0?void 0:_l.prototype.assignedElements)!=null;class Vp{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const Qe=Vp,_r={PROPERTYCHANGE:"propertychange"};class qp{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}const yl=qp;function Xp(i,t,e){let n,r;e=e||An;let o=0,s=i.length,a=!1;for(;o<s;)n=o+(s-o>>1),r=+e(i[n],t),r<0?o=n+1:(s=n,a=!r);return a?o:~o}function An(i,t){return i>t?1:i<t?-1:0}function xl(i,t,e){const n=i.length;if(i[0]<=t)return 0;if(t<=i[n-1])return n-1;{let r;if(e>0){for(r=1;r<n;++r)if(i[r]<t)return r-1}else if(e<0){for(r=1;r<n;++r)if(i[r]<=t)return r}else for(r=1;r<n;++r){if(i[r]==t)return r;if(i[r]<t)return typeof e=="function"?e(t,i[r-1],i[r])>0?r-1:r:i[r-1]-t<t-i[r]?r-1:r}return n-1}}function $p(i,t,e){for(;t<e;){const n=i[t];i[t]=i[e],i[e]=n,++t,--e}}function li(i,t){const e=Array.isArray(t)?t:[t],n=e.length;for(let r=0;r<n;r++)i[i.length]=e[r]}function Vi(i,t){const e=i.length;if(e!==t.length)return!1;for(let n=0;n<e;n++)if(i[n]!==t[n])return!1;return!0}function Wp(i,t,e){const n=t||An;return i.every(function(r,o){if(o===0)return!0;const s=n(i[o-1],r);return!(s>0||e&&s===0)})}function Dn(){return!0}function yr(){return!1}function Ln(){}function Yp(i){let t=!1,e,n,r;return function(){const o=Array.prototype.slice.call(arguments);return(!t||this!==r||!Vi(o,n))&&(t=!0,r=this,n=o,e=i.apply(this,arguments)),e}}function go(i){for(const t in i)delete i[t]}function Fn(i){let t;for(t in i)return!1;return!t}class Kp extends yl{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const n=this.listeners_||(this.listeners_={}),r=n[t]||(n[t]=[]);r.includes(e)||r.push(e)}dispatchEvent(t){const e=typeof t=="string",n=e?t:t.type,r=this.listeners_&&this.listeners_[n];if(!r)return;const o=e?new Qe(t):t;o.target||(o.target=this.eventTarget_||this);const s=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});n in s||(s[n]=0,a[n]=0),++s[n];let l;for(let h=0,u=r.length;h<u;++h)if("handleEvent"in r[h]?l=r[h].handleEvent(o):l=r[h].call(this,o),l===!1||o.propagationStopped){l=!1;break}if(--s[n]===0){let h=a[n];for(delete a[n];h--;)this.removeEventListener(n,Ln);delete s[n]}return l}disposeInternal(){this.listeners_&&go(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return this.listeners_?t?t in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(t,e){const n=this.listeners_&&this.listeners_[t];if(n){const r=n.indexOf(e);r!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[r]=Ln,++this.pendingRemovals_[t]):(n.splice(r,1),n.length===0&&delete this.listeners_[t]))}}}const Is=Kp,tt={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function gt(i,t,e,n,r){if(n&&n!==i&&(e=e.bind(n)),r){const s=e;e=function(){i.removeEventListener(t,e),s.apply(this,arguments)}}const o={target:i,type:t,listener:e};return i.addEventListener(t,e),o}function Rs(i,t,e,n){return gt(i,t,e,n,!0)}function Ot(i){i&&i.target&&(i.target.removeEventListener(i.type,i.listener),go(i))}class Ps extends Is{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(tt.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const n=t.length,r=new Array(n);for(let o=0;o<n;++o)r[o]=gt(this,t[o],e);return r}else return gt(this,t,e)}onceInternal(t,e){let n;if(Array.isArray(t)){const r=t.length;n=new Array(r);for(let o=0;o<r;++o)n[o]=Rs(this,t[o],e)}else n=Rs(this,t,e);return e.ol_key=n,n}unInternal(t,e){const n=e.ol_key;if(n)Zp(n);else if(Array.isArray(t))for(let r=0,o=t.length;r<o;++r)this.removeEventListener(t[r],e);else this.removeEventListener(t,e)}}Ps.prototype.on,Ps.prototype.once,Ps.prototype.un;function Zp(i){if(Array.isArray(i))for(let t=0,e=i.length;t<e;++t)Ot(i[t]);else Ot(i)}const jd=Ps;function et(){throw new Error("Unimplemented abstract method.")}let Hp=0;function K(i){return i.ol_uid||(i.ol_uid=String(++Hp))}const Jp="7.0.0";class Bd extends Qe{constructor(t,e,n){super(t),this.key=e,this.oldValue=n}}class Qp extends jd{constructor(t){super(),this.on,this.once,this.un,K(this),this.values_=null,t!==void 0&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}hasProperties(){return!!this.values_}notify(t,e){let n;n=`change:${t}`,this.hasListener(n)&&this.dispatchEvent(new Bd(n,t,e)),n=_r.PROPERTYCHANGE,this.hasListener(n)&&this.dispatchEvent(new Bd(n,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,n){const r=this.values_||(this.values_={});if(n)r[t]=e;else{const o=r[t];r[t]=e,o!==e&&this.notify(t,o)}}setProperties(t,e){for(const n in t)this.set(n,t[n],e)}applyProperties(t){!t.values_||Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const n=this.values_[t];delete this.values_[t],Fn(this.values_)&&(this.values_=null),e||this.notify(t,n)}}}const hi=Qp,qi={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Xi=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",t0=Xi.includes("firefox");Xi.includes("safari")&&!Xi.includes("chrom")&&(Xi.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(Xi));const e0=Xi.includes("webkit")&&!Xi.includes("edge"),i0=Xi.includes("macintosh"),Ud=typeof devicePixelRatio<"u"?devicePixelRatio:1,bl=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,n0=typeof Image<"u"&&Image.prototype.decode,Vd=function(){let i=!1;try{const t=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return i}();function Pe(i,t,e,n){let r;return e&&e.length?r=e.shift():bl?r=new OffscreenCanvas(i||300,t||300):r=document.createElement("canvas"),i&&(r.width=i),t&&(r.height=t),r.getContext("2d",n)}function kl(i){const t=i.canvas;t.width=1,t.height=1,i.clearRect(0,0,1,1)}function qd(i,t){const e=t.parentNode;e&&e.replaceChild(i,t)}function wl(i){return i&&i.parentNode?i.parentNode.removeChild(i):null}function r0(i){for(;i.lastChild;)i.removeChild(i.lastChild)}function o0(i,t){const e=i.childNodes;for(let n=0;;++n){const r=e[n],o=t[n];if(!r&&!o)break;if(r!==o){if(!r){i.appendChild(o);continue}if(!o){i.removeChild(r),--n;continue}i.insertBefore(o,r)}}}class s0 extends hi{constructor(t){super();const e=t.element;e&&!t.target&&!e.style.pointerEvents&&(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){wl(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&wl(this.element);for(let e=0,n=this.listenerKeys.length;e<n;++e)Ot(this.listenerKeys[e]);this.listenerKeys.length=0,this.map_=t,t&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==Ln&&this.listenerKeys.push(gt(t,qi.POSTRENDER,this.render,this)),t.render())}render(t){}setTarget(t){this.target_=typeof t=="string"?document.getElementById(t):t}}const mo=s0,As="ol-hidden",po="ol-unselectable",El="ol-control",Xd="ol-collapsed",a0=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-z]+?)\\s*$`].join(""),"i"),$d=["style","variant","weight","size","lineHeight","family"],Wd=function(i){const t=i.match(a0);if(!t)return null;const e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let n=0,r=$d.length;n<r;++n){const o=t[n+1];o!==void 0&&(e[$d[n]]=o)}return e.families=e.family.split(/,\s?/),e},At={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 l0 extends Error{constructor(t){const e="v"+Jp.split("-")[0],n="Assertion failed. See https://openlayers.org/en/"+e+"/doc/errors/#"+t+" for details.";super(n),this.code=t,this.name="AssertionError",this.message=n}}const Yd=l0;function ft(i,t){if(!i)throw new Yd(t)}function Wt(i,t,e){return Math.min(Math.max(i,t),e)}function h0(i,t,e,n,r,o){const s=r-e,a=o-n;if(s!==0||a!==0){const l=((i-e)*s+(t-n)*a)/(s*s+a*a);l>1?(e=r,n=o):l>0&&(e+=s*l,n+=a*l)}return On(i,t,e,n)}function On(i,t,e,n){const r=e-i,o=n-t;return r*r+o*o}function u0(i){const t=i.length;for(let n=0;n<t;n++){let r=n,o=Math.abs(i[n][n]);for(let a=n+1;a<t;a++){const l=Math.abs(i[a][n]);l>o&&(o=l,r=a)}if(o===0)return null;const s=i[r];i[r]=i[n],i[n]=s;for(let a=n+1;a<t;a++){const l=-i[a][n]/i[n][n];for(let h=n;h<t+1;h++)n==h?i[a][h]=0:i[a][h]+=l*i[n][h]}}const e=new Array(t);for(let n=t-1;n>=0;n--){e[n]=i[n][t]/i[n][n];for(let r=n-1;r>=0;r--)i[r][t]-=i[r][n]*e[n]}return e}function Nn(i){return i*Math.PI/180}function $i(i,t){const e=i%t;return e*t<0?e+t:e}function ki(i,t,e){return i+e*(t-i)}function Kd(i,t){const e=Math.pow(10,t);return Math.round(i*e)/e}function Ds(i,t){return Math.floor(Kd(i,t))}function Ls(i,t){return Math.ceil(Kd(i,t))}class d0 extends hi{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);typeof t.properties=="object"&&(delete e.properties,Object.assign(e,t.properties)),e[At.OPACITY]=t.opacity!==void 0?t.opacity:1,ft(typeof e[At.OPACITY]=="number",64),e[At.VISIBLE]=t.visible!==void 0?t.visible:!0,e[At.Z_INDEX]=t.zIndex,e[At.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[At.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[At.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[At.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=e.className!==void 0?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:t===void 0?!0:t},n=this.getZIndex();return e.opacity=Wt(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=n===void 0&&!e.managed?1/0:n,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return et()}getLayerStatesArray(t){return et()}getExtent(){return this.get(At.EXTENT)}getMaxResolution(){return this.get(At.MAX_RESOLUTION)}getMinResolution(){return this.get(At.MIN_RESOLUTION)}getMinZoom(){return this.get(At.MIN_ZOOM)}getMaxZoom(){return this.get(At.MAX_ZOOM)}getOpacity(){return this.get(At.OPACITY)}getSourceState(){return et()}getVisible(){return this.get(At.VISIBLE)}getZIndex(){return this.get(At.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(At.EXTENT,t)}setMaxResolution(t){this.set(At.MAX_RESOLUTION,t)}setMinResolution(t){this.set(At.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(At.MAX_ZOOM,t)}setMinZoom(t){this.set(At.MIN_ZOOM,t)}setOpacity(t){ft(typeof t=="number",64),this.set(At.OPACITY,t)}setVisible(t){this.set(At.VISIBLE,t)}setZIndex(t){this.set(At.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const Zd=d0,Wi={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};class c0 extends Zd{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(At.SOURCE,this.handleSourcePropertyChange_);const n=t.source?t.source:null;this.setSource(n)}getLayersArray(t){return t=t||[],t.push(this),t}getLayerStatesArray(t){return t=t||[],t.push(this.getLayerState()),t}getSource(){return this.get(At.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed()}handleSourcePropertyChange_(){this.sourceChangeKey_&&(Ot(this.sourceChangeKey_),this.sourceChangeKey_=null);const t=this.getSource();t&&(this.sourceChangeKey_=gt(t,tt.CHANGE,this.handleSourceChange_,this)),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise(e=>e([]))}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}render(t,e){const n=this.getRenderer();if(n.prepareFrame(t))return this.rendered=!0,n.renderFrame(t,e)}unrender(){this.rendered=!1}setMapInternal(t){t||this.unrender(),this.set(At.MAP,t)}getMapInternal(){return this.get(At.MAP)}setMap(t){this.mapPrecomposeKey_&&(Ot(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Ot(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=gt(t,Wi.PRECOMPOSE,function(e){const r=e.frameState.layerStatesArray,o=this.getLayerState(!1);ft(!r.some(function(s){return s.layer===o.layer}),67),r.push(o)},this),this.mapRenderKey_=gt(this,tt.CHANGE,t.render,t),this.changed())}setSource(t){this.set(At.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function Ml(i,t){if(!i.visible)return!1;const e=t.resolution;if(e<i.minResolution||e>=i.maxResolution)return!1;const n=t.zoom;return n>i.minZoom&&n<=i.maxZoom}const Fs=c0;class f0 extends mo{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=t.collapsed!==void 0?t.collapsed:!0,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=t.collapsible!==void 0,this.collapsible_=t.collapsible!==void 0?t.collapsible:!0,this.collapsible_||(this.collapsed_=!1);const e=t.className!==void 0?t.className:"ol-attribution",n=t.tipLabel!==void 0?t.tipLabel:"Attributions",r=t.expandClassName!==void 0?t.expandClassName:e+"-expand",o=t.collapseLabel!==void 0?t.collapseLabel:"\u203A",s=t.collapseClassName!==void 0?t.collapseClassName:e+"-collapse";typeof o=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=o,this.collapseLabel_.className=s):this.collapseLabel_=o;const a=t.label!==void 0?t.label:"i";typeof 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=n,this.toggleButton_.appendChild(l),this.toggleButton_.addEventListener(tt.CLICK,this.handleClick_.bind(this),!1);const h=e+" "+po+" "+El+(this.collapsed_&&this.collapsible_?" "+Xd:"")+(this.collapsible_?"":" ol-uncollapsible"),u=this.element;u.className=h,u.appendChild(this.toggleButton_),u.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e={},n=[];let r=!0;const o=t.layerStatesArray;for(let s=0,a=o.length;s<a;++s){const l=o[s];if(!Ml(l,t.viewState))continue;const h=l.layer.getSource();if(!h)continue;const u=h.getAttributions();if(!u)continue;const d=u(t);if(!!d)if(r=r&&h.getAttributionsCollapsible()!==!1,Array.isArray(d))for(let c=0,f=d.length;c<f;++c)d[c]in e||(n.push(d[c]),e[d[c]]=!0);else d in e||(n.push(d),e[d]=!0)}return this.overrideCollapsible_||this.setCollapsible(r),n}updateElement_(t){if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=this.collectSourceAttributions_(t),n=e.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!Vi(e,this.renderedAttributions_)){r0(this.ulElement_);for(let r=0,o=e.length;r<o;++r){const s=document.createElement("li");s.innerHTML=e[r],this.ulElement_.appendChild(s)}this.renderedAttributions_=e}}handleClick_(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(Xd),this.collapsed_?qd(this.collapseLabel_,this.label_):qd(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(t){this.userCollapsed_=t,!(!this.collapsible_||this.collapsed_===t)&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(t){this.updateElement_(t.frameState)}}const g0=f0,fe={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},Cl={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},xr={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class m0{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||xr[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const Os=m0,vo=6378137,br=Math.PI*vo,p0=[-br,-br,br,br],v0=[-180,-85,180,85],Ns=vo*Math.log(Math.tan(Math.PI/2));class kr extends Os{constructor(t){super({code:t,units:"m",extent:p0,global:!0,worldExtent:v0,getPointResolution:function(e,n){return e/Math.cosh(n[1]/vo)}})}}const Hd=[new kr("EPSG:3857"),new kr("EPSG:102100"),new kr("EPSG:102113"),new kr("EPSG:900913"),new kr("http://www.opengis.net/def/crs/EPSG/0/3857"),new kr("http://www.opengis.net/gml/srs/epsg.xml#3857")];function _0(i,t,e){const n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let r=0;r<n;r+=e){t[r]=br*i[r]/180;let o=vo*Math.log(Math.tan(Math.PI*(+i[r+1]+90)/360));o>Ns?o=Ns:o<-Ns&&(o=-Ns),t[r+1]=o}return t}function y0(i,t,e){const n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let r=0;r<n;r+=e)t[r]=180*i[r]/br,t[r+1]=360*Math.atan(Math.exp(i[r+1]/vo))/Math.PI-90;return t}const x0=6378137,Jd=[-180,-90,180,90],b0=Math.PI*x0/180;class Gn extends Os{constructor(t,e){super({code:t,units:"degrees",extent:Jd,axisOrientation:e,global:!0,metersPerUnit:b0,worldExtent:Jd})}}const Qd=[new Gn("CRS:84"),new Gn("EPSG:4326","neu"),new Gn("urn:ogc:def:crs:OGC:1.3:CRS84"),new Gn("urn:ogc:def:crs:OGC:2:84"),new Gn("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Gn("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Gn("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Sl={};function k0(i){return Sl[i]||Sl[i.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function w0(i,t){Sl[i]=t}let wr={};function Er(i,t,e){const n=i.getCode(),r=t.getCode();n in wr||(wr[n]={}),wr[n][r]=e}function tc(i,t){let e;return i in wr&&t in wr[i]&&(e=wr[i][t]),e}const ne={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function xe(i){const t=Ge();for(let e=0,n=i.length;e<n;++e)xo(t,i[e]);return t}function E0(i,t,e){const n=Math.min.apply(null,i),r=Math.min.apply(null,t),o=Math.max.apply(null,i),s=Math.max.apply(null,t);return ti(n,r,o,s,e)}function ui(i,t,e){return e?(e[0]=i[0]-t,e[1]=i[1]-t,e[2]=i[2]+t,e[3]=i[3]+t,e):[i[0]-t,i[1]-t,i[2]+t,i[3]+t]}function ec(i,t){return t?(t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t):i.slice()}function jn(i,t,e){let n,r;return t<i[0]?n=i[0]-t:i[2]<t?n=t-i[2]:n=0,e<i[1]?r=i[1]-e:i[3]<e?r=e-i[3]:r=0,n*n+r*r}function Gs(i,t){return Tl(i,t[0],t[1])}function Bn(i,t){return i[0]<=t[0]&&t[2]<=i[2]&&i[1]<=t[1]&&t[3]<=i[3]}function Tl(i,t,e){return i[0]<=t&&t<=i[2]&&i[1]<=e&&e<=i[3]}function zl(i,t){const e=i[0],n=i[1],r=i[2],o=i[3],s=t[0],a=t[1];let l=ne.UNKNOWN;return s<e?l=l|ne.LEFT:s>r&&(l=l|ne.RIGHT),a<n?l=l|ne.BELOW:a>o&&(l=l|ne.ABOVE),l===ne.UNKNOWN&&(l=ne.INTERSECTING),l}function Ge(){return[1/0,1/0,-1/0,-1/0]}function ti(i,t,e,n,r){return r?(r[0]=i,r[1]=t,r[2]=e,r[3]=n,r):[i,t,e,n]}function _o(i){return ti(1/0,1/0,-1/0,-1/0,i)}function yo(i,t){const e=i[0],n=i[1];return ti(e,n,e,n,t)}function Il(i,t,e,n,r){const o=_o(r);return nc(o,i,t,e,n)}function Mr(i,t){return i[0]==t[0]&&i[2]==t[2]&&i[1]==t[1]&&i[3]==t[3]}function ic(i,t){return t[0]<i[0]&&(i[0]=t[0]),t[2]>i[2]&&(i[2]=t[2]),t[1]<i[1]&&(i[1]=t[1]),t[3]>i[3]&&(i[3]=t[3]),i}function xo(i,t){t[0]<i[0]&&(i[0]=t[0]),t[0]>i[2]&&(i[2]=t[0]),t[1]<i[1]&&(i[1]=t[1]),t[1]>i[3]&&(i[3]=t[1])}function nc(i,t,e,n,r){for(;e<n;e+=r)M0(i,t[e],t[e+1]);return i}function M0(i,t,e){i[0]=Math.min(i[0],t),i[1]=Math.min(i[1],e),i[2]=Math.max(i[2],t),i[3]=Math.max(i[3],e)}function Rl(i,t){let e;return e=t(js(i)),e||(e=t(Bs(i)),e)||(e=t(Us(i)),e)||(e=t(Ki(i)),e)?e:!1}function Pl(i){let t=0;return Ll(i)||(t=Nt(i)*$e(i)),t}function js(i){return[i[0],i[1]]}function Bs(i){return[i[2],i[1]]}function Yi(i){return[(i[0]+i[2])/2,(i[1]+i[3])/2]}function C0(i,t){let e;return t==="bottom-left"?e=js(i):t==="bottom-right"?e=Bs(i):t==="top-left"?e=Ki(i):t==="top-right"?e=Us(i):ft(!1,13),e}function Al(i,t,e,n,r){const[o,s,a,l,h,u,d,c]=Dl(i,t,e,n);return ti(Math.min(o,a,h,d),Math.min(s,l,u,c),Math.max(o,a,h,d),Math.max(s,l,u,c),r)}function Dl(i,t,e,n){const r=t*n[0]/2,o=t*n[1]/2,s=Math.cos(e),a=Math.sin(e),l=r*s,h=r*a,u=o*s,d=o*a,c=i[0],f=i[1];return[c-l+d,f-h-u,c-l-d,f-h+u,c+l-d,f+h+u,c+l+d,f+h-u,c-l+d,f-h-u]}function $e(i){return i[3]-i[1]}function Un(i,t,e){const n=e||Ge();return Kt(i,t)?(i[0]>t[0]?n[0]=i[0]:n[0]=t[0],i[1]>t[1]?n[1]=i[1]:n[1]=t[1],i[2]<t[2]?n[2]=i[2]:n[2]=t[2],i[3]<t[3]?n[3]=i[3]:n[3]=t[3]):_o(n),n}function Ki(i){return[i[0],i[3]]}function Us(i){return[i[2],i[3]]}function Nt(i){return i[2]-i[0]}function Kt(i,t){return i[0]<=t[2]&&i[2]>=t[0]&&i[1]<=t[3]&&i[3]>=t[1]}function Ll(i){return i[2]<i[0]||i[3]<i[1]}function S0(i,t){return t?(t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t):i}function T0(i,t,e){let n=!1;const r=zl(i,t),o=zl(i,e);if(r===ne.INTERSECTING||o===ne.INTERSECTING)n=!0;else{const s=i[0],a=i[1],l=i[2],h=i[3],u=t[0],d=t[1],c=e[0],f=e[1],g=(f-d)/(c-u);let m,p;!!(o&ne.ABOVE)&&!(r&ne.ABOVE)&&(m=c-(f-h)/g,n=m>=s&&m<=l),!n&&!!(o&ne.RIGHT)&&!(r&ne.RIGHT)&&(p=f-(c-l)*g,n=p>=a&&p<=h),!n&&!!(o&ne.BELOW)&&!(r&ne.BELOW)&&(m=c-(f-a)/g,n=m>=s&&m<=l),!n&&!!(o&ne.LEFT)&&!(r&ne.LEFT)&&(p=f-(c-s)*g,n=p>=a&&p<=h)}return n}function z0(i,t,e,n){let r=[];if(n>1){const a=i[2]-i[0],l=i[3]-i[1];for(let h=0;h<n;++h)r.push(i[0]+a*h/n,i[1],i[2],i[1]+l*h/n,i[2]-a*h/n,i[3],i[0],i[3]-l*h/n)}else r=[i[0],i[1],i[2],i[1],i[2],i[3],i[0],i[3]];t(r,r,2);const o=[],s=[];for(let a=0,l=r.length;a<l;a+=2)o.push(r[a]),s.push(r[a+1]);return E0(o,s,e)}function rc(i,t){const e=t.getExtent(),n=Yi(i);if(t.canWrapX()&&(n[0]<e[0]||n[0]>=e[2])){const r=Nt(e),s=Math.floor((n[0]-e[0])/r)*r;i[0]-=s,i[2]-=s}return i}function I0(i,t){if(t.canWrapX()){const e=t.getExtent();if(!isFinite(i[0])||!isFinite(i[2]))return[[e[0],i[1],e[2],i[3]]];rc(i,t);const n=Nt(e);if(Nt(i)>n)return[[e[0],i[1],e[2],i[3]]];if(i[0]<e[0])return[[i[0]+n,i[1],e[2],i[3]],[e[0],i[1],i[2],i[3]]];if(i[2]>e[2])return[[i[0],i[1],e[2],i[3]],[e[0],i[1],i[2]-n,i[3]]]}return[i]}function R0(i,t){return i[0]+=+t[0],i[1]+=+t[1],i}function P0(i,t){const e=t.getRadius(),n=t.getCenter(),r=n[0],o=n[1],s=i[0],a=i[1];let l=s-r;const h=a-o;l===0&&h===0&&(l=1);const u=Math.sqrt(l*l+h*h),d=r+e*l/u,c=o+e*h/u;return[d,c]}function Fl(i,t){const e=i[0],n=i[1],r=t[0],o=t[1],s=r[0],a=r[1],l=o[0],h=o[1],u=l-s,d=h-a,c=u===0&&d===0?0:(u*(e-s)+d*(n-a))/(u*u+d*d||0);let f,g;return c<=0?(f=s,g=a):c>=1?(f=l,g=h):(f=s+c*u,g=a+c*d),[f,g]}function ei(i,t){let e=!0;for(let n=i.length-1;n>=0;--n)if(i[n]!=t[n]){e=!1;break}return e}function Ol(i,t){const e=Math.cos(t),n=Math.sin(t),r=i[0]*e-i[1]*n,o=i[1]*e+i[0]*n;return i[0]=r,i[1]=o,i}function A0(i,t){return i[0]*=t,i[1]*=t,i}function wi(i,t){const e=i[0]-t[0],n=i[1]-t[1];return e*e+n*n}function oc(i,t){return Math.sqrt(wi(i,t))}function D0(i,t){return wi(i,Fl(i,t))}function Nl(i,t){if(t.canWrapX()){const e=Nt(t.getExtent()),n=sc(i,t,e);n&&(i[0]-=n*e)}return i}function sc(i,t,e){const n=t.getExtent();let r=0;return t.canWrapX()&&(i[0]<n[0]||i[0]>n[2])&&(e=e||Nt(n),r=Math.floor((i[0]-n[0])/e)),r}const ac=63710088e-1;function lc(i,t,e){e=e||ac;const n=Nn(i[1]),r=Nn(t[1]),o=(r-n)/2,s=Nn(t[0]-i[0])/2,a=Math.sin(o)*Math.sin(o)+Math.sin(s)*Math.sin(s)*Math.cos(n)*Math.cos(r);return 2*e*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function Vs(i,t){let e=0;const n=i.length;let r=i[n-1][0],o=i[n-1][1];for(let s=0;s<n;s++){const a=i[s][0],l=i[s][1];e+=Nn(a-r)*(2+Math.sin(Nn(o))+Math.sin(Nn(l))),r=a,o=l}return e*t*t/2}function hc(i,t){t=t||{};const e=t.radius||ac,n=t.projection||"EPSG:3857",r=i.getType();r!=="GeometryCollection"&&(i=i.clone().transform(n,"EPSG:4326"));let o=0,s,a,l,h,u,d;switch(r){case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"LinearRing":break;case"Polygon":{for(s=i.getCoordinates(),o=Math.abs(Vs(s[0],e)),l=1,h=s.length;l<h;++l)o-=Math.abs(Vs(s[l],e));break}case"MultiPolygon":{for(s=i.getCoordinates(),l=0,h=s.length;l<h;++l)for(a=s[l],o+=Math.abs(Vs(a[0],e)),u=1,d=a.length;u<d;++u)o-=Math.abs(Vs(a[u],e));break}case"GeometryCollection":{const c=i.getGeometries();for(l=0,h=c.length;l<h;++l)o+=hc(c[l],t);break}default:throw new Error("Unsupported geometry type: "+r)}return o}let Gl=!0;function L0(i){Gl=!(i===void 0?!0:i)}function jl(i,t,e){if(t!==void 0){for(let n=0,r=i.length;n<r;++n)t[n]=i[n];t=t}else t=i.slice();return t}function uc(i,t,e){if(t!==void 0&&i!==t){for(let n=0,r=i.length;n<r;++n)t[n]=i[n];i=t}return i}function dc(i){w0(i.getCode(),i),Er(i,i,jl)}function F0(i){i.forEach(dc)}function Gt(i){return typeof i=="string"?k0(i):i||null}function qs(i,t,e,n){i=Gt(i);let r;const o=i.getPointResolutionFunc();if(o){if(r=o(t,e),n&&n!==i.getUnits()){const s=i.getMetersPerUnit();s&&(r=r*s/xr[n])}}else{const s=i.getUnits();if(s=="degrees"&&!n||n=="degrees")r=t;else{const a=Vl(i,Gt("EPSG:4326"));if(a===uc&&s!=="degrees")r=t*i.getMetersPerUnit();else{let h=[e[0]-t/2,e[1],e[0]+t/2,e[1],e[0],e[1]-t/2,e[0],e[1]+t/2];h=a(h,h,2);const u=lc(h.slice(0,2),h.slice(2,4)),d=lc(h.slice(4,6),h.slice(6,8));r=(u+d)/2}const l=n?xr[n]:i.getMetersPerUnit();l!==void 0&&(r/=l)}}return r}function Bl(i){F0(i),i.forEach(function(t){i.forEach(function(e){t!==e&&Er(t,e,jl)})})}function O0(i,t,e,n){i.forEach(function(r){t.forEach(function(o){Er(r,o,e),Er(o,r,n)})})}function Ul(i,t){return i?typeof i=="string"?Gt(i):i:Gt(t)}function cc(i){return function(t,e,n){const r=t.length;n=n!==void 0?n:2,e=e!==void 0?e:new Array(r);for(let o=0;o<r;o+=n){const s=i(t.slice(o,o+n)),a=s.length;for(let l=0,h=n;l<h;++l)e[o+l]=l>=a?t[o+l]:s[l]}return e}}function N0(i,t,e,n){const r=Gt(i),o=Gt(t);Er(r,o,cc(e)),Er(o,r,cc(n))}function G0(i,t){const e=Xs(i,t!==void 0?t:"EPSG:3857","EPSG:4326"),n=e[0];return(n<-180||n>180)&&(e[0]=$i(n+180,360)-180),e}function Vn(i,t){if(i===t)return!0;const e=i.getUnits()===t.getUnits();return(i.getCode()===t.getCode()||Vl(i,t)===jl)&&e}function Vl(i,t){const e=i.getCode(),n=t.getCode();let r=tc(e,n);return r||(r=uc),r}function bo(i,t){const e=Gt(i),n=Gt(t);return Vl(e,n)}function Xs(i,t,e){return bo(t,e)(i,void 0,i.length)}function j0(i,t,e,n){const r=bo(t,e);return z0(i,r,void 0,n)}function Cr(i,t){return i}function Vt(i,t){return Gl&&!ei(i,[0,0])&&i[0]>=-180&&i[0]<=180&&i[1]>=-90&&i[1]<=90&&(Gl=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),i}function ql(i,t){return i}function Zi(i,t){return i}function fc(i,t,e){return function(n){let r,o;if(i.canWrapX()){const s=i.getExtent(),a=Nt(s);n=n.slice(0),o=sc(n,i,a),o&&(n[0]=n[0]-o*a),n[0]=Wt(n[0],s[0],s[2]),n[1]=Wt(n[1],s[1],s[3]),r=e(n)}else r=e(n);return o&&t.canWrapX()&&(r[0]+=o*Nt(t.getExtent())),r}}function B0(){Bl(Hd),Bl(Qd),O0(Qd,Hd,_0,y0)}B0();const re={ADD:"add",REMOVE:"remove"},gc={LENGTH:"length"};class $s extends Qe{constructor(t,e,n){super(t),this.element=e,this.index=n}}class U0 extends hi{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let n=0,r=this.array_.length;n<r;++n)this.assertUnique_(this.array_[n],n);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(t){for(let e=0,n=t.length;e<n;++e)this.push(t[e]);return this}forEach(t){const e=this.array_;for(let n=0,r=e.length;n<r;++n)t(e[n],n,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(gc.LENGTH)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new $s(re.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let n=0,r=e.length;n<r;++n)if(e[n]===t)return this.removeAt(n)}removeAt(t){if(t<0||t>=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new $s(re.REMOVE,e,t)),e}setAt(t,e){const n=this.getLength();if(t>=n){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const r=this.array_[t];this.array_[t]=e,this.dispatchEvent(new $s(re.REMOVE,r,t)),this.dispatchEvent(new $s(re.ADD,e,t))}updateLength_(){this.set(gc.LENGTH,this.array_.length)}assertUnique_(t,e){for(let n=0,r=this.array_.length;n<r;++n)if(this.array_[n]===t&&n!==e)throw new Yd(58)}}const We=U0,mc=new Array(6);function Ye(){return[1,0,0,1,0,0]}function pc(i){return Ws(i,1,0,0,1,0,0)}function Xl(i,t){const e=i[0],n=i[1],r=i[2],o=i[3],s=i[4],a=i[5],l=t[0],h=t[1],u=t[2],d=t[3],c=t[4],f=t[5];return i[0]=e*l+r*h,i[1]=n*l+o*h,i[2]=e*u+r*d,i[3]=n*u+o*d,i[4]=e*c+r*f+s,i[5]=n*c+o*f+a,i}function Ws(i,t,e,n,r,o,s){return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i[4]=o,i[5]=s,i}function V0(i,t){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i}function Jt(i,t){const e=t[0],n=t[1];return t[0]=i[0]*e+i[2]*n+i[4],t[1]=i[1]*e+i[3]*n+i[5],t}function $l(i,t,e){return Xl(i,Ws(mc,t,0,0,e,0,0))}function q0(i,t,e){return Ws(i,t,0,0,e,0,0)}function X0(i,t,e){return Xl(i,Ws(mc,1,0,0,1,t,e))}function Ei(i,t,e,n,r,o,s,a){const l=Math.sin(o),h=Math.cos(o);return i[0]=n*h,i[1]=r*l,i[2]=-n*l,i[3]=r*h,i[4]=s*n*h-a*n*l+t,i[5]=s*r*l+a*r*h+e,i}function Wl(i,t){const e=$0(t);ft(e!==0,32);const n=t[0],r=t[1],o=t[2],s=t[3],a=t[4],l=t[5];return i[0]=s/e,i[1]=-r/e,i[2]=-o/e,i[3]=n/e,i[4]=(o*l-s*a)/e,i[5]=-(n*l-r*a)/e,i}function $0(i){return i[0]*i[3]-i[1]*i[2]}let vc;function _c(i){const t="matrix("+i.join(", ")+")";if(bl)return t;const e=vc||(vc=document.createElement("div"));return e.style.transform=t,e.style.transform}const W0=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Y0=/^([a-z]*)$|^hsla?\(.*\)$/i;function Yl(i){return typeof i=="string"?i:xc(i)}function K0(i){const t=document.createElement("div");if(t.style.color=i,t.style.color!==""){document.body.appendChild(t);const e=getComputedStyle(t).color;return document.body.removeChild(t),e}else return""}const Z0=function(){const t={};let e=0;return function(n){let r;if(t.hasOwnProperty(n))r=t[n];else{if(e>=1024){let o=0;for(const s in t)(o++&3)===0&&(delete t[s],--e)}r=H0(n),t[n]=r,++e}return r}}();function ko(i){return Array.isArray(i)?i:Z0(i)}function H0(i){let t,e,n,r,o;if(Y0.exec(i)&&(i=K0(i)),W0.exec(i)){const s=i.length-1;let a;s<=4?a=1:a=2;const l=s===4||s===8;t=parseInt(i.substr(1+0*a,a),16),e=parseInt(i.substr(1+1*a,a),16),n=parseInt(i.substr(1+2*a,a),16),l?r=parseInt(i.substr(1+3*a,a),16):r=255,a==1&&(t=(t<<4)+t,e=(e<<4)+e,n=(n<<4)+n,l&&(r=(r<<4)+r)),o=[t,e,n,r/255]}else i.startsWith("rgba(")?(o=i.slice(5,-1).split(",").map(Number),yc(o)):i.startsWith("rgb(")?(o=i.slice(4,-1).split(",").map(Number),o.push(1),yc(o)):ft(!1,14);return o}function yc(i){return i[0]=Wt(i[0]+.5|0,0,255),i[1]=Wt(i[1]+.5|0,0,255),i[2]=Wt(i[2]+.5|0,0,255),i[3]=Wt(i[3],0,1),i}function xc(i){let t=i[0];t!=(t|0)&&(t=t+.5|0);let e=i[1];e!=(e|0)&&(e=e+.5|0);let n=i[2];n!=(n|0)&&(n=n+.5|0);const r=i[3]===void 0?1:Math.round(i[3]*100)/100;return"rgba("+t+","+e+","+n+","+r+")"}class J0{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const n=this.cache_[e];(t++&3)===0&&!n.hasListener()&&(delete this.cache_[e],--this.cacheSize_)}}}get(t,e,n){const r=bc(t,e,n);return r in this.cache_?this.cache_[r]:null}set(t,e,n,r){const o=bc(t,e,n);this.cache_[o]=r,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function bc(i,t,e){const n=e?Yl(e):"null";return t+":"+i+":"+n}const Ys=new J0;class Q0 extends yl{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){et()}calculateMatrices2D(t){const e=t.viewState,n=t.coordinateToPixelTransform,r=t.pixelToCoordinateTransform;Ei(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Wl(r,n)}forEachFeatureAtCoordinate(t,e,n,r,o,s,a,l){let h;const u=e.viewState;function d(x,k,w,M){return o.call(s,k,x?w:null,M)}const c=u.projection,f=Nl(t.slice(),c),g=[[0,0]];if(c.canWrapX()&&r){const x=c.getExtent(),k=Nt(x);g.push([-k,0],[k,0])}const m=e.layerStatesArray,p=m.length,_=[],v=[];for(let x=0;x<g.length;x++)for(let k=p-1;k>=0;--k){const w=m[k],M=w.layer;if(M.hasRenderer()&&Ml(w,u)&&a.call(l,M)){const E=M.getRenderer(),S=M.getSource();if(E&&S){const I=S.getWrapX()?f:t,A=d.bind(null,w.managed);v[0]=I[0]+g[x][0],v[1]=I[1]+g[x][1],h=E.forEachFeatureAtCoordinate(v,e,n,A,_)}if(h)return h}}if(_.length===0)return;const y=1/_.length;return _.forEach((x,k)=>x.distanceSq+=k*y),_.sort((x,k)=>x.distanceSq-k.distanceSq),_.some(x=>h=x.callback(x.feature,x.layer,x.geometry)),h}hasFeatureAtCoordinate(t,e,n,r,o,s){return this.forEachFeatureAtCoordinate(t,e,n,r,Dn,this,o,s)!==void 0}getMap(){return this.map_}renderFrame(t){et()}scheduleExpireIconCache(t){Ys.canExpireCache()&&t.postRenderFunctions.push(tv)}}function tv(i,t){Ys.expire()}const ev=Q0;class iv extends Qe{constructor(t,e,n,r){super(t),this.inversePixelTransform=e,this.frameState=n,this.context=r}}const kc=iv,wc="10px sans-serif",Mi="#000",Ks="round",wo=[],Eo=0,Sr="round",Mo=10,Co="#000",So="center",Zs="middle",qn=[0,0,0,0],To=1,Ci=new hi;let Tr=null,Kl;const Zl={},nv=function(){const t="32px ",e=["monospace","serif"],n=e.length,r="wmytzilWMYTZIL@#/&?$%10\uF013";let o,s;function a(h,u,d){let c=!0;for(let f=0;f<n;++f){const g=e[f];if(s=Hs(h+" "+u+" "+t+g,r),d!=g){const m=Hs(h+" "+u+" "+t+d+","+g,r);c=c&&m!=s}}return!!c}function l(){let h=!0;const u=Ci.getKeys();for(let d=0,c=u.length;d<c;++d){const f=u[d];Ci.get(f)<100&&(a.apply(this,f.split(`
38
+ `))?(go(Zl),Tr=null,Kl=void 0,Ci.set(f,100)):(Ci.set(f,Ci.get(f)+1,!0),h=!1))}h&&(clearInterval(o),o=void 0)}return function(h){const u=Wd(h);if(!u)return;const d=u.families;for(let c=0,f=d.length;c<f;++c){const g=d[c],m=u.style+`
39
39
  `+u.weight+`
40
- `+g;Ci.get(m)===void 0&&(Ci.set(m,100,!0),a(u.style,u.weight,g)||(Ci.set(m,0,!0),o===void 0&&(o=setInterval(l,32))))}}}(),ov=function(){let i;return function(t){let e=Zl[t];if(e==null){if(bl){const n=Wd(t),r=Mc(t,"\u017Dg");e=(isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight))*(r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)}else i||(i=document.createElement("div"),i.innerHTML="M",i.style.minHeight="0",i.style.maxHeight="none",i.style.height="auto",i.style.padding="0",i.style.border="none",i.style.position="absolute",i.style.display="block",i.style.left="-99999px"),i.style.font=t,document.body.appendChild(i),e=i.offsetHeight,document.body.removeChild(i);Zl[t]=e}return e}}();function Mc(i,t){return Tr||(Tr=Pe(1,1)),i!=Kl&&(Tr.font=i,Kl=Tr.font),Tr.measureText(t)}function Js(i,t){return Mc(i,t).width}function Ec(i,t,e){if(t in e)return e[t];const n=t.split(`
41
- `).reduce((r,o)=>Math.max(r,Js(i,o)),0);return e[t]=n,n}function sv(i,t){const e=[],n=[],r=[];let o=0,s=0,a=0,l=0;for(let h=0,u=t.length;h<=u;h+=2){const d=t[h];if(d===`
42
- `||h===u){o=Math.max(o,s),r.push(s),s=0,a+=l;continue}const c=t[h+1]||i.font,f=Js(c,d);e.push(f),s+=f;const g=ov(c);n.push(g),l=Math.max(l,g)}return{width:o,height:a,widths:e,heights:n,lineWidths:r}}function av(i,t,e,n,r,o,s,a,l,h,u){i.save(),e!==1&&(i.globalAlpha*=e),t&&i.setTransform.apply(i,t),n.contextInstructions?(i.translate(l,h),i.scale(u[0],u[1]),lv(n,i)):u[0]<0||u[1]<0?(i.translate(l,h),i.scale(u[0],u[1]),i.drawImage(n,r,o,s,a,0,0,s,a)):i.drawImage(n,r,o,s,a,l,h,s*u[0],a*u[1]),i.restore()}function lv(i,t){const e=i.contextInstructions;for(let n=0,r=e.length;n<r;n+=2)Array.isArray(e[n+1])?t[e[n]].apply(t,e[n+1]):t[e[n]]=e[n+1]}class hv extends iv{constructor(t){super(t),this.fontChangeListenerKey_=gt(Ci,_r.PROPERTYCHANGE,t.redrawText.bind(t)),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=vo+" ol-layers";const n=t.getViewport();n.insertBefore(this.element_,n.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(t,e){const n=this.getMap();if(n.hasListener(t)){const r=new kc(t,void 0,e);n.dispatchEvent(r)}}disposeInternal(){Ot(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(t),this.dispatchRenderEvent(Wi.PRECOMPOSE,t);const e=t.layerStatesArray.sort(function(s,a){return s.zIndex-a.zIndex}),n=t.viewState;this.children_.length=0;const r=[];let o=null;for(let s=0,a=e.length;s<a;++s){const l=e[s];t.layerIndex=s;const h=l.layer,u=h.getSourceState();if(!El(l,n)||u!="ready"&&u!="undefined"){h.unrender();continue}const d=h.render(t,o);!d||(d!==o&&(this.children_.push(d),o=d),"getDeclutter"in h&&r.push(h))}for(let s=r.length-1;s>=0;--s)r[s].renderDeclutter(t);s0(this.element_,this.children_),this.dispatchRenderEvent(Wi.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}}const uv=hv;class Hi extends Qe{constructor(t,e){super(t),this.layer=e}}const Hl={LAYERS:"layers"};class Jl extends Zd{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let n=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Hl.LAYERS,this.handleLayersChanged_),n?Array.isArray(n)?n=new We(n.slice(),{unique:!0}):ft(typeof n.getArray=="function",43):n=new We(void 0,{unique:!0}),this.setLayers(n)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(Ot),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(gt(t,re.ADD,this.handleLayersAdd_,this),gt(t,re.REMOVE,this.handleLayersRemove_,this));for(const n in this.listenerKeys_)this.listenerKeys_[n].forEach(Ot);mo(this.listenerKeys_);const e=t.getArray();for(let n=0,r=e.length;n<r;n++){const o=e[n];this.registerLayerListeners_(o),this.dispatchEvent(new Hi("addlayer",o))}this.changed()}registerLayerListeners_(t){const e=[gt(t,_r.PROPERTYCHANGE,this.handleLayerChange_,this),gt(t,tt.CHANGE,this.handleLayerChange_,this)];t instanceof Jl&&e.push(gt(t,"addlayer",this.handleLayerGroupAdd_,this),gt(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[K(t)]=e}handleLayerGroupAdd_(t){this.dispatchEvent(new Hi("addlayer",t.layer))}handleLayerGroupRemove_(t){this.dispatchEvent(new Hi("removelayer",t.layer))}handleLayersAdd_(t){const e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new Hi("addlayer",e)),this.changed()}handleLayersRemove_(t){const e=t.element,n=K(e);this.listenerKeys_[n].forEach(Ot),delete this.listenerKeys_[n],this.dispatchEvent(new Hi("removelayer",e)),this.changed()}getLayers(){return this.get(Hl.LAYERS)}setLayers(t){const e=this.getLayers();if(e){const n=e.getArray();for(let r=0,o=n.length;r<o;++r)this.dispatchEvent(new Hi("removelayer",n[r]))}this.set(Hl.LAYERS,t)}getLayersArray(t){return t=t!==void 0?t:[],this.getLayers().forEach(function(e){e.getLayersArray(t)}),t}getLayerStatesArray(t){const e=t!==void 0?t:[],n=e.length;this.getLayers().forEach(function(s){s.getLayerStatesArray(e)});const r=this.getLayerState();let o=r.zIndex;!t&&r.zIndex===void 0&&(o=0);for(let s=n,a=e.length;s<a;s++){const l=e[s];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=Un(l.extent,r.extent):l.extent=r.extent),l.zIndex===void 0&&(l.zIndex=o)}return e}getSourceState(){return"ready"}}const Qs=Jl;class dv extends Qe{constructor(t,e,n){super(t),this.map=e,this.frameState=n!==void 0?n:null}}const zr=dv;class cv extends zr{constructor(t,e,n,r,o,s){super(t,e,o),this.originalEvent=n,this.pixel_=null,this.coordinate_=null,this.dragging=r!==void 0?r:!1,this.activePointers=s}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}const Si=cv,Mt={SINGLECLICK:"singleclick",CLICK:tt.CLICK,DBLCLICK:tt.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};class fv extends Is{constructor(t,e){super(t),this.map_=t,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=e===void 0?1:e,this.down_=null;const n=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=n,this.pointerdownListenerKey_=gt(n,Cl.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=gt(n,Cl.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(tt.TOUCHMOVE,this.boundHandleTouchMove_,Vd?{passive:!1}:!1)}emulateClick_(t){let e=new Si(Mt.CLICK,this.map_,t);this.dispatchEvent(e),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new Si(Mt.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;const n=new Si(Mt.SINGLECLICK,this.map_,t);this.dispatchEvent(n)}.bind(this),250)}updateActivePointers_(t){const e=t,n=e.pointerId;if(e.type==Mt.POINTERUP||e.type==Mt.POINTERCANCEL){delete this.trackedTouches_[n];for(const r in this.trackedTouches_)if(this.trackedTouches_[r].target!==e.target){delete this.trackedTouches_[r];break}}else(e.type==Mt.POINTERDOWN||e.type==Mt.POINTERMOVE)&&(this.trackedTouches_[n]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new Si(Mt.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(Ot),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return t.button===0}handlePointerDown_(t){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(t);const e=new Si(Mt.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.down_={};for(const n in t){const r=t[n];this.down_[n]=typeof r=="function"?Ln:r}if(this.dragListenerKeys_.length===0){const n=this.map_.getOwnerDocument();this.dragListenerKeys_.push(gt(n,Mt.POINTERMOVE,this.handlePointerMove_,this),gt(n,Mt.POINTERUP,this.handlePointerUp_,this),gt(this.element_,Mt.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==n&&this.dragListenerKeys_.push(gt(this.element_.getRootNode(),Mt.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new Si(Mt.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!!(this.down_&&this.isMoving_(t));this.dispatchEvent(new Si(Mt.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;(!e||e.defaultPrevented)&&(typeof t.cancelable!="boolean"||t.cancelable===!0)&&t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(Ot(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(tt.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Ot(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Ot),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const gv=fv,ta=1/0;class mv{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,mo(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,n=t[0];t.length==1?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const r=this.keyFunction_(n);return delete this.queuedElements_[r],n}enqueue(t){ft(!(this.keyFunction_(t)in this.queuedElements_),31);const e=this.priorityFunction_(t);return e!=ta?(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(t){return t*2+1}getRightChildIndex_(t){return t*2+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return this.elements_.length===0}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,n=this.priorities_,r=e.length,o=e[t],s=n[t],a=t;for(;t<r>>1;){const l=this.getLeftChildIndex_(t),h=this.getRightChildIndex_(t),u=h<r&&n[h]<n[l]?h:l;e[t]=e[u],n[t]=n[u],t=u}e[t]=o,n[t]=s,this.siftDown_(a,t)}siftDown_(t,e){const n=this.elements_,r=this.priorities_,o=n[e],s=r[e];for(;e>t;){const a=this.getParentIndex_(e);if(r[a]>s)n[e]=n[a],r[e]=r[a],e=a;else break}n[e]=o,r[e]=s}reprioritize(){const t=this.priorityFunction_,e=this.elements_,n=this.priorities_;let r=0;const o=e.length;let s,a,l;for(a=0;a<o;++a)s=e[a],l=t(s),l==ta?delete this.queuedElements_[this.keyFunction_(s)]:(n[r]=l,e[r++]=s);e.length=r,n.length=r,this.heapify_()}}const pv=mv,N={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class vv extends pv{constructor(t,e){super(function(n){return t.apply(null,n)},function(n){return n[0].getKey()}),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=e,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(t){const e=super.enqueue(t);return e&&t[0].addEventListener(tt.CHANGE,this.boundHandleTileChange_),e}getTilesLoading(){return this.tilesLoading_}handleTileChange(t){const e=t.target,n=e.getState();if(n===N.LOADED||n===N.ERROR||n===N.EMPTY){n!==N.ERROR&&e.removeEventListener(tt.CHANGE,this.boundHandleTileChange_);const r=e.getKey();r in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[r],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let n=0,r,o,s;for(;this.tilesLoading_<t&&n<e&&this.getCount()>0;)o=this.dequeue()[0],s=o.getKey(),r=o.getState(),r===N.IDLE&&!(s in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++n,o.load())}}const _v=vv;function yv(i,t,e,n,r){if(!i||!(e in i.wantedTiles)||!i.wantedTiles[e][t.getKey()])return ta;const o=i.viewState.center,s=n[0]-o[0],a=n[1]-o[1];return 65536*Math.log(r)+Math.sqrt(s*s+a*a)/r}const Yt={ANIMATING:0,INTERACTING:1},ii={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Cc=42,Ql=256;function Sc(i,t,e){return function(n,r,o,s,a){if(!n)return;if(!r&&!t)return n;const l=t?0:o[0]*r,h=t?0:o[1]*r,u=a?a[0]:0,d=a?a[1]:0;let c=i[0]+l/2+u,f=i[2]-l/2+u,g=i[1]+h/2+d,m=i[3]-h/2+d;c>f&&(c=(f+c)/2,f=c),g>m&&(g=(m+g)/2,m=g);let p=Wt(n[0],c,f),_=Wt(n[1],g,m);if(s&&e&&r){const v=30*r;p+=-v*Math.log(1+Math.max(0,c-n[0])/v)+v*Math.log(1+Math.max(0,n[0]-f)/v),_+=-v*Math.log(1+Math.max(0,g-n[1])/v)+v*Math.log(1+Math.max(0,n[1]-m)/v)}return[p,_]}}function xv(i){return i}function th(i,t,e,n){const r=Nt(t)/e[0],o=$e(t)/e[1];return n?Math.min(i,Math.max(r,o)):Math.min(i,Math.min(r,o))}function eh(i,t,e){let n=Math.min(i,t);const r=50;return n*=Math.log(1+r*Math.max(0,i/t-1))/r+1,e&&(n=Math.max(n,e),n/=Math.log(1+r*Math.max(0,e/i-1))/r+1),Wt(n,e/2,t*2)}function bv(i,t,e,n){return t=t!==void 0?t:!0,function(r,o,s,a){if(r!==void 0){const l=i[0],h=i[i.length-1],u=e?th(l,e,s,n):l;if(a)return t?eh(r,u,h):Wt(r,h,u);const d=Math.min(u,r),c=Math.floor(xl(i,d,o));return i[c]>u&&c<i.length-1?i[c+1]:i[c]}else return}}function kv(i,t,e,n,r,o){return n=n!==void 0?n:!0,e=e!==void 0?e:0,function(s,a,l,h){if(s!==void 0){const u=r?th(t,r,l,o):t;if(h)return n?eh(s,u,e):Wt(s,e,u);const d=1e-9,c=Math.ceil(Math.log(t/u)/Math.log(i)-d),f=-a*(.5-d)+.5,g=Math.min(u,s),m=Math.floor(Math.log(t/g)/Math.log(i)+f),p=Math.max(c,m),_=t/Math.pow(i,p);return Wt(_,e,u)}else return}}function Tc(i,t,e,n,r){return e=e!==void 0?e:!0,function(o,s,a,l){if(o!==void 0){const h=n?th(i,n,a,r):i;return!e||!l?Wt(o,t,h):eh(o,h,t)}else return}}function ih(i){if(i!==void 0)return 0}function zc(i){if(i!==void 0)return i}function wv(i){const t=2*Math.PI/i;return function(e,n){if(n)return e;if(e!==void 0)return e=Math.floor(e/t+.5)*t,e}}function Mv(i){return i=i||Nn(5),function(t,e){if(e)return t;if(t!==void 0)return Math.abs(t)<=i?0:t}}function Rc(i){return Math.pow(i,3)}function Rr(i){return 1-Rc(1-i)}function Ev(i){return 3*i*i-2*i*i*i}function Cv(i){return i}function Ji(i,t,e,n,r,o){o=o||[];let s=0;for(let a=t;a<e;a+=n){const l=i[a],h=i[a+1];o[s++]=r[0]*l+r[2]*h+r[4],o[s++]=r[1]*l+r[3]*h+r[5]}return o&&o.length!=s&&(o.length=s),o}function nh(i,t,e,n,r,o,s){s=s||[];const a=Math.cos(r),l=Math.sin(r),h=o[0],u=o[1];let d=0;for(let c=t;c<e;c+=n){const f=i[c]-h,g=i[c+1]-u;s[d++]=h+f*a-g*l,s[d++]=u+f*l+g*a;for(let m=c+2;m<c+n;++m)s[d++]=i[m]}return s&&s.length!=d&&(s.length=d),s}function Sv(i,t,e,n,r,o,s,a){a=a||[];const l=s[0],h=s[1];let u=0;for(let d=t;d<e;d+=n){const c=i[d]-l,f=i[d+1]-h;a[u++]=l+r*c,a[u++]=h+o*f;for(let g=d+2;g<d+n;++g)a[u++]=i[g]}return a&&a.length!=u&&(a.length=u),a}function Ic(i,t,e,n,r,o,s){s=s||[];let a=0;for(let l=t;l<e;l+=n){s[a++]=i[l]+r,s[a++]=i[l+1]+o;for(let h=l+2;h<l+n;++h)s[a++]=i[h]}return s&&s.length!=a&&(s.length=a),s}const Pc=Ye();class Tv extends hi{constructor(){super(),this.extent_=Ge(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=Kp(function(t,e,n){if(!n)return this.getSimplifiedGeometry(e);const r=this.clone();return r.applyTransform(n),r.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return et()}closestPointXY(t,e,n,r){return et()}containsXY(t,e){const n=this.getClosestPoint([t,e]);return n[0]===t&&n[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return et()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&yo(e),this.extentRevision_=this.getRevision()}return T0(this.extent_,t)}rotate(t,e){et()}scale(t,e,n){et()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return et()}getType(){return et()}applyTransform(t){et()}intersectsExtent(t){return et()}translate(t,e){et()}transform(t,e){const n=Gt(t),r=n.getUnits()=="tile-pixels"?function(o,s,a){const l=n.getExtent(),h=n.getWorldExtent(),u=$e(h)/$e(l);return Mi(Pc,h[0],h[3],u,-u,0,0,0),Ji(o,0,o.length,a,Pc,s),ko(n,e)(o,s,a)}:ko(n,e);return this.applyTransform(r),this}}const Ac=Tv;class zv extends Ac{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(t){return Rl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return et()}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(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=ea(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){et()}setLayout(t,e,n){let r;if(t)r=ea(t);else{for(let o=0;o<n;++o)if(e.length===0){this.layout="XY",this.stride=2;return}else e=e[0];r=e.length,t=Rv(r)}this.layout=t,this.stride=r}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const n=this.getFlatCoordinates();if(n){const r=this.getStride();nh(n,0,n.length,r,t,e,n),this.changed()}}scale(t,e,n){e===void 0&&(e=t),n||(n=Yi(this.getExtent()));const r=this.getFlatCoordinates();if(r){const o=this.getStride();Sv(r,0,r.length,o,t,e,n,r),this.changed()}}translate(t,e){const n=this.getFlatCoordinates();if(n){const r=this.getStride();Ic(n,0,n.length,r,t,e,n),this.changed()}}}function Rv(i){let t;return i==2?t="XY":i==3?t="XYZ":i==4&&(t="XYZM"),t}function ea(i){let t;return i=="XY"?t=2:i=="XYZ"||i=="XYM"?t=3:i=="XYZM"&&(t=4),t}function Iv(i,t,e){const n=i.getFlatCoordinates();if(n){const r=i.getStride();return Ji(n,0,n.length,r,t,e)}else return null}const Qi=zv;function Dc(i,t,e,n,r,o,s){const a=i[t],l=i[t+1],h=i[e]-a,u=i[e+1]-l;let d;if(h===0&&u===0)d=t;else{const c=((r-a)*h+(o-l)*u)/(h*h+u*u);if(c>1)d=e;else if(c>0){for(let f=0;f<n;++f)s[f]=ki(i[t+f],i[e+f],c);s.length=n;return}else d=t}for(let c=0;c<n;++c)s[c]=i[d+c];s.length=n}function rh(i,t,e,n,r){let o=i[t],s=i[t+1];for(t+=n;t<e;t+=n){const a=i[t],l=i[t+1],h=On(o,s,a,l);h>r&&(r=h),o=a,s=l}return r}function oh(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o){const a=e[o];r=rh(i,t,a,n,r),t=a}return r}function Pv(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o){const a=e[o];r=oh(i,t,a,n,r),t=a[a.length-1]}return r}function sh(i,t,e,n,r,o,s,a,l,h,u){if(t==e)return h;let d,c;if(r===0)if(c=On(s,a,i[t],i[t+1]),c<h){for(d=0;d<n;++d)l[d]=i[t+d];return l.length=n,c}else return h;u=u||[NaN,NaN];let f=t+n;for(;f<e;)if(Dc(i,f-n,f,n,s,a,u),c=On(s,a,u[0],u[1]),c<h){for(h=c,d=0;d<n;++d)l[d]=u[d];l.length=n,f+=n}else f+=n*Math.max((Math.sqrt(c)-Math.sqrt(h))/r|0,1);if(o&&(Dc(i,e-n,t,n,s,a,u),c=On(s,a,u[0],u[1]),c<h)){for(h=c,d=0;d<n;++d)l[d]=u[d];l.length=n}return h}function ah(i,t,e,n,r,o,s,a,l,h,u){u=u||[NaN,NaN];for(let d=0,c=e.length;d<c;++d){const f=e[d];h=sh(i,t,f,n,r,o,s,a,l,h,u),t=f}return h}function Av(i,t,e,n,r,o,s,a,l,h,u){u=u||[NaN,NaN];for(let d=0,c=e.length;d<c;++d){const f=e[d];h=ah(i,t,f,n,r,o,s,a,l,h,u),t=f[f.length-1]}return h}function Lc(i,t,e,n){for(let r=0,o=e.length;r<o;++r)i[t++]=e[r];return t}function ia(i,t,e,n){for(let r=0,o=e.length;r<o;++r){const s=e[r];for(let a=0;a<n;++a)i[t++]=s[a]}return t}function lh(i,t,e,n,r){r=r||[];let o=0;for(let s=0,a=e.length;s<a;++s){const l=ia(i,t,e[s],n);r[o++]=l,t=l}return r.length=o,r}function Dv(i,t,e,n,r){r=r||[];let o=0;for(let s=0,a=e.length;s<a;++s){const l=lh(i,t,e[s],n,r[o]);l.length===0&&(l[0]=t),r[o++]=l,t=l[l.length-1]}return r.length=o,r}function hh(i,t,e,n,r,o,s){const a=(e-t)/n;if(a<3){for(;t<e;t+=n)o[s++]=i[t],o[s++]=i[t+1];return s}const l=new Array(a);l[0]=1,l[a-1]=1;const h=[t,e-n];let u=0;for(;h.length>0;){const d=h.pop(),c=h.pop();let f=0;const g=i[c],m=i[c+1],p=i[d],_=i[d+1];for(let v=c+n;v<d;v+=n){const y=i[v],x=i[v+1],k=u0(y,x,g,m,p,_);k>f&&(u=v,f=k)}f>r&&(l[(u-t)/n]=1,c+n<u&&h.push(c,u),u+n<d&&h.push(u,d))}for(let d=0;d<a;++d)l[d]&&(o[s++]=i[t+d*n],o[s++]=i[t+d*n+1]);return s}function Lv(i,t,e,n,r,o,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l];s=hh(i,t,u,n,r,o,s),a.push(s),t=u}return s}function Xn(i,t){return t*Math.round(i/t)}function Fv(i,t,e,n,r,o,s){if(t==e)return s;let a=Xn(i[t],r),l=Xn(i[t+1],r);t+=n,o[s++]=a,o[s++]=l;let h,u;do if(h=Xn(i[t],r),u=Xn(i[t+1],r),t+=n,t==e)return o[s++]=h,o[s++]=u,s;while(h==a&&u==l);for(;t<e;){const d=Xn(i[t],r),c=Xn(i[t+1],r);if(t+=n,d==h&&c==u)continue;const f=h-a,g=u-l,m=d-a,p=c-l;if(f*p==g*m&&(f<0&&m<f||f==m||f>0&&m>f)&&(g<0&&p<g||g==p||g>0&&p>g)){h=d,u=c;continue}o[s++]=h,o[s++]=u,a=h,l=u,h=d,u=c}return o[s++]=h,o[s++]=u,s}function Fc(i,t,e,n,r,o,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l];s=Fv(i,t,u,n,r,o,s),a.push(s),t=u}return s}function Ov(i,t,e,n,r,o,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l],d=[];s=Fc(i,t,u,n,r,o,s,d),a.push(d),t=u[u.length-1]}return s}function tn(i,t,e,n,r){r=r!==void 0?r:[];let o=0;for(let s=t;s<e;s+=n)r[o++]=i.slice(s,s+n);return r.length=o,r}function Ro(i,t,e,n,r){r=r!==void 0?r:[];let o=0;for(let s=0,a=e.length;s<a;++s){const l=e[s];r[o++]=tn(i,t,l,n,r[o]),t=l}return r.length=o,r}function uh(i,t,e,n,r){r=r!==void 0?r:[];let o=0;for(let s=0,a=e.length;s<a;++s){const l=e[s];r[o++]=l.length===1&&l[0]===t?[]:Ro(i,t,l,n,r[o]),t=l[l.length-1]}return r.length=o,r}function Oc(i,t,e,n){let r=0,o=i[e-n],s=i[e-n+1];for(;t<e;t+=n){const a=i[t],l=i[t+1];r+=s*a-o*l,o=a,s=l}return r/2}function Nc(i,t,e,n){let r=0;for(let o=0,s=e.length;o<s;++o){const a=e[o];r+=Oc(i,t,a,n),t=a}return r}function Nv(i,t,e,n){let r=0;for(let o=0,s=e.length;o<s;++o){const a=e[o];r+=Nc(i,t,a,n),t=a[a.length-1]}return r}class na extends Qi{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}clone(){return new na(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),sh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,n,r))}getArea(){return Oc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=hh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new na(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ia(this.flatCoordinates,0,t,this.stride),this.changed()}}const Gc=na;class dh extends Qi{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new dh(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){const o=this.flatCoordinates,s=On(t,e,o[0],o[1]);if(s<r){const a=this.stride;for(let l=0;l<a;++l)n[l]=o[l];return n.length=a,s}else return r}getCoordinates(){return this.flatCoordinates?this.flatCoordinates.slice():[]}computeExtent(t){return xo(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return Tl(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Lc(this.flatCoordinates,0,t,this.stride),this.changed()}}const ni=dh;function Gv(i,t,e,n,r){return!Il(r,function(s){return!$n(i,t,e,n,s[0],s[1])})}function $n(i,t,e,n,r,o){let s=0,a=i[e-n],l=i[e-n+1];for(;t<e;t+=n){const h=i[t],u=i[t+1];l<=o?u>o&&(h-a)*(o-l)-(r-a)*(u-l)>0&&s++:u<=o&&(h-a)*(o-l)-(r-a)*(u-l)<0&&s--,a=h,l=u}return s!==0}function ch(i,t,e,n,r,o){if(e.length===0||!$n(i,t,e[0],n,r,o))return!1;for(let s=1,a=e.length;s<a;++s)if($n(i,e[s-1],e[s],n,r,o))return!1;return!0}function jv(i,t,e,n,r,o){if(e.length===0)return!1;for(let s=0,a=e.length;s<a;++s){const l=e[s];if(ch(i,t,l,n,r,o))return!0;t=l[l.length-1]}return!1}function fh(i,t,e,n,r,o,s){let a,l,h,u,d,c,f;const g=r[o+1],m=[];for(let v=0,y=e.length;v<y;++v){const x=e[v];for(u=i[x-n],c=i[x-n+1],a=t;a<x;a+=n)d=i[a],f=i[a+1],(g<=c&&f<=g||c<=g&&g<=f)&&(h=(g-c)/(f-c)*(d-u)+u,m.push(h)),u=d,c=f}let p=NaN,_=-1/0;for(m.sort(An),u=m[0],a=1,l=m.length;a<l;++a){d=m[a];const v=Math.abs(d-u);v>_&&(h=(u+d)/2,ch(i,t,e,n,h,g)&&(p=h,_=v)),u=d}return isNaN(p)&&(p=r[o]),s?(s.push(p,g,_),s):[p,g,_]}function jc(i,t,e,n,r){let o=[];for(let s=0,a=e.length;s<a;++s){const l=e[s];o=fh(i,t,l,n,r,2*s,o),t=l[l.length-1]}return o}function Bc(i,t,e,n,r){let o;for(t+=n;t<e;t+=n)if(o=r(i.slice(t-n,t),i.slice(t,t+n)),o)return o;return!1}function ra(i,t,e,n,r){const o=nc(Ge(),i,t,e,n);return Kt(r,o)?Bn(r,o)||o[0]>=r[0]&&o[2]<=r[2]||o[1]>=r[1]&&o[3]<=r[3]?!0:Bc(i,t,e,n,function(s,a){return z0(r,s,a)}):!1}function Bv(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o){if(ra(i,t,e[o],n,r))return!0;t=e[o]}return!1}function Uc(i,t,e,n,r){return!!(ra(i,t,e,n,r)||$n(i,t,e,n,r[0],r[1])||$n(i,t,e,n,r[0],r[3])||$n(i,t,e,n,r[2],r[1])||$n(i,t,e,n,r[2],r[3]))}function Vc(i,t,e,n,r){if(!Uc(i,t,e[0],n,r))return!1;if(e.length===1)return!0;for(let o=1,s=e.length;o<s;++o)if(Gv(i,e[o-1],e[o],n,r)&&!ra(i,e[o-1],e[o],n,r))return!1;return!0}function Uv(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o){const a=e[o];if(Vc(i,t,a,n,r))return!0;t=a[a.length-1]}return!1}function Vv(i,t,e,n){for(;t<e-n;){for(let r=0;r<n;++r){const o=i[t+r];i[t+r]=i[e-n+r],i[e-n+r]=o}t+=n,e-=n}}function gh(i,t,e,n){let r=0,o=i[e-n],s=i[e-n+1];for(;t<e;t+=n){const a=i[t],l=i[t+1];r+=(a-o)*(l+s),o=a,s=l}return r===0?void 0:r>0}function qc(i,t,e,n,r){r=r!==void 0?r:!1;for(let o=0,s=e.length;o<s;++o){const a=e[o],l=gh(i,t,a,n);if(o===0){if(r&&l||!r&&!l)return!1}else if(r&&!l||!r&&l)return!1;t=a}return!0}function qv(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o){const a=e[o];if(!qc(i,t,a,n,r))return!1;a.length&&(t=a[a.length-1])}return!0}function mh(i,t,e,n,r){r=r!==void 0?r:!1;for(let o=0,s=e.length;o<s;++o){const a=e[o],l=gh(i,t,a,n);(o===0?r&&l||!r&&!l:r&&!l||!r&&l)&&Vv(i,t,a,n),t=a}return t}function Xc(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o)t=mh(i,t,e[o],n,r);return t}function Xv(i,t){const e=[];let n=0,r=0;for(let o=0,s=t.length;o<s;++o){const a=t[o];if(!gh(i,n,a,2))e.push(t.slice(r,o+1));else{if(e.length===0)continue;e[e.length-1].push(t[r])}r=o+1,n=a}return e}class Ir extends Qi{constructor(t,e,n){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,e!==void 0&&n?(this.setFlatCoordinates(e,t),this.ends_=n):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?li(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new Ir(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(oh(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ah(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,n,r))}containsXY(t,e){return ch(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return Nc(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),mh(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,Ro(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=Yi(this.getExtent());this.flatInteriorPoint_=fh(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new ni(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new Gc(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,n=this.ends_,r=[];let o=0;for(let s=0,a=n.length;s<a;++s){const l=n[s],h=new Gc(e.slice(o,l),t);r.push(h),o=l}return r}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;qc(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=mh(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Fc(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,n),new Ir(e,"XY",n)}getType(){return"Polygon"}intersectsExtent(t){return Vc(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=lh(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}const Wn=Ir;function $c(i){const t=i[0],e=i[1],n=i[2],r=i[3],o=[t,e,t,r,n,r,n,e,t,e];return new Ir(o,"XY",[o.length])}function $v(i,t,e){t=t||32;const n=i.getStride(),r=i.getLayout(),o=i.getCenter(),s=n*(t+1),a=new Array(s);for(let u=0;u<s;u+=n){a[u]=0,a[u+1]=0;for(let d=2;d<n;d++)a[u+d]=o[d]}const l=[a.length],h=new Ir(a,r,l);return Wv(h,o,i.getRadius(),e),h}function Wv(i,t,e,n){const r=i.getFlatCoordinates(),o=i.getStride(),s=r.length/o-1,a=n||0;for(let l=0;l<=s;++l){const h=l*o,u=a+$i(l,s)*2*Math.PI/s;r[h]=t[0]+e*Math.cos(u),r[h+1]=t[1]+e*Math.sin(u)}i.changed()}const ph=0;class Yv extends hi{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=Ul(t.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,t.projection&&F0(),t.center&&(t.center=Vt(t.center,this.projection_)),t.extent&&(t.extent=Zi(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const a in ii)delete e[a];this.setProperties(e,!0);const n=Zv(t);this.maxResolution_=n.maxResolution,this.minResolution_=n.minResolution,this.zoomFactor_=n.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=n.minZoom;const r=Kv(t),o=n.constraint,s=Hv(t);this.constraints_={center:r,resolution:o,rotation:s},this.setRotation(t.rotation!==void 0?t.rotation:0),this.setCenterInternal(t.center!==void 0?t.center:null),t.resolution!==void 0?this.setResolution(t.resolution):t.zoom!==void 0&&this.setZoom(t.zoom)}get padding(){return this.padding_}set padding(t){let e=this.padding_;this.padding_=t;const n=this.getCenter();if(n){const r=t||[0,0,0,0];e=e||[0,0,0,0];const o=this.getResolution(),s=o/2*(r[3]-e[3]+e[1]-r[1]),a=o/2*(r[0]-e[0]+e[2]-r[2]);this.setCenterInternal([n[0]+s,n[1]-a])}}getUpdatedOptions_(t){const e=this.getProperties();return e.resolution!==void 0?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Object.assign({},e,t)}animate(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const e=new Array(arguments.length);for(let n=0;n<e.length;++n){let r=arguments[n];r.center&&(r=Object.assign({},r),r.center=Vt(r.center,this.getProjection())),r.anchor&&(r=Object.assign({},r),r.anchor=Vt(r.anchor,this.getProjection())),e[n]=r}this.animateInternal.apply(this,e)}animateInternal(t){let e=arguments.length,n;e>1&&typeof arguments[e-1]=="function"&&(n=arguments[e-1],--e);let r=0;for(;r<e&&!this.isDef();++r){const u=arguments[r];u.center&&this.setCenterInternal(u.center),u.zoom!==void 0?this.setZoom(u.zoom):u.resolution&&this.setResolution(u.resolution),u.rotation!==void 0&&this.setRotation(u.rotation)}if(r===e){n&&oa(n,!0);return}let o=Date.now(),s=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_;const h=[];for(;r<e;++r){const u=arguments[r],d={start:o,complete:!1,anchor:u.anchor,duration:u.duration!==void 0?u.duration:1e3,easing:u.easing||Ev,callback:n};if(u.center&&(d.sourceCenter=s,d.targetCenter=u.center.slice(),s=d.targetCenter),u.zoom!==void 0?(d.sourceResolution=a,d.targetResolution=this.getResolutionForZoom(u.zoom),a=d.targetResolution):u.resolution&&(d.sourceResolution=a,d.targetResolution=u.resolution,a=d.targetResolution),u.rotation!==void 0){d.sourceRotation=l;const c=$i(u.rotation-l+Math.PI,2*Math.PI)-Math.PI;d.targetRotation=l+c,l=d.targetRotation}Jv(d)?d.complete=!0:o+=d.duration,h.push(d)}this.animations_.push(h),this.setHint(Yt.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[Yt.ANIMATING]>0}getInteracting(){return this.hints_[Yt.INTERACTING]>0}cancelAnimations(){this.setHint(Yt.ANIMATING,-this.hints_[Yt.ANIMATING]);let t;for(let e=0,n=this.animations_.length;e<n;++e){const r=this.animations_[e];if(r[0].callback&&oa(r[0].callback,!1),!t)for(let o=0,s=r.length;o<s;++o){const a=r[o];if(!a.complete){t=a.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,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 t=Date.now();let e=!1;for(let n=this.animations_.length-1;n>=0;--n){const r=this.animations_[n];let o=!0;for(let s=0,a=r.length;s<a;++s){const l=r[s];if(l.complete)continue;const h=t-l.start;let u=l.duration>0?h/l.duration:1;u>=1?(l.complete=!0,u=1):o=!1;const d=l.easing(u);if(l.sourceCenter){const c=l.sourceCenter[0],f=l.sourceCenter[1],g=l.targetCenter[0],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;const p=c+d*(g-c),_=f+d*(m-f);this.targetCenter_=[p,_]}if(l.sourceResolution&&l.targetResolution){const c=d===1?l.targetResolution:l.sourceResolution+d*(l.targetResolution-l.sourceResolution);if(l.anchor){const f=this.getViewportSize_(this.getRotation()),g=this.constraints_.resolution(c,0,f,!0);this.targetCenter_=this.calculateCenterZoom(g,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=c,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const c=d===1?$i(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+d*(l.targetRotation-l.sourceRotation);if(l.anchor){const f=this.constraints_.rotation(c,!0);this.targetCenter_=this.calculateCenterRotate(f,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=c}if(this.applyTargetState_(!0),e=!0,!l.complete)break}if(o){this.animations_[n]=null,this.setHint(Yt.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const s=r[0].callback;s&&oa(s,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let n;const r=this.getCenterInternal();return r!==void 0&&(n=[r[0]-e[0],r[1]-e[1]],Ol(n,t-this.getRotation()),P0(n,e)),n}calculateCenterZoom(t,e){let n;const r=this.getCenterInternal(),o=this.getResolution();if(r!==void 0&&o!==void 0){const s=e[0]-t*(e[0]-r[0])/o,a=e[1]-t*(e[1]-r[1])/o;n=[s,a]}return n}getViewportSize_(t){const e=this.viewportSize_;if(t){const n=e[0],r=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(r*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(r*Math.cos(t))]}else return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t&&Cr(t,this.getProjection())}getCenterInternal(){return this.get(ii.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return ql(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();ft(e,1);const n=this.getResolution();ft(n!==void 0,2);const r=this.getRotation();return ft(r!==void 0,3),Al(e,n,r,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(ii.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(Zi(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const n=Nt(t)/e[0],r=$e(t)/e[1];return Math.max(n,r)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(e/n)/Math.log(t);return function(o){return e/Math.pow(t,o*r)}}getRotation(){return this.get(ii.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,o=Math.log(n/r)/e;return function(s){return Math.log(n/s)/e/o}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),n=this.getRotation();let r=this.getCenterInternal();const o=this.padding_;if(o){const s=this.getViewportSizeMinusPadding_();r=vh(r,this.getViewportSize_(),[s[0]/2+o[3],s[1]/2+o[0]],e,n)}return{center:r.slice(0),projection:t!==void 0?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}}getZoom(){let t;const e=this.getResolution();return e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,n,r;if(this.resolutions_){const o=xl(this.resolutions_,t,1);e=o,n=this.resolutions_[o],o==this.resolutions_.length-1?r=2:r=n/this.resolutions_[o+1]}else n=this.maxResolution_,r=this.zoomFactor_;return e+Math.log(n/t)/Math.log(r)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=Wt(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,Wt(t-e,0,1))}else return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let n;if(ft(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function",24),Array.isArray(t)){ft(!Ll(t),25);const r=Zi(t,this.getProjection());n=$c(r)}else if(t.getType()==="Circle"){const r=Zi(t.getExtent(),this.getProjection());n=$c(r),n.rotate(this.getRotation(),Yi(r))}else n=t;this.fitInternal(n,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),n=Math.cos(e),r=Math.sin(-e),o=t.getFlatCoordinates(),s=t.getStride();let a=1/0,l=1/0,h=-1/0,u=-1/0;for(let d=0,c=o.length;d<c;d+=s){const f=o[d]*n-o[d+1]*r,g=o[d]*r+o[d+1]*n;a=Math.min(a,f),l=Math.min(l,g),h=Math.max(h,f),u=Math.max(u,g)}return[a,l,h,u]}fitInternal(t,e){e=e||{};let n=e.size;n||(n=this.getViewportSizeMinusPadding_());const r=e.padding!==void 0?e.padding:[0,0,0,0],o=e.nearest!==void 0?e.nearest:!1;let s;e.minResolution!==void 0?s=e.minResolution:e.maxZoom!==void 0?s=this.getResolutionForZoom(e.maxZoom):s=0;const a=this.rotatedExtentForGeometry(t);let l=this.getResolutionForExtentInternal(a,[n[0]-r[1]-r[3],n[1]-r[0]-r[2]]);l=isNaN(l)?s:Math.max(l,s),l=this.getConstrainedResolution(l,o?0:1);const h=this.getRotation(),u=Math.sin(h),d=Math.cos(h),c=Yi(a);c[0]+=(r[1]-r[3])/2*l,c[1]+=(r[0]-r[2])/2*l;const f=c[0]*d-c[1]*u,g=c[1]*d+c[0]*u,m=this.getConstrainedCenter([f,g],l),p=e.callback?e.callback:Ln;e.duration!==void 0?this.animateInternal({resolution:l,center:m,duration:e.duration,easing:e.easing},p):(this.targetResolution_=l,this.targetCenter_=m,this.applyTargetState_(!1,!0),oa(p,!0))}centerOn(t,e,n){this.centerOnInternal(Vt(t,this.getProjection()),e,n)}centerOnInternal(t,e,n){this.setCenterInternal(vh(t,e,n,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,n,r){let o;const s=this.padding_;if(s&&t){const a=this.getViewportSizeMinusPadding_(-n),l=vh(t,r,[a[0]/2+s[3],a[1]/2+s[0]],e,n);o=[t[0]-l[0],t[1]-l[1]]}return o}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(t){const e=Cr(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])}adjustCenterInternal(t){const e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])}adjustResolution(t,e){e=e&&Vt(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const n=this.getAnimating()||this.getInteracting(),r=this.getViewportSize_(this.getRotation()),o=this.constraints_.resolution(this.targetResolution_*t,0,r,n);e&&(this.targetCenter_=this.calculateCenterZoom(o,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=Vt(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){const n=this.getAnimating()||this.getInteracting(),r=this.constraints_.rotation(this.targetRotation_+t,n);e&&(this.targetCenter_=this.calculateCenterRotate(r,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t&&Vt(t,this.getProjection()))}setCenterInternal(t){this.targetCenter_=t,this.applyTargetState_()}setHint(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]}setResolution(t){this.targetResolution_=t,this.applyTargetState_()}setRotation(t){this.targetRotation_=t,this.applyTargetState_()}setZoom(t){this.setResolution(this.getResolutionForZoom(t))}applyTargetState_(t,e){const n=this.getAnimating()||this.getInteracting()||e,r=this.constraints_.rotation(this.targetRotation_,n),o=this.getViewportSize_(r),s=this.constraints_.resolution(this.targetResolution_,0,o,n),a=this.constraints_.center(this.targetCenter_,s,o,n,this.calculateCenterShift(this.targetCenter_,s,r,o));this.get(ii.ROTATION)!==r&&this.set(ii.ROTATION,r),this.get(ii.RESOLUTION)!==s&&(this.set(ii.RESOLUTION,s),this.set("zoom",this.getZoom(),!0)),(!a||!this.get(ii.CENTER)||!ei(this.get(ii.CENTER),a))&&this.set(ii.CENTER,a),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,n){t=t!==void 0?t:200;const r=e||0,o=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(o),a=this.constraints_.resolution(this.targetResolution_,r,s),l=this.constraints_.center(this.targetCenter_,a,s,!1,this.calculateCenterShift(this.targetCenter_,a,o,s));if(t===0&&!this.cancelAnchor_){this.targetResolution_=a,this.targetRotation_=o,this.targetCenter_=l,this.applyTargetState_();return}n=n||(t===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==a||this.getRotation()!==o||!this.getCenterInternal()||!ei(this.getCenterInternal(),l))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:l,resolution:a,duration:t,easing:Rr,anchor:n}))}beginInteraction(){this.resolveConstraints(0),this.setHint(Yt.INTERACTING,1)}endInteraction(t,e,n){n=n&&Vt(n,this.getProjection()),this.endInteractionInternal(t,e,n)}endInteractionInternal(t,e,n){this.setHint(Yt.INTERACTING,-1),this.resolveConstraints(t,e,n)}getConstrainedCenter(t,e){const n=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),n)}getConstrainedZoom(t,e){const n=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(n,e))}getConstrainedResolution(t,e){e=e||0;const n=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,n)}}function oa(i,t){setTimeout(function(){i(t)},0)}function Kv(i){if(i.extent!==void 0){const e=i.smoothExtentConstraint!==void 0?i.smoothExtentConstraint:!0;return Sc(i.extent,i.constrainOnlyCenter,e)}const t=Ul(i.projection,"EPSG:3857");if(i.multiWorld!==!0&&t.isGlobal()){const e=t.getExtent().slice();return e[0]=-1/0,e[2]=1/0,Sc(e,!1,!1)}return xv}function Zv(i){let t,e,n,s=i.minZoom!==void 0?i.minZoom:ph,a=i.maxZoom!==void 0?i.maxZoom:28;const l=i.zoomFactor!==void 0?i.zoomFactor:2,h=i.multiWorld!==void 0?i.multiWorld:!1,u=i.smoothResolutionConstraint!==void 0?i.smoothResolutionConstraint:!0,d=i.showFullExtent!==void 0?i.showFullExtent:!1,c=Ul(i.projection,"EPSG:3857"),f=c.getExtent();let g=i.constrainOnlyCenter,m=i.extent;if(!h&&!m&&c.isGlobal()&&(g=!1,m=f),i.resolutions!==void 0){const p=i.resolutions;e=p[s],n=p[a]!==void 0?p[a]:p[p.length-1],i.constrainResolution?t=bv(p,u,!g&&m,d):t=Tc(e,n,u,!g&&m,d)}else{const _=(f?Math.max(Nt(f),$e(f)):360*xr.degrees/c.getMetersPerUnit())/Ql/Math.pow(2,ph),v=_/Math.pow(2,28-ph);e=i.maxResolution,e!==void 0?s=0:e=_/Math.pow(l,s),n=i.minResolution,n===void 0&&(i.maxZoom!==void 0?i.maxResolution!==void 0?n=e/Math.pow(l,a):n=_/Math.pow(l,a):n=v),a=s+Math.floor(Math.log(e/n)/Math.log(l)),n=e/Math.pow(l,a-s),i.constrainResolution?t=kv(l,e,n,u,!g&&m,d):t=Tc(e,n,u,!g&&m,d)}return{constraint:t,maxResolution:e,minResolution:n,minZoom:s,zoomFactor:l}}function Hv(i){if(i.enableRotation!==void 0?i.enableRotation:!0){const e=i.constrainRotation;return e===void 0||e===!0?Mv():e===!1?zc:typeof e=="number"?wv(e):zc}else return ih}function Jv(i){return!(i.sourceCenter&&i.targetCenter&&!ei(i.sourceCenter,i.targetCenter)||i.sourceResolution!==i.targetResolution||i.sourceRotation!==i.targetRotation)}function vh(i,t,e,n,r){const o=Math.cos(-r);let s=Math.sin(-r),a=i[0]*o-i[1]*s,l=i[1]*o+i[0]*s;a+=(t[0]/2-e[0])*n,l+=(e[1]-t[1]/2)*n,s=-s;const h=a*o-l*s,u=l*o+a*s;return[h,u]}const en=Yv;class Qv extends po{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=t.className!==void 0?t.className:"ol-rotate",n=t.label!==void 0?t.label:"\u21E7",r=t.compassClassName!==void 0?t.compassClassName:"ol-compass";this.label_=null,typeof n=="string"?(this.label_=document.createElement("span"),this.label_.className=r,this.label_.textContent=n):(this.label_=n,this.label_.classList.add(r));const o=t.tipLabel?t.tipLabel:"Reset rotation",s=document.createElement("button");s.className=e+"-reset",s.setAttribute("type","button"),s.title=o,s.appendChild(this.label_),s.addEventListener(tt.CLICK,this.handleClick_.bind(this),!1);const a=e+" "+vo+" "+Ml,l=this.element;l.className=a,l.appendChild(s),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=t.duration!==void 0?t.duration:250,this.autoHide_=t.autoHide!==void 0?t.autoHide:!0,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(Ds)}handleClick_(t){t.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const e=this.getMap().getView();if(!e)return;const n=e.getRotation();n!==void 0&&(this.duration_>0&&n%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:Rr}):e.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const n=e.viewState.rotation;if(n!=this.rotation_){const r="rotate("+n+"rad)";if(this.autoHide_){const o=this.element.classList.contains(Ds);!o&&n===0?this.element.classList.add(Ds):o&&n!==0&&this.element.classList.remove(Ds)}this.label_.style.transform=r}this.rotation_=n}}const t_=Qv;class e_ extends po{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=t.className!==void 0?t.className:"ol-zoom",n=t.delta!==void 0?t.delta:1,r=t.zoomInClassName!==void 0?t.zoomInClassName:e+"-in",o=t.zoomOutClassName!==void 0?t.zoomOutClassName:e+"-out",s=t.zoomInLabel!==void 0?t.zoomInLabel:"+",a=t.zoomOutLabel!==void 0?t.zoomOutLabel:"\u2013",l=t.zoomInTipLabel!==void 0?t.zoomInTipLabel:"Zoom in",h=t.zoomOutTipLabel!==void 0?t.zoomOutTipLabel:"Zoom out",u=document.createElement("button");u.className=r,u.setAttribute("type","button"),u.title=l,u.appendChild(typeof s=="string"?document.createTextNode(s):s),u.addEventListener(tt.CLICK,this.handleClick_.bind(this,n),!1);const d=document.createElement("button");d.className=o,d.setAttribute("type","button"),d.title=h,d.appendChild(typeof a=="string"?document.createTextNode(a):a),d.addEventListener(tt.CLICK,this.handleClick_.bind(this,-n),!1);const c=e+" "+vo+" "+Ml,f=this.element;f.className=c,f.appendChild(u),f.appendChild(d),this.duration_=t.duration!==void 0?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const n=this.getMap().getView();if(!n)return;const r=n.getZoom();if(r!==void 0){const o=n.getConstrainedZoom(r+t);this.duration_>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:o,duration:this.duration_,easing:Rr})):n.setZoom(o)}}}const i_=e_;function Wc(i){i=i||{};const t=new We;return(i.zoom!==void 0?i.zoom:!0)&&t.push(new i_(i.zoomOptions)),(i.rotate!==void 0?i.rotate:!0)&&t.push(new t_(i.rotateOptions)),(i.attribution!==void 0?i.attribution:!0)&&t.push(new m0(i.attributionOptions)),t}const _h={ACTIVE:"active"};class n_ extends hi{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(_h.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(_h.ACTIVE,t)}setMap(t){this.map_=t}}function r_(i,t,e){const n=i.getCenterInternal();if(n){const r=[n[0]+t[0],n[1]+t[1]];i.animateInternal({duration:e!==void 0?e:250,easing:Cv,center:i.getConstrainedCenter(r)})}}function yh(i,t,e,n){const r=i.getZoom();if(r===void 0)return;const o=i.getConstrainedZoom(r+t),s=i.getResolutionForZoom(o);i.getAnimating()&&i.cancelAnimations(),i.animate({resolution:s,anchor:e,duration:n!==void 0?n:250,easing:Rr})}const Io=n_;class o_ extends Io{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:250}handleEvent(t){let e=!1;if(t.type==Mt.DBLCLICK){const n=t.originalEvent,r=t.map,o=t.coordinate,s=n.shiftKey?-this.delta_:this.delta_,a=r.getView();yh(a,s,o,this.duration_),n.preventDefault(),e=!0}return!e}}const s_=o_;class a_ extends Io{constructor(t){t=t||{},super(t),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==Mt.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==Mt.POINTERUP){const n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==Mt.POINTERDOWN){const n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==Mt.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function xh(i){const t=i.length;let e=0,n=0;for(let r=0;r<t;r++)e+=i[r].clientX,n+=i[r].clientY;return[e/t,n/t]}const nn=a_;function bh(i){const t=arguments;return function(e){let n=!0;for(let r=0,o=t.length;r<o&&(n=n&&t[r](e),!!n);++r);return n}}const l_=function(i){const t=i.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},h_=function(i){const t=i.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},u_=function(i){const t=i.map.getTargetElement(),e=i.map.getOwnerDocument().activeElement;return t.contains(e)},Yc=function(i){return i.map.getTargetElement().hasAttribute("tabindex")?u_(i):!0},kh=Dn,Kc=function(i){const t=i.originalEvent;return t.button==0&&!(i0&&n0&&t.ctrlKey)},d_=function(i){return i.type==Mt.SINGLECLICK},wh=function(i){const t=i.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},Zc=function(i){const t=i.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},Hc=function(i){const t=i.originalEvent,e=t.target.tagName;return e!=="INPUT"&&e!=="SELECT"&&e!=="TEXTAREA"&&!t.target.isContentEditable},Mh=function(i){const t=i.originalEvent;return ft(t!==void 0,56),t.pointerType=="mouse"},Jc=function(i){const t=i.originalEvent;return ft(t!==void 0,56),t.isPrimary&&t.button===0};class c_ extends nn{constructor(t){super({stopDown:yr}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:bh(wh,Jc);this.condition_=t.onFocusOnly?bh(Yc,e):e,this.noKinetic_=!1}handleDragEvent(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());const e=this.targetPointers,n=xh(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){const r=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],s=t.map.getView();D0(r,s.getResolution()),Ol(r,s.getRotation()),s.adjustCenterInternal(r)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=n,this.lastPointersCount_=e.length,t.originalEvent.preventDefault()}handleUpEvent(t){const e=t.map,n=e.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const r=this.kinetic_.getDistance(),o=this.kinetic_.getAngle(),s=n.getCenterInternal(),a=e.getPixelFromCoordinateInternal(s),l=e.getCoordinateFromPixelInternal([a[0]-r*Math.cos(o),a[1]-r*Math.sin(o)]);n.animateInternal({center:n.getConstrainedCenter(l),duration:500,easing:Rr})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1}else return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){const n=t.map.getView();return this.lastCentroid=null,n.getAnimating()&&n.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}else return!1}}const f_=c_;class g_ extends nn{constructor(t){t=t||{},super({stopDown:yr}),this.condition_=t.condition?t.condition:h_,this.lastAngle_=void 0,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){if(!Mh(t))return;const e=t.map,n=e.getView();if(n.getConstraints().rotation===ih)return;const r=e.getSize(),o=t.pixel,s=Math.atan2(r[1]/2-o[1],o[0]-r[0]/2);if(this.lastAngle_!==void 0){const a=s-this.lastAngle_;n.adjustRotationInternal(-a)}this.lastAngle_=s}handleUpEvent(t){return Mh(t)?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){return Mh(t)&&Kc(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}const m_=g_;class p_ extends yl{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,n="px",r=this.element_.style;r.left=Math.min(t[0],e[0])+n,r.top=Math.min(t[1],e[1])+n,r.width=Math.abs(e[0]-t[0])+n,r.height=Math.abs(e[1]-t[1])+n}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const t=this.startPixel_,e=this.endPixel_,r=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);r[4]=r[0].slice(),this.geometry_?this.geometry_.setCoordinates([r]):this.geometry_=new Wn([r])}getGeometry(){return this.geometry_}}const v_=p_,sa={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class Eh extends Qe{constructor(t,e,n){super(t),this.coordinate=e,this.mapBrowserEvent=n}}class __ extends nn{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new v_(t.className||"ol-dragbox"),this.minArea_=t.minArea!==void 0?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:Kc,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,n){const r=n[0]-e[0],o=n[1]-e[1];return r*r+o*o>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Eh(sa.BOXDRAG,t.coordinate,t))}handleUpEvent(t){this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Eh(e?sa.BOXEND:sa.BOXCANCEL,t.coordinate,t)),!1}handleDownEvent(t){return this.condition_(t)?(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Eh(sa.BOXSTART,t.coordinate,t)),!0):!1}onBoxEnd(t){}}const y_=__;class x_ extends y_{constructor(t){t=t||{};const e=t.condition?t.condition:Zc;super({condition:e,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=t.duration!==void 0?t.duration:200,this.out_=t.out!==void 0?t.out:!1}onBoxEnd(t){const n=this.getMap().getView();let r=this.getGeometry();if(this.out_){const o=n.rotatedExtentForGeometry(r),s=n.getResolutionForExtentInternal(o),a=n.getResolution()/s;r=r.clone(),r.scale(a*a)}n.fitInternal(r,{duration:this.duration_,easing:Rr})}}const b_=x_,Yn={LEFT:37,UP:38,RIGHT:39,DOWN:40};class k_ extends Io{constructor(t){super(),t=t||{},this.defaultCondition_=function(e){return wh(e)&&Hc(e)},this.condition_=t.condition!==void 0?t.condition:this.defaultCondition_,this.duration_=t.duration!==void 0?t.duration:100,this.pixelDelta_=t.pixelDelta!==void 0?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==tt.KEYDOWN){const n=t.originalEvent,r=n.keyCode;if(this.condition_(t)&&(r==Yn.DOWN||r==Yn.LEFT||r==Yn.RIGHT||r==Yn.UP)){const s=t.map.getView(),a=s.getResolution()*this.pixelDelta_;let l=0,h=0;r==Yn.DOWN?h=-a:r==Yn.LEFT?l=-a:r==Yn.RIGHT?l=a:h=a;const u=[l,h];Ol(u,s.getRotation()),r_(s,u,this.duration_),n.preventDefault(),e=!0}}return!e}}const w_=k_;class M_ extends Io{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:Hc,this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:100}handleEvent(t){let e=!1;if(t.type==tt.KEYDOWN||t.type==tt.KEYPRESS){const n=t.originalEvent,r=n.charCode;if(this.condition_(t)&&(r=="+".charCodeAt(0)||r=="-".charCodeAt(0))){const o=t.map,s=r=="+".charCodeAt(0)?this.delta_:-this.delta_,a=o.getView();yh(a,s,void 0,this.duration_),n.preventDefault(),e=!0}}return!e}}const E_=M_;class C_{constructor(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;let n=e-3;for(;n>0&&this.points_[n+2]>t;)n-=3;const r=this.points_[e+2]-this.points_[n+2];if(r<1e3/60)return!1;const o=this.points_[e]-this.points_[n],s=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(s,o),this.initialVelocity_=Math.sqrt(o*o+s*s)/r,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}const S_=C_;class T_ extends Io{constructor(t){t=t||{},super(t),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=t.maxDelta!==void 0?t.maxDelta:1,this.duration_=t.duration!==void 0?t.duration:250,this.timeout_=t.timeout!==void 0?t.timeout:80,this.useAnchor_=t.useAnchor!==void 0?t.useAnchor:!0,this.constrainResolution_=t.constrainResolution!==void 0?t.constrainResolution:!1;const e=t.condition?t.condition:kh;this.condition_=t.onFocusOnly?bh(Yc,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();if(!t)return;t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t)||t.type!==tt.WHEEL)return!0;const n=t.map,r=t.originalEvent;r.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate);let o;if(t.type==tt.WHEEL&&(o=r.deltaY,e0&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(o/=Ud),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(o*=40)),o===0)return!1;this.lastDelta_=o;const s=Date.now();this.startTime_===void 0&&(this.startTime_=s),(!this.mode_||s-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(o)<4?"trackpad":"wheel");const a=n.getView();if(this.mode_==="trackpad"&&!(a.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(a.getAnimating()&&a.cancelAnimations(),a.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),a.adjustZoom(-o/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=s,!1;this.totalDelta_+=o;const l=Math.max(this.timeout_-(s-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),l),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let n=-Wt(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),yh(e,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}const z_=T_;class R_ extends nn{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=yr),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=t.threshold!==void 0?t.threshold:.3,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){let e=0;const n=this.targetPointers[0],r=this.targetPointers[1],o=Math.atan2(r.clientY-n.clientY,r.clientX-n.clientX);if(this.lastAngle_!==void 0){const u=o-this.lastAngle_;this.rotationDelta_+=u,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=u}this.lastAngle_=o;const s=t.map,a=s.getView();if(a.getConstraints().rotation===ih)return;const l=s.getViewport().getBoundingClientRect(),h=xh(this.targetPointers);h[0]-=l.left,h[1]-=l.top,this.anchor_=s.getCoordinateFromPixelInternal(h),this.rotating_&&(s.render(),a.adjustRotationInternal(e,this.anchor_))}handleUpEvent(t){return this.targetPointers.length<2?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}else return!1}}const I_=R_;class P_ extends nn{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=yr),super(e),this.anchor_=null,this.duration_=t.duration!==void 0?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const n=this.targetPointers[0],r=this.targetPointers[1],o=n.clientX-r.clientX,s=n.clientY-r.clientY,a=Math.sqrt(o*o+s*s);this.lastDistance_!==void 0&&(e=this.lastDistance_/a),this.lastDistance_=a;const l=t.map,h=l.getView();e!=1&&(this.lastScaleDelta_=e);const u=l.getViewport().getBoundingClientRect(),d=xh(this.targetPointers);d[0]-=u.left,d[1]-=u.top,this.anchor_=l.getCoordinateFromPixelInternal(d),l.render(),h.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const n=t.map.getView(),r=this.lastScaleDelta_>1?1:-1;return n.endInteraction(this.duration_,r),!1}else return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}else return!1}}const A_=P_;function Qc(i){i=i||{};const t=new We,e=new S_(-.005,.05,100);return(i.altShiftDragRotate!==void 0?i.altShiftDragRotate:!0)&&t.push(new m_),(i.doubleClickZoom!==void 0?i.doubleClickZoom:!0)&&t.push(new s_({delta:i.zoomDelta,duration:i.zoomDuration})),(i.dragPan!==void 0?i.dragPan:!0)&&t.push(new f_({onFocusOnly:i.onFocusOnly,kinetic:e})),(i.pinchRotate!==void 0?i.pinchRotate:!0)&&t.push(new I_),(i.pinchZoom!==void 0?i.pinchZoom:!0)&&t.push(new A_({duration:i.zoomDuration})),(i.keyboard!==void 0?i.keyboard:!0)&&(t.push(new w_),t.push(new E_({delta:i.zoomDelta,duration:i.zoomDuration}))),(i.mouseWheelZoom!==void 0?i.mouseWheelZoom:!0)&&t.push(new z_({onFocusOnly:i.onFocusOnly,duration:i.zoomDuration})),(i.shiftDragZoom!==void 0?i.shiftDragZoom:!0)&&t.push(new b_({duration:i.zoomDuration})),t}function tf(i){return i[0]>0&&i[1]>0}function D_(i,t,e){return e===void 0&&(e=[0,0]),e[0]=i[0]*t+.5|0,e[1]=i[1]*t+.5|0,e}function be(i,t){return Array.isArray(i)?i:(t===void 0?t=[i,i]:(t[0]=i,t[1]=i),t)}function ef(i){if(i instanceof Os){i.setMapInternal(null);return}i instanceof Qs&&i.getLayers().forEach(ef)}function nf(i,t){if(i instanceof Os){i.setMapInternal(t);return}if(i instanceof Qs){const e=i.getLayers().getArray();for(let n=0,r=e.length;n<r;++n)nf(e[n],t)}}class L_ extends hi{constructor(t){super(),t=t||{},this.on,this.once,this.un;const e=F_(t);this.renderComplete_,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=t.maxTilesLoading!==void 0?t.maxTilesLoading:16,this.pixelRatio_=t.pixelRatio!==void 0?t.pixelRatio:Ud,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=Ye(),this.pixelToCoordinateTransform_=Ye(),this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,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_=t.moveTolerance,this.keyboardEventTarget_=e.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.controls=e.controls||Wc(),this.interactions=e.interactions||Qc({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new _v(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(fe.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(fe.VIEW,this.handleViewChanged_),this.addChangeListener(fe.SIZE,this.handleSizeChanged_),this.addChangeListener(fe.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const n=this;t.view&&!(t.view instanceof en)&&t.view.then(function(r){n.setView(new en(r))}),this.controls.addEventListener(re.ADD,function(r){r.element.setMap(this)}.bind(this)),this.controls.addEventListener(re.REMOVE,function(r){r.element.setMap(null)}.bind(this)),this.interactions.addEventListener(re.ADD,function(r){r.element.setMap(this)}.bind(this)),this.interactions.addEventListener(re.REMOVE,function(r){r.element.setMap(null)}.bind(this)),this.overlays_.addEventListener(re.ADD,function(r){this.addOverlayInternal_(r.element)}.bind(this)),this.overlays_.addEventListener(re.REMOVE,function(r){const o=r.element.getId();o!==void 0&&delete this.overlayIdIndex_[o.toString()],r.element.setMap(null)}.bind(this)),this.controls.forEach(function(r){r.setMap(this)}.bind(this)),this.interactions.forEach(function(r){r.setMap(this)}.bind(this)),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){nf(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();e!==void 0&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,n){if(!this.frameState_||!this.renderer_)return;const r=this.getCoordinateFromPixelInternal(t);n=n!==void 0?n:{};const o=n.hitTolerance!==void 0?n.hitTolerance:0,s=n.layerFilter!==void 0?n.layerFilter:Dn,a=n.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(r,this.frameState_,o,a,e,null,s,null)}getFeaturesAtPixel(t,e){const n=[];return this.forEachFeatureAtPixel(t,function(r){n.push(r)},e),n}getAllLayers(){const t=[];function e(n){n.forEach(function(r){r instanceof Qs?e(r.getLayers()):t.push(r)})}return e(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const n=this.getCoordinateFromPixelInternal(t);e=e!==void 0?e:{};const r=e.layerFilter!==void 0?e.layerFilter:Dn,o=e.hitTolerance!==void 0?e.hitTolerance:0,s=e.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,o,s,r,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const e=this.viewport_.getBoundingClientRect(),n="changedTouches"in t?t.changedTouches[0]:t;return[n.clientX-e.left,n.clientY-e.top]}getTarget(){return this.get(fe.TARGET)}getTargetElement(){const t=this.getTarget();return t!==void 0?typeof t=="string"?document.getElementById(t):t:null}getCoordinateFromPixel(t){return Cr(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?Jt(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return e!==void 0?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(fe.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof We){e.setLayers(t);return}const n=e.getLayers();n.clear(),n.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,n=t.length;e<n;++e){const r=t[e];if(!r.visible)continue;const o=r.layer.getRenderer();if(o&&!o.ready)return!0;const s=r.layer.getSource();if(s&&s.loading)return!0}return!1}getPixelFromCoordinate(t){const e=Vt(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)}getPixelFromCoordinateInternal(t){const e=this.frameState_;return e?Jt(e.coordinateToPixelTransform,t.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(fe.SIZE)}getView(){return this.get(fe.VIEW)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const t=this.getTargetElement();return t?t.ownerDocument:document}getTilePriority(t,e,n,r){return yv(this.frameState_,t,e,n,r)}handleBrowserEvent(t,e){e=e||t.type;const n=new Si(e,this,t);this.handleMapBrowserEvent(n)}handleMapBrowserEvent(t){if(!this.frameState_)return;const e=t.originalEvent,n=e.type;if(n===Cl.POINTERDOWN||n===tt.WHEEL||n===tt.KEYDOWN){const r=this.getOwnerDocument(),o=this.viewport_.getRootNode?this.viewport_.getRootNode():r,s=e.target;if(this.overlayContainerStopEvent_.contains(s)||!(o===r?r.documentElement:o).contains(s))return}if(t.frameState=this.frameState_,this.dispatchEvent(t)!==!1){const r=this.getInteractions().getArray().slice();for(let o=r.length-1;o>=0;o--){const s=r[o];if(s.getMap()!==this||!s.getActive()||!this.getTargetElement())continue;if(!s.handleEvent(t)||t.propagationStopped)break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let r=this.maxTilesLoading_,o=r;if(t){const s=t.viewHints;if(s[Yt.ANIMATING]||s[Yt.INTERACTING]){const a=Date.now()-t.time>8;r=a?0:8,o=a?0:2}}e.getTilesLoading()<r&&(e.reprioritize(),e.loadMoreTiles(r,o))}t&&this.renderer_&&!t.animate&&(this.renderComplete_===!0?(this.hasListener(Wi.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(Wi.RENDERCOMPLETE,t),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new zr(qi.LOADEND,this,t)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new zr(qi.LOADSTART,this,t))));const n=this.postRenderFunctions_;for(let r=0,o=n.length;r<o;++r)n[r](this,t);n.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let e=0,n=this.targetChangeHandlerKeys_.length;e<n;++e)Ot(this.targetChangeHandlerKeys_[e]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(tt.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(tt.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,wl(this.viewport_)}const t=this.getTargetElement();if(!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{t.appendChild(this.viewport_),this.renderer_||(this.renderer_=new uv(this)),this.mapBrowserEventHandler_=new gv(this,this.moveTolerance_);for(const r in Mt)this.mapBrowserEventHandler_.addEventListener(Mt[r],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(tt.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(tt.WHEEL,this.boundHandleBrowserEvent_,Vd?{passive:!1}:!1);const e=this.getOwnerDocument().defaultView,n=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.targetChangeHandlerKeys_=[gt(n,tt.KEYDOWN,this.handleBrowserEvent,this),gt(n,tt.KEYPRESS,this.handleBrowserEvent,this),gt(e,tt.RESIZE,this.updateSize,this)]}this.updateSize()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(Ot(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Ot(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=gt(t,_r.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=gt(t,tt.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(Ot),this.layerGroupPropertyListenerKeys_=null);const t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Hi("addlayer",t)),this.layerGroupPropertyListenerKeys_=[gt(t,_r.PROPERTYCHANGE,this.render,this),gt(t,tt.CHANGE,this.render,this),gt(t,"addlayer",this.handleLayerAdd_,this),gt(t,"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(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,n=t.length;e<n;++e){const r=t[e].layer;r.hasRenderer()&&r.getRenderer().handleFontsChanged()}}render(){this.renderer_&&this.animationDelayKey_===void 0&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}removeControl(t){return this.getControls().remove(t)}removeInteraction(t){return this.getInteractions().remove(t)}removeLayer(t){return this.getLayerGroup().getLayers().remove(t)}handleLayerRemove_(t){ef(t.layer)}removeOverlay(t){return this.getOverlays().remove(t)}renderFrame_(t){const e=this.getSize(),n=this.getView(),r=this.frameState_;let o=null;if(e!==void 0&&tf(e)&&n&&n.isDef()){const s=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=n.getState();if(o={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:Al(a.center,a.resolution,a.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:a,viewHints:s,wantedTiles:{},mapId:K(this),renderTargets:{}},a.nextCenter&&a.nextResolution){const l=isNaN(a.nextRotation)?a.rotation:a.nextRotation;o.nextExtent=Al(a.nextCenter,a.nextResolution,l,e)}}this.frameState_=o,this.renderer_.renderFrame(o),o&&(o.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,o.postRenderFunctions),r&&(!this.previousExtent_||!Ll(this.previousExtent_)&&!Er(o.extent,this.previousExtent_))&&(this.dispatchEvent(new zr(qi.MOVESTART,this,r)),this.previousExtent_=yo(this.previousExtent_)),this.previousExtent_&&!o.viewHints[Yt.ANIMATING]&&!o.viewHints[Yt.INTERACTING]&&!Er(o.extent,this.previousExtent_)&&(this.dispatchEvent(new zr(qi.MOVEEND,this,o)),ec(o.extent,this.previousExtent_))),this.dispatchEvent(new zr(qi.POSTRENDER,this,o)),this.renderComplete_=this.hasListener(qi.LOADSTART)||this.hasListener(qi.LOADEND)||this.hasListener(Wi.RENDERCOMPLETE)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new Hi("removelayer",e)),this.set(fe.LAYERGROUP,t)}setSize(t){this.set(fe.SIZE,t)}setTarget(t){this.set(fe.TARGET,t)}setView(t){if(!t||t instanceof en){this.set(fe.VIEW,t);return}this.set(fe.VIEW,new en);const e=this;t.then(function(n){e.setView(new en(n))})}updateSize(){const t=this.getTargetElement();let e;if(t){const n=getComputedStyle(t),r=t.offsetWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight)-parseFloat(n.borderRightWidth),o=t.offsetHeight-parseFloat(n.borderTopWidth)-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom)-parseFloat(n.borderBottomWidth);!isNaN(r)&&!isNaN(o)&&(e=[r,o],!tf(e)&&!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0."))}this.setSize(e),this.updateViewportSize_()}updateViewportSize_(){const t=this.getView();if(t){let e;const n=getComputedStyle(this.viewport_);n.width&&n.height&&(e=[parseInt(n.width,10),parseInt(n.height,10)]),t.setViewportSize(e)}}}function F_(i){let t=null;i.keyboardEventTarget!==void 0&&(t=typeof i.keyboardEventTarget=="string"?document.getElementById(i.keyboardEventTarget):i.keyboardEventTarget);const e={},n=i.layers&&typeof i.layers.getLayers=="function"?i.layers:new Qs({layers:i.layers});e[fe.LAYERGROUP]=n,e[fe.TARGET]=i.target,e[fe.VIEW]=i.view instanceof en?i.view:new en;let r;i.controls!==void 0&&(Array.isArray(i.controls)?r=new We(i.controls.slice()):(ft(typeof i.controls.getArray=="function",47),r=i.controls));let o;i.interactions!==void 0&&(Array.isArray(i.interactions)?o=new We(i.interactions.slice()):(ft(typeof i.interactions.getArray=="function",48),o=i.interactions));let s;return i.overlays!==void 0?Array.isArray(i.overlays)?s=new We(i.overlays.slice()):(ft(typeof i.overlays.getArray=="function",49),s=i.overlays):s=new We,{controls:r,interactions:o,keyboardEventTarget:t,overlays:s,values:e}}const O_=L_,Ch="units",N_=[1,2,5],Po=25.4/.28;class G_ extends po{constructor(t){t=t||{};const e=document.createElement("div");e.style.pointerEvents="none",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un;const n=t.className!==void 0?t.className:t.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=n+"-inner",this.element.className=n+" "+vo,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=t.minWidth!==void 0?t.minWidth:64,this.maxWidth_=t.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(Ch,this.handleUnitsChanged_),this.setUnits(t.units||"metric"),this.scaleBar_=t.bar||!1,this.scaleBarSteps_=t.steps||4,this.scaleBarText_=t.text||!1,this.dpi_=t.dpi||void 0}getUnits(){return this.get(Ch)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(Ch,t)}setDpi(t){this.dpi_=t}updateElement_(){const t=this.viewState_;if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=t.center,n=t.projection,r=this.getUnits(),o=r=="degrees"?"degrees":"m";let s=Xs(n,t.resolution,e,o);const a=this.minWidth_*(this.dpi_||Po)/Po,l=this.maxWidth_!==void 0?this.maxWidth_*(this.dpi_||Po)/Po:void 0;let h=a*s,u="";if(r=="degrees"){const y=xr.degrees;h*=y,h<y/60?(u="\u2033",s*=3600):h<y?(u="\u2032",s*=60):u="\xB0"}else r=="imperial"?h<.9144?(u="in",s/=.0254):h<1609.344?(u="ft",s/=.3048):(u="mi",s/=1609.344):r=="nautical"?(s/=1852,u="NM"):r=="metric"?h<.001?(u="\u03BCm",s*=1e6):h<1?(u="mm",s*=1e3):h<1e3?u="m":(u="km",s/=1e3):r=="us"?h<.9144?(u="in",s*=39.37):h<1609.344?(u="ft",s/=.30480061):(u="mi",s/=1609.3472):ft(!1,33);let d=3*Math.floor(Math.log(a*s)/Math.log(10)),c,f,g,m,p,_;for(;;){g=Math.floor(d/3);const y=Math.pow(10,g);if(c=N_[(d%3+3)%3]*y,f=Math.round(c/s),isNaN(f)){this.element.style.display="none",this.renderedVisible_=!1;return}if(l!==void 0&&f>=l){c=m,f=p,g=_;break}else if(f>=a)break;m=c,p=f,_=g,++d}const v=this.scaleBar_?this.createScaleBar(f,c,u):c.toFixed(g<0?-g:0)+" "+u;this.renderedHTML_!=v&&(this.innerElement_.innerHTML=v,this.renderedHTML_=v),this.renderedWidth_!=f&&(this.innerElement_.style.width=f+"px",this.renderedWidth_=f),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,n){const r=this.getScaleForResolution(),o=r<1?Math.round(1/r).toLocaleString()+" : 1":"1 : "+Math.round(r).toLocaleString(),s=this.scaleBarSteps_,a=t/s,l=[this.createMarker("absolute")];for(let u=0;u<s;++u){const d=u%2===0?"ol-scale-singlebar-odd":"ol-scale-singlebar-even";l.push(`<div><div class="ol-scale-singlebar ${d}" style="width: ${a}px;"></div>`+this.createMarker("relative")+(u%2===0||s===2?this.createStepText(u,t,!1,e,n):"")+"</div>")}return l.push(this.createStepText(s,t,!0,e,n)),(this.scaleBarText_?`<div class="ol-scale-text" style="width: ${t}px;">`+o+"</div>":"")+l.join("")}createMarker(t){return`<div class="ol-scale-step-marker" style="position: ${t}; top: ${t==="absolute"?3:-10}px;"></div>`}createStepText(t,e,n,r,o){const a=(t===0?0:Math.round(r/this.scaleBarSteps_*t*100)/100)+(t===0?"":" "+o),l=t===0?-3:e/this.scaleBarSteps_*-1,h=t===0?0:e/this.scaleBarSteps_*2;return`<div class="ol-scale-step-text" style="margin-left: ${l}px;text-align: ${t===0?"left":"center"};min-width: ${h}px;left: ${n?e+"px":"unset"};">`+a+"</div>"}getScaleForResolution(){const t=Xs(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),e=this.dpi_||Po,n=1e3/25.4;return t*n*e}render(t){const e=t.frameState;e?this.viewState_=e.viewState:this.viewState_=null,this.updateElement_()}}const j_=G_;class aa extends Qi{constructor(t,e,n){super(),n!==void 0&&e===void 0?this.setFlatCoordinates(n,t):(e=e||0,this.setCenterAndRadius(t,e,n))}clone(){const t=new aa(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){const o=this.flatCoordinates,s=t-o[0],a=e-o[1],l=s*s+a*a;if(l<r){if(l===0)for(let h=0;h<this.stride;++h)n[h]=o[h];else{const h=this.getRadius()/Math.sqrt(l);n[0]=o[0]+h*s,n[1]=o[1]+h*a;for(let u=2;u<this.stride;++u)n[u]=o[u]}return n.length=this.stride,l}else return r}containsXY(t,e){const n=this.flatCoordinates,r=t-n[0],o=e-n[1];return r*r+o*o<=this.getRadiusSquared_()}getCenter(){return this.flatCoordinates.slice(0,this.stride)}computeExtent(t){const e=this.flatCoordinates,n=e[this.stride]-e[0];return ti(e[0]-n,e[1]-n,e[0]+n,e[1]+n,t)}getRadius(){return Math.sqrt(this.getRadiusSquared_())}getRadiusSquared_(){const t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e}getType(){return"Circle"}intersectsExtent(t){const e=this.getExtent();if(Kt(t,e)){const n=this.getCenter();return t[0]<=n[0]&&t[2]>=n[0]||t[1]<=n[1]&&t[3]>=n[1]?!0:Il(t,this.intersectsCoordinate.bind(this))}return!1}setCenter(t){const e=this.stride,n=this.flatCoordinates[e]-this.flatCoordinates[0],r=t.slice();r[e]=r[0]+n;for(let o=1;o<e;++o)r[e+o]=t[o];this.setFlatCoordinates(this.layout,r),this.changed()}setCenterAndRadius(t,e,n){this.setLayout(n,t,0),this.flatCoordinates||(this.flatCoordinates=[]);const r=this.flatCoordinates;let o=Lc(r,0,t,this.stride);r[o++]=r[0]+e;for(let s=1,a=this.stride;s<a;++s)r[o++]=r[s];r.length=o,this.changed()}getCoordinates(){return null}setCoordinates(t,e){}setRadius(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()}rotate(t,e){const n=this.getCenter(),r=this.getStride();this.setCenter(nh(n,0,n.length,r,t,e,n)),this.changed()}translate(t,e){const n=this.getCenter(),r=this.getStride();this.setCenter(Ic(n,0,n.length,r,t,e,n)),this.changed()}}aa.prototype.transform;const B_=aa;class la extends Ac{constructor(t){super(),this.geometries_=t||null,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(Ot),this.changeEventsKeys_.length=0}listenGeometriesChange_(){if(!!this.geometries_)for(let t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push(gt(this.geometries_[t],tt.CHANGE,this.changed,this))}clone(){const t=new la(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t}closestPointXY(t,e,n,r){if(r<jn(this.getExtent(),t,e))return r;const o=this.geometries_;for(let s=0,a=o.length;s<a;++s)r=o[s].closestPointXY(t,e,n,r);return r}containsXY(t,e){const n=this.geometries_;for(let r=0,o=n.length;r<o;++r)if(n[r].containsXY(t,e))return!0;return!1}computeExtent(t){yo(t);const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)ic(t,e[n].getExtent());return t}getGeometries(){return rf(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let t=[];const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)e[n].getType()===this.getType()?t=t.concat(e[n].getGeometriesArrayRecursive()):t.push(e[n]);return t}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=[],n=this.geometries_;let r=!1;for(let o=0,s=n.length;o<s;++o){const a=n[o],l=a.getSimplifiedGeometry(t);e.push(l),l!==a&&(r=!0)}if(r){const o=new la(null);return o.setGeometriesArray(e),o}else return this.simplifiedGeometryMaxMinSquaredTolerance=t,this}getType(){return"GeometryCollection"}intersectsExtent(t){const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)if(e[n].intersectsExtent(t))return!0;return!1}isEmpty(){return this.geometries_.length===0}rotate(t,e){const n=this.geometries_;for(let r=0,o=n.length;r<o;++r)n[r].rotate(t,e);this.changed()}scale(t,e,n){n||(n=Yi(this.getExtent()));const r=this.geometries_;for(let o=0,s=r.length;o<s;++o)r[o].scale(t,e,n);this.changed()}setGeometries(t){this.setGeometriesArray(rf(t))}setGeometriesArray(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()}applyTransform(t){const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)e[n].applyTransform(t);this.changed()}translate(t,e){const n=this.geometries_;for(let r=0,o=n.length;r<o;++r)n[r].translate(t,e);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function rf(i){const t=[];for(let e=0,n=i.length;e<n;++e)t.push(i[e].clone());return t}const U_=la;function ha(i,t,e,n,r,o,s){let a,l;const h=(e-t)/n;if(h===1)a=t;else if(h===2)a=t,l=r;else if(h!==0){let u=i[t],d=i[t+1],c=0;const f=[0];for(let p=t+n;p<e;p+=n){const _=i[p],v=i[p+1];c+=Math.sqrt((_-u)*(_-u)+(v-d)*(v-d)),f.push(c),u=_,d=v}const g=r*c,m=$p(f,g);m<0?(l=(g-f[-m-2])/(f[-m-1]-f[-m-2]),a=t+(-m-2)*n):a=t+m*n}s=s>1?s:2,o=o||new Array(s);for(let u=0;u<s;++u)o[u]=a===void 0?NaN:l===void 0?i[a+u]:ki(i[a+u],i[a+n+u],l);return o}function Sh(i,t,e,n,r,o){if(e==t)return null;let s;if(r<i[t+n-1])return o?(s=i.slice(t,t+n),s[n-1]=r,s):null;if(i[e-1]<r)return o?(s=i.slice(e-n,e),s[n-1]=r,s):null;if(r==i[t+n-1])return i.slice(t,t+n);let a=t/n,l=e/n;for(;a<l;){const c=a+l>>1;r<i[(c+1)*n-1]?l=c:a=c+1}const h=i[a*n-1];if(r==h)return i.slice((a-1)*n,(a-1)*n+n);const u=i[(a+1)*n-1],d=(r-h)/(u-h);s=[];for(let c=0;c<n-1;++c)s.push(ki(i[(a-1)*n+c],i[a*n+c],d));return s.push(r),s}function V_(i,t,e,n,r,o,s){if(s)return Sh(i,t,e[e.length-1],n,r,o);let a;if(r<i[n-1])return o?(a=i.slice(0,n),a[n-1]=r,a):null;if(i[i.length-1]<r)return o?(a=i.slice(i.length-n),a[n-1]=r,a):null;for(let l=0,h=e.length;l<h;++l){const u=e[l];if(t!=u){if(r<i[t+n-1])return null;if(r<=i[u-1])return Sh(i,t,u,n,r,!1);t=u}}return null}function of(i,t,e,n){let r=i[t],o=i[t+1],s=0;for(let a=t+n;a<e;a+=n){const l=i[a],h=i[a+1];s+=Math.sqrt((l-r)*(l-r)+(h-o)*(h-o)),r=l,o=h}return s}class ua extends Qi{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendCoordinate(t){this.flatCoordinates?li(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()}clone(){const t=new ua(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),sh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,n,r))}forEachSegment(t){return Bc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return this.layout!="XYM"&&this.layout!="XYZM"?null:(e=e!==void 0?e:!1,Sh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return ha(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return of(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){const e=[];return e.length=hh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new ua(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return ra(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ia(this.flatCoordinates,0,t,this.stride),this.changed()}}const Kn=ua;class da extends Qi{constructor(t,e,n){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(e!==void 0&&n)this.setFlatCoordinates(e,t),this.ends_=n;else{let r=this.getLayout();const o=t,s=[],a=[];for(let l=0,h=o.length;l<h;++l){const u=o[l];l===0&&(r=u.getLayout()),li(s,u.getFlatCoordinates()),a.push(s.length)}this.setFlatCoordinates(r,s),this.ends_=a}}appendLineString(t){this.flatCoordinates?li(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new da(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(oh(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ah(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,n,r))}getCoordinateAtM(t,e,n){return this.layout!="XYM"&&this.layout!="XYZM"||this.flatCoordinates.length===0?null:(e=e!==void 0?e:!1,n=n!==void 0?n:!1,V_(this.flatCoordinates,0,this.ends_,this.stride,t,e,n))}getCoordinates(){return Ro(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(t){return t<0||this.ends_.length<=t?null:new Kn(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLineStrings(){const t=this.flatCoordinates,e=this.ends_,n=this.layout,r=[];let o=0;for(let s=0,a=e.length;s<a;++s){const l=e[s],h=new Kn(t.slice(o,l),n);r.push(h),o=l}return r}getFlatMidpoints(){const t=[],e=this.flatCoordinates;let n=0;const r=this.ends_,o=this.stride;for(let s=0,a=r.length;s<a;++s){const l=r[s],h=ha(e,n,l,o,.5);li(t,h),n=l}return t}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Lv(this.flatCoordinates,0,this.ends_,this.stride,t,e,0,n),new da(e,"XY",n)}getType(){return"MultiLineString"}intersectsExtent(t){return Bv(this.flatCoordinates,0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=lh(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}const Th=da;class zh extends Qi{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){this.flatCoordinates?li(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()}clone(){const t=new zh(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){if(r<jn(this.getExtent(),t,e))return r;const o=this.flatCoordinates,s=this.stride;for(let a=0,l=o.length;a<l;a+=s){const h=On(t,e,o[a],o[a+1]);if(h<r){r=h;for(let u=0;u<s;++u)n[u]=o[a+u];n.length=s}}return r}getCoordinates(){return tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(t){const e=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||e<=t?null:new ni(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)}getPoints(){const t=this.flatCoordinates,e=this.layout,n=this.stride,r=[];for(let o=0,s=t.length;o<s;o+=n){const a=new ni(t.slice(o,o+n),e);r.push(a)}return r}getType(){return"MultiPoint"}intersectsExtent(t){const e=this.flatCoordinates,n=this.stride;for(let r=0,o=e.length;r<o;r+=n){const s=e[r],a=e[r+1];if(Tl(t,s,a))return!0}return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ia(this.flatCoordinates,0,t,this.stride),this.changed()}}const Ao=zh;function sf(i,t,e,n){const r=[];let o=Ge();for(let s=0,a=e.length;s<a;++s){const l=e[s];o=Rl(i,t,l[0],n),r.push((o[0]+o[2])/2,(o[1]+o[3])/2),t=l[l.length-1]}return r}class ca extends Qi{constructor(t,e,n){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!n&&!Array.isArray(t[0])){let r=this.getLayout();const o=t,s=[],a=[];for(let l=0,h=o.length;l<h;++l){const u=o[l];l===0&&(r=u.getLayout());const d=s.length,c=u.getEnds();for(let f=0,g=c.length;f<g;++f)c[f]+=d;li(s,u.getFlatCoordinates()),a.push(c)}e=r,t=s,n=a}e!==void 0&&n?(this.setFlatCoordinates(e,t),this.endss_=n):this.setCoordinates(t,e)}appendPolygon(t){let e;if(!this.flatCoordinates)this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();else{const n=this.flatCoordinates.length;li(this.flatCoordinates,t.getFlatCoordinates()),e=t.getEnds().slice();for(let r=0,o=e.length;r<o;++r)e[r]+=n}this.endss_.push(e),this.changed()}clone(){const t=this.endss_.length,e=new Array(t);for(let r=0;r<t;++r)e[r]=this.endss_[r].slice();const n=new ca(this.flatCoordinates.slice(),this.layout,e);return n.applyProperties(this),n}closestPointXY(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Pv(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Av(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,n,r))}containsXY(t,e){return jv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return Nv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),Xc(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,uh(e,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const t=sf(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=jc(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new Ao(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;qv(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Xc(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Ov(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),e,0,n),new ca(e,"XY",n)}getPolygon(t){if(t<0||this.endss_.length<=t)return null;let e;if(t===0)e=0;else{const o=this.endss_[t-1];e=o[o.length-1]}const n=this.endss_[t].slice(),r=n[n.length-1];if(e!==0)for(let o=0,s=n.length;o<s;++o)n[o]-=e;return new Wn(this.flatCoordinates.slice(e,r),this.layout,n)}getPolygons(){const t=this.layout,e=this.flatCoordinates,n=this.endss_,r=[];let o=0;for(let s=0,a=n.length;s<a;++s){const l=n[s].slice(),h=l[l.length-1];if(o!==0)for(let d=0,c=l.length;d<c;++d)l[d]-=o;const u=new Wn(e.slice(o,h),t,l);r.push(u),o=h}return r}getType(){return"MultiPolygon"}intersectsExtent(t){return Uv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);const n=Dv(this.flatCoordinates,0,t,this.stride,this.endss_);if(n.length===0)this.flatCoordinates.length=0;else{const r=n[n.length-1];this.flatCoordinates.length=r.length===0?0:r[r.length-1]}this.changed()}}const Rh=ca;class Ih extends hi{constructor(t){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_),t)if(typeof t.getSimplifiedGeometry=="function"){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new Ih(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const n=this.getStyle();return n&&t.setStyle(n),t}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_&&(Ot(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=gt(t,tt.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?q_(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function q_(i){if(typeof i=="function")return i;{let t;return Array.isArray(i)?t=i:(ft(typeof i.getZIndex=="function",41),t=[i]),function(){return t}}}const Ti=Ih;class af{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}getReadOptions(t,e){if(e){let n=e.dataProjection?Gt(e.dataProjection):this.readProjection(t);e.extent&&n&&n.getUnits()==="tile-pixels"&&(n=Gt(n),n.setWorldExtent(e.extent)),e={dataProjection:n,featureProjection:e.featureProjection}}return this.adaptOptions(e)}adaptOptions(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)}getType(){return et()}readFeature(t,e){return et()}readFeatures(t,e){return et()}readGeometry(t,e){return et()}readProjection(t){return et()}writeFeature(t,e){return et()}writeFeatures(t,e){return et()}writeGeometry(t,e){return et()}}function Ph(i,t,e){const n=e?Gt(e.featureProjection):null,r=e?Gt(e.dataProjection):null;let o;if(n&&r&&!Vn(n,r)?o=(t?i.clone():i).transform(t?n:r,t?r:n):o=i,t&&e&&e.decimals!==void 0){const s=Math.pow(10,e.decimals),a=function(l){for(let h=0,u=l.length;h<u;++h)l[h]=Math.round(l[h]*s)/s;return l};o===i&&(o=i.clone()),o.applyTransform(a)}return o}class X_ extends af{constructor(){super()}getType(){return"json"}readFeature(t,e){return this.readFeatureFromObject(fa(t),this.getReadOptions(t,e))}readFeatures(t,e){return this.readFeaturesFromObject(fa(t),this.getReadOptions(t,e))}readFeatureFromObject(t,e){return et()}readFeaturesFromObject(t,e){return et()}readGeometry(t,e){return this.readGeometryFromObject(fa(t),this.getReadOptions(t,e))}readGeometryFromObject(t,e){return et()}readProjection(t){return this.readProjectionFromObject(fa(t))}readProjectionFromObject(t){return et()}writeFeature(t,e){return JSON.stringify(this.writeFeatureObject(t,e))}writeFeatureObject(t,e){return et()}writeFeatures(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))}writeFeaturesObject(t,e){return et()}writeGeometry(t,e){return JSON.stringify(this.writeGeometryObject(t,e))}writeGeometryObject(t,e){return et()}}function fa(i){if(typeof i=="string"){const t=JSON.parse(i);return t||null}else return i!==null?i:null}const $_=X_;class W_ extends $_{constructor(t){t=t||{},super(),this.dataProjection=Gt(t.dataProjection?t.dataProjection:"EPSG:4326"),t.featureProjection&&(this.defaultFeatureProjection=Gt(t.featureProjection)),this.geometryName_=t.geometryName,this.extractGeometryName_=t.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(t,e){let n=null;t.type==="Feature"?n=t:n={type:"Feature",geometry:t,properties:null};const r=Ah(n.geometry,e),o=new Ti;return this.geometryName_?o.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in n!==void 0&&o.setGeometryName(n.geometry_name),o.setGeometry(r),"id"in n&&o.setId(n.id),n.properties&&o.setProperties(n.properties,!0),o}readFeaturesFromObject(t,e){const n=t;let r=null;if(n.type==="FeatureCollection"){const o=t;r=[];const s=o.features;for(let a=0,l=s.length;a<l;++a)r.push(this.readFeatureFromObject(s[a],e))}else r=[this.readFeatureFromObject(t,e)];return r}readGeometryFromObject(t,e){return Ah(t,e)}readProjectionFromObject(t){const e=t.crs;let n;return e?e.type=="name"?n=Gt(e.properties.name):e.type==="EPSG"?n=Gt("EPSG:"+e.properties.code):ft(!1,36):n=this.dataProjection,n}writeFeatureObject(t,e){e=this.adaptOptions(e);const n={type:"Feature",geometry:null,properties:null},r=t.getId();if(r!==void 0&&(n.id=r),!t.hasProperties())return n;const o=t.getProperties(),s=t.getGeometry();return s&&(n.geometry=Dh(s,e),delete o[t.getGeometryName()]),Fn(o)||(n.properties=o),n}writeFeaturesObject(t,e){e=this.adaptOptions(e);const n=[];for(let r=0,o=t.length;r<o;++r)n.push(this.writeFeatureObject(t[r],e));return{type:"FeatureCollection",features:n}}writeGeometryObject(t,e){return Dh(t,this.adaptOptions(e))}}function Ah(i,t){if(!i)return null;let e;switch(i.type){case"Point":{e=K_(i);break}case"LineString":{e=Z_(i);break}case"Polygon":{e=t1(i);break}case"MultiPoint":{e=J_(i);break}case"MultiLineString":{e=H_(i);break}case"MultiPolygon":{e=Q_(i);break}case"GeometryCollection":{e=Y_(i);break}default:throw new Error("Unsupported GeoJSON type: "+i.type)}return Ph(e,!1,t)}function Y_(i,t){const e=i.geometries.map(function(n){return Ah(n,t)});return new U_(e)}function K_(i){return new ni(i.coordinates)}function Z_(i){return new Kn(i.coordinates)}function H_(i){return new Th(i.coordinates)}function J_(i){return new Ao(i.coordinates)}function Q_(i){return new Rh(i.coordinates)}function t1(i){return new Wn(i.coordinates)}function Dh(i,t){i=Ph(i,!0,t);const e=i.getType();let n;switch(e){case"Point":{n=s1(i);break}case"LineString":{n=i1(i);break}case"Polygon":{n=a1(i,t);break}case"MultiPoint":{n=r1(i);break}case"MultiLineString":{n=n1(i);break}case"MultiPolygon":{n=o1(i,t);break}case"GeometryCollection":{n=e1(i,t);break}case"Circle":{n={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+e)}return n}function e1(i,t){t=Object.assign({},t),delete t.featureProjection;const e=i.getGeometriesArray().map(function(n){return Dh(n,t)});return{type:"GeometryCollection",geometries:e}}function i1(i,t){return{type:"LineString",coordinates:i.getCoordinates()}}function n1(i,t){return{type:"MultiLineString",coordinates:i.getCoordinates()}}function r1(i,t){return{type:"MultiPoint",coordinates:i.getCoordinates()}}function o1(i,t){let e;return t&&(e=t.rightHanded),{type:"MultiPolygon",coordinates:i.getCoordinates(e)}}function s1(i,t){return{type:"Point",coordinates:i.getCoordinates()}}function a1(i,t){let e;return t&&(e=t.rightHanded),{type:"Polygon",coordinates:i.getCoordinates(e)}}const Zn=W_;class Lh{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null}clone(){const t=this.getColor();return new Lh({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){this.color_=t}}const ge=Lh,Qt={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class Fh{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=be(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Fh({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,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 et()}getImage(t){return et()}getHitDetectionImage(){return et()}getPixelRatio(t){return 1}getImageState(){return et()}getImageSize(){return et()}getOrigin(){return et()}getSize(){return et()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=be(t)}listenImageChange(t){et()}load(){et()}unlistenImageChange(t){et()}}const lf=Fh;function hf(i,t,e){const n=i;let r=!0,o=!1,s=!1;const a=[Ps(n,tt.LOAD,function(){s=!0,o||t()})];return n.src&&r0?(o=!0,n.decode().then(function(){r&&t()}).catch(function(l){r&&(s?t():e())})):a.push(Ps(n,tt.ERROR,e)),function(){r=!1,a.forEach(Ot)}}let Do=null;class l1 extends Is{constructor(t,e,n,r,o,s){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=r,this.canvas_={},this.color_=s,this.unlisten_=null,this.imageState_=o,this.size_=n,this.src_=e,this.tainted_}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===Qt.LOADED){Do||(Do=Pe(1,1)),Do.drawImage(this.image_,0,0);try{Do.getImageData(0,0,1,1),this.tainted_=!1}catch{Do=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(tt.CHANGE)}handleImageError_(){this.imageState_=Qt.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=Qt.LOADED,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],n=Pe(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===Qt.IDLE){this.image_||this.initializeImage_(),this.imageState_=Qt.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=hf(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==Qt.LOADED)return;const e=this.image_,n=document.createElement("canvas");n.width=Math.ceil(e.width*t),n.height=Math.ceil(e.height*t);const r=n.getContext("2d");r.scale(t,t),r.drawImage(e,0,0),r.globalCompositeOperation="multiply",r.fillStyle=Yl(this.color_),r.fillRect(0,0,n.width/t,n.height/t),r.globalCompositeOperation="destination-in",r.drawImage(e,0,0),this.canvas_[t]=n}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function h1(i,t,e,n,r,o){let s=Ks.get(t,n,o);return s||(s=new l1(i,t,e,n,r,o),Ks.set(t,n,o,s)),s}class Oh extends lf{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,n=t.rotation!==void 0?t.rotation:0,r=t.scale!==void 0?t.scale:1,o=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:n,scale:r,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:o,declutterMode:t.declutterMode}),this.anchor_=t.anchor!==void 0?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=t.anchorOrigin!==void 0?t.anchorOrigin:"top-left",this.anchorXUnits_=t.anchorXUnits!==void 0?t.anchorXUnits:"fraction",this.anchorYUnits_=t.anchorYUnits!==void 0?t.anchorYUnits:"fraction",this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null;const s=t.img!==void 0?t.img:null;this.imgSize_=t.imgSize;let a=t.src;ft(!(a!==void 0&&s),4),ft(!s||s&&this.imgSize_,5),(a===void 0||a.length===0)&&s&&(a=s.src||K(s)),ft(a!==void 0&&a.length>0,6);const l=t.src!==void 0?Qt.IDLE:Qt.LOADED;this.color_=t.color!==void 0?wo(t.color):null,this.iconImage_=h1(s,a,this.imgSize_!==void 0?this.imgSize_:null,this.crossOrigin_,l,this.color_),this.offset_=t.offset!==void 0?t.offset:[0,0],this.offsetOrigin_=t.offsetOrigin!==void 0?t.offsetOrigin:"top-left",this.origin_=null,this.size_=t.size!==void 0?t.size:null}clone(){const t=this.getScale();return new Oh({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_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const r=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!r)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=r[0]),this.anchorYUnits_=="fraction"&&(t[1]*=r[1])}if(this.anchorOrigin_!="top-left"){if(!r)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+r[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+r[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]-e[0]/n[0],t[1]+e[1]/n[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if(this.offsetOrigin_!="top-left"){const e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(t[0]=n[0]-e[0]-t[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}listenImageChange(t){this.iconImage_.addEventListener(tt.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(tt.CHANGE,t)}}const ga=Oh;class Nh{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new Nh({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),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_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}const ke=Nh;function di(i){return Array.isArray(i)?xc(i):i}class Gh extends lf{constructor(t){const e=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:1,rotateWithView:e,rotation:t.rotation!==void 0?t.rotation:0,scale:t.scale!==void 0?t.scale:1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvas_=void 0,this.hitDetectionCanvas_=null,this.fill_=t.fill!==void 0?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=t.radius!==void 0?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=t.angle!==void 0?t.angle:0,this.stroke_=t.stroke!==void 0?t.stroke:null,this.size_=null,this.renderOptions_=null,this.render()}clone(){const t=this.getScale(),e=new Gh({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(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_;if(!t)return null;const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]/2-e[0]/n[0],t[1]/2+e[1]/n[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_}getImage(t){let e=this.canvas_[t];if(!e){const n=this.renderOptions_,r=Pe(n.size*t,n.size*t);this.draw_(n,r,t),e=r.canvas,this.canvas_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return Qt.LOADED}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,n){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let r=this.radius_,o=this.radius2_===void 0?r:this.radius2_;if(r<o){const w=r;r=o,o=w}const s=this.radius2_===void 0?this.points_:this.points_*2,a=2*Math.PI/s,l=o*Math.sin(a),h=Math.sqrt(o*o-l*l),u=r-h,d=Math.sqrt(l*l+u*u),c=d/l;if(t==="miter"&&c<=n)return c*e;const f=e/2/c,g=e/2*(u/d),p=Math.sqrt((r+f)*(r+f)+g*g)-r;if(this.radius2_===void 0||t==="bevel")return p*2;const _=r*Math.sin(a),v=Math.sqrt(r*r-_*_),y=o-v,k=Math.sqrt(_*_+y*y)/_;if(k<=n){const w=k*e/2-o-r;return 2*Math.max(p,w)}return p*2}createRenderOptions(){let t=Sr,e=0,n=null,r=0,o,s=0;this.stroke_&&(o=this.stroke_.getColor(),o===null&&(o=So),o=di(o),s=this.stroke_.getWidth(),s===void 0&&(s=zo),n=this.stroke_.getLineDash(),r=this.stroke_.getLineDashOffset(),t=this.stroke_.getLineJoin(),t===void 0&&(t=Sr),e=this.stroke_.getMiterLimit(),e===void 0&&(e=Co));const a=this.calculateLineJoinSize_(t,s,e),l=Math.max(this.radius_,this.radius2_||0),h=Math.ceil(2*l+a);return{strokeStyle:o,strokeWidth:s,size:h,lineDash:n,lineDashOffset:r,lineJoin:t,miterLimit:e}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]}draw_(t,e,n){if(e.scale(n,n),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let r=this.fill_.getColor();r===null&&(r=Ei),e.fillStyle=di(r),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}createHitDetectionCanvas_(t){if(this.fill_){let e=this.fill_.getColor(),n=0;if(typeof e=="string"&&(e=wo(e)),e===null?n=1:Array.isArray(e)&&(n=e.length===4?e[3]:1),n===0){const r=Pe(t.size,t.size);this.hitDetectionCanvas_=r.canvas,this.drawHitDetectionCanvas_(t,r)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))}createPath_(t){let e=this.points_;const n=this.radius_;if(e===1/0)t.arc(0,0,n,0,2*Math.PI);else{const r=this.radius2_===void 0?n:this.radius2_;this.radius2_!==void 0&&(e*=2);const o=this.angle_-Math.PI/2,s=2*Math.PI/e;for(let a=0;a<e;a++){const l=o+a*s,h=a%2===0?n:r;t.lineTo(h*Math.cos(l),h*Math.sin(l))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=Ei,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}}const ma=Gh;class jh extends ma{constructor(t){t=t||{radius:5},super({points:1/0,fill:t.fill,radius:t.radius,stroke:t.stroke,scale:t.scale!==void 0?t.scale:1,rotation:t.rotation!==void 0?t.rotation:0,rotateWithView:t.rotateWithView!==void 0?t.rotateWithView:!1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new jh({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius_=t,this.render()}}const Hn=jh;class rn{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=df,t.geometry!==void 0&&this.setGeometry(t.geometry),this.fill_=t.fill!==void 0?t.fill:null,this.image_=t.image!==void 0?t.image:null,this.renderer_=t.renderer!==void 0?t.renderer:null,this.hitDetectionRenderer_=t.hitDetectionRenderer!==void 0?t.hitDetectionRenderer:null,this.stroke_=t.stroke!==void 0?t.stroke:null,this.text_=t.text!==void 0?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&typeof t=="object"&&(t=t.clone()),new rn({geometry:t,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){typeof t=="function"?this.geometryFunction_=t:typeof t=="string"?this.geometryFunction_=function(e){return e.get(t)}:t?t!==void 0&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=df,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function u1(i){let t;if(typeof i=="function")t=i;else{let e;Array.isArray(i)?e=i:(ft(typeof i.getZIndex=="function",41),e=[i]),t=function(){return e}}return t}let Bh=null;function d1(i,t){if(!Bh){const e=new ge({color:"rgba(255,255,255,0.4)"}),n=new ke({color:"#3399CC",width:1.25});Bh=[new rn({image:new Hn({fill:e,stroke:n,radius:5}),fill:e,stroke:n})]}return Bh}function uf(){const i={},t=[255,255,255,1],e=[0,153,255,1],n=3;return i.Polygon=[new rn({fill:new ge({color:[255,255,255,.5]})})],i.MultiPolygon=i.Polygon,i.LineString=[new rn({stroke:new ke({color:t,width:n+2})}),new rn({stroke:new ke({color:e,width:n})})],i.MultiLineString=i.LineString,i.Circle=i.Polygon.concat(i.LineString),i.Point=[new rn({image:new Hn({radius:n*2,fill:new ge({color:e}),stroke:new ke({color:t,width:n/2})}),zIndex:1/0})],i.MultiPoint=i.Point,i.GeometryCollection=i.Polygon.concat(i.LineString,i.Point),i}function df(i){return i.getGeometry()}const le=rn,c1="#333";class Uh{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=be(t.scale!==void 0?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.textBaseline_=t.textBaseline,this.fill_=t.fill!==void 0?t.fill:new ge({color:c1}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding}clone(){const t=this.getScale();return new Uh({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().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})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}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_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=be(t!==void 0?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const cf=Uh;function f1(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Vh={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Vh.read=function(i,t,e,n,r){var o,s,a=r*8-n-1,l=(1<<a)-1,h=l>>1,u=-7,d=e?r-1:0,c=e?-1:1,f=i[t+d];for(d+=c,o=f&(1<<-u)-1,f>>=-u,u+=a;u>0;o=o*256+i[t+d],d+=c,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=s*256+i[t+d],d+=c,u-=8);if(o===0)o=1-h;else{if(o===l)return s?NaN:(f?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-h}return(f?-1:1)*s*Math.pow(2,o-n)},Vh.write=function(i,t,e,n,r,o){var s,a,l,h=o*8-r-1,u=(1<<h)-1,d=u>>1,c=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,g=n?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+d>=1?t+=c/l:t+=c*Math.pow(2,1-d),t*l>=2&&(s++,l/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*l-1)*Math.pow(2,r),s=s+d):(a=t*Math.pow(2,d-1)*Math.pow(2,r),s=0));r>=8;i[e+f]=a&255,f+=g,a/=256,r-=8);for(s=s<<r|a,h+=r;h>0;i[e+f]=s&255,f+=g,s/=256,h-=8);i[e+f-g]|=m*128};var g1=Tt,pa=Vh;function Tt(i){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(i)?i:new Uint8Array(i||0),this.pos=0,this.type=0,this.length=this.buf.length}Tt.Varint=0,Tt.Fixed64=1,Tt.Bytes=2,Tt.Fixed32=5;var qh=(1<<16)*(1<<16),ff=1/qh,m1=12,gf=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Tt.prototype={destroy:function(){this.buf=null},readFields:function(i,t,e){for(e=e||this.length;this.pos<e;){var n=this.readVarint(),r=n>>3,o=this.pos;this.type=n&7,i(r,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(i,t){return this.readFields(i,t,this.readVarint()+this.pos)},readFixed32:function(){var i=va(this.buf,this.pos);return this.pos+=4,i},readSFixed32:function(){var i=pf(this.buf,this.pos);return this.pos+=4,i},readFixed64:function(){var i=va(this.buf,this.pos)+va(this.buf,this.pos+4)*qh;return this.pos+=8,i},readSFixed64:function(){var i=va(this.buf,this.pos)+pf(this.buf,this.pos+4)*qh;return this.pos+=8,i},readFloat:function(){var i=pa.read(this.buf,this.pos,!0,23,4);return this.pos+=4,i},readDouble:function(){var i=pa.read(this.buf,this.pos,!0,52,8);return this.pos+=8,i},readVarint:function(i){var t=this.buf,e,n;return n=t[this.pos++],e=n&127,n<128||(n=t[this.pos++],e|=(n&127)<<7,n<128)||(n=t[this.pos++],e|=(n&127)<<14,n<128)||(n=t[this.pos++],e|=(n&127)<<21,n<128)?e:(n=t[this.pos],e|=(n&15)<<28,p1(e,i,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var i=this.readVarint();return i%2===1?(i+1)/-2:i/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var i=this.readVarint()+this.pos,t=this.pos;return this.pos=i,i-t>=m1&&gf?R1(this.buf,t,i):z1(this.buf,t,i)},readBytes:function(){var i=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,i);return this.pos=i,t},readPackedVarint:function(i,t){if(this.type!==Tt.Bytes)return i.push(this.readVarint(t));var e=zi(this);for(i=i||[];this.pos<e;)i.push(this.readVarint(t));return i},readPackedSVarint:function(i){if(this.type!==Tt.Bytes)return i.push(this.readSVarint());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readSVarint());return i},readPackedBoolean:function(i){if(this.type!==Tt.Bytes)return i.push(this.readBoolean());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readBoolean());return i},readPackedFloat:function(i){if(this.type!==Tt.Bytes)return i.push(this.readFloat());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readFloat());return i},readPackedDouble:function(i){if(this.type!==Tt.Bytes)return i.push(this.readDouble());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readDouble());return i},readPackedFixed32:function(i){if(this.type!==Tt.Bytes)return i.push(this.readFixed32());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readFixed32());return i},readPackedSFixed32:function(i){if(this.type!==Tt.Bytes)return i.push(this.readSFixed32());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readSFixed32());return i},readPackedFixed64:function(i){if(this.type!==Tt.Bytes)return i.push(this.readFixed64());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readFixed64());return i},readPackedSFixed64:function(i){if(this.type!==Tt.Bytes)return i.push(this.readSFixed64());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readSFixed64());return i},skip:function(i){var t=i&7;if(t===Tt.Varint)for(;this.buf[this.pos++]>127;);else if(t===Tt.Bytes)this.pos=this.readVarint()+this.pos;else if(t===Tt.Fixed32)this.pos+=4;else if(t===Tt.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+t)},writeTag:function(i,t){this.writeVarint(i<<3|t)},realloc:function(i){for(var t=this.length||16;t<this.pos+i;)t*=2;if(t!==this.length){var e=new Uint8Array(t);e.set(this.buf),this.buf=e,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(i){this.realloc(4),Ar(this.buf,i,this.pos),this.pos+=4},writeSFixed32:function(i){this.realloc(4),Ar(this.buf,i,this.pos),this.pos+=4},writeFixed64:function(i){this.realloc(8),Ar(this.buf,i&-1,this.pos),Ar(this.buf,Math.floor(i*ff),this.pos+4),this.pos+=8},writeSFixed64:function(i){this.realloc(8),Ar(this.buf,i&-1,this.pos),Ar(this.buf,Math.floor(i*ff),this.pos+4),this.pos+=8},writeVarint:function(i){if(i=+i||0,i>268435455||i<0){v1(i,this);return}this.realloc(4),this.buf[this.pos++]=i&127|(i>127?128:0),!(i<=127)&&(this.buf[this.pos++]=(i>>>=7)&127|(i>127?128:0),!(i<=127)&&(this.buf[this.pos++]=(i>>>=7)&127|(i>127?128:0),!(i<=127)&&(this.buf[this.pos++]=i>>>7&127)))},writeSVarint:function(i){this.writeVarint(i<0?-i*2-1:i*2)},writeBoolean:function(i){this.writeVarint(Boolean(i))},writeString:function(i){i=String(i),this.realloc(i.length*4),this.pos++;var t=this.pos;this.pos=I1(this.buf,i,this.pos);var e=this.pos-t;e>=128&&mf(t,e,this),this.pos=t-1,this.writeVarint(e),this.pos+=e},writeFloat:function(i){this.realloc(4),pa.write(this.buf,i,this.pos,!0,23,4),this.pos+=4},writeDouble:function(i){this.realloc(8),pa.write(this.buf,i,this.pos,!0,52,8),this.pos+=8},writeBytes:function(i){var t=i.length;this.writeVarint(t),this.realloc(t);for(var e=0;e<t;e++)this.buf[this.pos++]=i[e]},writeRawMessage:function(i,t){this.pos++;var e=this.pos;i(t,this);var n=this.pos-e;n>=128&&mf(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeMessage:function(i,t,e){this.writeTag(i,Tt.Bytes),this.writeRawMessage(t,e)},writePackedVarint:function(i,t){t.length&&this.writeMessage(i,x1,t)},writePackedSVarint:function(i,t){t.length&&this.writeMessage(i,b1,t)},writePackedBoolean:function(i,t){t.length&&this.writeMessage(i,M1,t)},writePackedFloat:function(i,t){t.length&&this.writeMessage(i,k1,t)},writePackedDouble:function(i,t){t.length&&this.writeMessage(i,w1,t)},writePackedFixed32:function(i,t){t.length&&this.writeMessage(i,E1,t)},writePackedSFixed32:function(i,t){t.length&&this.writeMessage(i,C1,t)},writePackedFixed64:function(i,t){t.length&&this.writeMessage(i,S1,t)},writePackedSFixed64:function(i,t){t.length&&this.writeMessage(i,T1,t)},writeBytesField:function(i,t){this.writeTag(i,Tt.Bytes),this.writeBytes(t)},writeFixed32Field:function(i,t){this.writeTag(i,Tt.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(i,t){this.writeTag(i,Tt.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(i,t){this.writeTag(i,Tt.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(i,t){this.writeTag(i,Tt.Fixed64),this.writeSFixed64(t)},writeVarintField:function(i,t){this.writeTag(i,Tt.Varint),this.writeVarint(t)},writeSVarintField:function(i,t){this.writeTag(i,Tt.Varint),this.writeSVarint(t)},writeStringField:function(i,t){this.writeTag(i,Tt.Bytes),this.writeString(t)},writeFloatField:function(i,t){this.writeTag(i,Tt.Fixed32),this.writeFloat(t)},writeDoubleField:function(i,t){this.writeTag(i,Tt.Fixed64),this.writeDouble(t)},writeBooleanField:function(i,t){this.writeVarintField(i,Boolean(t))}};function p1(i,t,e){var n=e.buf,r,o;if(o=n[e.pos++],r=(o&112)>>4,o<128||(o=n[e.pos++],r|=(o&127)<<3,o<128)||(o=n[e.pos++],r|=(o&127)<<10,o<128)||(o=n[e.pos++],r|=(o&127)<<17,o<128)||(o=n[e.pos++],r|=(o&127)<<24,o<128)||(o=n[e.pos++],r|=(o&1)<<31,o<128))return Pr(i,r,t);throw new Error("Expected varint not more than 10 bytes")}function zi(i){return i.type===Tt.Bytes?i.readVarint()+i.pos:i.pos+1}function Pr(i,t,e){return e?t*4294967296+(i>>>0):(t>>>0)*4294967296+(i>>>0)}function v1(i,t){var e,n;if(i>=0?(e=i%4294967296|0,n=i/4294967296|0):(e=~(-i%4294967296),n=~(-i/4294967296),e^4294967295?e=e+1|0:(e=0,n=n+1|0)),i>=18446744073709552e3||i<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),_1(e,n,t),y1(n,t)}function _1(i,t,e){e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos]=i&127}function y1(i,t){var e=(i&7)<<4;t.buf[t.pos++]|=e|((i>>>=3)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127)))))}function mf(i,t,e){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(Math.LN2*7));e.realloc(n);for(var r=e.pos-1;r>=i;r--)e.buf[r+n]=e.buf[r]}function x1(i,t){for(var e=0;e<i.length;e++)t.writeVarint(i[e])}function b1(i,t){for(var e=0;e<i.length;e++)t.writeSVarint(i[e])}function k1(i,t){for(var e=0;e<i.length;e++)t.writeFloat(i[e])}function w1(i,t){for(var e=0;e<i.length;e++)t.writeDouble(i[e])}function M1(i,t){for(var e=0;e<i.length;e++)t.writeBoolean(i[e])}function E1(i,t){for(var e=0;e<i.length;e++)t.writeFixed32(i[e])}function C1(i,t){for(var e=0;e<i.length;e++)t.writeSFixed32(i[e])}function S1(i,t){for(var e=0;e<i.length;e++)t.writeFixed64(i[e])}function T1(i,t){for(var e=0;e<i.length;e++)t.writeSFixed64(i[e])}function va(i,t){return(i[t]|i[t+1]<<8|i[t+2]<<16)+i[t+3]*16777216}function Ar(i,t,e){i[e]=t,i[e+1]=t>>>8,i[e+2]=t>>>16,i[e+3]=t>>>24}function pf(i,t){return(i[t]|i[t+1]<<8|i[t+2]<<16)+(i[t+3]<<24)}function z1(i,t,e){for(var n="",r=t;r<e;){var o=i[r],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r+a>e)break;var l,h,u;a===1?o<128&&(s=o):a===2?(l=i[r+1],(l&192)===128&&(s=(o&31)<<6|l&63,s<=127&&(s=null))):a===3?(l=i[r+1],h=i[r+2],(l&192)===128&&(h&192)===128&&(s=(o&15)<<12|(l&63)<<6|h&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):a===4&&(l=i[r+1],h=i[r+2],u=i[r+3],(l&192)===128&&(h&192)===128&&(u&192)===128&&(s=(o&15)<<18|(l&63)<<12|(h&63)<<6|u&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,a=1):s>65535&&(s-=65536,n+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),n+=String.fromCharCode(s),r+=a}return n}function R1(i,t,e){return gf.decode(i.subarray(t,e))}function I1(i,t,e){for(var n=0,r,o;n<t.length;n++){if(r=t.charCodeAt(n),r>55295&&r<57344)if(o)if(r<56320){i[e++]=239,i[e++]=191,i[e++]=189,o=r;continue}else r=o-55296<<10|r-56320|65536,o=null;else{r>56319||n+1===t.length?(i[e++]=239,i[e++]=191,i[e++]=189):o=r;continue}else o&&(i[e++]=239,i[e++]=191,i[e++]=189,o=null);r<128?i[e++]=r:(r<2048?i[e++]=r>>6|192:(r<65536?i[e++]=r>>12|224:(i[e++]=r>>18|240,i[e++]=r>>12&63|128),i[e++]=r>>6&63|128),i[e++]=r&63|128)}return e}const vf=Ye();class Lo{constructor(t,e,n,r,o){this.styleFunction,this.extent_,this.id_=o,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=n,this.properties_=r}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_=this.type_==="Point"?xo(this.flatCoordinates_):Rl(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=Yi(this.getExtent());this.flatInteriorPoints_=fh(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=sf(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=jc(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=ha(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const t=this.flatCoordinates_;let e=0;const n=this.ends_;for(let r=0,o=n.length;r<o;++r){const s=n[r],a=ha(t,e,s,2,.5);li(this.flatMidpoints_,a),e=s}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(t){return this}simplifyTransformed(t,e){return this}getProperties(){return this.properties_}getStride(){return 2}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(t){t=Gt(t);const e=t.getExtent(),n=t.getWorldExtent();if(e&&n){const r=$e(n)/$e(e);Mi(vf,n[0],n[3],r,-r,0,0,0),Ji(this.flatCoordinates_,0,this.flatCoordinates_.length,2,vf,this.flatCoordinates_)}}getEnds(){return this.ends_}}Lo.prototype.getEndss=Lo.prototype.getEnds,Lo.prototype.getFlatCoordinates=Lo.prototype.getOrientedFlatCoordinates;const Xh=Lo;class P1 extends af{constructor(t){super(),t=t||{},this.dataProjection=new Ns({code:"",units:"tile-pixels"}),this.featureClass_=t.featureClass?t.featureClass:Xh,this.geometryName_=t.geometryName,this.layerName_=t.layerName?t.layerName:"layer",this.layers_=t.layers?t.layers:null,this.idProperty_=t.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(t,e,n,r){t.pos=e.geometry;const o=t.readVarint()+t.pos;let s=1,a=0,l=0,h=0,u=0,d=0;for(;t.pos<o;){if(!a){const c=t.readVarint();s=c&7,a=c>>3}a--,s===1||s===2?(l+=t.readSVarint(),h+=t.readSVarint(),s===1&&u>d&&(r.push(u),d=u),n.push(l,h),u+=2):s===7?u>d&&(n.push(n[d],n[d+1]),u+=2):ft(!1,59)}u>d&&(r.push(u),d=u)}createFeature_(t,e,n){const r=e.type;if(r===0)return null;let o;const s=e.properties;let a;this.idProperty_?(a=s[this.idProperty_],delete s[this.idProperty_]):a=e.id,s[this.layerName_]=e.layer.name;const l=[],h=[];this.readRawGeometry_(t,e,l,h);const u=O1(r,h.length);if(this.featureClass_===Xh)o=new this.featureClass_(u,l,h,s,a),o.transform(n.dataProjection);else{let d;if(u=="Polygon"){const g=Xv(l,h);d=g.length>1?new Rh(l,"XY",g):new Wn(l,"XY",h)}else d=u==="Point"?new ni(l,"XY"):u==="LineString"?new Kn(l,"XY"):u==="MultiPoint"?new Ao(l,"XY"):u==="MultiLineString"?new Th(l,"XY",h):null;const c=this.featureClass_;o=new c,this.geometryName_&&o.setGeometryName(this.geometryName_);const f=Ph(d,!1,n);o.setGeometry(f),a!==void 0&&o.setId(a),o.setProperties(s,!0)}return o}getType(){return"arraybuffer"}readFeatures(t,e){const n=this.layers_;e=this.adaptOptions(e);const r=Gt(e.dataProjection);r.setWorldExtent(e.extent),e.dataProjection=r;const o=new g1(t),s=o.readFields(A1,{}),a=[];for(const l in s){if(n&&!n.includes(l))continue;const h=s[l],u=h?[0,0,h.extent,h.extent]:null;r.setExtent(u);for(let d=0,c=h.length;d<c;++d){const f=F1(o,h,d),g=this.createFeature_(o,f,e);g!==null&&a.push(g)}}return a}readProjection(t){return this.dataProjection}setLayers(t){this.layers_=t}}function A1(i,t,e){if(i===3){const n={keys:[],values:[],features:[]},r=e.readVarint()+e.pos;e.readFields(D1,n,r),n.length=n.features.length,n.length&&(t[n.name]=n)}}function D1(i,t,e){if(i===15)t.version=e.readVarint();else if(i===1)t.name=e.readString();else if(i===5)t.extent=e.readVarint();else if(i===2)t.features.push(e.pos);else if(i===3)t.keys.push(e.readString());else if(i===4){let n=null;const r=e.readVarint()+e.pos;for(;e.pos<r;)i=e.readVarint()>>3,n=i===1?e.readString():i===2?e.readFloat():i===3?e.readDouble():i===4?e.readVarint64():i===5?e.readVarint():i===6?e.readSVarint():i===7?e.readBoolean():null;t.values.push(n)}}function L1(i,t,e){if(i==1)t.id=e.readVarint();else if(i==2){const n=e.readVarint()+e.pos;for(;e.pos<n;){const r=t.layer.keys[e.readVarint()],o=t.layer.values[e.readVarint()];t.properties[r]=o}}else i==3?t.type=e.readVarint():i==4&&(t.geometry=e.pos)}function F1(i,t,e){i.pos=t.features[e];const n=i.readVarint()+i.pos,r={layer:t,type:0,properties:{}};return i.readFields(L1,r,n),r}function O1(i,t){let e;return i===1?e=t===1?"Point":"MultiPoint":i===2?e=t===1?"LineString":"MultiLineString":i===3&&(e="Polygon"),e}const N1=P1;function G1(i,t,e,n,r){_f(i,t,e||0,n||i.length-1,r||j1)}function _f(i,t,e,n,r){for(;n>e;){if(n-e>600){var o=n-e+1,s=t-e+1,a=Math.log(o),l=.5*Math.exp(2*a/3),h=.5*Math.sqrt(a*l*(o-l)/o)*(s-o/2<0?-1:1),u=Math.max(e,Math.floor(t-s*l/o+h)),d=Math.min(n,Math.floor(t+(o-s)*l/o+h));_f(i,t,u,d,r)}var c=i[t],f=e,g=n;for(Fo(i,e,t),r(i[n],c)>0&&Fo(i,e,n);f<g;){for(Fo(i,f,g),f++,g--;r(i[f],c)<0;)f++;for(;r(i[g],c)>0;)g--}r(i[e],c)===0?Fo(i,e,g):(g++,Fo(i,g,n)),g<=t&&(e=g+1),t<=g&&(n=g-1)}}function Fo(i,t,e){var n=i[t];i[t]=i[e],i[e]=n}function j1(i,t){return i<t?-1:i>t?1:0}class yf{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const n=[];if(!ya(t,e))return n;const r=this.toBBox,o=[];for(;e;){for(let s=0;s<e.children.length;s++){const a=e.children[s],l=e.leaf?r(a):a;ya(t,l)&&(e.leaf?n.push(a):Wh(t,l)?this._all(a,n):o.push(a))}e=o.pop()}return n}collides(t){let e=this.data;if(!ya(t,e))return!1;const n=[];for(;e;){for(let r=0;r<e.children.length;r++){const o=e.children[r],s=e.leaf?this.toBBox(o):o;if(ya(t,s)){if(e.leaf||Wh(t,s))return!0;n.push(o)}}e=n.pop()}return!1}load(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(let n=0;n<t.length;n++)this.insert(t[n]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(!this.data.children.length)this.data=e;else if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){const n=this.data;this.data=e,e=n}this._insert(e,this.data.height-e.height-1,!0)}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=Lr([]),this}remove(t,e){if(!t)return this;let n=this.data;const r=this.toBBox(t),o=[],s=[];let a,l,h;for(;n||o.length;){if(n||(n=o.pop(),l=o[o.length-1],a=s.pop(),h=!0),n.leaf){const u=B1(t,n.children,e);if(u!==-1)return n.children.splice(u,1),o.push(n),this._condense(o),this}!h&&!n.leaf&&Wh(n,r)?(o.push(n),s.push(a),a=0,l=n,n=n.children[0]):l?(a++,n=l.children[a],h=!1):n=null}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){const n=[];for(;t;)t.leaf?e.push(...t.children):n.push(...t.children),t=n.pop();return e}_build(t,e,n,r){const o=n-e+1;let s=this._maxEntries,a;if(o<=s)return a=Lr(t.slice(e,n+1)),Dr(a,this.toBBox),a;r||(r=Math.ceil(Math.log(o)/Math.log(s)),s=Math.ceil(o/Math.pow(s,r-1))),a=Lr([]),a.leaf=!1,a.height=r;const l=Math.ceil(o/s),h=l*Math.ceil(Math.sqrt(s));xf(t,e,n,h,this.compareMinX);for(let u=e;u<=n;u+=h){const d=Math.min(u+h-1,n);xf(t,u,d,l,this.compareMinY);for(let c=u;c<=d;c+=l){const f=Math.min(c+l-1,d);a.children.push(this._build(t,c,f,r-1))}}return Dr(a,this.toBBox),a}_chooseSubtree(t,e,n,r){for(;r.push(e),!(e.leaf||r.length-1===n);){let o=1/0,s=1/0,a;for(let l=0;l<e.children.length;l++){const h=e.children[l],u=$h(h),d=q1(t,h)-u;d<s?(s=d,o=u<o?u:o,a=h):d===s&&u<o&&(o=u,a=h)}e=a||e.children[0]}return e}_insert(t,e,n){const r=n?t:this.toBBox(t),o=[],s=this._chooseSubtree(r,this.data,e,o);for(s.children.push(t),No(s,r);e>=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(r,o,e)}_split(t,e){const n=t[e],r=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,r);const s=this._chooseSplitIndex(n,o,r),a=Lr(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,Dr(n,this.toBBox),Dr(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this.data=Lr([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Dr(this.data,this.toBBox)}_chooseSplitIndex(t,e,n){let r,o=1/0,s=1/0;for(let a=e;a<=n-e;a++){const l=Oo(t,0,a,this.toBBox),h=Oo(t,a,n,this.toBBox),u=X1(l,h),d=$h(l)+$h(h);u<o?(o=u,r=a,s=d<s?d:s):u===o&&d<s&&(s=d,r=a)}return r||n-e}_chooseSplitAxis(t,e,n){const r=t.leaf?this.compareMinX:U1,o=t.leaf?this.compareMinY:V1,s=this._allDistMargin(t,e,n,r),a=this._allDistMargin(t,e,n,o);s<a&&t.children.sort(r)}_allDistMargin(t,e,n,r){t.children.sort(r);const o=this.toBBox,s=Oo(t,0,e,o),a=Oo(t,n-e,n,o);let l=_a(s)+_a(a);for(let h=e;h<n-e;h++){const u=t.children[h];No(s,t.leaf?o(u):u),l+=_a(s)}for(let h=n-e-1;h>=e;h--){const u=t.children[h];No(a,t.leaf?o(u):u),l+=_a(a)}return l}_adjustParentBBoxes(t,e,n){for(let r=n;r>=0;r--)No(e[r],t)}_condense(t){for(let e=t.length-1,n;e>=0;e--)t[e].children.length===0?e>0?(n=t[e-1].children,n.splice(n.indexOf(t[e]),1)):this.clear():Dr(t[e],this.toBBox)}}function B1(i,t,e){if(!e)return t.indexOf(i);for(let n=0;n<t.length;n++)if(e(i,t[n]))return n;return-1}function Dr(i,t){Oo(i,0,i.children.length,t,i)}function Oo(i,t,e,n,r){r||(r=Lr(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let o=t;o<e;o++){const s=i.children[o];No(r,i.leaf?n(s):s)}return r}function No(i,t){return i.minX=Math.min(i.minX,t.minX),i.minY=Math.min(i.minY,t.minY),i.maxX=Math.max(i.maxX,t.maxX),i.maxY=Math.max(i.maxY,t.maxY),i}function U1(i,t){return i.minX-t.minX}function V1(i,t){return i.minY-t.minY}function $h(i){return(i.maxX-i.minX)*(i.maxY-i.minY)}function _a(i){return i.maxX-i.minX+(i.maxY-i.minY)}function q1(i,t){return(Math.max(t.maxX,i.maxX)-Math.min(t.minX,i.minX))*(Math.max(t.maxY,i.maxY)-Math.min(t.minY,i.minY))}function X1(i,t){const e=Math.max(i.minX,t.minX),n=Math.max(i.minY,t.minY),r=Math.min(i.maxX,t.maxX),o=Math.min(i.maxY,t.maxY);return Math.max(0,r-e)*Math.max(0,o-n)}function Wh(i,t){return i.minX<=t.minX&&i.minY<=t.minY&&t.maxX<=i.maxX&&t.maxY<=i.maxY}function ya(i,t){return t.minX<=i.maxX&&t.minY<=i.maxY&&t.maxX>=i.minX&&t.maxY>=i.minY}function Lr(i){return{children:i,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function xf(i,t,e,n,r){const o=[t,e];for(;o.length;){if(e=o.pop(),t=o.pop(),e-t<=n)continue;const s=t+Math.ceil((e-t)/n/2)*n;G1(i,s,t,e,r),o.push(t,s,s,e)}}function bf(i){return new le({fill:Go(i,""),stroke:jo(i,""),text:$1(i),image:W1(i)})}function Go(i,t){const e=i[t+"fill-color"];if(!!e)return new ge({color:e})}function jo(i,t){const e=i[t+"stroke-width"],n=i[t+"stroke-color"];if(!(!e&&!n))return new ke({width:e,color:n,lineCap:i[t+"stroke-line-cap"],lineJoin:i[t+"stroke-line-join"],lineDash:i[t+"stroke-line-dash"],lineDashOffset:i[t+"stroke-line-dash-offset"],miterLimit:i[t+"stroke-miter-limit"]})}function $1(i){const t=i["text-value"];return t?new cf({text:t,font:i["text-font"],maxAngle:i["text-max-angle"],offsetX:i["text-offset-x"],offsetY:i["text-offset-y"],overflow:i["text-overflow"],placement:i["text-placement"],scale:i["text-scale"],rotateWithView:i["text-rotate-with-view"],rotation:i["text-rotation"],textAlign:i["text-align"],justify:i["text-justify"],textBaseline:i["text-baseline"],padding:i["text-padding"],fill:Go(i,"text-"),backgroundFill:Go(i,"text-background-"),stroke:jo(i,"text-"),backgroundStroke:jo(i,"text-background-")}):void 0}function W1(i){const t=i["icon-src"],e=i["icon-img"];if(t||e)return new ga({src:t,img:e,imgSize:i["icon-img-size"],anchor:i["icon-anchor"],anchorOrigin:i["icon-anchor-origin"],anchorXUnits:i["icon-anchor-x-units"],anchorYUnits:i["icon-anchor-y-units"],color:i["icon-color"],crossOrigin:i["icon-cross-origin"],offset:i["icon-offset"],displacement:i["icon-displacement"],opacity:i["icon-opacity"],scale:i["icon-scale"],rotation:i["icon-rotation"],rotateWithView:i["icon-rotate-with-view"],size:i["icon-size"],declutterMode:i["icon-declutter-mode"]});const n=i["shape-points"];if(n){const o="shape-";return new ma({points:n,fill:Go(i,o),stroke:jo(i,o),radius:i["shape-radius"],radius1:i["shape-radius1"],radius2:i["shape-radius2"],angle:i["shape-angle"],displacement:i["shape-displacement"],rotation:i["shape-rotation"],rotateWithView:i["shape-rotate-with-view"],scale:i["shape-scale"],declutterMode:i["shape-declutter-mode"]})}const r=i["circle-radius"];if(r){const o="circle-";return new Hn({radius:r,fill:Go(i,o),stroke:jo(i,o),displacement:i["circle-displacement"],scale:i["circle-scale"],rotation:i["circle-rotation"],rotateWithView:i["circle-rotate-with-view"],declutterMode:i["circle-declutter-mode"]})}}const kf={RENDER_ORDER:"renderOrder"};class Y1 extends Os{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter!==void 0?t.declutter:!1,this.renderBuffer_=t.renderBuffer!==void 0?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=t.updateWhileAnimating!==void 0?t.updateWhileAnimating:!1,this.updateWhileInteracting_=t.updateWhileInteracting!==void 0?t.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(kf.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t){t.declutterTree||(t.declutterTree=new yf(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(kf.RENDER_ORDER,t)}setStyle(t){let e;if(t===void 0)e=d1;else if(t===null)e=null;else if(typeof t=="function")e=t;else if(t instanceof le)e=t;else if(Array.isArray(t)){const n=t.length,r=new Array(n);for(let o=0;o<n;++o){const s=t[o];s instanceof le?r[o]=s:r[o]=bf(s)}e=r}else e=bf(t);this.style_=e,this.styleFunction_=t===null?void 0:u1(this.style_),this.changed()}}const wf=Y1,Bo={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},xa=[Bo.FILL],on=[Bo.STROKE],Jn=[Bo.BEGIN_PATH],Mf=[Bo.CLOSE_PATH],Q=Bo;class K1{drawCustom(t,e,n,r){}drawGeometry(t){}setStyle(t){}drawCircle(t,e){}drawFeature(t,e){}drawGeometryCollection(t,e){}drawLineString(t,e){}drawMultiLineString(t,e){}drawMultiPoint(t,e){}drawMultiPolygon(t,e){}drawPoint(t,e){}drawPolygon(t,e){}drawText(t,e){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}const Ef=K1;class Z1 extends Ef{constructor(t,e,n,r){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=r,this.maxLineWidth=0,this.resolution=n,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return e==1?t:t.map(function(n){return n*e})}appendFlatPointCoordinates(t,e){const n=this.getBufferedMaxExtent(),r=this.tmpCoordinate_,o=this.coordinates;let s=o.length;for(let a=0,l=t.length;a<l;a+=e)r[0]=t[a],r[1]=t[a+1],js(n,r)&&(o[s++]=r[0],o[s++]=r[1]);return s}appendFlatLineCoordinates(t,e,n,r,o,s){const a=this.coordinates;let l=a.length;const h=this.getBufferedMaxExtent();s&&(e+=r);let u=t[e],d=t[e+1];const c=this.tmpCoordinate_;let f=!0,g,m,p;for(g=e+r;g<n;g+=r)c[0]=t[g],c[1]=t[g+1],p=zl(h,c),p!==m?(f&&(a[l++]=u,a[l++]=d,f=!1),a[l++]=c[0],a[l++]=c[1]):p===ne.INTERSECTING?(a[l++]=c[0],a[l++]=c[1],f=!1):f=!0,u=c[0],d=c[1],m=p;return(o&&f||g===e+r)&&(a[l++]=u,a[l++]=d),l}drawCustomCoordinates_(t,e,n,r,o){for(let s=0,a=n.length;s<a;++s){const l=n[s],h=this.appendFlatLineCoordinates(t,e,l,r,!1,!1);o.push(h),e=l}return e}drawCustom(t,e,n,r){this.beginGeometry(t,e);const o=t.getType(),s=t.getStride(),a=this.coordinates.length;let l,h,u,d,c;switch(o){case"MultiPolygon":l=t.getOrientedFlatCoordinates(),d=[];const f=t.getEndss();c=0;for(let g=0,m=f.length;g<m;++g){const p=[];c=this.drawCustomCoordinates_(l,c,f[g],s,p),d.push(p)}this.instructions.push([Q.CUSTOM,a,d,t,n,uh]),this.hitDetectionInstructions.push([Q.CUSTOM,a,d,t,r||n,uh]);break;case"Polygon":case"MultiLineString":u=[],l=o=="Polygon"?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),c=this.drawCustomCoordinates_(l,0,t.getEnds(),s,u),this.instructions.push([Q.CUSTOM,a,u,t,n,Ro]),this.hitDetectionInstructions.push([Q.CUSTOM,a,u,t,r||n,Ro]);break;case"LineString":case"Circle":l=t.getFlatCoordinates(),h=this.appendFlatLineCoordinates(l,0,l.length,s,!1,!1),this.instructions.push([Q.CUSTOM,a,h,t,n,tn]),this.hitDetectionInstructions.push([Q.CUSTOM,a,h,t,r||n,tn]);break;case"MultiPoint":l=t.getFlatCoordinates(),h=this.appendFlatPointCoordinates(l,s),h>a&&(this.instructions.push([Q.CUSTOM,a,h,t,n,tn]),this.hitDetectionInstructions.push([Q.CUSTOM,a,h,t,r||n,tn]));break;case"Point":l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),h=this.coordinates.length,this.instructions.push([Q.CUSTOM,a,h,t,n]),this.hitDetectionInstructions.push([Q.CUSTOM,a,h,t,r||n]);break}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[Q.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Q.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;t.reverse();let e;const n=t.length;let r,o,s=-1;for(e=0;e<n;++e)r=t[e],o=r[0],o==Q.END_GEOMETRY?s=e:o==Q.BEGIN_GEOMETRY&&(r[2]=e,Wp(this.hitDetectionInstructions,s,e),s=-1)}setFillStrokeStyle(t,e){const n=this.state;if(t){const r=t.getColor();n.fillStyle=di(r||Ei)}else n.fillStyle=void 0;if(e){const r=e.getColor();n.strokeStyle=di(r||So);const o=e.getLineCap();n.lineCap=o!==void 0?o:Zs;const s=e.getLineDash();n.lineDash=s?s.slice():Mo;const a=e.getLineDashOffset();n.lineDashOffset=a||Eo;const l=e.getLineJoin();n.lineJoin=l!==void 0?l:Sr;const h=e.getWidth();n.lineWidth=h!==void 0?h:zo;const u=e.getMiterLimit();n.miterLimit=u!==void 0?u:Co,n.lineWidth>this.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0}createFill(t){const e=t.fillStyle,n=[Q.SET_FILL_STYLE,e];return typeof e!="string"&&n.push(!0),n}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[Q.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const n=t.fillStyle;(typeof n!="string"||t.currentFillStyle!=n)&&(n!==void 0&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)}updateStrokeStyle(t,e){const n=t.strokeStyle,r=t.lineCap,o=t.lineDash,s=t.lineDashOffset,a=t.lineJoin,l=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=r||o!=t.currentLineDash&&!Vi(t.currentLineDash,o)||t.currentLineDashOffset!=s||t.currentLineJoin!=a||t.currentLineWidth!=l||t.currentMiterLimit!=h)&&(n!==void 0&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=r,t.currentLineDash=o,t.currentLineDashOffset=s,t.currentLineJoin=a,t.currentLineWidth=l,t.currentMiterLimit=h)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[Q.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=ec(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;ui(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const Uo=Z1;class H1 extends Uo{constructor(t,e,n,r){super(t,e,n,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(t,e){if(!this.image_)return;this.beginGeometry(t,e);const n=t.getFlatCoordinates(),r=t.getStride(),o=this.coordinates.length,s=this.appendFlatPointCoordinates(n,r);this.instructions.push([Q.DRAW_IMAGE,o,s,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([Q.DRAW_IMAGE,o,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const n=t.getFlatCoordinates(),r=t.getStride(),o=this.coordinates.length,s=this.appendFlatPointCoordinates(n,r);this.instructions.push([Q.DRAW_IMAGE,o,s,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([Q.DRAW_IMAGE,o,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}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(t,e){const n=t.getAnchor(),r=t.getSize(),o=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=r[1],this.opacity_=t.getOpacity(),this.originX_=o[0],this.originY_=o[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=r[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const J1=H1;class Q1 extends Uo{constructor(t,e,n,r){super(t,e,n,r)}drawFlatCoordinates_(t,e,n,r){const o=this.coordinates.length,s=this.appendFlatLineCoordinates(t,e,n,r,!1,!1),a=[Q.MOVE_TO_LINE_TO,o,s];return this.instructions.push(a),this.hitDetectionInstructions.push(a),n}drawLineString(t,e){const n=this.state,r=n.strokeStyle,o=n.lineWidth;if(r===void 0||o===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Mo,Eo],Jn);const s=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(s,0,s.length,a),this.hitDetectionInstructions.push(on),this.endGeometry(e)}drawMultiLineString(t,e){const n=this.state,r=n.strokeStyle,o=n.lineWidth;if(r===void 0||o===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],Jn);const s=t.getEnds(),a=t.getFlatCoordinates(),l=t.getStride();let h=0;for(let u=0,d=s.length;u<d;++u)h=this.drawFlatCoordinates_(a,h,s[u],l);this.hitDetectionInstructions.push(on),this.endGeometry(e)}finish(){const t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(on),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(on),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(Jn)}}const ty=Q1;class ey extends Uo{constructor(t,e,n,r){super(t,e,n,r)}drawFlatCoordinatess_(t,e,n,r){const o=this.state,s=o.fillStyle!==void 0,a=o.strokeStyle!==void 0,l=n.length;this.instructions.push(Jn),this.hitDetectionInstructions.push(Jn);for(let h=0;h<l;++h){const u=n[h],d=this.coordinates.length,c=this.appendFlatLineCoordinates(t,e,u,r,!0,!a),f=[Q.MOVE_TO_LINE_TO,d,c];this.instructions.push(f),this.hitDetectionInstructions.push(f),a&&(this.instructions.push(Mf),this.hitDetectionInstructions.push(Mf)),e=u}return s&&(this.instructions.push(xa),this.hitDetectionInstructions.push(xa)),a&&(this.instructions.push(on),this.hitDetectionInstructions.push(on)),e}drawCircle(t,e){const n=this.state,r=n.fillStyle,o=n.strokeStyle;if(r===void 0&&o===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_FILL_STYLE,Ei]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);const s=t.getFlatCoordinates(),a=t.getStride(),l=this.coordinates.length;this.appendFlatLineCoordinates(s,0,s.length,a,!1,!1);const h=[Q.CIRCLE,l];this.instructions.push(Jn,h),this.hitDetectionInstructions.push(Jn,h),n.fillStyle!==void 0&&(this.instructions.push(xa),this.hitDetectionInstructions.push(xa)),n.strokeStyle!==void 0&&(this.instructions.push(on),this.hitDetectionInstructions.push(on)),this.endGeometry(e)}drawPolygon(t,e){const n=this.state,r=n.fillStyle,o=n.strokeStyle;if(r===void 0&&o===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_FILL_STYLE,Ei]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);const s=t.getEnds(),a=t.getOrientedFlatCoordinates(),l=t.getStride();this.drawFlatCoordinatess_(a,0,s,l),this.endGeometry(e)}drawMultiPolygon(t,e){const n=this.state,r=n.fillStyle,o=n.strokeStyle;if(r===void 0&&o===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_FILL_STYLE,Ei]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);const s=t.getEndss(),a=t.getOrientedFlatCoordinates(),l=t.getStride();let h=0;for(let u=0,d=s.length;u<d;++u)h=this.drawFlatCoordinatess_(a,h,s[u],l);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(t!==0){const e=this.coordinates;for(let n=0,r=e.length;n<r;++n)e[n]=Xn(e[n],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;t.fillStyle!==void 0&&this.updateFillStyle(t,this.createFill),t.strokeStyle!==void 0&&this.updateStrokeStyle(t,this.applyStroke)}}const Cf=ey;function iy(i,t,e,n,r){let o=e,s=e,a=0,l=0,h=e,u,d,c,f,g,m,p,_,v,y;for(d=e;d<n;d+=r){const x=t[d],k=t[d+1];g!==void 0&&(v=x-g,y=k-m,f=Math.sqrt(v*v+y*y),p!==void 0&&(l+=c,u=Math.acos((p*v+_*y)/(c*f)),u>i&&(l>a&&(a=l,o=h,s=d),l=0,h=d-r)),c=f,p=v,_=y),g=x,m=k}return l+=f,l>a?[h,d]:[o,s]}const Vo={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class ny extends Uo{constructor(t,e,n,r){super(t,e,n,r),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e){const n=this.textFillState_,r=this.textStrokeState_,o=this.textState_;if(this.text_===""||!o||!n&&!r)return;const s=this.coordinates;let a=s.length;const l=t.getType();let h=null,u=t.getStride();if(o.placement==="line"&&(l=="LineString"||l=="MultiLineString"||l=="Polygon"||l=="MultiPolygon")){if(!Kt(this.getBufferedMaxExtent(),t.getExtent()))return;let d;if(h=t.getFlatCoordinates(),l=="LineString")d=[h.length];else if(l=="MultiLineString")d=t.getEnds();else if(l=="Polygon")d=t.getEnds().slice(0,1);else if(l=="MultiPolygon"){const m=t.getEndss();d=[];for(let p=0,_=m.length;p<_;++p)d.push(m[p][0])}this.beginGeometry(t,e);const c=o.textAlign;let f=0,g;for(let m=0,p=d.length;m<p;++m){if(c==null){const v=iy(o.maxAngle,h,f,d[m],u);f=v[0],g=v[1]}else g=d[m];for(let v=f;v<g;v+=u)s.push(h[v],h[v+1]);const _=s.length;f=d[m],this.drawChars_(a,_),a=_}this.endGeometry(e)}else{let d=o.overflow?null:[];switch(l){case"Point":case"MultiPoint":h=t.getFlatCoordinates();break;case"LineString":h=t.getFlatMidpoint();break;case"Circle":h=t.getCenter();break;case"MultiLineString":h=t.getFlatMidpoints(),u=2;break;case"Polygon":h=t.getFlatInteriorPoint(),o.overflow||d.push(h[2]/this.resolution),u=3;break;case"MultiPolygon":const p=t.getFlatInteriorPoints();h=[];for(let _=0,v=p.length;_<v;_+=3)o.overflow||d.push(p[_+2]/this.resolution),h.push(p[_],p[_+1]);if(h.length===0)return;u=2;break}const c=this.appendFlatPointCoordinates(h,u);if(c===a)return;if(d&&(c-a)/2!==h.length/u){let p=a/2;d=d.filter((_,v)=>{const y=s[(p+v)*2]===h[v*u]&&s[(p+v)*2+1]===h[v*u+1];return y||--p,y})}this.saveTextStates_(),(o.backgroundFill||o.backgroundStroke)&&(this.setFillStrokeStyle(o.backgroundFill,o.backgroundStroke),o.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),o.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let f=o.padding;if(f!=qn&&(o.scale[0]<0||o.scale[1]<0)){let p=o.padding[0],_=o.padding[1],v=o.padding[2],y=o.padding[3];o.scale[0]<0&&(_=-_,y=-y),o.scale[1]<0&&(p=-p,v=-v),f=[p,_,v,y]}const g=this.pixelRatio;this.instructions.push([Q.DRAW_IMAGE,a,c,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,f==qn?qn:f.map(function(p){return p*g}),!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]);const m=1/g;this.hitDetectionInstructions.push([Q.DRAW_IMAGE,a,c,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[m,m],NaN,void 0,this.declutterImageWithText_,f,!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,n=this.textFillState_,r=this.strokeKey_;t&&(r in this.strokeStates||(this.strokeStates[r]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const o=this.textKey_;o in this.textStates||(this.textStates[o]={font:e.font,textAlign:e.textAlign||To,justify:e.justify,textBaseline:e.textBaseline||Hs,scale:e.scale});const s=this.fillKey_;n&&(s in this.fillStates||(this.fillStates[s]={fillStyle:n.fillStyle}))}drawChars_(t,e){const n=this.textStrokeState_,r=this.textState_,o=this.strokeKey_,s=this.textKey_,a=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,h=Vo[r.textBaseline],u=this.textOffsetY_*l,d=this.text_,c=n?n.lineWidth*Math.abs(r.scale[0])/2:0;this.instructions.push([Q.DRAW_CHARS,t,e,h,r.overflow,a,r.maxAngle,l,u,o,c*l,d,s,1]),this.hitDetectionInstructions.push([Q.DRAW_CHARS,t,e,h,r.overflow,a,r.maxAngle,1,u,o,c,d,s,1/l])}setTextStyle(t,e){let n,r,o;if(!t)this.text_="";else{const s=t.getFill();s?(r=this.textFillState_,r||(r={},this.textFillState_=r),r.fillStyle=di(s.getColor()||Ei)):(r=null,this.textFillState_=r);const a=t.getStroke();if(!a)o=null,this.textStrokeState_=o;else{o=this.textStrokeState_,o||(o={},this.textStrokeState_=o);const g=a.getLineDash(),m=a.getLineDashOffset(),p=a.getWidth(),_=a.getMiterLimit();o.lineCap=a.getLineCap()||Zs,o.lineDash=g?g.slice():Mo,o.lineDashOffset=m===void 0?Eo:m,o.lineJoin=a.getLineJoin()||Sr,o.lineWidth=p===void 0?zo:p,o.miterLimit=_===void 0?Co:_,o.strokeStyle=di(a.getColor()||So)}n=this.textState_;const l=t.getFont()||wc;rv(l);const h=t.getScaleArray();n.overflow=t.getOverflow(),n.font=l,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.justify=t.getJustify(),n.textBaseline=t.getTextBaseline()||Hs,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||qn,n.scale=h===void 0?[1,1]:h;const u=t.getOffsetX(),d=t.getOffsetY(),c=t.getRotateWithView(),f=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=u===void 0?0:u,this.textOffsetY_=d===void 0?0:d,this.textRotateWithView_=c===void 0?!1:c,this.textRotation_=f===void 0?0:f,this.strokeKey_=o?(typeof o.strokeStyle=="string"?o.strokeStyle:K(o.strokeStyle))+o.lineCap+o.lineDashOffset+"|"+o.lineWidth+o.lineJoin+o.miterLimit+"["+o.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=r?typeof r.fillStyle=="string"?r.fillStyle:"|"+K(r.fillStyle):""}this.declutterImageWithText_=e}}const ry={Circle:Cf,Default:Uo,Image:J1,LineString:ty,Polygon:Cf,Text:ny};class oy{constructor(t,e,n,r){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=r,this.resolution_=n,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const n=this.buildersByZIndex_[e];for(const r in n){const o=n[r].finish();t[e][r]=o}}return t}getBuilder(t,e){const n=t!==void 0?t.toString():"0";let r=this.buildersByZIndex_[n];r===void 0&&(r={},this.buildersByZIndex_[n]=r);let o=r[e];if(o===void 0){const s=ry[e];o=new s(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),r[e]=o}return o}}const ba=oy;class sy extends jd{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return et()}getData(t){return null}prepareFrame(t){return et()}renderFrame(t,e){return et()}loadedTileCallback(t,e,n){t[e]||(t[e]={}),t[e][n.tileCoord.toString()]=n}createLoadedTileFinder(t,e,n){return function(r,o){const s=this.loadedTileCallback.bind(this,n,r);return t.forEachLoadedTile(e,r,o,s)}.bind(this)}forEachFeatureAtCoordinate(t,e,n,r,o){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){t.target.getState()===Qt.LOADED&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=Qt.LOADED&&e!=Qt.ERROR&&t.addEventListener(tt.CHANGE,this.boundHandleImageChange_),e==Qt.IDLE&&(t.load(),e=t.getState()),e==Qt.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const ay=sy,Sf=[];let Fr=null;function ly(){const i=document.createElement("canvas");i.width=1,i.height=1,Fr=i.getContext("2d")}class hy extends ay{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=Ye(),this.pixelTransform=Ye(),this.inversePixelTransform=Ye(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,n){Fr||ly(),Fr.clearRect(0,0,1,1);let r;try{Fr.drawImage(t,e,n,1,1,0,0,1,1),r=Fr.getImageData(0,0,1,1).data}catch{return Fr=null,null}return r}getBackground(t){let n=this.getLayer().getBackground();return typeof n=="function"&&(n=n(t.viewState.resolution)),n||void 0}useContainer(t,e,n){const r=this.getLayer().getClassName();let o,s;if(t&&t.className===r&&(!n||t&&t.style.backgroundColor&&Vi(wo(t.style.backgroundColor),wo(n)))){const a=t.firstElementChild;a instanceof HTMLCanvasElement&&(s=a.getContext("2d"))}if(s&&s.canvas.style.transform===e?(this.container=t,this.context=s,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){o=document.createElement("div"),o.className=r;let a=o.style;a.position="absolute",a.width="100%",a.height="100%",s=Pe();const l=s.canvas;o.appendChild(l),a=l.style,a.position="absolute",a.left="0",a.transformOrigin="top left",this.container=o,this.context=s}!this.containerReused&&n&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=n)}clipUnrotated(t,e,n){const r=Ki(n),o=Vs(n),s=Us(n),a=Bs(n);Jt(e.coordinateToPixelTransform,r),Jt(e.coordinateToPixelTransform,o),Jt(e.coordinateToPixelTransform,s),Jt(e.coordinateToPixelTransform,a);const l=this.inversePixelTransform;Jt(l,r),Jt(l,o),Jt(l,s),Jt(l,a),t.save(),t.beginPath(),t.moveTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.clip()}dispatchRenderEvent_(t,e,n){const r=this.getLayer();if(r.hasListener(t)){const o=new kc(t,this.inversePixelTransform,n,e);r.dispatchEvent(o)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_(Wi.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(Wi.POSTRENDER,t,e)}getRenderTransform(t,e,n,r,o,s,a){const l=o/2,h=s/2,u=r/e,d=-u,c=-t[0]+a,f=-t[1];return Mi(this.tempTransform,l,h,u,d,-n,c,f)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const Tf=hy;function uy(i,t,e,n,r,o,s,a,l,h,u,d){let c=i[t],f=i[t+1],g=0,m=0,p=0,_=0;function v(){g=c,m=f,t+=n,c=i[t],f=i[t+1],_+=p,p=Math.sqrt((c-g)*(c-g)+(f-m)*(f-m))}do v();while(t<e-n&&_+p<o);let y=p===0?0:(o-_)/p;const x=ki(g,c,y),k=ki(m,f,y),w=t-n,C=_,M=o+a*l(h,r,u);for(;t<e-n&&_+p<M;)v();y=p===0?0:(M-_)/p;const S=ki(g,c,y),R=ki(m,f,y);let A;if(d){const U=[x,k,S,R];nh(U,0,4,2,d,U,U),A=U[0]>U[2]}else A=x>S;const G=Math.PI,P=[],at=w+n===t;t=w,p=0,_=C,c=i[t],f=i[t+1];let j;if(at){v(),j=Math.atan2(f-m,c-g),A&&(j+=j>0?-G:G);const U=(S+x)/2,O=(R+k)/2;return P[0]=[U,O,(M-o)/2,j,r],P}r=r.replace(/\n/g," ");for(let U=0,O=r.length;U<O;){v();let W=Math.atan2(f-m,c-g);if(A&&(W+=W>0?-G:G),j!==void 0){let b=W-j;if(b+=b>G?-2*G:b<-G?2*G:0,Math.abs(b)>s)return null}j=W;const D=U;let Z=0;for(;U<O;++U){const b=A?O-U-1:U,T=a*l(h,r[b],u);if(t+n<e&&_+p<o+Z+T/2)break;Z+=T}if(U===D)continue;const V=A?r.substring(O-D,O-U):r.substring(D,U);y=p===0?0:(o+Z/2-_)/p;const z=ki(g,c,y),ot=ki(m,f,y);P.push([z,ot,Z/2,W,V]),o+=Z}return P}const Or=Ge(),sn=[],Ri=[],Ii=[],an=[];function zf(i){return i[3].declutterBox}const dy=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function Rf(i,t){return(t==="start"||t==="end")&&!dy.test(i)&&(t=t==="start"?"left":"right"),Vo[t]}function cy(i,t,e){return e>0&&i.push(`
43
- `,""),i.push(t,""),i}class fy{constructor(t,e,n,r){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=r.instructions,this.coordinates=r.coordinates,this.coordinateCache_={},this.renderedTransform_=Ye(),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_={}}createLabel(t,e,n,r){const o=t+e+n+r;if(this.labels_[o])return this.labels_[o];const s=r?this.strokeStates[r]:null,a=n?this.fillStates[n]:null,l=this.textStates[e],h=this.pixelRatio,u=[l.scale[0]*h,l.scale[1]*h],d=Array.isArray(t),c=l.justify?Vo[l.justify]:Rf(Array.isArray(t)?t[0]:t,l.textAlign||To),f=r&&s.lineWidth?s.lineWidth:0,g=d?t:t.split(`
44
- `).reduce(cy,[]),{width:m,height:p,widths:_,heights:v,lineWidths:y}=sv(l,g),x=m+f,k=[],w=(x+2)*u[0],C=(p+f)*u[1],M={width:w<0?Math.floor(w):Math.ceil(w),height:C<0?Math.floor(C):Math.ceil(C),contextInstructions:k};(u[0]!=1||u[1]!=1)&&k.push("scale",u),r&&(k.push("strokeStyle",s.strokeStyle),k.push("lineWidth",f),k.push("lineCap",s.lineCap),k.push("lineJoin",s.lineJoin),k.push("miterLimit",s.miterLimit),k.push("setLineDash",[s.lineDash]),k.push("lineDashOffset",s.lineDashOffset)),n&&k.push("fillStyle",a.fillStyle),k.push("textBaseline","middle"),k.push("textAlign","center");const S=.5-c;let R=c*x+S*f;const A=[],G=[];let P=0,at=0,j=0,U=0,O;for(let W=0,D=g.length;W<D;W+=2){const Z=g[W];if(Z===`
45
- `){at+=P,P=0,R=c*x+S*f,++U;continue}const V=g[W+1]||l.font;V!==O&&(r&&A.push("font",V),n&&G.push("font",V),O=V),P=Math.max(P,v[j]);const z=[Z,R+S*_[j]+c*(_[j]-y[U]),.5*(f+P)+at];R+=_[j],r&&A.push("strokeText",z),n&&G.push("fillText",z),++j}return Array.prototype.push.apply(k,A),Array.prototype.push.apply(k,G),this.labels_[o]=M,M}replayTextBackground_(t,e,n,r,o,s,a){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,n),t.lineTo.apply(t,r),t.lineTo.apply(t,o),t.lineTo.apply(t,e),s&&(this.alignFill_=s[2],this.fill_(t)),a&&(this.setStrokeStyle_(t,a),t.stroke())}calculateImageOrLabelDimensions_(t,e,n,r,o,s,a,l,h,u,d,c,f,g,m,p){a*=c[0],l*=c[1];let _=n-a,v=r-l;const y=o+h>t?t-h:o,x=s+u>e?e-u:s,k=g[3]+y*c[0]+g[1],w=g[0]+x*c[1]+g[2],C=_-g[3],M=v-g[0];(m||d!==0)&&(sn[0]=C,an[0]=C,sn[1]=M,Ri[1]=M,Ri[0]=C+k,Ii[0]=Ri[0],Ii[1]=M+w,an[1]=Ii[1]);let S;return d!==0?(S=Mi(Ye(),n,r,1,1,d,-n,-r),Jt(S,sn),Jt(S,Ri),Jt(S,Ii),Jt(S,an),ti(Math.min(sn[0],Ri[0],Ii[0],an[0]),Math.min(sn[1],Ri[1],Ii[1],an[1]),Math.max(sn[0],Ri[0],Ii[0],an[0]),Math.max(sn[1],Ri[1],Ii[1],an[1]),Or)):ti(Math.min(C,C+k),Math.min(M,M+w),Math.max(C,C+k),Math.max(M,M+w),Or),f&&(_=Math.round(_),v=Math.round(v)),{drawImageX:_,drawImageY:v,drawImageW:y,drawImageH:x,originX:h,originY:u,declutterBox:{minX:Or[0],minY:Or[1],maxX:Or[2],maxY:Or[3],value:p},canvasTransform:S,scale:c}}replayImageOrLabel_(t,e,n,r,o,s,a){const l=!!(s||a),h=r.declutterBox,u=t.canvas,d=a?a[2]*r.scale[0]/2:0;return h.minX-d<=u.width/e&&h.maxX+d>=0&&h.minY-d<=u.height/e&&h.maxY+d>=0&&(l&&this.replayTextBackground_(t,sn,Ri,Ii,an,s,a),av(t,r.canvasTransform,o,n,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0}fill_(t){if(this.alignFill_){const e=Jt(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(e[0]%n,e[1]%n),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,n,r){const o=this.textStates[e],s=this.createLabel(t,e,r,n),a=this.strokeStates[n],l=this.pixelRatio,h=Rf(Array.isArray(t)?t[0]:t,o.textAlign||To),u=Vo[o.textBaseline||Hs],d=a&&a.lineWidth?a.lineWidth:0,c=s.width/l-2*o.scale[0],f=h*c+2*(.5-h)*d,g=u*s.height/l+2*(.5-u)*d;return{label:s,anchorX:f,anchorY:g}}execute_(t,e,n,r,o,s,a,l){let h;this.pixelCoordinates_&&Vi(n,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=Ji(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),q0(this.renderedTransform_,n));let u=0;const d=r.length;let c=0,f,g,m,p,_,v,y,x,k,w,C,M,S=0,R=0,A=null,G=null;const P=this.coordinateCache_,at=this.viewRotation_,j=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,U={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:at},O=this.instructions!=r||this.overlaps?0:200;let W,D,Z,V;for(;u<d;){const z=r[u];switch(z[0]){case Q.BEGIN_GEOMETRY:W=z[1],V=z[3],W.getGeometry()?a!==void 0&&!Kt(a,V.getExtent())?u=z[2]+1:++u:u=z[2];break;case Q.BEGIN_PATH:S>O&&(this.fill_(t),S=0),R>O&&(t.stroke(),R=0),!S&&!R&&(t.beginPath(),p=NaN,_=NaN),++u;break;case Q.CIRCLE:c=z[1];const b=h[c],T=h[c+1],Y=h[c+2],E=h[c+3],H=Y-b,$=E-T,vt=Math.sqrt(H*H+$*$);t.moveTo(b+vt,T),t.arc(b,T,vt,0,2*Math.PI,!0),++u;break;case Q.CLOSE_PATH:t.closePath(),++u;break;case Q.CUSTOM:c=z[1],f=z[2];const Ct=z[3],_t=z[4],Et=z.length==6?z[5]:void 0;U.geometry=Ct,U.feature=W,u in P||(P[u]=[]);const Lt=P[u];Et?Et(h,c,f,2,Lt):(Lt[0]=h[c],Lt[1]=h[c+1],Lt.length=2),_t(Lt,U),++u;break;case Q.DRAW_IMAGE:c=z[1],f=z[2],x=z[3],g=z[4],m=z[5];let Dt=z[6];const jt=z[7],F=z[8],ut=z[9],pt=z[10];let kt=z[11];const yt=z[12];let st=z[13];const nt=z[14],wt=z[15];if(!x&&z.length>=20){k=z[19],w=z[20],C=z[21],M=z[22];const de=this.drawLabelWithPointPlacement_(k,w,C,M);x=de.label,z[3]=x;const bi=z[23];g=(de.anchorX-bi)*this.pixelRatio,z[4]=g;const _e=z[24];m=(de.anchorY-_e)*this.pixelRatio,z[5]=m,Dt=x.height,z[6]=Dt,st=x.width,z[13]=st}let zt;z.length>25&&(zt=z[25]);let Bt,xt,dt;z.length>17?(Bt=z[16],xt=z[17],dt=z[18]):(Bt=qn,xt=!1,dt=!1),pt&&j?kt+=at:!pt&&!j&&(kt-=at);let Ft=0;for(;c<f;c+=2){if(zt&&zt[Ft++]<st/this.pixelRatio)continue;const de=this.calculateImageOrLabelDimensions_(x.width,x.height,h[c],h[c+1],st,Dt,g,m,F,ut,kt,yt,o,Bt,xt||dt,W),bi=[t,e,x,de,jt,xt?A:null,dt?G:null];if(l){if(nt==="none")continue;if(nt==="obstacle"){l.insert(de.declutterBox);continue}else{let _e,Xe;if(wt){const Re=f-c;if(!wt[Re]){wt[Re]=bi;continue}if(_e=wt[Re],delete wt[Re],Xe=zf(_e),l.collides(Xe))continue}if(l.collides(de.declutterBox))continue;_e&&(l.insert(Xe),this.replayImageOrLabel_.apply(this,_e)),l.insert(de.declutterBox)}}this.replayImageOrLabel_.apply(this,bi)}++u;break;case Q.DRAW_CHARS:const St=z[1],ct=z[2],ue=z[3],Ve=z[4];M=z[5];const $t=z[6],ze=z[7],Ut=z[8];C=z[9];const Ht=z[10];k=z[11],w=z[12];const Tn=[z[13],z[13]],ae=this.textStates[w],qe=ae.font,ve=[ae.scale[0]*ze,ae.scale[1]*ze];let Oe;qe in this.widths_?Oe=this.widths_[qe]:(Oe={},this.widths_[qe]=Oe);const Ni=of(h,St,ct,2),sl=Math.abs(ve[0])*Ec(qe,k,Oe);if(Ve||sl<=Ni){const de=this.textStates[w].textAlign,bi=(Ni-sl)*Vo[de],_e=uy(h,St,ct,2,k,bi,$t,Math.abs(ve[0]),Ec,qe,Oe,j?0:this.viewRotation_);t:if(_e){const Xe=[];let Re,oo,so,ye,Ie;if(C)for(Re=0,oo=_e.length;Re<oo;++Re){Ie=_e[Re],so=Ie[4],ye=this.createLabel(so,w,"",C),g=Ie[2]+(ve[0]<0?-Ht:Ht),m=ue*ye.height+(.5-ue)*2*Ht*ve[1]/ve[0]-Ut;const ee=this.calculateImageOrLabelDimensions_(ye.width,ye.height,Ie[0],Ie[1],ye.width,ye.height,g,m,0,0,Ie[3],Tn,!1,qn,!1,W);if(l&&l.collides(ee.declutterBox))break t;Xe.push([t,e,ye,ee,1,null,null])}if(M)for(Re=0,oo=_e.length;Re<oo;++Re){Ie=_e[Re],so=Ie[4],ye=this.createLabel(so,w,M,""),g=Ie[2],m=ue*ye.height-Ut;const ee=this.calculateImageOrLabelDimensions_(ye.width,ye.height,Ie[0],Ie[1],ye.width,ye.height,g,m,0,0,Ie[3],Tn,!1,qn,!1,W);if(l&&l.collides(ee.declutterBox))break t;Xe.push([t,e,ye,ee,1,null,null])}l&&l.load(Xe.map(zf));for(let ee=0,xs=Xe.length;ee<xs;++ee)this.replayImageOrLabel_.apply(this,Xe[ee])}}++u;break;case Q.END_GEOMETRY:if(s!==void 0){W=z[1];const de=s(W,V);if(de)return de}++u;break;case Q.FILL:O?S++:this.fill_(t),++u;break;case Q.MOVE_TO_LINE_TO:for(c=z[1],f=z[2],D=h[c],Z=h[c+1],v=D+.5|0,y=Z+.5|0,(v!==p||y!==_)&&(t.moveTo(D,Z),p=v,_=y),c+=2;c<f;c+=2)D=h[c],Z=h[c+1],v=D+.5|0,y=Z+.5|0,(c==f-2||v!==p||y!==_)&&(t.lineTo(D,Z),p=v,_=y);++u;break;case Q.SET_FILL_STYLE:A=z,this.alignFill_=z[2],S&&(this.fill_(t),S=0,R&&(t.stroke(),R=0)),t.fillStyle=z[1],++u;break;case Q.SET_STROKE_STYLE:G=z,R&&(t.stroke(),R=0),this.setStrokeStyle_(t,z),++u;break;case Q.STROKE:O?R++:t.stroke(),++u;break;default:++u;break}}S&&this.fill_(t),R&&t.stroke()}execute(t,e,n,r,o,s){this.viewRotation_=r,this.execute_(t,e,n,this.instructions,o,void 0,void 0,s)}executeHitDetection(t,e,n,r,o){return this.viewRotation_=n,this.execute_(t,1,e,this.hitDetectionInstructions,!0,r,o)}}const gy=fy,Yh=["Polygon","Circle","LineString","Image","Text","Default"];class my{constructor(t,e,n,r,o,s){this.maxExtent_=t,this.overlaps_=r,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=s,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=Ye(),this.createExecutors_(o)}clip(t,e){const n=this.getClipCoords(e);t.beginPath(),t.moveTo(n[0],n[1]),t.lineTo(n[2],n[3]),t.lineTo(n[4],n[5]),t.lineTo(n[6],n[7]),t.clip()}createExecutors_(t){for(const e in t){let n=this.executorsByZIndex_[e];n===void 0&&(n={},this.executorsByZIndex_[e]=n);const r=t[e];for(const o in r){const s=r[o];n[o]=new gy(this.resolution_,this.pixelRatio_,this.overlaps_,s)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const n=this.executorsByZIndex_[e];for(let r=0,o=t.length;r<o;++r)if(t[r]in n)return!0}return!1}forEachFeatureAtCoordinate(t,e,n,r,o,s){r=Math.round(r);const a=r*2+1,l=Mi(this.hitDetectionTransform_,r+.5,r+.5,1/e,-1/e,-n,-t[0],-t[1]),h=!this.hitDetectionContext_;h&&(this.hitDetectionContext_=Pe(a,a));const u=this.hitDetectionContext_;u.canvas.width!==a||u.canvas.height!==a?(u.canvas.width=a,u.canvas.height=a):h||u.clearRect(0,0,a,a);let d;this.renderBuffer_!==void 0&&(d=Ge(),bo(d,t),ui(d,e*(this.renderBuffer_+r),d));const c=py(r);let f;function g(k,w){const C=u.getImageData(0,0,a,a).data;for(let M=0,S=c.length;M<S;M++)if(C[c[M]]>0){if(!s||f!=="Image"&&f!=="Text"||s.includes(k)){const R=(c[M]-3)/4,A=r-R%a,G=r-(R/a|0),P=o(k,w,A*A+G*G);if(P)return P}u.clearRect(0,0,a,a);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);m.sort(An);let p,_,v,y,x;for(p=m.length-1;p>=0;--p){const k=m[p].toString();for(v=this.executorsByZIndex_[k],_=Yh.length-1;_>=0;--_)if(f=Yh[_],y=v[f],y!==void 0&&(x=y.executeHitDetection(u,l,n,g,d),x))return x}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const n=e[0],r=e[1],o=e[2],s=e[3],a=[n,r,n,s,o,s,o,r];return Ji(a,0,8,2,t,a),a}isEmpty(){return Fn(this.executorsByZIndex_)}execute(t,e,n,r,o,s,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(An),this.maxExtent_&&(t.save(),this.clip(t,n)),s=s||Yh;let h,u,d,c,f,g;for(a&&l.reverse(),h=0,u=l.length;h<u;++h){const m=l[h].toString();for(f=this.executorsByZIndex_[m],d=0,c=s.length;d<c;++d){const p=s[d];g=f[p],g!==void 0&&g.execute(t,e,n,r,o,a)}}this.maxExtent_&&t.restore()}}const Kh={};function py(i){if(Kh[i]!==void 0)return Kh[i];const t=i*2+1,e=i*i,n=new Array(e+1);for(let o=0;o<=i;++o)for(let s=0;s<=i;++s){const a=o*o+s*s;if(a>e)break;let l=n[a];l||(l=[],n[a]=l),l.push(((i+o)*t+(i+s))*4+3),o>0&&l.push(((i-o)*t+(i+s))*4+3),s>0&&(l.push(((i+o)*t+(i-s))*4+3),o>0&&l.push(((i-o)*t+(i-s))*4+3))}const r=[];for(let o=0,s=n.length;o<s;++o)n[o]&&r.push(...n[o]);return Kh[i]=r,r}const ka=my;class vy extends Ef{constructor(t,e,n,r,o,s,a){super(),this.context_=t,this.pixelRatio_=e,this.extent_=n,this.transform_=r,this.viewRotation_=o,this.squaredTolerance_=s,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_=Ye()}drawImages_(t,e,n,r){if(!this.image_)return;const o=Ji(t,e,n,r,this.transform_,this.pixelCoordinates_),s=this.context_,a=this.tmpLocalTransform_,l=s.globalAlpha;this.imageOpacity_!=1&&(s.globalAlpha=l*this.imageOpacity_);let h=this.imageRotation_;this.imageRotateWithView_&&(h+=this.viewRotation_);for(let u=0,d=o.length;u<d;u+=2){const c=o[u]-this.imageAnchorX_,f=o[u+1]-this.imageAnchorY_;if(h!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const g=c+this.imageAnchorX_,m=f+this.imageAnchorY_;Mi(a,g,m,1,1,h,-g,-m),s.setTransform.apply(s,a),s.translate(g,m),s.scale(this.imageScale_[0],this.imageScale_[1]),s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),s.setTransform(1,0,0,1,0,0)}else s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,c,f,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(s.globalAlpha=l)}drawText_(t,e,n,r){if(!this.textState_||this.text_==="")return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const o=Ji(t,e,n,r,this.transform_,this.pixelCoordinates_),s=this.context_;let a=this.textRotation_;for(this.textRotateWithView_&&(a+=this.viewRotation_);e<n;e+=r){const l=o[e]+this.textOffsetX_,h=o[e+1]+this.textOffsetY_;a!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(s.translate(l-this.textOffsetX_,h-this.textOffsetY_),s.rotate(a),s.translate(this.textOffsetX_,this.textOffsetY_),s.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&s.strokeText(this.text_,0,0),this.textFillState_&&s.fillText(this.text_,0,0),s.setTransform(1,0,0,1,0,0)):(this.textStrokeState_&&s.strokeText(this.text_,l,h),this.textFillState_&&s.fillText(this.text_,l,h))}}moveToLineTo_(t,e,n,r,o){const s=this.context_,a=Ji(t,e,n,r,this.transform_,this.pixelCoordinates_);s.moveTo(a[0],a[1]);let l=a.length;o&&(l-=2);for(let h=2;h<l;h+=2)s.lineTo(a[h],a[h+1]);return o&&s.closePath(),n}drawRings_(t,e,n,r){for(let o=0,s=n.length;o<s;++o)e=this.moveToLineTo_(t,e,n[o],r,!0);return e}drawCircle(t){if(!!Kt(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=Iv(t,this.transform_,this.pixelCoordinates_),n=e[2]-e[0],r=e[3]-e[1],o=Math.sqrt(n*n+r*r),s=this.context_;s.beginPath(),s.arc(e[0],e[1],o,0,2*Math.PI),this.fillState_&&s.fill(),this.strokeState_&&s.stroke()}this.text_!==""&&this.drawText_(t.getCenter(),0,2,2)}}setStyle(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())}setTransform(t){this.transform_=t}drawGeometry(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t);break}}drawFeature(t,e){const n=e.getGeometryFunction()(t);!n||!Kt(this.extent_,n.getExtent())||(this.setStyle(e),this.drawGeometry(n))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let n=0,r=e.length;n<r;++n)this.drawGeometry(e[n])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),this.text_!==""&&this.drawText_(e,0,e.length,n)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),this.text_!==""&&this.drawText_(e,0,e.length,n)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Kt(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,n=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(n,0,n.length,t.getStride(),!1),e.stroke()}if(this.text_!==""){const e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getExtent();if(!!Kt(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const n=this.context_,r=t.getFlatCoordinates();let o=0;const s=t.getEnds(),a=t.getStride();n.beginPath();for(let l=0,h=s.length;l<h;++l)o=this.moveToLineTo_(r,o,s[l],a,!1);n.stroke()}if(this.text_!==""){const n=t.getFlatMidpoints();this.drawText_(n,0,n.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Kt(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){const e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Kt(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_,n=t.getOrientedFlatCoordinates();let r=0;const o=t.getEndss(),s=t.getStride();e.beginPath();for(let a=0,l=o.length;a<l;++a){const h=o[a];r=this.drawRings_(n,r,h,s)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){const e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){const e=this.context_,n=this.contextFillState_;n?n.fillStyle!=t.fillStyle&&(n.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})}setContextStrokeState_(t){const e=this.context_,n=this.contextStrokeState_;n?(n.lineCap!=t.lineCap&&(n.lineCap=t.lineCap,e.lineCap=t.lineCap),Vi(n.lineDash,t.lineDash)||e.setLineDash(n.lineDash=t.lineDash),n.lineDashOffset!=t.lineDashOffset&&(n.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset),n.lineJoin!=t.lineJoin&&(n.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),n.lineWidth!=t.lineWidth&&(n.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),n.miterLimit!=t.miterLimit&&(n.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),n.strokeStyle!=t.strokeStyle&&(n.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})}setContextTextState_(t){const e=this.context_,n=this.contextTextState_,r=t.textAlign?t.textAlign:To;n?(n.font!=t.font&&(n.font=t.font,e.font=t.font),n.textAlign!=r&&(n.textAlign=r,e.textAlign=r),n.textBaseline!=t.textBaseline&&(n.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=r,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:r,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(!t)this.fillState_=null;else{const n=t.getColor();this.fillState_={fillStyle:di(n||Ei)}}if(!e)this.strokeState_=null;else{const n=e.getColor(),r=e.getLineCap(),o=e.getLineDash(),s=e.getLineDashOffset(),a=e.getLineJoin(),l=e.getWidth(),h=e.getMiterLimit(),u=o||Mo;this.strokeState_={lineCap:r!==void 0?r:Zs,lineDash:this.pixelRatio_===1?u:u.map(d=>d*this.pixelRatio_),lineDashOffset:(s||Eo)*this.pixelRatio_,lineJoin:a!==void 0?a:Sr,lineWidth:(l!==void 0?l:zo)*this.pixelRatio_,miterLimit:h!==void 0?h:Co,strokeStyle:di(n||So)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}const n=t.getPixelRatio(this.pixelRatio_),r=t.getAnchor(),o=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=r[0]*n,this.imageAnchorY_=r[1]*n,this.imageHeight_=e[1]*n,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=o[0],this.imageOriginY_=o[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const s=t.getScaleArray();this.imageScale_=[s[0]*this.pixelRatio_/n,s[1]*this.pixelRatio_/n],this.imageWidth_=e[0]*n}setTextStyle(t){if(!t)this.text_="";else{const e=t.getFill();if(!e)this.textFillState_=null;else{const f=e.getColor();this.textFillState_={fillStyle:di(f||Ei)}}const n=t.getStroke();if(!n)this.textStrokeState_=null;else{const f=n.getColor(),g=n.getLineCap(),m=n.getLineDash(),p=n.getLineDashOffset(),_=n.getLineJoin(),v=n.getWidth(),y=n.getMiterLimit();this.textStrokeState_={lineCap:g!==void 0?g:Zs,lineDash:m||Mo,lineDashOffset:p||Eo,lineJoin:_!==void 0?_:Sr,lineWidth:v!==void 0?v:zo,miterLimit:y!==void 0?y:Co,strokeStyle:di(f||So)}}const r=t.getFont(),o=t.getOffsetX(),s=t.getOffsetY(),a=t.getRotateWithView(),l=t.getRotation(),h=t.getScaleArray(),u=t.getText(),d=t.getTextAlign(),c=t.getTextBaseline();this.textState_={font:r!==void 0?r:wc,textAlign:d!==void 0?d:To,textBaseline:c!==void 0?c:Hs},this.text_=u!==void 0?Array.isArray(u)?u.reduce((f,g,m)=>f+=m%2?" ":g,""):u:"",this.textOffsetX_=o!==void 0?this.pixelRatio_*o:0,this.textOffsetY_=s!==void 0?this.pixelRatio_*s: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 _y=vy,je=.5;function If(i,t,e,n,r,o,s){const a=i[0]*je,l=i[1]*je,h=Pe(a,l);h.imageSmoothingEnabled=!1;const u=h.canvas,d=new _y(h,je,r,null,s),c=e.length,f=Math.floor((256*256*256-1)/c),g={};for(let p=1;p<=c;++p){const _=e[p-1],v=_.getStyleFunction()||n;if(!n)continue;let y=v(_,o);if(!y)continue;Array.isArray(y)||(y=[y]);const x=p*f,k="#"+("000000"+x.toString(16)).slice(-6);for(let w=0,C=y.length;w<C;++w){const M=y[w],S=M.getGeometryFunction()(_);if(!S||!Kt(r,S.getExtent()))continue;const R=M.clone(),A=R.getFill();A&&A.setColor(k);const G=R.getStroke();G&&(G.setColor(k),G.setLineDash(null)),R.setText(void 0);const P=M.getImage();if(P&&P.getOpacity()!==0){const U=P.getImageSize();if(!U)continue;const O=Pe(U[0],U[1],void 0,{alpha:!1}),W=O.canvas;O.fillStyle=k,O.fillRect(0,0,W.width,W.height),R.setImage(new ga({img:W,imgSize:U,anchor:P.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:P.getOrigin(),opacity:1,size:P.getSize(),scale:P.getScale(),rotation:P.getRotation(),rotateWithView:P.getRotateWithView()}))}const at=R.getZIndex()||0;let j=g[at];j||(j={},g[at]=j,j.Polygon=[],j.Circle=[],j.LineString=[],j.Point=[]),j[S.getType().replace("Multi","")].push(S,R)}}const m=Object.keys(g).map(Number).sort(An);for(let p=0,_=m.length;p<_;++p){const v=g[m[p]];for(const y in v){const x=v[y];for(let k=0,w=x.length;k<w;k+=2){d.setStyle(x[k+1]);for(let C=0,M=t.length;C<M;++C)d.setTransform(t[C]),d.drawGeometry(x[k])}}}return h.getImageData(0,0,u.width,u.height)}function Pf(i,t,e){const n=[];if(e){const r=Math.floor(Math.round(i[0])*je),o=Math.floor(Math.round(i[1])*je),s=(Wt(r,0,e.width-1)+Wt(o,0,e.height-1)*e.width)*4,a=e.data[s],l=e.data[s+1],u=e.data[s+2]+256*(l+256*a),d=Math.floor((256*256*256-1)/t.length);u&&u%d===0&&n.push(t[u/d-1])}return n}const yy=.5,Af={Point:Sy,LineString:My,Polygon:zy,MultiPoint:Ty,MultiLineString:Ey,MultiPolygon:Cy,GeometryCollection:wy,Circle:by};function xy(i,t){return parseInt(K(i),10)-parseInt(K(t),10)}function Df(i,t){const e=Zh(i,t);return e*e}function Zh(i,t){return yy*i/t}function by(i,t,e,n,r){const o=e.getFill(),s=e.getStroke();if(o||s){const l=i.getBuilder(e.getZIndex(),"Circle");l.setFillStrokeStyle(o,s),l.drawCircle(t,n)}const a=e.getText();if(a&&a.getText()){const l=(r||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}function wa(i,t,e,n,r,o,s){let a=!1;const l=e.getImage();if(l){const h=l.getImageState();h==Qt.LOADED||h==Qt.ERROR?l.unlistenImageChange(r):(h==Qt.IDLE&&l.load(),l.listenImageChange(r),a=!0)}return ky(i,t,e,n,o,s),a}function ky(i,t,e,n,r,o){const s=e.getGeometryFunction()(t);if(!s)return;const a=s.simplifyTransformed(n,r);if(e.getRenderer())Lf(i,a,e,t);else{const h=Af[a.getType()];h(i,a,e,t,o)}}function Lf(i,t,e,n){if(t.getType()=="GeometryCollection"){const o=t.getGeometries();for(let s=0,a=o.length;s<a;++s)Lf(i,o[s],e,n);return}i.getBuilder(e.getZIndex(),"Default").drawCustom(t,n,e.getRenderer(),e.getHitDetectionRenderer())}function wy(i,t,e,n,r){const o=t.getGeometriesArray();let s,a;for(s=0,a=o.length;s<a;++s){const l=Af[o[s].getType()];l(i,o[s],e,n,r)}}function My(i,t,e,n,r){const o=e.getStroke();if(o){const a=i.getBuilder(e.getZIndex(),"LineString");a.setFillStrokeStyle(null,o),a.drawLineString(t,n)}const s=e.getText();if(s&&s.getText()){const a=(r||i).getBuilder(e.getZIndex(),"Text");a.setTextStyle(s),a.drawText(t,n)}}function Ey(i,t,e,n,r){const o=e.getStroke();if(o){const a=i.getBuilder(e.getZIndex(),"LineString");a.setFillStrokeStyle(null,o),a.drawMultiLineString(t,n)}const s=e.getText();if(s&&s.getText()){const a=(r||i).getBuilder(e.getZIndex(),"Text");a.setTextStyle(s),a.drawText(t,n)}}function Cy(i,t,e,n,r){const o=e.getFill(),s=e.getStroke();if(s||o){const l=i.getBuilder(e.getZIndex(),"Polygon");l.setFillStrokeStyle(o,s),l.drawMultiPolygon(t,n)}const a=e.getText();if(a&&a.getText()){const l=(r||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}function Sy(i,t,e,n,r){const o=e.getImage(),s=e.getText();let a;if(o){if(o.getImageState()!=Qt.LOADED)return;let l=i;if(r){const u=o.getDeclutterMode();if(u!=="none")if(l=r,u==="obstacle"){const d=i.getBuilder(e.getZIndex(),"Image");d.setImageStyle(o,a),d.drawPoint(t,n)}else s&&s.getText()&&(a={})}const h=l.getBuilder(e.getZIndex(),"Image");h.setImageStyle(o,a),h.drawPoint(t,n)}if(s&&s.getText()){let l=i;r&&(l=r);const h=l.getBuilder(e.getZIndex(),"Text");h.setTextStyle(s,a),h.drawText(t,n)}}function Ty(i,t,e,n,r){const o=e.getImage(),s=e.getText();let a;if(o){if(o.getImageState()!=Qt.LOADED)return;let l=i;if(r){const u=o.getDeclutterMode();if(u!=="none")if(l=r,u==="obstacle"){const d=i.getBuilder(e.getZIndex(),"Image");d.setImageStyle(o,a),d.drawMultiPoint(t,n)}else s&&s.getText()&&(a={})}const h=l.getBuilder(e.getZIndex(),"Image");h.setImageStyle(o,a),h.drawMultiPoint(t,n)}if(s&&s.getText()){let l=i;r&&(l=r);const h=l.getBuilder(e.getZIndex(),"Text");h.setTextStyle(s,a),h.drawText(t,n)}}function zy(i,t,e,n,r){const o=e.getFill(),s=e.getStroke();if(o||s){const l=i.getBuilder(e.getZIndex(),"Polygon");l.setFillStrokeStyle(o,s),l.drawPolygon(t,n)}const a=e.getText();if(a&&a.getText()){const l=(r||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}class Ry extends Tf{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=Ge(),this.wrappedRenderedExtent_=Ge(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.declutterExecutorGroup=null,this.clipping=!0,this.compositionContext_=null,this.opacity_=1}renderWorlds(t,e,n){const r=e.extent,o=e.viewState,s=o.center,a=o.resolution,l=o.projection,h=o.rotation,u=l.getExtent(),d=this.getLayer().getSource(),c=e.pixelRatio,f=e.viewHints,g=!(f[Yt.ANIMATING]||f[Yt.INTERACTING]),m=this.compositionContext_,p=Math.round(e.size[0]*c),_=Math.round(e.size[1]*c),v=d.getWrapX()&&l.canWrapX(),y=v?Nt(u):null,x=v?Math.ceil((r[2]-u[2])/y)+1:1;let k=v?Math.floor((r[0]-u[0])/y):0;do{const w=this.getRenderTransform(s,a,h,c,p,_,k*y);t.execute(m,1,w,h,g,void 0,n)}while(++k<x)}setupCompositionContext_(){if(this.opacity_!==1){const t=Pe(this.context.canvas.width,this.context.canvas.height,Sf);this.compositionContext_=t}else this.compositionContext_=this.context}releaseCompositionContext_(){if(this.opacity_!==1){const t=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=t,kl(this.compositionContext_),Sf.push(this.compositionContext_.canvas),this.compositionContext_=null}}renderDeclutter(t){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree),this.releaseCompositionContext_())}renderFrame(t,e){const n=t.pixelRatio,r=t.layerStatesArray[t.layerIndex];X0(this.pixelTransform,1/n,1/n),Wl(this.inversePixelTransform,this.pixelTransform);const o=_c(this.pixelTransform);this.useContainer(e,o,this.getBackground(t));const s=this.context,a=s.canvas,l=this.replayGroup_,h=this.declutterExecutorGroup;if((!l||l.isEmpty())&&(!h||h.isEmpty()))return null;const u=Math.round(t.size[0]*n),d=Math.round(t.size[1]*n);a.width!=u||a.height!=d?(a.width=u,a.height=d,a.style.transform!==o&&(a.style.transform=o)):this.containerReused||s.clearRect(0,0,u,d),this.preRender(s,t);const c=t.viewState;c.projection,this.opacity_=r.opacity,this.setupCompositionContext_();let f=!1,g=!0;if(r.extent&&this.clipping){const m=Zi(r.extent);g=Kt(m,t.extent),f=g&&!Bn(m,t.extent),f&&this.clipUnrotated(this.compositionContext_,t,m)}return g&&this.renderWorlds(l,t),f&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(s,t),this.renderedRotation_!==c.rotation&&(this.renderedRotation_=c.rotation,this.hitDetectionImageData_=null),this.container}getFeatures(t){return new Promise(function(e){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const n=[this.context.canvas.width,this.context.canvas.height];Jt(this.pixelTransform,n);const r=this.renderedCenter_,o=this.renderedResolution_,s=this.renderedRotation_,a=this.renderedProjection_,l=this.wrappedRenderedExtent_,h=this.getLayer(),u=[],d=n[0]*je,c=n[1]*je;u.push(this.getRenderTransform(r,o,s,je,d,c,0).slice());const f=h.getSource(),g=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!Bn(g,l)){let m=l[0];const p=Nt(g);let _=0,v;for(;m<g[0];)--_,v=p*_,u.push(this.getRenderTransform(r,o,s,je,d,c,v).slice()),m+=p;for(_=0,m=l[2];m>g[2];)++_,v=p*_,u.push(this.getRenderTransform(r,o,s,je,d,c,v).slice()),m-=p}this.hitDetectionImageData_=If(n,u,this.renderedFeatures_,h.getStyleFunction(),l,o,s)}e(Pf(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))}forEachFeatureAtCoordinate(t,e,n,r,o){if(!this.replayGroup_)return;const s=e.viewState.resolution,a=e.viewState.rotation,l=this.getLayer(),h={},u=function(f,g,m){const p=K(f),_=h[p];if(_){if(_!==!0&&m<_.distanceSq){if(m===0)return h[p]=!0,o.splice(o.lastIndexOf(_),1),r(f,l,g);_.geometry=g,_.distanceSq=m}}else{if(m===0)return h[p]=!0,r(f,l,g);o.push(h[p]={feature:f,layer:l,geometry:g,distanceSq:m,callback:r})}};let d;const c=[this.replayGroup_];return this.declutterExecutorGroup&&c.push(this.declutterExecutorGroup),c.some(f=>d=f.forEachFeatureAtCoordinate(t,s,a,n,u,f===this.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map(g=>g.value):null)),d}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),n=e.getSource();if(!n)return!1;const r=t.viewHints[Yt.ANIMATING],o=t.viewHints[Yt.INTERACTING],s=e.getUpdateWhileAnimating(),a=e.getUpdateWhileInteracting();if(this.ready&&!s&&r||!a&&o)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=t.extent,h=t.viewState,u=h.projection,d=h.resolution,c=t.pixelRatio,f=e.getRevision(),g=e.getRenderBuffer();let m=e.getRenderOrder();m===void 0&&(m=xy);const p=h.center.slice(),_=ui(l,g*d),v=_.slice(),y=[_.slice()],x=u.getExtent();if(n.getWrapX()&&u.canWrapX()&&!Bn(x,t.extent)){const j=Nt(x),U=Math.max(Nt(_)/2,j);_[0]=x[0]-U,_[2]=x[2]+U,Nl(p,u);const O=rc(y[0],u);O[0]<x[0]&&O[2]<x[2]?y.push([O[0]+j,O[1],O[2]+j,O[3]]):O[0]>x[0]&&O[2]>x[2]&&y.push([O[0]-j,O[1],O[2]-j,O[3]])}if(this.ready&&this.renderedResolution_==d&&this.renderedRevision_==f&&this.renderedRenderOrder_==m&&Bn(this.wrappedRenderedExtent_,_))return Vi(this.renderedExtent_,v)||(this.hitDetectionImageData_=null,this.renderedExtent_=v),this.renderedCenter_=p,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const k=new ba(Zh(d,c),_,d,c);let w;this.getLayer().getDeclutter()&&(w=new ba(Zh(d,c),_,d,c));let C;for(let j=0,U=y.length;j<U;++j)n.loadFeatures(y[j],d,u);const M=Df(d,c);let S=!0;const R=function(j){let U;const O=j.getStyleFunction()||e.getStyleFunction();if(O&&(U=O(j,d)),U){const W=this.renderFeature(j,M,U,k,C,w);S=S&&!W}}.bind(this),A=ql(_),G=n.getFeaturesInExtent(A);m&&G.sort(m);for(let j=0,U=G.length;j<U;++j)R(G[j]);this.renderedFeatures_=G,this.ready=S;const P=k.finish(),at=new ka(_,d,c,n.getOverlaps(),P,e.getRenderBuffer());return w&&(this.declutterExecutorGroup=new ka(_,d,c,n.getOverlaps(),w.finish(),e.getRenderBuffer())),this.renderedResolution_=d,this.renderedRevision_=f,this.renderedRenderOrder_=m,this.renderedExtent_=v,this.wrappedRenderedExtent_=_,this.renderedCenter_=p,this.renderedProjection_=u,this.replayGroup_=at,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,n,r,o,s){if(!n)return!1;let a=!1;if(Array.isArray(n))for(let l=0,h=n.length;l<h;++l)a=wa(r,t,n[l],e,this.boundHandleStyleImageChange_,o,s)||a;else a=wa(r,t,n,e,this.boundHandleStyleImageChange_,o,s);return a}}const Iy=Ry;class Py extends wf{constructor(t){super(t)}createRenderer(){return new Iy(this)}}const Qn=Py;class Ay{constructor(t){this.rbush_=new yf(t),this.items_={}}insert(t,e){const n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(n),this.items_[K(e)]=n}load(t,e){const n=new Array(e.length);for(let r=0,o=e.length;r<o;r++){const s=t[r],a=e[r],l={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:a};n[r]=l,this.items_[K(a)]=l}this.rbush_.load(n)}remove(t){const e=K(t),n=this.items_[e];return delete this.items_[e],this.rbush_.remove(n)!==null}update(t,e){const n=this.items_[K(e)],r=[n.minX,n.minY,n.maxX,n.maxY];Er(r,t)||(this.remove(e),this.insert(t,e))}getAll(){return this.rbush_.all().map(function(e){return e.value})}getInExtent(t){const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map(function(r){return r.value})}forEach(t){return this.forEach_(this.getAll(),t)}forEachInExtent(t,e){return this.forEach_(this.getInExtent(t),e)}forEach_(t,e){let n;for(let r=0,o=t.length;r<o;r++)if(n=e(t[r]),n)return n;return n}isEmpty(){return Fn(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){const e=this.rbush_.toJSON();return ti(e.minX,e.minY,e.maxX,e.maxY,t)}concat(t){this.rbush_.load(t.rbush_.all());for(const e in t.items_)this.items_[e]=t.items_[e]}}const Ma=Ay;class Dy extends hi{constructor(t){super(),this.projection=Gt(t.projection),this.attributions_=Ff(t.attributions),this.attributionsCollapsible_=t.attributionsCollapsible!==void 0?t.attributionsCollapsible:!0,this.loading=!1,this.state_=t.state!==void 0?t.state:"ready",this.wrapX_=t.wrapX!==void 0?t.wrapX:!1,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise(function(n,r){e.viewResolver=n,e.viewRejector=r})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(){return et()}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=Ff(t),this.changed()}setState(t){this.state_=t,this.changed()}}function Ff(i){return i?Array.isArray(i)?function(t){return i}:typeof i=="function"?i:function(t){return[i]}:null}const Of=Dy,we={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function Ly(i,t){return[[-1/0,-1/0,1/0,1/0]]}let Fy=!1;function Nf(i,t,e,n,r,o,s){const a=new XMLHttpRequest;a.open("GET",typeof i=="function"?i(e,n,r):i,!0),t.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=Fy,a.onload=function(l){if(!a.status||a.status>=200&&a.status<300){const h=t.getType();let u;h=="json"||h=="text"?u=a.responseText:h=="xml"?(u=a.responseXML,u||(u=new DOMParser().parseFromString(a.responseText,"application/xml"))):h=="arraybuffer"&&(u=a.response),u?o(t.readFeatures(u,{extent:e,featureProjection:r}),t.readProjection(u)):s()}else s()},a.onerror=s,a.send()}function Gf(i,t){return function(e,n,r,o,s){const a=this;Nf(i,t,e,n,r,function(l,h){a.addFeatures(l),o!==void 0&&o(l)},s||Ln)}}class ln extends Qe{constructor(t,e,n){super(t),this.feature=e,this.features=n}}class Oy extends Of{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:t.wrapX!==void 0?t.wrapX:!0}),this.on,this.once,this.un,this.loader_=Ln,this.format_=t.format,this.overlaps_=t.overlaps===void 0?!0:t.overlaps,this.url_=t.url,t.loader!==void 0?this.loader_=t.loader:this.url_!==void 0&&(ft(this.format_,7),this.loader_=Gf(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:Ly;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new Ma:null,this.loadedExtentsRtree_=new Ma,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let n,r;Array.isArray(t.features)?r=t.features:t.features&&(n=t.features,r=n.getArray()),!e&&n===void 0&&(n=new We(r)),r!==void 0&&this.addFeaturesInternal(r),n!==void 0&&this.bindFeaturesCollection_(n)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=K(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const n=t.getGeometry();if(n){const r=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(r,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new ln(we.ADDFEATURE,t))}setupChangeEvents_(t,e){this.featureChangeKeys_[t]=[gt(e,tt.CHANGE,this.handleFeatureChange_,this),gt(e,_r.PROPERTYCHANGE,this.handleFeatureChange_,this)]}addToIndex_(t,e){let n=!0;const r=e.getId();return r!==void 0&&(r.toString()in this.idIndex_?n=!1:this.idIndex_[r.toString()]=e),n&&(ft(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),n}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],n=[],r=[];for(let o=0,s=t.length;o<s;o++){const a=t[o],l=K(a);this.addToIndex_(l,a)&&n.push(a)}for(let o=0,s=n.length;o<s;o++){const a=n[o],l=K(a);this.setupChangeEvents_(l,a);const h=a.getGeometry();if(h){const u=h.getExtent();e.push(u),r.push(a)}else this.nullGeometryFeatures_[l]=a}if(this.featuresRtree_&&this.featuresRtree_.load(e,r),this.hasListener(we.ADDFEATURE))for(let o=0,s=n.length;o<s;o++)this.dispatchEvent(new ln(we.ADDFEATURE,n[o]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(we.ADDFEATURE,function(n){e||(e=!0,t.push(n.feature),e=!1)}),this.addEventListener(we.REMOVEFEATURE,function(n){e||(e=!0,t.remove(n.feature),e=!1)}),t.addEventListener(re.ADD,function(n){e||(e=!0,this.addFeature(n.element),e=!1)}.bind(this)),t.addEventListener(re.REMOVE,function(n){e||(e=!0,this.removeFeature(n.element),e=!1)}.bind(this)),this.featuresCollection_=t}clear(t){if(t){for(const n in this.featureChangeKeys_)this.featureChangeKeys_[n].forEach(Ot);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const n=function(r){this.removeFeatureInternal(r)}.bind(this);this.featuresRtree_.forEach(n);for(const r in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[r])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new ln(we.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const n=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(n,function(r){if(r.getGeometry().intersectsCoordinate(t))return e(r)})}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,function(n){if(n.getGeometry().intersectsExtent(t)){const o=e(n);if(o)return o}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),Fn(this.nullGeometryFeatures_)||li(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,function(n){e.push(n)}),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const r=I0(t,e);return[].concat(...r.map(o=>this.featuresRtree_.getInExtent(o)))}else return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const n=t[0],r=t[1];let o=null;const s=[NaN,NaN];let a=1/0;const l=[-1/0,-1/0,1/0,1/0];return e=e||Dn,this.featuresRtree_.forEachInExtent(l,function(h){if(e(h)){const u=h.getGeometry(),d=a;if(a=u.closestPointXY(n,r,s,a),a<d){o=h;const c=Math.sqrt(a);l[0]=n-c,l[1]=r-c,l[2]=n+c,l[3]=r+c}}}),o}getExtent(t){return this.featuresRtree_.getExtent(t)}getFeatureById(t){const e=this.idIndex_[t.toString()];return e!==void 0?e:null}getFeatureByUid(t){const e=this.uidIndex_[t];return e!==void 0?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){const e=t.target,n=K(e),r=e.getGeometry();if(!r)n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[n]=e);else{const s=r.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(s,e)):this.featuresRtree_&&this.featuresRtree_.update(s,e)}const o=e.getId();if(o!==void 0){const s=o.toString();this.idIndex_[s]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[s]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[n]=e;this.changed(),this.dispatchEvent(new ln(we.CHANGEFEATURE,e))}hasFeature(t){const e=t.getId();return e!==void 0?e in this.idIndex_:K(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&Fn(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(t,e,n){const r=this.loadedExtentsRtree_,o=this.strategy_(t,e,n);for(let s=0,a=o.length;s<a;++s){const l=o[s];r.forEachInExtent(l,function(u){return Bn(u.extent,l)})||(++this.loadingExtentsCount_,this.dispatchEvent(new ln(we.FEATURESLOADSTART)),this.loader_.call(this,l,e,n,function(u){--this.loadingExtentsCount_,this.dispatchEvent(new ln(we.FEATURESLOADEND,void 0,u))}.bind(this),function(){--this.loadingExtentsCount_,this.dispatchEvent(new ln(we.FEATURESLOADERROR))}.bind(this)),r.insert(l,{extent:l.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let n;e.forEachInExtent(t,function(r){if(Er(r.extent,t))return n=r,!0}),n&&e.remove(n)}removeFeature(t){if(!t)return;const e=K(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=K(t),n=this.featureChangeKeys_[e];if(!n)return;n.forEach(Ot),delete this.featureChangeKeys_[e];const r=t.getId();return r!==void 0&&delete this.idIndex_[r.toString()],delete this.uidIndex_[e],this.dispatchEvent(new ln(we.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let e=!1;for(const n in this.idIndex_)if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}return e}setLoader(t){this.loader_=t}setUrl(t){ft(this.format_,7),this.url_=t,this.setLoader(Gf(t,this.format_))}}const hn=Oy;class Ny extends Is{constructor(t,e,n){super(),n=n||{},this.tileCoord=t,this.state=e,this.interimTile=null,this.key="",this.transition_=n.transition===void 0?250:n.transition,this.transitionStarts_={},this.interpolate=!!n.interpolate}changed(){this.dispatchEvent(tt.CHANGE)}release(){this.state===N.ERROR&&this.setState(N.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){if(!this.interimTile)return this;let t=this.interimTile;do{if(t.getState()==N.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this}refreshInterimChain(){if(!this.interimTile)return;let t=this.interimTile,e=this;do{if(t.getState()==N.LOADED){t.interimTile=null;break}else t.getState()==N.LOADING?e=t:t.getState()==N.IDLE?e.interimTile=t.interimTile:e=t;t=e.interimTile}while(t)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(this.state!==N.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){et()}getAlpha(t,e){if(!this.transition_)return 1;let n=this.transitionStarts_[t];if(!n)n=e,this.transitionStarts_[t]=n;else if(n===-1)return 1;const r=e-n+1e3/60;return r>=this.transition_?1:Rc(r/this.transition_)}inTransition(t){return this.transition_?this.transitionStarts_[t]!==-1:!1}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}const Ea=Ny;class Gy extends Ea{constructor(t,e,n,r,o,s){super(t,e,s),this.crossOrigin_=r,this.src_=n,this.key=n,this.image_=new Image,r!==null&&(this.image_.crossOrigin=r),this.unlisten_=null,this.tileLoadFunction_=o}getImage(){return this.image_}setImage(t){this.image_=t,this.state=N.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=N.ERROR,this.unlistenImage_(),this.image_=jy(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=N.LOADED:this.state=N.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==N.ERROR&&(this.state=N.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==N.IDLE&&(this.state=N.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=hf(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function jy(){const i=Pe(1,1);return i.fillStyle="rgba(0,0,0,0)",i.fillRect(0,0,1,1),i.canvas}const jf=Gy;class By{constructor(t){this.highWaterMark=t!==void 0?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const n=this.entries_[t];return ft(n!==void 0,15),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_}remove(t){const e=this.entries_[t];return ft(e!==void 0,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.key_;return t}getValues(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){if(!!this.containsKey(t))return this.entries_[t].value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){ft(!(t in this.entries_),16);const n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_}setSize(t){this.highWaterMark=t}}const Uy=By;function Bf(i,t,e,n){return n!==void 0?(n[0]=i,n[1]=t,n[2]=e,n):[i,t,e]}function Nr(i,t,e){return i+"/"+t+"/"+e}function Uf(i){return Nr(i[0],i[1],i[2])}function Vy(i){const[t,e,n]=i.substring(i.lastIndexOf("/")+1,i.length).split(",").map(Number);return Nr(t,e,n)}function Vf(i){return i.split("/").map(Number)}function qy(i){return(i[1]<<i[0])+i[2]}function Xy(i,t){const e=i[0],n=i[1],r=i[2];if(t.getMinZoom()>e||e>t.getMaxZoom())return!1;const o=t.getFullTileRange(e);return o?o.containsXY(n,r):!0}class $y extends Uy{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()}pruneExceptNewestZ(){if(this.getCount()===0)return;const t=this.peekFirstKey(),n=Vf(t)[0];this.forEach(function(r){r.tileCoord[0]!==n&&(this.remove(Uf(r.tileCoord)),r.release())}.bind(this))}}const Hh=$y;class qf{constructor(t,e,n,r){this.minX=t,this.maxX=e,this.minY=n,this.maxY=r}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function Gr(i,t,e,n,r){return r!==void 0?(r.minX=i,r.maxX=t,r.minY=e,r.maxY=n,r):new qf(i,t,e,n)}const Xf=qf,$f=[];class Wy extends Ea{constructor(t,e,n,r){super(t,e,{transition:0}),this.context_={},this.executorGroups={},this.declutterExecutorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=r.bind(void 0,this),this.wrappedTileCoord=n}getContext(t){const e=K(t);return e in this.context_||(this.context_[e]=Pe(1,1,$f)),this.context_[e]}hasContext(t){return K(t)in this.context_}getImage(t){return this.hasContext(t)?this.getContext(t).canvas:null}getReplayState(t){const e=K(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[e]}load(){this.getSourceTiles()}release(){for(const t in this.context_){const e=this.context_[t];kl(e),$f.push(e.canvas),delete this.context_[t]}super.release()}}const Yy=Wy;class Ky extends Ea{constructor(t,e,n,r,o,s){super(t,e,s),this.extent=null,this.format_=r,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=o,this.url_=n,this.key=n}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==N.IDLE&&(this.setState(N.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(t,e){this.setFeatures(t)}onError(){this.setState(N.ERROR)}setFeatures(t){this.features_=t,this.setState(N.LOADED)}setLoader(t){this.loader_=t}}const Zy=Ky,Ca={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"};class Sa extends Qe{constructor(t,e){super(t),this.feature=e}}class Hy extends nn{constructor(t){const e=t;e.stopDown||(e.stopDown=yr),super(e),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=t.source?t.source:null,this.features_=t.features?t.features:null,this.snapTolerance_=t.snapTolerance?t.snapTolerance:12,this.type_=t.type,this.mode_=Qy(this.type_),this.stopClick_=!!t.stopClick,this.minPoints_=t.minPoints?t.minPoints:this.mode_==="Polygon"?3:2,this.maxPoints_=this.mode_==="Circle"?2:t.maxPoints?t.maxPoints:1/0,this.finishCondition_=t.finishCondition?t.finishCondition:Dn,this.geometryLayout_=t.geometryLayout?t.geometryLayout:"XY";let n=t.geometryFunction;if(!n){const r=this.mode_;if(r==="Circle")n=function(o,s,a){const l=s||new B_([NaN,NaN]),h=Vt(o[0]),u=wi(h,Vt(o[o.length-1]));return l.setCenterAndRadius(h,Math.sqrt(u),this.geometryLayout_),l};else{let o;r==="Point"?o=ni:r==="LineString"?o=Kn:r==="Polygon"&&(o=Wn),n=function(s,a,l){return a?r==="Polygon"?s[0].length?a.setCoordinates([s[0].concat([s[0][0]])],this.geometryLayout_):a.setCoordinates([],this.geometryLayout_):a.setCoordinates(s,this.geometryLayout_):a=new o(s,this.geometryLayout_),a}}}this.geometryFunction_=n,this.dragVertexDelay_=t.dragVertexDelay!==void 0?t.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,this.overlay_=new Qn({source:new hn({useSpatialIndex:!1,wrapX:t.wrapX?t.wrapX:!1}),style:t.style?t.style:Jy(),updateWhileInteracting:!0}),this.geometryName_=t.geometryName,this.condition_=t.condition?t.condition:wh,this.freehandCondition_,t.freehand?this.freehandCondition_=kh:this.freehandCondition_=t.freehandCondition?t.freehandCondition:Zc,this.addChangeListener(_h.ACTIVE,this.updateState_)}setMap(t){super.setMap(t),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(t){t.originalEvent.type===tt.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_=this.mode_!=="Point"&&this.freehandCondition_(t);let e=t.type===Mt.POINTERMOVE,n=!0;return!this.freehand_&&this.lastDragTime_&&t.type===Mt.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,e=!0):this.lastDragTime_=void 0,this.shouldHandle_&&this.downTimeout_!==void 0&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&t.type===Mt.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(t.coordinate),n=!1):this.freehand_&&t.type===Mt.POINTERDOWN?n=!1:e&&this.getPointerCount()<2?(n=t.type===Mt.POINTERMOVE,n&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):(t.originalEvent.pointerType==="mouse"||t.type===Mt.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(t)):t.type===Mt.DBLCLICK&&(n=!1),super.handleEvent(t)&&n}handleDownEvent(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new Si(Mt.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)}handleUpEvent(t){let e=!0;if(this.getPointerCount()===0)if(this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t),this.shouldHandle_){const n=!this.finishCoordinate_;n&&this.startDrawing_(t.coordinate),!n&&this.freehand_?this.finishDrawing():!this.freehand_&&(!n||this.mode_==="Point")&&(this.atFinish_(t.pixel)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate)),e=!1}else this.freehand_&&this.abortDrawing();return!e&&this.stopClick_&&t.preventDefault(),e}handlePointerMove_(t){if(this.pointerType_=t.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){const e=this.downPx_,n=t.pixel,r=e[0]-n[0],o=e[1]-n[1],s=r*r+o*o;if(this.shouldHandle_=this.freehand_?s>this.squaredClickTolerance_:s<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t.coordinate):this.createOrUpdateSketchPoint_(t.coordinate.slice())}atFinish_(t){let e=!1;if(this.sketchFeature_){let n=!1,r=[this.finishCoordinate_];const o=this.mode_;if(o==="Point")e=!0;else if(o==="Circle")e=this.sketchCoords_.length===2;else if(o==="LineString")n=this.sketchCoords_.length>this.minPoints_;else if(o==="Polygon"){const s=this.sketchCoords_;n=s[0].length>this.minPoints_,r=[s[0][0],s[0][s[0].length-2]]}if(n){const s=this.getMap();for(let a=0,l=r.length;a<l;a++){const h=r[a],u=s.getPixelFromCoordinate(h),d=t[0]-u[0],c=t[1]-u[1],f=this.freehand_?1:this.snapTolerance_;if(e=Math.sqrt(d*d+c*c)<=f,e){this.finishCoordinate_=h;break}}}}return e}createOrUpdateSketchPoint_(t){this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(t):(this.sketchPoint_=new Ti(new ni(t)),this.updateSketchFeatures_())}createOrUpdateCustomSketchLine_(t){this.sketchLine_||(this.sketchLine_=new Ti);const e=t.getLinearRing(0);let n=this.sketchLine_.getGeometry();n?(n.setFlatCoordinates(e.getLayout(),e.getFlatCoordinates()),n.changed()):(n=new Kn(e.getFlatCoordinates(),e.getLayout()),this.sketchLine_.setGeometry(n))}startDrawing_(t){const e=this.getMap().getView().getProjection(),n=ea(this.geometryLayout_);for(;t.length<n;)t.push(0);this.finishCoordinate_=t,this.mode_==="Point"?this.sketchCoords_=t.slice():this.mode_==="Polygon"?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()],this.sketchLineCoords_&&(this.sketchLine_=new Ti(new Kn(this.sketchLineCoords_)));const r=this.geometryFunction_(this.sketchCoords_,void 0,e);this.sketchFeature_=new Ti,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(r),this.updateSketchFeatures_(),this.dispatchEvent(new Sa(Ca.DRAWSTART,this.sketchFeature_))}modifyDrawing_(t){const e=this.getMap(),n=this.sketchFeature_.getGeometry(),r=e.getView().getProjection(),o=ea(this.geometryLayout_);let s,a;for(;t.length<o;)t.push(0);this.mode_==="Point"?a=this.sketchCoords_:this.mode_==="Polygon"?(s=this.sketchCoords_[0],a=s[s.length-1],this.atFinish_(e.getPixelFromCoordinate(t))&&(t=this.finishCoordinate_.slice())):(s=this.sketchCoords_,a=s[s.length-1]),a[0]=t[0],a[1]=t[1],this.geometryFunction_(this.sketchCoords_,n,r),this.sketchPoint_&&this.sketchPoint_.getGeometry().setCoordinates(t),n.getType()==="Polygon"&&this.mode_!=="Polygon"?this.createOrUpdateCustomSketchLine_(n):this.sketchLineCoords_&&this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_),this.updateSketchFeatures_()}addToDrawing_(t){const e=this.sketchFeature_.getGeometry(),n=this.getMap().getView().getProjection();let r,o;const s=this.mode_;s==="LineString"||s==="Circle"?(this.finishCoordinate_=t.slice(),o=this.sketchCoords_,o.length>=this.maxPoints_&&(this.freehand_?o.pop():r=!0),o.push(t.slice()),this.geometryFunction_(o,e,n)):s==="Polygon"&&(o=this.sketchCoords_[0],o.length>=this.maxPoints_&&(this.freehand_?o.pop():r=!0),o.push(t.slice()),r&&(this.finishCoordinate_=o[0]),this.geometryFunction_(this.sketchCoords_,e,n)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),r&&this.finishDrawing()}removeLastPoint(){if(!this.sketchFeature_)return;const t=this.sketchFeature_.getGeometry(),e=this.getMap().getView().getProjection();let n;const r=this.mode_;if(r==="LineString"||r==="Circle"){if(n=this.sketchCoords_,n.splice(-2,1),n.length>=2){this.finishCoordinate_=n[n.length-2].slice();const o=this.finishCoordinate_.slice();n[n.length-1]=o,this.createOrUpdateSketchPoint_(o)}this.geometryFunction_(n,t,e),t.getType()==="Polygon"&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(r==="Polygon"){n=this.sketchCoords_[0],n.splice(-2,1);const o=this.sketchLine_.getGeometry();if(n.length>=2){const s=n[n.length-2].slice();n[n.length-1]=s,this.createOrUpdateSketchPoint_(s)}o.setCoordinates(n),this.geometryFunction_(this.sketchCoords_,t,e)}n.length===1&&this.abortDrawing(),this.updateSketchFeatures_()}finishDrawing(){const t=this.abortDrawing_();if(!t)return;let e=this.sketchCoords_;const n=t.getGeometry(),r=this.getMap().getView().getProjection();this.mode_==="LineString"?(e.pop(),this.geometryFunction_(e,n,r)):this.mode_==="Polygon"&&(e[0].pop(),this.geometryFunction_(e,n,r),e=n.getCoordinates()),this.type_==="MultiPoint"?t.setGeometry(new Ao([e])):this.type_==="MultiLineString"?t.setGeometry(new Th([e])):this.type_==="MultiPolygon"&&t.setGeometry(new Rh([e])),this.dispatchEvent(new Sa(Ca.DRAWEND,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}abortDrawing_(){this.finishCoordinate_=null;const t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t}abortDrawing(){const t=this.abortDrawing_();t&&this.dispatchEvent(new Sa(Ca.DRAWABORT,t))}appendCoordinates(t){const e=this.mode_,n=!this.sketchFeature_;n&&this.startDrawing_(t[0]);let r;if(e==="LineString"||e==="Circle")r=this.sketchCoords_;else if(e==="Polygon")r=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;n&&r.shift(),r.pop();for(let s=0;s<t.length;s++)this.addToDrawing_(t[s]);const o=t[t.length-1];this.addToDrawing_(o),this.modifyDrawing_(o)}extend(t){const n=t.getGeometry();this.sketchFeature_=t,this.sketchCoords_=n.getCoordinates();const r=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=r.slice(),this.sketchCoords_.push(r.slice()),this.sketchPoint_=new Ti(new ni(r)),this.updateSketchFeatures_(),this.dispatchEvent(new Sa(Ca.DRAWSTART,this.sketchFeature_))}updateSketchFeatures_(){const t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);const e=this.overlay_.getSource();e.clear(!0),e.addFeatures(t)}updateState_(){const t=this.getMap(),e=this.getActive();(!t||!e)&&this.abortDrawing(),this.overlay_.setMap(e?t:null)}}function Jy(){const i=uf();return function(t,e){return i[t.getGeometry().getType()]}}function Qy(i){switch(i){case"Point":case"MultiPoint":return"Point";case"LineString":case"MultiLineString":return"LineString";case"Polygon":case"MultiPolygon":return"Polygon";case"Circle":return"Circle";default:throw new Error("Invalid type: "+i)}}const tx=Hy,Wf=0,qo=1,Yf=[0,0,0,0],jr=[],Jh={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"};class Qh extends Qe{constructor(t,e,n){super(t),this.features=e,this.mapBrowserEvent=n}}class ex extends nn{constructor(t){super(t),this.on,this.once,this.un,this.boundHandleFeatureChange_=this.handleFeatureChange_.bind(this),this.condition_=t.condition?t.condition:Jc,this.defaultDeleteCondition_=function(n){return l_(n)&&d_(n)},this.deleteCondition_=t.deleteCondition?t.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=t.insertVertexCondition?t.insertVertexCondition:kh,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new Ma,this.pixelTolerance_=t.pixelTolerance!==void 0?t.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new Qn({source:new hn({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style?t.style:nx(),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)},this.source_=null,this.hitDetection_=null;let e;if(t.features?e=t.features:t.source&&(this.source_=t.source,e=new We(this.source_.getFeatures()),this.source_.addEventListener(we.ADDFEATURE,this.handleSourceAdd_.bind(this)),this.source_.addEventListener(we.REMOVEFEATURE,this.handleSourceRemove_.bind(this))),!e)throw new Error("The modify interaction requires features, a source or a layer");t.hitDetection&&(this.hitDetection_=t.hitDetection),this.features_=e,this.features_.forEach(this.addFeature_.bind(this)),this.features_.addEventListener(re.ADD,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(re.REMOVE,this.handleFeatureRemove_.bind(this)),this.lastPointerEvent_=null,this.delta_=[0,0],this.snapToPointer_=t.snapToPointer===void 0?!this.hitDetection_:t.snapToPointer}addFeature_(t){const e=t.getGeometry();if(e){const r=this.SEGMENT_WRITERS_[e.getType()];r&&r(t,e)}const n=this.getMap();n&&n.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,n),t.addEventListener(tt.CHANGE,this.boundHandleFeatureChange_)}willModifyFeatures_(t,e){if(!this.featuresBeingModified_){this.featuresBeingModified_=new We;const n=this.featuresBeingModified_.getArray();for(let r=0,o=e.length;r<o;++r){const s=e[r];for(let a=0,l=s.length;a<l;++a){const h=s[a].feature;h&&!n.includes(h)&&this.featuresBeingModified_.push(h)}}this.featuresBeingModified_.getLength()===0?this.featuresBeingModified_=null:this.dispatchEvent(new Qh(Jh.MODIFYSTART,this.featuresBeingModified_,t))}}removeFeature_(t){this.removeFeatureSegmentData_(t),this.vertexFeature_&&this.features_.getLength()===0&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.removeEventListener(tt.CHANGE,this.boundHandleFeatureChange_)}removeFeatureSegmentData_(t){const e=this.rBush_,n=[];e.forEach(function(r){t===r.feature&&n.push(r)});for(let r=n.length-1;r>=0;--r){const o=n[r];for(let s=this.dragSegments_.length-1;s>=0;--s)this.dragSegments_[s][0]===o&&this.dragSegments_.splice(s,1);e.remove(o)}}setActive(t){this.vertexFeature_&&!t&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(t)}setMap(t){this.overlay_.setMap(t),super.setMap(t)}getOverlay(){return this.overlay_}handleSourceAdd_(t){t.feature&&this.features_.push(t.feature)}handleSourceRemove_(t){t.feature&&this.features_.remove(t.feature)}handleFeatureAdd_(t){this.addFeature_(t.element)}handleFeatureChange_(t){if(!this.changingFeature_){const e=t.target;this.removeFeature_(e),this.addFeature_(e)}}handleFeatureRemove_(t){this.removeFeature_(t.element)}writePointGeometry_(t,e){const n=e.getCoordinates(),r={feature:t,geometry:e,segment:[n,n]};this.rBush_.insert(e.getExtent(),r)}writeMultiPointGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r],a={feature:t,geometry:e,depth:[r],index:r,segment:[s,s]};this.rBush_.insert(e.getExtent(),a)}}writeLineStringGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length-1;r<o;++r){const s=n.slice(r,r+2),a={feature:t,geometry:e,index:r,segment:s};this.rBush_.insert(xe(s),a)}}writeMultiLineStringGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length-1;a<l;++a){const h=s.slice(a,a+2),u={feature:t,geometry:e,depth:[r],index:a,segment:h};this.rBush_.insert(xe(h),u)}}}writePolygonGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length-1;a<l;++a){const h=s.slice(a,a+2),u={feature:t,geometry:e,depth:[r],index:a,segment:h};this.rBush_.insert(xe(h),u)}}}writeMultiPolygonGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length;a<l;++a){const h=s[a];for(let u=0,d=h.length-1;u<d;++u){const c=h.slice(u,u+2),f={feature:t,geometry:e,depth:[a,r],index:u,segment:c};this.rBush_.insert(xe(c),f)}}}}writeCircleGeometry_(t,e){const n=e.getCenter(),r={feature:t,geometry:e,index:Wf,segment:[n,n]},o={feature:t,geometry:e,index:qo,segment:[n,n]},s=[r,o];r.featureSegments=s,o.featureSegments=s,this.rBush_.insert(xo(n),r);let a=e;this.rBush_.insert(a.getExtent(),o)}writeGeometryCollectionGeometry_(t,e){const n=e.getGeometriesArray();for(let r=0;r<n.length;++r){const o=n[r],s=this.SEGMENT_WRITERS_[o.getType()];s(t,o)}}createOrUpdateVertexFeature_(t,e,n){let r=this.vertexFeature_;return r?r.getGeometry().setCoordinates(t):(r=new Ti(new ni(t)),this.vertexFeature_=r,this.overlay_.getSource().addFeature(r)),r.set("features",e),r.set("geometries",n),r}handleEvent(t){if(!t.originalEvent)return!0;this.lastPointerEvent_=t;let e;return!t.map.getView().getInteracting()&&t.type==Mt.POINTERMOVE&&!this.handlingDownUpSequence&&this.handlePointerMove_(t),this.vertexFeature_&&this.deleteCondition_(t)&&(t.type!=Mt.SINGLECLICK||!this.ignoreNextSingleClick_?e=this.removePoint():e=!0),t.type==Mt.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),super.handleEvent(t)&&!e}handleDragEvent(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t,this.dragSegments_);const e=[t.coordinate[0]+this.delta_[0],t.coordinate[1]+this.delta_[1]],n=[],r=[];for(let o=0,s=this.dragSegments_.length;o<s;++o){const a=this.dragSegments_[o],l=a[0],h=l.feature;n.includes(h)||n.push(h);const u=l.geometry;r.includes(u)||r.push(u);const d=l.depth;let c;const f=l.segment,g=a[1];for(;e.length<u.getStride();)e.push(f[g][e.length]);switch(u.getType()){case"Point":c=e,f[0]=e,f[1]=e;break;case"MultiPoint":c=u.getCoordinates(),c[l.index]=e,f[0]=e,f[1]=e;break;case"LineString":c=u.getCoordinates(),c[l.index+g]=e,f[g]=e;break;case"MultiLineString":c=u.getCoordinates(),c[d[0]][l.index+g]=e,f[g]=e;break;case"Polygon":c=u.getCoordinates(),c[d[0]][l.index+g]=e,f[g]=e;break;case"MultiPolygon":c=u.getCoordinates(),c[d[1]][d[0]][l.index+g]=e,f[g]=e;break;case"Circle":if(f[0]=e,f[1]=e,l.index===Wf)this.changingFeature_=!0,u.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0,t.map.getView().getProjection();let m=oc(Vt(u.getCenter()),Vt(e));u.setRadius(m),this.changingFeature_=!1}break}c&&this.setGeometryCoordinates_(u,c)}this.createOrUpdateVertexFeature_(e,n,r)}handleDownEvent(t){if(!this.condition_(t))return!1;const e=t.coordinate;this.handlePointerAtPixel_(t.pixel,t.map,e),this.dragSegments_.length=0,this.featuresBeingModified_=null;const n=this.vertexFeature_;if(n){t.map.getView().getProjection();const r=[],o=n.getGeometry().getCoordinates(),s=xe([o]),a=this.rBush_.getInExtent(s),l={};a.sort(ix);for(let h=0,u=a.length;h<u;++h){const d=a[h],c=d.segment;let f=K(d.geometry);const g=d.depth;if(g&&(f+="-"+g.join("-")),l[f]||(l[f]=new Array(2)),d.geometry.getType()==="Circle"&&d.index===qo){const m=Zf(e,d);ei(m,o)&&!l[f][0]&&(this.dragSegments_.push([d,0]),l[f][0]=d);continue}if(ei(c[0],o)&&!l[f][0]){this.dragSegments_.push([d,0]),l[f][0]=d;continue}if(ei(c[1],o)&&!l[f][1]){if(l[f][0]&&l[f][0].index===0){let m=d.geometry.getCoordinates();switch(d.geometry.getType()){case"LineString":case"MultiLineString":continue;case"MultiPolygon":m=m[g[1]];case"Polygon":if(d.index!==m[g[0]].length-2)continue;break}}this.dragSegments_.push([d,1]),l[f][1]=d;continue}K(c)in this.vertexSegments_&&!l[f][0]&&!l[f][1]&&this.insertVertexCondition_(t)&&r.push(d)}r.length&&this.willModifyFeatures_(t,[r]);for(let h=r.length-1;h>=0;--h)this.insertVertex_(r[h],o)}return!!this.vertexFeature_}handleUpEvent(t){for(let e=this.dragSegments_.length-1;e>=0;--e){const n=this.dragSegments_[e][0],r=n.geometry;if(r.getType()==="Circle"){const o=r.getCenter(),s=n.featureSegments[0],a=n.featureSegments[1];s.segment[0]=o,s.segment[1]=o,a.segment[0]=o,a.segment[1]=o,this.rBush_.update(xo(o),s);let l=r;this.rBush_.update(l.getExtent(),a)}else this.rBush_.update(xe(n.segment),n)}return this.featuresBeingModified_&&(this.dispatchEvent(new Qh(Jh.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1}handlePointerMove_(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)}handlePointerAtPixel_(t,e,n){const r=n||e.getCoordinateFromPixel(t);e.getView().getProjection();const o=function(l,h){return Kf(r,l)-Kf(r,h)};let s,a;if(this.hitDetection_){const l=typeof this.hitDetection_=="object"?h=>h===this.hitDetection_:void 0;e.forEachFeatureAtPixel(t,(h,u,d)=>{if(d=d||h.getGeometry(),d.getType()==="Point"&&this.features_.getArray().includes(h)){a=d;const c=d.getFlatCoordinates().slice(0,2);s=[{feature:h,geometry:d,segment:[c,c]}]}return!0},{layerFilter:l})}if(!s){const l=Zi(xo(r,Yf)),h=e.getView().getResolution()*this.pixelTolerance_,u=ql(ui(l,h,Yf));s=this.rBush_.getInExtent(u)}if(s&&s.length>0){const l=s.sort(o)[0],h=l.segment;let u=Zf(r,l);const d=e.getPixelFromCoordinate(u);let c=oc(t,d);if(a||c<=this.pixelTolerance_){const f={};if(f[K(h)]=!0,this.snapToPointer_||(this.delta_[0]=u[0]-r[0],this.delta_[1]=u[1]-r[1]),l.geometry.getType()==="Circle"&&l.index===qo)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(u,[l.feature],[l.geometry]);else{const g=e.getPixelFromCoordinate(h[0]),m=e.getPixelFromCoordinate(h[1]),p=wi(d,g),_=wi(d,m);c=Math.sqrt(Math.min(p,_)),this.snappedToVertex_=c<=this.pixelTolerance_,this.snappedToVertex_&&(u=p>_?h[1]:h[0]),this.createOrUpdateVertexFeature_(u,[l.feature],[l.geometry]);const v={};v[K(l.geometry)]=!0;for(let y=1,x=s.length;y<x;++y){const k=s[y].segment;if(ei(h[0],k[0])&&ei(h[1],k[1])||ei(h[0],k[1])&&ei(h[1],k[0])){const w=K(s[y].geometry);w in v||(v[w]=!0,f[K(k)]=!0)}else break}}this.vertexSegments_=f;return}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)}insertVertex_(t,e){const n=t.segment,r=t.feature,o=t.geometry,s=t.depth,a=t.index;let l;for(;e.length<o.getStride();)e.push(0);switch(o.getType()){case"MultiLineString":l=o.getCoordinates(),l[s[0]].splice(a+1,0,e);break;case"Polygon":l=o.getCoordinates(),l[s[0]].splice(a+1,0,e);break;case"MultiPolygon":l=o.getCoordinates(),l[s[1]][s[0]].splice(a+1,0,e);break;case"LineString":l=o.getCoordinates(),l.splice(a+1,0,e);break;default:return}this.setGeometryCoordinates_(o,l);const h=this.rBush_;h.remove(t),this.updateSegmentIndices_(o,a,s,1);const u={segment:[n[0],e],feature:r,geometry:o,depth:s,index:a};h.insert(xe(u.segment),u),this.dragSegments_.push([u,1]);const d={segment:[e,n[1]],feature:r,geometry:o,depth:s,index:a+1};h.insert(xe(d.segment),d),this.dragSegments_.push([d,0]),this.ignoreNextSingleClick_=!0}removePoint(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=Mt.POINTERDRAG){const t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);const e=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new Qh(Jh.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null,e}return!1}removeVertex_(){const t=this.dragSegments_,e={};let n=!1,r,o,s,a,l,h,u,d,c,f,g;for(l=t.length-1;l>=0;--l)s=t[l],f=s[0],g=K(f.feature),f.depth&&(g+="-"+f.depth.join("-")),g in e||(e[g]={}),s[1]===0?(e[g].right=f,e[g].index=f.index):s[1]==1&&(e[g].left=f,e[g].index=f.index+1);for(g in e){switch(c=e[g].right,u=e[g].left,h=e[g].index,d=h-1,u!==void 0?f=u:f=c,d<0&&(d=0),a=f.geometry,o=a.getCoordinates(),r=o,n=!1,a.getType()){case"MultiLineString":o[f.depth[0]].length>2&&(o[f.depth[0]].splice(h,1),n=!0);break;case"LineString":o.length>2&&(o.splice(h,1),n=!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),n=!0,h===0&&(r.pop(),r.push(r[0]),d=r.length-1));break}if(n){this.setGeometryCoordinates_(a,o);const m=[];if(u!==void 0&&(this.rBush_.remove(u),m.push(u.segment[0])),c!==void 0&&(this.rBush_.remove(c),m.push(c.segment[1])),u!==void 0&&c!==void 0){const p={depth:f.depth,feature:f.feature,geometry:f.geometry,index:d,segment:m};this.rBush_.insert(xe(p.segment),p)}this.updateSegmentIndices_(a,h,f.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.length=0}}return n}setGeometryCoordinates_(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1}updateSegmentIndices_(t,e,n,r){this.rBush_.forEachInExtent(t.getExtent(),function(o){o.geometry===t&&(n===void 0||o.depth===void 0||Vi(o.depth,n))&&o.index>e&&(o.index+=r)})}}function ix(i,t){return i.index-t.index}function Kf(i,t,e){const n=t.geometry;if(n.getType()==="Circle"){let o=n;if(t.index===qo){const s=wi(o.getCenter(),Vt(i)),a=Math.sqrt(s)-o.getRadius();return a*a}}const r=Vt(i);return jr[0]=Vt(t.segment[0]),jr[1]=Vt(t.segment[1]),L0(r,jr)}function Zf(i,t,e){const n=t.geometry;if(n.getType()==="Circle"&&t.index===qo)return Cr(n.getClosestPoint(Vt(i)));const r=Vt(i);return jr[0]=Vt(t.segment[0]),jr[1]=Vt(t.segment[1]),Cr(Fl(r,jr))}function nx(){const i=uf();return function(t,e){return i.Point}}const rx=ex;function Hf(i){if(i.feature)return i.feature;if(i.element)return i.element}const tu=[];class ox extends nn{constructor(t){t=t||{};const e=t;e.handleDownEvent||(e.handleDownEvent=Dn),e.stopDown||(e.stopDown=yr),super(e),this.source_=t.source?t.source:null,this.vertex_=t.vertex!==void 0?t.vertex:!0,this.edge_=t.edge!==void 0?t.edge:!0,this.features_=t.features?t.features:null,this.featuresListenerKeys_=[],this.featureChangeListenerKeys_={},this.indexedFeaturesExtents_={},this.pendingFeatures_={},this.pixelTolerance_=t.pixelTolerance!==void 0?t.pixelTolerance:10,this.rBush_=new Ma,this.GEOMETRY_SEGMENTERS_={Point:this.segmentPointGeometry_.bind(this),LineString:this.segmentLineStringGeometry_.bind(this),LinearRing:this.segmentLineStringGeometry_.bind(this),Polygon:this.segmentPolygonGeometry_.bind(this),MultiPoint:this.segmentMultiPointGeometry_.bind(this),MultiLineString:this.segmentMultiLineStringGeometry_.bind(this),MultiPolygon:this.segmentMultiPolygonGeometry_.bind(this),GeometryCollection:this.segmentGeometryCollectionGeometry_.bind(this),Circle:this.segmentCircleGeometry_.bind(this)}}addFeature(t,e){e=e!==void 0?e:!0;const n=K(t),r=t.getGeometry();if(r){const o=this.GEOMETRY_SEGMENTERS_[r.getType()];if(o){this.indexedFeaturesExtents_[n]=r.getExtent(Ge());const s=[];if(o(s,r),s.length===1)this.rBush_.insert(xe(s[0]),{feature:t,segment:s[0]});else if(s.length>1){const a=s.map(h=>xe(h)),l=s.map(h=>({feature:t,segment:h}));this.rBush_.load(a,l)}}}e&&(this.featureChangeListenerKeys_[n]=gt(t,tt.CHANGE,this.handleFeatureChange_,this))}forEachFeatureAdd_(t){this.addFeature(t)}forEachFeatureRemove_(t){this.removeFeature(t)}getFeatures_(){let t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t}handleEvent(t){const e=this.snapTo(t.pixel,t.coordinate,t.map);return e&&(t.coordinate=e.vertex.slice(0,2),t.pixel=e.vertexPixel),super.handleEvent(t)}handleFeatureAdd_(t){const e=Hf(t);this.addFeature(e)}handleFeatureRemove_(t){const e=Hf(t);this.removeFeature(e)}handleFeatureChange_(t){const e=t.target;if(this.handlingDownUpSequence){const n=K(e);n in this.pendingFeatures_||(this.pendingFeatures_[n]=e)}else this.updateFeature_(e)}handleUpEvent(t){const e=Object.values(this.pendingFeatures_);return e.length&&(e.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1}removeFeature(t,e){const n=e!==void 0?e:!0,r=K(t),o=this.indexedFeaturesExtents_[r];if(o){const s=this.rBush_,a=[];s.forEachInExtent(o,function(l){t===l.feature&&a.push(l)});for(let l=a.length-1;l>=0;--l)s.remove(a[l])}n&&(Ot(this.featureChangeListenerKeys_[r]),delete this.featureChangeListenerKeys_[r])}setMap(t){const e=this.getMap(),n=this.featuresListenerKeys_,r=this.getFeatures_();e&&(n.forEach(Ot),n.length=0,r.forEach(this.forEachFeatureRemove_.bind(this))),super.setMap(t),t&&(this.features_?n.push(gt(this.features_,re.ADD,this.handleFeatureAdd_,this),gt(this.features_,re.REMOVE,this.handleFeatureRemove_,this)):this.source_&&n.push(gt(this.source_,we.ADDFEATURE,this.handleFeatureAdd_,this),gt(this.source_,we.REMOVEFEATURE,this.handleFeatureRemove_,this)),r.forEach(this.forEachFeatureAdd_.bind(this)))}snapTo(t,e,n){const r=n.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+this.pixelTolerance_]),o=n.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_]),s=xe([r,o]),a=this.rBush_.getInExtent(s),l=a.length;if(l===0)return null;n.getView().getProjection();const h=Vt(e);let u,d=1/0;const c=this.pixelTolerance_*this.pixelTolerance_,f=()=>{if(u){const g=n.getPixelFromCoordinate(u);if(wi(t,g)<=c)return{vertex:u,vertexPixel:[Math.round(g[0]),Math.round(g[1])]}}return null};if(this.vertex_){for(let m=0;m<l;++m){const p=a[m];p.feature.getGeometry().getType()!=="Circle"&&p.segment.forEach(_=>{const v=Vt(_),y=wi(h,v);y<d&&(u=_,d=y)})}const g=f();if(g)return g}if(this.edge_){for(let m=0;m<l;++m){let p=null;const _=a[m];if(_.feature.getGeometry().getType()==="Circle"){let v=_.feature.getGeometry();p=Cr(A0(h,v))}else{const[v,y]=_.segment;y&&(tu[0]=Vt(v),tu[1]=Vt(y),p=Fl(h,tu))}if(p){const v=wi(h,p);v<d&&(u=p,d=v)}}const g=f();if(g)return g}return null}updateFeature_(t){this.removeFeature(t,!1),this.addFeature(t,!1)}segmentCircleGeometry_(t,e){this.getMap().getView().getProjection();const o=$v(e).getCoordinates()[0];for(let s=0,a=o.length-1;s<a;++s)t.push(o.slice(s,s+2))}segmentGeometryCollectionGeometry_(t,e){const n=e.getGeometriesArray();for(let r=0;r<n.length;++r){const o=this.GEOMETRY_SEGMENTERS_[n[r].getType()];o&&o(t,n[r])}}segmentLineStringGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length-1;r<o;++r)t.push(n.slice(r,r+2))}segmentMultiLineStringGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length-1;a<l;++a)t.push(s.slice(a,a+2))}}segmentMultiPointGeometry_(t,e){e.getCoordinates().forEach(n=>{t.push([n])})}segmentMultiPolygonGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length;a<l;++a){const h=s[a];for(let u=0,d=h.length-1;u<d;++u)t.push(h.slice(u,u+2))}}}segmentPointGeometry_(t,e){t.push([e.getCoordinates()])}segmentPolygonGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length-1;a<l;++a)t.push(s.slice(a,a+2))}}}const sx=ox,ax=.5,lx=10,Jf=.25;class hx{constructor(t,e,n,r,o,s){this.sourceProj_=t,this.targetProj_=e;let a={};const l=ko(this.targetProj_,this.sourceProj_);this.transformInv_=function(v){const y=v[0]+"/"+v[1];return a[y]||(a[y]=l(v)),a[y]},this.maxSourceExtent_=r,this.errorThresholdSquared_=o*o,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&Nt(r)==Nt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Nt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Nt(this.targetProj_.getExtent()):null;const h=Ki(n),u=Vs(n),d=Us(n),c=Bs(n),f=this.transformInv_(h),g=this.transformInv_(u),m=this.transformInv_(d),p=this.transformInv_(c),_=lx+(s?Math.max(0,Math.ceil(Math.log2(Pl(n)/(s*s*256*256)))):0);if(this.addQuad_(h,u,d,c,f,g,m,p,_),this.wrapsXInSource_){let v=1/0;this.triangles_.forEach(function(y,x,k){v=Math.min(v,y.source[0][0],y.source[1][0],y.source[2][0])}),this.triangles_.forEach(function(y){if(Math.max(y.source[0][0],y.source[1][0],y.source[2][0])-v>this.sourceWorldWidth_/2){const x=[[y.source[0][0],y.source[0][1]],[y.source[1][0],y.source[1][1]],[y.source[2][0],y.source[2][1]]];x[0][0]-v>this.sourceWorldWidth_/2&&(x[0][0]-=this.sourceWorldWidth_),x[1][0]-v>this.sourceWorldWidth_/2&&(x[1][0]-=this.sourceWorldWidth_),x[2][0]-v>this.sourceWorldWidth_/2&&(x[2][0]-=this.sourceWorldWidth_);const k=Math.min(x[0][0],x[1][0],x[2][0]);Math.max(x[0][0],x[1][0],x[2][0])-k<this.sourceWorldWidth_/2&&(y.source=x)}}.bind(this))}a={}}addTriangle_(t,e,n,r,o,s){this.triangles_.push({source:[r,o,s],target:[t,e,n]})}addQuad_(t,e,n,r,o,s,a,l,h){const u=xe([o,s,a,l]),d=this.sourceWorldWidth_?Nt(u)/this.sourceWorldWidth_:null,c=this.sourceWorldWidth_,f=this.sourceProj_.canWrapX()&&d>.5&&d<1;let g=!1;if(h>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const p=xe([t,e,n,r]);g=Nt(p)/this.targetWorldWidth_>Jf||g}!f&&this.sourceProj_.isGlobal()&&d&&(g=d>Jf||g)}if(!g&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!Kt(u,this.maxSourceExtent_))return;let m=0;if(!g&&(!isFinite(o[0])||!isFinite(o[1])||!isFinite(s[0])||!isFinite(s[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(l[0])||!isFinite(l[1]))){if(h>0)g=!0;else if(m=(!isFinite(o[0])||!isFinite(o[1])?8:0)+(!isFinite(s[0])||!isFinite(s[1])?4:0)+(!isFinite(a[0])||!isFinite(a[1])?2:0)+(!isFinite(l[0])||!isFinite(l[1])?1:0),m!=1&&m!=2&&m!=4&&m!=8)return}if(h>0){if(!g){const p=[(t[0]+n[0])/2,(t[1]+n[1])/2],_=this.transformInv_(p);let v;f?v=($i(o[0],c)+$i(a[0],c))/2-$i(_[0],c):v=(o[0]+a[0])/2-_[0];const y=(o[1]+a[1])/2-_[1];g=v*v+y*y>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){const p=[(e[0]+n[0])/2,(e[1]+n[1])/2],_=this.transformInv_(p),v=[(r[0]+t[0])/2,(r[1]+t[1])/2],y=this.transformInv_(v);this.addQuad_(t,e,p,v,o,s,_,y,h-1),this.addQuad_(v,p,n,r,y,_,a,l,h-1)}else{const p=[(t[0]+e[0])/2,(t[1]+e[1])/2],_=this.transformInv_(p),v=[(n[0]+r[0])/2,(n[1]+r[1])/2],y=this.transformInv_(v);this.addQuad_(t,p,v,r,o,_,y,l,h-1),this.addQuad_(p,e,n,v,_,s,a,y,h-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}(m&11)==0&&this.addTriangle_(t,n,r,o,a,l),(m&14)==0&&this.addTriangle_(t,n,e,o,a,s),m&&((m&13)==0&&this.addTriangle_(e,r,t,s,l,o),(m&7)==0&&this.addTriangle_(e,r,n,s,l,a))}calculateSourceExtent(){const t=Ge();return this.triangles_.forEach(function(e,n,r){const o=e.source;bo(t,o[0]),bo(t,o[1]),bo(t,o[2])}),t}getTriangles(){return this.triangles_}}const ux=hx;let eu;const Qf=[];function tg(i,t,e,n,r){i.beginPath(),i.moveTo(0,0),i.lineTo(t,e),i.lineTo(n,r),i.closePath(),i.save(),i.clip(),i.fillRect(0,0,Math.max(t,n)+1,Math.max(e,r)),i.restore()}function iu(i,t){return Math.abs(i[t*4]-210)>2||Math.abs(i[t*4+3]-.75*255)>2}function dx(){if(eu===void 0){const i=document.createElement("canvas").getContext("2d");i.globalCompositeOperation="lighter",i.fillStyle="rgba(210, 0, 0, 0.75)",tg(i,4,5,4,0),tg(i,4,5,0,5);const t=i.getImageData(0,0,3,3).data;eu=iu(t,0)||iu(t,4)||iu(t,8)}return eu}function eg(i,t,e,n){const r=$s(e,t,i);let o=Xs(t,n,e);const s=t.getMetersPerUnit();s!==void 0&&(o*=s);const a=i.getMetersPerUnit();a!==void 0&&(o/=a);const l=i.getExtent();if(!l||js(l,r)){const h=Xs(i,o,r)/o;isFinite(h)&&h>0&&(o/=h)}return o}function cx(i,t,e,n){const r=Yi(e);let o=eg(i,t,r,n);return(!isFinite(o)||o<=0)&&Il(e,function(s){return o=eg(i,t,s,n),isFinite(o)&&o>0}),o}function fx(i,t,e,n,r,o,s,a,l,h,u,d){const c=Pe(Math.round(e*i),Math.round(e*t),Qf);if(d||(c.imageSmoothingEnabled=!1),l.length===0)return c.canvas;c.scale(e,e);function f(x){return Math.round(x*e)/e}c.globalCompositeOperation="lighter";const g=Ge();l.forEach(function(x,k,w){ic(g,x.extent)});const m=Nt(g),p=$e(g),_=Pe(Math.round(e*m/n),Math.round(e*p/n));d||(_.imageSmoothingEnabled=!1);const v=e/n;l.forEach(function(x,k,w){const C=x.extent[0]-g[0],M=-(x.extent[3]-g[3]),S=Nt(x.extent),R=$e(x.extent);x.image.width>0&&x.image.height>0&&_.drawImage(x.image,h,h,x.image.width-2*h,x.image.height-2*h,C*v,M*v,S*v,R*v)});const y=Ki(s);return a.getTriangles().forEach(function(x,k,w){const C=x.source,M=x.target;let S=C[0][0],R=C[0][1],A=C[1][0],G=C[1][1],P=C[2][0],at=C[2][1];const j=f((M[0][0]-y[0])/o),U=f(-(M[0][1]-y[1])/o),O=f((M[1][0]-y[0])/o),W=f(-(M[1][1]-y[1])/o),D=f((M[2][0]-y[0])/o),Z=f(-(M[2][1]-y[1])/o),V=S,z=R;S=0,R=0,A-=V,G-=z,P-=V,at-=z;const ot=[[A,G,0,0,O-j],[P,at,0,0,D-j],[0,0,A,G,W-U],[0,0,P,at,Z-U]],b=d0(ot);if(!!b){if(c.save(),c.beginPath(),dx()||!d){c.moveTo(O,W);const T=4,Y=j-O,E=U-W;for(let H=0;H<T;H++)c.lineTo(O+f((H+1)*Y/T),W+f(H*E/(T-1))),H!=T-1&&c.lineTo(O+f((H+1)*Y/T),W+f((H+1)*E/(T-1)));c.lineTo(D,Z)}else c.moveTo(O,W),c.lineTo(j,U),c.lineTo(D,Z);c.clip(),c.transform(b[0],b[2],b[1],b[3],j,U),c.translate(g[0]-V,g[3]-z),c.scale(n/e,-n/e),c.drawImage(_.canvas,0,0),c.restore()}}),u&&(c.save(),c.globalCompositeOperation="source-over",c.strokeStyle="black",c.lineWidth=1,a.getTriangles().forEach(function(x,k,w){const C=x.target,M=(C[0][0]-y[0])/o,S=-(C[0][1]-y[1])/o,R=(C[1][0]-y[0])/o,A=-(C[1][1]-y[1])/o,G=(C[2][0]-y[0])/o,P=-(C[2][1]-y[1])/o;c.beginPath(),c.moveTo(R,A),c.lineTo(M,S),c.lineTo(G,P),c.closePath(),c.stroke()}),c.restore()),c.canvas}class gx extends Ea{constructor(t,e,n,r,o,s,a,l,h,u,d,c){super(o,N.IDLE,{interpolate:!!c}),this.renderEdges_=d!==void 0?d:!1,this.pixelRatio_=a,this.gutter_=l,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=r,this.wrappedTileCoord_=s||o,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const f=r.getTileCoordExtent(this.wrappedTileCoord_),g=this.targetTileGrid_.getExtent();let m=this.sourceTileGrid_.getExtent();const p=g?Un(f,g):f;if(Pl(p)===0){this.state=N.EMPTY;return}const _=t.getExtent();_&&(m?m=Un(m,_):m=_);const v=r.getResolution(this.wrappedTileCoord_[0]),y=cx(t,n,p,v);if(!isFinite(y)||y<=0){this.state=N.EMPTY;return}const x=u!==void 0?u:ax;if(this.triangulation_=new ux(t,n,p,m,y*x,v),this.triangulation_.getTriangles().length===0){this.state=N.EMPTY;return}this.sourceZ_=e.getZForResolution(y);let k=this.triangulation_.calculateSourceExtent();if(m&&(t.canWrapX()?(k[1]=Wt(k[1],m[1],m[3]),k[3]=Wt(k[3],m[1],m[3])):k=Un(k,m)),!Pl(k))this.state=N.EMPTY;else{const w=e.getTileRangeForExtentAndZ(k,this.sourceZ_);for(let C=w.minX;C<=w.maxX;C++)for(let M=w.minY;M<=w.maxY;M++){const S=h(this.sourceZ_,C,M,a);S&&this.sourceTiles_.push(S)}this.sourceTiles_.length===0&&(this.state=N.EMPTY)}}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(function(e,n,r){e&&e.getState()==N.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,t.length===0)this.state=N.ERROR;else{const e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),r=typeof n=="number"?n:n[0],o=typeof n=="number"?n:n[1],s=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=fx(r,o,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),s,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=N.LOADED}this.changed()}load(){if(this.state==N.IDLE){this.state=N.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,n,r){const o=e.getState();if(o==N.IDLE||o==N.LOADING){t++;const s=gt(e,tt.CHANGE,function(a){const l=e.getState();(l==N.LOADED||l==N.ERROR||l==N.EMPTY)&&(Ot(s),t--,t===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(s)}}.bind(this)),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(e,n,r){e.getState()==N.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Ot),this.sourcesListenerKeys_=null}release(){this.canvas_&&(kl(this.canvas_.getContext("2d")),Qf.push(this.canvas_),this.canvas_=null),super.release()}}const ig=gx;class mx extends Tf{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=Ge(),this.tmpTileRange_=new Xf(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),n=t.getState(),r=e.getUseInterimTilesOnError();return n==N.LOADED||n==N.EMPTY||n==N.ERROR&&!r}getTile(t,e,n,r){const o=r.pixelRatio,s=r.viewState.projection,a=this.getLayer();let h=a.getSource().getTile(t,e,n,o,s);return h.getState()==N.ERROR&&a.getUseInterimTilesOnError()&&a.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(h)||(h=h.getInterimTile()),h}getData(t){const e=this.frameState;if(!e)return null;const n=this.getLayer(),r=Jt(e.pixelToCoordinateTransform,t.slice()),o=n.getExtent();if(o&&!js(o,r))return null;const s=e.pixelRatio,a=e.viewState.projection,l=e.viewState,h=n.getRenderSource(),u=h.getTileGridForProjection(l.projection),d=h.getTilePixelRatio(e.pixelRatio);for(let c=u.getZForResolution(l.resolution);c>=u.getMinZoom();--c){const f=u.getTileCoordForCoordAndZ(r,c),g=h.getTile(c,f[1],f[2],s,a);if(!(g instanceof jf||g instanceof ig))return null;if(g.getState()!==N.LOADED)continue;const m=u.getOrigin(c),p=be(u.getTileSize(c)),_=u.getResolution(c),v=Math.floor(d*((r[0]-m[0])/_-f[1]*p[0])),y=Math.floor(d*((m[1]-r[1])/_-f[2]*p[1])),x=Math.round(d*h.getGutterForProjection(l.projection));return this.getImageData(g.getImage(),v+x,y+x)}return null}loadedTileCallback(t,e,n){return this.isDrawableTile(n)?super.loadedTileCallback(t,e,n):!1}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const n=t.layerStatesArray[t.layerIndex],r=t.viewState,o=r.projection,s=r.resolution,a=r.center,l=r.rotation,h=t.pixelRatio,u=this.getLayer(),d=u.getSource(),c=d.getRevision(),f=d.getTileGridForProjection(o),g=f.getZForResolution(s,d.zDirection),m=f.getResolution(g);let p=t.extent;const _=t.viewState.resolution,v=d.getTilePixelRatio(h),y=Math.round(Nt(p)/_*h),x=Math.round($e(p)/_*h),k=n.extent&&Zi(n.extent);k&&(p=Un(p,Zi(n.extent)));const w=m*y/2/v,C=m*x/2/v,M=[a[0]-w,a[1]-C,a[0]+w,a[1]+C],S=f.getTileRangeForExtentAndZ(p,g),R={};R[g]={};const A=this.createLoadedTileFinder(d,o,R),G=this.tmpExtent,P=this.tmpTileRange_;this.newTiles_=!1;const at=l?Dl(r.center,_,l,t.size):void 0;for(let ot=S.minX;ot<=S.maxX;++ot)for(let b=S.minY;b<=S.maxY;++b){if(l&&!f.tileCoordIntersectsViewport([g,ot,b],at))continue;const T=this.getTile(g,ot,b,t);if(this.isDrawableTile(T)){const H=K(this);if(T.getState()==N.LOADED){R[g][T.tileCoord.toString()]=T;let $=T.inTransition(H);$&&n.opacity!==1&&(T.endTransition(H),$=!1),!this.newTiles_&&($||!this.renderedTiles.includes(T))&&(this.newTiles_=!0)}if(T.getAlpha(H,t.time)===1)continue}const Y=f.getTileCoordChildTileRange(T.tileCoord,P,G);let E=!1;Y&&(E=A(g+1,Y)),E||f.forEachTileCoordParentTileRange(T.tileCoord,A,P,G)}const j=m/s*h/v;Mi(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/h,1/h,l,-y/2,-x/2);const U=_c(this.pixelTransform);this.useContainer(e,U,this.getBackground(t));const O=this.context,W=O.canvas;Wl(this.inversePixelTransform,this.pixelTransform),Mi(this.tempTransform,y/2,x/2,j,j,0,-y/2,-x/2),W.width!=y||W.height!=x?(W.width=y,W.height=x):this.containerReused||O.clearRect(0,0,y,x),k&&this.clipUnrotated(O,t,k),d.getInterpolate()||(O.imageSmoothingEnabled=!1),this.preRender(O,t),this.renderedTiles.length=0;let D=Object.keys(R).map(Number);D.sort(An);let Z,V,z;n.opacity===1&&(!this.containerReused||d.getOpaque(t.viewState.projection))?D=D.reverse():(Z=[],V=[]);for(let ot=D.length-1;ot>=0;--ot){const b=D[ot],T=d.getTilePixelSize(b,h,o),E=f.getResolution(b)/m,H=T[0]*E*j,$=T[1]*E*j,vt=f.getTileCoordForCoordAndZ(Ki(M),b),Ct=f.getTileCoordExtent(vt),_t=Jt(this.tempTransform,[v*(Ct[0]-M[0])/m,v*(M[3]-Ct[3])/m]),Et=v*d.getGutterForProjection(o),Lt=R[b];for(const Dt in Lt){const jt=Lt[Dt],F=jt.tileCoord,ut=vt[1]-F[1],pt=Math.round(_t[0]-(ut-1)*H),kt=vt[2]-F[2],yt=Math.round(_t[1]-(kt-1)*$),st=Math.round(_t[0]-ut*H),nt=Math.round(_t[1]-kt*$),wt=pt-st,zt=yt-nt,Bt=g===b,xt=Bt&&jt.getAlpha(K(this),t.time)!==1;let dt=!1;if(!xt)if(Z){z=[st,nt,st+wt,nt,st+wt,nt+zt,st,nt+zt];for(let Ft=0,St=Z.length;Ft<St;++Ft)if(g!==b&&b<V[Ft]){const ct=Z[Ft];Kt([st,nt,st+wt,nt+zt],[ct[0],ct[3],ct[4],ct[7]])&&(dt||(O.save(),dt=!0),O.beginPath(),O.moveTo(z[0],z[1]),O.lineTo(z[2],z[3]),O.lineTo(z[4],z[5]),O.lineTo(z[6],z[7]),O.moveTo(ct[6],ct[7]),O.lineTo(ct[4],ct[5]),O.lineTo(ct[2],ct[3]),O.lineTo(ct[0],ct[1]),O.clip())}Z.push(z),V.push(b)}else O.clearRect(st,nt,wt,zt);this.drawTileImage(jt,t,st,nt,wt,zt,Et,Bt),Z&&!xt?(dt&&O.restore(),this.renderedTiles.unshift(jt)):this.renderedTiles.push(jt),this.updateUsedTiles(t.usedTiles,d,jt)}}return this.renderedRevision=c,this.renderedResolution=m,this.extentChanged=!this.renderedExtent_||!Er(this.renderedExtent_,M),this.renderedExtent_=M,this.renderedPixelRatio=h,this.renderedProjection=o,this.manageTilePyramid(t,d,f,h,o,p,g,u.getPreload()),this.scheduleExpireCache(t,d),this.postRender(O,t),n.extent&&O.restore(),O.imageSmoothingEnabled=!0,U!==W.style.transform&&(W.style.transform=U),this.container}drawTileImage(t,e,n,r,o,s,a,l){const h=this.getTileImage(t);if(!h)return;const u=K(this),d=e.layerStatesArray[e.layerIndex],c=d.opacity*(l?t.getAlpha(u,e.time):1),f=c!==this.context.globalAlpha;f&&(this.context.save(),this.context.globalAlpha=c),this.context.drawImage(h,a,a,h.width-2*a,h.height-2*a,n,r,o,s),f&&this.context.restore(),c!==d.opacity?e.animate=!0:l&&t.endTransition(u)}getImage(){const t=this.context;return t?t.canvas:null}getTileImage(t){return t.getImage()}scheduleExpireCache(t,e){if(e.canExpireCache()){const n=function(r,o,s){const a=K(r);a in s.usedTiles&&r.expireCache(s.viewState.projection,s.usedTiles[a])}.bind(null,e);t.postRenderFunctions.push(n)}}updateUsedTiles(t,e,n){const r=K(e);r in t||(t[r]={}),t[r][n.getKey()]=!0}manageTilePyramid(t,e,n,r,o,s,a,l,h){const u=K(e);u in t.wantedTiles||(t.wantedTiles[u]={});const d=t.wantedTiles[u],c=t.tileQueue,f=n.getMinZoom(),g=t.viewState.rotation,m=g?Dl(t.viewState.center,t.viewState.resolution,g,t.size):void 0;let p=0,_,v,y,x,k,w;for(w=f;w<=a;++w)for(v=n.getTileRangeForExtentAndZ(s,w,v),y=n.getResolution(w),x=v.minX;x<=v.maxX;++x)for(k=v.minY;k<=v.maxY;++k)g&&!n.tileCoordIntersectsViewport([w,x,k],m)||(a-w<=l?(++p,_=e.getTile(w,x,k,r,o),_.getState()==N.IDLE&&(d[_.getKey()]=!0,c.isKeyQueued(_.getKey())||c.enqueue([_,u,n.getTileCoordCenter(_.tileCoord),y])),h!==void 0&&h(_)):e.useTile(w,x,k,o));e.updateCacheSize(p,o)}}const ng=mx,px={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},vx={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class _x extends ng{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.tmpTransform_=Ye()}prepareTile(t,e,n){let r;const o=t.getState();return(o===N.LOADED||o===N.ERROR)&&(this.updateExecutorGroup_(t,e,n),this.tileImageNeedsRender_(t)&&(r=!0)),r}getTile(t,e,n,r){const o=r.pixelRatio,s=r.viewState,a=s.resolution,l=s.projection,h=this.getLayer(),u=h.getSource().getTile(t,e,n,o,l),d=r.viewHints,c=!(d[Yt.ANIMATING]||d[Yt.INTERACTING]);return(c||!u.wantedResolution)&&(u.wantedResolution=a),this.prepareTile(u,o,l)&&(c||Date.now()-r.time<8)&&h.getRenderMode()!=="vector"&&this.renderTileImage_(u,r),super.getTile(t,e,n,r)}isDrawableTile(t){const e=this.getLayer();return super.isDrawableTile(t)&&(e.getRenderMode()==="vector"?K(e)in t.executorGroups:t.hasContext(e))}getTileImage(t){return t.getImage(this.getLayer())}prepareFrame(t){const e=this.getLayer().getRevision();return this.renderedLayerRevision_!==e&&(this.renderedLayerRevision_=e,this.renderedTiles.length=0),super.prepareFrame(t)}updateExecutorGroup_(t,e,n){const r=this.getLayer(),o=r.getRevision(),s=r.getRenderOrder()||null,a=t.wantedResolution,l=t.getReplayState(r);if(!l.dirty&&l.renderedResolution===a&&l.renderedRevision==o&&l.renderedRenderOrder==s)return;const h=r.getSource(),u=r.getDeclutter(),d=h.getTileGrid(),f=h.getTileGridForProjection(n).getTileCoordExtent(t.wrappedTileCoord),g=h.getSourceTiles(e,n,t),m=K(r);delete t.hitDetectionImageData[m],t.executorGroups[m]=[],u&&(t.declutterExecutorGroups[m]=[]),l.dirty=!1;for(let p=0,_=g.length;p<_;++p){const v=g[p];if(v.getState()!=N.LOADED)continue;const y=v.tileCoord,x=d.getTileCoordExtent(y),k=Un(f,x),w=ui(k,r.getRenderBuffer()*a,this.tmpExtent),C=Er(x,k)?null:w,M=new ba(0,w,a,e),S=u?new ba(0,k,a,e):void 0,R=Df(a,e),A=function(U){let O;const W=U.getStyleFunction()||r.getStyleFunction();if(W&&(O=W(U,a)),O){const D=this.renderFeature(U,R,O,M,S);l.dirty=l.dirty||D}},G=v.getFeatures();s&&s!==l.renderedRenderOrder&&G.sort(s);for(let U=0,O=G.length;U<O;++U){const W=G[U];(!C||Kt(C,W.getGeometry().getExtent()))&&A.call(this,W)}const P=M.finish(),at=r.getRenderMode()!=="vector"&&u&&g.length===1?null:k,j=new ka(at,a,e,h.getOverlaps(),P,r.getRenderBuffer());if(t.executorGroups[m].push(j),S){const U=new ka(null,a,e,h.getOverlaps(),S.finish(),r.getRenderBuffer());t.declutterExecutorGroups[m].push(U)}}l.renderedRevision=o,l.renderedRenderOrder=s,l.renderedResolution=a}forEachFeatureAtCoordinate(t,e,n,r,o){const s=e.viewState.resolution,a=e.viewState.rotation;n=n==null?0:n;const l=this.getLayer(),u=l.getSource().getTileGridForProjection(e.viewState.projection),d=xe([t]);ui(d,s*n,d);const c={},f=function(p,_,v){let y=p.getId();y===void 0&&(y=K(p));const x=c[y];if(x){if(x!==!0&&v<x.distanceSq){if(v===0)return c[y]=!0,o.splice(o.lastIndexOf(x),1),r(p,l,_);x.geometry=_,x.distanceSq=v}}else{if(v===0)return c[y]=!0,r(p,l,_);o.push(c[y]={feature:p,layer:l,geometry:_,distanceSq:v,callback:r})}},g=this.renderedTiles;let m;for(let p=0,_=g.length;!m&&p<_;++p){const v=g[p],y=u.getTileCoordExtent(v.wrappedTileCoord);if(!Kt(y,d))continue;const x=K(l),k=[v.executorGroups[x]],w=v.declutterExecutorGroups[x];w&&k.push(w),k.some(C=>{const M=C===w?e.declutterTree.all().map(S=>S.value):null;for(let S=0,R=C.length;S<R;++S)if(m=C[S].forEachFeatureAtCoordinate(t,s,a,n,f,M),m)return!0})}return m}getFeatures(t){return new Promise(function(e,n){const r=this.getLayer(),o=K(r),s=r.getSource(),a=this.renderedProjection,l=a.getExtent(),h=this.renderedResolution,u=s.getTileGridForProjection(a),d=Jt(this.renderedPixelToCoordinateTransform_,t.slice()),c=u.getTileCoordForCoordAndResolution(d,h);let f;for(let y=0,x=this.renderedTiles.length;y<x;++y)if(c.toString()===this.renderedTiles[y].tileCoord.toString()){if(f=this.renderedTiles[y],f.getState()===N.LOADED){const k=u.getTileCoordExtent(f.tileCoord);s.getWrapX()&&a.canWrapX()&&!Bn(l,k)&&Nl(d,a);break}f=void 0}if(!f||f.loadingSourceTiles>0){e([]);return}const g=u.getTileCoordExtent(f.wrappedTileCoord),m=Ki(g),p=[(d[0]-m[0])/h,(m[1]-d[1])/h],_=f.getSourceTiles().reduce(function(y,x){return y.concat(x.getFeatures())},[]);let v=f.hitDetectionImageData[o];if(!v&&!this.animatingOrInteracting_){const y=be(u.getTileSize(u.getZForResolution(h,s.zDirection))),x=this.renderedRotation_,k=[this.getRenderTransform(u.getTileCoordCenter(f.wrappedTileCoord),h,0,je,y[0]*je,y[1]*je,0)];v=If(y,k,_,r.getStyleFunction(),u.getTileCoordExtent(f.wrappedTileCoord),f.getReplayState(r).renderedResolution,x),f.hitDetectionImageData[o]=v}e(Pf(p,_,v))}.bind(this))}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.renderedLayerRevision_!==void 0&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}renderDeclutter(t){const e=this.context,n=e.globalAlpha;e.globalAlpha=this.getLayer().getOpacity();const r=t.viewHints,o=!(r[Yt.ANIMATING]||r[Yt.INTERACTING]),s=this.renderedTiles;for(let a=0,l=s.length;a<l;++a){const h=s[a],u=h.declutterExecutorGroups[K(this.getLayer())];if(u)for(let d=u.length-1;d>=0;--d)u[d].execute(this.context,1,this.getTileRenderTransform(h,t),t.viewState.rotation,o,void 0,t.declutterTree)}e.globalAlpha=n}getTileRenderTransform(t,e){const n=e.pixelRatio,r=e.viewState,o=r.center,s=r.resolution,a=r.rotation,l=e.size,h=Math.round(l[0]*n),u=Math.round(l[1]*n),c=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),f=t.tileCoord,g=c.getTileCoordExtent(t.wrappedTileCoord),m=c.getTileCoordExtent(f,this.tmpExtent)[0]-g[0];return Xl($l(this.inversePixelTransform.slice(),1/n,1/n),this.getRenderTransform(o,s,a,n,h,u,m))}postRender(t,e){const n=e.viewHints,r=!(n[Yt.ANIMATING]||n[Yt.INTERACTING]);this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;const o=this.getLayer(),s=o.getRenderMode(),a=t.globalAlpha;t.globalAlpha=o.getOpacity();const l=vx[s],h=e.viewState,u=h.rotation,d=o.getSource(),f=d.getTileGridForProjection(h.projection).getZForResolution(h.resolution,d.zDirection),g=this.renderedTiles,m=[],p=[];let _=!0;for(let v=g.length-1;v>=0;--v){const y=g[v];_=_&&!y.getReplayState(o).dirty;const x=y.executorGroups[K(o)].filter(S=>S.hasExecutors(l));if(x.length===0)continue;const k=this.getTileRenderTransform(y,e),w=y.tileCoord[0];let C=!1;const M=x[0].getClipCoords(k);if(M){for(let S=0,R=m.length;S<R;++S)if(f!==w&&w<p[S]){const A=m[S];Kt([M[0],M[3],M[4],M[7]],[A[0],A[3],A[4],A[7]])&&(C||(t.save(),C=!0),t.beginPath(),t.moveTo(M[0],M[1]),t.lineTo(M[2],M[3]),t.lineTo(M[4],M[5]),t.lineTo(M[6],M[7]),t.moveTo(A[6],A[7]),t.lineTo(A[4],A[5]),t.lineTo(A[2],A[3]),t.lineTo(A[0],A[1]),t.clip())}m.push(M),p.push(w)}for(let S=0,R=x.length;S<R;++S)x[S].execute(t,1,k,u,r,l);C&&t.restore()}t.globalAlpha=a,this.ready=_,super.postRender(t,e)}renderFeature(t,e,n,r,o){if(!n)return!1;let s=!1;if(Array.isArray(n))for(let a=0,l=n.length;a<l;++a)s=wa(r,t,n[a],e,this.boundHandleStyleImageChange_,void 0,o)||s;else s=wa(r,t,n,e,this.boundHandleStyleImageChange_,void 0,o);return s}tileImageNeedsRender_(t){const e=this.getLayer();if(e.getRenderMode()==="vector")return!1;const n=t.getReplayState(e),r=e.getRevision(),o=t.wantedResolution;return n.renderedTileResolution!==o||n.renderedTileRevision!==r}renderTileImage_(t,e){const n=this.getLayer(),r=t.getReplayState(n),o=n.getRevision(),s=t.executorGroups[K(n)];r.renderedTileRevision=o;const a=t.wrappedTileCoord,l=a[0],h=n.getSource();let u=e.pixelRatio;const c=e.viewState.projection,f=h.getTileGridForProjection(c),g=f.getResolution(t.tileCoord[0]),m=e.pixelRatio/t.wantedResolution*g,p=f.getResolution(l),_=t.getContext(n);u=Math.round(Math.max(u,m/u));const v=h.getTilePixelSize(l,u,c);_.canvas.width=v[0],_.canvas.height=v[1];const y=u/m;if(y!==1){const C=pc(this.tmpTransform_);$l(C,y,y),_.setTransform.apply(_,C)}const x=f.getTileCoordExtent(a,this.tmpExtent),k=m/p,w=pc(this.tmpTransform_);$l(w,k,-k),$0(w,-x[0],-x[3]);for(let C=0,M=s.length;C<M;++C)s[C].execute(_,y,w,0,!0,px[n.getRenderMode()]);r.renderedTileResolution=t.wantedResolution}}const yx=_x,un={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class xx extends wf{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un;const n=t.renderMode||"hybrid";ft(n=="hybrid"||n=="vector",28),this.renderMode_=n,this.setPreload(t.preload?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0),this.getBackground,this.setBackground}createRenderer(){return new yx(this)}getFeatures(t){return super.getFeatures(t)}getRenderMode(){return this.renderMode_}getPreload(){return this.get(un.PRELOAD)}getUseInterimTilesOnError(){return this.get(un.USE_INTERIM_TILES_ON_ERROR)}setPreload(t){this.set(un.PRELOAD,t)}setUseInterimTilesOnError(t){this.set(un.USE_INTERIM_TILES_ON_ERROR,t)}}const bx=xx,kx=[0,0,0],dn=5;class wx{constructor(t){this.minZoom=t.minZoom!==void 0?t.minZoom:0,this.resolutions_=t.resolutions,ft(Yp(this.resolutions_,function(r,o){return o-r},!0),17);let e;if(!t.origins){for(let r=0,o=this.resolutions_.length-1;r<o;++r)if(!e)e=this.resolutions_[r]/this.resolutions_[r+1];else if(this.resolutions_[r]/this.resolutions_[r+1]!==e){e=void 0;break}}this.zoomFactor_=e,this.maxZoom=this.resolutions_.length-1,this.origin_=t.origin!==void 0?t.origin:null,this.origins_=null,t.origins!==void 0&&(this.origins_=t.origins,ft(this.origins_.length==this.resolutions_.length,20));const n=t.extent;n!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=Ki(n)),ft(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,t.tileSizes!==void 0&&(this.tileSizes_=t.tileSizes,ft(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=t.tileSize!==void 0?t.tileSize:this.tileSizes_?null:Ql,ft(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=n!==void 0?n:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],t.sizes!==void 0?this.fullTileRanges_=t.sizes.map(function(r,o){const s=new Xf(Math.min(0,r[0]),Math.max(r[0]-1,-1),Math.min(0,r[1]),Math.max(r[1]-1,-1));if(n){const a=this.getTileRangeForExtentAndZ(n,o);s.minX=Math.max(a.minX,s.minX),s.maxX=Math.min(a.maxX,s.maxX),s.minY=Math.max(a.minY,s.minY),s.maxY=Math.min(a.maxY,s.maxY)}return s},this):n&&this.calculateTileRanges_(n)}forEachTileCoord(t,e,n){const r=this.getTileRangeForExtentAndZ(t,e);for(let o=r.minX,s=r.maxX;o<=s;++o)for(let a=r.minY,l=r.maxY;a<=l;++a)n([e,o,a])}forEachTileCoordParentTileRange(t,e,n,r){let o,s,a,l=null,h=t[0]-1;for(this.zoomFactor_===2?(s=t[1],a=t[2]):l=this.getTileCoordExtent(t,r);h>=this.minZoom;){if(this.zoomFactor_===2?(s=Math.floor(s/2),a=Math.floor(a/2),o=Gr(s,s,a,a,n)):o=this.getTileRangeForExtentAndZ(l,h,n),e(h,o))return!0;--h}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,n){if(t[0]<this.maxZoom){if(this.zoomFactor_===2){const o=t[1]*2,s=t[2]*2;return Gr(o,o+1,s,s+1,e)}const r=this.getTileCoordExtent(t,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(r,t[0]+1,e)}return null}getTileRangeForTileCoordAndZ(t,e,n){if(e>this.maxZoom||e<this.minZoom)return null;const r=t[0],o=t[1],s=t[2];if(e===r)return Gr(o,s,o,s,n);if(this.zoomFactor_){const l=Math.pow(this.zoomFactor_,e-r),h=Math.floor(o*l),u=Math.floor(s*l);if(e<r)return Gr(h,h,u,u,n);const d=Math.floor(l*(o+1))-1,c=Math.floor(l*(s+1))-1;return Gr(h,d,u,c,n)}const a=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(a,e,n)}getTileRangeExtent(t,e,n){const r=this.getOrigin(t),o=this.getResolution(t),s=be(this.getTileSize(t),this.tmpSize_),a=r[0]+e.minX*s[0]*o,l=r[0]+(e.maxX+1)*s[0]*o,h=r[1]+e.minY*s[1]*o,u=r[1]+(e.maxY+1)*s[1]*o;return ti(a,h,l,u,n)}getTileRangeForExtentAndZ(t,e,n){const r=kx;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,r);const o=r[1],s=r[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,r),Gr(o,r[1],s,r[2],n)}getTileCoordCenter(t){const e=this.getOrigin(t[0]),n=this.getResolution(t[0]),r=be(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*r[0]*n,e[1]-(t[2]+.5)*r[1]*n]}getTileCoordExtent(t,e){const n=this.getOrigin(t[0]),r=this.getResolution(t[0]),o=be(this.getTileSize(t[0]),this.tmpSize_),s=n[0]+t[1]*o[0]*r,a=n[1]-(t[2]+1)*o[1]*r,l=s+o[0]*r,h=a+o[1]*r;return ti(s,a,l,h,e)}getTileCoordForCoordAndResolution(t,e,n){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,n)}getTileCoordForXYAndResolution_(t,e,n,r,o){const s=this.getZForResolution(n),a=n/this.getResolution(s),l=this.getOrigin(s),h=be(this.getTileSize(s),this.tmpSize_);let u=a*(t-l[0])/n/h[0],d=a*(l[1]-e)/n/h[1];return r?(u=Fs(u,dn)-1,d=Fs(d,dn)-1):(u=Ls(u,dn),d=Ls(d,dn)),Bf(s,u,d,o)}getTileCoordForXYAndZ_(t,e,n,r,o){const s=this.getOrigin(n),a=this.getResolution(n),l=be(this.getTileSize(n),this.tmpSize_);let h=(t-s[0])/a/l[0],u=(s[1]-e)/a/l[1];return r?(h=Fs(h,dn)-1,u=Fs(u,dn)-1):(h=Ls(h,dn),u=Ls(u,dn)),Bf(n,h,u,o)}getTileCoordForCoordAndZ(t,e,n){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,n)}getTileCoordResolution(t){return this.resolutions_[t[0]]}getTileSize(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]}getFullTileRange(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null}getZForResolution(t,e){const n=xl(this.resolutions_,t,e||0);return Wt(n,this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(t,e){return Uc(e,0,e.length,2,this.getTileCoordExtent(t))}calculateTileRanges_(t){const e=this.resolutions_.length,n=new Array(e);for(let r=this.minZoom;r<e;++r)n[r]=this.getTileRangeForExtentAndZ(t,r);this.fullTileRanges_=n}}const nu=wx,ru={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};function rg(i){let t=i.getDefaultTileGrid();return t||(t=Cx(i),i.setDefaultTileGrid(t)),t}function Mx(i,t,e){const n=t[0],r=i.getTileCoordCenter(t),o=Ta(e);if(js(o,r))return t;{const s=Nt(o),a=Math.ceil((o[0]-r[0])/s);return r[0]+=s*a,i.getTileCoordForCoordAndZ(r,n)}}function Ex(i,t,e,n){n=n!==void 0?n:"top-left";const r=sg(i,t,e);return new nu({extent:i,origin:S0(i,n),resolutions:r,tileSize:e})}function og(i){const t=i||{},e=t.extent||Gt("EPSG:3857").getExtent(),n={extent:e,minZoom:t.minZoom,tileSize:t.tileSize,resolutions:sg(e,t.maxZoom,t.tileSize,t.maxResolution)};return new nu(n)}function sg(i,t,e,n){t=t!==void 0?t:Cc,e=be(e!==void 0?e:Ql);const r=$e(i),o=Nt(i);n=n>0?n:Math.max(o/e[0],r/e[1]);const s=t+1,a=new Array(s);for(let l=0;l<s;++l)a[l]=n/Math.pow(2,l);return a}function Cx(i,t,e,n){const r=Ta(i);return Ex(r,t,e,n)}function Ta(i){i=Gt(i);let t=i.getExtent();if(!t){const e=180*xr.degrees/i.getMetersPerUnit();t=ti(-e,-e,e,e)}return t}class Sx extends Of{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX,interpolate:t.interpolate}),this.on,this.once,this.un,this.opaque_=t.opaque!==void 0?t.opaque:!1,this.tilePixelRatio_=t.tilePixelRatio!==void 0?t.tilePixelRatio:1,this.tileGrid=t.tileGrid!==void 0?t.tileGrid:null;const e=[256,256];this.tileGrid&&be(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),e),this.tileCache=new Hh(t.cacheSize||0),this.tmpSize=[0,0],this.key_=t.key||"",this.tileOptions={transition:t.transition,interpolate:t.interpolate},this.zDirection=t.zDirection?t.zDirection:0}canExpireCache(){return this.tileCache.canExpireCache()}expireCache(t,e){const n=this.getTileCacheForProjection(t);n&&n.expireCache(e)}forEachLoadedTile(t,e,n,r){const o=this.getTileCacheForProjection(t);if(!o)return!1;let s=!0,a,l,h;for(let u=n.minX;u<=n.maxX;++u)for(let d=n.minY;d<=n.maxY;++d)l=Nr(e,u,d),h=!1,o.containsKey(l)&&(a=o.get(l),h=a.getState()===N.LOADED,h&&(h=r(a)!==!1)),h||(s=!1);return s}getGutterForProjection(t){return 0}getKey(){return this.key_}setKey(t){this.key_!==t&&(this.key_=t,this.changed())}getOpaque(t){return this.opaque_}getResolutions(){return this.tileGrid?this.tileGrid.getResolutions():null}getTile(t,e,n,r,o){return et()}getTileGrid(){return this.tileGrid}getTileGridForProjection(t){return this.tileGrid?this.tileGrid:rg(t)}getTileCacheForProjection(t){const e=this.getProjection();return ft(e===null||Vn(e,t),68),this.tileCache}getTilePixelRatio(t){return this.tilePixelRatio_}getTilePixelSize(t,e,n){const r=this.getTileGridForProjection(n),o=this.getTilePixelRatio(e),s=be(r.getTileSize(t),this.tmpSize);return o==1?s:D_(s,o,this.tmpSize)}getTileCoordForTileUrlFunction(t,e){e=e!==void 0?e:this.getProjection();const n=this.getTileGridForProjection(e);return this.getWrapX()&&e.isGlobal()&&(t=Mx(n,t,e)),Xy(t,n)?t:null}clear(){this.tileCache.clear()}refresh(){this.clear(),super.refresh()}updateCacheSize(t,e){const n=this.getTileCacheForProjection(e);t>n.highWaterMark&&(n.highWaterMark=t)}useTile(t,e,n,r){}}class Tx extends Qe{constructor(t,e){super(t),this.tile=e}}const zx=Sx;function Rx(i,t){const e=/\{z\}/g,n=/\{x\}/g,r=/\{y\}/g,o=/\{-y\}/g;return function(s,a,l){if(s)return i.replace(e,s[0].toString()).replace(n,s[1].toString()).replace(r,s[2].toString()).replace(o,function(){const h=s[0],u=t.getFullTileRange(h);return ft(u,55),(u.getHeight()-s[2]-1).toString()})}}function Ix(i,t){const e=i.length,n=new Array(e);for(let r=0;r<e;++r)n[r]=Rx(i[r],t);return Px(n)}function Px(i){return i.length===1?i[0]:function(t,e,n){if(t){const r=qy(t),o=$i(r,i.length);return i[o](t,e,n)}else return}}function Ax(i){const t=[];let e=/\{([a-z])-([a-z])\}/.exec(i);if(e){const n=e[1].charCodeAt(0),r=e[2].charCodeAt(0);let o;for(o=n;o<=r;++o)t.push(i.replace(e[0],String.fromCharCode(o)));return t}if(e=/\{(\d+)-(\d+)\}/.exec(i),e){const n=parseInt(e[2],10);for(let r=parseInt(e[1],10);r<=n;r++)t.push(i.replace(e[0],r.toString()));return t}return t.push(i),t}class ou extends zx{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===ou.prototype.tileUrlFunction,this.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(this.tileUrlFunction=t.tileUrlFunction),this.urls=null,t.urls?this.setUrls(t.urls):t.url&&this.setUrl(t.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(t){const e=t.target,n=K(e),r=e.getState();let o;r==N.LOADING?(this.tileLoadingKeys_[n]=!0,o=ru.TILELOADSTART):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],o=r==N.ERROR?ru.TILELOADERROR:r==N.LOADED?ru.TILELOADEND:void 0),o!=null&&this.dispatchEvent(new Tx(o,e))}setTileLoadFunction(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()}setTileUrlFunction(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),typeof e<"u"?this.setKey(e):this.changed()}setUrl(t){const e=Ax(t);this.urls=e,this.setUrls(e)}setUrls(t){this.urls=t;const e=t.join(`
46
- `);this.generateTileUrlFunction_?this.setTileUrlFunction(Ix(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,n){}useTile(t,e,n){const r=Nr(t,e,n);this.tileCache.containsKey(r)&&this.tileCache.get(r)}}const ag=ou;class Dx extends ag{constructor(t){const e=t.projection||"EPSG:3857",n=t.extent||Ta(e),r=t.tileGrid||og({extent:n,maxResolution:t.maxResolution,maxZoom:t.maxZoom!==void 0?t.maxZoom:22,minZoom:t.minZoom,tileSize:t.tileSize||512});super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,interpolate:!0,opaque:!1,projection:e,state:t.state,tileGrid:r,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:Fx,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX===void 0?!0:t.wrapX,transition:t.transition,zDirection:t.zDirection===void 0?1:t.zDirection}),this.format_=t.format?t.format:null,this.sourceTileCache=new Hh(this.tileCache.highWaterMark),this.overlaps_=t.overlaps==null?!0:t.overlaps,this.tileClass=t.tileClass?t.tileClass:Zy,this.tileGrids_={}}getFeaturesInExtent(t){const e=[],n=this.tileCache;if(n.getCount()===0)return e;const r=Vf(n.peekFirstKey())[0],o=this.tileGrid;return n.forEach(function(s){if(s.tileCoord[0]!==r||s.getState()!==N.LOADED)return;const a=s.getSourceTiles();for(let l=0,h=a.length;l<h;++l){const u=a[l],d=u.tileCoord;if(Kt(t,o.getTileCoordExtent(d))){const c=u.getFeatures();if(c)for(let f=0,g=c.length;f<g;++f){const m=c[f],p=m.getGeometry();Kt(t,p.getExtent())&&e.push(m)}}}}),e}getOverlaps(){return this.overlaps_}clear(){this.tileCache.clear(),this.sourceTileCache.clear()}expireCache(t,e){const n=this.getTileCacheForProjection(t),r=Object.keys(e).reduce((o,s)=>{const a=Vy(s),l=n.peek(a);if(l){const h=l.sourceTiles;for(let u=0,d=h.length;u<d;++u)o[h[u].getKey()]=!0}return o},{});super.expireCache(t,e),this.sourceTileCache.expireCache(r)}getSourceTiles(t,e,n){if(n.getState()===N.IDLE){n.setState(N.LOADING);const r=n.wrappedTileCoord,o=this.getTileGridForProjection(e),s=o.getTileCoordExtent(r),a=r[0],l=o.getResolution(a);ui(s,-l,s);const h=this.tileGrid,u=h.getExtent();u&&Un(s,u,s);const d=h.getZForResolution(l,this.zDirection);h.forEachTileCoord(s,d,c=>{const f=this.tileUrlFunction(c,t,e),g=this.sourceTileCache.containsKey(f)?this.sourceTileCache.get(f):new this.tileClass(c,f?N.IDLE:N.EMPTY,f,this.format_,this.tileLoadFunction);n.sourceTiles.push(g);const m=g.getState();if(m<N.LOADED){const p=_=>{this.handleTileChange(_);const v=g.getState();if(v===N.LOADED||v===N.ERROR){const y=g.getKey();y in n.errorTileKeys?g.getState()===N.LOADED&&delete n.errorTileKeys[y]:n.loadingSourceTiles--,v===N.ERROR?n.errorTileKeys[y]=!0:g.removeEventListener(tt.CHANGE,p),n.loadingSourceTiles===0&&n.setState(Fn(n.errorTileKeys)?N.LOADED:N.ERROR)}};g.addEventListener(tt.CHANGE,p),n.loadingSourceTiles++}m===N.IDLE&&(g.extent=h.getTileCoordExtent(c),g.projection=e,g.resolution=h.getResolution(c[0]),this.sourceTileCache.set(f,g),g.load())}),n.loadingSourceTiles||n.setState(n.sourceTiles.some(c=>c.getState()===N.ERROR)?N.ERROR:N.LOADED)}return n.sourceTiles}getTile(t,e,n,r,o){const s=Nr(t,e,n),a=this.getKey();let l;if(this.tileCache.containsKey(s)&&(l=this.tileCache.get(s),l.key===a))return l;const h=[t,e,n];let u=this.getTileCoordForTileUrlFunction(h,o);const d=this.getTileGrid().getExtent(),c=this.getTileGridForProjection(o);if(u&&d){const m=c.getTileCoordExtent(u);ui(m,-c.getResolution(t),m),Kt(d,m)||(u=null)}let f=!0;if(u!==null){const m=this.tileGrid,p=c.getResolution(t),_=m.getZForResolution(p,1),v=c.getTileCoordExtent(u);ui(v,-p,v),m.forEachTileCoord(v,_,function(y){f=f&&!this.tileUrlFunction(y,r,o)}.bind(this))}const g=new Yy(h,f?N.EMPTY:N.IDLE,u,this.getSourceTiles.bind(this,r,o));return g.key=a,l?(g.interimTile=l,g.refreshInterimChain(),this.tileCache.replace(s,g)):this.tileCache.set(s,g),g}getTileGridForProjection(t){const e=t.getCode();let n=this.tileGrids_[e];if(!n){const r=this.tileGrid,o=r.getResolutions().slice(),s=o.map(function(h,u){return r.getOrigin(u)}),a=o.map(function(h,u){return r.getTileSize(u)}),l=Cc+1;for(let h=o.length;h<l;++h)o.push(o[h-1]/2),s.push(s[h-1]),a.push(a[h-1]);n=new nu({extent:r.getExtent(),origins:s,resolutions:o,tileSizes:a}),this.tileGrids_[e]=n}return n}getTilePixelRatio(t){return t}getTilePixelSize(t,e,n){const r=this.getTileGridForProjection(n),o=be(r.getTileSize(t),this.tmpSize);return[Math.round(o[0]*e),Math.round(o[1]*e)]}updateCacheSize(t,e){super.updateCacheSize(t*2,e),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(e).highWaterMark}}const Lx=Dx;function Fx(i,t){i.setLoader(function(e,n,r){Nf(t,i.getFormat(),e,n,r,i.onLoad.bind(i),i.onError.bind(i))})}class Ox extends ag{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:Nx,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate!==void 0?t.interpolate:!0,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=t.crossOrigin!==void 0?t.crossOrigin:null,this.tileClass=t.tileClass!==void 0?t.tileClass:jf,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1}expireCache(t,e){const n=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==n?e:{});for(const r in this.tileCacheForProjection){const o=this.tileCacheForProjection[r];o.expireCache(o==n?e:{})}}getGutterForProjection(t){return this.getProjection()&&t&&!Vn(this.getProjection(),t)?0:this.getGutter()}getGutter(){return 0}getKey(){let t=super.getKey();return this.getInterpolate()||(t+=":disable-interpolation"),t}getOpaque(t){return this.getProjection()&&t&&!Vn(this.getProjection(),t)?!1:super.getOpaque(t)}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||Vn(e,t)))return this.tileGrid;{const n=K(t);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=rg(t)),this.tileGridForProjection[n]}}getTileCacheForProjection(t){const e=this.getProjection();if(!e||Vn(e,t))return this.tileCache;{const n=K(t);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new Hh(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]}}createTile_(t,e,n,r,o,s){const a=[t,e,n],l=this.getTileCoordForTileUrlFunction(a,o),h=l?this.tileUrlFunction(l,r,o):void 0,u=new this.tileClass(a,h!==void 0?N.IDLE:N.EMPTY,h!==void 0?h:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=s,u.addEventListener(tt.CHANGE,this.handleTileChange.bind(this)),u}getTile(t,e,n,r,o){const s=this.getProjection();if(!s||!o||Vn(s,o))return this.getTileInternal(t,e,n,r,s||o);{const a=this.getTileCacheForProjection(o),l=[t,e,n];let h;const u=Uf(l);a.containsKey(u)&&(h=a.get(u));const d=this.getKey();if(h&&h.key==d)return h;{const c=this.getTileGridForProjection(s),f=this.getTileGridForProjection(o),g=this.getTileCoordForTileUrlFunction(l,o),m=new ig(s,c,o,f,l,g,this.getTilePixelRatio(r),this.getGutter(),function(p,_,v,y){return this.getTileInternal(p,_,v,y,s)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return m.key=d,h?(m.interimTile=h,m.refreshInterimChain(),a.replace(u,m)):a.set(u,m),m}}}getTileInternal(t,e,n,r,o){let s=null;const a=Nr(t,e,n),l=this.getKey();if(!this.tileCache.containsKey(a))s=this.createTile_(t,e,n,r,o,l),this.tileCache.set(a,s);else if(s=this.tileCache.get(a),s.key!=l){const h=s;s=this.createTile_(t,e,n,r,o,l),h.getState()==N.IDLE?s.interimTile=h.interimTile:s.interimTile=h,s.refreshInterimChain(),this.tileCache.replace(a,s)}return s}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const e in this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}}setTileGridForProjection(t,e){const n=Gt(t);if(n){const r=K(n);r in this.tileGridForProjection||(this.tileGridForProjection[r]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function Nx(i,t){i.getImage().src=t}const Gx=Ox;class jx extends Os{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.setPreload(t.preload!==void 0?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0)}getPreload(){return this.get(un.PRELOAD)}setPreload(t){this.set(un.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(un.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(un.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}const Bx=jx;class Ux extends Bx{constructor(t){super(t)}createRenderer(){return new ng(this)}}const Vx=Ux;var qx={},lg,hg={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Xo(i){return i=Math.round(i),i<0?0:i>255?255:i}function ug(i){return i<0?0:i>1?1:i}function su(i){return i[i.length-1]==="%"?Xo(parseFloat(i)/100*255):Xo(parseInt(i))}function za(i){return i[i.length-1]==="%"?ug(parseFloat(i)/100):ug(parseFloat(i))}function au(i,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?i+(t-i)*e*6:e*2<1?t:e*3<2?i+(t-i)*(2/3-e)*6:i}function Xx(i){var t=i.replace(/ /g,"").toLowerCase();if(t in hg)return hg[t].slice();if(t[0]==="#"){if(t.length===4){var e=parseInt(t.substr(1),16);return e>=0&&e<=4095?[(e&3840)>>4|(e&3840)>>8,e&240|(e&240)>>4,e&15|(e&15)<<4,1]:null}else if(t.length===7){var e=parseInt(t.substr(1),16);return e>=0&&e<=16777215?[(e&16711680)>>16,(e&65280)>>8,e&255,1]:null}return null}var n=t.indexOf("("),r=t.indexOf(")");if(n!==-1&&r+1===t.length){var o=t.substr(0,n),s=t.substr(n+1,r-(n+1)).split(","),a=1;switch(o){case"rgba":if(s.length!==4)return null;a=za(s.pop());case"rgb":return s.length!==3?null:[su(s[0]),su(s[1]),su(s[2]),a];case"hsla":if(s.length!==4)return null;a=za(s.pop());case"hsl":if(s.length!==3)return null;var l=(parseFloat(s[0])%360+360)%360/360,h=za(s[1]),u=za(s[2]),d=u<=.5?u*(h+1):u+h-u*h,c=u*2-d;return[Xo(au(c,d,l+1/3)*255),Xo(au(c,d,l)*255),Xo(au(c,d,l-1/3)*255),a];default:return null}}return null}try{lg=qx.parseCSSColor=Xx}catch{}var Rt=function(t,e,n,r){r===void 0&&(r=1),this.r=t,this.g=e,this.b=n,this.a=r};Rt.parse=function(t){if(!!t){if(t instanceof Rt)return t;if(typeof t=="string"){var e=lg(t);if(!!e)return new Rt(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},Rt.prototype.toString=function(){var t=this.toArray(),e=t[0],n=t[1],r=t[2],o=t[3];return"rgba("+Math.round(e)+","+Math.round(n)+","+Math.round(r)+","+o+")"},Rt.prototype.toArray=function(){var t=this,e=t.r,n=t.g,r=t.b,o=t.a;return o===0?[0,0,0,0]:[e*255/o,n*255/o,r*255/o,o]},Rt.prototype.toArray01=function(){var t=this,e=t.r,n=t.g,r=t.b,o=t.a;return o===0?[0,0,0,0]:[e/o,n/o,r/o,o]},Rt.prototype.toArray01PremultipliedAlpha=function(){var t=this,e=t.r,n=t.g,r=t.b,o=t.a;return[e,n,r,o]},Rt.black=new Rt(0,0,0,1),Rt.white=new Rt(1,1,1,1),Rt.transparent=new Rt(0,0,0,0),Rt.red=new Rt(1,0,0,1),Rt.blue=new Rt(0,0,1,1);function $o(i){return typeof i=="object"?["literal",i]:i}function $x(i,t){var e=i.stops;if(!e)return Wx(i,t);var n=e&&typeof e[0][0]=="object",r=n||i.property!==void 0,o=n||!r;return e=e.map(function(s){return!r&&t.tokens&&typeof s[1]=="string"?[s[0],Hx(s[1])]:[s[0],$o(s[1])]}),n?Yx(i,t,e):o?Zx(i,t,e):hu(i,t,e)}function Wx(i,t){var e=["get",i.property];if(i.default===void 0)return t.type==="string"?["string",e]:e;if(t.type==="enum")return["match",e,Object.keys(t.values),e,i.default];var n=[t.type==="color"?"to-color":t.type,e,$o(i.default)];return t.type==="array"&&n.splice(1,0,t.value,t.length||null),n}function lu(i){switch(i.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function Yx(i,t,e){for(var n={},r={},o=[],s=0;s<e.length;s++){var a=e[s],l=a[0].zoom;n[l]===void 0&&(n[l]={zoom:l,type:i.type,property:i.property,default:i.default},r[l]=[],o.push(l)),r[l].push([a[0].value,a[1]])}var h=du({},t);if(h==="exponential"){for(var u=[lu(i),["linear"],["zoom"]],d=0,c=o;d<c.length;d+=1){var f=c[d],g=hu(n[f],t,r[f]);Br(u,f,g,!1)}return u}else{for(var m=["step",["zoom"]],p=0,_=o;p<_.length;p+=1){var v=_[p],y=hu(n[v],t,r[v]);Br(m,v,y,!0)}return uu(m),m}}function Kx(i,t){if(i!==void 0)return i;if(t!==void 0)return t}function dg(i,t){var e=$o(Kx(i.default,t.default));return e===void 0&&t.type==="resolvedImage"?"":e}function hu(i,t,e){var n=du(i,t),r=["get",i.property];if(n==="categorical"&&typeof e[0][0]=="boolean"){for(var o=["case"],s=0,a=e;s<a.length;s+=1){var l=a[s];o.push(["==",r,l[0]],l[1])}return o.push(dg(i,t)),o}else if(n==="categorical"){for(var h=["match",r],u=0,d=e;u<d.length;u+=1){var c=d[u];Br(h,c[0],c[1],!1)}return h.push(dg(i,t)),h}else if(n==="interval"){for(var f=["step",["number",r]],g=0,m=e;g<m.length;g+=1){var p=m[g];Br(f,p[0],p[1],!0)}return uu(f),i.default===void 0?f:["case",["==",["typeof",r],"number"],f,$o(i.default)]}else if(n==="exponential"){for(var _=i.base!==void 0?i.base:1,v=[lu(i),_===1?["linear"]:["exponential",_],["number",r]],y=0,x=e;y<x.length;y+=1){var k=x[y];Br(v,k[0],k[1],!1)}return i.default===void 0?v:["case",["==",["typeof",r],"number"],v,$o(i.default)]}else throw new Error("Unknown property function type "+n)}function Zx(i,t,e,n){n===void 0&&(n=["zoom"]);var r=du(i,t),o,s=!1;if(r==="interval")o=["step",n],s=!0;else if(r==="exponential"){var a=i.base!==void 0?i.base:1;o=[lu(i),a===1?["linear"]:["exponential",a],n]}else throw new Error('Unknown zoom function type "'+r+'"');for(var l=0,h=e;l<h.length;l+=1){var u=h[l];Br(o,u[0],u[1],s)}return uu(o),o}function uu(i){i[0]==="step"&&i.length===3&&(i.push(0),i.push(i[3]))}function Br(i,t,e,n){i.length>3&&t===i[i.length-2]||(n&&i.length===2||i.push(t),i.push(e))}function du(i,t){return i.type?i.type:t.expression.interpolated?"exponential":"interval"}function Hx(i){for(var t=["concat"],e=/{([^{}]+)}/g,n=0,r=e.exec(i);r!==null;r=e.exec(i)){var o=i.slice(n,e.lastIndex-r[0].length);n=e.lastIndex,o.length>0&&t.push(o),t.push(["get",r[1]])}if(t.length===1)return i;if(n<i.length)t.push(i.slice(n));else if(t.length===2)return["to-string",t[1]];return t}var ci=function(i){function t(e,n){i.call(this,n),this.message=n,this.key=e}return i&&(t.__proto__=i),t.prototype=Object.create(i&&i.prototype),t.prototype.constructor=t,t}(Error),Wo=function(t,e){e===void 0&&(e=[]),this.parent=t,this.bindings={};for(var n=0,r=e;n<r.length;n+=1){var o=r[n],s=o[0],a=o[1];this.bindings[s]=a}};Wo.prototype.concat=function(t){return new Wo(this,t)},Wo.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")},Wo.prototype.has=function(t){return this.bindings[t]?!0:this.parent?this.parent.has(t):!1};var Ra={kind:"null"},L={kind:"number"},mt={kind:"string"},lt={kind:"boolean"},Pi={kind:"color"},Ur={kind:"object"},ht={kind:"value"},Jx={kind:"error"},Ia={kind:"collator"},Pa={kind:"formatted"},Yo={kind:"resolvedImage"};function Ke(i,t){return{kind:"array",itemType:i,N:t}}function qt(i){if(i.kind==="array"){var t=qt(i.itemType);return typeof i.N=="number"?"array<"+t+", "+i.N+">":i.itemType.kind==="value"?"array":"array<"+t+">"}else return i.kind}var Qx=[Ra,L,mt,lt,Pi,Pa,Ur,Ke(ht),Yo];function Ko(i,t){if(t.kind==="error")return null;if(i.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!Ko(i.itemType,t.itemType))&&(typeof i.N!="number"||i.N===t.N))return null}else{if(i.kind===t.kind)return null;if(i.kind==="value")for(var e=0,n=Qx;e<n.length;e+=1){var r=n[e];if(!Ko(r,t))return null}}return"Expected "+qt(i)+" but found "+qt(t)+" instead."}function cu(i,t){return t.some(function(e){return e.kind===i.kind})}function Zo(i,t){return t.some(function(e){return e==="null"?i===null:e==="array"?Array.isArray(i):e==="object"?i&&!Array.isArray(i)&&typeof i=="object":e===typeof i})}var Ho=function(t,e,n){t?this.sensitivity=e?"variant":"case":this.sensitivity=e?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Ho.prototype.compare=function(t,e){return this.collator.compare(t,e)},Ho.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var fu=function(t,e,n,r,o){this.text=t.normalize?t.normalize():t,this.image=e,this.scale=n,this.fontStack=r,this.textColor=o},Ae=function(t){this.sections=t};Ae.fromString=function(t){return new Ae([new fu(t,null,null,null,null)])},Ae.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(t){return t.text.length!==0||t.image&&t.image.name.length!==0})},Ae.factory=function(t){return t instanceof Ae?t:Ae.fromString(t)},Ae.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(t){return t.text}).join("")},Ae.prototype.serialize=function(){for(var t=["format"],e=0,n=this.sections;e<n.length;e+=1){var r=n[e];if(r.image){t.push(["image",r.image.name]);continue}t.push(r.text);var o={};r.fontStack&&(o["text-font"]=["literal",r.fontStack.split(",")]),r.scale&&(o["font-scale"]=r.scale),r.textColor&&(o["text-color"]=["rgba"].concat(r.textColor.toArray())),t.push(o)}return t};var fi=function(t){this.name=t.name,this.available=t.available};fi.prototype.toString=function(){return this.name},fi.fromString=function(t){return t?new fi({name:t,available:!1}):null},fi.prototype.serialize=function(){return["image",this.name]};function cg(i,t,e,n){if(!(typeof i=="number"&&i>=0&&i<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof e=="number"&&e>=0&&e<=255)){var r=typeof n=="number"?[i,t,e,n]:[i,t,e];return"Invalid rgba value ["+r.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof n>"u"||typeof n=="number"&&n>=0&&n<=1?null:"Invalid rgba value ["+[i,t,e,n].join(", ")+"]: 'a' must be between 0 and 1."}function Aa(i){if(i===null)return!0;if(typeof i=="string")return!0;if(typeof i=="boolean")return!0;if(typeof i=="number")return!0;if(i instanceof Rt)return!0;if(i instanceof Ho)return!0;if(i instanceof Ae)return!0;if(i instanceof fi)return!0;if(Array.isArray(i)){for(var t=0,e=i;t<e.length;t+=1){var n=e[t];if(!Aa(n))return!1}return!0}else if(typeof i=="object"){for(var r in i)if(!Aa(i[r]))return!1;return!0}else return!1}function te(i){if(i===null)return Ra;if(typeof i=="string")return mt;if(typeof i=="boolean")return lt;if(typeof i=="number")return L;if(i instanceof Rt)return Pi;if(i instanceof Ho)return Ia;if(i instanceof Ae)return Pa;if(i instanceof fi)return Yo;if(Array.isArray(i)){for(var t=i.length,e,n=0,r=i;n<r.length;n+=1){var o=r[n],s=te(o);if(!e)e=s;else{if(e===s)continue;e=ht;break}}return Ke(e||ht,t)}else return Ur}function Jo(i){var t=typeof i;return i===null?"":t==="string"||t==="number"||t==="boolean"?String(i):i instanceof Rt||i instanceof Ae||i instanceof fi?i.toString():JSON.stringify(i)}var gi=function(t,e){this.type=t,this.value=e};gi.parse=function(t,e){if(t.length!==2)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!Aa(t[1]))return e.error("invalid value");var n=t[1],r=te(n),o=e.expectedType;return r.kind==="array"&&r.N===0&&o&&o.kind==="array"&&(typeof o.N!="number"||o.N===0)&&(r=o),new gi(r,n)},gi.prototype.evaluate=function(){return this.value},gi.prototype.eachChild=function(){},gi.prototype.outputDefined=function(){return!0},gi.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof Rt?["rgba"].concat(this.value.toArray()):this.value instanceof Ae?this.value.serialize():this.value};var oe=function(t){this.name="ExpressionEvaluationError",this.message=t};oe.prototype.toJSON=function(){return this.message};var gu={string:mt,number:L,boolean:lt,object:Ur},Me=function(t,e){this.type=t,this.args=e};Me.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=1,r,o=t[0];if(o==="array"){var s;if(t.length>2){var a=t[1];if(typeof a!="string"||!(a in gu)||a==="object")return e.error('The item type argument of "array" must be one of string, number, boolean',1);s=gu[a],n++}else s=ht;var l;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);l=t[2],n++}r=Ke(s,l)}else r=gu[o];for(var h=[];n<t.length;n++){var u=e.parse(t[n],n,ht);if(!u)return null;h.push(u)}return new Me(r,h)},Me.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var n=this.args[e].evaluate(t),r=Ko(this.type,te(n));if(r){if(e===this.args.length-1)throw new oe("Expected value to be of type "+qt(this.type)+", but found "+qt(te(n))+" instead.")}else return n}return null},Me.prototype.eachChild=function(t){this.args.forEach(t)},Me.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},Me.prototype.serialize=function(){var t=this.type,e=[t.kind];if(t.kind==="array"){var n=t.itemType;if(n.kind==="string"||n.kind==="number"||n.kind==="boolean"){e.push(n.kind);var r=t.N;(typeof r=="number"||this.args.length>1)&&e.push(r)}}return e.concat(this.args.map(function(o){return o.serialize()}))};var cn=function(t){this.type=Pa,this.sections=t};cn.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=t[1];if(!Array.isArray(n)&&typeof n=="object")return e.error("First argument must be an image or text section.");for(var r=[],o=!1,s=1;s<=t.length-1;++s){var a=t[s];if(o&&typeof a=="object"&&!Array.isArray(a)){o=!1;var l=null;if(a["font-scale"]&&(l=e.parse(a["font-scale"],1,L),!l))return null;var h=null;if(a["text-font"]&&(h=e.parse(a["text-font"],1,Ke(mt)),!h))return null;var u=null;if(a["text-color"]&&(u=e.parse(a["text-color"],1,Pi),!u))return null;var d=r[r.length-1];d.scale=l,d.font=h,d.textColor=u}else{var c=e.parse(t[s],1,ht);if(!c)return null;var f=c.type.kind;if(f!=="string"&&f!=="value"&&f!=="null"&&f!=="resolvedImage")return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,r.push({content:c,scale:null,font:null,textColor:null})}}return new cn(r)},cn.prototype.evaluate=function(t){var e=function(n){var r=n.content.evaluate(t);return te(r)===Yo?new fu("",r,null,null,null):new fu(Jo(r),null,n.scale?n.scale.evaluate(t):null,n.font?n.font.evaluate(t).join(","):null,n.textColor?n.textColor.evaluate(t):null)};return new Ae(this.sections.map(e))},cn.prototype.eachChild=function(t){for(var e=0,n=this.sections;e<n.length;e+=1){var r=n[e];t(r.content),r.scale&&t(r.scale),r.font&&t(r.font),r.textColor&&t(r.textColor)}},cn.prototype.outputDefined=function(){return!1},cn.prototype.serialize=function(){for(var t=["format"],e=0,n=this.sections;e<n.length;e+=1){var r=n[e];t.push(r.content.serialize());var o={};r.scale&&(o["font-scale"]=r.scale.serialize()),r.font&&(o["text-font"]=r.font.serialize()),r.textColor&&(o["text-color"]=r.textColor.serialize()),t.push(o)}return t};var fn=function(t){this.type=Yo,this.input=t};fn.parse=function(t,e){if(t.length!==2)return e.error("Expected two arguments.");var n=e.parse(t[1],1,mt);return n?new fn(n):e.error("No image name provided.")},fn.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=fi.fromString(e);return n&&t.availableImages&&(n.available=t.availableImages.indexOf(e)>-1),n},fn.prototype.eachChild=function(t){t(this.input)},fn.prototype.outputDefined=function(){return!1},fn.prototype.serialize=function(){return["image",this.input.serialize()]};var tb={"to-boolean":lt,"to-color":Pi,"to-number":L,"to-string":mt},Ze=function(t,e){this.type=t,this.args=e};Ze.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=t[0];if((n==="to-boolean"||n==="to-string")&&t.length!==2)return e.error("Expected one argument.");for(var r=tb[n],o=[],s=1;s<t.length;s++){var a=e.parse(t[s],s,ht);if(!a)return null;o.push(a)}return new Ze(r,o)},Ze.prototype.evaluate=function(t){if(this.type.kind==="boolean")return Boolean(this.args[0].evaluate(t));if(this.type.kind==="color"){for(var e,n,r=0,o=this.args;r<o.length;r+=1){var s=o[r];if(e=s.evaluate(t),n=null,e instanceof Rt)return e;if(typeof e=="string"){var a=t.parseColor(e);if(a)return a}else if(Array.isArray(e)&&(e.length<3||e.length>4?n="Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":n=cg(e[0],e[1],e[2],e[3]),!n))return new Rt(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new oe(n||"Could not parse color from value '"+(typeof e=="string"?e:String(JSON.stringify(e)))+"'")}else if(this.type.kind==="number"){for(var l=null,h=0,u=this.args;h<u.length;h+=1){var d=u[h];if(l=d.evaluate(t),l===null)return 0;var c=Number(l);if(!isNaN(c))return c}throw new oe("Could not convert "+JSON.stringify(l)+" to number.")}else return this.type.kind==="formatted"?Ae.fromString(Jo(this.args[0].evaluate(t))):this.type.kind==="resolvedImage"?fi.fromString(Jo(this.args[0].evaluate(t))):Jo(this.args[0].evaluate(t))},Ze.prototype.eachChild=function(t){this.args.forEach(t)},Ze.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},Ze.prototype.serialize=function(){if(this.type.kind==="formatted")return new cn([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new fn(this.args[0]).serialize();var t=["to-"+this.type.kind];return this.eachChild(function(e){t.push(e.serialize())}),t};var eb=["Unknown","Point","LineString","Polygon"],Ai=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null};Ai.prototype.id=function(){return this.feature&&"id"in this.feature&&this.feature.id?this.feature.id:null},Ai.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?eb[this.feature.type]:this.feature.type:null},Ai.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Ai.prototype.canonicalID=function(){return this.canonical},Ai.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Ai.prototype.distanceFromCenter=function(){if(this.featureTileCoord&&this.featureDistanceData){var t=this.featureDistanceData.center,e=this.featureDistanceData.scale,n=this.featureTileCoord,r=n.x,o=n.y,s=r*e-t[0],a=o*e-t[1],l=this.featureDistanceData.bearing[0],h=this.featureDistanceData.bearing[1],u=l*s+h*a;return u}return 0},Ai.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=Rt.parse(t)),e};var me=function(t,e,n,r){this.name=t,this.type=e,this._evaluate=n,this.args=r};me.prototype.evaluate=function(t){return this._evaluate(t,this.args)},me.prototype.eachChild=function(t){this.args.forEach(t)},me.prototype.outputDefined=function(){return!1},me.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},me.parse=function(t,e){var n,r=t[0],o=me.definitions[r];if(!o)return e.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0);for(var s=Array.isArray(o)?o[0]:o.type,a=Array.isArray(o)?[[o[1],o[2]]]:o.overloads,l=a.filter(function(P){var at=P[0];return!Array.isArray(at)||at.length===t.length-1}),h=null,u=0,d=l;u<d.length;u+=1){var c=d[u],f=c[0],g=c[1];h=new vn(e.registry,e.path,null,e.scope);for(var m=[],p=!1,_=1;_<t.length;_++){var v=t[_],y=Array.isArray(f)?f[_-1]:f.type,x=h.parse(v,1+m.length,y);if(!x){p=!0;break}m.push(x)}if(!p){if(Array.isArray(f)&&f.length!==m.length){h.error("Expected "+f.length+" arguments, but found "+m.length+" instead.");continue}for(var k=0;k<m.length;k++){var w=Array.isArray(f)?f[k]:f.type,C=m[k];h.concat(k+1).checkSubtype(w,C.type)}if(h.errors.length===0)return new me(r,s,g,m)}}if(l.length===1)(n=e.errors).push.apply(n,h.errors);else{for(var M=l.length?l:a,S=M.map(function(P){var at=P[0];return ib(at)}).join(" | "),R=[],A=1;A<t.length;A++){var G=e.parse(t[A],1+R.length);if(!G)return null;R.push(qt(G.type))}e.error("Expected arguments of type "+S+", but found ("+R.join(", ")+") instead.")}return null},me.register=function(t,e){me.definitions=e;for(var n in e)t[n]=me};function ib(i){return Array.isArray(i)?"("+i.map(qt).join(", ")+")":"("+qt(i.type)+"...)"}var gn=function(t,e,n){this.type=Ia,this.locale=n,this.caseSensitive=t,this.diacriticSensitive=e};gn.parse=function(t,e){if(t.length!==2)return e.error("Expected one argument.");var n=t[1];if(typeof n!="object"||Array.isArray(n))return e.error("Collator options argument must be an object.");var r=e.parse(n["case-sensitive"]===void 0?!1:n["case-sensitive"],1,lt);if(!r)return null;var o=e.parse(n["diacritic-sensitive"]===void 0?!1:n["diacritic-sensitive"],1,lt);if(!o)return null;var s=null;return n.locale&&(s=e.parse(n.locale,1,mt),!s)?null:new gn(r,o,s)},gn.prototype.evaluate=function(t){return new Ho(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},gn.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},gn.prototype.outputDefined=function(){return!1},gn.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var mn=8192;function mu(i,t){i[0]=Math.min(i[0],t[0]),i[1]=Math.min(i[1],t[1]),i[2]=Math.max(i[2],t[0]),i[3]=Math.max(i[3],t[1])}function nb(i){return(180+i)/360}function rb(i){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360}function Da(i,t){return!(i[0]<=t[0]||i[2]>=t[2]||i[1]<=t[1]||i[3]>=t[3])}function ob(i,t){var e=nb(i[0]),n=rb(i[1]),r=Math.pow(2,t.z);return[Math.round(e*r*mn),Math.round(n*r*mn)]}function sb(i,t,e){var n=i[0]-t[0],r=i[1]-t[1],o=i[0]-e[0],s=i[1]-e[1];return n*s-o*r===0&&n*o<=0&&r*s<=0}function ab(i,t,e){return t[1]>i[1]!=e[1]>i[1]&&i[0]<(e[0]-t[0])*(i[1]-t[1])/(e[1]-t[1])+t[0]}function pu(i,t){for(var e=!1,n=0,r=t.length;n<r;n++)for(var o=t[n],s=0,a=o.length;s<a-1;s++){if(sb(i,o[s],o[s+1]))return!1;ab(i,o[s],o[s+1])&&(e=!e)}return e}function lb(i,t){for(var e=0;e<t.length;e++)if(pu(i,t[e]))return!0;return!1}function hb(i,t){return i[0]*t[1]-i[1]*t[0]}function fg(i,t,e,n){var r=i[0]-e[0],o=i[1]-e[1],s=t[0]-e[0],a=t[1]-e[1],l=n[0]-e[0],h=n[1]-e[1],u=r*h-l*o,d=s*h-l*a;return u>0&&d<0||u<0&&d>0}function ub(i,t,e,n){var r=[t[0]-i[0],t[1]-i[1]],o=[n[0]-e[0],n[1]-e[1]];return hb(o,r)===0?!1:!!(fg(i,t,e,n)&&fg(e,n,i,t))}function db(i,t,e){for(var n=0,r=e;n<r.length;n+=1)for(var o=r[n],s=0;s<o.length-1;++s)if(ub(i,t,o[s],o[s+1]))return!0;return!1}function gg(i,t){for(var e=0;e<i.length;++e)if(!pu(i[e],t))return!1;for(var n=0;n<i.length-1;++n)if(db(i[n],i[n+1],t))return!1;return!0}function cb(i,t){for(var e=0;e<t.length;e++)if(gg(i,t[e]))return!0;return!1}function vu(i,t,e){for(var n=[],r=0;r<i.length;r++){for(var o=[],s=0;s<i[r].length;s++){var a=ob(i[r][s],e);mu(t,a),o.push(a)}n.push(o)}return n}function mg(i,t,e){for(var n=[],r=0;r<i.length;r++){var o=vu(i[r],t,e);n.push(o)}return n}function pg(i,t,e,n){if(i[0]<e[0]||i[0]>e[2]){var r=n*.5,o=i[0]-e[0]>r?-n:e[0]-i[0]>r?n:0;o===0&&(o=i[0]-e[2]>r?-n:e[2]-i[0]>r?n:0),i[0]+=o}mu(t,i)}function fb(i){i[0]=i[1]=1/0,i[2]=i[3]=-1/0}function vg(i,t,e,n){var r=Math.pow(2,n.z)*mn,o=[n.x*mn,n.y*mn],s=[];if(!i)return s;for(var a=0,l=i;a<l.length;a+=1)for(var h=l[a],u=0,d=h;u<d.length;u+=1){var c=d[u],f=[c.x+o[0],c.y+o[1]];pg(f,t,e,r),s.push(f)}return s}function _g(i,t,e,n){var r=Math.pow(2,n.z)*mn,o=[n.x*mn,n.y*mn],s=[];if(!i)return s;for(var a=0,l=i;a<l.length;a+=1){for(var h=l[a],u=[],d=0,c=h;d<c.length;d+=1){var f=c[d],g=[f.x+o[0],f.y+o[1]];mu(t,g),u.push(g)}s.push(u)}if(t[2]-t[0]<=r/2){fb(t);for(var m=0,p=s;m<p.length;m+=1)for(var _=p[m],v=0,y=_;v<y.length;v+=1){var x=y[v];pg(x,t,e,r)}}return s}function gb(i,t){var e=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],r=i.canonicalID();if(!r)return!1;if(t.type==="Polygon"){var o=vu(t.coordinates,n,r),s=vg(i.geometry(),e,n,r);if(!Da(e,n))return!1;for(var a=0,l=s;a<l.length;a+=1){var h=l[a];if(!pu(h,o))return!1}}if(t.type==="MultiPolygon"){var u=mg(t.coordinates,n,r),d=vg(i.geometry(),e,n,r);if(!Da(e,n))return!1;for(var c=0,f=d;c<f.length;c+=1){var g=f[c];if(!lb(g,u))return!1}}return!0}function mb(i,t){var e=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],r=i.canonicalID();if(!r)return!1;if(t.type==="Polygon"){var o=vu(t.coordinates,n,r),s=_g(i.geometry(),e,n,r);if(!Da(e,n))return!1;for(var a=0,l=s;a<l.length;a+=1){var h=l[a];if(!gg(h,o))return!1}}if(t.type==="MultiPolygon"){var u=mg(t.coordinates,n,r),d=_g(i.geometry(),e,n,r);if(!Da(e,n))return!1;for(var c=0,f=d;c<f.length;c+=1){var g=f[c];if(!cb(g,u))return!1}}return!0}var ri=function(t,e){this.type=lt,this.geojson=t,this.geometries=e};ri.parse=function(t,e){if(t.length!==2)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(Aa(t[1])){var n=t[1];if(n.type==="FeatureCollection")for(var r=0;r<n.features.length;++r){var o=n.features[r].geometry.type;if(o==="Polygon"||o==="MultiPolygon")return new ri(n,n.features[r].geometry)}else if(n.type==="Feature"){var s=n.geometry.type;if(s==="Polygon"||s==="MultiPolygon")return new ri(n,n.geometry)}else if(n.type==="Polygon"||n.type==="MultiPolygon")return new ri(n,n)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")},ri.prototype.evaluate=function(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return gb(t,this.geometries);if(t.geometryType()==="LineString")return mb(t,this.geometries)}return!1},ri.prototype.eachChild=function(){},ri.prototype.outputDefined=function(){return!0},ri.prototype.serialize=function(){return["within",this.geojson]};function La(i){if(i instanceof me){if(i.name==="get"&&i.args.length===1)return!1;if(i.name==="feature-state")return!1;if(i.name==="has"&&i.args.length===1)return!1;if(i.name==="properties"||i.name==="geometry-type"||i.name==="id")return!1;if(/^filter-/.test(i.name))return!1}if(i instanceof ri)return!1;var t=!0;return i.eachChild(function(e){t&&!La(e)&&(t=!1)}),t}function _u(i){if(i instanceof me&&i.name==="feature-state")return!1;var t=!0;return i.eachChild(function(e){t&&!_u(e)&&(t=!1)}),t}function yu(i,t){if(i instanceof me&&t.indexOf(i.name)>=0)return!1;var e=!0;return i.eachChild(function(n){e&&!yu(n,t)&&(e=!1)}),e}var pn=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};pn.parse=function(t,e){if(t.length!==2||typeof t[1]!="string")return e.error("'var' expression requires exactly one string literal argument.");var n=t[1];return e.scope.has(n)?new pn(n,e.scope.get(n)):e.error('Unknown variable "'+n+'". Make sure "'+n+'" has been bound in an enclosing "let" expression before using it.',1)},pn.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},pn.prototype.eachChild=function(){},pn.prototype.outputDefined=function(){return!1},pn.prototype.serialize=function(){return["var",this.name]};var vn=function(t,e,n,r,o){e===void 0&&(e=[]),r===void 0&&(r=new Wo),o===void 0&&(o=[]),this.registry=t,this.path=e,this.key=e.map(function(s){return"["+s+"]"}).join(""),this.scope=r,this.errors=o,this.expectedType=n};vn.prototype.parse=function(t,e,n,r,o){return o===void 0&&(o={}),e?this.concat(e,n,r)._parse(t,o):this._parse(t,o)},vn.prototype._parse=function(t,e){(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number")&&(t=["literal",t]);function n(u,d,c){return c==="assert"?new Me(d,[u]):c==="coerce"?new Ze(d,[u]):u}if(Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var r=t[0];if(typeof r!="string")return this.error("Expression name must be a string, but found "+typeof r+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var o=this.registry[r];if(o){var s=o.parse(t,this);if(!s)return null;if(this.expectedType){var a=this.expectedType,l=s.type;if((a.kind==="string"||a.kind==="number"||a.kind==="boolean"||a.kind==="object"||a.kind==="array")&&l.kind==="value")s=n(s,a,e.typeAnnotation||"assert");else if((a.kind==="color"||a.kind==="formatted"||a.kind==="resolvedImage")&&(l.kind==="value"||l.kind==="string"))s=n(s,a,e.typeAnnotation||"coerce");else if(this.checkSubtype(a,l))return null}if(!(s instanceof gi)&&s.type.kind!=="resolvedImage"&&xu(s)){var h=new Ai;try{s=new gi(s.type,s.evaluate(h))}catch(u){return this.error(u.message),null}}return s}return this.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof t>"u"?this.error("'undefined' value invalid. Use null instead."):typeof t=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},vn.prototype.concat=function(t,e,n){var r=typeof t=="number"?this.path.concat(t):this.path,o=n?this.scope.concat(n):this.scope;return new vn(this.registry,r,e||null,o,this.errors)},vn.prototype.error=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var r=""+this.key+e.map(function(o){return"["+o+"]"}).join("");this.errors.push(new ci(r,t))},vn.prototype.checkSubtype=function(t,e){var n=Ko(t,e);return n&&this.error(n),n};function xu(i){if(i instanceof pn)return xu(i.boundExpression);if(i instanceof me&&i.name==="error")return!1;if(i instanceof gn)return!1;if(i instanceof ri)return!1;var t=i instanceof Ze||i instanceof Me,e=!0;return i.eachChild(function(n){t?e=e&&xu(n):e=e&&n instanceof gi}),e?La(i)&&yu(i,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"]):!1}function yg(i,t){for(var e=i.length-1,n=0,r=e,o=0,s,a;n<=r;)if(o=Math.floor((n+r)/2),s=i[o],a=i[o+1],s<=t){if(o===e||t<a)return o;n=o+1}else if(s>t)r=o-1;else throw new oe("Input is not a number.");return 0}var _n=function(t,e,n){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var r=0,o=n;r<o.length;r+=1){var s=o[r],a=s[0],l=s[1];this.labels.push(a),this.outputs.push(l)}};_n.parse=function(t,e){if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!==0)return e.error("Expected an even number of arguments.");var n=e.parse(t[1],1,L);if(!n)return null;var r=[],o=null;e.expectedType&&e.expectedType.kind!=="value"&&(o=e.expectedType);for(var s=1;s<t.length;s+=2){var a=s===1?-1/0:t[s],l=t[s+1],h=s,u=s+1;if(typeof a!="number")return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',h);if(r.length&&r[r.length-1][0]>=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',h);var d=e.parse(l,u,o);if(!d)return null;o=o||d.type,r.push([a,d])}return new _n(o,n,r)},_n.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(e.length===1)return n[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);var o=e.length;if(r>=e[o-1])return n[o-1].evaluate(t);var s=yg(e,r);return n[s].evaluate(t)},_n.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e<n.length;e+=1){var r=n[e];t(r)}},_n.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},_n.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var pb=Vr;function Vr(i,t,e,n){this.cx=3*i,this.bx=3*(e-i)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=i,this.p1y=n,this.p2x=e,this.p2y=n}Vr.prototype.sampleCurveX=function(i){return((this.ax*i+this.bx)*i+this.cx)*i},Vr.prototype.sampleCurveY=function(i){return((this.ay*i+this.by)*i+this.cy)*i},Vr.prototype.sampleCurveDerivativeX=function(i){return(3*this.ax*i+2*this.bx)*i+this.cx},Vr.prototype.solveCurveX=function(i,t){typeof t>"u"&&(t=1e-6);var e,n,r,o,s;for(r=i,s=0;s<8;s++){if(o=this.sampleCurveX(r)-i,Math.abs(o)<t)return r;var a=this.sampleCurveDerivativeX(r);if(Math.abs(a)<1e-6)break;r=r-o/a}if(e=0,n=1,r=i,r<e)return e;if(r>n)return n;for(;e<n;){if(o=this.sampleCurveX(r),Math.abs(o-i)<t)return r;i>o?e=r:n=r,r=(n-e)*.5+e}return r},Vr.prototype.solve=function(i,t){return this.sampleCurveY(this.solveCurveX(i,t))};function Be(i,t,e){return i*(1-e)+t*e}function vb(i,t,e){return new Rt(Be(i.r,t.r,e),Be(i.g,t.g,e),Be(i.b,t.b,e),Be(i.a,t.a,e))}function _b(i,t,e){return i.map(function(n,r){return Be(n,t[r],e)})}var yb=Object.freeze({__proto__:null,number:Be,color:vb,array:_b}),xg=.95047,bg=1,kg=1.08883,wg=4/29,qr=6/29,Mg=3*qr*qr,xb=qr*qr*qr,bb=Math.PI/180,kb=180/Math.PI;function bu(i){return i>xb?Math.pow(i,1/3):i/Mg+wg}function ku(i){return i>qr?i*i*i:Mg*(i-wg)}function wu(i){return 255*(i<=.0031308?12.92*i:1.055*Math.pow(i,1/2.4)-.055)}function Mu(i){return i/=255,i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function Eg(i){var t=Mu(i.r),e=Mu(i.g),n=Mu(i.b),r=bu((.4124564*t+.3575761*e+.1804375*n)/xg),o=bu((.2126729*t+.7151522*e+.072175*n)/bg),s=bu((.0193339*t+.119192*e+.9503041*n)/kg);return{l:116*o-16,a:500*(r-o),b:200*(o-s),alpha:i.a}}function Cg(i){var t=(i.l+16)/116,e=isNaN(i.a)?t:t+i.a/500,n=isNaN(i.b)?t:t-i.b/200;return t=bg*ku(t),e=xg*ku(e),n=kg*ku(n),new Rt(wu(3.2404542*e-1.5371385*t-.4985314*n),wu(-.969266*e+1.8760108*t+.041556*n),wu(.0556434*e-.2040259*t+1.0572252*n),i.alpha)}function wb(i,t,e){return{l:Be(i.l,t.l,e),a:Be(i.a,t.a,e),b:Be(i.b,t.b,e),alpha:Be(i.alpha,t.alpha,e)}}function Mb(i){var t=Eg(i),e=t.l,n=t.a,r=t.b,o=Math.atan2(r,n)*kb;return{h:o<0?o+360:o,c:Math.sqrt(n*n+r*r),l:e,alpha:i.a}}function Eb(i){var t=i.h*bb,e=i.c,n=i.l;return Cg({l:n,a:Math.cos(t)*e,b:Math.sin(t)*e,alpha:i.alpha})}function Cb(i,t,e){var n=t-i;return i+e*(n>180||n<-180?n-360*Math.round(n/360):n)}function Sb(i,t,e){return{h:Cb(i.h,t.h,e),c:Be(i.c,t.c,e),l:Be(i.l,t.l,e),alpha:Be(i.alpha,t.alpha,e)}}var Fa={forward:Eg,reverse:Cg,interpolate:wb},Oa={forward:Mb,reverse:Eb,interpolate:Sb},Ee=function(t,e,n,r,o){this.type=t,this.operator=e,this.interpolation=n,this.input=r,this.labels=[],this.outputs=[];for(var s=0,a=o;s<a.length;s+=1){var l=a[s],h=l[0],u=l[1];this.labels.push(h),this.outputs.push(u)}};Ee.interpolationFactor=function(t,e,n,r){var o=0;if(t.name==="exponential")o=Eu(e,t.base,n,r);else if(t.name==="linear")o=Eu(e,1,n,r);else if(t.name==="cubic-bezier"){var s=t.controlPoints,a=new pb(s[0],s[1],s[2],s[3]);o=a.solve(Eu(e,1,n,r))}return o},Ee.parse=function(t,e){var n=t[0],r=t[1],o=t[2],s=t.slice(3);if(!Array.isArray(r)||r.length===0)return e.error("Expected an interpolation type expression.",1);if(r[0]==="linear")r={name:"linear"};else if(r[0]==="exponential"){var a=r[1];if(typeof a!="number")return e.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:a}}else if(r[0]==="cubic-bezier"){var l=r.slice(1);if(l.length!==4||l.some(function(_){return typeof _!="number"||_<0||_>1}))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:l}}else return e.error("Unknown interpolation type "+String(r[0]),1,0);if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!==0)return e.error("Expected an even number of arguments.");if(o=e.parse(o,2,L),!o)return null;var h=[],u=null;n==="interpolate-hcl"||n==="interpolate-lab"?u=Pi:e.expectedType&&e.expectedType.kind!=="value"&&(u=e.expectedType);for(var d=0;d<s.length;d+=2){var c=s[d],f=s[d+1],g=d+3,m=d+4;if(typeof c!="number")return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',g);if(h.length&&h[h.length-1][0]>=c)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',g);var p=e.parse(f,m,u);if(!p)return null;u=u||p.type,h.push([c,p])}return u.kind!=="number"&&u.kind!=="color"&&!(u.kind==="array"&&u.itemType.kind==="number"&&typeof u.N=="number")?e.error("Type "+qt(u)+" is not interpolatable."):new Ee(u,n,r,o,h)},Ee.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(e.length===1)return n[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);var o=e.length;if(r>=e[o-1])return n[o-1].evaluate(t);var s=yg(e,r),a=e[s],l=e[s+1],h=Ee.interpolationFactor(this.interpolation,r,a,l),u=n[s].evaluate(t),d=n[s+1].evaluate(t);return this.operator==="interpolate"?yb[this.type.kind.toLowerCase()](u,d,h):this.operator==="interpolate-hcl"?Oa.reverse(Oa.interpolate(Oa.forward(u),Oa.forward(d),h)):Fa.reverse(Fa.interpolate(Fa.forward(u),Fa.forward(d),h))},Ee.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e<n.length;e+=1){var r=n[e];t(r)}},Ee.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},Ee.prototype.serialize=function(){var t;this.interpolation.name==="linear"?t=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?t=["linear"]:t=["exponential",this.interpolation.base]:t=["cubic-bezier"].concat(this.interpolation.controlPoints);for(var e=[this.operator,t,this.input.serialize()],n=0;n<this.labels.length;n++)e.push(this.labels[n],this.outputs[n].serialize());return e};function Eu(i,t,e,n){var r=n-e,o=i-e;return r===0?0:t===1?o/r:(Math.pow(t,o)-1)/(Math.pow(t,r)-1)}var Di=function(t,e){this.type=t,this.args=e};Di.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var n=null,r=e.expectedType;r&&r.kind!=="value"&&(n=r);for(var o=[],s=0,a=t.slice(1);s<a.length;s+=1){var l=a[s],h=e.parse(l,1+o.length,n,void 0,{typeAnnotation:"omit"});if(!h)return null;n=n||h.type,o.push(h)}var u=r&&o.some(function(d){return Ko(r,d.type)});return u?new Di(ht,o):new Di(n,o)},Di.prototype.evaluate=function(t){for(var e=null,n=0,r,o=0,s=this.args;o<s.length;o+=1){var a=s[o];if(n++,e=a.evaluate(t),e&&e instanceof fi&&!e.available&&(r||(r=e),e=null,n===this.args.length))return r;if(e!==null)break}return e},Di.prototype.eachChild=function(t){this.args.forEach(t)},Di.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},Di.prototype.serialize=function(){var t=["coalesce"];return this.eachChild(function(e){t.push(e.serialize())}),t};var yn=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};yn.prototype.evaluate=function(t){return this.result.evaluate(t)},yn.prototype.eachChild=function(t){for(var e=0,n=this.bindings;e<n.length;e+=1){var r=n[e];t(r[1])}t(this.result)},yn.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var n=[],r=1;r<t.length-1;r+=2){var o=t[r];if(typeof o!="string")return e.error("Expected string, but found "+typeof o+" instead.",r);if(/[^a-zA-Z0-9_]/.test(o))return e.error("Variable names must contain only alphanumeric characters or '_'.",r);var s=e.parse(t[r+1],r+1);if(!s)return null;n.push([o,s])}var a=e.parse(t[t.length-1],t.length-1,e.expectedType,n);return a?new yn(n,a):null},yn.prototype.outputDefined=function(){return this.result.outputDefined()},yn.prototype.serialize=function(){for(var t=["let"],e=0,n=this.bindings;e<n.length;e+=1){var r=n[e],o=r[0],s=r[1];t.push(o,s.serialize())}return t.push(this.result.serialize()),t};var tr=function(t,e,n){this.type=t,this.index=e,this.input=n};tr.parse=function(t,e){if(t.length!==3)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,L),r=e.parse(t[2],2,Ke(e.expectedType||ht));if(!n||!r)return null;var o=r.type;return new tr(o.itemType,n,r)},tr.prototype.evaluate=function(t){var e=this.index.evaluate(t),n=this.input.evaluate(t);if(e<0)throw new oe("Array index out of bounds: "+e+" < 0.");if(e>=n.length)throw new oe("Array index out of bounds: "+e+" > "+(n.length-1)+".");if(e!==Math.floor(e))throw new oe("Array index must be an integer, but found "+e+" instead.");return n[e]},tr.prototype.eachChild=function(t){t(this.index),t(this.input)},tr.prototype.outputDefined=function(){return!1},tr.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var er=function(t,e){this.type=lt,this.needle=t,this.haystack=e};er.parse=function(t,e){if(t.length!==3)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,ht),r=e.parse(t[2],2,ht);return!n||!r?null:cu(n.type,[lt,mt,L,Ra,ht])?new er(n,r):e.error("Expected first argument to be of type boolean, string, number or null, but found "+qt(n.type)+" instead")},er.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(n==null)return!1;if(!Zo(e,["boolean","string","number","null"]))throw new oe("Expected first argument to be of type boolean, string, number or null, but found "+qt(te(e))+" instead.");if(!Zo(n,["string","array"]))throw new oe("Expected second argument to be of type array or string, but found "+qt(te(n))+" instead.");return n.indexOf(e)>=0},er.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},er.prototype.outputDefined=function(){return!0},er.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var xn=function(t,e,n){this.type=L,this.needle=t,this.haystack=e,this.fromIndex=n};xn.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,ht),r=e.parse(t[2],2,ht);if(!n||!r)return null;if(!cu(n.type,[lt,mt,L,Ra,ht]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+qt(n.type)+" instead");if(t.length===4){var o=e.parse(t[3],3,L);return o?new xn(n,r,o):null}else return new xn(n,r)},xn.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!Zo(e,["boolean","string","number","null"]))throw new oe("Expected first argument to be of type boolean, string, number or null, but found "+qt(te(e))+" instead.");if(!Zo(n,["string","array"]))throw new oe("Expected second argument to be of type array or string, but found "+qt(te(n))+" instead.");if(this.fromIndex){var r=this.fromIndex.evaluate(t);return n.indexOf(e,r)}return n.indexOf(e)},xn.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},xn.prototype.outputDefined=function(){return!1},xn.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var ir=function(t,e,n,r,o,s){this.inputType=t,this.type=e,this.input=n,this.cases=r,this.outputs=o,this.otherwise=s};ir.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!==1)return e.error("Expected an even number of arguments.");var n,r;e.expectedType&&e.expectedType.kind!=="value"&&(r=e.expectedType);for(var o={},s=[],a=2;a<t.length-1;a+=2){var l=t[a],h=t[a+1];Array.isArray(l)||(l=[l]);var u=e.concat(a);if(l.length===0)return u.error("Expected at least one branch label.");for(var d=0,c=l;d<c.length;d+=1){var f=c[d];if(typeof f!="number"&&typeof f!="string")return u.error("Branch labels must be numbers or strings.");if(typeof f=="number"&&Math.abs(f)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof f=="number"&&Math.floor(f)!==f)return u.error("Numeric branch labels must be integer values.");if(!n)n=te(f);else if(u.checkSubtype(n,te(f)))return null;if(typeof o[String(f)]<"u")return u.error("Branch labels must be unique.");o[String(f)]=s.length}var g=e.parse(h,a,r);if(!g)return null;r=r||g.type,s.push(g)}var m=e.parse(t[1],1,ht);if(!m)return null;var p=e.parse(t[t.length-1],t.length-1,r);return!p||m.type.kind!=="value"&&e.concat(1).checkSubtype(n,m.type)?null:new ir(n,r,m,o,s,p)},ir.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=te(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise;return n.evaluate(t)},ir.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},ir.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})&&this.otherwise.outputDefined()},ir.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],n=Object.keys(this.cases).sort(),r=[],o={},s=0,a=n;s<a.length;s+=1){var l=a[s],h=o[this.cases[l]];h===void 0?(o[this.cases[l]]=r.length,r.push([this.cases[l],[l]])):r[h][1].push(l)}for(var u=function(m){return t.inputType.kind==="number"?Number(m):m},d=0,c=r;d<c.length;d+=1){var f=c[d],h=f[0],g=f[1];g.length===1?e.push(u(g[0])):e.push(g.map(u)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e};var nr=function(t,e,n){this.type=t,this.branches=e,this.otherwise=n};nr.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!==0)return e.error("Expected an odd number of arguments.");var n;e.expectedType&&e.expectedType.kind!=="value"&&(n=e.expectedType);for(var r=[],o=1;o<t.length-1;o+=2){var s=e.parse(t[o],o,lt);if(!s)return null;var a=e.parse(t[o+1],o+1,n);if(!a)return null;r.push([s,a]),n=n||a.type}var l=e.parse(t[t.length-1],t.length-1,n);return l?new nr(n,r,l):null},nr.prototype.evaluate=function(t){for(var e=0,n=this.branches;e<n.length;e+=1){var r=n[e],o=r[0],s=r[1];if(o.evaluate(t))return s.evaluate(t)}return this.otherwise.evaluate(t)},nr.prototype.eachChild=function(t){for(var e=0,n=this.branches;e<n.length;e+=1){var r=n[e],o=r[0],s=r[1];t(o),t(s)}t(this.otherwise)},nr.prototype.outputDefined=function(){return this.branches.every(function(t){t[0];var e=t[1];return e.outputDefined()})&&this.otherwise.outputDefined()},nr.prototype.serialize=function(){var t=["case"];return this.eachChild(function(e){t.push(e.serialize())}),t};var bn=function(t,e,n,r){this.type=t,this.input=e,this.beginIndex=n,this.endIndex=r};bn.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,ht),r=e.parse(t[2],2,L);if(!n||!r)return null;if(!cu(n.type,[Ke(ht),mt,ht]))return e.error("Expected first argument to be of type array or string, but found "+qt(n.type)+" instead");if(t.length===4){var o=e.parse(t[3],3,L);return o?new bn(n.type,n,r,o):null}else return new bn(n.type,n,r)},bn.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=this.beginIndex.evaluate(t);if(!Zo(e,["string","array"]))throw new oe("Expected first argument to be of type array or string, but found "+qt(te(e))+" instead.");if(this.endIndex){var r=this.endIndex.evaluate(t);return e.slice(n,r)}return e.slice(n)},bn.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},bn.prototype.outputDefined=function(){return!1},bn.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Sg(i,t){return i==="=="||i==="!="?t.kind==="boolean"||t.kind==="string"||t.kind==="number"||t.kind==="null"||t.kind==="value":t.kind==="string"||t.kind==="number"||t.kind==="value"}function Tb(i,t,e){return t===e}function zb(i,t,e){return t!==e}function Rb(i,t,e){return t<e}function Ib(i,t,e){return t>e}function Pb(i,t,e){return t<=e}function Ab(i,t,e){return t>=e}function Tg(i,t,e,n){return n.compare(t,e)===0}function Db(i,t,e,n){return!Tg(i,t,e,n)}function Lb(i,t,e,n){return n.compare(t,e)<0}function Fb(i,t,e,n){return n.compare(t,e)>0}function Ob(i,t,e,n){return n.compare(t,e)<=0}function Nb(i,t,e,n){return n.compare(t,e)>=0}function Xr(i,t,e){var n=i!=="=="&&i!=="!=";return function(){function r(o,s,a){this.type=lt,this.lhs=o,this.rhs=s,this.collator=a,this.hasUntypedArgument=o.type.kind==="value"||s.type.kind==="value"}return r.parse=function(s,a){if(s.length!==3&&s.length!==4)return a.error("Expected two or three arguments.");var l=s[0],h=a.parse(s[1],1,ht);if(!h)return null;if(!Sg(l,h.type))return a.concat(1).error('"'+l+`" comparisons are not supported for type '`+qt(h.type)+"'.");var u=a.parse(s[2],2,ht);if(!u)return null;if(!Sg(l,u.type))return a.concat(2).error('"'+l+`" comparisons are not supported for type '`+qt(u.type)+"'.");if(h.type.kind!==u.type.kind&&h.type.kind!=="value"&&u.type.kind!=="value")return a.error("Cannot compare types '"+qt(h.type)+"' and '"+qt(u.type)+"'.");n&&(h.type.kind==="value"&&u.type.kind!=="value"?h=new Me(u.type,[h]):h.type.kind!=="value"&&u.type.kind==="value"&&(u=new Me(h.type,[u])));var d=null;if(s.length===4){if(h.type.kind!=="string"&&u.type.kind!=="string"&&h.type.kind!=="value"&&u.type.kind!=="value")return a.error("Cannot use collator to compare non-string types.");if(d=a.parse(s[3],3,Ia),!d)return null}return new r(h,u,d)},r.prototype.evaluate=function(s){var a=this.lhs.evaluate(s),l=this.rhs.evaluate(s);if(n&&this.hasUntypedArgument){var h=te(a),u=te(l);if(h.kind!==u.kind||!(h.kind==="string"||h.kind==="number"))throw new oe('Expected arguments for "'+i+'" to be (string, string) or (number, number), but found ('+h.kind+", "+u.kind+") instead.")}if(this.collator&&!n&&this.hasUntypedArgument){var d=te(a),c=te(l);if(d.kind!=="string"||c.kind!=="string")return t(s,a,l)}return this.collator?e(s,a,l,this.collator.evaluate(s)):t(s,a,l)},r.prototype.eachChild=function(s){s(this.lhs),s(this.rhs),this.collator&&s(this.collator)},r.prototype.outputDefined=function(){return!0},r.prototype.serialize=function(){var s=[i];return this.eachChild(function(a){s.push(a.serialize())}),s},r}()}var Gb=Xr("==",Tb,Tg),jb=Xr("!=",zb,Db),Bb=Xr("<",Rb,Lb),Ub=Xr(">",Ib,Fb),Vb=Xr("<=",Pb,Ob),qb=Xr(">=",Ab,Nb),rr=function(t,e,n,r,o){this.type=mt,this.number=t,this.locale=e,this.currency=n,this.minFractionDigits=r,this.maxFractionDigits=o};rr.parse=function(t,e){if(t.length!==3)return e.error("Expected two arguments.");var n=e.parse(t[1],1,L);if(!n)return null;var r=t[2];if(typeof r!="object"||Array.isArray(r))return e.error("NumberFormat options argument must be an object.");var o=null;if(r.locale&&(o=e.parse(r.locale,1,mt),!o))return null;var s=null;if(r.currency&&(s=e.parse(r.currency,1,mt),!s))return null;var a=null;if(r["min-fraction-digits"]&&(a=e.parse(r["min-fraction-digits"],1,L),!a))return null;var l=null;return r["max-fraction-digits"]&&(l=e.parse(r["max-fraction-digits"],1,L),!l)?null:new rr(n,o,s,a,l)},rr.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},rr.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},rr.prototype.outputDefined=function(){return!1},rr.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var or=function(t){this.type=L,this.input=t};or.parse=function(t,e){if(t.length!==2)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1);return n?n.type.kind!=="array"&&n.type.kind!=="string"&&n.type.kind!=="value"?e.error("Expected argument of type string or array, but found "+qt(n.type)+" instead."):new or(n):null},or.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(typeof e=="string")return e.length;if(Array.isArray(e))return e.length;throw new oe("Expected value to be of type string or array, but found "+qt(te(e))+" instead.")},or.prototype.eachChild=function(t){t(this.input)},or.prototype.outputDefined=function(){return!1},or.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Cu={"==":Gb,"!=":jb,">":Ub,"<":Bb,">=":qb,"<=":Vb,array:Me,at:tr,boolean:Me,case:nr,coalesce:Di,collator:gn,format:cn,image:fn,in:er,"index-of":xn,interpolate:Ee,"interpolate-hcl":Ee,"interpolate-lab":Ee,length:or,let:yn,literal:gi,match:ir,number:Me,"number-format":rr,object:Me,slice:bn,step:_n,string:Me,"to-boolean":Ze,"to-color":Ze,"to-number":Ze,"to-string":Ze,var:pn,within:ri};function zg(i,t){var e=t[0],n=t[1],r=t[2],o=t[3];e=e.evaluate(i),n=n.evaluate(i),r=r.evaluate(i);var s=o?o.evaluate(i):1,a=cg(e,n,r,s);if(a)throw new oe(a);return new Rt(e/255*s,n/255*s,r/255*s,s)}function Rg(i,t){return i in t}function Su(i,t){var e=t[i];return typeof e>"u"?null:e}function Xb(i,t,e,n){for(;e<=n;){var r=e+n>>1;if(t[r]===i)return!0;t[r]>i?n=r-1:e=r+1}return!1}function sr(i){return{type:i}}me.register(Cu,{error:[Jx,[mt],function(i,t){var e=t[0];throw new oe(e.evaluate(i))}],typeof:[mt,[ht],function(i,t){var e=t[0];return qt(te(e.evaluate(i)))}],"to-rgba":[Ke(L,4),[Pi],function(i,t){var e=t[0];return e.evaluate(i).toArray()}],rgb:[Pi,[L,L,L],zg],rgba:[Pi,[L,L,L,L],zg],has:{type:lt,overloads:[[[mt],function(i,t){var e=t[0];return Rg(e.evaluate(i),i.properties())}],[[mt,Ur],function(i,t){var e=t[0],n=t[1];return Rg(e.evaluate(i),n.evaluate(i))}]]},get:{type:ht,overloads:[[[mt],function(i,t){var e=t[0];return Su(e.evaluate(i),i.properties())}],[[mt,Ur],function(i,t){var e=t[0],n=t[1];return Su(e.evaluate(i),n.evaluate(i))}]]},"feature-state":[ht,[mt],function(i,t){var e=t[0];return Su(e.evaluate(i),i.featureState||{})}],properties:[Ur,[],function(i){return i.properties()}],"geometry-type":[mt,[],function(i){return i.geometryType()}],id:[ht,[],function(i){return i.id()}],zoom:[L,[],function(i){return i.globals.zoom}],pitch:[L,[],function(i){return i.globals.pitch||0}],"distance-from-center":[L,[],function(i){return i.distanceFromCenter()}],"heatmap-density":[L,[],function(i){return i.globals.heatmapDensity||0}],"line-progress":[L,[],function(i){return i.globals.lineProgress||0}],"sky-radial-progress":[L,[],function(i){return i.globals.skyRadialProgress||0}],accumulated:[ht,[],function(i){return i.globals.accumulated===void 0?null:i.globals.accumulated}],"+":[L,sr(L),function(i,t){for(var e=0,n=0,r=t;n<r.length;n+=1){var o=r[n];e+=o.evaluate(i)}return e}],"*":[L,sr(L),function(i,t){for(var e=1,n=0,r=t;n<r.length;n+=1){var o=r[n];e*=o.evaluate(i)}return e}],"-":{type:L,overloads:[[[L,L],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)-n.evaluate(i)}],[[L],function(i,t){var e=t[0];return-e.evaluate(i)}]]},"/":[L,[L,L],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)/n.evaluate(i)}],"%":[L,[L,L],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)%n.evaluate(i)}],ln2:[L,[],function(){return Math.LN2}],pi:[L,[],function(){return Math.PI}],e:[L,[],function(){return Math.E}],"^":[L,[L,L],function(i,t){var e=t[0],n=t[1];return Math.pow(e.evaluate(i),n.evaluate(i))}],sqrt:[L,[L],function(i,t){var e=t[0];return Math.sqrt(e.evaluate(i))}],log10:[L,[L],function(i,t){var e=t[0];return Math.log(e.evaluate(i))/Math.LN10}],ln:[L,[L],function(i,t){var e=t[0];return Math.log(e.evaluate(i))}],log2:[L,[L],function(i,t){var e=t[0];return Math.log(e.evaluate(i))/Math.LN2}],sin:[L,[L],function(i,t){var e=t[0];return Math.sin(e.evaluate(i))}],cos:[L,[L],function(i,t){var e=t[0];return Math.cos(e.evaluate(i))}],tan:[L,[L],function(i,t){var e=t[0];return Math.tan(e.evaluate(i))}],asin:[L,[L],function(i,t){var e=t[0];return Math.asin(e.evaluate(i))}],acos:[L,[L],function(i,t){var e=t[0];return Math.acos(e.evaluate(i))}],atan:[L,[L],function(i,t){var e=t[0];return Math.atan(e.evaluate(i))}],min:[L,sr(L),function(i,t){return Math.min.apply(Math,t.map(function(e){return e.evaluate(i)}))}],max:[L,sr(L),function(i,t){return Math.max.apply(Math,t.map(function(e){return e.evaluate(i)}))}],abs:[L,[L],function(i,t){var e=t[0];return Math.abs(e.evaluate(i))}],round:[L,[L],function(i,t){var e=t[0],n=e.evaluate(i);return n<0?-Math.round(-n):Math.round(n)}],floor:[L,[L],function(i,t){var e=t[0];return Math.floor(e.evaluate(i))}],ceil:[L,[L],function(i,t){var e=t[0];return Math.ceil(e.evaluate(i))}],"filter-==":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1];return i.properties()[e.value]===n.value}],"filter-id-==":[lt,[ht],function(i,t){var e=t[0];return i.id()===e.value}],"filter-type-==":[lt,[mt],function(i,t){var e=t[0];return i.geometryType()===e.value}],"filter-<":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],r=i.properties()[e.value],o=n.value;return typeof r==typeof o&&r<o}],"filter-id-<":[lt,[ht],function(i,t){var e=t[0],n=i.id(),r=e.value;return typeof n==typeof r&&n<r}],"filter->":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],r=i.properties()[e.value],o=n.value;return typeof r==typeof o&&r>o}],"filter-id->":[lt,[ht],function(i,t){var e=t[0],n=i.id(),r=e.value;return typeof n==typeof r&&n>r}],"filter-<=":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],r=i.properties()[e.value],o=n.value;return typeof r==typeof o&&r<=o}],"filter-id-<=":[lt,[ht],function(i,t){var e=t[0],n=i.id(),r=e.value;return typeof n==typeof r&&n<=r}],"filter->=":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],r=i.properties()[e.value],o=n.value;return typeof r==typeof o&&r>=o}],"filter-id->=":[lt,[ht],function(i,t){var e=t[0],n=i.id(),r=e.value;return typeof n==typeof r&&n>=r}],"filter-has":[lt,[ht],function(i,t){var e=t[0];return e.value in i.properties()}],"filter-has-id":[lt,[],function(i){return i.id()!==null&&i.id()!==void 0}],"filter-type-in":[lt,[Ke(mt)],function(i,t){var e=t[0];return e.value.indexOf(i.geometryType())>=0}],"filter-id-in":[lt,[Ke(ht)],function(i,t){var e=t[0];return e.value.indexOf(i.id())>=0}],"filter-in-small":[lt,[mt,Ke(ht)],function(i,t){var e=t[0],n=t[1];return n.value.indexOf(i.properties()[e.value])>=0}],"filter-in-large":[lt,[mt,Ke(ht)],function(i,t){var e=t[0],n=t[1];return Xb(i.properties()[e.value],n.value,0,n.value.length-1)}],all:{type:lt,overloads:[[[lt,lt],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)&&n.evaluate(i)}],[sr(lt),function(i,t){for(var e=0,n=t;e<n.length;e+=1){var r=n[e];if(!r.evaluate(i))return!1}return!0}]]},any:{type:lt,overloads:[[[lt,lt],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)||n.evaluate(i)}],[sr(lt),function(i,t){for(var e=0,n=t;e<n.length;e+=1){var r=n[e];if(r.evaluate(i))return!0}return!1}]]},"!":[lt,[lt],function(i,t){var e=t[0];return!e.evaluate(i)}],"is-supported-script":[lt,[mt],function(i,t){var e=t[0],n=i.globals&&i.globals.isSupportedScript;return n?n(e.evaluate(i)):!0}],upcase:[mt,[mt],function(i,t){var e=t[0];return e.evaluate(i).toUpperCase()}],downcase:[mt,[mt],function(i,t){var e=t[0];return e.evaluate(i).toLowerCase()}],concat:[mt,sr(ht),function(i,t){return t.map(function(e){return Jo(e.evaluate(i))}).join("")}],"resolved-locale":[mt,[Ia],function(i,t){var e=t[0];return e.evaluate(i).resolvedLocale()}]});function Tu(i){return{result:"success",value:i}}function $r(i){return{result:"error",value:i}}function $b(i){return i["property-type"]==="data-driven"||i["property-type"]==="cross-faded-data-driven"}function Wb(i){return!!i.expression&&i.expression.parameters.indexOf("zoom")>-1}function Yb(i){return!!i.expression&&i.expression.interpolated}function Ig(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}var zu=function(t,e){this.expression=t,this._warningHistory={},this._evaluator=new Ai,this._defaultValue=e?Jb(e):null,this._enumValues=e&&e.type==="enum"?e.values:null};zu.prototype.evaluateWithoutErrorHandling=function(t,e,n,r,o,s,a,l){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=n,this._evaluator.canonical=r||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=s,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null,this.expression.evaluate(this._evaluator)},zu.prototype.evaluate=function(t,e,n,r,o,s,a,l){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=n||null,this._evaluator.canonical=r||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=s||null,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null;try{var h=this.expression.evaluate(this._evaluator);if(h==null||typeof h=="number"&&h!==h)return this._defaultValue;if(this._enumValues&&!(h in this._enumValues))throw new oe("Expected value to be one of "+Object.keys(this._enumValues).map(function(u){return JSON.stringify(u)}).join(", ")+", but found "+JSON.stringify(h)+" instead.");return h}catch(u){return this._warningHistory[u.message]||(this._warningHistory[u.message]=!0,typeof console<"u"&&console.warn(u.message)),this._defaultValue}};function Kb(i){return Array.isArray(i)&&i.length>0&&typeof i[0]=="string"&&i[0]in Cu}function Ru(i,t){var e=new vn(Cu,[],t?Hb(t):void 0),n=e.parse(i,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return n?Tu(new zu(n,t)):$r(e.errors)}var Na=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent=t!=="constant"&&!_u(e.expression)};Na.prototype.evaluateWithoutErrorHandling=function(t,e,n,r,o,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,r,o,s)},Na.prototype.evaluate=function(t,e,n,r,o,s){return this._styleExpression.evaluate(t,e,n,r,o,s)};var Qo=function(t,e,n,r){this.kind=t,this.zoomStops=n,this._styleExpression=e,this.isStateDependent=t!=="camera"&&!_u(e.expression),this.interpolationType=r};Qo.prototype.evaluateWithoutErrorHandling=function(t,e,n,r,o,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,r,o,s)},Qo.prototype.evaluate=function(t,e,n,r,o,s){return this._styleExpression.evaluate(t,e,n,r,o,s)},Qo.prototype.interpolationFactor=function(t,e,n){return this.interpolationType?Ee.interpolationFactor(this.interpolationType,t,e,n):0};function Zb(i,t){if(i=Ru(i,t),i.result==="error")return i;var e=i.value.expression,n=La(e);if(!n&&!$b(t))return $r([new ci("","data expressions not supported")]);var r=yu(e,["zoom","pitch","distance-from-center"]);if(!r&&!Wb(t))return $r([new ci("","zoom expressions not supported")]);var o=Ga(e);if(!o&&!r)return $r([new ci("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof ci)return $r([o]);if(o instanceof Ee&&!Yb(t))return $r([new ci("",'"interpolate" expressions cannot be used with this property')]);if(!o)return Tu(n?new Na("constant",i.value):new Na("source",i.value));var s=o instanceof Ee?o.interpolation:void 0;return Tu(n?new Qo("camera",i.value,o.labels,s):new Qo("composite",i.value,o.labels,s))}function Ga(i){var t=null;if(i instanceof yn)t=Ga(i.result);else if(i instanceof Di)for(var e=0,n=i.args;e<n.length;e+=1){var r=n[e];if(t=Ga(r),t)break}else(i instanceof _n||i instanceof Ee)&&i.input instanceof me&&i.input.name==="zoom"&&(t=i);return t instanceof ci||i.eachChild(function(o){var s=Ga(o);s instanceof ci?t=s:!t&&s?t=new ci("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&s&&t!==s&&(t=new ci("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function Hb(i){var t={color:Pi,string:mt,number:L,enum:mt,boolean:lt,formatted:Pa,resolvedImage:Yo};return i.type==="array"?Ke(t[i.value]||ht,i.length):t[i.type]}function Jb(i){return i.type==="color"&&(Ig(i.default)||Array.isArray(i.default))?new Rt(0,0,0,0):i.type==="color"?Rt.parse(i.default)||null:i.default===void 0?null:i.default}function Qb(i){return i instanceof Number||i instanceof String||i instanceof Boolean?i.valueOf():i}function Iu(i){if(Array.isArray(i))return i.map(Iu);if(i instanceof Object&&!(i instanceof Number||i instanceof String||i instanceof Boolean)){var t={};for(var e in i)t[e]=Iu(i[e]);return t}return Qb(i)}var Pg={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},terrain:{type:"terrain"},fog:{type:"fog"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},projection:{type:"projection"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{},sky:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_symbol:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature","pitch","distance-from-center"]}},filter_fill:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_line:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_circle:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},"filter_fill-extrusion":{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_heatmap:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Camera"},pitch:{group:"Camera"},"distance-from-center":{group:"Camera"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},"sky-radial-progress":{group:"sky"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"high-color":{type:"color","property-type":"data-constant",default:"#245cdf",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"space-color":{type:"color","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,.2,7,.1],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"star-intensity":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],5,.35,6,0],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},projection:{name:{type:"enum",values:{albers:{},equalEarth:{},equirectangular:{},lambertConformalConic:{},mercator:{},naturalEarth:{},winkelTripel:{},globe:{}},default:"mercator",required:!0},center:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-180,-90],maximum:[180,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-90,-90],maximum:[90,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["source"]}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{type:"array",value:"number",length:2,default:[0,0],minimum:[0,0],maximum:[1,1],transition:!1,requires:[{source:"geojson",has:{lineMetrics:!0}}],"property-type":"constant"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{},atmosphere:{}},default:"atmosphere",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],transition:!1,requires:[{"sky-type":"gradient"}],expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};function Ag(i){if(i===!0||i===!1)return!0;if(!Array.isArray(i)||i.length===0)return!1;switch(i[0]){case"has":return i.length>=2&&i[1]!=="$id"&&i[1]!=="$type";case"in":return i.length>=3&&(typeof i[1]!="string"||Array.isArray(i[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return i.length!==3||Array.isArray(i[1])||Array.isArray(i[2]);case"any":case"all":for(var t=0,e=i.slice(1);t<e.length;t+=1){var n=e[t];if(!Ag(n)&&typeof n!="boolean")return!1}return!0;default:return!0}}function tk(i,t){if(t===void 0&&(t="fill"),i==null)return{filter:function(){return!0},needGeometry:!1,needFeature:!1};Ag(i)||(i=ja(i));var e=i,n=!0;try{n=ek(e)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
40
+ `+g;Ci.get(m)===void 0&&(Ci.set(m,100,!0),a(u.style,u.weight,g)||(Ci.set(m,0,!0),o===void 0&&(o=setInterval(l,32))))}}}(),rv=function(){let i;return function(t){let e=Zl[t];if(e==null){if(bl){const n=Wd(t),r=Ec(t,"\u017Dg");e=(isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight))*(r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)}else i||(i=document.createElement("div"),i.innerHTML="M",i.style.minHeight="0",i.style.maxHeight="none",i.style.height="auto",i.style.padding="0",i.style.border="none",i.style.position="absolute",i.style.display="block",i.style.left="-99999px"),i.style.font=t,document.body.appendChild(i),e=i.offsetHeight,document.body.removeChild(i);Zl[t]=e}return e}}();function Ec(i,t){return Tr||(Tr=Pe(1,1)),i!=Kl&&(Tr.font=i,Kl=Tr.font),Tr.measureText(t)}function Hs(i,t){return Ec(i,t).width}function Mc(i,t,e){if(t in e)return e[t];const n=t.split(`
41
+ `).reduce((r,o)=>Math.max(r,Hs(i,o)),0);return e[t]=n,n}function ov(i,t){const e=[],n=[],r=[];let o=0,s=0,a=0,l=0;for(let h=0,u=t.length;h<=u;h+=2){const d=t[h];if(d===`
42
+ `||h===u){o=Math.max(o,s),r.push(s),s=0,a+=l;continue}const c=t[h+1]||i.font,f=Hs(c,d);e.push(f),s+=f;const g=rv(c);n.push(g),l=Math.max(l,g)}return{width:o,height:a,widths:e,heights:n,lineWidths:r}}function sv(i,t,e,n,r,o,s,a,l,h,u){i.save(),e!==1&&(i.globalAlpha*=e),t&&i.setTransform.apply(i,t),n.contextInstructions?(i.translate(l,h),i.scale(u[0],u[1]),av(n,i)):u[0]<0||u[1]<0?(i.translate(l,h),i.scale(u[0],u[1]),i.drawImage(n,r,o,s,a,0,0,s,a)):i.drawImage(n,r,o,s,a,l,h,s*u[0],a*u[1]),i.restore()}function av(i,t){const e=i.contextInstructions;for(let n=0,r=e.length;n<r;n+=2)Array.isArray(e[n+1])?t[e[n]].apply(t,e[n+1]):t[e[n]]=e[n+1]}class lv extends ev{constructor(t){super(t),this.fontChangeListenerKey_=gt(Ci,_r.PROPERTYCHANGE,t.redrawText.bind(t)),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=po+" ol-layers";const n=t.getViewport();n.insertBefore(this.element_,n.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(t,e){const n=this.getMap();if(n.hasListener(t)){const r=new kc(t,void 0,e);n.dispatchEvent(r)}}disposeInternal(){Ot(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(t),this.dispatchRenderEvent(Wi.PRECOMPOSE,t);const e=t.layerStatesArray.sort(function(s,a){return s.zIndex-a.zIndex}),n=t.viewState;this.children_.length=0;const r=[];let o=null;for(let s=0,a=e.length;s<a;++s){const l=e[s];t.layerIndex=s;const h=l.layer,u=h.getSourceState();if(!Ml(l,n)||u!="ready"&&u!="undefined"){h.unrender();continue}const d=h.render(t,o);!d||(d!==o&&(this.children_.push(d),o=d),"getDeclutter"in h&&r.push(h))}for(let s=r.length-1;s>=0;--s)r[s].renderDeclutter(t);o0(this.element_,this.children_),this.dispatchRenderEvent(Wi.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}}const hv=lv;class Hi extends Qe{constructor(t,e){super(t),this.layer=e}}const Hl={LAYERS:"layers"};class Jl extends Zd{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let n=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Hl.LAYERS,this.handleLayersChanged_),n?Array.isArray(n)?n=new We(n.slice(),{unique:!0}):ft(typeof n.getArray=="function",43):n=new We(void 0,{unique:!0}),this.setLayers(n)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(Ot),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(gt(t,re.ADD,this.handleLayersAdd_,this),gt(t,re.REMOVE,this.handleLayersRemove_,this));for(const n in this.listenerKeys_)this.listenerKeys_[n].forEach(Ot);go(this.listenerKeys_);const e=t.getArray();for(let n=0,r=e.length;n<r;n++){const o=e[n];this.registerLayerListeners_(o),this.dispatchEvent(new Hi("addlayer",o))}this.changed()}registerLayerListeners_(t){const e=[gt(t,_r.PROPERTYCHANGE,this.handleLayerChange_,this),gt(t,tt.CHANGE,this.handleLayerChange_,this)];t instanceof Jl&&e.push(gt(t,"addlayer",this.handleLayerGroupAdd_,this),gt(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[K(t)]=e}handleLayerGroupAdd_(t){this.dispatchEvent(new Hi("addlayer",t.layer))}handleLayerGroupRemove_(t){this.dispatchEvent(new Hi("removelayer",t.layer))}handleLayersAdd_(t){const e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new Hi("addlayer",e)),this.changed()}handleLayersRemove_(t){const e=t.element,n=K(e);this.listenerKeys_[n].forEach(Ot),delete this.listenerKeys_[n],this.dispatchEvent(new Hi("removelayer",e)),this.changed()}getLayers(){return this.get(Hl.LAYERS)}setLayers(t){const e=this.getLayers();if(e){const n=e.getArray();for(let r=0,o=n.length;r<o;++r)this.dispatchEvent(new Hi("removelayer",n[r]))}this.set(Hl.LAYERS,t)}getLayersArray(t){return t=t!==void 0?t:[],this.getLayers().forEach(function(e){e.getLayersArray(t)}),t}getLayerStatesArray(t){const e=t!==void 0?t:[],n=e.length;this.getLayers().forEach(function(s){s.getLayerStatesArray(e)});const r=this.getLayerState();let o=r.zIndex;!t&&r.zIndex===void 0&&(o=0);for(let s=n,a=e.length;s<a;s++){const l=e[s];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=Un(l.extent,r.extent):l.extent=r.extent),l.zIndex===void 0&&(l.zIndex=o)}return e}getSourceState(){return"ready"}}const Js=Jl;class uv extends Qe{constructor(t,e,n){super(t),this.map=e,this.frameState=n!==void 0?n:null}}const zr=uv;class dv extends zr{constructor(t,e,n,r,o,s){super(t,e,o),this.originalEvent=n,this.pixel_=null,this.coordinate_=null,this.dragging=r!==void 0?r:!1,this.activePointers=s}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}const Si=dv,Et={SINGLECLICK:"singleclick",CLICK:tt.CLICK,DBLCLICK:tt.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};class cv extends Is{constructor(t,e){super(t),this.map_=t,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=e===void 0?1:e,this.down_=null;const n=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=n,this.pointerdownListenerKey_=gt(n,Cl.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=gt(n,Cl.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(tt.TOUCHMOVE,this.boundHandleTouchMove_,Vd?{passive:!1}:!1)}emulateClick_(t){let e=new Si(Et.CLICK,this.map_,t);this.dispatchEvent(e),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new Si(Et.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;const n=new Si(Et.SINGLECLICK,this.map_,t);this.dispatchEvent(n)}.bind(this),250)}updateActivePointers_(t){const e=t,n=e.pointerId;if(e.type==Et.POINTERUP||e.type==Et.POINTERCANCEL){delete this.trackedTouches_[n];for(const r in this.trackedTouches_)if(this.trackedTouches_[r].target!==e.target){delete this.trackedTouches_[r];break}}else(e.type==Et.POINTERDOWN||e.type==Et.POINTERMOVE)&&(this.trackedTouches_[n]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new Si(Et.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(Ot),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return t.button===0}handlePointerDown_(t){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(t);const e=new Si(Et.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.down_={};for(const n in t){const r=t[n];this.down_[n]=typeof r=="function"?Ln:r}if(this.dragListenerKeys_.length===0){const n=this.map_.getOwnerDocument();this.dragListenerKeys_.push(gt(n,Et.POINTERMOVE,this.handlePointerMove_,this),gt(n,Et.POINTERUP,this.handlePointerUp_,this),gt(this.element_,Et.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==n&&this.dragListenerKeys_.push(gt(this.element_.getRootNode(),Et.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new Si(Et.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!!(this.down_&&this.isMoving_(t));this.dispatchEvent(new Si(Et.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;(!e||e.defaultPrevented)&&(typeof t.cancelable!="boolean"||t.cancelable===!0)&&t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(Ot(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(tt.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Ot(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Ot),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const fv=cv,Qs=1/0;class gv{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,go(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,n=t[0];t.length==1?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const r=this.keyFunction_(n);return delete this.queuedElements_[r],n}enqueue(t){ft(!(this.keyFunction_(t)in this.queuedElements_),31);const e=this.priorityFunction_(t);return e!=Qs?(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(t){return t*2+1}getRightChildIndex_(t){return t*2+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return this.elements_.length===0}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,n=this.priorities_,r=e.length,o=e[t],s=n[t],a=t;for(;t<r>>1;){const l=this.getLeftChildIndex_(t),h=this.getRightChildIndex_(t),u=h<r&&n[h]<n[l]?h:l;e[t]=e[u],n[t]=n[u],t=u}e[t]=o,n[t]=s,this.siftDown_(a,t)}siftDown_(t,e){const n=this.elements_,r=this.priorities_,o=n[e],s=r[e];for(;e>t;){const a=this.getParentIndex_(e);if(r[a]>s)n[e]=n[a],r[e]=r[a],e=a;else break}n[e]=o,r[e]=s}reprioritize(){const t=this.priorityFunction_,e=this.elements_,n=this.priorities_;let r=0;const o=e.length;let s,a,l;for(a=0;a<o;++a)s=e[a],l=t(s),l==Qs?delete this.queuedElements_[this.keyFunction_(s)]:(n[r]=l,e[r++]=s);e.length=r,n.length=r,this.heapify_()}}const mv=gv,N={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class pv extends mv{constructor(t,e){super(function(n){return t.apply(null,n)},function(n){return n[0].getKey()}),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=e,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(t){const e=super.enqueue(t);return e&&t[0].addEventListener(tt.CHANGE,this.boundHandleTileChange_),e}getTilesLoading(){return this.tilesLoading_}handleTileChange(t){const e=t.target,n=e.getState();if(n===N.LOADED||n===N.ERROR||n===N.EMPTY){n!==N.ERROR&&e.removeEventListener(tt.CHANGE,this.boundHandleTileChange_);const r=e.getKey();r in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[r],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let n=0,r,o,s;for(;this.tilesLoading_<t&&n<e&&this.getCount()>0;)o=this.dequeue()[0],s=o.getKey(),r=o.getState(),r===N.IDLE&&!(s in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++n,o.load())}}const vv=pv;function _v(i,t,e,n,r){if(!i||!(e in i.wantedTiles)||!i.wantedTiles[e][t.getKey()])return Qs;const o=i.viewState.center,s=n[0]-o[0],a=n[1]-o[1];return 65536*Math.log(r)+Math.sqrt(s*s+a*a)/r}const Yt={ANIMATING:0,INTERACTING:1},ii={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Cc=42,Ql=256;function Sc(i,t,e){return function(n,r,o,s,a){if(!n)return;if(!r&&!t)return n;const l=t?0:o[0]*r,h=t?0:o[1]*r,u=a?a[0]:0,d=a?a[1]:0;let c=i[0]+l/2+u,f=i[2]-l/2+u,g=i[1]+h/2+d,m=i[3]-h/2+d;c>f&&(c=(f+c)/2,f=c),g>m&&(g=(m+g)/2,m=g);let p=Wt(n[0],c,f),_=Wt(n[1],g,m);if(s&&e&&r){const v=30*r;p+=-v*Math.log(1+Math.max(0,c-n[0])/v)+v*Math.log(1+Math.max(0,n[0]-f)/v),_+=-v*Math.log(1+Math.max(0,g-n[1])/v)+v*Math.log(1+Math.max(0,n[1]-m)/v)}return[p,_]}}function yv(i){return i}function th(i,t,e,n){const r=Nt(t)/e[0],o=$e(t)/e[1];return n?Math.min(i,Math.max(r,o)):Math.min(i,Math.min(r,o))}function eh(i,t,e){let n=Math.min(i,t);const r=50;return n*=Math.log(1+r*Math.max(0,i/t-1))/r+1,e&&(n=Math.max(n,e),n/=Math.log(1+r*Math.max(0,e/i-1))/r+1),Wt(n,e/2,t*2)}function xv(i,t,e,n){return t=t!==void 0?t:!0,function(r,o,s,a){if(r!==void 0){const l=i[0],h=i[i.length-1],u=e?th(l,e,s,n):l;if(a)return t?eh(r,u,h):Wt(r,h,u);const d=Math.min(u,r),c=Math.floor(xl(i,d,o));return i[c]>u&&c<i.length-1?i[c+1]:i[c]}else return}}function bv(i,t,e,n,r,o){return n=n!==void 0?n:!0,e=e!==void 0?e:0,function(s,a,l,h){if(s!==void 0){const u=r?th(t,r,l,o):t;if(h)return n?eh(s,u,e):Wt(s,e,u);const d=1e-9,c=Math.ceil(Math.log(t/u)/Math.log(i)-d),f=-a*(.5-d)+.5,g=Math.min(u,s),m=Math.floor(Math.log(t/g)/Math.log(i)+f),p=Math.max(c,m),_=t/Math.pow(i,p);return Wt(_,e,u)}else return}}function Tc(i,t,e,n,r){return e=e!==void 0?e:!0,function(o,s,a,l){if(o!==void 0){const h=n?th(i,n,a,r):i;return!e||!l?Wt(o,t,h):eh(o,h,t)}else return}}function ih(i){if(i!==void 0)return 0}function zc(i){if(i!==void 0)return i}function kv(i){const t=2*Math.PI/i;return function(e,n){if(n)return e;if(e!==void 0)return e=Math.floor(e/t+.5)*t,e}}function wv(i){return i=i||Nn(5),function(t,e){if(e)return t;if(t!==void 0)return Math.abs(t)<=i?0:t}}function Ic(i){return Math.pow(i,3)}function Ir(i){return 1-Ic(1-i)}function Ev(i){return 3*i*i-2*i*i*i}function Mv(i){return i}function Ji(i,t,e,n,r,o){o=o||[];let s=0;for(let a=t;a<e;a+=n){const l=i[a],h=i[a+1];o[s++]=r[0]*l+r[2]*h+r[4],o[s++]=r[1]*l+r[3]*h+r[5]}return o&&o.length!=s&&(o.length=s),o}function nh(i,t,e,n,r,o,s){s=s||[];const a=Math.cos(r),l=Math.sin(r),h=o[0],u=o[1];let d=0;for(let c=t;c<e;c+=n){const f=i[c]-h,g=i[c+1]-u;s[d++]=h+f*a-g*l,s[d++]=u+f*l+g*a;for(let m=c+2;m<c+n;++m)s[d++]=i[m]}return s&&s.length!=d&&(s.length=d),s}function Cv(i,t,e,n,r,o,s,a){a=a||[];const l=s[0],h=s[1];let u=0;for(let d=t;d<e;d+=n){const c=i[d]-l,f=i[d+1]-h;a[u++]=l+r*c,a[u++]=h+o*f;for(let g=d+2;g<d+n;++g)a[u++]=i[g]}return a&&a.length!=u&&(a.length=u),a}function Rc(i,t,e,n,r,o,s){s=s||[];let a=0;for(let l=t;l<e;l+=n){s[a++]=i[l]+r,s[a++]=i[l+1]+o;for(let h=l+2;h<l+n;++h)s[a++]=i[h]}return s&&s.length!=a&&(s.length=a),s}const Pc=Ye();class Sv extends hi{constructor(){super(),this.extent_=Ge(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=Yp(function(t,e,n){if(!n)return this.getSimplifiedGeometry(e);const r=this.clone();return r.applyTransform(n),r.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return et()}closestPointXY(t,e,n,r){return et()}containsXY(t,e){const n=this.getClosestPoint([t,e]);return n[0]===t&&n[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return et()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&_o(e),this.extentRevision_=this.getRevision()}return S0(this.extent_,t)}rotate(t,e){et()}scale(t,e,n){et()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return et()}getType(){return et()}applyTransform(t){et()}intersectsExtent(t){return et()}translate(t,e){et()}transform(t,e){const n=Gt(t),r=n.getUnits()=="tile-pixels"?function(o,s,a){const l=n.getExtent(),h=n.getWorldExtent(),u=$e(h)/$e(l);return Ei(Pc,h[0],h[3],u,-u,0,0,0),Ji(o,0,o.length,a,Pc,s),bo(n,e)(o,s,a)}:bo(n,e);return this.applyTransform(r),this}}const Ac=Sv;class Tv extends Ac{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(t){return Il(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return et()}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(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=ta(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){et()}setLayout(t,e,n){let r;if(t)r=ta(t);else{for(let o=0;o<n;++o)if(e.length===0){this.layout="XY",this.stride=2;return}else e=e[0];r=e.length,t=zv(r)}this.layout=t,this.stride=r}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const n=this.getFlatCoordinates();if(n){const r=this.getStride();nh(n,0,n.length,r,t,e,n),this.changed()}}scale(t,e,n){e===void 0&&(e=t),n||(n=Yi(this.getExtent()));const r=this.getFlatCoordinates();if(r){const o=this.getStride();Cv(r,0,r.length,o,t,e,n,r),this.changed()}}translate(t,e){const n=this.getFlatCoordinates();if(n){const r=this.getStride();Rc(n,0,n.length,r,t,e,n),this.changed()}}}function zv(i){let t;return i==2?t="XY":i==3?t="XYZ":i==4&&(t="XYZM"),t}function ta(i){let t;return i=="XY"?t=2:i=="XYZ"||i=="XYM"?t=3:i=="XYZM"&&(t=4),t}function Iv(i,t,e){const n=i.getFlatCoordinates();if(n){const r=i.getStride();return Ji(n,0,n.length,r,t,e)}else return null}const Qi=Tv;function Dc(i,t,e,n,r,o,s){const a=i[t],l=i[t+1],h=i[e]-a,u=i[e+1]-l;let d;if(h===0&&u===0)d=t;else{const c=((r-a)*h+(o-l)*u)/(h*h+u*u);if(c>1)d=e;else if(c>0){for(let f=0;f<n;++f)s[f]=ki(i[t+f],i[e+f],c);s.length=n;return}else d=t}for(let c=0;c<n;++c)s[c]=i[d+c];s.length=n}function rh(i,t,e,n,r){let o=i[t],s=i[t+1];for(t+=n;t<e;t+=n){const a=i[t],l=i[t+1],h=On(o,s,a,l);h>r&&(r=h),o=a,s=l}return r}function oh(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o){const a=e[o];r=rh(i,t,a,n,r),t=a}return r}function Rv(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o){const a=e[o];r=oh(i,t,a,n,r),t=a[a.length-1]}return r}function sh(i,t,e,n,r,o,s,a,l,h,u){if(t==e)return h;let d,c;if(r===0)if(c=On(s,a,i[t],i[t+1]),c<h){for(d=0;d<n;++d)l[d]=i[t+d];return l.length=n,c}else return h;u=u||[NaN,NaN];let f=t+n;for(;f<e;)if(Dc(i,f-n,f,n,s,a,u),c=On(s,a,u[0],u[1]),c<h){for(h=c,d=0;d<n;++d)l[d]=u[d];l.length=n,f+=n}else f+=n*Math.max((Math.sqrt(c)-Math.sqrt(h))/r|0,1);if(o&&(Dc(i,e-n,t,n,s,a,u),c=On(s,a,u[0],u[1]),c<h)){for(h=c,d=0;d<n;++d)l[d]=u[d];l.length=n}return h}function ah(i,t,e,n,r,o,s,a,l,h,u){u=u||[NaN,NaN];for(let d=0,c=e.length;d<c;++d){const f=e[d];h=sh(i,t,f,n,r,o,s,a,l,h,u),t=f}return h}function Pv(i,t,e,n,r,o,s,a,l,h,u){u=u||[NaN,NaN];for(let d=0,c=e.length;d<c;++d){const f=e[d];h=ah(i,t,f,n,r,o,s,a,l,h,u),t=f[f.length-1]}return h}function Lc(i,t,e,n){for(let r=0,o=e.length;r<o;++r)i[t++]=e[r];return t}function ea(i,t,e,n){for(let r=0,o=e.length;r<o;++r){const s=e[r];for(let a=0;a<n;++a)i[t++]=s[a]}return t}function lh(i,t,e,n,r){r=r||[];let o=0;for(let s=0,a=e.length;s<a;++s){const l=ea(i,t,e[s],n);r[o++]=l,t=l}return r.length=o,r}function Av(i,t,e,n,r){r=r||[];let o=0;for(let s=0,a=e.length;s<a;++s){const l=lh(i,t,e[s],n,r[o]);l.length===0&&(l[0]=t),r[o++]=l,t=l[l.length-1]}return r.length=o,r}function hh(i,t,e,n,r,o,s){const a=(e-t)/n;if(a<3){for(;t<e;t+=n)o[s++]=i[t],o[s++]=i[t+1];return s}const l=new Array(a);l[0]=1,l[a-1]=1;const h=[t,e-n];let u=0;for(;h.length>0;){const d=h.pop(),c=h.pop();let f=0;const g=i[c],m=i[c+1],p=i[d],_=i[d+1];for(let v=c+n;v<d;v+=n){const y=i[v],x=i[v+1],k=h0(y,x,g,m,p,_);k>f&&(u=v,f=k)}f>r&&(l[(u-t)/n]=1,c+n<u&&h.push(c,u),u+n<d&&h.push(u,d))}for(let d=0;d<a;++d)l[d]&&(o[s++]=i[t+d*n],o[s++]=i[t+d*n+1]);return s}function Dv(i,t,e,n,r,o,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l];s=hh(i,t,u,n,r,o,s),a.push(s),t=u}return s}function Xn(i,t){return t*Math.round(i/t)}function Lv(i,t,e,n,r,o,s){if(t==e)return s;let a=Xn(i[t],r),l=Xn(i[t+1],r);t+=n,o[s++]=a,o[s++]=l;let h,u;do if(h=Xn(i[t],r),u=Xn(i[t+1],r),t+=n,t==e)return o[s++]=h,o[s++]=u,s;while(h==a&&u==l);for(;t<e;){const d=Xn(i[t],r),c=Xn(i[t+1],r);if(t+=n,d==h&&c==u)continue;const f=h-a,g=u-l,m=d-a,p=c-l;if(f*p==g*m&&(f<0&&m<f||f==m||f>0&&m>f)&&(g<0&&p<g||g==p||g>0&&p>g)){h=d,u=c;continue}o[s++]=h,o[s++]=u,a=h,l=u,h=d,u=c}return o[s++]=h,o[s++]=u,s}function Fc(i,t,e,n,r,o,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l];s=Lv(i,t,u,n,r,o,s),a.push(s),t=u}return s}function Fv(i,t,e,n,r,o,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l],d=[];s=Fc(i,t,u,n,r,o,s,d),a.push(d),t=u[u.length-1]}return s}function tn(i,t,e,n,r){r=r!==void 0?r:[];let o=0;for(let s=t;s<e;s+=n)r[o++]=i.slice(s,s+n);return r.length=o,r}function zo(i,t,e,n,r){r=r!==void 0?r:[];let o=0;for(let s=0,a=e.length;s<a;++s){const l=e[s];r[o++]=tn(i,t,l,n,r[o]),t=l}return r.length=o,r}function uh(i,t,e,n,r){r=r!==void 0?r:[];let o=0;for(let s=0,a=e.length;s<a;++s){const l=e[s];r[o++]=l.length===1&&l[0]===t?[]:zo(i,t,l,n,r[o]),t=l[l.length-1]}return r.length=o,r}function Oc(i,t,e,n){let r=0,o=i[e-n],s=i[e-n+1];for(;t<e;t+=n){const a=i[t],l=i[t+1];r+=s*a-o*l,o=a,s=l}return r/2}function Nc(i,t,e,n){let r=0;for(let o=0,s=e.length;o<s;++o){const a=e[o];r+=Oc(i,t,a,n),t=a}return r}function Ov(i,t,e,n){let r=0;for(let o=0,s=e.length;o<s;++o){const a=e[o];r+=Nc(i,t,a,n),t=a[a.length-1]}return r}class ia extends Qi{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}clone(){return new ia(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),sh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,n,r))}getArea(){return Oc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=hh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new ia(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ea(this.flatCoordinates,0,t,this.stride),this.changed()}}const Gc=ia;class dh extends Qi{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new dh(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){const o=this.flatCoordinates,s=On(t,e,o[0],o[1]);if(s<r){const a=this.stride;for(let l=0;l<a;++l)n[l]=o[l];return n.length=a,s}else return r}getCoordinates(){return this.flatCoordinates?this.flatCoordinates.slice():[]}computeExtent(t){return yo(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return Tl(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Lc(this.flatCoordinates,0,t,this.stride),this.changed()}}const ni=dh;function Nv(i,t,e,n,r){return!Rl(r,function(s){return!$n(i,t,e,n,s[0],s[1])})}function $n(i,t,e,n,r,o){let s=0,a=i[e-n],l=i[e-n+1];for(;t<e;t+=n){const h=i[t],u=i[t+1];l<=o?u>o&&(h-a)*(o-l)-(r-a)*(u-l)>0&&s++:u<=o&&(h-a)*(o-l)-(r-a)*(u-l)<0&&s--,a=h,l=u}return s!==0}function ch(i,t,e,n,r,o){if(e.length===0||!$n(i,t,e[0],n,r,o))return!1;for(let s=1,a=e.length;s<a;++s)if($n(i,e[s-1],e[s],n,r,o))return!1;return!0}function Gv(i,t,e,n,r,o){if(e.length===0)return!1;for(let s=0,a=e.length;s<a;++s){const l=e[s];if(ch(i,t,l,n,r,o))return!0;t=l[l.length-1]}return!1}function fh(i,t,e,n,r,o,s){let a,l,h,u,d,c,f;const g=r[o+1],m=[];for(let v=0,y=e.length;v<y;++v){const x=e[v];for(u=i[x-n],c=i[x-n+1],a=t;a<x;a+=n)d=i[a],f=i[a+1],(g<=c&&f<=g||c<=g&&g<=f)&&(h=(g-c)/(f-c)*(d-u)+u,m.push(h)),u=d,c=f}let p=NaN,_=-1/0;for(m.sort(An),u=m[0],a=1,l=m.length;a<l;++a){d=m[a];const v=Math.abs(d-u);v>_&&(h=(u+d)/2,ch(i,t,e,n,h,g)&&(p=h,_=v)),u=d}return isNaN(p)&&(p=r[o]),s?(s.push(p,g,_),s):[p,g,_]}function jc(i,t,e,n,r){let o=[];for(let s=0,a=e.length;s<a;++s){const l=e[s];o=fh(i,t,l,n,r,2*s,o),t=l[l.length-1]}return o}function Bc(i,t,e,n,r){let o;for(t+=n;t<e;t+=n)if(o=r(i.slice(t-n,t),i.slice(t,t+n)),o)return o;return!1}function na(i,t,e,n,r){const o=nc(Ge(),i,t,e,n);return Kt(r,o)?Bn(r,o)||o[0]>=r[0]&&o[2]<=r[2]||o[1]>=r[1]&&o[3]<=r[3]?!0:Bc(i,t,e,n,function(s,a){return T0(r,s,a)}):!1}function jv(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o){if(na(i,t,e[o],n,r))return!0;t=e[o]}return!1}function Uc(i,t,e,n,r){return!!(na(i,t,e,n,r)||$n(i,t,e,n,r[0],r[1])||$n(i,t,e,n,r[0],r[3])||$n(i,t,e,n,r[2],r[1])||$n(i,t,e,n,r[2],r[3]))}function Vc(i,t,e,n,r){if(!Uc(i,t,e[0],n,r))return!1;if(e.length===1)return!0;for(let o=1,s=e.length;o<s;++o)if(Nv(i,e[o-1],e[o],n,r)&&!na(i,e[o-1],e[o],n,r))return!1;return!0}function Bv(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o){const a=e[o];if(Vc(i,t,a,n,r))return!0;t=a[a.length-1]}return!1}function Uv(i,t,e,n){for(;t<e-n;){for(let r=0;r<n;++r){const o=i[t+r];i[t+r]=i[e-n+r],i[e-n+r]=o}t+=n,e-=n}}function gh(i,t,e,n){let r=0,o=i[e-n],s=i[e-n+1];for(;t<e;t+=n){const a=i[t],l=i[t+1];r+=(a-o)*(l+s),o=a,s=l}return r===0?void 0:r>0}function qc(i,t,e,n,r){r=r!==void 0?r:!1;for(let o=0,s=e.length;o<s;++o){const a=e[o],l=gh(i,t,a,n);if(o===0){if(r&&l||!r&&!l)return!1}else if(r&&!l||!r&&l)return!1;t=a}return!0}function Vv(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o){const a=e[o];if(!qc(i,t,a,n,r))return!1;a.length&&(t=a[a.length-1])}return!0}function mh(i,t,e,n,r){r=r!==void 0?r:!1;for(let o=0,s=e.length;o<s;++o){const a=e[o],l=gh(i,t,a,n);(o===0?r&&l||!r&&!l:r&&!l||!r&&l)&&Uv(i,t,a,n),t=a}return t}function Xc(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o)t=mh(i,t,e[o],n,r);return t}function qv(i,t){const e=[];let n=0,r=0;for(let o=0,s=t.length;o<s;++o){const a=t[o];if(!gh(i,n,a,2))e.push(t.slice(r,o+1));else{if(e.length===0)continue;e[e.length-1].push(t[r])}r=o+1,n=a}return e}class Rr extends Qi{constructor(t,e,n){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,e!==void 0&&n?(this.setFlatCoordinates(e,t),this.ends_=n):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?li(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new Rr(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(oh(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ah(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,n,r))}containsXY(t,e){return ch(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return Nc(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),mh(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,zo(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=Yi(this.getExtent());this.flatInteriorPoint_=fh(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new ni(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new Gc(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,n=this.ends_,r=[];let o=0;for(let s=0,a=n.length;s<a;++s){const l=n[s],h=new Gc(e.slice(o,l),t);r.push(h),o=l}return r}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;qc(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=mh(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Fc(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,n),new Rr(e,"XY",n)}getType(){return"Polygon"}intersectsExtent(t){return Vc(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=lh(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}const Wn=Rr;function $c(i){const t=i[0],e=i[1],n=i[2],r=i[3],o=[t,e,t,r,n,r,n,e,t,e];return new Rr(o,"XY",[o.length])}function Xv(i,t,e){t=t||32;const n=i.getStride(),r=i.getLayout(),o=i.getCenter(),s=n*(t+1),a=new Array(s);for(let u=0;u<s;u+=n){a[u]=0,a[u+1]=0;for(let d=2;d<n;d++)a[u+d]=o[d]}const l=[a.length],h=new Rr(a,r,l);return $v(h,o,i.getRadius(),e),h}function $v(i,t,e,n){const r=i.getFlatCoordinates(),o=i.getStride(),s=r.length/o-1,a=n||0;for(let l=0;l<=s;++l){const h=l*o,u=a+$i(l,s)*2*Math.PI/s;r[h]=t[0]+e*Math.cos(u),r[h+1]=t[1]+e*Math.sin(u)}i.changed()}const ph=0;class Wv extends hi{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=Ul(t.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,t.projection&&L0(),t.center&&(t.center=Vt(t.center,this.projection_)),t.extent&&(t.extent=Zi(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const a in ii)delete e[a];this.setProperties(e,!0);const n=Kv(t);this.maxResolution_=n.maxResolution,this.minResolution_=n.minResolution,this.zoomFactor_=n.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=n.minZoom;const r=Yv(t),o=n.constraint,s=Zv(t);this.constraints_={center:r,resolution:o,rotation:s},this.setRotation(t.rotation!==void 0?t.rotation:0),this.setCenterInternal(t.center!==void 0?t.center:null),t.resolution!==void 0?this.setResolution(t.resolution):t.zoom!==void 0&&this.setZoom(t.zoom)}get padding(){return this.padding_}set padding(t){let e=this.padding_;this.padding_=t;const n=this.getCenter();if(n){const r=t||[0,0,0,0];e=e||[0,0,0,0];const o=this.getResolution(),s=o/2*(r[3]-e[3]+e[1]-r[1]),a=o/2*(r[0]-e[0]+e[2]-r[2]);this.setCenterInternal([n[0]+s,n[1]-a])}}getUpdatedOptions_(t){const e=this.getProperties();return e.resolution!==void 0?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Object.assign({},e,t)}animate(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const e=new Array(arguments.length);for(let n=0;n<e.length;++n){let r=arguments[n];r.center&&(r=Object.assign({},r),r.center=Vt(r.center,this.getProjection())),r.anchor&&(r=Object.assign({},r),r.anchor=Vt(r.anchor,this.getProjection())),e[n]=r}this.animateInternal.apply(this,e)}animateInternal(t){let e=arguments.length,n;e>1&&typeof arguments[e-1]=="function"&&(n=arguments[e-1],--e);let r=0;for(;r<e&&!this.isDef();++r){const u=arguments[r];u.center&&this.setCenterInternal(u.center),u.zoom!==void 0?this.setZoom(u.zoom):u.resolution&&this.setResolution(u.resolution),u.rotation!==void 0&&this.setRotation(u.rotation)}if(r===e){n&&ra(n,!0);return}let o=Date.now(),s=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_;const h=[];for(;r<e;++r){const u=arguments[r],d={start:o,complete:!1,anchor:u.anchor,duration:u.duration!==void 0?u.duration:1e3,easing:u.easing||Ev,callback:n};if(u.center&&(d.sourceCenter=s,d.targetCenter=u.center.slice(),s=d.targetCenter),u.zoom!==void 0?(d.sourceResolution=a,d.targetResolution=this.getResolutionForZoom(u.zoom),a=d.targetResolution):u.resolution&&(d.sourceResolution=a,d.targetResolution=u.resolution,a=d.targetResolution),u.rotation!==void 0){d.sourceRotation=l;const c=$i(u.rotation-l+Math.PI,2*Math.PI)-Math.PI;d.targetRotation=l+c,l=d.targetRotation}Hv(d)?d.complete=!0:o+=d.duration,h.push(d)}this.animations_.push(h),this.setHint(Yt.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[Yt.ANIMATING]>0}getInteracting(){return this.hints_[Yt.INTERACTING]>0}cancelAnimations(){this.setHint(Yt.ANIMATING,-this.hints_[Yt.ANIMATING]);let t;for(let e=0,n=this.animations_.length;e<n;++e){const r=this.animations_[e];if(r[0].callback&&ra(r[0].callback,!1),!t)for(let o=0,s=r.length;o<s;++o){const a=r[o];if(!a.complete){t=a.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,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 t=Date.now();let e=!1;for(let n=this.animations_.length-1;n>=0;--n){const r=this.animations_[n];let o=!0;for(let s=0,a=r.length;s<a;++s){const l=r[s];if(l.complete)continue;const h=t-l.start;let u=l.duration>0?h/l.duration:1;u>=1?(l.complete=!0,u=1):o=!1;const d=l.easing(u);if(l.sourceCenter){const c=l.sourceCenter[0],f=l.sourceCenter[1],g=l.targetCenter[0],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;const p=c+d*(g-c),_=f+d*(m-f);this.targetCenter_=[p,_]}if(l.sourceResolution&&l.targetResolution){const c=d===1?l.targetResolution:l.sourceResolution+d*(l.targetResolution-l.sourceResolution);if(l.anchor){const f=this.getViewportSize_(this.getRotation()),g=this.constraints_.resolution(c,0,f,!0);this.targetCenter_=this.calculateCenterZoom(g,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=c,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const c=d===1?$i(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+d*(l.targetRotation-l.sourceRotation);if(l.anchor){const f=this.constraints_.rotation(c,!0);this.targetCenter_=this.calculateCenterRotate(f,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=c}if(this.applyTargetState_(!0),e=!0,!l.complete)break}if(o){this.animations_[n]=null,this.setHint(Yt.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const s=r[0].callback;s&&ra(s,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let n;const r=this.getCenterInternal();return r!==void 0&&(n=[r[0]-e[0],r[1]-e[1]],Ol(n,t-this.getRotation()),R0(n,e)),n}calculateCenterZoom(t,e){let n;const r=this.getCenterInternal(),o=this.getResolution();if(r!==void 0&&o!==void 0){const s=e[0]-t*(e[0]-r[0])/o,a=e[1]-t*(e[1]-r[1])/o;n=[s,a]}return n}getViewportSize_(t){const e=this.viewportSize_;if(t){const n=e[0],r=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(r*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(r*Math.cos(t))]}else return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t&&Cr(t,this.getProjection())}getCenterInternal(){return this.get(ii.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return ql(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();ft(e,1);const n=this.getResolution();ft(n!==void 0,2);const r=this.getRotation();return ft(r!==void 0,3),Al(e,n,r,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(ii.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(Zi(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const n=Nt(t)/e[0],r=$e(t)/e[1];return Math.max(n,r)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(e/n)/Math.log(t);return function(o){return e/Math.pow(t,o*r)}}getRotation(){return this.get(ii.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,o=Math.log(n/r)/e;return function(s){return Math.log(n/s)/e/o}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),n=this.getRotation();let r=this.getCenterInternal();const o=this.padding_;if(o){const s=this.getViewportSizeMinusPadding_();r=vh(r,this.getViewportSize_(),[s[0]/2+o[3],s[1]/2+o[0]],e,n)}return{center:r.slice(0),projection:t!==void 0?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}}getZoom(){let t;const e=this.getResolution();return e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,n,r;if(this.resolutions_){const o=xl(this.resolutions_,t,1);e=o,n=this.resolutions_[o],o==this.resolutions_.length-1?r=2:r=n/this.resolutions_[o+1]}else n=this.maxResolution_,r=this.zoomFactor_;return e+Math.log(n/t)/Math.log(r)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=Wt(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,Wt(t-e,0,1))}else return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let n;if(ft(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function",24),Array.isArray(t)){ft(!Ll(t),25);const r=Zi(t,this.getProjection());n=$c(r)}else if(t.getType()==="Circle"){const r=Zi(t.getExtent(),this.getProjection());n=$c(r),n.rotate(this.getRotation(),Yi(r))}else n=t;this.fitInternal(n,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),n=Math.cos(e),r=Math.sin(-e),o=t.getFlatCoordinates(),s=t.getStride();let a=1/0,l=1/0,h=-1/0,u=-1/0;for(let d=0,c=o.length;d<c;d+=s){const f=o[d]*n-o[d+1]*r,g=o[d]*r+o[d+1]*n;a=Math.min(a,f),l=Math.min(l,g),h=Math.max(h,f),u=Math.max(u,g)}return[a,l,h,u]}fitInternal(t,e){e=e||{};let n=e.size;n||(n=this.getViewportSizeMinusPadding_());const r=e.padding!==void 0?e.padding:[0,0,0,0],o=e.nearest!==void 0?e.nearest:!1;let s;e.minResolution!==void 0?s=e.minResolution:e.maxZoom!==void 0?s=this.getResolutionForZoom(e.maxZoom):s=0;const a=this.rotatedExtentForGeometry(t);let l=this.getResolutionForExtentInternal(a,[n[0]-r[1]-r[3],n[1]-r[0]-r[2]]);l=isNaN(l)?s:Math.max(l,s),l=this.getConstrainedResolution(l,o?0:1);const h=this.getRotation(),u=Math.sin(h),d=Math.cos(h),c=Yi(a);c[0]+=(r[1]-r[3])/2*l,c[1]+=(r[0]-r[2])/2*l;const f=c[0]*d-c[1]*u,g=c[1]*d+c[0]*u,m=this.getConstrainedCenter([f,g],l),p=e.callback?e.callback:Ln;e.duration!==void 0?this.animateInternal({resolution:l,center:m,duration:e.duration,easing:e.easing},p):(this.targetResolution_=l,this.targetCenter_=m,this.applyTargetState_(!1,!0),ra(p,!0))}centerOn(t,e,n){this.centerOnInternal(Vt(t,this.getProjection()),e,n)}centerOnInternal(t,e,n){this.setCenterInternal(vh(t,e,n,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,n,r){let o;const s=this.padding_;if(s&&t){const a=this.getViewportSizeMinusPadding_(-n),l=vh(t,r,[a[0]/2+s[3],a[1]/2+s[0]],e,n);o=[t[0]-l[0],t[1]-l[1]]}return o}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(t){const e=Cr(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])}adjustCenterInternal(t){const e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])}adjustResolution(t,e){e=e&&Vt(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const n=this.getAnimating()||this.getInteracting(),r=this.getViewportSize_(this.getRotation()),o=this.constraints_.resolution(this.targetResolution_*t,0,r,n);e&&(this.targetCenter_=this.calculateCenterZoom(o,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=Vt(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){const n=this.getAnimating()||this.getInteracting(),r=this.constraints_.rotation(this.targetRotation_+t,n);e&&(this.targetCenter_=this.calculateCenterRotate(r,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t&&Vt(t,this.getProjection()))}setCenterInternal(t){this.targetCenter_=t,this.applyTargetState_()}setHint(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]}setResolution(t){this.targetResolution_=t,this.applyTargetState_()}setRotation(t){this.targetRotation_=t,this.applyTargetState_()}setZoom(t){this.setResolution(this.getResolutionForZoom(t))}applyTargetState_(t,e){const n=this.getAnimating()||this.getInteracting()||e,r=this.constraints_.rotation(this.targetRotation_,n),o=this.getViewportSize_(r),s=this.constraints_.resolution(this.targetResolution_,0,o,n),a=this.constraints_.center(this.targetCenter_,s,o,n,this.calculateCenterShift(this.targetCenter_,s,r,o));this.get(ii.ROTATION)!==r&&this.set(ii.ROTATION,r),this.get(ii.RESOLUTION)!==s&&(this.set(ii.RESOLUTION,s),this.set("zoom",this.getZoom(),!0)),(!a||!this.get(ii.CENTER)||!ei(this.get(ii.CENTER),a))&&this.set(ii.CENTER,a),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,n){t=t!==void 0?t:200;const r=e||0,o=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(o),a=this.constraints_.resolution(this.targetResolution_,r,s),l=this.constraints_.center(this.targetCenter_,a,s,!1,this.calculateCenterShift(this.targetCenter_,a,o,s));if(t===0&&!this.cancelAnchor_){this.targetResolution_=a,this.targetRotation_=o,this.targetCenter_=l,this.applyTargetState_();return}n=n||(t===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==a||this.getRotation()!==o||!this.getCenterInternal()||!ei(this.getCenterInternal(),l))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:l,resolution:a,duration:t,easing:Ir,anchor:n}))}beginInteraction(){this.resolveConstraints(0),this.setHint(Yt.INTERACTING,1)}endInteraction(t,e,n){n=n&&Vt(n,this.getProjection()),this.endInteractionInternal(t,e,n)}endInteractionInternal(t,e,n){this.setHint(Yt.INTERACTING,-1),this.resolveConstraints(t,e,n)}getConstrainedCenter(t,e){const n=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),n)}getConstrainedZoom(t,e){const n=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(n,e))}getConstrainedResolution(t,e){e=e||0;const n=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,n)}}function ra(i,t){setTimeout(function(){i(t)},0)}function Yv(i){if(i.extent!==void 0){const e=i.smoothExtentConstraint!==void 0?i.smoothExtentConstraint:!0;return Sc(i.extent,i.constrainOnlyCenter,e)}const t=Ul(i.projection,"EPSG:3857");if(i.multiWorld!==!0&&t.isGlobal()){const e=t.getExtent().slice();return e[0]=-1/0,e[2]=1/0,Sc(e,!1,!1)}return yv}function Kv(i){let t,e,n,s=i.minZoom!==void 0?i.minZoom:ph,a=i.maxZoom!==void 0?i.maxZoom:28;const l=i.zoomFactor!==void 0?i.zoomFactor:2,h=i.multiWorld!==void 0?i.multiWorld:!1,u=i.smoothResolutionConstraint!==void 0?i.smoothResolutionConstraint:!0,d=i.showFullExtent!==void 0?i.showFullExtent:!1,c=Ul(i.projection,"EPSG:3857"),f=c.getExtent();let g=i.constrainOnlyCenter,m=i.extent;if(!h&&!m&&c.isGlobal()&&(g=!1,m=f),i.resolutions!==void 0){const p=i.resolutions;e=p[s],n=p[a]!==void 0?p[a]:p[p.length-1],i.constrainResolution?t=xv(p,u,!g&&m,d):t=Tc(e,n,u,!g&&m,d)}else{const _=(f?Math.max(Nt(f),$e(f)):360*xr.degrees/c.getMetersPerUnit())/Ql/Math.pow(2,ph),v=_/Math.pow(2,28-ph);e=i.maxResolution,e!==void 0?s=0:e=_/Math.pow(l,s),n=i.minResolution,n===void 0&&(i.maxZoom!==void 0?i.maxResolution!==void 0?n=e/Math.pow(l,a):n=_/Math.pow(l,a):n=v),a=s+Math.floor(Math.log(e/n)/Math.log(l)),n=e/Math.pow(l,a-s),i.constrainResolution?t=bv(l,e,n,u,!g&&m,d):t=Tc(e,n,u,!g&&m,d)}return{constraint:t,maxResolution:e,minResolution:n,minZoom:s,zoomFactor:l}}function Zv(i){if(i.enableRotation!==void 0?i.enableRotation:!0){const e=i.constrainRotation;return e===void 0||e===!0?wv():e===!1?zc:typeof e=="number"?kv(e):zc}else return ih}function Hv(i){return!(i.sourceCenter&&i.targetCenter&&!ei(i.sourceCenter,i.targetCenter)||i.sourceResolution!==i.targetResolution||i.sourceRotation!==i.targetRotation)}function vh(i,t,e,n,r){const o=Math.cos(-r);let s=Math.sin(-r),a=i[0]*o-i[1]*s,l=i[1]*o+i[0]*s;a+=(t[0]/2-e[0])*n,l+=(e[1]-t[1]/2)*n,s=-s;const h=a*o-l*s,u=l*o+a*s;return[h,u]}const en=Wv;class Jv extends mo{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=t.className!==void 0?t.className:"ol-rotate",n=t.label!==void 0?t.label:"\u21E7",r=t.compassClassName!==void 0?t.compassClassName:"ol-compass";this.label_=null,typeof n=="string"?(this.label_=document.createElement("span"),this.label_.className=r,this.label_.textContent=n):(this.label_=n,this.label_.classList.add(r));const o=t.tipLabel?t.tipLabel:"Reset rotation",s=document.createElement("button");s.className=e+"-reset",s.setAttribute("type","button"),s.title=o,s.appendChild(this.label_),s.addEventListener(tt.CLICK,this.handleClick_.bind(this),!1);const a=e+" "+po+" "+El,l=this.element;l.className=a,l.appendChild(s),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=t.duration!==void 0?t.duration:250,this.autoHide_=t.autoHide!==void 0?t.autoHide:!0,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(As)}handleClick_(t){t.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const e=this.getMap().getView();if(!e)return;const n=e.getRotation();n!==void 0&&(this.duration_>0&&n%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:Ir}):e.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const n=e.viewState.rotation;if(n!=this.rotation_){const r="rotate("+n+"rad)";if(this.autoHide_){const o=this.element.classList.contains(As);!o&&n===0?this.element.classList.add(As):o&&n!==0&&this.element.classList.remove(As)}this.label_.style.transform=r}this.rotation_=n}}const Qv=Jv;class t_ extends mo{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=t.className!==void 0?t.className:"ol-zoom",n=t.delta!==void 0?t.delta:1,r=t.zoomInClassName!==void 0?t.zoomInClassName:e+"-in",o=t.zoomOutClassName!==void 0?t.zoomOutClassName:e+"-out",s=t.zoomInLabel!==void 0?t.zoomInLabel:"+",a=t.zoomOutLabel!==void 0?t.zoomOutLabel:"\u2013",l=t.zoomInTipLabel!==void 0?t.zoomInTipLabel:"Zoom in",h=t.zoomOutTipLabel!==void 0?t.zoomOutTipLabel:"Zoom out",u=document.createElement("button");u.className=r,u.setAttribute("type","button"),u.title=l,u.appendChild(typeof s=="string"?document.createTextNode(s):s),u.addEventListener(tt.CLICK,this.handleClick_.bind(this,n),!1);const d=document.createElement("button");d.className=o,d.setAttribute("type","button"),d.title=h,d.appendChild(typeof a=="string"?document.createTextNode(a):a),d.addEventListener(tt.CLICK,this.handleClick_.bind(this,-n),!1);const c=e+" "+po+" "+El,f=this.element;f.className=c,f.appendChild(u),f.appendChild(d),this.duration_=t.duration!==void 0?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const n=this.getMap().getView();if(!n)return;const r=n.getZoom();if(r!==void 0){const o=n.getConstrainedZoom(r+t);this.duration_>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:o,duration:this.duration_,easing:Ir})):n.setZoom(o)}}}const e_=t_;function Wc(i){i=i||{};const t=new We;return(i.zoom!==void 0?i.zoom:!0)&&t.push(new e_(i.zoomOptions)),(i.rotate!==void 0?i.rotate:!0)&&t.push(new Qv(i.rotateOptions)),(i.attribution!==void 0?i.attribution:!0)&&t.push(new g0(i.attributionOptions)),t}const _h={ACTIVE:"active"};class i_ extends hi{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(_h.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(_h.ACTIVE,t)}setMap(t){this.map_=t}}function n_(i,t,e){const n=i.getCenterInternal();if(n){const r=[n[0]+t[0],n[1]+t[1]];i.animateInternal({duration:e!==void 0?e:250,easing:Mv,center:i.getConstrainedCenter(r)})}}function yh(i,t,e,n){const r=i.getZoom();if(r===void 0)return;const o=i.getConstrainedZoom(r+t),s=i.getResolutionForZoom(o);i.getAnimating()&&i.cancelAnimations(),i.animate({resolution:s,anchor:e,duration:n!==void 0?n:250,easing:Ir})}const Io=i_;class r_ extends Io{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:250}handleEvent(t){let e=!1;if(t.type==Et.DBLCLICK){const n=t.originalEvent,r=t.map,o=t.coordinate,s=n.shiftKey?-this.delta_:this.delta_,a=r.getView();yh(a,s,o,this.duration_),n.preventDefault(),e=!0}return!e}}const o_=r_;class s_ extends Io{constructor(t){t=t||{},super(t),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==Et.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==Et.POINTERUP){const n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==Et.POINTERDOWN){const n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==Et.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function xh(i){const t=i.length;let e=0,n=0;for(let r=0;r<t;r++)e+=i[r].clientX,n+=i[r].clientY;return[e/t,n/t]}const nn=s_;function bh(i){const t=arguments;return function(e){let n=!0;for(let r=0,o=t.length;r<o&&(n=n&&t[r](e),!!n);++r);return n}}const a_=function(i){const t=i.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},l_=function(i){const t=i.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},h_=function(i){const t=i.map.getTargetElement(),e=i.map.getOwnerDocument().activeElement;return t.contains(e)},Yc=function(i){return i.map.getTargetElement().hasAttribute("tabindex")?h_(i):!0},kh=Dn,Kc=function(i){const t=i.originalEvent;return t.button==0&&!(e0&&i0&&t.ctrlKey)},u_=function(i){return i.type==Et.SINGLECLICK},wh=function(i){const t=i.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},Zc=function(i){const t=i.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},Hc=function(i){const t=i.originalEvent,e=t.target.tagName;return e!=="INPUT"&&e!=="SELECT"&&e!=="TEXTAREA"&&!t.target.isContentEditable},Eh=function(i){const t=i.originalEvent;return ft(t!==void 0,56),t.pointerType=="mouse"},Jc=function(i){const t=i.originalEvent;return ft(t!==void 0,56),t.isPrimary&&t.button===0};class d_ extends nn{constructor(t){super({stopDown:yr}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:bh(wh,Jc);this.condition_=t.onFocusOnly?bh(Yc,e):e,this.noKinetic_=!1}handleDragEvent(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());const e=this.targetPointers,n=xh(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){const r=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],s=t.map.getView();A0(r,s.getResolution()),Ol(r,s.getRotation()),s.adjustCenterInternal(r)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=n,this.lastPointersCount_=e.length,t.originalEvent.preventDefault()}handleUpEvent(t){const e=t.map,n=e.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const r=this.kinetic_.getDistance(),o=this.kinetic_.getAngle(),s=n.getCenterInternal(),a=e.getPixelFromCoordinateInternal(s),l=e.getCoordinateFromPixelInternal([a[0]-r*Math.cos(o),a[1]-r*Math.sin(o)]);n.animateInternal({center:n.getConstrainedCenter(l),duration:500,easing:Ir})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1}else return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){const n=t.map.getView();return this.lastCentroid=null,n.getAnimating()&&n.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}else return!1}}const c_=d_;class f_ extends nn{constructor(t){t=t||{},super({stopDown:yr}),this.condition_=t.condition?t.condition:l_,this.lastAngle_=void 0,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){if(!Eh(t))return;const e=t.map,n=e.getView();if(n.getConstraints().rotation===ih)return;const r=e.getSize(),o=t.pixel,s=Math.atan2(r[1]/2-o[1],o[0]-r[0]/2);if(this.lastAngle_!==void 0){const a=s-this.lastAngle_;n.adjustRotationInternal(-a)}this.lastAngle_=s}handleUpEvent(t){return Eh(t)?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){return Eh(t)&&Kc(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}const g_=f_;class m_ extends yl{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,n="px",r=this.element_.style;r.left=Math.min(t[0],e[0])+n,r.top=Math.min(t[1],e[1])+n,r.width=Math.abs(e[0]-t[0])+n,r.height=Math.abs(e[1]-t[1])+n}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const t=this.startPixel_,e=this.endPixel_,r=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);r[4]=r[0].slice(),this.geometry_?this.geometry_.setCoordinates([r]):this.geometry_=new Wn([r])}getGeometry(){return this.geometry_}}const p_=m_,oa={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class Mh extends Qe{constructor(t,e,n){super(t),this.coordinate=e,this.mapBrowserEvent=n}}class v_ extends nn{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new p_(t.className||"ol-dragbox"),this.minArea_=t.minArea!==void 0?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:Kc,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,n){const r=n[0]-e[0],o=n[1]-e[1];return r*r+o*o>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Mh(oa.BOXDRAG,t.coordinate,t))}handleUpEvent(t){this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Mh(e?oa.BOXEND:oa.BOXCANCEL,t.coordinate,t)),!1}handleDownEvent(t){return this.condition_(t)?(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Mh(oa.BOXSTART,t.coordinate,t)),!0):!1}onBoxEnd(t){}}const __=v_;class y_ extends __{constructor(t){t=t||{};const e=t.condition?t.condition:Zc;super({condition:e,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=t.duration!==void 0?t.duration:200,this.out_=t.out!==void 0?t.out:!1}onBoxEnd(t){const n=this.getMap().getView();let r=this.getGeometry();if(this.out_){const o=n.rotatedExtentForGeometry(r),s=n.getResolutionForExtentInternal(o),a=n.getResolution()/s;r=r.clone(),r.scale(a*a)}n.fitInternal(r,{duration:this.duration_,easing:Ir})}}const x_=y_,Yn={LEFT:37,UP:38,RIGHT:39,DOWN:40};class b_ extends Io{constructor(t){super(),t=t||{},this.defaultCondition_=function(e){return wh(e)&&Hc(e)},this.condition_=t.condition!==void 0?t.condition:this.defaultCondition_,this.duration_=t.duration!==void 0?t.duration:100,this.pixelDelta_=t.pixelDelta!==void 0?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==tt.KEYDOWN){const n=t.originalEvent,r=n.keyCode;if(this.condition_(t)&&(r==Yn.DOWN||r==Yn.LEFT||r==Yn.RIGHT||r==Yn.UP)){const s=t.map.getView(),a=s.getResolution()*this.pixelDelta_;let l=0,h=0;r==Yn.DOWN?h=-a:r==Yn.LEFT?l=-a:r==Yn.RIGHT?l=a:h=a;const u=[l,h];Ol(u,s.getRotation()),n_(s,u,this.duration_),n.preventDefault(),e=!0}}return!e}}const k_=b_;class w_ extends Io{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:Hc,this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:100}handleEvent(t){let e=!1;if(t.type==tt.KEYDOWN||t.type==tt.KEYPRESS){const n=t.originalEvent,r=n.charCode;if(this.condition_(t)&&(r=="+".charCodeAt(0)||r=="-".charCodeAt(0))){const o=t.map,s=r=="+".charCodeAt(0)?this.delta_:-this.delta_,a=o.getView();yh(a,s,void 0,this.duration_),n.preventDefault(),e=!0}}return!e}}const E_=w_;class M_{constructor(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;let n=e-3;for(;n>0&&this.points_[n+2]>t;)n-=3;const r=this.points_[e+2]-this.points_[n+2];if(r<1e3/60)return!1;const o=this.points_[e]-this.points_[n],s=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(s,o),this.initialVelocity_=Math.sqrt(o*o+s*s)/r,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}const C_=M_;class S_ extends Io{constructor(t){t=t||{},super(t),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=t.maxDelta!==void 0?t.maxDelta:1,this.duration_=t.duration!==void 0?t.duration:250,this.timeout_=t.timeout!==void 0?t.timeout:80,this.useAnchor_=t.useAnchor!==void 0?t.useAnchor:!0,this.constrainResolution_=t.constrainResolution!==void 0?t.constrainResolution:!1;const e=t.condition?t.condition:kh;this.condition_=t.onFocusOnly?bh(Yc,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();if(!t)return;t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t)||t.type!==tt.WHEEL)return!0;const n=t.map,r=t.originalEvent;r.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate);let o;if(t.type==tt.WHEEL&&(o=r.deltaY,t0&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(o/=Ud),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(o*=40)),o===0)return!1;this.lastDelta_=o;const s=Date.now();this.startTime_===void 0&&(this.startTime_=s),(!this.mode_||s-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(o)<4?"trackpad":"wheel");const a=n.getView();if(this.mode_==="trackpad"&&!(a.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(a.getAnimating()&&a.cancelAnimations(),a.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),a.adjustZoom(-o/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=s,!1;this.totalDelta_+=o;const l=Math.max(this.timeout_-(s-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),l),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let n=-Wt(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),yh(e,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}const T_=S_;class z_ extends nn{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=yr),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=t.threshold!==void 0?t.threshold:.3,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){let e=0;const n=this.targetPointers[0],r=this.targetPointers[1],o=Math.atan2(r.clientY-n.clientY,r.clientX-n.clientX);if(this.lastAngle_!==void 0){const u=o-this.lastAngle_;this.rotationDelta_+=u,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=u}this.lastAngle_=o;const s=t.map,a=s.getView();if(a.getConstraints().rotation===ih)return;const l=s.getViewport().getBoundingClientRect(),h=xh(this.targetPointers);h[0]-=l.left,h[1]-=l.top,this.anchor_=s.getCoordinateFromPixelInternal(h),this.rotating_&&(s.render(),a.adjustRotationInternal(e,this.anchor_))}handleUpEvent(t){return this.targetPointers.length<2?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}else return!1}}const I_=z_;class R_ extends nn{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=yr),super(e),this.anchor_=null,this.duration_=t.duration!==void 0?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const n=this.targetPointers[0],r=this.targetPointers[1],o=n.clientX-r.clientX,s=n.clientY-r.clientY,a=Math.sqrt(o*o+s*s);this.lastDistance_!==void 0&&(e=this.lastDistance_/a),this.lastDistance_=a;const l=t.map,h=l.getView();e!=1&&(this.lastScaleDelta_=e);const u=l.getViewport().getBoundingClientRect(),d=xh(this.targetPointers);d[0]-=u.left,d[1]-=u.top,this.anchor_=l.getCoordinateFromPixelInternal(d),l.render(),h.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const n=t.map.getView(),r=this.lastScaleDelta_>1?1:-1;return n.endInteraction(this.duration_,r),!1}else return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}else return!1}}const P_=R_;function Qc(i){i=i||{};const t=new We,e=new C_(-.005,.05,100);return(i.altShiftDragRotate!==void 0?i.altShiftDragRotate:!0)&&t.push(new g_),(i.doubleClickZoom!==void 0?i.doubleClickZoom:!0)&&t.push(new o_({delta:i.zoomDelta,duration:i.zoomDuration})),(i.dragPan!==void 0?i.dragPan:!0)&&t.push(new c_({onFocusOnly:i.onFocusOnly,kinetic:e})),(i.pinchRotate!==void 0?i.pinchRotate:!0)&&t.push(new I_),(i.pinchZoom!==void 0?i.pinchZoom:!0)&&t.push(new P_({duration:i.zoomDuration})),(i.keyboard!==void 0?i.keyboard:!0)&&(t.push(new k_),t.push(new E_({delta:i.zoomDelta,duration:i.zoomDuration}))),(i.mouseWheelZoom!==void 0?i.mouseWheelZoom:!0)&&t.push(new T_({onFocusOnly:i.onFocusOnly,duration:i.zoomDuration})),(i.shiftDragZoom!==void 0?i.shiftDragZoom:!0)&&t.push(new x_({duration:i.zoomDuration})),t}function tf(i){return i[0]>0&&i[1]>0}function A_(i,t,e){return e===void 0&&(e=[0,0]),e[0]=i[0]*t+.5|0,e[1]=i[1]*t+.5|0,e}function be(i,t){return Array.isArray(i)?i:(t===void 0?t=[i,i]:(t[0]=i,t[1]=i),t)}function ef(i){if(i instanceof Fs){i.setMapInternal(null);return}i instanceof Js&&i.getLayers().forEach(ef)}function nf(i,t){if(i instanceof Fs){i.setMapInternal(t);return}if(i instanceof Js){const e=i.getLayers().getArray();for(let n=0,r=e.length;n<r;++n)nf(e[n],t)}}class D_ extends hi{constructor(t){super(),t=t||{},this.on,this.once,this.un;const e=L_(t);this.renderComplete_,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=t.maxTilesLoading!==void 0?t.maxTilesLoading:16,this.pixelRatio_=t.pixelRatio!==void 0?t.pixelRatio:Ud,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=Ye(),this.pixelToCoordinateTransform_=Ye(),this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,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_=t.moveTolerance,this.keyboardEventTarget_=e.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.controls=e.controls||Wc(),this.interactions=e.interactions||Qc({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new vv(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(fe.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(fe.VIEW,this.handleViewChanged_),this.addChangeListener(fe.SIZE,this.handleSizeChanged_),this.addChangeListener(fe.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const n=this;t.view&&!(t.view instanceof en)&&t.view.then(function(r){n.setView(new en(r))}),this.controls.addEventListener(re.ADD,function(r){r.element.setMap(this)}.bind(this)),this.controls.addEventListener(re.REMOVE,function(r){r.element.setMap(null)}.bind(this)),this.interactions.addEventListener(re.ADD,function(r){r.element.setMap(this)}.bind(this)),this.interactions.addEventListener(re.REMOVE,function(r){r.element.setMap(null)}.bind(this)),this.overlays_.addEventListener(re.ADD,function(r){this.addOverlayInternal_(r.element)}.bind(this)),this.overlays_.addEventListener(re.REMOVE,function(r){const o=r.element.getId();o!==void 0&&delete this.overlayIdIndex_[o.toString()],r.element.setMap(null)}.bind(this)),this.controls.forEach(function(r){r.setMap(this)}.bind(this)),this.interactions.forEach(function(r){r.setMap(this)}.bind(this)),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){nf(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();e!==void 0&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,n){if(!this.frameState_||!this.renderer_)return;const r=this.getCoordinateFromPixelInternal(t);n=n!==void 0?n:{};const o=n.hitTolerance!==void 0?n.hitTolerance:0,s=n.layerFilter!==void 0?n.layerFilter:Dn,a=n.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(r,this.frameState_,o,a,e,null,s,null)}getFeaturesAtPixel(t,e){const n=[];return this.forEachFeatureAtPixel(t,function(r){n.push(r)},e),n}getAllLayers(){const t=[];function e(n){n.forEach(function(r){r instanceof Js?e(r.getLayers()):t.push(r)})}return e(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const n=this.getCoordinateFromPixelInternal(t);e=e!==void 0?e:{};const r=e.layerFilter!==void 0?e.layerFilter:Dn,o=e.hitTolerance!==void 0?e.hitTolerance:0,s=e.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,o,s,r,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const e=this.viewport_.getBoundingClientRect(),n="changedTouches"in t?t.changedTouches[0]:t;return[n.clientX-e.left,n.clientY-e.top]}getTarget(){return this.get(fe.TARGET)}getTargetElement(){const t=this.getTarget();return t!==void 0?typeof t=="string"?document.getElementById(t):t:null}getCoordinateFromPixel(t){return Cr(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?Jt(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return e!==void 0?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(fe.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof We){e.setLayers(t);return}const n=e.getLayers();n.clear(),n.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,n=t.length;e<n;++e){const r=t[e];if(!r.visible)continue;const o=r.layer.getRenderer();if(o&&!o.ready)return!0;const s=r.layer.getSource();if(s&&s.loading)return!0}return!1}getPixelFromCoordinate(t){const e=Vt(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)}getPixelFromCoordinateInternal(t){const e=this.frameState_;return e?Jt(e.coordinateToPixelTransform,t.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(fe.SIZE)}getView(){return this.get(fe.VIEW)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const t=this.getTargetElement();return t?t.ownerDocument:document}getTilePriority(t,e,n,r){return _v(this.frameState_,t,e,n,r)}handleBrowserEvent(t,e){e=e||t.type;const n=new Si(e,this,t);this.handleMapBrowserEvent(n)}handleMapBrowserEvent(t){if(!this.frameState_)return;const e=t.originalEvent,n=e.type;if(n===Cl.POINTERDOWN||n===tt.WHEEL||n===tt.KEYDOWN){const r=this.getOwnerDocument(),o=this.viewport_.getRootNode?this.viewport_.getRootNode():r,s=e.target;if(this.overlayContainerStopEvent_.contains(s)||!(o===r?r.documentElement:o).contains(s))return}if(t.frameState=this.frameState_,this.dispatchEvent(t)!==!1){const r=this.getInteractions().getArray().slice();for(let o=r.length-1;o>=0;o--){const s=r[o];if(s.getMap()!==this||!s.getActive()||!this.getTargetElement())continue;if(!s.handleEvent(t)||t.propagationStopped)break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let r=this.maxTilesLoading_,o=r;if(t){const s=t.viewHints;if(s[Yt.ANIMATING]||s[Yt.INTERACTING]){const a=Date.now()-t.time>8;r=a?0:8,o=a?0:2}}e.getTilesLoading()<r&&(e.reprioritize(),e.loadMoreTiles(r,o))}t&&this.renderer_&&!t.animate&&(this.renderComplete_===!0?(this.hasListener(Wi.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(Wi.RENDERCOMPLETE,t),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new zr(qi.LOADEND,this,t)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new zr(qi.LOADSTART,this,t))));const n=this.postRenderFunctions_;for(let r=0,o=n.length;r<o;++r)n[r](this,t);n.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let e=0,n=this.targetChangeHandlerKeys_.length;e<n;++e)Ot(this.targetChangeHandlerKeys_[e]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(tt.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(tt.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,wl(this.viewport_)}const t=this.getTargetElement();if(!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{t.appendChild(this.viewport_),this.renderer_||(this.renderer_=new hv(this)),this.mapBrowserEventHandler_=new fv(this,this.moveTolerance_);for(const r in Et)this.mapBrowserEventHandler_.addEventListener(Et[r],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(tt.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(tt.WHEEL,this.boundHandleBrowserEvent_,Vd?{passive:!1}:!1);const e=this.getOwnerDocument().defaultView,n=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.targetChangeHandlerKeys_=[gt(n,tt.KEYDOWN,this.handleBrowserEvent,this),gt(n,tt.KEYPRESS,this.handleBrowserEvent,this),gt(e,tt.RESIZE,this.updateSize,this)]}this.updateSize()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(Ot(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Ot(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=gt(t,_r.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=gt(t,tt.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(Ot),this.layerGroupPropertyListenerKeys_=null);const t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Hi("addlayer",t)),this.layerGroupPropertyListenerKeys_=[gt(t,_r.PROPERTYCHANGE,this.render,this),gt(t,tt.CHANGE,this.render,this),gt(t,"addlayer",this.handleLayerAdd_,this),gt(t,"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(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,n=t.length;e<n;++e){const r=t[e].layer;r.hasRenderer()&&r.getRenderer().handleFontsChanged()}}render(){this.renderer_&&this.animationDelayKey_===void 0&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}removeControl(t){return this.getControls().remove(t)}removeInteraction(t){return this.getInteractions().remove(t)}removeLayer(t){return this.getLayerGroup().getLayers().remove(t)}handleLayerRemove_(t){ef(t.layer)}removeOverlay(t){return this.getOverlays().remove(t)}renderFrame_(t){const e=this.getSize(),n=this.getView(),r=this.frameState_;let o=null;if(e!==void 0&&tf(e)&&n&&n.isDef()){const s=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=n.getState();if(o={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:Al(a.center,a.resolution,a.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:a,viewHints:s,wantedTiles:{},mapId:K(this),renderTargets:{}},a.nextCenter&&a.nextResolution){const l=isNaN(a.nextRotation)?a.rotation:a.nextRotation;o.nextExtent=Al(a.nextCenter,a.nextResolution,l,e)}}this.frameState_=o,this.renderer_.renderFrame(o),o&&(o.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,o.postRenderFunctions),r&&(!this.previousExtent_||!Ll(this.previousExtent_)&&!Mr(o.extent,this.previousExtent_))&&(this.dispatchEvent(new zr(qi.MOVESTART,this,r)),this.previousExtent_=_o(this.previousExtent_)),this.previousExtent_&&!o.viewHints[Yt.ANIMATING]&&!o.viewHints[Yt.INTERACTING]&&!Mr(o.extent,this.previousExtent_)&&(this.dispatchEvent(new zr(qi.MOVEEND,this,o)),ec(o.extent,this.previousExtent_))),this.dispatchEvent(new zr(qi.POSTRENDER,this,o)),this.renderComplete_=this.hasListener(qi.LOADSTART)||this.hasListener(qi.LOADEND)||this.hasListener(Wi.RENDERCOMPLETE)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new Hi("removelayer",e)),this.set(fe.LAYERGROUP,t)}setSize(t){this.set(fe.SIZE,t)}setTarget(t){this.set(fe.TARGET,t)}setView(t){if(!t||t instanceof en){this.set(fe.VIEW,t);return}this.set(fe.VIEW,new en);const e=this;t.then(function(n){e.setView(new en(n))})}updateSize(){const t=this.getTargetElement();let e;if(t){const n=getComputedStyle(t),r=t.offsetWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight)-parseFloat(n.borderRightWidth),o=t.offsetHeight-parseFloat(n.borderTopWidth)-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom)-parseFloat(n.borderBottomWidth);!isNaN(r)&&!isNaN(o)&&(e=[r,o],!tf(e)&&!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0."))}this.setSize(e),this.updateViewportSize_()}updateViewportSize_(){const t=this.getView();if(t){let e;const n=getComputedStyle(this.viewport_);n.width&&n.height&&(e=[parseInt(n.width,10),parseInt(n.height,10)]),t.setViewportSize(e)}}}function L_(i){let t=null;i.keyboardEventTarget!==void 0&&(t=typeof i.keyboardEventTarget=="string"?document.getElementById(i.keyboardEventTarget):i.keyboardEventTarget);const e={},n=i.layers&&typeof i.layers.getLayers=="function"?i.layers:new Js({layers:i.layers});e[fe.LAYERGROUP]=n,e[fe.TARGET]=i.target,e[fe.VIEW]=i.view instanceof en?i.view:new en;let r;i.controls!==void 0&&(Array.isArray(i.controls)?r=new We(i.controls.slice()):(ft(typeof i.controls.getArray=="function",47),r=i.controls));let o;i.interactions!==void 0&&(Array.isArray(i.interactions)?o=new We(i.interactions.slice()):(ft(typeof i.interactions.getArray=="function",48),o=i.interactions));let s;return i.overlays!==void 0?Array.isArray(i.overlays)?s=new We(i.overlays.slice()):(ft(typeof i.overlays.getArray=="function",49),s=i.overlays):s=new We,{controls:r,interactions:o,keyboardEventTarget:t,overlays:s,values:e}}const F_=D_,Ch="units",O_=[1,2,5],Ro=25.4/.28;class N_ extends mo{constructor(t){t=t||{};const e=document.createElement("div");e.style.pointerEvents="none",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un;const n=t.className!==void 0?t.className:t.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=n+"-inner",this.element.className=n+" "+po,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=t.minWidth!==void 0?t.minWidth:64,this.maxWidth_=t.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(Ch,this.handleUnitsChanged_),this.setUnits(t.units||"metric"),this.scaleBar_=t.bar||!1,this.scaleBarSteps_=t.steps||4,this.scaleBarText_=t.text||!1,this.dpi_=t.dpi||void 0}getUnits(){return this.get(Ch)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(Ch,t)}setDpi(t){this.dpi_=t}updateElement_(){const t=this.viewState_;if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=t.center,n=t.projection,r=this.getUnits(),o=r=="degrees"?"degrees":"m";let s=qs(n,t.resolution,e,o);const a=this.minWidth_*(this.dpi_||Ro)/Ro,l=this.maxWidth_!==void 0?this.maxWidth_*(this.dpi_||Ro)/Ro:void 0;let h=a*s,u="";if(r=="degrees"){const y=xr.degrees;h*=y,h<y/60?(u="\u2033",s*=3600):h<y?(u="\u2032",s*=60):u="\xB0"}else r=="imperial"?h<.9144?(u="in",s/=.0254):h<1609.344?(u="ft",s/=.3048):(u="mi",s/=1609.344):r=="nautical"?(s/=1852,u="NM"):r=="metric"?h<.001?(u="\u03BCm",s*=1e6):h<1?(u="mm",s*=1e3):h<1e3?u="m":(u="km",s/=1e3):r=="us"?h<.9144?(u="in",s*=39.37):h<1609.344?(u="ft",s/=.30480061):(u="mi",s/=1609.3472):ft(!1,33);let d=3*Math.floor(Math.log(a*s)/Math.log(10)),c,f,g,m,p,_;for(;;){g=Math.floor(d/3);const y=Math.pow(10,g);if(c=O_[(d%3+3)%3]*y,f=Math.round(c/s),isNaN(f)){this.element.style.display="none",this.renderedVisible_=!1;return}if(l!==void 0&&f>=l){c=m,f=p,g=_;break}else if(f>=a)break;m=c,p=f,_=g,++d}const v=this.scaleBar_?this.createScaleBar(f,c,u):c.toFixed(g<0?-g:0)+" "+u;this.renderedHTML_!=v&&(this.innerElement_.innerHTML=v,this.renderedHTML_=v),this.renderedWidth_!=f&&(this.innerElement_.style.width=f+"px",this.renderedWidth_=f),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,n){const r=this.getScaleForResolution(),o=r<1?Math.round(1/r).toLocaleString()+" : 1":"1 : "+Math.round(r).toLocaleString(),s=this.scaleBarSteps_,a=t/s,l=[this.createMarker("absolute")];for(let u=0;u<s;++u){const d=u%2===0?"ol-scale-singlebar-odd":"ol-scale-singlebar-even";l.push(`<div><div class="ol-scale-singlebar ${d}" style="width: ${a}px;"></div>`+this.createMarker("relative")+(u%2===0||s===2?this.createStepText(u,t,!1,e,n):"")+"</div>")}return l.push(this.createStepText(s,t,!0,e,n)),(this.scaleBarText_?`<div class="ol-scale-text" style="width: ${t}px;">`+o+"</div>":"")+l.join("")}createMarker(t){return`<div class="ol-scale-step-marker" style="position: ${t}; top: ${t==="absolute"?3:-10}px;"></div>`}createStepText(t,e,n,r,o){const a=(t===0?0:Math.round(r/this.scaleBarSteps_*t*100)/100)+(t===0?"":" "+o),l=t===0?-3:e/this.scaleBarSteps_*-1,h=t===0?0:e/this.scaleBarSteps_*2;return`<div class="ol-scale-step-text" style="margin-left: ${l}px;text-align: ${t===0?"left":"center"};min-width: ${h}px;left: ${n?e+"px":"unset"};">`+a+"</div>"}getScaleForResolution(){const t=qs(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),e=this.dpi_||Ro,n=1e3/25.4;return t*n*e}render(t){const e=t.frameState;e?this.viewState_=e.viewState:this.viewState_=null,this.updateElement_()}}const G_=N_;class sa extends Qi{constructor(t,e,n){super(),n!==void 0&&e===void 0?this.setFlatCoordinates(n,t):(e=e||0,this.setCenterAndRadius(t,e,n))}clone(){const t=new sa(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){const o=this.flatCoordinates,s=t-o[0],a=e-o[1],l=s*s+a*a;if(l<r){if(l===0)for(let h=0;h<this.stride;++h)n[h]=o[h];else{const h=this.getRadius()/Math.sqrt(l);n[0]=o[0]+h*s,n[1]=o[1]+h*a;for(let u=2;u<this.stride;++u)n[u]=o[u]}return n.length=this.stride,l}else return r}containsXY(t,e){const n=this.flatCoordinates,r=t-n[0],o=e-n[1];return r*r+o*o<=this.getRadiusSquared_()}getCenter(){return this.flatCoordinates.slice(0,this.stride)}computeExtent(t){const e=this.flatCoordinates,n=e[this.stride]-e[0];return ti(e[0]-n,e[1]-n,e[0]+n,e[1]+n,t)}getRadius(){return Math.sqrt(this.getRadiusSquared_())}getRadiusSquared_(){const t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e}getType(){return"Circle"}intersectsExtent(t){const e=this.getExtent();if(Kt(t,e)){const n=this.getCenter();return t[0]<=n[0]&&t[2]>=n[0]||t[1]<=n[1]&&t[3]>=n[1]?!0:Rl(t,this.intersectsCoordinate.bind(this))}return!1}setCenter(t){const e=this.stride,n=this.flatCoordinates[e]-this.flatCoordinates[0],r=t.slice();r[e]=r[0]+n;for(let o=1;o<e;++o)r[e+o]=t[o];this.setFlatCoordinates(this.layout,r),this.changed()}setCenterAndRadius(t,e,n){this.setLayout(n,t,0),this.flatCoordinates||(this.flatCoordinates=[]);const r=this.flatCoordinates;let o=Lc(r,0,t,this.stride);r[o++]=r[0]+e;for(let s=1,a=this.stride;s<a;++s)r[o++]=r[s];r.length=o,this.changed()}getCoordinates(){return null}setCoordinates(t,e){}setRadius(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()}rotate(t,e){const n=this.getCenter(),r=this.getStride();this.setCenter(nh(n,0,n.length,r,t,e,n)),this.changed()}translate(t,e){const n=this.getCenter(),r=this.getStride();this.setCenter(Rc(n,0,n.length,r,t,e,n)),this.changed()}}sa.prototype.transform;const j_=sa;class aa extends Ac{constructor(t){super(),this.geometries_=t||null,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(Ot),this.changeEventsKeys_.length=0}listenGeometriesChange_(){if(!!this.geometries_)for(let t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push(gt(this.geometries_[t],tt.CHANGE,this.changed,this))}clone(){const t=new aa(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t}closestPointXY(t,e,n,r){if(r<jn(this.getExtent(),t,e))return r;const o=this.geometries_;for(let s=0,a=o.length;s<a;++s)r=o[s].closestPointXY(t,e,n,r);return r}containsXY(t,e){const n=this.geometries_;for(let r=0,o=n.length;r<o;++r)if(n[r].containsXY(t,e))return!0;return!1}computeExtent(t){_o(t);const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)ic(t,e[n].getExtent());return t}getGeometries(){return rf(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let t=[];const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)e[n].getType()===this.getType()?t=t.concat(e[n].getGeometriesArrayRecursive()):t.push(e[n]);return t}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=[],n=this.geometries_;let r=!1;for(let o=0,s=n.length;o<s;++o){const a=n[o],l=a.getSimplifiedGeometry(t);e.push(l),l!==a&&(r=!0)}if(r){const o=new aa(null);return o.setGeometriesArray(e),o}else return this.simplifiedGeometryMaxMinSquaredTolerance=t,this}getType(){return"GeometryCollection"}intersectsExtent(t){const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)if(e[n].intersectsExtent(t))return!0;return!1}isEmpty(){return this.geometries_.length===0}rotate(t,e){const n=this.geometries_;for(let r=0,o=n.length;r<o;++r)n[r].rotate(t,e);this.changed()}scale(t,e,n){n||(n=Yi(this.getExtent()));const r=this.geometries_;for(let o=0,s=r.length;o<s;++o)r[o].scale(t,e,n);this.changed()}setGeometries(t){this.setGeometriesArray(rf(t))}setGeometriesArray(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()}applyTransform(t){const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)e[n].applyTransform(t);this.changed()}translate(t,e){const n=this.geometries_;for(let r=0,o=n.length;r<o;++r)n[r].translate(t,e);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function rf(i){const t=[];for(let e=0,n=i.length;e<n;++e)t.push(i[e].clone());return t}const B_=aa;function la(i,t,e,n,r,o,s){let a,l;const h=(e-t)/n;if(h===1)a=t;else if(h===2)a=t,l=r;else if(h!==0){let u=i[t],d=i[t+1],c=0;const f=[0];for(let p=t+n;p<e;p+=n){const _=i[p],v=i[p+1];c+=Math.sqrt((_-u)*(_-u)+(v-d)*(v-d)),f.push(c),u=_,d=v}const g=r*c,m=Xp(f,g);m<0?(l=(g-f[-m-2])/(f[-m-1]-f[-m-2]),a=t+(-m-2)*n):a=t+m*n}s=s>1?s:2,o=o||new Array(s);for(let u=0;u<s;++u)o[u]=a===void 0?NaN:l===void 0?i[a+u]:ki(i[a+u],i[a+n+u],l);return o}function Sh(i,t,e,n,r,o){if(e==t)return null;let s;if(r<i[t+n-1])return o?(s=i.slice(t,t+n),s[n-1]=r,s):null;if(i[e-1]<r)return o?(s=i.slice(e-n,e),s[n-1]=r,s):null;if(r==i[t+n-1])return i.slice(t,t+n);let a=t/n,l=e/n;for(;a<l;){const c=a+l>>1;r<i[(c+1)*n-1]?l=c:a=c+1}const h=i[a*n-1];if(r==h)return i.slice((a-1)*n,(a-1)*n+n);const u=i[(a+1)*n-1],d=(r-h)/(u-h);s=[];for(let c=0;c<n-1;++c)s.push(ki(i[(a-1)*n+c],i[a*n+c],d));return s.push(r),s}function U_(i,t,e,n,r,o,s){if(s)return Sh(i,t,e[e.length-1],n,r,o);let a;if(r<i[n-1])return o?(a=i.slice(0,n),a[n-1]=r,a):null;if(i[i.length-1]<r)return o?(a=i.slice(i.length-n),a[n-1]=r,a):null;for(let l=0,h=e.length;l<h;++l){const u=e[l];if(t!=u){if(r<i[t+n-1])return null;if(r<=i[u-1])return Sh(i,t,u,n,r,!1);t=u}}return null}function of(i,t,e,n){let r=i[t],o=i[t+1],s=0;for(let a=t+n;a<e;a+=n){const l=i[a],h=i[a+1];s+=Math.sqrt((l-r)*(l-r)+(h-o)*(h-o)),r=l,o=h}return s}class ha extends Qi{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendCoordinate(t){this.flatCoordinates?li(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()}clone(){const t=new ha(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),sh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,n,r))}forEachSegment(t){return Bc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return this.layout!="XYM"&&this.layout!="XYZM"?null:(e=e!==void 0?e:!1,Sh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return la(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return of(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){const e=[];return e.length=hh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new ha(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return na(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ea(this.flatCoordinates,0,t,this.stride),this.changed()}}const Kn=ha;class ua extends Qi{constructor(t,e,n){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(e!==void 0&&n)this.setFlatCoordinates(e,t),this.ends_=n;else{let r=this.getLayout();const o=t,s=[],a=[];for(let l=0,h=o.length;l<h;++l){const u=o[l];l===0&&(r=u.getLayout()),li(s,u.getFlatCoordinates()),a.push(s.length)}this.setFlatCoordinates(r,s),this.ends_=a}}appendLineString(t){this.flatCoordinates?li(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new ua(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(oh(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ah(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,n,r))}getCoordinateAtM(t,e,n){return this.layout!="XYM"&&this.layout!="XYZM"||this.flatCoordinates.length===0?null:(e=e!==void 0?e:!1,n=n!==void 0?n:!1,U_(this.flatCoordinates,0,this.ends_,this.stride,t,e,n))}getCoordinates(){return zo(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(t){return t<0||this.ends_.length<=t?null:new Kn(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLineStrings(){const t=this.flatCoordinates,e=this.ends_,n=this.layout,r=[];let o=0;for(let s=0,a=e.length;s<a;++s){const l=e[s],h=new Kn(t.slice(o,l),n);r.push(h),o=l}return r}getFlatMidpoints(){const t=[],e=this.flatCoordinates;let n=0;const r=this.ends_,o=this.stride;for(let s=0,a=r.length;s<a;++s){const l=r[s],h=la(e,n,l,o,.5);li(t,h),n=l}return t}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Dv(this.flatCoordinates,0,this.ends_,this.stride,t,e,0,n),new ua(e,"XY",n)}getType(){return"MultiLineString"}intersectsExtent(t){return jv(this.flatCoordinates,0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=lh(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}const Th=ua;class zh extends Qi{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){this.flatCoordinates?li(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()}clone(){const t=new zh(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){if(r<jn(this.getExtent(),t,e))return r;const o=this.flatCoordinates,s=this.stride;for(let a=0,l=o.length;a<l;a+=s){const h=On(t,e,o[a],o[a+1]);if(h<r){r=h;for(let u=0;u<s;++u)n[u]=o[a+u];n.length=s}}return r}getCoordinates(){return tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(t){const e=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||e<=t?null:new ni(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)}getPoints(){const t=this.flatCoordinates,e=this.layout,n=this.stride,r=[];for(let o=0,s=t.length;o<s;o+=n){const a=new ni(t.slice(o,o+n),e);r.push(a)}return r}getType(){return"MultiPoint"}intersectsExtent(t){const e=this.flatCoordinates,n=this.stride;for(let r=0,o=e.length;r<o;r+=n){const s=e[r],a=e[r+1];if(Tl(t,s,a))return!0}return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ea(this.flatCoordinates,0,t,this.stride),this.changed()}}const Po=zh;function sf(i,t,e,n){const r=[];let o=Ge();for(let s=0,a=e.length;s<a;++s){const l=e[s];o=Il(i,t,l[0],n),r.push((o[0]+o[2])/2,(o[1]+o[3])/2),t=l[l.length-1]}return r}class da extends Qi{constructor(t,e,n){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!n&&!Array.isArray(t[0])){let r=this.getLayout();const o=t,s=[],a=[];for(let l=0,h=o.length;l<h;++l){const u=o[l];l===0&&(r=u.getLayout());const d=s.length,c=u.getEnds();for(let f=0,g=c.length;f<g;++f)c[f]+=d;li(s,u.getFlatCoordinates()),a.push(c)}e=r,t=s,n=a}e!==void 0&&n?(this.setFlatCoordinates(e,t),this.endss_=n):this.setCoordinates(t,e)}appendPolygon(t){let e;if(!this.flatCoordinates)this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();else{const n=this.flatCoordinates.length;li(this.flatCoordinates,t.getFlatCoordinates()),e=t.getEnds().slice();for(let r=0,o=e.length;r<o;++r)e[r]+=n}this.endss_.push(e),this.changed()}clone(){const t=this.endss_.length,e=new Array(t);for(let r=0;r<t;++r)e[r]=this.endss_[r].slice();const n=new da(this.flatCoordinates.slice(),this.layout,e);return n.applyProperties(this),n}closestPointXY(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Rv(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Pv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,n,r))}containsXY(t,e){return Gv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return Ov(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),Xc(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,uh(e,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const t=sf(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=jc(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new Po(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;Vv(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Xc(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Fv(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),e,0,n),new da(e,"XY",n)}getPolygon(t){if(t<0||this.endss_.length<=t)return null;let e;if(t===0)e=0;else{const o=this.endss_[t-1];e=o[o.length-1]}const n=this.endss_[t].slice(),r=n[n.length-1];if(e!==0)for(let o=0,s=n.length;o<s;++o)n[o]-=e;return new Wn(this.flatCoordinates.slice(e,r),this.layout,n)}getPolygons(){const t=this.layout,e=this.flatCoordinates,n=this.endss_,r=[];let o=0;for(let s=0,a=n.length;s<a;++s){const l=n[s].slice(),h=l[l.length-1];if(o!==0)for(let d=0,c=l.length;d<c;++d)l[d]-=o;const u=new Wn(e.slice(o,h),t,l);r.push(u),o=h}return r}getType(){return"MultiPolygon"}intersectsExtent(t){return Bv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);const n=Av(this.flatCoordinates,0,t,this.stride,this.endss_);if(n.length===0)this.flatCoordinates.length=0;else{const r=n[n.length-1];this.flatCoordinates.length=r.length===0?0:r[r.length-1]}this.changed()}}const Ih=da;class Rh extends hi{constructor(t){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_),t)if(typeof t.getSimplifiedGeometry=="function"){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new Rh(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const n=this.getStyle();return n&&t.setStyle(n),t}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_&&(Ot(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=gt(t,tt.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?V_(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function V_(i){if(typeof i=="function")return i;{let t;return Array.isArray(i)?t=i:(ft(typeof i.getZIndex=="function",41),t=[i]),function(){return t}}}const Ti=Rh;class af{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}getReadOptions(t,e){if(e){let n=e.dataProjection?Gt(e.dataProjection):this.readProjection(t);e.extent&&n&&n.getUnits()==="tile-pixels"&&(n=Gt(n),n.setWorldExtent(e.extent)),e={dataProjection:n,featureProjection:e.featureProjection}}return this.adaptOptions(e)}adaptOptions(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)}getType(){return et()}readFeature(t,e){return et()}readFeatures(t,e){return et()}readGeometry(t,e){return et()}readProjection(t){return et()}writeFeature(t,e){return et()}writeFeatures(t,e){return et()}writeGeometry(t,e){return et()}}function Ph(i,t,e){const n=e?Gt(e.featureProjection):null,r=e?Gt(e.dataProjection):null;let o;if(n&&r&&!Vn(n,r)?o=(t?i.clone():i).transform(t?n:r,t?r:n):o=i,t&&e&&e.decimals!==void 0){const s=Math.pow(10,e.decimals),a=function(l){for(let h=0,u=l.length;h<u;++h)l[h]=Math.round(l[h]*s)/s;return l};o===i&&(o=i.clone()),o.applyTransform(a)}return o}class q_ extends af{constructor(){super()}getType(){return"json"}readFeature(t,e){return this.readFeatureFromObject(ca(t),this.getReadOptions(t,e))}readFeatures(t,e){return this.readFeaturesFromObject(ca(t),this.getReadOptions(t,e))}readFeatureFromObject(t,e){return et()}readFeaturesFromObject(t,e){return et()}readGeometry(t,e){return this.readGeometryFromObject(ca(t),this.getReadOptions(t,e))}readGeometryFromObject(t,e){return et()}readProjection(t){return this.readProjectionFromObject(ca(t))}readProjectionFromObject(t){return et()}writeFeature(t,e){return JSON.stringify(this.writeFeatureObject(t,e))}writeFeatureObject(t,e){return et()}writeFeatures(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))}writeFeaturesObject(t,e){return et()}writeGeometry(t,e){return JSON.stringify(this.writeGeometryObject(t,e))}writeGeometryObject(t,e){return et()}}function ca(i){if(typeof i=="string"){const t=JSON.parse(i);return t||null}else return i!==null?i:null}const X_=q_;class $_ extends X_{constructor(t){t=t||{},super(),this.dataProjection=Gt(t.dataProjection?t.dataProjection:"EPSG:4326"),t.featureProjection&&(this.defaultFeatureProjection=Gt(t.featureProjection)),this.geometryName_=t.geometryName,this.extractGeometryName_=t.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(t,e){let n=null;t.type==="Feature"?n=t:n={type:"Feature",geometry:t,properties:null};const r=Ah(n.geometry,e),o=new Ti;return this.geometryName_?o.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in n!==void 0&&o.setGeometryName(n.geometry_name),o.setGeometry(r),"id"in n&&o.setId(n.id),n.properties&&o.setProperties(n.properties,!0),o}readFeaturesFromObject(t,e){const n=t;let r=null;if(n.type==="FeatureCollection"){const o=t;r=[];const s=o.features;for(let a=0,l=s.length;a<l;++a)r.push(this.readFeatureFromObject(s[a],e))}else r=[this.readFeatureFromObject(t,e)];return r}readGeometryFromObject(t,e){return Ah(t,e)}readProjectionFromObject(t){const e=t.crs;let n;return e?e.type=="name"?n=Gt(e.properties.name):e.type==="EPSG"?n=Gt("EPSG:"+e.properties.code):ft(!1,36):n=this.dataProjection,n}writeFeatureObject(t,e){e=this.adaptOptions(e);const n={type:"Feature",geometry:null,properties:null},r=t.getId();if(r!==void 0&&(n.id=r),!t.hasProperties())return n;const o=t.getProperties(),s=t.getGeometry();return s&&(n.geometry=Dh(s,e),delete o[t.getGeometryName()]),Fn(o)||(n.properties=o),n}writeFeaturesObject(t,e){e=this.adaptOptions(e);const n=[];for(let r=0,o=t.length;r<o;++r)n.push(this.writeFeatureObject(t[r],e));return{type:"FeatureCollection",features:n}}writeGeometryObject(t,e){return Dh(t,this.adaptOptions(e))}}function Ah(i,t){if(!i)return null;let e;switch(i.type){case"Point":{e=Y_(i);break}case"LineString":{e=K_(i);break}case"Polygon":{e=Q_(i);break}case"MultiPoint":{e=H_(i);break}case"MultiLineString":{e=Z_(i);break}case"MultiPolygon":{e=J_(i);break}case"GeometryCollection":{e=W_(i);break}default:throw new Error("Unsupported GeoJSON type: "+i.type)}return Ph(e,!1,t)}function W_(i,t){const e=i.geometries.map(function(n){return Ah(n,t)});return new B_(e)}function Y_(i){return new ni(i.coordinates)}function K_(i){return new Kn(i.coordinates)}function Z_(i){return new Th(i.coordinates)}function H_(i){return new Po(i.coordinates)}function J_(i){return new Ih(i.coordinates)}function Q_(i){return new Wn(i.coordinates)}function Dh(i,t){i=Ph(i,!0,t);const e=i.getType();let n;switch(e){case"Point":{n=o1(i);break}case"LineString":{n=e1(i);break}case"Polygon":{n=s1(i,t);break}case"MultiPoint":{n=n1(i);break}case"MultiLineString":{n=i1(i);break}case"MultiPolygon":{n=r1(i,t);break}case"GeometryCollection":{n=t1(i,t);break}case"Circle":{n={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+e)}return n}function t1(i,t){t=Object.assign({},t),delete t.featureProjection;const e=i.getGeometriesArray().map(function(n){return Dh(n,t)});return{type:"GeometryCollection",geometries:e}}function e1(i,t){return{type:"LineString",coordinates:i.getCoordinates()}}function i1(i,t){return{type:"MultiLineString",coordinates:i.getCoordinates()}}function n1(i,t){return{type:"MultiPoint",coordinates:i.getCoordinates()}}function r1(i,t){let e;return t&&(e=t.rightHanded),{type:"MultiPolygon",coordinates:i.getCoordinates(e)}}function o1(i,t){return{type:"Point",coordinates:i.getCoordinates()}}function s1(i,t){let e;return t&&(e=t.rightHanded),{type:"Polygon",coordinates:i.getCoordinates(e)}}const Zn=$_;class Lh{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null}clone(){const t=this.getColor();return new Lh({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){this.color_=t}}const ge=Lh,Qt={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class Fh{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=be(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Fh({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,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 et()}getImage(t){return et()}getHitDetectionImage(){return et()}getPixelRatio(t){return 1}getImageState(){return et()}getImageSize(){return et()}getOrigin(){return et()}getSize(){return et()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=be(t)}listenImageChange(t){et()}load(){et()}unlistenImageChange(t){et()}}const lf=Fh;function hf(i,t,e){const n=i;let r=!0,o=!1,s=!1;const a=[Rs(n,tt.LOAD,function(){s=!0,o||t()})];return n.src&&n0?(o=!0,n.decode().then(function(){r&&t()}).catch(function(l){r&&(s?t():e())})):a.push(Rs(n,tt.ERROR,e)),function(){r=!1,a.forEach(Ot)}}let Ao=null;class a1 extends Is{constructor(t,e,n,r,o,s){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=r,this.canvas_={},this.color_=s,this.unlisten_=null,this.imageState_=o,this.size_=n,this.src_=e,this.tainted_}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===Qt.LOADED){Ao||(Ao=Pe(1,1)),Ao.drawImage(this.image_,0,0);try{Ao.getImageData(0,0,1,1),this.tainted_=!1}catch{Ao=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(tt.CHANGE)}handleImageError_(){this.imageState_=Qt.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=Qt.LOADED,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],n=Pe(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===Qt.IDLE){this.image_||this.initializeImage_(),this.imageState_=Qt.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=hf(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==Qt.LOADED)return;const e=this.image_,n=document.createElement("canvas");n.width=Math.ceil(e.width*t),n.height=Math.ceil(e.height*t);const r=n.getContext("2d");r.scale(t,t),r.drawImage(e,0,0),r.globalCompositeOperation="multiply",r.fillStyle=Yl(this.color_),r.fillRect(0,0,n.width/t,n.height/t),r.globalCompositeOperation="destination-in",r.drawImage(e,0,0),this.canvas_[t]=n}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function l1(i,t,e,n,r,o){let s=Ys.get(t,n,o);return s||(s=new a1(i,t,e,n,r,o),Ys.set(t,n,o,s)),s}class Oh extends lf{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,n=t.rotation!==void 0?t.rotation:0,r=t.scale!==void 0?t.scale:1,o=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:n,scale:r,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:o,declutterMode:t.declutterMode}),this.anchor_=t.anchor!==void 0?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=t.anchorOrigin!==void 0?t.anchorOrigin:"top-left",this.anchorXUnits_=t.anchorXUnits!==void 0?t.anchorXUnits:"fraction",this.anchorYUnits_=t.anchorYUnits!==void 0?t.anchorYUnits:"fraction",this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null;const s=t.img!==void 0?t.img:null;this.imgSize_=t.imgSize;let a=t.src;ft(!(a!==void 0&&s),4),ft(!s||s&&this.imgSize_,5),(a===void 0||a.length===0)&&s&&(a=s.src||K(s)),ft(a!==void 0&&a.length>0,6);const l=t.src!==void 0?Qt.IDLE:Qt.LOADED;this.color_=t.color!==void 0?ko(t.color):null,this.iconImage_=l1(s,a,this.imgSize_!==void 0?this.imgSize_:null,this.crossOrigin_,l,this.color_),this.offset_=t.offset!==void 0?t.offset:[0,0],this.offsetOrigin_=t.offsetOrigin!==void 0?t.offsetOrigin:"top-left",this.origin_=null,this.size_=t.size!==void 0?t.size:null}clone(){const t=this.getScale();return new Oh({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_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const r=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!r)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=r[0]),this.anchorYUnits_=="fraction"&&(t[1]*=r[1])}if(this.anchorOrigin_!="top-left"){if(!r)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+r[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+r[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]-e[0]/n[0],t[1]+e[1]/n[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if(this.offsetOrigin_!="top-left"){const e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(t[0]=n[0]-e[0]-t[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}listenImageChange(t){this.iconImage_.addEventListener(tt.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(tt.CHANGE,t)}}const fa=Oh;class Nh{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new Nh({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),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_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}const ke=Nh;function di(i){return Array.isArray(i)?xc(i):i}class Gh extends lf{constructor(t){const e=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:1,rotateWithView:e,rotation:t.rotation!==void 0?t.rotation:0,scale:t.scale!==void 0?t.scale:1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvas_=void 0,this.hitDetectionCanvas_=null,this.fill_=t.fill!==void 0?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=t.radius!==void 0?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=t.angle!==void 0?t.angle:0,this.stroke_=t.stroke!==void 0?t.stroke:null,this.size_=null,this.renderOptions_=null,this.render()}clone(){const t=this.getScale(),e=new Gh({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(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_;if(!t)return null;const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]/2-e[0]/n[0],t[1]/2+e[1]/n[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_}getImage(t){let e=this.canvas_[t];if(!e){const n=this.renderOptions_,r=Pe(n.size*t,n.size*t);this.draw_(n,r,t),e=r.canvas,this.canvas_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return Qt.LOADED}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,n){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let r=this.radius_,o=this.radius2_===void 0?r:this.radius2_;if(r<o){const w=r;r=o,o=w}const s=this.radius2_===void 0?this.points_:this.points_*2,a=2*Math.PI/s,l=o*Math.sin(a),h=Math.sqrt(o*o-l*l),u=r-h,d=Math.sqrt(l*l+u*u),c=d/l;if(t==="miter"&&c<=n)return c*e;const f=e/2/c,g=e/2*(u/d),p=Math.sqrt((r+f)*(r+f)+g*g)-r;if(this.radius2_===void 0||t==="bevel")return p*2;const _=r*Math.sin(a),v=Math.sqrt(r*r-_*_),y=o-v,k=Math.sqrt(_*_+y*y)/_;if(k<=n){const w=k*e/2-o-r;return 2*Math.max(p,w)}return p*2}createRenderOptions(){let t=Sr,e=0,n=null,r=0,o,s=0;this.stroke_&&(o=this.stroke_.getColor(),o===null&&(o=Co),o=di(o),s=this.stroke_.getWidth(),s===void 0&&(s=To),n=this.stroke_.getLineDash(),r=this.stroke_.getLineDashOffset(),t=this.stroke_.getLineJoin(),t===void 0&&(t=Sr),e=this.stroke_.getMiterLimit(),e===void 0&&(e=Mo));const a=this.calculateLineJoinSize_(t,s,e),l=Math.max(this.radius_,this.radius2_||0),h=Math.ceil(2*l+a);return{strokeStyle:o,strokeWidth:s,size:h,lineDash:n,lineDashOffset:r,lineJoin:t,miterLimit:e}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]}draw_(t,e,n){if(e.scale(n,n),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let r=this.fill_.getColor();r===null&&(r=Mi),e.fillStyle=di(r),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}createHitDetectionCanvas_(t){if(this.fill_){let e=this.fill_.getColor(),n=0;if(typeof e=="string"&&(e=ko(e)),e===null?n=1:Array.isArray(e)&&(n=e.length===4?e[3]:1),n===0){const r=Pe(t.size,t.size);this.hitDetectionCanvas_=r.canvas,this.drawHitDetectionCanvas_(t,r)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))}createPath_(t){let e=this.points_;const n=this.radius_;if(e===1/0)t.arc(0,0,n,0,2*Math.PI);else{const r=this.radius2_===void 0?n:this.radius2_;this.radius2_!==void 0&&(e*=2);const o=this.angle_-Math.PI/2,s=2*Math.PI/e;for(let a=0;a<e;a++){const l=o+a*s,h=a%2===0?n:r;t.lineTo(h*Math.cos(l),h*Math.sin(l))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=Mi,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}}const ga=Gh;class jh extends ga{constructor(t){t=t||{radius:5},super({points:1/0,fill:t.fill,radius:t.radius,stroke:t.stroke,scale:t.scale!==void 0?t.scale:1,rotation:t.rotation!==void 0?t.rotation:0,rotateWithView:t.rotateWithView!==void 0?t.rotateWithView:!1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new jh({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius_=t,this.render()}}const Hn=jh;class rn{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=df,t.geometry!==void 0&&this.setGeometry(t.geometry),this.fill_=t.fill!==void 0?t.fill:null,this.image_=t.image!==void 0?t.image:null,this.renderer_=t.renderer!==void 0?t.renderer:null,this.hitDetectionRenderer_=t.hitDetectionRenderer!==void 0?t.hitDetectionRenderer:null,this.stroke_=t.stroke!==void 0?t.stroke:null,this.text_=t.text!==void 0?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&typeof t=="object"&&(t=t.clone()),new rn({geometry:t,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){typeof t=="function"?this.geometryFunction_=t:typeof t=="string"?this.geometryFunction_=function(e){return e.get(t)}:t?t!==void 0&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=df,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function h1(i){let t;if(typeof i=="function")t=i;else{let e;Array.isArray(i)?e=i:(ft(typeof i.getZIndex=="function",41),e=[i]),t=function(){return e}}return t}let Bh=null;function u1(i,t){if(!Bh){const e=new ge({color:"rgba(255,255,255,0.4)"}),n=new ke({color:"#3399CC",width:1.25});Bh=[new rn({image:new Hn({fill:e,stroke:n,radius:5}),fill:e,stroke:n})]}return Bh}function uf(){const i={},t=[255,255,255,1],e=[0,153,255,1],n=3;return i.Polygon=[new rn({fill:new ge({color:[255,255,255,.5]})})],i.MultiPolygon=i.Polygon,i.LineString=[new rn({stroke:new ke({color:t,width:n+2})}),new rn({stroke:new ke({color:e,width:n})})],i.MultiLineString=i.LineString,i.Circle=i.Polygon.concat(i.LineString),i.Point=[new rn({image:new Hn({radius:n*2,fill:new ge({color:e}),stroke:new ke({color:t,width:n/2})}),zIndex:1/0})],i.MultiPoint=i.Point,i.GeometryCollection=i.Polygon.concat(i.LineString,i.Point),i}function df(i){return i.getGeometry()}const le=rn,d1="#333";class Uh{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=be(t.scale!==void 0?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.textBaseline_=t.textBaseline,this.fill_=t.fill!==void 0?t.fill:new ge({color:d1}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding}clone(){const t=this.getScale();return new Uh({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().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})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}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_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=be(t!==void 0?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const cf=Uh;function c1(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Vh={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Vh.read=function(i,t,e,n,r){var o,s,a=r*8-n-1,l=(1<<a)-1,h=l>>1,u=-7,d=e?r-1:0,c=e?-1:1,f=i[t+d];for(d+=c,o=f&(1<<-u)-1,f>>=-u,u+=a;u>0;o=o*256+i[t+d],d+=c,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=s*256+i[t+d],d+=c,u-=8);if(o===0)o=1-h;else{if(o===l)return s?NaN:(f?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-h}return(f?-1:1)*s*Math.pow(2,o-n)},Vh.write=function(i,t,e,n,r,o){var s,a,l,h=o*8-r-1,u=(1<<h)-1,d=u>>1,c=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,g=n?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+d>=1?t+=c/l:t+=c*Math.pow(2,1-d),t*l>=2&&(s++,l/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*l-1)*Math.pow(2,r),s=s+d):(a=t*Math.pow(2,d-1)*Math.pow(2,r),s=0));r>=8;i[e+f]=a&255,f+=g,a/=256,r-=8);for(s=s<<r|a,h+=r;h>0;i[e+f]=s&255,f+=g,s/=256,h-=8);i[e+f-g]|=m*128};var f1=Tt,ma=Vh;function Tt(i){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(i)?i:new Uint8Array(i||0),this.pos=0,this.type=0,this.length=this.buf.length}Tt.Varint=0,Tt.Fixed64=1,Tt.Bytes=2,Tt.Fixed32=5;var qh=(1<<16)*(1<<16),ff=1/qh,g1=12,gf=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Tt.prototype={destroy:function(){this.buf=null},readFields:function(i,t,e){for(e=e||this.length;this.pos<e;){var n=this.readVarint(),r=n>>3,o=this.pos;this.type=n&7,i(r,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(i,t){return this.readFields(i,t,this.readVarint()+this.pos)},readFixed32:function(){var i=pa(this.buf,this.pos);return this.pos+=4,i},readSFixed32:function(){var i=pf(this.buf,this.pos);return this.pos+=4,i},readFixed64:function(){var i=pa(this.buf,this.pos)+pa(this.buf,this.pos+4)*qh;return this.pos+=8,i},readSFixed64:function(){var i=pa(this.buf,this.pos)+pf(this.buf,this.pos+4)*qh;return this.pos+=8,i},readFloat:function(){var i=ma.read(this.buf,this.pos,!0,23,4);return this.pos+=4,i},readDouble:function(){var i=ma.read(this.buf,this.pos,!0,52,8);return this.pos+=8,i},readVarint:function(i){var t=this.buf,e,n;return n=t[this.pos++],e=n&127,n<128||(n=t[this.pos++],e|=(n&127)<<7,n<128)||(n=t[this.pos++],e|=(n&127)<<14,n<128)||(n=t[this.pos++],e|=(n&127)<<21,n<128)?e:(n=t[this.pos],e|=(n&15)<<28,m1(e,i,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var i=this.readVarint();return i%2===1?(i+1)/-2:i/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var i=this.readVarint()+this.pos,t=this.pos;return this.pos=i,i-t>=g1&&gf?z1(this.buf,t,i):T1(this.buf,t,i)},readBytes:function(){var i=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,i);return this.pos=i,t},readPackedVarint:function(i,t){if(this.type!==Tt.Bytes)return i.push(this.readVarint(t));var e=zi(this);for(i=i||[];this.pos<e;)i.push(this.readVarint(t));return i},readPackedSVarint:function(i){if(this.type!==Tt.Bytes)return i.push(this.readSVarint());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readSVarint());return i},readPackedBoolean:function(i){if(this.type!==Tt.Bytes)return i.push(this.readBoolean());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readBoolean());return i},readPackedFloat:function(i){if(this.type!==Tt.Bytes)return i.push(this.readFloat());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readFloat());return i},readPackedDouble:function(i){if(this.type!==Tt.Bytes)return i.push(this.readDouble());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readDouble());return i},readPackedFixed32:function(i){if(this.type!==Tt.Bytes)return i.push(this.readFixed32());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readFixed32());return i},readPackedSFixed32:function(i){if(this.type!==Tt.Bytes)return i.push(this.readSFixed32());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readSFixed32());return i},readPackedFixed64:function(i){if(this.type!==Tt.Bytes)return i.push(this.readFixed64());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readFixed64());return i},readPackedSFixed64:function(i){if(this.type!==Tt.Bytes)return i.push(this.readSFixed64());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readSFixed64());return i},skip:function(i){var t=i&7;if(t===Tt.Varint)for(;this.buf[this.pos++]>127;);else if(t===Tt.Bytes)this.pos=this.readVarint()+this.pos;else if(t===Tt.Fixed32)this.pos+=4;else if(t===Tt.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+t)},writeTag:function(i,t){this.writeVarint(i<<3|t)},realloc:function(i){for(var t=this.length||16;t<this.pos+i;)t*=2;if(t!==this.length){var e=new Uint8Array(t);e.set(this.buf),this.buf=e,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(i){this.realloc(4),Ar(this.buf,i,this.pos),this.pos+=4},writeSFixed32:function(i){this.realloc(4),Ar(this.buf,i,this.pos),this.pos+=4},writeFixed64:function(i){this.realloc(8),Ar(this.buf,i&-1,this.pos),Ar(this.buf,Math.floor(i*ff),this.pos+4),this.pos+=8},writeSFixed64:function(i){this.realloc(8),Ar(this.buf,i&-1,this.pos),Ar(this.buf,Math.floor(i*ff),this.pos+4),this.pos+=8},writeVarint:function(i){if(i=+i||0,i>268435455||i<0){p1(i,this);return}this.realloc(4),this.buf[this.pos++]=i&127|(i>127?128:0),!(i<=127)&&(this.buf[this.pos++]=(i>>>=7)&127|(i>127?128:0),!(i<=127)&&(this.buf[this.pos++]=(i>>>=7)&127|(i>127?128:0),!(i<=127)&&(this.buf[this.pos++]=i>>>7&127)))},writeSVarint:function(i){this.writeVarint(i<0?-i*2-1:i*2)},writeBoolean:function(i){this.writeVarint(Boolean(i))},writeString:function(i){i=String(i),this.realloc(i.length*4),this.pos++;var t=this.pos;this.pos=I1(this.buf,i,this.pos);var e=this.pos-t;e>=128&&mf(t,e,this),this.pos=t-1,this.writeVarint(e),this.pos+=e},writeFloat:function(i){this.realloc(4),ma.write(this.buf,i,this.pos,!0,23,4),this.pos+=4},writeDouble:function(i){this.realloc(8),ma.write(this.buf,i,this.pos,!0,52,8),this.pos+=8},writeBytes:function(i){var t=i.length;this.writeVarint(t),this.realloc(t);for(var e=0;e<t;e++)this.buf[this.pos++]=i[e]},writeRawMessage:function(i,t){this.pos++;var e=this.pos;i(t,this);var n=this.pos-e;n>=128&&mf(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeMessage:function(i,t,e){this.writeTag(i,Tt.Bytes),this.writeRawMessage(t,e)},writePackedVarint:function(i,t){t.length&&this.writeMessage(i,y1,t)},writePackedSVarint:function(i,t){t.length&&this.writeMessage(i,x1,t)},writePackedBoolean:function(i,t){t.length&&this.writeMessage(i,w1,t)},writePackedFloat:function(i,t){t.length&&this.writeMessage(i,b1,t)},writePackedDouble:function(i,t){t.length&&this.writeMessage(i,k1,t)},writePackedFixed32:function(i,t){t.length&&this.writeMessage(i,E1,t)},writePackedSFixed32:function(i,t){t.length&&this.writeMessage(i,M1,t)},writePackedFixed64:function(i,t){t.length&&this.writeMessage(i,C1,t)},writePackedSFixed64:function(i,t){t.length&&this.writeMessage(i,S1,t)},writeBytesField:function(i,t){this.writeTag(i,Tt.Bytes),this.writeBytes(t)},writeFixed32Field:function(i,t){this.writeTag(i,Tt.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(i,t){this.writeTag(i,Tt.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(i,t){this.writeTag(i,Tt.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(i,t){this.writeTag(i,Tt.Fixed64),this.writeSFixed64(t)},writeVarintField:function(i,t){this.writeTag(i,Tt.Varint),this.writeVarint(t)},writeSVarintField:function(i,t){this.writeTag(i,Tt.Varint),this.writeSVarint(t)},writeStringField:function(i,t){this.writeTag(i,Tt.Bytes),this.writeString(t)},writeFloatField:function(i,t){this.writeTag(i,Tt.Fixed32),this.writeFloat(t)},writeDoubleField:function(i,t){this.writeTag(i,Tt.Fixed64),this.writeDouble(t)},writeBooleanField:function(i,t){this.writeVarintField(i,Boolean(t))}};function m1(i,t,e){var n=e.buf,r,o;if(o=n[e.pos++],r=(o&112)>>4,o<128||(o=n[e.pos++],r|=(o&127)<<3,o<128)||(o=n[e.pos++],r|=(o&127)<<10,o<128)||(o=n[e.pos++],r|=(o&127)<<17,o<128)||(o=n[e.pos++],r|=(o&127)<<24,o<128)||(o=n[e.pos++],r|=(o&1)<<31,o<128))return Pr(i,r,t);throw new Error("Expected varint not more than 10 bytes")}function zi(i){return i.type===Tt.Bytes?i.readVarint()+i.pos:i.pos+1}function Pr(i,t,e){return e?t*4294967296+(i>>>0):(t>>>0)*4294967296+(i>>>0)}function p1(i,t){var e,n;if(i>=0?(e=i%4294967296|0,n=i/4294967296|0):(e=~(-i%4294967296),n=~(-i/4294967296),e^4294967295?e=e+1|0:(e=0,n=n+1|0)),i>=18446744073709552e3||i<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),v1(e,n,t),_1(n,t)}function v1(i,t,e){e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos]=i&127}function _1(i,t){var e=(i&7)<<4;t.buf[t.pos++]|=e|((i>>>=3)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127)))))}function mf(i,t,e){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(Math.LN2*7));e.realloc(n);for(var r=e.pos-1;r>=i;r--)e.buf[r+n]=e.buf[r]}function y1(i,t){for(var e=0;e<i.length;e++)t.writeVarint(i[e])}function x1(i,t){for(var e=0;e<i.length;e++)t.writeSVarint(i[e])}function b1(i,t){for(var e=0;e<i.length;e++)t.writeFloat(i[e])}function k1(i,t){for(var e=0;e<i.length;e++)t.writeDouble(i[e])}function w1(i,t){for(var e=0;e<i.length;e++)t.writeBoolean(i[e])}function E1(i,t){for(var e=0;e<i.length;e++)t.writeFixed32(i[e])}function M1(i,t){for(var e=0;e<i.length;e++)t.writeSFixed32(i[e])}function C1(i,t){for(var e=0;e<i.length;e++)t.writeFixed64(i[e])}function S1(i,t){for(var e=0;e<i.length;e++)t.writeSFixed64(i[e])}function pa(i,t){return(i[t]|i[t+1]<<8|i[t+2]<<16)+i[t+3]*16777216}function Ar(i,t,e){i[e]=t,i[e+1]=t>>>8,i[e+2]=t>>>16,i[e+3]=t>>>24}function pf(i,t){return(i[t]|i[t+1]<<8|i[t+2]<<16)+(i[t+3]<<24)}function T1(i,t,e){for(var n="",r=t;r<e;){var o=i[r],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r+a>e)break;var l,h,u;a===1?o<128&&(s=o):a===2?(l=i[r+1],(l&192)===128&&(s=(o&31)<<6|l&63,s<=127&&(s=null))):a===3?(l=i[r+1],h=i[r+2],(l&192)===128&&(h&192)===128&&(s=(o&15)<<12|(l&63)<<6|h&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):a===4&&(l=i[r+1],h=i[r+2],u=i[r+3],(l&192)===128&&(h&192)===128&&(u&192)===128&&(s=(o&15)<<18|(l&63)<<12|(h&63)<<6|u&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,a=1):s>65535&&(s-=65536,n+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),n+=String.fromCharCode(s),r+=a}return n}function z1(i,t,e){return gf.decode(i.subarray(t,e))}function I1(i,t,e){for(var n=0,r,o;n<t.length;n++){if(r=t.charCodeAt(n),r>55295&&r<57344)if(o)if(r<56320){i[e++]=239,i[e++]=191,i[e++]=189,o=r;continue}else r=o-55296<<10|r-56320|65536,o=null;else{r>56319||n+1===t.length?(i[e++]=239,i[e++]=191,i[e++]=189):o=r;continue}else o&&(i[e++]=239,i[e++]=191,i[e++]=189,o=null);r<128?i[e++]=r:(r<2048?i[e++]=r>>6|192:(r<65536?i[e++]=r>>12|224:(i[e++]=r>>18|240,i[e++]=r>>12&63|128),i[e++]=r>>6&63|128),i[e++]=r&63|128)}return e}const vf=Ye();class Do{constructor(t,e,n,r,o){this.styleFunction,this.extent_,this.id_=o,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=n,this.properties_=r}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_=this.type_==="Point"?yo(this.flatCoordinates_):Il(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=Yi(this.getExtent());this.flatInteriorPoints_=fh(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=sf(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=jc(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=la(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const t=this.flatCoordinates_;let e=0;const n=this.ends_;for(let r=0,o=n.length;r<o;++r){const s=n[r],a=la(t,e,s,2,.5);li(this.flatMidpoints_,a),e=s}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(t){return this}simplifyTransformed(t,e){return this}getProperties(){return this.properties_}getStride(){return 2}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(t){t=Gt(t);const e=t.getExtent(),n=t.getWorldExtent();if(e&&n){const r=$e(n)/$e(e);Ei(vf,n[0],n[3],r,-r,0,0,0),Ji(this.flatCoordinates_,0,this.flatCoordinates_.length,2,vf,this.flatCoordinates_)}}getEnds(){return this.ends_}}Do.prototype.getEndss=Do.prototype.getEnds,Do.prototype.getFlatCoordinates=Do.prototype.getOrientedFlatCoordinates;const Xh=Do;class R1 extends af{constructor(t){super(),t=t||{},this.dataProjection=new Os({code:"",units:"tile-pixels"}),this.featureClass_=t.featureClass?t.featureClass:Xh,this.geometryName_=t.geometryName,this.layerName_=t.layerName?t.layerName:"layer",this.layers_=t.layers?t.layers:null,this.idProperty_=t.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(t,e,n,r){t.pos=e.geometry;const o=t.readVarint()+t.pos;let s=1,a=0,l=0,h=0,u=0,d=0;for(;t.pos<o;){if(!a){const c=t.readVarint();s=c&7,a=c>>3}a--,s===1||s===2?(l+=t.readSVarint(),h+=t.readSVarint(),s===1&&u>d&&(r.push(u),d=u),n.push(l,h),u+=2):s===7?u>d&&(n.push(n[d],n[d+1]),u+=2):ft(!1,59)}u>d&&(r.push(u),d=u)}createFeature_(t,e,n){const r=e.type;if(r===0)return null;let o;const s=e.properties;let a;this.idProperty_?(a=s[this.idProperty_],delete s[this.idProperty_]):a=e.id,s[this.layerName_]=e.layer.name;const l=[],h=[];this.readRawGeometry_(t,e,l,h);const u=F1(r,h.length);if(this.featureClass_===Xh)o=new this.featureClass_(u,l,h,s,a),o.transform(n.dataProjection);else{let d;if(u=="Polygon"){const g=qv(l,h);d=g.length>1?new Ih(l,"XY",g):new Wn(l,"XY",h)}else d=u==="Point"?new ni(l,"XY"):u==="LineString"?new Kn(l,"XY"):u==="MultiPoint"?new Po(l,"XY"):u==="MultiLineString"?new Th(l,"XY",h):null;const c=this.featureClass_;o=new c,this.geometryName_&&o.setGeometryName(this.geometryName_);const f=Ph(d,!1,n);o.setGeometry(f),a!==void 0&&o.setId(a),o.setProperties(s,!0)}return o}getType(){return"arraybuffer"}readFeatures(t,e){const n=this.layers_;e=this.adaptOptions(e);const r=Gt(e.dataProjection);r.setWorldExtent(e.extent),e.dataProjection=r;const o=new f1(t),s=o.readFields(P1,{}),a=[];for(const l in s){if(n&&!n.includes(l))continue;const h=s[l],u=h?[0,0,h.extent,h.extent]:null;r.setExtent(u);for(let d=0,c=h.length;d<c;++d){const f=L1(o,h,d),g=this.createFeature_(o,f,e);g!==null&&a.push(g)}}return a}readProjection(t){return this.dataProjection}setLayers(t){this.layers_=t}}function P1(i,t,e){if(i===3){const n={keys:[],values:[],features:[]},r=e.readVarint()+e.pos;e.readFields(A1,n,r),n.length=n.features.length,n.length&&(t[n.name]=n)}}function A1(i,t,e){if(i===15)t.version=e.readVarint();else if(i===1)t.name=e.readString();else if(i===5)t.extent=e.readVarint();else if(i===2)t.features.push(e.pos);else if(i===3)t.keys.push(e.readString());else if(i===4){let n=null;const r=e.readVarint()+e.pos;for(;e.pos<r;)i=e.readVarint()>>3,n=i===1?e.readString():i===2?e.readFloat():i===3?e.readDouble():i===4?e.readVarint64():i===5?e.readVarint():i===6?e.readSVarint():i===7?e.readBoolean():null;t.values.push(n)}}function D1(i,t,e){if(i==1)t.id=e.readVarint();else if(i==2){const n=e.readVarint()+e.pos;for(;e.pos<n;){const r=t.layer.keys[e.readVarint()],o=t.layer.values[e.readVarint()];t.properties[r]=o}}else i==3?t.type=e.readVarint():i==4&&(t.geometry=e.pos)}function L1(i,t,e){i.pos=t.features[e];const n=i.readVarint()+i.pos,r={layer:t,type:0,properties:{}};return i.readFields(D1,r,n),r}function F1(i,t){let e;return i===1?e=t===1?"Point":"MultiPoint":i===2?e=t===1?"LineString":"MultiLineString":i===3&&(e="Polygon"),e}const O1=R1;function N1(i,t,e,n,r){_f(i,t,e||0,n||i.length-1,r||G1)}function _f(i,t,e,n,r){for(;n>e;){if(n-e>600){var o=n-e+1,s=t-e+1,a=Math.log(o),l=.5*Math.exp(2*a/3),h=.5*Math.sqrt(a*l*(o-l)/o)*(s-o/2<0?-1:1),u=Math.max(e,Math.floor(t-s*l/o+h)),d=Math.min(n,Math.floor(t+(o-s)*l/o+h));_f(i,t,u,d,r)}var c=i[t],f=e,g=n;for(Lo(i,e,t),r(i[n],c)>0&&Lo(i,e,n);f<g;){for(Lo(i,f,g),f++,g--;r(i[f],c)<0;)f++;for(;r(i[g],c)>0;)g--}r(i[e],c)===0?Lo(i,e,g):(g++,Lo(i,g,n)),g<=t&&(e=g+1),t<=g&&(n=g-1)}}function Lo(i,t,e){var n=i[t];i[t]=i[e],i[e]=n}function G1(i,t){return i<t?-1:i>t?1:0}class yf{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const n=[];if(!_a(t,e))return n;const r=this.toBBox,o=[];for(;e;){for(let s=0;s<e.children.length;s++){const a=e.children[s],l=e.leaf?r(a):a;_a(t,l)&&(e.leaf?n.push(a):Wh(t,l)?this._all(a,n):o.push(a))}e=o.pop()}return n}collides(t){let e=this.data;if(!_a(t,e))return!1;const n=[];for(;e;){for(let r=0;r<e.children.length;r++){const o=e.children[r],s=e.leaf?this.toBBox(o):o;if(_a(t,s)){if(e.leaf||Wh(t,s))return!0;n.push(o)}}e=n.pop()}return!1}load(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(let n=0;n<t.length;n++)this.insert(t[n]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(!this.data.children.length)this.data=e;else if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){const n=this.data;this.data=e,e=n}this._insert(e,this.data.height-e.height-1,!0)}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=Lr([]),this}remove(t,e){if(!t)return this;let n=this.data;const r=this.toBBox(t),o=[],s=[];let a,l,h;for(;n||o.length;){if(n||(n=o.pop(),l=o[o.length-1],a=s.pop(),h=!0),n.leaf){const u=j1(t,n.children,e);if(u!==-1)return n.children.splice(u,1),o.push(n),this._condense(o),this}!h&&!n.leaf&&Wh(n,r)?(o.push(n),s.push(a),a=0,l=n,n=n.children[0]):l?(a++,n=l.children[a],h=!1):n=null}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){const n=[];for(;t;)t.leaf?e.push(...t.children):n.push(...t.children),t=n.pop();return e}_build(t,e,n,r){const o=n-e+1;let s=this._maxEntries,a;if(o<=s)return a=Lr(t.slice(e,n+1)),Dr(a,this.toBBox),a;r||(r=Math.ceil(Math.log(o)/Math.log(s)),s=Math.ceil(o/Math.pow(s,r-1))),a=Lr([]),a.leaf=!1,a.height=r;const l=Math.ceil(o/s),h=l*Math.ceil(Math.sqrt(s));xf(t,e,n,h,this.compareMinX);for(let u=e;u<=n;u+=h){const d=Math.min(u+h-1,n);xf(t,u,d,l,this.compareMinY);for(let c=u;c<=d;c+=l){const f=Math.min(c+l-1,d);a.children.push(this._build(t,c,f,r-1))}}return Dr(a,this.toBBox),a}_chooseSubtree(t,e,n,r){for(;r.push(e),!(e.leaf||r.length-1===n);){let o=1/0,s=1/0,a;for(let l=0;l<e.children.length;l++){const h=e.children[l],u=$h(h),d=V1(t,h)-u;d<s?(s=d,o=u<o?u:o,a=h):d===s&&u<o&&(o=u,a=h)}e=a||e.children[0]}return e}_insert(t,e,n){const r=n?t:this.toBBox(t),o=[],s=this._chooseSubtree(r,this.data,e,o);for(s.children.push(t),Oo(s,r);e>=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(r,o,e)}_split(t,e){const n=t[e],r=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,r);const s=this._chooseSplitIndex(n,o,r),a=Lr(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,Dr(n,this.toBBox),Dr(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this.data=Lr([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Dr(this.data,this.toBBox)}_chooseSplitIndex(t,e,n){let r,o=1/0,s=1/0;for(let a=e;a<=n-e;a++){const l=Fo(t,0,a,this.toBBox),h=Fo(t,a,n,this.toBBox),u=q1(l,h),d=$h(l)+$h(h);u<o?(o=u,r=a,s=d<s?d:s):u===o&&d<s&&(s=d,r=a)}return r||n-e}_chooseSplitAxis(t,e,n){const r=t.leaf?this.compareMinX:B1,o=t.leaf?this.compareMinY:U1,s=this._allDistMargin(t,e,n,r),a=this._allDistMargin(t,e,n,o);s<a&&t.children.sort(r)}_allDistMargin(t,e,n,r){t.children.sort(r);const o=this.toBBox,s=Fo(t,0,e,o),a=Fo(t,n-e,n,o);let l=va(s)+va(a);for(let h=e;h<n-e;h++){const u=t.children[h];Oo(s,t.leaf?o(u):u),l+=va(s)}for(let h=n-e-1;h>=e;h--){const u=t.children[h];Oo(a,t.leaf?o(u):u),l+=va(a)}return l}_adjustParentBBoxes(t,e,n){for(let r=n;r>=0;r--)Oo(e[r],t)}_condense(t){for(let e=t.length-1,n;e>=0;e--)t[e].children.length===0?e>0?(n=t[e-1].children,n.splice(n.indexOf(t[e]),1)):this.clear():Dr(t[e],this.toBBox)}}function j1(i,t,e){if(!e)return t.indexOf(i);for(let n=0;n<t.length;n++)if(e(i,t[n]))return n;return-1}function Dr(i,t){Fo(i,0,i.children.length,t,i)}function Fo(i,t,e,n,r){r||(r=Lr(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let o=t;o<e;o++){const s=i.children[o];Oo(r,i.leaf?n(s):s)}return r}function Oo(i,t){return i.minX=Math.min(i.minX,t.minX),i.minY=Math.min(i.minY,t.minY),i.maxX=Math.max(i.maxX,t.maxX),i.maxY=Math.max(i.maxY,t.maxY),i}function B1(i,t){return i.minX-t.minX}function U1(i,t){return i.minY-t.minY}function $h(i){return(i.maxX-i.minX)*(i.maxY-i.minY)}function va(i){return i.maxX-i.minX+(i.maxY-i.minY)}function V1(i,t){return(Math.max(t.maxX,i.maxX)-Math.min(t.minX,i.minX))*(Math.max(t.maxY,i.maxY)-Math.min(t.minY,i.minY))}function q1(i,t){const e=Math.max(i.minX,t.minX),n=Math.max(i.minY,t.minY),r=Math.min(i.maxX,t.maxX),o=Math.min(i.maxY,t.maxY);return Math.max(0,r-e)*Math.max(0,o-n)}function Wh(i,t){return i.minX<=t.minX&&i.minY<=t.minY&&t.maxX<=i.maxX&&t.maxY<=i.maxY}function _a(i,t){return t.minX<=i.maxX&&t.minY<=i.maxY&&t.maxX>=i.minX&&t.maxY>=i.minY}function Lr(i){return{children:i,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function xf(i,t,e,n,r){const o=[t,e];for(;o.length;){if(e=o.pop(),t=o.pop(),e-t<=n)continue;const s=t+Math.ceil((e-t)/n/2)*n;N1(i,s,t,e,r),o.push(t,s,s,e)}}function bf(i){return new le({fill:No(i,""),stroke:Go(i,""),text:X1(i),image:$1(i)})}function No(i,t){const e=i[t+"fill-color"];if(!!e)return new ge({color:e})}function Go(i,t){const e=i[t+"stroke-width"],n=i[t+"stroke-color"];if(!(!e&&!n))return new ke({width:e,color:n,lineCap:i[t+"stroke-line-cap"],lineJoin:i[t+"stroke-line-join"],lineDash:i[t+"stroke-line-dash"],lineDashOffset:i[t+"stroke-line-dash-offset"],miterLimit:i[t+"stroke-miter-limit"]})}function X1(i){const t=i["text-value"];return t?new cf({text:t,font:i["text-font"],maxAngle:i["text-max-angle"],offsetX:i["text-offset-x"],offsetY:i["text-offset-y"],overflow:i["text-overflow"],placement:i["text-placement"],scale:i["text-scale"],rotateWithView:i["text-rotate-with-view"],rotation:i["text-rotation"],textAlign:i["text-align"],justify:i["text-justify"],textBaseline:i["text-baseline"],padding:i["text-padding"],fill:No(i,"text-"),backgroundFill:No(i,"text-background-"),stroke:Go(i,"text-"),backgroundStroke:Go(i,"text-background-")}):void 0}function $1(i){const t=i["icon-src"],e=i["icon-img"];if(t||e)return new fa({src:t,img:e,imgSize:i["icon-img-size"],anchor:i["icon-anchor"],anchorOrigin:i["icon-anchor-origin"],anchorXUnits:i["icon-anchor-x-units"],anchorYUnits:i["icon-anchor-y-units"],color:i["icon-color"],crossOrigin:i["icon-cross-origin"],offset:i["icon-offset"],displacement:i["icon-displacement"],opacity:i["icon-opacity"],scale:i["icon-scale"],rotation:i["icon-rotation"],rotateWithView:i["icon-rotate-with-view"],size:i["icon-size"],declutterMode:i["icon-declutter-mode"]});const n=i["shape-points"];if(n){const o="shape-";return new ga({points:n,fill:No(i,o),stroke:Go(i,o),radius:i["shape-radius"],radius1:i["shape-radius1"],radius2:i["shape-radius2"],angle:i["shape-angle"],displacement:i["shape-displacement"],rotation:i["shape-rotation"],rotateWithView:i["shape-rotate-with-view"],scale:i["shape-scale"],declutterMode:i["shape-declutter-mode"]})}const r=i["circle-radius"];if(r){const o="circle-";return new Hn({radius:r,fill:No(i,o),stroke:Go(i,o),displacement:i["circle-displacement"],scale:i["circle-scale"],rotation:i["circle-rotation"],rotateWithView:i["circle-rotate-with-view"],declutterMode:i["circle-declutter-mode"]})}}const kf={RENDER_ORDER:"renderOrder"};class W1 extends Fs{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter!==void 0?t.declutter:!1,this.renderBuffer_=t.renderBuffer!==void 0?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=t.updateWhileAnimating!==void 0?t.updateWhileAnimating:!1,this.updateWhileInteracting_=t.updateWhileInteracting!==void 0?t.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(kf.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t){t.declutterTree||(t.declutterTree=new yf(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(kf.RENDER_ORDER,t)}setStyle(t){let e;if(t===void 0)e=u1;else if(t===null)e=null;else if(typeof t=="function")e=t;else if(t instanceof le)e=t;else if(Array.isArray(t)){const n=t.length,r=new Array(n);for(let o=0;o<n;++o){const s=t[o];s instanceof le?r[o]=s:r[o]=bf(s)}e=r}else e=bf(t);this.style_=e,this.styleFunction_=t===null?void 0:h1(this.style_),this.changed()}}const wf=W1,jo={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},ya=[jo.FILL],on=[jo.STROKE],Jn=[jo.BEGIN_PATH],Ef=[jo.CLOSE_PATH],Q=jo;class Y1{drawCustom(t,e,n,r){}drawGeometry(t){}setStyle(t){}drawCircle(t,e){}drawFeature(t,e){}drawGeometryCollection(t,e){}drawLineString(t,e){}drawMultiLineString(t,e){}drawMultiPoint(t,e){}drawMultiPolygon(t,e){}drawPoint(t,e){}drawPolygon(t,e){}drawText(t,e){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}const Mf=Y1;class K1 extends Mf{constructor(t,e,n,r){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=r,this.maxLineWidth=0,this.resolution=n,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return e==1?t:t.map(function(n){return n*e})}appendFlatPointCoordinates(t,e){const n=this.getBufferedMaxExtent(),r=this.tmpCoordinate_,o=this.coordinates;let s=o.length;for(let a=0,l=t.length;a<l;a+=e)r[0]=t[a],r[1]=t[a+1],Gs(n,r)&&(o[s++]=r[0],o[s++]=r[1]);return s}appendFlatLineCoordinates(t,e,n,r,o,s){const a=this.coordinates;let l=a.length;const h=this.getBufferedMaxExtent();s&&(e+=r);let u=t[e],d=t[e+1];const c=this.tmpCoordinate_;let f=!0,g,m,p;for(g=e+r;g<n;g+=r)c[0]=t[g],c[1]=t[g+1],p=zl(h,c),p!==m?(f&&(a[l++]=u,a[l++]=d,f=!1),a[l++]=c[0],a[l++]=c[1]):p===ne.INTERSECTING?(a[l++]=c[0],a[l++]=c[1],f=!1):f=!0,u=c[0],d=c[1],m=p;return(o&&f||g===e+r)&&(a[l++]=u,a[l++]=d),l}drawCustomCoordinates_(t,e,n,r,o){for(let s=0,a=n.length;s<a;++s){const l=n[s],h=this.appendFlatLineCoordinates(t,e,l,r,!1,!1);o.push(h),e=l}return e}drawCustom(t,e,n,r){this.beginGeometry(t,e);const o=t.getType(),s=t.getStride(),a=this.coordinates.length;let l,h,u,d,c;switch(o){case"MultiPolygon":l=t.getOrientedFlatCoordinates(),d=[];const f=t.getEndss();c=0;for(let g=0,m=f.length;g<m;++g){const p=[];c=this.drawCustomCoordinates_(l,c,f[g],s,p),d.push(p)}this.instructions.push([Q.CUSTOM,a,d,t,n,uh]),this.hitDetectionInstructions.push([Q.CUSTOM,a,d,t,r||n,uh]);break;case"Polygon":case"MultiLineString":u=[],l=o=="Polygon"?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),c=this.drawCustomCoordinates_(l,0,t.getEnds(),s,u),this.instructions.push([Q.CUSTOM,a,u,t,n,zo]),this.hitDetectionInstructions.push([Q.CUSTOM,a,u,t,r||n,zo]);break;case"LineString":case"Circle":l=t.getFlatCoordinates(),h=this.appendFlatLineCoordinates(l,0,l.length,s,!1,!1),this.instructions.push([Q.CUSTOM,a,h,t,n,tn]),this.hitDetectionInstructions.push([Q.CUSTOM,a,h,t,r||n,tn]);break;case"MultiPoint":l=t.getFlatCoordinates(),h=this.appendFlatPointCoordinates(l,s),h>a&&(this.instructions.push([Q.CUSTOM,a,h,t,n,tn]),this.hitDetectionInstructions.push([Q.CUSTOM,a,h,t,r||n,tn]));break;case"Point":l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),h=this.coordinates.length,this.instructions.push([Q.CUSTOM,a,h,t,n]),this.hitDetectionInstructions.push([Q.CUSTOM,a,h,t,r||n]);break}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[Q.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Q.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;t.reverse();let e;const n=t.length;let r,o,s=-1;for(e=0;e<n;++e)r=t[e],o=r[0],o==Q.END_GEOMETRY?s=e:o==Q.BEGIN_GEOMETRY&&(r[2]=e,$p(this.hitDetectionInstructions,s,e),s=-1)}setFillStrokeStyle(t,e){const n=this.state;if(t){const r=t.getColor();n.fillStyle=di(r||Mi)}else n.fillStyle=void 0;if(e){const r=e.getColor();n.strokeStyle=di(r||Co);const o=e.getLineCap();n.lineCap=o!==void 0?o:Ks;const s=e.getLineDash();n.lineDash=s?s.slice():wo;const a=e.getLineDashOffset();n.lineDashOffset=a||Eo;const l=e.getLineJoin();n.lineJoin=l!==void 0?l:Sr;const h=e.getWidth();n.lineWidth=h!==void 0?h:To;const u=e.getMiterLimit();n.miterLimit=u!==void 0?u:Mo,n.lineWidth>this.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0}createFill(t){const e=t.fillStyle,n=[Q.SET_FILL_STYLE,e];return typeof e!="string"&&n.push(!0),n}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[Q.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const n=t.fillStyle;(typeof n!="string"||t.currentFillStyle!=n)&&(n!==void 0&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)}updateStrokeStyle(t,e){const n=t.strokeStyle,r=t.lineCap,o=t.lineDash,s=t.lineDashOffset,a=t.lineJoin,l=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=r||o!=t.currentLineDash&&!Vi(t.currentLineDash,o)||t.currentLineDashOffset!=s||t.currentLineJoin!=a||t.currentLineWidth!=l||t.currentMiterLimit!=h)&&(n!==void 0&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=r,t.currentLineDash=o,t.currentLineDashOffset=s,t.currentLineJoin=a,t.currentLineWidth=l,t.currentMiterLimit=h)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[Q.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=ec(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;ui(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const Bo=K1;class Z1 extends Bo{constructor(t,e,n,r){super(t,e,n,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(t,e){if(!this.image_)return;this.beginGeometry(t,e);const n=t.getFlatCoordinates(),r=t.getStride(),o=this.coordinates.length,s=this.appendFlatPointCoordinates(n,r);this.instructions.push([Q.DRAW_IMAGE,o,s,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([Q.DRAW_IMAGE,o,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const n=t.getFlatCoordinates(),r=t.getStride(),o=this.coordinates.length,s=this.appendFlatPointCoordinates(n,r);this.instructions.push([Q.DRAW_IMAGE,o,s,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([Q.DRAW_IMAGE,o,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}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(t,e){const n=t.getAnchor(),r=t.getSize(),o=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=r[1],this.opacity_=t.getOpacity(),this.originX_=o[0],this.originY_=o[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=r[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const H1=Z1;class J1 extends Bo{constructor(t,e,n,r){super(t,e,n,r)}drawFlatCoordinates_(t,e,n,r){const o=this.coordinates.length,s=this.appendFlatLineCoordinates(t,e,n,r,!1,!1),a=[Q.MOVE_TO_LINE_TO,o,s];return this.instructions.push(a),this.hitDetectionInstructions.push(a),n}drawLineString(t,e){const n=this.state,r=n.strokeStyle,o=n.lineWidth;if(r===void 0||o===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,wo,Eo],Jn);const s=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(s,0,s.length,a),this.hitDetectionInstructions.push(on),this.endGeometry(e)}drawMultiLineString(t,e){const n=this.state,r=n.strokeStyle,o=n.lineWidth;if(r===void 0||o===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],Jn);const s=t.getEnds(),a=t.getFlatCoordinates(),l=t.getStride();let h=0;for(let u=0,d=s.length;u<d;++u)h=this.drawFlatCoordinates_(a,h,s[u],l);this.hitDetectionInstructions.push(on),this.endGeometry(e)}finish(){const t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(on),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(on),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(Jn)}}const Q1=J1;class ty extends Bo{constructor(t,e,n,r){super(t,e,n,r)}drawFlatCoordinatess_(t,e,n,r){const o=this.state,s=o.fillStyle!==void 0,a=o.strokeStyle!==void 0,l=n.length;this.instructions.push(Jn),this.hitDetectionInstructions.push(Jn);for(let h=0;h<l;++h){const u=n[h],d=this.coordinates.length,c=this.appendFlatLineCoordinates(t,e,u,r,!0,!a),f=[Q.MOVE_TO_LINE_TO,d,c];this.instructions.push(f),this.hitDetectionInstructions.push(f),a&&(this.instructions.push(Ef),this.hitDetectionInstructions.push(Ef)),e=u}return s&&(this.instructions.push(ya),this.hitDetectionInstructions.push(ya)),a&&(this.instructions.push(on),this.hitDetectionInstructions.push(on)),e}drawCircle(t,e){const n=this.state,r=n.fillStyle,o=n.strokeStyle;if(r===void 0&&o===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_FILL_STYLE,Mi]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);const s=t.getFlatCoordinates(),a=t.getStride(),l=this.coordinates.length;this.appendFlatLineCoordinates(s,0,s.length,a,!1,!1);const h=[Q.CIRCLE,l];this.instructions.push(Jn,h),this.hitDetectionInstructions.push(Jn,h),n.fillStyle!==void 0&&(this.instructions.push(ya),this.hitDetectionInstructions.push(ya)),n.strokeStyle!==void 0&&(this.instructions.push(on),this.hitDetectionInstructions.push(on)),this.endGeometry(e)}drawPolygon(t,e){const n=this.state,r=n.fillStyle,o=n.strokeStyle;if(r===void 0&&o===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_FILL_STYLE,Mi]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);const s=t.getEnds(),a=t.getOrientedFlatCoordinates(),l=t.getStride();this.drawFlatCoordinatess_(a,0,s,l),this.endGeometry(e)}drawMultiPolygon(t,e){const n=this.state,r=n.fillStyle,o=n.strokeStyle;if(r===void 0&&o===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_FILL_STYLE,Mi]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);const s=t.getEndss(),a=t.getOrientedFlatCoordinates(),l=t.getStride();let h=0;for(let u=0,d=s.length;u<d;++u)h=this.drawFlatCoordinatess_(a,h,s[u],l);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(t!==0){const e=this.coordinates;for(let n=0,r=e.length;n<r;++n)e[n]=Xn(e[n],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;t.fillStyle!==void 0&&this.updateFillStyle(t,this.createFill),t.strokeStyle!==void 0&&this.updateStrokeStyle(t,this.applyStroke)}}const Cf=ty;function ey(i,t,e,n,r){let o=e,s=e,a=0,l=0,h=e,u,d,c,f,g,m,p,_,v,y;for(d=e;d<n;d+=r){const x=t[d],k=t[d+1];g!==void 0&&(v=x-g,y=k-m,f=Math.sqrt(v*v+y*y),p!==void 0&&(l+=c,u=Math.acos((p*v+_*y)/(c*f)),u>i&&(l>a&&(a=l,o=h,s=d),l=0,h=d-r)),c=f,p=v,_=y),g=x,m=k}return l+=f,l>a?[h,d]:[o,s]}const Uo={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class iy extends Bo{constructor(t,e,n,r){super(t,e,n,r),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e){const n=this.textFillState_,r=this.textStrokeState_,o=this.textState_;if(this.text_===""||!o||!n&&!r)return;const s=this.coordinates;let a=s.length;const l=t.getType();let h=null,u=t.getStride();if(o.placement==="line"&&(l=="LineString"||l=="MultiLineString"||l=="Polygon"||l=="MultiPolygon")){if(!Kt(this.getBufferedMaxExtent(),t.getExtent()))return;let d;if(h=t.getFlatCoordinates(),l=="LineString")d=[h.length];else if(l=="MultiLineString")d=t.getEnds();else if(l=="Polygon")d=t.getEnds().slice(0,1);else if(l=="MultiPolygon"){const m=t.getEndss();d=[];for(let p=0,_=m.length;p<_;++p)d.push(m[p][0])}this.beginGeometry(t,e);const c=o.textAlign;let f=0,g;for(let m=0,p=d.length;m<p;++m){if(c==null){const v=ey(o.maxAngle,h,f,d[m],u);f=v[0],g=v[1]}else g=d[m];for(let v=f;v<g;v+=u)s.push(h[v],h[v+1]);const _=s.length;f=d[m],this.drawChars_(a,_),a=_}this.endGeometry(e)}else{let d=o.overflow?null:[];switch(l){case"Point":case"MultiPoint":h=t.getFlatCoordinates();break;case"LineString":h=t.getFlatMidpoint();break;case"Circle":h=t.getCenter();break;case"MultiLineString":h=t.getFlatMidpoints(),u=2;break;case"Polygon":h=t.getFlatInteriorPoint(),o.overflow||d.push(h[2]/this.resolution),u=3;break;case"MultiPolygon":const p=t.getFlatInteriorPoints();h=[];for(let _=0,v=p.length;_<v;_+=3)o.overflow||d.push(p[_+2]/this.resolution),h.push(p[_],p[_+1]);if(h.length===0)return;u=2;break}const c=this.appendFlatPointCoordinates(h,u);if(c===a)return;if(d&&(c-a)/2!==h.length/u){let p=a/2;d=d.filter((_,v)=>{const y=s[(p+v)*2]===h[v*u]&&s[(p+v)*2+1]===h[v*u+1];return y||--p,y})}this.saveTextStates_(),(o.backgroundFill||o.backgroundStroke)&&(this.setFillStrokeStyle(o.backgroundFill,o.backgroundStroke),o.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),o.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let f=o.padding;if(f!=qn&&(o.scale[0]<0||o.scale[1]<0)){let p=o.padding[0],_=o.padding[1],v=o.padding[2],y=o.padding[3];o.scale[0]<0&&(_=-_,y=-y),o.scale[1]<0&&(p=-p,v=-v),f=[p,_,v,y]}const g=this.pixelRatio;this.instructions.push([Q.DRAW_IMAGE,a,c,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,f==qn?qn:f.map(function(p){return p*g}),!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]);const m=1/g;this.hitDetectionInstructions.push([Q.DRAW_IMAGE,a,c,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[m,m],NaN,void 0,this.declutterImageWithText_,f,!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,n=this.textFillState_,r=this.strokeKey_;t&&(r in this.strokeStates||(this.strokeStates[r]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const o=this.textKey_;o in this.textStates||(this.textStates[o]={font:e.font,textAlign:e.textAlign||So,justify:e.justify,textBaseline:e.textBaseline||Zs,scale:e.scale});const s=this.fillKey_;n&&(s in this.fillStates||(this.fillStates[s]={fillStyle:n.fillStyle}))}drawChars_(t,e){const n=this.textStrokeState_,r=this.textState_,o=this.strokeKey_,s=this.textKey_,a=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,h=Uo[r.textBaseline],u=this.textOffsetY_*l,d=this.text_,c=n?n.lineWidth*Math.abs(r.scale[0])/2:0;this.instructions.push([Q.DRAW_CHARS,t,e,h,r.overflow,a,r.maxAngle,l,u,o,c*l,d,s,1]),this.hitDetectionInstructions.push([Q.DRAW_CHARS,t,e,h,r.overflow,a,r.maxAngle,1,u,o,c,d,s,1/l])}setTextStyle(t,e){let n,r,o;if(!t)this.text_="";else{const s=t.getFill();s?(r=this.textFillState_,r||(r={},this.textFillState_=r),r.fillStyle=di(s.getColor()||Mi)):(r=null,this.textFillState_=r);const a=t.getStroke();if(!a)o=null,this.textStrokeState_=o;else{o=this.textStrokeState_,o||(o={},this.textStrokeState_=o);const g=a.getLineDash(),m=a.getLineDashOffset(),p=a.getWidth(),_=a.getMiterLimit();o.lineCap=a.getLineCap()||Ks,o.lineDash=g?g.slice():wo,o.lineDashOffset=m===void 0?Eo:m,o.lineJoin=a.getLineJoin()||Sr,o.lineWidth=p===void 0?To:p,o.miterLimit=_===void 0?Mo:_,o.strokeStyle=di(a.getColor()||Co)}n=this.textState_;const l=t.getFont()||wc;nv(l);const h=t.getScaleArray();n.overflow=t.getOverflow(),n.font=l,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.justify=t.getJustify(),n.textBaseline=t.getTextBaseline()||Zs,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||qn,n.scale=h===void 0?[1,1]:h;const u=t.getOffsetX(),d=t.getOffsetY(),c=t.getRotateWithView(),f=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=u===void 0?0:u,this.textOffsetY_=d===void 0?0:d,this.textRotateWithView_=c===void 0?!1:c,this.textRotation_=f===void 0?0:f,this.strokeKey_=o?(typeof o.strokeStyle=="string"?o.strokeStyle:K(o.strokeStyle))+o.lineCap+o.lineDashOffset+"|"+o.lineWidth+o.lineJoin+o.miterLimit+"["+o.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=r?typeof r.fillStyle=="string"?r.fillStyle:"|"+K(r.fillStyle):""}this.declutterImageWithText_=e}}const ny={Circle:Cf,Default:Bo,Image:H1,LineString:Q1,Polygon:Cf,Text:iy};class ry{constructor(t,e,n,r){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=r,this.resolution_=n,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const n=this.buildersByZIndex_[e];for(const r in n){const o=n[r].finish();t[e][r]=o}}return t}getBuilder(t,e){const n=t!==void 0?t.toString():"0";let r=this.buildersByZIndex_[n];r===void 0&&(r={},this.buildersByZIndex_[n]=r);let o=r[e];if(o===void 0){const s=ny[e];o=new s(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),r[e]=o}return o}}const xa=ry;class oy extends jd{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return et()}getData(t){return null}prepareFrame(t){return et()}renderFrame(t,e){return et()}loadedTileCallback(t,e,n){t[e]||(t[e]={}),t[e][n.tileCoord.toString()]=n}createLoadedTileFinder(t,e,n){return function(r,o){const s=this.loadedTileCallback.bind(this,n,r);return t.forEachLoadedTile(e,r,o,s)}.bind(this)}forEachFeatureAtCoordinate(t,e,n,r,o){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){t.target.getState()===Qt.LOADED&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=Qt.LOADED&&e!=Qt.ERROR&&t.addEventListener(tt.CHANGE,this.boundHandleImageChange_),e==Qt.IDLE&&(t.load(),e=t.getState()),e==Qt.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const sy=oy,Sf=[];let Fr=null;function ay(){const i=document.createElement("canvas");i.width=1,i.height=1,Fr=i.getContext("2d")}class ly extends sy{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=Ye(),this.pixelTransform=Ye(),this.inversePixelTransform=Ye(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,n){Fr||ay(),Fr.clearRect(0,0,1,1);let r;try{Fr.drawImage(t,e,n,1,1,0,0,1,1),r=Fr.getImageData(0,0,1,1).data}catch{return Fr=null,null}return r}getBackground(t){let n=this.getLayer().getBackground();return typeof n=="function"&&(n=n(t.viewState.resolution)),n||void 0}useContainer(t,e,n){const r=this.getLayer().getClassName();let o,s;if(t&&t.className===r&&(!n||t&&t.style.backgroundColor&&Vi(ko(t.style.backgroundColor),ko(n)))){const a=t.firstElementChild;a instanceof HTMLCanvasElement&&(s=a.getContext("2d"))}if(s&&s.canvas.style.transform===e?(this.container=t,this.context=s,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){o=document.createElement("div"),o.className=r;let a=o.style;a.position="absolute",a.width="100%",a.height="100%",s=Pe();const l=s.canvas;o.appendChild(l),a=l.style,a.position="absolute",a.left="0",a.transformOrigin="top left",this.container=o,this.context=s}!this.containerReused&&n&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=n)}clipUnrotated(t,e,n){const r=Ki(n),o=Us(n),s=Bs(n),a=js(n);Jt(e.coordinateToPixelTransform,r),Jt(e.coordinateToPixelTransform,o),Jt(e.coordinateToPixelTransform,s),Jt(e.coordinateToPixelTransform,a);const l=this.inversePixelTransform;Jt(l,r),Jt(l,o),Jt(l,s),Jt(l,a),t.save(),t.beginPath(),t.moveTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.clip()}dispatchRenderEvent_(t,e,n){const r=this.getLayer();if(r.hasListener(t)){const o=new kc(t,this.inversePixelTransform,n,e);r.dispatchEvent(o)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_(Wi.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(Wi.POSTRENDER,t,e)}getRenderTransform(t,e,n,r,o,s,a){const l=o/2,h=s/2,u=r/e,d=-u,c=-t[0]+a,f=-t[1];return Ei(this.tempTransform,l,h,u,d,-n,c,f)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const Tf=ly;function hy(i,t,e,n,r,o,s,a,l,h,u,d){let c=i[t],f=i[t+1],g=0,m=0,p=0,_=0;function v(){g=c,m=f,t+=n,c=i[t],f=i[t+1],_+=p,p=Math.sqrt((c-g)*(c-g)+(f-m)*(f-m))}do v();while(t<e-n&&_+p<o);let y=p===0?0:(o-_)/p;const x=ki(g,c,y),k=ki(m,f,y),w=t-n,M=_,E=o+a*l(h,r,u);for(;t<e-n&&_+p<E;)v();y=p===0?0:(E-_)/p;const S=ki(g,c,y),I=ki(m,f,y);let A;if(d){const U=[x,k,S,I];nh(U,0,4,2,d,U,U),A=U[0]>U[2]}else A=x>S;const G=Math.PI,P=[],at=w+n===t;t=w,p=0,_=M,c=i[t],f=i[t+1];let j;if(at){v(),j=Math.atan2(f-m,c-g),A&&(j+=j>0?-G:G);const U=(S+x)/2,O=(I+k)/2;return P[0]=[U,O,(E-o)/2,j,r],P}r=r.replace(/\n/g," ");for(let U=0,O=r.length;U<O;){v();let W=Math.atan2(f-m,c-g);if(A&&(W+=W>0?-G:G),j!==void 0){let b=W-j;if(b+=b>G?-2*G:b<-G?2*G:0,Math.abs(b)>s)return null}j=W;const D=U;let Z=0;for(;U<O;++U){const b=A?O-U-1:U,T=a*l(h,r[b],u);if(t+n<e&&_+p<o+Z+T/2)break;Z+=T}if(U===D)continue;const V=A?r.substring(O-D,O-U):r.substring(D,U);y=p===0?0:(o+Z/2-_)/p;const z=ki(g,c,y),ot=ki(m,f,y);P.push([z,ot,Z/2,W,V]),o+=Z}return P}const Or=Ge(),sn=[],Ii=[],Ri=[],an=[];function zf(i){return i[3].declutterBox}const uy=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function If(i,t){return(t==="start"||t==="end")&&!uy.test(i)&&(t=t==="start"?"left":"right"),Uo[t]}function dy(i,t,e){return e>0&&i.push(`
43
+ `,""),i.push(t,""),i}class cy{constructor(t,e,n,r){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=r.instructions,this.coordinates=r.coordinates,this.coordinateCache_={},this.renderedTransform_=Ye(),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_={}}createLabel(t,e,n,r){const o=t+e+n+r;if(this.labels_[o])return this.labels_[o];const s=r?this.strokeStates[r]:null,a=n?this.fillStates[n]:null,l=this.textStates[e],h=this.pixelRatio,u=[l.scale[0]*h,l.scale[1]*h],d=Array.isArray(t),c=l.justify?Uo[l.justify]:If(Array.isArray(t)?t[0]:t,l.textAlign||So),f=r&&s.lineWidth?s.lineWidth:0,g=d?t:t.split(`
44
+ `).reduce(dy,[]),{width:m,height:p,widths:_,heights:v,lineWidths:y}=ov(l,g),x=m+f,k=[],w=(x+2)*u[0],M=(p+f)*u[1],E={width:w<0?Math.floor(w):Math.ceil(w),height:M<0?Math.floor(M):Math.ceil(M),contextInstructions:k};(u[0]!=1||u[1]!=1)&&k.push("scale",u),r&&(k.push("strokeStyle",s.strokeStyle),k.push("lineWidth",f),k.push("lineCap",s.lineCap),k.push("lineJoin",s.lineJoin),k.push("miterLimit",s.miterLimit),k.push("setLineDash",[s.lineDash]),k.push("lineDashOffset",s.lineDashOffset)),n&&k.push("fillStyle",a.fillStyle),k.push("textBaseline","middle"),k.push("textAlign","center");const S=.5-c;let I=c*x+S*f;const A=[],G=[];let P=0,at=0,j=0,U=0,O;for(let W=0,D=g.length;W<D;W+=2){const Z=g[W];if(Z===`
45
+ `){at+=P,P=0,I=c*x+S*f,++U;continue}const V=g[W+1]||l.font;V!==O&&(r&&A.push("font",V),n&&G.push("font",V),O=V),P=Math.max(P,v[j]);const z=[Z,I+S*_[j]+c*(_[j]-y[U]),.5*(f+P)+at];I+=_[j],r&&A.push("strokeText",z),n&&G.push("fillText",z),++j}return Array.prototype.push.apply(k,A),Array.prototype.push.apply(k,G),this.labels_[o]=E,E}replayTextBackground_(t,e,n,r,o,s,a){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,n),t.lineTo.apply(t,r),t.lineTo.apply(t,o),t.lineTo.apply(t,e),s&&(this.alignFill_=s[2],this.fill_(t)),a&&(this.setStrokeStyle_(t,a),t.stroke())}calculateImageOrLabelDimensions_(t,e,n,r,o,s,a,l,h,u,d,c,f,g,m,p){a*=c[0],l*=c[1];let _=n-a,v=r-l;const y=o+h>t?t-h:o,x=s+u>e?e-u:s,k=g[3]+y*c[0]+g[1],w=g[0]+x*c[1]+g[2],M=_-g[3],E=v-g[0];(m||d!==0)&&(sn[0]=M,an[0]=M,sn[1]=E,Ii[1]=E,Ii[0]=M+k,Ri[0]=Ii[0],Ri[1]=E+w,an[1]=Ri[1]);let S;return d!==0?(S=Ei(Ye(),n,r,1,1,d,-n,-r),Jt(S,sn),Jt(S,Ii),Jt(S,Ri),Jt(S,an),ti(Math.min(sn[0],Ii[0],Ri[0],an[0]),Math.min(sn[1],Ii[1],Ri[1],an[1]),Math.max(sn[0],Ii[0],Ri[0],an[0]),Math.max(sn[1],Ii[1],Ri[1],an[1]),Or)):ti(Math.min(M,M+k),Math.min(E,E+w),Math.max(M,M+k),Math.max(E,E+w),Or),f&&(_=Math.round(_),v=Math.round(v)),{drawImageX:_,drawImageY:v,drawImageW:y,drawImageH:x,originX:h,originY:u,declutterBox:{minX:Or[0],minY:Or[1],maxX:Or[2],maxY:Or[3],value:p},canvasTransform:S,scale:c}}replayImageOrLabel_(t,e,n,r,o,s,a){const l=!!(s||a),h=r.declutterBox,u=t.canvas,d=a?a[2]*r.scale[0]/2:0;return h.minX-d<=u.width/e&&h.maxX+d>=0&&h.minY-d<=u.height/e&&h.maxY+d>=0&&(l&&this.replayTextBackground_(t,sn,Ii,Ri,an,s,a),sv(t,r.canvasTransform,o,n,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0}fill_(t){if(this.alignFill_){const e=Jt(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(e[0]%n,e[1]%n),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,n,r){const o=this.textStates[e],s=this.createLabel(t,e,r,n),a=this.strokeStates[n],l=this.pixelRatio,h=If(Array.isArray(t)?t[0]:t,o.textAlign||So),u=Uo[o.textBaseline||Zs],d=a&&a.lineWidth?a.lineWidth:0,c=s.width/l-2*o.scale[0],f=h*c+2*(.5-h)*d,g=u*s.height/l+2*(.5-u)*d;return{label:s,anchorX:f,anchorY:g}}execute_(t,e,n,r,o,s,a,l){let h;this.pixelCoordinates_&&Vi(n,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=Ji(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),V0(this.renderedTransform_,n));let u=0;const d=r.length;let c=0,f,g,m,p,_,v,y,x,k,w,M,E,S=0,I=0,A=null,G=null;const P=this.coordinateCache_,at=this.viewRotation_,j=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,U={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:at},O=this.instructions!=r||this.overlaps?0:200;let W,D,Z,V;for(;u<d;){const z=r[u];switch(z[0]){case Q.BEGIN_GEOMETRY:W=z[1],V=z[3],W.getGeometry()?a!==void 0&&!Kt(a,V.getExtent())?u=z[2]+1:++u:u=z[2];break;case Q.BEGIN_PATH:S>O&&(this.fill_(t),S=0),I>O&&(t.stroke(),I=0),!S&&!I&&(t.beginPath(),p=NaN,_=NaN),++u;break;case Q.CIRCLE:c=z[1];const b=h[c],T=h[c+1],Y=h[c+2],C=h[c+3],H=Y-b,$=C-T,vt=Math.sqrt(H*H+$*$);t.moveTo(b+vt,T),t.arc(b,T,vt,0,2*Math.PI,!0),++u;break;case Q.CLOSE_PATH:t.closePath(),++u;break;case Q.CUSTOM:c=z[1],f=z[2];const Ct=z[3],_t=z[4],Mt=z.length==6?z[5]:void 0;U.geometry=Ct,U.feature=W,u in P||(P[u]=[]);const Lt=P[u];Mt?Mt(h,c,f,2,Lt):(Lt[0]=h[c],Lt[1]=h[c+1],Lt.length=2),_t(Lt,U),++u;break;case Q.DRAW_IMAGE:c=z[1],f=z[2],x=z[3],g=z[4],m=z[5];let Dt=z[6];const jt=z[7],F=z[8],ut=z[9],pt=z[10];let kt=z[11];const yt=z[12];let st=z[13];const nt=z[14],wt=z[15];if(!x&&z.length>=20){k=z[19],w=z[20],M=z[21],E=z[22];const de=this.drawLabelWithPointPlacement_(k,w,M,E);x=de.label,z[3]=x;const bi=z[23];g=(de.anchorX-bi)*this.pixelRatio,z[4]=g;const _e=z[24];m=(de.anchorY-_e)*this.pixelRatio,z[5]=m,Dt=x.height,z[6]=Dt,st=x.width,z[13]=st}let zt;z.length>25&&(zt=z[25]);let Bt,xt,dt;z.length>17?(Bt=z[16],xt=z[17],dt=z[18]):(Bt=qn,xt=!1,dt=!1),pt&&j?kt+=at:!pt&&!j&&(kt-=at);let Ft=0;for(;c<f;c+=2){if(zt&&zt[Ft++]<st/this.pixelRatio)continue;const de=this.calculateImageOrLabelDimensions_(x.width,x.height,h[c],h[c+1],st,Dt,g,m,F,ut,kt,yt,o,Bt,xt||dt,W),bi=[t,e,x,de,jt,xt?A:null,dt?G:null];if(l){if(nt==="none")continue;if(nt==="obstacle"){l.insert(de.declutterBox);continue}else{let _e,Xe;if(wt){const Ie=f-c;if(!wt[Ie]){wt[Ie]=bi;continue}if(_e=wt[Ie],delete wt[Ie],Xe=zf(_e),l.collides(Xe))continue}if(l.collides(de.declutterBox))continue;_e&&(l.insert(Xe),this.replayImageOrLabel_.apply(this,_e)),l.insert(de.declutterBox)}}this.replayImageOrLabel_.apply(this,bi)}++u;break;case Q.DRAW_CHARS:const St=z[1],ct=z[2],ue=z[3],Ve=z[4];E=z[5];const $t=z[6],ze=z[7],Ut=z[8];M=z[9];const Ht=z[10];k=z[11],w=z[12];const Tn=[z[13],z[13]],ae=this.textStates[w],qe=ae.font,ve=[ae.scale[0]*ze,ae.scale[1]*ze];let Oe;qe in this.widths_?Oe=this.widths_[qe]:(Oe={},this.widths_[qe]=Oe);const Ni=of(h,St,ct,2),sl=Math.abs(ve[0])*Mc(qe,k,Oe);if(Ve||sl<=Ni){const de=this.textStates[w].textAlign,bi=(Ni-sl)*Uo[de],_e=hy(h,St,ct,2,k,bi,$t,Math.abs(ve[0]),Mc,qe,Oe,j?0:this.viewRotation_);t:if(_e){const Xe=[];let Ie,ro,oo,ye,Re;if(M)for(Ie=0,ro=_e.length;Ie<ro;++Ie){Re=_e[Ie],oo=Re[4],ye=this.createLabel(oo,w,"",M),g=Re[2]+(ve[0]<0?-Ht:Ht),m=ue*ye.height+(.5-ue)*2*Ht*ve[1]/ve[0]-Ut;const ee=this.calculateImageOrLabelDimensions_(ye.width,ye.height,Re[0],Re[1],ye.width,ye.height,g,m,0,0,Re[3],Tn,!1,qn,!1,W);if(l&&l.collides(ee.declutterBox))break t;Xe.push([t,e,ye,ee,1,null,null])}if(E)for(Ie=0,ro=_e.length;Ie<ro;++Ie){Re=_e[Ie],oo=Re[4],ye=this.createLabel(oo,w,E,""),g=Re[2],m=ue*ye.height-Ut;const ee=this.calculateImageOrLabelDimensions_(ye.width,ye.height,Re[0],Re[1],ye.width,ye.height,g,m,0,0,Re[3],Tn,!1,qn,!1,W);if(l&&l.collides(ee.declutterBox))break t;Xe.push([t,e,ye,ee,1,null,null])}l&&l.load(Xe.map(zf));for(let ee=0,ys=Xe.length;ee<ys;++ee)this.replayImageOrLabel_.apply(this,Xe[ee])}}++u;break;case Q.END_GEOMETRY:if(s!==void 0){W=z[1];const de=s(W,V);if(de)return de}++u;break;case Q.FILL:O?S++:this.fill_(t),++u;break;case Q.MOVE_TO_LINE_TO:for(c=z[1],f=z[2],D=h[c],Z=h[c+1],v=D+.5|0,y=Z+.5|0,(v!==p||y!==_)&&(t.moveTo(D,Z),p=v,_=y),c+=2;c<f;c+=2)D=h[c],Z=h[c+1],v=D+.5|0,y=Z+.5|0,(c==f-2||v!==p||y!==_)&&(t.lineTo(D,Z),p=v,_=y);++u;break;case Q.SET_FILL_STYLE:A=z,this.alignFill_=z[2],S&&(this.fill_(t),S=0,I&&(t.stroke(),I=0)),t.fillStyle=z[1],++u;break;case Q.SET_STROKE_STYLE:G=z,I&&(t.stroke(),I=0),this.setStrokeStyle_(t,z),++u;break;case Q.STROKE:O?I++:t.stroke(),++u;break;default:++u;break}}S&&this.fill_(t),I&&t.stroke()}execute(t,e,n,r,o,s){this.viewRotation_=r,this.execute_(t,e,n,this.instructions,o,void 0,void 0,s)}executeHitDetection(t,e,n,r,o){return this.viewRotation_=n,this.execute_(t,1,e,this.hitDetectionInstructions,!0,r,o)}}const fy=cy,Yh=["Polygon","Circle","LineString","Image","Text","Default"];class gy{constructor(t,e,n,r,o,s){this.maxExtent_=t,this.overlaps_=r,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=s,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=Ye(),this.createExecutors_(o)}clip(t,e){const n=this.getClipCoords(e);t.beginPath(),t.moveTo(n[0],n[1]),t.lineTo(n[2],n[3]),t.lineTo(n[4],n[5]),t.lineTo(n[6],n[7]),t.clip()}createExecutors_(t){for(const e in t){let n=this.executorsByZIndex_[e];n===void 0&&(n={},this.executorsByZIndex_[e]=n);const r=t[e];for(const o in r){const s=r[o];n[o]=new fy(this.resolution_,this.pixelRatio_,this.overlaps_,s)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const n=this.executorsByZIndex_[e];for(let r=0,o=t.length;r<o;++r)if(t[r]in n)return!0}return!1}forEachFeatureAtCoordinate(t,e,n,r,o,s){r=Math.round(r);const a=r*2+1,l=Ei(this.hitDetectionTransform_,r+.5,r+.5,1/e,-1/e,-n,-t[0],-t[1]),h=!this.hitDetectionContext_;h&&(this.hitDetectionContext_=Pe(a,a));const u=this.hitDetectionContext_;u.canvas.width!==a||u.canvas.height!==a?(u.canvas.width=a,u.canvas.height=a):h||u.clearRect(0,0,a,a);let d;this.renderBuffer_!==void 0&&(d=Ge(),xo(d,t),ui(d,e*(this.renderBuffer_+r),d));const c=my(r);let f;function g(k,w){const M=u.getImageData(0,0,a,a).data;for(let E=0,S=c.length;E<S;E++)if(M[c[E]]>0){if(!s||f!=="Image"&&f!=="Text"||s.includes(k)){const I=(c[E]-3)/4,A=r-I%a,G=r-(I/a|0),P=o(k,w,A*A+G*G);if(P)return P}u.clearRect(0,0,a,a);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);m.sort(An);let p,_,v,y,x;for(p=m.length-1;p>=0;--p){const k=m[p].toString();for(v=this.executorsByZIndex_[k],_=Yh.length-1;_>=0;--_)if(f=Yh[_],y=v[f],y!==void 0&&(x=y.executeHitDetection(u,l,n,g,d),x))return x}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const n=e[0],r=e[1],o=e[2],s=e[3],a=[n,r,n,s,o,s,o,r];return Ji(a,0,8,2,t,a),a}isEmpty(){return Fn(this.executorsByZIndex_)}execute(t,e,n,r,o,s,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(An),this.maxExtent_&&(t.save(),this.clip(t,n)),s=s||Yh;let h,u,d,c,f,g;for(a&&l.reverse(),h=0,u=l.length;h<u;++h){const m=l[h].toString();for(f=this.executorsByZIndex_[m],d=0,c=s.length;d<c;++d){const p=s[d];g=f[p],g!==void 0&&g.execute(t,e,n,r,o,a)}}this.maxExtent_&&t.restore()}}const Kh={};function my(i){if(Kh[i]!==void 0)return Kh[i];const t=i*2+1,e=i*i,n=new Array(e+1);for(let o=0;o<=i;++o)for(let s=0;s<=i;++s){const a=o*o+s*s;if(a>e)break;let l=n[a];l||(l=[],n[a]=l),l.push(((i+o)*t+(i+s))*4+3),o>0&&l.push(((i-o)*t+(i+s))*4+3),s>0&&(l.push(((i+o)*t+(i-s))*4+3),o>0&&l.push(((i-o)*t+(i-s))*4+3))}const r=[];for(let o=0,s=n.length;o<s;++o)n[o]&&r.push(...n[o]);return Kh[i]=r,r}const ba=gy;class py extends Mf{constructor(t,e,n,r,o,s,a){super(),this.context_=t,this.pixelRatio_=e,this.extent_=n,this.transform_=r,this.viewRotation_=o,this.squaredTolerance_=s,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_=Ye()}drawImages_(t,e,n,r){if(!this.image_)return;const o=Ji(t,e,n,r,this.transform_,this.pixelCoordinates_),s=this.context_,a=this.tmpLocalTransform_,l=s.globalAlpha;this.imageOpacity_!=1&&(s.globalAlpha=l*this.imageOpacity_);let h=this.imageRotation_;this.imageRotateWithView_&&(h+=this.viewRotation_);for(let u=0,d=o.length;u<d;u+=2){const c=o[u]-this.imageAnchorX_,f=o[u+1]-this.imageAnchorY_;if(h!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const g=c+this.imageAnchorX_,m=f+this.imageAnchorY_;Ei(a,g,m,1,1,h,-g,-m),s.setTransform.apply(s,a),s.translate(g,m),s.scale(this.imageScale_[0],this.imageScale_[1]),s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),s.setTransform(1,0,0,1,0,0)}else s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,c,f,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(s.globalAlpha=l)}drawText_(t,e,n,r){if(!this.textState_||this.text_==="")return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const o=Ji(t,e,n,r,this.transform_,this.pixelCoordinates_),s=this.context_;let a=this.textRotation_;for(this.textRotateWithView_&&(a+=this.viewRotation_);e<n;e+=r){const l=o[e]+this.textOffsetX_,h=o[e+1]+this.textOffsetY_;a!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(s.translate(l-this.textOffsetX_,h-this.textOffsetY_),s.rotate(a),s.translate(this.textOffsetX_,this.textOffsetY_),s.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&s.strokeText(this.text_,0,0),this.textFillState_&&s.fillText(this.text_,0,0),s.setTransform(1,0,0,1,0,0)):(this.textStrokeState_&&s.strokeText(this.text_,l,h),this.textFillState_&&s.fillText(this.text_,l,h))}}moveToLineTo_(t,e,n,r,o){const s=this.context_,a=Ji(t,e,n,r,this.transform_,this.pixelCoordinates_);s.moveTo(a[0],a[1]);let l=a.length;o&&(l-=2);for(let h=2;h<l;h+=2)s.lineTo(a[h],a[h+1]);return o&&s.closePath(),n}drawRings_(t,e,n,r){for(let o=0,s=n.length;o<s;++o)e=this.moveToLineTo_(t,e,n[o],r,!0);return e}drawCircle(t){if(!!Kt(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=Iv(t,this.transform_,this.pixelCoordinates_),n=e[2]-e[0],r=e[3]-e[1],o=Math.sqrt(n*n+r*r),s=this.context_;s.beginPath(),s.arc(e[0],e[1],o,0,2*Math.PI),this.fillState_&&s.fill(),this.strokeState_&&s.stroke()}this.text_!==""&&this.drawText_(t.getCenter(),0,2,2)}}setStyle(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())}setTransform(t){this.transform_=t}drawGeometry(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t);break}}drawFeature(t,e){const n=e.getGeometryFunction()(t);!n||!Kt(this.extent_,n.getExtent())||(this.setStyle(e),this.drawGeometry(n))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let n=0,r=e.length;n<r;++n)this.drawGeometry(e[n])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),this.text_!==""&&this.drawText_(e,0,e.length,n)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),this.text_!==""&&this.drawText_(e,0,e.length,n)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Kt(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,n=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(n,0,n.length,t.getStride(),!1),e.stroke()}if(this.text_!==""){const e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getExtent();if(!!Kt(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const n=this.context_,r=t.getFlatCoordinates();let o=0;const s=t.getEnds(),a=t.getStride();n.beginPath();for(let l=0,h=s.length;l<h;++l)o=this.moveToLineTo_(r,o,s[l],a,!1);n.stroke()}if(this.text_!==""){const n=t.getFlatMidpoints();this.drawText_(n,0,n.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Kt(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){const e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Kt(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_,n=t.getOrientedFlatCoordinates();let r=0;const o=t.getEndss(),s=t.getStride();e.beginPath();for(let a=0,l=o.length;a<l;++a){const h=o[a];r=this.drawRings_(n,r,h,s)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){const e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){const e=this.context_,n=this.contextFillState_;n?n.fillStyle!=t.fillStyle&&(n.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})}setContextStrokeState_(t){const e=this.context_,n=this.contextStrokeState_;n?(n.lineCap!=t.lineCap&&(n.lineCap=t.lineCap,e.lineCap=t.lineCap),Vi(n.lineDash,t.lineDash)||e.setLineDash(n.lineDash=t.lineDash),n.lineDashOffset!=t.lineDashOffset&&(n.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset),n.lineJoin!=t.lineJoin&&(n.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),n.lineWidth!=t.lineWidth&&(n.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),n.miterLimit!=t.miterLimit&&(n.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),n.strokeStyle!=t.strokeStyle&&(n.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})}setContextTextState_(t){const e=this.context_,n=this.contextTextState_,r=t.textAlign?t.textAlign:So;n?(n.font!=t.font&&(n.font=t.font,e.font=t.font),n.textAlign!=r&&(n.textAlign=r,e.textAlign=r),n.textBaseline!=t.textBaseline&&(n.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=r,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:r,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(!t)this.fillState_=null;else{const n=t.getColor();this.fillState_={fillStyle:di(n||Mi)}}if(!e)this.strokeState_=null;else{const n=e.getColor(),r=e.getLineCap(),o=e.getLineDash(),s=e.getLineDashOffset(),a=e.getLineJoin(),l=e.getWidth(),h=e.getMiterLimit(),u=o||wo;this.strokeState_={lineCap:r!==void 0?r:Ks,lineDash:this.pixelRatio_===1?u:u.map(d=>d*this.pixelRatio_),lineDashOffset:(s||Eo)*this.pixelRatio_,lineJoin:a!==void 0?a:Sr,lineWidth:(l!==void 0?l:To)*this.pixelRatio_,miterLimit:h!==void 0?h:Mo,strokeStyle:di(n||Co)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}const n=t.getPixelRatio(this.pixelRatio_),r=t.getAnchor(),o=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=r[0]*n,this.imageAnchorY_=r[1]*n,this.imageHeight_=e[1]*n,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=o[0],this.imageOriginY_=o[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const s=t.getScaleArray();this.imageScale_=[s[0]*this.pixelRatio_/n,s[1]*this.pixelRatio_/n],this.imageWidth_=e[0]*n}setTextStyle(t){if(!t)this.text_="";else{const e=t.getFill();if(!e)this.textFillState_=null;else{const f=e.getColor();this.textFillState_={fillStyle:di(f||Mi)}}const n=t.getStroke();if(!n)this.textStrokeState_=null;else{const f=n.getColor(),g=n.getLineCap(),m=n.getLineDash(),p=n.getLineDashOffset(),_=n.getLineJoin(),v=n.getWidth(),y=n.getMiterLimit();this.textStrokeState_={lineCap:g!==void 0?g:Ks,lineDash:m||wo,lineDashOffset:p||Eo,lineJoin:_!==void 0?_:Sr,lineWidth:v!==void 0?v:To,miterLimit:y!==void 0?y:Mo,strokeStyle:di(f||Co)}}const r=t.getFont(),o=t.getOffsetX(),s=t.getOffsetY(),a=t.getRotateWithView(),l=t.getRotation(),h=t.getScaleArray(),u=t.getText(),d=t.getTextAlign(),c=t.getTextBaseline();this.textState_={font:r!==void 0?r:wc,textAlign:d!==void 0?d:So,textBaseline:c!==void 0?c:Zs},this.text_=u!==void 0?Array.isArray(u)?u.reduce((f,g,m)=>f+=m%2?" ":g,""):u:"",this.textOffsetX_=o!==void 0?this.pixelRatio_*o:0,this.textOffsetY_=s!==void 0?this.pixelRatio_*s: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 vy=py,je=.5;function Rf(i,t,e,n,r,o,s){const a=i[0]*je,l=i[1]*je,h=Pe(a,l);h.imageSmoothingEnabled=!1;const u=h.canvas,d=new vy(h,je,r,null,s),c=e.length,f=Math.floor((256*256*256-1)/c),g={};for(let p=1;p<=c;++p){const _=e[p-1],v=_.getStyleFunction()||n;if(!n)continue;let y=v(_,o);if(!y)continue;Array.isArray(y)||(y=[y]);const x=p*f,k="#"+("000000"+x.toString(16)).slice(-6);for(let w=0,M=y.length;w<M;++w){const E=y[w],S=E.getGeometryFunction()(_);if(!S||!Kt(r,S.getExtent()))continue;const I=E.clone(),A=I.getFill();A&&A.setColor(k);const G=I.getStroke();G&&(G.setColor(k),G.setLineDash(null)),I.setText(void 0);const P=E.getImage();if(P&&P.getOpacity()!==0){const U=P.getImageSize();if(!U)continue;const O=Pe(U[0],U[1],void 0,{alpha:!1}),W=O.canvas;O.fillStyle=k,O.fillRect(0,0,W.width,W.height),I.setImage(new fa({img:W,imgSize:U,anchor:P.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:P.getOrigin(),opacity:1,size:P.getSize(),scale:P.getScale(),rotation:P.getRotation(),rotateWithView:P.getRotateWithView()}))}const at=I.getZIndex()||0;let j=g[at];j||(j={},g[at]=j,j.Polygon=[],j.Circle=[],j.LineString=[],j.Point=[]),j[S.getType().replace("Multi","")].push(S,I)}}const m=Object.keys(g).map(Number).sort(An);for(let p=0,_=m.length;p<_;++p){const v=g[m[p]];for(const y in v){const x=v[y];for(let k=0,w=x.length;k<w;k+=2){d.setStyle(x[k+1]);for(let M=0,E=t.length;M<E;++M)d.setTransform(t[M]),d.drawGeometry(x[k])}}}return h.getImageData(0,0,u.width,u.height)}function Pf(i,t,e){const n=[];if(e){const r=Math.floor(Math.round(i[0])*je),o=Math.floor(Math.round(i[1])*je),s=(Wt(r,0,e.width-1)+Wt(o,0,e.height-1)*e.width)*4,a=e.data[s],l=e.data[s+1],u=e.data[s+2]+256*(l+256*a),d=Math.floor((256*256*256-1)/t.length);u&&u%d===0&&n.push(t[u/d-1])}return n}const _y=.5,Af={Point:Cy,LineString:wy,Polygon:Ty,MultiPoint:Sy,MultiLineString:Ey,MultiPolygon:My,GeometryCollection:ky,Circle:xy};function yy(i,t){return parseInt(K(i),10)-parseInt(K(t),10)}function Df(i,t){const e=Zh(i,t);return e*e}function Zh(i,t){return _y*i/t}function xy(i,t,e,n,r){const o=e.getFill(),s=e.getStroke();if(o||s){const l=i.getBuilder(e.getZIndex(),"Circle");l.setFillStrokeStyle(o,s),l.drawCircle(t,n)}const a=e.getText();if(a&&a.getText()){const l=(r||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}function ka(i,t,e,n,r,o,s){let a=!1;const l=e.getImage();if(l){const h=l.getImageState();h==Qt.LOADED||h==Qt.ERROR?l.unlistenImageChange(r):(h==Qt.IDLE&&l.load(),l.listenImageChange(r),a=!0)}return by(i,t,e,n,o,s),a}function by(i,t,e,n,r,o){const s=e.getGeometryFunction()(t);if(!s)return;const a=s.simplifyTransformed(n,r);if(e.getRenderer())Lf(i,a,e,t);else{const h=Af[a.getType()];h(i,a,e,t,o)}}function Lf(i,t,e,n){if(t.getType()=="GeometryCollection"){const o=t.getGeometries();for(let s=0,a=o.length;s<a;++s)Lf(i,o[s],e,n);return}i.getBuilder(e.getZIndex(),"Default").drawCustom(t,n,e.getRenderer(),e.getHitDetectionRenderer())}function ky(i,t,e,n,r){const o=t.getGeometriesArray();let s,a;for(s=0,a=o.length;s<a;++s){const l=Af[o[s].getType()];l(i,o[s],e,n,r)}}function wy(i,t,e,n,r){const o=e.getStroke();if(o){const a=i.getBuilder(e.getZIndex(),"LineString");a.setFillStrokeStyle(null,o),a.drawLineString(t,n)}const s=e.getText();if(s&&s.getText()){const a=(r||i).getBuilder(e.getZIndex(),"Text");a.setTextStyle(s),a.drawText(t,n)}}function Ey(i,t,e,n,r){const o=e.getStroke();if(o){const a=i.getBuilder(e.getZIndex(),"LineString");a.setFillStrokeStyle(null,o),a.drawMultiLineString(t,n)}const s=e.getText();if(s&&s.getText()){const a=(r||i).getBuilder(e.getZIndex(),"Text");a.setTextStyle(s),a.drawText(t,n)}}function My(i,t,e,n,r){const o=e.getFill(),s=e.getStroke();if(s||o){const l=i.getBuilder(e.getZIndex(),"Polygon");l.setFillStrokeStyle(o,s),l.drawMultiPolygon(t,n)}const a=e.getText();if(a&&a.getText()){const l=(r||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}function Cy(i,t,e,n,r){const o=e.getImage(),s=e.getText();let a;if(o){if(o.getImageState()!=Qt.LOADED)return;let l=i;if(r){const u=o.getDeclutterMode();if(u!=="none")if(l=r,u==="obstacle"){const d=i.getBuilder(e.getZIndex(),"Image");d.setImageStyle(o,a),d.drawPoint(t,n)}else s&&s.getText()&&(a={})}const h=l.getBuilder(e.getZIndex(),"Image");h.setImageStyle(o,a),h.drawPoint(t,n)}if(s&&s.getText()){let l=i;r&&(l=r);const h=l.getBuilder(e.getZIndex(),"Text");h.setTextStyle(s,a),h.drawText(t,n)}}function Sy(i,t,e,n,r){const o=e.getImage(),s=e.getText();let a;if(o){if(o.getImageState()!=Qt.LOADED)return;let l=i;if(r){const u=o.getDeclutterMode();if(u!=="none")if(l=r,u==="obstacle"){const d=i.getBuilder(e.getZIndex(),"Image");d.setImageStyle(o,a),d.drawMultiPoint(t,n)}else s&&s.getText()&&(a={})}const h=l.getBuilder(e.getZIndex(),"Image");h.setImageStyle(o,a),h.drawMultiPoint(t,n)}if(s&&s.getText()){let l=i;r&&(l=r);const h=l.getBuilder(e.getZIndex(),"Text");h.setTextStyle(s,a),h.drawText(t,n)}}function Ty(i,t,e,n,r){const o=e.getFill(),s=e.getStroke();if(o||s){const l=i.getBuilder(e.getZIndex(),"Polygon");l.setFillStrokeStyle(o,s),l.drawPolygon(t,n)}const a=e.getText();if(a&&a.getText()){const l=(r||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}class zy extends Tf{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=Ge(),this.wrappedRenderedExtent_=Ge(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.declutterExecutorGroup=null,this.clipping=!0,this.compositionContext_=null,this.opacity_=1}renderWorlds(t,e,n){const r=e.extent,o=e.viewState,s=o.center,a=o.resolution,l=o.projection,h=o.rotation,u=l.getExtent(),d=this.getLayer().getSource(),c=e.pixelRatio,f=e.viewHints,g=!(f[Yt.ANIMATING]||f[Yt.INTERACTING]),m=this.compositionContext_,p=Math.round(e.size[0]*c),_=Math.round(e.size[1]*c),v=d.getWrapX()&&l.canWrapX(),y=v?Nt(u):null,x=v?Math.ceil((r[2]-u[2])/y)+1:1;let k=v?Math.floor((r[0]-u[0])/y):0;do{const w=this.getRenderTransform(s,a,h,c,p,_,k*y);t.execute(m,1,w,h,g,void 0,n)}while(++k<x)}setupCompositionContext_(){if(this.opacity_!==1){const t=Pe(this.context.canvas.width,this.context.canvas.height,Sf);this.compositionContext_=t}else this.compositionContext_=this.context}releaseCompositionContext_(){if(this.opacity_!==1){const t=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=t,kl(this.compositionContext_),Sf.push(this.compositionContext_.canvas),this.compositionContext_=null}}renderDeclutter(t){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree),this.releaseCompositionContext_())}renderFrame(t,e){const n=t.pixelRatio,r=t.layerStatesArray[t.layerIndex];q0(this.pixelTransform,1/n,1/n),Wl(this.inversePixelTransform,this.pixelTransform);const o=_c(this.pixelTransform);this.useContainer(e,o,this.getBackground(t));const s=this.context,a=s.canvas,l=this.replayGroup_,h=this.declutterExecutorGroup;if((!l||l.isEmpty())&&(!h||h.isEmpty()))return null;const u=Math.round(t.size[0]*n),d=Math.round(t.size[1]*n);a.width!=u||a.height!=d?(a.width=u,a.height=d,a.style.transform!==o&&(a.style.transform=o)):this.containerReused||s.clearRect(0,0,u,d),this.preRender(s,t);const c=t.viewState;c.projection,this.opacity_=r.opacity,this.setupCompositionContext_();let f=!1,g=!0;if(r.extent&&this.clipping){const m=Zi(r.extent);g=Kt(m,t.extent),f=g&&!Bn(m,t.extent),f&&this.clipUnrotated(this.compositionContext_,t,m)}return g&&this.renderWorlds(l,t),f&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(s,t),this.renderedRotation_!==c.rotation&&(this.renderedRotation_=c.rotation,this.hitDetectionImageData_=null),this.container}getFeatures(t){return new Promise(function(e){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const n=[this.context.canvas.width,this.context.canvas.height];Jt(this.pixelTransform,n);const r=this.renderedCenter_,o=this.renderedResolution_,s=this.renderedRotation_,a=this.renderedProjection_,l=this.wrappedRenderedExtent_,h=this.getLayer(),u=[],d=n[0]*je,c=n[1]*je;u.push(this.getRenderTransform(r,o,s,je,d,c,0).slice());const f=h.getSource(),g=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!Bn(g,l)){let m=l[0];const p=Nt(g);let _=0,v;for(;m<g[0];)--_,v=p*_,u.push(this.getRenderTransform(r,o,s,je,d,c,v).slice()),m+=p;for(_=0,m=l[2];m>g[2];)++_,v=p*_,u.push(this.getRenderTransform(r,o,s,je,d,c,v).slice()),m-=p}this.hitDetectionImageData_=Rf(n,u,this.renderedFeatures_,h.getStyleFunction(),l,o,s)}e(Pf(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))}forEachFeatureAtCoordinate(t,e,n,r,o){if(!this.replayGroup_)return;const s=e.viewState.resolution,a=e.viewState.rotation,l=this.getLayer(),h={},u=function(f,g,m){const p=K(f),_=h[p];if(_){if(_!==!0&&m<_.distanceSq){if(m===0)return h[p]=!0,o.splice(o.lastIndexOf(_),1),r(f,l,g);_.geometry=g,_.distanceSq=m}}else{if(m===0)return h[p]=!0,r(f,l,g);o.push(h[p]={feature:f,layer:l,geometry:g,distanceSq:m,callback:r})}};let d;const c=[this.replayGroup_];return this.declutterExecutorGroup&&c.push(this.declutterExecutorGroup),c.some(f=>d=f.forEachFeatureAtCoordinate(t,s,a,n,u,f===this.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map(g=>g.value):null)),d}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),n=e.getSource();if(!n)return!1;const r=t.viewHints[Yt.ANIMATING],o=t.viewHints[Yt.INTERACTING],s=e.getUpdateWhileAnimating(),a=e.getUpdateWhileInteracting();if(this.ready&&!s&&r||!a&&o)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=t.extent,h=t.viewState,u=h.projection,d=h.resolution,c=t.pixelRatio,f=e.getRevision(),g=e.getRenderBuffer();let m=e.getRenderOrder();m===void 0&&(m=yy);const p=h.center.slice(),_=ui(l,g*d),v=_.slice(),y=[_.slice()],x=u.getExtent();if(n.getWrapX()&&u.canWrapX()&&!Bn(x,t.extent)){const j=Nt(x),U=Math.max(Nt(_)/2,j);_[0]=x[0]-U,_[2]=x[2]+U,Nl(p,u);const O=rc(y[0],u);O[0]<x[0]&&O[2]<x[2]?y.push([O[0]+j,O[1],O[2]+j,O[3]]):O[0]>x[0]&&O[2]>x[2]&&y.push([O[0]-j,O[1],O[2]-j,O[3]])}if(this.ready&&this.renderedResolution_==d&&this.renderedRevision_==f&&this.renderedRenderOrder_==m&&Bn(this.wrappedRenderedExtent_,_))return Vi(this.renderedExtent_,v)||(this.hitDetectionImageData_=null,this.renderedExtent_=v),this.renderedCenter_=p,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const k=new xa(Zh(d,c),_,d,c);let w;this.getLayer().getDeclutter()&&(w=new xa(Zh(d,c),_,d,c));let M;for(let j=0,U=y.length;j<U;++j)n.loadFeatures(y[j],d,u);const E=Df(d,c);let S=!0;const I=function(j){let U;const O=j.getStyleFunction()||e.getStyleFunction();if(O&&(U=O(j,d)),U){const W=this.renderFeature(j,E,U,k,M,w);S=S&&!W}}.bind(this),A=ql(_),G=n.getFeaturesInExtent(A);m&&G.sort(m);for(let j=0,U=G.length;j<U;++j)I(G[j]);this.renderedFeatures_=G,this.ready=S;const P=k.finish(),at=new ba(_,d,c,n.getOverlaps(),P,e.getRenderBuffer());return w&&(this.declutterExecutorGroup=new ba(_,d,c,n.getOverlaps(),w.finish(),e.getRenderBuffer())),this.renderedResolution_=d,this.renderedRevision_=f,this.renderedRenderOrder_=m,this.renderedExtent_=v,this.wrappedRenderedExtent_=_,this.renderedCenter_=p,this.renderedProjection_=u,this.replayGroup_=at,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,n,r,o,s){if(!n)return!1;let a=!1;if(Array.isArray(n))for(let l=0,h=n.length;l<h;++l)a=ka(r,t,n[l],e,this.boundHandleStyleImageChange_,o,s)||a;else a=ka(r,t,n,e,this.boundHandleStyleImageChange_,o,s);return a}}const Iy=zy;class Ry extends wf{constructor(t){super(t)}createRenderer(){return new Iy(this)}}const Qn=Ry;class Py{constructor(t){this.rbush_=new yf(t),this.items_={}}insert(t,e){const n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(n),this.items_[K(e)]=n}load(t,e){const n=new Array(e.length);for(let r=0,o=e.length;r<o;r++){const s=t[r],a=e[r],l={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:a};n[r]=l,this.items_[K(a)]=l}this.rbush_.load(n)}remove(t){const e=K(t),n=this.items_[e];return delete this.items_[e],this.rbush_.remove(n)!==null}update(t,e){const n=this.items_[K(e)],r=[n.minX,n.minY,n.maxX,n.maxY];Mr(r,t)||(this.remove(e),this.insert(t,e))}getAll(){return this.rbush_.all().map(function(e){return e.value})}getInExtent(t){const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map(function(r){return r.value})}forEach(t){return this.forEach_(this.getAll(),t)}forEachInExtent(t,e){return this.forEach_(this.getInExtent(t),e)}forEach_(t,e){let n;for(let r=0,o=t.length;r<o;r++)if(n=e(t[r]),n)return n;return n}isEmpty(){return Fn(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){const e=this.rbush_.toJSON();return ti(e.minX,e.minY,e.maxX,e.maxY,t)}concat(t){this.rbush_.load(t.rbush_.all());for(const e in t.items_)this.items_[e]=t.items_[e]}}const wa=Py;class Ay extends hi{constructor(t){super(),this.projection=Gt(t.projection),this.attributions_=Ff(t.attributions),this.attributionsCollapsible_=t.attributionsCollapsible!==void 0?t.attributionsCollapsible:!0,this.loading=!1,this.state_=t.state!==void 0?t.state:"ready",this.wrapX_=t.wrapX!==void 0?t.wrapX:!1,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise(function(n,r){e.viewResolver=n,e.viewRejector=r})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(){return et()}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=Ff(t),this.changed()}setState(t){this.state_=t,this.changed()}}function Ff(i){return i?Array.isArray(i)?function(t){return i}:typeof i=="function"?i:function(t){return[i]}:null}const Of=Ay,we={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function Dy(i,t){return[[-1/0,-1/0,1/0,1/0]]}let Ly=!1;function Nf(i,t,e,n,r,o,s){const a=new XMLHttpRequest;a.open("GET",typeof i=="function"?i(e,n,r):i,!0),t.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=Ly,a.onload=function(l){if(!a.status||a.status>=200&&a.status<300){const h=t.getType();let u;h=="json"||h=="text"?u=a.responseText:h=="xml"?(u=a.responseXML,u||(u=new DOMParser().parseFromString(a.responseText,"application/xml"))):h=="arraybuffer"&&(u=a.response),u?o(t.readFeatures(u,{extent:e,featureProjection:r}),t.readProjection(u)):s()}else s()},a.onerror=s,a.send()}function Gf(i,t){return function(e,n,r,o,s){const a=this;Nf(i,t,e,n,r,function(l,h){a.addFeatures(l),o!==void 0&&o(l)},s||Ln)}}class ln extends Qe{constructor(t,e,n){super(t),this.feature=e,this.features=n}}class Fy extends Of{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:t.wrapX!==void 0?t.wrapX:!0}),this.on,this.once,this.un,this.loader_=Ln,this.format_=t.format,this.overlaps_=t.overlaps===void 0?!0:t.overlaps,this.url_=t.url,t.loader!==void 0?this.loader_=t.loader:this.url_!==void 0&&(ft(this.format_,7),this.loader_=Gf(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:Dy;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new wa:null,this.loadedExtentsRtree_=new wa,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let n,r;Array.isArray(t.features)?r=t.features:t.features&&(n=t.features,r=n.getArray()),!e&&n===void 0&&(n=new We(r)),r!==void 0&&this.addFeaturesInternal(r),n!==void 0&&this.bindFeaturesCollection_(n)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=K(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const n=t.getGeometry();if(n){const r=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(r,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new ln(we.ADDFEATURE,t))}setupChangeEvents_(t,e){this.featureChangeKeys_[t]=[gt(e,tt.CHANGE,this.handleFeatureChange_,this),gt(e,_r.PROPERTYCHANGE,this.handleFeatureChange_,this)]}addToIndex_(t,e){let n=!0;const r=e.getId();return r!==void 0&&(r.toString()in this.idIndex_?n=!1:this.idIndex_[r.toString()]=e),n&&(ft(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),n}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],n=[],r=[];for(let o=0,s=t.length;o<s;o++){const a=t[o],l=K(a);this.addToIndex_(l,a)&&n.push(a)}for(let o=0,s=n.length;o<s;o++){const a=n[o],l=K(a);this.setupChangeEvents_(l,a);const h=a.getGeometry();if(h){const u=h.getExtent();e.push(u),r.push(a)}else this.nullGeometryFeatures_[l]=a}if(this.featuresRtree_&&this.featuresRtree_.load(e,r),this.hasListener(we.ADDFEATURE))for(let o=0,s=n.length;o<s;o++)this.dispatchEvent(new ln(we.ADDFEATURE,n[o]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(we.ADDFEATURE,function(n){e||(e=!0,t.push(n.feature),e=!1)}),this.addEventListener(we.REMOVEFEATURE,function(n){e||(e=!0,t.remove(n.feature),e=!1)}),t.addEventListener(re.ADD,function(n){e||(e=!0,this.addFeature(n.element),e=!1)}.bind(this)),t.addEventListener(re.REMOVE,function(n){e||(e=!0,this.removeFeature(n.element),e=!1)}.bind(this)),this.featuresCollection_=t}clear(t){if(t){for(const n in this.featureChangeKeys_)this.featureChangeKeys_[n].forEach(Ot);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const n=function(r){this.removeFeatureInternal(r)}.bind(this);this.featuresRtree_.forEach(n);for(const r in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[r])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new ln(we.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const n=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(n,function(r){if(r.getGeometry().intersectsCoordinate(t))return e(r)})}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,function(n){if(n.getGeometry().intersectsExtent(t)){const o=e(n);if(o)return o}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),Fn(this.nullGeometryFeatures_)||li(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,function(n){e.push(n)}),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const r=I0(t,e);return[].concat(...r.map(o=>this.featuresRtree_.getInExtent(o)))}else return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const n=t[0],r=t[1];let o=null;const s=[NaN,NaN];let a=1/0;const l=[-1/0,-1/0,1/0,1/0];return e=e||Dn,this.featuresRtree_.forEachInExtent(l,function(h){if(e(h)){const u=h.getGeometry(),d=a;if(a=u.closestPointXY(n,r,s,a),a<d){o=h;const c=Math.sqrt(a);l[0]=n-c,l[1]=r-c,l[2]=n+c,l[3]=r+c}}}),o}getExtent(t){return this.featuresRtree_.getExtent(t)}getFeatureById(t){const e=this.idIndex_[t.toString()];return e!==void 0?e:null}getFeatureByUid(t){const e=this.uidIndex_[t];return e!==void 0?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){const e=t.target,n=K(e),r=e.getGeometry();if(!r)n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[n]=e);else{const s=r.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(s,e)):this.featuresRtree_&&this.featuresRtree_.update(s,e)}const o=e.getId();if(o!==void 0){const s=o.toString();this.idIndex_[s]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[s]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[n]=e;this.changed(),this.dispatchEvent(new ln(we.CHANGEFEATURE,e))}hasFeature(t){const e=t.getId();return e!==void 0?e in this.idIndex_:K(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&Fn(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(t,e,n){const r=this.loadedExtentsRtree_,o=this.strategy_(t,e,n);for(let s=0,a=o.length;s<a;++s){const l=o[s];r.forEachInExtent(l,function(u){return Bn(u.extent,l)})||(++this.loadingExtentsCount_,this.dispatchEvent(new ln(we.FEATURESLOADSTART)),this.loader_.call(this,l,e,n,function(u){--this.loadingExtentsCount_,this.dispatchEvent(new ln(we.FEATURESLOADEND,void 0,u))}.bind(this),function(){--this.loadingExtentsCount_,this.dispatchEvent(new ln(we.FEATURESLOADERROR))}.bind(this)),r.insert(l,{extent:l.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let n;e.forEachInExtent(t,function(r){if(Mr(r.extent,t))return n=r,!0}),n&&e.remove(n)}removeFeature(t){if(!t)return;const e=K(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=K(t),n=this.featureChangeKeys_[e];if(!n)return;n.forEach(Ot),delete this.featureChangeKeys_[e];const r=t.getId();return r!==void 0&&delete this.idIndex_[r.toString()],delete this.uidIndex_[e],this.dispatchEvent(new ln(we.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let e=!1;for(const n in this.idIndex_)if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}return e}setLoader(t){this.loader_=t}setUrl(t){ft(this.format_,7),this.url_=t,this.setLoader(Gf(t,this.format_))}}const hn=Fy;class Oy extends Is{constructor(t,e,n){super(),n=n||{},this.tileCoord=t,this.state=e,this.interimTile=null,this.key="",this.transition_=n.transition===void 0?250:n.transition,this.transitionStarts_={},this.interpolate=!!n.interpolate}changed(){this.dispatchEvent(tt.CHANGE)}release(){this.state===N.ERROR&&this.setState(N.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){if(!this.interimTile)return this;let t=this.interimTile;do{if(t.getState()==N.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this}refreshInterimChain(){if(!this.interimTile)return;let t=this.interimTile,e=this;do{if(t.getState()==N.LOADED){t.interimTile=null;break}else t.getState()==N.LOADING?e=t:t.getState()==N.IDLE?e.interimTile=t.interimTile:e=t;t=e.interimTile}while(t)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(this.state!==N.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){et()}getAlpha(t,e){if(!this.transition_)return 1;let n=this.transitionStarts_[t];if(!n)n=e,this.transitionStarts_[t]=n;else if(n===-1)return 1;const r=e-n+1e3/60;return r>=this.transition_?1:Ic(r/this.transition_)}inTransition(t){return this.transition_?this.transitionStarts_[t]!==-1:!1}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}const Ea=Oy;class Ny extends Ea{constructor(t,e,n,r,o,s){super(t,e,s),this.crossOrigin_=r,this.src_=n,this.key=n,this.image_=new Image,r!==null&&(this.image_.crossOrigin=r),this.unlisten_=null,this.tileLoadFunction_=o}getImage(){return this.image_}setImage(t){this.image_=t,this.state=N.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=N.ERROR,this.unlistenImage_(),this.image_=Gy(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=N.LOADED:this.state=N.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==N.ERROR&&(this.state=N.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==N.IDLE&&(this.state=N.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=hf(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function Gy(){const i=Pe(1,1);return i.fillStyle="rgba(0,0,0,0)",i.fillRect(0,0,1,1),i.canvas}const jf=Ny;class jy{constructor(t){this.highWaterMark=t!==void 0?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const n=this.entries_[t];return ft(n!==void 0,15),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_}remove(t){const e=this.entries_[t];return ft(e!==void 0,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.key_;return t}getValues(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){if(!!this.containsKey(t))return this.entries_[t].value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){ft(!(t in this.entries_),16);const n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_}setSize(t){this.highWaterMark=t}}const By=jy;function Bf(i,t,e,n){return n!==void 0?(n[0]=i,n[1]=t,n[2]=e,n):[i,t,e]}function Nr(i,t,e){return i+"/"+t+"/"+e}function Uf(i){return Nr(i[0],i[1],i[2])}function Uy(i){const[t,e,n]=i.substring(i.lastIndexOf("/")+1,i.length).split(",").map(Number);return Nr(t,e,n)}function Vf(i){return i.split("/").map(Number)}function Vy(i){return(i[1]<<i[0])+i[2]}function qy(i,t){const e=i[0],n=i[1],r=i[2];if(t.getMinZoom()>e||e>t.getMaxZoom())return!1;const o=t.getFullTileRange(e);return o?o.containsXY(n,r):!0}class Xy extends By{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()}pruneExceptNewestZ(){if(this.getCount()===0)return;const t=this.peekFirstKey(),n=Vf(t)[0];this.forEach(function(r){r.tileCoord[0]!==n&&(this.remove(Uf(r.tileCoord)),r.release())}.bind(this))}}const Hh=Xy;class qf{constructor(t,e,n,r){this.minX=t,this.maxX=e,this.minY=n,this.maxY=r}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function Gr(i,t,e,n,r){return r!==void 0?(r.minX=i,r.maxX=t,r.minY=e,r.maxY=n,r):new qf(i,t,e,n)}const Xf=qf,$f=[];class $y extends Ea{constructor(t,e,n,r){super(t,e,{transition:0}),this.context_={},this.executorGroups={},this.declutterExecutorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=r.bind(void 0,this),this.wrappedTileCoord=n}getContext(t){const e=K(t);return e in this.context_||(this.context_[e]=Pe(1,1,$f)),this.context_[e]}hasContext(t){return K(t)in this.context_}getImage(t){return this.hasContext(t)?this.getContext(t).canvas:null}getReplayState(t){const e=K(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[e]}load(){this.getSourceTiles()}release(){for(const t in this.context_){const e=this.context_[t];kl(e),$f.push(e.canvas),delete this.context_[t]}super.release()}}const Wy=$y;class Yy extends Ea{constructor(t,e,n,r,o,s){super(t,e,s),this.extent=null,this.format_=r,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=o,this.url_=n,this.key=n}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==N.IDLE&&(this.setState(N.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(t,e){this.setFeatures(t)}onError(){this.setState(N.ERROR)}setFeatures(t){this.features_=t,this.setState(N.LOADED)}setLoader(t){this.loader_=t}}const Ky=Yy,Ma={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"};class Ca extends Qe{constructor(t,e){super(t),this.feature=e}}class Zy extends nn{constructor(t){const e=t;e.stopDown||(e.stopDown=yr),super(e),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=t.source?t.source:null,this.features_=t.features?t.features:null,this.snapTolerance_=t.snapTolerance?t.snapTolerance:12,this.type_=t.type,this.mode_=Jy(this.type_),this.stopClick_=!!t.stopClick,this.minPoints_=t.minPoints?t.minPoints:this.mode_==="Polygon"?3:2,this.maxPoints_=this.mode_==="Circle"?2:t.maxPoints?t.maxPoints:1/0,this.finishCondition_=t.finishCondition?t.finishCondition:Dn,this.geometryLayout_=t.geometryLayout?t.geometryLayout:"XY";let n=t.geometryFunction;if(!n){const r=this.mode_;if(r==="Circle")n=function(o,s,a){const l=s||new j_([NaN,NaN]),h=Vt(o[0]),u=wi(h,Vt(o[o.length-1]));return l.setCenterAndRadius(h,Math.sqrt(u),this.geometryLayout_),l};else{let o;r==="Point"?o=ni:r==="LineString"?o=Kn:r==="Polygon"&&(o=Wn),n=function(s,a,l){return a?r==="Polygon"?s[0].length?a.setCoordinates([s[0].concat([s[0][0]])],this.geometryLayout_):a.setCoordinates([],this.geometryLayout_):a.setCoordinates(s,this.geometryLayout_):a=new o(s,this.geometryLayout_),a}}}this.geometryFunction_=n,this.dragVertexDelay_=t.dragVertexDelay!==void 0?t.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,this.overlay_=new Qn({source:new hn({useSpatialIndex:!1,wrapX:t.wrapX?t.wrapX:!1}),style:t.style?t.style:Hy(),updateWhileInteracting:!0}),this.geometryName_=t.geometryName,this.condition_=t.condition?t.condition:wh,this.freehandCondition_,t.freehand?this.freehandCondition_=kh:this.freehandCondition_=t.freehandCondition?t.freehandCondition:Zc,this.addChangeListener(_h.ACTIVE,this.updateState_)}setMap(t){super.setMap(t),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(t){t.originalEvent.type===tt.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_=this.mode_!=="Point"&&this.freehandCondition_(t);let e=t.type===Et.POINTERMOVE,n=!0;return!this.freehand_&&this.lastDragTime_&&t.type===Et.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,e=!0):this.lastDragTime_=void 0,this.shouldHandle_&&this.downTimeout_!==void 0&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&t.type===Et.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(t.coordinate),n=!1):this.freehand_&&t.type===Et.POINTERDOWN?n=!1:e&&this.getPointerCount()<2?(n=t.type===Et.POINTERMOVE,n&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):(t.originalEvent.pointerType==="mouse"||t.type===Et.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(t)):t.type===Et.DBLCLICK&&(n=!1),super.handleEvent(t)&&n}handleDownEvent(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new Si(Et.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)}handleUpEvent(t){let e=!0;if(this.getPointerCount()===0)if(this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t),this.shouldHandle_){const n=!this.finishCoordinate_;n&&this.startDrawing_(t.coordinate),!n&&this.freehand_?this.finishDrawing():!this.freehand_&&(!n||this.mode_==="Point")&&(this.atFinish_(t.pixel)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate)),e=!1}else this.freehand_&&this.abortDrawing();return!e&&this.stopClick_&&t.preventDefault(),e}handlePointerMove_(t){if(this.pointerType_=t.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){const e=this.downPx_,n=t.pixel,r=e[0]-n[0],o=e[1]-n[1],s=r*r+o*o;if(this.shouldHandle_=this.freehand_?s>this.squaredClickTolerance_:s<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t.coordinate):this.createOrUpdateSketchPoint_(t.coordinate.slice())}atFinish_(t){let e=!1;if(this.sketchFeature_){let n=!1,r=[this.finishCoordinate_];const o=this.mode_;if(o==="Point")e=!0;else if(o==="Circle")e=this.sketchCoords_.length===2;else if(o==="LineString")n=this.sketchCoords_.length>this.minPoints_;else if(o==="Polygon"){const s=this.sketchCoords_;n=s[0].length>this.minPoints_,r=[s[0][0],s[0][s[0].length-2]]}if(n){const s=this.getMap();for(let a=0,l=r.length;a<l;a++){const h=r[a],u=s.getPixelFromCoordinate(h),d=t[0]-u[0],c=t[1]-u[1],f=this.freehand_?1:this.snapTolerance_;if(e=Math.sqrt(d*d+c*c)<=f,e){this.finishCoordinate_=h;break}}}}return e}createOrUpdateSketchPoint_(t){this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(t):(this.sketchPoint_=new Ti(new ni(t)),this.updateSketchFeatures_())}createOrUpdateCustomSketchLine_(t){this.sketchLine_||(this.sketchLine_=new Ti);const e=t.getLinearRing(0);let n=this.sketchLine_.getGeometry();n?(n.setFlatCoordinates(e.getLayout(),e.getFlatCoordinates()),n.changed()):(n=new Kn(e.getFlatCoordinates(),e.getLayout()),this.sketchLine_.setGeometry(n))}startDrawing_(t){const e=this.getMap().getView().getProjection(),n=ta(this.geometryLayout_);for(;t.length<n;)t.push(0);this.finishCoordinate_=t,this.mode_==="Point"?this.sketchCoords_=t.slice():this.mode_==="Polygon"?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()],this.sketchLineCoords_&&(this.sketchLine_=new Ti(new Kn(this.sketchLineCoords_)));const r=this.geometryFunction_(this.sketchCoords_,void 0,e);this.sketchFeature_=new Ti,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(r),this.updateSketchFeatures_(),this.dispatchEvent(new Ca(Ma.DRAWSTART,this.sketchFeature_))}modifyDrawing_(t){const e=this.getMap(),n=this.sketchFeature_.getGeometry(),r=e.getView().getProjection(),o=ta(this.geometryLayout_);let s,a;for(;t.length<o;)t.push(0);this.mode_==="Point"?a=this.sketchCoords_:this.mode_==="Polygon"?(s=this.sketchCoords_[0],a=s[s.length-1],this.atFinish_(e.getPixelFromCoordinate(t))&&(t=this.finishCoordinate_.slice())):(s=this.sketchCoords_,a=s[s.length-1]),a[0]=t[0],a[1]=t[1],this.geometryFunction_(this.sketchCoords_,n,r),this.sketchPoint_&&this.sketchPoint_.getGeometry().setCoordinates(t),n.getType()==="Polygon"&&this.mode_!=="Polygon"?this.createOrUpdateCustomSketchLine_(n):this.sketchLineCoords_&&this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_),this.updateSketchFeatures_()}addToDrawing_(t){const e=this.sketchFeature_.getGeometry(),n=this.getMap().getView().getProjection();let r,o;const s=this.mode_;s==="LineString"||s==="Circle"?(this.finishCoordinate_=t.slice(),o=this.sketchCoords_,o.length>=this.maxPoints_&&(this.freehand_?o.pop():r=!0),o.push(t.slice()),this.geometryFunction_(o,e,n)):s==="Polygon"&&(o=this.sketchCoords_[0],o.length>=this.maxPoints_&&(this.freehand_?o.pop():r=!0),o.push(t.slice()),r&&(this.finishCoordinate_=o[0]),this.geometryFunction_(this.sketchCoords_,e,n)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),r&&this.finishDrawing()}removeLastPoint(){if(!this.sketchFeature_)return;const t=this.sketchFeature_.getGeometry(),e=this.getMap().getView().getProjection();let n;const r=this.mode_;if(r==="LineString"||r==="Circle"){if(n=this.sketchCoords_,n.splice(-2,1),n.length>=2){this.finishCoordinate_=n[n.length-2].slice();const o=this.finishCoordinate_.slice();n[n.length-1]=o,this.createOrUpdateSketchPoint_(o)}this.geometryFunction_(n,t,e),t.getType()==="Polygon"&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(r==="Polygon"){n=this.sketchCoords_[0],n.splice(-2,1);const o=this.sketchLine_.getGeometry();if(n.length>=2){const s=n[n.length-2].slice();n[n.length-1]=s,this.createOrUpdateSketchPoint_(s)}o.setCoordinates(n),this.geometryFunction_(this.sketchCoords_,t,e)}n.length===1&&this.abortDrawing(),this.updateSketchFeatures_()}finishDrawing(){const t=this.abortDrawing_();if(!t)return;let e=this.sketchCoords_;const n=t.getGeometry(),r=this.getMap().getView().getProjection();this.mode_==="LineString"?(e.pop(),this.geometryFunction_(e,n,r)):this.mode_==="Polygon"&&(e[0].pop(),this.geometryFunction_(e,n,r),e=n.getCoordinates()),this.type_==="MultiPoint"?t.setGeometry(new Po([e])):this.type_==="MultiLineString"?t.setGeometry(new Th([e])):this.type_==="MultiPolygon"&&t.setGeometry(new Ih([e])),this.dispatchEvent(new Ca(Ma.DRAWEND,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}abortDrawing_(){this.finishCoordinate_=null;const t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t}abortDrawing(){const t=this.abortDrawing_();t&&this.dispatchEvent(new Ca(Ma.DRAWABORT,t))}appendCoordinates(t){const e=this.mode_,n=!this.sketchFeature_;n&&this.startDrawing_(t[0]);let r;if(e==="LineString"||e==="Circle")r=this.sketchCoords_;else if(e==="Polygon")r=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;n&&r.shift(),r.pop();for(let s=0;s<t.length;s++)this.addToDrawing_(t[s]);const o=t[t.length-1];this.addToDrawing_(o),this.modifyDrawing_(o)}extend(t){const n=t.getGeometry();this.sketchFeature_=t,this.sketchCoords_=n.getCoordinates();const r=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=r.slice(),this.sketchCoords_.push(r.slice()),this.sketchPoint_=new Ti(new ni(r)),this.updateSketchFeatures_(),this.dispatchEvent(new Ca(Ma.DRAWSTART,this.sketchFeature_))}updateSketchFeatures_(){const t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);const e=this.overlay_.getSource();e.clear(!0),e.addFeatures(t)}updateState_(){const t=this.getMap(),e=this.getActive();(!t||!e)&&this.abortDrawing(),this.overlay_.setMap(e?t:null)}}function Hy(){const i=uf();return function(t,e){return i[t.getGeometry().getType()]}}function Jy(i){switch(i){case"Point":case"MultiPoint":return"Point";case"LineString":case"MultiLineString":return"LineString";case"Polygon":case"MultiPolygon":return"Polygon";case"Circle":return"Circle";default:throw new Error("Invalid type: "+i)}}const Qy=Zy,Wf=0,Vo=1,Yf=[0,0,0,0],jr=[],Jh={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"};class Qh extends Qe{constructor(t,e,n){super(t),this.features=e,this.mapBrowserEvent=n}}class tx extends nn{constructor(t){super(t),this.on,this.once,this.un,this.boundHandleFeatureChange_=this.handleFeatureChange_.bind(this),this.condition_=t.condition?t.condition:Jc,this.defaultDeleteCondition_=function(n){return a_(n)&&u_(n)},this.deleteCondition_=t.deleteCondition?t.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=t.insertVertexCondition?t.insertVertexCondition:kh,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new wa,this.pixelTolerance_=t.pixelTolerance!==void 0?t.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new Qn({source:new hn({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style?t.style:ix(),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)},this.source_=null,this.hitDetection_=null;let e;if(t.features?e=t.features:t.source&&(this.source_=t.source,e=new We(this.source_.getFeatures()),this.source_.addEventListener(we.ADDFEATURE,this.handleSourceAdd_.bind(this)),this.source_.addEventListener(we.REMOVEFEATURE,this.handleSourceRemove_.bind(this))),!e)throw new Error("The modify interaction requires features, a source or a layer");t.hitDetection&&(this.hitDetection_=t.hitDetection),this.features_=e,this.features_.forEach(this.addFeature_.bind(this)),this.features_.addEventListener(re.ADD,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(re.REMOVE,this.handleFeatureRemove_.bind(this)),this.lastPointerEvent_=null,this.delta_=[0,0],this.snapToPointer_=t.snapToPointer===void 0?!this.hitDetection_:t.snapToPointer}addFeature_(t){const e=t.getGeometry();if(e){const r=this.SEGMENT_WRITERS_[e.getType()];r&&r(t,e)}const n=this.getMap();n&&n.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,n),t.addEventListener(tt.CHANGE,this.boundHandleFeatureChange_)}willModifyFeatures_(t,e){if(!this.featuresBeingModified_){this.featuresBeingModified_=new We;const n=this.featuresBeingModified_.getArray();for(let r=0,o=e.length;r<o;++r){const s=e[r];for(let a=0,l=s.length;a<l;++a){const h=s[a].feature;h&&!n.includes(h)&&this.featuresBeingModified_.push(h)}}this.featuresBeingModified_.getLength()===0?this.featuresBeingModified_=null:this.dispatchEvent(new Qh(Jh.MODIFYSTART,this.featuresBeingModified_,t))}}removeFeature_(t){this.removeFeatureSegmentData_(t),this.vertexFeature_&&this.features_.getLength()===0&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.removeEventListener(tt.CHANGE,this.boundHandleFeatureChange_)}removeFeatureSegmentData_(t){const e=this.rBush_,n=[];e.forEach(function(r){t===r.feature&&n.push(r)});for(let r=n.length-1;r>=0;--r){const o=n[r];for(let s=this.dragSegments_.length-1;s>=0;--s)this.dragSegments_[s][0]===o&&this.dragSegments_.splice(s,1);e.remove(o)}}setActive(t){this.vertexFeature_&&!t&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(t)}setMap(t){this.overlay_.setMap(t),super.setMap(t)}getOverlay(){return this.overlay_}handleSourceAdd_(t){t.feature&&this.features_.push(t.feature)}handleSourceRemove_(t){t.feature&&this.features_.remove(t.feature)}handleFeatureAdd_(t){this.addFeature_(t.element)}handleFeatureChange_(t){if(!this.changingFeature_){const e=t.target;this.removeFeature_(e),this.addFeature_(e)}}handleFeatureRemove_(t){this.removeFeature_(t.element)}writePointGeometry_(t,e){const n=e.getCoordinates(),r={feature:t,geometry:e,segment:[n,n]};this.rBush_.insert(e.getExtent(),r)}writeMultiPointGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r],a={feature:t,geometry:e,depth:[r],index:r,segment:[s,s]};this.rBush_.insert(e.getExtent(),a)}}writeLineStringGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length-1;r<o;++r){const s=n.slice(r,r+2),a={feature:t,geometry:e,index:r,segment:s};this.rBush_.insert(xe(s),a)}}writeMultiLineStringGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length-1;a<l;++a){const h=s.slice(a,a+2),u={feature:t,geometry:e,depth:[r],index:a,segment:h};this.rBush_.insert(xe(h),u)}}}writePolygonGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length-1;a<l;++a){const h=s.slice(a,a+2),u={feature:t,geometry:e,depth:[r],index:a,segment:h};this.rBush_.insert(xe(h),u)}}}writeMultiPolygonGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length;a<l;++a){const h=s[a];for(let u=0,d=h.length-1;u<d;++u){const c=h.slice(u,u+2),f={feature:t,geometry:e,depth:[a,r],index:u,segment:c};this.rBush_.insert(xe(c),f)}}}}writeCircleGeometry_(t,e){const n=e.getCenter(),r={feature:t,geometry:e,index:Wf,segment:[n,n]},o={feature:t,geometry:e,index:Vo,segment:[n,n]},s=[r,o];r.featureSegments=s,o.featureSegments=s,this.rBush_.insert(yo(n),r);let a=e;this.rBush_.insert(a.getExtent(),o)}writeGeometryCollectionGeometry_(t,e){const n=e.getGeometriesArray();for(let r=0;r<n.length;++r){const o=n[r],s=this.SEGMENT_WRITERS_[o.getType()];s(t,o)}}createOrUpdateVertexFeature_(t,e,n){let r=this.vertexFeature_;return r?r.getGeometry().setCoordinates(t):(r=new Ti(new ni(t)),this.vertexFeature_=r,this.overlay_.getSource().addFeature(r)),r.set("features",e),r.set("geometries",n),r}handleEvent(t){if(!t.originalEvent)return!0;this.lastPointerEvent_=t;let e;return!t.map.getView().getInteracting()&&t.type==Et.POINTERMOVE&&!this.handlingDownUpSequence&&this.handlePointerMove_(t),this.vertexFeature_&&this.deleteCondition_(t)&&(t.type!=Et.SINGLECLICK||!this.ignoreNextSingleClick_?e=this.removePoint():e=!0),t.type==Et.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),super.handleEvent(t)&&!e}handleDragEvent(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t,this.dragSegments_);const e=[t.coordinate[0]+this.delta_[0],t.coordinate[1]+this.delta_[1]],n=[],r=[];for(let o=0,s=this.dragSegments_.length;o<s;++o){const a=this.dragSegments_[o],l=a[0],h=l.feature;n.includes(h)||n.push(h);const u=l.geometry;r.includes(u)||r.push(u);const d=l.depth;let c;const f=l.segment,g=a[1];for(;e.length<u.getStride();)e.push(f[g][e.length]);switch(u.getType()){case"Point":c=e,f[0]=e,f[1]=e;break;case"MultiPoint":c=u.getCoordinates(),c[l.index]=e,f[0]=e,f[1]=e;break;case"LineString":c=u.getCoordinates(),c[l.index+g]=e,f[g]=e;break;case"MultiLineString":c=u.getCoordinates(),c[d[0]][l.index+g]=e,f[g]=e;break;case"Polygon":c=u.getCoordinates(),c[d[0]][l.index+g]=e,f[g]=e;break;case"MultiPolygon":c=u.getCoordinates(),c[d[1]][d[0]][l.index+g]=e,f[g]=e;break;case"Circle":if(f[0]=e,f[1]=e,l.index===Wf)this.changingFeature_=!0,u.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0,t.map.getView().getProjection();let m=oc(Vt(u.getCenter()),Vt(e));u.setRadius(m),this.changingFeature_=!1}break}c&&this.setGeometryCoordinates_(u,c)}this.createOrUpdateVertexFeature_(e,n,r)}handleDownEvent(t){if(!this.condition_(t))return!1;const e=t.coordinate;this.handlePointerAtPixel_(t.pixel,t.map,e),this.dragSegments_.length=0,this.featuresBeingModified_=null;const n=this.vertexFeature_;if(n){t.map.getView().getProjection();const r=[],o=n.getGeometry().getCoordinates(),s=xe([o]),a=this.rBush_.getInExtent(s),l={};a.sort(ex);for(let h=0,u=a.length;h<u;++h){const d=a[h],c=d.segment;let f=K(d.geometry);const g=d.depth;if(g&&(f+="-"+g.join("-")),l[f]||(l[f]=new Array(2)),d.geometry.getType()==="Circle"&&d.index===Vo){const m=Zf(e,d);ei(m,o)&&!l[f][0]&&(this.dragSegments_.push([d,0]),l[f][0]=d);continue}if(ei(c[0],o)&&!l[f][0]){this.dragSegments_.push([d,0]),l[f][0]=d;continue}if(ei(c[1],o)&&!l[f][1]){if(l[f][0]&&l[f][0].index===0){let m=d.geometry.getCoordinates();switch(d.geometry.getType()){case"LineString":case"MultiLineString":continue;case"MultiPolygon":m=m[g[1]];case"Polygon":if(d.index!==m[g[0]].length-2)continue;break}}this.dragSegments_.push([d,1]),l[f][1]=d;continue}K(c)in this.vertexSegments_&&!l[f][0]&&!l[f][1]&&this.insertVertexCondition_(t)&&r.push(d)}r.length&&this.willModifyFeatures_(t,[r]);for(let h=r.length-1;h>=0;--h)this.insertVertex_(r[h],o)}return!!this.vertexFeature_}handleUpEvent(t){for(let e=this.dragSegments_.length-1;e>=0;--e){const n=this.dragSegments_[e][0],r=n.geometry;if(r.getType()==="Circle"){const o=r.getCenter(),s=n.featureSegments[0],a=n.featureSegments[1];s.segment[0]=o,s.segment[1]=o,a.segment[0]=o,a.segment[1]=o,this.rBush_.update(yo(o),s);let l=r;this.rBush_.update(l.getExtent(),a)}else this.rBush_.update(xe(n.segment),n)}return this.featuresBeingModified_&&(this.dispatchEvent(new Qh(Jh.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1}handlePointerMove_(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)}handlePointerAtPixel_(t,e,n){const r=n||e.getCoordinateFromPixel(t);e.getView().getProjection();const o=function(l,h){return Kf(r,l)-Kf(r,h)};let s,a;if(this.hitDetection_){const l=typeof this.hitDetection_=="object"?h=>h===this.hitDetection_:void 0;e.forEachFeatureAtPixel(t,(h,u,d)=>{if(d=d||h.getGeometry(),d.getType()==="Point"&&this.features_.getArray().includes(h)){a=d;const c=d.getFlatCoordinates().slice(0,2);s=[{feature:h,geometry:d,segment:[c,c]}]}return!0},{layerFilter:l})}if(!s){const l=Zi(yo(r,Yf)),h=e.getView().getResolution()*this.pixelTolerance_,u=ql(ui(l,h,Yf));s=this.rBush_.getInExtent(u)}if(s&&s.length>0){const l=s.sort(o)[0],h=l.segment;let u=Zf(r,l);const d=e.getPixelFromCoordinate(u);let c=oc(t,d);if(a||c<=this.pixelTolerance_){const f={};if(f[K(h)]=!0,this.snapToPointer_||(this.delta_[0]=u[0]-r[0],this.delta_[1]=u[1]-r[1]),l.geometry.getType()==="Circle"&&l.index===Vo)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(u,[l.feature],[l.geometry]);else{const g=e.getPixelFromCoordinate(h[0]),m=e.getPixelFromCoordinate(h[1]),p=wi(d,g),_=wi(d,m);c=Math.sqrt(Math.min(p,_)),this.snappedToVertex_=c<=this.pixelTolerance_,this.snappedToVertex_&&(u=p>_?h[1]:h[0]),this.createOrUpdateVertexFeature_(u,[l.feature],[l.geometry]);const v={};v[K(l.geometry)]=!0;for(let y=1,x=s.length;y<x;++y){const k=s[y].segment;if(ei(h[0],k[0])&&ei(h[1],k[1])||ei(h[0],k[1])&&ei(h[1],k[0])){const w=K(s[y].geometry);w in v||(v[w]=!0,f[K(k)]=!0)}else break}}this.vertexSegments_=f;return}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)}insertVertex_(t,e){const n=t.segment,r=t.feature,o=t.geometry,s=t.depth,a=t.index;let l;for(;e.length<o.getStride();)e.push(0);switch(o.getType()){case"MultiLineString":l=o.getCoordinates(),l[s[0]].splice(a+1,0,e);break;case"Polygon":l=o.getCoordinates(),l[s[0]].splice(a+1,0,e);break;case"MultiPolygon":l=o.getCoordinates(),l[s[1]][s[0]].splice(a+1,0,e);break;case"LineString":l=o.getCoordinates(),l.splice(a+1,0,e);break;default:return}this.setGeometryCoordinates_(o,l);const h=this.rBush_;h.remove(t),this.updateSegmentIndices_(o,a,s,1);const u={segment:[n[0],e],feature:r,geometry:o,depth:s,index:a};h.insert(xe(u.segment),u),this.dragSegments_.push([u,1]);const d={segment:[e,n[1]],feature:r,geometry:o,depth:s,index:a+1};h.insert(xe(d.segment),d),this.dragSegments_.push([d,0]),this.ignoreNextSingleClick_=!0}removePoint(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=Et.POINTERDRAG){const t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);const e=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new Qh(Jh.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null,e}return!1}removeVertex_(){const t=this.dragSegments_,e={};let n=!1,r,o,s,a,l,h,u,d,c,f,g;for(l=t.length-1;l>=0;--l)s=t[l],f=s[0],g=K(f.feature),f.depth&&(g+="-"+f.depth.join("-")),g in e||(e[g]={}),s[1]===0?(e[g].right=f,e[g].index=f.index):s[1]==1&&(e[g].left=f,e[g].index=f.index+1);for(g in e){switch(c=e[g].right,u=e[g].left,h=e[g].index,d=h-1,u!==void 0?f=u:f=c,d<0&&(d=0),a=f.geometry,o=a.getCoordinates(),r=o,n=!1,a.getType()){case"MultiLineString":o[f.depth[0]].length>2&&(o[f.depth[0]].splice(h,1),n=!0);break;case"LineString":o.length>2&&(o.splice(h,1),n=!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),n=!0,h===0&&(r.pop(),r.push(r[0]),d=r.length-1));break}if(n){this.setGeometryCoordinates_(a,o);const m=[];if(u!==void 0&&(this.rBush_.remove(u),m.push(u.segment[0])),c!==void 0&&(this.rBush_.remove(c),m.push(c.segment[1])),u!==void 0&&c!==void 0){const p={depth:f.depth,feature:f.feature,geometry:f.geometry,index:d,segment:m};this.rBush_.insert(xe(p.segment),p)}this.updateSegmentIndices_(a,h,f.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.length=0}}return n}setGeometryCoordinates_(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1}updateSegmentIndices_(t,e,n,r){this.rBush_.forEachInExtent(t.getExtent(),function(o){o.geometry===t&&(n===void 0||o.depth===void 0||Vi(o.depth,n))&&o.index>e&&(o.index+=r)})}}function ex(i,t){return i.index-t.index}function Kf(i,t,e){const n=t.geometry;if(n.getType()==="Circle"){let o=n;if(t.index===Vo){const s=wi(o.getCenter(),Vt(i)),a=Math.sqrt(s)-o.getRadius();return a*a}}const r=Vt(i);return jr[0]=Vt(t.segment[0]),jr[1]=Vt(t.segment[1]),D0(r,jr)}function Zf(i,t,e){const n=t.geometry;if(n.getType()==="Circle"&&t.index===Vo)return Cr(n.getClosestPoint(Vt(i)));const r=Vt(i);return jr[0]=Vt(t.segment[0]),jr[1]=Vt(t.segment[1]),Cr(Fl(r,jr))}function ix(){const i=uf();return function(t,e){return i.Point}}const nx=tx;function Hf(i){if(i.feature)return i.feature;if(i.element)return i.element}const tu=[];class rx extends nn{constructor(t){t=t||{};const e=t;e.handleDownEvent||(e.handleDownEvent=Dn),e.stopDown||(e.stopDown=yr),super(e),this.source_=t.source?t.source:null,this.vertex_=t.vertex!==void 0?t.vertex:!0,this.edge_=t.edge!==void 0?t.edge:!0,this.features_=t.features?t.features:null,this.featuresListenerKeys_=[],this.featureChangeListenerKeys_={},this.indexedFeaturesExtents_={},this.pendingFeatures_={},this.pixelTolerance_=t.pixelTolerance!==void 0?t.pixelTolerance:10,this.rBush_=new wa,this.GEOMETRY_SEGMENTERS_={Point:this.segmentPointGeometry_.bind(this),LineString:this.segmentLineStringGeometry_.bind(this),LinearRing:this.segmentLineStringGeometry_.bind(this),Polygon:this.segmentPolygonGeometry_.bind(this),MultiPoint:this.segmentMultiPointGeometry_.bind(this),MultiLineString:this.segmentMultiLineStringGeometry_.bind(this),MultiPolygon:this.segmentMultiPolygonGeometry_.bind(this),GeometryCollection:this.segmentGeometryCollectionGeometry_.bind(this),Circle:this.segmentCircleGeometry_.bind(this)}}addFeature(t,e){e=e!==void 0?e:!0;const n=K(t),r=t.getGeometry();if(r){const o=this.GEOMETRY_SEGMENTERS_[r.getType()];if(o){this.indexedFeaturesExtents_[n]=r.getExtent(Ge());const s=[];if(o(s,r),s.length===1)this.rBush_.insert(xe(s[0]),{feature:t,segment:s[0]});else if(s.length>1){const a=s.map(h=>xe(h)),l=s.map(h=>({feature:t,segment:h}));this.rBush_.load(a,l)}}}e&&(this.featureChangeListenerKeys_[n]=gt(t,tt.CHANGE,this.handleFeatureChange_,this))}forEachFeatureAdd_(t){this.addFeature(t)}forEachFeatureRemove_(t){this.removeFeature(t)}getFeatures_(){let t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t}handleEvent(t){const e=this.snapTo(t.pixel,t.coordinate,t.map);return e&&(t.coordinate=e.vertex.slice(0,2),t.pixel=e.vertexPixel),super.handleEvent(t)}handleFeatureAdd_(t){const e=Hf(t);this.addFeature(e)}handleFeatureRemove_(t){const e=Hf(t);this.removeFeature(e)}handleFeatureChange_(t){const e=t.target;if(this.handlingDownUpSequence){const n=K(e);n in this.pendingFeatures_||(this.pendingFeatures_[n]=e)}else this.updateFeature_(e)}handleUpEvent(t){const e=Object.values(this.pendingFeatures_);return e.length&&(e.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1}removeFeature(t,e){const n=e!==void 0?e:!0,r=K(t),o=this.indexedFeaturesExtents_[r];if(o){const s=this.rBush_,a=[];s.forEachInExtent(o,function(l){t===l.feature&&a.push(l)});for(let l=a.length-1;l>=0;--l)s.remove(a[l])}n&&(Ot(this.featureChangeListenerKeys_[r]),delete this.featureChangeListenerKeys_[r])}setMap(t){const e=this.getMap(),n=this.featuresListenerKeys_,r=this.getFeatures_();e&&(n.forEach(Ot),n.length=0,r.forEach(this.forEachFeatureRemove_.bind(this))),super.setMap(t),t&&(this.features_?n.push(gt(this.features_,re.ADD,this.handleFeatureAdd_,this),gt(this.features_,re.REMOVE,this.handleFeatureRemove_,this)):this.source_&&n.push(gt(this.source_,we.ADDFEATURE,this.handleFeatureAdd_,this),gt(this.source_,we.REMOVEFEATURE,this.handleFeatureRemove_,this)),r.forEach(this.forEachFeatureAdd_.bind(this)))}snapTo(t,e,n){const r=n.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+this.pixelTolerance_]),o=n.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_]),s=xe([r,o]),a=this.rBush_.getInExtent(s),l=a.length;if(l===0)return null;n.getView().getProjection();const h=Vt(e);let u,d=1/0;const c=this.pixelTolerance_*this.pixelTolerance_,f=()=>{if(u){const g=n.getPixelFromCoordinate(u);if(wi(t,g)<=c)return{vertex:u,vertexPixel:[Math.round(g[0]),Math.round(g[1])]}}return null};if(this.vertex_){for(let m=0;m<l;++m){const p=a[m];p.feature.getGeometry().getType()!=="Circle"&&p.segment.forEach(_=>{const v=Vt(_),y=wi(h,v);y<d&&(u=_,d=y)})}const g=f();if(g)return g}if(this.edge_){for(let m=0;m<l;++m){let p=null;const _=a[m];if(_.feature.getGeometry().getType()==="Circle"){let v=_.feature.getGeometry();p=Cr(P0(h,v))}else{const[v,y]=_.segment;y&&(tu[0]=Vt(v),tu[1]=Vt(y),p=Fl(h,tu))}if(p){const v=wi(h,p);v<d&&(u=p,d=v)}}const g=f();if(g)return g}return null}updateFeature_(t){this.removeFeature(t,!1),this.addFeature(t,!1)}segmentCircleGeometry_(t,e){this.getMap().getView().getProjection();const o=Xv(e).getCoordinates()[0];for(let s=0,a=o.length-1;s<a;++s)t.push(o.slice(s,s+2))}segmentGeometryCollectionGeometry_(t,e){const n=e.getGeometriesArray();for(let r=0;r<n.length;++r){const o=this.GEOMETRY_SEGMENTERS_[n[r].getType()];o&&o(t,n[r])}}segmentLineStringGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length-1;r<o;++r)t.push(n.slice(r,r+2))}segmentMultiLineStringGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length-1;a<l;++a)t.push(s.slice(a,a+2))}}segmentMultiPointGeometry_(t,e){e.getCoordinates().forEach(n=>{t.push([n])})}segmentMultiPolygonGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length;a<l;++a){const h=s[a];for(let u=0,d=h.length-1;u<d;++u)t.push(h.slice(u,u+2))}}}segmentPointGeometry_(t,e){t.push([e.getCoordinates()])}segmentPolygonGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length-1;a<l;++a)t.push(s.slice(a,a+2))}}}const ox=rx,sx=.5,ax=10,Jf=.25;class lx{constructor(t,e,n,r,o,s){this.sourceProj_=t,this.targetProj_=e;let a={};const l=bo(this.targetProj_,this.sourceProj_);this.transformInv_=function(v){const y=v[0]+"/"+v[1];return a[y]||(a[y]=l(v)),a[y]},this.maxSourceExtent_=r,this.errorThresholdSquared_=o*o,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&Nt(r)==Nt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Nt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Nt(this.targetProj_.getExtent()):null;const h=Ki(n),u=Us(n),d=Bs(n),c=js(n),f=this.transformInv_(h),g=this.transformInv_(u),m=this.transformInv_(d),p=this.transformInv_(c),_=ax+(s?Math.max(0,Math.ceil(Math.log2(Pl(n)/(s*s*256*256)))):0);if(this.addQuad_(h,u,d,c,f,g,m,p,_),this.wrapsXInSource_){let v=1/0;this.triangles_.forEach(function(y,x,k){v=Math.min(v,y.source[0][0],y.source[1][0],y.source[2][0])}),this.triangles_.forEach(function(y){if(Math.max(y.source[0][0],y.source[1][0],y.source[2][0])-v>this.sourceWorldWidth_/2){const x=[[y.source[0][0],y.source[0][1]],[y.source[1][0],y.source[1][1]],[y.source[2][0],y.source[2][1]]];x[0][0]-v>this.sourceWorldWidth_/2&&(x[0][0]-=this.sourceWorldWidth_),x[1][0]-v>this.sourceWorldWidth_/2&&(x[1][0]-=this.sourceWorldWidth_),x[2][0]-v>this.sourceWorldWidth_/2&&(x[2][0]-=this.sourceWorldWidth_);const k=Math.min(x[0][0],x[1][0],x[2][0]);Math.max(x[0][0],x[1][0],x[2][0])-k<this.sourceWorldWidth_/2&&(y.source=x)}}.bind(this))}a={}}addTriangle_(t,e,n,r,o,s){this.triangles_.push({source:[r,o,s],target:[t,e,n]})}addQuad_(t,e,n,r,o,s,a,l,h){const u=xe([o,s,a,l]),d=this.sourceWorldWidth_?Nt(u)/this.sourceWorldWidth_:null,c=this.sourceWorldWidth_,f=this.sourceProj_.canWrapX()&&d>.5&&d<1;let g=!1;if(h>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const p=xe([t,e,n,r]);g=Nt(p)/this.targetWorldWidth_>Jf||g}!f&&this.sourceProj_.isGlobal()&&d&&(g=d>Jf||g)}if(!g&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!Kt(u,this.maxSourceExtent_))return;let m=0;if(!g&&(!isFinite(o[0])||!isFinite(o[1])||!isFinite(s[0])||!isFinite(s[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(l[0])||!isFinite(l[1]))){if(h>0)g=!0;else if(m=(!isFinite(o[0])||!isFinite(o[1])?8:0)+(!isFinite(s[0])||!isFinite(s[1])?4:0)+(!isFinite(a[0])||!isFinite(a[1])?2:0)+(!isFinite(l[0])||!isFinite(l[1])?1:0),m!=1&&m!=2&&m!=4&&m!=8)return}if(h>0){if(!g){const p=[(t[0]+n[0])/2,(t[1]+n[1])/2],_=this.transformInv_(p);let v;f?v=($i(o[0],c)+$i(a[0],c))/2-$i(_[0],c):v=(o[0]+a[0])/2-_[0];const y=(o[1]+a[1])/2-_[1];g=v*v+y*y>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){const p=[(e[0]+n[0])/2,(e[1]+n[1])/2],_=this.transformInv_(p),v=[(r[0]+t[0])/2,(r[1]+t[1])/2],y=this.transformInv_(v);this.addQuad_(t,e,p,v,o,s,_,y,h-1),this.addQuad_(v,p,n,r,y,_,a,l,h-1)}else{const p=[(t[0]+e[0])/2,(t[1]+e[1])/2],_=this.transformInv_(p),v=[(n[0]+r[0])/2,(n[1]+r[1])/2],y=this.transformInv_(v);this.addQuad_(t,p,v,r,o,_,y,l,h-1),this.addQuad_(p,e,n,v,_,s,a,y,h-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}(m&11)==0&&this.addTriangle_(t,n,r,o,a,l),(m&14)==0&&this.addTriangle_(t,n,e,o,a,s),m&&((m&13)==0&&this.addTriangle_(e,r,t,s,l,o),(m&7)==0&&this.addTriangle_(e,r,n,s,l,a))}calculateSourceExtent(){const t=Ge();return this.triangles_.forEach(function(e,n,r){const o=e.source;xo(t,o[0]),xo(t,o[1]),xo(t,o[2])}),t}getTriangles(){return this.triangles_}}const hx=lx;let eu;const Qf=[];function tg(i,t,e,n,r){i.beginPath(),i.moveTo(0,0),i.lineTo(t,e),i.lineTo(n,r),i.closePath(),i.save(),i.clip(),i.fillRect(0,0,Math.max(t,n)+1,Math.max(e,r)),i.restore()}function iu(i,t){return Math.abs(i[t*4]-210)>2||Math.abs(i[t*4+3]-.75*255)>2}function ux(){if(eu===void 0){const i=document.createElement("canvas").getContext("2d");i.globalCompositeOperation="lighter",i.fillStyle="rgba(210, 0, 0, 0.75)",tg(i,4,5,4,0),tg(i,4,5,0,5);const t=i.getImageData(0,0,3,3).data;eu=iu(t,0)||iu(t,4)||iu(t,8)}return eu}function eg(i,t,e,n){const r=Xs(e,t,i);let o=qs(t,n,e);const s=t.getMetersPerUnit();s!==void 0&&(o*=s);const a=i.getMetersPerUnit();a!==void 0&&(o/=a);const l=i.getExtent();if(!l||Gs(l,r)){const h=qs(i,o,r)/o;isFinite(h)&&h>0&&(o/=h)}return o}function dx(i,t,e,n){const r=Yi(e);let o=eg(i,t,r,n);return(!isFinite(o)||o<=0)&&Rl(e,function(s){return o=eg(i,t,s,n),isFinite(o)&&o>0}),o}function cx(i,t,e,n,r,o,s,a,l,h,u,d){const c=Pe(Math.round(e*i),Math.round(e*t),Qf);if(d||(c.imageSmoothingEnabled=!1),l.length===0)return c.canvas;c.scale(e,e);function f(x){return Math.round(x*e)/e}c.globalCompositeOperation="lighter";const g=Ge();l.forEach(function(x,k,w){ic(g,x.extent)});const m=Nt(g),p=$e(g),_=Pe(Math.round(e*m/n),Math.round(e*p/n));d||(_.imageSmoothingEnabled=!1);const v=e/n;l.forEach(function(x,k,w){const M=x.extent[0]-g[0],E=-(x.extent[3]-g[3]),S=Nt(x.extent),I=$e(x.extent);x.image.width>0&&x.image.height>0&&_.drawImage(x.image,h,h,x.image.width-2*h,x.image.height-2*h,M*v,E*v,S*v,I*v)});const y=Ki(s);return a.getTriangles().forEach(function(x,k,w){const M=x.source,E=x.target;let S=M[0][0],I=M[0][1],A=M[1][0],G=M[1][1],P=M[2][0],at=M[2][1];const j=f((E[0][0]-y[0])/o),U=f(-(E[0][1]-y[1])/o),O=f((E[1][0]-y[0])/o),W=f(-(E[1][1]-y[1])/o),D=f((E[2][0]-y[0])/o),Z=f(-(E[2][1]-y[1])/o),V=S,z=I;S=0,I=0,A-=V,G-=z,P-=V,at-=z;const ot=[[A,G,0,0,O-j],[P,at,0,0,D-j],[0,0,A,G,W-U],[0,0,P,at,Z-U]],b=u0(ot);if(!!b){if(c.save(),c.beginPath(),ux()||!d){c.moveTo(O,W);const T=4,Y=j-O,C=U-W;for(let H=0;H<T;H++)c.lineTo(O+f((H+1)*Y/T),W+f(H*C/(T-1))),H!=T-1&&c.lineTo(O+f((H+1)*Y/T),W+f((H+1)*C/(T-1)));c.lineTo(D,Z)}else c.moveTo(O,W),c.lineTo(j,U),c.lineTo(D,Z);c.clip(),c.transform(b[0],b[2],b[1],b[3],j,U),c.translate(g[0]-V,g[3]-z),c.scale(n/e,-n/e),c.drawImage(_.canvas,0,0),c.restore()}}),u&&(c.save(),c.globalCompositeOperation="source-over",c.strokeStyle="black",c.lineWidth=1,a.getTriangles().forEach(function(x,k,w){const M=x.target,E=(M[0][0]-y[0])/o,S=-(M[0][1]-y[1])/o,I=(M[1][0]-y[0])/o,A=-(M[1][1]-y[1])/o,G=(M[2][0]-y[0])/o,P=-(M[2][1]-y[1])/o;c.beginPath(),c.moveTo(I,A),c.lineTo(E,S),c.lineTo(G,P),c.closePath(),c.stroke()}),c.restore()),c.canvas}class fx extends Ea{constructor(t,e,n,r,o,s,a,l,h,u,d,c){super(o,N.IDLE,{interpolate:!!c}),this.renderEdges_=d!==void 0?d:!1,this.pixelRatio_=a,this.gutter_=l,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=r,this.wrappedTileCoord_=s||o,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const f=r.getTileCoordExtent(this.wrappedTileCoord_),g=this.targetTileGrid_.getExtent();let m=this.sourceTileGrid_.getExtent();const p=g?Un(f,g):f;if(Pl(p)===0){this.state=N.EMPTY;return}const _=t.getExtent();_&&(m?m=Un(m,_):m=_);const v=r.getResolution(this.wrappedTileCoord_[0]),y=dx(t,n,p,v);if(!isFinite(y)||y<=0){this.state=N.EMPTY;return}const x=u!==void 0?u:sx;if(this.triangulation_=new hx(t,n,p,m,y*x,v),this.triangulation_.getTriangles().length===0){this.state=N.EMPTY;return}this.sourceZ_=e.getZForResolution(y);let k=this.triangulation_.calculateSourceExtent();if(m&&(t.canWrapX()?(k[1]=Wt(k[1],m[1],m[3]),k[3]=Wt(k[3],m[1],m[3])):k=Un(k,m)),!Pl(k))this.state=N.EMPTY;else{const w=e.getTileRangeForExtentAndZ(k,this.sourceZ_);for(let M=w.minX;M<=w.maxX;M++)for(let E=w.minY;E<=w.maxY;E++){const S=h(this.sourceZ_,M,E,a);S&&this.sourceTiles_.push(S)}this.sourceTiles_.length===0&&(this.state=N.EMPTY)}}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(function(e,n,r){e&&e.getState()==N.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,t.length===0)this.state=N.ERROR;else{const e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),r=typeof n=="number"?n:n[0],o=typeof n=="number"?n:n[1],s=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=cx(r,o,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),s,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=N.LOADED}this.changed()}load(){if(this.state==N.IDLE){this.state=N.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,n,r){const o=e.getState();if(o==N.IDLE||o==N.LOADING){t++;const s=gt(e,tt.CHANGE,function(a){const l=e.getState();(l==N.LOADED||l==N.ERROR||l==N.EMPTY)&&(Ot(s),t--,t===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(s)}}.bind(this)),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(e,n,r){e.getState()==N.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Ot),this.sourcesListenerKeys_=null}release(){this.canvas_&&(kl(this.canvas_.getContext("2d")),Qf.push(this.canvas_),this.canvas_=null),super.release()}}const ig=fx;class gx extends Tf{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=Ge(),this.tmpTileRange_=new Xf(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),n=t.getState(),r=e.getUseInterimTilesOnError();return n==N.LOADED||n==N.EMPTY||n==N.ERROR&&!r}getTile(t,e,n,r){const o=r.pixelRatio,s=r.viewState.projection,a=this.getLayer();let h=a.getSource().getTile(t,e,n,o,s);return h.getState()==N.ERROR&&a.getUseInterimTilesOnError()&&a.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(h)||(h=h.getInterimTile()),h}getData(t){const e=this.frameState;if(!e)return null;const n=this.getLayer(),r=Jt(e.pixelToCoordinateTransform,t.slice()),o=n.getExtent();if(o&&!Gs(o,r))return null;const s=e.pixelRatio,a=e.viewState.projection,l=e.viewState,h=n.getRenderSource(),u=h.getTileGridForProjection(l.projection),d=h.getTilePixelRatio(e.pixelRatio);for(let c=u.getZForResolution(l.resolution);c>=u.getMinZoom();--c){const f=u.getTileCoordForCoordAndZ(r,c),g=h.getTile(c,f[1],f[2],s,a);if(!(g instanceof jf||g instanceof ig))return null;if(g.getState()!==N.LOADED)continue;const m=u.getOrigin(c),p=be(u.getTileSize(c)),_=u.getResolution(c),v=Math.floor(d*((r[0]-m[0])/_-f[1]*p[0])),y=Math.floor(d*((m[1]-r[1])/_-f[2]*p[1])),x=Math.round(d*h.getGutterForProjection(l.projection));return this.getImageData(g.getImage(),v+x,y+x)}return null}loadedTileCallback(t,e,n){return this.isDrawableTile(n)?super.loadedTileCallback(t,e,n):!1}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const n=t.layerStatesArray[t.layerIndex],r=t.viewState,o=r.projection,s=r.resolution,a=r.center,l=r.rotation,h=t.pixelRatio,u=this.getLayer(),d=u.getSource(),c=d.getRevision(),f=d.getTileGridForProjection(o),g=f.getZForResolution(s,d.zDirection),m=f.getResolution(g);let p=t.extent;const _=t.viewState.resolution,v=d.getTilePixelRatio(h),y=Math.round(Nt(p)/_*h),x=Math.round($e(p)/_*h),k=n.extent&&Zi(n.extent);k&&(p=Un(p,Zi(n.extent)));const w=m*y/2/v,M=m*x/2/v,E=[a[0]-w,a[1]-M,a[0]+w,a[1]+M],S=f.getTileRangeForExtentAndZ(p,g),I={};I[g]={};const A=this.createLoadedTileFinder(d,o,I),G=this.tmpExtent,P=this.tmpTileRange_;this.newTiles_=!1;const at=l?Dl(r.center,_,l,t.size):void 0;for(let ot=S.minX;ot<=S.maxX;++ot)for(let b=S.minY;b<=S.maxY;++b){if(l&&!f.tileCoordIntersectsViewport([g,ot,b],at))continue;const T=this.getTile(g,ot,b,t);if(this.isDrawableTile(T)){const H=K(this);if(T.getState()==N.LOADED){I[g][T.tileCoord.toString()]=T;let $=T.inTransition(H);$&&n.opacity!==1&&(T.endTransition(H),$=!1),!this.newTiles_&&($||!this.renderedTiles.includes(T))&&(this.newTiles_=!0)}if(T.getAlpha(H,t.time)===1)continue}const Y=f.getTileCoordChildTileRange(T.tileCoord,P,G);let C=!1;Y&&(C=A(g+1,Y)),C||f.forEachTileCoordParentTileRange(T.tileCoord,A,P,G)}const j=m/s*h/v;Ei(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/h,1/h,l,-y/2,-x/2);const U=_c(this.pixelTransform);this.useContainer(e,U,this.getBackground(t));const O=this.context,W=O.canvas;Wl(this.inversePixelTransform,this.pixelTransform),Ei(this.tempTransform,y/2,x/2,j,j,0,-y/2,-x/2),W.width!=y||W.height!=x?(W.width=y,W.height=x):this.containerReused||O.clearRect(0,0,y,x),k&&this.clipUnrotated(O,t,k),d.getInterpolate()||(O.imageSmoothingEnabled=!1),this.preRender(O,t),this.renderedTiles.length=0;let D=Object.keys(I).map(Number);D.sort(An);let Z,V,z;n.opacity===1&&(!this.containerReused||d.getOpaque(t.viewState.projection))?D=D.reverse():(Z=[],V=[]);for(let ot=D.length-1;ot>=0;--ot){const b=D[ot],T=d.getTilePixelSize(b,h,o),C=f.getResolution(b)/m,H=T[0]*C*j,$=T[1]*C*j,vt=f.getTileCoordForCoordAndZ(Ki(E),b),Ct=f.getTileCoordExtent(vt),_t=Jt(this.tempTransform,[v*(Ct[0]-E[0])/m,v*(E[3]-Ct[3])/m]),Mt=v*d.getGutterForProjection(o),Lt=I[b];for(const Dt in Lt){const jt=Lt[Dt],F=jt.tileCoord,ut=vt[1]-F[1],pt=Math.round(_t[0]-(ut-1)*H),kt=vt[2]-F[2],yt=Math.round(_t[1]-(kt-1)*$),st=Math.round(_t[0]-ut*H),nt=Math.round(_t[1]-kt*$),wt=pt-st,zt=yt-nt,Bt=g===b,xt=Bt&&jt.getAlpha(K(this),t.time)!==1;let dt=!1;if(!xt)if(Z){z=[st,nt,st+wt,nt,st+wt,nt+zt,st,nt+zt];for(let Ft=0,St=Z.length;Ft<St;++Ft)if(g!==b&&b<V[Ft]){const ct=Z[Ft];Kt([st,nt,st+wt,nt+zt],[ct[0],ct[3],ct[4],ct[7]])&&(dt||(O.save(),dt=!0),O.beginPath(),O.moveTo(z[0],z[1]),O.lineTo(z[2],z[3]),O.lineTo(z[4],z[5]),O.lineTo(z[6],z[7]),O.moveTo(ct[6],ct[7]),O.lineTo(ct[4],ct[5]),O.lineTo(ct[2],ct[3]),O.lineTo(ct[0],ct[1]),O.clip())}Z.push(z),V.push(b)}else O.clearRect(st,nt,wt,zt);this.drawTileImage(jt,t,st,nt,wt,zt,Mt,Bt),Z&&!xt?(dt&&O.restore(),this.renderedTiles.unshift(jt)):this.renderedTiles.push(jt),this.updateUsedTiles(t.usedTiles,d,jt)}}return this.renderedRevision=c,this.renderedResolution=m,this.extentChanged=!this.renderedExtent_||!Mr(this.renderedExtent_,E),this.renderedExtent_=E,this.renderedPixelRatio=h,this.renderedProjection=o,this.manageTilePyramid(t,d,f,h,o,p,g,u.getPreload()),this.scheduleExpireCache(t,d),this.postRender(O,t),n.extent&&O.restore(),O.imageSmoothingEnabled=!0,U!==W.style.transform&&(W.style.transform=U),this.container}drawTileImage(t,e,n,r,o,s,a,l){const h=this.getTileImage(t);if(!h)return;const u=K(this),d=e.layerStatesArray[e.layerIndex],c=d.opacity*(l?t.getAlpha(u,e.time):1),f=c!==this.context.globalAlpha;f&&(this.context.save(),this.context.globalAlpha=c),this.context.drawImage(h,a,a,h.width-2*a,h.height-2*a,n,r,o,s),f&&this.context.restore(),c!==d.opacity?e.animate=!0:l&&t.endTransition(u)}getImage(){const t=this.context;return t?t.canvas:null}getTileImage(t){return t.getImage()}scheduleExpireCache(t,e){if(e.canExpireCache()){const n=function(r,o,s){const a=K(r);a in s.usedTiles&&r.expireCache(s.viewState.projection,s.usedTiles[a])}.bind(null,e);t.postRenderFunctions.push(n)}}updateUsedTiles(t,e,n){const r=K(e);r in t||(t[r]={}),t[r][n.getKey()]=!0}manageTilePyramid(t,e,n,r,o,s,a,l,h){const u=K(e);u in t.wantedTiles||(t.wantedTiles[u]={});const d=t.wantedTiles[u],c=t.tileQueue,f=n.getMinZoom(),g=t.viewState.rotation,m=g?Dl(t.viewState.center,t.viewState.resolution,g,t.size):void 0;let p=0,_,v,y,x,k,w;for(w=f;w<=a;++w)for(v=n.getTileRangeForExtentAndZ(s,w,v),y=n.getResolution(w),x=v.minX;x<=v.maxX;++x)for(k=v.minY;k<=v.maxY;++k)g&&!n.tileCoordIntersectsViewport([w,x,k],m)||(a-w<=l?(++p,_=e.getTile(w,x,k,r,o),_.getState()==N.IDLE&&(d[_.getKey()]=!0,c.isKeyQueued(_.getKey())||c.enqueue([_,u,n.getTileCoordCenter(_.tileCoord),y])),h!==void 0&&h(_)):e.useTile(w,x,k,o));e.updateCacheSize(p,o)}}const ng=gx,mx={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},px={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class vx extends ng{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.tmpTransform_=Ye()}prepareTile(t,e,n){let r;const o=t.getState();return(o===N.LOADED||o===N.ERROR)&&(this.updateExecutorGroup_(t,e,n),this.tileImageNeedsRender_(t)&&(r=!0)),r}getTile(t,e,n,r){const o=r.pixelRatio,s=r.viewState,a=s.resolution,l=s.projection,h=this.getLayer(),u=h.getSource().getTile(t,e,n,o,l),d=r.viewHints,c=!(d[Yt.ANIMATING]||d[Yt.INTERACTING]);return(c||!u.wantedResolution)&&(u.wantedResolution=a),this.prepareTile(u,o,l)&&(c||Date.now()-r.time<8)&&h.getRenderMode()!=="vector"&&this.renderTileImage_(u,r),super.getTile(t,e,n,r)}isDrawableTile(t){const e=this.getLayer();return super.isDrawableTile(t)&&(e.getRenderMode()==="vector"?K(e)in t.executorGroups:t.hasContext(e))}getTileImage(t){return t.getImage(this.getLayer())}prepareFrame(t){const e=this.getLayer().getRevision();return this.renderedLayerRevision_!==e&&(this.renderedLayerRevision_=e,this.renderedTiles.length=0),super.prepareFrame(t)}updateExecutorGroup_(t,e,n){const r=this.getLayer(),o=r.getRevision(),s=r.getRenderOrder()||null,a=t.wantedResolution,l=t.getReplayState(r);if(!l.dirty&&l.renderedResolution===a&&l.renderedRevision==o&&l.renderedRenderOrder==s)return;const h=r.getSource(),u=r.getDeclutter(),d=h.getTileGrid(),f=h.getTileGridForProjection(n).getTileCoordExtent(t.wrappedTileCoord),g=h.getSourceTiles(e,n,t),m=K(r);delete t.hitDetectionImageData[m],t.executorGroups[m]=[],u&&(t.declutterExecutorGroups[m]=[]),l.dirty=!1;for(let p=0,_=g.length;p<_;++p){const v=g[p];if(v.getState()!=N.LOADED)continue;const y=v.tileCoord,x=d.getTileCoordExtent(y),k=Un(f,x),w=ui(k,r.getRenderBuffer()*a,this.tmpExtent),M=Mr(x,k)?null:w,E=new xa(0,w,a,e),S=u?new xa(0,k,a,e):void 0,I=Df(a,e),A=function(U){let O;const W=U.getStyleFunction()||r.getStyleFunction();if(W&&(O=W(U,a)),O){const D=this.renderFeature(U,I,O,E,S);l.dirty=l.dirty||D}},G=v.getFeatures();s&&s!==l.renderedRenderOrder&&G.sort(s);for(let U=0,O=G.length;U<O;++U){const W=G[U];(!M||Kt(M,W.getGeometry().getExtent()))&&A.call(this,W)}const P=E.finish(),at=r.getRenderMode()!=="vector"&&u&&g.length===1?null:k,j=new ba(at,a,e,h.getOverlaps(),P,r.getRenderBuffer());if(t.executorGroups[m].push(j),S){const U=new ba(null,a,e,h.getOverlaps(),S.finish(),r.getRenderBuffer());t.declutterExecutorGroups[m].push(U)}}l.renderedRevision=o,l.renderedRenderOrder=s,l.renderedResolution=a}forEachFeatureAtCoordinate(t,e,n,r,o){const s=e.viewState.resolution,a=e.viewState.rotation;n=n==null?0:n;const l=this.getLayer(),u=l.getSource().getTileGridForProjection(e.viewState.projection),d=xe([t]);ui(d,s*n,d);const c={},f=function(p,_,v){let y=p.getId();y===void 0&&(y=K(p));const x=c[y];if(x){if(x!==!0&&v<x.distanceSq){if(v===0)return c[y]=!0,o.splice(o.lastIndexOf(x),1),r(p,l,_);x.geometry=_,x.distanceSq=v}}else{if(v===0)return c[y]=!0,r(p,l,_);o.push(c[y]={feature:p,layer:l,geometry:_,distanceSq:v,callback:r})}},g=this.renderedTiles;let m;for(let p=0,_=g.length;!m&&p<_;++p){const v=g[p],y=u.getTileCoordExtent(v.wrappedTileCoord);if(!Kt(y,d))continue;const x=K(l),k=[v.executorGroups[x]],w=v.declutterExecutorGroups[x];w&&k.push(w),k.some(M=>{const E=M===w?e.declutterTree.all().map(S=>S.value):null;for(let S=0,I=M.length;S<I;++S)if(m=M[S].forEachFeatureAtCoordinate(t,s,a,n,f,E),m)return!0})}return m}getFeatures(t){return new Promise(function(e,n){const r=this.getLayer(),o=K(r),s=r.getSource(),a=this.renderedProjection,l=a.getExtent(),h=this.renderedResolution,u=s.getTileGridForProjection(a),d=Jt(this.renderedPixelToCoordinateTransform_,t.slice()),c=u.getTileCoordForCoordAndResolution(d,h);let f;for(let y=0,x=this.renderedTiles.length;y<x;++y)if(c.toString()===this.renderedTiles[y].tileCoord.toString()){if(f=this.renderedTiles[y],f.getState()===N.LOADED){const k=u.getTileCoordExtent(f.tileCoord);s.getWrapX()&&a.canWrapX()&&!Bn(l,k)&&Nl(d,a);break}f=void 0}if(!f||f.loadingSourceTiles>0){e([]);return}const g=u.getTileCoordExtent(f.wrappedTileCoord),m=Ki(g),p=[(d[0]-m[0])/h,(m[1]-d[1])/h],_=f.getSourceTiles().reduce(function(y,x){return y.concat(x.getFeatures())},[]);let v=f.hitDetectionImageData[o];if(!v&&!this.animatingOrInteracting_){const y=be(u.getTileSize(u.getZForResolution(h,s.zDirection))),x=this.renderedRotation_,k=[this.getRenderTransform(u.getTileCoordCenter(f.wrappedTileCoord),h,0,je,y[0]*je,y[1]*je,0)];v=Rf(y,k,_,r.getStyleFunction(),u.getTileCoordExtent(f.wrappedTileCoord),f.getReplayState(r).renderedResolution,x),f.hitDetectionImageData[o]=v}e(Pf(p,_,v))}.bind(this))}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.renderedLayerRevision_!==void 0&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}renderDeclutter(t){const e=this.context,n=e.globalAlpha;e.globalAlpha=this.getLayer().getOpacity();const r=t.viewHints,o=!(r[Yt.ANIMATING]||r[Yt.INTERACTING]),s=this.renderedTiles;for(let a=0,l=s.length;a<l;++a){const h=s[a],u=h.declutterExecutorGroups[K(this.getLayer())];if(u)for(let d=u.length-1;d>=0;--d)u[d].execute(this.context,1,this.getTileRenderTransform(h,t),t.viewState.rotation,o,void 0,t.declutterTree)}e.globalAlpha=n}getTileRenderTransform(t,e){const n=e.pixelRatio,r=e.viewState,o=r.center,s=r.resolution,a=r.rotation,l=e.size,h=Math.round(l[0]*n),u=Math.round(l[1]*n),c=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),f=t.tileCoord,g=c.getTileCoordExtent(t.wrappedTileCoord),m=c.getTileCoordExtent(f,this.tmpExtent)[0]-g[0];return Xl($l(this.inversePixelTransform.slice(),1/n,1/n),this.getRenderTransform(o,s,a,n,h,u,m))}postRender(t,e){const n=e.viewHints,r=!(n[Yt.ANIMATING]||n[Yt.INTERACTING]);this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;const o=this.getLayer(),s=o.getRenderMode(),a=t.globalAlpha;t.globalAlpha=o.getOpacity();const l=px[s],h=e.viewState,u=h.rotation,d=o.getSource(),f=d.getTileGridForProjection(h.projection).getZForResolution(h.resolution,d.zDirection),g=this.renderedTiles,m=[],p=[];let _=!0;for(let v=g.length-1;v>=0;--v){const y=g[v];_=_&&!y.getReplayState(o).dirty;const x=y.executorGroups[K(o)].filter(S=>S.hasExecutors(l));if(x.length===0)continue;const k=this.getTileRenderTransform(y,e),w=y.tileCoord[0];let M=!1;const E=x[0].getClipCoords(k);if(E){for(let S=0,I=m.length;S<I;++S)if(f!==w&&w<p[S]){const A=m[S];Kt([E[0],E[3],E[4],E[7]],[A[0],A[3],A[4],A[7]])&&(M||(t.save(),M=!0),t.beginPath(),t.moveTo(E[0],E[1]),t.lineTo(E[2],E[3]),t.lineTo(E[4],E[5]),t.lineTo(E[6],E[7]),t.moveTo(A[6],A[7]),t.lineTo(A[4],A[5]),t.lineTo(A[2],A[3]),t.lineTo(A[0],A[1]),t.clip())}m.push(E),p.push(w)}for(let S=0,I=x.length;S<I;++S)x[S].execute(t,1,k,u,r,l);M&&t.restore()}t.globalAlpha=a,this.ready=_,super.postRender(t,e)}renderFeature(t,e,n,r,o){if(!n)return!1;let s=!1;if(Array.isArray(n))for(let a=0,l=n.length;a<l;++a)s=ka(r,t,n[a],e,this.boundHandleStyleImageChange_,void 0,o)||s;else s=ka(r,t,n,e,this.boundHandleStyleImageChange_,void 0,o);return s}tileImageNeedsRender_(t){const e=this.getLayer();if(e.getRenderMode()==="vector")return!1;const n=t.getReplayState(e),r=e.getRevision(),o=t.wantedResolution;return n.renderedTileResolution!==o||n.renderedTileRevision!==r}renderTileImage_(t,e){const n=this.getLayer(),r=t.getReplayState(n),o=n.getRevision(),s=t.executorGroups[K(n)];r.renderedTileRevision=o;const a=t.wrappedTileCoord,l=a[0],h=n.getSource();let u=e.pixelRatio;const c=e.viewState.projection,f=h.getTileGridForProjection(c),g=f.getResolution(t.tileCoord[0]),m=e.pixelRatio/t.wantedResolution*g,p=f.getResolution(l),_=t.getContext(n);u=Math.round(Math.max(u,m/u));const v=h.getTilePixelSize(l,u,c);_.canvas.width=v[0],_.canvas.height=v[1];const y=u/m;if(y!==1){const M=pc(this.tmpTransform_);$l(M,y,y),_.setTransform.apply(_,M)}const x=f.getTileCoordExtent(a,this.tmpExtent),k=m/p,w=pc(this.tmpTransform_);$l(w,k,-k),X0(w,-x[0],-x[3]);for(let M=0,E=s.length;M<E;++M)s[M].execute(_,y,w,0,!0,mx[n.getRenderMode()]);r.renderedTileResolution=t.wantedResolution}}const _x=vx,un={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class yx extends wf{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un;const n=t.renderMode||"hybrid";ft(n=="hybrid"||n=="vector",28),this.renderMode_=n,this.setPreload(t.preload?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0),this.getBackground,this.setBackground}createRenderer(){return new _x(this)}getFeatures(t){return super.getFeatures(t)}getRenderMode(){return this.renderMode_}getPreload(){return this.get(un.PRELOAD)}getUseInterimTilesOnError(){return this.get(un.USE_INTERIM_TILES_ON_ERROR)}setPreload(t){this.set(un.PRELOAD,t)}setUseInterimTilesOnError(t){this.set(un.USE_INTERIM_TILES_ON_ERROR,t)}}const xx=yx,bx=[0,0,0],dn=5;class kx{constructor(t){this.minZoom=t.minZoom!==void 0?t.minZoom:0,this.resolutions_=t.resolutions,ft(Wp(this.resolutions_,function(r,o){return o-r},!0),17);let e;if(!t.origins){for(let r=0,o=this.resolutions_.length-1;r<o;++r)if(!e)e=this.resolutions_[r]/this.resolutions_[r+1];else if(this.resolutions_[r]/this.resolutions_[r+1]!==e){e=void 0;break}}this.zoomFactor_=e,this.maxZoom=this.resolutions_.length-1,this.origin_=t.origin!==void 0?t.origin:null,this.origins_=null,t.origins!==void 0&&(this.origins_=t.origins,ft(this.origins_.length==this.resolutions_.length,20));const n=t.extent;n!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=Ki(n)),ft(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,t.tileSizes!==void 0&&(this.tileSizes_=t.tileSizes,ft(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=t.tileSize!==void 0?t.tileSize:this.tileSizes_?null:Ql,ft(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=n!==void 0?n:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],t.sizes!==void 0?this.fullTileRanges_=t.sizes.map(function(r,o){const s=new Xf(Math.min(0,r[0]),Math.max(r[0]-1,-1),Math.min(0,r[1]),Math.max(r[1]-1,-1));if(n){const a=this.getTileRangeForExtentAndZ(n,o);s.minX=Math.max(a.minX,s.minX),s.maxX=Math.min(a.maxX,s.maxX),s.minY=Math.max(a.minY,s.minY),s.maxY=Math.min(a.maxY,s.maxY)}return s},this):n&&this.calculateTileRanges_(n)}forEachTileCoord(t,e,n){const r=this.getTileRangeForExtentAndZ(t,e);for(let o=r.minX,s=r.maxX;o<=s;++o)for(let a=r.minY,l=r.maxY;a<=l;++a)n([e,o,a])}forEachTileCoordParentTileRange(t,e,n,r){let o,s,a,l=null,h=t[0]-1;for(this.zoomFactor_===2?(s=t[1],a=t[2]):l=this.getTileCoordExtent(t,r);h>=this.minZoom;){if(this.zoomFactor_===2?(s=Math.floor(s/2),a=Math.floor(a/2),o=Gr(s,s,a,a,n)):o=this.getTileRangeForExtentAndZ(l,h,n),e(h,o))return!0;--h}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,n){if(t[0]<this.maxZoom){if(this.zoomFactor_===2){const o=t[1]*2,s=t[2]*2;return Gr(o,o+1,s,s+1,e)}const r=this.getTileCoordExtent(t,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(r,t[0]+1,e)}return null}getTileRangeForTileCoordAndZ(t,e,n){if(e>this.maxZoom||e<this.minZoom)return null;const r=t[0],o=t[1],s=t[2];if(e===r)return Gr(o,s,o,s,n);if(this.zoomFactor_){const l=Math.pow(this.zoomFactor_,e-r),h=Math.floor(o*l),u=Math.floor(s*l);if(e<r)return Gr(h,h,u,u,n);const d=Math.floor(l*(o+1))-1,c=Math.floor(l*(s+1))-1;return Gr(h,d,u,c,n)}const a=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(a,e,n)}getTileRangeExtent(t,e,n){const r=this.getOrigin(t),o=this.getResolution(t),s=be(this.getTileSize(t),this.tmpSize_),a=r[0]+e.minX*s[0]*o,l=r[0]+(e.maxX+1)*s[0]*o,h=r[1]+e.minY*s[1]*o,u=r[1]+(e.maxY+1)*s[1]*o;return ti(a,h,l,u,n)}getTileRangeForExtentAndZ(t,e,n){const r=bx;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,r);const o=r[1],s=r[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,r),Gr(o,r[1],s,r[2],n)}getTileCoordCenter(t){const e=this.getOrigin(t[0]),n=this.getResolution(t[0]),r=be(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*r[0]*n,e[1]-(t[2]+.5)*r[1]*n]}getTileCoordExtent(t,e){const n=this.getOrigin(t[0]),r=this.getResolution(t[0]),o=be(this.getTileSize(t[0]),this.tmpSize_),s=n[0]+t[1]*o[0]*r,a=n[1]-(t[2]+1)*o[1]*r,l=s+o[0]*r,h=a+o[1]*r;return ti(s,a,l,h,e)}getTileCoordForCoordAndResolution(t,e,n){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,n)}getTileCoordForXYAndResolution_(t,e,n,r,o){const s=this.getZForResolution(n),a=n/this.getResolution(s),l=this.getOrigin(s),h=be(this.getTileSize(s),this.tmpSize_);let u=a*(t-l[0])/n/h[0],d=a*(l[1]-e)/n/h[1];return r?(u=Ls(u,dn)-1,d=Ls(d,dn)-1):(u=Ds(u,dn),d=Ds(d,dn)),Bf(s,u,d,o)}getTileCoordForXYAndZ_(t,e,n,r,o){const s=this.getOrigin(n),a=this.getResolution(n),l=be(this.getTileSize(n),this.tmpSize_);let h=(t-s[0])/a/l[0],u=(s[1]-e)/a/l[1];return r?(h=Ls(h,dn)-1,u=Ls(u,dn)-1):(h=Ds(h,dn),u=Ds(u,dn)),Bf(n,h,u,o)}getTileCoordForCoordAndZ(t,e,n){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,n)}getTileCoordResolution(t){return this.resolutions_[t[0]]}getTileSize(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]}getFullTileRange(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null}getZForResolution(t,e){const n=xl(this.resolutions_,t,e||0);return Wt(n,this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(t,e){return Uc(e,0,e.length,2,this.getTileCoordExtent(t))}calculateTileRanges_(t){const e=this.resolutions_.length,n=new Array(e);for(let r=this.minZoom;r<e;++r)n[r]=this.getTileRangeForExtentAndZ(t,r);this.fullTileRanges_=n}}const nu=kx,ru={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};function rg(i){let t=i.getDefaultTileGrid();return t||(t=Mx(i),i.setDefaultTileGrid(t)),t}function wx(i,t,e){const n=t[0],r=i.getTileCoordCenter(t),o=Sa(e);if(Gs(o,r))return t;{const s=Nt(o),a=Math.ceil((o[0]-r[0])/s);return r[0]+=s*a,i.getTileCoordForCoordAndZ(r,n)}}function Ex(i,t,e,n){n=n!==void 0?n:"top-left";const r=sg(i,t,e);return new nu({extent:i,origin:C0(i,n),resolutions:r,tileSize:e})}function og(i){const t=i||{},e=t.extent||Gt("EPSG:3857").getExtent(),n={extent:e,minZoom:t.minZoom,tileSize:t.tileSize,resolutions:sg(e,t.maxZoom,t.tileSize,t.maxResolution)};return new nu(n)}function sg(i,t,e,n){t=t!==void 0?t:Cc,e=be(e!==void 0?e:Ql);const r=$e(i),o=Nt(i);n=n>0?n:Math.max(o/e[0],r/e[1]);const s=t+1,a=new Array(s);for(let l=0;l<s;++l)a[l]=n/Math.pow(2,l);return a}function Mx(i,t,e,n){const r=Sa(i);return Ex(r,t,e,n)}function Sa(i){i=Gt(i);let t=i.getExtent();if(!t){const e=180*xr.degrees/i.getMetersPerUnit();t=ti(-e,-e,e,e)}return t}class Cx extends Of{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX,interpolate:t.interpolate}),this.on,this.once,this.un,this.opaque_=t.opaque!==void 0?t.opaque:!1,this.tilePixelRatio_=t.tilePixelRatio!==void 0?t.tilePixelRatio:1,this.tileGrid=t.tileGrid!==void 0?t.tileGrid:null;const e=[256,256];this.tileGrid&&be(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),e),this.tileCache=new Hh(t.cacheSize||0),this.tmpSize=[0,0],this.key_=t.key||"",this.tileOptions={transition:t.transition,interpolate:t.interpolate},this.zDirection=t.zDirection?t.zDirection:0}canExpireCache(){return this.tileCache.canExpireCache()}expireCache(t,e){const n=this.getTileCacheForProjection(t);n&&n.expireCache(e)}forEachLoadedTile(t,e,n,r){const o=this.getTileCacheForProjection(t);if(!o)return!1;let s=!0,a,l,h;for(let u=n.minX;u<=n.maxX;++u)for(let d=n.minY;d<=n.maxY;++d)l=Nr(e,u,d),h=!1,o.containsKey(l)&&(a=o.get(l),h=a.getState()===N.LOADED,h&&(h=r(a)!==!1)),h||(s=!1);return s}getGutterForProjection(t){return 0}getKey(){return this.key_}setKey(t){this.key_!==t&&(this.key_=t,this.changed())}getOpaque(t){return this.opaque_}getResolutions(){return this.tileGrid?this.tileGrid.getResolutions():null}getTile(t,e,n,r,o){return et()}getTileGrid(){return this.tileGrid}getTileGridForProjection(t){return this.tileGrid?this.tileGrid:rg(t)}getTileCacheForProjection(t){const e=this.getProjection();return ft(e===null||Vn(e,t),68),this.tileCache}getTilePixelRatio(t){return this.tilePixelRatio_}getTilePixelSize(t,e,n){const r=this.getTileGridForProjection(n),o=this.getTilePixelRatio(e),s=be(r.getTileSize(t),this.tmpSize);return o==1?s:A_(s,o,this.tmpSize)}getTileCoordForTileUrlFunction(t,e){e=e!==void 0?e:this.getProjection();const n=this.getTileGridForProjection(e);return this.getWrapX()&&e.isGlobal()&&(t=wx(n,t,e)),qy(t,n)?t:null}clear(){this.tileCache.clear()}refresh(){this.clear(),super.refresh()}updateCacheSize(t,e){const n=this.getTileCacheForProjection(e);t>n.highWaterMark&&(n.highWaterMark=t)}useTile(t,e,n,r){}}class Sx extends Qe{constructor(t,e){super(t),this.tile=e}}const Tx=Cx;function zx(i,t){const e=/\{z\}/g,n=/\{x\}/g,r=/\{y\}/g,o=/\{-y\}/g;return function(s,a,l){if(s)return i.replace(e,s[0].toString()).replace(n,s[1].toString()).replace(r,s[2].toString()).replace(o,function(){const h=s[0],u=t.getFullTileRange(h);return ft(u,55),(u.getHeight()-s[2]-1).toString()})}}function Ix(i,t){const e=i.length,n=new Array(e);for(let r=0;r<e;++r)n[r]=zx(i[r],t);return Rx(n)}function Rx(i){return i.length===1?i[0]:function(t,e,n){if(t){const r=Vy(t),o=$i(r,i.length);return i[o](t,e,n)}else return}}function Px(i){const t=[];let e=/\{([a-z])-([a-z])\}/.exec(i);if(e){const n=e[1].charCodeAt(0),r=e[2].charCodeAt(0);let o;for(o=n;o<=r;++o)t.push(i.replace(e[0],String.fromCharCode(o)));return t}if(e=/\{(\d+)-(\d+)\}/.exec(i),e){const n=parseInt(e[2],10);for(let r=parseInt(e[1],10);r<=n;r++)t.push(i.replace(e[0],r.toString()));return t}return t.push(i),t}class ou extends Tx{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===ou.prototype.tileUrlFunction,this.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(this.tileUrlFunction=t.tileUrlFunction),this.urls=null,t.urls?this.setUrls(t.urls):t.url&&this.setUrl(t.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(t){const e=t.target,n=K(e),r=e.getState();let o;r==N.LOADING?(this.tileLoadingKeys_[n]=!0,o=ru.TILELOADSTART):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],o=r==N.ERROR?ru.TILELOADERROR:r==N.LOADED?ru.TILELOADEND:void 0),o!=null&&this.dispatchEvent(new Sx(o,e))}setTileLoadFunction(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()}setTileUrlFunction(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),typeof e<"u"?this.setKey(e):this.changed()}setUrl(t){const e=Px(t);this.urls=e,this.setUrls(e)}setUrls(t){this.urls=t;const e=t.join(`
46
+ `);this.generateTileUrlFunction_?this.setTileUrlFunction(Ix(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,n){}useTile(t,e,n){const r=Nr(t,e,n);this.tileCache.containsKey(r)&&this.tileCache.get(r)}}const ag=ou;class Ax extends ag{constructor(t){const e=t.projection||"EPSG:3857",n=t.extent||Sa(e),r=t.tileGrid||og({extent:n,maxResolution:t.maxResolution,maxZoom:t.maxZoom!==void 0?t.maxZoom:22,minZoom:t.minZoom,tileSize:t.tileSize||512});super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,interpolate:!0,opaque:!1,projection:e,state:t.state,tileGrid:r,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:Lx,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX===void 0?!0:t.wrapX,transition:t.transition,zDirection:t.zDirection===void 0?1:t.zDirection}),this.format_=t.format?t.format:null,this.sourceTileCache=new Hh(this.tileCache.highWaterMark),this.overlaps_=t.overlaps==null?!0:t.overlaps,this.tileClass=t.tileClass?t.tileClass:Ky,this.tileGrids_={}}getFeaturesInExtent(t){const e=[],n=this.tileCache;if(n.getCount()===0)return e;const r=Vf(n.peekFirstKey())[0],o=this.tileGrid;return n.forEach(function(s){if(s.tileCoord[0]!==r||s.getState()!==N.LOADED)return;const a=s.getSourceTiles();for(let l=0,h=a.length;l<h;++l){const u=a[l],d=u.tileCoord;if(Kt(t,o.getTileCoordExtent(d))){const c=u.getFeatures();if(c)for(let f=0,g=c.length;f<g;++f){const m=c[f],p=m.getGeometry();Kt(t,p.getExtent())&&e.push(m)}}}}),e}getOverlaps(){return this.overlaps_}clear(){this.tileCache.clear(),this.sourceTileCache.clear()}expireCache(t,e){const n=this.getTileCacheForProjection(t),r=Object.keys(e).reduce((o,s)=>{const a=Uy(s),l=n.peek(a);if(l){const h=l.sourceTiles;for(let u=0,d=h.length;u<d;++u)o[h[u].getKey()]=!0}return o},{});super.expireCache(t,e),this.sourceTileCache.expireCache(r)}getSourceTiles(t,e,n){if(n.getState()===N.IDLE){n.setState(N.LOADING);const r=n.wrappedTileCoord,o=this.getTileGridForProjection(e),s=o.getTileCoordExtent(r),a=r[0],l=o.getResolution(a);ui(s,-l,s);const h=this.tileGrid,u=h.getExtent();u&&Un(s,u,s);const d=h.getZForResolution(l,this.zDirection);h.forEachTileCoord(s,d,c=>{const f=this.tileUrlFunction(c,t,e),g=this.sourceTileCache.containsKey(f)?this.sourceTileCache.get(f):new this.tileClass(c,f?N.IDLE:N.EMPTY,f,this.format_,this.tileLoadFunction);n.sourceTiles.push(g);const m=g.getState();if(m<N.LOADED){const p=_=>{this.handleTileChange(_);const v=g.getState();if(v===N.LOADED||v===N.ERROR){const y=g.getKey();y in n.errorTileKeys?g.getState()===N.LOADED&&delete n.errorTileKeys[y]:n.loadingSourceTiles--,v===N.ERROR?n.errorTileKeys[y]=!0:g.removeEventListener(tt.CHANGE,p),n.loadingSourceTiles===0&&n.setState(Fn(n.errorTileKeys)?N.LOADED:N.ERROR)}};g.addEventListener(tt.CHANGE,p),n.loadingSourceTiles++}m===N.IDLE&&(g.extent=h.getTileCoordExtent(c),g.projection=e,g.resolution=h.getResolution(c[0]),this.sourceTileCache.set(f,g),g.load())}),n.loadingSourceTiles||n.setState(n.sourceTiles.some(c=>c.getState()===N.ERROR)?N.ERROR:N.LOADED)}return n.sourceTiles}getTile(t,e,n,r,o){const s=Nr(t,e,n),a=this.getKey();let l;if(this.tileCache.containsKey(s)&&(l=this.tileCache.get(s),l.key===a))return l;const h=[t,e,n];let u=this.getTileCoordForTileUrlFunction(h,o);const d=this.getTileGrid().getExtent(),c=this.getTileGridForProjection(o);if(u&&d){const m=c.getTileCoordExtent(u);ui(m,-c.getResolution(t),m),Kt(d,m)||(u=null)}let f=!0;if(u!==null){const m=this.tileGrid,p=c.getResolution(t),_=m.getZForResolution(p,1),v=c.getTileCoordExtent(u);ui(v,-p,v),m.forEachTileCoord(v,_,function(y){f=f&&!this.tileUrlFunction(y,r,o)}.bind(this))}const g=new Wy(h,f?N.EMPTY:N.IDLE,u,this.getSourceTiles.bind(this,r,o));return g.key=a,l?(g.interimTile=l,g.refreshInterimChain(),this.tileCache.replace(s,g)):this.tileCache.set(s,g),g}getTileGridForProjection(t){const e=t.getCode();let n=this.tileGrids_[e];if(!n){const r=this.tileGrid,o=r.getResolutions().slice(),s=o.map(function(h,u){return r.getOrigin(u)}),a=o.map(function(h,u){return r.getTileSize(u)}),l=Cc+1;for(let h=o.length;h<l;++h)o.push(o[h-1]/2),s.push(s[h-1]),a.push(a[h-1]);n=new nu({extent:r.getExtent(),origins:s,resolutions:o,tileSizes:a}),this.tileGrids_[e]=n}return n}getTilePixelRatio(t){return t}getTilePixelSize(t,e,n){const r=this.getTileGridForProjection(n),o=be(r.getTileSize(t),this.tmpSize);return[Math.round(o[0]*e),Math.round(o[1]*e)]}updateCacheSize(t,e){super.updateCacheSize(t*2,e),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(e).highWaterMark}}const Dx=Ax;function Lx(i,t){i.setLoader(function(e,n,r){Nf(t,i.getFormat(),e,n,r,i.onLoad.bind(i),i.onError.bind(i))})}class Fx extends ag{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:Ox,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate!==void 0?t.interpolate:!0,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=t.crossOrigin!==void 0?t.crossOrigin:null,this.tileClass=t.tileClass!==void 0?t.tileClass:jf,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1}expireCache(t,e){const n=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==n?e:{});for(const r in this.tileCacheForProjection){const o=this.tileCacheForProjection[r];o.expireCache(o==n?e:{})}}getGutterForProjection(t){return this.getProjection()&&t&&!Vn(this.getProjection(),t)?0:this.getGutter()}getGutter(){return 0}getKey(){let t=super.getKey();return this.getInterpolate()||(t+=":disable-interpolation"),t}getOpaque(t){return this.getProjection()&&t&&!Vn(this.getProjection(),t)?!1:super.getOpaque(t)}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||Vn(e,t)))return this.tileGrid;{const n=K(t);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=rg(t)),this.tileGridForProjection[n]}}getTileCacheForProjection(t){const e=this.getProjection();if(!e||Vn(e,t))return this.tileCache;{const n=K(t);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new Hh(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]}}createTile_(t,e,n,r,o,s){const a=[t,e,n],l=this.getTileCoordForTileUrlFunction(a,o),h=l?this.tileUrlFunction(l,r,o):void 0,u=new this.tileClass(a,h!==void 0?N.IDLE:N.EMPTY,h!==void 0?h:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=s,u.addEventListener(tt.CHANGE,this.handleTileChange.bind(this)),u}getTile(t,e,n,r,o){const s=this.getProjection();if(!s||!o||Vn(s,o))return this.getTileInternal(t,e,n,r,s||o);{const a=this.getTileCacheForProjection(o),l=[t,e,n];let h;const u=Uf(l);a.containsKey(u)&&(h=a.get(u));const d=this.getKey();if(h&&h.key==d)return h;{const c=this.getTileGridForProjection(s),f=this.getTileGridForProjection(o),g=this.getTileCoordForTileUrlFunction(l,o),m=new ig(s,c,o,f,l,g,this.getTilePixelRatio(r),this.getGutter(),function(p,_,v,y){return this.getTileInternal(p,_,v,y,s)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return m.key=d,h?(m.interimTile=h,m.refreshInterimChain(),a.replace(u,m)):a.set(u,m),m}}}getTileInternal(t,e,n,r,o){let s=null;const a=Nr(t,e,n),l=this.getKey();if(!this.tileCache.containsKey(a))s=this.createTile_(t,e,n,r,o,l),this.tileCache.set(a,s);else if(s=this.tileCache.get(a),s.key!=l){const h=s;s=this.createTile_(t,e,n,r,o,l),h.getState()==N.IDLE?s.interimTile=h.interimTile:s.interimTile=h,s.refreshInterimChain(),this.tileCache.replace(a,s)}return s}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const e in this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}}setTileGridForProjection(t,e){const n=Gt(t);if(n){const r=K(n);r in this.tileGridForProjection||(this.tileGridForProjection[r]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function Ox(i,t){i.getImage().src=t}const Nx=Fx;class Gx extends Fs{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.setPreload(t.preload!==void 0?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0)}getPreload(){return this.get(un.PRELOAD)}setPreload(t){this.set(un.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(un.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(un.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}const jx=Gx;class Bx extends jx{constructor(t){super(t)}createRenderer(){return new ng(this)}}const Ux=Bx;var Vx={},lg,hg={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function qo(i){return i=Math.round(i),i<0?0:i>255?255:i}function ug(i){return i<0?0:i>1?1:i}function su(i){return i[i.length-1]==="%"?qo(parseFloat(i)/100*255):qo(parseInt(i))}function Ta(i){return i[i.length-1]==="%"?ug(parseFloat(i)/100):ug(parseFloat(i))}function au(i,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?i+(t-i)*e*6:e*2<1?t:e*3<2?i+(t-i)*(2/3-e)*6:i}function qx(i){var t=i.replace(/ /g,"").toLowerCase();if(t in hg)return hg[t].slice();if(t[0]==="#"){if(t.length===4){var e=parseInt(t.substr(1),16);return e>=0&&e<=4095?[(e&3840)>>4|(e&3840)>>8,e&240|(e&240)>>4,e&15|(e&15)<<4,1]:null}else if(t.length===7){var e=parseInt(t.substr(1),16);return e>=0&&e<=16777215?[(e&16711680)>>16,(e&65280)>>8,e&255,1]:null}return null}var n=t.indexOf("("),r=t.indexOf(")");if(n!==-1&&r+1===t.length){var o=t.substr(0,n),s=t.substr(n+1,r-(n+1)).split(","),a=1;switch(o){case"rgba":if(s.length!==4)return null;a=Ta(s.pop());case"rgb":return s.length!==3?null:[su(s[0]),su(s[1]),su(s[2]),a];case"hsla":if(s.length!==4)return null;a=Ta(s.pop());case"hsl":if(s.length!==3)return null;var l=(parseFloat(s[0])%360+360)%360/360,h=Ta(s[1]),u=Ta(s[2]),d=u<=.5?u*(h+1):u+h-u*h,c=u*2-d;return[qo(au(c,d,l+1/3)*255),qo(au(c,d,l)*255),qo(au(c,d,l-1/3)*255),a];default:return null}}return null}try{lg=Vx.parseCSSColor=qx}catch{}var It=function(t,e,n,r){r===void 0&&(r=1),this.r=t,this.g=e,this.b=n,this.a=r};It.parse=function(t){if(!!t){if(t instanceof It)return t;if(typeof t=="string"){var e=lg(t);if(!!e)return new It(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},It.prototype.toString=function(){var t=this.toArray(),e=t[0],n=t[1],r=t[2],o=t[3];return"rgba("+Math.round(e)+","+Math.round(n)+","+Math.round(r)+","+o+")"},It.prototype.toArray=function(){var t=this,e=t.r,n=t.g,r=t.b,o=t.a;return o===0?[0,0,0,0]:[e*255/o,n*255/o,r*255/o,o]},It.prototype.toArray01=function(){var t=this,e=t.r,n=t.g,r=t.b,o=t.a;return o===0?[0,0,0,0]:[e/o,n/o,r/o,o]},It.prototype.toArray01PremultipliedAlpha=function(){var t=this,e=t.r,n=t.g,r=t.b,o=t.a;return[e,n,r,o]},It.black=new It(0,0,0,1),It.white=new It(1,1,1,1),It.transparent=new It(0,0,0,0),It.red=new It(1,0,0,1),It.blue=new It(0,0,1,1);function Xo(i){return typeof i=="object"?["literal",i]:i}function Xx(i,t){var e=i.stops;if(!e)return $x(i,t);var n=e&&typeof e[0][0]=="object",r=n||i.property!==void 0,o=n||!r;return e=e.map(function(s){return!r&&t.tokens&&typeof s[1]=="string"?[s[0],Zx(s[1])]:[s[0],Xo(s[1])]}),n?Wx(i,t,e):o?Kx(i,t,e):hu(i,t,e)}function $x(i,t){var e=["get",i.property];if(i.default===void 0)return t.type==="string"?["string",e]:e;if(t.type==="enum")return["match",e,Object.keys(t.values),e,i.default];var n=[t.type==="color"?"to-color":t.type,e,Xo(i.default)];return t.type==="array"&&n.splice(1,0,t.value,t.length||null),n}function lu(i){switch(i.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function Wx(i,t,e){for(var n={},r={},o=[],s=0;s<e.length;s++){var a=e[s],l=a[0].zoom;n[l]===void 0&&(n[l]={zoom:l,type:i.type,property:i.property,default:i.default},r[l]=[],o.push(l)),r[l].push([a[0].value,a[1]])}var h=du({},t);if(h==="exponential"){for(var u=[lu(i),["linear"],["zoom"]],d=0,c=o;d<c.length;d+=1){var f=c[d],g=hu(n[f],t,r[f]);Br(u,f,g,!1)}return u}else{for(var m=["step",["zoom"]],p=0,_=o;p<_.length;p+=1){var v=_[p],y=hu(n[v],t,r[v]);Br(m,v,y,!0)}return uu(m),m}}function Yx(i,t){if(i!==void 0)return i;if(t!==void 0)return t}function dg(i,t){var e=Xo(Yx(i.default,t.default));return e===void 0&&t.type==="resolvedImage"?"":e}function hu(i,t,e){var n=du(i,t),r=["get",i.property];if(n==="categorical"&&typeof e[0][0]=="boolean"){for(var o=["case"],s=0,a=e;s<a.length;s+=1){var l=a[s];o.push(["==",r,l[0]],l[1])}return o.push(dg(i,t)),o}else if(n==="categorical"){for(var h=["match",r],u=0,d=e;u<d.length;u+=1){var c=d[u];Br(h,c[0],c[1],!1)}return h.push(dg(i,t)),h}else if(n==="interval"){for(var f=["step",["number",r]],g=0,m=e;g<m.length;g+=1){var p=m[g];Br(f,p[0],p[1],!0)}return uu(f),i.default===void 0?f:["case",["==",["typeof",r],"number"],f,Xo(i.default)]}else if(n==="exponential"){for(var _=i.base!==void 0?i.base:1,v=[lu(i),_===1?["linear"]:["exponential",_],["number",r]],y=0,x=e;y<x.length;y+=1){var k=x[y];Br(v,k[0],k[1],!1)}return i.default===void 0?v:["case",["==",["typeof",r],"number"],v,Xo(i.default)]}else throw new Error("Unknown property function type "+n)}function Kx(i,t,e,n){n===void 0&&(n=["zoom"]);var r=du(i,t),o,s=!1;if(r==="interval")o=["step",n],s=!0;else if(r==="exponential"){var a=i.base!==void 0?i.base:1;o=[lu(i),a===1?["linear"]:["exponential",a],n]}else throw new Error('Unknown zoom function type "'+r+'"');for(var l=0,h=e;l<h.length;l+=1){var u=h[l];Br(o,u[0],u[1],s)}return uu(o),o}function uu(i){i[0]==="step"&&i.length===3&&(i.push(0),i.push(i[3]))}function Br(i,t,e,n){i.length>3&&t===i[i.length-2]||(n&&i.length===2||i.push(t),i.push(e))}function du(i,t){return i.type?i.type:t.expression.interpolated?"exponential":"interval"}function Zx(i){for(var t=["concat"],e=/{([^{}]+)}/g,n=0,r=e.exec(i);r!==null;r=e.exec(i)){var o=i.slice(n,e.lastIndex-r[0].length);n=e.lastIndex,o.length>0&&t.push(o),t.push(["get",r[1]])}if(t.length===1)return i;if(n<i.length)t.push(i.slice(n));else if(t.length===2)return["to-string",t[1]];return t}var ci=function(i){function t(e,n){i.call(this,n),this.message=n,this.key=e}return i&&(t.__proto__=i),t.prototype=Object.create(i&&i.prototype),t.prototype.constructor=t,t}(Error),$o=function(t,e){e===void 0&&(e=[]),this.parent=t,this.bindings={};for(var n=0,r=e;n<r.length;n+=1){var o=r[n],s=o[0],a=o[1];this.bindings[s]=a}};$o.prototype.concat=function(t){return new $o(this,t)},$o.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")},$o.prototype.has=function(t){return this.bindings[t]?!0:this.parent?this.parent.has(t):!1};var za={kind:"null"},L={kind:"number"},mt={kind:"string"},lt={kind:"boolean"},Pi={kind:"color"},Ur={kind:"object"},ht={kind:"value"},Hx={kind:"error"},Ia={kind:"collator"},Ra={kind:"formatted"},Wo={kind:"resolvedImage"};function Ke(i,t){return{kind:"array",itemType:i,N:t}}function qt(i){if(i.kind==="array"){var t=qt(i.itemType);return typeof i.N=="number"?"array<"+t+", "+i.N+">":i.itemType.kind==="value"?"array":"array<"+t+">"}else return i.kind}var Jx=[za,L,mt,lt,Pi,Ra,Ur,Ke(ht),Wo];function Yo(i,t){if(t.kind==="error")return null;if(i.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!Yo(i.itemType,t.itemType))&&(typeof i.N!="number"||i.N===t.N))return null}else{if(i.kind===t.kind)return null;if(i.kind==="value")for(var e=0,n=Jx;e<n.length;e+=1){var r=n[e];if(!Yo(r,t))return null}}return"Expected "+qt(i)+" but found "+qt(t)+" instead."}function cu(i,t){return t.some(function(e){return e.kind===i.kind})}function Ko(i,t){return t.some(function(e){return e==="null"?i===null:e==="array"?Array.isArray(i):e==="object"?i&&!Array.isArray(i)&&typeof i=="object":e===typeof i})}var Zo=function(t,e,n){t?this.sensitivity=e?"variant":"case":this.sensitivity=e?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Zo.prototype.compare=function(t,e){return this.collator.compare(t,e)},Zo.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var fu=function(t,e,n,r,o){this.text=t.normalize?t.normalize():t,this.image=e,this.scale=n,this.fontStack=r,this.textColor=o},Ae=function(t){this.sections=t};Ae.fromString=function(t){return new Ae([new fu(t,null,null,null,null)])},Ae.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(t){return t.text.length!==0||t.image&&t.image.name.length!==0})},Ae.factory=function(t){return t instanceof Ae?t:Ae.fromString(t)},Ae.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(t){return t.text}).join("")},Ae.prototype.serialize=function(){for(var t=["format"],e=0,n=this.sections;e<n.length;e+=1){var r=n[e];if(r.image){t.push(["image",r.image.name]);continue}t.push(r.text);var o={};r.fontStack&&(o["text-font"]=["literal",r.fontStack.split(",")]),r.scale&&(o["font-scale"]=r.scale),r.textColor&&(o["text-color"]=["rgba"].concat(r.textColor.toArray())),t.push(o)}return t};var fi=function(t){this.name=t.name,this.available=t.available};fi.prototype.toString=function(){return this.name},fi.fromString=function(t){return t?new fi({name:t,available:!1}):null},fi.prototype.serialize=function(){return["image",this.name]};function cg(i,t,e,n){if(!(typeof i=="number"&&i>=0&&i<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof e=="number"&&e>=0&&e<=255)){var r=typeof n=="number"?[i,t,e,n]:[i,t,e];return"Invalid rgba value ["+r.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof n>"u"||typeof n=="number"&&n>=0&&n<=1?null:"Invalid rgba value ["+[i,t,e,n].join(", ")+"]: 'a' must be between 0 and 1."}function Pa(i){if(i===null)return!0;if(typeof i=="string")return!0;if(typeof i=="boolean")return!0;if(typeof i=="number")return!0;if(i instanceof It)return!0;if(i instanceof Zo)return!0;if(i instanceof Ae)return!0;if(i instanceof fi)return!0;if(Array.isArray(i)){for(var t=0,e=i;t<e.length;t+=1){var n=e[t];if(!Pa(n))return!1}return!0}else if(typeof i=="object"){for(var r in i)if(!Pa(i[r]))return!1;return!0}else return!1}function te(i){if(i===null)return za;if(typeof i=="string")return mt;if(typeof i=="boolean")return lt;if(typeof i=="number")return L;if(i instanceof It)return Pi;if(i instanceof Zo)return Ia;if(i instanceof Ae)return Ra;if(i instanceof fi)return Wo;if(Array.isArray(i)){for(var t=i.length,e,n=0,r=i;n<r.length;n+=1){var o=r[n],s=te(o);if(!e)e=s;else{if(e===s)continue;e=ht;break}}return Ke(e||ht,t)}else return Ur}function Ho(i){var t=typeof i;return i===null?"":t==="string"||t==="number"||t==="boolean"?String(i):i instanceof It||i instanceof Ae||i instanceof fi?i.toString():JSON.stringify(i)}var gi=function(t,e){this.type=t,this.value=e};gi.parse=function(t,e){if(t.length!==2)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!Pa(t[1]))return e.error("invalid value");var n=t[1],r=te(n),o=e.expectedType;return r.kind==="array"&&r.N===0&&o&&o.kind==="array"&&(typeof o.N!="number"||o.N===0)&&(r=o),new gi(r,n)},gi.prototype.evaluate=function(){return this.value},gi.prototype.eachChild=function(){},gi.prototype.outputDefined=function(){return!0},gi.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof It?["rgba"].concat(this.value.toArray()):this.value instanceof Ae?this.value.serialize():this.value};var oe=function(t){this.name="ExpressionEvaluationError",this.message=t};oe.prototype.toJSON=function(){return this.message};var gu={string:mt,number:L,boolean:lt,object:Ur},Ee=function(t,e){this.type=t,this.args=e};Ee.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=1,r,o=t[0];if(o==="array"){var s;if(t.length>2){var a=t[1];if(typeof a!="string"||!(a in gu)||a==="object")return e.error('The item type argument of "array" must be one of string, number, boolean',1);s=gu[a],n++}else s=ht;var l;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);l=t[2],n++}r=Ke(s,l)}else r=gu[o];for(var h=[];n<t.length;n++){var u=e.parse(t[n],n,ht);if(!u)return null;h.push(u)}return new Ee(r,h)},Ee.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var n=this.args[e].evaluate(t),r=Yo(this.type,te(n));if(r){if(e===this.args.length-1)throw new oe("Expected value to be of type "+qt(this.type)+", but found "+qt(te(n))+" instead.")}else return n}return null},Ee.prototype.eachChild=function(t){this.args.forEach(t)},Ee.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},Ee.prototype.serialize=function(){var t=this.type,e=[t.kind];if(t.kind==="array"){var n=t.itemType;if(n.kind==="string"||n.kind==="number"||n.kind==="boolean"){e.push(n.kind);var r=t.N;(typeof r=="number"||this.args.length>1)&&e.push(r)}}return e.concat(this.args.map(function(o){return o.serialize()}))};var cn=function(t){this.type=Ra,this.sections=t};cn.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=t[1];if(!Array.isArray(n)&&typeof n=="object")return e.error("First argument must be an image or text section.");for(var r=[],o=!1,s=1;s<=t.length-1;++s){var a=t[s];if(o&&typeof a=="object"&&!Array.isArray(a)){o=!1;var l=null;if(a["font-scale"]&&(l=e.parse(a["font-scale"],1,L),!l))return null;var h=null;if(a["text-font"]&&(h=e.parse(a["text-font"],1,Ke(mt)),!h))return null;var u=null;if(a["text-color"]&&(u=e.parse(a["text-color"],1,Pi),!u))return null;var d=r[r.length-1];d.scale=l,d.font=h,d.textColor=u}else{var c=e.parse(t[s],1,ht);if(!c)return null;var f=c.type.kind;if(f!=="string"&&f!=="value"&&f!=="null"&&f!=="resolvedImage")return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,r.push({content:c,scale:null,font:null,textColor:null})}}return new cn(r)},cn.prototype.evaluate=function(t){var e=function(n){var r=n.content.evaluate(t);return te(r)===Wo?new fu("",r,null,null,null):new fu(Ho(r),null,n.scale?n.scale.evaluate(t):null,n.font?n.font.evaluate(t).join(","):null,n.textColor?n.textColor.evaluate(t):null)};return new Ae(this.sections.map(e))},cn.prototype.eachChild=function(t){for(var e=0,n=this.sections;e<n.length;e+=1){var r=n[e];t(r.content),r.scale&&t(r.scale),r.font&&t(r.font),r.textColor&&t(r.textColor)}},cn.prototype.outputDefined=function(){return!1},cn.prototype.serialize=function(){for(var t=["format"],e=0,n=this.sections;e<n.length;e+=1){var r=n[e];t.push(r.content.serialize());var o={};r.scale&&(o["font-scale"]=r.scale.serialize()),r.font&&(o["text-font"]=r.font.serialize()),r.textColor&&(o["text-color"]=r.textColor.serialize()),t.push(o)}return t};var fn=function(t){this.type=Wo,this.input=t};fn.parse=function(t,e){if(t.length!==2)return e.error("Expected two arguments.");var n=e.parse(t[1],1,mt);return n?new fn(n):e.error("No image name provided.")},fn.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=fi.fromString(e);return n&&t.availableImages&&(n.available=t.availableImages.indexOf(e)>-1),n},fn.prototype.eachChild=function(t){t(this.input)},fn.prototype.outputDefined=function(){return!1},fn.prototype.serialize=function(){return["image",this.input.serialize()]};var Qx={"to-boolean":lt,"to-color":Pi,"to-number":L,"to-string":mt},Ze=function(t,e){this.type=t,this.args=e};Ze.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=t[0];if((n==="to-boolean"||n==="to-string")&&t.length!==2)return e.error("Expected one argument.");for(var r=Qx[n],o=[],s=1;s<t.length;s++){var a=e.parse(t[s],s,ht);if(!a)return null;o.push(a)}return new Ze(r,o)},Ze.prototype.evaluate=function(t){if(this.type.kind==="boolean")return Boolean(this.args[0].evaluate(t));if(this.type.kind==="color"){for(var e,n,r=0,o=this.args;r<o.length;r+=1){var s=o[r];if(e=s.evaluate(t),n=null,e instanceof It)return e;if(typeof e=="string"){var a=t.parseColor(e);if(a)return a}else if(Array.isArray(e)&&(e.length<3||e.length>4?n="Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":n=cg(e[0],e[1],e[2],e[3]),!n))return new It(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new oe(n||"Could not parse color from value '"+(typeof e=="string"?e:String(JSON.stringify(e)))+"'")}else if(this.type.kind==="number"){for(var l=null,h=0,u=this.args;h<u.length;h+=1){var d=u[h];if(l=d.evaluate(t),l===null)return 0;var c=Number(l);if(!isNaN(c))return c}throw new oe("Could not convert "+JSON.stringify(l)+" to number.")}else return this.type.kind==="formatted"?Ae.fromString(Ho(this.args[0].evaluate(t))):this.type.kind==="resolvedImage"?fi.fromString(Ho(this.args[0].evaluate(t))):Ho(this.args[0].evaluate(t))},Ze.prototype.eachChild=function(t){this.args.forEach(t)},Ze.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},Ze.prototype.serialize=function(){if(this.type.kind==="formatted")return new cn([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new fn(this.args[0]).serialize();var t=["to-"+this.type.kind];return this.eachChild(function(e){t.push(e.serialize())}),t};var tb=["Unknown","Point","LineString","Polygon"],Ai=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null};Ai.prototype.id=function(){return this.feature&&"id"in this.feature&&this.feature.id?this.feature.id:null},Ai.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?tb[this.feature.type]:this.feature.type:null},Ai.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Ai.prototype.canonicalID=function(){return this.canonical},Ai.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Ai.prototype.distanceFromCenter=function(){if(this.featureTileCoord&&this.featureDistanceData){var t=this.featureDistanceData.center,e=this.featureDistanceData.scale,n=this.featureTileCoord,r=n.x,o=n.y,s=r*e-t[0],a=o*e-t[1],l=this.featureDistanceData.bearing[0],h=this.featureDistanceData.bearing[1],u=l*s+h*a;return u}return 0},Ai.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=It.parse(t)),e};var me=function(t,e,n,r){this.name=t,this.type=e,this._evaluate=n,this.args=r};me.prototype.evaluate=function(t){return this._evaluate(t,this.args)},me.prototype.eachChild=function(t){this.args.forEach(t)},me.prototype.outputDefined=function(){return!1},me.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},me.parse=function(t,e){var n,r=t[0],o=me.definitions[r];if(!o)return e.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0);for(var s=Array.isArray(o)?o[0]:o.type,a=Array.isArray(o)?[[o[1],o[2]]]:o.overloads,l=a.filter(function(P){var at=P[0];return!Array.isArray(at)||at.length===t.length-1}),h=null,u=0,d=l;u<d.length;u+=1){var c=d[u],f=c[0],g=c[1];h=new vn(e.registry,e.path,null,e.scope);for(var m=[],p=!1,_=1;_<t.length;_++){var v=t[_],y=Array.isArray(f)?f[_-1]:f.type,x=h.parse(v,1+m.length,y);if(!x){p=!0;break}m.push(x)}if(!p){if(Array.isArray(f)&&f.length!==m.length){h.error("Expected "+f.length+" arguments, but found "+m.length+" instead.");continue}for(var k=0;k<m.length;k++){var w=Array.isArray(f)?f[k]:f.type,M=m[k];h.concat(k+1).checkSubtype(w,M.type)}if(h.errors.length===0)return new me(r,s,g,m)}}if(l.length===1)(n=e.errors).push.apply(n,h.errors);else{for(var E=l.length?l:a,S=E.map(function(P){var at=P[0];return eb(at)}).join(" | "),I=[],A=1;A<t.length;A++){var G=e.parse(t[A],1+I.length);if(!G)return null;I.push(qt(G.type))}e.error("Expected arguments of type "+S+", but found ("+I.join(", ")+") instead.")}return null},me.register=function(t,e){me.definitions=e;for(var n in e)t[n]=me};function eb(i){return Array.isArray(i)?"("+i.map(qt).join(", ")+")":"("+qt(i.type)+"...)"}var gn=function(t,e,n){this.type=Ia,this.locale=n,this.caseSensitive=t,this.diacriticSensitive=e};gn.parse=function(t,e){if(t.length!==2)return e.error("Expected one argument.");var n=t[1];if(typeof n!="object"||Array.isArray(n))return e.error("Collator options argument must be an object.");var r=e.parse(n["case-sensitive"]===void 0?!1:n["case-sensitive"],1,lt);if(!r)return null;var o=e.parse(n["diacritic-sensitive"]===void 0?!1:n["diacritic-sensitive"],1,lt);if(!o)return null;var s=null;return n.locale&&(s=e.parse(n.locale,1,mt),!s)?null:new gn(r,o,s)},gn.prototype.evaluate=function(t){return new Zo(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},gn.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},gn.prototype.outputDefined=function(){return!1},gn.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var mn=8192;function mu(i,t){i[0]=Math.min(i[0],t[0]),i[1]=Math.min(i[1],t[1]),i[2]=Math.max(i[2],t[0]),i[3]=Math.max(i[3],t[1])}function ib(i){return(180+i)/360}function nb(i){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360}function Aa(i,t){return!(i[0]<=t[0]||i[2]>=t[2]||i[1]<=t[1]||i[3]>=t[3])}function rb(i,t){var e=ib(i[0]),n=nb(i[1]),r=Math.pow(2,t.z);return[Math.round(e*r*mn),Math.round(n*r*mn)]}function ob(i,t,e){var n=i[0]-t[0],r=i[1]-t[1],o=i[0]-e[0],s=i[1]-e[1];return n*s-o*r===0&&n*o<=0&&r*s<=0}function sb(i,t,e){return t[1]>i[1]!=e[1]>i[1]&&i[0]<(e[0]-t[0])*(i[1]-t[1])/(e[1]-t[1])+t[0]}function pu(i,t){for(var e=!1,n=0,r=t.length;n<r;n++)for(var o=t[n],s=0,a=o.length;s<a-1;s++){if(ob(i,o[s],o[s+1]))return!1;sb(i,o[s],o[s+1])&&(e=!e)}return e}function ab(i,t){for(var e=0;e<t.length;e++)if(pu(i,t[e]))return!0;return!1}function lb(i,t){return i[0]*t[1]-i[1]*t[0]}function fg(i,t,e,n){var r=i[0]-e[0],o=i[1]-e[1],s=t[0]-e[0],a=t[1]-e[1],l=n[0]-e[0],h=n[1]-e[1],u=r*h-l*o,d=s*h-l*a;return u>0&&d<0||u<0&&d>0}function hb(i,t,e,n){var r=[t[0]-i[0],t[1]-i[1]],o=[n[0]-e[0],n[1]-e[1]];return lb(o,r)===0?!1:!!(fg(i,t,e,n)&&fg(e,n,i,t))}function ub(i,t,e){for(var n=0,r=e;n<r.length;n+=1)for(var o=r[n],s=0;s<o.length-1;++s)if(hb(i,t,o[s],o[s+1]))return!0;return!1}function gg(i,t){for(var e=0;e<i.length;++e)if(!pu(i[e],t))return!1;for(var n=0;n<i.length-1;++n)if(ub(i[n],i[n+1],t))return!1;return!0}function db(i,t){for(var e=0;e<t.length;e++)if(gg(i,t[e]))return!0;return!1}function vu(i,t,e){for(var n=[],r=0;r<i.length;r++){for(var o=[],s=0;s<i[r].length;s++){var a=rb(i[r][s],e);mu(t,a),o.push(a)}n.push(o)}return n}function mg(i,t,e){for(var n=[],r=0;r<i.length;r++){var o=vu(i[r],t,e);n.push(o)}return n}function pg(i,t,e,n){if(i[0]<e[0]||i[0]>e[2]){var r=n*.5,o=i[0]-e[0]>r?-n:e[0]-i[0]>r?n:0;o===0&&(o=i[0]-e[2]>r?-n:e[2]-i[0]>r?n:0),i[0]+=o}mu(t,i)}function cb(i){i[0]=i[1]=1/0,i[2]=i[3]=-1/0}function vg(i,t,e,n){var r=Math.pow(2,n.z)*mn,o=[n.x*mn,n.y*mn],s=[];if(!i)return s;for(var a=0,l=i;a<l.length;a+=1)for(var h=l[a],u=0,d=h;u<d.length;u+=1){var c=d[u],f=[c.x+o[0],c.y+o[1]];pg(f,t,e,r),s.push(f)}return s}function _g(i,t,e,n){var r=Math.pow(2,n.z)*mn,o=[n.x*mn,n.y*mn],s=[];if(!i)return s;for(var a=0,l=i;a<l.length;a+=1){for(var h=l[a],u=[],d=0,c=h;d<c.length;d+=1){var f=c[d],g=[f.x+o[0],f.y+o[1]];mu(t,g),u.push(g)}s.push(u)}if(t[2]-t[0]<=r/2){cb(t);for(var m=0,p=s;m<p.length;m+=1)for(var _=p[m],v=0,y=_;v<y.length;v+=1){var x=y[v];pg(x,t,e,r)}}return s}function fb(i,t){var e=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],r=i.canonicalID();if(!r)return!1;if(t.type==="Polygon"){var o=vu(t.coordinates,n,r),s=vg(i.geometry(),e,n,r);if(!Aa(e,n))return!1;for(var a=0,l=s;a<l.length;a+=1){var h=l[a];if(!pu(h,o))return!1}}if(t.type==="MultiPolygon"){var u=mg(t.coordinates,n,r),d=vg(i.geometry(),e,n,r);if(!Aa(e,n))return!1;for(var c=0,f=d;c<f.length;c+=1){var g=f[c];if(!ab(g,u))return!1}}return!0}function gb(i,t){var e=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],r=i.canonicalID();if(!r)return!1;if(t.type==="Polygon"){var o=vu(t.coordinates,n,r),s=_g(i.geometry(),e,n,r);if(!Aa(e,n))return!1;for(var a=0,l=s;a<l.length;a+=1){var h=l[a];if(!gg(h,o))return!1}}if(t.type==="MultiPolygon"){var u=mg(t.coordinates,n,r),d=_g(i.geometry(),e,n,r);if(!Aa(e,n))return!1;for(var c=0,f=d;c<f.length;c+=1){var g=f[c];if(!db(g,u))return!1}}return!0}var ri=function(t,e){this.type=lt,this.geojson=t,this.geometries=e};ri.parse=function(t,e){if(t.length!==2)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(Pa(t[1])){var n=t[1];if(n.type==="FeatureCollection")for(var r=0;r<n.features.length;++r){var o=n.features[r].geometry.type;if(o==="Polygon"||o==="MultiPolygon")return new ri(n,n.features[r].geometry)}else if(n.type==="Feature"){var s=n.geometry.type;if(s==="Polygon"||s==="MultiPolygon")return new ri(n,n.geometry)}else if(n.type==="Polygon"||n.type==="MultiPolygon")return new ri(n,n)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")},ri.prototype.evaluate=function(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return fb(t,this.geometries);if(t.geometryType()==="LineString")return gb(t,this.geometries)}return!1},ri.prototype.eachChild=function(){},ri.prototype.outputDefined=function(){return!0},ri.prototype.serialize=function(){return["within",this.geojson]};function Da(i){if(i instanceof me){if(i.name==="get"&&i.args.length===1)return!1;if(i.name==="feature-state")return!1;if(i.name==="has"&&i.args.length===1)return!1;if(i.name==="properties"||i.name==="geometry-type"||i.name==="id")return!1;if(/^filter-/.test(i.name))return!1}if(i instanceof ri)return!1;var t=!0;return i.eachChild(function(e){t&&!Da(e)&&(t=!1)}),t}function _u(i){if(i instanceof me&&i.name==="feature-state")return!1;var t=!0;return i.eachChild(function(e){t&&!_u(e)&&(t=!1)}),t}function yu(i,t){if(i instanceof me&&t.indexOf(i.name)>=0)return!1;var e=!0;return i.eachChild(function(n){e&&!yu(n,t)&&(e=!1)}),e}var pn=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};pn.parse=function(t,e){if(t.length!==2||typeof t[1]!="string")return e.error("'var' expression requires exactly one string literal argument.");var n=t[1];return e.scope.has(n)?new pn(n,e.scope.get(n)):e.error('Unknown variable "'+n+'". Make sure "'+n+'" has been bound in an enclosing "let" expression before using it.',1)},pn.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},pn.prototype.eachChild=function(){},pn.prototype.outputDefined=function(){return!1},pn.prototype.serialize=function(){return["var",this.name]};var vn=function(t,e,n,r,o){e===void 0&&(e=[]),r===void 0&&(r=new $o),o===void 0&&(o=[]),this.registry=t,this.path=e,this.key=e.map(function(s){return"["+s+"]"}).join(""),this.scope=r,this.errors=o,this.expectedType=n};vn.prototype.parse=function(t,e,n,r,o){return o===void 0&&(o={}),e?this.concat(e,n,r)._parse(t,o):this._parse(t,o)},vn.prototype._parse=function(t,e){(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number")&&(t=["literal",t]);function n(u,d,c){return c==="assert"?new Ee(d,[u]):c==="coerce"?new Ze(d,[u]):u}if(Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var r=t[0];if(typeof r!="string")return this.error("Expression name must be a string, but found "+typeof r+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var o=this.registry[r];if(o){var s=o.parse(t,this);if(!s)return null;if(this.expectedType){var a=this.expectedType,l=s.type;if((a.kind==="string"||a.kind==="number"||a.kind==="boolean"||a.kind==="object"||a.kind==="array")&&l.kind==="value")s=n(s,a,e.typeAnnotation||"assert");else if((a.kind==="color"||a.kind==="formatted"||a.kind==="resolvedImage")&&(l.kind==="value"||l.kind==="string"))s=n(s,a,e.typeAnnotation||"coerce");else if(this.checkSubtype(a,l))return null}if(!(s instanceof gi)&&s.type.kind!=="resolvedImage"&&xu(s)){var h=new Ai;try{s=new gi(s.type,s.evaluate(h))}catch(u){return this.error(u.message),null}}return s}return this.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof t>"u"?this.error("'undefined' value invalid. Use null instead."):typeof t=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},vn.prototype.concat=function(t,e,n){var r=typeof t=="number"?this.path.concat(t):this.path,o=n?this.scope.concat(n):this.scope;return new vn(this.registry,r,e||null,o,this.errors)},vn.prototype.error=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var r=""+this.key+e.map(function(o){return"["+o+"]"}).join("");this.errors.push(new ci(r,t))},vn.prototype.checkSubtype=function(t,e){var n=Yo(t,e);return n&&this.error(n),n};function xu(i){if(i instanceof pn)return xu(i.boundExpression);if(i instanceof me&&i.name==="error")return!1;if(i instanceof gn)return!1;if(i instanceof ri)return!1;var t=i instanceof Ze||i instanceof Ee,e=!0;return i.eachChild(function(n){t?e=e&&xu(n):e=e&&n instanceof gi}),e?Da(i)&&yu(i,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"]):!1}function yg(i,t){for(var e=i.length-1,n=0,r=e,o=0,s,a;n<=r;)if(o=Math.floor((n+r)/2),s=i[o],a=i[o+1],s<=t){if(o===e||t<a)return o;n=o+1}else if(s>t)r=o-1;else throw new oe("Input is not a number.");return 0}var _n=function(t,e,n){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var r=0,o=n;r<o.length;r+=1){var s=o[r],a=s[0],l=s[1];this.labels.push(a),this.outputs.push(l)}};_n.parse=function(t,e){if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!==0)return e.error("Expected an even number of arguments.");var n=e.parse(t[1],1,L);if(!n)return null;var r=[],o=null;e.expectedType&&e.expectedType.kind!=="value"&&(o=e.expectedType);for(var s=1;s<t.length;s+=2){var a=s===1?-1/0:t[s],l=t[s+1],h=s,u=s+1;if(typeof a!="number")return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',h);if(r.length&&r[r.length-1][0]>=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',h);var d=e.parse(l,u,o);if(!d)return null;o=o||d.type,r.push([a,d])}return new _n(o,n,r)},_n.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(e.length===1)return n[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);var o=e.length;if(r>=e[o-1])return n[o-1].evaluate(t);var s=yg(e,r);return n[s].evaluate(t)},_n.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e<n.length;e+=1){var r=n[e];t(r)}},_n.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},_n.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var mb=Vr;function Vr(i,t,e,n){this.cx=3*i,this.bx=3*(e-i)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=i,this.p1y=n,this.p2x=e,this.p2y=n}Vr.prototype.sampleCurveX=function(i){return((this.ax*i+this.bx)*i+this.cx)*i},Vr.prototype.sampleCurveY=function(i){return((this.ay*i+this.by)*i+this.cy)*i},Vr.prototype.sampleCurveDerivativeX=function(i){return(3*this.ax*i+2*this.bx)*i+this.cx},Vr.prototype.solveCurveX=function(i,t){typeof t>"u"&&(t=1e-6);var e,n,r,o,s;for(r=i,s=0;s<8;s++){if(o=this.sampleCurveX(r)-i,Math.abs(o)<t)return r;var a=this.sampleCurveDerivativeX(r);if(Math.abs(a)<1e-6)break;r=r-o/a}if(e=0,n=1,r=i,r<e)return e;if(r>n)return n;for(;e<n;){if(o=this.sampleCurveX(r),Math.abs(o-i)<t)return r;i>o?e=r:n=r,r=(n-e)*.5+e}return r},Vr.prototype.solve=function(i,t){return this.sampleCurveY(this.solveCurveX(i,t))};function Be(i,t,e){return i*(1-e)+t*e}function pb(i,t,e){return new It(Be(i.r,t.r,e),Be(i.g,t.g,e),Be(i.b,t.b,e),Be(i.a,t.a,e))}function vb(i,t,e){return i.map(function(n,r){return Be(n,t[r],e)})}var _b=Object.freeze({__proto__:null,number:Be,color:pb,array:vb}),xg=.95047,bg=1,kg=1.08883,wg=4/29,qr=6/29,Eg=3*qr*qr,yb=qr*qr*qr,xb=Math.PI/180,bb=180/Math.PI;function bu(i){return i>yb?Math.pow(i,1/3):i/Eg+wg}function ku(i){return i>qr?i*i*i:Eg*(i-wg)}function wu(i){return 255*(i<=.0031308?12.92*i:1.055*Math.pow(i,1/2.4)-.055)}function Eu(i){return i/=255,i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function Mg(i){var t=Eu(i.r),e=Eu(i.g),n=Eu(i.b),r=bu((.4124564*t+.3575761*e+.1804375*n)/xg),o=bu((.2126729*t+.7151522*e+.072175*n)/bg),s=bu((.0193339*t+.119192*e+.9503041*n)/kg);return{l:116*o-16,a:500*(r-o),b:200*(o-s),alpha:i.a}}function Cg(i){var t=(i.l+16)/116,e=isNaN(i.a)?t:t+i.a/500,n=isNaN(i.b)?t:t-i.b/200;return t=bg*ku(t),e=xg*ku(e),n=kg*ku(n),new It(wu(3.2404542*e-1.5371385*t-.4985314*n),wu(-.969266*e+1.8760108*t+.041556*n),wu(.0556434*e-.2040259*t+1.0572252*n),i.alpha)}function kb(i,t,e){return{l:Be(i.l,t.l,e),a:Be(i.a,t.a,e),b:Be(i.b,t.b,e),alpha:Be(i.alpha,t.alpha,e)}}function wb(i){var t=Mg(i),e=t.l,n=t.a,r=t.b,o=Math.atan2(r,n)*bb;return{h:o<0?o+360:o,c:Math.sqrt(n*n+r*r),l:e,alpha:i.a}}function Eb(i){var t=i.h*xb,e=i.c,n=i.l;return Cg({l:n,a:Math.cos(t)*e,b:Math.sin(t)*e,alpha:i.alpha})}function Mb(i,t,e){var n=t-i;return i+e*(n>180||n<-180?n-360*Math.round(n/360):n)}function Cb(i,t,e){return{h:Mb(i.h,t.h,e),c:Be(i.c,t.c,e),l:Be(i.l,t.l,e),alpha:Be(i.alpha,t.alpha,e)}}var La={forward:Mg,reverse:Cg,interpolate:kb},Fa={forward:wb,reverse:Eb,interpolate:Cb},Me=function(t,e,n,r,o){this.type=t,this.operator=e,this.interpolation=n,this.input=r,this.labels=[],this.outputs=[];for(var s=0,a=o;s<a.length;s+=1){var l=a[s],h=l[0],u=l[1];this.labels.push(h),this.outputs.push(u)}};Me.interpolationFactor=function(t,e,n,r){var o=0;if(t.name==="exponential")o=Mu(e,t.base,n,r);else if(t.name==="linear")o=Mu(e,1,n,r);else if(t.name==="cubic-bezier"){var s=t.controlPoints,a=new mb(s[0],s[1],s[2],s[3]);o=a.solve(Mu(e,1,n,r))}return o},Me.parse=function(t,e){var n=t[0],r=t[1],o=t[2],s=t.slice(3);if(!Array.isArray(r)||r.length===0)return e.error("Expected an interpolation type expression.",1);if(r[0]==="linear")r={name:"linear"};else if(r[0]==="exponential"){var a=r[1];if(typeof a!="number")return e.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:a}}else if(r[0]==="cubic-bezier"){var l=r.slice(1);if(l.length!==4||l.some(function(_){return typeof _!="number"||_<0||_>1}))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:l}}else return e.error("Unknown interpolation type "+String(r[0]),1,0);if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!==0)return e.error("Expected an even number of arguments.");if(o=e.parse(o,2,L),!o)return null;var h=[],u=null;n==="interpolate-hcl"||n==="interpolate-lab"?u=Pi:e.expectedType&&e.expectedType.kind!=="value"&&(u=e.expectedType);for(var d=0;d<s.length;d+=2){var c=s[d],f=s[d+1],g=d+3,m=d+4;if(typeof c!="number")return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',g);if(h.length&&h[h.length-1][0]>=c)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',g);var p=e.parse(f,m,u);if(!p)return null;u=u||p.type,h.push([c,p])}return u.kind!=="number"&&u.kind!=="color"&&!(u.kind==="array"&&u.itemType.kind==="number"&&typeof u.N=="number")?e.error("Type "+qt(u)+" is not interpolatable."):new Me(u,n,r,o,h)},Me.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(e.length===1)return n[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);var o=e.length;if(r>=e[o-1])return n[o-1].evaluate(t);var s=yg(e,r),a=e[s],l=e[s+1],h=Me.interpolationFactor(this.interpolation,r,a,l),u=n[s].evaluate(t),d=n[s+1].evaluate(t);return this.operator==="interpolate"?_b[this.type.kind.toLowerCase()](u,d,h):this.operator==="interpolate-hcl"?Fa.reverse(Fa.interpolate(Fa.forward(u),Fa.forward(d),h)):La.reverse(La.interpolate(La.forward(u),La.forward(d),h))},Me.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e<n.length;e+=1){var r=n[e];t(r)}},Me.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},Me.prototype.serialize=function(){var t;this.interpolation.name==="linear"?t=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?t=["linear"]:t=["exponential",this.interpolation.base]:t=["cubic-bezier"].concat(this.interpolation.controlPoints);for(var e=[this.operator,t,this.input.serialize()],n=0;n<this.labels.length;n++)e.push(this.labels[n],this.outputs[n].serialize());return e};function Mu(i,t,e,n){var r=n-e,o=i-e;return r===0?0:t===1?o/r:(Math.pow(t,o)-1)/(Math.pow(t,r)-1)}var Di=function(t,e){this.type=t,this.args=e};Di.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var n=null,r=e.expectedType;r&&r.kind!=="value"&&(n=r);for(var o=[],s=0,a=t.slice(1);s<a.length;s+=1){var l=a[s],h=e.parse(l,1+o.length,n,void 0,{typeAnnotation:"omit"});if(!h)return null;n=n||h.type,o.push(h)}var u=r&&o.some(function(d){return Yo(r,d.type)});return u?new Di(ht,o):new Di(n,o)},Di.prototype.evaluate=function(t){for(var e=null,n=0,r,o=0,s=this.args;o<s.length;o+=1){var a=s[o];if(n++,e=a.evaluate(t),e&&e instanceof fi&&!e.available&&(r||(r=e),e=null,n===this.args.length))return r;if(e!==null)break}return e},Di.prototype.eachChild=function(t){this.args.forEach(t)},Di.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},Di.prototype.serialize=function(){var t=["coalesce"];return this.eachChild(function(e){t.push(e.serialize())}),t};var yn=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};yn.prototype.evaluate=function(t){return this.result.evaluate(t)},yn.prototype.eachChild=function(t){for(var e=0,n=this.bindings;e<n.length;e+=1){var r=n[e];t(r[1])}t(this.result)},yn.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var n=[],r=1;r<t.length-1;r+=2){var o=t[r];if(typeof o!="string")return e.error("Expected string, but found "+typeof o+" instead.",r);if(/[^a-zA-Z0-9_]/.test(o))return e.error("Variable names must contain only alphanumeric characters or '_'.",r);var s=e.parse(t[r+1],r+1);if(!s)return null;n.push([o,s])}var a=e.parse(t[t.length-1],t.length-1,e.expectedType,n);return a?new yn(n,a):null},yn.prototype.outputDefined=function(){return this.result.outputDefined()},yn.prototype.serialize=function(){for(var t=["let"],e=0,n=this.bindings;e<n.length;e+=1){var r=n[e],o=r[0],s=r[1];t.push(o,s.serialize())}return t.push(this.result.serialize()),t};var tr=function(t,e,n){this.type=t,this.index=e,this.input=n};tr.parse=function(t,e){if(t.length!==3)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,L),r=e.parse(t[2],2,Ke(e.expectedType||ht));if(!n||!r)return null;var o=r.type;return new tr(o.itemType,n,r)},tr.prototype.evaluate=function(t){var e=this.index.evaluate(t),n=this.input.evaluate(t);if(e<0)throw new oe("Array index out of bounds: "+e+" < 0.");if(e>=n.length)throw new oe("Array index out of bounds: "+e+" > "+(n.length-1)+".");if(e!==Math.floor(e))throw new oe("Array index must be an integer, but found "+e+" instead.");return n[e]},tr.prototype.eachChild=function(t){t(this.index),t(this.input)},tr.prototype.outputDefined=function(){return!1},tr.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var er=function(t,e){this.type=lt,this.needle=t,this.haystack=e};er.parse=function(t,e){if(t.length!==3)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,ht),r=e.parse(t[2],2,ht);return!n||!r?null:cu(n.type,[lt,mt,L,za,ht])?new er(n,r):e.error("Expected first argument to be of type boolean, string, number or null, but found "+qt(n.type)+" instead")},er.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(n==null)return!1;if(!Ko(e,["boolean","string","number","null"]))throw new oe("Expected first argument to be of type boolean, string, number or null, but found "+qt(te(e))+" instead.");if(!Ko(n,["string","array"]))throw new oe("Expected second argument to be of type array or string, but found "+qt(te(n))+" instead.");return n.indexOf(e)>=0},er.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},er.prototype.outputDefined=function(){return!0},er.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var xn=function(t,e,n){this.type=L,this.needle=t,this.haystack=e,this.fromIndex=n};xn.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,ht),r=e.parse(t[2],2,ht);if(!n||!r)return null;if(!cu(n.type,[lt,mt,L,za,ht]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+qt(n.type)+" instead");if(t.length===4){var o=e.parse(t[3],3,L);return o?new xn(n,r,o):null}else return new xn(n,r)},xn.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!Ko(e,["boolean","string","number","null"]))throw new oe("Expected first argument to be of type boolean, string, number or null, but found "+qt(te(e))+" instead.");if(!Ko(n,["string","array"]))throw new oe("Expected second argument to be of type array or string, but found "+qt(te(n))+" instead.");if(this.fromIndex){var r=this.fromIndex.evaluate(t);return n.indexOf(e,r)}return n.indexOf(e)},xn.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},xn.prototype.outputDefined=function(){return!1},xn.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var ir=function(t,e,n,r,o,s){this.inputType=t,this.type=e,this.input=n,this.cases=r,this.outputs=o,this.otherwise=s};ir.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!==1)return e.error("Expected an even number of arguments.");var n,r;e.expectedType&&e.expectedType.kind!=="value"&&(r=e.expectedType);for(var o={},s=[],a=2;a<t.length-1;a+=2){var l=t[a],h=t[a+1];Array.isArray(l)||(l=[l]);var u=e.concat(a);if(l.length===0)return u.error("Expected at least one branch label.");for(var d=0,c=l;d<c.length;d+=1){var f=c[d];if(typeof f!="number"&&typeof f!="string")return u.error("Branch labels must be numbers or strings.");if(typeof f=="number"&&Math.abs(f)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof f=="number"&&Math.floor(f)!==f)return u.error("Numeric branch labels must be integer values.");if(!n)n=te(f);else if(u.checkSubtype(n,te(f)))return null;if(typeof o[String(f)]<"u")return u.error("Branch labels must be unique.");o[String(f)]=s.length}var g=e.parse(h,a,r);if(!g)return null;r=r||g.type,s.push(g)}var m=e.parse(t[1],1,ht);if(!m)return null;var p=e.parse(t[t.length-1],t.length-1,r);return!p||m.type.kind!=="value"&&e.concat(1).checkSubtype(n,m.type)?null:new ir(n,r,m,o,s,p)},ir.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=te(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise;return n.evaluate(t)},ir.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},ir.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})&&this.otherwise.outputDefined()},ir.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],n=Object.keys(this.cases).sort(),r=[],o={},s=0,a=n;s<a.length;s+=1){var l=a[s],h=o[this.cases[l]];h===void 0?(o[this.cases[l]]=r.length,r.push([this.cases[l],[l]])):r[h][1].push(l)}for(var u=function(m){return t.inputType.kind==="number"?Number(m):m},d=0,c=r;d<c.length;d+=1){var f=c[d],h=f[0],g=f[1];g.length===1?e.push(u(g[0])):e.push(g.map(u)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e};var nr=function(t,e,n){this.type=t,this.branches=e,this.otherwise=n};nr.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!==0)return e.error("Expected an odd number of arguments.");var n;e.expectedType&&e.expectedType.kind!=="value"&&(n=e.expectedType);for(var r=[],o=1;o<t.length-1;o+=2){var s=e.parse(t[o],o,lt);if(!s)return null;var a=e.parse(t[o+1],o+1,n);if(!a)return null;r.push([s,a]),n=n||a.type}var l=e.parse(t[t.length-1],t.length-1,n);return l?new nr(n,r,l):null},nr.prototype.evaluate=function(t){for(var e=0,n=this.branches;e<n.length;e+=1){var r=n[e],o=r[0],s=r[1];if(o.evaluate(t))return s.evaluate(t)}return this.otherwise.evaluate(t)},nr.prototype.eachChild=function(t){for(var e=0,n=this.branches;e<n.length;e+=1){var r=n[e],o=r[0],s=r[1];t(o),t(s)}t(this.otherwise)},nr.prototype.outputDefined=function(){return this.branches.every(function(t){t[0];var e=t[1];return e.outputDefined()})&&this.otherwise.outputDefined()},nr.prototype.serialize=function(){var t=["case"];return this.eachChild(function(e){t.push(e.serialize())}),t};var bn=function(t,e,n,r){this.type=t,this.input=e,this.beginIndex=n,this.endIndex=r};bn.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,ht),r=e.parse(t[2],2,L);if(!n||!r)return null;if(!cu(n.type,[Ke(ht),mt,ht]))return e.error("Expected first argument to be of type array or string, but found "+qt(n.type)+" instead");if(t.length===4){var o=e.parse(t[3],3,L);return o?new bn(n.type,n,r,o):null}else return new bn(n.type,n,r)},bn.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=this.beginIndex.evaluate(t);if(!Ko(e,["string","array"]))throw new oe("Expected first argument to be of type array or string, but found "+qt(te(e))+" instead.");if(this.endIndex){var r=this.endIndex.evaluate(t);return e.slice(n,r)}return e.slice(n)},bn.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},bn.prototype.outputDefined=function(){return!1},bn.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Sg(i,t){return i==="=="||i==="!="?t.kind==="boolean"||t.kind==="string"||t.kind==="number"||t.kind==="null"||t.kind==="value":t.kind==="string"||t.kind==="number"||t.kind==="value"}function Sb(i,t,e){return t===e}function Tb(i,t,e){return t!==e}function zb(i,t,e){return t<e}function Ib(i,t,e){return t>e}function Rb(i,t,e){return t<=e}function Pb(i,t,e){return t>=e}function Tg(i,t,e,n){return n.compare(t,e)===0}function Ab(i,t,e,n){return!Tg(i,t,e,n)}function Db(i,t,e,n){return n.compare(t,e)<0}function Lb(i,t,e,n){return n.compare(t,e)>0}function Fb(i,t,e,n){return n.compare(t,e)<=0}function Ob(i,t,e,n){return n.compare(t,e)>=0}function Xr(i,t,e){var n=i!=="=="&&i!=="!=";return function(){function r(o,s,a){this.type=lt,this.lhs=o,this.rhs=s,this.collator=a,this.hasUntypedArgument=o.type.kind==="value"||s.type.kind==="value"}return r.parse=function(s,a){if(s.length!==3&&s.length!==4)return a.error("Expected two or three arguments.");var l=s[0],h=a.parse(s[1],1,ht);if(!h)return null;if(!Sg(l,h.type))return a.concat(1).error('"'+l+`" comparisons are not supported for type '`+qt(h.type)+"'.");var u=a.parse(s[2],2,ht);if(!u)return null;if(!Sg(l,u.type))return a.concat(2).error('"'+l+`" comparisons are not supported for type '`+qt(u.type)+"'.");if(h.type.kind!==u.type.kind&&h.type.kind!=="value"&&u.type.kind!=="value")return a.error("Cannot compare types '"+qt(h.type)+"' and '"+qt(u.type)+"'.");n&&(h.type.kind==="value"&&u.type.kind!=="value"?h=new Ee(u.type,[h]):h.type.kind!=="value"&&u.type.kind==="value"&&(u=new Ee(h.type,[u])));var d=null;if(s.length===4){if(h.type.kind!=="string"&&u.type.kind!=="string"&&h.type.kind!=="value"&&u.type.kind!=="value")return a.error("Cannot use collator to compare non-string types.");if(d=a.parse(s[3],3,Ia),!d)return null}return new r(h,u,d)},r.prototype.evaluate=function(s){var a=this.lhs.evaluate(s),l=this.rhs.evaluate(s);if(n&&this.hasUntypedArgument){var h=te(a),u=te(l);if(h.kind!==u.kind||!(h.kind==="string"||h.kind==="number"))throw new oe('Expected arguments for "'+i+'" to be (string, string) or (number, number), but found ('+h.kind+", "+u.kind+") instead.")}if(this.collator&&!n&&this.hasUntypedArgument){var d=te(a),c=te(l);if(d.kind!=="string"||c.kind!=="string")return t(s,a,l)}return this.collator?e(s,a,l,this.collator.evaluate(s)):t(s,a,l)},r.prototype.eachChild=function(s){s(this.lhs),s(this.rhs),this.collator&&s(this.collator)},r.prototype.outputDefined=function(){return!0},r.prototype.serialize=function(){var s=[i];return this.eachChild(function(a){s.push(a.serialize())}),s},r}()}var Nb=Xr("==",Sb,Tg),Gb=Xr("!=",Tb,Ab),jb=Xr("<",zb,Db),Bb=Xr(">",Ib,Lb),Ub=Xr("<=",Rb,Fb),Vb=Xr(">=",Pb,Ob),rr=function(t,e,n,r,o){this.type=mt,this.number=t,this.locale=e,this.currency=n,this.minFractionDigits=r,this.maxFractionDigits=o};rr.parse=function(t,e){if(t.length!==3)return e.error("Expected two arguments.");var n=e.parse(t[1],1,L);if(!n)return null;var r=t[2];if(typeof r!="object"||Array.isArray(r))return e.error("NumberFormat options argument must be an object.");var o=null;if(r.locale&&(o=e.parse(r.locale,1,mt),!o))return null;var s=null;if(r.currency&&(s=e.parse(r.currency,1,mt),!s))return null;var a=null;if(r["min-fraction-digits"]&&(a=e.parse(r["min-fraction-digits"],1,L),!a))return null;var l=null;return r["max-fraction-digits"]&&(l=e.parse(r["max-fraction-digits"],1,L),!l)?null:new rr(n,o,s,a,l)},rr.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},rr.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},rr.prototype.outputDefined=function(){return!1},rr.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var or=function(t){this.type=L,this.input=t};or.parse=function(t,e){if(t.length!==2)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1);return n?n.type.kind!=="array"&&n.type.kind!=="string"&&n.type.kind!=="value"?e.error("Expected argument of type string or array, but found "+qt(n.type)+" instead."):new or(n):null},or.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(typeof e=="string")return e.length;if(Array.isArray(e))return e.length;throw new oe("Expected value to be of type string or array, but found "+qt(te(e))+" instead.")},or.prototype.eachChild=function(t){t(this.input)},or.prototype.outputDefined=function(){return!1},or.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Cu={"==":Nb,"!=":Gb,">":Bb,"<":jb,">=":Vb,"<=":Ub,array:Ee,at:tr,boolean:Ee,case:nr,coalesce:Di,collator:gn,format:cn,image:fn,in:er,"index-of":xn,interpolate:Me,"interpolate-hcl":Me,"interpolate-lab":Me,length:or,let:yn,literal:gi,match:ir,number:Ee,"number-format":rr,object:Ee,slice:bn,step:_n,string:Ee,"to-boolean":Ze,"to-color":Ze,"to-number":Ze,"to-string":Ze,var:pn,within:ri};function zg(i,t){var e=t[0],n=t[1],r=t[2],o=t[3];e=e.evaluate(i),n=n.evaluate(i),r=r.evaluate(i);var s=o?o.evaluate(i):1,a=cg(e,n,r,s);if(a)throw new oe(a);return new It(e/255*s,n/255*s,r/255*s,s)}function Ig(i,t){return i in t}function Su(i,t){var e=t[i];return typeof e>"u"?null:e}function qb(i,t,e,n){for(;e<=n;){var r=e+n>>1;if(t[r]===i)return!0;t[r]>i?n=r-1:e=r+1}return!1}function sr(i){return{type:i}}me.register(Cu,{error:[Hx,[mt],function(i,t){var e=t[0];throw new oe(e.evaluate(i))}],typeof:[mt,[ht],function(i,t){var e=t[0];return qt(te(e.evaluate(i)))}],"to-rgba":[Ke(L,4),[Pi],function(i,t){var e=t[0];return e.evaluate(i).toArray()}],rgb:[Pi,[L,L,L],zg],rgba:[Pi,[L,L,L,L],zg],has:{type:lt,overloads:[[[mt],function(i,t){var e=t[0];return Ig(e.evaluate(i),i.properties())}],[[mt,Ur],function(i,t){var e=t[0],n=t[1];return Ig(e.evaluate(i),n.evaluate(i))}]]},get:{type:ht,overloads:[[[mt],function(i,t){var e=t[0];return Su(e.evaluate(i),i.properties())}],[[mt,Ur],function(i,t){var e=t[0],n=t[1];return Su(e.evaluate(i),n.evaluate(i))}]]},"feature-state":[ht,[mt],function(i,t){var e=t[0];return Su(e.evaluate(i),i.featureState||{})}],properties:[Ur,[],function(i){return i.properties()}],"geometry-type":[mt,[],function(i){return i.geometryType()}],id:[ht,[],function(i){return i.id()}],zoom:[L,[],function(i){return i.globals.zoom}],pitch:[L,[],function(i){return i.globals.pitch||0}],"distance-from-center":[L,[],function(i){return i.distanceFromCenter()}],"heatmap-density":[L,[],function(i){return i.globals.heatmapDensity||0}],"line-progress":[L,[],function(i){return i.globals.lineProgress||0}],"sky-radial-progress":[L,[],function(i){return i.globals.skyRadialProgress||0}],accumulated:[ht,[],function(i){return i.globals.accumulated===void 0?null:i.globals.accumulated}],"+":[L,sr(L),function(i,t){for(var e=0,n=0,r=t;n<r.length;n+=1){var o=r[n];e+=o.evaluate(i)}return e}],"*":[L,sr(L),function(i,t){for(var e=1,n=0,r=t;n<r.length;n+=1){var o=r[n];e*=o.evaluate(i)}return e}],"-":{type:L,overloads:[[[L,L],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)-n.evaluate(i)}],[[L],function(i,t){var e=t[0];return-e.evaluate(i)}]]},"/":[L,[L,L],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)/n.evaluate(i)}],"%":[L,[L,L],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)%n.evaluate(i)}],ln2:[L,[],function(){return Math.LN2}],pi:[L,[],function(){return Math.PI}],e:[L,[],function(){return Math.E}],"^":[L,[L,L],function(i,t){var e=t[0],n=t[1];return Math.pow(e.evaluate(i),n.evaluate(i))}],sqrt:[L,[L],function(i,t){var e=t[0];return Math.sqrt(e.evaluate(i))}],log10:[L,[L],function(i,t){var e=t[0];return Math.log(e.evaluate(i))/Math.LN10}],ln:[L,[L],function(i,t){var e=t[0];return Math.log(e.evaluate(i))}],log2:[L,[L],function(i,t){var e=t[0];return Math.log(e.evaluate(i))/Math.LN2}],sin:[L,[L],function(i,t){var e=t[0];return Math.sin(e.evaluate(i))}],cos:[L,[L],function(i,t){var e=t[0];return Math.cos(e.evaluate(i))}],tan:[L,[L],function(i,t){var e=t[0];return Math.tan(e.evaluate(i))}],asin:[L,[L],function(i,t){var e=t[0];return Math.asin(e.evaluate(i))}],acos:[L,[L],function(i,t){var e=t[0];return Math.acos(e.evaluate(i))}],atan:[L,[L],function(i,t){var e=t[0];return Math.atan(e.evaluate(i))}],min:[L,sr(L),function(i,t){return Math.min.apply(Math,t.map(function(e){return e.evaluate(i)}))}],max:[L,sr(L),function(i,t){return Math.max.apply(Math,t.map(function(e){return e.evaluate(i)}))}],abs:[L,[L],function(i,t){var e=t[0];return Math.abs(e.evaluate(i))}],round:[L,[L],function(i,t){var e=t[0],n=e.evaluate(i);return n<0?-Math.round(-n):Math.round(n)}],floor:[L,[L],function(i,t){var e=t[0];return Math.floor(e.evaluate(i))}],ceil:[L,[L],function(i,t){var e=t[0];return Math.ceil(e.evaluate(i))}],"filter-==":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1];return i.properties()[e.value]===n.value}],"filter-id-==":[lt,[ht],function(i,t){var e=t[0];return i.id()===e.value}],"filter-type-==":[lt,[mt],function(i,t){var e=t[0];return i.geometryType()===e.value}],"filter-<":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],r=i.properties()[e.value],o=n.value;return typeof r==typeof o&&r<o}],"filter-id-<":[lt,[ht],function(i,t){var e=t[0],n=i.id(),r=e.value;return typeof n==typeof r&&n<r}],"filter->":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],r=i.properties()[e.value],o=n.value;return typeof r==typeof o&&r>o}],"filter-id->":[lt,[ht],function(i,t){var e=t[0],n=i.id(),r=e.value;return typeof n==typeof r&&n>r}],"filter-<=":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],r=i.properties()[e.value],o=n.value;return typeof r==typeof o&&r<=o}],"filter-id-<=":[lt,[ht],function(i,t){var e=t[0],n=i.id(),r=e.value;return typeof n==typeof r&&n<=r}],"filter->=":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],r=i.properties()[e.value],o=n.value;return typeof r==typeof o&&r>=o}],"filter-id->=":[lt,[ht],function(i,t){var e=t[0],n=i.id(),r=e.value;return typeof n==typeof r&&n>=r}],"filter-has":[lt,[ht],function(i,t){var e=t[0];return e.value in i.properties()}],"filter-has-id":[lt,[],function(i){return i.id()!==null&&i.id()!==void 0}],"filter-type-in":[lt,[Ke(mt)],function(i,t){var e=t[0];return e.value.indexOf(i.geometryType())>=0}],"filter-id-in":[lt,[Ke(ht)],function(i,t){var e=t[0];return e.value.indexOf(i.id())>=0}],"filter-in-small":[lt,[mt,Ke(ht)],function(i,t){var e=t[0],n=t[1];return n.value.indexOf(i.properties()[e.value])>=0}],"filter-in-large":[lt,[mt,Ke(ht)],function(i,t){var e=t[0],n=t[1];return qb(i.properties()[e.value],n.value,0,n.value.length-1)}],all:{type:lt,overloads:[[[lt,lt],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)&&n.evaluate(i)}],[sr(lt),function(i,t){for(var e=0,n=t;e<n.length;e+=1){var r=n[e];if(!r.evaluate(i))return!1}return!0}]]},any:{type:lt,overloads:[[[lt,lt],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)||n.evaluate(i)}],[sr(lt),function(i,t){for(var e=0,n=t;e<n.length;e+=1){var r=n[e];if(r.evaluate(i))return!0}return!1}]]},"!":[lt,[lt],function(i,t){var e=t[0];return!e.evaluate(i)}],"is-supported-script":[lt,[mt],function(i,t){var e=t[0],n=i.globals&&i.globals.isSupportedScript;return n?n(e.evaluate(i)):!0}],upcase:[mt,[mt],function(i,t){var e=t[0];return e.evaluate(i).toUpperCase()}],downcase:[mt,[mt],function(i,t){var e=t[0];return e.evaluate(i).toLowerCase()}],concat:[mt,sr(ht),function(i,t){return t.map(function(e){return Ho(e.evaluate(i))}).join("")}],"resolved-locale":[mt,[Ia],function(i,t){var e=t[0];return e.evaluate(i).resolvedLocale()}]});function Tu(i){return{result:"success",value:i}}function $r(i){return{result:"error",value:i}}function Xb(i){return i["property-type"]==="data-driven"||i["property-type"]==="cross-faded-data-driven"}function $b(i){return!!i.expression&&i.expression.parameters.indexOf("zoom")>-1}function Wb(i){return!!i.expression&&i.expression.interpolated}function Rg(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}var zu=function(t,e){this.expression=t,this._warningHistory={},this._evaluator=new Ai,this._defaultValue=e?Hb(e):null,this._enumValues=e&&e.type==="enum"?e.values:null};zu.prototype.evaluateWithoutErrorHandling=function(t,e,n,r,o,s,a,l){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=n,this._evaluator.canonical=r||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=s,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null,this.expression.evaluate(this._evaluator)},zu.prototype.evaluate=function(t,e,n,r,o,s,a,l){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=n||null,this._evaluator.canonical=r||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=s||null,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null;try{var h=this.expression.evaluate(this._evaluator);if(h==null||typeof h=="number"&&h!==h)return this._defaultValue;if(this._enumValues&&!(h in this._enumValues))throw new oe("Expected value to be one of "+Object.keys(this._enumValues).map(function(u){return JSON.stringify(u)}).join(", ")+", but found "+JSON.stringify(h)+" instead.");return h}catch(u){return this._warningHistory[u.message]||(this._warningHistory[u.message]=!0,typeof console<"u"&&console.warn(u.message)),this._defaultValue}};function Yb(i){return Array.isArray(i)&&i.length>0&&typeof i[0]=="string"&&i[0]in Cu}function Iu(i,t){var e=new vn(Cu,[],t?Zb(t):void 0),n=e.parse(i,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return n?Tu(new zu(n,t)):$r(e.errors)}var Oa=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent=t!=="constant"&&!_u(e.expression)};Oa.prototype.evaluateWithoutErrorHandling=function(t,e,n,r,o,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,r,o,s)},Oa.prototype.evaluate=function(t,e,n,r,o,s){return this._styleExpression.evaluate(t,e,n,r,o,s)};var Jo=function(t,e,n,r){this.kind=t,this.zoomStops=n,this._styleExpression=e,this.isStateDependent=t!=="camera"&&!_u(e.expression),this.interpolationType=r};Jo.prototype.evaluateWithoutErrorHandling=function(t,e,n,r,o,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,r,o,s)},Jo.prototype.evaluate=function(t,e,n,r,o,s){return this._styleExpression.evaluate(t,e,n,r,o,s)},Jo.prototype.interpolationFactor=function(t,e,n){return this.interpolationType?Me.interpolationFactor(this.interpolationType,t,e,n):0};function Kb(i,t){if(i=Iu(i,t),i.result==="error")return i;var e=i.value.expression,n=Da(e);if(!n&&!Xb(t))return $r([new ci("","data expressions not supported")]);var r=yu(e,["zoom","pitch","distance-from-center"]);if(!r&&!$b(t))return $r([new ci("","zoom expressions not supported")]);var o=Na(e);if(!o&&!r)return $r([new ci("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof ci)return $r([o]);if(o instanceof Me&&!Wb(t))return $r([new ci("",'"interpolate" expressions cannot be used with this property')]);if(!o)return Tu(n?new Oa("constant",i.value):new Oa("source",i.value));var s=o instanceof Me?o.interpolation:void 0;return Tu(n?new Jo("camera",i.value,o.labels,s):new Jo("composite",i.value,o.labels,s))}function Na(i){var t=null;if(i instanceof yn)t=Na(i.result);else if(i instanceof Di)for(var e=0,n=i.args;e<n.length;e+=1){var r=n[e];if(t=Na(r),t)break}else(i instanceof _n||i instanceof Me)&&i.input instanceof me&&i.input.name==="zoom"&&(t=i);return t instanceof ci||i.eachChild(function(o){var s=Na(o);s instanceof ci?t=s:!t&&s?t=new ci("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&s&&t!==s&&(t=new ci("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function Zb(i){var t={color:Pi,string:mt,number:L,enum:mt,boolean:lt,formatted:Ra,resolvedImage:Wo};return i.type==="array"?Ke(t[i.value]||ht,i.length):t[i.type]}function Hb(i){return i.type==="color"&&(Rg(i.default)||Array.isArray(i.default))?new It(0,0,0,0):i.type==="color"?It.parse(i.default)||null:i.default===void 0?null:i.default}function Jb(i){return i instanceof Number||i instanceof String||i instanceof Boolean?i.valueOf():i}function Ru(i){if(Array.isArray(i))return i.map(Ru);if(i instanceof Object&&!(i instanceof Number||i instanceof String||i instanceof Boolean)){var t={};for(var e in i)t[e]=Ru(i[e]);return t}return Jb(i)}var Pg={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},terrain:{type:"terrain"},fog:{type:"fog"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},projection:{type:"projection"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{},sky:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_symbol:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature","pitch","distance-from-center"]}},filter_fill:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_line:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_circle:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},"filter_fill-extrusion":{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_heatmap:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Camera"},pitch:{group:"Camera"},"distance-from-center":{group:"Camera"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},"sky-radial-progress":{group:"sky"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"high-color":{type:"color","property-type":"data-constant",default:"#245cdf",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"space-color":{type:"color","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,.2,7,.1],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"star-intensity":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],5,.35,6,0],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},projection:{name:{type:"enum",values:{albers:{},equalEarth:{},equirectangular:{},lambertConformalConic:{},mercator:{},naturalEarth:{},winkelTripel:{},globe:{}},default:"mercator",required:!0},center:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-180,-90],maximum:[180,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-90,-90],maximum:[90,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["source"]}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{type:"array",value:"number",length:2,default:[0,0],minimum:[0,0],maximum:[1,1],transition:!1,requires:[{source:"geojson",has:{lineMetrics:!0}}],"property-type":"constant"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{},atmosphere:{}},default:"atmosphere",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],transition:!1,requires:[{"sky-type":"gradient"}],expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};function Ag(i){if(i===!0||i===!1)return!0;if(!Array.isArray(i)||i.length===0)return!1;switch(i[0]){case"has":return i.length>=2&&i[1]!=="$id"&&i[1]!=="$type";case"in":return i.length>=3&&(typeof i[1]!="string"||Array.isArray(i[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return i.length!==3||Array.isArray(i[1])||Array.isArray(i[2]);case"any":case"all":for(var t=0,e=i.slice(1);t<e.length;t+=1){var n=e[t];if(!Ag(n)&&typeof n!="boolean")return!1}return!0;default:return!0}}function Qb(i,t){if(t===void 0&&(t="fill"),i==null)return{filter:function(){return!0},needGeometry:!1,needFeature:!1};Ag(i)||(i=Ga(i));var e=i,n=!0;try{n=tk(e)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
47
47
  This is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md
48
48
  and paste the contents of this message in the report.
49
49
  Thank you!
50
50
  Filter Expression:
51
51
  `+JSON.stringify(e,null,2)+`
52
- `)}var r=Pg["filter_"+t],o=Ru(n,r),s=null;if(o.result==="error")throw new Error(o.value.map(function(d){return d.key+": "+d.message}).join(", "));s=function(d,c,f){return o.value.evaluate(d,c,{},f)};var a=null,l=null;if(n!==e){var h=Ru(e,r);if(h.result==="error")throw new Error(h.value.map(function(d){return d.key+": "+d.message}).join(", "));a=function(d,c,f,g,m){return h.value.evaluate(d,c,{},f,void 0,void 0,g,m)},l=!La(h.value.expression)}s=s;var u=Fg(n);return{filter:s,dynamicFilter:a||void 0,needGeometry:u,needFeature:!!l}}function ek(i){if(!Wr(i))return i;var t=Iu(i);return Lg(t),t=Dg(t),t}function Dg(i){if(!Array.isArray(i))return i;var t=rk(i);return t===!0?t:t.map(function(e){return Dg(e)})}function Lg(i){var t=!1,e=[];if(i[0]==="case"){for(var n=1;n<i.length-1;n+=2)t=t||Wr(i[n]),e.push(i[n+1]);e.push(i[i.length-1])}else if(i[0]==="match"){t=t||Wr(i[1]);for(var r=2;r<i.length-1;r+=2)e.push(i[r+1]);e.push(i[i.length-1])}else if(i[0]==="step"){t=t||Wr(i[1]);for(var o=1;o<i.length-1;o+=2)e.push(i[o+1])}t&&(i.length=0,i.push.apply(i,["any"].concat(e)));for(var s=1;s<i.length;s++)Lg(i[s])}function Wr(i){if(!Array.isArray(i))return!1;if(ik(i[0]))return!0;for(var t=1;t<i.length;t++){var e=i[t];if(Wr(e))return!0}return!1}function ik(i){return i==="pitch"||i==="distance-from-center"}var nk=new Set(["in","==","!=",">",">=","<","<=","to-boolean"]);function rk(i){if(nk.has(i[0]))for(var t=1;t<i.length;t++){var e=i[t];if(Wr(e))return!0}return i}function ok(i,t){return i<t?-1:i>t?1:0}function Fg(i){if(!Array.isArray(i))return!1;if(i[0]==="within")return!0;for(var t=1;t<i.length;t++)if(Fg(i[t]))return!0;return!1}function ja(i){if(!i)return!0;var t=i[0];if(i.length<=1)return t!=="any";var e=t==="=="?Pu(i[1],i[2],"=="):t==="!="?Ba(Pu(i[1],i[2],"==")):t==="<"||t===">"||t==="<="||t===">="?Pu(i[1],i[2],t):t==="any"?sk(i.slice(1)):t==="all"?["all"].concat(i.slice(1).map(ja)):t==="none"?["all"].concat(i.slice(1).map(ja).map(Ba)):t==="in"?Og(i[1],i.slice(2)):t==="!in"?Ba(Og(i[1],i.slice(2))):t==="has"?Ng(i[1]):t==="!has"?Ba(Ng(i[1])):t==="within"?i:!0;return e}function Pu(i,t,e){switch(i){case"$type":return["filter-type-"+e,t];case"$id":return["filter-id-"+e,t];default:return["filter-"+e,i,t]}}function sk(i){return["any"].concat(i.map(ja))}function Og(i,t){if(t.length===0)return!1;switch(i){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(function(e){return typeof e!=typeof t[0]})?["filter-in-large",i,["literal",t.sort(ok)]]:["filter-in-small",i,["literal",t]]}}function Ng(i){switch(i){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",i]}}function Ba(i){return["!",i]}var ak=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function lk(i,t){var e={};for(var n in i)n!=="ref"&&(e[n]=i[n]);return ak.forEach(function(r){r in t&&(e[r]=t[r])}),e}function hk(i){i=i.slice();for(var t=Object.create(null),e=0;e<i.length;e++)t[i[e].id]=i[e];for(var n=0;n<i.length;n++)"ref"in i[n]&&(i[n]=lk(i[n],t[i[n].ref]));return i}var Gg={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},ts=" ",jg=/(italic|oblique)$/i,Bg={},Ug=function(i,t,e){var n=Bg[i];if(!n){Array.isArray(i)||(i=[i]);for(var r=400,o="normal",s=[],a,l,h=0,u=i.length;h<u;++h){var d=i[h],c=d.split(" "),f=c[c.length-1].toLowerCase();f=="normal"||f=="italic"||f=="oblique"?(o=l?o:f,c.pop(),f=c[c.length-1].toLowerCase()):jg.test(f)&&(f=f.replace(jg,""),o=l?o:c[c.length-1].replace(f,""));for(var g in Gg){var m=c.length>1?c[c.length-2].toLowerCase():"";if(f==g||f==g.replace("-","")||m+"-"+f==g){r=a?r:Gg[g],c.pop(),m&&g.startsWith(m)&&c.pop();break}}!a&&typeof f=="number"&&(r=f);var p=c.join(ts).replace("Klokantech Noto Sans","Noto Sans");p.indexOf(ts)!==-1&&(p='"'+p+'"'),s.push(p)}n=Bg[i]=[o,r,s]}return n[0]+ts+n[1]+ts+t+"px"+(e?"/"+e:"")+ts+n[2]};function Au(i){return i*Math.PI/180}var uk=function(){for(var i=[],t=78271.51696402048;i.length<=24;t/=2)i.push(t);return i}();function Vg(i,t){if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof OffscreenCanvas<"u")return new OffscreenCanvas(i,t);var e=document.createElement("canvas");return e.width=i,e.height=t,e}function dk(i,t){for(var e=0,n=t.length;e<n;++e){var r=t[e];if(r<i&&e+1<n){var o=t[e]/t[e+1];return e+Math.log(t[e]/i)/Math.log(o)}}return n-1}var ck=Array(256).join("\u200A");function Du(i,t){if(t>=.05){for(var e="",n=i.split(`
53
- `),r=ck.slice(0,Math.round(t/.1)),o=0,s=n.length;o<s;++o)o>0&&(e+=`
52
+ `)}var r=Pg["filter_"+t],o=Iu(n,r),s=null;if(o.result==="error")throw new Error(o.value.map(function(d){return d.key+": "+d.message}).join(", "));s=function(d,c,f){return o.value.evaluate(d,c,{},f)};var a=null,l=null;if(n!==e){var h=Iu(e,r);if(h.result==="error")throw new Error(h.value.map(function(d){return d.key+": "+d.message}).join(", "));a=function(d,c,f,g,m){return h.value.evaluate(d,c,{},f,void 0,void 0,g,m)},l=!Da(h.value.expression)}s=s;var u=Fg(n);return{filter:s,dynamicFilter:a||void 0,needGeometry:u,needFeature:!!l}}function tk(i){if(!Wr(i))return i;var t=Ru(i);return Lg(t),t=Dg(t),t}function Dg(i){if(!Array.isArray(i))return i;var t=nk(i);return t===!0?t:t.map(function(e){return Dg(e)})}function Lg(i){var t=!1,e=[];if(i[0]==="case"){for(var n=1;n<i.length-1;n+=2)t=t||Wr(i[n]),e.push(i[n+1]);e.push(i[i.length-1])}else if(i[0]==="match"){t=t||Wr(i[1]);for(var r=2;r<i.length-1;r+=2)e.push(i[r+1]);e.push(i[i.length-1])}else if(i[0]==="step"){t=t||Wr(i[1]);for(var o=1;o<i.length-1;o+=2)e.push(i[o+1])}t&&(i.length=0,i.push.apply(i,["any"].concat(e)));for(var s=1;s<i.length;s++)Lg(i[s])}function Wr(i){if(!Array.isArray(i))return!1;if(ek(i[0]))return!0;for(var t=1;t<i.length;t++){var e=i[t];if(Wr(e))return!0}return!1}function ek(i){return i==="pitch"||i==="distance-from-center"}var ik=new Set(["in","==","!=",">",">=","<","<=","to-boolean"]);function nk(i){if(ik.has(i[0]))for(var t=1;t<i.length;t++){var e=i[t];if(Wr(e))return!0}return i}function rk(i,t){return i<t?-1:i>t?1:0}function Fg(i){if(!Array.isArray(i))return!1;if(i[0]==="within")return!0;for(var t=1;t<i.length;t++)if(Fg(i[t]))return!0;return!1}function Ga(i){if(!i)return!0;var t=i[0];if(i.length<=1)return t!=="any";var e=t==="=="?Pu(i[1],i[2],"=="):t==="!="?ja(Pu(i[1],i[2],"==")):t==="<"||t===">"||t==="<="||t===">="?Pu(i[1],i[2],t):t==="any"?ok(i.slice(1)):t==="all"?["all"].concat(i.slice(1).map(Ga)):t==="none"?["all"].concat(i.slice(1).map(Ga).map(ja)):t==="in"?Og(i[1],i.slice(2)):t==="!in"?ja(Og(i[1],i.slice(2))):t==="has"?Ng(i[1]):t==="!has"?ja(Ng(i[1])):t==="within"?i:!0;return e}function Pu(i,t,e){switch(i){case"$type":return["filter-type-"+e,t];case"$id":return["filter-id-"+e,t];default:return["filter-"+e,i,t]}}function ok(i){return["any"].concat(i.map(Ga))}function Og(i,t){if(t.length===0)return!1;switch(i){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(function(e){return typeof e!=typeof t[0]})?["filter-in-large",i,["literal",t.sort(rk)]]:["filter-in-small",i,["literal",t]]}}function Ng(i){switch(i){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",i]}}function ja(i){return["!",i]}var sk=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function ak(i,t){var e={};for(var n in i)n!=="ref"&&(e[n]=i[n]);return sk.forEach(function(r){r in t&&(e[r]=t[r])}),e}function lk(i){i=i.slice();for(var t=Object.create(null),e=0;e<i.length;e++)t[i[e].id]=i[e];for(var n=0;n<i.length;n++)"ref"in i[n]&&(i[n]=ak(i[n],t[i[n].ref]));return i}var Gg={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},Qo=" ",jg=/(italic|oblique)$/i,Bg={},Ug=function(i,t,e){var n=Bg[i];if(!n){Array.isArray(i)||(i=[i]);for(var r=400,o="normal",s=[],a,l,h=0,u=i.length;h<u;++h){var d=i[h],c=d.split(" "),f=c[c.length-1].toLowerCase();f=="normal"||f=="italic"||f=="oblique"?(o=l?o:f,c.pop(),f=c[c.length-1].toLowerCase()):jg.test(f)&&(f=f.replace(jg,""),o=l?o:c[c.length-1].replace(f,""));for(var g in Gg){var m=c.length>1?c[c.length-2].toLowerCase():"";if(f==g||f==g.replace("-","")||m+"-"+f==g){r=a?r:Gg[g],c.pop(),m&&g.startsWith(m)&&c.pop();break}}!a&&typeof f=="number"&&(r=f);var p=c.join(Qo).replace("Klokantech Noto Sans","Noto Sans");p.indexOf(Qo)!==-1&&(p='"'+p+'"'),s.push(p)}n=Bg[i]=[o,r,s]}return n[0]+Qo+n[1]+Qo+t+"px"+(e?"/"+e:"")+Qo+n[2]};function Au(i){return i*Math.PI/180}var hk=function(){for(var i=[],t=78271.51696402048;i.length<=24;t/=2)i.push(t);return i}();function Vg(i,t){if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof OffscreenCanvas<"u")return new OffscreenCanvas(i,t);var e=document.createElement("canvas");return e.width=i,e.height=t,e}function uk(i,t){for(var e=0,n=t.length;e<n;++e){var r=t[e];if(r<i&&e+1<n){var o=t[e]/t[e+1];return e+Math.log(t[e]/i)/Math.log(o)}}return n-1}var dk=Array(256).join("\u200A");function Du(i,t){if(t>=.05){for(var e="",n=i.split(`
53
+ `),r=dk.slice(0,Math.round(t/.1)),o=0,s=n.length;o<s;++o)o>0&&(e+=`
54
54
  `),e+=n[o].split("").join(r);return e}return i}var Lu;function qg(){return Lu||(Lu=Vg(1,1).getContext("2d")),Lu}function ar(i,t){return qg().measureText(i).width+(i.length-1)*t}var Xg={};function Fu(i,t,e,n){if(i.indexOf(`
55
55
  `)!==-1){for(var r=i.split(`
56
56
  `),o=[],s=0,a=r.length;s<a;++s)o.push(Fu(r[s],t,e,n));return o.join(`
57
- `)}var l=e+","+t+","+i+","+n,h=Xg[l];if(!h){var u=i.split(" ");if(u.length>1){var d=qg();d.font=t;for(var c=d.measureText("M").width,f=c*e,g="",m=[],p=0,_=u.length;p<_;++p){var v=u[p],y=g+(g?" ":"")+v;ar(y,n)<=f?g=y:(g&&m.push(g),g=v)}g&&m.push(g);for(var x=0,k=m.length;x<k&&k>1;++x){var w=m[x];if(ar(w,n)<f*.35){var C=x>0?ar(m[x-1],n):1/0,M=x<k-1?ar(m[x+1],n):1/0;m.splice(x,1),k-=1,C<M?(m[x-1]+=" "+w,x-=1):m[x]=w+" "+m[x]}}for(var S=0,R=m.length-1;S<R;++S){var A=m[S],G=m[S+1];if(ar(A,n)>f*.7&&ar(G,n)<f*.6){var P=A.split(" "),at=P.pop();ar(at,n)<f*.2&&(m[S]=P.join(" "),m[S+1]=at+" "+G),R-=1}}h=m.join(`
58
- `)}else h=i;h=Du(h,n),Xg[l]=h}return h}var fk={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},gk={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},mk=function(i,t){var e=Zb(i,t);if(e.result==="error")throw new Error(e.value.map(function(n){return n.key+": "+n.message}).join(", "));return e.value},Ou={},Ua={zoom:0},Va,Nu;function it(i,t,e,n,r,o,s){var a=i.id;o||(o={},console.warn("No functionCache provided to getValue()")),o[a]||(o[a]={});var l=o[a];if(!l[e]){var h=(i[t]||Ou)[e],u=Pg[t+"_"+i.type][e];h===void 0&&(h=u.default);var d=Kb(h);if(!d&&Ig(h)&&(h=$x(h,u),d=!0),d){var c=mk(h,u);l[e]=c.evaluate.bind(c)}else u.type=="color"&&(h=Rt.parse(h)),l[e]=function(){return h}}return Ua.zoom=n,l[e](Ua,r,s)}function pk(i,t,e,n){var r=it(i,"layout","icon-allow-overlap",t,e,n);if(!r)return"declutter";var o=it(i,"layout","icon-ignore-placement",t,e,n);return o?"none":"obstacle"}function vk(i,t,e,n,r){return r||console.warn("No filterCache provided to evaluateFilter()"),i in r||(r[i]=tk(t).filter),Ua.zoom=n,r[i](Ua,e)}function lr(i,t){if(i){if(i.a===0||t===0)return;var e=i.a;return t=t===void 0?1:t,e===0?"transparent":"rgba("+Math.round(i.r*255/e)+","+Math.round(i.g*255/e)+","+Math.round(i.b*255/e)+","+e*t+")"}return i}var _k=/\{[^{}}]*\}/g;function Gu(i,t){return i.replace(_k,function(e){return t[e.slice(1,-1)]||""})}function yk(i,t,e,n,r,o,s){if(n===void 0&&(n=uk),r===void 0&&(r=void 0),o===void 0&&(o=void 0),s===void 0&&(s=void 0),typeof t=="string"&&(t=JSON.parse(t)),t.version!=8)throw new Error("glStyle version 8 required.");var a,l;if(o){if(typeof Image<"u"){var h=new Image;h.crossOrigin="anonymous",h.onload=function(){a=h,l=[h.width,h.height],i.changed(),h.onload=null},h.src=o}else if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope){var u=self;u.postMessage({action:"loadImage",src:o}),u.addEventListener("message",function(U){U.data.action==="imageLoaded"&&U.data.src===o&&(a=U.data.image,l=[a.width,a.height])})}}for(var d=hk(t.layers),c={},f=[],g={},m={},p={},_={},v,y=0,x=d.length;y<x;++y){var k=d[y],w=k.id;if(typeof e=="string"&&k.source==e||e.indexOf(w)!==-1){var C=k["source-layer"];if(v){if(k.source!==v)throw new Error('Layer "'+w+'" does not use source "'+v)}else{v=k.source;var M=t.sources[v];if(!M)throw new Error('Source "'+v+'" is not defined');var S=M.type;if(S!=="vector"&&S!=="geojson")throw new Error('Source "'+v+'" is not of type "vector" or "geojson", but "'+S+'"')}var R=c[C];R||(R=[],c[C]=R),R.push({layer:k,index:y}),f.push(w)}}var A=new ke,G=new ge,P=[],at=function(j,U){var O=j.getProperties(),W=c[O.layer];if(!!W){var D=n.indexOf(U);D==-1&&(D=dk(U,n));for(var Z=fk[j.getGeometry().getType()],V={properties:O,type:Z},z=i.get("mapbox-featurestate")[j.getId()],ot=-1,b=0,T=W.length;b<T;++b){var Y=W[b],E=Y.layer,H=E.id,$=E.layout||Ou,vt=E.paint||Ou;if(!($.visibility==="none"||"minzoom"in E&&D<E.minzoom||"maxzoom"in E&&D>=E.maxzoom)){var Ct=E.filter;if(!Ct||vk(H,Ct,V,D,_)){var _t=void 0,Et=void 0,Lt=void 0,Dt=void 0,jt=void 0,F=void 0,ut=Y.index;if(Z==3&&(E.type=="fill"||E.type=="fill-extrusion"))if(Et=it(E,"paint",E.type+"-opacity",D,V,p,z),E.type+"-pattern"in vt){var pt=it(E,"paint",E.type+"-pattern",D,V,p,z);if(pt){var kt=typeof pt=="string"?Gu(pt,O):pt.toString();if(a&&r&&r[kt]){++ot,F=P[ot],(!F||!F.getFill()||F.getStroke()||F.getText())&&(F=new le({fill:new ge}),P[ot]=F),Lt=F.getFill(),F.setZIndex(ut);var yt=kt+"."+Et,st=m[yt];if(!st){var nt=r[kt],wt=Vg(nt.width,nt.height),zt=wt.getContext("2d");zt.globalAlpha=Et,zt.drawImage(a,nt.x,nt.y,nt.width,nt.height,0,0,nt.width,nt.height),st=zt.createPattern(wt,"repeat"),m[yt]=st}Lt.setColor(st)}}}else _t=lr(it(E,"paint",E.type+"-color",D,V,p,z),Et),E.type+"-outline-color"in vt&&(jt=lr(it(E,"paint",E.type+"-outline-color",D,V,p,z),Et)),jt||(jt=_t),(_t||jt)&&(++ot,F=P[ot],(!F||_t&&!F.getFill()||!_t&&F.getFill()||jt&&!F.getStroke()||!jt&&F.getStroke()||F.getText())&&(F=new le({fill:_t?new ge:void 0,stroke:jt?new ke:void 0}),P[ot]=F),_t&&(Lt=F.getFill(),Lt.setColor(_t)),jt&&(Dt=F.getStroke(),Dt.setColor(jt),Dt.setWidth(.5)),F.setZIndex(ut));if(Z!=1&&E.type=="line"){_t=!("line-pattern"in vt)&&"line-color"in vt?lr(it(E,"paint","line-color",D,V,p,z),it(E,"paint","line-opacity",D,V,p,z)):void 0;var Bt=it(E,"paint","line-width",D,V,p,z);_t&&Bt>0&&(++ot,F=P[ot],(!F||!F.getStroke()||F.getFill()||F.getText())&&(F=new le({stroke:new ke}),P[ot]=F),Dt=F.getStroke(),Dt.setLineCap(it(E,"layout","line-cap",D,V,p,z)),Dt.setLineJoin(it(E,"layout","line-join",D,V,p,z)),Dt.setMiterLimit(it(E,"layout","line-miter-limit",D,V,p,z)),Dt.setColor(_t),Dt.setWidth(Bt),Dt.setLineDash(vt["line-dasharray"]?it(E,"paint","line-dasharray",D,V,p,z).map(function(Ne){return Ne*Bt}):null),F.setZIndex(ut))}var xt=!1,dt=null,Ft=0,St=void 0,ct=void 0,ue=void 0;if((Z==1||Z==2)&&"icon-image"in $){var Ve=it(E,"layout","icon-image",D,V,p,z);if(Ve){St=typeof Ve=="string"?Gu(Ve,O):Ve.toString();var $t=void 0;if(a&&r&&r[St]){var ze=it(E,"layout","icon-rotation-alignment",D,V,p,z);if(Z==2){var Ut=j.getGeometry();if(Ut.getFlatMidpoint||Ut.getFlatMidpoints){var Ht=Ut.getExtent(),Tn=Math.sqrt(Math.max(Math.pow((Ht[2]-Ht[0])/U,2),Math.pow((Ht[3]-Ht[1])/U,2)));if(Tn>150){var ae=Ut.getType()==="MultiLineString"?Ut.getFlatMidpoints():Ut.getFlatMidpoint();Nu||(Va=[NaN,NaN],Nu=new Xh("Point",Va,[],{},null)),$t=Nu,Va[0]=ae[0],Va[1]=ae[1];var qe=it(E,"layout","symbol-placement",D,V,p,z);if(qe==="line"&&ze==="map")for(var ve=Ut.getStride(),Oe=Ut.getFlatCoordinates(),Ni=0,sl=Oe.length-ve;Ni<sl;Ni+=ve){var de=Oe[Ni],bi=Oe[Ni+1],_e=Oe[Ni+ve],Xe=Oe[Ni+ve+1],Re=Math.min(de,_e),oo=Math.min(bi,Xe),so=Math.max(de,_e),ye=Math.max(bi,Xe);if(ae[0]>=Re&&ae[0]<=so&&ae[1]>=oo&&ae[1]<=ye){Ft=Math.atan2(bi-Xe,_e-de);break}}}}}if(Z!==2||$t){var Ie=it(E,"layout","icon-size",D,V,p,z),ee=vt["icon-color"]!==void 0?it(E,"paint","icon-color",D,V,p,z):null;if(!ee||ee.a!==0){var xs=St+"."+Ie;if(ee!==null&&(xs+="."+ee),ct=g[xs],!ct){var bs=r[St],fC=pk(E,D,V,p),dd=void 0;"icon-offset"in $&&(dd=it(E,"layout","icon-offset",D,V,p,z),dd[1]*=-1),ct=new ga({color:ee?[ee.r*255,ee.g*255,ee.b*255,ee.a]:void 0,img:a,imgSize:l,size:[bs.width,bs.height],offset:[bs.x,bs.y],rotateWithView:ze==="map",scale:Ie/bs.pixelRatio,displacement:dd,declutterMode:fC}),g[xs]=ct}}ct&&(++ot,F=P[ot],(!F||!F.getImage()||F.getFill()||F.getStroke())&&(F=new le,P[ot]=F),F.setGeometry($t),ct.setRotation(Ft+Au(it(E,"layout","icon-rotate",D,V,p,z))),ct.setOpacity(it(E,"paint","icon-opacity",D,V,p,z)),ct.setAnchor(gk[it(E,"layout","icon-anchor",D,V,p,z)]),F.setImage(ct),dt=F.getText(),F.setText(void 0),F.setZIndex(ut),xt=!0,ue=!1)}else ue=!0}}}if(Z==1&&E.type==="circle"){++ot,F=P[ot],(!F||!F.getImage()||F.getFill()||F.getStroke())&&(F=new le,P[ot]=F);var yp="circle-radius"in vt?it(E,"paint","circle-radius",D,V,p,z):5,cd=lr(it(E,"paint","circle-stroke-color",D,V,p,z),it(E,"paint","circle-stroke-opacity",D,V,p,z)),fd=lr(it(E,"paint","circle-color",D,V,p,z),it(E,"paint","circle-opacity",D,V,p,z)),gd=it(E,"paint","circle-stroke-width",D,V,p,z),xp=yp+"."+cd+"."+fd+"."+gd;ct=g[xp],ct||(ct=new Hn({radius:yp,stroke:cd&&gd>0?new ke({width:gd,color:cd}):void 0,fill:fd?new ge({color:fd}):void 0,declutterMode:"none"}),g[xp]=ct),F.setImage(ct),dt=F.getText(),F.setText(void 0),F.setGeometry(void 0),F.setZIndex(ut),xt=!0}var ce=void 0,ks=void 0,ws=void 0,zn=void 0,Ms=void 0,md=void 0;if("text-field"in $){zn=Math.round(it(E,"layout","text-size",D,V,p,z));var pd=it(E,"layout","text-font",D,V,p,z);ws=it(E,"layout","text-line-height",D,V,p,z),ks=Ug(s?s(pd):pd,zn,ws),ks.includes("sans-serif")||(ks+=",sans-serif"),Ms=it(E,"layout","text-letter-spacing",D,V,p,z),md=it(E,"layout","text-max-width",D,V,p,z);var ao=it(E,"layout","text-field",D,V,p,z);typeof ao=="object"&&ao.sections?ao.sections.length===1?ce=ao.toString():ce=ao.sections.reduce(function(Ne,Rn,yC){var Tp=Rn.fontStack?Rn.fontStack.split(","):pd,kd=Ug(s?s(Tp):Tp,zn*(Rn.scale||1),ws),lo=Rn.text;if(lo===`
57
+ `)}var l=e+","+t+","+i+","+n,h=Xg[l];if(!h){var u=i.split(" ");if(u.length>1){var d=qg();d.font=t;for(var c=d.measureText("M").width,f=c*e,g="",m=[],p=0,_=u.length;p<_;++p){var v=u[p],y=g+(g?" ":"")+v;ar(y,n)<=f?g=y:(g&&m.push(g),g=v)}g&&m.push(g);for(var x=0,k=m.length;x<k&&k>1;++x){var w=m[x];if(ar(w,n)<f*.35){var M=x>0?ar(m[x-1],n):1/0,E=x<k-1?ar(m[x+1],n):1/0;m.splice(x,1),k-=1,M<E?(m[x-1]+=" "+w,x-=1):m[x]=w+" "+m[x]}}for(var S=0,I=m.length-1;S<I;++S){var A=m[S],G=m[S+1];if(ar(A,n)>f*.7&&ar(G,n)<f*.6){var P=A.split(" "),at=P.pop();ar(at,n)<f*.2&&(m[S]=P.join(" "),m[S+1]=at+" "+G),I-=1}}h=m.join(`
58
+ `)}else h=i;h=Du(h,n),Xg[l]=h}return h}var ck={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},fk={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},gk=function(i,t){var e=Kb(i,t);if(e.result==="error")throw new Error(e.value.map(function(n){return n.key+": "+n.message}).join(", "));return e.value},Ou={},Ba={zoom:0},Ua,Nu;function it(i,t,e,n,r,o,s){var a=i.id;o||(o={},console.warn("No functionCache provided to getValue()")),o[a]||(o[a]={});var l=o[a];if(!l[e]){var h=(i[t]||Ou)[e],u=Pg[t+"_"+i.type][e];h===void 0&&(h=u.default);var d=Yb(h);if(!d&&Rg(h)&&(h=Xx(h,u),d=!0),d){var c=gk(h,u);l[e]=c.evaluate.bind(c)}else u.type=="color"&&(h=It.parse(h)),l[e]=function(){return h}}return Ba.zoom=n,l[e](Ba,r,s)}function mk(i,t,e,n){var r=it(i,"layout","icon-allow-overlap",t,e,n);if(!r)return"declutter";var o=it(i,"layout","icon-ignore-placement",t,e,n);return o?"none":"obstacle"}function pk(i,t,e,n,r){return r||console.warn("No filterCache provided to evaluateFilter()"),i in r||(r[i]=Qb(t).filter),Ba.zoom=n,r[i](Ba,e)}function lr(i,t){if(i){if(i.a===0||t===0)return;var e=i.a;return t=t===void 0?1:t,e===0?"transparent":"rgba("+Math.round(i.r*255/e)+","+Math.round(i.g*255/e)+","+Math.round(i.b*255/e)+","+e*t+")"}return i}var vk=/\{[^{}}]*\}/g;function Gu(i,t){return i.replace(vk,function(e){return t[e.slice(1,-1)]||""})}function _k(i,t,e,n,r,o,s){if(n===void 0&&(n=hk),r===void 0&&(r=void 0),o===void 0&&(o=void 0),s===void 0&&(s=void 0),typeof t=="string"&&(t=JSON.parse(t)),t.version!=8)throw new Error("glStyle version 8 required.");var a,l;if(o){if(typeof Image<"u"){var h=new Image;h.crossOrigin="anonymous",h.onload=function(){a=h,l=[h.width,h.height],i.changed(),h.onload=null},h.src=o}else if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope){var u=self;u.postMessage({action:"loadImage",src:o}),u.addEventListener("message",function(U){U.data.action==="imageLoaded"&&U.data.src===o&&(a=U.data.image,l=[a.width,a.height])})}}for(var d=lk(t.layers),c={},f=[],g={},m={},p={},_={},v,y=0,x=d.length;y<x;++y){var k=d[y],w=k.id;if(typeof e=="string"&&k.source==e||e.indexOf(w)!==-1){var M=k["source-layer"];if(v){if(k.source!==v)throw new Error('Layer "'+w+'" does not use source "'+v)}else{v=k.source;var E=t.sources[v];if(!E)throw new Error('Source "'+v+'" is not defined');var S=E.type;if(S!=="vector"&&S!=="geojson")throw new Error('Source "'+v+'" is not of type "vector" or "geojson", but "'+S+'"')}var I=c[M];I||(I=[],c[M]=I),I.push({layer:k,index:y}),f.push(w)}}var A=new ke,G=new ge,P=[],at=function(j,U){var O=j.getProperties(),W=c[O.layer];if(!!W){var D=n.indexOf(U);D==-1&&(D=uk(U,n));for(var Z=ck[j.getGeometry().getType()],V={properties:O,type:Z},z=i.get("mapbox-featurestate")[j.getId()],ot=-1,b=0,T=W.length;b<T;++b){var Y=W[b],C=Y.layer,H=C.id,$=C.layout||Ou,vt=C.paint||Ou;if(!($.visibility==="none"||"minzoom"in C&&D<C.minzoom||"maxzoom"in C&&D>=C.maxzoom)){var Ct=C.filter;if(!Ct||pk(H,Ct,V,D,_)){var _t=void 0,Mt=void 0,Lt=void 0,Dt=void 0,jt=void 0,F=void 0,ut=Y.index;if(Z==3&&(C.type=="fill"||C.type=="fill-extrusion"))if(Mt=it(C,"paint",C.type+"-opacity",D,V,p,z),C.type+"-pattern"in vt){var pt=it(C,"paint",C.type+"-pattern",D,V,p,z);if(pt){var kt=typeof pt=="string"?Gu(pt,O):pt.toString();if(a&&r&&r[kt]){++ot,F=P[ot],(!F||!F.getFill()||F.getStroke()||F.getText())&&(F=new le({fill:new ge}),P[ot]=F),Lt=F.getFill(),F.setZIndex(ut);var yt=kt+"."+Mt,st=m[yt];if(!st){var nt=r[kt],wt=Vg(nt.width,nt.height),zt=wt.getContext("2d");zt.globalAlpha=Mt,zt.drawImage(a,nt.x,nt.y,nt.width,nt.height,0,0,nt.width,nt.height),st=zt.createPattern(wt,"repeat"),m[yt]=st}Lt.setColor(st)}}}else _t=lr(it(C,"paint",C.type+"-color",D,V,p,z),Mt),C.type+"-outline-color"in vt&&(jt=lr(it(C,"paint",C.type+"-outline-color",D,V,p,z),Mt)),jt||(jt=_t),(_t||jt)&&(++ot,F=P[ot],(!F||_t&&!F.getFill()||!_t&&F.getFill()||jt&&!F.getStroke()||!jt&&F.getStroke()||F.getText())&&(F=new le({fill:_t?new ge:void 0,stroke:jt?new ke:void 0}),P[ot]=F),_t&&(Lt=F.getFill(),Lt.setColor(_t)),jt&&(Dt=F.getStroke(),Dt.setColor(jt),Dt.setWidth(.5)),F.setZIndex(ut));if(Z!=1&&C.type=="line"){_t=!("line-pattern"in vt)&&"line-color"in vt?lr(it(C,"paint","line-color",D,V,p,z),it(C,"paint","line-opacity",D,V,p,z)):void 0;var Bt=it(C,"paint","line-width",D,V,p,z);_t&&Bt>0&&(++ot,F=P[ot],(!F||!F.getStroke()||F.getFill()||F.getText())&&(F=new le({stroke:new ke}),P[ot]=F),Dt=F.getStroke(),Dt.setLineCap(it(C,"layout","line-cap",D,V,p,z)),Dt.setLineJoin(it(C,"layout","line-join",D,V,p,z)),Dt.setMiterLimit(it(C,"layout","line-miter-limit",D,V,p,z)),Dt.setColor(_t),Dt.setWidth(Bt),Dt.setLineDash(vt["line-dasharray"]?it(C,"paint","line-dasharray",D,V,p,z).map(function(Ne){return Ne*Bt}):null),F.setZIndex(ut))}var xt=!1,dt=null,Ft=0,St=void 0,ct=void 0,ue=void 0;if((Z==1||Z==2)&&"icon-image"in $){var Ve=it(C,"layout","icon-image",D,V,p,z);if(Ve){St=typeof Ve=="string"?Gu(Ve,O):Ve.toString();var $t=void 0;if(a&&r&&r[St]){var ze=it(C,"layout","icon-rotation-alignment",D,V,p,z);if(Z==2){var Ut=j.getGeometry();if(Ut.getFlatMidpoint||Ut.getFlatMidpoints){var Ht=Ut.getExtent(),Tn=Math.sqrt(Math.max(Math.pow((Ht[2]-Ht[0])/U,2),Math.pow((Ht[3]-Ht[1])/U,2)));if(Tn>150){var ae=Ut.getType()==="MultiLineString"?Ut.getFlatMidpoints():Ut.getFlatMidpoint();Nu||(Ua=[NaN,NaN],Nu=new Xh("Point",Ua,[],{},null)),$t=Nu,Ua[0]=ae[0],Ua[1]=ae[1];var qe=it(C,"layout","symbol-placement",D,V,p,z);if(qe==="line"&&ze==="map")for(var ve=Ut.getStride(),Oe=Ut.getFlatCoordinates(),Ni=0,sl=Oe.length-ve;Ni<sl;Ni+=ve){var de=Oe[Ni],bi=Oe[Ni+1],_e=Oe[Ni+ve],Xe=Oe[Ni+ve+1],Ie=Math.min(de,_e),ro=Math.min(bi,Xe),oo=Math.max(de,_e),ye=Math.max(bi,Xe);if(ae[0]>=Ie&&ae[0]<=oo&&ae[1]>=ro&&ae[1]<=ye){Ft=Math.atan2(bi-Xe,_e-de);break}}}}}if(Z!==2||$t){var Re=it(C,"layout","icon-size",D,V,p,z),ee=vt["icon-color"]!==void 0?it(C,"paint","icon-color",D,V,p,z):null;if(!ee||ee.a!==0){var ys=St+"."+Re;if(ee!==null&&(ys+="."+ee),ct=g[ys],!ct){var xs=r[St],fC=mk(C,D,V,p),dd=void 0;"icon-offset"in $&&(dd=it(C,"layout","icon-offset",D,V,p,z),dd[1]*=-1),ct=new fa({color:ee?[ee.r*255,ee.g*255,ee.b*255,ee.a]:void 0,img:a,imgSize:l,size:[xs.width,xs.height],offset:[xs.x,xs.y],rotateWithView:ze==="map",scale:Re/xs.pixelRatio,displacement:dd,declutterMode:fC}),g[ys]=ct}}ct&&(++ot,F=P[ot],(!F||!F.getImage()||F.getFill()||F.getStroke())&&(F=new le,P[ot]=F),F.setGeometry($t),ct.setRotation(Ft+Au(it(C,"layout","icon-rotate",D,V,p,z))),ct.setOpacity(it(C,"paint","icon-opacity",D,V,p,z)),ct.setAnchor(fk[it(C,"layout","icon-anchor",D,V,p,z)]),F.setImage(ct),dt=F.getText(),F.setText(void 0),F.setZIndex(ut),xt=!0,ue=!1)}else ue=!0}}}if(Z==1&&C.type==="circle"){++ot,F=P[ot],(!F||!F.getImage()||F.getFill()||F.getStroke())&&(F=new le,P[ot]=F);var _p="circle-radius"in vt?it(C,"paint","circle-radius",D,V,p,z):5,cd=lr(it(C,"paint","circle-stroke-color",D,V,p,z),it(C,"paint","circle-stroke-opacity",D,V,p,z)),fd=lr(it(C,"paint","circle-color",D,V,p,z),it(C,"paint","circle-opacity",D,V,p,z)),gd=it(C,"paint","circle-stroke-width",D,V,p,z),yp=_p+"."+cd+"."+fd+"."+gd;ct=g[yp],ct||(ct=new Hn({radius:_p,stroke:cd&&gd>0?new ke({width:gd,color:cd}):void 0,fill:fd?new ge({color:fd}):void 0,declutterMode:"none"}),g[yp]=ct),F.setImage(ct),dt=F.getText(),F.setText(void 0),F.setGeometry(void 0),F.setZIndex(ut),xt=!0}var ce=void 0,bs=void 0,ks=void 0,zn=void 0,ws=void 0,md=void 0;if("text-field"in $){zn=Math.round(it(C,"layout","text-size",D,V,p,z));var pd=it(C,"layout","text-font",D,V,p,z);ks=it(C,"layout","text-line-height",D,V,p,z),bs=Ug(s?s(pd):pd,zn,ks),bs.includes("sans-serif")||(bs+=",sans-serif"),ws=it(C,"layout","text-letter-spacing",D,V,p,z),md=it(C,"layout","text-max-width",D,V,p,z);var so=it(C,"layout","text-field",D,V,p,z);typeof so=="object"&&so.sections?so.sections.length===1?ce=so.toString():ce=so.sections.reduce(function(Ne,In,yC){var Sp=In.fontStack?In.fontStack.split(","):pd,kd=Ug(s?s(Sp):Sp,zn*(In.scale||1),ks),ao=In.text;if(ao===`
59
59
  `)return Ne.push(`
60
- `,""),Ne;if(Z==2){Ne.push(Du(lo,Ms),kd);return}lo=Fu(lo,kd,md,Ms).split(`
61
- `);for(var ll=0,mC=lo.length;ll<mC;++ll)ll>0&&Ne.push(`
62
- `,""),Ne.push(lo[ll],kd);return Ne},[]):ce=Gu(ao,O).trim(),Et=it(E,"paint","text-opacity",D,V,p,z)}if(ce&&Et&&!ue){xt||(++ot,F=P[ot],(!F||!F.getText()||F.getFill()||F.getStroke())&&(F=new le,P[ot]=F),F.setImage(void 0),F.setGeometry(void 0)),F.getText()||F.setText(dt||new cf({padding:[2,2,2,2]})),dt=F.getText();var bp=$["text-transform"];bp=="uppercase"?ce=Array.isArray(ce)?ce.map(function(Ne,Rn){return Rn%2?Ne:Ne.toUpperCase()}):ce.toUpperCase():bp=="lowercase"&&(ce=Array.isArray(ce)?ce.map(function(Ne,Rn){return Rn%2?Ne:Ne.toLowerCase()}):ce.toLowerCase());var kp=Array.isArray(ce)?ce:Z==2?Du(ce,Ms):Fu(ce,ks,md,Ms);dt.setText(kp),dt.setFont(ks),dt.setRotation(Au(it(E,"layout","text-rotate",D,V,p,z)));var al=it(E,"layout","text-anchor",D,V,p,z),vd=xt||Z==1?"point":it(E,"layout","symbol-placement",D,V,p,z);dt.setPlacement(vd),dt.setOverflow(vd==="point");var dr=it(E,"paint","text-halo-width",D,V,p,z),wp=it(E,"layout","text-offset",D,V,p,z),Mp=it(E,"paint","text-translate",D,V,p,z),_d=0,yd=0;if(vd=="point"){var xd="center";al.indexOf("left")!==-1?(xd="left",yd=dr):al.indexOf("right")!==-1&&(xd="right",yd=-dr),dt.setTextAlign(xd);var gC=it(E,"layout","text-rotation-alignment",D,V,p,z);dt.setRotateWithView(gC=="map")}else dt.setMaxAngle(Au(it(E,"layout","text-max-angle",D,V,p,z))*ce.length/kp.length),dt.setTextAlign(),dt.setRotateWithView(!1);var bd="middle";al.indexOf("bottom")==0?(bd="bottom",_d=-dr-.5*(ws-1)*zn):al.indexOf("top")==0&&(bd="top",_d=dr+.5*(ws-1)*zn),dt.setTextBaseline(bd);var Ep=it(E,"layout","text-justify",D,V,p,z);dt.setJustify(Ep==="auto"?void 0:Ep),dt.setOffsetX(wp[0]*zn+yd+Mp[0]),dt.setOffsetY(wp[1]*zn+_d+Mp[1]),G.setColor(lr(it(E,"paint","text-color",D,V,p,z),Et)),dt.setFill(G);var Cp=lr(it(E,"paint","text-halo-color",D,V,p,z),Et);if(Cp){A.setColor(Cp),dr*=2;var Sp=.5*zn;A.setWidth(dr<=Sp?dr:Sp),dt.setStroke(A)}else dt.setStroke(void 0);var Es=it(E,"layout","text-padding",D,V,p,z),Cs=dt.getPadding();Es!==Cs[0]&&(Cs[0]=Es,Cs[1]=Es,Cs[2]=Es,Cs[3]=Es),F.setZIndex(ut)}}}}if(ot>-1)return P.length=ot+1,P}};return i.setStyle(at),i.set("mapbox-source",v),i.set("mapbox-layers",f),i.set("mapbox-featurestate",{}),at}new Zn;class xk extends Gx{constructor(t){t=t||{};const e=t.projection!==void 0?t.projection:"EPSG:3857",n=t.tileGrid!==void 0?t.tileGrid:og({extent:Ta(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:n,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=t.gutter!==void 0?t.gutter:0}getGutter(){return this.gutter_}}const $g=xk,Wg='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class bk extends $g{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[Wg];const n=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",r=t.url!==void 0?t.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:n,interpolate:t.interpolate,maxZoom:t.maxZoom!==void 0?t.maxZoom:19,opaque:t.opaque!==void 0?t.opaque:!0,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:r,wrapX:t.wrapX,zDirection:t.zDirection})}}const kk=bk;function Yg(i,t=[]){return(...e)=>(n=>n.length>=i.length?i(...n):Yg(i,n))([...t,...e])}const wk=Array.isArray;function Mk(i,t,e){if(!wk(e))throw new TypeError("reduce: list must be array or iterable");let n=0;const r=e.length;for(;n<r;)t=i(t,e[n],n,e),n++;return t}const Ek=Yg(Mk);function Ck(i){return typeof i=="string"?i[i.length-1]||"":i[i.length-1]}function Kg(i,t){return arguments.length===1?e=>Kg(i,e):i*t}Ek(Kg,1);function Zg(i,t){if(arguments.length===1)return r=>Zg(i,r);if(i<1)throw new Error("First argument to splitEvery must be a positive integer");const e=[];let n=0;for(;n<t.length;)e.push(t.slice(n,n+=i));return e}const Yr=new hn({features:[],wrapX:!1}),Sk=new Qn({source:Yr,style:new le({image:new Hn({radius:3,fill:new ge({color:"grey"})})})});function Hg(i,t){var n,r,o;const e=i&&((o=(r=(n=i.getSource())==null?void 0:n.getFeaturesInExtent(t))==null?void 0:r.filter(s=>{var a;return((a=s.getGeometry())==null?void 0:a.getType())!=="Point"}))==null?void 0:o.flatMap(s=>s.flatCoordinates_));if(e)return Zg(2,e).forEach((s,a)=>{Yr.addFeature(new Ti({geometry:new ni(s),i:a}))})}const Jg={color:"#ff0000",width:3},Tk=new ke(Jg),zk=new ke({...Jg,lineDash:[2,8]}),Qg=new ge({color:"rgba(255, 0, 0, 0.1)"}),tm=new ma({stroke:new ke({color:"red",width:2}),points:4,radius1:15,radius2:1}),em=new Hn({radius:6,fill:new ge({color:"#ff0000"})}),Rk=new le({image:new ma({fill:new ge({color:"#fff"}),stroke:new ke({color:"#ff0000",width:2}),points:4,radius:5,angle:Math.PI/4}),geometry:function(i){const t=i.getGeometry();if(t instanceof Wn){const e=t.getCoordinates()[0];return new Ao(e)}else return}}),Li=new hn,im=new Qn({source:Li,style:[new le({fill:Qg,stroke:Tk}),Rk]});function Ik(i){return new tx({source:Li,type:"Polygon",style:new le({stroke:zk,fill:Qg,image:i==="crosshair"?tm:em})})}const nm=new sx({source:Yr,pixelTolerance:15});function Pk(i){return new rx({source:Li,style:new le({image:i==="crosshair"?tm:em})})}/**
60
+ `,""),Ne;if(Z==2){Ne.push(Du(ao,ws),kd);return}ao=Fu(ao,kd,md,ws).split(`
61
+ `);for(var ll=0,mC=ao.length;ll<mC;++ll)ll>0&&Ne.push(`
62
+ `,""),Ne.push(ao[ll],kd);return Ne},[]):ce=Gu(so,O).trim(),Mt=it(C,"paint","text-opacity",D,V,p,z)}if(ce&&Mt&&!ue){xt||(++ot,F=P[ot],(!F||!F.getText()||F.getFill()||F.getStroke())&&(F=new le,P[ot]=F),F.setImage(void 0),F.setGeometry(void 0)),F.getText()||F.setText(dt||new cf({padding:[2,2,2,2]})),dt=F.getText();var xp=$["text-transform"];xp=="uppercase"?ce=Array.isArray(ce)?ce.map(function(Ne,In){return In%2?Ne:Ne.toUpperCase()}):ce.toUpperCase():xp=="lowercase"&&(ce=Array.isArray(ce)?ce.map(function(Ne,In){return In%2?Ne:Ne.toLowerCase()}):ce.toLowerCase());var bp=Array.isArray(ce)?ce:Z==2?Du(ce,ws):Fu(ce,bs,md,ws);dt.setText(bp),dt.setFont(bs),dt.setRotation(Au(it(C,"layout","text-rotate",D,V,p,z)));var al=it(C,"layout","text-anchor",D,V,p,z),vd=xt||Z==1?"point":it(C,"layout","symbol-placement",D,V,p,z);dt.setPlacement(vd),dt.setOverflow(vd==="point");var dr=it(C,"paint","text-halo-width",D,V,p,z),kp=it(C,"layout","text-offset",D,V,p,z),wp=it(C,"paint","text-translate",D,V,p,z),_d=0,yd=0;if(vd=="point"){var xd="center";al.indexOf("left")!==-1?(xd="left",yd=dr):al.indexOf("right")!==-1&&(xd="right",yd=-dr),dt.setTextAlign(xd);var gC=it(C,"layout","text-rotation-alignment",D,V,p,z);dt.setRotateWithView(gC=="map")}else dt.setMaxAngle(Au(it(C,"layout","text-max-angle",D,V,p,z))*ce.length/bp.length),dt.setTextAlign(),dt.setRotateWithView(!1);var bd="middle";al.indexOf("bottom")==0?(bd="bottom",_d=-dr-.5*(ks-1)*zn):al.indexOf("top")==0&&(bd="top",_d=dr+.5*(ks-1)*zn),dt.setTextBaseline(bd);var Ep=it(C,"layout","text-justify",D,V,p,z);dt.setJustify(Ep==="auto"?void 0:Ep),dt.setOffsetX(kp[0]*zn+yd+wp[0]),dt.setOffsetY(kp[1]*zn+_d+wp[1]),G.setColor(lr(it(C,"paint","text-color",D,V,p,z),Mt)),dt.setFill(G);var Mp=lr(it(C,"paint","text-halo-color",D,V,p,z),Mt);if(Mp){A.setColor(Mp),dr*=2;var Cp=.5*zn;A.setWidth(dr<=Cp?dr:Cp),dt.setStroke(A)}else dt.setStroke(void 0);var Es=it(C,"layout","text-padding",D,V,p,z),Ms=dt.getPadding();Es!==Ms[0]&&(Ms[0]=Es,Ms[1]=Es,Ms[2]=Es,Ms[3]=Es),F.setZIndex(ut)}}}}if(ot>-1)return P.length=ot+1,P}};return i.setStyle(at),i.set("mapbox-source",v),i.set("mapbox-layers",f),i.set("mapbox-featurestate",{}),at}new Zn;class yk extends Nx{constructor(t){t=t||{};const e=t.projection!==void 0?t.projection:"EPSG:3857",n=t.tileGrid!==void 0?t.tileGrid:og({extent:Sa(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:n,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=t.gutter!==void 0?t.gutter:0}getGutter(){return this.gutter_}}const $g=yk,Wg='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class xk extends $g{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[Wg];const n=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",r=t.url!==void 0?t.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:n,interpolate:t.interpolate,maxZoom:t.maxZoom!==void 0?t.maxZoom:19,opaque:t.opaque!==void 0?t.opaque:!0,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:r,wrapX:t.wrapX,zDirection:t.zDirection})}}const bk=xk;function Yg(i,t=[]){return(...e)=>(n=>n.length>=i.length?i(...n):Yg(i,n))([...t,...e])}const kk=Array.isArray;function wk(i,t,e){if(!kk(e))throw new TypeError("reduce: list must be array or iterable");let n=0;const r=e.length;for(;n<r;)t=i(t,e[n],n,e),n++;return t}const Ek=Yg(wk);function Mk(i){return typeof i=="string"?i[i.length-1]||"":i[i.length-1]}function Kg(i,t){return arguments.length===1?e=>Kg(i,e):i*t}Ek(Kg,1);function Zg(i,t){if(arguments.length===1)return r=>Zg(i,r);if(i<1)throw new Error("First argument to splitEvery must be a positive integer");const e=[];let n=0;for(;n<t.length;)e.push(t.slice(n,n+=i));return e}const Va=new hn({features:[],wrapX:!1}),Ck=new Qn({source:Va,properties:{name:"pointsLayer"},style:new le({image:new Hn({radius:3,fill:new ge({color:"grey"})})})});function Sk(i,t){var n,r,o;const e=i&&((o=(r=(n=i.getSource())==null?void 0:n.getFeaturesInExtent(t))==null?void 0:r.filter(s=>{var a;return((a=s.getGeometry())==null?void 0:a.getType())!=="Point"}))==null?void 0:o.flatMap(s=>s.flatCoordinates_));if(e)return Zg(2,e).forEach((s,a)=>{Va.addFeature(new Ti({geometry:new ni(s),i:a}))})}const Hg={color:"#ff0000",width:3},Tk=new ke(Hg),zk=new ke({...Hg,lineDash:[2,8]}),Jg=new ge({color:"rgba(255, 0, 0, 0.1)"}),Qg=new ga({stroke:new ke({color:"red",width:2}),points:4,radius1:15,radius2:1}),tm=new Hn({radius:6,fill:new ge({color:"#ff0000"})}),Ik=new le({image:new ga({fill:new ge({color:"#fff"}),stroke:new ke({color:"#ff0000",width:2}),points:4,radius:5,angle:Math.PI/4}),geometry:function(i){const t=i.getGeometry();if(t instanceof Wn){const e=t.getCoordinates()[0];return new Po(e)}else return}}),Li=new hn,em=new Qn({source:Li,style:[new le({fill:Jg,stroke:Tk}),Ik]});function Rk(i){return new Qy({source:Li,type:"Polygon",style:new le({stroke:zk,fill:Jg,image:i==="crosshair"?Qg:tm})})}const im=new ox({source:Va,pixelTolerance:15});function Pk(i){return new nx({source:Li,style:new le({image:i==="crosshair"?Qg:tm})})}/**
63
63
  * splaytree v3.1.0
64
64
  * Fast Splay tree for Node and browser
65
65
  *
66
66
  * @author Alexander Milevski <info@w8r.name>
67
67
  * @license MIT
68
68
  * @preserve
69
- */var kn=function(){function i(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return i}();function Ak(i,t){return i>t?1:i<t?-1:0}function wn(i,t,e){for(var n=new kn(null,null),r=n,o=n;;){var s=e(i,t.key);if(s<0){if(t.left===null)break;if(e(i,t.left.key)<0){var a=t.left;if(t.left=a.right,a.right=t,t=a,t.left===null)break}o.left=t,o=t,t=t.left}else if(s>0){if(t.right===null)break;if(e(i,t.right.key)>0){var a=t.right;if(t.right=a.left,a.left=t,t=a,t.right===null)break}r.right=t,r=t,t=t.right}else break}return r.right=t.left,o.left=t.right,t.left=n.right,t.right=n.left,t}function ju(i,t,e,n){var r=new kn(i,t);if(e===null)return r.left=r.right=null,r;e=wn(i,e,n);var o=n(i,e.key);return o<0?(r.left=e.left,r.right=e,e.left=null):o>=0&&(r.right=e.right,r.left=e,e.right=null),r}function rm(i,t,e){var n=null,r=null;if(t){t=wn(i,t,e);var o=e(t.key,i);o===0?(n=t.left,r=t.right):o<0?(r=t.right,t.right=null,n=t):(n=t.left,t.left=null,r=t)}return{left:n,right:r}}function Dk(i,t,e){return t===null?i:(i===null||(t=wn(i.key,t,e),t.left=i),t)}function Bu(i,t,e,n,r){if(i){n(""+t+(e?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ")+r(i)+`
70
- `);var o=t+(e?" ":"\u2502 ");i.left&&Bu(i.left,o,!1,n,r),i.right&&Bu(i.right,o,!0,n,r)}}var Uu=function(){function i(t){t===void 0&&(t=Ak),this._root=null,this._size=0,this._comparator=t}return i.prototype.insert=function(t,e){return this._size++,this._root=ju(t,e,this._root,this._comparator)},i.prototype.add=function(t,e){var n=new kn(t,e);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var r=this._comparator,o=wn(t,this._root,r),s=r(t,o.key);return s===0?this._root=o:(s<0?(n.left=o.left,n.right=o,o.left=null):s>0&&(n.right=o.right,n.left=o,o.right=null),this._size++,this._root=n),this._root},i.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},i.prototype._remove=function(t,e,n){var r;if(e===null)return null;e=wn(t,e,n);var o=n(t,e.key);return o===0?(e.left===null?r=e.right:(r=wn(t,e.left,n),r.right=e.right),this._size--,r):e},i.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=wn(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},i.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(r===0)return e;r<0?e=e.left:e=e.right}return null},i.prototype.find=function(t){return this._root&&(this._root=wn(t,this._root,this._comparator),this._comparator(t,this._root.key)!==0)?null:this._root},i.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(r===0)return!0;r<0?e=e.left:e=e.right}return!1},i.prototype.forEach=function(t,e){for(var n=this._root,r=[],o=!1;!o;)n!==null?(r.push(n),n=n.left):r.length!==0?(n=r.pop(),t.call(e,n),n=n.right):o=!0;return this},i.prototype.range=function(t,e,n,r){for(var o=[],s=this._comparator,a=this._root,l;o.length!==0||a;)if(a)o.push(a),a=a.left;else{if(a=o.pop(),l=s(a.key,e),l>0)break;if(s(a.key,t)>=0&&n.call(r,a))return this;a=a.right}return this},i.prototype.keys=function(){var t=[];return this.forEach(function(e){var n=e.key;return t.push(n)}),t},i.prototype.values=function(){var t=[];return this.forEach(function(e){var n=e.data;return t.push(n)}),t},i.prototype.min=function(){return this._root?this.minNode(this._root).key:null},i.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},i.prototype.minNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.left;)t=t.left;return t},i.prototype.maxNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.right;)t=t.right;return t},i.prototype.at=function(t){for(var e=this._root,n=!1,r=0,o=[];!n;)if(e)o.push(e),e=e.left;else if(o.length>0){if(e=o.pop(),r===t)return e;r++,e=e.right}else n=!0;return null},i.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var r=this._comparator;e;){var o=r(t.key,e.key);if(o===0)break;o<0?(n=e,e=e.left):e=e.right}return n},i.prototype.prev=function(t){var e=this._root,n=null;if(t.left!==null){for(n=t.left;n.right;)n=n.right;return n}for(var r=this._comparator;e;){var o=r(t.key,e.key);if(o===0)break;o<0?e=e.left:(n=e,e=e.right)}return n},i.prototype.clear=function(){return this._root=null,this._size=0,this},i.prototype.toList=function(){return Fk(this._root)},i.prototype.load=function(t,e,n){e===void 0&&(e=[]),n===void 0&&(n=!1);var r=t.length,o=this._comparator;if(n&&Xu(t,e,0,r-1,o),this._root===null)this._root=Vu(t,e,0,r),this._size=r;else{var s=Ok(this.toList(),Lk(t,e),o);r=this._size+r,this._root=qu({head:s},0,r)}return this},i.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(i.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),i.prototype.toString=function(t){t===void 0&&(t=function(n){return String(n.key)});var e=[];return Bu(this._root,"",!0,function(n){return e.push(n)},t),e.join("")},i.prototype.update=function(t,e,n){var r=this._comparator,o=rm(t,this._root,r),s=o.left,a=o.right;r(t,e)<0?a=ju(e,n,a,r):s=ju(e,n,s,r),this._root=Dk(s,a,r)},i.prototype.split=function(t){return rm(t,this._root,this._comparator)},i}();function Vu(i,t,e,n){var r=n-e;if(r>0){var o=e+Math.floor(r/2),s=i[o],a=t[o],l=new kn(s,a);return l.left=Vu(i,t,e,o),l.right=Vu(i,t,o+1,n),l}return null}function Lk(i,t){for(var e=new kn(null,null),n=e,r=0;r<i.length;r++)n=n.next=new kn(i[r],t[r]);return n.next=null,e.next}function Fk(i){for(var t=i,e=[],n=!1,r=new kn(null,null),o=r;!n;)t?(e.push(t),t=t.left):e.length>0?(t=o=o.next=e.pop(),t=t.right):n=!0;return o.next=null,r.next}function qu(i,t,e){var n=e-t;if(n>0){var r=t+Math.floor(n/2),o=qu(i,t,r),s=i.head;return s.left=o,i.head=i.head.next,s.right=qu(i,r+1,e),s}return null}function Ok(i,t,e){for(var n=new kn(null,null),r=n,o=i,s=t;o!==null&&s!==null;)e(o.key,s.key)<0?(r.next=o,o=o.next):(r.next=s,s=s.next),r=r.next;return o!==null?r.next=o:s!==null&&(r.next=s),n.next}function Xu(i,t,e,n,r){if(!(e>=n)){for(var o=i[e+n>>1],s=e-1,a=n+1;;){do s++;while(r(i[s],o)<0);do a--;while(r(i[a],o)>0);if(s>=a)break;var l=i[s];i[s]=i[a],i[a]=l,l=t[s],t[s]=t[a],t[a]=l}Xu(i,t,e,a,r),Xu(i,t,a+1,n,r)}}function He(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}function om(i,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,n.key,n)}}function Ce(i,t,e){return t&&om(i.prototype,t),e&&om(i,e),i}var es=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},$u=function(t,e){if(e.ur.x<t.ll.x||t.ur.x<e.ll.x||e.ur.y<t.ll.y||t.ur.y<e.ll.y)return null;var n=t.ll.x<e.ll.x?e.ll.x:t.ll.x,r=t.ur.x<e.ur.x?t.ur.x:e.ur.x,o=t.ll.y<e.ll.y?e.ll.y:t.ll.y,s=t.ur.y<e.ur.y?t.ur.y:e.ur.y;return{ll:{x:n,y:o},ur:{x:r,y:s}}},Mn=Number.EPSILON;Mn===void 0&&(Mn=Math.pow(2,-52));var Nk=Mn*Mn,Wu=function(t,e){if(-Mn<t&&t<Mn&&-Mn<e&&e<Mn)return 0;var n=t-e;return n*n<Nk*t*e?0:t<e?-1:1},Gk=function(){function i(){He(this,i),this.reset()}return Ce(i,[{key:"reset",value:function(){this.xRounder=new sm,this.yRounder=new sm}},{key:"round",value:function(e,n){return{x:this.xRounder.round(e),y:this.yRounder.round(n)}}}]),i}(),sm=function(){function i(){He(this,i),this.tree=new Uu,this.round(0)}return Ce(i,[{key:"round",value:function(e){var n=this.tree.add(e),r=this.tree.prev(n);if(r!==null&&Wu(n.key,r.key)===0)return this.tree.remove(e),r.key;var o=this.tree.next(n);return o!==null&&Wu(n.key,o.key)===0?(this.tree.remove(e),o.key):e}}]),i}(),is=new Gk,ns=function(t,e){return t.x*e.y-t.y*e.x},am=function(t,e){return t.x*e.x+t.y*e.y},lm=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},o={x:n.x-t.x,y:n.y-t.y},s=ns(r,o);return Wu(s,0)},qa=function(t){return Math.sqrt(am(t,t))},jk=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},o={x:n.x-t.x,y:n.y-t.y};return ns(o,r)/qa(o)/qa(r)},Bk=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},o={x:n.x-t.x,y:n.y-t.y};return am(o,r)/qa(o)/qa(r)},hm=function(t,e,n){return e.y===0?null:{x:t.x+e.x/e.y*(n-t.y),y:n}},um=function(t,e,n){return e.x===0?null:{x:n,y:t.y+e.y/e.x*(n-t.x)}},Uk=function(t,e,n,r){if(e.x===0)return um(n,r,t.x);if(r.x===0)return um(t,e,n.x);if(e.y===0)return hm(n,r,t.y);if(r.y===0)return hm(t,e,n.y);var o=ns(e,r);if(o==0)return null;var s={x:n.x-t.x,y:n.y-t.y},a=ns(s,e)/o,l=ns(s,r)/o,h=t.x+l*e.x,u=n.x+a*r.x,d=t.y+l*e.y,c=n.y+a*r.y,f=(h+u)/2,g=(d+c)/2;return{x:f,y:g}},mi=function(){Ce(i,null,[{key:"compare",value:function(e,n){var r=i.comparePoints(e.point,n.point);return r!==0?r:(e.point!==n.point&&e.link(n),e.isLeft!==n.isLeft?e.isLeft?1:-1:Xa.compare(e.segment,n.segment))}},{key:"comparePoints",value:function(e,n){return e.x<n.x?-1:e.x>n.x?1:e.y<n.y?-1:e.y>n.y?1:0}}]);function i(t,e){He(this,i),t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}return Ce(i,[{key:"link",value:function(e){if(e.point===this.point)throw new Error("Tried to link already linked events");for(var n=e.point.events,r=0,o=n.length;r<o;r++){var s=n[r];this.point.events.push(s),s.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var e=this.point.events.length,n=0;n<e;n++){var r=this.point.events[n];if(r.segment.consumedBy===void 0)for(var o=n+1;o<e;o++){var s=this.point.events[o];s.consumedBy===void 0&&r.otherSE.point.events===s.otherSE.point.events&&r.segment.consume(s.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var e=[],n=0,r=this.point.events.length;n<r;n++){var o=this.point.events[n];o!==this&&!o.segment.ringOut&&o.segment.isInResult()&&e.push(o)}return e}},{key:"getLeftmostComparator",value:function(e){var n=this,r=new Map,o=function(a){var l=a.otherSE;r.set(a,{sine:jk(n.point,e.point,l.point),cosine:Bk(n.point,e.point,l.point)})};return function(s,a){r.has(s)||o(s),r.has(a)||o(a);var l=r.get(s),h=l.sine,u=l.cosine,d=r.get(a),c=d.sine,f=d.cosine;return h>=0&&c>=0?u<f?1:u>f?-1:0:h<0&&c<0?u<f?-1:u>f?1:0:c<h?-1:c>h?1:0}}}]),i}(),Vk=0,Xa=function(){Ce(i,null,[{key:"compare",value:function(e,n){var r=e.leftSE.point.x,o=n.leftSE.point.x,s=e.rightSE.point.x,a=n.rightSE.point.x;if(a<r)return 1;if(s<o)return-1;var l=e.leftSE.point.y,h=n.leftSE.point.y,u=e.rightSE.point.y,d=n.rightSE.point.y;if(r<o){if(h<l&&h<u)return 1;if(h>l&&h>u)return-1;var c=e.comparePoint(n.leftSE.point);if(c<0)return 1;if(c>0)return-1;var f=n.comparePoint(e.rightSE.point);return f!==0?f:-1}if(r>o){if(l<h&&l<d)return-1;if(l>h&&l>d)return 1;var g=n.comparePoint(e.leftSE.point);if(g!==0)return g;var m=e.comparePoint(n.rightSE.point);return m<0?1:m>0?-1:1}if(l<h)return-1;if(l>h)return 1;if(s<a){var p=n.comparePoint(e.rightSE.point);if(p!==0)return p}if(s>a){var _=e.comparePoint(n.rightSE.point);if(_<0)return 1;if(_>0)return-1}if(s!==a){var v=u-l,y=s-r,x=d-h,k=a-o;if(v>y&&x<k)return 1;if(v<y&&x>k)return-1}return s>a?1:s<a||u<d?-1:u>d?1:e.id<n.id?-1:e.id>n.id?1:0}}]);function i(t,e,n,r){He(this,i),this.id=++Vk,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=n,this.windings=r}return Ce(i,[{key:"replaceRightSE",value:function(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var e=this.leftSE.point.y,n=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e<n?e:n},ur:{x:this.rightSE.point.x,y:e>n?e:n}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}},{key:"comparePoint",value:function(e){if(this.isAnEndpoint(e))return 0;var n=this.leftSE.point,r=this.rightSE.point,o=this.vector();if(n.x===r.x)return e.x===n.x?0:e.x<n.x?1:-1;var s=(e.y-n.y)/o.y,a=n.x+s*o.x;if(e.x===a)return 0;var l=(e.x-n.x)/o.x,h=n.y+l*o.y;return e.y===h?0:e.y<h?-1:1}},{key:"getIntersection",value:function(e){var n=this.bbox(),r=e.bbox(),o=$u(n,r);if(o===null)return null;var s=this.leftSE.point,a=this.rightSE.point,l=e.leftSE.point,h=e.rightSE.point,u=es(n,l)&&this.comparePoint(l)===0,d=es(r,s)&&e.comparePoint(s)===0,c=es(n,h)&&this.comparePoint(h)===0,f=es(r,a)&&e.comparePoint(a)===0;if(d&&u)return f&&!c?a:!f&&c?h:null;if(d)return c&&s.x===h.x&&s.y===h.y?null:s;if(u)return f&&a.x===l.x&&a.y===l.y?null:l;if(f&&c)return null;if(f)return a;if(c)return h;var g=Uk(s,this.vector(),l,e.vector());return g===null||!es(o,g)?null:is.round(g.x,g.y)}},{key:"split",value:function(e){var n=[],r=e.events!==void 0,o=new mi(e,!0),s=new mi(e,!1),a=this.rightSE;this.replaceRightSE(s),n.push(s),n.push(o);var l=new i(o,a,this.rings.slice(),this.windings.slice());return mi.comparePoints(l.leftSE.point,l.rightSE.point)>0&&l.swapEvents(),mi.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(o.checkForConsuming(),s.checkForConsuming()),n}},{key:"swapEvents",value:function(){var e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var n=0,r=this.windings.length;n<r;n++)this.windings[n]*=-1}},{key:"consume",value:function(e){for(var n=this,r=e;n.consumedBy;)n=n.consumedBy;for(;r.consumedBy;)r=r.consumedBy;var o=i.compare(n,r);if(o!==0){if(o>0){var s=n;n=r,r=s}if(n.prev===r){var a=n;n=r,r=a}for(var l=0,h=r.rings.length;l<h;l++){var u=r.rings[l],d=r.windings[l],c=n.rings.indexOf(u);c===-1?(n.rings.push(u),n.windings.push(d)):n.windings[c]+=d}r.rings=null,r.windings=null,r.consumedBy=n,r.leftSE.consumedBy=n.leftSE,r.rightSE.consumedBy=n.rightSE}}},{key:"prevInResult",value:function(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}},{key:"beforeState",value:function(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{var e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}return this._beforeState}},{key:"afterState",value:function(){if(this._afterState!==void 0)return this._afterState;var e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};for(var n=this._afterState.rings,r=this._afterState.windings,o=this._afterState.multiPolys,s=0,a=this.rings.length;s<a;s++){var l=this.rings[s],h=this.windings[s],u=n.indexOf(l);u===-1?(n.push(l),r.push(h)):r[u]+=h}for(var d=[],c=[],f=0,g=n.length;f<g;f++)if(r[f]!==0){var m=n[f],p=m.poly;if(c.indexOf(p)===-1)if(m.isExterior)d.push(p);else{c.indexOf(p)===-1&&c.push(p);var _=d.indexOf(m.poly);_!==-1&&d.splice(_,1)}}for(var v=0,y=d.length;v<y;v++){var x=d[v].multiPoly;o.indexOf(x)===-1&&o.push(x)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;var e=this.beforeState().multiPolys,n=this.afterState().multiPolys;switch(oi.type){case"union":{var r=e.length===0,o=n.length===0;this._isInResult=r!==o;break}case"intersection":{var s,a;e.length<n.length?(s=e.length,a=n.length):(s=n.length,a=e.length),this._isInResult=a===oi.numMultiPolys&&s<a;break}case"xor":{var l=Math.abs(e.length-n.length);this._isInResult=l%2===1;break}case"difference":{var h=function(d){return d.length===1&&d[0].isSubject};this._isInResult=h(e)!==h(n);break}default:throw new Error("Unrecognized operation type found ".concat(oi.type))}return this._isInResult}}],[{key:"fromRing",value:function(e,n,r){var o,s,a,l=mi.comparePoints(e,n);if(l<0)o=e,s=n,a=1;else if(l>0)o=n,s=e,a=-1;else throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));var h=new mi(o,!0),u=new mi(s,!1);return new i(h,u,[r],[a])}}]),i}(),dm=function(){function i(t,e,n){if(He(this,i),!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=n,this.segments=[],typeof t[0][0]!="number"||typeof t[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var r=is.round(t[0][0],t[0][1]);this.bbox={ll:{x:r.x,y:r.y},ur:{x:r.x,y:r.y}};for(var o=r,s=1,a=t.length;s<a;s++){if(typeof t[s][0]!="number"||typeof t[s][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var l=is.round(t[s][0],t[s][1]);l.x===o.x&&l.y===o.y||(this.segments.push(Xa.fromRing(o,l,this)),l.x<this.bbox.ll.x&&(this.bbox.ll.x=l.x),l.y<this.bbox.ll.y&&(this.bbox.ll.y=l.y),l.x>this.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),o=l)}(r.x!==o.x||r.y!==o.y)&&this.segments.push(Xa.fromRing(o,r,this))}return Ce(i,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,r=this.segments.length;n<r;n++){var o=this.segments[n];e.push(o.leftSE),e.push(o.rightSE)}return e}}]),i}(),qk=function(){function i(t,e){if(He(this,i),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new dm(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var n=1,r=t.length;n<r;n++){var o=new dm(t[n],this,!1);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.interiorRings.push(o)}this.multiPoly=e}return Ce(i,[{key:"getSweepEvents",value:function(){for(var e=this.exteriorRing.getSweepEvents(),n=0,r=this.interiorRings.length;n<r;n++)for(var o=this.interiorRings[n].getSweepEvents(),s=0,a=o.length;s<a;s++)e.push(o[s]);return e}}]),i}(),cm=function(){function i(t,e){if(He(this,i),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof t[0][0][0]=="number"&&(t=[t])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var n=0,r=t.length;n<r;n++){var o=new qk(t[n],this);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.polys.push(o)}this.isSubject=e}return Ce(i,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,r=this.polys.length;n<r;n++)for(var o=this.polys[n].getSweepEvents(),s=0,a=o.length;s<a;s++)e.push(o[s]);return e}}]),i}(),Xk=function(){Ce(i,null,[{key:"factory",value:function(e){for(var n=[],r=0,o=e.length;r<o;r++){var s=e[r];if(!(!s.isInResult()||s.ringOut)){for(var a=null,l=s.leftSE,h=s.rightSE,u=[l],d=l.point,c=[];a=l,l=h,u.push(l),l.point!==d;)for(;;){var f=l.getAvailableLinkedEvents();if(f.length===0){var g=u[0].point,m=u[u.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(g.x,",")+" ".concat(g.y,"]. Last matching segment found ends at")+" [".concat(m.x,", ").concat(m.y,"]."))}if(f.length===1){h=f[0].otherSE;break}for(var p=null,_=0,v=c.length;_<v;_++)if(c[_].point===l.point){p=_;break}if(p!==null){var y=c.splice(p)[0],x=u.splice(y.index);x.unshift(x[0].otherSE),n.push(new i(x.reverse()));continue}c.push({index:u.length,point:l.point});var k=l.getLeftmostComparator(a);h=f.sort(k)[0].otherSE;break}n.push(new i(u))}}return n}}]);function i(t){He(this,i),this.events=t;for(var e=0,n=t.length;e<n;e++)t[e].segment.ringOut=this;this.poly=null}return Ce(i,[{key:"getGeom",value:function(){for(var e=this.events[0].point,n=[e],r=1,o=this.events.length-1;r<o;r++){var s=this.events[r].point,a=this.events[r+1].point;lm(s,e,a)!==0&&(n.push(s),e=s)}if(n.length===1)return null;var l=n[0],h=n[1];lm(l,e,h)===0&&n.shift(),n.push(n[0]);for(var u=this.isExteriorRing()?1:-1,d=this.isExteriorRing()?0:n.length-1,c=this.isExteriorRing()?n.length:-1,f=[],g=d;g!=c;g+=u)f.push([n[g].x,n[g].y]);return f}},{key:"isExteriorRing",value:function(){if(this._isExteriorRing===void 0){var e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():!0}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var e=this.events[0],n=1,r=this.events.length;n<r;n++){var o=this.events[n];mi.compare(e,o)>0&&(e=o)}for(var s=e.segment.prevInResult(),a=s?s.prevInResult():null;;){if(!s)return null;if(!a)return s.ringOut;if(a.ringOut!==s.ringOut)return a.ringOut.enclosingRing()!==s.ringOut?s.ringOut:s.ringOut.enclosingRing();s=a.prevInResult(),a=s?s.prevInResult():null}}}]),i}(),fm=function(){function i(t){He(this,i),this.exteriorRing=t,t.poly=this,this.interiorRings=[]}return Ce(i,[{key:"addInterior",value:function(e){this.interiorRings.push(e),e.poly=this}},{key:"getGeom",value:function(){var e=[this.exteriorRing.getGeom()];if(e[0]===null)return null;for(var n=0,r=this.interiorRings.length;n<r;n++){var o=this.interiorRings[n].getGeom();o!==null&&e.push(o)}return e}}]),i}(),$k=function(){function i(t){He(this,i),this.rings=t,this.polys=this._composePolys(t)}return Ce(i,[{key:"getGeom",value:function(){for(var e=[],n=0,r=this.polys.length;n<r;n++){var o=this.polys[n].getGeom();o!==null&&e.push(o)}return e}},{key:"_composePolys",value:function(e){for(var n=[],r=0,o=e.length;r<o;r++){var s=e[r];if(!s.poly)if(s.isExteriorRing())n.push(new fm(s));else{var a=s.enclosingRing();a.poly||n.push(new fm(a)),a.poly.addInterior(s)}}return n}}]),i}(),Wk=function(){function i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xa.compare;He(this,i),this.queue=t,this.tree=new Uu(e),this.segments=[]}return Ce(i,[{key:"process",value:function(e){var n=e.segment,r=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(n),r;var o=e.isLeft?this.tree.insert(n):this.tree.find(n);if(!o)throw new Error("Unable to find segment #".concat(n.id," ")+"[".concat(n.leftSE.point.x,", ").concat(n.leftSE.point.y,"] -> ")+"[".concat(n.rightSE.point.x,", ").concat(n.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var s=o,a=o,l=void 0,h=void 0;l===void 0;)s=this.tree.prev(s),s===null?l=null:s.key.consumedBy===void 0&&(l=s.key);for(;h===void 0;)a=this.tree.next(a),a===null?h=null:a.key.consumedBy===void 0&&(h=a.key);if(e.isLeft){var u=null;if(l){var d=l.getIntersection(n);if(d!==null&&(n.isAnEndpoint(d)||(u=d),!l.isAnEndpoint(d)))for(var c=this._splitSafely(l,d),f=0,g=c.length;f<g;f++)r.push(c[f])}var m=null;if(h){var p=h.getIntersection(n);if(p!==null&&(n.isAnEndpoint(p)||(m=p),!h.isAnEndpoint(p)))for(var _=this._splitSafely(h,p),v=0,y=_.length;v<y;v++)r.push(_[v])}if(u!==null||m!==null){var x=null;if(u===null)x=m;else if(m===null)x=u;else{var k=mi.comparePoints(u,m);x=k<=0?u:m}this.queue.remove(n.rightSE),r.push(n.rightSE);for(var w=n.split(x),C=0,M=w.length;C<M;C++)r.push(w[C])}r.length>0?(this.tree.remove(n),r.push(e)):(this.segments.push(n),n.prev=l)}else{if(l&&h){var S=l.getIntersection(h);if(S!==null){if(!l.isAnEndpoint(S))for(var R=this._splitSafely(l,S),A=0,G=R.length;A<G;A++)r.push(R[A]);if(!h.isAnEndpoint(S))for(var P=this._splitSafely(h,S),at=0,j=P.length;at<j;at++)r.push(P[at])}}this.tree.remove(n)}return r}},{key:"_splitSafely",value:function(e,n){this.tree.remove(e);var r=e.rightSE;this.queue.remove(r);var o=e.split(n);return o.push(r),e.consumedBy===void 0&&this.tree.insert(e),o}}]),i}(),gm=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,Yk=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,Kk=function(){function i(){He(this,i)}return Ce(i,[{key:"run",value:function(e,n,r){oi.type=e,is.reset();for(var o=[new cm(n,!0)],s=0,a=r.length;s<a;s++)o.push(new cm(r[s],!1));if(oi.numMultiPolys=o.length,oi.type==="difference")for(var l=o[0],h=1;h<o.length;)$u(o[h].bbox,l.bbox)!==null?h++:o.splice(h,1);if(oi.type==="intersection"){for(var u=0,d=o.length;u<d;u++)for(var c=o[u],f=u+1,g=o.length;f<g;f++)if($u(c.bbox,o[f].bbox)===null)return[]}for(var m=new Uu(mi.compare),p=0,_=o.length;p<_;p++)for(var v=o[p].getSweepEvents(),y=0,x=v.length;y<x;y++)if(m.insert(v[y]),m.size>gm)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var k=new Wk(m),w=m.size,C=m.pop();C;){var M=C.key;if(m.size===w){var S=M.segment;throw new Error("Unable to pop() ".concat(M.isLeft?"left":"right"," SweepEvent ")+"[".concat(M.point.x,", ").concat(M.point.y,"] from segment #").concat(S.id," ")+"[".concat(S.leftSE.point.x,", ").concat(S.leftSE.point.y,"] -> ")+"[".concat(S.rightSE.point.x,", ").concat(S.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(m.size>gm)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(k.segments.length>Yk)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var R=k.process(M),A=0,G=R.length;A<G;A++){var P=R[A];P.consumedBy===void 0&&m.insert(P)}w=m.size,C=m.pop()}is.reset();var at=Xk.factory(k.segments),j=new $k(at);return j.getGeom()}}]),i}(),oi=new Kk,Zk=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return oi.run("union",t,n)},Hk=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return oi.run("intersection",t,n)},Jk=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return oi.run("xor",t,n)},Qk=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return oi.run("difference",t,n)},tw={union:Zk,intersection:Hk,xor:Jk,difference:Qk};function mm(i,t,e){e===void 0&&(e={});var n={type:"Feature"};return(e.id===0||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=t||{},n.geometry=i,n}function ew(i,t,e){e===void 0&&(e={});for(var n=0,r=i;n<r.length;n++){var o=r[n];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:i};return mm(a,t,e)}function iw(i,t,e){e===void 0&&(e={});var n={type:"MultiPolygon",coordinates:i};return mm(n,t,e)}function pm(i){return i.type==="Feature"?i.geometry:i}function nw(i,t,e){e===void 0&&(e={});var n=pm(i),r=pm(t),o=tw.union(n.coordinates,r.coordinates);return o.length===0?null:o.length===1?ew(o[0],e.properties):iw(o,e.properties)}function Yu(i,t){const e=hc(i),n=Math.round(e*100)/100,r=n/1e4;let o;return t==="m2"?o=n+" m\xB2":t==="ha"&&(o=r+" ha"),o}function rs(i,t,e){const n=t.getExtent();return i.getView().fit(ui(n,e))}function $a(i,t){const[e,n,r]=Array.from(wo(i));return Yl([e,n,r,t])}const rw="https://api.os.uk/features/v1/wfs",Kr=new hn,pi=new hn;function ow(i,t,e){return new Qn({source:pi,style:new le({stroke:e?void 0:new ke({width:3,color:i}),fill:new ge({color:t?$a(i,.2):$a(i,0)})})})}function vm(i,t,e){const n=`
69
+ */var kn=function(){function i(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return i}();function Ak(i,t){return i>t?1:i<t?-1:0}function wn(i,t,e){for(var n=new kn(null,null),r=n,o=n;;){var s=e(i,t.key);if(s<0){if(t.left===null)break;if(e(i,t.left.key)<0){var a=t.left;if(t.left=a.right,a.right=t,t=a,t.left===null)break}o.left=t,o=t,t=t.left}else if(s>0){if(t.right===null)break;if(e(i,t.right.key)>0){var a=t.right;if(t.right=a.left,a.left=t,t=a,t.right===null)break}r.right=t,r=t,t=t.right}else break}return r.right=t.left,o.left=t.right,t.left=n.right,t.right=n.left,t}function ju(i,t,e,n){var r=new kn(i,t);if(e===null)return r.left=r.right=null,r;e=wn(i,e,n);var o=n(i,e.key);return o<0?(r.left=e.left,r.right=e,e.left=null):o>=0&&(r.right=e.right,r.left=e,e.right=null),r}function nm(i,t,e){var n=null,r=null;if(t){t=wn(i,t,e);var o=e(t.key,i);o===0?(n=t.left,r=t.right):o<0?(r=t.right,t.right=null,n=t):(n=t.left,t.left=null,r=t)}return{left:n,right:r}}function Dk(i,t,e){return t===null?i:(i===null||(t=wn(i.key,t,e),t.left=i),t)}function Bu(i,t,e,n,r){if(i){n(""+t+(e?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ")+r(i)+`
70
+ `);var o=t+(e?" ":"\u2502 ");i.left&&Bu(i.left,o,!1,n,r),i.right&&Bu(i.right,o,!0,n,r)}}var Uu=function(){function i(t){t===void 0&&(t=Ak),this._root=null,this._size=0,this._comparator=t}return i.prototype.insert=function(t,e){return this._size++,this._root=ju(t,e,this._root,this._comparator)},i.prototype.add=function(t,e){var n=new kn(t,e);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var r=this._comparator,o=wn(t,this._root,r),s=r(t,o.key);return s===0?this._root=o:(s<0?(n.left=o.left,n.right=o,o.left=null):s>0&&(n.right=o.right,n.left=o,o.right=null),this._size++,this._root=n),this._root},i.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},i.prototype._remove=function(t,e,n){var r;if(e===null)return null;e=wn(t,e,n);var o=n(t,e.key);return o===0?(e.left===null?r=e.right:(r=wn(t,e.left,n),r.right=e.right),this._size--,r):e},i.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=wn(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},i.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(r===0)return e;r<0?e=e.left:e=e.right}return null},i.prototype.find=function(t){return this._root&&(this._root=wn(t,this._root,this._comparator),this._comparator(t,this._root.key)!==0)?null:this._root},i.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(r===0)return!0;r<0?e=e.left:e=e.right}return!1},i.prototype.forEach=function(t,e){for(var n=this._root,r=[],o=!1;!o;)n!==null?(r.push(n),n=n.left):r.length!==0?(n=r.pop(),t.call(e,n),n=n.right):o=!0;return this},i.prototype.range=function(t,e,n,r){for(var o=[],s=this._comparator,a=this._root,l;o.length!==0||a;)if(a)o.push(a),a=a.left;else{if(a=o.pop(),l=s(a.key,e),l>0)break;if(s(a.key,t)>=0&&n.call(r,a))return this;a=a.right}return this},i.prototype.keys=function(){var t=[];return this.forEach(function(e){var n=e.key;return t.push(n)}),t},i.prototype.values=function(){var t=[];return this.forEach(function(e){var n=e.data;return t.push(n)}),t},i.prototype.min=function(){return this._root?this.minNode(this._root).key:null},i.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},i.prototype.minNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.left;)t=t.left;return t},i.prototype.maxNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.right;)t=t.right;return t},i.prototype.at=function(t){for(var e=this._root,n=!1,r=0,o=[];!n;)if(e)o.push(e),e=e.left;else if(o.length>0){if(e=o.pop(),r===t)return e;r++,e=e.right}else n=!0;return null},i.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var r=this._comparator;e;){var o=r(t.key,e.key);if(o===0)break;o<0?(n=e,e=e.left):e=e.right}return n},i.prototype.prev=function(t){var e=this._root,n=null;if(t.left!==null){for(n=t.left;n.right;)n=n.right;return n}for(var r=this._comparator;e;){var o=r(t.key,e.key);if(o===0)break;o<0?e=e.left:(n=e,e=e.right)}return n},i.prototype.clear=function(){return this._root=null,this._size=0,this},i.prototype.toList=function(){return Fk(this._root)},i.prototype.load=function(t,e,n){e===void 0&&(e=[]),n===void 0&&(n=!1);var r=t.length,o=this._comparator;if(n&&Xu(t,e,0,r-1,o),this._root===null)this._root=Vu(t,e,0,r),this._size=r;else{var s=Ok(this.toList(),Lk(t,e),o);r=this._size+r,this._root=qu({head:s},0,r)}return this},i.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(i.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),i.prototype.toString=function(t){t===void 0&&(t=function(n){return String(n.key)});var e=[];return Bu(this._root,"",!0,function(n){return e.push(n)},t),e.join("")},i.prototype.update=function(t,e,n){var r=this._comparator,o=nm(t,this._root,r),s=o.left,a=o.right;r(t,e)<0?a=ju(e,n,a,r):s=ju(e,n,s,r),this._root=Dk(s,a,r)},i.prototype.split=function(t){return nm(t,this._root,this._comparator)},i}();function Vu(i,t,e,n){var r=n-e;if(r>0){var o=e+Math.floor(r/2),s=i[o],a=t[o],l=new kn(s,a);return l.left=Vu(i,t,e,o),l.right=Vu(i,t,o+1,n),l}return null}function Lk(i,t){for(var e=new kn(null,null),n=e,r=0;r<i.length;r++)n=n.next=new kn(i[r],t[r]);return n.next=null,e.next}function Fk(i){for(var t=i,e=[],n=!1,r=new kn(null,null),o=r;!n;)t?(e.push(t),t=t.left):e.length>0?(t=o=o.next=e.pop(),t=t.right):n=!0;return o.next=null,r.next}function qu(i,t,e){var n=e-t;if(n>0){var r=t+Math.floor(n/2),o=qu(i,t,r),s=i.head;return s.left=o,i.head=i.head.next,s.right=qu(i,r+1,e),s}return null}function Ok(i,t,e){for(var n=new kn(null,null),r=n,o=i,s=t;o!==null&&s!==null;)e(o.key,s.key)<0?(r.next=o,o=o.next):(r.next=s,s=s.next),r=r.next;return o!==null?r.next=o:s!==null&&(r.next=s),n.next}function Xu(i,t,e,n,r){if(!(e>=n)){for(var o=i[e+n>>1],s=e-1,a=n+1;;){do s++;while(r(i[s],o)<0);do a--;while(r(i[a],o)>0);if(s>=a)break;var l=i[s];i[s]=i[a],i[a]=l,l=t[s],t[s]=t[a],t[a]=l}Xu(i,t,e,a,r),Xu(i,t,a+1,n,r)}}function He(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}function rm(i,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,n.key,n)}}function Ce(i,t,e){return t&&rm(i.prototype,t),e&&rm(i,e),i}var ts=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},$u=function(t,e){if(e.ur.x<t.ll.x||t.ur.x<e.ll.x||e.ur.y<t.ll.y||t.ur.y<e.ll.y)return null;var n=t.ll.x<e.ll.x?e.ll.x:t.ll.x,r=t.ur.x<e.ur.x?t.ur.x:e.ur.x,o=t.ll.y<e.ll.y?e.ll.y:t.ll.y,s=t.ur.y<e.ur.y?t.ur.y:e.ur.y;return{ll:{x:n,y:o},ur:{x:r,y:s}}},En=Number.EPSILON;En===void 0&&(En=Math.pow(2,-52));var Nk=En*En,Wu=function(t,e){if(-En<t&&t<En&&-En<e&&e<En)return 0;var n=t-e;return n*n<Nk*t*e?0:t<e?-1:1},Gk=function(){function i(){He(this,i),this.reset()}return Ce(i,[{key:"reset",value:function(){this.xRounder=new om,this.yRounder=new om}},{key:"round",value:function(e,n){return{x:this.xRounder.round(e),y:this.yRounder.round(n)}}}]),i}(),om=function(){function i(){He(this,i),this.tree=new Uu,this.round(0)}return Ce(i,[{key:"round",value:function(e){var n=this.tree.add(e),r=this.tree.prev(n);if(r!==null&&Wu(n.key,r.key)===0)return this.tree.remove(e),r.key;var o=this.tree.next(n);return o!==null&&Wu(n.key,o.key)===0?(this.tree.remove(e),o.key):e}}]),i}(),es=new Gk,is=function(t,e){return t.x*e.y-t.y*e.x},sm=function(t,e){return t.x*e.x+t.y*e.y},am=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},o={x:n.x-t.x,y:n.y-t.y},s=is(r,o);return Wu(s,0)},qa=function(t){return Math.sqrt(sm(t,t))},jk=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},o={x:n.x-t.x,y:n.y-t.y};return is(o,r)/qa(o)/qa(r)},Bk=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},o={x:n.x-t.x,y:n.y-t.y};return sm(o,r)/qa(o)/qa(r)},lm=function(t,e,n){return e.y===0?null:{x:t.x+e.x/e.y*(n-t.y),y:n}},hm=function(t,e,n){return e.x===0?null:{x:n,y:t.y+e.y/e.x*(n-t.x)}},Uk=function(t,e,n,r){if(e.x===0)return hm(n,r,t.x);if(r.x===0)return hm(t,e,n.x);if(e.y===0)return lm(n,r,t.y);if(r.y===0)return lm(t,e,n.y);var o=is(e,r);if(o==0)return null;var s={x:n.x-t.x,y:n.y-t.y},a=is(s,e)/o,l=is(s,r)/o,h=t.x+l*e.x,u=n.x+a*r.x,d=t.y+l*e.y,c=n.y+a*r.y,f=(h+u)/2,g=(d+c)/2;return{x:f,y:g}},mi=function(){Ce(i,null,[{key:"compare",value:function(e,n){var r=i.comparePoints(e.point,n.point);return r!==0?r:(e.point!==n.point&&e.link(n),e.isLeft!==n.isLeft?e.isLeft?1:-1:Xa.compare(e.segment,n.segment))}},{key:"comparePoints",value:function(e,n){return e.x<n.x?-1:e.x>n.x?1:e.y<n.y?-1:e.y>n.y?1:0}}]);function i(t,e){He(this,i),t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}return Ce(i,[{key:"link",value:function(e){if(e.point===this.point)throw new Error("Tried to link already linked events");for(var n=e.point.events,r=0,o=n.length;r<o;r++){var s=n[r];this.point.events.push(s),s.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var e=this.point.events.length,n=0;n<e;n++){var r=this.point.events[n];if(r.segment.consumedBy===void 0)for(var o=n+1;o<e;o++){var s=this.point.events[o];s.consumedBy===void 0&&r.otherSE.point.events===s.otherSE.point.events&&r.segment.consume(s.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var e=[],n=0,r=this.point.events.length;n<r;n++){var o=this.point.events[n];o!==this&&!o.segment.ringOut&&o.segment.isInResult()&&e.push(o)}return e}},{key:"getLeftmostComparator",value:function(e){var n=this,r=new Map,o=function(a){var l=a.otherSE;r.set(a,{sine:jk(n.point,e.point,l.point),cosine:Bk(n.point,e.point,l.point)})};return function(s,a){r.has(s)||o(s),r.has(a)||o(a);var l=r.get(s),h=l.sine,u=l.cosine,d=r.get(a),c=d.sine,f=d.cosine;return h>=0&&c>=0?u<f?1:u>f?-1:0:h<0&&c<0?u<f?-1:u>f?1:0:c<h?-1:c>h?1:0}}}]),i}(),Vk=0,Xa=function(){Ce(i,null,[{key:"compare",value:function(e,n){var r=e.leftSE.point.x,o=n.leftSE.point.x,s=e.rightSE.point.x,a=n.rightSE.point.x;if(a<r)return 1;if(s<o)return-1;var l=e.leftSE.point.y,h=n.leftSE.point.y,u=e.rightSE.point.y,d=n.rightSE.point.y;if(r<o){if(h<l&&h<u)return 1;if(h>l&&h>u)return-1;var c=e.comparePoint(n.leftSE.point);if(c<0)return 1;if(c>0)return-1;var f=n.comparePoint(e.rightSE.point);return f!==0?f:-1}if(r>o){if(l<h&&l<d)return-1;if(l>h&&l>d)return 1;var g=n.comparePoint(e.leftSE.point);if(g!==0)return g;var m=e.comparePoint(n.rightSE.point);return m<0?1:m>0?-1:1}if(l<h)return-1;if(l>h)return 1;if(s<a){var p=n.comparePoint(e.rightSE.point);if(p!==0)return p}if(s>a){var _=e.comparePoint(n.rightSE.point);if(_<0)return 1;if(_>0)return-1}if(s!==a){var v=u-l,y=s-r,x=d-h,k=a-o;if(v>y&&x<k)return 1;if(v<y&&x>k)return-1}return s>a?1:s<a||u<d?-1:u>d?1:e.id<n.id?-1:e.id>n.id?1:0}}]);function i(t,e,n,r){He(this,i),this.id=++Vk,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=n,this.windings=r}return Ce(i,[{key:"replaceRightSE",value:function(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var e=this.leftSE.point.y,n=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e<n?e:n},ur:{x:this.rightSE.point.x,y:e>n?e:n}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}},{key:"comparePoint",value:function(e){if(this.isAnEndpoint(e))return 0;var n=this.leftSE.point,r=this.rightSE.point,o=this.vector();if(n.x===r.x)return e.x===n.x?0:e.x<n.x?1:-1;var s=(e.y-n.y)/o.y,a=n.x+s*o.x;if(e.x===a)return 0;var l=(e.x-n.x)/o.x,h=n.y+l*o.y;return e.y===h?0:e.y<h?-1:1}},{key:"getIntersection",value:function(e){var n=this.bbox(),r=e.bbox(),o=$u(n,r);if(o===null)return null;var s=this.leftSE.point,a=this.rightSE.point,l=e.leftSE.point,h=e.rightSE.point,u=ts(n,l)&&this.comparePoint(l)===0,d=ts(r,s)&&e.comparePoint(s)===0,c=ts(n,h)&&this.comparePoint(h)===0,f=ts(r,a)&&e.comparePoint(a)===0;if(d&&u)return f&&!c?a:!f&&c?h:null;if(d)return c&&s.x===h.x&&s.y===h.y?null:s;if(u)return f&&a.x===l.x&&a.y===l.y?null:l;if(f&&c)return null;if(f)return a;if(c)return h;var g=Uk(s,this.vector(),l,e.vector());return g===null||!ts(o,g)?null:es.round(g.x,g.y)}},{key:"split",value:function(e){var n=[],r=e.events!==void 0,o=new mi(e,!0),s=new mi(e,!1),a=this.rightSE;this.replaceRightSE(s),n.push(s),n.push(o);var l=new i(o,a,this.rings.slice(),this.windings.slice());return mi.comparePoints(l.leftSE.point,l.rightSE.point)>0&&l.swapEvents(),mi.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(o.checkForConsuming(),s.checkForConsuming()),n}},{key:"swapEvents",value:function(){var e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var n=0,r=this.windings.length;n<r;n++)this.windings[n]*=-1}},{key:"consume",value:function(e){for(var n=this,r=e;n.consumedBy;)n=n.consumedBy;for(;r.consumedBy;)r=r.consumedBy;var o=i.compare(n,r);if(o!==0){if(o>0){var s=n;n=r,r=s}if(n.prev===r){var a=n;n=r,r=a}for(var l=0,h=r.rings.length;l<h;l++){var u=r.rings[l],d=r.windings[l],c=n.rings.indexOf(u);c===-1?(n.rings.push(u),n.windings.push(d)):n.windings[c]+=d}r.rings=null,r.windings=null,r.consumedBy=n,r.leftSE.consumedBy=n.leftSE,r.rightSE.consumedBy=n.rightSE}}},{key:"prevInResult",value:function(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}},{key:"beforeState",value:function(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{var e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}return this._beforeState}},{key:"afterState",value:function(){if(this._afterState!==void 0)return this._afterState;var e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};for(var n=this._afterState.rings,r=this._afterState.windings,o=this._afterState.multiPolys,s=0,a=this.rings.length;s<a;s++){var l=this.rings[s],h=this.windings[s],u=n.indexOf(l);u===-1?(n.push(l),r.push(h)):r[u]+=h}for(var d=[],c=[],f=0,g=n.length;f<g;f++)if(r[f]!==0){var m=n[f],p=m.poly;if(c.indexOf(p)===-1)if(m.isExterior)d.push(p);else{c.indexOf(p)===-1&&c.push(p);var _=d.indexOf(m.poly);_!==-1&&d.splice(_,1)}}for(var v=0,y=d.length;v<y;v++){var x=d[v].multiPoly;o.indexOf(x)===-1&&o.push(x)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;var e=this.beforeState().multiPolys,n=this.afterState().multiPolys;switch(oi.type){case"union":{var r=e.length===0,o=n.length===0;this._isInResult=r!==o;break}case"intersection":{var s,a;e.length<n.length?(s=e.length,a=n.length):(s=n.length,a=e.length),this._isInResult=a===oi.numMultiPolys&&s<a;break}case"xor":{var l=Math.abs(e.length-n.length);this._isInResult=l%2===1;break}case"difference":{var h=function(d){return d.length===1&&d[0].isSubject};this._isInResult=h(e)!==h(n);break}default:throw new Error("Unrecognized operation type found ".concat(oi.type))}return this._isInResult}}],[{key:"fromRing",value:function(e,n,r){var o,s,a,l=mi.comparePoints(e,n);if(l<0)o=e,s=n,a=1;else if(l>0)o=n,s=e,a=-1;else throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));var h=new mi(o,!0),u=new mi(s,!1);return new i(h,u,[r],[a])}}]),i}(),um=function(){function i(t,e,n){if(He(this,i),!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=n,this.segments=[],typeof t[0][0]!="number"||typeof t[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var r=es.round(t[0][0],t[0][1]);this.bbox={ll:{x:r.x,y:r.y},ur:{x:r.x,y:r.y}};for(var o=r,s=1,a=t.length;s<a;s++){if(typeof t[s][0]!="number"||typeof t[s][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var l=es.round(t[s][0],t[s][1]);l.x===o.x&&l.y===o.y||(this.segments.push(Xa.fromRing(o,l,this)),l.x<this.bbox.ll.x&&(this.bbox.ll.x=l.x),l.y<this.bbox.ll.y&&(this.bbox.ll.y=l.y),l.x>this.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),o=l)}(r.x!==o.x||r.y!==o.y)&&this.segments.push(Xa.fromRing(o,r,this))}return Ce(i,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,r=this.segments.length;n<r;n++){var o=this.segments[n];e.push(o.leftSE),e.push(o.rightSE)}return e}}]),i}(),qk=function(){function i(t,e){if(He(this,i),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new um(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var n=1,r=t.length;n<r;n++){var o=new um(t[n],this,!1);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.interiorRings.push(o)}this.multiPoly=e}return Ce(i,[{key:"getSweepEvents",value:function(){for(var e=this.exteriorRing.getSweepEvents(),n=0,r=this.interiorRings.length;n<r;n++)for(var o=this.interiorRings[n].getSweepEvents(),s=0,a=o.length;s<a;s++)e.push(o[s]);return e}}]),i}(),dm=function(){function i(t,e){if(He(this,i),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof t[0][0][0]=="number"&&(t=[t])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var n=0,r=t.length;n<r;n++){var o=new qk(t[n],this);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.polys.push(o)}this.isSubject=e}return Ce(i,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,r=this.polys.length;n<r;n++)for(var o=this.polys[n].getSweepEvents(),s=0,a=o.length;s<a;s++)e.push(o[s]);return e}}]),i}(),Xk=function(){Ce(i,null,[{key:"factory",value:function(e){for(var n=[],r=0,o=e.length;r<o;r++){var s=e[r];if(!(!s.isInResult()||s.ringOut)){for(var a=null,l=s.leftSE,h=s.rightSE,u=[l],d=l.point,c=[];a=l,l=h,u.push(l),l.point!==d;)for(;;){var f=l.getAvailableLinkedEvents();if(f.length===0){var g=u[0].point,m=u[u.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(g.x,",")+" ".concat(g.y,"]. Last matching segment found ends at")+" [".concat(m.x,", ").concat(m.y,"]."))}if(f.length===1){h=f[0].otherSE;break}for(var p=null,_=0,v=c.length;_<v;_++)if(c[_].point===l.point){p=_;break}if(p!==null){var y=c.splice(p)[0],x=u.splice(y.index);x.unshift(x[0].otherSE),n.push(new i(x.reverse()));continue}c.push({index:u.length,point:l.point});var k=l.getLeftmostComparator(a);h=f.sort(k)[0].otherSE;break}n.push(new i(u))}}return n}}]);function i(t){He(this,i),this.events=t;for(var e=0,n=t.length;e<n;e++)t[e].segment.ringOut=this;this.poly=null}return Ce(i,[{key:"getGeom",value:function(){for(var e=this.events[0].point,n=[e],r=1,o=this.events.length-1;r<o;r++){var s=this.events[r].point,a=this.events[r+1].point;am(s,e,a)!==0&&(n.push(s),e=s)}if(n.length===1)return null;var l=n[0],h=n[1];am(l,e,h)===0&&n.shift(),n.push(n[0]);for(var u=this.isExteriorRing()?1:-1,d=this.isExteriorRing()?0:n.length-1,c=this.isExteriorRing()?n.length:-1,f=[],g=d;g!=c;g+=u)f.push([n[g].x,n[g].y]);return f}},{key:"isExteriorRing",value:function(){if(this._isExteriorRing===void 0){var e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():!0}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var e=this.events[0],n=1,r=this.events.length;n<r;n++){var o=this.events[n];mi.compare(e,o)>0&&(e=o)}for(var s=e.segment.prevInResult(),a=s?s.prevInResult():null;;){if(!s)return null;if(!a)return s.ringOut;if(a.ringOut!==s.ringOut)return a.ringOut.enclosingRing()!==s.ringOut?s.ringOut:s.ringOut.enclosingRing();s=a.prevInResult(),a=s?s.prevInResult():null}}}]),i}(),cm=function(){function i(t){He(this,i),this.exteriorRing=t,t.poly=this,this.interiorRings=[]}return Ce(i,[{key:"addInterior",value:function(e){this.interiorRings.push(e),e.poly=this}},{key:"getGeom",value:function(){var e=[this.exteriorRing.getGeom()];if(e[0]===null)return null;for(var n=0,r=this.interiorRings.length;n<r;n++){var o=this.interiorRings[n].getGeom();o!==null&&e.push(o)}return e}}]),i}(),$k=function(){function i(t){He(this,i),this.rings=t,this.polys=this._composePolys(t)}return Ce(i,[{key:"getGeom",value:function(){for(var e=[],n=0,r=this.polys.length;n<r;n++){var o=this.polys[n].getGeom();o!==null&&e.push(o)}return e}},{key:"_composePolys",value:function(e){for(var n=[],r=0,o=e.length;r<o;r++){var s=e[r];if(!s.poly)if(s.isExteriorRing())n.push(new cm(s));else{var a=s.enclosingRing();a.poly||n.push(new cm(a)),a.poly.addInterior(s)}}return n}}]),i}(),Wk=function(){function i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xa.compare;He(this,i),this.queue=t,this.tree=new Uu(e),this.segments=[]}return Ce(i,[{key:"process",value:function(e){var n=e.segment,r=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(n),r;var o=e.isLeft?this.tree.insert(n):this.tree.find(n);if(!o)throw new Error("Unable to find segment #".concat(n.id," ")+"[".concat(n.leftSE.point.x,", ").concat(n.leftSE.point.y,"] -> ")+"[".concat(n.rightSE.point.x,", ").concat(n.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var s=o,a=o,l=void 0,h=void 0;l===void 0;)s=this.tree.prev(s),s===null?l=null:s.key.consumedBy===void 0&&(l=s.key);for(;h===void 0;)a=this.tree.next(a),a===null?h=null:a.key.consumedBy===void 0&&(h=a.key);if(e.isLeft){var u=null;if(l){var d=l.getIntersection(n);if(d!==null&&(n.isAnEndpoint(d)||(u=d),!l.isAnEndpoint(d)))for(var c=this._splitSafely(l,d),f=0,g=c.length;f<g;f++)r.push(c[f])}var m=null;if(h){var p=h.getIntersection(n);if(p!==null&&(n.isAnEndpoint(p)||(m=p),!h.isAnEndpoint(p)))for(var _=this._splitSafely(h,p),v=0,y=_.length;v<y;v++)r.push(_[v])}if(u!==null||m!==null){var x=null;if(u===null)x=m;else if(m===null)x=u;else{var k=mi.comparePoints(u,m);x=k<=0?u:m}this.queue.remove(n.rightSE),r.push(n.rightSE);for(var w=n.split(x),M=0,E=w.length;M<E;M++)r.push(w[M])}r.length>0?(this.tree.remove(n),r.push(e)):(this.segments.push(n),n.prev=l)}else{if(l&&h){var S=l.getIntersection(h);if(S!==null){if(!l.isAnEndpoint(S))for(var I=this._splitSafely(l,S),A=0,G=I.length;A<G;A++)r.push(I[A]);if(!h.isAnEndpoint(S))for(var P=this._splitSafely(h,S),at=0,j=P.length;at<j;at++)r.push(P[at])}}this.tree.remove(n)}return r}},{key:"_splitSafely",value:function(e,n){this.tree.remove(e);var r=e.rightSE;this.queue.remove(r);var o=e.split(n);return o.push(r),e.consumedBy===void 0&&this.tree.insert(e),o}}]),i}(),fm=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,Yk=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,Kk=function(){function i(){He(this,i)}return Ce(i,[{key:"run",value:function(e,n,r){oi.type=e,es.reset();for(var o=[new dm(n,!0)],s=0,a=r.length;s<a;s++)o.push(new dm(r[s],!1));if(oi.numMultiPolys=o.length,oi.type==="difference")for(var l=o[0],h=1;h<o.length;)$u(o[h].bbox,l.bbox)!==null?h++:o.splice(h,1);if(oi.type==="intersection"){for(var u=0,d=o.length;u<d;u++)for(var c=o[u],f=u+1,g=o.length;f<g;f++)if($u(c.bbox,o[f].bbox)===null)return[]}for(var m=new Uu(mi.compare),p=0,_=o.length;p<_;p++)for(var v=o[p].getSweepEvents(),y=0,x=v.length;y<x;y++)if(m.insert(v[y]),m.size>fm)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var k=new Wk(m),w=m.size,M=m.pop();M;){var E=M.key;if(m.size===w){var S=E.segment;throw new Error("Unable to pop() ".concat(E.isLeft?"left":"right"," SweepEvent ")+"[".concat(E.point.x,", ").concat(E.point.y,"] from segment #").concat(S.id," ")+"[".concat(S.leftSE.point.x,", ").concat(S.leftSE.point.y,"] -> ")+"[".concat(S.rightSE.point.x,", ").concat(S.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(m.size>fm)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(k.segments.length>Yk)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var I=k.process(E),A=0,G=I.length;A<G;A++){var P=I[A];P.consumedBy===void 0&&m.insert(P)}w=m.size,M=m.pop()}es.reset();var at=Xk.factory(k.segments),j=new $k(at);return j.getGeom()}}]),i}(),oi=new Kk,Zk=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return oi.run("union",t,n)},Hk=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return oi.run("intersection",t,n)},Jk=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return oi.run("xor",t,n)},Qk=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return oi.run("difference",t,n)},tw={union:Zk,intersection:Hk,xor:Jk,difference:Qk};function gm(i,t,e){e===void 0&&(e={});var n={type:"Feature"};return(e.id===0||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=t||{},n.geometry=i,n}function ew(i,t,e){e===void 0&&(e={});for(var n=0,r=i;n<r.length;n++){var o=r[n];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:i};return gm(a,t,e)}function iw(i,t,e){e===void 0&&(e={});var n={type:"MultiPolygon",coordinates:i};return gm(n,t,e)}function mm(i){return i.type==="Feature"?i.geometry:i}function nw(i,t,e){e===void 0&&(e={});var n=mm(i),r=mm(t),o=tw.union(n.coordinates,r.coordinates);return o.length===0?null:o.length===1?ew(o[0],e.properties):iw(o,e.properties)}function Yu(i,t){const e=hc(i),n=Math.round(e*100)/100,r=n/1e4;let o;return t==="m2"?o=n+" m\xB2":t==="ha"&&(o=r+" ha"),o}function ns(i,t,e){const n=t.getExtent();return i.getView().fit(ui(n,e))}function $a(i,t){const[e,n,r]=Array.from(ko(i));return Yl([e,n,r,t])}const rw="https://api.os.uk/features/v1/wfs",Yr=new hn,pi=new hn;function ow(i,t,e){return new Qn({source:pi,style:new le({stroke:e?void 0:new ke({width:3,color:i}),fill:new ge({color:t?$a(i,.2):$a(i,0)})})})}function pm(i,t,e){const n=`
71
71
  <ogc:Filter>
72
72
  <ogc:Contains>
73
73
  <ogc:PropertyName>SHAPE</ogc:PropertyName>
74
74
  <gml:Point srsName="urn:ogc:def:crs:EPSG::4326">
75
- <gml:coordinates>${j0(i).reverse().join(",")}</gml:coordinates>
75
+ <gml:coordinates>${G0(i).reverse().join(",")}</gml:coordinates>
76
76
  </gml:Point>
77
77
  </ogc:Contains>
78
78
  </ogc:Filter>
79
- `;fetch(sw({key:t,service:"WFS",request:"GetFeature",version:"2.0.0",typeNames:"Topography_TopographicArea",propertyName:"TOID,DescriptiveGroup,SHAPE",outputFormat:"GEOJSON",srsName:"urn:ogc:def:crs:EPSG::4326",filter:n,count:1})).then(o=>o.json()).then(o=>{if(!o.features.length)return;const s=o.features[0].properties,a=["TOID","DescriptiveGroup"];Object.keys(s).forEach(u=>a.includes(u)||delete s[u]);const l=new Zn,h=l.readFeatures(o,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"});e?h.forEach(u=>{const d=u.getProperties().TOID,c=Kr.getFeatureById(d);c?Kr.removeFeature(c):(u.setId(d),Kr.addFeature(u))}):(Kr.clear(),h.forEach(u=>{const d=u.getProperties().TOID;u.setId(d),Kr.addFeature(u)})),pi.clear(),pi.addFeature(l.readFeature(Kr.getFeatures().reduce((u,d)=>{const c=l.writeFeatureObject(d).geometry;return u?nw(u,c):c},null)))}).catch(o=>console.log(o))}function sw(i){const t=Object.keys(i).map(e=>e+"="+encodeURI(i[e])).join("&");return`${rw}?${t}`}const aw="https://api.os.uk/maps/raster/v1/zxy/Light_3857/{z}/{x}/{y}.png?key=",lw="https://api.os.uk/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf?srs=3857&key=",hw="https://api.os.uk/maps/vector/v1/vts/resources/styles?srs=3857&key=";function uw(i,t){return new Vx({source:t?new $g({url:aw+t,attributions:[i],attributionsCollapsible:!1,maxZoom:20}):new kk({attributions:[Wg]})})}function dw(i,t){let e=new bx({declutter:!0,source:new Lx({format:new N1,url:lw+t,attributions:[i],attributionsCollapsible:!1})});return t&&fetch(hw+t).then(n=>n.json()).then(n=>yk(e,n,"esri")).catch(n=>console.log(n)),e}function cw(i){const t=Object.keys(i.defs),e=t.length;let n,r;for(n=0;n<e;++n){const o=t[n];if(!Gt(o)){const s=i.defs(o);let a=s.units;!a&&s.projName==="longlat"&&(a="degrees"),dc(new Ns({code:o,axisOrientation:s.axis,metersPerUnit:s.to_meter,units:a}))}}for(n=0;n<e;++n){const o=t[n],s=Gt(o);for(r=0;r<e;++r){const a=t[r],l=Gt(a);if(!tc(o,a))if(i.defs[o]===i.defs[a])Bl([s,l]);else{const h=i(o,a);G0(s,l,fc(s,l,h.forward),fc(l,s,h.inverse))}}}}function fw(i){i("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),i("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),i("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),i.WGS84=i["EPSG:4326"],i["EPSG:3785"]=i["EPSG:3857"],i.GOOGLE=i["EPSG:3857"],i["EPSG:900913"]=i["EPSG:3857"],i["EPSG:102113"]=i["EPSG:3857"]}var hr=1,ur=2,Wa=3,gw=4,Ku=5,_m=6378137,mw=6356752314e-3,ym=.0066943799901413165,os=484813681109536e-20,I=Math.PI/2,pw=.16666666666666666,vw=.04722222222222222,_w=.022156084656084655,B=1e-10,he=.017453292519943295,vi=57.29577951308232,It=Math.PI/4,ss=Math.PI*2,Zt=3.14159265359,De={};De.greenwich=0,De.lisbon=-9.131906111111,De.paris=2.337229166667,De.bogota=-74.080916666667,De.madrid=-3.687938888889,De.rome=12.452333333333,De.bern=7.439583333333,De.jakarta=106.807719444444,De.ferro=-17.666666666667,De.brussels=4.367975,De.stockholm=18.058277777778,De.athens=23.7163375,De.oslo=10.722916666667;const yw={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var xm=/[\s_\-\/\(\)]/g;function En(i,t){if(i[t])return i[t];for(var e=Object.keys(i),n=t.toLowerCase().replace(xm,""),r=-1,o,s;++r<e.length;)if(o=e[r],s=o.toLowerCase().replace(xm,""),s===n)return i[o]}function Zu(i){var t={},e=i.split("+").map(function(a){return a.trim()}).filter(function(a){return a}).reduce(function(a,l){var h=l.split("=");return h.push(!0),a[h[0].toLowerCase()]=h[1],a},{}),n,r,o,s={proj:"projName",datum:"datumCode",rf:function(a){t.rf=parseFloat(a)},lat_0:function(a){t.lat0=a*he},lat_1:function(a){t.lat1=a*he},lat_2:function(a){t.lat2=a*he},lat_ts:function(a){t.lat_ts=a*he},lon_0:function(a){t.long0=a*he},lon_1:function(a){t.long1=a*he},lon_2:function(a){t.long2=a*he},alpha:function(a){t.alpha=parseFloat(a)*he},gamma:function(a){t.rectified_grid_angle=parseFloat(a)},lonc:function(a){t.longc=a*he},x_0:function(a){t.x0=parseFloat(a)},y_0:function(a){t.y0=parseFloat(a)},k_0:function(a){t.k0=parseFloat(a)},k:function(a){t.k0=parseFloat(a)},a:function(a){t.a=parseFloat(a)},b:function(a){t.b=parseFloat(a)},r_a:function(){t.R_A=!0},zone:function(a){t.zone=parseInt(a,10)},south:function(){t.utmSouth=!0},towgs84:function(a){t.datum_params=a.split(",").map(function(l){return parseFloat(l)})},to_meter:function(a){t.to_meter=parseFloat(a)},units:function(a){t.units=a;var l=En(yw,a);l&&(t.to_meter=l.to_meter)},from_greenwich:function(a){t.from_greenwich=a*he},pm:function(a){var l=En(De,a);t.from_greenwich=(l||parseFloat(a))*he},nadgrids:function(a){a==="@null"?t.datumCode="none":t.nadgrids=a},axis:function(a){var l="ewnsud";a.length===3&&l.indexOf(a.substr(0,1))!==-1&&l.indexOf(a.substr(1,1))!==-1&&l.indexOf(a.substr(2,1))!==-1&&(t.axis=a)},approx:function(){t.approx=!0}};for(n in e)r=e[n],n in s?(o=s[n],typeof o=="function"?o(r):t[o]=r):t[n]=r;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t}var as=1,bm=2,km=3,Ya=4,wm=5,Hu=-1,xw=/\s/,bw=/[A-Za-z]/,kw=/[A-Za-z84_]/,Ka=/[,\]]/,Mm=/[\d\.E\-\+]/;function Fi(i){if(typeof i!="string")throw new Error("not a string");this.text=i.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=as}Fi.prototype.readCharicter=function(){var i=this.text[this.place++];if(this.state!==Ya)for(;xw.test(i);){if(this.place>=this.text.length)return;i=this.text[this.place++]}switch(this.state){case as:return this.neutral(i);case bm:return this.keyword(i);case Ya:return this.quoted(i);case wm:return this.afterquote(i);case km:return this.number(i);case Hu:return}},Fi.prototype.afterquote=function(i){if(i==='"'){this.word+='"',this.state=Ya;return}if(Ka.test(i)){this.word=this.word.trim(),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in afterquote yet, index '+this.place)},Fi.prototype.afterItem=function(i){if(i===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=as;return}if(i==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=as,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Hu);return}},Fi.prototype.number=function(i){if(Mm.test(i)){this.word+=i;return}if(Ka.test(i)){this.word=parseFloat(this.word),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in number yet, index '+this.place)},Fi.prototype.quoted=function(i){if(i==='"'){this.state=wm;return}this.word+=i},Fi.prototype.keyword=function(i){if(kw.test(i)){this.word+=i;return}if(i==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=as;return}if(Ka.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in keyword yet, index '+this.place)},Fi.prototype.neutral=function(i){if(bw.test(i)){this.word=i,this.state=bm;return}if(i==='"'){this.word="",this.state=Ya;return}if(Mm.test(i)){this.word=i,this.state=km;return}if(Ka.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in neutral yet, index '+this.place)},Fi.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Hu)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function ww(i){var t=new Fi(i);return t.output()}function Em(i,t,e){Array.isArray(t)&&(e.unshift(t),t=null);var n=t?{}:i,r=e.reduce(function(o,s){return Zr(s,o),o},n);t&&(i[t]=r)}function Zr(i,t){if(!Array.isArray(i)){t[i]=!0;return}var e=i.shift();if(e==="PARAMETER"&&(e=i.shift()),i.length===1){if(Array.isArray(i[0])){t[e]={},Zr(i[0],t[e]);return}t[e]=i[0];return}if(!i.length){t[e]=!0;return}if(e==="TOWGS84"){t[e]=i;return}if(e==="AXIS"){e in t||(t[e]=[]),t[e].push(i);return}Array.isArray(e)||(t[e]={});var n;switch(e){case"UNIT":case"PRIMEM":case"VERT_DATUM":t[e]={name:i[0].toLowerCase(),convert:i[1]},i.length===3&&Zr(i[2],t[e]);return;case"SPHEROID":case"ELLIPSOID":t[e]={name:i[0],a:i[1],rf:i[2]},i.length===4&&Zr(i[3],t[e]);return;case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":i[0]=["name",i[0]],Em(t,e,i);return;default:for(n=-1;++n<i.length;)if(!Array.isArray(i[n]))return Zr(i,t[e]);return Em(t,e,i)}}var Mw=.017453292519943295;function Ew(i,t){var e=t[0],n=t[1];!(e in i)&&n in i&&(i[e]=i[n],t.length===3&&(i[e]=t[2](i[e])))}function Oi(i){return i*Mw}function Cw(i){if(i.type==="GEOGCS"?i.projName="longlat":i.type==="LOCAL_CS"?(i.projName="identity",i.local=!0):typeof i.PROJECTION=="object"?i.projName=Object.keys(i.PROJECTION)[0]:i.projName=i.PROJECTION,i.AXIS){for(var t="",e=0,n=i.AXIS.length;e<n;++e){var r=[i.AXIS[e][0].toLowerCase(),i.AXIS[e][1].toLowerCase()];r[0].indexOf("north")!==-1||(r[0]==="y"||r[0]==="lat")&&r[1]==="north"?t+="n":r[0].indexOf("south")!==-1||(r[0]==="y"||r[0]==="lat")&&r[1]==="south"?t+="s":r[0].indexOf("east")!==-1||(r[0]==="x"||r[0]==="lon")&&r[1]==="east"?t+="e":(r[0].indexOf("west")!==-1||(r[0]==="x"||r[0]==="lon")&&r[1]==="west")&&(t+="w")}t.length===2&&(t+="u"),t.length===3&&(i.axis=t)}i.UNIT&&(i.units=i.UNIT.name.toLowerCase(),i.units==="metre"&&(i.units="meter"),i.UNIT.convert&&(i.type==="GEOGCS"?i.DATUM&&i.DATUM.SPHEROID&&(i.to_meter=i.UNIT.convert*i.DATUM.SPHEROID.a):i.to_meter=i.UNIT.convert));var o=i.GEOGCS;i.type==="GEOGCS"&&(o=i),o&&(o.DATUM?i.datumCode=o.DATUM.name.toLowerCase():i.datumCode=o.name.toLowerCase(),i.datumCode.slice(0,2)==="d_"&&(i.datumCode=i.datumCode.slice(2)),(i.datumCode==="new_zealand_geodetic_datum_1949"||i.datumCode==="new_zealand_1949")&&(i.datumCode="nzgd49"),(i.datumCode==="wgs_1984"||i.datumCode==="world_geodetic_system_1984")&&(i.PROJECTION==="Mercator_Auxiliary_Sphere"&&(i.sphere=!0),i.datumCode="wgs84"),i.datumCode.slice(-6)==="_ferro"&&(i.datumCode=i.datumCode.slice(0,-6)),i.datumCode.slice(-8)==="_jakarta"&&(i.datumCode=i.datumCode.slice(0,-8)),~i.datumCode.indexOf("belge")&&(i.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(i.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),i.ellps.toLowerCase().slice(0,13)==="international"&&(i.ellps="intl"),i.a=o.DATUM.SPHEROID.a,i.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(i.datum_params=o.DATUM.TOWGS84),~i.datumCode.indexOf("osgb_1936")&&(i.datumCode="osgb36"),~i.datumCode.indexOf("osni_1952")&&(i.datumCode="osni52"),(~i.datumCode.indexOf("tm65")||~i.datumCode.indexOf("geodetic_datum_of_1965"))&&(i.datumCode="ire65"),i.datumCode==="ch1903+"&&(i.datumCode="ch1903"),~i.datumCode.indexOf("israel")&&(i.datumCode="isr93")),i.b&&!isFinite(i.b)&&(i.b=i.a);function s(h){var u=i.to_meter||1;return h*u}var a=function(h){return Ew(i,h)},l=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",Oi],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",Oi],["x0","false_easting",s],["y0","false_northing",s],["long0","central_meridian",Oi],["lat0","latitude_of_origin",Oi],["lat0","standard_parallel_1",Oi],["lat1","standard_parallel_1",Oi],["lat2","standard_parallel_2",Oi],["azimuth","Azimuth"],["alpha","azimuth",Oi],["srsCode","name"]];l.forEach(a),!i.long0&&i.longc&&(i.projName==="Albers_Conic_Equal_Area"||i.projName==="Lambert_Azimuthal_Equal_Area")&&(i.long0=i.longc),!i.lat_ts&&i.lat1&&(i.projName==="Stereographic_South_Pole"||i.projName==="Polar Stereographic (variant B)")&&(i.lat0=Oi(i.lat1>0?90:-90),i.lat_ts=i.lat1)}function Cm(i){var t=ww(i),e=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",e]);var r={};return Zr(t,r),Cw(r),r}function Se(i){var t=this;if(arguments.length===2){var e=arguments[1];typeof e=="string"?e.charAt(0)==="+"?Se[i]=Zu(arguments[1]):Se[i]=Cm(arguments[1]):Se[i]=e}else if(arguments.length===1){if(Array.isArray(i))return i.map(function(n){Array.isArray(n)?Se.apply(t,n):Se(n)});if(typeof i=="string"){if(i in Se)return Se[i]}else"EPSG"in i?Se["EPSG:"+i.EPSG]=i:"ESRI"in i?Se["ESRI:"+i.ESRI]=i:"IAU2000"in i?Se["IAU2000:"+i.IAU2000]=i:console.log(i);return}}fw(Se);function Sw(i){return typeof i=="string"}function Tw(i){return i in Se}var zw=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Rw(i){return zw.some(function(t){return i.indexOf(t)>-1})}var Iw=["3857","900913","3785","102113"];function Pw(i){var t=En(i,"authority");if(!!t){var e=En(t,"epsg");return e&&Iw.indexOf(e)>-1}}function Aw(i){var t=En(i,"extension");if(!!t)return En(t,"proj4")}function Dw(i){return i[0]==="+"}function Lw(i){if(Sw(i)){if(Tw(i))return Se[i];if(Rw(i)){var t=Cm(i);if(Pw(t))return Se["EPSG:3857"];var e=Aw(t);return e?Zu(e):t}if(Dw(i))return Zu(i)}else return i}function Sm(i,t){i=i||{};var e,n;if(!t)return i;for(n in t)e=t[n],e!==void 0&&(i[n]=e);return i}function _i(i,t,e){var n=i*t;return e/Math.sqrt(1-n*n)}function ls(i){return i<0?-1:1}function X(i){return Math.abs(i)<=Zt?i:i-ls(i)*ss}function si(i,t,e){var n=i*e,r=.5*i;return n=Math.pow((1-n)/(1+n),r),Math.tan(.5*(I-t))/n}function hs(i,t){for(var e=.5*i,n,r,o=I-2*Math.atan(t),s=0;s<=15;s++)if(n=i*Math.sin(o),r=I-2*Math.atan(t*Math.pow((1-n)/(1+n),e))-o,o+=r,Math.abs(r)<=1e-10)return o;return-9999}function Fw(){var i=this.b/this.a;this.es=1-i*i,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=_i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function Ow(i){var t=i.x,e=i.y;if(e*vi>90&&e*vi<-90&&t*vi>180&&t*vi<-180)return null;var n,r;if(Math.abs(Math.abs(e)-I)<=B)return null;if(this.sphere)n=this.x0+this.a*this.k0*X(t-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(It+.5*e));else{var o=Math.sin(e),s=si(this.e,e,o);n=this.x0+this.a*this.k0*X(t-this.long0),r=this.y0-this.a*this.k0*Math.log(s)}return i.x=n,i.y=r,i}function Nw(i){var t=i.x-this.x0,e=i.y-this.y0,n,r;if(this.sphere)r=I-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var o=Math.exp(-e/(this.a*this.k0));if(r=hs(this.e,o),r===-9999)return null}return n=X(this.long0+t/(this.a*this.k0)),i.x=n,i.y=r,i}var Gw=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];const jw={init:Fw,forward:Ow,inverse:Nw,names:Gw};function Bw(){}function Tm(i){return i}var Uw=["longlat","identity"],Vw=[jw,{init:Bw,forward:Tm,inverse:Tm,names:Uw}],Za={},Ha=[];function zm(i,t){var e=Ha.length;return i.names?(Ha[e]=i,i.names.forEach(function(n){Za[n.toLowerCase()]=e}),this):(console.log(t),!0)}function qw(i){if(!i)return!1;var t=i.toLowerCase();if(typeof Za[t]<"u"&&Ha[Za[t]])return Ha[Za[t]]}function Xw(){Vw.forEach(zm)}const $w={start:Xw,add:zm,get:qw};var rt={};rt.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},rt.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},rt.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},rt.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},rt.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},rt.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},rt.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},rt.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},rt.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},rt.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},rt.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},rt.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},rt.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},rt.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},rt.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},rt.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},rt.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},rt.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},rt.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},rt.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},rt.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},rt.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},rt.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},rt.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},rt.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},rt.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},rt.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},rt.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},rt.hough={a:6378270,rf:297,ellipseName:"Hough"},rt.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},rt.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},rt.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},rt.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},rt.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},rt.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},rt.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},rt.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},rt.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},rt.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},rt.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},rt.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var Ww=rt.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};rt.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function Yw(i,t,e,n){var r=i*i,o=t*t,s=(r-o)/r,a=0;n?(i*=1-s*(pw+s*(vw+s*_w)),r=i*i,s=0):a=Math.sqrt(s);var l=(r-o)/o;return{es:s,e:a,ep2:l}}function Kw(i,t,e,n,r){if(!i){var o=En(rt,n);o||(o=Ww),i=o.a,t=o.b,e=o.rf}return e&&!t&&(t=(1-1/e)*i),(e===0||Math.abs(i-t)<B)&&(r=!0,t=i),{a:i,b:t,rf:e,sphere:r}}var se={};se.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},se.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},se.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},se.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},se.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},se.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},se.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},se.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},se.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},se.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},se.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},se.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},se.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},se.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},se.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},se.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},se.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function Zw(i,t,e,n,r,o,s){var a={};return i===void 0||i==="none"?a.datum_type=Ku:a.datum_type=gw,t&&(a.datum_params=t.map(parseFloat),(a.datum_params[0]!==0||a.datum_params[1]!==0||a.datum_params[2]!==0)&&(a.datum_type=hr),a.datum_params.length>3&&(a.datum_params[3]!==0||a.datum_params[4]!==0||a.datum_params[5]!==0||a.datum_params[6]!==0)&&(a.datum_type=ur,a.datum_params[3]*=os,a.datum_params[4]*=os,a.datum_params[5]*=os,a.datum_params[6]=a.datum_params[6]/1e6+1)),s&&(a.datum_type=Wa,a.grids=s),a.a=e,a.b=n,a.es=r,a.ep2=o,a}var Rm={};function Hw(i,t){var e=new DataView(t),n=t2(e),r=e2(e,n);r.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var o=i2(e,r,n),s={header:r,subgrids:o};return Rm[i]=s,s}function Jw(i){if(i===void 0)return null;var t=i.split(",");return t.map(Qw)}function Qw(i){if(i.length===0)return null;var t=i[0]==="@";return t&&(i=i.slice(1)),i==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:i,mandatory:!t,grid:Rm[i]||null,isNull:!1}}function Hr(i){return i/3600*Math.PI/180}function t2(i){var t=i.getInt32(8,!1);return t===11?!1:(t=i.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function e2(i,t){return{nFields:i.getInt32(8,t),nSubgridFields:i.getInt32(24,t),nSubgrids:i.getInt32(40,t),shiftType:Ju(i,56,56+8).trim(),fromSemiMajorAxis:i.getFloat64(120,t),fromSemiMinorAxis:i.getFloat64(136,t),toSemiMajorAxis:i.getFloat64(152,t),toSemiMinorAxis:i.getFloat64(168,t)}}function Ju(i,t,e){return String.fromCharCode.apply(null,new Uint8Array(i.buffer.slice(t,e)))}function i2(i,t,e){for(var n=176,r=[],o=0;o<t.nSubgrids;o++){var s=r2(i,n,e),a=o2(i,n,s,e),l=Math.round(1+(s.upperLongitude-s.lowerLongitude)/s.longitudeInterval),h=Math.round(1+(s.upperLatitude-s.lowerLatitude)/s.latitudeInterval);r.push({ll:[Hr(s.lowerLongitude),Hr(s.lowerLatitude)],del:[Hr(s.longitudeInterval),Hr(s.latitudeInterval)],lim:[l,h],count:s.gridNodeCount,cvs:n2(a)})}return r}function n2(i){return i.map(function(t){return[Hr(t.longitudeShift),Hr(t.latitudeShift)]})}function r2(i,t,e){return{name:Ju(i,t+8,t+16).trim(),parent:Ju(i,t+24,t+24+8).trim(),lowerLatitude:i.getFloat64(t+72,e),upperLatitude:i.getFloat64(t+88,e),lowerLongitude:i.getFloat64(t+104,e),upperLongitude:i.getFloat64(t+120,e),latitudeInterval:i.getFloat64(t+136,e),longitudeInterval:i.getFloat64(t+152,e),gridNodeCount:i.getInt32(t+168,e)}}function o2(i,t,e,n){for(var r=t+176,o=16,s=[],a=0;a<e.gridNodeCount;a++){var l={latitudeShift:i.getFloat32(r+a*o,n),longitudeShift:i.getFloat32(r+a*o+4,n),latitudeAccuracy:i.getFloat32(r+a*o+8,n),longitudeAccuracy:i.getFloat32(r+a*o+12,n)};s.push(l)}return s}function yi(i,t){if(!(this instanceof yi))return new yi(i);t=t||function(h){if(h)throw h};var e=Lw(i);if(typeof e!="object"){t(i);return}var n=yi.projections.get(e.projName);if(!n){t(i);return}if(e.datumCode&&e.datumCode!=="none"){var r=En(se,e.datumCode);r&&(e.datum_params=e.datum_params||(r.towgs84?r.towgs84.split(","):null),e.ellps=r.ellipse,e.datumName=r.datumName?r.datumName:e.datumCode)}e.k0=e.k0||1,e.axis=e.axis||"enu",e.ellps=e.ellps||"wgs84",e.lat1=e.lat1||e.lat0;var o=Kw(e.a,e.b,e.rf,e.ellps,e.sphere),s=Yw(o.a,o.b,o.rf,e.R_A),a=Jw(e.nadgrids),l=e.datum||Zw(e.datumCode,e.datum_params,o.a,o.b,s.es,s.ep2,a);Sm(this,e),Sm(this,n),this.a=o.a,this.b=o.b,this.rf=o.rf,this.sphere=o.sphere,this.es=s.es,this.e=s.e,this.ep2=s.ep2,this.datum=l,this.init(),t(null,this)}yi.projections=$w,yi.projections.start();function s2(i,t){return i.datum_type!==t.datum_type||i.a!==t.a||Math.abs(i.es-t.es)>5e-11?!1:i.datum_type===hr?i.datum_params[0]===t.datum_params[0]&&i.datum_params[1]===t.datum_params[1]&&i.datum_params[2]===t.datum_params[2]:i.datum_type===ur?i.datum_params[0]===t.datum_params[0]&&i.datum_params[1]===t.datum_params[1]&&i.datum_params[2]===t.datum_params[2]&&i.datum_params[3]===t.datum_params[3]&&i.datum_params[4]===t.datum_params[4]&&i.datum_params[5]===t.datum_params[5]&&i.datum_params[6]===t.datum_params[6]:!0}function Im(i,t,e){var n=i.x,r=i.y,o=i.z?i.z:0,s,a,l,h;if(r<-I&&r>-1.001*I)r=-I;else if(r>I&&r<1.001*I)r=I;else{if(r<-I)return{x:-1/0,y:-1/0,z:i.z};if(r>I)return{x:1/0,y:1/0,z:i.z}}return n>Math.PI&&(n-=2*Math.PI),a=Math.sin(r),h=Math.cos(r),l=a*a,s=e/Math.sqrt(1-t*l),{x:(s+o)*h*Math.cos(n),y:(s+o)*h*Math.sin(n),z:(s*(1-t)+o)*a}}function Pm(i,t,e,n){var r=1e-12,o=r*r,s=30,a,l,h,u,d,c,f,g,m,p,_,v,y,x=i.x,k=i.y,w=i.z?i.z:0,C,M,S;if(a=Math.sqrt(x*x+k*k),l=Math.sqrt(x*x+k*k+w*w),a/e<r){if(C=0,l/e<r)return M=I,S=-n,{x:i.x,y:i.y,z:i.z}}else C=Math.atan2(k,x);h=w/l,u=a/l,d=1/Math.sqrt(1-t*(2-t)*u*u),g=u*(1-t)*d,m=h*d,y=0;do y++,f=e/Math.sqrt(1-t*m*m),S=a*g+w*m-f*(1-t*m*m),c=t*f/(f+S),d=1/Math.sqrt(1-c*(2-c)*u*u),p=u*(1-c)*d,_=h*d,v=_*g-p*m,g=p,m=_;while(v*v>o&&y<s);return M=Math.atan(_/Math.abs(p)),{x:C,y:M,z:S}}function a2(i,t,e){if(t===hr)return{x:i.x+e[0],y:i.y+e[1],z:i.z+e[2]};if(t===ur){var n=e[0],r=e[1],o=e[2],s=e[3],a=e[4],l=e[5],h=e[6];return{x:h*(i.x-l*i.y+a*i.z)+n,y:h*(l*i.x+i.y-s*i.z)+r,z:h*(-a*i.x+s*i.y+i.z)+o}}}function l2(i,t,e){if(t===hr)return{x:i.x-e[0],y:i.y-e[1],z:i.z-e[2]};if(t===ur){var n=e[0],r=e[1],o=e[2],s=e[3],a=e[4],l=e[5],h=e[6],u=(i.x-n)/h,d=(i.y-r)/h,c=(i.z-o)/h;return{x:u+l*d-a*c,y:-l*u+d+s*c,z:a*u-s*d+c}}}function Ja(i){return i===hr||i===ur}function h2(i,t,e){if(s2(i,t)||i.datum_type===Ku||t.datum_type===Ku)return e;var n=i.a,r=i.es;if(i.datum_type===Wa){var o=Am(i,!1,e);if(o!==0)return;n=_m,r=ym}var s=t.a,a=t.b,l=t.es;if(t.datum_type===Wa&&(s=_m,a=mw,l=ym),r===l&&n===s&&!Ja(i.datum_type)&&!Ja(t.datum_type))return e;if(e=Im(e,r,n),Ja(i.datum_type)&&(e=a2(e,i.datum_type,i.datum_params)),Ja(t.datum_type)&&(e=l2(e,t.datum_type,t.datum_params)),e=Pm(e,l,s,a),t.datum_type===Wa){var h=Am(t,!0,e);if(h!==0)return}return e}function Am(i,t,e){if(i.grids===null||i.grids.length===0)return console.log("Grid shift grids not found"),-1;for(var n={x:-e.x,y:e.y},r={x:Number.NaN,y:Number.NaN},o=[],s=0;s<i.grids.length;s++){var a=i.grids[s];if(o.push(a.name),a.isNull){r=n;break}if(a.mandatory,a.grid===null){if(a.mandatory)return console.log("Unable to find mandatory grid '"+a.name+"'"),-1;continue}var l=a.grid.subgrids[0],h=(Math.abs(l.del[1])+Math.abs(l.del[0]))/1e4,u=l.ll[0]-h,d=l.ll[1]-h,c=l.ll[0]+(l.lim[0]-1)*l.del[0]+h,f=l.ll[1]+(l.lim[1]-1)*l.del[1]+h;if(!(d>n.y||u>n.x||f<n.y||c<n.x)&&(r=u2(n,t,l),!isNaN(r.x)))break}return isNaN(r.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*vi+" "+n.y*vi+" tried: '"+o+"'"),-1):(e.x=-r.x,e.y=r.y,0)}function u2(i,t,e){var n={x:Number.NaN,y:Number.NaN};if(isNaN(i.x))return n;var r={x:i.x,y:i.y};r.x-=e.ll[0],r.y-=e.ll[1],r.x=X(r.x-Math.PI)+Math.PI;var o=Dm(r,e);if(t){if(isNaN(o.x))return n;o.x=r.x-o.x,o.y=r.y-o.y;var s=9,a=1e-12,l,h;do{if(h=Dm(o,e),isNaN(h.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}l={x:r.x-(h.x+o.x),y:r.y-(h.y+o.y)},o.x+=l.x,o.y+=l.y}while(s--&&Math.abs(l.x)>a&&Math.abs(l.y)>a);if(s<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=X(o.x+e.ll[0]),n.y=o.y+e.ll[1]}else isNaN(o.x)||(n.x=i.x+o.x,n.y=i.y+o.y);return n}function Dm(i,t){var e={x:i.x/t.del[0],y:i.y/t.del[1]},n={x:Math.floor(e.x),y:Math.floor(e.y)},r={x:e.x-1*n.x,y:e.y-1*n.y},o={x:Number.NaN,y:Number.NaN},s;if(n.x<0||n.x>=t.lim[0]||n.y<0||n.y>=t.lim[1])return o;s=n.y*t.lim[0]+n.x;var a={x:t.cvs[s][0],y:t.cvs[s][1]};s++;var l={x:t.cvs[s][0],y:t.cvs[s][1]};s+=t.lim[0];var h={x:t.cvs[s][0],y:t.cvs[s][1]};s--;var u={x:t.cvs[s][0],y:t.cvs[s][1]},d=r.x*r.y,c=r.x*(1-r.y),f=(1-r.x)*(1-r.y),g=(1-r.x)*r.y;return o.x=f*a.x+c*l.x+g*u.x+d*h.x,o.y=f*a.y+c*l.y+g*u.y+d*h.y,o}function Lm(i,t,e){var n=e.x,r=e.y,o=e.z||0,s,a,l,h={};for(l=0;l<3;l++)if(!(t&&l===2&&e.z===void 0))switch(l===0?(s=n,"ew".indexOf(i.axis[l])!==-1?a="x":a="y"):l===1?(s=r,"ns".indexOf(i.axis[l])!==-1?a="y":a="x"):(s=o,a="z"),i.axis[l]){case"e":h[a]=s;break;case"w":h[a]=-s;break;case"n":h[a]=s;break;case"s":h[a]=-s;break;case"u":e[a]!==void 0&&(h.z=s);break;case"d":e[a]!==void 0&&(h.z=-s);break;default:return null}return h}function Fm(i){var t={x:i[0],y:i[1]};return i.length>2&&(t.z=i[2]),i.length>3&&(t.m=i[3]),t}function d2(i){Om(i.x),Om(i.y)}function Om(i){if(typeof Number.isFinite=="function"){if(Number.isFinite(i))return;throw new TypeError("coordinates must be finite numbers")}if(typeof i!="number"||i!==i||!isFinite(i))throw new TypeError("coordinates must be finite numbers")}function c2(i,t){return(i.datum.datum_type===hr||i.datum.datum_type===ur)&&t.datumCode!=="WGS84"||(t.datum.datum_type===hr||t.datum.datum_type===ur)&&i.datumCode!=="WGS84"}function Qa(i,t,e,n){var r;if(Array.isArray(e)&&(e=Fm(e)),d2(e),i.datum&&t.datum&&c2(i,t)&&(r=new yi("WGS84"),e=Qa(i,r,e,n),i=r),n&&i.axis!=="enu"&&(e=Lm(i,!1,e)),i.projName==="longlat")e={x:e.x*he,y:e.y*he,z:e.z||0};else if(i.to_meter&&(e={x:e.x*i.to_meter,y:e.y*i.to_meter,z:e.z||0}),e=i.inverse(e),!e)return;if(i.from_greenwich&&(e.x+=i.from_greenwich),e=h2(i.datum,t.datum,e),!!e)return t.from_greenwich&&(e={x:e.x-t.from_greenwich,y:e.y,z:e.z||0}),t.projName==="longlat"?e={x:e.x*vi,y:e.y*vi,z:e.z||0}:(e=t.forward(e),t.to_meter&&(e={x:e.x/t.to_meter,y:e.y/t.to_meter,z:e.z||0})),n&&t.axis!=="enu"?Lm(t,!0,e):e}var Nm=yi("WGS84");function Qu(i,t,e,n){var r,o,s;return Array.isArray(e)?(r=Qa(i,t,e,n)||{x:NaN,y:NaN},e.length>2?typeof i.name<"u"&&i.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"?typeof r.z=="number"?[r.x,r.y,r.z].concat(e.splice(3)):[r.x,r.y,e[2]].concat(e.splice(3)):[r.x,r.y].concat(e.splice(2)):[r.x,r.y]):(o=Qa(i,t,e,n),s=Object.keys(e),s.length===2||s.forEach(function(a){if(typeof i.name<"u"&&i.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"){if(a==="x"||a==="y"||a==="z")return}else if(a==="x"||a==="y")return;o[a]=e[a]}),o)}function Gm(i){return i instanceof yi?i:i.oProj?i.oProj:yi(i)}function Le(i,t,e){i=Gm(i);var n=!1,r;return typeof t>"u"?(t=i,i=Nm,n=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,t=i,i=Nm,n=!0),t=Gm(t),e?Qu(i,t,e):(r={forward:function(o,s){return Qu(i,t,o,s)},inverse:function(o,s){return Qu(t,i,o,s)}},n&&(r.oProj=t),r)}var jm=6,Bm="AJSAJS",Um="AFAFAF",Jr=65,Fe=73,Je=79,us=86,ds=90;const f2={forward:Vm,inverse:g2,toPoint:qm};function Vm(i,t){return t=t||5,v2(m2({lat:i[1],lon:i[0]}),t)}function g2(i){var t=ed(Wm(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function qm(i){var t=ed(Wm(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function td(i){return i*(Math.PI/180)}function Xm(i){return 180*(i/Math.PI)}function m2(i){var t=i.lat,e=i.lon,n=6378137,r=.00669438,o=.9996,s,a,l,h,u,d,c,f=td(t),g=td(e),m,p;p=Math.floor((e+180)/6)+1,e===180&&(p=60),t>=56&&t<64&&e>=3&&e<12&&(p=32),t>=72&&t<84&&(e>=0&&e<9?p=31:e>=9&&e<21?p=33:e>=21&&e<33?p=35:e>=33&&e<42&&(p=37)),s=(p-1)*6-180+3,m=td(s),a=r/(1-r),l=n/Math.sqrt(1-r*Math.sin(f)*Math.sin(f)),h=Math.tan(f)*Math.tan(f),u=a*Math.cos(f)*Math.cos(f),d=Math.cos(f)*(g-m),c=n*((1-r/4-3*r*r/64-5*r*r*r/256)*f-(3*r/8+3*r*r/32+45*r*r*r/1024)*Math.sin(2*f)+(15*r*r/256+45*r*r*r/1024)*Math.sin(4*f)-35*r*r*r/3072*Math.sin(6*f));var _=o*l*(d+(1-h+u)*d*d*d/6+(5-18*h+h*h+72*u-58*a)*d*d*d*d*d/120)+5e5,v=o*(c+l*Math.tan(f)*(d*d/2+(5-h+9*u+4*u*u)*d*d*d*d/24+(61-58*h+h*h+600*u-330*a)*d*d*d*d*d*d/720));return t<0&&(v+=1e7),{northing:Math.round(v),easting:Math.round(_),zoneNumber:p,zoneLetter:p2(t)}}function ed(i){var t=i.northing,e=i.easting,n=i.zoneLetter,r=i.zoneNumber;if(r<0||r>60)return null;var o=.9996,s=6378137,a=.00669438,l,h=(1-Math.sqrt(1-a))/(1+Math.sqrt(1-a)),u,d,c,f,g,m,p,_,v,y=e-5e5,x=t;n<"N"&&(x-=1e7),p=(r-1)*6-180+3,l=a/(1-a),m=x/o,_=m/(s*(1-a/4-3*a*a/64-5*a*a*a/256)),v=_+(3*h/2-27*h*h*h/32)*Math.sin(2*_)+(21*h*h/16-55*h*h*h*h/32)*Math.sin(4*_)+151*h*h*h/96*Math.sin(6*_),u=s/Math.sqrt(1-a*Math.sin(v)*Math.sin(v)),d=Math.tan(v)*Math.tan(v),c=l*Math.cos(v)*Math.cos(v),f=s*(1-a)/Math.pow(1-a*Math.sin(v)*Math.sin(v),1.5),g=y/(u*o);var k=v-u*Math.tan(v)/f*(g*g/2-(5+3*d+10*c-4*c*c-9*l)*g*g*g*g/24+(61+90*d+298*c+45*d*d-252*l-3*c*c)*g*g*g*g*g*g/720);k=Xm(k);var w=(g-(1+2*d+c)*g*g*g/6+(5-2*c+28*d-3*c*c+8*l+24*d*d)*g*g*g*g*g/120)/Math.cos(v);w=p+Xm(w);var C;if(i.accuracy){var M=ed({northing:i.northing+i.accuracy,easting:i.easting+i.accuracy,zoneLetter:i.zoneLetter,zoneNumber:i.zoneNumber});C={top:M.lat,right:M.lon,bottom:k,left:w}}else C={lat:k,lon:w};return C}function p2(i){var t="Z";return 84>=i&&i>=72?t="X":72>i&&i>=64?t="W":64>i&&i>=56?t="V":56>i&&i>=48?t="U":48>i&&i>=40?t="T":40>i&&i>=32?t="S":32>i&&i>=24?t="R":24>i&&i>=16?t="Q":16>i&&i>=8?t="P":8>i&&i>=0?t="N":0>i&&i>=-8?t="M":-8>i&&i>=-16?t="L":-16>i&&i>=-24?t="K":-24>i&&i>=-32?t="J":-32>i&&i>=-40?t="H":-40>i&&i>=-48?t="G":-48>i&&i>=-56?t="F":-56>i&&i>=-64?t="E":-64>i&&i>=-72?t="D":-72>i&&i>=-80&&(t="C"),t}function v2(i,t){var e="00000"+i.easting,n="00000"+i.northing;return i.zoneNumber+i.zoneLetter+_2(i.easting,i.northing,i.zoneNumber)+e.substr(e.length-5,t)+n.substr(n.length-5,t)}function _2(i,t,e){var n=$m(e),r=Math.floor(i/1e5),o=Math.floor(t/1e5)%20;return y2(r,o,n)}function $m(i){var t=i%jm;return t===0&&(t=jm),t}function y2(i,t,e){var n=e-1,r=Bm.charCodeAt(n),o=Um.charCodeAt(n),s=r+i-1,a=o+t,l=!1;s>ds&&(s=s-ds+Jr-1,l=!0),(s===Fe||r<Fe&&s>Fe||(s>Fe||r<Fe)&&l)&&s++,(s===Je||r<Je&&s>Je||(s>Je||r<Je)&&l)&&(s++,s===Fe&&s++),s>ds&&(s=s-ds+Jr-1),a>us?(a=a-us+Jr-1,l=!0):l=!1,(a===Fe||o<Fe&&a>Fe||(a>Fe||o<Fe)&&l)&&a++,(a===Je||o<Je&&a>Je||(a>Je||o<Je)&&l)&&(a++,a===Fe&&a++),a>us&&(a=a-us+Jr-1);var h=String.fromCharCode(s)+String.fromCharCode(a);return h}function Wm(i){if(i&&i.length===0)throw"MGRSPoint coverting from nothing";for(var t=i.length,e=null,n="",r,o=0;!/[A-Z]/.test(r=i.charAt(o));){if(o>=2)throw"MGRSPoint bad conversion from: "+i;n+=r,o++}var s=parseInt(n,10);if(o===0||o+3>t)throw"MGRSPoint bad conversion from: "+i;var a=i.charAt(o++);if(a<="A"||a==="B"||a==="Y"||a>="Z"||a==="I"||a==="O")throw"MGRSPoint zone letter "+a+" not handled: "+i;e=i.substring(o,o+=2);for(var l=$m(s),h=x2(e.charAt(0),l),u=b2(e.charAt(1),l);u<k2(a);)u+=2e6;var d=t-o;if(d%2!==0)throw`MGRSPoint has to have an even number
79
+ `;fetch(sw({key:t,service:"WFS",request:"GetFeature",version:"2.0.0",typeNames:"Topography_TopographicArea",propertyName:"TOID,DescriptiveGroup,SHAPE",outputFormat:"GEOJSON",srsName:"urn:ogc:def:crs:EPSG::4326",filter:n,count:1})).then(o=>o.json()).then(o=>{if(!o.features.length)return;const s=o.features[0].properties,a=["TOID","DescriptiveGroup"];Object.keys(s).forEach(u=>a.includes(u)||delete s[u]);const l=new Zn,h=l.readFeatures(o,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"});e?h.forEach(u=>{const d=u.getProperties().TOID,c=Yr.getFeatureById(d);c?Yr.removeFeature(c):(u.setId(d),Yr.addFeature(u))}):(Yr.clear(),h.forEach(u=>{const d=u.getProperties().TOID;u.setId(d),Yr.addFeature(u)})),pi.clear(),pi.addFeature(l.readFeature(Yr.getFeatures().reduce((u,d)=>{const c=l.writeFeatureObject(d).geometry;return u?nw(u,c):c},null)))}).catch(o=>console.log(o))}function sw(i){const t=Object.keys(i).map(e=>e+"="+encodeURI(i[e])).join("&");return`${rw}?${t}`}const aw="https://api.os.uk/maps/raster/v1/zxy/Light_3857/{z}/{x}/{y}.png?key=",lw="https://api.os.uk/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf?srs=3857&key=",hw="https://api.os.uk/maps/vector/v1/vts/resources/styles?srs=3857&key=";function uw(i,t){return new Ux({source:t?new $g({url:aw+t,attributions:[i],attributionsCollapsible:!1,maxZoom:20}):new bk({attributions:[Wg]})})}function dw(i,t){let e=new xx({declutter:!0,source:new Dx({format:new O1,url:lw+t,attributions:[i],attributionsCollapsible:!1})});return t&&fetch(hw+t).then(n=>n.json()).then(n=>_k(e,n,"esri")).catch(n=>console.log(n)),e}function cw(i){const t=Object.keys(i.defs),e=t.length;let n,r;for(n=0;n<e;++n){const o=t[n];if(!Gt(o)){const s=i.defs(o);let a=s.units;!a&&s.projName==="longlat"&&(a="degrees"),dc(new Os({code:o,axisOrientation:s.axis,metersPerUnit:s.to_meter,units:a}))}}for(n=0;n<e;++n){const o=t[n],s=Gt(o);for(r=0;r<e;++r){const a=t[r],l=Gt(a);if(!tc(o,a))if(i.defs[o]===i.defs[a])Bl([s,l]);else{const h=i(o,a);N0(s,l,fc(s,l,h.forward),fc(l,s,h.inverse))}}}}function fw(i){i("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),i("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),i("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),i.WGS84=i["EPSG:4326"],i["EPSG:3785"]=i["EPSG:3857"],i.GOOGLE=i["EPSG:3857"],i["EPSG:900913"]=i["EPSG:3857"],i["EPSG:102113"]=i["EPSG:3857"]}var hr=1,ur=2,Wa=3,gw=4,Ku=5,vm=6378137,mw=6356752314e-3,_m=.0066943799901413165,rs=484813681109536e-20,R=Math.PI/2,pw=.16666666666666666,vw=.04722222222222222,_w=.022156084656084655,B=1e-10,he=.017453292519943295,vi=57.29577951308232,Rt=Math.PI/4,os=Math.PI*2,Zt=3.14159265359,De={};De.greenwich=0,De.lisbon=-9.131906111111,De.paris=2.337229166667,De.bogota=-74.080916666667,De.madrid=-3.687938888889,De.rome=12.452333333333,De.bern=7.439583333333,De.jakarta=106.807719444444,De.ferro=-17.666666666667,De.brussels=4.367975,De.stockholm=18.058277777778,De.athens=23.7163375,De.oslo=10.722916666667;const yw={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var ym=/[\s_\-\/\(\)]/g;function Mn(i,t){if(i[t])return i[t];for(var e=Object.keys(i),n=t.toLowerCase().replace(ym,""),r=-1,o,s;++r<e.length;)if(o=e[r],s=o.toLowerCase().replace(ym,""),s===n)return i[o]}function Zu(i){var t={},e=i.split("+").map(function(a){return a.trim()}).filter(function(a){return a}).reduce(function(a,l){var h=l.split("=");return h.push(!0),a[h[0].toLowerCase()]=h[1],a},{}),n,r,o,s={proj:"projName",datum:"datumCode",rf:function(a){t.rf=parseFloat(a)},lat_0:function(a){t.lat0=a*he},lat_1:function(a){t.lat1=a*he},lat_2:function(a){t.lat2=a*he},lat_ts:function(a){t.lat_ts=a*he},lon_0:function(a){t.long0=a*he},lon_1:function(a){t.long1=a*he},lon_2:function(a){t.long2=a*he},alpha:function(a){t.alpha=parseFloat(a)*he},gamma:function(a){t.rectified_grid_angle=parseFloat(a)},lonc:function(a){t.longc=a*he},x_0:function(a){t.x0=parseFloat(a)},y_0:function(a){t.y0=parseFloat(a)},k_0:function(a){t.k0=parseFloat(a)},k:function(a){t.k0=parseFloat(a)},a:function(a){t.a=parseFloat(a)},b:function(a){t.b=parseFloat(a)},r_a:function(){t.R_A=!0},zone:function(a){t.zone=parseInt(a,10)},south:function(){t.utmSouth=!0},towgs84:function(a){t.datum_params=a.split(",").map(function(l){return parseFloat(l)})},to_meter:function(a){t.to_meter=parseFloat(a)},units:function(a){t.units=a;var l=Mn(yw,a);l&&(t.to_meter=l.to_meter)},from_greenwich:function(a){t.from_greenwich=a*he},pm:function(a){var l=Mn(De,a);t.from_greenwich=(l||parseFloat(a))*he},nadgrids:function(a){a==="@null"?t.datumCode="none":t.nadgrids=a},axis:function(a){var l="ewnsud";a.length===3&&l.indexOf(a.substr(0,1))!==-1&&l.indexOf(a.substr(1,1))!==-1&&l.indexOf(a.substr(2,1))!==-1&&(t.axis=a)},approx:function(){t.approx=!0}};for(n in e)r=e[n],n in s?(o=s[n],typeof o=="function"?o(r):t[o]=r):t[n]=r;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t}var ss=1,xm=2,bm=3,Ya=4,km=5,Hu=-1,xw=/\s/,bw=/[A-Za-z]/,kw=/[A-Za-z84_]/,Ka=/[,\]]/,wm=/[\d\.E\-\+]/;function Fi(i){if(typeof i!="string")throw new Error("not a string");this.text=i.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=ss}Fi.prototype.readCharicter=function(){var i=this.text[this.place++];if(this.state!==Ya)for(;xw.test(i);){if(this.place>=this.text.length)return;i=this.text[this.place++]}switch(this.state){case ss:return this.neutral(i);case xm:return this.keyword(i);case Ya:return this.quoted(i);case km:return this.afterquote(i);case bm:return this.number(i);case Hu:return}},Fi.prototype.afterquote=function(i){if(i==='"'){this.word+='"',this.state=Ya;return}if(Ka.test(i)){this.word=this.word.trim(),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in afterquote yet, index '+this.place)},Fi.prototype.afterItem=function(i){if(i===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=ss;return}if(i==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=ss,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Hu);return}},Fi.prototype.number=function(i){if(wm.test(i)){this.word+=i;return}if(Ka.test(i)){this.word=parseFloat(this.word),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in number yet, index '+this.place)},Fi.prototype.quoted=function(i){if(i==='"'){this.state=km;return}this.word+=i},Fi.prototype.keyword=function(i){if(kw.test(i)){this.word+=i;return}if(i==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=ss;return}if(Ka.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in keyword yet, index '+this.place)},Fi.prototype.neutral=function(i){if(bw.test(i)){this.word=i,this.state=xm;return}if(i==='"'){this.word="",this.state=Ya;return}if(wm.test(i)){this.word=i,this.state=bm;return}if(Ka.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in neutral yet, index '+this.place)},Fi.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Hu)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function ww(i){var t=new Fi(i);return t.output()}function Em(i,t,e){Array.isArray(t)&&(e.unshift(t),t=null);var n=t?{}:i,r=e.reduce(function(o,s){return Kr(s,o),o},n);t&&(i[t]=r)}function Kr(i,t){if(!Array.isArray(i)){t[i]=!0;return}var e=i.shift();if(e==="PARAMETER"&&(e=i.shift()),i.length===1){if(Array.isArray(i[0])){t[e]={},Kr(i[0],t[e]);return}t[e]=i[0];return}if(!i.length){t[e]=!0;return}if(e==="TOWGS84"){t[e]=i;return}if(e==="AXIS"){e in t||(t[e]=[]),t[e].push(i);return}Array.isArray(e)||(t[e]={});var n;switch(e){case"UNIT":case"PRIMEM":case"VERT_DATUM":t[e]={name:i[0].toLowerCase(),convert:i[1]},i.length===3&&Kr(i[2],t[e]);return;case"SPHEROID":case"ELLIPSOID":t[e]={name:i[0],a:i[1],rf:i[2]},i.length===4&&Kr(i[3],t[e]);return;case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":i[0]=["name",i[0]],Em(t,e,i);return;default:for(n=-1;++n<i.length;)if(!Array.isArray(i[n]))return Kr(i,t[e]);return Em(t,e,i)}}var Ew=.017453292519943295;function Mw(i,t){var e=t[0],n=t[1];!(e in i)&&n in i&&(i[e]=i[n],t.length===3&&(i[e]=t[2](i[e])))}function Oi(i){return i*Ew}function Cw(i){if(i.type==="GEOGCS"?i.projName="longlat":i.type==="LOCAL_CS"?(i.projName="identity",i.local=!0):typeof i.PROJECTION=="object"?i.projName=Object.keys(i.PROJECTION)[0]:i.projName=i.PROJECTION,i.AXIS){for(var t="",e=0,n=i.AXIS.length;e<n;++e){var r=[i.AXIS[e][0].toLowerCase(),i.AXIS[e][1].toLowerCase()];r[0].indexOf("north")!==-1||(r[0]==="y"||r[0]==="lat")&&r[1]==="north"?t+="n":r[0].indexOf("south")!==-1||(r[0]==="y"||r[0]==="lat")&&r[1]==="south"?t+="s":r[0].indexOf("east")!==-1||(r[0]==="x"||r[0]==="lon")&&r[1]==="east"?t+="e":(r[0].indexOf("west")!==-1||(r[0]==="x"||r[0]==="lon")&&r[1]==="west")&&(t+="w")}t.length===2&&(t+="u"),t.length===3&&(i.axis=t)}i.UNIT&&(i.units=i.UNIT.name.toLowerCase(),i.units==="metre"&&(i.units="meter"),i.UNIT.convert&&(i.type==="GEOGCS"?i.DATUM&&i.DATUM.SPHEROID&&(i.to_meter=i.UNIT.convert*i.DATUM.SPHEROID.a):i.to_meter=i.UNIT.convert));var o=i.GEOGCS;i.type==="GEOGCS"&&(o=i),o&&(o.DATUM?i.datumCode=o.DATUM.name.toLowerCase():i.datumCode=o.name.toLowerCase(),i.datumCode.slice(0,2)==="d_"&&(i.datumCode=i.datumCode.slice(2)),(i.datumCode==="new_zealand_geodetic_datum_1949"||i.datumCode==="new_zealand_1949")&&(i.datumCode="nzgd49"),(i.datumCode==="wgs_1984"||i.datumCode==="world_geodetic_system_1984")&&(i.PROJECTION==="Mercator_Auxiliary_Sphere"&&(i.sphere=!0),i.datumCode="wgs84"),i.datumCode.slice(-6)==="_ferro"&&(i.datumCode=i.datumCode.slice(0,-6)),i.datumCode.slice(-8)==="_jakarta"&&(i.datumCode=i.datumCode.slice(0,-8)),~i.datumCode.indexOf("belge")&&(i.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(i.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),i.ellps.toLowerCase().slice(0,13)==="international"&&(i.ellps="intl"),i.a=o.DATUM.SPHEROID.a,i.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(i.datum_params=o.DATUM.TOWGS84),~i.datumCode.indexOf("osgb_1936")&&(i.datumCode="osgb36"),~i.datumCode.indexOf("osni_1952")&&(i.datumCode="osni52"),(~i.datumCode.indexOf("tm65")||~i.datumCode.indexOf("geodetic_datum_of_1965"))&&(i.datumCode="ire65"),i.datumCode==="ch1903+"&&(i.datumCode="ch1903"),~i.datumCode.indexOf("israel")&&(i.datumCode="isr93")),i.b&&!isFinite(i.b)&&(i.b=i.a);function s(h){var u=i.to_meter||1;return h*u}var a=function(h){return Mw(i,h)},l=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",Oi],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",Oi],["x0","false_easting",s],["y0","false_northing",s],["long0","central_meridian",Oi],["lat0","latitude_of_origin",Oi],["lat0","standard_parallel_1",Oi],["lat1","standard_parallel_1",Oi],["lat2","standard_parallel_2",Oi],["azimuth","Azimuth"],["alpha","azimuth",Oi],["srsCode","name"]];l.forEach(a),!i.long0&&i.longc&&(i.projName==="Albers_Conic_Equal_Area"||i.projName==="Lambert_Azimuthal_Equal_Area")&&(i.long0=i.longc),!i.lat_ts&&i.lat1&&(i.projName==="Stereographic_South_Pole"||i.projName==="Polar Stereographic (variant B)")&&(i.lat0=Oi(i.lat1>0?90:-90),i.lat_ts=i.lat1)}function Mm(i){var t=ww(i),e=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",e]);var r={};return Kr(t,r),Cw(r),r}function Se(i){var t=this;if(arguments.length===2){var e=arguments[1];typeof e=="string"?e.charAt(0)==="+"?Se[i]=Zu(arguments[1]):Se[i]=Mm(arguments[1]):Se[i]=e}else if(arguments.length===1){if(Array.isArray(i))return i.map(function(n){Array.isArray(n)?Se.apply(t,n):Se(n)});if(typeof i=="string"){if(i in Se)return Se[i]}else"EPSG"in i?Se["EPSG:"+i.EPSG]=i:"ESRI"in i?Se["ESRI:"+i.ESRI]=i:"IAU2000"in i?Se["IAU2000:"+i.IAU2000]=i:console.log(i);return}}fw(Se);function Sw(i){return typeof i=="string"}function Tw(i){return i in Se}var zw=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Iw(i){return zw.some(function(t){return i.indexOf(t)>-1})}var Rw=["3857","900913","3785","102113"];function Pw(i){var t=Mn(i,"authority");if(!!t){var e=Mn(t,"epsg");return e&&Rw.indexOf(e)>-1}}function Aw(i){var t=Mn(i,"extension");if(!!t)return Mn(t,"proj4")}function Dw(i){return i[0]==="+"}function Lw(i){if(Sw(i)){if(Tw(i))return Se[i];if(Iw(i)){var t=Mm(i);if(Pw(t))return Se["EPSG:3857"];var e=Aw(t);return e?Zu(e):t}if(Dw(i))return Zu(i)}else return i}function Cm(i,t){i=i||{};var e,n;if(!t)return i;for(n in t)e=t[n],e!==void 0&&(i[n]=e);return i}function _i(i,t,e){var n=i*t;return e/Math.sqrt(1-n*n)}function as(i){return i<0?-1:1}function X(i){return Math.abs(i)<=Zt?i:i-as(i)*os}function si(i,t,e){var n=i*e,r=.5*i;return n=Math.pow((1-n)/(1+n),r),Math.tan(.5*(R-t))/n}function ls(i,t){for(var e=.5*i,n,r,o=R-2*Math.atan(t),s=0;s<=15;s++)if(n=i*Math.sin(o),r=R-2*Math.atan(t*Math.pow((1-n)/(1+n),e))-o,o+=r,Math.abs(r)<=1e-10)return o;return-9999}function Fw(){var i=this.b/this.a;this.es=1-i*i,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=_i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function Ow(i){var t=i.x,e=i.y;if(e*vi>90&&e*vi<-90&&t*vi>180&&t*vi<-180)return null;var n,r;if(Math.abs(Math.abs(e)-R)<=B)return null;if(this.sphere)n=this.x0+this.a*this.k0*X(t-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(Rt+.5*e));else{var o=Math.sin(e),s=si(this.e,e,o);n=this.x0+this.a*this.k0*X(t-this.long0),r=this.y0-this.a*this.k0*Math.log(s)}return i.x=n,i.y=r,i}function Nw(i){var t=i.x-this.x0,e=i.y-this.y0,n,r;if(this.sphere)r=R-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var o=Math.exp(-e/(this.a*this.k0));if(r=ls(this.e,o),r===-9999)return null}return n=X(this.long0+t/(this.a*this.k0)),i.x=n,i.y=r,i}var Gw=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];const jw={init:Fw,forward:Ow,inverse:Nw,names:Gw};function Bw(){}function Sm(i){return i}var Uw=["longlat","identity"],Vw=[jw,{init:Bw,forward:Sm,inverse:Sm,names:Uw}],Za={},Ha=[];function Tm(i,t){var e=Ha.length;return i.names?(Ha[e]=i,i.names.forEach(function(n){Za[n.toLowerCase()]=e}),this):(console.log(t),!0)}function qw(i){if(!i)return!1;var t=i.toLowerCase();if(typeof Za[t]<"u"&&Ha[Za[t]])return Ha[Za[t]]}function Xw(){Vw.forEach(Tm)}const $w={start:Xw,add:Tm,get:qw};var rt={};rt.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},rt.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},rt.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},rt.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},rt.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},rt.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},rt.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},rt.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},rt.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},rt.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},rt.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},rt.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},rt.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},rt.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},rt.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},rt.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},rt.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},rt.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},rt.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},rt.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},rt.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},rt.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},rt.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},rt.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},rt.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},rt.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},rt.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},rt.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},rt.hough={a:6378270,rf:297,ellipseName:"Hough"},rt.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},rt.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},rt.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},rt.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},rt.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},rt.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},rt.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},rt.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},rt.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},rt.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},rt.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},rt.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var Ww=rt.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};rt.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function Yw(i,t,e,n){var r=i*i,o=t*t,s=(r-o)/r,a=0;n?(i*=1-s*(pw+s*(vw+s*_w)),r=i*i,s=0):a=Math.sqrt(s);var l=(r-o)/o;return{es:s,e:a,ep2:l}}function Kw(i,t,e,n,r){if(!i){var o=Mn(rt,n);o||(o=Ww),i=o.a,t=o.b,e=o.rf}return e&&!t&&(t=(1-1/e)*i),(e===0||Math.abs(i-t)<B)&&(r=!0,t=i),{a:i,b:t,rf:e,sphere:r}}var se={};se.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},se.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},se.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},se.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},se.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},se.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},se.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},se.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},se.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},se.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},se.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},se.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},se.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},se.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},se.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},se.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},se.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function Zw(i,t,e,n,r,o,s){var a={};return i===void 0||i==="none"?a.datum_type=Ku:a.datum_type=gw,t&&(a.datum_params=t.map(parseFloat),(a.datum_params[0]!==0||a.datum_params[1]!==0||a.datum_params[2]!==0)&&(a.datum_type=hr),a.datum_params.length>3&&(a.datum_params[3]!==0||a.datum_params[4]!==0||a.datum_params[5]!==0||a.datum_params[6]!==0)&&(a.datum_type=ur,a.datum_params[3]*=rs,a.datum_params[4]*=rs,a.datum_params[5]*=rs,a.datum_params[6]=a.datum_params[6]/1e6+1)),s&&(a.datum_type=Wa,a.grids=s),a.a=e,a.b=n,a.es=r,a.ep2=o,a}var zm={};function Hw(i,t){var e=new DataView(t),n=t2(e),r=e2(e,n);r.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var o=i2(e,r,n),s={header:r,subgrids:o};return zm[i]=s,s}function Jw(i){if(i===void 0)return null;var t=i.split(",");return t.map(Qw)}function Qw(i){if(i.length===0)return null;var t=i[0]==="@";return t&&(i=i.slice(1)),i==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:i,mandatory:!t,grid:zm[i]||null,isNull:!1}}function Zr(i){return i/3600*Math.PI/180}function t2(i){var t=i.getInt32(8,!1);return t===11?!1:(t=i.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function e2(i,t){return{nFields:i.getInt32(8,t),nSubgridFields:i.getInt32(24,t),nSubgrids:i.getInt32(40,t),shiftType:Ju(i,56,56+8).trim(),fromSemiMajorAxis:i.getFloat64(120,t),fromSemiMinorAxis:i.getFloat64(136,t),toSemiMajorAxis:i.getFloat64(152,t),toSemiMinorAxis:i.getFloat64(168,t)}}function Ju(i,t,e){return String.fromCharCode.apply(null,new Uint8Array(i.buffer.slice(t,e)))}function i2(i,t,e){for(var n=176,r=[],o=0;o<t.nSubgrids;o++){var s=r2(i,n,e),a=o2(i,n,s,e),l=Math.round(1+(s.upperLongitude-s.lowerLongitude)/s.longitudeInterval),h=Math.round(1+(s.upperLatitude-s.lowerLatitude)/s.latitudeInterval);r.push({ll:[Zr(s.lowerLongitude),Zr(s.lowerLatitude)],del:[Zr(s.longitudeInterval),Zr(s.latitudeInterval)],lim:[l,h],count:s.gridNodeCount,cvs:n2(a)})}return r}function n2(i){return i.map(function(t){return[Zr(t.longitudeShift),Zr(t.latitudeShift)]})}function r2(i,t,e){return{name:Ju(i,t+8,t+16).trim(),parent:Ju(i,t+24,t+24+8).trim(),lowerLatitude:i.getFloat64(t+72,e),upperLatitude:i.getFloat64(t+88,e),lowerLongitude:i.getFloat64(t+104,e),upperLongitude:i.getFloat64(t+120,e),latitudeInterval:i.getFloat64(t+136,e),longitudeInterval:i.getFloat64(t+152,e),gridNodeCount:i.getInt32(t+168,e)}}function o2(i,t,e,n){for(var r=t+176,o=16,s=[],a=0;a<e.gridNodeCount;a++){var l={latitudeShift:i.getFloat32(r+a*o,n),longitudeShift:i.getFloat32(r+a*o+4,n),latitudeAccuracy:i.getFloat32(r+a*o+8,n),longitudeAccuracy:i.getFloat32(r+a*o+12,n)};s.push(l)}return s}function yi(i,t){if(!(this instanceof yi))return new yi(i);t=t||function(h){if(h)throw h};var e=Lw(i);if(typeof e!="object"){t(i);return}var n=yi.projections.get(e.projName);if(!n){t(i);return}if(e.datumCode&&e.datumCode!=="none"){var r=Mn(se,e.datumCode);r&&(e.datum_params=e.datum_params||(r.towgs84?r.towgs84.split(","):null),e.ellps=r.ellipse,e.datumName=r.datumName?r.datumName:e.datumCode)}e.k0=e.k0||1,e.axis=e.axis||"enu",e.ellps=e.ellps||"wgs84",e.lat1=e.lat1||e.lat0;var o=Kw(e.a,e.b,e.rf,e.ellps,e.sphere),s=Yw(o.a,o.b,o.rf,e.R_A),a=Jw(e.nadgrids),l=e.datum||Zw(e.datumCode,e.datum_params,o.a,o.b,s.es,s.ep2,a);Cm(this,e),Cm(this,n),this.a=o.a,this.b=o.b,this.rf=o.rf,this.sphere=o.sphere,this.es=s.es,this.e=s.e,this.ep2=s.ep2,this.datum=l,this.init(),t(null,this)}yi.projections=$w,yi.projections.start();function s2(i,t){return i.datum_type!==t.datum_type||i.a!==t.a||Math.abs(i.es-t.es)>5e-11?!1:i.datum_type===hr?i.datum_params[0]===t.datum_params[0]&&i.datum_params[1]===t.datum_params[1]&&i.datum_params[2]===t.datum_params[2]:i.datum_type===ur?i.datum_params[0]===t.datum_params[0]&&i.datum_params[1]===t.datum_params[1]&&i.datum_params[2]===t.datum_params[2]&&i.datum_params[3]===t.datum_params[3]&&i.datum_params[4]===t.datum_params[4]&&i.datum_params[5]===t.datum_params[5]&&i.datum_params[6]===t.datum_params[6]:!0}function Im(i,t,e){var n=i.x,r=i.y,o=i.z?i.z:0,s,a,l,h;if(r<-R&&r>-1.001*R)r=-R;else if(r>R&&r<1.001*R)r=R;else{if(r<-R)return{x:-1/0,y:-1/0,z:i.z};if(r>R)return{x:1/0,y:1/0,z:i.z}}return n>Math.PI&&(n-=2*Math.PI),a=Math.sin(r),h=Math.cos(r),l=a*a,s=e/Math.sqrt(1-t*l),{x:(s+o)*h*Math.cos(n),y:(s+o)*h*Math.sin(n),z:(s*(1-t)+o)*a}}function Rm(i,t,e,n){var r=1e-12,o=r*r,s=30,a,l,h,u,d,c,f,g,m,p,_,v,y,x=i.x,k=i.y,w=i.z?i.z:0,M,E,S;if(a=Math.sqrt(x*x+k*k),l=Math.sqrt(x*x+k*k+w*w),a/e<r){if(M=0,l/e<r)return E=R,S=-n,{x:i.x,y:i.y,z:i.z}}else M=Math.atan2(k,x);h=w/l,u=a/l,d=1/Math.sqrt(1-t*(2-t)*u*u),g=u*(1-t)*d,m=h*d,y=0;do y++,f=e/Math.sqrt(1-t*m*m),S=a*g+w*m-f*(1-t*m*m),c=t*f/(f+S),d=1/Math.sqrt(1-c*(2-c)*u*u),p=u*(1-c)*d,_=h*d,v=_*g-p*m,g=p,m=_;while(v*v>o&&y<s);return E=Math.atan(_/Math.abs(p)),{x:M,y:E,z:S}}function a2(i,t,e){if(t===hr)return{x:i.x+e[0],y:i.y+e[1],z:i.z+e[2]};if(t===ur){var n=e[0],r=e[1],o=e[2],s=e[3],a=e[4],l=e[5],h=e[6];return{x:h*(i.x-l*i.y+a*i.z)+n,y:h*(l*i.x+i.y-s*i.z)+r,z:h*(-a*i.x+s*i.y+i.z)+o}}}function l2(i,t,e){if(t===hr)return{x:i.x-e[0],y:i.y-e[1],z:i.z-e[2]};if(t===ur){var n=e[0],r=e[1],o=e[2],s=e[3],a=e[4],l=e[5],h=e[6],u=(i.x-n)/h,d=(i.y-r)/h,c=(i.z-o)/h;return{x:u+l*d-a*c,y:-l*u+d+s*c,z:a*u-s*d+c}}}function Ja(i){return i===hr||i===ur}function h2(i,t,e){if(s2(i,t)||i.datum_type===Ku||t.datum_type===Ku)return e;var n=i.a,r=i.es;if(i.datum_type===Wa){var o=Pm(i,!1,e);if(o!==0)return;n=vm,r=_m}var s=t.a,a=t.b,l=t.es;if(t.datum_type===Wa&&(s=vm,a=mw,l=_m),r===l&&n===s&&!Ja(i.datum_type)&&!Ja(t.datum_type))return e;if(e=Im(e,r,n),Ja(i.datum_type)&&(e=a2(e,i.datum_type,i.datum_params)),Ja(t.datum_type)&&(e=l2(e,t.datum_type,t.datum_params)),e=Rm(e,l,s,a),t.datum_type===Wa){var h=Pm(t,!0,e);if(h!==0)return}return e}function Pm(i,t,e){if(i.grids===null||i.grids.length===0)return console.log("Grid shift grids not found"),-1;for(var n={x:-e.x,y:e.y},r={x:Number.NaN,y:Number.NaN},o=[],s=0;s<i.grids.length;s++){var a=i.grids[s];if(o.push(a.name),a.isNull){r=n;break}if(a.mandatory,a.grid===null){if(a.mandatory)return console.log("Unable to find mandatory grid '"+a.name+"'"),-1;continue}var l=a.grid.subgrids[0],h=(Math.abs(l.del[1])+Math.abs(l.del[0]))/1e4,u=l.ll[0]-h,d=l.ll[1]-h,c=l.ll[0]+(l.lim[0]-1)*l.del[0]+h,f=l.ll[1]+(l.lim[1]-1)*l.del[1]+h;if(!(d>n.y||u>n.x||f<n.y||c<n.x)&&(r=u2(n,t,l),!isNaN(r.x)))break}return isNaN(r.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*vi+" "+n.y*vi+" tried: '"+o+"'"),-1):(e.x=-r.x,e.y=r.y,0)}function u2(i,t,e){var n={x:Number.NaN,y:Number.NaN};if(isNaN(i.x))return n;var r={x:i.x,y:i.y};r.x-=e.ll[0],r.y-=e.ll[1],r.x=X(r.x-Math.PI)+Math.PI;var o=Am(r,e);if(t){if(isNaN(o.x))return n;o.x=r.x-o.x,o.y=r.y-o.y;var s=9,a=1e-12,l,h;do{if(h=Am(o,e),isNaN(h.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}l={x:r.x-(h.x+o.x),y:r.y-(h.y+o.y)},o.x+=l.x,o.y+=l.y}while(s--&&Math.abs(l.x)>a&&Math.abs(l.y)>a);if(s<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=X(o.x+e.ll[0]),n.y=o.y+e.ll[1]}else isNaN(o.x)||(n.x=i.x+o.x,n.y=i.y+o.y);return n}function Am(i,t){var e={x:i.x/t.del[0],y:i.y/t.del[1]},n={x:Math.floor(e.x),y:Math.floor(e.y)},r={x:e.x-1*n.x,y:e.y-1*n.y},o={x:Number.NaN,y:Number.NaN},s;if(n.x<0||n.x>=t.lim[0]||n.y<0||n.y>=t.lim[1])return o;s=n.y*t.lim[0]+n.x;var a={x:t.cvs[s][0],y:t.cvs[s][1]};s++;var l={x:t.cvs[s][0],y:t.cvs[s][1]};s+=t.lim[0];var h={x:t.cvs[s][0],y:t.cvs[s][1]};s--;var u={x:t.cvs[s][0],y:t.cvs[s][1]},d=r.x*r.y,c=r.x*(1-r.y),f=(1-r.x)*(1-r.y),g=(1-r.x)*r.y;return o.x=f*a.x+c*l.x+g*u.x+d*h.x,o.y=f*a.y+c*l.y+g*u.y+d*h.y,o}function Dm(i,t,e){var n=e.x,r=e.y,o=e.z||0,s,a,l,h={};for(l=0;l<3;l++)if(!(t&&l===2&&e.z===void 0))switch(l===0?(s=n,"ew".indexOf(i.axis[l])!==-1?a="x":a="y"):l===1?(s=r,"ns".indexOf(i.axis[l])!==-1?a="y":a="x"):(s=o,a="z"),i.axis[l]){case"e":h[a]=s;break;case"w":h[a]=-s;break;case"n":h[a]=s;break;case"s":h[a]=-s;break;case"u":e[a]!==void 0&&(h.z=s);break;case"d":e[a]!==void 0&&(h.z=-s);break;default:return null}return h}function Lm(i){var t={x:i[0],y:i[1]};return i.length>2&&(t.z=i[2]),i.length>3&&(t.m=i[3]),t}function d2(i){Fm(i.x),Fm(i.y)}function Fm(i){if(typeof Number.isFinite=="function"){if(Number.isFinite(i))return;throw new TypeError("coordinates must be finite numbers")}if(typeof i!="number"||i!==i||!isFinite(i))throw new TypeError("coordinates must be finite numbers")}function c2(i,t){return(i.datum.datum_type===hr||i.datum.datum_type===ur)&&t.datumCode!=="WGS84"||(t.datum.datum_type===hr||t.datum.datum_type===ur)&&i.datumCode!=="WGS84"}function Qa(i,t,e,n){var r;if(Array.isArray(e)&&(e=Lm(e)),d2(e),i.datum&&t.datum&&c2(i,t)&&(r=new yi("WGS84"),e=Qa(i,r,e,n),i=r),n&&i.axis!=="enu"&&(e=Dm(i,!1,e)),i.projName==="longlat")e={x:e.x*he,y:e.y*he,z:e.z||0};else if(i.to_meter&&(e={x:e.x*i.to_meter,y:e.y*i.to_meter,z:e.z||0}),e=i.inverse(e),!e)return;if(i.from_greenwich&&(e.x+=i.from_greenwich),e=h2(i.datum,t.datum,e),!!e)return t.from_greenwich&&(e={x:e.x-t.from_greenwich,y:e.y,z:e.z||0}),t.projName==="longlat"?e={x:e.x*vi,y:e.y*vi,z:e.z||0}:(e=t.forward(e),t.to_meter&&(e={x:e.x/t.to_meter,y:e.y/t.to_meter,z:e.z||0})),n&&t.axis!=="enu"?Dm(t,!0,e):e}var Om=yi("WGS84");function Qu(i,t,e,n){var r,o,s;return Array.isArray(e)?(r=Qa(i,t,e,n)||{x:NaN,y:NaN},e.length>2?typeof i.name<"u"&&i.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"?typeof r.z=="number"?[r.x,r.y,r.z].concat(e.splice(3)):[r.x,r.y,e[2]].concat(e.splice(3)):[r.x,r.y].concat(e.splice(2)):[r.x,r.y]):(o=Qa(i,t,e,n),s=Object.keys(e),s.length===2||s.forEach(function(a){if(typeof i.name<"u"&&i.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"){if(a==="x"||a==="y"||a==="z")return}else if(a==="x"||a==="y")return;o[a]=e[a]}),o)}function Nm(i){return i instanceof yi?i:i.oProj?i.oProj:yi(i)}function Le(i,t,e){i=Nm(i);var n=!1,r;return typeof t>"u"?(t=i,i=Om,n=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,t=i,i=Om,n=!0),t=Nm(t),e?Qu(i,t,e):(r={forward:function(o,s){return Qu(i,t,o,s)},inverse:function(o,s){return Qu(t,i,o,s)}},n&&(r.oProj=t),r)}var Gm=6,jm="AJSAJS",Bm="AFAFAF",Hr=65,Fe=73,Je=79,hs=86,us=90;const f2={forward:Um,inverse:g2,toPoint:Vm};function Um(i,t){return t=t||5,v2(m2({lat:i[1],lon:i[0]}),t)}function g2(i){var t=ed($m(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function Vm(i){var t=ed($m(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function td(i){return i*(Math.PI/180)}function qm(i){return 180*(i/Math.PI)}function m2(i){var t=i.lat,e=i.lon,n=6378137,r=.00669438,o=.9996,s,a,l,h,u,d,c,f=td(t),g=td(e),m,p;p=Math.floor((e+180)/6)+1,e===180&&(p=60),t>=56&&t<64&&e>=3&&e<12&&(p=32),t>=72&&t<84&&(e>=0&&e<9?p=31:e>=9&&e<21?p=33:e>=21&&e<33?p=35:e>=33&&e<42&&(p=37)),s=(p-1)*6-180+3,m=td(s),a=r/(1-r),l=n/Math.sqrt(1-r*Math.sin(f)*Math.sin(f)),h=Math.tan(f)*Math.tan(f),u=a*Math.cos(f)*Math.cos(f),d=Math.cos(f)*(g-m),c=n*((1-r/4-3*r*r/64-5*r*r*r/256)*f-(3*r/8+3*r*r/32+45*r*r*r/1024)*Math.sin(2*f)+(15*r*r/256+45*r*r*r/1024)*Math.sin(4*f)-35*r*r*r/3072*Math.sin(6*f));var _=o*l*(d+(1-h+u)*d*d*d/6+(5-18*h+h*h+72*u-58*a)*d*d*d*d*d/120)+5e5,v=o*(c+l*Math.tan(f)*(d*d/2+(5-h+9*u+4*u*u)*d*d*d*d/24+(61-58*h+h*h+600*u-330*a)*d*d*d*d*d*d/720));return t<0&&(v+=1e7),{northing:Math.round(v),easting:Math.round(_),zoneNumber:p,zoneLetter:p2(t)}}function ed(i){var t=i.northing,e=i.easting,n=i.zoneLetter,r=i.zoneNumber;if(r<0||r>60)return null;var o=.9996,s=6378137,a=.00669438,l,h=(1-Math.sqrt(1-a))/(1+Math.sqrt(1-a)),u,d,c,f,g,m,p,_,v,y=e-5e5,x=t;n<"N"&&(x-=1e7),p=(r-1)*6-180+3,l=a/(1-a),m=x/o,_=m/(s*(1-a/4-3*a*a/64-5*a*a*a/256)),v=_+(3*h/2-27*h*h*h/32)*Math.sin(2*_)+(21*h*h/16-55*h*h*h*h/32)*Math.sin(4*_)+151*h*h*h/96*Math.sin(6*_),u=s/Math.sqrt(1-a*Math.sin(v)*Math.sin(v)),d=Math.tan(v)*Math.tan(v),c=l*Math.cos(v)*Math.cos(v),f=s*(1-a)/Math.pow(1-a*Math.sin(v)*Math.sin(v),1.5),g=y/(u*o);var k=v-u*Math.tan(v)/f*(g*g/2-(5+3*d+10*c-4*c*c-9*l)*g*g*g*g/24+(61+90*d+298*c+45*d*d-252*l-3*c*c)*g*g*g*g*g*g/720);k=qm(k);var w=(g-(1+2*d+c)*g*g*g/6+(5-2*c+28*d-3*c*c+8*l+24*d*d)*g*g*g*g*g/120)/Math.cos(v);w=p+qm(w);var M;if(i.accuracy){var E=ed({northing:i.northing+i.accuracy,easting:i.easting+i.accuracy,zoneLetter:i.zoneLetter,zoneNumber:i.zoneNumber});M={top:E.lat,right:E.lon,bottom:k,left:w}}else M={lat:k,lon:w};return M}function p2(i){var t="Z";return 84>=i&&i>=72?t="X":72>i&&i>=64?t="W":64>i&&i>=56?t="V":56>i&&i>=48?t="U":48>i&&i>=40?t="T":40>i&&i>=32?t="S":32>i&&i>=24?t="R":24>i&&i>=16?t="Q":16>i&&i>=8?t="P":8>i&&i>=0?t="N":0>i&&i>=-8?t="M":-8>i&&i>=-16?t="L":-16>i&&i>=-24?t="K":-24>i&&i>=-32?t="J":-32>i&&i>=-40?t="H":-40>i&&i>=-48?t="G":-48>i&&i>=-56?t="F":-56>i&&i>=-64?t="E":-64>i&&i>=-72?t="D":-72>i&&i>=-80&&(t="C"),t}function v2(i,t){var e="00000"+i.easting,n="00000"+i.northing;return i.zoneNumber+i.zoneLetter+_2(i.easting,i.northing,i.zoneNumber)+e.substr(e.length-5,t)+n.substr(n.length-5,t)}function _2(i,t,e){var n=Xm(e),r=Math.floor(i/1e5),o=Math.floor(t/1e5)%20;return y2(r,o,n)}function Xm(i){var t=i%Gm;return t===0&&(t=Gm),t}function y2(i,t,e){var n=e-1,r=jm.charCodeAt(n),o=Bm.charCodeAt(n),s=r+i-1,a=o+t,l=!1;s>us&&(s=s-us+Hr-1,l=!0),(s===Fe||r<Fe&&s>Fe||(s>Fe||r<Fe)&&l)&&s++,(s===Je||r<Je&&s>Je||(s>Je||r<Je)&&l)&&(s++,s===Fe&&s++),s>us&&(s=s-us+Hr-1),a>hs?(a=a-hs+Hr-1,l=!0):l=!1,(a===Fe||o<Fe&&a>Fe||(a>Fe||o<Fe)&&l)&&a++,(a===Je||o<Je&&a>Je||(a>Je||o<Je)&&l)&&(a++,a===Fe&&a++),a>hs&&(a=a-hs+Hr-1);var h=String.fromCharCode(s)+String.fromCharCode(a);return h}function $m(i){if(i&&i.length===0)throw"MGRSPoint coverting from nothing";for(var t=i.length,e=null,n="",r,o=0;!/[A-Z]/.test(r=i.charAt(o));){if(o>=2)throw"MGRSPoint bad conversion from: "+i;n+=r,o++}var s=parseInt(n,10);if(o===0||o+3>t)throw"MGRSPoint bad conversion from: "+i;var a=i.charAt(o++);if(a<="A"||a==="B"||a==="Y"||a>="Z"||a==="I"||a==="O")throw"MGRSPoint zone letter "+a+" not handled: "+i;e=i.substring(o,o+=2);for(var l=Xm(s),h=x2(e.charAt(0),l),u=b2(e.charAt(1),l);u<k2(a);)u+=2e6;var d=t-o;if(d%2!==0)throw`MGRSPoint has to have an even number
80
80
  of digits after the zone letter and two 100km letters - front
81
81
  half for easting meters, second half for
82
- northing meters`+i;var c=d/2,f=0,g=0,m,p,_,v,y;return c>0&&(m=1e5/Math.pow(10,c),p=i.substring(o,o+c),f=parseFloat(p)*m,_=i.substring(o+c),g=parseFloat(_)*m),v=f+h,y=g+u,{easting:v,northing:y,zoneLetter:a,zoneNumber:s,accuracy:m}}function x2(i,t){for(var e=Bm.charCodeAt(t-1),n=1e5,r=!1;e!==i.charCodeAt(0);){if(e++,e===Fe&&e++,e===Je&&e++,e>ds){if(r)throw"Bad character: "+i;e=Jr,r=!0}n+=1e5}return n}function b2(i,t){if(i>"V")throw"MGRSPoint given invalid Northing "+i;for(var e=Um.charCodeAt(t-1),n=0,r=!1;e!==i.charCodeAt(0);){if(e++,e===Fe&&e++,e===Je&&e++,e>us){if(r)throw"Bad character: "+i;e=Jr,r=!0}n+=1e5}return n}function k2(i){var t;switch(i){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+i}function Qr(i,t,e){if(!(this instanceof Qr))return new Qr(i,t,e);if(Array.isArray(i))this.x=i[0],this.y=i[1],this.z=i[2]||0;else if(typeof i=="object")this.x=i.x,this.y=i.y,this.z=i.z||0;else if(typeof i=="string"&&typeof t>"u"){var n=i.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=i,this.y=t,this.z=e||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Qr.fromMGRS=function(i){return new Qr(qm(i))},Qr.prototype.toMGRS=function(i){return Vm([this.x,this.y],i)};var w2=1,M2=.25,Ym=.046875,Km=.01953125,Zm=.01068115234375,E2=.75,C2=.46875,S2=.013020833333333334,T2=.007120768229166667,z2=.3645833333333333,R2=.005696614583333333,I2=.3076171875;function Hm(i){var t=[];t[0]=w2-i*(M2+i*(Ym+i*(Km+i*Zm))),t[1]=i*(E2-i*(Ym+i*(Km+i*Zm)));var e=i*i;return t[2]=e*(C2-i*(S2+i*T2)),e*=i,t[3]=e*(z2-i*R2),t[4]=e*i*I2,t}function tl(i,t,e,n){return e*=t,t*=t,n[0]*i-e*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var P2=20;function Jm(i,t,e){for(var n=1/(1-t),r=i,o=P2;o;--o){var s=Math.sin(r),a=1-t*s*s;if(a=(tl(r,s,Math.cos(r),e)-i)*(a*Math.sqrt(a))*n,r-=a,Math.abs(a)<B)return r}return r}function A2(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=Hm(this.es),this.ml0=tl(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function D2(i){var t=i.x,e=i.y,n=X(t-this.long0),r,o,s,a=Math.sin(e),l=Math.cos(e);if(this.es){var u=l*n,d=Math.pow(u,2),c=this.ep2*Math.pow(l,2),f=Math.pow(c,2),g=Math.abs(l)>B?Math.tan(e):0,m=Math.pow(g,2),p=Math.pow(m,2);r=1-this.es*Math.pow(a,2),u=u/Math.sqrt(r);var _=tl(e,a,l,this.en);o=this.a*(this.k0*u*(1+d/6*(1-m+c+d/20*(5-18*m+p+14*c-58*m*c+d/42*(61+179*p-p*m-479*m)))))+this.x0,s=this.a*(this.k0*(_-this.ml0+a*n*u/2*(1+d/12*(5-m+9*c+4*f+d/30*(61+p-58*m+270*c-330*m*c+d/56*(1385+543*p-p*m-3111*m))))))+this.y0}else{var h=l*Math.sin(n);if(Math.abs(Math.abs(h)-1)<B)return 93;if(o=.5*this.a*this.k0*Math.log((1+h)/(1-h))+this.x0,s=l*Math.cos(n)/Math.sqrt(1-Math.pow(h,2)),h=Math.abs(s),h>=1){if(h-1>B)return 93;s=0}else s=Math.acos(s);e<0&&(s=-s),s=this.a*this.k0*(s-this.lat0)+this.y0}return i.x=o,i.y=s,i}function L2(i){var t,e,n,r,o=(i.x-this.x0)*(1/this.a),s=(i.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+s/this.k0,e=Jm(t,this.es,this.en),Math.abs(e)<I){var d=Math.sin(e),c=Math.cos(e),f=Math.abs(c)>B?Math.tan(e):0,g=this.ep2*Math.pow(c,2),m=Math.pow(g,2),p=Math.pow(f,2),_=Math.pow(p,2);t=1-this.es*Math.pow(d,2);var v=o*Math.sqrt(t)/this.k0,y=Math.pow(v,2);t=t*f,n=e-t*y/(1-this.es)*.5*(1-y/12*(5+3*p-9*g*p+g-4*m-y/30*(61+90*p-252*g*p+45*_+46*g-y/56*(1385+3633*p+4095*_+1574*_*p)))),r=X(this.long0+v*(1-y/6*(1+2*p+g-y/20*(5+28*p+24*_+8*g*p+6*g-y/42*(61+662*p+1320*_+720*_*p))))/c)}else n=I*ls(s),r=0;else{var a=Math.exp(o/this.k0),l=.5*(a-1/a),h=this.lat0+s/this.k0,u=Math.cos(h);t=Math.sqrt((1-Math.pow(u,2))/(1+Math.pow(l,2))),n=Math.asin(t),s<0&&(n=-n),l===0&&u===0?r=0:r=X(Math.atan2(l,u)+this.long0)}return i.x=r,i.y=n,i}var F2=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const el={init:A2,forward:D2,inverse:L2,names:F2};function Qm(i){var t=Math.exp(i);return t=(t-1/t)/2,t}function ai(i,t){i=Math.abs(i),t=Math.abs(t);var e=Math.max(i,t),n=Math.min(i,t)/(e||1);return e*Math.sqrt(1+Math.pow(n,2))}function O2(i){var t=1+i,e=t-1;return e===0?i:i*Math.log(t)/e}function N2(i){var t=Math.abs(i);return t=O2(t*(1+t/(ai(1,t)+1))),i<0?-t:t}function id(i,t){for(var e=2*Math.cos(2*t),n=i.length-1,r=i[n],o=0,s;--n>=0;)s=-o+e*r+i[n],o=r,r=s;return t+s*Math.sin(2*t)}function G2(i,t){for(var e=2*Math.cos(t),n=i.length-1,r=i[n],o=0,s;--n>=0;)s=-o+e*r+i[n],o=r,r=s;return Math.sin(t)*s}function j2(i){var t=Math.exp(i);return t=(t+1/t)/2,t}function tp(i,t,e){for(var n=Math.sin(t),r=Math.cos(t),o=Qm(e),s=j2(e),a=2*r*s,l=-2*n*o,h=i.length-1,u=i[h],d=0,c=0,f=0,g,m;--h>=0;)g=c,m=d,c=u,d=f,u=-g+a*c-l*d+i[h],f=-m+l*c+a*d;return a=n*s,l=r*o,[a*u-l*f,a*f+l*u]}function B2(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(el.init.apply(this),this.forward=el.forward,this.inverse=el.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var i=this.es/(1+Math.sqrt(1-this.es)),t=i/(2-i),e=t;this.cgb[0]=t*(2+t*(-2/3+t*(-2+t*(116/45+t*(26/45+t*(-2854/675)))))),this.cbg[0]=t*(-2+t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))),e=e*t,this.cgb[1]=e*(7/3+t*(-8/5+t*(-227/45+t*(2704/315+t*(2323/945))))),this.cbg[1]=e*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),e=e*t,this.cgb[2]=e*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=e*(-26/15+t*(34/21+t*(8/5+t*(-12686/2835)))),e=e*t,this.cgb[3]=e*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=e*(1237/630+t*(-12/5+t*(-24832/14175))),e=e*t,this.cgb[4]=e*(4174/315+t*(-144838/6237)),this.cbg[4]=e*(-734/315+t*(109598/31185)),e=e*t,this.cgb[5]=e*(601676/22275),this.cbg[5]=e*(444337/155925),e=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+e*(1/4+e*(1/64+e/256))),this.utg[0]=t*(-.5+t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=e*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=e*(13/48+t*(-3/5+t*(557/1440+t*(281/630+t*(-1983433/1935360))))),e=e*t,this.utg[2]=e*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=e*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),e=e*t,this.utg[3]=e*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=e*(49561/161280+t*(-179/168+t*(6601661/7257600))),e=e*t,this.utg[4]=e*(-4583/161280+t*(108847/3991680)),this.gtu[4]=e*(34729/80640+t*(-3418889/1995840)),e=e*t,this.utg[5]=e*(-20648693/638668800),this.gtu[5]=e*(212378941/319334400);var n=id(this.cbg,this.lat0);this.Zb=-this.Qn*(n+G2(this.gtu,2*n))}function U2(i){var t=X(i.x-this.long0),e=i.y;e=id(this.cbg,e);var n=Math.sin(e),r=Math.cos(e),o=Math.sin(t),s=Math.cos(t);e=Math.atan2(n,s*r),t=Math.atan2(o*r,ai(n,r*s)),t=N2(Math.tan(t));var a=tp(this.gtu,2*e,2*t);e=e+a[0],t=t+a[1];var l,h;return Math.abs(t)<=2.623395162778?(l=this.a*(this.Qn*t)+this.x0,h=this.a*(this.Qn*e+this.Zb)+this.y0):(l=1/0,h=1/0),i.x=l,i.y=h,i}function V2(i){var t=(i.x-this.x0)*(1/this.a),e=(i.y-this.y0)*(1/this.a);e=(e-this.Zb)/this.Qn,t=t/this.Qn;var n,r;if(Math.abs(t)<=2.623395162778){var o=tp(this.utg,2*e,2*t);e=e+o[0],t=t+o[1],t=Math.atan(Qm(t));var s=Math.sin(e),a=Math.cos(e),l=Math.sin(t),h=Math.cos(t);e=Math.atan2(s*h,ai(l,h*a)),t=Math.atan2(l,h*a),n=X(t+this.long0),r=id(this.cgb,e)}else n=1/0,r=1/0;return i.x=n,i.y=r,i}var q2=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"];const il={init:B2,forward:U2,inverse:V2,names:q2};function X2(i,t){if(i===void 0){if(i=Math.floor((X(t)+Math.PI)*30/Math.PI)+1,i<0)return 0;if(i>60)return 60}return i}var $2="etmerc";function W2(){var i=X2(this.zone,this.long0);if(i===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(i)-183)*he,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,il.init.apply(this),this.forward=il.forward,this.inverse=il.inverse}var Y2=["Universal Transverse Mercator System","utm"];const K2={init:W2,names:Y2,dependsOn:$2};function nd(i,t){return Math.pow((1-i)/(1+i),t)}var Z2=20;function H2(){var i=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*i*i),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(i/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+It)/(Math.pow(Math.tan(.5*this.lat0+It),this.C)*nd(this.e*i,this.ratexp))}function J2(i){var t=i.x,e=i.y;return i.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+It),this.C)*nd(this.e*Math.sin(e),this.ratexp))-I,i.x=this.C*t,i}function Q2(i){for(var t=1e-14,e=i.x/this.C,n=i.y,r=Math.pow(Math.tan(.5*n+It)/this.K,1/this.C),o=Z2;o>0&&(n=2*Math.atan(r*nd(this.e*Math.sin(i.y),-.5*this.e))-I,!(Math.abs(n-i.y)<t));--o)i.y=n;return o?(i.x=e,i.y=n,i):null}var t5=["gauss"];const rd={init:H2,forward:J2,inverse:Q2,names:t5};function e5(){rd.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function i5(i){var t,e,n,r;return i.x=X(i.x-this.long0),rd.forward.apply(this,[i]),t=Math.sin(i.y),e=Math.cos(i.y),n=Math.cos(i.x),r=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*e*n),i.x=r*e*Math.sin(i.x),i.y=r*(this.cosc0*t-this.sinc0*e*n),i.x=this.a*i.x+this.x0,i.y=this.a*i.y+this.y0,i}function n5(i){var t,e,n,r,o;if(i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,i.x/=this.k0,i.y/=this.k0,o=Math.sqrt(i.x*i.x+i.y*i.y)){var s=2*Math.atan2(o,this.R2);t=Math.sin(s),e=Math.cos(s),r=Math.asin(e*this.sinc0+i.y*t*this.cosc0/o),n=Math.atan2(i.x*t,o*this.cosc0*e-i.y*this.sinc0*t)}else r=this.phic0,n=0;return i.x=n,i.y=r,rd.inverse.apply(this,[i]),i.x=X(i.x+this.long0),i}var r5=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const o5={init:e5,forward:i5,inverse:n5,names:r5};function s5(i,t,e){return t*=e,Math.tan(.5*(I+i))*Math.pow((1-t)/(1+t),.5*e)}function a5(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=B&&(this.k0=.5*(1+ls(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=B&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=B&&(this.k0=.5*this.cons*_i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/si(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=_i(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-I,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function l5(i){var t=i.x,e=i.y,n=Math.sin(e),r=Math.cos(e),o,s,a,l,h,u,d=X(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=B&&Math.abs(e+this.lat0)<=B?(i.x=NaN,i.y=NaN,i):this.sphere?(o=2*this.k0/(1+this.sinlat0*n+this.coslat0*r*Math.cos(d)),i.x=this.a*o*r*Math.sin(d)+this.x0,i.y=this.a*o*(this.coslat0*n-this.sinlat0*r*Math.cos(d))+this.y0,i):(s=2*Math.atan(this.ssfn_(e,n,this.e))-I,l=Math.cos(s),a=Math.sin(s),Math.abs(this.coslat0)<=B?(h=si(this.e,e*this.con,this.con*n),u=2*this.a*this.k0*h/this.cons,i.x=this.x0+u*Math.sin(t-this.long0),i.y=this.y0-this.con*u*Math.cos(t-this.long0),i):(Math.abs(this.sinlat0)<B?(o=2*this.a*this.k0/(1+l*Math.cos(d)),i.y=o*a):(o=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*a+this.cosX0*l*Math.cos(d))),i.y=o*(this.cosX0*a-this.sinX0*l*Math.cos(d))+this.y0),i.x=o*l*Math.sin(d)+this.x0,i))}function h5(i){i.x-=this.x0,i.y-=this.y0;var t,e,n,r,o,s=Math.sqrt(i.x*i.x+i.y*i.y);if(this.sphere){var a=2*Math.atan(s/(2*this.a*this.k0));return t=this.long0,e=this.lat0,s<=B?(i.x=t,i.y=e,i):(e=Math.asin(Math.cos(a)*this.sinlat0+i.y*Math.sin(a)*this.coslat0/s),Math.abs(this.coslat0)<B?this.lat0>0?t=X(this.long0+Math.atan2(i.x,-1*i.y)):t=X(this.long0+Math.atan2(i.x,i.y)):t=X(this.long0+Math.atan2(i.x*Math.sin(a),s*this.coslat0*Math.cos(a)-i.y*this.sinlat0*Math.sin(a))),i.x=t,i.y=e,i)}else if(Math.abs(this.coslat0)<=B){if(s<=B)return e=this.lat0,t=this.long0,i.x=t,i.y=e,i;i.x*=this.con,i.y*=this.con,n=s*this.cons/(2*this.a*this.k0),e=this.con*hs(this.e,n),t=this.con*X(this.con*this.long0+Math.atan2(i.x,-1*i.y))}else r=2*Math.atan(s*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,s<=B?o=this.X0:(o=Math.asin(Math.cos(r)*this.sinX0+i.y*Math.sin(r)*this.cosX0/s),t=X(this.long0+Math.atan2(i.x*Math.sin(r),s*this.cosX0*Math.cos(r)-i.y*this.sinX0*Math.sin(r)))),e=-1*hs(this.e,Math.tan(.5*(I+o)));return i.x=t,i.y=e,i}var u5=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"];const d5={init:a5,forward:l5,inverse:h5,names:u5,ssfn_:s5};function c5(){var i=this.lat0;this.lambda0=this.long0;var t=Math.sin(i),e=this.a,n=this.rf,r=1/n,o=2*r-Math.pow(r,2),s=this.e=Math.sqrt(o);this.R=this.k0*e*Math.sqrt(1-o)/(1-o*Math.pow(t,2)),this.alpha=Math.sqrt(1+o/(1-o)*Math.pow(Math.cos(i),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),l=Math.log(Math.tan(Math.PI/4+i/2)),h=Math.log((1+s*t)/(1-s*t));this.K=a-this.alpha*l+this.alpha*s/2*h}function f5(i){var t=Math.log(Math.tan(Math.PI/4-i.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(i.y))/(1-this.e*Math.sin(i.y))),n=-this.alpha*(t+e)+this.K,r=2*(Math.atan(Math.exp(n))-Math.PI/4),o=this.alpha*(i.x-this.lambda0),s=Math.atan(Math.sin(o)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(o))),a=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(o));return i.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0,i.x=this.R*s+this.x0,i}function g5(i){for(var t=i.x-this.x0,e=i.y-this.y0,n=t/this.R,r=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),o=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(n)),s=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(r))),a=this.lambda0+s/this.alpha,l=0,h=o,u=-1e3,d=0;Math.abs(h-u)>1e-7;){if(++d>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+o/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(h))/2)),u=h,h=2*Math.atan(Math.exp(l))-Math.PI/2}return i.x=a,i.y=h,i}var m5=["somerc"];const p5={init:c5,forward:f5,inverse:g5,names:m5};var to=1e-7;function v5(i){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],e=typeof i.PROJECTION=="object"?Object.keys(i.PROJECTION)[0]:i.PROJECTION;return"no_uoff"in i||"no_off"in i||t.indexOf(e)!==-1}function _5(){var i,t,e,n,r,o,s,a,l,h,u=0,d,c=0,f=0,g=0,m=0,p=0,_=0;this.no_off=v5(this),this.no_rot="no_rot"in this;var v=!1;"alpha"in this&&(v=!0);var y=!1;if("rectified_grid_angle"in this&&(y=!0),v&&(_=this.alpha),y&&(u=this.rectified_grid_angle*he),v||y)c=this.longc;else if(f=this.long1,m=this.lat1,g=this.long2,p=this.lat2,Math.abs(m-p)<=to||(i=Math.abs(m))<=to||Math.abs(i-I)<=to||Math.abs(Math.abs(this.lat0)-I)<=to||Math.abs(Math.abs(p)-I)<=to)throw new Error;var x=1-this.es;t=Math.sqrt(x),Math.abs(this.lat0)>B?(a=Math.sin(this.lat0),e=Math.cos(this.lat0),i=1-this.es*a*a,this.B=e*e,this.B=Math.sqrt(1+this.es*this.B*this.B/x),this.A=this.B*this.k0*t/i,n=this.B*t/(e*Math.sqrt(i)),r=n*n-1,r<=0?r=0:(r=Math.sqrt(r),this.lat0<0&&(r=-r)),this.E=r+=n,this.E*=Math.pow(si(this.e,this.lat0,a),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=r=1),v||y?(v?(d=Math.asin(Math.sin(_)/n),y||(u=_)):(d=u,_=Math.asin(n*Math.sin(d))),this.lam0=c-Math.asin(.5*(r-1/r)*Math.tan(d))/this.B):(o=Math.pow(si(this.e,m,Math.sin(m)),this.B),s=Math.pow(si(this.e,p,Math.sin(p)),this.B),r=this.E/o,l=(s-o)/(s+o),h=this.E*this.E,h=(h-s*o)/(h+s*o),i=f-g,i<-Math.pi?g-=ss:i>Math.pi&&(g+=ss),this.lam0=X(.5*(f+g)-Math.atan(h*Math.tan(.5*this.B*(f-g))/l)/this.B),d=Math.atan(2*Math.sin(this.B*X(f-this.lam0))/(r-1/r)),u=_=Math.asin(n*Math.sin(d))),this.singam=Math.sin(d),this.cosgam=Math.cos(d),this.sinrot=Math.sin(u),this.cosrot=Math.cos(u),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A*this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(_))),this.lat0<0&&(this.u_0=-this.u_0)),r=.5*d,this.v_pole_n=this.ArB*Math.log(Math.tan(It-r)),this.v_pole_s=this.ArB*Math.log(Math.tan(It+r))}function y5(i){var t={},e,n,r,o,s,a,l,h;if(i.x=i.x-this.lam0,Math.abs(Math.abs(i.y)-I)>B){if(s=this.E/Math.pow(si(this.e,i.y,Math.sin(i.y)),this.B),a=1/s,e=.5*(s-a),n=.5*(s+a),o=Math.sin(this.B*i.x),r=(e*this.singam-o*this.cosgam)/n,Math.abs(Math.abs(r)-1)<B)throw new Error;h=.5*this.ArB*Math.log((1-r)/(1+r)),a=Math.cos(this.B*i.x),Math.abs(a)<to?l=this.A*i.x:l=this.ArB*Math.atan2(e*this.cosgam+o*this.singam,a)}else h=i.y>0?this.v_pole_n:this.v_pole_s,l=this.ArB*i.y;return this.no_rot?(t.x=l,t.y=h):(l-=this.u_0,t.x=h*this.cosrot+l*this.sinrot,t.y=l*this.cosrot-h*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function x5(i){var t,e,n,r,o,s,a,l={};if(i.x=(i.x-this.x0)*(1/this.a),i.y=(i.y-this.y0)*(1/this.a),this.no_rot?(e=i.y,t=i.x):(e=i.x*this.cosrot-i.y*this.sinrot,t=i.y*this.cosrot+i.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*e),r=.5*(n-1/n),o=.5*(n+1/n),s=Math.sin(this.BrA*t),a=(s*this.cosgam+r*this.singam)/o,Math.abs(Math.abs(a)-1)<B)l.x=0,l.y=a<0?-I:I;else{if(l.y=this.E/Math.sqrt((1+a)/(1-a)),l.y=hs(this.e,Math.pow(l.y,1/this.B)),l.y===1/0)throw new Error;l.x=-this.rB*Math.atan2(r*this.cosgam-s*this.singam,Math.cos(this.BrA*t))}return l.x+=this.lam0,l}var b5=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const k5={init:_5,forward:y5,inverse:x5,names:b5};function w5(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<B)){var i=this.b/this.a;this.e=Math.sqrt(1-i*i);var t=Math.sin(this.lat1),e=Math.cos(this.lat1),n=_i(this.e,t,e),r=si(this.e,this.lat1,t),o=Math.sin(this.lat2),s=Math.cos(this.lat2),a=_i(this.e,o,s),l=si(this.e,this.lat2,o),h=si(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>B?this.ns=Math.log(n/a)/Math.log(r/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function M5(i){var t=i.x,e=i.y;Math.abs(2*Math.abs(e)-Math.PI)<=B&&(e=ls(e)*(I-2*B));var n=Math.abs(Math.abs(e)-I),r,o;if(n>B)r=si(this.e,e,Math.sin(e)),o=this.a*this.f0*Math.pow(r,this.ns);else{if(n=e*this.ns,n<=0)return null;o=0}var s=this.ns*X(t-this.long0);return i.x=this.k0*(o*Math.sin(s))+this.x0,i.y=this.k0*(this.rh-o*Math.cos(s))+this.y0,i}function E5(i){var t,e,n,r,o,s=(i.x-this.x0)/this.k0,a=this.rh-(i.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(s*s+a*a),e=1):(t=-Math.sqrt(s*s+a*a),e=-1);var l=0;if(t!==0&&(l=Math.atan2(e*s,e*a)),t!==0||this.ns>0){if(e=1/this.ns,n=Math.pow(t/(this.a*this.f0),e),r=hs(this.e,n),r===-9999)return null}else r=-I;return o=X(l/this.ns+this.long0),i.x=o,i.y=r,i}var C5=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const S5={init:w5,forward:M5,inverse:E5,names:C5};function T5(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function z5(i){var t,e,n,r,o,s,a,l=i.x,h=i.y,u=X(l-this.long0);return t=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),e=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/t)-this.s45),n=-u*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(n)),o=Math.asin(Math.cos(e)*Math.sin(n)/Math.cos(r)),s=this.n*o,a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),i.y=a*Math.cos(s)/1,i.x=a*Math.sin(s)/1,this.czech||(i.y*=-1,i.x*=-1),i}function R5(i){var t,e,n,r,o,s,a,l,h=i.x;i.x=i.y,i.y=h,this.czech||(i.y*=-1,i.x*=-1),s=Math.sqrt(i.x*i.x+i.y*i.y),o=Math.atan2(i.y,i.x),r=o/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/s,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(r)),e=Math.asin(Math.cos(n)*Math.sin(r)/Math.cos(t)),i.x=this.long0-e/this.alfa,a=t,l=0;var u=0;do i.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-i.y)<1e-10&&(l=1),a=i.y,u+=1;while(l===0&&u<15);return u>=15?null:i}var I5=["Krovak","krovak"];const P5={init:T5,forward:z5,inverse:R5,names:I5};function Te(i,t,e,n,r){return i*r-t*Math.sin(2*r)+e*Math.sin(4*r)-n*Math.sin(6*r)}function cs(i){return 1-.25*i*(1+i/16*(3+1.25*i))}function fs(i){return .375*i*(1+.25*i*(1+.46875*i))}function gs(i){return .05859375*i*i*(1+.75*i)}function ms(i){return i*i*i*(35/3072)}function eo(i,t,e){var n=t*e;return i/Math.sqrt(1-n*n)}function io(i){return Math.abs(i)<I?i:i-ls(i)*Math.PI}function nl(i,t,e,n,r){var o,s;o=i/t;for(var a=0;a<15;a++)if(s=(i-(t*o-e*Math.sin(2*o)+n*Math.sin(4*o)-r*Math.sin(6*o)))/(t-2*e*Math.cos(2*o)+4*n*Math.cos(4*o)-6*r*Math.cos(6*o)),o+=s,Math.abs(s)<=1e-10)return o;return NaN}function A5(){this.sphere||(this.e0=cs(this.es),this.e1=fs(this.es),this.e2=gs(this.es),this.e3=ms(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0))}function D5(i){var t,e,n=i.x,r=i.y;if(n=X(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(r)*Math.sin(n)),e=this.a*(Math.atan2(Math.tan(r),Math.cos(n))-this.lat0);else{var o=Math.sin(r),s=Math.cos(r),a=eo(this.a,this.e,o),l=Math.tan(r)*Math.tan(r),h=n*Math.cos(r),u=h*h,d=this.es*s*s/(1-this.es),c=this.a*Te(this.e0,this.e1,this.e2,this.e3,r);t=a*h*(1-u*l*(1/6-(8-l+8*d)*u/120)),e=c-this.ml0+a*o/s*u*(.5+(5-l+6*d)*u/24)}return i.x=t+this.x0,i.y=e+this.y0,i}function L5(i){i.x-=this.x0,i.y-=this.y0;var t=i.x/this.a,e=i.y/this.a,n,r;if(this.sphere){var o=e+this.lat0;n=Math.asin(Math.sin(o)*Math.cos(t)),r=Math.atan2(Math.tan(t),Math.cos(o))}else{var s=this.ml0/this.a+e,a=nl(s,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-I)<=B)return i.x=this.long0,i.y=I,e<0&&(i.y*=-1),i;var l=eo(this.a,this.e,Math.sin(a)),h=l*l*l/this.a/this.a*(1-this.es),u=Math.pow(Math.tan(a),2),d=t*this.a/l,c=d*d;n=a-l*Math.tan(a)/h*d*d*(.5-(1+3*u)*d*d/24),r=d*(1-c*(u/3+(1+3*u)*u*c/15))/Math.cos(a)}return i.x=X(r+this.long0),i.y=io(n),i}var F5=["Cassini","Cassini_Soldner","cass"];const O5={init:A5,forward:D5,inverse:L5,names:F5};function Cn(i,t){var e;return i>1e-7?(e=i*t,(1-i*i)*(t/(1-e*e)-.5/i*Math.log((1-e)/(1+e)))):2*t}var N5=1,G5=2,j5=3,B5=4;function U5(){var i=Math.abs(this.lat0);if(Math.abs(i-I)<B?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(i)<B?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=Cn(this.e,1),this.mmf=.5/(1-this.es),this.apa=H5(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=Cn(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function V5(i){var t,e,n,r,o,s,a,l,h,u,d=i.x,c=i.y;if(d=X(d-this.long0),this.sphere){if(o=Math.sin(c),u=Math.cos(c),n=Math.cos(d),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e=this.mode===this.EQUIT?1+u*n:1+this.sinph0*o+this.cosph0*u*n,e<=B)return null;e=Math.sqrt(2/e),t=e*u*Math.sin(d),e*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*u*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(c+this.lat0)<B)return null;e=It-c*.5,e=2*(this.mode===this.S_POLE?Math.cos(e):Math.sin(e)),t=e*Math.sin(d),e*=n}}else{switch(a=0,l=0,h=0,n=Math.cos(d),r=Math.sin(d),o=Math.sin(c),s=Cn(this.e,o),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(a=s/this.qp,l=Math.sqrt(1-a*a)),this.mode){case this.OBLIQ:h=1+this.sinb1*a+this.cosb1*l*n;break;case this.EQUIT:h=1+l*n;break;case this.N_POLE:h=I+c,s=this.qp-s;break;case this.S_POLE:h=c-I,s=this.qp+s;break}if(Math.abs(h)<B)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:h=Math.sqrt(2/h),this.mode===this.OBLIQ?e=this.ymf*h*(this.cosb1*a-this.sinb1*l*n):e=(h=Math.sqrt(2/(1+l*n)))*a*this.ymf,t=this.xmf*h*l*r;break;case this.N_POLE:case this.S_POLE:s>=0?(t=(h=Math.sqrt(s))*r,e=n*(this.mode===this.S_POLE?h:-h)):t=e=0;break}}return i.x=this.a*t+this.x0,i.y=this.a*e+this.y0,i}function q5(i){i.x-=this.x0,i.y-=this.y0;var t=i.x/this.a,e=i.y/this.a,n,r,o,s,a,l,h;if(this.sphere){var u=0,d,c=0;if(d=Math.sqrt(t*t+e*e),r=d*.5,r>1)return null;switch(r=2*Math.asin(r),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(c=Math.sin(r),u=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(d)<=B?0:Math.asin(e*c/d),t*=c,e=u*d;break;case this.OBLIQ:r=Math.abs(d)<=B?this.lat0:Math.asin(u*this.sinph0+e*c*this.cosph0/d),t*=c*this.cosph0,e=(u-Math.sin(r)*this.sinph0)*d;break;case this.N_POLE:e=-e,r=I-r;break;case this.S_POLE:r-=I;break}n=e===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,e)}else{if(h=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,e*=this.dd,l=Math.sqrt(t*t+e*e),l<B)return i.x=this.long0,i.y=this.lat0,i;s=2*Math.asin(.5*l/this.rq),o=Math.cos(s),t*=s=Math.sin(s),this.mode===this.OBLIQ?(h=o*this.sinb1+e*s*this.cosb1/l,a=this.qp*h,e=l*this.cosb1*o-e*this.sinb1*s):(h=e*s/l,a=this.qp*h,e=l*o)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(e=-e),a=t*t+e*e,!a)return i.x=this.long0,i.y=this.lat0,i;h=1-a/this.qp,this.mode===this.S_POLE&&(h=-h)}n=Math.atan2(t,e),r=J5(Math.asin(h),this.apa)}return i.x=X(this.long0+n),i.y=r,i}var X5=.3333333333333333,$5=.17222222222222222,W5=.10257936507936508,Y5=.06388888888888888,K5=.0664021164021164,Z5=.016415012942191543;function H5(i){var t,e=[];return e[0]=i*X5,t=i*i,e[0]+=t*$5,e[1]=t*Y5,t*=i,e[0]+=t*W5,e[1]+=t*K5,e[2]=t*Z5,e}function J5(i,t){var e=i+i;return i+t[0]*Math.sin(e)+t[1]*Math.sin(e+e)+t[2]*Math.sin(e+e+e)}var Q5=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const tM={init:U5,forward:V5,inverse:q5,names:Q5,S_POLE:N5,N_POLE:G5,EQUIT:j5,OBLIQ:B5};function Sn(i){return Math.abs(i)>1&&(i=i>1?1:-1),Math.asin(i)}function eM(){Math.abs(this.lat1+this.lat2)<B||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=_i(this.e3,this.sin_po,this.cos_po),this.qs1=Cn(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=_i(this.e3,this.sin_po,this.cos_po),this.qs2=Cn(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Cn(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>B?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function iM(i){var t=i.x,e=i.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var n=Cn(this.e3,this.sin_phi,this.cos_phi),r=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,o=this.ns0*X(t-this.long0),s=r*Math.sin(o)+this.x0,a=this.rh-r*Math.cos(o)+this.y0;return i.x=s,i.y=a,i}function nM(i){var t,e,n,r,o,s;return i.x-=this.x0,i.y=this.rh-i.y+this.y0,this.ns0>=0?(t=Math.sqrt(i.x*i.x+i.y*i.y),n=1):(t=-Math.sqrt(i.x*i.x+i.y*i.y),n=-1),r=0,t!==0&&(r=Math.atan2(n*i.x,n*i.y)),n=t*this.ns0/this.a,this.sphere?s=Math.asin((this.c-n*n)/(2*this.ns0)):(e=(this.c-n*n)/this.ns0,s=this.phi1z(this.e3,e)),o=X(r/this.ns0+this.long0),i.x=o,i.y=s,i}function rM(i,t){var e,n,r,o,s,a=Sn(.5*t);if(i<B)return a;for(var l=i*i,h=1;h<=25;h++)if(e=Math.sin(a),n=Math.cos(a),r=i*e,o=1-r*r,s=.5*o*o/n*(t/(1-l)-e/o+.5/i*Math.log((1-r)/(1+r))),a=a+s,Math.abs(s)<=1e-7)return a;return null}var oM=["Albers_Conic_Equal_Area","Albers","aea"];const sM={init:eM,forward:iM,inverse:nM,names:oM,phi1z:rM};function aM(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function lM(i){var t,e,n,r,o,s,a,l,h=i.x,u=i.y;return n=X(h-this.long0),t=Math.sin(u),e=Math.cos(u),r=Math.cos(n),s=this.sin_p14*t+this.cos_p14*e*r,o=1,s>0||Math.abs(s)<=B?(a=this.x0+this.a*o*e*Math.sin(n)/s,l=this.y0+this.a*o*(this.cos_p14*t-this.sin_p14*e*r)/s):(a=this.x0+this.infinity_dist*e*Math.sin(n),l=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*e*r)),i.x=a,i.y=l,i}function hM(i){var t,e,n,r,o,s;return i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,i.x/=this.k0,i.y/=this.k0,(t=Math.sqrt(i.x*i.x+i.y*i.y))?(r=Math.atan2(t,this.rc),e=Math.sin(r),n=Math.cos(r),s=Sn(n*this.sin_p14+i.y*e*this.cos_p14/t),o=Math.atan2(i.x*e,t*this.cos_p14*n-i.y*this.sin_p14*e),o=X(this.long0+o)):(s=this.phic0,o=0),i.x=o,i.y=s,i}var uM=["gnom"];const dM={init:aM,forward:lM,inverse:hM,names:uM};function cM(i,t){var e=1-(1-i*i)/(2*i)*Math.log((1-i)/(1+i));if(Math.abs(Math.abs(t)-e)<1e-6)return t<0?-1*I:I;for(var n=Math.asin(.5*t),r,o,s,a,l=0;l<30;l++)if(o=Math.sin(n),s=Math.cos(n),a=i*o,r=Math.pow(1-a*a,2)/(2*s)*(t/(1-i*i)-o/(1-a*a)+.5/i*Math.log((1-a)/(1+a))),n+=r,Math.abs(r)<=1e-10)return n;return NaN}function fM(){this.sphere||(this.k0=_i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function gM(i){var t=i.x,e=i.y,n,r,o=X(t-this.long0);if(this.sphere)n=this.x0+this.a*o*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var s=Cn(this.e,Math.sin(e));n=this.x0+this.a*this.k0*o,r=this.y0+this.a*s*.5/this.k0}return i.x=n,i.y=r,i}function mM(i){i.x-=this.x0,i.y-=this.y0;var t,e;return this.sphere?(t=X(this.long0+i.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(i.y/this.a*Math.cos(this.lat_ts))):(e=cM(this.e,2*i.y*this.k0/this.a),t=X(this.long0+i.x/(this.a*this.k0))),i.x=t,i.y=e,i}var pM=["cea"];const vM={init:fM,forward:gM,inverse:mM,names:pM};function _M(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function yM(i){var t=i.x,e=i.y,n=X(t-this.long0),r=io(e-this.lat0);return i.x=this.x0+this.a*n*this.rc,i.y=this.y0+this.a*r,i}function xM(i){var t=i.x,e=i.y;return i.x=X(this.long0+(t-this.x0)/(this.a*this.rc)),i.y=io(this.lat0+(e-this.y0)/this.a),i}var bM=["Equirectangular","Equidistant_Cylindrical","eqc"];const kM={init:_M,forward:yM,inverse:xM,names:bM};var ep=20;function wM(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=cs(this.es),this.e1=fs(this.es),this.e2=gs(this.es),this.e3=ms(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0)}function MM(i){var t=i.x,e=i.y,n,r,o,s=X(t-this.long0);if(o=s*Math.sin(e),this.sphere)Math.abs(e)<=B?(n=this.a*s,r=-1*this.a*this.lat0):(n=this.a*Math.sin(o)/Math.tan(e),r=this.a*(io(e-this.lat0)+(1-Math.cos(o))/Math.tan(e)));else if(Math.abs(e)<=B)n=this.a*s,r=-1*this.ml0;else{var a=eo(this.a,this.e,Math.sin(e))/Math.tan(e);n=a*Math.sin(o),r=this.a*Te(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+a*(1-Math.cos(o))}return i.x=n+this.x0,i.y=r+this.y0,i}function EM(i){var t,e,n,r,o,s,a,l,h;if(n=i.x-this.x0,r=i.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=B)t=X(n/this.a+this.long0),e=0;else{s=this.lat0+r/this.a,a=n*n/this.a/this.a+s*s,l=s;var u;for(o=ep;o;--o)if(u=Math.tan(l),h=-1*(s*(l*u+1)-l-.5*(l*l+a)*u)/((l-s)/u-1),l+=h,Math.abs(h)<=B){e=l;break}t=X(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(e))}else if(Math.abs(r+this.ml0)<=B)e=0,t=X(this.long0+n/this.a);else{s=(this.ml0+r)/this.a,a=n*n/this.a/this.a+s*s,l=s;var d,c,f,g,m;for(o=ep;o;--o)if(m=this.e*Math.sin(l),d=Math.sqrt(1-m*m)*Math.tan(l),c=this.a*Te(this.e0,this.e1,this.e2,this.e3,l),f=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),g=c/this.a,h=(s*(d*g+1)-g-.5*d*(g*g+a))/(this.es*Math.sin(2*l)*(g*g+a-2*s*g)/(4*d)+(s-g)*(d*f-2/Math.sin(2*l))-f),l-=h,Math.abs(h)<=B){e=l;break}d=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),t=X(this.long0+Math.asin(n*d/this.a)/Math.sin(e))}return i.x=t,i.y=e,i}var CM=["Polyconic","poly"];const SM={init:wM,forward:MM,inverse:EM,names:CM};function TM(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function zM(i){var t,e=i.x,n=i.y,r=n-this.lat0,o=e-this.long0,s=r/os*1e-5,a=o,l=1,h=0;for(t=1;t<=10;t++)l=l*s,h=h+this.A[t]*l;var u=h,d=a,c=1,f=0,g,m,p=0,_=0;for(t=1;t<=6;t++)g=c*u-f*d,m=f*u+c*d,c=g,f=m,p=p+this.B_re[t]*c-this.B_im[t]*f,_=_+this.B_im[t]*c+this.B_re[t]*f;return i.x=_*this.a+this.x0,i.y=p*this.a+this.y0,i}function RM(i){var t,e=i.x,n=i.y,r=e-this.x0,o=n-this.y0,s=o/this.a,a=r/this.a,l=1,h=0,u,d,c=0,f=0;for(t=1;t<=6;t++)u=l*s-h*a,d=h*s+l*a,l=u,h=d,c=c+this.C_re[t]*l-this.C_im[t]*h,f=f+this.C_im[t]*l+this.C_re[t]*h;for(var g=0;g<this.iterations;g++){var m=c,p=f,_,v,y=s,x=a;for(t=2;t<=6;t++)_=m*c-p*f,v=p*c+m*f,m=_,p=v,y=y+(t-1)*(this.B_re[t]*m-this.B_im[t]*p),x=x+(t-1)*(this.B_im[t]*m+this.B_re[t]*p);m=1,p=0;var k=this.B_re[1],w=this.B_im[1];for(t=2;t<=6;t++)_=m*c-p*f,v=p*c+m*f,m=_,p=v,k=k+t*(this.B_re[t]*m-this.B_im[t]*p),w=w+t*(this.B_im[t]*m+this.B_re[t]*p);var C=k*k+w*w;c=(y*k+x*w)/C,f=(x*k-y*w)/C}var M=c,S=f,R=1,A=0;for(t=1;t<=9;t++)R=R*M,A=A+this.D[t]*R;var G=this.lat0+A*os*1e5,P=this.long0+S;return i.x=P,i.y=G,i}var IM=["New_Zealand_Map_Grid","nzmg"];const PM={init:TM,forward:zM,inverse:RM,names:IM};function AM(){}function DM(i){var t=i.x,e=i.y,n=X(t-this.long0),r=this.x0+this.a*n,o=this.y0+this.a*Math.log(Math.tan(Math.PI/4+e/2.5))*1.25;return i.x=r,i.y=o,i}function LM(i){i.x-=this.x0,i.y-=this.y0;var t=X(this.long0+i.x/this.a),e=2.5*(Math.atan(Math.exp(.8*i.y/this.a))-Math.PI/4);return i.x=t,i.y=e,i}var FM=["Miller_Cylindrical","mill"];const OM={init:AM,forward:DM,inverse:LM,names:FM};var NM=20;function GM(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Hm(this.es)}function jM(i){var t,e,n=i.x,r=i.y;if(n=X(n-this.long0),this.sphere){if(!this.m)r=this.n!==1?Math.asin(this.n*Math.sin(r)):r;else for(var o=this.n*Math.sin(r),s=NM;s;--s){var a=(this.m*r+Math.sin(r)-o)/(this.m+Math.cos(r));if(r-=a,Math.abs(a)<B)break}t=this.a*this.C_x*n*(this.m+Math.cos(r)),e=this.a*this.C_y*r}else{var l=Math.sin(r),h=Math.cos(r);e=this.a*tl(r,l,h,this.en),t=this.a*n*h/Math.sqrt(1-this.es*l*l)}return i.x=t,i.y=e,i}function BM(i){var t,e,n,r;return i.x-=this.x0,n=i.x/this.a,i.y-=this.y0,t=i.y/this.a,this.sphere?(t/=this.C_y,n=n/(this.C_x*(this.m+Math.cos(t))),this.m?t=Sn((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=Sn(Math.sin(t)/this.n)),n=X(n+this.long0),t=io(t)):(t=Jm(i.y/this.a,this.es,this.en),r=Math.abs(t),r<I?(r=Math.sin(t),e=this.long0+i.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(t)),n=X(e)):r-B<I&&(n=this.long0)),i.x=n,i.y=t,i}var UM=["Sinusoidal","sinu"];const VM={init:GM,forward:jM,inverse:BM,names:UM};function qM(){}function XM(i){for(var t=i.x,e=i.y,n=X(t-this.long0),r=e,o=Math.PI*Math.sin(e);;){var s=-(r+Math.sin(r)-o)/(1+Math.cos(r));if(r+=s,Math.abs(s)<B)break}r/=2,Math.PI/2-Math.abs(e)<B&&(n=0);var a=.900316316158*this.a*n*Math.cos(r)+this.x0,l=1.4142135623731*this.a*Math.sin(r)+this.y0;return i.x=a,i.y=l,i}function $M(i){var t,e;i.x-=this.x0,i.y-=this.y0,e=i.y/(1.4142135623731*this.a),Math.abs(e)>.999999999999&&(e=.999999999999),t=Math.asin(e);var n=X(this.long0+i.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),e=(2*t+Math.sin(2*t))/Math.PI,Math.abs(e)>1&&(e=1);var r=Math.asin(e);return i.x=n,i.y=r,i}var WM=["Mollweide","moll"];const YM={init:qM,forward:XM,inverse:$M,names:WM};function KM(){Math.abs(this.lat1+this.lat2)<B||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=cs(this.es),this.e1=fs(this.es),this.e2=gs(this.es),this.e3=ms(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=_i(this.e,this.sinphi,this.cosphi),this.ml1=Te(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<B?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=_i(this.e,this.sinphi,this.cosphi),this.ml2=Te(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Te(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function ZM(i){var t=i.x,e=i.y,n;if(this.sphere)n=this.a*(this.g-e);else{var r=Te(this.e0,this.e1,this.e2,this.e3,e);n=this.a*(this.g-r)}var o=this.ns*X(t-this.long0),s=this.x0+n*Math.sin(o),a=this.y0+this.rh-n*Math.cos(o);return i.x=s,i.y=a,i}function HM(i){i.x-=this.x0,i.y=this.rh-i.y+this.y0;var t,e,n,r;this.ns>=0?(e=Math.sqrt(i.x*i.x+i.y*i.y),t=1):(e=-Math.sqrt(i.x*i.x+i.y*i.y),t=-1);var o=0;if(e!==0&&(o=Math.atan2(t*i.x,t*i.y)),this.sphere)return r=X(this.long0+o/this.ns),n=io(this.g-e/this.a),i.x=r,i.y=n,i;var s=this.g-e/this.a;return n=nl(s,this.e0,this.e1,this.e2,this.e3),r=X(this.long0+o/this.ns),i.x=r,i.y=n,i}var JM=["Equidistant_Conic","eqdc"];const QM={init:KM,forward:ZM,inverse:HM,names:JM};function tE(){this.R=this.a}function eE(i){var t=i.x,e=i.y,n=X(t-this.long0),r,o;Math.abs(e)<=B&&(r=this.x0+this.R*n,o=this.y0);var s=Sn(2*Math.abs(e/Math.PI));(Math.abs(n)<=B||Math.abs(Math.abs(e)-I)<=B)&&(r=this.x0,e>=0?o=this.y0+Math.PI*this.R*Math.tan(.5*s):o=this.y0+Math.PI*this.R*-Math.tan(.5*s));var a=.5*Math.abs(Math.PI/n-n/Math.PI),l=a*a,h=Math.sin(s),u=Math.cos(s),d=u/(h+u-1),c=d*d,f=d*(2/h-1),g=f*f,m=Math.PI*this.R*(a*(d-g)+Math.sqrt(l*(d-g)*(d-g)-(g+l)*(c-g)))/(g+l);n<0&&(m=-m),r=this.x0+m;var p=l+d;return m=Math.PI*this.R*(f*p-a*Math.sqrt((g+l)*(l+1)-p*p))/(g+l),e>=0?o=this.y0+m:o=this.y0-m,i.x=r,i.y=o,i}function iE(i){var t,e,n,r,o,s,a,l,h,u,d,c,f;return i.x-=this.x0,i.y-=this.y0,d=Math.PI*this.R,n=i.x/d,r=i.y/d,o=n*n+r*r,s=-Math.abs(r)*(1+o),a=s-2*r*r+n*n,l=-2*s+1+2*r*r+o*o,f=r*r/l+(2*a*a*a/l/l/l-9*s*a/l/l)/27,h=(s-a*a/3/l)/l,u=2*Math.sqrt(-h/3),d=3*f/h/u,Math.abs(d)>1&&(d>=0?d=1:d=-1),c=Math.acos(d)/3,i.y>=0?e=(-u*Math.cos(c+Math.PI/3)-a/3/l)*Math.PI:e=-(-u*Math.cos(c+Math.PI/3)-a/3/l)*Math.PI,Math.abs(n)<B?t=this.long0:t=X(this.long0+Math.PI*(o-1+Math.sqrt(1+2*(n*n-r*r)+o*o))/2/n),i.x=t,i.y=e,i}var nE=["Van_der_Grinten_I","VanDerGrinten","vandg"];const rE={init:tE,forward:eE,inverse:iE,names:nE};function oE(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function sE(i){var t=i.x,e=i.y,n=Math.sin(i.y),r=Math.cos(i.y),o=X(t-this.long0),s,a,l,h,u,d,c,f,g,m,p,_,v,y,x,k,w,C,M,S,R,A,G;return this.sphere?Math.abs(this.sin_p12-1)<=B?(i.x=this.x0+this.a*(I-e)*Math.sin(o),i.y=this.y0-this.a*(I-e)*Math.cos(o),i):Math.abs(this.sin_p12+1)<=B?(i.x=this.x0+this.a*(I+e)*Math.sin(o),i.y=this.y0+this.a*(I+e)*Math.cos(o),i):(C=this.sin_p12*n+this.cos_p12*r*Math.cos(o),k=Math.acos(C),w=k?k/Math.sin(k):1,i.x=this.x0+this.a*w*r*Math.sin(o),i.y=this.y0+this.a*w*(this.cos_p12*n-this.sin_p12*r*Math.cos(o)),i):(s=cs(this.es),a=fs(this.es),l=gs(this.es),h=ms(this.es),Math.abs(this.sin_p12-1)<=B?(u=this.a*Te(s,a,l,h,I),d=this.a*Te(s,a,l,h,e),i.x=this.x0+(u-d)*Math.sin(o),i.y=this.y0-(u-d)*Math.cos(o),i):Math.abs(this.sin_p12+1)<=B?(u=this.a*Te(s,a,l,h,I),d=this.a*Te(s,a,l,h,e),i.x=this.x0+(u+d)*Math.sin(o),i.y=this.y0+(u+d)*Math.cos(o),i):(c=n/r,f=eo(this.a,this.e,this.sin_p12),g=eo(this.a,this.e,n),m=Math.atan((1-this.es)*c+this.es*f*this.sin_p12/(g*r)),p=Math.atan2(Math.sin(o),this.cos_p12*Math.tan(m)-this.sin_p12*Math.cos(o)),p===0?M=Math.asin(this.cos_p12*Math.sin(m)-this.sin_p12*Math.cos(m)):Math.abs(Math.abs(p)-Math.PI)<=B?M=-Math.asin(this.cos_p12*Math.sin(m)-this.sin_p12*Math.cos(m)):M=Math.asin(Math.sin(o)*Math.cos(m)/Math.sin(p)),_=this.e*this.sin_p12/Math.sqrt(1-this.es),v=this.e*this.cos_p12*Math.cos(p)/Math.sqrt(1-this.es),y=_*v,x=v*v,S=M*M,R=S*M,A=R*M,G=A*M,k=f*M*(1-S*x*(1-x)/6+R/8*y*(1-2*x)+A/120*(x*(4-7*x)-3*_*_*(1-7*x))-G/48*y),i.x=this.x0+k*Math.sin(p),i.y=this.y0+k*Math.cos(p),i))}function aE(i){i.x-=this.x0,i.y-=this.y0;var t,e,n,r,o,s,a,l,h,u,d,c,f,g,m,p,_,v,y,x,k,w,C,M;return this.sphere?(t=Math.sqrt(i.x*i.x+i.y*i.y),t>2*I*this.a?void 0:(e=t/this.a,n=Math.sin(e),r=Math.cos(e),o=this.long0,Math.abs(t)<=B?s=this.lat0:(s=Sn(r*this.sin_p12+i.y*n*this.cos_p12/t),a=Math.abs(this.lat0)-I,Math.abs(a)<=B?this.lat0>=0?o=X(this.long0+Math.atan2(i.x,-i.y)):o=X(this.long0-Math.atan2(-i.x,i.y)):o=X(this.long0+Math.atan2(i.x*n,t*this.cos_p12*r-i.y*this.sin_p12*n))),i.x=o,i.y=s,i)):(l=cs(this.es),h=fs(this.es),u=gs(this.es),d=ms(this.es),Math.abs(this.sin_p12-1)<=B?(c=this.a*Te(l,h,u,d,I),t=Math.sqrt(i.x*i.x+i.y*i.y),f=c-t,s=nl(f/this.a,l,h,u,d),o=X(this.long0+Math.atan2(i.x,-1*i.y)),i.x=o,i.y=s,i):Math.abs(this.sin_p12+1)<=B?(c=this.a*Te(l,h,u,d,I),t=Math.sqrt(i.x*i.x+i.y*i.y),f=t-c,s=nl(f/this.a,l,h,u,d),o=X(this.long0+Math.atan2(i.x,i.y)),i.x=o,i.y=s,i):(t=Math.sqrt(i.x*i.x+i.y*i.y),p=Math.atan2(i.x,i.y),g=eo(this.a,this.e,this.sin_p12),_=Math.cos(p),v=this.e*this.cos_p12*_,y=-v*v/(1-this.es),x=3*this.es*(1-y)*this.sin_p12*this.cos_p12*_/(1-this.es),k=t/g,w=k-y*(1+y)*Math.pow(k,3)/6-x*(1+3*y)*Math.pow(k,4)/24,C=1-y*w*w/2-k*w*w*w/6,m=Math.asin(this.sin_p12*Math.cos(w)+this.cos_p12*Math.sin(w)*_),o=X(this.long0+Math.asin(Math.sin(p)*Math.sin(w)/Math.cos(m))),M=Math.sin(m),s=Math.atan2((M-this.es*C*this.sin_p12)*Math.tan(m),M*(1-this.es)),i.x=o,i.y=s,i))}var lE=["Azimuthal_Equidistant","aeqd"];const hE={init:oE,forward:sE,inverse:aE,names:lE};function uE(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function dE(i){var t,e,n,r,o,s,a,l,h=i.x,u=i.y;return n=X(h-this.long0),t=Math.sin(u),e=Math.cos(u),r=Math.cos(n),s=this.sin_p14*t+this.cos_p14*e*r,o=1,(s>0||Math.abs(s)<=B)&&(a=this.a*o*e*Math.sin(n),l=this.y0+this.a*o*(this.cos_p14*t-this.sin_p14*e*r)),i.x=a,i.y=l,i}function cE(i){var t,e,n,r,o,s,a;return i.x-=this.x0,i.y-=this.y0,t=Math.sqrt(i.x*i.x+i.y*i.y),e=Sn(t/this.a),n=Math.sin(e),r=Math.cos(e),s=this.long0,Math.abs(t)<=B?(a=this.lat0,i.x=s,i.y=a,i):(a=Sn(r*this.sin_p14+i.y*n*this.cos_p14/t),o=Math.abs(this.lat0)-I,Math.abs(o)<=B?(this.lat0>=0?s=X(this.long0+Math.atan2(i.x,-i.y)):s=X(this.long0-Math.atan2(-i.x,i.y)),i.x=s,i.y=a,i):(s=X(this.long0+Math.atan2(i.x*n,t*this.cos_p14*r-i.y*this.sin_p14*n)),i.x=s,i.y=a,i))}var fE=["ortho"];const gE={init:uE,forward:dE,inverse:cE,names:fE};var Xt={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},Pt={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function mE(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=I-It/2?this.face=Xt.TOP:this.lat0<=-(I-It/2)?this.face=Xt.BOTTOM:Math.abs(this.long0)<=It?this.face=Xt.FRONT:Math.abs(this.long0)<=I+It?this.face=this.long0>0?Xt.RIGHT:Xt.LEFT:this.face=Xt.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function pE(i){var t={x:0,y:0},e,n,r,o,s,a,l={value:0};if(i.x-=this.long0,this.es!==0?e=Math.atan(this.one_minus_f_squared*Math.tan(i.y)):e=i.y,n=i.x,this.face===Xt.TOP)o=I-e,n>=It&&n<=I+It?(l.value=Pt.AREA_0,r=n-I):n>I+It||n<=-(I+It)?(l.value=Pt.AREA_1,r=n>0?n-Zt:n+Zt):n>-(I+It)&&n<=-It?(l.value=Pt.AREA_2,r=n+I):(l.value=Pt.AREA_3,r=n);else if(this.face===Xt.BOTTOM)o=I+e,n>=It&&n<=I+It?(l.value=Pt.AREA_0,r=-n+I):n<It&&n>=-It?(l.value=Pt.AREA_1,r=-n):n<-It&&n>=-(I+It)?(l.value=Pt.AREA_2,r=-n-I):(l.value=Pt.AREA_3,r=n>0?-n+Zt:-n-Zt);else{var h,u,d,c,f,g,m;this.face===Xt.RIGHT?n=no(n,+I):this.face===Xt.BACK?n=no(n,+Zt):this.face===Xt.LEFT&&(n=no(n,-I)),c=Math.sin(e),f=Math.cos(e),g=Math.sin(n),m=Math.cos(n),h=f*m,u=f*g,d=c,this.face===Xt.FRONT?(o=Math.acos(h),r=rl(o,d,u,l)):this.face===Xt.RIGHT?(o=Math.acos(u),r=rl(o,d,-h,l)):this.face===Xt.BACK?(o=Math.acos(-h),r=rl(o,d,-u,l)):this.face===Xt.LEFT?(o=Math.acos(-u),r=rl(o,d,h,l)):(o=r=0,l.value=Pt.AREA_0)}return a=Math.atan(12/Zt*(r+Math.acos(Math.sin(r)*Math.cos(It))-I)),s=Math.sqrt((1-Math.cos(o))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(r))))),l.value===Pt.AREA_1?a+=I:l.value===Pt.AREA_2?a+=Zt:l.value===Pt.AREA_3&&(a+=1.5*Zt),t.x=s*Math.cos(a),t.y=s*Math.sin(a),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,i.x=t.x,i.y=t.y,i}function vE(i){var t={lam:0,phi:0},e,n,r,o,s,a,l,h,u,d={value:0};if(i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,n=Math.atan(Math.sqrt(i.x*i.x+i.y*i.y)),e=Math.atan2(i.y,i.x),i.x>=0&&i.x>=Math.abs(i.y)?d.value=Pt.AREA_0:i.y>=0&&i.y>=Math.abs(i.x)?(d.value=Pt.AREA_1,e-=I):i.x<0&&-i.x>=Math.abs(i.y)?(d.value=Pt.AREA_2,e=e<0?e+Zt:e-Zt):(d.value=Pt.AREA_3,e+=I),u=Zt/12*Math.tan(e),s=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),a=Math.atan(s),r=Math.cos(e),o=Math.tan(n),l=1-r*r*o*o*(1-Math.cos(Math.atan(1/Math.cos(a)))),l<-1?l=-1:l>1&&(l=1),this.face===Xt.TOP)h=Math.acos(l),t.phi=I-h,d.value===Pt.AREA_0?t.lam=a+I:d.value===Pt.AREA_1?t.lam=a<0?a+Zt:a-Zt:d.value===Pt.AREA_2?t.lam=a-I:t.lam=a;else if(this.face===Xt.BOTTOM)h=Math.acos(l),t.phi=h-I,d.value===Pt.AREA_0?t.lam=-a+I:d.value===Pt.AREA_1?t.lam=-a:d.value===Pt.AREA_2?t.lam=-a-I:t.lam=a<0?-a-Zt:-a+Zt;else{var c,f,g;c=l,u=c*c,u>=1?g=0:g=Math.sqrt(1-u)*Math.sin(a),u+=g*g,u>=1?f=0:f=Math.sqrt(1-u),d.value===Pt.AREA_1?(u=f,f=-g,g=u):d.value===Pt.AREA_2?(f=-f,g=-g):d.value===Pt.AREA_3&&(u=f,f=g,g=-u),this.face===Xt.RIGHT?(u=c,c=-f,f=u):this.face===Xt.BACK?(c=-c,f=-f):this.face===Xt.LEFT&&(u=c,c=f,f=-u),t.phi=Math.acos(-g)-I,t.lam=Math.atan2(f,c),this.face===Xt.RIGHT?t.lam=no(t.lam,-I):this.face===Xt.BACK?t.lam=no(t.lam,-Zt):this.face===Xt.LEFT&&(t.lam=no(t.lam,+I))}if(this.es!==0){var m,p,_;m=t.phi<0?1:0,p=Math.tan(t.phi),_=this.b/Math.sqrt(p*p+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-_*_)/(this.one_minus_f*_)),m&&(t.phi=-t.phi)}return t.lam+=this.long0,i.x=t.lam,i.y=t.phi,i}function rl(i,t,e,n){var r;return i<B?(n.value=Pt.AREA_0,r=0):(r=Math.atan2(t,e),Math.abs(r)<=It?n.value=Pt.AREA_0:r>It&&r<=I+It?(n.value=Pt.AREA_1,r-=I):r>I+It||r<=-(I+It)?(n.value=Pt.AREA_2,r=r>=0?r-Zt:r+Zt):(n.value=Pt.AREA_3,r+=I)),r}function no(i,t){var e=i+t;return e<-Zt?e+=ss:e>+Zt&&(e-=ss),e}var _E=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const yE={init:mE,forward:pE,inverse:vE,names:_E};var od=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],ps=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],ip=.8487,np=1.3523,rp=vi/5,xE=1/rp,ro=18,ol=function(i,t){return i[0]+t*(i[1]+t*(i[2]+t*i[3]))},bE=function(i,t){return i[1]+t*(2*i[2]+t*3*i[3])};function kE(i,t,e,n){for(var r=t;n;--n){var o=i(r);if(r-=o,Math.abs(o)<e)break}return r}function wE(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function ME(i){var t=X(i.x-this.long0),e=Math.abs(i.y),n=Math.floor(e*rp);n<0?n=0:n>=ro&&(n=ro-1),e=vi*(e-xE*n);var r={x:ol(od[n],e)*t,y:ol(ps[n],e)};return i.y<0&&(r.y=-r.y),r.x=r.x*this.a*ip+this.x0,r.y=r.y*this.a*np+this.y0,r}function EE(i){var t={x:(i.x-this.x0)/(this.a*ip),y:Math.abs(i.y-this.y0)/(this.a*np)};if(t.y>=1)t.x/=od[ro][0],t.y=i.y<0?-I:I;else{var e=Math.floor(t.y*ro);for(e<0?e=0:e>=ro&&(e=ro-1);;)if(ps[e][0]>t.y)--e;else if(ps[e+1][0]<=t.y)++e;else break;var n=ps[e],r=5*(t.y-n[0])/(ps[e+1][0]-n[0]);r=kE(function(o){return(ol(n,o)-t.y)/bE(n,o)},r,B,100),t.x/=ol(od[e],r),t.y=(5*e+r)*he,i.y<0&&(t.y=-t.y)}return t.x=X(t.x+this.long0),t}var CE=["Robinson","robin"];const SE={init:wE,forward:ME,inverse:EE,names:CE};function TE(){this.name="geocent"}function zE(i){var t=Im(i,this.es,this.a);return t}function RE(i){var t=Pm(i,this.es,this.a,this.b);return t}var IE=["Geocentric","geocentric","geocent","Geocent"];const PE={init:TE,forward:zE,inverse:RE,names:IE};var pe={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},vs={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function AE(){if(Object.keys(vs).forEach(function(e){if(typeof this[e]>"u")this[e]=vs[e].def;else{if(vs[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);vs[e].num&&(this[e]=parseFloat(this[e]))}vs[e].degrees&&(this[e]=this[e]*he)}.bind(this)),Math.abs(Math.abs(this.lat0)-I)<B?this.mode=this.lat0<0?pe.S_POLE:pe.N_POLE:Math.abs(this.lat0)<B?this.mode=pe.EQUIT:(this.mode=pe.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var i=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(i),this.sw=Math.sin(i)}function DE(i){i.x-=this.long0;var t=Math.sin(i.y),e=Math.cos(i.y),n=Math.cos(i.x),r,o;switch(this.mode){case pe.OBLIQ:o=this.sinph0*t+this.cosph0*e*n;break;case pe.EQUIT:o=e*n;break;case pe.S_POLE:o=-t;break;case pe.N_POLE:o=t;break}switch(o=this.pn1/(this.p-o),r=o*e*Math.sin(i.x),this.mode){case pe.OBLIQ:o*=this.cosph0*t-this.sinph0*e*n;break;case pe.EQUIT:o*=t;break;case pe.N_POLE:o*=-(e*n);break;case pe.S_POLE:o*=e*n;break}var s,a;return s=o*this.cg+r*this.sg,a=1/(s*this.sw*this.h1+this.cw),r=(r*this.cg-o*this.sg)*this.cw*a,o=s*a,i.x=r*this.a,i.y=o*this.a,i}function LE(i){i.x/=this.a,i.y/=this.a;var t={x:i.x,y:i.y},e,n,r;r=1/(this.pn1-i.y*this.sw),e=this.pn1*i.x*r,n=this.pn1*i.y*this.cw*r,i.x=e*this.cg+n*this.sg,i.y=n*this.cg-e*this.sg;var o=ai(i.x,i.y);if(Math.abs(o)<B)t.x=0,t.y=i.y;else{var s,a;switch(a=1-o*o*this.pfact,a=(this.p-Math.sqrt(a))/(this.pn1/o+o/this.pn1),s=Math.sqrt(1-a*a),this.mode){case pe.OBLIQ:t.y=Math.asin(s*this.sinph0+i.y*a*this.cosph0/o),i.y=(s-this.sinph0*Math.sin(t.y))*o,i.x*=a*this.cosph0;break;case pe.EQUIT:t.y=Math.asin(i.y*a/o),i.y=s*o,i.x*=a;break;case pe.N_POLE:t.y=Math.asin(s),i.y=-i.y;break;case pe.S_POLE:t.y=-Math.asin(s);break}t.x=Math.atan2(i.x,i.y)}return i.x=t.x+this.long0,i.y=t.y,i}var FE=["Tilted_Perspective","tpers"];const OE={init:AE,forward:DE,inverse:LE,names:FE};function NE(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var i=1-this.es,t=1/i;this.radius_p=Math.sqrt(i),this.radius_p2=i,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function GE(i){var t=i.x,e=i.y,n,r,o,s;if(t=t-this.long0,this.shape==="ellipse"){e=Math.atan(this.radius_p2*Math.tan(e));var a=this.radius_p/ai(this.radius_p*Math.cos(e),Math.sin(e));if(r=a*Math.cos(t)*Math.cos(e),o=a*Math.sin(t)*Math.cos(e),s=a*Math.sin(e),(this.radius_g-r)*r-o*o-s*s*this.radius_p_inv2<0)return i.x=Number.NaN,i.y=Number.NaN,i;n=this.radius_g-r,this.flip_axis?(i.x=this.radius_g_1*Math.atan(o/ai(s,n)),i.y=this.radius_g_1*Math.atan(s/n)):(i.x=this.radius_g_1*Math.atan(o/n),i.y=this.radius_g_1*Math.atan(s/ai(o,n)))}else this.shape==="sphere"&&(n=Math.cos(e),r=Math.cos(t)*n,o=Math.sin(t)*n,s=Math.sin(e),n=this.radius_g-r,this.flip_axis?(i.x=this.radius_g_1*Math.atan(o/ai(s,n)),i.y=this.radius_g_1*Math.atan(s/n)):(i.x=this.radius_g_1*Math.atan(o/n),i.y=this.radius_g_1*Math.atan(s/ai(o,n))));return i.x=i.x*this.a,i.y=i.y*this.a,i}function jE(i){var t=-1,e=0,n=0,r,o,s,a;if(i.x=i.x/this.a,i.y=i.y/this.a,this.shape==="ellipse"){this.flip_axis?(n=Math.tan(i.y/this.radius_g_1),e=Math.tan(i.x/this.radius_g_1)*ai(1,n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*ai(1,e));var l=n/this.radius_p;if(r=e*e+l*l+t*t,o=2*this.radius_g*t,s=o*o-4*r*this.C,s<0)return i.x=Number.NaN,i.y=Number.NaN,i;a=(-o-Math.sqrt(s))/(2*r),t=this.radius_g+a*t,e*=a,n*=a,i.x=Math.atan2(e,t),i.y=Math.atan(n*Math.cos(i.x)/t),i.y=Math.atan(this.radius_p_inv2*Math.tan(i.y))}else if(this.shape==="sphere"){if(this.flip_axis?(n=Math.tan(i.y/this.radius_g_1),e=Math.tan(i.x/this.radius_g_1)*Math.sqrt(1+n*n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*Math.sqrt(1+e*e)),r=e*e+n*n+t*t,o=2*this.radius_g*t,s=o*o-4*r*this.C,s<0)return i.x=Number.NaN,i.y=Number.NaN,i;a=(-o-Math.sqrt(s))/(2*r),t=this.radius_g+a*t,e*=a,n*=a,i.x=Math.atan2(e,t),i.y=Math.atan(n*Math.cos(i.x)/t)}return i.x=i.x+this.long0,i}var BE=["Geostationary Satellite View","Geostationary_Satellite","geos"];const UE={init:NE,forward:GE,inverse:jE,names:BE};function VE(i){i.Proj.projections.add(el),i.Proj.projections.add(il),i.Proj.projections.add(K2),i.Proj.projections.add(o5),i.Proj.projections.add(d5),i.Proj.projections.add(p5),i.Proj.projections.add(k5),i.Proj.projections.add(S5),i.Proj.projections.add(P5),i.Proj.projections.add(O5),i.Proj.projections.add(tM),i.Proj.projections.add(sM),i.Proj.projections.add(dM),i.Proj.projections.add(vM),i.Proj.projections.add(kM),i.Proj.projections.add(SM),i.Proj.projections.add(PM),i.Proj.projections.add(OM),i.Proj.projections.add(VM),i.Proj.projections.add(YM),i.Proj.projections.add(QM),i.Proj.projections.add(rE),i.Proj.projections.add(hE),i.Proj.projections.add(gE),i.Proj.projections.add(yE),i.Proj.projections.add(SE),i.Proj.projections.add(PE),i.Proj.projections.add(OE),i.Proj.projections.add(UE)}Le.defaultDatum="WGS84",Le.Proj=yi,Le.WGS84=new Le.Proj("WGS84"),Le.Point=Qr,Le.toPoint=Fm,Le.defs=Se,Le.nadgrid=Hw,Le.transform=Qa,Le.mgrs=f2,Le.version="__VERSION__",VE(Le),Le.defs("EPSG:27700","+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs"),cw(Le);const op=Gt("EPSG:27700"),_C=zp``;function qE(i){return new j_({units:"metric",bar:i,steps:4,text:!0,minWidth:140})}const XE=`:host{display:block;width:650px;height:650px;position:relative}.map{height:100%;opacity:0;transition:opacity .25s;overflow:hidden;border:#000000 solid .15em}.map:focus{outline:#ffdd00 solid .25em}.ol-control button{border-radius:0!important;background-color:#2c2c2c!important;cursor:pointer;min-width:44px;min-height:44px;font-size:1.75rem}.ol-control button:hover{background-color:#2c2c2cd9!important}.reset-control{top:114px;left:.5em}#area{position:absolute;bottom:0;left:0;z-index:100;background:white}
83
- `,$E="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjJweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjcgMzciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMy41MDA3IDAuNTgzMzc0QzYuNTY2OSAwLjU4MzM3NCAwLjk1ODk4NCA2LjE5MTI5IDAuOTU4OTg0IDEzLjEyNUMwLjk1ODk4NCAxNi4yNDI1IDEuODU0ODIgMTkuMTYzIDMuNDg1MjMgMjEuNzk2N0M1LjE4NzMyIDI0LjU1NTkgNy40MjY5IDI2LjkyMDkgOS4xNDY5IDI5LjY4QzkuOTg4OTggMzEuMDIzOCAxMC41OTgyIDMyLjI3OCAxMS4yNDMyIDMzLjcyOTJDMTEuNzA5IDM0LjcxNDYgMTIuMDg1MiAzNi40MTY3IDEzLjUwMDcgMzYuNDE2N0MxNC45MTYxIDM2LjQxNjcgMTUuMjkyMyAzNC43MTQ2IDE1Ljc0MDIgMzMuNzI5MkMxNi40MDMyIDMyLjI3OCAxNi45OTQ0IDMxLjAyMzggMTcuODM2NSAyOS42OEMxOS41NTY1IDI2LjkzODggMjEuNzk2MSAyNC41NzM4IDIzLjQ5ODIgMjEuNzk2N0MyNS4xNDY1IDE5LjE2MyAyNi4wNDIzIDE2LjI0MjUgMjYuMDQyMyAxMy4xMjVDMjYuMDQyMyA2LjE5MTI5IDIwLjQzNDQgMC41ODMzNzQgMTMuNTAwNyAwLjU4MzM3NFpNMTMuNTAwNyAxOC4wNTIxQzExLjAyODIgMTguMDUyMSA5LjAyMTQ4IDE2LjA0NTUgOS4wMjE0OCAxMy41NzNDOS4wMjE0OCAxMS4xMDA1IDExLjAyODIgOS4wOTM3OSAxMy41MDA3IDkuMDkzNzlDMTUuOTczMiA5LjA5Mzc5IDE3Ljk3OTggMTEuMTAwNSAxNy45Nzk4IDEzLjU3M0MxNy45Nzk4IDE2LjA0NTUgMTUuOTczMiAxOC4wNTIxIDEzLjUwMDcgMTguMDUyMVoiIGZpbGw9ImJsYWNrIi8+Cjwvc3ZnPgo=";var sp=Object.freeze,ap=Object.defineProperty,WE=Object.getOwnPropertyDescriptor,bt=(i,t,e,n)=>{for(var r=n>1?void 0:n?WE(t,e):t,o=i.length-1,s;o>=0;o--)(s=i[o])&&(r=(n?s(t,e,r):s(r))||r);return n&&r&&ap(t,e,r),r},YE=(i,t)=>sp(ap(i,"raw",{value:sp(t||i.slice())})),lp;q.MyMap=class extends Pn{constructor(){super(),this.id="map",this.latitude=51.507351,this.longitude=-.127758,this.projection="EPSG:4326",this.zoom=10,this.minZoom=7,this.maxZoom=22,this.drawMode=!1,this.drawGeojsonData={type:"Feature",geometry:{}},this.drawGeojsonDataBuffer=100,this.drawPointer="crosshair",this.showFeaturesAtPoint=!1,this.clickFeatures=!1,this.featureColor="#0000ff",this.featureFill=!1,this.featureBorderNone=!1,this.featureBuffer=40,this.showMarker=!1,this.markerLatitude=this.latitude,this.markerLongitude=this.longitude,this.markerColor="#000000",this.geojsonData={type:"FeatureCollection",features:[]},this.geojsonColor="#ff0000",this.geojsonFill=!1,this.geojsonBuffer=12,this.disableVectorTiles=!1,this.osVectorTilesApiKey="a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",this.osFeaturesApiKey="a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",this.osCopyright=`\xA9 Crown copyright and database rights ${new Date().getFullYear()} OS (0)100024857`,this.hideResetControl=!1,this.staticMode=!1,this.areaUnit="m2",this.showScale=!1,this.useScaleBarStyle=!1,this.markerImage="circle",this.dispatch=(i,t)=>this.dispatchEvent(new CustomEvent(i,{detail:t}))}firstUpdated(){var y;const i=this.renderRoot.querySelector(`#${this.id}`),t=!this.disableVectorTiles&&Boolean(this.osVectorTilesApiKey),e=uw(this.osCopyright,this.osVectorTilesApiKey),n=dw(this.osCopyright,this.osVectorTilesApiKey),r=this.projection==="EPSG:27700"&&Boolean(op)?op:this.projection,o=$s([this.longitude,this.latitude],r,"EPSG:3857"),s=new O_({target:i,layers:[t?n:e],view:new en({projection:"EPSG:3857",extent:B0([-10.76418,49.528423,1.9134116,61.331151],"EPSG:4326","EPSG:3857"),minZoom:this.minZoom,maxZoom:this.maxZoom,center:o,zoom:this.zoom,enableRotation:!1}),controls:Wc({attribution:!0,zoom:!this.staticMode}).extend(this.showScale?[qE(this.useScaleBarStyle)]:[]),interactions:Qc({doubleClickZoom:!this.staticMode,dragPan:!this.staticMode,mouseWheelZoom:!this.staticMode})});this.map=s;const a=Ik(this.drawPointer),l=Pk(this.drawPointer),h=document.createElement("button");h.innerHTML="\u21BB",h.title="Reset map view";const u=()=>{this.showFeaturesAtPoint?rs(s,pi,this.featureBuffer):g.getFeatures().length>0?rs(s,g,this.geojsonBuffer):(s.getView().setCenter(o),s.getView().setZoom(this.zoom)),this.drawMode&&(Li.clear(),this.dispatch("geojsonChange",{}),this.dispatch("areaChange",`0 ${this.areaUnit==="m2"?"m\xB2":this.areaUnit}`),s.addInteraction(a),s.addInteraction(nm))};h.addEventListener("click",u,!1);const d=document.createElement("div");d.className="reset-control ol-unselectable ol-control",d.appendChild(h);var c=new po({element:d});this.hideResetControl||s.addControl(c);const f=(y=this.renderRoot)==null?void 0:y.querySelectorAll(".ol-control button");f==null||f.forEach(x=>x.setAttribute("aria-label",x.getAttribute("title")||"")),s.on("pointerdrag",()=>{s.getViewport().style.cursor="grabbing"}),s.on("pointermove",()=>{s.getViewport().style.cursor="grab"});const g=new hn;if(this.geojsonData.type==="FeatureCollection"){let x=new Zn().readFeatures(this.geojsonData,{featureProjection:"EPSG:3857"});g.addFeatures(x)}else if(this.geojsonData.type==="Feature"){let x=new Zn().readFeature(this.geojsonData,{featureProjection:"EPSG:3857"});g.addFeature(x)}const m=new Qn({source:g,style:new le({stroke:new ke({color:this.geojsonColor,width:3}),fill:new ge({color:this.geojsonFill?$a(this.geojsonColor,.2):$a(this.geojsonColor,0)})})});if(s.addLayer(m),g.getFeatures().length>0){rs(s,g,this.geojsonBuffer);const x=g.getFeatures()[0].getGeometry();x&&this.dispatch("geojsonDataArea",Yu(x,this.areaUnit))}if(this.drawMode){Li.clear();const x=Object.keys(this.drawGeojsonData.geometry).length>0;if(x){let k=new Zn().readFeature(this.drawGeojsonData,{featureProjection:"EPSG:3857"});Li.addFeature(k),rs(s,Li,this.drawGeojsonDataBuffer)}s.addLayer(im),x||s.addInteraction(a),s.addInteraction(l),s.addInteraction(nm),Li.on("change",()=>{var w;const k=Li.getFeatures();if(k.length>0){const C=(w=Ck(k))==null?void 0:w.getGeometry();this.dispatch("geojsonChange",new Zn().writeFeaturesObject(k,{featureProjection:"EPSG:3857"})),C&&this.dispatch("areaChange",Yu(C,this.areaUnit)),s.removeInteraction(a)}})}if(this.drawMode&&Boolean(this.osVectorTilesApiKey)&&!this.disableVectorTiles){if(s.addLayer(Sk),im.setZIndex(1001),this.zoom<20){Yr.clear();const k=s.getView().calculateExtent(s.getSize());Hg(n,k)}s.on("moveend",()=>{const k=s.getView().getZoom();if(k&&k<20){Yr.clear();return}setTimeout(()=>{Yr.clear();const w=s.getView().calculateExtent(s.getSize());Hg(n,w)},200)})}if(this.showFeaturesAtPoint&&Boolean(this.osFeaturesApiKey)){vm(o,this.osFeaturesApiKey,!1),this.clickFeatures&&s.on("singleclick",k=>{vm(k.coordinate,this.osFeaturesApiKey,!0)});const x=ow(this.featureColor,this.featureFill,this.featureBorderNone);s.addLayer(x),pi.on("change",()=>{if(pi.getState()==="ready"&&pi.getFeatures().length>0){rs(s,pi,this.featureBuffer),this.dispatch("featuresGeojsonChange",new Zn().writeFeaturesObject(pi.getFeatures(),{featureProjection:"EPSG:3857"}));const k=pi.getFeatures()[0].getGeometry();k&&this.dispatch("featuresAreaChange",Yu(k,this.areaUnit))}})}const p=new Hn({radius:9,fill:new ge({color:this.markerColor})}),_=new ga({src:$E}),v=()=>{switch(this.markerImage){case"circle":return p;case"pin":return _}};if(this.showMarker){const x=new ni($s([this.markerLongitude,this.markerLatitude],r,"EPSG:3857")),k=new Qn({source:new hn({features:[new Ti(x)]}),style:new le({image:v()})});s.addLayer(k)}setTimeout(()=>{window.dispatchEvent(new Event("resize")),i.style.opacity="1",this.dispatch("ready")},500)}render(){return Bi(lp||(lp=YE([`<script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>
82
+ northing meters`+i;var c=d/2,f=0,g=0,m,p,_,v,y;return c>0&&(m=1e5/Math.pow(10,c),p=i.substring(o,o+c),f=parseFloat(p)*m,_=i.substring(o+c),g=parseFloat(_)*m),v=f+h,y=g+u,{easting:v,northing:y,zoneLetter:a,zoneNumber:s,accuracy:m}}function x2(i,t){for(var e=jm.charCodeAt(t-1),n=1e5,r=!1;e!==i.charCodeAt(0);){if(e++,e===Fe&&e++,e===Je&&e++,e>us){if(r)throw"Bad character: "+i;e=Hr,r=!0}n+=1e5}return n}function b2(i,t){if(i>"V")throw"MGRSPoint given invalid Northing "+i;for(var e=Bm.charCodeAt(t-1),n=0,r=!1;e!==i.charCodeAt(0);){if(e++,e===Fe&&e++,e===Je&&e++,e>hs){if(r)throw"Bad character: "+i;e=Hr,r=!0}n+=1e5}return n}function k2(i){var t;switch(i){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+i}function Jr(i,t,e){if(!(this instanceof Jr))return new Jr(i,t,e);if(Array.isArray(i))this.x=i[0],this.y=i[1],this.z=i[2]||0;else if(typeof i=="object")this.x=i.x,this.y=i.y,this.z=i.z||0;else if(typeof i=="string"&&typeof t>"u"){var n=i.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=i,this.y=t,this.z=e||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Jr.fromMGRS=function(i){return new Jr(Vm(i))},Jr.prototype.toMGRS=function(i){return Um([this.x,this.y],i)};var w2=1,E2=.25,Wm=.046875,Ym=.01953125,Km=.01068115234375,M2=.75,C2=.46875,S2=.013020833333333334,T2=.007120768229166667,z2=.3645833333333333,I2=.005696614583333333,R2=.3076171875;function Zm(i){var t=[];t[0]=w2-i*(E2+i*(Wm+i*(Ym+i*Km))),t[1]=i*(M2-i*(Wm+i*(Ym+i*Km)));var e=i*i;return t[2]=e*(C2-i*(S2+i*T2)),e*=i,t[3]=e*(z2-i*I2),t[4]=e*i*R2,t}function tl(i,t,e,n){return e*=t,t*=t,n[0]*i-e*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var P2=20;function Hm(i,t,e){for(var n=1/(1-t),r=i,o=P2;o;--o){var s=Math.sin(r),a=1-t*s*s;if(a=(tl(r,s,Math.cos(r),e)-i)*(a*Math.sqrt(a))*n,r-=a,Math.abs(a)<B)return r}return r}function A2(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=Zm(this.es),this.ml0=tl(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function D2(i){var t=i.x,e=i.y,n=X(t-this.long0),r,o,s,a=Math.sin(e),l=Math.cos(e);if(this.es){var u=l*n,d=Math.pow(u,2),c=this.ep2*Math.pow(l,2),f=Math.pow(c,2),g=Math.abs(l)>B?Math.tan(e):0,m=Math.pow(g,2),p=Math.pow(m,2);r=1-this.es*Math.pow(a,2),u=u/Math.sqrt(r);var _=tl(e,a,l,this.en);o=this.a*(this.k0*u*(1+d/6*(1-m+c+d/20*(5-18*m+p+14*c-58*m*c+d/42*(61+179*p-p*m-479*m)))))+this.x0,s=this.a*(this.k0*(_-this.ml0+a*n*u/2*(1+d/12*(5-m+9*c+4*f+d/30*(61+p-58*m+270*c-330*m*c+d/56*(1385+543*p-p*m-3111*m))))))+this.y0}else{var h=l*Math.sin(n);if(Math.abs(Math.abs(h)-1)<B)return 93;if(o=.5*this.a*this.k0*Math.log((1+h)/(1-h))+this.x0,s=l*Math.cos(n)/Math.sqrt(1-Math.pow(h,2)),h=Math.abs(s),h>=1){if(h-1>B)return 93;s=0}else s=Math.acos(s);e<0&&(s=-s),s=this.a*this.k0*(s-this.lat0)+this.y0}return i.x=o,i.y=s,i}function L2(i){var t,e,n,r,o=(i.x-this.x0)*(1/this.a),s=(i.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+s/this.k0,e=Hm(t,this.es,this.en),Math.abs(e)<R){var d=Math.sin(e),c=Math.cos(e),f=Math.abs(c)>B?Math.tan(e):0,g=this.ep2*Math.pow(c,2),m=Math.pow(g,2),p=Math.pow(f,2),_=Math.pow(p,2);t=1-this.es*Math.pow(d,2);var v=o*Math.sqrt(t)/this.k0,y=Math.pow(v,2);t=t*f,n=e-t*y/(1-this.es)*.5*(1-y/12*(5+3*p-9*g*p+g-4*m-y/30*(61+90*p-252*g*p+45*_+46*g-y/56*(1385+3633*p+4095*_+1574*_*p)))),r=X(this.long0+v*(1-y/6*(1+2*p+g-y/20*(5+28*p+24*_+8*g*p+6*g-y/42*(61+662*p+1320*_+720*_*p))))/c)}else n=R*as(s),r=0;else{var a=Math.exp(o/this.k0),l=.5*(a-1/a),h=this.lat0+s/this.k0,u=Math.cos(h);t=Math.sqrt((1-Math.pow(u,2))/(1+Math.pow(l,2))),n=Math.asin(t),s<0&&(n=-n),l===0&&u===0?r=0:r=X(Math.atan2(l,u)+this.long0)}return i.x=r,i.y=n,i}var F2=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const el={init:A2,forward:D2,inverse:L2,names:F2};function Jm(i){var t=Math.exp(i);return t=(t-1/t)/2,t}function ai(i,t){i=Math.abs(i),t=Math.abs(t);var e=Math.max(i,t),n=Math.min(i,t)/(e||1);return e*Math.sqrt(1+Math.pow(n,2))}function O2(i){var t=1+i,e=t-1;return e===0?i:i*Math.log(t)/e}function N2(i){var t=Math.abs(i);return t=O2(t*(1+t/(ai(1,t)+1))),i<0?-t:t}function id(i,t){for(var e=2*Math.cos(2*t),n=i.length-1,r=i[n],o=0,s;--n>=0;)s=-o+e*r+i[n],o=r,r=s;return t+s*Math.sin(2*t)}function G2(i,t){for(var e=2*Math.cos(t),n=i.length-1,r=i[n],o=0,s;--n>=0;)s=-o+e*r+i[n],o=r,r=s;return Math.sin(t)*s}function j2(i){var t=Math.exp(i);return t=(t+1/t)/2,t}function Qm(i,t,e){for(var n=Math.sin(t),r=Math.cos(t),o=Jm(e),s=j2(e),a=2*r*s,l=-2*n*o,h=i.length-1,u=i[h],d=0,c=0,f=0,g,m;--h>=0;)g=c,m=d,c=u,d=f,u=-g+a*c-l*d+i[h],f=-m+l*c+a*d;return a=n*s,l=r*o,[a*u-l*f,a*f+l*u]}function B2(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(el.init.apply(this),this.forward=el.forward,this.inverse=el.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var i=this.es/(1+Math.sqrt(1-this.es)),t=i/(2-i),e=t;this.cgb[0]=t*(2+t*(-2/3+t*(-2+t*(116/45+t*(26/45+t*(-2854/675)))))),this.cbg[0]=t*(-2+t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))),e=e*t,this.cgb[1]=e*(7/3+t*(-8/5+t*(-227/45+t*(2704/315+t*(2323/945))))),this.cbg[1]=e*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),e=e*t,this.cgb[2]=e*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=e*(-26/15+t*(34/21+t*(8/5+t*(-12686/2835)))),e=e*t,this.cgb[3]=e*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=e*(1237/630+t*(-12/5+t*(-24832/14175))),e=e*t,this.cgb[4]=e*(4174/315+t*(-144838/6237)),this.cbg[4]=e*(-734/315+t*(109598/31185)),e=e*t,this.cgb[5]=e*(601676/22275),this.cbg[5]=e*(444337/155925),e=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+e*(1/4+e*(1/64+e/256))),this.utg[0]=t*(-.5+t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=e*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=e*(13/48+t*(-3/5+t*(557/1440+t*(281/630+t*(-1983433/1935360))))),e=e*t,this.utg[2]=e*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=e*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),e=e*t,this.utg[3]=e*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=e*(49561/161280+t*(-179/168+t*(6601661/7257600))),e=e*t,this.utg[4]=e*(-4583/161280+t*(108847/3991680)),this.gtu[4]=e*(34729/80640+t*(-3418889/1995840)),e=e*t,this.utg[5]=e*(-20648693/638668800),this.gtu[5]=e*(212378941/319334400);var n=id(this.cbg,this.lat0);this.Zb=-this.Qn*(n+G2(this.gtu,2*n))}function U2(i){var t=X(i.x-this.long0),e=i.y;e=id(this.cbg,e);var n=Math.sin(e),r=Math.cos(e),o=Math.sin(t),s=Math.cos(t);e=Math.atan2(n,s*r),t=Math.atan2(o*r,ai(n,r*s)),t=N2(Math.tan(t));var a=Qm(this.gtu,2*e,2*t);e=e+a[0],t=t+a[1];var l,h;return Math.abs(t)<=2.623395162778?(l=this.a*(this.Qn*t)+this.x0,h=this.a*(this.Qn*e+this.Zb)+this.y0):(l=1/0,h=1/0),i.x=l,i.y=h,i}function V2(i){var t=(i.x-this.x0)*(1/this.a),e=(i.y-this.y0)*(1/this.a);e=(e-this.Zb)/this.Qn,t=t/this.Qn;var n,r;if(Math.abs(t)<=2.623395162778){var o=Qm(this.utg,2*e,2*t);e=e+o[0],t=t+o[1],t=Math.atan(Jm(t));var s=Math.sin(e),a=Math.cos(e),l=Math.sin(t),h=Math.cos(t);e=Math.atan2(s*h,ai(l,h*a)),t=Math.atan2(l,h*a),n=X(t+this.long0),r=id(this.cgb,e)}else n=1/0,r=1/0;return i.x=n,i.y=r,i}var q2=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"];const il={init:B2,forward:U2,inverse:V2,names:q2};function X2(i,t){if(i===void 0){if(i=Math.floor((X(t)+Math.PI)*30/Math.PI)+1,i<0)return 0;if(i>60)return 60}return i}var $2="etmerc";function W2(){var i=X2(this.zone,this.long0);if(i===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(i)-183)*he,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,il.init.apply(this),this.forward=il.forward,this.inverse=il.inverse}var Y2=["Universal Transverse Mercator System","utm"];const K2={init:W2,names:Y2,dependsOn:$2};function nd(i,t){return Math.pow((1-i)/(1+i),t)}var Z2=20;function H2(){var i=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*i*i),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(i/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+Rt)/(Math.pow(Math.tan(.5*this.lat0+Rt),this.C)*nd(this.e*i,this.ratexp))}function J2(i){var t=i.x,e=i.y;return i.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+Rt),this.C)*nd(this.e*Math.sin(e),this.ratexp))-R,i.x=this.C*t,i}function Q2(i){for(var t=1e-14,e=i.x/this.C,n=i.y,r=Math.pow(Math.tan(.5*n+Rt)/this.K,1/this.C),o=Z2;o>0&&(n=2*Math.atan(r*nd(this.e*Math.sin(i.y),-.5*this.e))-R,!(Math.abs(n-i.y)<t));--o)i.y=n;return o?(i.x=e,i.y=n,i):null}var t5=["gauss"];const rd={init:H2,forward:J2,inverse:Q2,names:t5};function e5(){rd.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function i5(i){var t,e,n,r;return i.x=X(i.x-this.long0),rd.forward.apply(this,[i]),t=Math.sin(i.y),e=Math.cos(i.y),n=Math.cos(i.x),r=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*e*n),i.x=r*e*Math.sin(i.x),i.y=r*(this.cosc0*t-this.sinc0*e*n),i.x=this.a*i.x+this.x0,i.y=this.a*i.y+this.y0,i}function n5(i){var t,e,n,r,o;if(i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,i.x/=this.k0,i.y/=this.k0,o=Math.sqrt(i.x*i.x+i.y*i.y)){var s=2*Math.atan2(o,this.R2);t=Math.sin(s),e=Math.cos(s),r=Math.asin(e*this.sinc0+i.y*t*this.cosc0/o),n=Math.atan2(i.x*t,o*this.cosc0*e-i.y*this.sinc0*t)}else r=this.phic0,n=0;return i.x=n,i.y=r,rd.inverse.apply(this,[i]),i.x=X(i.x+this.long0),i}var r5=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const o5={init:e5,forward:i5,inverse:n5,names:r5};function s5(i,t,e){return t*=e,Math.tan(.5*(R+i))*Math.pow((1-t)/(1+t),.5*e)}function a5(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=B&&(this.k0=.5*(1+as(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=B&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=B&&(this.k0=.5*this.cons*_i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/si(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=_i(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-R,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function l5(i){var t=i.x,e=i.y,n=Math.sin(e),r=Math.cos(e),o,s,a,l,h,u,d=X(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=B&&Math.abs(e+this.lat0)<=B?(i.x=NaN,i.y=NaN,i):this.sphere?(o=2*this.k0/(1+this.sinlat0*n+this.coslat0*r*Math.cos(d)),i.x=this.a*o*r*Math.sin(d)+this.x0,i.y=this.a*o*(this.coslat0*n-this.sinlat0*r*Math.cos(d))+this.y0,i):(s=2*Math.atan(this.ssfn_(e,n,this.e))-R,l=Math.cos(s),a=Math.sin(s),Math.abs(this.coslat0)<=B?(h=si(this.e,e*this.con,this.con*n),u=2*this.a*this.k0*h/this.cons,i.x=this.x0+u*Math.sin(t-this.long0),i.y=this.y0-this.con*u*Math.cos(t-this.long0),i):(Math.abs(this.sinlat0)<B?(o=2*this.a*this.k0/(1+l*Math.cos(d)),i.y=o*a):(o=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*a+this.cosX0*l*Math.cos(d))),i.y=o*(this.cosX0*a-this.sinX0*l*Math.cos(d))+this.y0),i.x=o*l*Math.sin(d)+this.x0,i))}function h5(i){i.x-=this.x0,i.y-=this.y0;var t,e,n,r,o,s=Math.sqrt(i.x*i.x+i.y*i.y);if(this.sphere){var a=2*Math.atan(s/(2*this.a*this.k0));return t=this.long0,e=this.lat0,s<=B?(i.x=t,i.y=e,i):(e=Math.asin(Math.cos(a)*this.sinlat0+i.y*Math.sin(a)*this.coslat0/s),Math.abs(this.coslat0)<B?this.lat0>0?t=X(this.long0+Math.atan2(i.x,-1*i.y)):t=X(this.long0+Math.atan2(i.x,i.y)):t=X(this.long0+Math.atan2(i.x*Math.sin(a),s*this.coslat0*Math.cos(a)-i.y*this.sinlat0*Math.sin(a))),i.x=t,i.y=e,i)}else if(Math.abs(this.coslat0)<=B){if(s<=B)return e=this.lat0,t=this.long0,i.x=t,i.y=e,i;i.x*=this.con,i.y*=this.con,n=s*this.cons/(2*this.a*this.k0),e=this.con*ls(this.e,n),t=this.con*X(this.con*this.long0+Math.atan2(i.x,-1*i.y))}else r=2*Math.atan(s*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,s<=B?o=this.X0:(o=Math.asin(Math.cos(r)*this.sinX0+i.y*Math.sin(r)*this.cosX0/s),t=X(this.long0+Math.atan2(i.x*Math.sin(r),s*this.cosX0*Math.cos(r)-i.y*this.sinX0*Math.sin(r)))),e=-1*ls(this.e,Math.tan(.5*(R+o)));return i.x=t,i.y=e,i}var u5=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"];const d5={init:a5,forward:l5,inverse:h5,names:u5,ssfn_:s5};function c5(){var i=this.lat0;this.lambda0=this.long0;var t=Math.sin(i),e=this.a,n=this.rf,r=1/n,o=2*r-Math.pow(r,2),s=this.e=Math.sqrt(o);this.R=this.k0*e*Math.sqrt(1-o)/(1-o*Math.pow(t,2)),this.alpha=Math.sqrt(1+o/(1-o)*Math.pow(Math.cos(i),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),l=Math.log(Math.tan(Math.PI/4+i/2)),h=Math.log((1+s*t)/(1-s*t));this.K=a-this.alpha*l+this.alpha*s/2*h}function f5(i){var t=Math.log(Math.tan(Math.PI/4-i.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(i.y))/(1-this.e*Math.sin(i.y))),n=-this.alpha*(t+e)+this.K,r=2*(Math.atan(Math.exp(n))-Math.PI/4),o=this.alpha*(i.x-this.lambda0),s=Math.atan(Math.sin(o)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(o))),a=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(o));return i.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0,i.x=this.R*s+this.x0,i}function g5(i){for(var t=i.x-this.x0,e=i.y-this.y0,n=t/this.R,r=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),o=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(n)),s=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(r))),a=this.lambda0+s/this.alpha,l=0,h=o,u=-1e3,d=0;Math.abs(h-u)>1e-7;){if(++d>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+o/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(h))/2)),u=h,h=2*Math.atan(Math.exp(l))-Math.PI/2}return i.x=a,i.y=h,i}var m5=["somerc"];const p5={init:c5,forward:f5,inverse:g5,names:m5};var Qr=1e-7;function v5(i){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],e=typeof i.PROJECTION=="object"?Object.keys(i.PROJECTION)[0]:i.PROJECTION;return"no_uoff"in i||"no_off"in i||t.indexOf(e)!==-1}function _5(){var i,t,e,n,r,o,s,a,l,h,u=0,d,c=0,f=0,g=0,m=0,p=0,_=0;this.no_off=v5(this),this.no_rot="no_rot"in this;var v=!1;"alpha"in this&&(v=!0);var y=!1;if("rectified_grid_angle"in this&&(y=!0),v&&(_=this.alpha),y&&(u=this.rectified_grid_angle*he),v||y)c=this.longc;else if(f=this.long1,m=this.lat1,g=this.long2,p=this.lat2,Math.abs(m-p)<=Qr||(i=Math.abs(m))<=Qr||Math.abs(i-R)<=Qr||Math.abs(Math.abs(this.lat0)-R)<=Qr||Math.abs(Math.abs(p)-R)<=Qr)throw new Error;var x=1-this.es;t=Math.sqrt(x),Math.abs(this.lat0)>B?(a=Math.sin(this.lat0),e=Math.cos(this.lat0),i=1-this.es*a*a,this.B=e*e,this.B=Math.sqrt(1+this.es*this.B*this.B/x),this.A=this.B*this.k0*t/i,n=this.B*t/(e*Math.sqrt(i)),r=n*n-1,r<=0?r=0:(r=Math.sqrt(r),this.lat0<0&&(r=-r)),this.E=r+=n,this.E*=Math.pow(si(this.e,this.lat0,a),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=r=1),v||y?(v?(d=Math.asin(Math.sin(_)/n),y||(u=_)):(d=u,_=Math.asin(n*Math.sin(d))),this.lam0=c-Math.asin(.5*(r-1/r)*Math.tan(d))/this.B):(o=Math.pow(si(this.e,m,Math.sin(m)),this.B),s=Math.pow(si(this.e,p,Math.sin(p)),this.B),r=this.E/o,l=(s-o)/(s+o),h=this.E*this.E,h=(h-s*o)/(h+s*o),i=f-g,i<-Math.pi?g-=os:i>Math.pi&&(g+=os),this.lam0=X(.5*(f+g)-Math.atan(h*Math.tan(.5*this.B*(f-g))/l)/this.B),d=Math.atan(2*Math.sin(this.B*X(f-this.lam0))/(r-1/r)),u=_=Math.asin(n*Math.sin(d))),this.singam=Math.sin(d),this.cosgam=Math.cos(d),this.sinrot=Math.sin(u),this.cosrot=Math.cos(u),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A*this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(_))),this.lat0<0&&(this.u_0=-this.u_0)),r=.5*d,this.v_pole_n=this.ArB*Math.log(Math.tan(Rt-r)),this.v_pole_s=this.ArB*Math.log(Math.tan(Rt+r))}function y5(i){var t={},e,n,r,o,s,a,l,h;if(i.x=i.x-this.lam0,Math.abs(Math.abs(i.y)-R)>B){if(s=this.E/Math.pow(si(this.e,i.y,Math.sin(i.y)),this.B),a=1/s,e=.5*(s-a),n=.5*(s+a),o=Math.sin(this.B*i.x),r=(e*this.singam-o*this.cosgam)/n,Math.abs(Math.abs(r)-1)<B)throw new Error;h=.5*this.ArB*Math.log((1-r)/(1+r)),a=Math.cos(this.B*i.x),Math.abs(a)<Qr?l=this.A*i.x:l=this.ArB*Math.atan2(e*this.cosgam+o*this.singam,a)}else h=i.y>0?this.v_pole_n:this.v_pole_s,l=this.ArB*i.y;return this.no_rot?(t.x=l,t.y=h):(l-=this.u_0,t.x=h*this.cosrot+l*this.sinrot,t.y=l*this.cosrot-h*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function x5(i){var t,e,n,r,o,s,a,l={};if(i.x=(i.x-this.x0)*(1/this.a),i.y=(i.y-this.y0)*(1/this.a),this.no_rot?(e=i.y,t=i.x):(e=i.x*this.cosrot-i.y*this.sinrot,t=i.y*this.cosrot+i.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*e),r=.5*(n-1/n),o=.5*(n+1/n),s=Math.sin(this.BrA*t),a=(s*this.cosgam+r*this.singam)/o,Math.abs(Math.abs(a)-1)<B)l.x=0,l.y=a<0?-R:R;else{if(l.y=this.E/Math.sqrt((1+a)/(1-a)),l.y=ls(this.e,Math.pow(l.y,1/this.B)),l.y===1/0)throw new Error;l.x=-this.rB*Math.atan2(r*this.cosgam-s*this.singam,Math.cos(this.BrA*t))}return l.x+=this.lam0,l}var b5=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const k5={init:_5,forward:y5,inverse:x5,names:b5};function w5(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<B)){var i=this.b/this.a;this.e=Math.sqrt(1-i*i);var t=Math.sin(this.lat1),e=Math.cos(this.lat1),n=_i(this.e,t,e),r=si(this.e,this.lat1,t),o=Math.sin(this.lat2),s=Math.cos(this.lat2),a=_i(this.e,o,s),l=si(this.e,this.lat2,o),h=si(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>B?this.ns=Math.log(n/a)/Math.log(r/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function E5(i){var t=i.x,e=i.y;Math.abs(2*Math.abs(e)-Math.PI)<=B&&(e=as(e)*(R-2*B));var n=Math.abs(Math.abs(e)-R),r,o;if(n>B)r=si(this.e,e,Math.sin(e)),o=this.a*this.f0*Math.pow(r,this.ns);else{if(n=e*this.ns,n<=0)return null;o=0}var s=this.ns*X(t-this.long0);return i.x=this.k0*(o*Math.sin(s))+this.x0,i.y=this.k0*(this.rh-o*Math.cos(s))+this.y0,i}function M5(i){var t,e,n,r,o,s=(i.x-this.x0)/this.k0,a=this.rh-(i.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(s*s+a*a),e=1):(t=-Math.sqrt(s*s+a*a),e=-1);var l=0;if(t!==0&&(l=Math.atan2(e*s,e*a)),t!==0||this.ns>0){if(e=1/this.ns,n=Math.pow(t/(this.a*this.f0),e),r=ls(this.e,n),r===-9999)return null}else r=-R;return o=X(l/this.ns+this.long0),i.x=o,i.y=r,i}var C5=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const S5={init:w5,forward:E5,inverse:M5,names:C5};function T5(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function z5(i){var t,e,n,r,o,s,a,l=i.x,h=i.y,u=X(l-this.long0);return t=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),e=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/t)-this.s45),n=-u*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(n)),o=Math.asin(Math.cos(e)*Math.sin(n)/Math.cos(r)),s=this.n*o,a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),i.y=a*Math.cos(s)/1,i.x=a*Math.sin(s)/1,this.czech||(i.y*=-1,i.x*=-1),i}function I5(i){var t,e,n,r,o,s,a,l,h=i.x;i.x=i.y,i.y=h,this.czech||(i.y*=-1,i.x*=-1),s=Math.sqrt(i.x*i.x+i.y*i.y),o=Math.atan2(i.y,i.x),r=o/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/s,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(r)),e=Math.asin(Math.cos(n)*Math.sin(r)/Math.cos(t)),i.x=this.long0-e/this.alfa,a=t,l=0;var u=0;do i.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-i.y)<1e-10&&(l=1),a=i.y,u+=1;while(l===0&&u<15);return u>=15?null:i}var R5=["Krovak","krovak"];const P5={init:T5,forward:z5,inverse:I5,names:R5};function Te(i,t,e,n,r){return i*r-t*Math.sin(2*r)+e*Math.sin(4*r)-n*Math.sin(6*r)}function ds(i){return 1-.25*i*(1+i/16*(3+1.25*i))}function cs(i){return .375*i*(1+.25*i*(1+.46875*i))}function fs(i){return .05859375*i*i*(1+.75*i)}function gs(i){return i*i*i*(35/3072)}function to(i,t,e){var n=t*e;return i/Math.sqrt(1-n*n)}function eo(i){return Math.abs(i)<R?i:i-as(i)*Math.PI}function nl(i,t,e,n,r){var o,s;o=i/t;for(var a=0;a<15;a++)if(s=(i-(t*o-e*Math.sin(2*o)+n*Math.sin(4*o)-r*Math.sin(6*o)))/(t-2*e*Math.cos(2*o)+4*n*Math.cos(4*o)-6*r*Math.cos(6*o)),o+=s,Math.abs(s)<=1e-10)return o;return NaN}function A5(){this.sphere||(this.e0=ds(this.es),this.e1=cs(this.es),this.e2=fs(this.es),this.e3=gs(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0))}function D5(i){var t,e,n=i.x,r=i.y;if(n=X(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(r)*Math.sin(n)),e=this.a*(Math.atan2(Math.tan(r),Math.cos(n))-this.lat0);else{var o=Math.sin(r),s=Math.cos(r),a=to(this.a,this.e,o),l=Math.tan(r)*Math.tan(r),h=n*Math.cos(r),u=h*h,d=this.es*s*s/(1-this.es),c=this.a*Te(this.e0,this.e1,this.e2,this.e3,r);t=a*h*(1-u*l*(1/6-(8-l+8*d)*u/120)),e=c-this.ml0+a*o/s*u*(.5+(5-l+6*d)*u/24)}return i.x=t+this.x0,i.y=e+this.y0,i}function L5(i){i.x-=this.x0,i.y-=this.y0;var t=i.x/this.a,e=i.y/this.a,n,r;if(this.sphere){var o=e+this.lat0;n=Math.asin(Math.sin(o)*Math.cos(t)),r=Math.atan2(Math.tan(t),Math.cos(o))}else{var s=this.ml0/this.a+e,a=nl(s,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-R)<=B)return i.x=this.long0,i.y=R,e<0&&(i.y*=-1),i;var l=to(this.a,this.e,Math.sin(a)),h=l*l*l/this.a/this.a*(1-this.es),u=Math.pow(Math.tan(a),2),d=t*this.a/l,c=d*d;n=a-l*Math.tan(a)/h*d*d*(.5-(1+3*u)*d*d/24),r=d*(1-c*(u/3+(1+3*u)*u*c/15))/Math.cos(a)}return i.x=X(r+this.long0),i.y=eo(n),i}var F5=["Cassini","Cassini_Soldner","cass"];const O5={init:A5,forward:D5,inverse:L5,names:F5};function Cn(i,t){var e;return i>1e-7?(e=i*t,(1-i*i)*(t/(1-e*e)-.5/i*Math.log((1-e)/(1+e)))):2*t}var N5=1,G5=2,j5=3,B5=4;function U5(){var i=Math.abs(this.lat0);if(Math.abs(i-R)<B?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(i)<B?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=Cn(this.e,1),this.mmf=.5/(1-this.es),this.apa=H5(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=Cn(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function V5(i){var t,e,n,r,o,s,a,l,h,u,d=i.x,c=i.y;if(d=X(d-this.long0),this.sphere){if(o=Math.sin(c),u=Math.cos(c),n=Math.cos(d),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e=this.mode===this.EQUIT?1+u*n:1+this.sinph0*o+this.cosph0*u*n,e<=B)return null;e=Math.sqrt(2/e),t=e*u*Math.sin(d),e*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*u*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(c+this.lat0)<B)return null;e=Rt-c*.5,e=2*(this.mode===this.S_POLE?Math.cos(e):Math.sin(e)),t=e*Math.sin(d),e*=n}}else{switch(a=0,l=0,h=0,n=Math.cos(d),r=Math.sin(d),o=Math.sin(c),s=Cn(this.e,o),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(a=s/this.qp,l=Math.sqrt(1-a*a)),this.mode){case this.OBLIQ:h=1+this.sinb1*a+this.cosb1*l*n;break;case this.EQUIT:h=1+l*n;break;case this.N_POLE:h=R+c,s=this.qp-s;break;case this.S_POLE:h=c-R,s=this.qp+s;break}if(Math.abs(h)<B)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:h=Math.sqrt(2/h),this.mode===this.OBLIQ?e=this.ymf*h*(this.cosb1*a-this.sinb1*l*n):e=(h=Math.sqrt(2/(1+l*n)))*a*this.ymf,t=this.xmf*h*l*r;break;case this.N_POLE:case this.S_POLE:s>=0?(t=(h=Math.sqrt(s))*r,e=n*(this.mode===this.S_POLE?h:-h)):t=e=0;break}}return i.x=this.a*t+this.x0,i.y=this.a*e+this.y0,i}function q5(i){i.x-=this.x0,i.y-=this.y0;var t=i.x/this.a,e=i.y/this.a,n,r,o,s,a,l,h;if(this.sphere){var u=0,d,c=0;if(d=Math.sqrt(t*t+e*e),r=d*.5,r>1)return null;switch(r=2*Math.asin(r),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(c=Math.sin(r),u=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(d)<=B?0:Math.asin(e*c/d),t*=c,e=u*d;break;case this.OBLIQ:r=Math.abs(d)<=B?this.lat0:Math.asin(u*this.sinph0+e*c*this.cosph0/d),t*=c*this.cosph0,e=(u-Math.sin(r)*this.sinph0)*d;break;case this.N_POLE:e=-e,r=R-r;break;case this.S_POLE:r-=R;break}n=e===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,e)}else{if(h=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,e*=this.dd,l=Math.sqrt(t*t+e*e),l<B)return i.x=this.long0,i.y=this.lat0,i;s=2*Math.asin(.5*l/this.rq),o=Math.cos(s),t*=s=Math.sin(s),this.mode===this.OBLIQ?(h=o*this.sinb1+e*s*this.cosb1/l,a=this.qp*h,e=l*this.cosb1*o-e*this.sinb1*s):(h=e*s/l,a=this.qp*h,e=l*o)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(e=-e),a=t*t+e*e,!a)return i.x=this.long0,i.y=this.lat0,i;h=1-a/this.qp,this.mode===this.S_POLE&&(h=-h)}n=Math.atan2(t,e),r=J5(Math.asin(h),this.apa)}return i.x=X(this.long0+n),i.y=r,i}var X5=.3333333333333333,$5=.17222222222222222,W5=.10257936507936508,Y5=.06388888888888888,K5=.0664021164021164,Z5=.016415012942191543;function H5(i){var t,e=[];return e[0]=i*X5,t=i*i,e[0]+=t*$5,e[1]=t*Y5,t*=i,e[0]+=t*W5,e[1]+=t*K5,e[2]=t*Z5,e}function J5(i,t){var e=i+i;return i+t[0]*Math.sin(e)+t[1]*Math.sin(e+e)+t[2]*Math.sin(e+e+e)}var Q5=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const tE={init:U5,forward:V5,inverse:q5,names:Q5,S_POLE:N5,N_POLE:G5,EQUIT:j5,OBLIQ:B5};function Sn(i){return Math.abs(i)>1&&(i=i>1?1:-1),Math.asin(i)}function eE(){Math.abs(this.lat1+this.lat2)<B||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=_i(this.e3,this.sin_po,this.cos_po),this.qs1=Cn(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=_i(this.e3,this.sin_po,this.cos_po),this.qs2=Cn(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Cn(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>B?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function iE(i){var t=i.x,e=i.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var n=Cn(this.e3,this.sin_phi,this.cos_phi),r=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,o=this.ns0*X(t-this.long0),s=r*Math.sin(o)+this.x0,a=this.rh-r*Math.cos(o)+this.y0;return i.x=s,i.y=a,i}function nE(i){var t,e,n,r,o,s;return i.x-=this.x0,i.y=this.rh-i.y+this.y0,this.ns0>=0?(t=Math.sqrt(i.x*i.x+i.y*i.y),n=1):(t=-Math.sqrt(i.x*i.x+i.y*i.y),n=-1),r=0,t!==0&&(r=Math.atan2(n*i.x,n*i.y)),n=t*this.ns0/this.a,this.sphere?s=Math.asin((this.c-n*n)/(2*this.ns0)):(e=(this.c-n*n)/this.ns0,s=this.phi1z(this.e3,e)),o=X(r/this.ns0+this.long0),i.x=o,i.y=s,i}function rE(i,t){var e,n,r,o,s,a=Sn(.5*t);if(i<B)return a;for(var l=i*i,h=1;h<=25;h++)if(e=Math.sin(a),n=Math.cos(a),r=i*e,o=1-r*r,s=.5*o*o/n*(t/(1-l)-e/o+.5/i*Math.log((1-r)/(1+r))),a=a+s,Math.abs(s)<=1e-7)return a;return null}var oE=["Albers_Conic_Equal_Area","Albers","aea"];const sE={init:eE,forward:iE,inverse:nE,names:oE,phi1z:rE};function aE(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function lE(i){var t,e,n,r,o,s,a,l,h=i.x,u=i.y;return n=X(h-this.long0),t=Math.sin(u),e=Math.cos(u),r=Math.cos(n),s=this.sin_p14*t+this.cos_p14*e*r,o=1,s>0||Math.abs(s)<=B?(a=this.x0+this.a*o*e*Math.sin(n)/s,l=this.y0+this.a*o*(this.cos_p14*t-this.sin_p14*e*r)/s):(a=this.x0+this.infinity_dist*e*Math.sin(n),l=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*e*r)),i.x=a,i.y=l,i}function hE(i){var t,e,n,r,o,s;return i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,i.x/=this.k0,i.y/=this.k0,(t=Math.sqrt(i.x*i.x+i.y*i.y))?(r=Math.atan2(t,this.rc),e=Math.sin(r),n=Math.cos(r),s=Sn(n*this.sin_p14+i.y*e*this.cos_p14/t),o=Math.atan2(i.x*e,t*this.cos_p14*n-i.y*this.sin_p14*e),o=X(this.long0+o)):(s=this.phic0,o=0),i.x=o,i.y=s,i}var uE=["gnom"];const dE={init:aE,forward:lE,inverse:hE,names:uE};function cE(i,t){var e=1-(1-i*i)/(2*i)*Math.log((1-i)/(1+i));if(Math.abs(Math.abs(t)-e)<1e-6)return t<0?-1*R:R;for(var n=Math.asin(.5*t),r,o,s,a,l=0;l<30;l++)if(o=Math.sin(n),s=Math.cos(n),a=i*o,r=Math.pow(1-a*a,2)/(2*s)*(t/(1-i*i)-o/(1-a*a)+.5/i*Math.log((1-a)/(1+a))),n+=r,Math.abs(r)<=1e-10)return n;return NaN}function fE(){this.sphere||(this.k0=_i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function gE(i){var t=i.x,e=i.y,n,r,o=X(t-this.long0);if(this.sphere)n=this.x0+this.a*o*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var s=Cn(this.e,Math.sin(e));n=this.x0+this.a*this.k0*o,r=this.y0+this.a*s*.5/this.k0}return i.x=n,i.y=r,i}function mE(i){i.x-=this.x0,i.y-=this.y0;var t,e;return this.sphere?(t=X(this.long0+i.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(i.y/this.a*Math.cos(this.lat_ts))):(e=cE(this.e,2*i.y*this.k0/this.a),t=X(this.long0+i.x/(this.a*this.k0))),i.x=t,i.y=e,i}var pE=["cea"];const vE={init:fE,forward:gE,inverse:mE,names:pE};function _E(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function yE(i){var t=i.x,e=i.y,n=X(t-this.long0),r=eo(e-this.lat0);return i.x=this.x0+this.a*n*this.rc,i.y=this.y0+this.a*r,i}function xE(i){var t=i.x,e=i.y;return i.x=X(this.long0+(t-this.x0)/(this.a*this.rc)),i.y=eo(this.lat0+(e-this.y0)/this.a),i}var bE=["Equirectangular","Equidistant_Cylindrical","eqc"];const kE={init:_E,forward:yE,inverse:xE,names:bE};var tp=20;function wE(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ds(this.es),this.e1=cs(this.es),this.e2=fs(this.es),this.e3=gs(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0)}function EE(i){var t=i.x,e=i.y,n,r,o,s=X(t-this.long0);if(o=s*Math.sin(e),this.sphere)Math.abs(e)<=B?(n=this.a*s,r=-1*this.a*this.lat0):(n=this.a*Math.sin(o)/Math.tan(e),r=this.a*(eo(e-this.lat0)+(1-Math.cos(o))/Math.tan(e)));else if(Math.abs(e)<=B)n=this.a*s,r=-1*this.ml0;else{var a=to(this.a,this.e,Math.sin(e))/Math.tan(e);n=a*Math.sin(o),r=this.a*Te(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+a*(1-Math.cos(o))}return i.x=n+this.x0,i.y=r+this.y0,i}function ME(i){var t,e,n,r,o,s,a,l,h;if(n=i.x-this.x0,r=i.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=B)t=X(n/this.a+this.long0),e=0;else{s=this.lat0+r/this.a,a=n*n/this.a/this.a+s*s,l=s;var u;for(o=tp;o;--o)if(u=Math.tan(l),h=-1*(s*(l*u+1)-l-.5*(l*l+a)*u)/((l-s)/u-1),l+=h,Math.abs(h)<=B){e=l;break}t=X(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(e))}else if(Math.abs(r+this.ml0)<=B)e=0,t=X(this.long0+n/this.a);else{s=(this.ml0+r)/this.a,a=n*n/this.a/this.a+s*s,l=s;var d,c,f,g,m;for(o=tp;o;--o)if(m=this.e*Math.sin(l),d=Math.sqrt(1-m*m)*Math.tan(l),c=this.a*Te(this.e0,this.e1,this.e2,this.e3,l),f=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),g=c/this.a,h=(s*(d*g+1)-g-.5*d*(g*g+a))/(this.es*Math.sin(2*l)*(g*g+a-2*s*g)/(4*d)+(s-g)*(d*f-2/Math.sin(2*l))-f),l-=h,Math.abs(h)<=B){e=l;break}d=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),t=X(this.long0+Math.asin(n*d/this.a)/Math.sin(e))}return i.x=t,i.y=e,i}var CE=["Polyconic","poly"];const SE={init:wE,forward:EE,inverse:ME,names:CE};function TE(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function zE(i){var t,e=i.x,n=i.y,r=n-this.lat0,o=e-this.long0,s=r/rs*1e-5,a=o,l=1,h=0;for(t=1;t<=10;t++)l=l*s,h=h+this.A[t]*l;var u=h,d=a,c=1,f=0,g,m,p=0,_=0;for(t=1;t<=6;t++)g=c*u-f*d,m=f*u+c*d,c=g,f=m,p=p+this.B_re[t]*c-this.B_im[t]*f,_=_+this.B_im[t]*c+this.B_re[t]*f;return i.x=_*this.a+this.x0,i.y=p*this.a+this.y0,i}function IE(i){var t,e=i.x,n=i.y,r=e-this.x0,o=n-this.y0,s=o/this.a,a=r/this.a,l=1,h=0,u,d,c=0,f=0;for(t=1;t<=6;t++)u=l*s-h*a,d=h*s+l*a,l=u,h=d,c=c+this.C_re[t]*l-this.C_im[t]*h,f=f+this.C_im[t]*l+this.C_re[t]*h;for(var g=0;g<this.iterations;g++){var m=c,p=f,_,v,y=s,x=a;for(t=2;t<=6;t++)_=m*c-p*f,v=p*c+m*f,m=_,p=v,y=y+(t-1)*(this.B_re[t]*m-this.B_im[t]*p),x=x+(t-1)*(this.B_im[t]*m+this.B_re[t]*p);m=1,p=0;var k=this.B_re[1],w=this.B_im[1];for(t=2;t<=6;t++)_=m*c-p*f,v=p*c+m*f,m=_,p=v,k=k+t*(this.B_re[t]*m-this.B_im[t]*p),w=w+t*(this.B_im[t]*m+this.B_re[t]*p);var M=k*k+w*w;c=(y*k+x*w)/M,f=(x*k-y*w)/M}var E=c,S=f,I=1,A=0;for(t=1;t<=9;t++)I=I*E,A=A+this.D[t]*I;var G=this.lat0+A*rs*1e5,P=this.long0+S;return i.x=P,i.y=G,i}var RE=["New_Zealand_Map_Grid","nzmg"];const PE={init:TE,forward:zE,inverse:IE,names:RE};function AE(){}function DE(i){var t=i.x,e=i.y,n=X(t-this.long0),r=this.x0+this.a*n,o=this.y0+this.a*Math.log(Math.tan(Math.PI/4+e/2.5))*1.25;return i.x=r,i.y=o,i}function LE(i){i.x-=this.x0,i.y-=this.y0;var t=X(this.long0+i.x/this.a),e=2.5*(Math.atan(Math.exp(.8*i.y/this.a))-Math.PI/4);return i.x=t,i.y=e,i}var FE=["Miller_Cylindrical","mill"];const OE={init:AE,forward:DE,inverse:LE,names:FE};var NE=20;function GE(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Zm(this.es)}function jE(i){var t,e,n=i.x,r=i.y;if(n=X(n-this.long0),this.sphere){if(!this.m)r=this.n!==1?Math.asin(this.n*Math.sin(r)):r;else for(var o=this.n*Math.sin(r),s=NE;s;--s){var a=(this.m*r+Math.sin(r)-o)/(this.m+Math.cos(r));if(r-=a,Math.abs(a)<B)break}t=this.a*this.C_x*n*(this.m+Math.cos(r)),e=this.a*this.C_y*r}else{var l=Math.sin(r),h=Math.cos(r);e=this.a*tl(r,l,h,this.en),t=this.a*n*h/Math.sqrt(1-this.es*l*l)}return i.x=t,i.y=e,i}function BE(i){var t,e,n,r;return i.x-=this.x0,n=i.x/this.a,i.y-=this.y0,t=i.y/this.a,this.sphere?(t/=this.C_y,n=n/(this.C_x*(this.m+Math.cos(t))),this.m?t=Sn((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=Sn(Math.sin(t)/this.n)),n=X(n+this.long0),t=eo(t)):(t=Hm(i.y/this.a,this.es,this.en),r=Math.abs(t),r<R?(r=Math.sin(t),e=this.long0+i.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(t)),n=X(e)):r-B<R&&(n=this.long0)),i.x=n,i.y=t,i}var UE=["Sinusoidal","sinu"];const VE={init:GE,forward:jE,inverse:BE,names:UE};function qE(){}function XE(i){for(var t=i.x,e=i.y,n=X(t-this.long0),r=e,o=Math.PI*Math.sin(e);;){var s=-(r+Math.sin(r)-o)/(1+Math.cos(r));if(r+=s,Math.abs(s)<B)break}r/=2,Math.PI/2-Math.abs(e)<B&&(n=0);var a=.900316316158*this.a*n*Math.cos(r)+this.x0,l=1.4142135623731*this.a*Math.sin(r)+this.y0;return i.x=a,i.y=l,i}function $E(i){var t,e;i.x-=this.x0,i.y-=this.y0,e=i.y/(1.4142135623731*this.a),Math.abs(e)>.999999999999&&(e=.999999999999),t=Math.asin(e);var n=X(this.long0+i.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),e=(2*t+Math.sin(2*t))/Math.PI,Math.abs(e)>1&&(e=1);var r=Math.asin(e);return i.x=n,i.y=r,i}var WE=["Mollweide","moll"];const YE={init:qE,forward:XE,inverse:$E,names:WE};function KE(){Math.abs(this.lat1+this.lat2)<B||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ds(this.es),this.e1=cs(this.es),this.e2=fs(this.es),this.e3=gs(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=_i(this.e,this.sinphi,this.cosphi),this.ml1=Te(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<B?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=_i(this.e,this.sinphi,this.cosphi),this.ml2=Te(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Te(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function ZE(i){var t=i.x,e=i.y,n;if(this.sphere)n=this.a*(this.g-e);else{var r=Te(this.e0,this.e1,this.e2,this.e3,e);n=this.a*(this.g-r)}var o=this.ns*X(t-this.long0),s=this.x0+n*Math.sin(o),a=this.y0+this.rh-n*Math.cos(o);return i.x=s,i.y=a,i}function HE(i){i.x-=this.x0,i.y=this.rh-i.y+this.y0;var t,e,n,r;this.ns>=0?(e=Math.sqrt(i.x*i.x+i.y*i.y),t=1):(e=-Math.sqrt(i.x*i.x+i.y*i.y),t=-1);var o=0;if(e!==0&&(o=Math.atan2(t*i.x,t*i.y)),this.sphere)return r=X(this.long0+o/this.ns),n=eo(this.g-e/this.a),i.x=r,i.y=n,i;var s=this.g-e/this.a;return n=nl(s,this.e0,this.e1,this.e2,this.e3),r=X(this.long0+o/this.ns),i.x=r,i.y=n,i}var JE=["Equidistant_Conic","eqdc"];const QE={init:KE,forward:ZE,inverse:HE,names:JE};function tM(){this.R=this.a}function eM(i){var t=i.x,e=i.y,n=X(t-this.long0),r,o;Math.abs(e)<=B&&(r=this.x0+this.R*n,o=this.y0);var s=Sn(2*Math.abs(e/Math.PI));(Math.abs(n)<=B||Math.abs(Math.abs(e)-R)<=B)&&(r=this.x0,e>=0?o=this.y0+Math.PI*this.R*Math.tan(.5*s):o=this.y0+Math.PI*this.R*-Math.tan(.5*s));var a=.5*Math.abs(Math.PI/n-n/Math.PI),l=a*a,h=Math.sin(s),u=Math.cos(s),d=u/(h+u-1),c=d*d,f=d*(2/h-1),g=f*f,m=Math.PI*this.R*(a*(d-g)+Math.sqrt(l*(d-g)*(d-g)-(g+l)*(c-g)))/(g+l);n<0&&(m=-m),r=this.x0+m;var p=l+d;return m=Math.PI*this.R*(f*p-a*Math.sqrt((g+l)*(l+1)-p*p))/(g+l),e>=0?o=this.y0+m:o=this.y0-m,i.x=r,i.y=o,i}function iM(i){var t,e,n,r,o,s,a,l,h,u,d,c,f;return i.x-=this.x0,i.y-=this.y0,d=Math.PI*this.R,n=i.x/d,r=i.y/d,o=n*n+r*r,s=-Math.abs(r)*(1+o),a=s-2*r*r+n*n,l=-2*s+1+2*r*r+o*o,f=r*r/l+(2*a*a*a/l/l/l-9*s*a/l/l)/27,h=(s-a*a/3/l)/l,u=2*Math.sqrt(-h/3),d=3*f/h/u,Math.abs(d)>1&&(d>=0?d=1:d=-1),c=Math.acos(d)/3,i.y>=0?e=(-u*Math.cos(c+Math.PI/3)-a/3/l)*Math.PI:e=-(-u*Math.cos(c+Math.PI/3)-a/3/l)*Math.PI,Math.abs(n)<B?t=this.long0:t=X(this.long0+Math.PI*(o-1+Math.sqrt(1+2*(n*n-r*r)+o*o))/2/n),i.x=t,i.y=e,i}var nM=["Van_der_Grinten_I","VanDerGrinten","vandg"];const rM={init:tM,forward:eM,inverse:iM,names:nM};function oM(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function sM(i){var t=i.x,e=i.y,n=Math.sin(i.y),r=Math.cos(i.y),o=X(t-this.long0),s,a,l,h,u,d,c,f,g,m,p,_,v,y,x,k,w,M,E,S,I,A,G;return this.sphere?Math.abs(this.sin_p12-1)<=B?(i.x=this.x0+this.a*(R-e)*Math.sin(o),i.y=this.y0-this.a*(R-e)*Math.cos(o),i):Math.abs(this.sin_p12+1)<=B?(i.x=this.x0+this.a*(R+e)*Math.sin(o),i.y=this.y0+this.a*(R+e)*Math.cos(o),i):(M=this.sin_p12*n+this.cos_p12*r*Math.cos(o),k=Math.acos(M),w=k?k/Math.sin(k):1,i.x=this.x0+this.a*w*r*Math.sin(o),i.y=this.y0+this.a*w*(this.cos_p12*n-this.sin_p12*r*Math.cos(o)),i):(s=ds(this.es),a=cs(this.es),l=fs(this.es),h=gs(this.es),Math.abs(this.sin_p12-1)<=B?(u=this.a*Te(s,a,l,h,R),d=this.a*Te(s,a,l,h,e),i.x=this.x0+(u-d)*Math.sin(o),i.y=this.y0-(u-d)*Math.cos(o),i):Math.abs(this.sin_p12+1)<=B?(u=this.a*Te(s,a,l,h,R),d=this.a*Te(s,a,l,h,e),i.x=this.x0+(u+d)*Math.sin(o),i.y=this.y0+(u+d)*Math.cos(o),i):(c=n/r,f=to(this.a,this.e,this.sin_p12),g=to(this.a,this.e,n),m=Math.atan((1-this.es)*c+this.es*f*this.sin_p12/(g*r)),p=Math.atan2(Math.sin(o),this.cos_p12*Math.tan(m)-this.sin_p12*Math.cos(o)),p===0?E=Math.asin(this.cos_p12*Math.sin(m)-this.sin_p12*Math.cos(m)):Math.abs(Math.abs(p)-Math.PI)<=B?E=-Math.asin(this.cos_p12*Math.sin(m)-this.sin_p12*Math.cos(m)):E=Math.asin(Math.sin(o)*Math.cos(m)/Math.sin(p)),_=this.e*this.sin_p12/Math.sqrt(1-this.es),v=this.e*this.cos_p12*Math.cos(p)/Math.sqrt(1-this.es),y=_*v,x=v*v,S=E*E,I=S*E,A=I*E,G=A*E,k=f*E*(1-S*x*(1-x)/6+I/8*y*(1-2*x)+A/120*(x*(4-7*x)-3*_*_*(1-7*x))-G/48*y),i.x=this.x0+k*Math.sin(p),i.y=this.y0+k*Math.cos(p),i))}function aM(i){i.x-=this.x0,i.y-=this.y0;var t,e,n,r,o,s,a,l,h,u,d,c,f,g,m,p,_,v,y,x,k,w,M,E;return this.sphere?(t=Math.sqrt(i.x*i.x+i.y*i.y),t>2*R*this.a?void 0:(e=t/this.a,n=Math.sin(e),r=Math.cos(e),o=this.long0,Math.abs(t)<=B?s=this.lat0:(s=Sn(r*this.sin_p12+i.y*n*this.cos_p12/t),a=Math.abs(this.lat0)-R,Math.abs(a)<=B?this.lat0>=0?o=X(this.long0+Math.atan2(i.x,-i.y)):o=X(this.long0-Math.atan2(-i.x,i.y)):o=X(this.long0+Math.atan2(i.x*n,t*this.cos_p12*r-i.y*this.sin_p12*n))),i.x=o,i.y=s,i)):(l=ds(this.es),h=cs(this.es),u=fs(this.es),d=gs(this.es),Math.abs(this.sin_p12-1)<=B?(c=this.a*Te(l,h,u,d,R),t=Math.sqrt(i.x*i.x+i.y*i.y),f=c-t,s=nl(f/this.a,l,h,u,d),o=X(this.long0+Math.atan2(i.x,-1*i.y)),i.x=o,i.y=s,i):Math.abs(this.sin_p12+1)<=B?(c=this.a*Te(l,h,u,d,R),t=Math.sqrt(i.x*i.x+i.y*i.y),f=t-c,s=nl(f/this.a,l,h,u,d),o=X(this.long0+Math.atan2(i.x,i.y)),i.x=o,i.y=s,i):(t=Math.sqrt(i.x*i.x+i.y*i.y),p=Math.atan2(i.x,i.y),g=to(this.a,this.e,this.sin_p12),_=Math.cos(p),v=this.e*this.cos_p12*_,y=-v*v/(1-this.es),x=3*this.es*(1-y)*this.sin_p12*this.cos_p12*_/(1-this.es),k=t/g,w=k-y*(1+y)*Math.pow(k,3)/6-x*(1+3*y)*Math.pow(k,4)/24,M=1-y*w*w/2-k*w*w*w/6,m=Math.asin(this.sin_p12*Math.cos(w)+this.cos_p12*Math.sin(w)*_),o=X(this.long0+Math.asin(Math.sin(p)*Math.sin(w)/Math.cos(m))),E=Math.sin(m),s=Math.atan2((E-this.es*M*this.sin_p12)*Math.tan(m),E*(1-this.es)),i.x=o,i.y=s,i))}var lM=["Azimuthal_Equidistant","aeqd"];const hM={init:oM,forward:sM,inverse:aM,names:lM};function uM(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function dM(i){var t,e,n,r,o,s,a,l,h=i.x,u=i.y;return n=X(h-this.long0),t=Math.sin(u),e=Math.cos(u),r=Math.cos(n),s=this.sin_p14*t+this.cos_p14*e*r,o=1,(s>0||Math.abs(s)<=B)&&(a=this.a*o*e*Math.sin(n),l=this.y0+this.a*o*(this.cos_p14*t-this.sin_p14*e*r)),i.x=a,i.y=l,i}function cM(i){var t,e,n,r,o,s,a;return i.x-=this.x0,i.y-=this.y0,t=Math.sqrt(i.x*i.x+i.y*i.y),e=Sn(t/this.a),n=Math.sin(e),r=Math.cos(e),s=this.long0,Math.abs(t)<=B?(a=this.lat0,i.x=s,i.y=a,i):(a=Sn(r*this.sin_p14+i.y*n*this.cos_p14/t),o=Math.abs(this.lat0)-R,Math.abs(o)<=B?(this.lat0>=0?s=X(this.long0+Math.atan2(i.x,-i.y)):s=X(this.long0-Math.atan2(-i.x,i.y)),i.x=s,i.y=a,i):(s=X(this.long0+Math.atan2(i.x*n,t*this.cos_p14*r-i.y*this.sin_p14*n)),i.x=s,i.y=a,i))}var fM=["ortho"];const gM={init:uM,forward:dM,inverse:cM,names:fM};var Xt={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},Pt={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function mM(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=R-Rt/2?this.face=Xt.TOP:this.lat0<=-(R-Rt/2)?this.face=Xt.BOTTOM:Math.abs(this.long0)<=Rt?this.face=Xt.FRONT:Math.abs(this.long0)<=R+Rt?this.face=this.long0>0?Xt.RIGHT:Xt.LEFT:this.face=Xt.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function pM(i){var t={x:0,y:0},e,n,r,o,s,a,l={value:0};if(i.x-=this.long0,this.es!==0?e=Math.atan(this.one_minus_f_squared*Math.tan(i.y)):e=i.y,n=i.x,this.face===Xt.TOP)o=R-e,n>=Rt&&n<=R+Rt?(l.value=Pt.AREA_0,r=n-R):n>R+Rt||n<=-(R+Rt)?(l.value=Pt.AREA_1,r=n>0?n-Zt:n+Zt):n>-(R+Rt)&&n<=-Rt?(l.value=Pt.AREA_2,r=n+R):(l.value=Pt.AREA_3,r=n);else if(this.face===Xt.BOTTOM)o=R+e,n>=Rt&&n<=R+Rt?(l.value=Pt.AREA_0,r=-n+R):n<Rt&&n>=-Rt?(l.value=Pt.AREA_1,r=-n):n<-Rt&&n>=-(R+Rt)?(l.value=Pt.AREA_2,r=-n-R):(l.value=Pt.AREA_3,r=n>0?-n+Zt:-n-Zt);else{var h,u,d,c,f,g,m;this.face===Xt.RIGHT?n=io(n,+R):this.face===Xt.BACK?n=io(n,+Zt):this.face===Xt.LEFT&&(n=io(n,-R)),c=Math.sin(e),f=Math.cos(e),g=Math.sin(n),m=Math.cos(n),h=f*m,u=f*g,d=c,this.face===Xt.FRONT?(o=Math.acos(h),r=rl(o,d,u,l)):this.face===Xt.RIGHT?(o=Math.acos(u),r=rl(o,d,-h,l)):this.face===Xt.BACK?(o=Math.acos(-h),r=rl(o,d,-u,l)):this.face===Xt.LEFT?(o=Math.acos(-u),r=rl(o,d,h,l)):(o=r=0,l.value=Pt.AREA_0)}return a=Math.atan(12/Zt*(r+Math.acos(Math.sin(r)*Math.cos(Rt))-R)),s=Math.sqrt((1-Math.cos(o))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(r))))),l.value===Pt.AREA_1?a+=R:l.value===Pt.AREA_2?a+=Zt:l.value===Pt.AREA_3&&(a+=1.5*Zt),t.x=s*Math.cos(a),t.y=s*Math.sin(a),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,i.x=t.x,i.y=t.y,i}function vM(i){var t={lam:0,phi:0},e,n,r,o,s,a,l,h,u,d={value:0};if(i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,n=Math.atan(Math.sqrt(i.x*i.x+i.y*i.y)),e=Math.atan2(i.y,i.x),i.x>=0&&i.x>=Math.abs(i.y)?d.value=Pt.AREA_0:i.y>=0&&i.y>=Math.abs(i.x)?(d.value=Pt.AREA_1,e-=R):i.x<0&&-i.x>=Math.abs(i.y)?(d.value=Pt.AREA_2,e=e<0?e+Zt:e-Zt):(d.value=Pt.AREA_3,e+=R),u=Zt/12*Math.tan(e),s=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),a=Math.atan(s),r=Math.cos(e),o=Math.tan(n),l=1-r*r*o*o*(1-Math.cos(Math.atan(1/Math.cos(a)))),l<-1?l=-1:l>1&&(l=1),this.face===Xt.TOP)h=Math.acos(l),t.phi=R-h,d.value===Pt.AREA_0?t.lam=a+R:d.value===Pt.AREA_1?t.lam=a<0?a+Zt:a-Zt:d.value===Pt.AREA_2?t.lam=a-R:t.lam=a;else if(this.face===Xt.BOTTOM)h=Math.acos(l),t.phi=h-R,d.value===Pt.AREA_0?t.lam=-a+R:d.value===Pt.AREA_1?t.lam=-a:d.value===Pt.AREA_2?t.lam=-a-R:t.lam=a<0?-a-Zt:-a+Zt;else{var c,f,g;c=l,u=c*c,u>=1?g=0:g=Math.sqrt(1-u)*Math.sin(a),u+=g*g,u>=1?f=0:f=Math.sqrt(1-u),d.value===Pt.AREA_1?(u=f,f=-g,g=u):d.value===Pt.AREA_2?(f=-f,g=-g):d.value===Pt.AREA_3&&(u=f,f=g,g=-u),this.face===Xt.RIGHT?(u=c,c=-f,f=u):this.face===Xt.BACK?(c=-c,f=-f):this.face===Xt.LEFT&&(u=c,c=f,f=-u),t.phi=Math.acos(-g)-R,t.lam=Math.atan2(f,c),this.face===Xt.RIGHT?t.lam=io(t.lam,-R):this.face===Xt.BACK?t.lam=io(t.lam,-Zt):this.face===Xt.LEFT&&(t.lam=io(t.lam,+R))}if(this.es!==0){var m,p,_;m=t.phi<0?1:0,p=Math.tan(t.phi),_=this.b/Math.sqrt(p*p+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-_*_)/(this.one_minus_f*_)),m&&(t.phi=-t.phi)}return t.lam+=this.long0,i.x=t.lam,i.y=t.phi,i}function rl(i,t,e,n){var r;return i<B?(n.value=Pt.AREA_0,r=0):(r=Math.atan2(t,e),Math.abs(r)<=Rt?n.value=Pt.AREA_0:r>Rt&&r<=R+Rt?(n.value=Pt.AREA_1,r-=R):r>R+Rt||r<=-(R+Rt)?(n.value=Pt.AREA_2,r=r>=0?r-Zt:r+Zt):(n.value=Pt.AREA_3,r+=R)),r}function io(i,t){var e=i+t;return e<-Zt?e+=os:e>+Zt&&(e-=os),e}var _M=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const yM={init:mM,forward:pM,inverse:vM,names:_M};var od=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],ms=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],ep=.8487,ip=1.3523,np=vi/5,xM=1/np,no=18,ol=function(i,t){return i[0]+t*(i[1]+t*(i[2]+t*i[3]))},bM=function(i,t){return i[1]+t*(2*i[2]+t*3*i[3])};function kM(i,t,e,n){for(var r=t;n;--n){var o=i(r);if(r-=o,Math.abs(o)<e)break}return r}function wM(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function EM(i){var t=X(i.x-this.long0),e=Math.abs(i.y),n=Math.floor(e*np);n<0?n=0:n>=no&&(n=no-1),e=vi*(e-xM*n);var r={x:ol(od[n],e)*t,y:ol(ms[n],e)};return i.y<0&&(r.y=-r.y),r.x=r.x*this.a*ep+this.x0,r.y=r.y*this.a*ip+this.y0,r}function MM(i){var t={x:(i.x-this.x0)/(this.a*ep),y:Math.abs(i.y-this.y0)/(this.a*ip)};if(t.y>=1)t.x/=od[no][0],t.y=i.y<0?-R:R;else{var e=Math.floor(t.y*no);for(e<0?e=0:e>=no&&(e=no-1);;)if(ms[e][0]>t.y)--e;else if(ms[e+1][0]<=t.y)++e;else break;var n=ms[e],r=5*(t.y-n[0])/(ms[e+1][0]-n[0]);r=kM(function(o){return(ol(n,o)-t.y)/bM(n,o)},r,B,100),t.x/=ol(od[e],r),t.y=(5*e+r)*he,i.y<0&&(t.y=-t.y)}return t.x=X(t.x+this.long0),t}var CM=["Robinson","robin"];const SM={init:wM,forward:EM,inverse:MM,names:CM};function TM(){this.name="geocent"}function zM(i){var t=Im(i,this.es,this.a);return t}function IM(i){var t=Rm(i,this.es,this.a,this.b);return t}var RM=["Geocentric","geocentric","geocent","Geocent"];const PM={init:TM,forward:zM,inverse:IM,names:RM};var pe={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},ps={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function AM(){if(Object.keys(ps).forEach(function(e){if(typeof this[e]>"u")this[e]=ps[e].def;else{if(ps[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);ps[e].num&&(this[e]=parseFloat(this[e]))}ps[e].degrees&&(this[e]=this[e]*he)}.bind(this)),Math.abs(Math.abs(this.lat0)-R)<B?this.mode=this.lat0<0?pe.S_POLE:pe.N_POLE:Math.abs(this.lat0)<B?this.mode=pe.EQUIT:(this.mode=pe.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var i=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(i),this.sw=Math.sin(i)}function DM(i){i.x-=this.long0;var t=Math.sin(i.y),e=Math.cos(i.y),n=Math.cos(i.x),r,o;switch(this.mode){case pe.OBLIQ:o=this.sinph0*t+this.cosph0*e*n;break;case pe.EQUIT:o=e*n;break;case pe.S_POLE:o=-t;break;case pe.N_POLE:o=t;break}switch(o=this.pn1/(this.p-o),r=o*e*Math.sin(i.x),this.mode){case pe.OBLIQ:o*=this.cosph0*t-this.sinph0*e*n;break;case pe.EQUIT:o*=t;break;case pe.N_POLE:o*=-(e*n);break;case pe.S_POLE:o*=e*n;break}var s,a;return s=o*this.cg+r*this.sg,a=1/(s*this.sw*this.h1+this.cw),r=(r*this.cg-o*this.sg)*this.cw*a,o=s*a,i.x=r*this.a,i.y=o*this.a,i}function LM(i){i.x/=this.a,i.y/=this.a;var t={x:i.x,y:i.y},e,n,r;r=1/(this.pn1-i.y*this.sw),e=this.pn1*i.x*r,n=this.pn1*i.y*this.cw*r,i.x=e*this.cg+n*this.sg,i.y=n*this.cg-e*this.sg;var o=ai(i.x,i.y);if(Math.abs(o)<B)t.x=0,t.y=i.y;else{var s,a;switch(a=1-o*o*this.pfact,a=(this.p-Math.sqrt(a))/(this.pn1/o+o/this.pn1),s=Math.sqrt(1-a*a),this.mode){case pe.OBLIQ:t.y=Math.asin(s*this.sinph0+i.y*a*this.cosph0/o),i.y=(s-this.sinph0*Math.sin(t.y))*o,i.x*=a*this.cosph0;break;case pe.EQUIT:t.y=Math.asin(i.y*a/o),i.y=s*o,i.x*=a;break;case pe.N_POLE:t.y=Math.asin(s),i.y=-i.y;break;case pe.S_POLE:t.y=-Math.asin(s);break}t.x=Math.atan2(i.x,i.y)}return i.x=t.x+this.long0,i.y=t.y,i}var FM=["Tilted_Perspective","tpers"];const OM={init:AM,forward:DM,inverse:LM,names:FM};function NM(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var i=1-this.es,t=1/i;this.radius_p=Math.sqrt(i),this.radius_p2=i,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function GM(i){var t=i.x,e=i.y,n,r,o,s;if(t=t-this.long0,this.shape==="ellipse"){e=Math.atan(this.radius_p2*Math.tan(e));var a=this.radius_p/ai(this.radius_p*Math.cos(e),Math.sin(e));if(r=a*Math.cos(t)*Math.cos(e),o=a*Math.sin(t)*Math.cos(e),s=a*Math.sin(e),(this.radius_g-r)*r-o*o-s*s*this.radius_p_inv2<0)return i.x=Number.NaN,i.y=Number.NaN,i;n=this.radius_g-r,this.flip_axis?(i.x=this.radius_g_1*Math.atan(o/ai(s,n)),i.y=this.radius_g_1*Math.atan(s/n)):(i.x=this.radius_g_1*Math.atan(o/n),i.y=this.radius_g_1*Math.atan(s/ai(o,n)))}else this.shape==="sphere"&&(n=Math.cos(e),r=Math.cos(t)*n,o=Math.sin(t)*n,s=Math.sin(e),n=this.radius_g-r,this.flip_axis?(i.x=this.radius_g_1*Math.atan(o/ai(s,n)),i.y=this.radius_g_1*Math.atan(s/n)):(i.x=this.radius_g_1*Math.atan(o/n),i.y=this.radius_g_1*Math.atan(s/ai(o,n))));return i.x=i.x*this.a,i.y=i.y*this.a,i}function jM(i){var t=-1,e=0,n=0,r,o,s,a;if(i.x=i.x/this.a,i.y=i.y/this.a,this.shape==="ellipse"){this.flip_axis?(n=Math.tan(i.y/this.radius_g_1),e=Math.tan(i.x/this.radius_g_1)*ai(1,n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*ai(1,e));var l=n/this.radius_p;if(r=e*e+l*l+t*t,o=2*this.radius_g*t,s=o*o-4*r*this.C,s<0)return i.x=Number.NaN,i.y=Number.NaN,i;a=(-o-Math.sqrt(s))/(2*r),t=this.radius_g+a*t,e*=a,n*=a,i.x=Math.atan2(e,t),i.y=Math.atan(n*Math.cos(i.x)/t),i.y=Math.atan(this.radius_p_inv2*Math.tan(i.y))}else if(this.shape==="sphere"){if(this.flip_axis?(n=Math.tan(i.y/this.radius_g_1),e=Math.tan(i.x/this.radius_g_1)*Math.sqrt(1+n*n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*Math.sqrt(1+e*e)),r=e*e+n*n+t*t,o=2*this.radius_g*t,s=o*o-4*r*this.C,s<0)return i.x=Number.NaN,i.y=Number.NaN,i;a=(-o-Math.sqrt(s))/(2*r),t=this.radius_g+a*t,e*=a,n*=a,i.x=Math.atan2(e,t),i.y=Math.atan(n*Math.cos(i.x)/t)}return i.x=i.x+this.long0,i}var BM=["Geostationary Satellite View","Geostationary_Satellite","geos"];const UM={init:NM,forward:GM,inverse:jM,names:BM};function VM(i){i.Proj.projections.add(el),i.Proj.projections.add(il),i.Proj.projections.add(K2),i.Proj.projections.add(o5),i.Proj.projections.add(d5),i.Proj.projections.add(p5),i.Proj.projections.add(k5),i.Proj.projections.add(S5),i.Proj.projections.add(P5),i.Proj.projections.add(O5),i.Proj.projections.add(tE),i.Proj.projections.add(sE),i.Proj.projections.add(dE),i.Proj.projections.add(vE),i.Proj.projections.add(kE),i.Proj.projections.add(SE),i.Proj.projections.add(PE),i.Proj.projections.add(OE),i.Proj.projections.add(VE),i.Proj.projections.add(YE),i.Proj.projections.add(QE),i.Proj.projections.add(rM),i.Proj.projections.add(hM),i.Proj.projections.add(gM),i.Proj.projections.add(yM),i.Proj.projections.add(SM),i.Proj.projections.add(PM),i.Proj.projections.add(OM),i.Proj.projections.add(UM)}Le.defaultDatum="WGS84",Le.Proj=yi,Le.WGS84=new Le.Proj("WGS84"),Le.Point=Jr,Le.toPoint=Lm,Le.defs=Se,Le.nadgrid=Hw,Le.transform=Qa,Le.mgrs=f2,Le.version="__VERSION__",VM(Le),Le.defs("EPSG:27700","+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs"),cw(Le);const rp=Gt("EPSG:27700"),_C=Tp``;function qM(i){return new G_({units:"metric",bar:i,steps:4,text:!0,minWidth:140})}const XM=`:host{display:block;width:650px;height:650px;position:relative}.map{height:100%;opacity:0;transition:opacity .25s;overflow:hidden;border:#000000 solid .15em}.map:focus{outline:#ffdd00 solid .25em}.ol-control button{border-radius:0!important;background-color:#2c2c2c!important;cursor:pointer;min-width:44px;min-height:44px;font-size:1.75rem}.ol-control button:hover{background-color:#2c2c2cd9!important}.reset-control{top:114px;left:.5em}#area{position:absolute;bottom:0;left:0;z-index:100;background:white}
83
+ `,$M="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjJweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjcgMzciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMy41MDA3IDAuNTgzMzc0QzYuNTY2OSAwLjU4MzM3NCAwLjk1ODk4NCA2LjE5MTI5IDAuOTU4OTg0IDEzLjEyNUMwLjk1ODk4NCAxNi4yNDI1IDEuODU0ODIgMTkuMTYzIDMuNDg1MjMgMjEuNzk2N0M1LjE4NzMyIDI0LjU1NTkgNy40MjY5IDI2LjkyMDkgOS4xNDY5IDI5LjY4QzkuOTg4OTggMzEuMDIzOCAxMC41OTgyIDMyLjI3OCAxMS4yNDMyIDMzLjcyOTJDMTEuNzA5IDM0LjcxNDYgMTIuMDg1MiAzNi40MTY3IDEzLjUwMDcgMzYuNDE2N0MxNC45MTYxIDM2LjQxNjcgMTUuMjkyMyAzNC43MTQ2IDE1Ljc0MDIgMzMuNzI5MkMxNi40MDMyIDMyLjI3OCAxNi45OTQ0IDMxLjAyMzggMTcuODM2NSAyOS42OEMxOS41NTY1IDI2LjkzODggMjEuNzk2MSAyNC41NzM4IDIzLjQ5ODIgMjEuNzk2N0MyNS4xNDY1IDE5LjE2MyAyNi4wNDIzIDE2LjI0MjUgMjYuMDQyMyAxMy4xMjVDMjYuMDQyMyA2LjE5MTI5IDIwLjQzNDQgMC41ODMzNzQgMTMuNTAwNyAwLjU4MzM3NFpNMTMuNTAwNyAxOC4wNTIxQzExLjAyODIgMTguMDUyMSA5LjAyMTQ4IDE2LjA0NTUgOS4wMjE0OCAxMy41NzNDOS4wMjE0OCAxMS4xMDA1IDExLjAyODIgOS4wOTM3OSAxMy41MDA3IDkuMDkzNzlDMTUuOTczMiA5LjA5Mzc5IDE3Ljk3OTggMTEuMTAwNSAxNy45Nzk4IDEzLjU3M0MxNy45Nzk4IDE2LjA0NTUgMTUuOTczMiAxOC4wNTIxIDEzLjUwMDcgMTguMDUyMVoiIGZpbGw9ImJsYWNrIi8+Cjwvc3ZnPgo=";var op=Object.freeze,sp=Object.defineProperty,WM=Object.getOwnPropertyDescriptor,bt=(i,t,e,n)=>{for(var r=n>1?void 0:n?WM(t,e):t,o=i.length-1,s;o>=0;o--)(s=i[o])&&(r=(n?s(t,e,r):s(r))||r);return n&&r&&sp(t,e,r),r},YM=(i,t)=>op(sp(i,"raw",{value:op(t||i.slice())})),ap;q.MyMap=class extends Pn{constructor(){super(),this.id="map",this.latitude=51.507351,this.longitude=-.127758,this.projection="EPSG:4326",this.zoom=10,this.minZoom=7,this.maxZoom=22,this.drawMode=!1,this.drawGeojsonData={type:"Feature",geometry:{}},this.drawGeojsonDataBuffer=100,this.drawPointer="crosshair",this.showFeaturesAtPoint=!1,this.clickFeatures=!1,this.featureColor="#0000ff",this.featureFill=!1,this.featureBorderNone=!1,this.featureBuffer=40,this.showMarker=!1,this.markerLatitude=this.latitude,this.markerLongitude=this.longitude,this.markerColor="#000000",this.geojsonData={type:"FeatureCollection",features:[]},this.geojsonColor="#ff0000",this.geojsonFill=!1,this.geojsonBuffer=12,this.disableVectorTiles=!1,this.osVectorTilesApiKey="a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",this.osFeaturesApiKey="a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",this.osCopyright=`\xA9 Crown copyright and database rights ${new Date().getFullYear()} OS (0)100024857`,this.hideResetControl=!1,this.staticMode=!1,this.areaUnit="m2",this.showScale=!1,this.useScaleBarStyle=!1,this.markerImage="circle",this.dispatch=(i,t)=>this.dispatchEvent(new CustomEvent(i,{detail:t}))}firstUpdated(){var y;const i=this.renderRoot.querySelector(`#${this.id}`),t=!this.disableVectorTiles&&Boolean(this.osVectorTilesApiKey),e=uw(this.osCopyright,this.osVectorTilesApiKey),n=dw(this.osCopyright,this.osVectorTilesApiKey),r=this.projection==="EPSG:27700"&&Boolean(rp)?rp:this.projection,o=Xs([this.longitude,this.latitude],r,"EPSG:3857"),s=new F_({target:i,layers:[t?n:e],view:new en({projection:"EPSG:3857",extent:j0([-10.76418,49.528423,1.9134116,61.331151],"EPSG:4326","EPSG:3857"),minZoom:this.minZoom,maxZoom:this.maxZoom,center:o,zoom:this.zoom,enableRotation:!1}),controls:Wc({attribution:!0,zoom:!this.staticMode}).extend(this.showScale?[qM(this.useScaleBarStyle)]:[]),interactions:Qc({doubleClickZoom:!this.staticMode,dragPan:!this.staticMode,mouseWheelZoom:!this.staticMode})});this.map=s,window.olMap={VITE_APP_OS_VECTOR_TILES_API_KEY:"a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",VITE_APP_OS_FEATURES_API_KEY:"a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",VITE_APP_OS_PLACES_API_KEY:"a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}.VITEST?this.map:void 0;const a=Rk(this.drawPointer),l=Pk(this.drawPointer),h=document.createElement("button");h.innerHTML="\u21BB",h.title="Reset map view";const u=()=>{this.showFeaturesAtPoint?ns(s,pi,this.featureBuffer):g.getFeatures().length>0?ns(s,g,this.geojsonBuffer):(s.getView().setCenter(o),s.getView().setZoom(this.zoom)),this.drawMode&&(Li.clear(),this.dispatch("geojsonChange",{}),this.dispatch("areaChange",`0 ${this.areaUnit==="m2"?"m\xB2":this.areaUnit}`),s.addInteraction(a),s.addInteraction(im))};h.addEventListener("click",u,!1);const d=document.createElement("div");d.className="reset-control ol-unselectable ol-control",d.appendChild(h);var c=new mo({element:d});this.hideResetControl||s.addControl(c);const f=(y=this.renderRoot)==null?void 0:y.querySelectorAll(".ol-control button");f==null||f.forEach(x=>x.setAttribute("aria-label",x.getAttribute("title")||"")),s.on("pointerdrag",()=>{s.getViewport().style.cursor="grabbing"}),s.on("pointermove",()=>{s.getViewport().style.cursor="grab"});const g=new hn;if(this.geojsonData.type==="FeatureCollection"){let x=new Zn().readFeatures(this.geojsonData,{featureProjection:"EPSG:3857"});g.addFeatures(x)}else if(this.geojsonData.type==="Feature"){let x=new Zn().readFeature(this.geojsonData,{featureProjection:"EPSG:3857"});g.addFeature(x)}const m=new Qn({source:g,style:new le({stroke:new ke({color:this.geojsonColor,width:3}),fill:new ge({color:this.geojsonFill?$a(this.geojsonColor,.2):$a(this.geojsonColor,0)})})});if(s.addLayer(m),g.getFeatures().length>0){ns(s,g,this.geojsonBuffer);const x=g.getFeatures()[0].getGeometry();x&&this.dispatch("geojsonDataArea",Yu(x,this.areaUnit))}if(this.drawMode){Li.clear();const x=Object.keys(this.drawGeojsonData.geometry).length>0;if(x){let k=new Zn().readFeature(this.drawGeojsonData,{featureProjection:"EPSG:3857"});Li.addFeature(k),ns(s,Li,this.drawGeojsonDataBuffer)}s.addLayer(em),x||s.addInteraction(a),s.addInteraction(l),s.addInteraction(im),Li.on("change",()=>{var w;const k=Li.getFeatures();if(k.length>0){const M=(w=Mk(k))==null?void 0:w.getGeometry();this.dispatch("geojsonChange",new Zn().writeFeaturesObject(k,{featureProjection:"EPSG:3857"})),M&&this.dispatch("areaChange",Yu(M,this.areaUnit)),s.removeInteraction(a)}})}if(this.drawMode&&Boolean(this.osVectorTilesApiKey)&&!this.disableVectorTiles){s.addLayer(Ck),em.setZIndex(1001);const k=()=>{Va.clear();const w=s.getView().getZoom();if(w&&w>=20){const M=s.getView().calculateExtent(s.getSize());Sk(n,M)}};s.on("loadend",k),s.on("moveend",()=>{var M;((M=n.getSource())==null?void 0:M.getState())==="ready"&&setTimeout(k,200)})}if(this.showFeaturesAtPoint&&Boolean(this.osFeaturesApiKey)){pm(o,this.osFeaturesApiKey,!1),this.clickFeatures&&s.on("singleclick",k=>{pm(k.coordinate,this.osFeaturesApiKey,!0)});const x=ow(this.featureColor,this.featureFill,this.featureBorderNone);s.addLayer(x),pi.on("change",()=>{if(pi.getState()==="ready"&&pi.getFeatures().length>0){ns(s,pi,this.featureBuffer),this.dispatch("featuresGeojsonChange",new Zn().writeFeaturesObject(pi.getFeatures(),{featureProjection:"EPSG:3857"}));const k=pi.getFeatures()[0].getGeometry();k&&this.dispatch("featuresAreaChange",Yu(k,this.areaUnit))}})}const p=new Hn({radius:9,fill:new ge({color:this.markerColor})}),_=new fa({src:$M}),v=()=>{switch(this.markerImage){case"circle":return p;case"pin":return _}};if(this.showMarker){const x=new ni(Xs([this.markerLongitude,this.markerLatitude],r,"EPSG:3857")),k=new Qn({source:new hn({features:[new Ti(x)]}),style:new le({image:v()})});s.addLayer(k)}setTimeout(()=>{window.dispatchEvent(new Event("resize")),i.style.opacity="1",this.dispatch("ready")},500)}render(){return Bi(ap||(ap=YM([`<script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>
84
84
  <link rel="stylesheet" href="https://cdn.skypack.dev/ol@^6.6.1/ol.css" />
85
- <div id="`,'" class="map" tabindex="0" />'])),this.id)}disconnectedCallback(){var i;super.disconnectedCallback(),(i=this.map)==null||i.dispose()}},q.MyMap.styles=Ss(XE),bt([J({type:String})],q.MyMap.prototype,"id",2),bt([J({type:Number})],q.MyMap.prototype,"latitude",2),bt([J({type:Number})],q.MyMap.prototype,"longitude",2),bt([J({type:String})],q.MyMap.prototype,"projection",2),bt([J({type:Number})],q.MyMap.prototype,"zoom",2),bt([J({type:Number})],q.MyMap.prototype,"minZoom",2),bt([J({type:Number})],q.MyMap.prototype,"maxZoom",2),bt([J({type:Boolean})],q.MyMap.prototype,"drawMode",2),bt([J({type:Object})],q.MyMap.prototype,"drawGeojsonData",2),bt([J({type:Number})],q.MyMap.prototype,"drawGeojsonDataBuffer",2),bt([J({type:String})],q.MyMap.prototype,"drawPointer",2),bt([J({type:Boolean})],q.MyMap.prototype,"showFeaturesAtPoint",2),bt([J({type:Boolean})],q.MyMap.prototype,"clickFeatures",2),bt([J({type:String})],q.MyMap.prototype,"featureColor",2),bt([J({type:Boolean})],q.MyMap.prototype,"featureFill",2),bt([J({type:Boolean})],q.MyMap.prototype,"featureBorderNone",2),bt([J({type:Number})],q.MyMap.prototype,"featureBuffer",2),bt([J({type:Boolean})],q.MyMap.prototype,"showMarker",2),bt([J({type:Number})],q.MyMap.prototype,"markerLatitude",2),bt([J({type:Number})],q.MyMap.prototype,"markerLongitude",2),bt([J({type:String})],q.MyMap.prototype,"markerColor",2),bt([J({type:Object})],q.MyMap.prototype,"geojsonData",2),bt([J({type:String})],q.MyMap.prototype,"geojsonColor",2),bt([J({type:Boolean})],q.MyMap.prototype,"geojsonFill",2),bt([J({type:Number})],q.MyMap.prototype,"geojsonBuffer",2),bt([J({type:Boolean})],q.MyMap.prototype,"disableVectorTiles",2),bt([J({type:String})],q.MyMap.prototype,"osVectorTilesApiKey",2),bt([J({type:String})],q.MyMap.prototype,"osFeaturesApiKey",2),bt([J({type:String})],q.MyMap.prototype,"osCopyright",2),bt([J({type:Boolean})],q.MyMap.prototype,"hideResetControl",2),bt([J({type:Boolean})],q.MyMap.prototype,"staticMode",2),bt([J({type:String})],q.MyMap.prototype,"areaUnit",2),bt([J({type:Boolean})],q.MyMap.prototype,"showScale",2),bt([J({type:Boolean})],q.MyMap.prototype,"useScaleBarStyle",2),bt([J({type:String})],q.MyMap.prototype,"markerImage",2),q.MyMap=bt([vl("my-map")],q.MyMap);var hp={exports:{}};(function(i,t){(function(n,r){i.exports=r()})(window,function(){return function(e){var n={};function r(o){if(n[o])return n[o].exports;var s=n[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=e,r.c=n,r.d=function(o,s,a){r.o(o,s)||Object.defineProperty(o,s,{enumerable:!0,get:a})},r.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},r.t=function(o,s){if(1&s&&(o=r(o)),8&s||4&s&&typeof o=="object"&&o&&o.__esModule)return o;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:o}),2&s&&typeof o!="string")for(var l in o)r.d(a,l,function(h){return o[h]}.bind(null,l));return a},r.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return r.d(s,"a",s),s},r.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},r.p="/",r(r.s=37)}([function(e,n,r){var o=r(1),s=r(6),a=r(7),l=r(16),h=r(18),u="prototype",d=function(c,f,g){var m,p,_,v,y=c&d.F,x=c&d.G,k=c&d.S,w=c&d.P,C=c&d.B,M=x?o:k?o[f]||(o[f]={}):(o[f]||{})[u],S=x?s:s[f]||(s[f]={}),R=S[u]||(S[u]={});for(m in x&&(g=f),g)_=((p=!y&&M&&M[m]!==void 0)?M:g)[m],v=C&&p?h(_,o):w&&typeof _=="function"?h(Function.call,_):_,M&&l(M,m,_,c&d.U),S[m]!=_&&a(S,m,v),w&&R[m]!=_&&(R[m]=_)};o.core=s,d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,e.exports=d},function(e,n){var r=e.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=r)},function(e,n){e.exports=function(r){return typeof r=="object"?r!==null:typeof r=="function"}},function(e,n,r){e.exports=!r(4)(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(e,n){e.exports=function(r){try{return!!r()}catch{return!0}}},function(e,n,r){r.r(n),r.d(n,"h",function(){return h}),r.d(n,"createElement",function(){return h}),r.d(n,"cloneElement",function(){return c}),r.d(n,"Component",function(){return V}),r.d(n,"render",function(){return z}),r.d(n,"rerender",function(){return p}),r.d(n,"options",function(){return s});var o=function(){},s={},a=[],l=[];function h(b,T){var Y,E,H,$,vt=l;for($=arguments.length;2<$--;)a.push(arguments[$]);for(T&&T.children!=null&&(a.length||a.push(T.children),delete T.children);a.length;)if((E=a.pop())&&E.pop!==void 0)for($=E.length;$--;)a.push(E[$]);else typeof E=="boolean"&&(E=null),(H=typeof b!="function")&&(E==null?E="":typeof E=="number"?E=String(E):typeof E!="string"&&(H=!1)),H&&Y?vt[vt.length-1]+=E:vt===l?vt=[E]:vt.push(E),Y=H;var Ct=new o;return Ct.nodeName=b,Ct.children=vt,Ct.attributes=T==null?void 0:T,Ct.key=T==null?void 0:T.key,s.vnode!==void 0&&s.vnode(Ct),Ct}function u(b,T){for(var Y in T)b[Y]=T[Y];return b}var d=typeof Promise=="function"?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function c(b,T){return h(b.nodeName,u(u({},b.attributes),T),2<arguments.length?[].slice.call(arguments,2):b.children)}var f=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,g=[];function m(b){!b._dirty&&(b._dirty=!0)&&g.push(b)==1&&(s.debounceRendering||d)(p)}function p(){var b,T=g;for(g=[];b=T.pop();)b._dirty&&D(b)}function _(b,T){return b.normalizedNodeName===T||b.nodeName.toLowerCase()===T.toLowerCase()}function v(b){var T=u({},b.attributes);T.children=b.children;var Y=b.nodeName.defaultProps;if(Y!==void 0)for(var E in Y)T[E]===void 0&&(T[E]=Y[E]);return T}function y(b){var T=b.parentNode;T&&T.removeChild(b)}function x(b,T,Y,E,H){if(T==="className"&&(T="class"),T!=="key")if(T==="ref")Y&&Y(null),E&&E(b);else if(T!=="class"||H)if(T==="style"){if(E&&typeof E!="string"&&typeof Y!="string"||(b.style.cssText=E||""),E&&typeof E=="object"){if(typeof Y!="string")for(var $ in Y)$ in E||(b.style[$]="");for(var $ in E)b.style[$]=typeof E[$]=="number"&&f.test($)===!1?E[$]+"px":E[$]}}else if(T==="dangerouslySetInnerHTML")E&&(b.innerHTML=E.__html||"");else if(T[0]=="o"&&T[1]=="n"){var vt=T!==(T=T.replace(/Capture$/,""));T=T.toLowerCase().substring(2),E?Y||b.addEventListener(T,k,vt):b.removeEventListener(T,k,vt),(b._listeners||(b._listeners={}))[T]=E}else if(T!=="list"&&T!=="type"&&!H&&T in b){try{b[T]=E==null?"":E}catch{}E!=null&&E!==!1||T=="spellcheck"||b.removeAttribute(T)}else{var Ct=H&&T!==(T=T.replace(/^xlink:?/,""));E==null||E===!1?Ct?b.removeAttributeNS("http://www.w3.org/1999/xlink",T.toLowerCase()):b.removeAttribute(T):typeof E!="function"&&(Ct?b.setAttributeNS("http://www.w3.org/1999/xlink",T.toLowerCase(),E):b.setAttribute(T,E))}else b.className=E||""}function k(b){return this._listeners[b.type](s.event&&s.event(b)||b)}var w=[],C=0,M=!1,S=!1;function R(){for(var b;b=w.pop();)s.afterMount&&s.afterMount(b),b.componentDidMount&&b.componentDidMount()}function A(b,T,Y,E,H,$){C++||(M=H!=null&&H.ownerSVGElement!==void 0,S=b!=null&&!("__preactattr_"in b));var vt=G(b,T,Y,E,$);return H&&vt.parentNode!==H&&H.appendChild(vt),--C||(S=!1,$||R()),vt}function G(b,T,Y,E,H){var $=b,vt=M;if(T!=null&&typeof T!="boolean"||(T=""),typeof T=="string"||typeof T=="number")return b&&b.splitText!==void 0&&b.parentNode&&(!b._component||H)?b.nodeValue!=T&&(b.nodeValue=T):($=document.createTextNode(T),b&&(b.parentNode&&b.parentNode.replaceChild($,b),P(b,!0))),$.__preactattr_=!0,$;var Ct=T.nodeName;if(typeof Ct=="function")return function(ut,pt,kt,yt){for(var st=ut&&ut._component,nt=st,wt=ut,zt=st&&ut._componentConstructor===pt.nodeName,Bt=zt,xt=v(pt);st&&!Bt&&(st=st._parentComponent);)Bt=st.constructor===pt.nodeName;return st&&Bt&&(!yt||st._component)?(W(st,xt,3,kt,yt),ut=st.base):(nt&&!zt&&(Z(nt),ut=wt=null),st=U(pt.nodeName,xt,kt),ut&&!st.nextBase&&(st.nextBase=ut,wt=null),W(st,xt,1,kt,yt),ut=st.base,wt&&ut!==wt&&(wt._component=null,P(wt,!1))),ut}(b,T,Y,E);if(M=Ct==="svg"||Ct!=="foreignObject"&&M,Ct=String(Ct),(!b||!_(b,Ct))&&($=function(ut,pt){var kt=pt?document.createElementNS("http://www.w3.org/2000/svg",ut):document.createElement(ut);return kt.normalizedNodeName=ut,kt}(Ct,M),b)){for(;b.firstChild;)$.appendChild(b.firstChild);b.parentNode&&b.parentNode.replaceChild($,b),P(b,!0)}var _t=$.firstChild,Et=$.__preactattr_,Lt=T.children;if(Et==null){Et=$.__preactattr_={};for(var Dt=$.attributes,jt=Dt.length;jt--;)Et[Dt[jt].name]=Dt[jt].value}return!S&&Lt&&Lt.length===1&&typeof Lt[0]=="string"&&_t!=null&&_t.splitText!==void 0&&_t.nextSibling==null?_t.nodeValue!=Lt[0]&&(_t.nodeValue=Lt[0]):(Lt&&Lt.length||_t!=null)&&function(ut,pt,kt,yt,st){var nt,wt,zt,Bt,xt,dt=ut.childNodes,Ft=[],St={},ct=0,ue=0,Ve=dt.length,$t=0,ze=pt?pt.length:0;if(Ve!==0)for(var Ut=0;Ut<Ve;Ut++){var Ht=dt[Ut],Tn=Ht.__preactattr_,ae=ze&&Tn?Ht._component?Ht._component.__key:Tn.key:null;ae!=null?(ct++,St[ae]=Ht):(Tn||(Ht.splitText!==void 0?!st||Ht.nodeValue.trim():st))&&(Ft[$t++]=Ht)}if(ze!==0)for(var Ut=0;Ut<ze;Ut++){Bt=pt[Ut],xt=null;var ae=Bt.key;if(ae!=null)ct&&St[ae]!==void 0&&(xt=St[ae],St[ae]=void 0,ct--);else if(ue<$t){for(nt=ue;nt<$t;nt++)if(Ft[nt]!==void 0&&(qe=wt=Ft[nt],Oe=st,typeof(ve=Bt)=="string"||typeof ve=="number"?qe.splitText!==void 0:typeof ve.nodeName=="string"?!qe._componentConstructor&&_(qe,ve.nodeName):Oe||qe._componentConstructor===ve.nodeName)){xt=wt,Ft[nt]=void 0,nt===$t-1&&$t--,nt===ue&&ue++;break}}xt=G(xt,Bt,kt,yt),zt=dt[Ut],xt&&xt!==ut&&xt!==zt&&(zt==null?ut.appendChild(xt):xt===zt.nextSibling?y(zt):ut.insertBefore(xt,zt))}var qe,ve,Oe;if(ct)for(var Ut in St)St[Ut]!==void 0&&P(St[Ut],!1);for(;ue<=$t;)(xt=Ft[$t--])!==void 0&&P(xt,!1)}($,Lt,Y,E,S||Et.dangerouslySetInnerHTML!=null),function(ut,pt,kt){var yt;for(yt in kt)pt&&pt[yt]!=null||kt[yt]==null||x(ut,yt,kt[yt],kt[yt]=void 0,M);for(yt in pt)yt==="children"||yt==="innerHTML"||yt in kt&&pt[yt]===(yt==="value"||yt==="checked"?ut[yt]:kt[yt])||x(ut,yt,kt[yt],kt[yt]=pt[yt],M)}($,T.attributes,Et),M=vt,$}function P(b,T){var Y=b._component;Y?Z(Y):(b.__preactattr_!=null&&b.__preactattr_.ref&&b.__preactattr_.ref(null),T!==!1&&b.__preactattr_!=null||y(b),at(b))}function at(b){for(b=b.lastChild;b;){var T=b.previousSibling;P(b,!0),b=T}}var j=[];function U(b,T,Y){var E,H=j.length;for(b.prototype&&b.prototype.render?(E=new b(T,Y),V.call(E,T,Y)):((E=new V(T,Y)).constructor=b,E.render=O);H--;)if(j[H].constructor===b)return E.nextBase=j[H].nextBase,j.splice(H,1),E;return E}function O(b,T,Y){return this.constructor(b,Y)}function W(b,T,Y,E,H){b._disable||(b._disable=!0,b.__ref=T.ref,b.__key=T.key,delete T.ref,delete T.key,typeof b.constructor.getDerivedStateFromProps>"u"&&(!b.base||H?b.componentWillMount&&b.componentWillMount():b.componentWillReceiveProps&&b.componentWillReceiveProps(T,E)),E&&E!==b.context&&(b.prevContext||(b.prevContext=b.context),b.context=E),b.prevProps||(b.prevProps=b.props),b.props=T,b._disable=!1,Y!==0&&(Y!==1&&s.syncComponentUpdates===!1&&b.base?m(b):D(b,1,H)),b.__ref&&b.__ref(b))}function D(b,T,Y,E){if(!b._disable){var H,$,vt,Ct=b.props,_t=b.state,Et=b.context,Lt=b.prevProps||Ct,Dt=b.prevState||_t,jt=b.prevContext||Et,F=b.base,ut=b.nextBase,pt=F||ut,kt=b._component,yt=!1,st=jt;if(b.constructor.getDerivedStateFromProps&&(_t=u(u({},_t),b.constructor.getDerivedStateFromProps(Ct,_t)),b.state=_t),F&&(b.props=Lt,b.state=Dt,b.context=jt,T!==2&&b.shouldComponentUpdate&&b.shouldComponentUpdate(Ct,_t,Et)===!1?yt=!0:b.componentWillUpdate&&b.componentWillUpdate(Ct,_t,Et),b.props=Ct,b.state=_t,b.context=Et),b.prevProps=b.prevState=b.prevContext=b.nextBase=null,b._dirty=!1,!yt){H=b.render(Ct,_t,Et),b.getChildContext&&(Et=u(u({},Et),b.getChildContext())),F&&b.getSnapshotBeforeUpdate&&(st=b.getSnapshotBeforeUpdate(Lt,Dt));var nt,wt,zt=H&&H.nodeName;if(typeof zt=="function"){var Bt=v(H);($=kt)&&$.constructor===zt&&Bt.key==$.__key?W($,Bt,1,Et,!1):(nt=$,b._component=$=U(zt,Bt,Et),$.nextBase=$.nextBase||ut,$._parentComponent=b,W($,Bt,0,Et,!1),D($,1,Y,!0)),wt=$.base}else vt=pt,(nt=kt)&&(vt=b._component=null),(pt||T===1)&&(vt&&(vt._component=null),wt=function(ct,ue,Ve,$t,ze,Ut){C++||(M=ze!=null&&ze.ownerSVGElement!==void 0,S=ct!=null&&!("__preactattr_"in ct));var Ht=G(ct,ue,Ve,$t,Ut);return ze&&Ht.parentNode!==ze&&ze.appendChild(Ht),--C||(S=!1,Ut||R()),Ht}(vt,H,Et,Y||!F,pt&&pt.parentNode,!0));if(pt&&wt!==pt&&$!==kt){var xt=pt.parentNode;xt&&wt!==xt&&(xt.replaceChild(wt,pt),nt||(pt._component=null,P(pt,!1)))}if(nt&&Z(nt),(b.base=wt)&&!E){for(var dt=b,Ft=b;Ft=Ft._parentComponent;)(dt=Ft).base=wt;wt._component=dt,wt._componentConstructor=dt.constructor}}for(!F||Y?w.unshift(b):yt||(b.componentDidUpdate&&b.componentDidUpdate(Lt,Dt,st),s.afterUpdate&&s.afterUpdate(b));b._renderCallbacks.length;)b._renderCallbacks.pop().call(b);C||E||R()}}function Z(b){s.beforeUnmount&&s.beforeUnmount(b);var T=b.base;b._disable=!0,b.componentWillUnmount&&b.componentWillUnmount(),b.base=null;var Y=b._component;Y?Z(Y):T&&(T.__preactattr_&&T.__preactattr_.ref&&T.__preactattr_.ref(null),y(b.nextBase=T),j.push(b),at(T)),b.__ref&&b.__ref(null)}function V(b,T){this._dirty=!0,this.context=T,this.props=b,this.state=this.state||{},this._renderCallbacks=[]}function z(b,T,Y){return A(Y,b,{},!1,T,!1)}u(V.prototype,{setState:function(b,T){this.prevState||(this.prevState=this.state),this.state=u(u({},this.state),typeof b=="function"?b(this.state,this.props):b),T&&this._renderCallbacks.push(T),m(this)},forceUpdate:function(b){b&&this._renderCallbacks.push(b),D(this,2)},render:function(){}});var ot={h,createElement:h,cloneElement:c,Component:V,render:z,rerender:p,options:s};n.default=ot},function(e,n){var r=e.exports={version:"2.5.7"};typeof __e=="number"&&(__e=r)},function(e,n,r){var o=r(8),s=r(40);e.exports=r(3)?function(a,l,h){return o.f(a,l,s(1,h))}:function(a,l,h){return a[l]=h,a}},function(e,n,r){var o=r(9),s=r(38),a=r(39),l=Object.defineProperty;n.f=r(3)?Object.defineProperty:function(h,u,d){if(o(h),u=a(u,!0),o(d),s)try{return l(h,u,d)}catch{}if("get"in d||"set"in d)throw TypeError("Accessors not supported!");return"value"in d&&(h[u]=d.value),h}},function(e,n,r){var o=r(2);e.exports=function(s){if(!o(s))throw TypeError(s+" is not an object!");return s}},function(e,n){var r=0,o=Math.random();e.exports=function(s){return"Symbol(".concat(s===void 0?"":s,")_",(++r+o).toString(36))}},function(e,n,r){var o=r(22);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(s){return o(s)=="String"?s.split(""):Object(s)}},function(e,n){e.exports=function(r){if(r==null)throw TypeError("Can't call method on "+r);return r}},function(e,n,r){var o=r(4);e.exports=function(s,a){return!!s&&o(function(){a?s.call(null,function(){},1):s.call(null)})}},function(e,n,r){var o=r(0);o(o.S+o.F,"Object",{assign:r(41)})},function(e,n,r){var o=r(2),s=r(1).document,a=o(s)&&o(s.createElement);e.exports=function(l){return a?s.createElement(l):{}}},function(e,n,r){var o=r(1),s=r(7),a=r(17),l=r(10)("src"),h="toString",u=Function[h],d=(""+u).split(h);r(6).inspectSource=function(c){return u.call(c)},(e.exports=function(c,f,g,m){var p=typeof g=="function";p&&(a(g,"name")||s(g,"name",f)),c[f]!==g&&(p&&(a(g,l)||s(g,l,c[f]?""+c[f]:d.join(String(f)))),c===o?c[f]=g:m?c[f]?c[f]=g:s(c,f,g):(delete c[f],s(c,f,g)))})(Function.prototype,h,function(){return typeof this=="function"&&this[l]||u.call(this)})},function(e,n){var r={}.hasOwnProperty;e.exports=function(o,s){return r.call(o,s)}},function(e,n,r){var o=r(19);e.exports=function(s,a,l){if(o(s),a===void 0)return s;switch(l){case 1:return function(h){return s.call(a,h)};case 2:return function(h,u){return s.call(a,h,u)};case 3:return function(h,u,d){return s.call(a,h,u,d)}}return function(){return s.apply(a,arguments)}}},function(e,n){e.exports=function(r){if(typeof r!="function")throw TypeError(r+" is not a function!");return r}},function(e,n,r){var o=r(42),s=r(28);e.exports=Object.keys||function(a){return o(a,s)}},function(e,n,r){var o=r(11),s=r(12);e.exports=function(a){return o(s(a))}},function(e,n){var r={}.toString;e.exports=function(o){return r.call(o).slice(8,-1)}},function(e,n,r){var o=r(21),s=r(24),a=r(43);e.exports=function(l){return function(h,u,d){var c,f=o(h),g=s(f.length),m=a(d,g);if(l&&u!=u){for(;m<g;)if((c=f[m++])!=c)return!0}else for(;m<g;m++)if((l||m in f)&&f[m]===u)return l||m||0;return!l&&-1}}},function(e,n,r){var o=r(25),s=Math.min;e.exports=function(a){return 0<a?s(o(a),9007199254740991):0}},function(e,n){var r=Math.ceil,o=Math.floor;e.exports=function(s){return isNaN(s=+s)?0:(0<s?o:r)(s)}},function(e,n,r){var o=r(27)("keys"),s=r(10);e.exports=function(a){return o[a]||(o[a]=s(a))}},function(e,n,r){var o=r(6),s=r(1),a="__core-js_shared__",l=s[a]||(s[a]={});(e.exports=function(h,u){return l[h]||(l[h]=u!==void 0?u:{})})("versions",[]).push({version:o.version,mode:r(44)?"pure":"global",copyright:"\xA9 2018 Denis Pushkarev (zloirock.ru)"})},function(e,n){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,n,r){var o=r(12);e.exports=function(s){return Object(o(s))}},function(e,n,r){var o=r(8).f,s=Function.prototype,a=/^\s*function ([^ (]*)/;"name"in s||r(3)&&o(s,"name",{configurable:!0,get:function(){try{return(""+this).match(a)[1]}catch{return""}}})},function(e,n,r){var o=r(0),s=r(32)(1);o(o.P+o.F*!r(13)([].map,!0),"Array",{map:function(a){return s(this,a,arguments[1])}})},function(e,n,r){var o=r(18),s=r(11),a=r(29),l=r(24),h=r(47);e.exports=function(u,d){var c=u==1,f=u==2,g=u==3,m=u==4,p=u==6,_=u==5||p,v=d||h;return function(y,x,k){for(var w,C,M=a(y),S=s(M),R=o(x,k,3),A=l(S.length),G=0,P=c?v(y,A):f?v(y,0):void 0;G<A;G++)if((_||G in S)&&(C=R(w=S[G],G,M),u)){if(c)P[G]=C;else if(C)switch(u){case 3:return!0;case 5:return w;case 6:return G;case 2:P.push(w)}else if(m)return!1}return p?-1:g||m?m:P}}},function(e,n,r){var o=r(22);e.exports=Array.isArray||function(s){return o(s)=="Array"}},function(e,n,r){var o=r(27)("wks"),s=r(10),a=r(1).Symbol,l=typeof a=="function";(e.exports=function(h){return o[h]||(o[h]=l&&a[h]||(l?a:s)("Symbol."+h))}).store=o},function(e,n,r){var o=r(0),s=r(23)(!1),a=[].indexOf,l=!!a&&1/[1].indexOf(1,-0)<0;o(o.P+o.F*(l||!r(13)(a)),"Array",{indexOf:function(h){return l?a.apply(this,arguments)||0:s(this,h,arguments[1])}})},function(e,n,r){var o=r(0);o(o.S,"Object",{create:r(52)})},function(e,n,r){n.__esModule=!0,n.default=void 0,r(14),r(30),r(31),r(35),r(49),r(50);var o=r(5),s=function(d){return d&&d.__esModule?d:{default:d}}(r(51));function a(u){if(!u.element)throw new Error("element is not defined");if(!u.id)throw new Error("id is not defined");if(!u.source)throw new Error("source is not defined");Array.isArray(u.source)&&(u.source=l(u.source)),(0,o.render)((0,o.createElement)(s.default,u),u.element)}var l=function(d){return function(c,f){f(d.filter(function(g){return g.toLowerCase().indexOf(c.toLowerCase())!==-1}))}};a.enhanceSelectElement=function(u){if(!u.selectElement)throw new Error("selectElement is not defined");if(!u.source){var d=[].filter.call(u.selectElement.options,function(g){return g.value||u.preserveNullOptions});u.source=d.map(function(g){return g.textContent||g.innerText})}if(u.onConfirm=u.onConfirm||function(g){var m=[].filter.call(u.selectElement.options,function(p){return(p.textContent||p.innerText)===g})[0];m&&(m.selected=!0)},u.selectElement.value||u.defaultValue===void 0){var c=u.selectElement.options[u.selectElement.options.selectedIndex];u.defaultValue=c.textContent||c.innerText}u.name===void 0&&(u.name=""),u.id===void 0&&(u.selectElement.id===void 0?u.id="":u.id=u.selectElement.id),u.autoselect===void 0&&(u.autoselect=!0);var f=document.createElement("div");u.selectElement.parentNode.insertBefore(f,u.selectElement),a(Object.assign({},u,{element:f})),u.selectElement.style.display="none",u.selectElement.id=u.selectElement.id+"-select"};var h=a;n.default=h},function(e,n,r){e.exports=!r(3)&&!r(4)(function(){return Object.defineProperty(r(15)("div"),"a",{get:function(){return 7}}).a!=7})},function(e,n,r){var o=r(2);e.exports=function(s,a){if(!o(s))return s;var l,h;if(a&&typeof(l=s.toString)=="function"&&!o(h=l.call(s))||typeof(l=s.valueOf)=="function"&&!o(h=l.call(s))||!a&&typeof(l=s.toString)=="function"&&!o(h=l.call(s)))return h;throw TypeError("Can't convert object to primitive value")}},function(e,n){e.exports=function(r,o){return{enumerable:!(1&r),configurable:!(2&r),writable:!(4&r),value:o}}},function(e,n,r){var o=r(20),s=r(45),a=r(46),l=r(29),h=r(11),u=Object.assign;e.exports=!u||r(4)(function(){var d={},c={},f=Symbol(),g="abcdefghijklmnopqrst";return d[f]=7,g.split("").forEach(function(m){c[m]=m}),u({},d)[f]!=7||Object.keys(u({},c)).join("")!=g})?function(d,c){for(var f=l(d),g=arguments.length,m=1,p=s.f,_=a.f;m<g;)for(var v,y=h(arguments[m++]),x=p?o(y).concat(p(y)):o(y),k=x.length,w=0;w<k;)_.call(y,v=x[w++])&&(f[v]=y[v]);return f}:u},function(e,n,r){var o=r(17),s=r(21),a=r(23)(!1),l=r(26)("IE_PROTO");e.exports=function(h,u){var d,c=s(h),f=0,g=[];for(d in c)d!=l&&o(c,d)&&g.push(d);for(;u.length>f;)o(c,d=u[f++])&&(~a(g,d)||g.push(d));return g}},function(e,n,r){var o=r(25),s=Math.max,a=Math.min;e.exports=function(l,h){return(l=o(l))<0?s(l+h,0):a(l,h)}},function(e,n){e.exports=!1},function(e,n){n.f=Object.getOwnPropertySymbols},function(e,n){n.f={}.propertyIsEnumerable},function(e,n,r){var o=r(48);e.exports=function(s,a){return new(o(s))(a)}},function(e,n,r){var o=r(2),s=r(33),a=r(34)("species");e.exports=function(l){var h;return s(l)&&(typeof(h=l.constructor)!="function"||h!==Array&&!s(h.prototype)||(h=void 0),o(h)&&(h=h[a])===null&&(h=void 0)),h===void 0?Array:h}},function(e,n,r){var o=r(0),s=r(32)(2);o(o.P+o.F*!r(13)([].filter,!0),"Array",{filter:function(a){return s(this,a,arguments[1])}})},function(e,n,r){var o=r(0);o(o.S,"Array",{isArray:r(33)})},function(e,n,r){n.__esModule=!0,n.default=void 0,r(14),r(36),r(30),r(31),r(35),r(55),r(58);var o=r(5),s=l(r(60)),a=l(r(61));function l(g){return g&&g.__esModule?g:{default:g}}function h(){return(h=Object.assign||function(g){for(var m=1;m<arguments.length;m++){var p=arguments[m];for(var _ in p)Object.prototype.hasOwnProperty.call(p,_)&&(g[_]=p[_])}return g}).apply(this,arguments)}function u(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}var d={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function c(){return typeof navigator<"u"&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var f=function(g){function m(_){var v;return(v=g.call(this,_)||this).elementReferences={},v.state={focused:null,hovered:null,menuOpen:!1,options:_.defaultValue?[_.defaultValue]:[],query:_.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},v.handleComponentBlur=v.handleComponentBlur.bind(u(u(v))),v.handleKeyDown=v.handleKeyDown.bind(u(u(v))),v.handleUpArrow=v.handleUpArrow.bind(u(u(v))),v.handleDownArrow=v.handleDownArrow.bind(u(u(v))),v.handleEnter=v.handleEnter.bind(u(u(v))),v.handlePrintableKey=v.handlePrintableKey.bind(u(u(v))),v.handleListMouseLeave=v.handleListMouseLeave.bind(u(u(v))),v.handleOptionBlur=v.handleOptionBlur.bind(u(u(v))),v.handleOptionClick=v.handleOptionClick.bind(u(u(v))),v.handleOptionFocus=v.handleOptionFocus.bind(u(u(v))),v.handleOptionMouseDown=v.handleOptionMouseDown.bind(u(u(v))),v.handleOptionMouseEnter=v.handleOptionMouseEnter.bind(u(u(v))),v.handleInputBlur=v.handleInputBlur.bind(u(u(v))),v.handleInputChange=v.handleInputChange.bind(u(u(v))),v.handleInputFocus=v.handleInputFocus.bind(u(u(v))),v.pollInputElement=v.pollInputElement.bind(u(u(v))),v.getDirectInputChanges=v.getDirectInputChanges.bind(u(u(v))),v}(function(v,y){v.prototype=Object.create(y.prototype),(v.prototype.constructor=v).__proto__=y})(m,g);var p=m.prototype;return p.isQueryAnOption=function(_,v){var y=this;return v.map(function(x){return y.templateInputValue(x).toLowerCase()}).indexOf(_.toLowerCase())!==-1},p.componentDidMount=function(){this.pollInputElement()},p.componentWillUnmount=function(){clearTimeout(this.$pollInput)},p.pollInputElement=function(){var _=this;this.getDirectInputChanges(),this.$pollInput=setTimeout(function(){_.pollInputElement()},100)},p.getDirectInputChanges=function(){var _=this.elementReferences[-1];_&&_.value!==this.state.query&&this.handleInputChange({target:{value:_.value}})},p.componentDidUpdate=function(_,v){var y=this.state.focused,x=y===null,k=v.focused!==y;k&&!x&&this.elementReferences[y].focus();var w=y===-1,C=k&&v.focused===null;if(w&&C){var M=this.elementReferences[y];M.setSelectionRange(0,M.value.length)}},p.hasAutoselect=function(){return!c()&&this.props.autoselect},p.templateInputValue=function(_){var v=this.props.templates&&this.props.templates.inputValue;return v?v(_):_},p.templateSuggestion=function(_){var v=this.props.templates&&this.props.templates.suggestion;return v?v(_):_},p.handleComponentBlur=function(_){var v,y=this.state,x=y.options,k=y.query,w=y.selected;this.props.confirmOnBlur?(v=_.query||k,this.props.onConfirm(x[w])):v=k,this.setState({focused:null,menuOpen:_.menuOpen||!1,query:v,selected:null,validChoiceMade:this.isQueryAnOption(v,x)})},p.handleListMouseLeave=function(_){this.setState({hovered:null})},p.handleOptionBlur=function(_,v){var y=this.state,x=y.focused,k=y.menuOpen,w=y.options,C=y.selected,M=_.relatedTarget===null,S=_.relatedTarget===this.elementReferences[-1],R=x!==v&&x!==-1;if(!R&&M||!(R||S)){var A=k&&c();this.handleComponentBlur({menuOpen:A,query:this.templateInputValue(w[C])})}},p.handleInputBlur=function(_){var v=this.state,y=v.focused,x=v.menuOpen,k=v.options,w=v.query,C=v.selected;if(y===-1){var M=x&&c(),S=c()?w:this.templateInputValue(k[C]);this.handleComponentBlur({menuOpen:M,query:S})}},p.handleInputChange=function(_){var v=this,y=this.props,x=y.minLength,k=y.source,w=y.showAllValues,C=this.hasAutoselect(),M=_.target.value,S=M.length===0,R=this.state.query.length!==M.length,A=M.length>=x;this.setState({query:M,ariaHint:S}),w||!S&&R&&A?k(M,function(G){var P=0<G.length;v.setState({menuOpen:P,options:G,selected:C&&P?0:-1,validChoiceMade:!1})}):!S&&A||this.setState({menuOpen:!1,options:[]})},p.handleInputClick=function(_){this.handleInputChange(_)},p.handleInputFocus=function(_){var v=this.state,y=v.query,x=v.validChoiceMade,k=v.options,w=this.props.minLength,C=!x&&y.length>=w&&0<k.length;C?this.setState(function(M){var S=M.menuOpen;return{focused:-1,menuOpen:C||S,selected:-1}}):this.setState({focused:-1})},p.handleOptionFocus=function(_){this.setState({focused:_,hovered:null,selected:_})},p.handleOptionMouseEnter=function(_,v){c()||this.setState({hovered:v})},p.handleOptionClick=function(_,v){var y=this.state.options[v],x=this.templateInputValue(y);this.props.onConfirm(y),this.setState({focused:-1,hovered:null,menuOpen:!1,query:x,selected:-1,validChoiceMade:!0}),this.forceUpdate()},p.handleOptionMouseDown=function(_){_.preventDefault()},p.handleUpArrow=function(_){_.preventDefault();var v=this.state,y=v.menuOpen,x=v.selected;x!==-1&&y&&this.handleOptionFocus(x-1)},p.handleDownArrow=function(_){var v=this;if(_.preventDefault(),this.props.showAllValues&&this.state.menuOpen===!1)_.preventDefault(),this.props.source("",function(C){v.setState({menuOpen:!0,options:C,selected:0,focused:0,hovered:null})});else if(this.state.menuOpen===!0){var y=this.state,x=y.menuOpen,k=y.options,w=y.selected;w!==k.length-1&&x&&this.handleOptionFocus(w+1)}},p.handleSpace=function(_){var v=this;this.props.showAllValues&&this.state.menuOpen===!1&&this.state.query===""&&(_.preventDefault(),this.props.source("",function(y){v.setState({menuOpen:!0,options:y})})),this.state.focused!==-1&&(_.preventDefault(),this.handleOptionClick(_,this.state.focused))},p.handleEnter=function(_){this.state.menuOpen&&(_.preventDefault(),0<=this.state.selected&&this.handleOptionClick(_,this.state.selected))},p.handlePrintableKey=function(_){var v=this.elementReferences[-1];_.target===v||v.focus()},p.handleKeyDown=function(_){switch(d[_.keyCode]){case"up":this.handleUpArrow(_);break;case"down":this.handleDownArrow(_);break;case"space":this.handleSpace(_);break;case"enter":this.handleEnter(_);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:(function(y){return 47<y&&y<58||y===32||y===8||64<y&&y<91||95<y&&y<112||185<y&&y<193||218<y&&y<223})(_.keyCode)&&this.handlePrintableKey(_)}},p.render=function(){var _,v=this,y=this.props,x=y.cssNamespace,k=y.displayMenu,w=y.id,C=y.minLength,M=y.name,S=y.placeholder,R=y.required,A=y.showAllValues,G=y.tNoResults,P=y.tStatusQueryTooShort,at=y.tStatusNoResults,j=y.tStatusSelectedOption,U=y.tStatusResults,O=y.tAssistiveHint,W=y.dropdownArrow,D=this.state,Z=D.focused,V=D.hovered,z=D.menuOpen,ot=D.options,b=D.query,T=D.selected,Y=D.ariaHint,E=D.validChoiceMade,H=this.hasAutoselect(),$=Z===-1,vt=ot.length===0,Ct=b.length!==0,_t=b.length>=C,Et=this.props.showNoOptionsFound&&$&&vt&&Ct&&_t,Lt=x+"__wrapper",Dt=x+"__input",jt=Z!==null?" "+Dt+"--focused":"",F=this.props.showAllValues?" "+Dt+"--show-all-values":" "+Dt+"--default",ut=x+"__dropdown-arrow-down",pt=Z!==-1&&Z!==null,kt=x+"__menu",yt=kt+"--"+k,st=kt+"--"+(z||Et?"visible":"hidden"),nt=x+"__option",wt=x+"__hint",zt=this.templateInputValue(ot[T]),Bt=zt&&zt.toLowerCase().indexOf(b.toLowerCase())===0&&H?b+zt.substr(b.length):"",xt=w+"__assistiveHint",dt=Y?{"aria-describedby":xt}:null;return A&&typeof(_=W({className:ut}))=="string"&&(_=(0,o.createElement)("div",{className:x+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:_}})),(0,o.createElement)("div",{className:Lt,onKeyDown:this.handleKeyDown},(0,o.createElement)(s.default,{id:w,length:ot.length,queryLength:b.length,minQueryLength:C,selectedOption:this.templateInputValue(ot[T]),selectedOptionIndex:T,validChoiceMade:E,isInFocus:this.state.focused!==null,tQueryTooShort:P,tNoResults:at,tSelectedOption:j,tResults:U}),Bt&&(0,o.createElement)("span",null,(0,o.createElement)("input",{className:wt,readonly:!0,tabIndex:"-1",value:Bt})),(0,o.createElement)("input",h({"aria-expanded":z?"true":"false","aria-activedescendant":!!pt&&w+"__option--"+Z,"aria-owns":w+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"},dt,{autoComplete:"off",className:""+Dt+jt+F,id:w,onClick:function(Ft){return v.handleInputClick(Ft)},onBlur:this.handleInputBlur},function(St){return{onInput:St}}(this.handleInputChange),{onFocus:this.handleInputFocus,name:M,placeholder:S,ref:function(Ft){v.elementReferences[-1]=Ft},type:"text",role:"combobox",required:R,value:b})),_,(0,o.createElement)("ul",{className:kt+" "+yt+" "+st,onMouseLeave:function(Ft){return v.handleListMouseLeave(Ft)},id:w+"__listbox",role:"listbox"},ot.map(function(Ft,St){var ct=(Z===-1?T===St:Z===St)&&V===null?" "+nt+"--focused":"",ue=St%2?" "+nt+"--odd":"",Ve=c()?"<span id="+w+"__option-suffix--"+St+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(St+1)+" of "+ot.length+"</span>":"";return(0,o.createElement)("li",{"aria-selected":Z===St?"true":"false",className:""+nt+ct+ue,dangerouslySetInnerHTML:{__html:v.templateSuggestion(Ft)+Ve},id:w+"__option--"+St,key:St,onBlur:function($t){return v.handleOptionBlur($t,St)},onClick:function($t){return v.handleOptionClick($t,St)},onMouseDown:v.handleOptionMouseDown,onMouseEnter:function($t){return v.handleOptionMouseEnter($t,St)},ref:function($t){v.elementReferences[St]=$t},role:"option",tabIndex:"-1","aria-posinset":St+1,"aria-setsize":ot.length})}),Et&&(0,o.createElement)("li",{className:nt+" "+nt+"--no-results"},G())),(0,o.createElement)("span",{id:xt,style:{display:"none"}},O()))},m}(o.Component);(n.default=f).defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:a.default}},function(e,n,r){var o=r(9),s=r(53),a=r(28),l=r(26)("IE_PROTO"),h=function(){},u="prototype",d=function(){var c,f=r(15)("iframe"),g=a.length;for(f.style.display="none",r(54).appendChild(f),f.src="javascript:",(c=f.contentWindow.document).open(),c.write("<script>document.F=Object<\/script>"),c.close(),d=c.F;g--;)delete d[u][a[g]];return d()};e.exports=Object.create||function(c,f){var g;return c!==null?(h[u]=o(c),g=new h,h[u]=null,g[l]=c):g=d(),f===void 0?g:s(g,f)}},function(e,n,r){var o=r(8),s=r(9),a=r(20);e.exports=r(3)?Object.defineProperties:function(l,h){s(l);for(var u,d=a(h),c=d.length,f=0;f<c;)o.f(l,u=d[f++],h[u]);return l}},function(e,n,r){var o=r(1).document;e.exports=o&&o.documentElement},function(e,n,r){var o=r(0);o(o.P,"Function",{bind:r(56)})},function(e,n,r){var o=r(19),s=r(2),a=r(57),l=[].slice,h={};e.exports=Function.bind||function(u){var d=o(this),c=l.call(arguments,1),f=function(){var g=c.concat(l.call(arguments));return this instanceof f?function(m,p,_){if(!(p in h)){for(var v=[],y=0;y<p;y++)v[y]="a["+y+"]";h[p]=Function("F,a","return new F("+v.join(",")+")")}return h[p](m,_)}(d,g.length,g):a(d,g,u)};return s(d.prototype)&&(f.prototype=d.prototype),f}},function(e,n){e.exports=function(r,o,s){var a=s===void 0;switch(o.length){case 0:return a?r():r.call(s);case 1:return a?r(o[0]):r.call(s,o[0]);case 2:return a?r(o[0],o[1]):r.call(s,o[0],o[1]);case 3:return a?r(o[0],o[1],o[2]):r.call(s,o[0],o[1],o[2]);case 4:return a?r(o[0],o[1],o[2],o[3]):r.call(s,o[0],o[1],o[2],o[3])}return r.apply(s,o)}},function(e,n,r){r(59)("match",1,function(o,s,a){return[function(l){var h=o(this),u=l==null?void 0:l[s];return u!==void 0?u.call(l,h):new RegExp(l)[s](String(h))},a]})},function(e,n,r){var o=r(7),s=r(16),a=r(4),l=r(12),h=r(34);e.exports=function(u,d,c){var f=h(u),g=c(l,f,""[u]),m=g[0],p=g[1];a(function(){var _={};return _[f]=function(){return 7},""[u](_)!=7})&&(s(String.prototype,u,m),o(RegExp.prototype,f,d==2?function(_,v){return p.call(_,this,v)}:function(_){return p.call(_,this)}))}},function(e,n,r){n.__esModule=!0,n.default=void 0,r(36);var o=r(5),s=function(h,u,d){var c;return function(){var f=this,g=arguments,m=function(){c=null,d||h.apply(f,g)},p=d&&!c;clearTimeout(c),c=setTimeout(m,u),p&&h.apply(f,g)}},a=function(l){function h(){for(var d,c=arguments.length,f=new Array(c),g=0;g<c;g++)f[g]=arguments[g];return(d=l.call.apply(l,[this].concat(f))||this).state={bump:!1,debounced:!1},d}(function(c,f){c.prototype=Object.create(f.prototype),(c.prototype.constructor=c).__proto__=f})(h,l);var u=h.prototype;return u.componentWillMount=function(){var d=this;this.debounceStatusUpdate=s(function(){if(!d.state.debounced){var c=!d.props.isInFocus||d.props.validChoiceMade;d.setState(function(f){return{bump:!f.bump,debounced:!0,silenced:c}})}},1400)},u.componentWillReceiveProps=function(d){d.queryLength,this.setState({debounced:!1})},u.render=function(){var d=this.props,c=d.id,f=d.length,g=d.queryLength,m=d.minQueryLength,p=d.selectedOption,_=d.selectedOptionIndex,v=d.tQueryTooShort,y=d.tNoResults,x=d.tSelectedOption,k=d.tResults,w=this.state,C=w.bump,M=w.debounced,S=w.silenced,R=g<m,A=f===0,G=p?x(p,f,_):"",P=null;return P=R?v(m):A?y():k(f,G),this.debounceStatusUpdate(),(0,o.createElement)("div",{style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,o.createElement)("div",{id:c+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!S&&M&&C?P:""),(0,o.createElement)("div",{id:c+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},S||!M||C?"":P))},h}(o.Component);(n.default=a).defaultProps={tQueryTooShort:function(l){return"Type in "+l+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(l,h,u){return l+" "+(u+1)+" of "+h+" is highlighted"},tResults:function(l,h){return l+" "+(l===1?"result":"results")+" "+(l===1?"is":"are")+" available. "+h}}},function(e,n,r){n.__esModule=!0,n.default=void 0;var o=r(5),s=function(l){var h=l.className;return(0,o.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:h,focusable:"false"},(0,o.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,o.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};n.default=s}]).default})})(hp);const KE=f1(hp.exports),ZE=`@charset "UTF-8";.govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */@font-face{font-family:GDS Transport;font-style:normal;font-weight:400;src:url(/assets/fonts/light-94a07e06a1-v2.woff2) format("woff2"),url(/assets/fonts/light-f591b13f7d-v2.woff) format("woff");font-display:fallback}@font-face{font-family:GDS Transport;font-style:normal;font-weight:700;src:url(/assets/fonts/bold-b542beb274-v2.woff2) format("woff2"),url(/assets/fonts/bold-affa96571d-v2.woff) format("woff");font-display:fallback}@media print{.govuk-link{font-family:sans-serif}}.govuk-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-link:link{color:#1d70b8}.govuk-link:visited{color:#4c2c92}.govuk-link:hover{color:#003078}.govuk-link:active{color:#0b0c0c}.govuk-link:focus{color:#0b0c0c}@media print{[href^="/"].govuk-link:after,[href^="http://"].govuk-link:after,[href^="https://"].govuk-link:after{content:" (" attr(href) ")";font-size:90%;word-wrap:break-word}}.govuk-link--muted:link,.govuk-link--muted:visited{color:#505a5f}.govuk-link--muted:hover,.govuk-link--muted:active{color:#0b0c0c}.govuk-link--muted:focus{color:#0b0c0c}.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#0b0c0c}@media print{.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#000}}.govuk-link--text-colour:hover{color:#0b0c0cfc}.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#0b0c0c}@media print{.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#000}}.govuk-link--inverse:link,.govuk-link--inverse:visited{color:#fff}.govuk-link--inverse:hover,.govuk-link--inverse:active{color:#fffffffc}.govuk-link--inverse:focus{color:#0b0c0c}.govuk-link--no-underline:not(:hover):not(:active){text-decoration:none}.govuk-link--no-visited-state:link,.govuk-link--no-visited-state:visited{color:#1d70b8}.govuk-link--no-visited-state:hover{color:#003078}.govuk-link--no-visited-state:active{color:#0b0c0c}.govuk-link--no-visited-state:focus{color:#0b0c0c}.govuk-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-top:0;margin-bottom:15px;padding-left:0;list-style-type:none}@media print{.govuk-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-list{font-size:14pt;line-height:1.15}}@media print{.govuk-list{color:#000}}@media (min-width: 40.0625em){.govuk-list{margin-bottom:20px}}.govuk-list .govuk-list{margin-top:10px}.govuk-list>li{margin-bottom:5px}.govuk-list--bullet{padding-left:20px;list-style-type:disc}.govuk-list--number{padding-left:20px;list-style-type:decimal}.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:0}@media (min-width: 40.0625em){.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:5px}}.govuk-list--spaced>li{margin-bottom:10px}@media (min-width: 40.0625em){.govuk-list--spaced>li{margin-bottom:15px}}.govuk-heading-xl{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;display:block;margin-top:0;margin-bottom:30px}@media print{.govuk-heading-xl{color:#000}}@media print{.govuk-heading-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-heading-xl{font-size:32pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-xl{margin-bottom:50px}}.govuk-heading-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;display:block;margin-top:0;margin-bottom:20px}@media print{.govuk-heading-l{color:#000}}@media print{.govuk-heading-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-heading-l{font-size:24pt;line-height:1.05}}@media (min-width: 40.0625em){.govuk-heading-l{margin-bottom:30px}}.govuk-heading-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-m{color:#000}}@media print{.govuk-heading-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-heading-m{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-m{margin-bottom:20px}}.govuk-heading-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-s{color:#000}}@media print{.govuk-heading-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-heading-s{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-s{margin-bottom:20px}}.govuk-caption-xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-xl{font-size:27px;font-size:1.6875rem;line-height:1.1111111111}}@media print{.govuk-caption-xl{font-size:18pt;line-height:1.15}}.govuk-caption-l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-caption-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-caption-l{margin-bottom:0}}.govuk-caption-m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;color:#505a5f}@media print{.govuk-caption-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-caption-m{font-size:14pt;line-height:1.15}}.govuk-body-lead,.govuk-body-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:20px}@media print{.govuk-body-lead,.govuk-body-l{color:#000}}@media print{.govuk-body-lead,.govuk-body-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-body-lead,.govuk-body-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{margin-bottom:30px}}.govuk-body,.govuk-body-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body,.govuk-body-m{color:#000}}@media print{.govuk-body,.govuk-body-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-body,.govuk-body-m{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{margin-bottom:20px}}.govuk-body-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;margin-top:0;margin-bottom:15px}@media print{.govuk-body-s{color:#000}}@media print{.govuk-body-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-s{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-body-s{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-s{margin-bottom:20px}}.govuk-body-xs{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:12px;font-size:.75rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body-xs{color:#000}}@media print{.govuk-body-xs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-xs{font-size:14px;font-size:.875rem;line-height:1.4285714286}}@media print{.govuk-body-xs{font-size:12pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-xs{margin-bottom:20px}}.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:10px}}.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:15px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:20px}}.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:10px}}.govuk-section-break{margin:0;border:0}.govuk-section-break--xl{margin-top:30px;margin-bottom:30px}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-top:50px}}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-bottom:50px}}.govuk-section-break--l{margin-top:20px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-section-break--l{margin-top:30px}}@media (min-width: 40.0625em){.govuk-section-break--l{margin-bottom:30px}}.govuk-section-break--m{margin-top:15px;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-section-break--m{margin-top:20px}}@media (min-width: 40.0625em){.govuk-section-break--m{margin-bottom:20px}}.govuk-section-break--visible{border-bottom:1px solid #b1b4b6}.govuk-button-group{margin-bottom:5px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}@media (min-width: 40.0625em){.govuk-button-group{margin-bottom:15px}}.govuk-button-group .govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;display:inline-block;max-width:100%;margin-top:5px;margin-bottom:20px;text-align:center}@media print{.govuk-button-group .govuk-link{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button-group .govuk-link{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button-group .govuk-link{font-size:14pt;line-height:19px}}.govuk-button-group .govuk-button{margin-bottom:17px}@media (min-width: 40.0625em){.govuk-button-group{margin-right:-15px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline}.govuk-button-group .govuk-button,.govuk-button-group .govuk-link{margin-right:15px}.govuk-button-group .govuk-link{text-align:left}}.govuk-form-group{margin-bottom:20px}.govuk-form-group:after{content:"";display:block;clear:both}@media (min-width: 40.0625em){.govuk-form-group{margin-bottom:30px}}.govuk-form-group .govuk-form-group:last-of-type{margin-bottom:0}.govuk-form-group--error{padding-left:15px;border-left:5px solid #d4351c}.govuk-form-group--error .govuk-form-group{padding:0;border:0}.govuk-grid-row{margin-right:-15px;margin-left:-15px}.govuk-grid-row:after{content:"";display:block;clear:both}.govuk-grid-column-one-quarter{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-quarter{width:25%;float:left}}.govuk-grid-column-one-third{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-third{width:33.3333%;float:left}}.govuk-grid-column-one-half{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-half{width:50%;float:left}}.govuk-grid-column-two-thirds{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-two-thirds{width:66.6666%;float:left}}.govuk-grid-column-three-quarters{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-three-quarters{width:75%;float:left}}.govuk-grid-column-full{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-full{width:100%;float:left}}.govuk-grid-column-one-quarter-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-quarter-from-desktop{width:25%;float:left}}.govuk-grid-column-one-third-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-third-from-desktop{width:33.3333%;float:left}}.govuk-grid-column-one-half-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-half-from-desktop{width:50%;float:left}}.govuk-grid-column-two-thirds-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-two-thirds-from-desktop{width:66.6666%;float:left}}.govuk-grid-column-three-quarters-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-three-quarters-from-desktop{width:75%;float:left}}.govuk-grid-column-full-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-full-from-desktop{width:100%;float:left}}.govuk-main-wrapper{display:block;padding-top:20px;padding-bottom:20px}@media (min-width: 40.0625em){.govuk-main-wrapper{padding-top:40px;padding-bottom:40px}}.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:30px}@media (min-width: 40.0625em){.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:50px}}.govuk-template{background-color:#f3f2f1;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}@media screen{.govuk-template{overflow-y:scroll}}.govuk-template__body{margin:0;background-color:#fff}.govuk-width-container{max-width:960px;margin-right:15px;margin-left:15px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(15px,calc(15px + env(safe-area-inset-right)));margin-left:max(15px,calc(15px + env(safe-area-inset-left)))}}@media (min-width: 40.0625em){.govuk-width-container{margin-right:30px;margin-left:30px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(30px,calc(15px + env(safe-area-inset-right)));margin-left:max(30px,calc(15px + env(safe-area-inset-left)))}}}@media (min-width: 1020px){.govuk-width-container{margin-right:auto;margin-left:auto}@supports (margin: max(0px)){.govuk-width-container{margin-right:auto;margin-left:auto}}}.govuk-accordion{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-accordion{margin-bottom:30px}}.govuk-accordion__section{padding-top:15px}.govuk-accordion__section-heading{margin-top:0;margin-bottom:0;padding-top:15px;padding-bottom:15px}.govuk-accordion__section-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;color:#0b0c0c;display:block;margin-bottom:0;padding-top:15px}@media print{.govuk-accordion__section-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-accordion__section-button{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-accordion__section-button{font-size:18pt;line-height:1.15}}@media print{.govuk-accordion__section-button{color:#000}}.govuk-accordion__section-content>:last-child{margin-bottom:0}.js-enabled .govuk-accordion{border-bottom:1px solid #b1b4b6}.js-enabled .govuk-accordion__section{padding-top:0}.js-enabled .govuk-accordion__section-content{display:none;padding-bottom:30px}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-content{padding-bottom:50px}}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-content{display:block}.js-enabled .govuk-accordion__show-all{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;position:relative;z-index:1;margin-bottom:9px;padding:5px 2px 5px 0;border-width:0;color:#1d70b8;background:none;cursor:pointer;-webkit-appearance:none}@media print{.js-enabled .govuk-accordion__show-all{font-family:sans-serif}}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__show-all{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__show-all{font-size:14pt;line-height:1.15}}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__show-all{margin-bottom:14px}}.js-enabled .govuk-accordion__show-all::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__show-all:hover{color:#0b0c0c;background:#f3f2f1;box-shadow:0 -2px #f3f2f1,0 4px #f3f2f1}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__show-all:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron{background:#0b0c0c}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-heading{padding:0}.js-enabled .govuk-accordion-nav__chevron{box-sizing:border-box;display:inline-block;position:relative;width:1.25rem;height:1.25rem;border:.0625rem solid;border-radius:50%;vertical-align:middle}.js-enabled .govuk-accordion-nav__chevron:after{content:"";box-sizing:border-box;display:block;position:absolute;bottom:.3125rem;left:.375rem;width:.375rem;height:.375rem;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border-top:.125rem solid;border-right:.125rem solid}.js-enabled .govuk-accordion-nav__chevron--down{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.js-enabled .govuk-accordion__section-button{width:100%;padding:10px 0 0;border:0;border-top:1px solid #b1b4b6;border-bottom:10px solid transparent;color:#0b0c0c;background:none;text-align:left;cursor:pointer;-webkit-appearance:none}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-button{padding-bottom:10px}}.js-enabled .govuk-accordion__section-button:active{color:#0b0c0c;background:none}.js-enabled .govuk-accordion__section-button:hover{color:#0b0c0c;background:#f3f2f1}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__section-button:focus{outline:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-button::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-button{padding-bottom:20px;border-bottom:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:3px}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:2px}}.js-enabled .govuk-accordion__section-toggle,.js-enabled .govuk-accordion__section-heading-text,.js-enabled .govuk-accordion__section-summary{display:block;margin-bottom:13px}.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-toggle-focus{display:inline}.js-enabled .govuk-accordion__section-toggle{font-size:16px;font-size:1rem;line-height:1.25;font-weight:400;color:#1d70b8}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-toggle{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__section-toggle{font-size:14pt;line-height:1.15}}.js-enabled .govuk-accordion__show-all-text,.js-enabled .govuk-accordion__section-toggle-text{margin-left:5px;vertical-align:middle}@media screen and (forced-colors: active){.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{background-color:transparent}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{background:transparent;background-color:transparent}}@media (hover: none){.js-enabled .govuk-accordion__section-header:hover{border-top-color:#b1b4b6;box-shadow:inset 0 3px #1d70b8}.js-enabled .govuk-accordion__section-header:hover .govuk-accordion__section-button{border-top-color:#b1b4b6}}.govuk-back-link{font-size:14px;font-size:.875rem;line-height:1.1428571429;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;position:relative;margin-top:15px;margin-bottom:15px;padding-left:14px}@media (min-width: 40.0625em){.govuk-back-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-back-link{font-size:14pt;line-height:1.2}}@media print{.govuk-back-link{font-family:sans-serif}}.govuk-back-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-back-link:link,.govuk-back-link:visited{color:#0b0c0c}@media print{.govuk-back-link:link,.govuk-back-link:visited{color:#000}}.govuk-back-link:hover{color:#0b0c0cfc}.govuk-back-link:active,.govuk-back-link:focus{color:#0b0c0c}@media print{.govuk-back-link:active,.govuk-back-link:focus{color:#000}}.govuk-back-link:before{content:"";display:block;position:absolute;top:0;bottom:0;left:3px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(225deg);-ms-transform:rotate(225deg);transform:rotate(225deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-back-link:focus:before{border-color:#0b0c0c}.govuk-back-link:after{content:"";position:absolute;top:-14px;right:0;bottom:-14px;left:0}.govuk-breadcrumbs{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;margin-top:15px;margin-bottom:10px}@media print{.govuk-breadcrumbs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-breadcrumbs{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-breadcrumbs{font-size:14pt;line-height:1.2}}@media print{.govuk-breadcrumbs{color:#000}}.govuk-breadcrumbs__list{margin:0;padding:0;list-style-type:none}.govuk-breadcrumbs__list:after{content:"";display:block;clear:both}.govuk-breadcrumbs__list-item{display:inline-block;position:relative;margin-bottom:5px;margin-left:10px;padding-left:15.655px;float:left}.govuk-breadcrumbs__list-item:before{content:"";display:block;position:absolute;top:0;bottom:0;left:-3.31px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-breadcrumbs__list-item:first-child{margin-left:0;padding-left:0}.govuk-breadcrumbs__list-item:first-child:before{content:none;display:none}.govuk-breadcrumbs__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-breadcrumbs__link{font-family:sans-serif}}.govuk-breadcrumbs__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#000}}.govuk-breadcrumbs__link:hover{color:#0b0c0cfc}.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#000}}@media (max-width: 40.0525em){.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item{display:none}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:first-child,.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:last-child{display:inline-block}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:before{top:6px;margin:0}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}}.govuk-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;box-sizing:border-box;display:inline-block;position:relative;width:100%;margin:0 0 22px;padding:8px 10px 7px;border:2px solid transparent;border-radius:0;color:#fff;background-color:#00703c;box-shadow:0 2px #002d18;text-align:center;vertical-align:top;cursor:pointer;-webkit-appearance:none}@media print{.govuk-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button{font-size:14pt;line-height:19px}}@media (min-width: 40.0625em){.govuk-button{margin-bottom:32px}}@media (min-width: 40.0625em){.govuk-button{width:auto}}.govuk-button:link,.govuk-button:visited,.govuk-button:active,.govuk-button:hover{color:#fff;text-decoration:none}.govuk-button::-moz-focus-inner{padding:0;border:0}.govuk-button:hover{background-color:#005a30}.govuk-button:active{top:2px}.govuk-button:focus{border-color:#fd0;outline:3px solid transparent;box-shadow:inset 0 0 0 1px #fd0}.govuk-button:focus:not(:active):not(:hover){border-color:#fd0;color:#0b0c0c;background-color:#fd0;box-shadow:0 2px #0b0c0c}.govuk-button:before{content:"";display:block;position:absolute;top:-2px;right:-2px;bottom:-4px;left:-2px;background:transparent}.govuk-button:active:before{top:-4px}.govuk-button--disabled,.govuk-button[disabled=disabled],.govuk-button[disabled]{opacity:.5}.govuk-button--disabled:hover,.govuk-button[disabled=disabled]:hover,.govuk-button[disabled]:hover{background-color:#00703c;cursor:default}.govuk-button--disabled:active,.govuk-button[disabled=disabled]:active,.govuk-button[disabled]:active{top:0;box-shadow:0 2px #002d18}.govuk-button--secondary{background-color:#f3f2f1;box-shadow:0 2px #929191}.govuk-button--secondary,.govuk-button--secondary:link,.govuk-button--secondary:visited,.govuk-button--secondary:active,.govuk-button--secondary:hover{color:#0b0c0c}.govuk-button--secondary:hover{background-color:#dbdad9}.govuk-button--secondary:hover[disabled]{background-color:#f3f2f1}.govuk-button--warning{background-color:#d4351c;box-shadow:0 2px #55150b}.govuk-button--warning,.govuk-button--warning:link,.govuk-button--warning:visited,.govuk-button--warning:active,.govuk-button--warning:hover{color:#fff}.govuk-button--warning:hover{background-color:#aa2a16}.govuk-button--warning:hover[disabled]{background-color:#d4351c}.govuk-button--start{font-weight:700;font-size:18px;font-size:1.125rem;line-height:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-height:auto;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}@media (min-width: 40.0625em){.govuk-button--start{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-button--start{font-size:18pt;line-height:1}}.govuk-button__start-icon{margin-left:5px;vertical-align:middle;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;forced-color-adjust:auto}@media (min-width: 48.0625em){.govuk-button__start-icon{margin-left:10px}}.govuk-error-message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px;clear:both;color:#d4351c}@media print{.govuk-error-message{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-message{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-message{font-size:14pt;line-height:1.15}}.govuk-fieldset{min-width:0;margin:0;padding:0;border:0}.govuk-fieldset:after{content:"";display:block;clear:both}@supports not (caret-color: auto){.govuk-fieldset,x:-moz-any-link{display:table-cell}}.govuk-fieldset__legend{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;box-sizing:border-box;display:table;max-width:100%;margin-bottom:10px;padding:0;white-space:normal}@media print{.govuk-fieldset__legend{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend{font-size:14pt;line-height:1.15}}@media print{.govuk-fieldset__legend{color:#000}}.govuk-fieldset__legend--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-fieldset__legend--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-fieldset__legend--xl{font-size:32pt;line-height:1.15}}.govuk-fieldset__legend--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-fieldset__legend--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-fieldset__legend--l{font-size:24pt;line-height:1.05}}.govuk-fieldset__legend--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-fieldset__legend--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-fieldset__legend--m{font-size:18pt;line-height:1.15}}.govuk-fieldset__legend--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-fieldset__legend--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend--s{font-size:14pt;line-height:1.15}}.govuk-fieldset__heading{margin:0;font-size:inherit;font-weight:inherit}.govuk-hint{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:15px;color:#505a5f}@media print{.govuk-hint{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-hint{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-hint{font-size:14pt;line-height:1.15}}.govuk-label:not(.govuk-label--m):not(.govuk-label--l):not(.govuk-label--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend:not(.govuk-fieldset__legend--m):not(.govuk-fieldset__legend--l):not(.govuk-fieldset__legend--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend+.govuk-hint{margin-top:-5px}.govuk-label{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;margin-bottom:5px}@media print{.govuk-label{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label{font-size:14pt;line-height:1.15}}@media print{.govuk-label{color:#000}}.govuk-label--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-label--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-label--xl{font-size:32pt;line-height:1.15}}.govuk-label--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-label--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-label--l{font-size:24pt;line-height:1.05}}.govuk-label--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:10px}@media print{.govuk-label--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-label--m{font-size:18pt;line-height:1.15}}.govuk-label--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-label--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label--s{font-size:14pt;line-height:1.15}}.govuk-label-wrapper{margin:0}.govuk-checkboxes__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-checkboxes__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__item{font-size:14pt;line-height:1.15}}.govuk-checkboxes__item:last-child,.govuk-checkboxes__item:last-of-type{margin-bottom:0}.govuk-checkboxes__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-checkboxes__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-checkboxes__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;background:transparent}.govuk-checkboxes__label:after{content:"";box-sizing:border-box;position:absolute;top:11px;left:9px;width:23px;height:12px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border:solid;border-width:0 0 5px 5px;border-top-color:transparent;opacity:0;background:transparent}.govuk-checkboxes__hint{display:block;padding-right:15px;padding-left:15px}.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 3px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{outline-color:Highlight}}.govuk-checkboxes__input:checked+.govuk-checkboxes__label:after{opacity:1}.govuk-checkboxes__input:disabled,.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{cursor:default}.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{opacity:.5}.govuk-checkboxes__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-checkboxes__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-checkboxes__divider{color:#000}}.govuk-checkboxes__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-checkboxes__conditional{margin-bottom:20px}}.js-enabled .govuk-checkboxes__conditional--hidden{display:none}.govuk-checkboxes__conditional>:last-child{margin-bottom:0}.govuk-checkboxes--small .govuk-checkboxes__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-checkboxes--small .govuk-checkboxes__item:after{content:"";display:block;clear:both}.govuk-checkboxes--small .govuk-checkboxes__input{left:-10px}.govuk-checkboxes--small .govuk-checkboxes__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-checkboxes--small .govuk-checkboxes__label{padding:11px 15px 10px 1px}}.govuk-checkboxes--small .govuk-checkboxes__label:before{top:8px;width:24px;height:24px}.govuk-checkboxes--small .govuk-checkboxes__label:after{top:15px;left:6px;width:12px;height:6.5px;border-width:0 0 3px 3px}.govuk-checkboxes--small .govuk-checkboxes__hint{padding:0;clear:both}.govuk-checkboxes--small .govuk-checkboxes__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:initial}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0}}.govuk-textarea{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:block;width:100%;min-height:40px;margin-bottom:20px;padding:5px;resize:vertical;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none}@media print{.govuk-textarea{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-textarea{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-textarea{font-size:14pt;line-height:1.25}}@media (min-width: 40.0625em){.govuk-textarea{margin-bottom:30px}}.govuk-textarea:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-textarea--error{border-color:#d4351c}.govuk-textarea--error:focus{border-color:#0b0c0c}.govuk-character-count{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-character-count{margin-bottom:30px}}.govuk-character-count .govuk-form-group,.govuk-character-count .govuk-textarea{margin-bottom:5px}.govuk-character-count__message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400;margin-top:0;margin-bottom:0}@media print{.govuk-character-count__message{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-character-count__message{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-character-count__message--disabled{visibility:hidden}.govuk-cookie-banner{padding-top:20px;border-bottom:10px solid transparent;background-color:#f3f2f1}.govuk-cookie-banner[hidden]{display:none}.govuk-cookie-banner__message{margin-bottom:-10px}.govuk-cookie-banner__message[hidden]{display:none}.govuk-cookie-banner__message:focus{outline:none}.govuk-summary-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin:0 0 20px}@media print{.govuk-summary-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-summary-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-summary-list{font-size:14pt;line-height:1.15}}@media print{.govuk-summary-list{color:#000}}@media (min-width: 40.0625em){.govuk-summary-list{display:table;width:100%;table-layout:fixed;border-collapse:collapse}}@media (min-width: 40.0625em){.govuk-summary-list{margin-bottom:30px}}.govuk-summary-list__row{border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-summary-list__row{margin-bottom:15px}}@media (min-width: 40.0625em){.govuk-summary-list__row{display:table-row}}@media (min-width: 40.0625em){.govuk-summary-list__row--no-actions:after{content:"";display:table-cell;width:20%}}.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{margin:0}@media (min-width: 40.0625em){.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{display:table-cell;padding-top:10px;padding-right:20px;padding-bottom:10px}}.govuk-summary-list__actions{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-summary-list__actions{width:20%;padding-right:0;text-align:right}}.govuk-summary-list__key,.govuk-summary-list__value{word-wrap:break-word;overflow-wrap:break-word}.govuk-summary-list__key{margin-bottom:5px;font-weight:700}@media (min-width: 40.0625em){.govuk-summary-list__key{width:30%}}@media (max-width: 40.0525em){.govuk-summary-list__value{margin-bottom:15px}}.govuk-summary-list__value>p{margin-bottom:10px}.govuk-summary-list__value>:last-child{margin-bottom:0}.govuk-summary-list__actions-list{width:100%;margin:0;padding:0}.govuk-summary-list__actions-list-item{display:inline;margin-right:10px;padding-right:10px}.govuk-summary-list__actions-list-item:not(:last-child){border-right:1px solid #b1b4b6}.govuk-summary-list__actions-list-item:last-child{margin-right:0;padding-right:0;border:0}.govuk-summary-list--no-border .govuk-summary-list__row{border:0}@media (min-width: 40.0625em){.govuk-summary-list--no-border .govuk-summary-list__key,.govuk-summary-list--no-border .govuk-summary-list__value,.govuk-summary-list--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-summary-list__row--no-border{border:0}@media (min-width: 40.0625em){.govuk-summary-list__row--no-border .govuk-summary-list__key,.govuk-summary-list__row--no-border .govuk-summary-list__value,.govuk-summary-list__row--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-input{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;width:100%;height:40px;height:2.5rem;margin-top:0;padding:5px;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media print{.govuk-input{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input{font-size:14pt;line-height:1.15}}.govuk-input:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-input::-webkit-outer-spin-button,.govuk-input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.govuk-input[type=number]{-moz-appearance:textfield}.govuk-input--error{border-color:#d4351c}.govuk-input--error:focus{border-color:#0b0c0c}.govuk-input--width-30{max-width:59ex}.govuk-input--width-20{max-width:41ex}.govuk-input--width-10{max-width:23ex}.govuk-input--width-5{max-width:10.8ex}.govuk-input--width-4{max-width:9ex}.govuk-input--width-3{max-width:7.2ex}.govuk-input--width-2{max-width:5.4ex}.govuk-input__wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.govuk-input__wrapper .govuk-input{-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto}.govuk-input__wrapper .govuk-input:focus{z-index:1}@media (max-width: 19.99em){.govuk-input__wrapper{display:block}.govuk-input__wrapper .govuk-input{max-width:100%}}.govuk-input__prefix,.govuk-input__suffix{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:inline-block;min-width:40px;min-width:2.5rem;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;background-color:#f3f2f1;text-align:center;white-space:nowrap;cursor:default;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}@media print{.govuk-input__prefix,.govuk-input__suffix{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input__prefix,.govuk-input__suffix{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input__prefix,.govuk-input__suffix{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-input__prefix,.govuk-input__suffix{line-height:1.6}}@media (max-width: 19.99em){.govuk-input__prefix,.govuk-input__suffix{display:block;height:100%;white-space:normal}}@media (max-width: 19.99em){.govuk-input__prefix{border-bottom:0}}@media (min-width: 20em){.govuk-input__prefix{border-right:0}}@media (max-width: 19.99em){.govuk-input__suffix{border-top:0}}@media (min-width: 20em){.govuk-input__suffix{border-left:0}}.govuk-date-input{font-size:0}.govuk-date-input:after{content:"";display:block;clear:both}.govuk-date-input__item{display:inline-block;margin-right:20px;margin-bottom:0}.govuk-date-input__label{display:block}.govuk-date-input__input{margin-bottom:0}.govuk-details{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:20px;display:block}@media print{.govuk-details{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-details{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-details{font-size:14pt;line-height:1.15}}@media print{.govuk-details{color:#000}}@media (min-width: 40.0625em){.govuk-details{margin-bottom:30px}}.govuk-details__summary{display:inline-block;position:relative;margin-bottom:5px;padding-left:25px;color:#1d70b8;cursor:pointer}.govuk-details__summary:hover{color:#003078}.govuk-details__summary:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-details__summary-text{text-decoration:underline}.govuk-details__summary:focus .govuk-details__summary-text{text-decoration:none}.govuk-details__summary::-webkit-details-marker{display:none}.govuk-details__summary:before{content:"";position:absolute;top:-1px;bottom:0;left:0;margin:auto;display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,100% 50%,0% 100%);clip-path:polygon(0% 0%,100% 50%,0% 100%);border-width:7px 0 7px 12.124px;border-left-color:inherit}.govuk-details[open]>.govuk-details__summary:before{display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:12.124px 7px 0 7px;border-top-color:inherit}.govuk-details__text{padding-top:15px;padding-bottom:15px;padding-left:20px;border-left:5px solid #b1b4b6}.govuk-details__text p{margin-top:0;margin-bottom:20px}.govuk-details__text>:last-child{margin-bottom:0}.govuk-error-summary{color:#0b0c0c;padding:15px;margin-bottom:30px;border:5px solid #d4351c}@media print{.govuk-error-summary{color:#000}}@media (min-width: 40.0625em){.govuk-error-summary{padding:20px}}@media (min-width: 40.0625em){.govuk-error-summary{margin-bottom:50px}}.govuk-error-summary:focus{outline:3px solid #ffdd00}.govuk-error-summary__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:15px}@media print{.govuk-error-summary__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__title{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-error-summary__title{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-error-summary__title{margin-bottom:20px}}.govuk-error-summary__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-error-summary__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__body{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-summary__body{font-size:14pt;line-height:1.15}}.govuk-error-summary__body p{margin-top:0;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-error-summary__body p{margin-bottom:20px}}.govuk-error-summary__list{margin-top:0;margin-bottom:0}.govuk-error-summary__list a{font-weight:700;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-error-summary__list a{font-family:sans-serif}}.govuk-error-summary__list a:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-error-summary__list a:link,.govuk-error-summary__list a:visited{color:#d4351c}.govuk-error-summary__list a:hover{color:#942514}.govuk-error-summary__list a:active{color:#d4351c}.govuk-error-summary__list a:focus{color:#0b0c0c}.govuk-file-upload{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;max-width:100%;margin-left:-5px;padding:5px}@media print{.govuk-file-upload{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-file-upload{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-file-upload{font-size:14pt;line-height:1.15}}@media print{.govuk-file-upload{color:#000}}.govuk-file-upload::-webkit-file-upload-button{-webkit-appearance:button;color:inherit;font:inherit}.govuk-file-upload:focus{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-file-upload:focus-within{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-footer{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;padding-top:25px;padding-bottom:15px;border-top:1px solid #b1b4b6;color:#0b0c0c;background:#f3f2f1}@media print{.govuk-footer{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-footer{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-footer{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-footer{padding-top:40px}}@media (min-width: 40.0625em){.govuk-footer{padding-bottom:25px}}.govuk-footer__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-footer__link{font-family:sans-serif}}.govuk-footer__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-footer__link:link,.govuk-footer__link:visited{color:#0b0c0c}@media print{.govuk-footer__link:link,.govuk-footer__link:visited{color:#000}}.govuk-footer__link:hover{color:#0b0c0cfc}.govuk-footer__link:active,.govuk-footer__link:focus{color:#0b0c0c}@media print{.govuk-footer__link:active,.govuk-footer__link:focus{color:#000}}.govuk-footer__section-break{margin:0 0 30px;border:0;border-bottom:1px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-footer__section-break{margin-bottom:50px}}.govuk-footer__meta{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-right:-15px;margin-left:-15px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.govuk-footer__meta-item{margin-right:15px;margin-bottom:25px;margin-left:15px}.govuk-footer__meta-item--grow{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}@media (max-width: 40.0525em){.govuk-footer__meta-item--grow{-webkit-flex-basis:320px;-ms-flex-preferred-size:320px;flex-basis:320px}}.govuk-footer__licence-logo{display:inline-block;margin-right:10px;vertical-align:top;forced-color-adjust:auto}@media (max-width: 48.0525em){.govuk-footer__licence-logo{margin-bottom:15px}}.govuk-footer__licence-description{display:inline-block}.govuk-footer__copyright-logo{display:inline-block;min-width:125px;padding-top:112px;background-image:url(/assets/images/govuk-crest.png);background-repeat:no-repeat;background-position:50% 0%;background-size:125px 102px;text-align:center;white-space:nowrap}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){.govuk-footer__copyright-logo{background-image:url(/assets/images/govuk-crest-2x.png)}}.govuk-footer__inline-list{margin-top:0;margin-bottom:15px;padding:0}.govuk-footer__meta-custom{margin-bottom:20px}.govuk-footer__inline-list-item{display:inline-block;margin-right:15px;margin-bottom:5px}.govuk-footer__heading{margin-bottom:30px;padding-bottom:20px;border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-footer__heading{padding-bottom:10px}}.govuk-footer__navigation{margin-right:-15px;margin-left:-15px}.govuk-footer__navigation:after{content:"";display:block;clear:both}.govuk-footer__section{display:inline-block;margin-bottom:30px;vertical-align:top}.govuk-footer__list{margin:0;padding:0;list-style:none;-webkit-column-gap:30px;column-gap:30px}.govuk-footer__list .govuk-footer__link:hover{text-decoration-thickness:auto}@media (min-width: 48.0625em){.govuk-footer__list--columns-2{-webkit-column-count:2;column-count:2}.govuk-footer__list--columns-3{-webkit-column-count:3;column-count:3}}.govuk-footer__list-item{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-footer__list-item{margin-bottom:20px}}.govuk-footer__list-item:last-child{margin-bottom:0}.govuk-header{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;border-bottom:10px solid #ffffff;color:#fff;background:#0b0c0c}@media print{.govuk-header{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header{font-size:14pt;line-height:1.2}}.govuk-header__container--full-width{padding:0 15px;border-color:#1d70b8}.govuk-header__container--full-width .govuk-header__menu-button{right:15px}.govuk-header__container{position:relative;margin-bottom:-10px;padding-top:10px;border-bottom:10px solid #1d70b8}.govuk-header__container:after{content:"";display:block;clear:both}.govuk-header__logotype{display:inline-block;margin-right:5px}@media (forced-colors: active){.govuk-header__logotype{forced-color-adjust:none;color:linktext}}.govuk-header__logotype:last-child{margin-right:0}.govuk-header__logotype-crown{position:relative;top:-1px;margin-right:1px;fill:currentColor;vertical-align:top}.govuk-header__logotype-crown-fallback-image{width:36px;height:32px;border:0;vertical-align:bottom}.govuk-header__product-name{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1;display:inline-table}@media print{.govuk-header__product-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__product-name{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-header__product-name{font-size:18pt;line-height:1}}.govuk-header__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none}@media print{.govuk-header__link{font-family:sans-serif}}.govuk-header__link:link,.govuk-header__link:visited{color:#fff}.govuk-header__link:hover,.govuk-header__link:active{color:#fffffffc}.govuk-header__link:focus{color:#0b0c0c}.govuk-header__link:hover{text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:.1em}.govuk-header__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__link--homepage{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:inline-block;margin-right:10px;font-size:30px;line-height:1}@media print{.govuk-header__link--homepage{font-family:sans-serif}}.govuk-header__link--homepage:link,.govuk-header__link--homepage:visited{text-decoration:none}.govuk-header__link--homepage:hover,.govuk-header__link--homepage:active{margin-bottom:-3px;border-bottom:3px solid}.govuk-header__link--homepage:focus{margin-bottom:0;border-bottom:0}.govuk-header__link--service-name{display:inline-block;margin-bottom:10px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111}@media print{.govuk-header__link--service-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__link--service-name{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-header__link--service-name{font-size:18pt;line-height:1.15}}.govuk-header__logo,.govuk-header__content{box-sizing:border-box}.govuk-header__logo{margin-bottom:10px;padding-right:50px}@media (min-width: 40.0625em){.govuk-header__logo{margin-bottom:10px}}@media (min-width: 48.0625em){.govuk-header__logo{width:33.33%;padding-right:15px;float:left;vertical-align:top}}@media (min-width: 48.0625em){.govuk-header__content{width:66.66%;padding-left:15px;float:left}}.govuk-header__menu-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:none;position:absolute;top:20px;right:0;margin:0;padding:0;border:0;color:#fff;background:none;cursor:pointer}@media print{.govuk-header__menu-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__menu-button{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__menu-button{font-size:14pt;line-height:1.2}}.govuk-header__menu-button:hover{-webkit-text-decoration:solid underline 3px;text-decoration:solid underline 3px;text-underline-offset:.1em}.govuk-header__menu-button:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__menu-button:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:8.66px 5px 0 5px;border-top-color:inherit;content:"";margin-left:5px}@media (min-width: 40.0625em){.govuk-header__menu-button{top:15px}}.govuk-header__menu-button--open:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(50% 0%,0% 100%,100% 100%);clip-path:polygon(50% 0%,0% 100%,100% 100%);border-width:0 5px 8.66px 5px;border-bottom-color:inherit}@media (min-width: 48.0625em){.govuk-header__navigation{margin-bottom:10px}}.govuk-header__navigation-list{margin:0;padding:0;list-style:none}.js-enabled .govuk-header__menu-button{display:block}@media (min-width: 48.0625em){.js-enabled .govuk-header__menu-button{display:none}}.js-enabled .govuk-header__navigation-list{display:none}@media (min-width: 48.0625em){.js-enabled .govuk-header__navigation-list{display:block}}.js-enabled .govuk-header__navigation-list--open{display:block}@media (min-width: 48.0625em){.govuk-header__navigation--end{margin:0;padding:5px 0;text-align:right}}.govuk-header__navigation--no-service-name{padding-top:40px}.govuk-header__navigation-item{padding:10px 0;border-bottom:1px solid #2e3133}@media (min-width: 48.0625em){.govuk-header__navigation-item{display:inline-block;margin-right:15px;padding:5px 0;border:0}}.govuk-header__navigation-item a{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1.1428571429;white-space:nowrap}@media print{.govuk-header__navigation-item a{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__navigation-item a{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__navigation-item a{font-size:14pt;line-height:1.2}}.govuk-header__navigation-item--active a:link,.govuk-header__navigation-item--active a:hover,.govuk-header__navigation-item--active a:visited{color:#1d8feb}.govuk-header__navigation-item--active a:focus{color:#0b0c0c}.govuk-header__navigation-item:last-child{margin-right:0;border-bottom:0}@media print{.govuk-header{border-bottom-width:0;color:#0b0c0c;background:transparent}.govuk-header__logotype-crown-fallback-image{display:none}.govuk-header__link:link,.govuk-header__link:visited{color:#0b0c0c}.govuk-header__link:after{display:none}}.govuk-inset-text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;padding:15px;margin-top:20px;margin-bottom:20px;clear:both;border-left:10px solid #b1b4b6}@media print{.govuk-inset-text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-inset-text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-inset-text{font-size:14pt;line-height:1.15}}@media print{.govuk-inset-text{color:#000}}@media (min-width: 40.0625em){.govuk-inset-text{margin-top:30px}}@media (min-width: 40.0625em){.govuk-inset-text{margin-bottom:30px}}.govuk-inset-text>:first-child{margin-top:0}.govuk-inset-text>:only-child,.govuk-inset-text>:last-child{margin-bottom:0}.govuk-notification-banner{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:30px;border:5px solid #1d70b8;background-color:#1d70b8}@media print{.govuk-notification-banner{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-notification-banner{margin-bottom:50px}}.govuk-notification-banner:focus{outline:3px solid #ffdd00}.govuk-notification-banner__header{padding:2px 15px 5px;border-bottom:1px solid transparent}@media (min-width: 40.0625em){.govuk-notification-banner__header{padding:2px 20px 5px}}.govuk-notification-banner__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;margin:0;padding:0;color:#fff}@media print{.govuk-notification-banner__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner__title{font-size:14pt;line-height:1.15}}.govuk-notification-banner__content{color:#0b0c0c;padding:15px;background-color:#fff}@media print{.govuk-notification-banner__content{color:#000}}@media (min-width: 40.0625em){.govuk-notification-banner__content{padding:20px}}.govuk-notification-banner__content>*{box-sizing:border-box;max-width:605px}.govuk-notification-banner__content>:last-child{margin-bottom:0}.govuk-notification-banner__heading{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin:0 0 15px;padding:0}@media print{.govuk-notification-banner__heading{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__heading{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-notification-banner__heading{font-size:18pt;line-height:1.15}}.govuk-notification-banner__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-notification-banner__link{font-family:sans-serif}}.govuk-notification-banner__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-notification-banner__link:link,.govuk-notification-banner__link:visited{color:#1d70b8}.govuk-notification-banner__link:hover{color:#003078}.govuk-notification-banner__link:active{color:#0b0c0c}.govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-notification-banner--success{border-color:#00703c;background-color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:link,.govuk-notification-banner--success .govuk-notification-banner__link:visited{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:hover{color:#004e2a}.govuk-notification-banner--success .govuk-notification-banner__link:active{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-panel{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;margin-bottom:15px;padding:35px;border:5px solid transparent;text-align:center}@media print{.govuk-panel{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-panel{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-panel{padding:10px;overflow-wrap:break-word;word-wrap:break-word}}.govuk-panel--confirmation{color:#fff;background:#00703c}@media print{.govuk-panel--confirmation{border-color:currentColor;color:#000;background:none}}.govuk-panel__title{margin-top:0;margin-bottom:30px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375}@media print{.govuk-panel__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__title{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-panel__title{font-size:32pt;line-height:1.15}}.govuk-panel__title:last-child{margin-bottom:0}.govuk-panel__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:24px;font-size:1.5rem;line-height:1.0416666667}@media print{.govuk-panel__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__body{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-panel__body{font-size:24pt;line-height:1.05}}.govuk-tag{display:inline-block;outline:2px solid transparent;outline-offset:-2px;color:#fff;background-color:#1d70b8;letter-spacing:1px;text-decoration:none;text-transform:uppercase;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1;padding:5px 8px 4px}@media print{.govuk-tag{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tag{font-size:16px;font-size:1rem;line-height:1}}@media print{.govuk-tag{font-size:14pt;line-height:1}}.govuk-tag--grey{color:#383f43;background:#eeefef}.govuk-tag--purple{color:#3d2375;background:#dbd5e9}.govuk-tag--turquoise{color:#10403c;background:#bfe3e0}.govuk-tag--blue{color:#144e81;background:#d2e2f1}.govuk-tag--yellow{color:#594d00;background:#fff7bf}.govuk-tag--orange{color:#6e3619;background:#fcd6c3}.govuk-tag--red{color:#942514;background:#f6d7d2}.govuk-tag--pink{color:#80224d;background:#f7d7e6}.govuk-tag--green{color:#005a30;background:#cce2d8}.govuk-phase-banner{padding-top:10px;padding-bottom:10px;border-bottom:1px solid #b1b4b6}.govuk-phase-banner__content{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;display:table;margin:0}@media print{.govuk-phase-banner__content{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-phase-banner__content{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-phase-banner__content{font-size:14pt;line-height:1.2}}@media print{.govuk-phase-banner__content{color:#000}}.govuk-phase-banner__content__tag{margin-right:10px}.govuk-phase-banner__text{display:table-cell;vertical-align:middle}.govuk-tabs{margin-top:5px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-tabs{margin-top:5px}}@media (min-width: 40.0625em){.govuk-tabs{margin-bottom:30px}}.govuk-tabs__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:10px}@media print{.govuk-tabs__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__title{font-size:14pt;line-height:1.15}}@media print{.govuk-tabs__title{color:#000}}.govuk-tabs__list{margin:0 0 20px;padding:0;list-style:none}@media (min-width: 40.0625em){.govuk-tabs__list{margin-bottom:30px}}.govuk-tabs__list-item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-left:25px}@media print{.govuk-tabs__list-item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__list-item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__list-item{font-size:14pt;line-height:1.15}}.govuk-tabs__list-item:before{color:#0b0c0c;content:"\\2014";margin-left:-25px;padding-right:5px}@media print{.govuk-tabs__list-item:before{color:#000}}.govuk-tabs__tab{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;margin-bottom:10px}@media print{.govuk-tabs__tab{font-family:sans-serif}}.govuk-tabs__tab:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-tabs__tab:link{color:#1d70b8}.govuk-tabs__tab:visited{color:#4c2c92}.govuk-tabs__tab:hover{color:#003078}.govuk-tabs__tab:active{color:#0b0c0c}.govuk-tabs__tab:focus{color:#0b0c0c}.govuk-tabs__panel{margin-bottom:30px}@media (min-width: 40.0625em){.govuk-tabs__panel{margin-bottom:50px}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__list{margin-bottom:0;border-bottom:1px solid #b1b4b6}.js-enabled .govuk-tabs__list:after{content:"";display:block;clear:both}.js-enabled .govuk-tabs__title{display:none}.js-enabled .govuk-tabs__list-item{position:relative;margin-right:5px;margin-bottom:0;margin-left:0;padding:10px 20px;float:left;background-color:#f3f2f1;text-align:center}.js-enabled .govuk-tabs__list-item:before{content:none}.js-enabled .govuk-tabs__list-item--selected{position:relative;margin-top:-5px;margin-bottom:-1px;padding:14px 19px 16px;border:1px solid #b1b4b6;border-bottom:0;background-color:#fff}.js-enabled .govuk-tabs__list-item--selected .govuk-tabs__tab{text-decoration:none}.js-enabled .govuk-tabs__tab{margin-bottom:0}.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:hover{color:#0b0c0cfc}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0;padding:30px 20px;border:1px solid #b1b4b6;border-top:0}}@media (min-width: 40.0625em) and (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel>:last-child{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel--hidden{display:none}}.govuk-radios__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-radios__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__item{font-size:14pt;line-height:1.15}}.govuk-radios__item:last-child,.govuk-radios__item:last-of-type{margin-bottom:0}.govuk-radios__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-radios__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-radios__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;border-radius:50%;background:transparent}.govuk-radios__label:after{content:"";position:absolute;top:10px;left:10px;width:0;height:0;border:10px solid currentColor;border-radius:50%;opacity:0;background:currentColor}.govuk-radios__hint{display:block;padding-right:15px;padding-left:15px}.govuk-radios__input:focus+.govuk-radios__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 4px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-radios__input:focus+.govuk-radios__label:before{outline-color:Highlight}}.govuk-radios__input:checked+.govuk-radios__label:after{opacity:1}.govuk-radios__input:disabled,.govuk-radios__input:disabled+.govuk-radios__label{cursor:default}.govuk-radios__input:disabled+.govuk-radios__label{opacity:.5}@media (min-width: 40.0625em){.govuk-radios--inline:after{content:"";display:block;clear:both}.govuk-radios--inline .govuk-radios__item{margin-right:20px;float:left;clear:none}}.govuk-radios__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-radios__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-radios__divider{color:#000}}.govuk-radios__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-radios__conditional{margin-bottom:20px}}.js-enabled .govuk-radios__conditional--hidden{display:none}.govuk-radios__conditional>:last-child{margin-bottom:0}.govuk-radios--small .govuk-radios__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-radios--small .govuk-radios__item:after{content:"";display:block;clear:both}.govuk-radios--small .govuk-radios__input{left:-10px}.govuk-radios--small .govuk-radios__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-radios--small .govuk-radios__label{padding:11px 15px 10px 1px}}.govuk-radios--small .govuk-radios__label:before{top:8px;width:24px;height:24px}.govuk-radios--small .govuk-radios__label:after{top:15px;left:7px;border-width:5px}.govuk-radios--small .govuk-radios__hint{padding:0;clear:both;pointer-events:none}.govuk-radios--small .govuk-radios__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-radios--small .govuk-radios__divider{width:24px;margin-bottom:5px}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:initial}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0}}.govuk-select{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;max-width:100%;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;color:#0b0c0c;background-color:#fff}@media print{.govuk-select{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-select{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-select{font-size:14pt;line-height:1.25}}.govuk-select:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-select option:active,.govuk-select option:checked,.govuk-select:focus::-ms-value{color:#fff;background-color:#1d70b8}.govuk-select--error{border-color:#d4351c}.govuk-select--error:focus{border-color:#0b0c0c}.govuk-skip-link{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:block;padding:10px 15px}.govuk-skip-link:active,.govuk-skip-link:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}@media print{.govuk-skip-link{font-family:sans-serif}}.govuk-skip-link:link,.govuk-skip-link:visited{color:#0b0c0c}@media print{.govuk-skip-link:link,.govuk-skip-link:visited{color:#000}}.govuk-skip-link:hover{color:#0b0c0cfc}.govuk-skip-link:active,.govuk-skip-link:focus{color:#0b0c0c}@media print{.govuk-skip-link:active,.govuk-skip-link:focus{color:#000}}@media (min-width: 40.0625em){.govuk-skip-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-skip-link{font-size:14pt;line-height:1.2}}@supports (padding: max(0px)){.govuk-skip-link{padding-right:max(15px,calc(15px + env(safe-area-inset-right)));padding-left:max(15px,calc(15px + env(safe-area-inset-left)))}}.govuk-skip-link:focus{outline:3px solid #ffdd00;outline-offset:0;background-color:#fd0}.govuk-skip-link-focused-element:focus{outline:none}.govuk-table{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:100%;margin-bottom:20px;border-spacing:0;border-collapse:collapse}@media print{.govuk-table{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table{font-size:14pt;line-height:1.15}}@media print{.govuk-table{color:#000}}@media (min-width: 40.0625em){.govuk-table{margin-bottom:30px}}.govuk-table__header{font-weight:700}.govuk-table__header,.govuk-table__cell{padding:10px 20px 10px 0;border-bottom:1px solid #b1b4b6;text-align:left;vertical-align:top}.govuk-table__cell--numeric{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400}@media print{.govuk-table__cell--numeric{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-table__cell--numeric{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-table__header--numeric,.govuk-table__cell--numeric{text-align:right}.govuk-table__header:last-child,.govuk-table__cell:last-child{padding-right:0}.govuk-table__caption{font-weight:700;display:table-caption;text-align:left}.govuk-table__caption--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-table__caption--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-table__caption--xl{font-size:32pt;line-height:1.15}}.govuk-table__caption--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-table__caption--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-table__caption--l{font-size:24pt;line-height:1.05}}.govuk-table__caption--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-table__caption--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-table__caption--m{font-size:18pt;line-height:1.15}}.govuk-table__caption--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-table__caption--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table__caption--s{font-size:14pt;line-height:1.15}}.govuk-warning-text{position:relative;margin-bottom:20px;padding:10px 0}@media (min-width: 40.0625em){.govuk-warning-text{margin-bottom:30px}}.govuk-warning-text__assistive{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-warning-text__icon{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;box-sizing:border-box;display:inline-block;position:absolute;left:0;min-width:35px;min-height:35px;margin-top:-7px;border:3px solid #0b0c0c;border-radius:50%;color:#fff;background:#0b0c0c;font-size:30px;line-height:29px;text-align:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;forced-color-adjust:none}@media print{.govuk-warning-text__icon{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__icon{margin-top:-5px}}@media screen and (forced-colors: active){.govuk-warning-text__icon{border-color:windowText;color:windowText;background:transparent}}.govuk-warning-text__text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;padding-left:45px}@media print{.govuk-warning-text__text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-warning-text__text{font-size:14pt;line-height:1.15}}@media print{.govuk-warning-text__text{color:#000}}.govuk-clearfix:after{content:"";display:block;clear:both}.govuk-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-visually-hidden-focusable{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important}.govuk-visually-hidden-focusable:active,.govuk-visually-hidden-focusable:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}.govuk-\\!-display-inline{display:inline!important}.govuk-\\!-display-inline-block{display:inline-block!important}.govuk-\\!-display-block{display:block!important}.govuk-\\!-display-none{display:none!important}@media print{.govuk-\\!-display-none-print{display:none!important}}.govuk-\\!-margin-0{margin:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-0{margin:0!important}}.govuk-\\!-margin-top-0{margin-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-0{margin-top:0!important}}.govuk-\\!-margin-right-0{margin-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-0{margin-right:0!important}}.govuk-\\!-margin-bottom-0{margin-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-0{margin-bottom:0!important}}.govuk-\\!-margin-left-0{margin-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-0{margin-left:0!important}}.govuk-\\!-margin-1{margin:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-1{margin:5px!important}}.govuk-\\!-margin-top-1{margin-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-1{margin-top:5px!important}}.govuk-\\!-margin-right-1{margin-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-1{margin-right:5px!important}}.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}}.govuk-\\!-margin-left-1{margin-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-1{margin-left:5px!important}}.govuk-\\!-margin-2{margin:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-2{margin:10px!important}}.govuk-\\!-margin-top-2{margin-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-2{margin-top:10px!important}}.govuk-\\!-margin-right-2{margin-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-2{margin-right:10px!important}}.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}}.govuk-\\!-margin-left-2{margin-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-2{margin-left:10px!important}}.govuk-\\!-margin-3{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-3{margin:15px!important}}.govuk-\\!-margin-top-3{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-3{margin-top:15px!important}}.govuk-\\!-margin-right-3{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-3{margin-right:15px!important}}.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}}.govuk-\\!-margin-left-3{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-3{margin-left:15px!important}}.govuk-\\!-margin-4{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-4{margin:20px!important}}.govuk-\\!-margin-top-4{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-4{margin-top:20px!important}}.govuk-\\!-margin-right-4{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-4{margin-right:20px!important}}.govuk-\\!-margin-bottom-4{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-4{margin-bottom:20px!important}}.govuk-\\!-margin-left-4{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-4{margin-left:20px!important}}.govuk-\\!-margin-5{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-5{margin:25px!important}}.govuk-\\!-margin-top-5{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-5{margin-top:25px!important}}.govuk-\\!-margin-right-5{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-5{margin-right:25px!important}}.govuk-\\!-margin-bottom-5{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-5{margin-bottom:25px!important}}.govuk-\\!-margin-left-5{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-5{margin-left:25px!important}}.govuk-\\!-margin-6{margin:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-6{margin:30px!important}}.govuk-\\!-margin-top-6{margin-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-6{margin-top:30px!important}}.govuk-\\!-margin-right-6{margin-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-6{margin-right:30px!important}}.govuk-\\!-margin-bottom-6{margin-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-6{margin-bottom:30px!important}}.govuk-\\!-margin-left-6{margin-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-6{margin-left:30px!important}}.govuk-\\!-margin-7{margin:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-7{margin:40px!important}}.govuk-\\!-margin-top-7{margin-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-7{margin-top:40px!important}}.govuk-\\!-margin-right-7{margin-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-7{margin-right:40px!important}}.govuk-\\!-margin-bottom-7{margin-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-7{margin-bottom:40px!important}}.govuk-\\!-margin-left-7{margin-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-7{margin-left:40px!important}}.govuk-\\!-margin-8{margin:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-8{margin:50px!important}}.govuk-\\!-margin-top-8{margin-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-8{margin-top:50px!important}}.govuk-\\!-margin-right-8{margin-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-8{margin-right:50px!important}}.govuk-\\!-margin-bottom-8{margin-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-8{margin-bottom:50px!important}}.govuk-\\!-margin-left-8{margin-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-8{margin-left:50px!important}}.govuk-\\!-margin-9{margin:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-9{margin:60px!important}}.govuk-\\!-margin-top-9{margin-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-9{margin-top:60px!important}}.govuk-\\!-margin-right-9{margin-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-9{margin-right:60px!important}}.govuk-\\!-margin-bottom-9{margin-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-9{margin-bottom:60px!important}}.govuk-\\!-margin-left-9{margin-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-9{margin-left:60px!important}}.govuk-\\!-padding-0{padding:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-0{padding:0!important}}.govuk-\\!-padding-top-0{padding-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-0{padding-top:0!important}}.govuk-\\!-padding-right-0{padding-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-0{padding-right:0!important}}.govuk-\\!-padding-bottom-0{padding-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-0{padding-bottom:0!important}}.govuk-\\!-padding-left-0{padding-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-0{padding-left:0!important}}.govuk-\\!-padding-1{padding:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-1{padding:5px!important}}.govuk-\\!-padding-top-1{padding-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-1{padding-top:5px!important}}.govuk-\\!-padding-right-1{padding-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-1{padding-right:5px!important}}.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}}.govuk-\\!-padding-left-1{padding-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-1{padding-left:5px!important}}.govuk-\\!-padding-2{padding:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-2{padding:10px!important}}.govuk-\\!-padding-top-2{padding-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-2{padding-top:10px!important}}.govuk-\\!-padding-right-2{padding-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-2{padding-right:10px!important}}.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}}.govuk-\\!-padding-left-2{padding-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-2{padding-left:10px!important}}.govuk-\\!-padding-3{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-3{padding:15px!important}}.govuk-\\!-padding-top-3{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-3{padding-top:15px!important}}.govuk-\\!-padding-right-3{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-3{padding-right:15px!important}}.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}}.govuk-\\!-padding-left-3{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-3{padding-left:15px!important}}.govuk-\\!-padding-4{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-4{padding:20px!important}}.govuk-\\!-padding-top-4{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-4{padding-top:20px!important}}.govuk-\\!-padding-right-4{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-4{padding-right:20px!important}}.govuk-\\!-padding-bottom-4{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-4{padding-bottom:20px!important}}.govuk-\\!-padding-left-4{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-4{padding-left:20px!important}}.govuk-\\!-padding-5{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-5{padding:25px!important}}.govuk-\\!-padding-top-5{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-5{padding-top:25px!important}}.govuk-\\!-padding-right-5{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-5{padding-right:25px!important}}.govuk-\\!-padding-bottom-5{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-5{padding-bottom:25px!important}}.govuk-\\!-padding-left-5{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-5{padding-left:25px!important}}.govuk-\\!-padding-6{padding:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-6{padding:30px!important}}.govuk-\\!-padding-top-6{padding-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-6{padding-top:30px!important}}.govuk-\\!-padding-right-6{padding-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-6{padding-right:30px!important}}.govuk-\\!-padding-bottom-6{padding-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-6{padding-bottom:30px!important}}.govuk-\\!-padding-left-6{padding-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-6{padding-left:30px!important}}.govuk-\\!-padding-7{padding:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-7{padding:40px!important}}.govuk-\\!-padding-top-7{padding-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-7{padding-top:40px!important}}.govuk-\\!-padding-right-7{padding-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-7{padding-right:40px!important}}.govuk-\\!-padding-bottom-7{padding-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-7{padding-bottom:40px!important}}.govuk-\\!-padding-left-7{padding-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-7{padding-left:40px!important}}.govuk-\\!-padding-8{padding:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-8{padding:50px!important}}.govuk-\\!-padding-top-8{padding-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-8{padding-top:50px!important}}.govuk-\\!-padding-right-8{padding-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-8{padding-right:50px!important}}.govuk-\\!-padding-bottom-8{padding-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-8{padding-bottom:50px!important}}.govuk-\\!-padding-left-8{padding-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-8{padding-left:50px!important}}.govuk-\\!-padding-9{padding:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-9{padding:60px!important}}.govuk-\\!-padding-top-9{padding-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-9{padding-top:60px!important}}.govuk-\\!-padding-right-9{padding-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-9{padding-right:60px!important}}.govuk-\\!-padding-bottom-9{padding-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-9{padding-bottom:60px!important}}.govuk-\\!-padding-left-9{padding-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-9{padding-left:60px!important}}.govuk-\\!-text-align-left{text-align:left!important}.govuk-\\!-text-align-centre{text-align:center!important}.govuk-\\!-text-align-right{text-align:right!important}.govuk-\\!-font-size-80{font-size:53px!important;font-size:3.3125rem!important;line-height:1.0377358491!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-80{font-size:80px!important;font-size:5rem!important;line-height:1!important}}@media print{.govuk-\\!-font-size-80{font-size:53pt!important;line-height:1.1!important}}.govuk-\\!-font-size-48{font-size:32px!important;font-size:2rem!important;line-height:1.09375!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-48{font-size:48px!important;font-size:3rem!important;line-height:1.0416666667!important}}@media print{.govuk-\\!-font-size-48{font-size:32pt!important;line-height:1.15!important}}.govuk-\\!-font-size-36{font-size:24px!important;font-size:1.5rem!important;line-height:1.0416666667!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-36{font-size:36px!important;font-size:2.25rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-36{font-size:24pt!important;line-height:1.05!important}}.govuk-\\!-font-size-27{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-27{font-size:27px!important;font-size:1.6875rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-27{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-24{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-24{font-size:24px!important;font-size:1.5rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-24{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-19{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-19{font-size:19px!important;font-size:1.1875rem!important;line-height:1.3157894737!important}}@media print{.govuk-\\!-font-size-19{font-size:14pt!important;line-height:1.15!important}}.govuk-\\!-font-size-16{font-size:14px!important;font-size:.875rem!important;line-height:1.1428571429!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-16{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-16{font-size:14pt!important;line-height:1.2!important}}.govuk-\\!-font-size-14{font-size:12px!important;font-size:.75rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-14{font-size:14px!important;font-size:.875rem!important;line-height:1.4285714286!important}}@media print{.govuk-\\!-font-size-14{font-size:12pt!important;line-height:1.2!important}}.govuk-\\!-font-weight-regular{font-weight:400!important}.govuk-\\!-font-weight-bold{font-weight:700!important}.govuk-\\!-width-full,.govuk-\\!-width-three-quarters{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-three-quarters{width:75%!important}}.govuk-\\!-width-two-thirds{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-two-thirds{width:66.66%!important}}.govuk-\\!-width-one-half{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-half{width:50%!important}}.govuk-\\!-width-one-third{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-third{width:33.33%!important}}.govuk-\\!-width-one-quarter{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-quarter{width:25%!important}}:host .govuk-label{font-family:var(--autocomplete__font-family, "GDS Transport", arial, sans-serif)}:host .govuk-label--static{font-size:var(--autocomplete__label__font-size, 19px)}:host .autocomplete__input{font-family:var(--autocomplete__font-family, "GDS Transport", arial, sans-serif);font-size:var(--autocomplete__input__font-size, 19px);height:var(--autocomplete__input__height, 35px);padding:var(--autocomplete__input__padding, 5px 34px 5px 5px);z-index:calc(var(--autocomplete__dropdown-arrow-down__z-index, 1) + 1)}:host .autocomplete__dropdown-arrow-down{z-index:var(--autocomplete__dropdown-arrow-down__z-index, 1);top:calc((var(--autocomplete__input__height, 35px) - 17px) / 2)}:host .autocomplete__option{font-family:var(--autocomplete__font-family, "GDS Transport", arial, sans-serif);font-size:var(--autocomplete__input__font-size, 19px);padding:var(--autocomplete__option__padding, 5px);border-bottom:var(--autocomplete__option__border-bottom, solid 1px #b1b4b6)}:host .autocomplete__option--focused,:host .autocomplete__option:hover,.autocomplete__option--focused :host .autocomplete__option:hover{border-color:var(--autocomplete__option__hover-border-color, #1d70b8);background-color:var(--autocomplete__option__hover-background-color, #1d70b8)}:host .autocomplete__menu{max-height:var(--autocomplete__menu__max-height, 342px)}
86
- `;var up=Object.freeze,dp=Object.defineProperty,HE=Object.getOwnPropertyDescriptor,Ue=(i,t,e,n)=>{for(var r=n>1?void 0:n?HE(t,e):t,o=i.length-1,s;o>=0;o--)(s=i[o])&&(r=(n?s(t,e,r):s(r))||r);return n&&r&&dp(t,e,r),r},JE=(i,t)=>up(dp(i,"raw",{value:up(t||i.slice())})),cp;q.AddressAutocomplete=class extends Pn{constructor(){super(...arguments),this.id="autocomplete",this.postcode="SE5 0HU",this.label="Select an address",this.initialAddress="",this.osPlacesApiKey="a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",this.arrowStyle="default",this.labelStyle="responsive",this._totalAddresses=void 0,this._addressesInPostcode=[],this._options=[],this._selectedAddress=null,this._osError=void 0,this.dispatch=(i,t)=>this.dispatchEvent(new CustomEvent(i,{detail:t}))}connectedCallback(){super.connectedCallback(),this._fetchData()}disconnectedCallback(){super.disconnectedCallback()}_getLightDropdownArrow(){return'<svg class="autocomplete__dropdown-arrow-down" style="height: 17px;" viewBox="0 0 512 512" ><path d="M256,298.3L256,298.3L256,298.3l174.2-167.2c4.3-4.2,11.4-4.1,15.8,0.2l30.6,29.9c4.4,4.3,4.5,11.3,0.2,15.5L264.1,380.9 c-2.2,2.2-5.2,3.2-8.1,3c-3,0.1-5.9-0.9-8.1-3L35.2,176.7c-4.3-4.2-4.2-11.2,0.2-15.5L66,131.3c4.4-4.3,11.5-4.4,15.8-0.2L256,298.3 z"/></svg>'}firstUpdated(){KE({element:this.renderRoot.querySelector(`#${this.id}-container`),id:this.id,required:!0,source:this._options,defaultValue:this.initialAddress,showAllValues:!0,displayMenu:"overlay",dropdownArrow:this.arrowStyle==="light"?this._getLightDropdownArrow:void 0,tNoResults:()=>"No addresses found",onConfirm:i=>{this._selectedAddress=this._addressesInPostcode.filter(t=>t.LPI.ADDRESS.split(`, ${t.LPI.ADMINISTRATIVE_AREA}`)[0]===i)[0],this._selectedAddress&&this.dispatch("addressSelection",{address:this._selectedAddress})}})}async _fetchData(i=0,t=[]){const e={postcode:this.postcode,dataset:"LPI",maxResults:"100",output_srs:"EPSG:4326",lr:"EN",key:this.osPlacesApiKey},n=`https://api.os.uk/search/places/v1/postcode?${new URLSearchParams(e)}`;await fetch(n+`&offset=${i}`).then(r=>r.json()).then(r=>{var s,a,l;(r.error||r.fault)&&(this._osError=((s=r.error)==null?void 0:s.message)||((a=r.fault)==null?void 0:a.faultstring)||"Something went wrong"),this._totalAddresses=(l=r.header)==null?void 0:l.totalresults;const o=t.concat(r.results||[]);if(this._addressesInPostcode=o,this.dispatch("ready",{postcode:this.postcode,status:`fetched ${this._addressesInPostcode.length}/${this._totalAddresses} addresses`}),r.results){r.results.filter(u=>u.LPI.LPI_LOGICAL_STATUS_CODE_DESCRIPTION==="APPROVED").map(u=>{this._options.push(u.LPI.ADDRESS.split(`, ${u.LPI.ADMINISTRATIVE_AREA}`)[0])});const h=new Intl.Collator([],{numeric:!0});this._options.sort((u,d)=>h.compare(u,d))}this._totalAddresses&&this._totalAddresses>this._addressesInPostcode.length&&this._fetchData(this._addressesInPostcode.length,this._addressesInPostcode)}).catch(r=>console.log(r))}_getLabelClasses(){let i="govuk-label";return this.labelStyle==="static"&&(i+=" govuk-label--static"),i}_getErrorMessageContainer(i){const t=i?"govuk-warning-text":"",e=i?Bi` <span class="govuk-warning-text__icon" aria-hidden="true">!</span>
85
+ <div id="`,'" class="map" tabindex="0" />'])),this.id)}disconnectedCallback(){var i;super.disconnectedCallback(),(i=this.map)==null||i.dispose()}},q.MyMap.styles=Cs(XM),bt([J({type:String})],q.MyMap.prototype,"id",2),bt([J({type:Number})],q.MyMap.prototype,"latitude",2),bt([J({type:Number})],q.MyMap.prototype,"longitude",2),bt([J({type:String})],q.MyMap.prototype,"projection",2),bt([J({type:Number})],q.MyMap.prototype,"zoom",2),bt([J({type:Number})],q.MyMap.prototype,"minZoom",2),bt([J({type:Number})],q.MyMap.prototype,"maxZoom",2),bt([J({type:Boolean})],q.MyMap.prototype,"drawMode",2),bt([J({type:Object})],q.MyMap.prototype,"drawGeojsonData",2),bt([J({type:Number})],q.MyMap.prototype,"drawGeojsonDataBuffer",2),bt([J({type:String})],q.MyMap.prototype,"drawPointer",2),bt([J({type:Boolean})],q.MyMap.prototype,"showFeaturesAtPoint",2),bt([J({type:Boolean})],q.MyMap.prototype,"clickFeatures",2),bt([J({type:String})],q.MyMap.prototype,"featureColor",2),bt([J({type:Boolean})],q.MyMap.prototype,"featureFill",2),bt([J({type:Boolean})],q.MyMap.prototype,"featureBorderNone",2),bt([J({type:Number})],q.MyMap.prototype,"featureBuffer",2),bt([J({type:Boolean})],q.MyMap.prototype,"showMarker",2),bt([J({type:Number})],q.MyMap.prototype,"markerLatitude",2),bt([J({type:Number})],q.MyMap.prototype,"markerLongitude",2),bt([J({type:String})],q.MyMap.prototype,"markerColor",2),bt([J({type:Object})],q.MyMap.prototype,"geojsonData",2),bt([J({type:String})],q.MyMap.prototype,"geojsonColor",2),bt([J({type:Boolean})],q.MyMap.prototype,"geojsonFill",2),bt([J({type:Number})],q.MyMap.prototype,"geojsonBuffer",2),bt([J({type:Boolean})],q.MyMap.prototype,"disableVectorTiles",2),bt([J({type:String})],q.MyMap.prototype,"osVectorTilesApiKey",2),bt([J({type:String})],q.MyMap.prototype,"osFeaturesApiKey",2),bt([J({type:String})],q.MyMap.prototype,"osCopyright",2),bt([J({type:Boolean})],q.MyMap.prototype,"hideResetControl",2),bt([J({type:Boolean})],q.MyMap.prototype,"staticMode",2),bt([J({type:String})],q.MyMap.prototype,"areaUnit",2),bt([J({type:Boolean})],q.MyMap.prototype,"showScale",2),bt([J({type:Boolean})],q.MyMap.prototype,"useScaleBarStyle",2),bt([J({type:String})],q.MyMap.prototype,"markerImage",2),q.MyMap=bt([vl("my-map")],q.MyMap);var lp={exports:{}};(function(i,t){(function(n,r){i.exports=r()})(window,function(){return function(e){var n={};function r(o){if(n[o])return n[o].exports;var s=n[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=e,r.c=n,r.d=function(o,s,a){r.o(o,s)||Object.defineProperty(o,s,{enumerable:!0,get:a})},r.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},r.t=function(o,s){if(1&s&&(o=r(o)),8&s||4&s&&typeof o=="object"&&o&&o.__esModule)return o;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:o}),2&s&&typeof o!="string")for(var l in o)r.d(a,l,function(h){return o[h]}.bind(null,l));return a},r.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return r.d(s,"a",s),s},r.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},r.p="/",r(r.s=37)}([function(e,n,r){var o=r(1),s=r(6),a=r(7),l=r(16),h=r(18),u="prototype",d=function(c,f,g){var m,p,_,v,y=c&d.F,x=c&d.G,k=c&d.S,w=c&d.P,M=c&d.B,E=x?o:k?o[f]||(o[f]={}):(o[f]||{})[u],S=x?s:s[f]||(s[f]={}),I=S[u]||(S[u]={});for(m in x&&(g=f),g)_=((p=!y&&E&&E[m]!==void 0)?E:g)[m],v=M&&p?h(_,o):w&&typeof _=="function"?h(Function.call,_):_,E&&l(E,m,_,c&d.U),S[m]!=_&&a(S,m,v),w&&I[m]!=_&&(I[m]=_)};o.core=s,d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,e.exports=d},function(e,n){var r=e.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=r)},function(e,n){e.exports=function(r){return typeof r=="object"?r!==null:typeof r=="function"}},function(e,n,r){e.exports=!r(4)(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(e,n){e.exports=function(r){try{return!!r()}catch{return!0}}},function(e,n,r){r.r(n),r.d(n,"h",function(){return h}),r.d(n,"createElement",function(){return h}),r.d(n,"cloneElement",function(){return c}),r.d(n,"Component",function(){return V}),r.d(n,"render",function(){return z}),r.d(n,"rerender",function(){return p}),r.d(n,"options",function(){return s});var o=function(){},s={},a=[],l=[];function h(b,T){var Y,C,H,$,vt=l;for($=arguments.length;2<$--;)a.push(arguments[$]);for(T&&T.children!=null&&(a.length||a.push(T.children),delete T.children);a.length;)if((C=a.pop())&&C.pop!==void 0)for($=C.length;$--;)a.push(C[$]);else typeof C=="boolean"&&(C=null),(H=typeof b!="function")&&(C==null?C="":typeof C=="number"?C=String(C):typeof C!="string"&&(H=!1)),H&&Y?vt[vt.length-1]+=C:vt===l?vt=[C]:vt.push(C),Y=H;var Ct=new o;return Ct.nodeName=b,Ct.children=vt,Ct.attributes=T==null?void 0:T,Ct.key=T==null?void 0:T.key,s.vnode!==void 0&&s.vnode(Ct),Ct}function u(b,T){for(var Y in T)b[Y]=T[Y];return b}var d=typeof Promise=="function"?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function c(b,T){return h(b.nodeName,u(u({},b.attributes),T),2<arguments.length?[].slice.call(arguments,2):b.children)}var f=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,g=[];function m(b){!b._dirty&&(b._dirty=!0)&&g.push(b)==1&&(s.debounceRendering||d)(p)}function p(){var b,T=g;for(g=[];b=T.pop();)b._dirty&&D(b)}function _(b,T){return b.normalizedNodeName===T||b.nodeName.toLowerCase()===T.toLowerCase()}function v(b){var T=u({},b.attributes);T.children=b.children;var Y=b.nodeName.defaultProps;if(Y!==void 0)for(var C in Y)T[C]===void 0&&(T[C]=Y[C]);return T}function y(b){var T=b.parentNode;T&&T.removeChild(b)}function x(b,T,Y,C,H){if(T==="className"&&(T="class"),T!=="key")if(T==="ref")Y&&Y(null),C&&C(b);else if(T!=="class"||H)if(T==="style"){if(C&&typeof C!="string"&&typeof Y!="string"||(b.style.cssText=C||""),C&&typeof C=="object"){if(typeof Y!="string")for(var $ in Y)$ in C||(b.style[$]="");for(var $ in C)b.style[$]=typeof C[$]=="number"&&f.test($)===!1?C[$]+"px":C[$]}}else if(T==="dangerouslySetInnerHTML")C&&(b.innerHTML=C.__html||"");else if(T[0]=="o"&&T[1]=="n"){var vt=T!==(T=T.replace(/Capture$/,""));T=T.toLowerCase().substring(2),C?Y||b.addEventListener(T,k,vt):b.removeEventListener(T,k,vt),(b._listeners||(b._listeners={}))[T]=C}else if(T!=="list"&&T!=="type"&&!H&&T in b){try{b[T]=C==null?"":C}catch{}C!=null&&C!==!1||T=="spellcheck"||b.removeAttribute(T)}else{var Ct=H&&T!==(T=T.replace(/^xlink:?/,""));C==null||C===!1?Ct?b.removeAttributeNS("http://www.w3.org/1999/xlink",T.toLowerCase()):b.removeAttribute(T):typeof C!="function"&&(Ct?b.setAttributeNS("http://www.w3.org/1999/xlink",T.toLowerCase(),C):b.setAttribute(T,C))}else b.className=C||""}function k(b){return this._listeners[b.type](s.event&&s.event(b)||b)}var w=[],M=0,E=!1,S=!1;function I(){for(var b;b=w.pop();)s.afterMount&&s.afterMount(b),b.componentDidMount&&b.componentDidMount()}function A(b,T,Y,C,H,$){M++||(E=H!=null&&H.ownerSVGElement!==void 0,S=b!=null&&!("__preactattr_"in b));var vt=G(b,T,Y,C,$);return H&&vt.parentNode!==H&&H.appendChild(vt),--M||(S=!1,$||I()),vt}function G(b,T,Y,C,H){var $=b,vt=E;if(T!=null&&typeof T!="boolean"||(T=""),typeof T=="string"||typeof T=="number")return b&&b.splitText!==void 0&&b.parentNode&&(!b._component||H)?b.nodeValue!=T&&(b.nodeValue=T):($=document.createTextNode(T),b&&(b.parentNode&&b.parentNode.replaceChild($,b),P(b,!0))),$.__preactattr_=!0,$;var Ct=T.nodeName;if(typeof Ct=="function")return function(ut,pt,kt,yt){for(var st=ut&&ut._component,nt=st,wt=ut,zt=st&&ut._componentConstructor===pt.nodeName,Bt=zt,xt=v(pt);st&&!Bt&&(st=st._parentComponent);)Bt=st.constructor===pt.nodeName;return st&&Bt&&(!yt||st._component)?(W(st,xt,3,kt,yt),ut=st.base):(nt&&!zt&&(Z(nt),ut=wt=null),st=U(pt.nodeName,xt,kt),ut&&!st.nextBase&&(st.nextBase=ut,wt=null),W(st,xt,1,kt,yt),ut=st.base,wt&&ut!==wt&&(wt._component=null,P(wt,!1))),ut}(b,T,Y,C);if(E=Ct==="svg"||Ct!=="foreignObject"&&E,Ct=String(Ct),(!b||!_(b,Ct))&&($=function(ut,pt){var kt=pt?document.createElementNS("http://www.w3.org/2000/svg",ut):document.createElement(ut);return kt.normalizedNodeName=ut,kt}(Ct,E),b)){for(;b.firstChild;)$.appendChild(b.firstChild);b.parentNode&&b.parentNode.replaceChild($,b),P(b,!0)}var _t=$.firstChild,Mt=$.__preactattr_,Lt=T.children;if(Mt==null){Mt=$.__preactattr_={};for(var Dt=$.attributes,jt=Dt.length;jt--;)Mt[Dt[jt].name]=Dt[jt].value}return!S&&Lt&&Lt.length===1&&typeof Lt[0]=="string"&&_t!=null&&_t.splitText!==void 0&&_t.nextSibling==null?_t.nodeValue!=Lt[0]&&(_t.nodeValue=Lt[0]):(Lt&&Lt.length||_t!=null)&&function(ut,pt,kt,yt,st){var nt,wt,zt,Bt,xt,dt=ut.childNodes,Ft=[],St={},ct=0,ue=0,Ve=dt.length,$t=0,ze=pt?pt.length:0;if(Ve!==0)for(var Ut=0;Ut<Ve;Ut++){var Ht=dt[Ut],Tn=Ht.__preactattr_,ae=ze&&Tn?Ht._component?Ht._component.__key:Tn.key:null;ae!=null?(ct++,St[ae]=Ht):(Tn||(Ht.splitText!==void 0?!st||Ht.nodeValue.trim():st))&&(Ft[$t++]=Ht)}if(ze!==0)for(var Ut=0;Ut<ze;Ut++){Bt=pt[Ut],xt=null;var ae=Bt.key;if(ae!=null)ct&&St[ae]!==void 0&&(xt=St[ae],St[ae]=void 0,ct--);else if(ue<$t){for(nt=ue;nt<$t;nt++)if(Ft[nt]!==void 0&&(qe=wt=Ft[nt],Oe=st,typeof(ve=Bt)=="string"||typeof ve=="number"?qe.splitText!==void 0:typeof ve.nodeName=="string"?!qe._componentConstructor&&_(qe,ve.nodeName):Oe||qe._componentConstructor===ve.nodeName)){xt=wt,Ft[nt]=void 0,nt===$t-1&&$t--,nt===ue&&ue++;break}}xt=G(xt,Bt,kt,yt),zt=dt[Ut],xt&&xt!==ut&&xt!==zt&&(zt==null?ut.appendChild(xt):xt===zt.nextSibling?y(zt):ut.insertBefore(xt,zt))}var qe,ve,Oe;if(ct)for(var Ut in St)St[Ut]!==void 0&&P(St[Ut],!1);for(;ue<=$t;)(xt=Ft[$t--])!==void 0&&P(xt,!1)}($,Lt,Y,C,S||Mt.dangerouslySetInnerHTML!=null),function(ut,pt,kt){var yt;for(yt in kt)pt&&pt[yt]!=null||kt[yt]==null||x(ut,yt,kt[yt],kt[yt]=void 0,E);for(yt in pt)yt==="children"||yt==="innerHTML"||yt in kt&&pt[yt]===(yt==="value"||yt==="checked"?ut[yt]:kt[yt])||x(ut,yt,kt[yt],kt[yt]=pt[yt],E)}($,T.attributes,Mt),E=vt,$}function P(b,T){var Y=b._component;Y?Z(Y):(b.__preactattr_!=null&&b.__preactattr_.ref&&b.__preactattr_.ref(null),T!==!1&&b.__preactattr_!=null||y(b),at(b))}function at(b){for(b=b.lastChild;b;){var T=b.previousSibling;P(b,!0),b=T}}var j=[];function U(b,T,Y){var C,H=j.length;for(b.prototype&&b.prototype.render?(C=new b(T,Y),V.call(C,T,Y)):((C=new V(T,Y)).constructor=b,C.render=O);H--;)if(j[H].constructor===b)return C.nextBase=j[H].nextBase,j.splice(H,1),C;return C}function O(b,T,Y){return this.constructor(b,Y)}function W(b,T,Y,C,H){b._disable||(b._disable=!0,b.__ref=T.ref,b.__key=T.key,delete T.ref,delete T.key,typeof b.constructor.getDerivedStateFromProps>"u"&&(!b.base||H?b.componentWillMount&&b.componentWillMount():b.componentWillReceiveProps&&b.componentWillReceiveProps(T,C)),C&&C!==b.context&&(b.prevContext||(b.prevContext=b.context),b.context=C),b.prevProps||(b.prevProps=b.props),b.props=T,b._disable=!1,Y!==0&&(Y!==1&&s.syncComponentUpdates===!1&&b.base?m(b):D(b,1,H)),b.__ref&&b.__ref(b))}function D(b,T,Y,C){if(!b._disable){var H,$,vt,Ct=b.props,_t=b.state,Mt=b.context,Lt=b.prevProps||Ct,Dt=b.prevState||_t,jt=b.prevContext||Mt,F=b.base,ut=b.nextBase,pt=F||ut,kt=b._component,yt=!1,st=jt;if(b.constructor.getDerivedStateFromProps&&(_t=u(u({},_t),b.constructor.getDerivedStateFromProps(Ct,_t)),b.state=_t),F&&(b.props=Lt,b.state=Dt,b.context=jt,T!==2&&b.shouldComponentUpdate&&b.shouldComponentUpdate(Ct,_t,Mt)===!1?yt=!0:b.componentWillUpdate&&b.componentWillUpdate(Ct,_t,Mt),b.props=Ct,b.state=_t,b.context=Mt),b.prevProps=b.prevState=b.prevContext=b.nextBase=null,b._dirty=!1,!yt){H=b.render(Ct,_t,Mt),b.getChildContext&&(Mt=u(u({},Mt),b.getChildContext())),F&&b.getSnapshotBeforeUpdate&&(st=b.getSnapshotBeforeUpdate(Lt,Dt));var nt,wt,zt=H&&H.nodeName;if(typeof zt=="function"){var Bt=v(H);($=kt)&&$.constructor===zt&&Bt.key==$.__key?W($,Bt,1,Mt,!1):(nt=$,b._component=$=U(zt,Bt,Mt),$.nextBase=$.nextBase||ut,$._parentComponent=b,W($,Bt,0,Mt,!1),D($,1,Y,!0)),wt=$.base}else vt=pt,(nt=kt)&&(vt=b._component=null),(pt||T===1)&&(vt&&(vt._component=null),wt=function(ct,ue,Ve,$t,ze,Ut){M++||(E=ze!=null&&ze.ownerSVGElement!==void 0,S=ct!=null&&!("__preactattr_"in ct));var Ht=G(ct,ue,Ve,$t,Ut);return ze&&Ht.parentNode!==ze&&ze.appendChild(Ht),--M||(S=!1,Ut||I()),Ht}(vt,H,Mt,Y||!F,pt&&pt.parentNode,!0));if(pt&&wt!==pt&&$!==kt){var xt=pt.parentNode;xt&&wt!==xt&&(xt.replaceChild(wt,pt),nt||(pt._component=null,P(pt,!1)))}if(nt&&Z(nt),(b.base=wt)&&!C){for(var dt=b,Ft=b;Ft=Ft._parentComponent;)(dt=Ft).base=wt;wt._component=dt,wt._componentConstructor=dt.constructor}}for(!F||Y?w.unshift(b):yt||(b.componentDidUpdate&&b.componentDidUpdate(Lt,Dt,st),s.afterUpdate&&s.afterUpdate(b));b._renderCallbacks.length;)b._renderCallbacks.pop().call(b);M||C||I()}}function Z(b){s.beforeUnmount&&s.beforeUnmount(b);var T=b.base;b._disable=!0,b.componentWillUnmount&&b.componentWillUnmount(),b.base=null;var Y=b._component;Y?Z(Y):T&&(T.__preactattr_&&T.__preactattr_.ref&&T.__preactattr_.ref(null),y(b.nextBase=T),j.push(b),at(T)),b.__ref&&b.__ref(null)}function V(b,T){this._dirty=!0,this.context=T,this.props=b,this.state=this.state||{},this._renderCallbacks=[]}function z(b,T,Y){return A(Y,b,{},!1,T,!1)}u(V.prototype,{setState:function(b,T){this.prevState||(this.prevState=this.state),this.state=u(u({},this.state),typeof b=="function"?b(this.state,this.props):b),T&&this._renderCallbacks.push(T),m(this)},forceUpdate:function(b){b&&this._renderCallbacks.push(b),D(this,2)},render:function(){}});var ot={h,createElement:h,cloneElement:c,Component:V,render:z,rerender:p,options:s};n.default=ot},function(e,n){var r=e.exports={version:"2.5.7"};typeof __e=="number"&&(__e=r)},function(e,n,r){var o=r(8),s=r(40);e.exports=r(3)?function(a,l,h){return o.f(a,l,s(1,h))}:function(a,l,h){return a[l]=h,a}},function(e,n,r){var o=r(9),s=r(38),a=r(39),l=Object.defineProperty;n.f=r(3)?Object.defineProperty:function(h,u,d){if(o(h),u=a(u,!0),o(d),s)try{return l(h,u,d)}catch{}if("get"in d||"set"in d)throw TypeError("Accessors not supported!");return"value"in d&&(h[u]=d.value),h}},function(e,n,r){var o=r(2);e.exports=function(s){if(!o(s))throw TypeError(s+" is not an object!");return s}},function(e,n){var r=0,o=Math.random();e.exports=function(s){return"Symbol(".concat(s===void 0?"":s,")_",(++r+o).toString(36))}},function(e,n,r){var o=r(22);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(s){return o(s)=="String"?s.split(""):Object(s)}},function(e,n){e.exports=function(r){if(r==null)throw TypeError("Can't call method on "+r);return r}},function(e,n,r){var o=r(4);e.exports=function(s,a){return!!s&&o(function(){a?s.call(null,function(){},1):s.call(null)})}},function(e,n,r){var o=r(0);o(o.S+o.F,"Object",{assign:r(41)})},function(e,n,r){var o=r(2),s=r(1).document,a=o(s)&&o(s.createElement);e.exports=function(l){return a?s.createElement(l):{}}},function(e,n,r){var o=r(1),s=r(7),a=r(17),l=r(10)("src"),h="toString",u=Function[h],d=(""+u).split(h);r(6).inspectSource=function(c){return u.call(c)},(e.exports=function(c,f,g,m){var p=typeof g=="function";p&&(a(g,"name")||s(g,"name",f)),c[f]!==g&&(p&&(a(g,l)||s(g,l,c[f]?""+c[f]:d.join(String(f)))),c===o?c[f]=g:m?c[f]?c[f]=g:s(c,f,g):(delete c[f],s(c,f,g)))})(Function.prototype,h,function(){return typeof this=="function"&&this[l]||u.call(this)})},function(e,n){var r={}.hasOwnProperty;e.exports=function(o,s){return r.call(o,s)}},function(e,n,r){var o=r(19);e.exports=function(s,a,l){if(o(s),a===void 0)return s;switch(l){case 1:return function(h){return s.call(a,h)};case 2:return function(h,u){return s.call(a,h,u)};case 3:return function(h,u,d){return s.call(a,h,u,d)}}return function(){return s.apply(a,arguments)}}},function(e,n){e.exports=function(r){if(typeof r!="function")throw TypeError(r+" is not a function!");return r}},function(e,n,r){var o=r(42),s=r(28);e.exports=Object.keys||function(a){return o(a,s)}},function(e,n,r){var o=r(11),s=r(12);e.exports=function(a){return o(s(a))}},function(e,n){var r={}.toString;e.exports=function(o){return r.call(o).slice(8,-1)}},function(e,n,r){var o=r(21),s=r(24),a=r(43);e.exports=function(l){return function(h,u,d){var c,f=o(h),g=s(f.length),m=a(d,g);if(l&&u!=u){for(;m<g;)if((c=f[m++])!=c)return!0}else for(;m<g;m++)if((l||m in f)&&f[m]===u)return l||m||0;return!l&&-1}}},function(e,n,r){var o=r(25),s=Math.min;e.exports=function(a){return 0<a?s(o(a),9007199254740991):0}},function(e,n){var r=Math.ceil,o=Math.floor;e.exports=function(s){return isNaN(s=+s)?0:(0<s?o:r)(s)}},function(e,n,r){var o=r(27)("keys"),s=r(10);e.exports=function(a){return o[a]||(o[a]=s(a))}},function(e,n,r){var o=r(6),s=r(1),a="__core-js_shared__",l=s[a]||(s[a]={});(e.exports=function(h,u){return l[h]||(l[h]=u!==void 0?u:{})})("versions",[]).push({version:o.version,mode:r(44)?"pure":"global",copyright:"\xA9 2018 Denis Pushkarev (zloirock.ru)"})},function(e,n){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,n,r){var o=r(12);e.exports=function(s){return Object(o(s))}},function(e,n,r){var o=r(8).f,s=Function.prototype,a=/^\s*function ([^ (]*)/;"name"in s||r(3)&&o(s,"name",{configurable:!0,get:function(){try{return(""+this).match(a)[1]}catch{return""}}})},function(e,n,r){var o=r(0),s=r(32)(1);o(o.P+o.F*!r(13)([].map,!0),"Array",{map:function(a){return s(this,a,arguments[1])}})},function(e,n,r){var o=r(18),s=r(11),a=r(29),l=r(24),h=r(47);e.exports=function(u,d){var c=u==1,f=u==2,g=u==3,m=u==4,p=u==6,_=u==5||p,v=d||h;return function(y,x,k){for(var w,M,E=a(y),S=s(E),I=o(x,k,3),A=l(S.length),G=0,P=c?v(y,A):f?v(y,0):void 0;G<A;G++)if((_||G in S)&&(M=I(w=S[G],G,E),u)){if(c)P[G]=M;else if(M)switch(u){case 3:return!0;case 5:return w;case 6:return G;case 2:P.push(w)}else if(m)return!1}return p?-1:g||m?m:P}}},function(e,n,r){var o=r(22);e.exports=Array.isArray||function(s){return o(s)=="Array"}},function(e,n,r){var o=r(27)("wks"),s=r(10),a=r(1).Symbol,l=typeof a=="function";(e.exports=function(h){return o[h]||(o[h]=l&&a[h]||(l?a:s)("Symbol."+h))}).store=o},function(e,n,r){var o=r(0),s=r(23)(!1),a=[].indexOf,l=!!a&&1/[1].indexOf(1,-0)<0;o(o.P+o.F*(l||!r(13)(a)),"Array",{indexOf:function(h){return l?a.apply(this,arguments)||0:s(this,h,arguments[1])}})},function(e,n,r){var o=r(0);o(o.S,"Object",{create:r(52)})},function(e,n,r){n.__esModule=!0,n.default=void 0,r(14),r(30),r(31),r(35),r(49),r(50);var o=r(5),s=function(d){return d&&d.__esModule?d:{default:d}}(r(51));function a(u){if(!u.element)throw new Error("element is not defined");if(!u.id)throw new Error("id is not defined");if(!u.source)throw new Error("source is not defined");Array.isArray(u.source)&&(u.source=l(u.source)),(0,o.render)((0,o.createElement)(s.default,u),u.element)}var l=function(d){return function(c,f){f(d.filter(function(g){return g.toLowerCase().indexOf(c.toLowerCase())!==-1}))}};a.enhanceSelectElement=function(u){if(!u.selectElement)throw new Error("selectElement is not defined");if(!u.source){var d=[].filter.call(u.selectElement.options,function(g){return g.value||u.preserveNullOptions});u.source=d.map(function(g){return g.textContent||g.innerText})}if(u.onConfirm=u.onConfirm||function(g){var m=[].filter.call(u.selectElement.options,function(p){return(p.textContent||p.innerText)===g})[0];m&&(m.selected=!0)},u.selectElement.value||u.defaultValue===void 0){var c=u.selectElement.options[u.selectElement.options.selectedIndex];u.defaultValue=c.textContent||c.innerText}u.name===void 0&&(u.name=""),u.id===void 0&&(u.selectElement.id===void 0?u.id="":u.id=u.selectElement.id),u.autoselect===void 0&&(u.autoselect=!0);var f=document.createElement("div");u.selectElement.parentNode.insertBefore(f,u.selectElement),a(Object.assign({},u,{element:f})),u.selectElement.style.display="none",u.selectElement.id=u.selectElement.id+"-select"};var h=a;n.default=h},function(e,n,r){e.exports=!r(3)&&!r(4)(function(){return Object.defineProperty(r(15)("div"),"a",{get:function(){return 7}}).a!=7})},function(e,n,r){var o=r(2);e.exports=function(s,a){if(!o(s))return s;var l,h;if(a&&typeof(l=s.toString)=="function"&&!o(h=l.call(s))||typeof(l=s.valueOf)=="function"&&!o(h=l.call(s))||!a&&typeof(l=s.toString)=="function"&&!o(h=l.call(s)))return h;throw TypeError("Can't convert object to primitive value")}},function(e,n){e.exports=function(r,o){return{enumerable:!(1&r),configurable:!(2&r),writable:!(4&r),value:o}}},function(e,n,r){var o=r(20),s=r(45),a=r(46),l=r(29),h=r(11),u=Object.assign;e.exports=!u||r(4)(function(){var d={},c={},f=Symbol(),g="abcdefghijklmnopqrst";return d[f]=7,g.split("").forEach(function(m){c[m]=m}),u({},d)[f]!=7||Object.keys(u({},c)).join("")!=g})?function(d,c){for(var f=l(d),g=arguments.length,m=1,p=s.f,_=a.f;m<g;)for(var v,y=h(arguments[m++]),x=p?o(y).concat(p(y)):o(y),k=x.length,w=0;w<k;)_.call(y,v=x[w++])&&(f[v]=y[v]);return f}:u},function(e,n,r){var o=r(17),s=r(21),a=r(23)(!1),l=r(26)("IE_PROTO");e.exports=function(h,u){var d,c=s(h),f=0,g=[];for(d in c)d!=l&&o(c,d)&&g.push(d);for(;u.length>f;)o(c,d=u[f++])&&(~a(g,d)||g.push(d));return g}},function(e,n,r){var o=r(25),s=Math.max,a=Math.min;e.exports=function(l,h){return(l=o(l))<0?s(l+h,0):a(l,h)}},function(e,n){e.exports=!1},function(e,n){n.f=Object.getOwnPropertySymbols},function(e,n){n.f={}.propertyIsEnumerable},function(e,n,r){var o=r(48);e.exports=function(s,a){return new(o(s))(a)}},function(e,n,r){var o=r(2),s=r(33),a=r(34)("species");e.exports=function(l){var h;return s(l)&&(typeof(h=l.constructor)!="function"||h!==Array&&!s(h.prototype)||(h=void 0),o(h)&&(h=h[a])===null&&(h=void 0)),h===void 0?Array:h}},function(e,n,r){var o=r(0),s=r(32)(2);o(o.P+o.F*!r(13)([].filter,!0),"Array",{filter:function(a){return s(this,a,arguments[1])}})},function(e,n,r){var o=r(0);o(o.S,"Array",{isArray:r(33)})},function(e,n,r){n.__esModule=!0,n.default=void 0,r(14),r(36),r(30),r(31),r(35),r(55),r(58);var o=r(5),s=l(r(60)),a=l(r(61));function l(g){return g&&g.__esModule?g:{default:g}}function h(){return(h=Object.assign||function(g){for(var m=1;m<arguments.length;m++){var p=arguments[m];for(var _ in p)Object.prototype.hasOwnProperty.call(p,_)&&(g[_]=p[_])}return g}).apply(this,arguments)}function u(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}var d={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function c(){return typeof navigator<"u"&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var f=function(g){function m(_){var v;return(v=g.call(this,_)||this).elementReferences={},v.state={focused:null,hovered:null,menuOpen:!1,options:_.defaultValue?[_.defaultValue]:[],query:_.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},v.handleComponentBlur=v.handleComponentBlur.bind(u(u(v))),v.handleKeyDown=v.handleKeyDown.bind(u(u(v))),v.handleUpArrow=v.handleUpArrow.bind(u(u(v))),v.handleDownArrow=v.handleDownArrow.bind(u(u(v))),v.handleEnter=v.handleEnter.bind(u(u(v))),v.handlePrintableKey=v.handlePrintableKey.bind(u(u(v))),v.handleListMouseLeave=v.handleListMouseLeave.bind(u(u(v))),v.handleOptionBlur=v.handleOptionBlur.bind(u(u(v))),v.handleOptionClick=v.handleOptionClick.bind(u(u(v))),v.handleOptionFocus=v.handleOptionFocus.bind(u(u(v))),v.handleOptionMouseDown=v.handleOptionMouseDown.bind(u(u(v))),v.handleOptionMouseEnter=v.handleOptionMouseEnter.bind(u(u(v))),v.handleInputBlur=v.handleInputBlur.bind(u(u(v))),v.handleInputChange=v.handleInputChange.bind(u(u(v))),v.handleInputFocus=v.handleInputFocus.bind(u(u(v))),v.pollInputElement=v.pollInputElement.bind(u(u(v))),v.getDirectInputChanges=v.getDirectInputChanges.bind(u(u(v))),v}(function(v,y){v.prototype=Object.create(y.prototype),(v.prototype.constructor=v).__proto__=y})(m,g);var p=m.prototype;return p.isQueryAnOption=function(_,v){var y=this;return v.map(function(x){return y.templateInputValue(x).toLowerCase()}).indexOf(_.toLowerCase())!==-1},p.componentDidMount=function(){this.pollInputElement()},p.componentWillUnmount=function(){clearTimeout(this.$pollInput)},p.pollInputElement=function(){var _=this;this.getDirectInputChanges(),this.$pollInput=setTimeout(function(){_.pollInputElement()},100)},p.getDirectInputChanges=function(){var _=this.elementReferences[-1];_&&_.value!==this.state.query&&this.handleInputChange({target:{value:_.value}})},p.componentDidUpdate=function(_,v){var y=this.state.focused,x=y===null,k=v.focused!==y;k&&!x&&this.elementReferences[y].focus();var w=y===-1,M=k&&v.focused===null;if(w&&M){var E=this.elementReferences[y];E.setSelectionRange(0,E.value.length)}},p.hasAutoselect=function(){return!c()&&this.props.autoselect},p.templateInputValue=function(_){var v=this.props.templates&&this.props.templates.inputValue;return v?v(_):_},p.templateSuggestion=function(_){var v=this.props.templates&&this.props.templates.suggestion;return v?v(_):_},p.handleComponentBlur=function(_){var v,y=this.state,x=y.options,k=y.query,w=y.selected;this.props.confirmOnBlur?(v=_.query||k,this.props.onConfirm(x[w])):v=k,this.setState({focused:null,menuOpen:_.menuOpen||!1,query:v,selected:null,validChoiceMade:this.isQueryAnOption(v,x)})},p.handleListMouseLeave=function(_){this.setState({hovered:null})},p.handleOptionBlur=function(_,v){var y=this.state,x=y.focused,k=y.menuOpen,w=y.options,M=y.selected,E=_.relatedTarget===null,S=_.relatedTarget===this.elementReferences[-1],I=x!==v&&x!==-1;if(!I&&E||!(I||S)){var A=k&&c();this.handleComponentBlur({menuOpen:A,query:this.templateInputValue(w[M])})}},p.handleInputBlur=function(_){var v=this.state,y=v.focused,x=v.menuOpen,k=v.options,w=v.query,M=v.selected;if(y===-1){var E=x&&c(),S=c()?w:this.templateInputValue(k[M]);this.handleComponentBlur({menuOpen:E,query:S})}},p.handleInputChange=function(_){var v=this,y=this.props,x=y.minLength,k=y.source,w=y.showAllValues,M=this.hasAutoselect(),E=_.target.value,S=E.length===0,I=this.state.query.length!==E.length,A=E.length>=x;this.setState({query:E,ariaHint:S}),w||!S&&I&&A?k(E,function(G){var P=0<G.length;v.setState({menuOpen:P,options:G,selected:M&&P?0:-1,validChoiceMade:!1})}):!S&&A||this.setState({menuOpen:!1,options:[]})},p.handleInputClick=function(_){this.handleInputChange(_)},p.handleInputFocus=function(_){var v=this.state,y=v.query,x=v.validChoiceMade,k=v.options,w=this.props.minLength,M=!x&&y.length>=w&&0<k.length;M?this.setState(function(E){var S=E.menuOpen;return{focused:-1,menuOpen:M||S,selected:-1}}):this.setState({focused:-1})},p.handleOptionFocus=function(_){this.setState({focused:_,hovered:null,selected:_})},p.handleOptionMouseEnter=function(_,v){c()||this.setState({hovered:v})},p.handleOptionClick=function(_,v){var y=this.state.options[v],x=this.templateInputValue(y);this.props.onConfirm(y),this.setState({focused:-1,hovered:null,menuOpen:!1,query:x,selected:-1,validChoiceMade:!0}),this.forceUpdate()},p.handleOptionMouseDown=function(_){_.preventDefault()},p.handleUpArrow=function(_){_.preventDefault();var v=this.state,y=v.menuOpen,x=v.selected;x!==-1&&y&&this.handleOptionFocus(x-1)},p.handleDownArrow=function(_){var v=this;if(_.preventDefault(),this.props.showAllValues&&this.state.menuOpen===!1)_.preventDefault(),this.props.source("",function(M){v.setState({menuOpen:!0,options:M,selected:0,focused:0,hovered:null})});else if(this.state.menuOpen===!0){var y=this.state,x=y.menuOpen,k=y.options,w=y.selected;w!==k.length-1&&x&&this.handleOptionFocus(w+1)}},p.handleSpace=function(_){var v=this;this.props.showAllValues&&this.state.menuOpen===!1&&this.state.query===""&&(_.preventDefault(),this.props.source("",function(y){v.setState({menuOpen:!0,options:y})})),this.state.focused!==-1&&(_.preventDefault(),this.handleOptionClick(_,this.state.focused))},p.handleEnter=function(_){this.state.menuOpen&&(_.preventDefault(),0<=this.state.selected&&this.handleOptionClick(_,this.state.selected))},p.handlePrintableKey=function(_){var v=this.elementReferences[-1];_.target===v||v.focus()},p.handleKeyDown=function(_){switch(d[_.keyCode]){case"up":this.handleUpArrow(_);break;case"down":this.handleDownArrow(_);break;case"space":this.handleSpace(_);break;case"enter":this.handleEnter(_);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:(function(y){return 47<y&&y<58||y===32||y===8||64<y&&y<91||95<y&&y<112||185<y&&y<193||218<y&&y<223})(_.keyCode)&&this.handlePrintableKey(_)}},p.render=function(){var _,v=this,y=this.props,x=y.cssNamespace,k=y.displayMenu,w=y.id,M=y.minLength,E=y.name,S=y.placeholder,I=y.required,A=y.showAllValues,G=y.tNoResults,P=y.tStatusQueryTooShort,at=y.tStatusNoResults,j=y.tStatusSelectedOption,U=y.tStatusResults,O=y.tAssistiveHint,W=y.dropdownArrow,D=this.state,Z=D.focused,V=D.hovered,z=D.menuOpen,ot=D.options,b=D.query,T=D.selected,Y=D.ariaHint,C=D.validChoiceMade,H=this.hasAutoselect(),$=Z===-1,vt=ot.length===0,Ct=b.length!==0,_t=b.length>=M,Mt=this.props.showNoOptionsFound&&$&&vt&&Ct&&_t,Lt=x+"__wrapper",Dt=x+"__input",jt=Z!==null?" "+Dt+"--focused":"",F=this.props.showAllValues?" "+Dt+"--show-all-values":" "+Dt+"--default",ut=x+"__dropdown-arrow-down",pt=Z!==-1&&Z!==null,kt=x+"__menu",yt=kt+"--"+k,st=kt+"--"+(z||Mt?"visible":"hidden"),nt=x+"__option",wt=x+"__hint",zt=this.templateInputValue(ot[T]),Bt=zt&&zt.toLowerCase().indexOf(b.toLowerCase())===0&&H?b+zt.substr(b.length):"",xt=w+"__assistiveHint",dt=Y?{"aria-describedby":xt}:null;return A&&typeof(_=W({className:ut}))=="string"&&(_=(0,o.createElement)("div",{className:x+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:_}})),(0,o.createElement)("div",{className:Lt,onKeyDown:this.handleKeyDown},(0,o.createElement)(s.default,{id:w,length:ot.length,queryLength:b.length,minQueryLength:M,selectedOption:this.templateInputValue(ot[T]),selectedOptionIndex:T,validChoiceMade:C,isInFocus:this.state.focused!==null,tQueryTooShort:P,tNoResults:at,tSelectedOption:j,tResults:U}),Bt&&(0,o.createElement)("span",null,(0,o.createElement)("input",{className:wt,readonly:!0,tabIndex:"-1",value:Bt})),(0,o.createElement)("input",h({"aria-expanded":z?"true":"false","aria-activedescendant":!!pt&&w+"__option--"+Z,"aria-owns":w+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"},dt,{autoComplete:"off",className:""+Dt+jt+F,id:w,onClick:function(Ft){return v.handleInputClick(Ft)},onBlur:this.handleInputBlur},function(St){return{onInput:St}}(this.handleInputChange),{onFocus:this.handleInputFocus,name:E,placeholder:S,ref:function(Ft){v.elementReferences[-1]=Ft},type:"text",role:"combobox",required:I,value:b})),_,(0,o.createElement)("ul",{className:kt+" "+yt+" "+st,onMouseLeave:function(Ft){return v.handleListMouseLeave(Ft)},id:w+"__listbox",role:"listbox"},ot.map(function(Ft,St){var ct=(Z===-1?T===St:Z===St)&&V===null?" "+nt+"--focused":"",ue=St%2?" "+nt+"--odd":"",Ve=c()?"<span id="+w+"__option-suffix--"+St+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(St+1)+" of "+ot.length+"</span>":"";return(0,o.createElement)("li",{"aria-selected":Z===St?"true":"false",className:""+nt+ct+ue,dangerouslySetInnerHTML:{__html:v.templateSuggestion(Ft)+Ve},id:w+"__option--"+St,key:St,onBlur:function($t){return v.handleOptionBlur($t,St)},onClick:function($t){return v.handleOptionClick($t,St)},onMouseDown:v.handleOptionMouseDown,onMouseEnter:function($t){return v.handleOptionMouseEnter($t,St)},ref:function($t){v.elementReferences[St]=$t},role:"option",tabIndex:"-1","aria-posinset":St+1,"aria-setsize":ot.length})}),Mt&&(0,o.createElement)("li",{className:nt+" "+nt+"--no-results"},G())),(0,o.createElement)("span",{id:xt,style:{display:"none"}},O()))},m}(o.Component);(n.default=f).defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:a.default}},function(e,n,r){var o=r(9),s=r(53),a=r(28),l=r(26)("IE_PROTO"),h=function(){},u="prototype",d=function(){var c,f=r(15)("iframe"),g=a.length;for(f.style.display="none",r(54).appendChild(f),f.src="javascript:",(c=f.contentWindow.document).open(),c.write("<script>document.F=Object<\/script>"),c.close(),d=c.F;g--;)delete d[u][a[g]];return d()};e.exports=Object.create||function(c,f){var g;return c!==null?(h[u]=o(c),g=new h,h[u]=null,g[l]=c):g=d(),f===void 0?g:s(g,f)}},function(e,n,r){var o=r(8),s=r(9),a=r(20);e.exports=r(3)?Object.defineProperties:function(l,h){s(l);for(var u,d=a(h),c=d.length,f=0;f<c;)o.f(l,u=d[f++],h[u]);return l}},function(e,n,r){var o=r(1).document;e.exports=o&&o.documentElement},function(e,n,r){var o=r(0);o(o.P,"Function",{bind:r(56)})},function(e,n,r){var o=r(19),s=r(2),a=r(57),l=[].slice,h={};e.exports=Function.bind||function(u){var d=o(this),c=l.call(arguments,1),f=function(){var g=c.concat(l.call(arguments));return this instanceof f?function(m,p,_){if(!(p in h)){for(var v=[],y=0;y<p;y++)v[y]="a["+y+"]";h[p]=Function("F,a","return new F("+v.join(",")+")")}return h[p](m,_)}(d,g.length,g):a(d,g,u)};return s(d.prototype)&&(f.prototype=d.prototype),f}},function(e,n){e.exports=function(r,o,s){var a=s===void 0;switch(o.length){case 0:return a?r():r.call(s);case 1:return a?r(o[0]):r.call(s,o[0]);case 2:return a?r(o[0],o[1]):r.call(s,o[0],o[1]);case 3:return a?r(o[0],o[1],o[2]):r.call(s,o[0],o[1],o[2]);case 4:return a?r(o[0],o[1],o[2],o[3]):r.call(s,o[0],o[1],o[2],o[3])}return r.apply(s,o)}},function(e,n,r){r(59)("match",1,function(o,s,a){return[function(l){var h=o(this),u=l==null?void 0:l[s];return u!==void 0?u.call(l,h):new RegExp(l)[s](String(h))},a]})},function(e,n,r){var o=r(7),s=r(16),a=r(4),l=r(12),h=r(34);e.exports=function(u,d,c){var f=h(u),g=c(l,f,""[u]),m=g[0],p=g[1];a(function(){var _={};return _[f]=function(){return 7},""[u](_)!=7})&&(s(String.prototype,u,m),o(RegExp.prototype,f,d==2?function(_,v){return p.call(_,this,v)}:function(_){return p.call(_,this)}))}},function(e,n,r){n.__esModule=!0,n.default=void 0,r(36);var o=r(5),s=function(h,u,d){var c;return function(){var f=this,g=arguments,m=function(){c=null,d||h.apply(f,g)},p=d&&!c;clearTimeout(c),c=setTimeout(m,u),p&&h.apply(f,g)}},a=function(l){function h(){for(var d,c=arguments.length,f=new Array(c),g=0;g<c;g++)f[g]=arguments[g];return(d=l.call.apply(l,[this].concat(f))||this).state={bump:!1,debounced:!1},d}(function(c,f){c.prototype=Object.create(f.prototype),(c.prototype.constructor=c).__proto__=f})(h,l);var u=h.prototype;return u.componentWillMount=function(){var d=this;this.debounceStatusUpdate=s(function(){if(!d.state.debounced){var c=!d.props.isInFocus||d.props.validChoiceMade;d.setState(function(f){return{bump:!f.bump,debounced:!0,silenced:c}})}},1400)},u.componentWillReceiveProps=function(d){d.queryLength,this.setState({debounced:!1})},u.render=function(){var d=this.props,c=d.id,f=d.length,g=d.queryLength,m=d.minQueryLength,p=d.selectedOption,_=d.selectedOptionIndex,v=d.tQueryTooShort,y=d.tNoResults,x=d.tSelectedOption,k=d.tResults,w=this.state,M=w.bump,E=w.debounced,S=w.silenced,I=g<m,A=f===0,G=p?x(p,f,_):"",P=null;return P=I?v(m):A?y():k(f,G),this.debounceStatusUpdate(),(0,o.createElement)("div",{style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,o.createElement)("div",{id:c+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!S&&E&&M?P:""),(0,o.createElement)("div",{id:c+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},S||!E||M?"":P))},h}(o.Component);(n.default=a).defaultProps={tQueryTooShort:function(l){return"Type in "+l+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(l,h,u){return l+" "+(u+1)+" of "+h+" is highlighted"},tResults:function(l,h){return l+" "+(l===1?"result":"results")+" "+(l===1?"is":"are")+" available. "+h}}},function(e,n,r){n.__esModule=!0,n.default=void 0;var o=r(5),s=function(l){var h=l.className;return(0,o.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:h,focusable:"false"},(0,o.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,o.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};n.default=s}]).default})})(lp);const KM=c1(lp.exports),ZM=`@charset "UTF-8";.govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */@font-face{font-family:GDS Transport;font-style:normal;font-weight:400;src:url(/assets/fonts/light-94a07e06a1-v2.woff2) format("woff2"),url(/assets/fonts/light-f591b13f7d-v2.woff) format("woff");font-display:fallback}@font-face{font-family:GDS Transport;font-style:normal;font-weight:700;src:url(/assets/fonts/bold-b542beb274-v2.woff2) format("woff2"),url(/assets/fonts/bold-affa96571d-v2.woff) format("woff");font-display:fallback}@media print{.govuk-link{font-family:sans-serif}}.govuk-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-link:link{color:#1d70b8}.govuk-link:visited{color:#4c2c92}.govuk-link:hover{color:#003078}.govuk-link:active{color:#0b0c0c}.govuk-link:focus{color:#0b0c0c}@media print{[href^="/"].govuk-link:after,[href^="http://"].govuk-link:after,[href^="https://"].govuk-link:after{content:" (" attr(href) ")";font-size:90%;word-wrap:break-word}}.govuk-link--muted:link,.govuk-link--muted:visited{color:#505a5f}.govuk-link--muted:hover,.govuk-link--muted:active{color:#0b0c0c}.govuk-link--muted:focus{color:#0b0c0c}.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#0b0c0c}@media print{.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#000}}.govuk-link--text-colour:hover{color:#0b0c0cfc}.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#0b0c0c}@media print{.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#000}}.govuk-link--inverse:link,.govuk-link--inverse:visited{color:#fff}.govuk-link--inverse:hover,.govuk-link--inverse:active{color:#fffffffc}.govuk-link--inverse:focus{color:#0b0c0c}.govuk-link--no-underline:not(:hover):not(:active){text-decoration:none}.govuk-link--no-visited-state:link,.govuk-link--no-visited-state:visited{color:#1d70b8}.govuk-link--no-visited-state:hover{color:#003078}.govuk-link--no-visited-state:active{color:#0b0c0c}.govuk-link--no-visited-state:focus{color:#0b0c0c}.govuk-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-top:0;margin-bottom:15px;padding-left:0;list-style-type:none}@media print{.govuk-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-list{font-size:14pt;line-height:1.15}}@media print{.govuk-list{color:#000}}@media (min-width: 40.0625em){.govuk-list{margin-bottom:20px}}.govuk-list .govuk-list{margin-top:10px}.govuk-list>li{margin-bottom:5px}.govuk-list--bullet{padding-left:20px;list-style-type:disc}.govuk-list--number{padding-left:20px;list-style-type:decimal}.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:0}@media (min-width: 40.0625em){.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:5px}}.govuk-list--spaced>li{margin-bottom:10px}@media (min-width: 40.0625em){.govuk-list--spaced>li{margin-bottom:15px}}.govuk-heading-xl{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;display:block;margin-top:0;margin-bottom:30px}@media print{.govuk-heading-xl{color:#000}}@media print{.govuk-heading-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-heading-xl{font-size:32pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-xl{margin-bottom:50px}}.govuk-heading-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;display:block;margin-top:0;margin-bottom:20px}@media print{.govuk-heading-l{color:#000}}@media print{.govuk-heading-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-heading-l{font-size:24pt;line-height:1.05}}@media (min-width: 40.0625em){.govuk-heading-l{margin-bottom:30px}}.govuk-heading-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-m{color:#000}}@media print{.govuk-heading-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-heading-m{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-m{margin-bottom:20px}}.govuk-heading-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-s{color:#000}}@media print{.govuk-heading-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-heading-s{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-s{margin-bottom:20px}}.govuk-caption-xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-xl{font-size:27px;font-size:1.6875rem;line-height:1.1111111111}}@media print{.govuk-caption-xl{font-size:18pt;line-height:1.15}}.govuk-caption-l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-caption-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-caption-l{margin-bottom:0}}.govuk-caption-m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;color:#505a5f}@media print{.govuk-caption-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-caption-m{font-size:14pt;line-height:1.15}}.govuk-body-lead,.govuk-body-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:20px}@media print{.govuk-body-lead,.govuk-body-l{color:#000}}@media print{.govuk-body-lead,.govuk-body-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-body-lead,.govuk-body-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{margin-bottom:30px}}.govuk-body,.govuk-body-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body,.govuk-body-m{color:#000}}@media print{.govuk-body,.govuk-body-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-body,.govuk-body-m{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{margin-bottom:20px}}.govuk-body-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;margin-top:0;margin-bottom:15px}@media print{.govuk-body-s{color:#000}}@media print{.govuk-body-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-s{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-body-s{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-s{margin-bottom:20px}}.govuk-body-xs{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:12px;font-size:.75rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body-xs{color:#000}}@media print{.govuk-body-xs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-xs{font-size:14px;font-size:.875rem;line-height:1.4285714286}}@media print{.govuk-body-xs{font-size:12pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-xs{margin-bottom:20px}}.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:10px}}.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:15px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:20px}}.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:10px}}.govuk-section-break{margin:0;border:0}.govuk-section-break--xl{margin-top:30px;margin-bottom:30px}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-top:50px}}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-bottom:50px}}.govuk-section-break--l{margin-top:20px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-section-break--l{margin-top:30px}}@media (min-width: 40.0625em){.govuk-section-break--l{margin-bottom:30px}}.govuk-section-break--m{margin-top:15px;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-section-break--m{margin-top:20px}}@media (min-width: 40.0625em){.govuk-section-break--m{margin-bottom:20px}}.govuk-section-break--visible{border-bottom:1px solid #b1b4b6}.govuk-button-group{margin-bottom:5px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}@media (min-width: 40.0625em){.govuk-button-group{margin-bottom:15px}}.govuk-button-group .govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;display:inline-block;max-width:100%;margin-top:5px;margin-bottom:20px;text-align:center}@media print{.govuk-button-group .govuk-link{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button-group .govuk-link{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button-group .govuk-link{font-size:14pt;line-height:19px}}.govuk-button-group .govuk-button{margin-bottom:17px}@media (min-width: 40.0625em){.govuk-button-group{margin-right:-15px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline}.govuk-button-group .govuk-button,.govuk-button-group .govuk-link{margin-right:15px}.govuk-button-group .govuk-link{text-align:left}}.govuk-form-group{margin-bottom:20px}.govuk-form-group:after{content:"";display:block;clear:both}@media (min-width: 40.0625em){.govuk-form-group{margin-bottom:30px}}.govuk-form-group .govuk-form-group:last-of-type{margin-bottom:0}.govuk-form-group--error{padding-left:15px;border-left:5px solid #d4351c}.govuk-form-group--error .govuk-form-group{padding:0;border:0}.govuk-grid-row{margin-right:-15px;margin-left:-15px}.govuk-grid-row:after{content:"";display:block;clear:both}.govuk-grid-column-one-quarter{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-quarter{width:25%;float:left}}.govuk-grid-column-one-third{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-third{width:33.3333%;float:left}}.govuk-grid-column-one-half{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-half{width:50%;float:left}}.govuk-grid-column-two-thirds{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-two-thirds{width:66.6666%;float:left}}.govuk-grid-column-three-quarters{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-three-quarters{width:75%;float:left}}.govuk-grid-column-full{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-full{width:100%;float:left}}.govuk-grid-column-one-quarter-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-quarter-from-desktop{width:25%;float:left}}.govuk-grid-column-one-third-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-third-from-desktop{width:33.3333%;float:left}}.govuk-grid-column-one-half-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-half-from-desktop{width:50%;float:left}}.govuk-grid-column-two-thirds-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-two-thirds-from-desktop{width:66.6666%;float:left}}.govuk-grid-column-three-quarters-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-three-quarters-from-desktop{width:75%;float:left}}.govuk-grid-column-full-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-full-from-desktop{width:100%;float:left}}.govuk-main-wrapper{display:block;padding-top:20px;padding-bottom:20px}@media (min-width: 40.0625em){.govuk-main-wrapper{padding-top:40px;padding-bottom:40px}}.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:30px}@media (min-width: 40.0625em){.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:50px}}.govuk-template{background-color:#f3f2f1;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}@media screen{.govuk-template{overflow-y:scroll}}.govuk-template__body{margin:0;background-color:#fff}.govuk-width-container{max-width:960px;margin-right:15px;margin-left:15px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(15px,calc(15px + env(safe-area-inset-right)));margin-left:max(15px,calc(15px + env(safe-area-inset-left)))}}@media (min-width: 40.0625em){.govuk-width-container{margin-right:30px;margin-left:30px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(30px,calc(15px + env(safe-area-inset-right)));margin-left:max(30px,calc(15px + env(safe-area-inset-left)))}}}@media (min-width: 1020px){.govuk-width-container{margin-right:auto;margin-left:auto}@supports (margin: max(0px)){.govuk-width-container{margin-right:auto;margin-left:auto}}}.govuk-accordion{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-accordion{margin-bottom:30px}}.govuk-accordion__section{padding-top:15px}.govuk-accordion__section-heading{margin-top:0;margin-bottom:0;padding-top:15px;padding-bottom:15px}.govuk-accordion__section-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;color:#0b0c0c;display:block;margin-bottom:0;padding-top:15px}@media print{.govuk-accordion__section-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-accordion__section-button{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-accordion__section-button{font-size:18pt;line-height:1.15}}@media print{.govuk-accordion__section-button{color:#000}}.govuk-accordion__section-content>:last-child{margin-bottom:0}.js-enabled .govuk-accordion{border-bottom:1px solid #b1b4b6}.js-enabled .govuk-accordion__section{padding-top:0}.js-enabled .govuk-accordion__section-content{display:none;padding-bottom:30px}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-content{padding-bottom:50px}}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-content{display:block}.js-enabled .govuk-accordion__show-all{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;position:relative;z-index:1;margin-bottom:9px;padding:5px 2px 5px 0;border-width:0;color:#1d70b8;background:none;cursor:pointer;-webkit-appearance:none}@media print{.js-enabled .govuk-accordion__show-all{font-family:sans-serif}}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__show-all{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__show-all{font-size:14pt;line-height:1.15}}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__show-all{margin-bottom:14px}}.js-enabled .govuk-accordion__show-all::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__show-all:hover{color:#0b0c0c;background:#f3f2f1;box-shadow:0 -2px #f3f2f1,0 4px #f3f2f1}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__show-all:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron{background:#0b0c0c}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-heading{padding:0}.js-enabled .govuk-accordion-nav__chevron{box-sizing:border-box;display:inline-block;position:relative;width:1.25rem;height:1.25rem;border:.0625rem solid;border-radius:50%;vertical-align:middle}.js-enabled .govuk-accordion-nav__chevron:after{content:"";box-sizing:border-box;display:block;position:absolute;bottom:.3125rem;left:.375rem;width:.375rem;height:.375rem;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border-top:.125rem solid;border-right:.125rem solid}.js-enabled .govuk-accordion-nav__chevron--down{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.js-enabled .govuk-accordion__section-button{width:100%;padding:10px 0 0;border:0;border-top:1px solid #b1b4b6;border-bottom:10px solid transparent;color:#0b0c0c;background:none;text-align:left;cursor:pointer;-webkit-appearance:none}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-button{padding-bottom:10px}}.js-enabled .govuk-accordion__section-button:active{color:#0b0c0c;background:none}.js-enabled .govuk-accordion__section-button:hover{color:#0b0c0c;background:#f3f2f1}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__section-button:focus{outline:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-button::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-button{padding-bottom:20px;border-bottom:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:3px}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:2px}}.js-enabled .govuk-accordion__section-toggle,.js-enabled .govuk-accordion__section-heading-text,.js-enabled .govuk-accordion__section-summary{display:block;margin-bottom:13px}.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-toggle-focus{display:inline}.js-enabled .govuk-accordion__section-toggle{font-size:16px;font-size:1rem;line-height:1.25;font-weight:400;color:#1d70b8}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-toggle{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__section-toggle{font-size:14pt;line-height:1.15}}.js-enabled .govuk-accordion__show-all-text,.js-enabled .govuk-accordion__section-toggle-text{margin-left:5px;vertical-align:middle}@media screen and (forced-colors: active){.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{background-color:transparent}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{background:transparent;background-color:transparent}}@media (hover: none){.js-enabled .govuk-accordion__section-header:hover{border-top-color:#b1b4b6;box-shadow:inset 0 3px #1d70b8}.js-enabled .govuk-accordion__section-header:hover .govuk-accordion__section-button{border-top-color:#b1b4b6}}.govuk-back-link{font-size:14px;font-size:.875rem;line-height:1.1428571429;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;position:relative;margin-top:15px;margin-bottom:15px;padding-left:14px}@media (min-width: 40.0625em){.govuk-back-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-back-link{font-size:14pt;line-height:1.2}}@media print{.govuk-back-link{font-family:sans-serif}}.govuk-back-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-back-link:link,.govuk-back-link:visited{color:#0b0c0c}@media print{.govuk-back-link:link,.govuk-back-link:visited{color:#000}}.govuk-back-link:hover{color:#0b0c0cfc}.govuk-back-link:active,.govuk-back-link:focus{color:#0b0c0c}@media print{.govuk-back-link:active,.govuk-back-link:focus{color:#000}}.govuk-back-link:before{content:"";display:block;position:absolute;top:0;bottom:0;left:3px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(225deg);-ms-transform:rotate(225deg);transform:rotate(225deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-back-link:focus:before{border-color:#0b0c0c}.govuk-back-link:after{content:"";position:absolute;top:-14px;right:0;bottom:-14px;left:0}.govuk-breadcrumbs{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;margin-top:15px;margin-bottom:10px}@media print{.govuk-breadcrumbs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-breadcrumbs{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-breadcrumbs{font-size:14pt;line-height:1.2}}@media print{.govuk-breadcrumbs{color:#000}}.govuk-breadcrumbs__list{margin:0;padding:0;list-style-type:none}.govuk-breadcrumbs__list:after{content:"";display:block;clear:both}.govuk-breadcrumbs__list-item{display:inline-block;position:relative;margin-bottom:5px;margin-left:10px;padding-left:15.655px;float:left}.govuk-breadcrumbs__list-item:before{content:"";display:block;position:absolute;top:0;bottom:0;left:-3.31px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-breadcrumbs__list-item:first-child{margin-left:0;padding-left:0}.govuk-breadcrumbs__list-item:first-child:before{content:none;display:none}.govuk-breadcrumbs__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-breadcrumbs__link{font-family:sans-serif}}.govuk-breadcrumbs__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#000}}.govuk-breadcrumbs__link:hover{color:#0b0c0cfc}.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#000}}@media (max-width: 40.0525em){.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item{display:none}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:first-child,.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:last-child{display:inline-block}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:before{top:6px;margin:0}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}}.govuk-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;box-sizing:border-box;display:inline-block;position:relative;width:100%;margin:0 0 22px;padding:8px 10px 7px;border:2px solid transparent;border-radius:0;color:#fff;background-color:#00703c;box-shadow:0 2px #002d18;text-align:center;vertical-align:top;cursor:pointer;-webkit-appearance:none}@media print{.govuk-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button{font-size:14pt;line-height:19px}}@media (min-width: 40.0625em){.govuk-button{margin-bottom:32px}}@media (min-width: 40.0625em){.govuk-button{width:auto}}.govuk-button:link,.govuk-button:visited,.govuk-button:active,.govuk-button:hover{color:#fff;text-decoration:none}.govuk-button::-moz-focus-inner{padding:0;border:0}.govuk-button:hover{background-color:#005a30}.govuk-button:active{top:2px}.govuk-button:focus{border-color:#fd0;outline:3px solid transparent;box-shadow:inset 0 0 0 1px #fd0}.govuk-button:focus:not(:active):not(:hover){border-color:#fd0;color:#0b0c0c;background-color:#fd0;box-shadow:0 2px #0b0c0c}.govuk-button:before{content:"";display:block;position:absolute;top:-2px;right:-2px;bottom:-4px;left:-2px;background:transparent}.govuk-button:active:before{top:-4px}.govuk-button--disabled,.govuk-button[disabled=disabled],.govuk-button[disabled]{opacity:.5}.govuk-button--disabled:hover,.govuk-button[disabled=disabled]:hover,.govuk-button[disabled]:hover{background-color:#00703c;cursor:default}.govuk-button--disabled:active,.govuk-button[disabled=disabled]:active,.govuk-button[disabled]:active{top:0;box-shadow:0 2px #002d18}.govuk-button--secondary{background-color:#f3f2f1;box-shadow:0 2px #929191}.govuk-button--secondary,.govuk-button--secondary:link,.govuk-button--secondary:visited,.govuk-button--secondary:active,.govuk-button--secondary:hover{color:#0b0c0c}.govuk-button--secondary:hover{background-color:#dbdad9}.govuk-button--secondary:hover[disabled]{background-color:#f3f2f1}.govuk-button--warning{background-color:#d4351c;box-shadow:0 2px #55150b}.govuk-button--warning,.govuk-button--warning:link,.govuk-button--warning:visited,.govuk-button--warning:active,.govuk-button--warning:hover{color:#fff}.govuk-button--warning:hover{background-color:#aa2a16}.govuk-button--warning:hover[disabled]{background-color:#d4351c}.govuk-button--start{font-weight:700;font-size:18px;font-size:1.125rem;line-height:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-height:auto;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}@media (min-width: 40.0625em){.govuk-button--start{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-button--start{font-size:18pt;line-height:1}}.govuk-button__start-icon{margin-left:5px;vertical-align:middle;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;forced-color-adjust:auto}@media (min-width: 48.0625em){.govuk-button__start-icon{margin-left:10px}}.govuk-error-message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px;clear:both;color:#d4351c}@media print{.govuk-error-message{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-message{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-message{font-size:14pt;line-height:1.15}}.govuk-fieldset{min-width:0;margin:0;padding:0;border:0}.govuk-fieldset:after{content:"";display:block;clear:both}@supports not (caret-color: auto){.govuk-fieldset,x:-moz-any-link{display:table-cell}}.govuk-fieldset__legend{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;box-sizing:border-box;display:table;max-width:100%;margin-bottom:10px;padding:0;white-space:normal}@media print{.govuk-fieldset__legend{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend{font-size:14pt;line-height:1.15}}@media print{.govuk-fieldset__legend{color:#000}}.govuk-fieldset__legend--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-fieldset__legend--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-fieldset__legend--xl{font-size:32pt;line-height:1.15}}.govuk-fieldset__legend--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-fieldset__legend--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-fieldset__legend--l{font-size:24pt;line-height:1.05}}.govuk-fieldset__legend--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-fieldset__legend--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-fieldset__legend--m{font-size:18pt;line-height:1.15}}.govuk-fieldset__legend--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-fieldset__legend--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend--s{font-size:14pt;line-height:1.15}}.govuk-fieldset__heading{margin:0;font-size:inherit;font-weight:inherit}.govuk-hint{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:15px;color:#505a5f}@media print{.govuk-hint{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-hint{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-hint{font-size:14pt;line-height:1.15}}.govuk-label:not(.govuk-label--m):not(.govuk-label--l):not(.govuk-label--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend:not(.govuk-fieldset__legend--m):not(.govuk-fieldset__legend--l):not(.govuk-fieldset__legend--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend+.govuk-hint{margin-top:-5px}.govuk-label{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;margin-bottom:5px}@media print{.govuk-label{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label{font-size:14pt;line-height:1.15}}@media print{.govuk-label{color:#000}}.govuk-label--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-label--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-label--xl{font-size:32pt;line-height:1.15}}.govuk-label--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-label--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-label--l{font-size:24pt;line-height:1.05}}.govuk-label--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:10px}@media print{.govuk-label--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-label--m{font-size:18pt;line-height:1.15}}.govuk-label--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-label--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label--s{font-size:14pt;line-height:1.15}}.govuk-label-wrapper{margin:0}.govuk-checkboxes__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-checkboxes__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__item{font-size:14pt;line-height:1.15}}.govuk-checkboxes__item:last-child,.govuk-checkboxes__item:last-of-type{margin-bottom:0}.govuk-checkboxes__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-checkboxes__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-checkboxes__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;background:transparent}.govuk-checkboxes__label:after{content:"";box-sizing:border-box;position:absolute;top:11px;left:9px;width:23px;height:12px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border:solid;border-width:0 0 5px 5px;border-top-color:transparent;opacity:0;background:transparent}.govuk-checkboxes__hint{display:block;padding-right:15px;padding-left:15px}.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 3px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{outline-color:Highlight}}.govuk-checkboxes__input:checked+.govuk-checkboxes__label:after{opacity:1}.govuk-checkboxes__input:disabled,.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{cursor:default}.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{opacity:.5}.govuk-checkboxes__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-checkboxes__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-checkboxes__divider{color:#000}}.govuk-checkboxes__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-checkboxes__conditional{margin-bottom:20px}}.js-enabled .govuk-checkboxes__conditional--hidden{display:none}.govuk-checkboxes__conditional>:last-child{margin-bottom:0}.govuk-checkboxes--small .govuk-checkboxes__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-checkboxes--small .govuk-checkboxes__item:after{content:"";display:block;clear:both}.govuk-checkboxes--small .govuk-checkboxes__input{left:-10px}.govuk-checkboxes--small .govuk-checkboxes__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-checkboxes--small .govuk-checkboxes__label{padding:11px 15px 10px 1px}}.govuk-checkboxes--small .govuk-checkboxes__label:before{top:8px;width:24px;height:24px}.govuk-checkboxes--small .govuk-checkboxes__label:after{top:15px;left:6px;width:12px;height:6.5px;border-width:0 0 3px 3px}.govuk-checkboxes--small .govuk-checkboxes__hint{padding:0;clear:both}.govuk-checkboxes--small .govuk-checkboxes__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:initial}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0}}.govuk-textarea{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:block;width:100%;min-height:40px;margin-bottom:20px;padding:5px;resize:vertical;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none}@media print{.govuk-textarea{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-textarea{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-textarea{font-size:14pt;line-height:1.25}}@media (min-width: 40.0625em){.govuk-textarea{margin-bottom:30px}}.govuk-textarea:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-textarea--error{border-color:#d4351c}.govuk-textarea--error:focus{border-color:#0b0c0c}.govuk-character-count{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-character-count{margin-bottom:30px}}.govuk-character-count .govuk-form-group,.govuk-character-count .govuk-textarea{margin-bottom:5px}.govuk-character-count__message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400;margin-top:0;margin-bottom:0}@media print{.govuk-character-count__message{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-character-count__message{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-character-count__message--disabled{visibility:hidden}.govuk-cookie-banner{padding-top:20px;border-bottom:10px solid transparent;background-color:#f3f2f1}.govuk-cookie-banner[hidden]{display:none}.govuk-cookie-banner__message{margin-bottom:-10px}.govuk-cookie-banner__message[hidden]{display:none}.govuk-cookie-banner__message:focus{outline:none}.govuk-summary-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin:0 0 20px}@media print{.govuk-summary-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-summary-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-summary-list{font-size:14pt;line-height:1.15}}@media print{.govuk-summary-list{color:#000}}@media (min-width: 40.0625em){.govuk-summary-list{display:table;width:100%;table-layout:fixed;border-collapse:collapse}}@media (min-width: 40.0625em){.govuk-summary-list{margin-bottom:30px}}.govuk-summary-list__row{border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-summary-list__row{margin-bottom:15px}}@media (min-width: 40.0625em){.govuk-summary-list__row{display:table-row}}@media (min-width: 40.0625em){.govuk-summary-list__row--no-actions:after{content:"";display:table-cell;width:20%}}.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{margin:0}@media (min-width: 40.0625em){.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{display:table-cell;padding-top:10px;padding-right:20px;padding-bottom:10px}}.govuk-summary-list__actions{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-summary-list__actions{width:20%;padding-right:0;text-align:right}}.govuk-summary-list__key,.govuk-summary-list__value{word-wrap:break-word;overflow-wrap:break-word}.govuk-summary-list__key{margin-bottom:5px;font-weight:700}@media (min-width: 40.0625em){.govuk-summary-list__key{width:30%}}@media (max-width: 40.0525em){.govuk-summary-list__value{margin-bottom:15px}}.govuk-summary-list__value>p{margin-bottom:10px}.govuk-summary-list__value>:last-child{margin-bottom:0}.govuk-summary-list__actions-list{width:100%;margin:0;padding:0}.govuk-summary-list__actions-list-item{display:inline;margin-right:10px;padding-right:10px}.govuk-summary-list__actions-list-item:not(:last-child){border-right:1px solid #b1b4b6}.govuk-summary-list__actions-list-item:last-child{margin-right:0;padding-right:0;border:0}.govuk-summary-list--no-border .govuk-summary-list__row{border:0}@media (min-width: 40.0625em){.govuk-summary-list--no-border .govuk-summary-list__key,.govuk-summary-list--no-border .govuk-summary-list__value,.govuk-summary-list--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-summary-list__row--no-border{border:0}@media (min-width: 40.0625em){.govuk-summary-list__row--no-border .govuk-summary-list__key,.govuk-summary-list__row--no-border .govuk-summary-list__value,.govuk-summary-list__row--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-input{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;width:100%;height:40px;height:2.5rem;margin-top:0;padding:5px;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media print{.govuk-input{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input{font-size:14pt;line-height:1.15}}.govuk-input:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-input::-webkit-outer-spin-button,.govuk-input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.govuk-input[type=number]{-moz-appearance:textfield}.govuk-input--error{border-color:#d4351c}.govuk-input--error:focus{border-color:#0b0c0c}.govuk-input--width-30{max-width:59ex}.govuk-input--width-20{max-width:41ex}.govuk-input--width-10{max-width:23ex}.govuk-input--width-5{max-width:10.8ex}.govuk-input--width-4{max-width:9ex}.govuk-input--width-3{max-width:7.2ex}.govuk-input--width-2{max-width:5.4ex}.govuk-input__wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.govuk-input__wrapper .govuk-input{-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto}.govuk-input__wrapper .govuk-input:focus{z-index:1}@media (max-width: 19.99em){.govuk-input__wrapper{display:block}.govuk-input__wrapper .govuk-input{max-width:100%}}.govuk-input__prefix,.govuk-input__suffix{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:inline-block;min-width:40px;min-width:2.5rem;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;background-color:#f3f2f1;text-align:center;white-space:nowrap;cursor:default;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}@media print{.govuk-input__prefix,.govuk-input__suffix{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input__prefix,.govuk-input__suffix{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input__prefix,.govuk-input__suffix{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-input__prefix,.govuk-input__suffix{line-height:1.6}}@media (max-width: 19.99em){.govuk-input__prefix,.govuk-input__suffix{display:block;height:100%;white-space:normal}}@media (max-width: 19.99em){.govuk-input__prefix{border-bottom:0}}@media (min-width: 20em){.govuk-input__prefix{border-right:0}}@media (max-width: 19.99em){.govuk-input__suffix{border-top:0}}@media (min-width: 20em){.govuk-input__suffix{border-left:0}}.govuk-date-input{font-size:0}.govuk-date-input:after{content:"";display:block;clear:both}.govuk-date-input__item{display:inline-block;margin-right:20px;margin-bottom:0}.govuk-date-input__label{display:block}.govuk-date-input__input{margin-bottom:0}.govuk-details{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:20px;display:block}@media print{.govuk-details{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-details{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-details{font-size:14pt;line-height:1.15}}@media print{.govuk-details{color:#000}}@media (min-width: 40.0625em){.govuk-details{margin-bottom:30px}}.govuk-details__summary{display:inline-block;position:relative;margin-bottom:5px;padding-left:25px;color:#1d70b8;cursor:pointer}.govuk-details__summary:hover{color:#003078}.govuk-details__summary:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-details__summary-text{text-decoration:underline}.govuk-details__summary:focus .govuk-details__summary-text{text-decoration:none}.govuk-details__summary::-webkit-details-marker{display:none}.govuk-details__summary:before{content:"";position:absolute;top:-1px;bottom:0;left:0;margin:auto;display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,100% 50%,0% 100%);clip-path:polygon(0% 0%,100% 50%,0% 100%);border-width:7px 0 7px 12.124px;border-left-color:inherit}.govuk-details[open]>.govuk-details__summary:before{display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:12.124px 7px 0 7px;border-top-color:inherit}.govuk-details__text{padding-top:15px;padding-bottom:15px;padding-left:20px;border-left:5px solid #b1b4b6}.govuk-details__text p{margin-top:0;margin-bottom:20px}.govuk-details__text>:last-child{margin-bottom:0}.govuk-error-summary{color:#0b0c0c;padding:15px;margin-bottom:30px;border:5px solid #d4351c}@media print{.govuk-error-summary{color:#000}}@media (min-width: 40.0625em){.govuk-error-summary{padding:20px}}@media (min-width: 40.0625em){.govuk-error-summary{margin-bottom:50px}}.govuk-error-summary:focus{outline:3px solid #ffdd00}.govuk-error-summary__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:15px}@media print{.govuk-error-summary__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__title{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-error-summary__title{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-error-summary__title{margin-bottom:20px}}.govuk-error-summary__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-error-summary__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__body{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-summary__body{font-size:14pt;line-height:1.15}}.govuk-error-summary__body p{margin-top:0;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-error-summary__body p{margin-bottom:20px}}.govuk-error-summary__list{margin-top:0;margin-bottom:0}.govuk-error-summary__list a{font-weight:700;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-error-summary__list a{font-family:sans-serif}}.govuk-error-summary__list a:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-error-summary__list a:link,.govuk-error-summary__list a:visited{color:#d4351c}.govuk-error-summary__list a:hover{color:#942514}.govuk-error-summary__list a:active{color:#d4351c}.govuk-error-summary__list a:focus{color:#0b0c0c}.govuk-file-upload{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;max-width:100%;margin-left:-5px;padding:5px}@media print{.govuk-file-upload{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-file-upload{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-file-upload{font-size:14pt;line-height:1.15}}@media print{.govuk-file-upload{color:#000}}.govuk-file-upload::-webkit-file-upload-button{-webkit-appearance:button;color:inherit;font:inherit}.govuk-file-upload:focus{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-file-upload:focus-within{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-footer{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;padding-top:25px;padding-bottom:15px;border-top:1px solid #b1b4b6;color:#0b0c0c;background:#f3f2f1}@media print{.govuk-footer{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-footer{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-footer{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-footer{padding-top:40px}}@media (min-width: 40.0625em){.govuk-footer{padding-bottom:25px}}.govuk-footer__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-footer__link{font-family:sans-serif}}.govuk-footer__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-footer__link:link,.govuk-footer__link:visited{color:#0b0c0c}@media print{.govuk-footer__link:link,.govuk-footer__link:visited{color:#000}}.govuk-footer__link:hover{color:#0b0c0cfc}.govuk-footer__link:active,.govuk-footer__link:focus{color:#0b0c0c}@media print{.govuk-footer__link:active,.govuk-footer__link:focus{color:#000}}.govuk-footer__section-break{margin:0 0 30px;border:0;border-bottom:1px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-footer__section-break{margin-bottom:50px}}.govuk-footer__meta{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-right:-15px;margin-left:-15px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.govuk-footer__meta-item{margin-right:15px;margin-bottom:25px;margin-left:15px}.govuk-footer__meta-item--grow{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}@media (max-width: 40.0525em){.govuk-footer__meta-item--grow{-webkit-flex-basis:320px;-ms-flex-preferred-size:320px;flex-basis:320px}}.govuk-footer__licence-logo{display:inline-block;margin-right:10px;vertical-align:top;forced-color-adjust:auto}@media (max-width: 48.0525em){.govuk-footer__licence-logo{margin-bottom:15px}}.govuk-footer__licence-description{display:inline-block}.govuk-footer__copyright-logo{display:inline-block;min-width:125px;padding-top:112px;background-image:url(/assets/images/govuk-crest.png);background-repeat:no-repeat;background-position:50% 0%;background-size:125px 102px;text-align:center;white-space:nowrap}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){.govuk-footer__copyright-logo{background-image:url(/assets/images/govuk-crest-2x.png)}}.govuk-footer__inline-list{margin-top:0;margin-bottom:15px;padding:0}.govuk-footer__meta-custom{margin-bottom:20px}.govuk-footer__inline-list-item{display:inline-block;margin-right:15px;margin-bottom:5px}.govuk-footer__heading{margin-bottom:30px;padding-bottom:20px;border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-footer__heading{padding-bottom:10px}}.govuk-footer__navigation{margin-right:-15px;margin-left:-15px}.govuk-footer__navigation:after{content:"";display:block;clear:both}.govuk-footer__section{display:inline-block;margin-bottom:30px;vertical-align:top}.govuk-footer__list{margin:0;padding:0;list-style:none;-webkit-column-gap:30px;column-gap:30px}.govuk-footer__list .govuk-footer__link:hover{text-decoration-thickness:auto}@media (min-width: 48.0625em){.govuk-footer__list--columns-2{-webkit-column-count:2;column-count:2}.govuk-footer__list--columns-3{-webkit-column-count:3;column-count:3}}.govuk-footer__list-item{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-footer__list-item{margin-bottom:20px}}.govuk-footer__list-item:last-child{margin-bottom:0}.govuk-header{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;border-bottom:10px solid #ffffff;color:#fff;background:#0b0c0c}@media print{.govuk-header{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header{font-size:14pt;line-height:1.2}}.govuk-header__container--full-width{padding:0 15px;border-color:#1d70b8}.govuk-header__container--full-width .govuk-header__menu-button{right:15px}.govuk-header__container{position:relative;margin-bottom:-10px;padding-top:10px;border-bottom:10px solid #1d70b8}.govuk-header__container:after{content:"";display:block;clear:both}.govuk-header__logotype{display:inline-block;margin-right:5px}@media (forced-colors: active){.govuk-header__logotype{forced-color-adjust:none;color:linktext}}.govuk-header__logotype:last-child{margin-right:0}.govuk-header__logotype-crown{position:relative;top:-1px;margin-right:1px;fill:currentColor;vertical-align:top}.govuk-header__logotype-crown-fallback-image{width:36px;height:32px;border:0;vertical-align:bottom}.govuk-header__product-name{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1;display:inline-table}@media print{.govuk-header__product-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__product-name{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-header__product-name{font-size:18pt;line-height:1}}.govuk-header__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none}@media print{.govuk-header__link{font-family:sans-serif}}.govuk-header__link:link,.govuk-header__link:visited{color:#fff}.govuk-header__link:hover,.govuk-header__link:active{color:#fffffffc}.govuk-header__link:focus{color:#0b0c0c}.govuk-header__link:hover{text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:.1em}.govuk-header__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__link--homepage{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:inline-block;margin-right:10px;font-size:30px;line-height:1}@media print{.govuk-header__link--homepage{font-family:sans-serif}}.govuk-header__link--homepage:link,.govuk-header__link--homepage:visited{text-decoration:none}.govuk-header__link--homepage:hover,.govuk-header__link--homepage:active{margin-bottom:-3px;border-bottom:3px solid}.govuk-header__link--homepage:focus{margin-bottom:0;border-bottom:0}.govuk-header__link--service-name{display:inline-block;margin-bottom:10px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111}@media print{.govuk-header__link--service-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__link--service-name{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-header__link--service-name{font-size:18pt;line-height:1.15}}.govuk-header__logo,.govuk-header__content{box-sizing:border-box}.govuk-header__logo{margin-bottom:10px;padding-right:50px}@media (min-width: 40.0625em){.govuk-header__logo{margin-bottom:10px}}@media (min-width: 48.0625em){.govuk-header__logo{width:33.33%;padding-right:15px;float:left;vertical-align:top}}@media (min-width: 48.0625em){.govuk-header__content{width:66.66%;padding-left:15px;float:left}}.govuk-header__menu-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:none;position:absolute;top:20px;right:0;margin:0;padding:0;border:0;color:#fff;background:none;cursor:pointer}@media print{.govuk-header__menu-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__menu-button{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__menu-button{font-size:14pt;line-height:1.2}}.govuk-header__menu-button:hover{-webkit-text-decoration:solid underline 3px;text-decoration:solid underline 3px;text-underline-offset:.1em}.govuk-header__menu-button:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__menu-button:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:8.66px 5px 0 5px;border-top-color:inherit;content:"";margin-left:5px}@media (min-width: 40.0625em){.govuk-header__menu-button{top:15px}}.govuk-header__menu-button--open:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(50% 0%,0% 100%,100% 100%);clip-path:polygon(50% 0%,0% 100%,100% 100%);border-width:0 5px 8.66px 5px;border-bottom-color:inherit}@media (min-width: 48.0625em){.govuk-header__navigation{margin-bottom:10px}}.govuk-header__navigation-list{margin:0;padding:0;list-style:none}.js-enabled .govuk-header__menu-button{display:block}@media (min-width: 48.0625em){.js-enabled .govuk-header__menu-button{display:none}}.js-enabled .govuk-header__navigation-list{display:none}@media (min-width: 48.0625em){.js-enabled .govuk-header__navigation-list{display:block}}.js-enabled .govuk-header__navigation-list--open{display:block}@media (min-width: 48.0625em){.govuk-header__navigation--end{margin:0;padding:5px 0;text-align:right}}.govuk-header__navigation--no-service-name{padding-top:40px}.govuk-header__navigation-item{padding:10px 0;border-bottom:1px solid #2e3133}@media (min-width: 48.0625em){.govuk-header__navigation-item{display:inline-block;margin-right:15px;padding:5px 0;border:0}}.govuk-header__navigation-item a{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1.1428571429;white-space:nowrap}@media print{.govuk-header__navigation-item a{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__navigation-item a{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__navigation-item a{font-size:14pt;line-height:1.2}}.govuk-header__navigation-item--active a:link,.govuk-header__navigation-item--active a:hover,.govuk-header__navigation-item--active a:visited{color:#1d8feb}.govuk-header__navigation-item--active a:focus{color:#0b0c0c}.govuk-header__navigation-item:last-child{margin-right:0;border-bottom:0}@media print{.govuk-header{border-bottom-width:0;color:#0b0c0c;background:transparent}.govuk-header__logotype-crown-fallback-image{display:none}.govuk-header__link:link,.govuk-header__link:visited{color:#0b0c0c}.govuk-header__link:after{display:none}}.govuk-inset-text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;padding:15px;margin-top:20px;margin-bottom:20px;clear:both;border-left:10px solid #b1b4b6}@media print{.govuk-inset-text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-inset-text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-inset-text{font-size:14pt;line-height:1.15}}@media print{.govuk-inset-text{color:#000}}@media (min-width: 40.0625em){.govuk-inset-text{margin-top:30px}}@media (min-width: 40.0625em){.govuk-inset-text{margin-bottom:30px}}.govuk-inset-text>:first-child{margin-top:0}.govuk-inset-text>:only-child,.govuk-inset-text>:last-child{margin-bottom:0}.govuk-notification-banner{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:30px;border:5px solid #1d70b8;background-color:#1d70b8}@media print{.govuk-notification-banner{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-notification-banner{margin-bottom:50px}}.govuk-notification-banner:focus{outline:3px solid #ffdd00}.govuk-notification-banner__header{padding:2px 15px 5px;border-bottom:1px solid transparent}@media (min-width: 40.0625em){.govuk-notification-banner__header{padding:2px 20px 5px}}.govuk-notification-banner__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;margin:0;padding:0;color:#fff}@media print{.govuk-notification-banner__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner__title{font-size:14pt;line-height:1.15}}.govuk-notification-banner__content{color:#0b0c0c;padding:15px;background-color:#fff}@media print{.govuk-notification-banner__content{color:#000}}@media (min-width: 40.0625em){.govuk-notification-banner__content{padding:20px}}.govuk-notification-banner__content>*{box-sizing:border-box;max-width:605px}.govuk-notification-banner__content>:last-child{margin-bottom:0}.govuk-notification-banner__heading{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin:0 0 15px;padding:0}@media print{.govuk-notification-banner__heading{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__heading{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-notification-banner__heading{font-size:18pt;line-height:1.15}}.govuk-notification-banner__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-notification-banner__link{font-family:sans-serif}}.govuk-notification-banner__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-notification-banner__link:link,.govuk-notification-banner__link:visited{color:#1d70b8}.govuk-notification-banner__link:hover{color:#003078}.govuk-notification-banner__link:active{color:#0b0c0c}.govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-notification-banner--success{border-color:#00703c;background-color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:link,.govuk-notification-banner--success .govuk-notification-banner__link:visited{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:hover{color:#004e2a}.govuk-notification-banner--success .govuk-notification-banner__link:active{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-panel{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;margin-bottom:15px;padding:35px;border:5px solid transparent;text-align:center}@media print{.govuk-panel{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-panel{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-panel{padding:10px;overflow-wrap:break-word;word-wrap:break-word}}.govuk-panel--confirmation{color:#fff;background:#00703c}@media print{.govuk-panel--confirmation{border-color:currentColor;color:#000;background:none}}.govuk-panel__title{margin-top:0;margin-bottom:30px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375}@media print{.govuk-panel__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__title{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-panel__title{font-size:32pt;line-height:1.15}}.govuk-panel__title:last-child{margin-bottom:0}.govuk-panel__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:24px;font-size:1.5rem;line-height:1.0416666667}@media print{.govuk-panel__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__body{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-panel__body{font-size:24pt;line-height:1.05}}.govuk-tag{display:inline-block;outline:2px solid transparent;outline-offset:-2px;color:#fff;background-color:#1d70b8;letter-spacing:1px;text-decoration:none;text-transform:uppercase;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1;padding:5px 8px 4px}@media print{.govuk-tag{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tag{font-size:16px;font-size:1rem;line-height:1}}@media print{.govuk-tag{font-size:14pt;line-height:1}}.govuk-tag--grey{color:#383f43;background:#eeefef}.govuk-tag--purple{color:#3d2375;background:#dbd5e9}.govuk-tag--turquoise{color:#10403c;background:#bfe3e0}.govuk-tag--blue{color:#144e81;background:#d2e2f1}.govuk-tag--yellow{color:#594d00;background:#fff7bf}.govuk-tag--orange{color:#6e3619;background:#fcd6c3}.govuk-tag--red{color:#942514;background:#f6d7d2}.govuk-tag--pink{color:#80224d;background:#f7d7e6}.govuk-tag--green{color:#005a30;background:#cce2d8}.govuk-phase-banner{padding-top:10px;padding-bottom:10px;border-bottom:1px solid #b1b4b6}.govuk-phase-banner__content{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;display:table;margin:0}@media print{.govuk-phase-banner__content{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-phase-banner__content{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-phase-banner__content{font-size:14pt;line-height:1.2}}@media print{.govuk-phase-banner__content{color:#000}}.govuk-phase-banner__content__tag{margin-right:10px}.govuk-phase-banner__text{display:table-cell;vertical-align:middle}.govuk-tabs{margin-top:5px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-tabs{margin-top:5px}}@media (min-width: 40.0625em){.govuk-tabs{margin-bottom:30px}}.govuk-tabs__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:10px}@media print{.govuk-tabs__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__title{font-size:14pt;line-height:1.15}}@media print{.govuk-tabs__title{color:#000}}.govuk-tabs__list{margin:0 0 20px;padding:0;list-style:none}@media (min-width: 40.0625em){.govuk-tabs__list{margin-bottom:30px}}.govuk-tabs__list-item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-left:25px}@media print{.govuk-tabs__list-item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__list-item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__list-item{font-size:14pt;line-height:1.15}}.govuk-tabs__list-item:before{color:#0b0c0c;content:"\\2014";margin-left:-25px;padding-right:5px}@media print{.govuk-tabs__list-item:before{color:#000}}.govuk-tabs__tab{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;margin-bottom:10px}@media print{.govuk-tabs__tab{font-family:sans-serif}}.govuk-tabs__tab:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-tabs__tab:link{color:#1d70b8}.govuk-tabs__tab:visited{color:#4c2c92}.govuk-tabs__tab:hover{color:#003078}.govuk-tabs__tab:active{color:#0b0c0c}.govuk-tabs__tab:focus{color:#0b0c0c}.govuk-tabs__panel{margin-bottom:30px}@media (min-width: 40.0625em){.govuk-tabs__panel{margin-bottom:50px}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__list{margin-bottom:0;border-bottom:1px solid #b1b4b6}.js-enabled .govuk-tabs__list:after{content:"";display:block;clear:both}.js-enabled .govuk-tabs__title{display:none}.js-enabled .govuk-tabs__list-item{position:relative;margin-right:5px;margin-bottom:0;margin-left:0;padding:10px 20px;float:left;background-color:#f3f2f1;text-align:center}.js-enabled .govuk-tabs__list-item:before{content:none}.js-enabled .govuk-tabs__list-item--selected{position:relative;margin-top:-5px;margin-bottom:-1px;padding:14px 19px 16px;border:1px solid #b1b4b6;border-bottom:0;background-color:#fff}.js-enabled .govuk-tabs__list-item--selected .govuk-tabs__tab{text-decoration:none}.js-enabled .govuk-tabs__tab{margin-bottom:0}.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:hover{color:#0b0c0cfc}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0;padding:30px 20px;border:1px solid #b1b4b6;border-top:0}}@media (min-width: 40.0625em) and (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel>:last-child{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel--hidden{display:none}}.govuk-radios__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-radios__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__item{font-size:14pt;line-height:1.15}}.govuk-radios__item:last-child,.govuk-radios__item:last-of-type{margin-bottom:0}.govuk-radios__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-radios__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-radios__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;border-radius:50%;background:transparent}.govuk-radios__label:after{content:"";position:absolute;top:10px;left:10px;width:0;height:0;border:10px solid currentColor;border-radius:50%;opacity:0;background:currentColor}.govuk-radios__hint{display:block;padding-right:15px;padding-left:15px}.govuk-radios__input:focus+.govuk-radios__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 4px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-radios__input:focus+.govuk-radios__label:before{outline-color:Highlight}}.govuk-radios__input:checked+.govuk-radios__label:after{opacity:1}.govuk-radios__input:disabled,.govuk-radios__input:disabled+.govuk-radios__label{cursor:default}.govuk-radios__input:disabled+.govuk-radios__label{opacity:.5}@media (min-width: 40.0625em){.govuk-radios--inline:after{content:"";display:block;clear:both}.govuk-radios--inline .govuk-radios__item{margin-right:20px;float:left;clear:none}}.govuk-radios__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-radios__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-radios__divider{color:#000}}.govuk-radios__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-radios__conditional{margin-bottom:20px}}.js-enabled .govuk-radios__conditional--hidden{display:none}.govuk-radios__conditional>:last-child{margin-bottom:0}.govuk-radios--small .govuk-radios__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-radios--small .govuk-radios__item:after{content:"";display:block;clear:both}.govuk-radios--small .govuk-radios__input{left:-10px}.govuk-radios--small .govuk-radios__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-radios--small .govuk-radios__label{padding:11px 15px 10px 1px}}.govuk-radios--small .govuk-radios__label:before{top:8px;width:24px;height:24px}.govuk-radios--small .govuk-radios__label:after{top:15px;left:7px;border-width:5px}.govuk-radios--small .govuk-radios__hint{padding:0;clear:both;pointer-events:none}.govuk-radios--small .govuk-radios__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-radios--small .govuk-radios__divider{width:24px;margin-bottom:5px}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:initial}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0}}.govuk-select{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;max-width:100%;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;color:#0b0c0c;background-color:#fff}@media print{.govuk-select{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-select{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-select{font-size:14pt;line-height:1.25}}.govuk-select:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-select option:active,.govuk-select option:checked,.govuk-select:focus::-ms-value{color:#fff;background-color:#1d70b8}.govuk-select--error{border-color:#d4351c}.govuk-select--error:focus{border-color:#0b0c0c}.govuk-skip-link{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:block;padding:10px 15px}.govuk-skip-link:active,.govuk-skip-link:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}@media print{.govuk-skip-link{font-family:sans-serif}}.govuk-skip-link:link,.govuk-skip-link:visited{color:#0b0c0c}@media print{.govuk-skip-link:link,.govuk-skip-link:visited{color:#000}}.govuk-skip-link:hover{color:#0b0c0cfc}.govuk-skip-link:active,.govuk-skip-link:focus{color:#0b0c0c}@media print{.govuk-skip-link:active,.govuk-skip-link:focus{color:#000}}@media (min-width: 40.0625em){.govuk-skip-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-skip-link{font-size:14pt;line-height:1.2}}@supports (padding: max(0px)){.govuk-skip-link{padding-right:max(15px,calc(15px + env(safe-area-inset-right)));padding-left:max(15px,calc(15px + env(safe-area-inset-left)))}}.govuk-skip-link:focus{outline:3px solid #ffdd00;outline-offset:0;background-color:#fd0}.govuk-skip-link-focused-element:focus{outline:none}.govuk-table{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:100%;margin-bottom:20px;border-spacing:0;border-collapse:collapse}@media print{.govuk-table{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table{font-size:14pt;line-height:1.15}}@media print{.govuk-table{color:#000}}@media (min-width: 40.0625em){.govuk-table{margin-bottom:30px}}.govuk-table__header{font-weight:700}.govuk-table__header,.govuk-table__cell{padding:10px 20px 10px 0;border-bottom:1px solid #b1b4b6;text-align:left;vertical-align:top}.govuk-table__cell--numeric{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400}@media print{.govuk-table__cell--numeric{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-table__cell--numeric{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-table__header--numeric,.govuk-table__cell--numeric{text-align:right}.govuk-table__header:last-child,.govuk-table__cell:last-child{padding-right:0}.govuk-table__caption{font-weight:700;display:table-caption;text-align:left}.govuk-table__caption--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-table__caption--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-table__caption--xl{font-size:32pt;line-height:1.15}}.govuk-table__caption--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-table__caption--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-table__caption--l{font-size:24pt;line-height:1.05}}.govuk-table__caption--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-table__caption--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-table__caption--m{font-size:18pt;line-height:1.15}}.govuk-table__caption--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-table__caption--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table__caption--s{font-size:14pt;line-height:1.15}}.govuk-warning-text{position:relative;margin-bottom:20px;padding:10px 0}@media (min-width: 40.0625em){.govuk-warning-text{margin-bottom:30px}}.govuk-warning-text__assistive{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-warning-text__icon{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;box-sizing:border-box;display:inline-block;position:absolute;left:0;min-width:35px;min-height:35px;margin-top:-7px;border:3px solid #0b0c0c;border-radius:50%;color:#fff;background:#0b0c0c;font-size:30px;line-height:29px;text-align:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;forced-color-adjust:none}@media print{.govuk-warning-text__icon{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__icon{margin-top:-5px}}@media screen and (forced-colors: active){.govuk-warning-text__icon{border-color:windowText;color:windowText;background:transparent}}.govuk-warning-text__text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;padding-left:45px}@media print{.govuk-warning-text__text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-warning-text__text{font-size:14pt;line-height:1.15}}@media print{.govuk-warning-text__text{color:#000}}.govuk-clearfix:after{content:"";display:block;clear:both}.govuk-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-visually-hidden-focusable{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important}.govuk-visually-hidden-focusable:active,.govuk-visually-hidden-focusable:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}.govuk-\\!-display-inline{display:inline!important}.govuk-\\!-display-inline-block{display:inline-block!important}.govuk-\\!-display-block{display:block!important}.govuk-\\!-display-none{display:none!important}@media print{.govuk-\\!-display-none-print{display:none!important}}.govuk-\\!-margin-0{margin:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-0{margin:0!important}}.govuk-\\!-margin-top-0{margin-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-0{margin-top:0!important}}.govuk-\\!-margin-right-0{margin-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-0{margin-right:0!important}}.govuk-\\!-margin-bottom-0{margin-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-0{margin-bottom:0!important}}.govuk-\\!-margin-left-0{margin-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-0{margin-left:0!important}}.govuk-\\!-margin-1{margin:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-1{margin:5px!important}}.govuk-\\!-margin-top-1{margin-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-1{margin-top:5px!important}}.govuk-\\!-margin-right-1{margin-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-1{margin-right:5px!important}}.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}}.govuk-\\!-margin-left-1{margin-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-1{margin-left:5px!important}}.govuk-\\!-margin-2{margin:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-2{margin:10px!important}}.govuk-\\!-margin-top-2{margin-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-2{margin-top:10px!important}}.govuk-\\!-margin-right-2{margin-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-2{margin-right:10px!important}}.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}}.govuk-\\!-margin-left-2{margin-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-2{margin-left:10px!important}}.govuk-\\!-margin-3{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-3{margin:15px!important}}.govuk-\\!-margin-top-3{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-3{margin-top:15px!important}}.govuk-\\!-margin-right-3{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-3{margin-right:15px!important}}.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}}.govuk-\\!-margin-left-3{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-3{margin-left:15px!important}}.govuk-\\!-margin-4{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-4{margin:20px!important}}.govuk-\\!-margin-top-4{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-4{margin-top:20px!important}}.govuk-\\!-margin-right-4{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-4{margin-right:20px!important}}.govuk-\\!-margin-bottom-4{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-4{margin-bottom:20px!important}}.govuk-\\!-margin-left-4{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-4{margin-left:20px!important}}.govuk-\\!-margin-5{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-5{margin:25px!important}}.govuk-\\!-margin-top-5{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-5{margin-top:25px!important}}.govuk-\\!-margin-right-5{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-5{margin-right:25px!important}}.govuk-\\!-margin-bottom-5{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-5{margin-bottom:25px!important}}.govuk-\\!-margin-left-5{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-5{margin-left:25px!important}}.govuk-\\!-margin-6{margin:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-6{margin:30px!important}}.govuk-\\!-margin-top-6{margin-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-6{margin-top:30px!important}}.govuk-\\!-margin-right-6{margin-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-6{margin-right:30px!important}}.govuk-\\!-margin-bottom-6{margin-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-6{margin-bottom:30px!important}}.govuk-\\!-margin-left-6{margin-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-6{margin-left:30px!important}}.govuk-\\!-margin-7{margin:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-7{margin:40px!important}}.govuk-\\!-margin-top-7{margin-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-7{margin-top:40px!important}}.govuk-\\!-margin-right-7{margin-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-7{margin-right:40px!important}}.govuk-\\!-margin-bottom-7{margin-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-7{margin-bottom:40px!important}}.govuk-\\!-margin-left-7{margin-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-7{margin-left:40px!important}}.govuk-\\!-margin-8{margin:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-8{margin:50px!important}}.govuk-\\!-margin-top-8{margin-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-8{margin-top:50px!important}}.govuk-\\!-margin-right-8{margin-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-8{margin-right:50px!important}}.govuk-\\!-margin-bottom-8{margin-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-8{margin-bottom:50px!important}}.govuk-\\!-margin-left-8{margin-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-8{margin-left:50px!important}}.govuk-\\!-margin-9{margin:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-9{margin:60px!important}}.govuk-\\!-margin-top-9{margin-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-9{margin-top:60px!important}}.govuk-\\!-margin-right-9{margin-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-9{margin-right:60px!important}}.govuk-\\!-margin-bottom-9{margin-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-9{margin-bottom:60px!important}}.govuk-\\!-margin-left-9{margin-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-9{margin-left:60px!important}}.govuk-\\!-padding-0{padding:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-0{padding:0!important}}.govuk-\\!-padding-top-0{padding-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-0{padding-top:0!important}}.govuk-\\!-padding-right-0{padding-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-0{padding-right:0!important}}.govuk-\\!-padding-bottom-0{padding-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-0{padding-bottom:0!important}}.govuk-\\!-padding-left-0{padding-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-0{padding-left:0!important}}.govuk-\\!-padding-1{padding:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-1{padding:5px!important}}.govuk-\\!-padding-top-1{padding-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-1{padding-top:5px!important}}.govuk-\\!-padding-right-1{padding-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-1{padding-right:5px!important}}.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}}.govuk-\\!-padding-left-1{padding-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-1{padding-left:5px!important}}.govuk-\\!-padding-2{padding:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-2{padding:10px!important}}.govuk-\\!-padding-top-2{padding-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-2{padding-top:10px!important}}.govuk-\\!-padding-right-2{padding-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-2{padding-right:10px!important}}.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}}.govuk-\\!-padding-left-2{padding-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-2{padding-left:10px!important}}.govuk-\\!-padding-3{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-3{padding:15px!important}}.govuk-\\!-padding-top-3{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-3{padding-top:15px!important}}.govuk-\\!-padding-right-3{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-3{padding-right:15px!important}}.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}}.govuk-\\!-padding-left-3{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-3{padding-left:15px!important}}.govuk-\\!-padding-4{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-4{padding:20px!important}}.govuk-\\!-padding-top-4{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-4{padding-top:20px!important}}.govuk-\\!-padding-right-4{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-4{padding-right:20px!important}}.govuk-\\!-padding-bottom-4{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-4{padding-bottom:20px!important}}.govuk-\\!-padding-left-4{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-4{padding-left:20px!important}}.govuk-\\!-padding-5{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-5{padding:25px!important}}.govuk-\\!-padding-top-5{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-5{padding-top:25px!important}}.govuk-\\!-padding-right-5{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-5{padding-right:25px!important}}.govuk-\\!-padding-bottom-5{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-5{padding-bottom:25px!important}}.govuk-\\!-padding-left-5{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-5{padding-left:25px!important}}.govuk-\\!-padding-6{padding:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-6{padding:30px!important}}.govuk-\\!-padding-top-6{padding-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-6{padding-top:30px!important}}.govuk-\\!-padding-right-6{padding-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-6{padding-right:30px!important}}.govuk-\\!-padding-bottom-6{padding-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-6{padding-bottom:30px!important}}.govuk-\\!-padding-left-6{padding-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-6{padding-left:30px!important}}.govuk-\\!-padding-7{padding:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-7{padding:40px!important}}.govuk-\\!-padding-top-7{padding-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-7{padding-top:40px!important}}.govuk-\\!-padding-right-7{padding-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-7{padding-right:40px!important}}.govuk-\\!-padding-bottom-7{padding-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-7{padding-bottom:40px!important}}.govuk-\\!-padding-left-7{padding-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-7{padding-left:40px!important}}.govuk-\\!-padding-8{padding:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-8{padding:50px!important}}.govuk-\\!-padding-top-8{padding-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-8{padding-top:50px!important}}.govuk-\\!-padding-right-8{padding-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-8{padding-right:50px!important}}.govuk-\\!-padding-bottom-8{padding-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-8{padding-bottom:50px!important}}.govuk-\\!-padding-left-8{padding-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-8{padding-left:50px!important}}.govuk-\\!-padding-9{padding:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-9{padding:60px!important}}.govuk-\\!-padding-top-9{padding-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-9{padding-top:60px!important}}.govuk-\\!-padding-right-9{padding-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-9{padding-right:60px!important}}.govuk-\\!-padding-bottom-9{padding-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-9{padding-bottom:60px!important}}.govuk-\\!-padding-left-9{padding-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-9{padding-left:60px!important}}.govuk-\\!-text-align-left{text-align:left!important}.govuk-\\!-text-align-centre{text-align:center!important}.govuk-\\!-text-align-right{text-align:right!important}.govuk-\\!-font-size-80{font-size:53px!important;font-size:3.3125rem!important;line-height:1.0377358491!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-80{font-size:80px!important;font-size:5rem!important;line-height:1!important}}@media print{.govuk-\\!-font-size-80{font-size:53pt!important;line-height:1.1!important}}.govuk-\\!-font-size-48{font-size:32px!important;font-size:2rem!important;line-height:1.09375!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-48{font-size:48px!important;font-size:3rem!important;line-height:1.0416666667!important}}@media print{.govuk-\\!-font-size-48{font-size:32pt!important;line-height:1.15!important}}.govuk-\\!-font-size-36{font-size:24px!important;font-size:1.5rem!important;line-height:1.0416666667!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-36{font-size:36px!important;font-size:2.25rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-36{font-size:24pt!important;line-height:1.05!important}}.govuk-\\!-font-size-27{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-27{font-size:27px!important;font-size:1.6875rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-27{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-24{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-24{font-size:24px!important;font-size:1.5rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-24{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-19{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-19{font-size:19px!important;font-size:1.1875rem!important;line-height:1.3157894737!important}}@media print{.govuk-\\!-font-size-19{font-size:14pt!important;line-height:1.15!important}}.govuk-\\!-font-size-16{font-size:14px!important;font-size:.875rem!important;line-height:1.1428571429!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-16{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-16{font-size:14pt!important;line-height:1.2!important}}.govuk-\\!-font-size-14{font-size:12px!important;font-size:.75rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-14{font-size:14px!important;font-size:.875rem!important;line-height:1.4285714286!important}}@media print{.govuk-\\!-font-size-14{font-size:12pt!important;line-height:1.2!important}}.govuk-\\!-font-weight-regular{font-weight:400!important}.govuk-\\!-font-weight-bold{font-weight:700!important}.govuk-\\!-width-full,.govuk-\\!-width-three-quarters{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-three-quarters{width:75%!important}}.govuk-\\!-width-two-thirds{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-two-thirds{width:66.66%!important}}.govuk-\\!-width-one-half{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-half{width:50%!important}}.govuk-\\!-width-one-third{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-third{width:33.33%!important}}.govuk-\\!-width-one-quarter{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-quarter{width:25%!important}}:host .govuk-label{font-family:var(--autocomplete__font-family, "GDS Transport", arial, sans-serif)}:host .govuk-label--static{font-size:var(--autocomplete__label__font-size, 19px)}:host .autocomplete__input{font-family:var(--autocomplete__font-family, "GDS Transport", arial, sans-serif);font-size:var(--autocomplete__input__font-size, 19px);height:var(--autocomplete__input__height, 35px);padding:var(--autocomplete__input__padding, 5px 34px 5px 5px);z-index:calc(var(--autocomplete__dropdown-arrow-down__z-index, 1) + 1)}:host .autocomplete__dropdown-arrow-down{z-index:var(--autocomplete__dropdown-arrow-down__z-index, 1);top:calc((var(--autocomplete__input__height, 35px) - 17px) / 2)}:host .autocomplete__option{font-family:var(--autocomplete__font-family, "GDS Transport", arial, sans-serif);font-size:var(--autocomplete__input__font-size, 19px);padding:var(--autocomplete__option__padding, 5px);border-bottom:var(--autocomplete__option__border-bottom, solid 1px #b1b4b6)}:host .autocomplete__option--focused,:host .autocomplete__option:hover,.autocomplete__option--focused :host .autocomplete__option:hover{border-color:var(--autocomplete__option__hover-border-color, #1d70b8);background-color:var(--autocomplete__option__hover-background-color, #1d70b8)}:host .autocomplete__menu{max-height:var(--autocomplete__menu__max-height, 342px)}
86
+ `;var hp=Object.freeze,up=Object.defineProperty,HM=Object.getOwnPropertyDescriptor,Ue=(i,t,e,n)=>{for(var r=n>1?void 0:n?HM(t,e):t,o=i.length-1,s;o>=0;o--)(s=i[o])&&(r=(n?s(t,e,r):s(r))||r);return n&&r&&up(t,e,r),r},JM=(i,t)=>hp(up(i,"raw",{value:hp(t||i.slice())})),dp;q.AddressAutocomplete=class extends Pn{constructor(){super(...arguments),this.id="autocomplete",this.postcode="SE5 0HU",this.label="Select an address",this.initialAddress="",this.osPlacesApiKey="a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",this.arrowStyle="default",this.labelStyle="responsive",this._totalAddresses=void 0,this._addressesInPostcode=[],this._options=[],this._selectedAddress=null,this._osError=void 0,this.dispatch=(i,t)=>this.dispatchEvent(new CustomEvent(i,{detail:t}))}connectedCallback(){super.connectedCallback(),this._fetchData()}disconnectedCallback(){super.disconnectedCallback()}_getLightDropdownArrow(){return'<svg class="autocomplete__dropdown-arrow-down" style="height: 17px;" viewBox="0 0 512 512" ><path d="M256,298.3L256,298.3L256,298.3l174.2-167.2c4.3-4.2,11.4-4.1,15.8,0.2l30.6,29.9c4.4,4.3,4.5,11.3,0.2,15.5L264.1,380.9 c-2.2,2.2-5.2,3.2-8.1,3c-3,0.1-5.9-0.9-8.1-3L35.2,176.7c-4.3-4.2-4.2-11.2,0.2-15.5L66,131.3c4.4-4.3,11.5-4.4,15.8-0.2L256,298.3 z"/></svg>'}firstUpdated(){KM({element:this.renderRoot.querySelector(`#${this.id}-container`),id:this.id,required:!0,source:this._options,defaultValue:this.initialAddress,showAllValues:!0,displayMenu:"overlay",dropdownArrow:this.arrowStyle==="light"?this._getLightDropdownArrow:void 0,tNoResults:()=>"No addresses found",onConfirm:i=>{this._selectedAddress=this._addressesInPostcode.filter(t=>t.LPI.ADDRESS.split(`, ${t.LPI.ADMINISTRATIVE_AREA}`)[0]===i)[0],this._selectedAddress&&this.dispatch("addressSelection",{address:this._selectedAddress})}})}async _fetchData(i=0,t=[]){const e={postcode:this.postcode,dataset:"LPI",maxResults:"100",output_srs:"EPSG:4326",lr:"EN",key:this.osPlacesApiKey},n=`https://api.os.uk/search/places/v1/postcode?${new URLSearchParams(e)}`;await fetch(n+`&offset=${i}`).then(r=>r.json()).then(r=>{var s,a,l;(r.error||r.fault)&&(this._osError=((s=r.error)==null?void 0:s.message)||((a=r.fault)==null?void 0:a.faultstring)||"Something went wrong"),this._totalAddresses=(l=r.header)==null?void 0:l.totalresults;const o=t.concat(r.results||[]);if(this._addressesInPostcode=o,this.dispatch("ready",{postcode:this.postcode,status:`fetched ${this._addressesInPostcode.length}/${this._totalAddresses} addresses`}),r.results){r.results.filter(u=>u.LPI.LPI_LOGICAL_STATUS_CODE_DESCRIPTION==="APPROVED").map(u=>{this._options.push(u.LPI.ADDRESS.split(`, ${u.LPI.ADMINISTRATIVE_AREA}`)[0])});const h=new Intl.Collator([],{numeric:!0});this._options.sort((u,d)=>h.compare(u,d))}this._totalAddresses&&this._totalAddresses>this._addressesInPostcode.length&&this._fetchData(this._addressesInPostcode.length,this._addressesInPostcode)}).catch(r=>console.log(r))}_getLabelClasses(){let i="govuk-label";return this.labelStyle==="static"&&(i+=" govuk-label--static"),i}_getErrorMessageContainer(i){const t=i?"govuk-warning-text":"",e=i?Bi` <span class="govuk-warning-text__icon" aria-hidden="true">!</span>
87
87
  <strong class="govuk-warning-text__text">
88
88
  <span class="govuk-warning-text__assistive">Warning</span>
89
89
  ${i}
@@ -102,16 +102,16 @@ northing meters`+i;var c=d/2,f=0,g=0,m,p,_,v,y;return c>0&&(m=1e5/Math.pow(10,c)
102
102
  ${this.label}
103
103
  </label>
104
104
  <div id="${this.id}-container" spellcheck="false"></div>
105
- `}render(){let i;return this.osPlacesApiKey?this._osError?i=this._osError:this._totalAddresses===0&&(i=`No addresses found in postcode ${this.postcode}`):i="Missing OS Places API key",Bi(cp||(cp=JE([`
105
+ `}render(){let i;return this.osPlacesApiKey?this._osError?i=this._osError:this._totalAddresses===0&&(i=`No addresses found in postcode ${this.postcode}`):i="Missing OS Places API key",Bi(dp||(dp=JM([`
106
106
  <script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>
107
107
  `,`
108
108
  `,`
109
- `])),this._getErrorMessageContainer(i),this._getAutocomplete(i))}},q.AddressAutocomplete.styles=Ss(ZE),Ue([J({type:String})],q.AddressAutocomplete.prototype,"id",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"postcode",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"label",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"initialAddress",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"osPlacesApiKey",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"arrowStyle",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"labelStyle",2),Ue([Ui()],q.AddressAutocomplete.prototype,"_totalAddresses",2),Ue([Ui()],q.AddressAutocomplete.prototype,"_addressesInPostcode",2),Ue([Ui()],q.AddressAutocomplete.prototype,"_options",2),Ue([Ui()],q.AddressAutocomplete.prototype,"_selectedAddress",2),Ue([Ui()],q.AddressAutocomplete.prototype,"_osError",2),q.AddressAutocomplete=Ue([vl("address-autocomplete")],q.AddressAutocomplete);var sd=globalThis&&globalThis.__assign||function(){return sd=Object.assign||function(i){for(var t,e=1,n=arguments.length;e<n;e++){t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},sd.apply(this,arguments)},fp=/^([a-z]{1,2}\d)([a-z])$/i,QE=/[a-z]{2}$/i,gp=/\d[a-z]{2}$/i,tC=/^[a-z]{1,2}\d[a-z\d]?\s*\d[a-z]{2}$/i,eC=/^[a-z]{1,2}/i,iC={valid:!1,postcode:null,incode:null,outcode:null,area:null,district:null,subDistrict:null,sector:null,unit:null},ad=function(i){return i===null?null:i[0]},nC=/\s+/gi,mp=function(i){return i.replace(nC,"").toUpperCase()},ld=function(i,t){return mp(i).match(t)},_s=function(i){return i.match(tC)!==null},hd=function(i){var t=ys(i);if(t===null)return null;var e=ud(i);return e===null?null:t+" "+e},ys=function(i){return _s(i)?mp(i).replace(gp,""):null},ud=function(i){if(!_s(i))return null;var t=ld(i,gp);return ad(t)},rC=function(i){if(!_s(i))return null;var t=ld(i,eC);return ad(t)},oC=function(i){var t=ys(i);if(t===null)return null;var e=ud(i);return e===null?null:t+" "+e[0]},sC=function(i){if(!_s(i))return null;var t=ld(i,QE);return ad(t)},aC=function(i){var t=ys(i);if(t===null)return null;var e=t.match(fp);return e===null?t:e[1]},lC=function(i){var t=ys(i);if(t===null)return null;var e=t.match(fp);return e===null?null:t},hC=function(i){return _s(i)?{valid:!0,postcode:hd(i),incode:ud(i),outcode:ys(i),area:rC(i),district:aC(i),subDistrict:lC(i),sector:oC(i),unit:sC(i)}:sd({},iC)};const uC=`@charset "UTF-8";.govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */@font-face{font-family:GDS Transport;font-style:normal;font-weight:400;src:url(/assets/fonts/light-94a07e06a1-v2.woff2) format("woff2"),url(/assets/fonts/light-f591b13f7d-v2.woff) format("woff");font-display:fallback}@font-face{font-family:GDS Transport;font-style:normal;font-weight:700;src:url(/assets/fonts/bold-b542beb274-v2.woff2) format("woff2"),url(/assets/fonts/bold-affa96571d-v2.woff) format("woff");font-display:fallback}@media print{.govuk-link{font-family:sans-serif}}.govuk-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-link:link{color:#1d70b8}.govuk-link:visited{color:#4c2c92}.govuk-link:hover{color:#003078}.govuk-link:active{color:#0b0c0c}.govuk-link:focus{color:#0b0c0c}@media print{[href^="/"].govuk-link:after,[href^="http://"].govuk-link:after,[href^="https://"].govuk-link:after{content:" (" attr(href) ")";font-size:90%;word-wrap:break-word}}.govuk-link--muted:link,.govuk-link--muted:visited{color:#505a5f}.govuk-link--muted:hover,.govuk-link--muted:active{color:#0b0c0c}.govuk-link--muted:focus{color:#0b0c0c}.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#0b0c0c}@media print{.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#000}}.govuk-link--text-colour:hover{color:#0b0c0cfc}.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#0b0c0c}@media print{.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#000}}.govuk-link--inverse:link,.govuk-link--inverse:visited{color:#fff}.govuk-link--inverse:hover,.govuk-link--inverse:active{color:#fffffffc}.govuk-link--inverse:focus{color:#0b0c0c}.govuk-link--no-underline:not(:hover):not(:active){text-decoration:none}.govuk-link--no-visited-state:link,.govuk-link--no-visited-state:visited{color:#1d70b8}.govuk-link--no-visited-state:hover{color:#003078}.govuk-link--no-visited-state:active{color:#0b0c0c}.govuk-link--no-visited-state:focus{color:#0b0c0c}.govuk-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-top:0;margin-bottom:15px;padding-left:0;list-style-type:none}@media print{.govuk-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-list{font-size:14pt;line-height:1.15}}@media print{.govuk-list{color:#000}}@media (min-width: 40.0625em){.govuk-list{margin-bottom:20px}}.govuk-list .govuk-list{margin-top:10px}.govuk-list>li{margin-bottom:5px}.govuk-list--bullet{padding-left:20px;list-style-type:disc}.govuk-list--number{padding-left:20px;list-style-type:decimal}.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:0}@media (min-width: 40.0625em){.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:5px}}.govuk-list--spaced>li{margin-bottom:10px}@media (min-width: 40.0625em){.govuk-list--spaced>li{margin-bottom:15px}}.govuk-heading-xl{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;display:block;margin-top:0;margin-bottom:30px}@media print{.govuk-heading-xl{color:#000}}@media print{.govuk-heading-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-heading-xl{font-size:32pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-xl{margin-bottom:50px}}.govuk-heading-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;display:block;margin-top:0;margin-bottom:20px}@media print{.govuk-heading-l{color:#000}}@media print{.govuk-heading-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-heading-l{font-size:24pt;line-height:1.05}}@media (min-width: 40.0625em){.govuk-heading-l{margin-bottom:30px}}.govuk-heading-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-m{color:#000}}@media print{.govuk-heading-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-heading-m{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-m{margin-bottom:20px}}.govuk-heading-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-s{color:#000}}@media print{.govuk-heading-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-heading-s{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-s{margin-bottom:20px}}.govuk-caption-xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-xl{font-size:27px;font-size:1.6875rem;line-height:1.1111111111}}@media print{.govuk-caption-xl{font-size:18pt;line-height:1.15}}.govuk-caption-l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-caption-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-caption-l{margin-bottom:0}}.govuk-caption-m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;color:#505a5f}@media print{.govuk-caption-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-caption-m{font-size:14pt;line-height:1.15}}.govuk-body-lead,.govuk-body-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:20px}@media print{.govuk-body-lead,.govuk-body-l{color:#000}}@media print{.govuk-body-lead,.govuk-body-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-body-lead,.govuk-body-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{margin-bottom:30px}}.govuk-body,.govuk-body-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body,.govuk-body-m{color:#000}}@media print{.govuk-body,.govuk-body-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-body,.govuk-body-m{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{margin-bottom:20px}}.govuk-body-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;margin-top:0;margin-bottom:15px}@media print{.govuk-body-s{color:#000}}@media print{.govuk-body-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-s{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-body-s{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-s{margin-bottom:20px}}.govuk-body-xs{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:12px;font-size:.75rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body-xs{color:#000}}@media print{.govuk-body-xs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-xs{font-size:14px;font-size:.875rem;line-height:1.4285714286}}@media print{.govuk-body-xs{font-size:12pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-xs{margin-bottom:20px}}.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:10px}}.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:15px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:20px}}.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:10px}}.govuk-section-break{margin:0;border:0}.govuk-section-break--xl{margin-top:30px;margin-bottom:30px}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-top:50px}}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-bottom:50px}}.govuk-section-break--l{margin-top:20px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-section-break--l{margin-top:30px}}@media (min-width: 40.0625em){.govuk-section-break--l{margin-bottom:30px}}.govuk-section-break--m{margin-top:15px;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-section-break--m{margin-top:20px}}@media (min-width: 40.0625em){.govuk-section-break--m{margin-bottom:20px}}.govuk-section-break--visible{border-bottom:1px solid #b1b4b6}.govuk-button-group{margin-bottom:5px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}@media (min-width: 40.0625em){.govuk-button-group{margin-bottom:15px}}.govuk-button-group .govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;display:inline-block;max-width:100%;margin-top:5px;margin-bottom:20px;text-align:center}@media print{.govuk-button-group .govuk-link{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button-group .govuk-link{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button-group .govuk-link{font-size:14pt;line-height:19px}}.govuk-button-group .govuk-button{margin-bottom:17px}@media (min-width: 40.0625em){.govuk-button-group{margin-right:-15px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline}.govuk-button-group .govuk-button,.govuk-button-group .govuk-link{margin-right:15px}.govuk-button-group .govuk-link{text-align:left}}.govuk-form-group{margin-bottom:20px}.govuk-form-group:after{content:"";display:block;clear:both}@media (min-width: 40.0625em){.govuk-form-group{margin-bottom:30px}}.govuk-form-group .govuk-form-group:last-of-type{margin-bottom:0}.govuk-form-group--error{padding-left:15px;border-left:5px solid #d4351c}.govuk-form-group--error .govuk-form-group{padding:0;border:0}.govuk-grid-row{margin-right:-15px;margin-left:-15px}.govuk-grid-row:after{content:"";display:block;clear:both}.govuk-grid-column-one-quarter{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-quarter{width:25%;float:left}}.govuk-grid-column-one-third{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-third{width:33.3333%;float:left}}.govuk-grid-column-one-half{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-half{width:50%;float:left}}.govuk-grid-column-two-thirds{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-two-thirds{width:66.6666%;float:left}}.govuk-grid-column-three-quarters{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-three-quarters{width:75%;float:left}}.govuk-grid-column-full{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-full{width:100%;float:left}}.govuk-grid-column-one-quarter-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-quarter-from-desktop{width:25%;float:left}}.govuk-grid-column-one-third-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-third-from-desktop{width:33.3333%;float:left}}.govuk-grid-column-one-half-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-half-from-desktop{width:50%;float:left}}.govuk-grid-column-two-thirds-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-two-thirds-from-desktop{width:66.6666%;float:left}}.govuk-grid-column-three-quarters-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-three-quarters-from-desktop{width:75%;float:left}}.govuk-grid-column-full-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-full-from-desktop{width:100%;float:left}}.govuk-main-wrapper{display:block;padding-top:20px;padding-bottom:20px}@media (min-width: 40.0625em){.govuk-main-wrapper{padding-top:40px;padding-bottom:40px}}.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:30px}@media (min-width: 40.0625em){.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:50px}}.govuk-template{background-color:#f3f2f1;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}@media screen{.govuk-template{overflow-y:scroll}}.govuk-template__body{margin:0;background-color:#fff}.govuk-width-container{max-width:960px;margin-right:15px;margin-left:15px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(15px,calc(15px + env(safe-area-inset-right)));margin-left:max(15px,calc(15px + env(safe-area-inset-left)))}}@media (min-width: 40.0625em){.govuk-width-container{margin-right:30px;margin-left:30px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(30px,calc(15px + env(safe-area-inset-right)));margin-left:max(30px,calc(15px + env(safe-area-inset-left)))}}}@media (min-width: 1020px){.govuk-width-container{margin-right:auto;margin-left:auto}@supports (margin: max(0px)){.govuk-width-container{margin-right:auto;margin-left:auto}}}.govuk-accordion{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-accordion{margin-bottom:30px}}.govuk-accordion__section{padding-top:15px}.govuk-accordion__section-heading{margin-top:0;margin-bottom:0;padding-top:15px;padding-bottom:15px}.govuk-accordion__section-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;color:#0b0c0c;display:block;margin-bottom:0;padding-top:15px}@media print{.govuk-accordion__section-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-accordion__section-button{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-accordion__section-button{font-size:18pt;line-height:1.15}}@media print{.govuk-accordion__section-button{color:#000}}.govuk-accordion__section-content>:last-child{margin-bottom:0}.js-enabled .govuk-accordion{border-bottom:1px solid #b1b4b6}.js-enabled .govuk-accordion__section{padding-top:0}.js-enabled .govuk-accordion__section-content{display:none;padding-bottom:30px}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-content{padding-bottom:50px}}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-content{display:block}.js-enabled .govuk-accordion__show-all{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;position:relative;z-index:1;margin-bottom:9px;padding:5px 2px 5px 0;border-width:0;color:#1d70b8;background:none;cursor:pointer;-webkit-appearance:none}@media print{.js-enabled .govuk-accordion__show-all{font-family:sans-serif}}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__show-all{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__show-all{font-size:14pt;line-height:1.15}}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__show-all{margin-bottom:14px}}.js-enabled .govuk-accordion__show-all::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__show-all:hover{color:#0b0c0c;background:#f3f2f1;box-shadow:0 -2px #f3f2f1,0 4px #f3f2f1}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__show-all:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron{background:#0b0c0c}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-heading{padding:0}.js-enabled .govuk-accordion-nav__chevron{box-sizing:border-box;display:inline-block;position:relative;width:1.25rem;height:1.25rem;border:.0625rem solid;border-radius:50%;vertical-align:middle}.js-enabled .govuk-accordion-nav__chevron:after{content:"";box-sizing:border-box;display:block;position:absolute;bottom:.3125rem;left:.375rem;width:.375rem;height:.375rem;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border-top:.125rem solid;border-right:.125rem solid}.js-enabled .govuk-accordion-nav__chevron--down{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.js-enabled .govuk-accordion__section-button{width:100%;padding:10px 0 0;border:0;border-top:1px solid #b1b4b6;border-bottom:10px solid transparent;color:#0b0c0c;background:none;text-align:left;cursor:pointer;-webkit-appearance:none}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-button{padding-bottom:10px}}.js-enabled .govuk-accordion__section-button:active{color:#0b0c0c;background:none}.js-enabled .govuk-accordion__section-button:hover{color:#0b0c0c;background:#f3f2f1}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__section-button:focus{outline:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-button::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-button{padding-bottom:20px;border-bottom:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:3px}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:2px}}.js-enabled .govuk-accordion__section-toggle,.js-enabled .govuk-accordion__section-heading-text,.js-enabled .govuk-accordion__section-summary{display:block;margin-bottom:13px}.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-toggle-focus{display:inline}.js-enabled .govuk-accordion__section-toggle{font-size:16px;font-size:1rem;line-height:1.25;font-weight:400;color:#1d70b8}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-toggle{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__section-toggle{font-size:14pt;line-height:1.15}}.js-enabled .govuk-accordion__show-all-text,.js-enabled .govuk-accordion__section-toggle-text{margin-left:5px;vertical-align:middle}@media screen and (forced-colors: active){.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{background-color:transparent}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{background:transparent;background-color:transparent}}@media (hover: none){.js-enabled .govuk-accordion__section-header:hover{border-top-color:#b1b4b6;box-shadow:inset 0 3px #1d70b8}.js-enabled .govuk-accordion__section-header:hover .govuk-accordion__section-button{border-top-color:#b1b4b6}}.govuk-back-link{font-size:14px;font-size:.875rem;line-height:1.1428571429;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;position:relative;margin-top:15px;margin-bottom:15px;padding-left:14px}@media (min-width: 40.0625em){.govuk-back-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-back-link{font-size:14pt;line-height:1.2}}@media print{.govuk-back-link{font-family:sans-serif}}.govuk-back-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-back-link:link,.govuk-back-link:visited{color:#0b0c0c}@media print{.govuk-back-link:link,.govuk-back-link:visited{color:#000}}.govuk-back-link:hover{color:#0b0c0cfc}.govuk-back-link:active,.govuk-back-link:focus{color:#0b0c0c}@media print{.govuk-back-link:active,.govuk-back-link:focus{color:#000}}.govuk-back-link:before{content:"";display:block;position:absolute;top:0;bottom:0;left:3px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(225deg);-ms-transform:rotate(225deg);transform:rotate(225deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-back-link:focus:before{border-color:#0b0c0c}.govuk-back-link:after{content:"";position:absolute;top:-14px;right:0;bottom:-14px;left:0}.govuk-breadcrumbs{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;margin-top:15px;margin-bottom:10px}@media print{.govuk-breadcrumbs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-breadcrumbs{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-breadcrumbs{font-size:14pt;line-height:1.2}}@media print{.govuk-breadcrumbs{color:#000}}.govuk-breadcrumbs__list{margin:0;padding:0;list-style-type:none}.govuk-breadcrumbs__list:after{content:"";display:block;clear:both}.govuk-breadcrumbs__list-item{display:inline-block;position:relative;margin-bottom:5px;margin-left:10px;padding-left:15.655px;float:left}.govuk-breadcrumbs__list-item:before{content:"";display:block;position:absolute;top:0;bottom:0;left:-3.31px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-breadcrumbs__list-item:first-child{margin-left:0;padding-left:0}.govuk-breadcrumbs__list-item:first-child:before{content:none;display:none}.govuk-breadcrumbs__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-breadcrumbs__link{font-family:sans-serif}}.govuk-breadcrumbs__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#000}}.govuk-breadcrumbs__link:hover{color:#0b0c0cfc}.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#000}}@media (max-width: 40.0525em){.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item{display:none}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:first-child,.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:last-child{display:inline-block}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:before{top:6px;margin:0}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}}.govuk-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;box-sizing:border-box;display:inline-block;position:relative;width:100%;margin:0 0 22px;padding:8px 10px 7px;border:2px solid transparent;border-radius:0;color:#fff;background-color:#00703c;box-shadow:0 2px #002d18;text-align:center;vertical-align:top;cursor:pointer;-webkit-appearance:none}@media print{.govuk-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button{font-size:14pt;line-height:19px}}@media (min-width: 40.0625em){.govuk-button{margin-bottom:32px}}@media (min-width: 40.0625em){.govuk-button{width:auto}}.govuk-button:link,.govuk-button:visited,.govuk-button:active,.govuk-button:hover{color:#fff;text-decoration:none}.govuk-button::-moz-focus-inner{padding:0;border:0}.govuk-button:hover{background-color:#005a30}.govuk-button:active{top:2px}.govuk-button:focus{border-color:#fd0;outline:3px solid transparent;box-shadow:inset 0 0 0 1px #fd0}.govuk-button:focus:not(:active):not(:hover){border-color:#fd0;color:#0b0c0c;background-color:#fd0;box-shadow:0 2px #0b0c0c}.govuk-button:before{content:"";display:block;position:absolute;top:-2px;right:-2px;bottom:-4px;left:-2px;background:transparent}.govuk-button:active:before{top:-4px}.govuk-button--disabled,.govuk-button[disabled=disabled],.govuk-button[disabled]{opacity:.5}.govuk-button--disabled:hover,.govuk-button[disabled=disabled]:hover,.govuk-button[disabled]:hover{background-color:#00703c;cursor:default}.govuk-button--disabled:active,.govuk-button[disabled=disabled]:active,.govuk-button[disabled]:active{top:0;box-shadow:0 2px #002d18}.govuk-button--secondary{background-color:#f3f2f1;box-shadow:0 2px #929191}.govuk-button--secondary,.govuk-button--secondary:link,.govuk-button--secondary:visited,.govuk-button--secondary:active,.govuk-button--secondary:hover{color:#0b0c0c}.govuk-button--secondary:hover{background-color:#dbdad9}.govuk-button--secondary:hover[disabled]{background-color:#f3f2f1}.govuk-button--warning{background-color:#d4351c;box-shadow:0 2px #55150b}.govuk-button--warning,.govuk-button--warning:link,.govuk-button--warning:visited,.govuk-button--warning:active,.govuk-button--warning:hover{color:#fff}.govuk-button--warning:hover{background-color:#aa2a16}.govuk-button--warning:hover[disabled]{background-color:#d4351c}.govuk-button--start{font-weight:700;font-size:18px;font-size:1.125rem;line-height:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-height:auto;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}@media (min-width: 40.0625em){.govuk-button--start{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-button--start{font-size:18pt;line-height:1}}.govuk-button__start-icon{margin-left:5px;vertical-align:middle;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;forced-color-adjust:auto}@media (min-width: 48.0625em){.govuk-button__start-icon{margin-left:10px}}.govuk-error-message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px;clear:both;color:#d4351c}@media print{.govuk-error-message{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-message{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-message{font-size:14pt;line-height:1.15}}.govuk-fieldset{min-width:0;margin:0;padding:0;border:0}.govuk-fieldset:after{content:"";display:block;clear:both}@supports not (caret-color: auto){.govuk-fieldset,x:-moz-any-link{display:table-cell}}.govuk-fieldset__legend{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;box-sizing:border-box;display:table;max-width:100%;margin-bottom:10px;padding:0;white-space:normal}@media print{.govuk-fieldset__legend{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend{font-size:14pt;line-height:1.15}}@media print{.govuk-fieldset__legend{color:#000}}.govuk-fieldset__legend--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-fieldset__legend--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-fieldset__legend--xl{font-size:32pt;line-height:1.15}}.govuk-fieldset__legend--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-fieldset__legend--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-fieldset__legend--l{font-size:24pt;line-height:1.05}}.govuk-fieldset__legend--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-fieldset__legend--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-fieldset__legend--m{font-size:18pt;line-height:1.15}}.govuk-fieldset__legend--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-fieldset__legend--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend--s{font-size:14pt;line-height:1.15}}.govuk-fieldset__heading{margin:0;font-size:inherit;font-weight:inherit}.govuk-hint{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:15px;color:#505a5f}@media print{.govuk-hint{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-hint{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-hint{font-size:14pt;line-height:1.15}}.govuk-label:not(.govuk-label--m):not(.govuk-label--l):not(.govuk-label--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend:not(.govuk-fieldset__legend--m):not(.govuk-fieldset__legend--l):not(.govuk-fieldset__legend--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend+.govuk-hint{margin-top:-5px}.govuk-label{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;margin-bottom:5px}@media print{.govuk-label{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label{font-size:14pt;line-height:1.15}}@media print{.govuk-label{color:#000}}.govuk-label--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-label--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-label--xl{font-size:32pt;line-height:1.15}}.govuk-label--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-label--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-label--l{font-size:24pt;line-height:1.05}}.govuk-label--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:10px}@media print{.govuk-label--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-label--m{font-size:18pt;line-height:1.15}}.govuk-label--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-label--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label--s{font-size:14pt;line-height:1.15}}.govuk-label-wrapper{margin:0}.govuk-checkboxes__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-checkboxes__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__item{font-size:14pt;line-height:1.15}}.govuk-checkboxes__item:last-child,.govuk-checkboxes__item:last-of-type{margin-bottom:0}.govuk-checkboxes__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-checkboxes__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-checkboxes__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;background:transparent}.govuk-checkboxes__label:after{content:"";box-sizing:border-box;position:absolute;top:11px;left:9px;width:23px;height:12px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border:solid;border-width:0 0 5px 5px;border-top-color:transparent;opacity:0;background:transparent}.govuk-checkboxes__hint{display:block;padding-right:15px;padding-left:15px}.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 3px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{outline-color:Highlight}}.govuk-checkboxes__input:checked+.govuk-checkboxes__label:after{opacity:1}.govuk-checkboxes__input:disabled,.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{cursor:default}.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{opacity:.5}.govuk-checkboxes__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-checkboxes__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-checkboxes__divider{color:#000}}.govuk-checkboxes__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-checkboxes__conditional{margin-bottom:20px}}.js-enabled .govuk-checkboxes__conditional--hidden{display:none}.govuk-checkboxes__conditional>:last-child{margin-bottom:0}.govuk-checkboxes--small .govuk-checkboxes__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-checkboxes--small .govuk-checkboxes__item:after{content:"";display:block;clear:both}.govuk-checkboxes--small .govuk-checkboxes__input{left:-10px}.govuk-checkboxes--small .govuk-checkboxes__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-checkboxes--small .govuk-checkboxes__label{padding:11px 15px 10px 1px}}.govuk-checkboxes--small .govuk-checkboxes__label:before{top:8px;width:24px;height:24px}.govuk-checkboxes--small .govuk-checkboxes__label:after{top:15px;left:6px;width:12px;height:6.5px;border-width:0 0 3px 3px}.govuk-checkboxes--small .govuk-checkboxes__hint{padding:0;clear:both}.govuk-checkboxes--small .govuk-checkboxes__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:initial}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0}}.govuk-textarea{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:block;width:100%;min-height:40px;margin-bottom:20px;padding:5px;resize:vertical;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none}@media print{.govuk-textarea{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-textarea{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-textarea{font-size:14pt;line-height:1.25}}@media (min-width: 40.0625em){.govuk-textarea{margin-bottom:30px}}.govuk-textarea:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-textarea--error{border-color:#d4351c}.govuk-textarea--error:focus{border-color:#0b0c0c}.govuk-character-count{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-character-count{margin-bottom:30px}}.govuk-character-count .govuk-form-group,.govuk-character-count .govuk-textarea{margin-bottom:5px}.govuk-character-count__message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400;margin-top:0;margin-bottom:0}@media print{.govuk-character-count__message{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-character-count__message{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-character-count__message--disabled{visibility:hidden}.govuk-cookie-banner{padding-top:20px;border-bottom:10px solid transparent;background-color:#f3f2f1}.govuk-cookie-banner[hidden]{display:none}.govuk-cookie-banner__message{margin-bottom:-10px}.govuk-cookie-banner__message[hidden]{display:none}.govuk-cookie-banner__message:focus{outline:none}.govuk-summary-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin:0 0 20px}@media print{.govuk-summary-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-summary-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-summary-list{font-size:14pt;line-height:1.15}}@media print{.govuk-summary-list{color:#000}}@media (min-width: 40.0625em){.govuk-summary-list{display:table;width:100%;table-layout:fixed;border-collapse:collapse}}@media (min-width: 40.0625em){.govuk-summary-list{margin-bottom:30px}}.govuk-summary-list__row{border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-summary-list__row{margin-bottom:15px}}@media (min-width: 40.0625em){.govuk-summary-list__row{display:table-row}}@media (min-width: 40.0625em){.govuk-summary-list__row--no-actions:after{content:"";display:table-cell;width:20%}}.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{margin:0}@media (min-width: 40.0625em){.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{display:table-cell;padding-top:10px;padding-right:20px;padding-bottom:10px}}.govuk-summary-list__actions{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-summary-list__actions{width:20%;padding-right:0;text-align:right}}.govuk-summary-list__key,.govuk-summary-list__value{word-wrap:break-word;overflow-wrap:break-word}.govuk-summary-list__key{margin-bottom:5px;font-weight:700}@media (min-width: 40.0625em){.govuk-summary-list__key{width:30%}}@media (max-width: 40.0525em){.govuk-summary-list__value{margin-bottom:15px}}.govuk-summary-list__value>p{margin-bottom:10px}.govuk-summary-list__value>:last-child{margin-bottom:0}.govuk-summary-list__actions-list{width:100%;margin:0;padding:0}.govuk-summary-list__actions-list-item{display:inline;margin-right:10px;padding-right:10px}.govuk-summary-list__actions-list-item:not(:last-child){border-right:1px solid #b1b4b6}.govuk-summary-list__actions-list-item:last-child{margin-right:0;padding-right:0;border:0}.govuk-summary-list--no-border .govuk-summary-list__row{border:0}@media (min-width: 40.0625em){.govuk-summary-list--no-border .govuk-summary-list__key,.govuk-summary-list--no-border .govuk-summary-list__value,.govuk-summary-list--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-summary-list__row--no-border{border:0}@media (min-width: 40.0625em){.govuk-summary-list__row--no-border .govuk-summary-list__key,.govuk-summary-list__row--no-border .govuk-summary-list__value,.govuk-summary-list__row--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-input{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;width:100%;height:40px;height:2.5rem;margin-top:0;padding:5px;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media print{.govuk-input{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input{font-size:14pt;line-height:1.15}}.govuk-input:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-input::-webkit-outer-spin-button,.govuk-input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.govuk-input[type=number]{-moz-appearance:textfield}.govuk-input--error{border-color:#d4351c}.govuk-input--error:focus{border-color:#0b0c0c}.govuk-input--width-30{max-width:59ex}.govuk-input--width-20{max-width:41ex}.govuk-input--width-10{max-width:23ex}.govuk-input--width-5{max-width:10.8ex}.govuk-input--width-4{max-width:9ex}.govuk-input--width-3{max-width:7.2ex}.govuk-input--width-2{max-width:5.4ex}.govuk-input__wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.govuk-input__wrapper .govuk-input{-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto}.govuk-input__wrapper .govuk-input:focus{z-index:1}@media (max-width: 19.99em){.govuk-input__wrapper{display:block}.govuk-input__wrapper .govuk-input{max-width:100%}}.govuk-input__prefix,.govuk-input__suffix{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:inline-block;min-width:40px;min-width:2.5rem;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;background-color:#f3f2f1;text-align:center;white-space:nowrap;cursor:default;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}@media print{.govuk-input__prefix,.govuk-input__suffix{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input__prefix,.govuk-input__suffix{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input__prefix,.govuk-input__suffix{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-input__prefix,.govuk-input__suffix{line-height:1.6}}@media (max-width: 19.99em){.govuk-input__prefix,.govuk-input__suffix{display:block;height:100%;white-space:normal}}@media (max-width: 19.99em){.govuk-input__prefix{border-bottom:0}}@media (min-width: 20em){.govuk-input__prefix{border-right:0}}@media (max-width: 19.99em){.govuk-input__suffix{border-top:0}}@media (min-width: 20em){.govuk-input__suffix{border-left:0}}.govuk-date-input{font-size:0}.govuk-date-input:after{content:"";display:block;clear:both}.govuk-date-input__item{display:inline-block;margin-right:20px;margin-bottom:0}.govuk-date-input__label{display:block}.govuk-date-input__input{margin-bottom:0}.govuk-details{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:20px;display:block}@media print{.govuk-details{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-details{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-details{font-size:14pt;line-height:1.15}}@media print{.govuk-details{color:#000}}@media (min-width: 40.0625em){.govuk-details{margin-bottom:30px}}.govuk-details__summary{display:inline-block;position:relative;margin-bottom:5px;padding-left:25px;color:#1d70b8;cursor:pointer}.govuk-details__summary:hover{color:#003078}.govuk-details__summary:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-details__summary-text{text-decoration:underline}.govuk-details__summary:focus .govuk-details__summary-text{text-decoration:none}.govuk-details__summary::-webkit-details-marker{display:none}.govuk-details__summary:before{content:"";position:absolute;top:-1px;bottom:0;left:0;margin:auto;display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,100% 50%,0% 100%);clip-path:polygon(0% 0%,100% 50%,0% 100%);border-width:7px 0 7px 12.124px;border-left-color:inherit}.govuk-details[open]>.govuk-details__summary:before{display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:12.124px 7px 0 7px;border-top-color:inherit}.govuk-details__text{padding-top:15px;padding-bottom:15px;padding-left:20px;border-left:5px solid #b1b4b6}.govuk-details__text p{margin-top:0;margin-bottom:20px}.govuk-details__text>:last-child{margin-bottom:0}.govuk-error-summary{color:#0b0c0c;padding:15px;margin-bottom:30px;border:5px solid #d4351c}@media print{.govuk-error-summary{color:#000}}@media (min-width: 40.0625em){.govuk-error-summary{padding:20px}}@media (min-width: 40.0625em){.govuk-error-summary{margin-bottom:50px}}.govuk-error-summary:focus{outline:3px solid #ffdd00}.govuk-error-summary__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:15px}@media print{.govuk-error-summary__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__title{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-error-summary__title{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-error-summary__title{margin-bottom:20px}}.govuk-error-summary__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-error-summary__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__body{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-summary__body{font-size:14pt;line-height:1.15}}.govuk-error-summary__body p{margin-top:0;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-error-summary__body p{margin-bottom:20px}}.govuk-error-summary__list{margin-top:0;margin-bottom:0}.govuk-error-summary__list a{font-weight:700;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-error-summary__list a{font-family:sans-serif}}.govuk-error-summary__list a:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-error-summary__list a:link,.govuk-error-summary__list a:visited{color:#d4351c}.govuk-error-summary__list a:hover{color:#942514}.govuk-error-summary__list a:active{color:#d4351c}.govuk-error-summary__list a:focus{color:#0b0c0c}.govuk-file-upload{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;max-width:100%;margin-left:-5px;padding:5px}@media print{.govuk-file-upload{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-file-upload{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-file-upload{font-size:14pt;line-height:1.15}}@media print{.govuk-file-upload{color:#000}}.govuk-file-upload::-webkit-file-upload-button{-webkit-appearance:button;color:inherit;font:inherit}.govuk-file-upload:focus{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-file-upload:focus-within{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-footer{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;padding-top:25px;padding-bottom:15px;border-top:1px solid #b1b4b6;color:#0b0c0c;background:#f3f2f1}@media print{.govuk-footer{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-footer{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-footer{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-footer{padding-top:40px}}@media (min-width: 40.0625em){.govuk-footer{padding-bottom:25px}}.govuk-footer__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-footer__link{font-family:sans-serif}}.govuk-footer__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-footer__link:link,.govuk-footer__link:visited{color:#0b0c0c}@media print{.govuk-footer__link:link,.govuk-footer__link:visited{color:#000}}.govuk-footer__link:hover{color:#0b0c0cfc}.govuk-footer__link:active,.govuk-footer__link:focus{color:#0b0c0c}@media print{.govuk-footer__link:active,.govuk-footer__link:focus{color:#000}}.govuk-footer__section-break{margin:0 0 30px;border:0;border-bottom:1px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-footer__section-break{margin-bottom:50px}}.govuk-footer__meta{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-right:-15px;margin-left:-15px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.govuk-footer__meta-item{margin-right:15px;margin-bottom:25px;margin-left:15px}.govuk-footer__meta-item--grow{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}@media (max-width: 40.0525em){.govuk-footer__meta-item--grow{-webkit-flex-basis:320px;-ms-flex-preferred-size:320px;flex-basis:320px}}.govuk-footer__licence-logo{display:inline-block;margin-right:10px;vertical-align:top;forced-color-adjust:auto}@media (max-width: 48.0525em){.govuk-footer__licence-logo{margin-bottom:15px}}.govuk-footer__licence-description{display:inline-block}.govuk-footer__copyright-logo{display:inline-block;min-width:125px;padding-top:112px;background-image:url(/assets/images/govuk-crest.png);background-repeat:no-repeat;background-position:50% 0%;background-size:125px 102px;text-align:center;white-space:nowrap}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){.govuk-footer__copyright-logo{background-image:url(/assets/images/govuk-crest-2x.png)}}.govuk-footer__inline-list{margin-top:0;margin-bottom:15px;padding:0}.govuk-footer__meta-custom{margin-bottom:20px}.govuk-footer__inline-list-item{display:inline-block;margin-right:15px;margin-bottom:5px}.govuk-footer__heading{margin-bottom:30px;padding-bottom:20px;border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-footer__heading{padding-bottom:10px}}.govuk-footer__navigation{margin-right:-15px;margin-left:-15px}.govuk-footer__navigation:after{content:"";display:block;clear:both}.govuk-footer__section{display:inline-block;margin-bottom:30px;vertical-align:top}.govuk-footer__list{margin:0;padding:0;list-style:none;-webkit-column-gap:30px;column-gap:30px}.govuk-footer__list .govuk-footer__link:hover{text-decoration-thickness:auto}@media (min-width: 48.0625em){.govuk-footer__list--columns-2{-webkit-column-count:2;column-count:2}.govuk-footer__list--columns-3{-webkit-column-count:3;column-count:3}}.govuk-footer__list-item{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-footer__list-item{margin-bottom:20px}}.govuk-footer__list-item:last-child{margin-bottom:0}.govuk-header{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;border-bottom:10px solid #ffffff;color:#fff;background:#0b0c0c}@media print{.govuk-header{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header{font-size:14pt;line-height:1.2}}.govuk-header__container--full-width{padding:0 15px;border-color:#1d70b8}.govuk-header__container--full-width .govuk-header__menu-button{right:15px}.govuk-header__container{position:relative;margin-bottom:-10px;padding-top:10px;border-bottom:10px solid #1d70b8}.govuk-header__container:after{content:"";display:block;clear:both}.govuk-header__logotype{display:inline-block;margin-right:5px}@media (forced-colors: active){.govuk-header__logotype{forced-color-adjust:none;color:linktext}}.govuk-header__logotype:last-child{margin-right:0}.govuk-header__logotype-crown{position:relative;top:-1px;margin-right:1px;fill:currentColor;vertical-align:top}.govuk-header__logotype-crown-fallback-image{width:36px;height:32px;border:0;vertical-align:bottom}.govuk-header__product-name{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1;display:inline-table}@media print{.govuk-header__product-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__product-name{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-header__product-name{font-size:18pt;line-height:1}}.govuk-header__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none}@media print{.govuk-header__link{font-family:sans-serif}}.govuk-header__link:link,.govuk-header__link:visited{color:#fff}.govuk-header__link:hover,.govuk-header__link:active{color:#fffffffc}.govuk-header__link:focus{color:#0b0c0c}.govuk-header__link:hover{text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:.1em}.govuk-header__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__link--homepage{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:inline-block;margin-right:10px;font-size:30px;line-height:1}@media print{.govuk-header__link--homepage{font-family:sans-serif}}.govuk-header__link--homepage:link,.govuk-header__link--homepage:visited{text-decoration:none}.govuk-header__link--homepage:hover,.govuk-header__link--homepage:active{margin-bottom:-3px;border-bottom:3px solid}.govuk-header__link--homepage:focus{margin-bottom:0;border-bottom:0}.govuk-header__link--service-name{display:inline-block;margin-bottom:10px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111}@media print{.govuk-header__link--service-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__link--service-name{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-header__link--service-name{font-size:18pt;line-height:1.15}}.govuk-header__logo,.govuk-header__content{box-sizing:border-box}.govuk-header__logo{margin-bottom:10px;padding-right:50px}@media (min-width: 40.0625em){.govuk-header__logo{margin-bottom:10px}}@media (min-width: 48.0625em){.govuk-header__logo{width:33.33%;padding-right:15px;float:left;vertical-align:top}}@media (min-width: 48.0625em){.govuk-header__content{width:66.66%;padding-left:15px;float:left}}.govuk-header__menu-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:none;position:absolute;top:20px;right:0;margin:0;padding:0;border:0;color:#fff;background:none;cursor:pointer}@media print{.govuk-header__menu-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__menu-button{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__menu-button{font-size:14pt;line-height:1.2}}.govuk-header__menu-button:hover{-webkit-text-decoration:solid underline 3px;text-decoration:solid underline 3px;text-underline-offset:.1em}.govuk-header__menu-button:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__menu-button:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:8.66px 5px 0 5px;border-top-color:inherit;content:"";margin-left:5px}@media (min-width: 40.0625em){.govuk-header__menu-button{top:15px}}.govuk-header__menu-button--open:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(50% 0%,0% 100%,100% 100%);clip-path:polygon(50% 0%,0% 100%,100% 100%);border-width:0 5px 8.66px 5px;border-bottom-color:inherit}@media (min-width: 48.0625em){.govuk-header__navigation{margin-bottom:10px}}.govuk-header__navigation-list{margin:0;padding:0;list-style:none}.js-enabled .govuk-header__menu-button{display:block}@media (min-width: 48.0625em){.js-enabled .govuk-header__menu-button{display:none}}.js-enabled .govuk-header__navigation-list{display:none}@media (min-width: 48.0625em){.js-enabled .govuk-header__navigation-list{display:block}}.js-enabled .govuk-header__navigation-list--open{display:block}@media (min-width: 48.0625em){.govuk-header__navigation--end{margin:0;padding:5px 0;text-align:right}}.govuk-header__navigation--no-service-name{padding-top:40px}.govuk-header__navigation-item{padding:10px 0;border-bottom:1px solid #2e3133}@media (min-width: 48.0625em){.govuk-header__navigation-item{display:inline-block;margin-right:15px;padding:5px 0;border:0}}.govuk-header__navigation-item a{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1.1428571429;white-space:nowrap}@media print{.govuk-header__navigation-item a{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__navigation-item a{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__navigation-item a{font-size:14pt;line-height:1.2}}.govuk-header__navigation-item--active a:link,.govuk-header__navigation-item--active a:hover,.govuk-header__navigation-item--active a:visited{color:#1d8feb}.govuk-header__navigation-item--active a:focus{color:#0b0c0c}.govuk-header__navigation-item:last-child{margin-right:0;border-bottom:0}@media print{.govuk-header{border-bottom-width:0;color:#0b0c0c;background:transparent}.govuk-header__logotype-crown-fallback-image{display:none}.govuk-header__link:link,.govuk-header__link:visited{color:#0b0c0c}.govuk-header__link:after{display:none}}.govuk-inset-text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;padding:15px;margin-top:20px;margin-bottom:20px;clear:both;border-left:10px solid #b1b4b6}@media print{.govuk-inset-text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-inset-text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-inset-text{font-size:14pt;line-height:1.15}}@media print{.govuk-inset-text{color:#000}}@media (min-width: 40.0625em){.govuk-inset-text{margin-top:30px}}@media (min-width: 40.0625em){.govuk-inset-text{margin-bottom:30px}}.govuk-inset-text>:first-child{margin-top:0}.govuk-inset-text>:only-child,.govuk-inset-text>:last-child{margin-bottom:0}.govuk-notification-banner{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:30px;border:5px solid #1d70b8;background-color:#1d70b8}@media print{.govuk-notification-banner{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-notification-banner{margin-bottom:50px}}.govuk-notification-banner:focus{outline:3px solid #ffdd00}.govuk-notification-banner__header{padding:2px 15px 5px;border-bottom:1px solid transparent}@media (min-width: 40.0625em){.govuk-notification-banner__header{padding:2px 20px 5px}}.govuk-notification-banner__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;margin:0;padding:0;color:#fff}@media print{.govuk-notification-banner__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner__title{font-size:14pt;line-height:1.15}}.govuk-notification-banner__content{color:#0b0c0c;padding:15px;background-color:#fff}@media print{.govuk-notification-banner__content{color:#000}}@media (min-width: 40.0625em){.govuk-notification-banner__content{padding:20px}}.govuk-notification-banner__content>*{box-sizing:border-box;max-width:605px}.govuk-notification-banner__content>:last-child{margin-bottom:0}.govuk-notification-banner__heading{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin:0 0 15px;padding:0}@media print{.govuk-notification-banner__heading{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__heading{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-notification-banner__heading{font-size:18pt;line-height:1.15}}.govuk-notification-banner__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-notification-banner__link{font-family:sans-serif}}.govuk-notification-banner__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-notification-banner__link:link,.govuk-notification-banner__link:visited{color:#1d70b8}.govuk-notification-banner__link:hover{color:#003078}.govuk-notification-banner__link:active{color:#0b0c0c}.govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-notification-banner--success{border-color:#00703c;background-color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:link,.govuk-notification-banner--success .govuk-notification-banner__link:visited{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:hover{color:#004e2a}.govuk-notification-banner--success .govuk-notification-banner__link:active{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-panel{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;margin-bottom:15px;padding:35px;border:5px solid transparent;text-align:center}@media print{.govuk-panel{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-panel{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-panel{padding:10px;overflow-wrap:break-word;word-wrap:break-word}}.govuk-panel--confirmation{color:#fff;background:#00703c}@media print{.govuk-panel--confirmation{border-color:currentColor;color:#000;background:none}}.govuk-panel__title{margin-top:0;margin-bottom:30px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375}@media print{.govuk-panel__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__title{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-panel__title{font-size:32pt;line-height:1.15}}.govuk-panel__title:last-child{margin-bottom:0}.govuk-panel__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:24px;font-size:1.5rem;line-height:1.0416666667}@media print{.govuk-panel__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__body{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-panel__body{font-size:24pt;line-height:1.05}}.govuk-tag{display:inline-block;outline:2px solid transparent;outline-offset:-2px;color:#fff;background-color:#1d70b8;letter-spacing:1px;text-decoration:none;text-transform:uppercase;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1;padding:5px 8px 4px}@media print{.govuk-tag{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tag{font-size:16px;font-size:1rem;line-height:1}}@media print{.govuk-tag{font-size:14pt;line-height:1}}.govuk-tag--grey{color:#383f43;background:#eeefef}.govuk-tag--purple{color:#3d2375;background:#dbd5e9}.govuk-tag--turquoise{color:#10403c;background:#bfe3e0}.govuk-tag--blue{color:#144e81;background:#d2e2f1}.govuk-tag--yellow{color:#594d00;background:#fff7bf}.govuk-tag--orange{color:#6e3619;background:#fcd6c3}.govuk-tag--red{color:#942514;background:#f6d7d2}.govuk-tag--pink{color:#80224d;background:#f7d7e6}.govuk-tag--green{color:#005a30;background:#cce2d8}.govuk-phase-banner{padding-top:10px;padding-bottom:10px;border-bottom:1px solid #b1b4b6}.govuk-phase-banner__content{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;display:table;margin:0}@media print{.govuk-phase-banner__content{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-phase-banner__content{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-phase-banner__content{font-size:14pt;line-height:1.2}}@media print{.govuk-phase-banner__content{color:#000}}.govuk-phase-banner__content__tag{margin-right:10px}.govuk-phase-banner__text{display:table-cell;vertical-align:middle}.govuk-tabs{margin-top:5px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-tabs{margin-top:5px}}@media (min-width: 40.0625em){.govuk-tabs{margin-bottom:30px}}.govuk-tabs__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:10px}@media print{.govuk-tabs__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__title{font-size:14pt;line-height:1.15}}@media print{.govuk-tabs__title{color:#000}}.govuk-tabs__list{margin:0 0 20px;padding:0;list-style:none}@media (min-width: 40.0625em){.govuk-tabs__list{margin-bottom:30px}}.govuk-tabs__list-item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-left:25px}@media print{.govuk-tabs__list-item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__list-item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__list-item{font-size:14pt;line-height:1.15}}.govuk-tabs__list-item:before{color:#0b0c0c;content:"\\2014";margin-left:-25px;padding-right:5px}@media print{.govuk-tabs__list-item:before{color:#000}}.govuk-tabs__tab{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;margin-bottom:10px}@media print{.govuk-tabs__tab{font-family:sans-serif}}.govuk-tabs__tab:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-tabs__tab:link{color:#1d70b8}.govuk-tabs__tab:visited{color:#4c2c92}.govuk-tabs__tab:hover{color:#003078}.govuk-tabs__tab:active{color:#0b0c0c}.govuk-tabs__tab:focus{color:#0b0c0c}.govuk-tabs__panel{margin-bottom:30px}@media (min-width: 40.0625em){.govuk-tabs__panel{margin-bottom:50px}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__list{margin-bottom:0;border-bottom:1px solid #b1b4b6}.js-enabled .govuk-tabs__list:after{content:"";display:block;clear:both}.js-enabled .govuk-tabs__title{display:none}.js-enabled .govuk-tabs__list-item{position:relative;margin-right:5px;margin-bottom:0;margin-left:0;padding:10px 20px;float:left;background-color:#f3f2f1;text-align:center}.js-enabled .govuk-tabs__list-item:before{content:none}.js-enabled .govuk-tabs__list-item--selected{position:relative;margin-top:-5px;margin-bottom:-1px;padding:14px 19px 16px;border:1px solid #b1b4b6;border-bottom:0;background-color:#fff}.js-enabled .govuk-tabs__list-item--selected .govuk-tabs__tab{text-decoration:none}.js-enabled .govuk-tabs__tab{margin-bottom:0}.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:hover{color:#0b0c0cfc}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0;padding:30px 20px;border:1px solid #b1b4b6;border-top:0}}@media (min-width: 40.0625em) and (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel>:last-child{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel--hidden{display:none}}.govuk-radios__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-radios__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__item{font-size:14pt;line-height:1.15}}.govuk-radios__item:last-child,.govuk-radios__item:last-of-type{margin-bottom:0}.govuk-radios__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-radios__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-radios__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;border-radius:50%;background:transparent}.govuk-radios__label:after{content:"";position:absolute;top:10px;left:10px;width:0;height:0;border:10px solid currentColor;border-radius:50%;opacity:0;background:currentColor}.govuk-radios__hint{display:block;padding-right:15px;padding-left:15px}.govuk-radios__input:focus+.govuk-radios__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 4px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-radios__input:focus+.govuk-radios__label:before{outline-color:Highlight}}.govuk-radios__input:checked+.govuk-radios__label:after{opacity:1}.govuk-radios__input:disabled,.govuk-radios__input:disabled+.govuk-radios__label{cursor:default}.govuk-radios__input:disabled+.govuk-radios__label{opacity:.5}@media (min-width: 40.0625em){.govuk-radios--inline:after{content:"";display:block;clear:both}.govuk-radios--inline .govuk-radios__item{margin-right:20px;float:left;clear:none}}.govuk-radios__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-radios__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-radios__divider{color:#000}}.govuk-radios__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-radios__conditional{margin-bottom:20px}}.js-enabled .govuk-radios__conditional--hidden{display:none}.govuk-radios__conditional>:last-child{margin-bottom:0}.govuk-radios--small .govuk-radios__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-radios--small .govuk-radios__item:after{content:"";display:block;clear:both}.govuk-radios--small .govuk-radios__input{left:-10px}.govuk-radios--small .govuk-radios__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-radios--small .govuk-radios__label{padding:11px 15px 10px 1px}}.govuk-radios--small .govuk-radios__label:before{top:8px;width:24px;height:24px}.govuk-radios--small .govuk-radios__label:after{top:15px;left:7px;border-width:5px}.govuk-radios--small .govuk-radios__hint{padding:0;clear:both;pointer-events:none}.govuk-radios--small .govuk-radios__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-radios--small .govuk-radios__divider{width:24px;margin-bottom:5px}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:initial}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0}}.govuk-select{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;max-width:100%;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;color:#0b0c0c;background-color:#fff}@media print{.govuk-select{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-select{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-select{font-size:14pt;line-height:1.25}}.govuk-select:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-select option:active,.govuk-select option:checked,.govuk-select:focus::-ms-value{color:#fff;background-color:#1d70b8}.govuk-select--error{border-color:#d4351c}.govuk-select--error:focus{border-color:#0b0c0c}.govuk-skip-link{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:block;padding:10px 15px}.govuk-skip-link:active,.govuk-skip-link:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}@media print{.govuk-skip-link{font-family:sans-serif}}.govuk-skip-link:link,.govuk-skip-link:visited{color:#0b0c0c}@media print{.govuk-skip-link:link,.govuk-skip-link:visited{color:#000}}.govuk-skip-link:hover{color:#0b0c0cfc}.govuk-skip-link:active,.govuk-skip-link:focus{color:#0b0c0c}@media print{.govuk-skip-link:active,.govuk-skip-link:focus{color:#000}}@media (min-width: 40.0625em){.govuk-skip-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-skip-link{font-size:14pt;line-height:1.2}}@supports (padding: max(0px)){.govuk-skip-link{padding-right:max(15px,calc(15px + env(safe-area-inset-right)));padding-left:max(15px,calc(15px + env(safe-area-inset-left)))}}.govuk-skip-link:focus{outline:3px solid #ffdd00;outline-offset:0;background-color:#fd0}.govuk-skip-link-focused-element:focus{outline:none}.govuk-table{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:100%;margin-bottom:20px;border-spacing:0;border-collapse:collapse}@media print{.govuk-table{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table{font-size:14pt;line-height:1.15}}@media print{.govuk-table{color:#000}}@media (min-width: 40.0625em){.govuk-table{margin-bottom:30px}}.govuk-table__header{font-weight:700}.govuk-table__header,.govuk-table__cell{padding:10px 20px 10px 0;border-bottom:1px solid #b1b4b6;text-align:left;vertical-align:top}.govuk-table__cell--numeric{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400}@media print{.govuk-table__cell--numeric{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-table__cell--numeric{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-table__header--numeric,.govuk-table__cell--numeric{text-align:right}.govuk-table__header:last-child,.govuk-table__cell:last-child{padding-right:0}.govuk-table__caption{font-weight:700;display:table-caption;text-align:left}.govuk-table__caption--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-table__caption--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-table__caption--xl{font-size:32pt;line-height:1.15}}.govuk-table__caption--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-table__caption--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-table__caption--l{font-size:24pt;line-height:1.05}}.govuk-table__caption--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-table__caption--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-table__caption--m{font-size:18pt;line-height:1.15}}.govuk-table__caption--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-table__caption--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table__caption--s{font-size:14pt;line-height:1.15}}.govuk-warning-text{position:relative;margin-bottom:20px;padding:10px 0}@media (min-width: 40.0625em){.govuk-warning-text{margin-bottom:30px}}.govuk-warning-text__assistive{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-warning-text__icon{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;box-sizing:border-box;display:inline-block;position:absolute;left:0;min-width:35px;min-height:35px;margin-top:-7px;border:3px solid #0b0c0c;border-radius:50%;color:#fff;background:#0b0c0c;font-size:30px;line-height:29px;text-align:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;forced-color-adjust:none}@media print{.govuk-warning-text__icon{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__icon{margin-top:-5px}}@media screen and (forced-colors: active){.govuk-warning-text__icon{border-color:windowText;color:windowText;background:transparent}}.govuk-warning-text__text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;padding-left:45px}@media print{.govuk-warning-text__text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-warning-text__text{font-size:14pt;line-height:1.15}}@media print{.govuk-warning-text__text{color:#000}}.govuk-clearfix:after{content:"";display:block;clear:both}.govuk-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-visually-hidden-focusable{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important}.govuk-visually-hidden-focusable:active,.govuk-visually-hidden-focusable:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}.govuk-\\!-display-inline{display:inline!important}.govuk-\\!-display-inline-block{display:inline-block!important}.govuk-\\!-display-block{display:block!important}.govuk-\\!-display-none{display:none!important}@media print{.govuk-\\!-display-none-print{display:none!important}}.govuk-\\!-margin-0{margin:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-0{margin:0!important}}.govuk-\\!-margin-top-0{margin-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-0{margin-top:0!important}}.govuk-\\!-margin-right-0{margin-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-0{margin-right:0!important}}.govuk-\\!-margin-bottom-0{margin-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-0{margin-bottom:0!important}}.govuk-\\!-margin-left-0{margin-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-0{margin-left:0!important}}.govuk-\\!-margin-1{margin:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-1{margin:5px!important}}.govuk-\\!-margin-top-1{margin-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-1{margin-top:5px!important}}.govuk-\\!-margin-right-1{margin-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-1{margin-right:5px!important}}.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}}.govuk-\\!-margin-left-1{margin-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-1{margin-left:5px!important}}.govuk-\\!-margin-2{margin:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-2{margin:10px!important}}.govuk-\\!-margin-top-2{margin-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-2{margin-top:10px!important}}.govuk-\\!-margin-right-2{margin-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-2{margin-right:10px!important}}.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}}.govuk-\\!-margin-left-2{margin-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-2{margin-left:10px!important}}.govuk-\\!-margin-3{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-3{margin:15px!important}}.govuk-\\!-margin-top-3{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-3{margin-top:15px!important}}.govuk-\\!-margin-right-3{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-3{margin-right:15px!important}}.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}}.govuk-\\!-margin-left-3{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-3{margin-left:15px!important}}.govuk-\\!-margin-4{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-4{margin:20px!important}}.govuk-\\!-margin-top-4{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-4{margin-top:20px!important}}.govuk-\\!-margin-right-4{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-4{margin-right:20px!important}}.govuk-\\!-margin-bottom-4{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-4{margin-bottom:20px!important}}.govuk-\\!-margin-left-4{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-4{margin-left:20px!important}}.govuk-\\!-margin-5{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-5{margin:25px!important}}.govuk-\\!-margin-top-5{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-5{margin-top:25px!important}}.govuk-\\!-margin-right-5{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-5{margin-right:25px!important}}.govuk-\\!-margin-bottom-5{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-5{margin-bottom:25px!important}}.govuk-\\!-margin-left-5{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-5{margin-left:25px!important}}.govuk-\\!-margin-6{margin:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-6{margin:30px!important}}.govuk-\\!-margin-top-6{margin-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-6{margin-top:30px!important}}.govuk-\\!-margin-right-6{margin-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-6{margin-right:30px!important}}.govuk-\\!-margin-bottom-6{margin-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-6{margin-bottom:30px!important}}.govuk-\\!-margin-left-6{margin-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-6{margin-left:30px!important}}.govuk-\\!-margin-7{margin:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-7{margin:40px!important}}.govuk-\\!-margin-top-7{margin-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-7{margin-top:40px!important}}.govuk-\\!-margin-right-7{margin-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-7{margin-right:40px!important}}.govuk-\\!-margin-bottom-7{margin-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-7{margin-bottom:40px!important}}.govuk-\\!-margin-left-7{margin-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-7{margin-left:40px!important}}.govuk-\\!-margin-8{margin:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-8{margin:50px!important}}.govuk-\\!-margin-top-8{margin-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-8{margin-top:50px!important}}.govuk-\\!-margin-right-8{margin-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-8{margin-right:50px!important}}.govuk-\\!-margin-bottom-8{margin-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-8{margin-bottom:50px!important}}.govuk-\\!-margin-left-8{margin-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-8{margin-left:50px!important}}.govuk-\\!-margin-9{margin:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-9{margin:60px!important}}.govuk-\\!-margin-top-9{margin-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-9{margin-top:60px!important}}.govuk-\\!-margin-right-9{margin-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-9{margin-right:60px!important}}.govuk-\\!-margin-bottom-9{margin-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-9{margin-bottom:60px!important}}.govuk-\\!-margin-left-9{margin-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-9{margin-left:60px!important}}.govuk-\\!-padding-0{padding:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-0{padding:0!important}}.govuk-\\!-padding-top-0{padding-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-0{padding-top:0!important}}.govuk-\\!-padding-right-0{padding-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-0{padding-right:0!important}}.govuk-\\!-padding-bottom-0{padding-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-0{padding-bottom:0!important}}.govuk-\\!-padding-left-0{padding-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-0{padding-left:0!important}}.govuk-\\!-padding-1{padding:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-1{padding:5px!important}}.govuk-\\!-padding-top-1{padding-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-1{padding-top:5px!important}}.govuk-\\!-padding-right-1{padding-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-1{padding-right:5px!important}}.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}}.govuk-\\!-padding-left-1{padding-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-1{padding-left:5px!important}}.govuk-\\!-padding-2{padding:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-2{padding:10px!important}}.govuk-\\!-padding-top-2{padding-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-2{padding-top:10px!important}}.govuk-\\!-padding-right-2{padding-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-2{padding-right:10px!important}}.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}}.govuk-\\!-padding-left-2{padding-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-2{padding-left:10px!important}}.govuk-\\!-padding-3{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-3{padding:15px!important}}.govuk-\\!-padding-top-3{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-3{padding-top:15px!important}}.govuk-\\!-padding-right-3{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-3{padding-right:15px!important}}.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}}.govuk-\\!-padding-left-3{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-3{padding-left:15px!important}}.govuk-\\!-padding-4{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-4{padding:20px!important}}.govuk-\\!-padding-top-4{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-4{padding-top:20px!important}}.govuk-\\!-padding-right-4{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-4{padding-right:20px!important}}.govuk-\\!-padding-bottom-4{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-4{padding-bottom:20px!important}}.govuk-\\!-padding-left-4{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-4{padding-left:20px!important}}.govuk-\\!-padding-5{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-5{padding:25px!important}}.govuk-\\!-padding-top-5{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-5{padding-top:25px!important}}.govuk-\\!-padding-right-5{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-5{padding-right:25px!important}}.govuk-\\!-padding-bottom-5{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-5{padding-bottom:25px!important}}.govuk-\\!-padding-left-5{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-5{padding-left:25px!important}}.govuk-\\!-padding-6{padding:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-6{padding:30px!important}}.govuk-\\!-padding-top-6{padding-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-6{padding-top:30px!important}}.govuk-\\!-padding-right-6{padding-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-6{padding-right:30px!important}}.govuk-\\!-padding-bottom-6{padding-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-6{padding-bottom:30px!important}}.govuk-\\!-padding-left-6{padding-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-6{padding-left:30px!important}}.govuk-\\!-padding-7{padding:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-7{padding:40px!important}}.govuk-\\!-padding-top-7{padding-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-7{padding-top:40px!important}}.govuk-\\!-padding-right-7{padding-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-7{padding-right:40px!important}}.govuk-\\!-padding-bottom-7{padding-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-7{padding-bottom:40px!important}}.govuk-\\!-padding-left-7{padding-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-7{padding-left:40px!important}}.govuk-\\!-padding-8{padding:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-8{padding:50px!important}}.govuk-\\!-padding-top-8{padding-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-8{padding-top:50px!important}}.govuk-\\!-padding-right-8{padding-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-8{padding-right:50px!important}}.govuk-\\!-padding-bottom-8{padding-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-8{padding-bottom:50px!important}}.govuk-\\!-padding-left-8{padding-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-8{padding-left:50px!important}}.govuk-\\!-padding-9{padding:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-9{padding:60px!important}}.govuk-\\!-padding-top-9{padding-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-9{padding-top:60px!important}}.govuk-\\!-padding-right-9{padding-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-9{padding-right:60px!important}}.govuk-\\!-padding-bottom-9{padding-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-9{padding-bottom:60px!important}}.govuk-\\!-padding-left-9{padding-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-9{padding-left:60px!important}}.govuk-\\!-text-align-left{text-align:left!important}.govuk-\\!-text-align-centre{text-align:center!important}.govuk-\\!-text-align-right{text-align:right!important}.govuk-\\!-font-size-80{font-size:53px!important;font-size:3.3125rem!important;line-height:1.0377358491!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-80{font-size:80px!important;font-size:5rem!important;line-height:1!important}}@media print{.govuk-\\!-font-size-80{font-size:53pt!important;line-height:1.1!important}}.govuk-\\!-font-size-48{font-size:32px!important;font-size:2rem!important;line-height:1.09375!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-48{font-size:48px!important;font-size:3rem!important;line-height:1.0416666667!important}}@media print{.govuk-\\!-font-size-48{font-size:32pt!important;line-height:1.15!important}}.govuk-\\!-font-size-36{font-size:24px!important;font-size:1.5rem!important;line-height:1.0416666667!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-36{font-size:36px!important;font-size:2.25rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-36{font-size:24pt!important;line-height:1.05!important}}.govuk-\\!-font-size-27{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-27{font-size:27px!important;font-size:1.6875rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-27{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-24{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-24{font-size:24px!important;font-size:1.5rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-24{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-19{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-19{font-size:19px!important;font-size:1.1875rem!important;line-height:1.3157894737!important}}@media print{.govuk-\\!-font-size-19{font-size:14pt!important;line-height:1.15!important}}.govuk-\\!-font-size-16{font-size:14px!important;font-size:.875rem!important;line-height:1.1428571429!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-16{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-16{font-size:14pt!important;line-height:1.2!important}}.govuk-\\!-font-size-14{font-size:12px!important;font-size:.75rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-14{font-size:14px!important;font-size:.875rem!important;line-height:1.4285714286!important}}@media print{.govuk-\\!-font-size-14{font-size:12pt!important;line-height:1.2!important}}.govuk-\\!-font-weight-regular{font-weight:400!important}.govuk-\\!-font-weight-bold{font-weight:700!important}.govuk-\\!-width-full,.govuk-\\!-width-three-quarters{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-three-quarters{width:75%!important}}.govuk-\\!-width-two-thirds{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-two-thirds{width:66.66%!important}}.govuk-\\!-width-one-half{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-half{width:50%!important}}.govuk-\\!-width-one-third{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-third{width:33.33%!important}}.govuk-\\!-width-one-quarter{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-quarter{width:25%!important}}:host .govuk-label,:host .govuk-hint,:host .govuk-error-message{font-family:var(--postcode__font-family, "GDS Transport", arial, sans-serif);font-size:var(--postcode__font-size, 19px)}:host .govuk-input{font-family:var(--postcode__font-family, "GDS Transport", arial, sans-serif);font-size:var(--postcode__input__font-size, 19px);height:var(--postcode__input__height, 35px);padding:var(--postcode__input__padding, 5px 34px 5px 5px)}
110
- `;var pp=Object.freeze,vp=Object.defineProperty,dC=Object.getOwnPropertyDescriptor,xi=(i,t,e,n)=>{for(var r=n>1?void 0:n?dC(t,e):t,o=i.length-1,s;o>=0;o--)(s=i[o])&&(r=(n?s(t,e,r):s(r))||r);return n&&r&&vp(t,e,r),r},cC=(i,t)=>pp(vp(i,"raw",{value:pp(t||i.slice())})),_p;q.PostcodeSearch=class extends Pn{constructor(){super(...arguments),this.id="postcode",this.errorId="postcode-error",this.label="Postcode",this.hintText="",this.errorMessage="Enter a valid UK postcode",this.onlyQuestionOnPage=!1,this._postcode="",this._sanitizedPostcode=null,this._showPostcodeError=!1,this.dispatch=(i,t)=>this.dispatchEvent(new CustomEvent(i,{detail:t}))}_onInputChange(i){const t=i.target.value,e=hC(t.trim()).valid;e?(this._sanitizedPostcode=hd(t.trim()),this._postcode=hd(t.trim())||t,this._showPostcodeError=!1):(this._sanitizedPostcode=null,this._postcode=t.toUpperCase()),this.dispatch("postcodeChange",{postcode:this._sanitizedPostcode||t,isValid:e})}_onBlur(){this._sanitizedPostcode||(this._showPostcodeError=!0),this._showError()}_onKeyUp(i){i.key==="Enter"&&!this._sanitizedPostcode&&(this._showPostcodeError=!0),this._showError()}_showError(){var e,n;const i=(e=this.shadowRoot)==null?void 0:e.querySelector(`#${this.errorId}`);i&&(i.style.display="none"),i&&this._showPostcodeError&&(i.style.display="");const t=(n=this.shadowRoot)==null?void 0:n.querySelector(".govuk-form-group");t&&this._showPostcodeError&&t.classList.add("govuk-form-group--error"),t&&!this._showPostcodeError&&t.classList.remove("govuk-form-group--error")}_makeLabel(){return this.onlyQuestionOnPage?Bi`<h1 class="govuk-label-wrapper">
109
+ `])),this._getErrorMessageContainer(i),this._getAutocomplete(i))}},q.AddressAutocomplete.styles=Cs(ZM),Ue([J({type:String})],q.AddressAutocomplete.prototype,"id",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"postcode",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"label",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"initialAddress",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"osPlacesApiKey",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"arrowStyle",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"labelStyle",2),Ue([Ui()],q.AddressAutocomplete.prototype,"_totalAddresses",2),Ue([Ui()],q.AddressAutocomplete.prototype,"_addressesInPostcode",2),Ue([Ui()],q.AddressAutocomplete.prototype,"_options",2),Ue([Ui()],q.AddressAutocomplete.prototype,"_selectedAddress",2),Ue([Ui()],q.AddressAutocomplete.prototype,"_osError",2),q.AddressAutocomplete=Ue([vl("address-autocomplete")],q.AddressAutocomplete);var sd=globalThis&&globalThis.__assign||function(){return sd=Object.assign||function(i){for(var t,e=1,n=arguments.length;e<n;e++){t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},sd.apply(this,arguments)},cp=/^([a-z]{1,2}\d)([a-z])$/i,QM=/[a-z]{2}$/i,fp=/\d[a-z]{2}$/i,tC=/^[a-z]{1,2}\d[a-z\d]?\s*\d[a-z]{2}$/i,eC=/^[a-z]{1,2}/i,iC={valid:!1,postcode:null,incode:null,outcode:null,area:null,district:null,subDistrict:null,sector:null,unit:null},ad=function(i){return i===null?null:i[0]},nC=/\s+/gi,gp=function(i){return i.replace(nC,"").toUpperCase()},ld=function(i,t){return gp(i).match(t)},vs=function(i){return i.match(tC)!==null},hd=function(i){var t=_s(i);if(t===null)return null;var e=ud(i);return e===null?null:t+" "+e},_s=function(i){return vs(i)?gp(i).replace(fp,""):null},ud=function(i){if(!vs(i))return null;var t=ld(i,fp);return ad(t)},rC=function(i){if(!vs(i))return null;var t=ld(i,eC);return ad(t)},oC=function(i){var t=_s(i);if(t===null)return null;var e=ud(i);return e===null?null:t+" "+e[0]},sC=function(i){if(!vs(i))return null;var t=ld(i,QM);return ad(t)},aC=function(i){var t=_s(i);if(t===null)return null;var e=t.match(cp);return e===null?t:e[1]},lC=function(i){var t=_s(i);if(t===null)return null;var e=t.match(cp);return e===null?null:t},hC=function(i){return vs(i)?{valid:!0,postcode:hd(i),incode:ud(i),outcode:_s(i),area:rC(i),district:aC(i),subDistrict:lC(i),sector:oC(i),unit:sC(i)}:sd({},iC)};const uC=`@charset "UTF-8";.govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */@font-face{font-family:GDS Transport;font-style:normal;font-weight:400;src:url(/assets/fonts/light-94a07e06a1-v2.woff2) format("woff2"),url(/assets/fonts/light-f591b13f7d-v2.woff) format("woff");font-display:fallback}@font-face{font-family:GDS Transport;font-style:normal;font-weight:700;src:url(/assets/fonts/bold-b542beb274-v2.woff2) format("woff2"),url(/assets/fonts/bold-affa96571d-v2.woff) format("woff");font-display:fallback}@media print{.govuk-link{font-family:sans-serif}}.govuk-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-link:link{color:#1d70b8}.govuk-link:visited{color:#4c2c92}.govuk-link:hover{color:#003078}.govuk-link:active{color:#0b0c0c}.govuk-link:focus{color:#0b0c0c}@media print{[href^="/"].govuk-link:after,[href^="http://"].govuk-link:after,[href^="https://"].govuk-link:after{content:" (" attr(href) ")";font-size:90%;word-wrap:break-word}}.govuk-link--muted:link,.govuk-link--muted:visited{color:#505a5f}.govuk-link--muted:hover,.govuk-link--muted:active{color:#0b0c0c}.govuk-link--muted:focus{color:#0b0c0c}.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#0b0c0c}@media print{.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#000}}.govuk-link--text-colour:hover{color:#0b0c0cfc}.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#0b0c0c}@media print{.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#000}}.govuk-link--inverse:link,.govuk-link--inverse:visited{color:#fff}.govuk-link--inverse:hover,.govuk-link--inverse:active{color:#fffffffc}.govuk-link--inverse:focus{color:#0b0c0c}.govuk-link--no-underline:not(:hover):not(:active){text-decoration:none}.govuk-link--no-visited-state:link,.govuk-link--no-visited-state:visited{color:#1d70b8}.govuk-link--no-visited-state:hover{color:#003078}.govuk-link--no-visited-state:active{color:#0b0c0c}.govuk-link--no-visited-state:focus{color:#0b0c0c}.govuk-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-top:0;margin-bottom:15px;padding-left:0;list-style-type:none}@media print{.govuk-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-list{font-size:14pt;line-height:1.15}}@media print{.govuk-list{color:#000}}@media (min-width: 40.0625em){.govuk-list{margin-bottom:20px}}.govuk-list .govuk-list{margin-top:10px}.govuk-list>li{margin-bottom:5px}.govuk-list--bullet{padding-left:20px;list-style-type:disc}.govuk-list--number{padding-left:20px;list-style-type:decimal}.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:0}@media (min-width: 40.0625em){.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:5px}}.govuk-list--spaced>li{margin-bottom:10px}@media (min-width: 40.0625em){.govuk-list--spaced>li{margin-bottom:15px}}.govuk-heading-xl{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;display:block;margin-top:0;margin-bottom:30px}@media print{.govuk-heading-xl{color:#000}}@media print{.govuk-heading-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-heading-xl{font-size:32pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-xl{margin-bottom:50px}}.govuk-heading-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;display:block;margin-top:0;margin-bottom:20px}@media print{.govuk-heading-l{color:#000}}@media print{.govuk-heading-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-heading-l{font-size:24pt;line-height:1.05}}@media (min-width: 40.0625em){.govuk-heading-l{margin-bottom:30px}}.govuk-heading-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-m{color:#000}}@media print{.govuk-heading-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-heading-m{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-m{margin-bottom:20px}}.govuk-heading-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-s{color:#000}}@media print{.govuk-heading-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-heading-s{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-s{margin-bottom:20px}}.govuk-caption-xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-xl{font-size:27px;font-size:1.6875rem;line-height:1.1111111111}}@media print{.govuk-caption-xl{font-size:18pt;line-height:1.15}}.govuk-caption-l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-caption-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-caption-l{margin-bottom:0}}.govuk-caption-m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;color:#505a5f}@media print{.govuk-caption-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-caption-m{font-size:14pt;line-height:1.15}}.govuk-body-lead,.govuk-body-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:20px}@media print{.govuk-body-lead,.govuk-body-l{color:#000}}@media print{.govuk-body-lead,.govuk-body-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-body-lead,.govuk-body-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{margin-bottom:30px}}.govuk-body,.govuk-body-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body,.govuk-body-m{color:#000}}@media print{.govuk-body,.govuk-body-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-body,.govuk-body-m{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{margin-bottom:20px}}.govuk-body-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;margin-top:0;margin-bottom:15px}@media print{.govuk-body-s{color:#000}}@media print{.govuk-body-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-s{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-body-s{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-s{margin-bottom:20px}}.govuk-body-xs{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:12px;font-size:.75rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body-xs{color:#000}}@media print{.govuk-body-xs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-xs{font-size:14px;font-size:.875rem;line-height:1.4285714286}}@media print{.govuk-body-xs{font-size:12pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-xs{margin-bottom:20px}}.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:10px}}.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:15px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:20px}}.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:10px}}.govuk-section-break{margin:0;border:0}.govuk-section-break--xl{margin-top:30px;margin-bottom:30px}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-top:50px}}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-bottom:50px}}.govuk-section-break--l{margin-top:20px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-section-break--l{margin-top:30px}}@media (min-width: 40.0625em){.govuk-section-break--l{margin-bottom:30px}}.govuk-section-break--m{margin-top:15px;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-section-break--m{margin-top:20px}}@media (min-width: 40.0625em){.govuk-section-break--m{margin-bottom:20px}}.govuk-section-break--visible{border-bottom:1px solid #b1b4b6}.govuk-button-group{margin-bottom:5px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}@media (min-width: 40.0625em){.govuk-button-group{margin-bottom:15px}}.govuk-button-group .govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;display:inline-block;max-width:100%;margin-top:5px;margin-bottom:20px;text-align:center}@media print{.govuk-button-group .govuk-link{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button-group .govuk-link{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button-group .govuk-link{font-size:14pt;line-height:19px}}.govuk-button-group .govuk-button{margin-bottom:17px}@media (min-width: 40.0625em){.govuk-button-group{margin-right:-15px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline}.govuk-button-group .govuk-button,.govuk-button-group .govuk-link{margin-right:15px}.govuk-button-group .govuk-link{text-align:left}}.govuk-form-group{margin-bottom:20px}.govuk-form-group:after{content:"";display:block;clear:both}@media (min-width: 40.0625em){.govuk-form-group{margin-bottom:30px}}.govuk-form-group .govuk-form-group:last-of-type{margin-bottom:0}.govuk-form-group--error{padding-left:15px;border-left:5px solid #d4351c}.govuk-form-group--error .govuk-form-group{padding:0;border:0}.govuk-grid-row{margin-right:-15px;margin-left:-15px}.govuk-grid-row:after{content:"";display:block;clear:both}.govuk-grid-column-one-quarter{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-quarter{width:25%;float:left}}.govuk-grid-column-one-third{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-third{width:33.3333%;float:left}}.govuk-grid-column-one-half{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-half{width:50%;float:left}}.govuk-grid-column-two-thirds{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-two-thirds{width:66.6666%;float:left}}.govuk-grid-column-three-quarters{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-three-quarters{width:75%;float:left}}.govuk-grid-column-full{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-full{width:100%;float:left}}.govuk-grid-column-one-quarter-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-quarter-from-desktop{width:25%;float:left}}.govuk-grid-column-one-third-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-third-from-desktop{width:33.3333%;float:left}}.govuk-grid-column-one-half-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-half-from-desktop{width:50%;float:left}}.govuk-grid-column-two-thirds-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-two-thirds-from-desktop{width:66.6666%;float:left}}.govuk-grid-column-three-quarters-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-three-quarters-from-desktop{width:75%;float:left}}.govuk-grid-column-full-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-full-from-desktop{width:100%;float:left}}.govuk-main-wrapper{display:block;padding-top:20px;padding-bottom:20px}@media (min-width: 40.0625em){.govuk-main-wrapper{padding-top:40px;padding-bottom:40px}}.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:30px}@media (min-width: 40.0625em){.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:50px}}.govuk-template{background-color:#f3f2f1;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}@media screen{.govuk-template{overflow-y:scroll}}.govuk-template__body{margin:0;background-color:#fff}.govuk-width-container{max-width:960px;margin-right:15px;margin-left:15px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(15px,calc(15px + env(safe-area-inset-right)));margin-left:max(15px,calc(15px + env(safe-area-inset-left)))}}@media (min-width: 40.0625em){.govuk-width-container{margin-right:30px;margin-left:30px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(30px,calc(15px + env(safe-area-inset-right)));margin-left:max(30px,calc(15px + env(safe-area-inset-left)))}}}@media (min-width: 1020px){.govuk-width-container{margin-right:auto;margin-left:auto}@supports (margin: max(0px)){.govuk-width-container{margin-right:auto;margin-left:auto}}}.govuk-accordion{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-accordion{margin-bottom:30px}}.govuk-accordion__section{padding-top:15px}.govuk-accordion__section-heading{margin-top:0;margin-bottom:0;padding-top:15px;padding-bottom:15px}.govuk-accordion__section-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;color:#0b0c0c;display:block;margin-bottom:0;padding-top:15px}@media print{.govuk-accordion__section-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-accordion__section-button{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-accordion__section-button{font-size:18pt;line-height:1.15}}@media print{.govuk-accordion__section-button{color:#000}}.govuk-accordion__section-content>:last-child{margin-bottom:0}.js-enabled .govuk-accordion{border-bottom:1px solid #b1b4b6}.js-enabled .govuk-accordion__section{padding-top:0}.js-enabled .govuk-accordion__section-content{display:none;padding-bottom:30px}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-content{padding-bottom:50px}}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-content{display:block}.js-enabled .govuk-accordion__show-all{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;position:relative;z-index:1;margin-bottom:9px;padding:5px 2px 5px 0;border-width:0;color:#1d70b8;background:none;cursor:pointer;-webkit-appearance:none}@media print{.js-enabled .govuk-accordion__show-all{font-family:sans-serif}}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__show-all{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__show-all{font-size:14pt;line-height:1.15}}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__show-all{margin-bottom:14px}}.js-enabled .govuk-accordion__show-all::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__show-all:hover{color:#0b0c0c;background:#f3f2f1;box-shadow:0 -2px #f3f2f1,0 4px #f3f2f1}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__show-all:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron{background:#0b0c0c}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-heading{padding:0}.js-enabled .govuk-accordion-nav__chevron{box-sizing:border-box;display:inline-block;position:relative;width:1.25rem;height:1.25rem;border:.0625rem solid;border-radius:50%;vertical-align:middle}.js-enabled .govuk-accordion-nav__chevron:after{content:"";box-sizing:border-box;display:block;position:absolute;bottom:.3125rem;left:.375rem;width:.375rem;height:.375rem;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border-top:.125rem solid;border-right:.125rem solid}.js-enabled .govuk-accordion-nav__chevron--down{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.js-enabled .govuk-accordion__section-button{width:100%;padding:10px 0 0;border:0;border-top:1px solid #b1b4b6;border-bottom:10px solid transparent;color:#0b0c0c;background:none;text-align:left;cursor:pointer;-webkit-appearance:none}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-button{padding-bottom:10px}}.js-enabled .govuk-accordion__section-button:active{color:#0b0c0c;background:none}.js-enabled .govuk-accordion__section-button:hover{color:#0b0c0c;background:#f3f2f1}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__section-button:focus{outline:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-button::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-button{padding-bottom:20px;border-bottom:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:3px}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:2px}}.js-enabled .govuk-accordion__section-toggle,.js-enabled .govuk-accordion__section-heading-text,.js-enabled .govuk-accordion__section-summary{display:block;margin-bottom:13px}.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-toggle-focus{display:inline}.js-enabled .govuk-accordion__section-toggle{font-size:16px;font-size:1rem;line-height:1.25;font-weight:400;color:#1d70b8}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-toggle{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__section-toggle{font-size:14pt;line-height:1.15}}.js-enabled .govuk-accordion__show-all-text,.js-enabled .govuk-accordion__section-toggle-text{margin-left:5px;vertical-align:middle}@media screen and (forced-colors: active){.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{background-color:transparent}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{background:transparent;background-color:transparent}}@media (hover: none){.js-enabled .govuk-accordion__section-header:hover{border-top-color:#b1b4b6;box-shadow:inset 0 3px #1d70b8}.js-enabled .govuk-accordion__section-header:hover .govuk-accordion__section-button{border-top-color:#b1b4b6}}.govuk-back-link{font-size:14px;font-size:.875rem;line-height:1.1428571429;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;position:relative;margin-top:15px;margin-bottom:15px;padding-left:14px}@media (min-width: 40.0625em){.govuk-back-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-back-link{font-size:14pt;line-height:1.2}}@media print{.govuk-back-link{font-family:sans-serif}}.govuk-back-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-back-link:link,.govuk-back-link:visited{color:#0b0c0c}@media print{.govuk-back-link:link,.govuk-back-link:visited{color:#000}}.govuk-back-link:hover{color:#0b0c0cfc}.govuk-back-link:active,.govuk-back-link:focus{color:#0b0c0c}@media print{.govuk-back-link:active,.govuk-back-link:focus{color:#000}}.govuk-back-link:before{content:"";display:block;position:absolute;top:0;bottom:0;left:3px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(225deg);-ms-transform:rotate(225deg);transform:rotate(225deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-back-link:focus:before{border-color:#0b0c0c}.govuk-back-link:after{content:"";position:absolute;top:-14px;right:0;bottom:-14px;left:0}.govuk-breadcrumbs{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;margin-top:15px;margin-bottom:10px}@media print{.govuk-breadcrumbs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-breadcrumbs{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-breadcrumbs{font-size:14pt;line-height:1.2}}@media print{.govuk-breadcrumbs{color:#000}}.govuk-breadcrumbs__list{margin:0;padding:0;list-style-type:none}.govuk-breadcrumbs__list:after{content:"";display:block;clear:both}.govuk-breadcrumbs__list-item{display:inline-block;position:relative;margin-bottom:5px;margin-left:10px;padding-left:15.655px;float:left}.govuk-breadcrumbs__list-item:before{content:"";display:block;position:absolute;top:0;bottom:0;left:-3.31px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-breadcrumbs__list-item:first-child{margin-left:0;padding-left:0}.govuk-breadcrumbs__list-item:first-child:before{content:none;display:none}.govuk-breadcrumbs__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-breadcrumbs__link{font-family:sans-serif}}.govuk-breadcrumbs__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#000}}.govuk-breadcrumbs__link:hover{color:#0b0c0cfc}.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#000}}@media (max-width: 40.0525em){.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item{display:none}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:first-child,.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:last-child{display:inline-block}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:before{top:6px;margin:0}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}}.govuk-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;box-sizing:border-box;display:inline-block;position:relative;width:100%;margin:0 0 22px;padding:8px 10px 7px;border:2px solid transparent;border-radius:0;color:#fff;background-color:#00703c;box-shadow:0 2px #002d18;text-align:center;vertical-align:top;cursor:pointer;-webkit-appearance:none}@media print{.govuk-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button{font-size:14pt;line-height:19px}}@media (min-width: 40.0625em){.govuk-button{margin-bottom:32px}}@media (min-width: 40.0625em){.govuk-button{width:auto}}.govuk-button:link,.govuk-button:visited,.govuk-button:active,.govuk-button:hover{color:#fff;text-decoration:none}.govuk-button::-moz-focus-inner{padding:0;border:0}.govuk-button:hover{background-color:#005a30}.govuk-button:active{top:2px}.govuk-button:focus{border-color:#fd0;outline:3px solid transparent;box-shadow:inset 0 0 0 1px #fd0}.govuk-button:focus:not(:active):not(:hover){border-color:#fd0;color:#0b0c0c;background-color:#fd0;box-shadow:0 2px #0b0c0c}.govuk-button:before{content:"";display:block;position:absolute;top:-2px;right:-2px;bottom:-4px;left:-2px;background:transparent}.govuk-button:active:before{top:-4px}.govuk-button--disabled,.govuk-button[disabled=disabled],.govuk-button[disabled]{opacity:.5}.govuk-button--disabled:hover,.govuk-button[disabled=disabled]:hover,.govuk-button[disabled]:hover{background-color:#00703c;cursor:default}.govuk-button--disabled:active,.govuk-button[disabled=disabled]:active,.govuk-button[disabled]:active{top:0;box-shadow:0 2px #002d18}.govuk-button--secondary{background-color:#f3f2f1;box-shadow:0 2px #929191}.govuk-button--secondary,.govuk-button--secondary:link,.govuk-button--secondary:visited,.govuk-button--secondary:active,.govuk-button--secondary:hover{color:#0b0c0c}.govuk-button--secondary:hover{background-color:#dbdad9}.govuk-button--secondary:hover[disabled]{background-color:#f3f2f1}.govuk-button--warning{background-color:#d4351c;box-shadow:0 2px #55150b}.govuk-button--warning,.govuk-button--warning:link,.govuk-button--warning:visited,.govuk-button--warning:active,.govuk-button--warning:hover{color:#fff}.govuk-button--warning:hover{background-color:#aa2a16}.govuk-button--warning:hover[disabled]{background-color:#d4351c}.govuk-button--start{font-weight:700;font-size:18px;font-size:1.125rem;line-height:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-height:auto;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}@media (min-width: 40.0625em){.govuk-button--start{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-button--start{font-size:18pt;line-height:1}}.govuk-button__start-icon{margin-left:5px;vertical-align:middle;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;forced-color-adjust:auto}@media (min-width: 48.0625em){.govuk-button__start-icon{margin-left:10px}}.govuk-error-message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px;clear:both;color:#d4351c}@media print{.govuk-error-message{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-message{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-message{font-size:14pt;line-height:1.15}}.govuk-fieldset{min-width:0;margin:0;padding:0;border:0}.govuk-fieldset:after{content:"";display:block;clear:both}@supports not (caret-color: auto){.govuk-fieldset,x:-moz-any-link{display:table-cell}}.govuk-fieldset__legend{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;box-sizing:border-box;display:table;max-width:100%;margin-bottom:10px;padding:0;white-space:normal}@media print{.govuk-fieldset__legend{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend{font-size:14pt;line-height:1.15}}@media print{.govuk-fieldset__legend{color:#000}}.govuk-fieldset__legend--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-fieldset__legend--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-fieldset__legend--xl{font-size:32pt;line-height:1.15}}.govuk-fieldset__legend--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-fieldset__legend--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-fieldset__legend--l{font-size:24pt;line-height:1.05}}.govuk-fieldset__legend--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-fieldset__legend--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-fieldset__legend--m{font-size:18pt;line-height:1.15}}.govuk-fieldset__legend--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-fieldset__legend--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend--s{font-size:14pt;line-height:1.15}}.govuk-fieldset__heading{margin:0;font-size:inherit;font-weight:inherit}.govuk-hint{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:15px;color:#505a5f}@media print{.govuk-hint{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-hint{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-hint{font-size:14pt;line-height:1.15}}.govuk-label:not(.govuk-label--m):not(.govuk-label--l):not(.govuk-label--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend:not(.govuk-fieldset__legend--m):not(.govuk-fieldset__legend--l):not(.govuk-fieldset__legend--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend+.govuk-hint{margin-top:-5px}.govuk-label{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;margin-bottom:5px}@media print{.govuk-label{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label{font-size:14pt;line-height:1.15}}@media print{.govuk-label{color:#000}}.govuk-label--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-label--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-label--xl{font-size:32pt;line-height:1.15}}.govuk-label--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-label--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-label--l{font-size:24pt;line-height:1.05}}.govuk-label--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:10px}@media print{.govuk-label--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-label--m{font-size:18pt;line-height:1.15}}.govuk-label--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-label--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label--s{font-size:14pt;line-height:1.15}}.govuk-label-wrapper{margin:0}.govuk-checkboxes__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-checkboxes__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__item{font-size:14pt;line-height:1.15}}.govuk-checkboxes__item:last-child,.govuk-checkboxes__item:last-of-type{margin-bottom:0}.govuk-checkboxes__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-checkboxes__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-checkboxes__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;background:transparent}.govuk-checkboxes__label:after{content:"";box-sizing:border-box;position:absolute;top:11px;left:9px;width:23px;height:12px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border:solid;border-width:0 0 5px 5px;border-top-color:transparent;opacity:0;background:transparent}.govuk-checkboxes__hint{display:block;padding-right:15px;padding-left:15px}.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 3px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{outline-color:Highlight}}.govuk-checkboxes__input:checked+.govuk-checkboxes__label:after{opacity:1}.govuk-checkboxes__input:disabled,.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{cursor:default}.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{opacity:.5}.govuk-checkboxes__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-checkboxes__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-checkboxes__divider{color:#000}}.govuk-checkboxes__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-checkboxes__conditional{margin-bottom:20px}}.js-enabled .govuk-checkboxes__conditional--hidden{display:none}.govuk-checkboxes__conditional>:last-child{margin-bottom:0}.govuk-checkboxes--small .govuk-checkboxes__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-checkboxes--small .govuk-checkboxes__item:after{content:"";display:block;clear:both}.govuk-checkboxes--small .govuk-checkboxes__input{left:-10px}.govuk-checkboxes--small .govuk-checkboxes__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-checkboxes--small .govuk-checkboxes__label{padding:11px 15px 10px 1px}}.govuk-checkboxes--small .govuk-checkboxes__label:before{top:8px;width:24px;height:24px}.govuk-checkboxes--small .govuk-checkboxes__label:after{top:15px;left:6px;width:12px;height:6.5px;border-width:0 0 3px 3px}.govuk-checkboxes--small .govuk-checkboxes__hint{padding:0;clear:both}.govuk-checkboxes--small .govuk-checkboxes__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:initial}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0}}.govuk-textarea{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:block;width:100%;min-height:40px;margin-bottom:20px;padding:5px;resize:vertical;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none}@media print{.govuk-textarea{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-textarea{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-textarea{font-size:14pt;line-height:1.25}}@media (min-width: 40.0625em){.govuk-textarea{margin-bottom:30px}}.govuk-textarea:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-textarea--error{border-color:#d4351c}.govuk-textarea--error:focus{border-color:#0b0c0c}.govuk-character-count{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-character-count{margin-bottom:30px}}.govuk-character-count .govuk-form-group,.govuk-character-count .govuk-textarea{margin-bottom:5px}.govuk-character-count__message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400;margin-top:0;margin-bottom:0}@media print{.govuk-character-count__message{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-character-count__message{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-character-count__message--disabled{visibility:hidden}.govuk-cookie-banner{padding-top:20px;border-bottom:10px solid transparent;background-color:#f3f2f1}.govuk-cookie-banner[hidden]{display:none}.govuk-cookie-banner__message{margin-bottom:-10px}.govuk-cookie-banner__message[hidden]{display:none}.govuk-cookie-banner__message:focus{outline:none}.govuk-summary-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin:0 0 20px}@media print{.govuk-summary-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-summary-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-summary-list{font-size:14pt;line-height:1.15}}@media print{.govuk-summary-list{color:#000}}@media (min-width: 40.0625em){.govuk-summary-list{display:table;width:100%;table-layout:fixed;border-collapse:collapse}}@media (min-width: 40.0625em){.govuk-summary-list{margin-bottom:30px}}.govuk-summary-list__row{border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-summary-list__row{margin-bottom:15px}}@media (min-width: 40.0625em){.govuk-summary-list__row{display:table-row}}@media (min-width: 40.0625em){.govuk-summary-list__row--no-actions:after{content:"";display:table-cell;width:20%}}.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{margin:0}@media (min-width: 40.0625em){.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{display:table-cell;padding-top:10px;padding-right:20px;padding-bottom:10px}}.govuk-summary-list__actions{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-summary-list__actions{width:20%;padding-right:0;text-align:right}}.govuk-summary-list__key,.govuk-summary-list__value{word-wrap:break-word;overflow-wrap:break-word}.govuk-summary-list__key{margin-bottom:5px;font-weight:700}@media (min-width: 40.0625em){.govuk-summary-list__key{width:30%}}@media (max-width: 40.0525em){.govuk-summary-list__value{margin-bottom:15px}}.govuk-summary-list__value>p{margin-bottom:10px}.govuk-summary-list__value>:last-child{margin-bottom:0}.govuk-summary-list__actions-list{width:100%;margin:0;padding:0}.govuk-summary-list__actions-list-item{display:inline;margin-right:10px;padding-right:10px}.govuk-summary-list__actions-list-item:not(:last-child){border-right:1px solid #b1b4b6}.govuk-summary-list__actions-list-item:last-child{margin-right:0;padding-right:0;border:0}.govuk-summary-list--no-border .govuk-summary-list__row{border:0}@media (min-width: 40.0625em){.govuk-summary-list--no-border .govuk-summary-list__key,.govuk-summary-list--no-border .govuk-summary-list__value,.govuk-summary-list--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-summary-list__row--no-border{border:0}@media (min-width: 40.0625em){.govuk-summary-list__row--no-border .govuk-summary-list__key,.govuk-summary-list__row--no-border .govuk-summary-list__value,.govuk-summary-list__row--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-input{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;width:100%;height:40px;height:2.5rem;margin-top:0;padding:5px;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media print{.govuk-input{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input{font-size:14pt;line-height:1.15}}.govuk-input:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-input::-webkit-outer-spin-button,.govuk-input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.govuk-input[type=number]{-moz-appearance:textfield}.govuk-input--error{border-color:#d4351c}.govuk-input--error:focus{border-color:#0b0c0c}.govuk-input--width-30{max-width:59ex}.govuk-input--width-20{max-width:41ex}.govuk-input--width-10{max-width:23ex}.govuk-input--width-5{max-width:10.8ex}.govuk-input--width-4{max-width:9ex}.govuk-input--width-3{max-width:7.2ex}.govuk-input--width-2{max-width:5.4ex}.govuk-input__wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.govuk-input__wrapper .govuk-input{-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto}.govuk-input__wrapper .govuk-input:focus{z-index:1}@media (max-width: 19.99em){.govuk-input__wrapper{display:block}.govuk-input__wrapper .govuk-input{max-width:100%}}.govuk-input__prefix,.govuk-input__suffix{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:inline-block;min-width:40px;min-width:2.5rem;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;background-color:#f3f2f1;text-align:center;white-space:nowrap;cursor:default;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}@media print{.govuk-input__prefix,.govuk-input__suffix{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input__prefix,.govuk-input__suffix{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input__prefix,.govuk-input__suffix{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-input__prefix,.govuk-input__suffix{line-height:1.6}}@media (max-width: 19.99em){.govuk-input__prefix,.govuk-input__suffix{display:block;height:100%;white-space:normal}}@media (max-width: 19.99em){.govuk-input__prefix{border-bottom:0}}@media (min-width: 20em){.govuk-input__prefix{border-right:0}}@media (max-width: 19.99em){.govuk-input__suffix{border-top:0}}@media (min-width: 20em){.govuk-input__suffix{border-left:0}}.govuk-date-input{font-size:0}.govuk-date-input:after{content:"";display:block;clear:both}.govuk-date-input__item{display:inline-block;margin-right:20px;margin-bottom:0}.govuk-date-input__label{display:block}.govuk-date-input__input{margin-bottom:0}.govuk-details{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:20px;display:block}@media print{.govuk-details{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-details{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-details{font-size:14pt;line-height:1.15}}@media print{.govuk-details{color:#000}}@media (min-width: 40.0625em){.govuk-details{margin-bottom:30px}}.govuk-details__summary{display:inline-block;position:relative;margin-bottom:5px;padding-left:25px;color:#1d70b8;cursor:pointer}.govuk-details__summary:hover{color:#003078}.govuk-details__summary:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-details__summary-text{text-decoration:underline}.govuk-details__summary:focus .govuk-details__summary-text{text-decoration:none}.govuk-details__summary::-webkit-details-marker{display:none}.govuk-details__summary:before{content:"";position:absolute;top:-1px;bottom:0;left:0;margin:auto;display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,100% 50%,0% 100%);clip-path:polygon(0% 0%,100% 50%,0% 100%);border-width:7px 0 7px 12.124px;border-left-color:inherit}.govuk-details[open]>.govuk-details__summary:before{display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:12.124px 7px 0 7px;border-top-color:inherit}.govuk-details__text{padding-top:15px;padding-bottom:15px;padding-left:20px;border-left:5px solid #b1b4b6}.govuk-details__text p{margin-top:0;margin-bottom:20px}.govuk-details__text>:last-child{margin-bottom:0}.govuk-error-summary{color:#0b0c0c;padding:15px;margin-bottom:30px;border:5px solid #d4351c}@media print{.govuk-error-summary{color:#000}}@media (min-width: 40.0625em){.govuk-error-summary{padding:20px}}@media (min-width: 40.0625em){.govuk-error-summary{margin-bottom:50px}}.govuk-error-summary:focus{outline:3px solid #ffdd00}.govuk-error-summary__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:15px}@media print{.govuk-error-summary__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__title{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-error-summary__title{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-error-summary__title{margin-bottom:20px}}.govuk-error-summary__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-error-summary__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__body{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-summary__body{font-size:14pt;line-height:1.15}}.govuk-error-summary__body p{margin-top:0;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-error-summary__body p{margin-bottom:20px}}.govuk-error-summary__list{margin-top:0;margin-bottom:0}.govuk-error-summary__list a{font-weight:700;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-error-summary__list a{font-family:sans-serif}}.govuk-error-summary__list a:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-error-summary__list a:link,.govuk-error-summary__list a:visited{color:#d4351c}.govuk-error-summary__list a:hover{color:#942514}.govuk-error-summary__list a:active{color:#d4351c}.govuk-error-summary__list a:focus{color:#0b0c0c}.govuk-file-upload{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;max-width:100%;margin-left:-5px;padding:5px}@media print{.govuk-file-upload{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-file-upload{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-file-upload{font-size:14pt;line-height:1.15}}@media print{.govuk-file-upload{color:#000}}.govuk-file-upload::-webkit-file-upload-button{-webkit-appearance:button;color:inherit;font:inherit}.govuk-file-upload:focus{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-file-upload:focus-within{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-footer{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;padding-top:25px;padding-bottom:15px;border-top:1px solid #b1b4b6;color:#0b0c0c;background:#f3f2f1}@media print{.govuk-footer{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-footer{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-footer{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-footer{padding-top:40px}}@media (min-width: 40.0625em){.govuk-footer{padding-bottom:25px}}.govuk-footer__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-footer__link{font-family:sans-serif}}.govuk-footer__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-footer__link:link,.govuk-footer__link:visited{color:#0b0c0c}@media print{.govuk-footer__link:link,.govuk-footer__link:visited{color:#000}}.govuk-footer__link:hover{color:#0b0c0cfc}.govuk-footer__link:active,.govuk-footer__link:focus{color:#0b0c0c}@media print{.govuk-footer__link:active,.govuk-footer__link:focus{color:#000}}.govuk-footer__section-break{margin:0 0 30px;border:0;border-bottom:1px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-footer__section-break{margin-bottom:50px}}.govuk-footer__meta{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-right:-15px;margin-left:-15px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.govuk-footer__meta-item{margin-right:15px;margin-bottom:25px;margin-left:15px}.govuk-footer__meta-item--grow{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}@media (max-width: 40.0525em){.govuk-footer__meta-item--grow{-webkit-flex-basis:320px;-ms-flex-preferred-size:320px;flex-basis:320px}}.govuk-footer__licence-logo{display:inline-block;margin-right:10px;vertical-align:top;forced-color-adjust:auto}@media (max-width: 48.0525em){.govuk-footer__licence-logo{margin-bottom:15px}}.govuk-footer__licence-description{display:inline-block}.govuk-footer__copyright-logo{display:inline-block;min-width:125px;padding-top:112px;background-image:url(/assets/images/govuk-crest.png);background-repeat:no-repeat;background-position:50% 0%;background-size:125px 102px;text-align:center;white-space:nowrap}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){.govuk-footer__copyright-logo{background-image:url(/assets/images/govuk-crest-2x.png)}}.govuk-footer__inline-list{margin-top:0;margin-bottom:15px;padding:0}.govuk-footer__meta-custom{margin-bottom:20px}.govuk-footer__inline-list-item{display:inline-block;margin-right:15px;margin-bottom:5px}.govuk-footer__heading{margin-bottom:30px;padding-bottom:20px;border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-footer__heading{padding-bottom:10px}}.govuk-footer__navigation{margin-right:-15px;margin-left:-15px}.govuk-footer__navigation:after{content:"";display:block;clear:both}.govuk-footer__section{display:inline-block;margin-bottom:30px;vertical-align:top}.govuk-footer__list{margin:0;padding:0;list-style:none;-webkit-column-gap:30px;column-gap:30px}.govuk-footer__list .govuk-footer__link:hover{text-decoration-thickness:auto}@media (min-width: 48.0625em){.govuk-footer__list--columns-2{-webkit-column-count:2;column-count:2}.govuk-footer__list--columns-3{-webkit-column-count:3;column-count:3}}.govuk-footer__list-item{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-footer__list-item{margin-bottom:20px}}.govuk-footer__list-item:last-child{margin-bottom:0}.govuk-header{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;border-bottom:10px solid #ffffff;color:#fff;background:#0b0c0c}@media print{.govuk-header{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header{font-size:14pt;line-height:1.2}}.govuk-header__container--full-width{padding:0 15px;border-color:#1d70b8}.govuk-header__container--full-width .govuk-header__menu-button{right:15px}.govuk-header__container{position:relative;margin-bottom:-10px;padding-top:10px;border-bottom:10px solid #1d70b8}.govuk-header__container:after{content:"";display:block;clear:both}.govuk-header__logotype{display:inline-block;margin-right:5px}@media (forced-colors: active){.govuk-header__logotype{forced-color-adjust:none;color:linktext}}.govuk-header__logotype:last-child{margin-right:0}.govuk-header__logotype-crown{position:relative;top:-1px;margin-right:1px;fill:currentColor;vertical-align:top}.govuk-header__logotype-crown-fallback-image{width:36px;height:32px;border:0;vertical-align:bottom}.govuk-header__product-name{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1;display:inline-table}@media print{.govuk-header__product-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__product-name{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-header__product-name{font-size:18pt;line-height:1}}.govuk-header__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none}@media print{.govuk-header__link{font-family:sans-serif}}.govuk-header__link:link,.govuk-header__link:visited{color:#fff}.govuk-header__link:hover,.govuk-header__link:active{color:#fffffffc}.govuk-header__link:focus{color:#0b0c0c}.govuk-header__link:hover{text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:.1em}.govuk-header__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__link--homepage{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:inline-block;margin-right:10px;font-size:30px;line-height:1}@media print{.govuk-header__link--homepage{font-family:sans-serif}}.govuk-header__link--homepage:link,.govuk-header__link--homepage:visited{text-decoration:none}.govuk-header__link--homepage:hover,.govuk-header__link--homepage:active{margin-bottom:-3px;border-bottom:3px solid}.govuk-header__link--homepage:focus{margin-bottom:0;border-bottom:0}.govuk-header__link--service-name{display:inline-block;margin-bottom:10px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111}@media print{.govuk-header__link--service-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__link--service-name{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-header__link--service-name{font-size:18pt;line-height:1.15}}.govuk-header__logo,.govuk-header__content{box-sizing:border-box}.govuk-header__logo{margin-bottom:10px;padding-right:50px}@media (min-width: 40.0625em){.govuk-header__logo{margin-bottom:10px}}@media (min-width: 48.0625em){.govuk-header__logo{width:33.33%;padding-right:15px;float:left;vertical-align:top}}@media (min-width: 48.0625em){.govuk-header__content{width:66.66%;padding-left:15px;float:left}}.govuk-header__menu-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:none;position:absolute;top:20px;right:0;margin:0;padding:0;border:0;color:#fff;background:none;cursor:pointer}@media print{.govuk-header__menu-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__menu-button{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__menu-button{font-size:14pt;line-height:1.2}}.govuk-header__menu-button:hover{-webkit-text-decoration:solid underline 3px;text-decoration:solid underline 3px;text-underline-offset:.1em}.govuk-header__menu-button:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__menu-button:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:8.66px 5px 0 5px;border-top-color:inherit;content:"";margin-left:5px}@media (min-width: 40.0625em){.govuk-header__menu-button{top:15px}}.govuk-header__menu-button--open:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(50% 0%,0% 100%,100% 100%);clip-path:polygon(50% 0%,0% 100%,100% 100%);border-width:0 5px 8.66px 5px;border-bottom-color:inherit}@media (min-width: 48.0625em){.govuk-header__navigation{margin-bottom:10px}}.govuk-header__navigation-list{margin:0;padding:0;list-style:none}.js-enabled .govuk-header__menu-button{display:block}@media (min-width: 48.0625em){.js-enabled .govuk-header__menu-button{display:none}}.js-enabled .govuk-header__navigation-list{display:none}@media (min-width: 48.0625em){.js-enabled .govuk-header__navigation-list{display:block}}.js-enabled .govuk-header__navigation-list--open{display:block}@media (min-width: 48.0625em){.govuk-header__navigation--end{margin:0;padding:5px 0;text-align:right}}.govuk-header__navigation--no-service-name{padding-top:40px}.govuk-header__navigation-item{padding:10px 0;border-bottom:1px solid #2e3133}@media (min-width: 48.0625em){.govuk-header__navigation-item{display:inline-block;margin-right:15px;padding:5px 0;border:0}}.govuk-header__navigation-item a{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1.1428571429;white-space:nowrap}@media print{.govuk-header__navigation-item a{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__navigation-item a{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__navigation-item a{font-size:14pt;line-height:1.2}}.govuk-header__navigation-item--active a:link,.govuk-header__navigation-item--active a:hover,.govuk-header__navigation-item--active a:visited{color:#1d8feb}.govuk-header__navigation-item--active a:focus{color:#0b0c0c}.govuk-header__navigation-item:last-child{margin-right:0;border-bottom:0}@media print{.govuk-header{border-bottom-width:0;color:#0b0c0c;background:transparent}.govuk-header__logotype-crown-fallback-image{display:none}.govuk-header__link:link,.govuk-header__link:visited{color:#0b0c0c}.govuk-header__link:after{display:none}}.govuk-inset-text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;padding:15px;margin-top:20px;margin-bottom:20px;clear:both;border-left:10px solid #b1b4b6}@media print{.govuk-inset-text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-inset-text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-inset-text{font-size:14pt;line-height:1.15}}@media print{.govuk-inset-text{color:#000}}@media (min-width: 40.0625em){.govuk-inset-text{margin-top:30px}}@media (min-width: 40.0625em){.govuk-inset-text{margin-bottom:30px}}.govuk-inset-text>:first-child{margin-top:0}.govuk-inset-text>:only-child,.govuk-inset-text>:last-child{margin-bottom:0}.govuk-notification-banner{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:30px;border:5px solid #1d70b8;background-color:#1d70b8}@media print{.govuk-notification-banner{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-notification-banner{margin-bottom:50px}}.govuk-notification-banner:focus{outline:3px solid #ffdd00}.govuk-notification-banner__header{padding:2px 15px 5px;border-bottom:1px solid transparent}@media (min-width: 40.0625em){.govuk-notification-banner__header{padding:2px 20px 5px}}.govuk-notification-banner__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;margin:0;padding:0;color:#fff}@media print{.govuk-notification-banner__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner__title{font-size:14pt;line-height:1.15}}.govuk-notification-banner__content{color:#0b0c0c;padding:15px;background-color:#fff}@media print{.govuk-notification-banner__content{color:#000}}@media (min-width: 40.0625em){.govuk-notification-banner__content{padding:20px}}.govuk-notification-banner__content>*{box-sizing:border-box;max-width:605px}.govuk-notification-banner__content>:last-child{margin-bottom:0}.govuk-notification-banner__heading{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin:0 0 15px;padding:0}@media print{.govuk-notification-banner__heading{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__heading{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-notification-banner__heading{font-size:18pt;line-height:1.15}}.govuk-notification-banner__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-notification-banner__link{font-family:sans-serif}}.govuk-notification-banner__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-notification-banner__link:link,.govuk-notification-banner__link:visited{color:#1d70b8}.govuk-notification-banner__link:hover{color:#003078}.govuk-notification-banner__link:active{color:#0b0c0c}.govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-notification-banner--success{border-color:#00703c;background-color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:link,.govuk-notification-banner--success .govuk-notification-banner__link:visited{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:hover{color:#004e2a}.govuk-notification-banner--success .govuk-notification-banner__link:active{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-panel{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;margin-bottom:15px;padding:35px;border:5px solid transparent;text-align:center}@media print{.govuk-panel{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-panel{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-panel{padding:10px;overflow-wrap:break-word;word-wrap:break-word}}.govuk-panel--confirmation{color:#fff;background:#00703c}@media print{.govuk-panel--confirmation{border-color:currentColor;color:#000;background:none}}.govuk-panel__title{margin-top:0;margin-bottom:30px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375}@media print{.govuk-panel__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__title{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-panel__title{font-size:32pt;line-height:1.15}}.govuk-panel__title:last-child{margin-bottom:0}.govuk-panel__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:24px;font-size:1.5rem;line-height:1.0416666667}@media print{.govuk-panel__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__body{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-panel__body{font-size:24pt;line-height:1.05}}.govuk-tag{display:inline-block;outline:2px solid transparent;outline-offset:-2px;color:#fff;background-color:#1d70b8;letter-spacing:1px;text-decoration:none;text-transform:uppercase;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1;padding:5px 8px 4px}@media print{.govuk-tag{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tag{font-size:16px;font-size:1rem;line-height:1}}@media print{.govuk-tag{font-size:14pt;line-height:1}}.govuk-tag--grey{color:#383f43;background:#eeefef}.govuk-tag--purple{color:#3d2375;background:#dbd5e9}.govuk-tag--turquoise{color:#10403c;background:#bfe3e0}.govuk-tag--blue{color:#144e81;background:#d2e2f1}.govuk-tag--yellow{color:#594d00;background:#fff7bf}.govuk-tag--orange{color:#6e3619;background:#fcd6c3}.govuk-tag--red{color:#942514;background:#f6d7d2}.govuk-tag--pink{color:#80224d;background:#f7d7e6}.govuk-tag--green{color:#005a30;background:#cce2d8}.govuk-phase-banner{padding-top:10px;padding-bottom:10px;border-bottom:1px solid #b1b4b6}.govuk-phase-banner__content{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;display:table;margin:0}@media print{.govuk-phase-banner__content{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-phase-banner__content{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-phase-banner__content{font-size:14pt;line-height:1.2}}@media print{.govuk-phase-banner__content{color:#000}}.govuk-phase-banner__content__tag{margin-right:10px}.govuk-phase-banner__text{display:table-cell;vertical-align:middle}.govuk-tabs{margin-top:5px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-tabs{margin-top:5px}}@media (min-width: 40.0625em){.govuk-tabs{margin-bottom:30px}}.govuk-tabs__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:10px}@media print{.govuk-tabs__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__title{font-size:14pt;line-height:1.15}}@media print{.govuk-tabs__title{color:#000}}.govuk-tabs__list{margin:0 0 20px;padding:0;list-style:none}@media (min-width: 40.0625em){.govuk-tabs__list{margin-bottom:30px}}.govuk-tabs__list-item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-left:25px}@media print{.govuk-tabs__list-item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__list-item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__list-item{font-size:14pt;line-height:1.15}}.govuk-tabs__list-item:before{color:#0b0c0c;content:"\\2014";margin-left:-25px;padding-right:5px}@media print{.govuk-tabs__list-item:before{color:#000}}.govuk-tabs__tab{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;margin-bottom:10px}@media print{.govuk-tabs__tab{font-family:sans-serif}}.govuk-tabs__tab:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-tabs__tab:link{color:#1d70b8}.govuk-tabs__tab:visited{color:#4c2c92}.govuk-tabs__tab:hover{color:#003078}.govuk-tabs__tab:active{color:#0b0c0c}.govuk-tabs__tab:focus{color:#0b0c0c}.govuk-tabs__panel{margin-bottom:30px}@media (min-width: 40.0625em){.govuk-tabs__panel{margin-bottom:50px}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__list{margin-bottom:0;border-bottom:1px solid #b1b4b6}.js-enabled .govuk-tabs__list:after{content:"";display:block;clear:both}.js-enabled .govuk-tabs__title{display:none}.js-enabled .govuk-tabs__list-item{position:relative;margin-right:5px;margin-bottom:0;margin-left:0;padding:10px 20px;float:left;background-color:#f3f2f1;text-align:center}.js-enabled .govuk-tabs__list-item:before{content:none}.js-enabled .govuk-tabs__list-item--selected{position:relative;margin-top:-5px;margin-bottom:-1px;padding:14px 19px 16px;border:1px solid #b1b4b6;border-bottom:0;background-color:#fff}.js-enabled .govuk-tabs__list-item--selected .govuk-tabs__tab{text-decoration:none}.js-enabled .govuk-tabs__tab{margin-bottom:0}.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:hover{color:#0b0c0cfc}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0;padding:30px 20px;border:1px solid #b1b4b6;border-top:0}}@media (min-width: 40.0625em) and (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel>:last-child{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel--hidden{display:none}}.govuk-radios__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-radios__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__item{font-size:14pt;line-height:1.15}}.govuk-radios__item:last-child,.govuk-radios__item:last-of-type{margin-bottom:0}.govuk-radios__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-radios__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-radios__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;border-radius:50%;background:transparent}.govuk-radios__label:after{content:"";position:absolute;top:10px;left:10px;width:0;height:0;border:10px solid currentColor;border-radius:50%;opacity:0;background:currentColor}.govuk-radios__hint{display:block;padding-right:15px;padding-left:15px}.govuk-radios__input:focus+.govuk-radios__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 4px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-radios__input:focus+.govuk-radios__label:before{outline-color:Highlight}}.govuk-radios__input:checked+.govuk-radios__label:after{opacity:1}.govuk-radios__input:disabled,.govuk-radios__input:disabled+.govuk-radios__label{cursor:default}.govuk-radios__input:disabled+.govuk-radios__label{opacity:.5}@media (min-width: 40.0625em){.govuk-radios--inline:after{content:"";display:block;clear:both}.govuk-radios--inline .govuk-radios__item{margin-right:20px;float:left;clear:none}}.govuk-radios__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-radios__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-radios__divider{color:#000}}.govuk-radios__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-radios__conditional{margin-bottom:20px}}.js-enabled .govuk-radios__conditional--hidden{display:none}.govuk-radios__conditional>:last-child{margin-bottom:0}.govuk-radios--small .govuk-radios__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-radios--small .govuk-radios__item:after{content:"";display:block;clear:both}.govuk-radios--small .govuk-radios__input{left:-10px}.govuk-radios--small .govuk-radios__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-radios--small .govuk-radios__label{padding:11px 15px 10px 1px}}.govuk-radios--small .govuk-radios__label:before{top:8px;width:24px;height:24px}.govuk-radios--small .govuk-radios__label:after{top:15px;left:7px;border-width:5px}.govuk-radios--small .govuk-radios__hint{padding:0;clear:both;pointer-events:none}.govuk-radios--small .govuk-radios__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-radios--small .govuk-radios__divider{width:24px;margin-bottom:5px}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:initial}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0}}.govuk-select{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;max-width:100%;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;color:#0b0c0c;background-color:#fff}@media print{.govuk-select{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-select{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-select{font-size:14pt;line-height:1.25}}.govuk-select:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-select option:active,.govuk-select option:checked,.govuk-select:focus::-ms-value{color:#fff;background-color:#1d70b8}.govuk-select--error{border-color:#d4351c}.govuk-select--error:focus{border-color:#0b0c0c}.govuk-skip-link{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:block;padding:10px 15px}.govuk-skip-link:active,.govuk-skip-link:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}@media print{.govuk-skip-link{font-family:sans-serif}}.govuk-skip-link:link,.govuk-skip-link:visited{color:#0b0c0c}@media print{.govuk-skip-link:link,.govuk-skip-link:visited{color:#000}}.govuk-skip-link:hover{color:#0b0c0cfc}.govuk-skip-link:active,.govuk-skip-link:focus{color:#0b0c0c}@media print{.govuk-skip-link:active,.govuk-skip-link:focus{color:#000}}@media (min-width: 40.0625em){.govuk-skip-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-skip-link{font-size:14pt;line-height:1.2}}@supports (padding: max(0px)){.govuk-skip-link{padding-right:max(15px,calc(15px + env(safe-area-inset-right)));padding-left:max(15px,calc(15px + env(safe-area-inset-left)))}}.govuk-skip-link:focus{outline:3px solid #ffdd00;outline-offset:0;background-color:#fd0}.govuk-skip-link-focused-element:focus{outline:none}.govuk-table{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:100%;margin-bottom:20px;border-spacing:0;border-collapse:collapse}@media print{.govuk-table{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table{font-size:14pt;line-height:1.15}}@media print{.govuk-table{color:#000}}@media (min-width: 40.0625em){.govuk-table{margin-bottom:30px}}.govuk-table__header{font-weight:700}.govuk-table__header,.govuk-table__cell{padding:10px 20px 10px 0;border-bottom:1px solid #b1b4b6;text-align:left;vertical-align:top}.govuk-table__cell--numeric{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400}@media print{.govuk-table__cell--numeric{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-table__cell--numeric{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-table__header--numeric,.govuk-table__cell--numeric{text-align:right}.govuk-table__header:last-child,.govuk-table__cell:last-child{padding-right:0}.govuk-table__caption{font-weight:700;display:table-caption;text-align:left}.govuk-table__caption--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-table__caption--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-table__caption--xl{font-size:32pt;line-height:1.15}}.govuk-table__caption--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-table__caption--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-table__caption--l{font-size:24pt;line-height:1.05}}.govuk-table__caption--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-table__caption--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-table__caption--m{font-size:18pt;line-height:1.15}}.govuk-table__caption--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-table__caption--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table__caption--s{font-size:14pt;line-height:1.15}}.govuk-warning-text{position:relative;margin-bottom:20px;padding:10px 0}@media (min-width: 40.0625em){.govuk-warning-text{margin-bottom:30px}}.govuk-warning-text__assistive{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-warning-text__icon{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;box-sizing:border-box;display:inline-block;position:absolute;left:0;min-width:35px;min-height:35px;margin-top:-7px;border:3px solid #0b0c0c;border-radius:50%;color:#fff;background:#0b0c0c;font-size:30px;line-height:29px;text-align:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;forced-color-adjust:none}@media print{.govuk-warning-text__icon{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__icon{margin-top:-5px}}@media screen and (forced-colors: active){.govuk-warning-text__icon{border-color:windowText;color:windowText;background:transparent}}.govuk-warning-text__text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;padding-left:45px}@media print{.govuk-warning-text__text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-warning-text__text{font-size:14pt;line-height:1.15}}@media print{.govuk-warning-text__text{color:#000}}.govuk-clearfix:after{content:"";display:block;clear:both}.govuk-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-visually-hidden-focusable{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important}.govuk-visually-hidden-focusable:active,.govuk-visually-hidden-focusable:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}.govuk-\\!-display-inline{display:inline!important}.govuk-\\!-display-inline-block{display:inline-block!important}.govuk-\\!-display-block{display:block!important}.govuk-\\!-display-none{display:none!important}@media print{.govuk-\\!-display-none-print{display:none!important}}.govuk-\\!-margin-0{margin:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-0{margin:0!important}}.govuk-\\!-margin-top-0{margin-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-0{margin-top:0!important}}.govuk-\\!-margin-right-0{margin-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-0{margin-right:0!important}}.govuk-\\!-margin-bottom-0{margin-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-0{margin-bottom:0!important}}.govuk-\\!-margin-left-0{margin-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-0{margin-left:0!important}}.govuk-\\!-margin-1{margin:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-1{margin:5px!important}}.govuk-\\!-margin-top-1{margin-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-1{margin-top:5px!important}}.govuk-\\!-margin-right-1{margin-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-1{margin-right:5px!important}}.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}}.govuk-\\!-margin-left-1{margin-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-1{margin-left:5px!important}}.govuk-\\!-margin-2{margin:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-2{margin:10px!important}}.govuk-\\!-margin-top-2{margin-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-2{margin-top:10px!important}}.govuk-\\!-margin-right-2{margin-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-2{margin-right:10px!important}}.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}}.govuk-\\!-margin-left-2{margin-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-2{margin-left:10px!important}}.govuk-\\!-margin-3{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-3{margin:15px!important}}.govuk-\\!-margin-top-3{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-3{margin-top:15px!important}}.govuk-\\!-margin-right-3{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-3{margin-right:15px!important}}.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}}.govuk-\\!-margin-left-3{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-3{margin-left:15px!important}}.govuk-\\!-margin-4{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-4{margin:20px!important}}.govuk-\\!-margin-top-4{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-4{margin-top:20px!important}}.govuk-\\!-margin-right-4{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-4{margin-right:20px!important}}.govuk-\\!-margin-bottom-4{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-4{margin-bottom:20px!important}}.govuk-\\!-margin-left-4{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-4{margin-left:20px!important}}.govuk-\\!-margin-5{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-5{margin:25px!important}}.govuk-\\!-margin-top-5{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-5{margin-top:25px!important}}.govuk-\\!-margin-right-5{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-5{margin-right:25px!important}}.govuk-\\!-margin-bottom-5{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-5{margin-bottom:25px!important}}.govuk-\\!-margin-left-5{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-5{margin-left:25px!important}}.govuk-\\!-margin-6{margin:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-6{margin:30px!important}}.govuk-\\!-margin-top-6{margin-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-6{margin-top:30px!important}}.govuk-\\!-margin-right-6{margin-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-6{margin-right:30px!important}}.govuk-\\!-margin-bottom-6{margin-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-6{margin-bottom:30px!important}}.govuk-\\!-margin-left-6{margin-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-6{margin-left:30px!important}}.govuk-\\!-margin-7{margin:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-7{margin:40px!important}}.govuk-\\!-margin-top-7{margin-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-7{margin-top:40px!important}}.govuk-\\!-margin-right-7{margin-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-7{margin-right:40px!important}}.govuk-\\!-margin-bottom-7{margin-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-7{margin-bottom:40px!important}}.govuk-\\!-margin-left-7{margin-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-7{margin-left:40px!important}}.govuk-\\!-margin-8{margin:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-8{margin:50px!important}}.govuk-\\!-margin-top-8{margin-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-8{margin-top:50px!important}}.govuk-\\!-margin-right-8{margin-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-8{margin-right:50px!important}}.govuk-\\!-margin-bottom-8{margin-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-8{margin-bottom:50px!important}}.govuk-\\!-margin-left-8{margin-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-8{margin-left:50px!important}}.govuk-\\!-margin-9{margin:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-9{margin:60px!important}}.govuk-\\!-margin-top-9{margin-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-9{margin-top:60px!important}}.govuk-\\!-margin-right-9{margin-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-9{margin-right:60px!important}}.govuk-\\!-margin-bottom-9{margin-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-9{margin-bottom:60px!important}}.govuk-\\!-margin-left-9{margin-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-9{margin-left:60px!important}}.govuk-\\!-padding-0{padding:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-0{padding:0!important}}.govuk-\\!-padding-top-0{padding-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-0{padding-top:0!important}}.govuk-\\!-padding-right-0{padding-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-0{padding-right:0!important}}.govuk-\\!-padding-bottom-0{padding-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-0{padding-bottom:0!important}}.govuk-\\!-padding-left-0{padding-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-0{padding-left:0!important}}.govuk-\\!-padding-1{padding:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-1{padding:5px!important}}.govuk-\\!-padding-top-1{padding-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-1{padding-top:5px!important}}.govuk-\\!-padding-right-1{padding-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-1{padding-right:5px!important}}.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}}.govuk-\\!-padding-left-1{padding-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-1{padding-left:5px!important}}.govuk-\\!-padding-2{padding:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-2{padding:10px!important}}.govuk-\\!-padding-top-2{padding-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-2{padding-top:10px!important}}.govuk-\\!-padding-right-2{padding-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-2{padding-right:10px!important}}.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}}.govuk-\\!-padding-left-2{padding-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-2{padding-left:10px!important}}.govuk-\\!-padding-3{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-3{padding:15px!important}}.govuk-\\!-padding-top-3{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-3{padding-top:15px!important}}.govuk-\\!-padding-right-3{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-3{padding-right:15px!important}}.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}}.govuk-\\!-padding-left-3{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-3{padding-left:15px!important}}.govuk-\\!-padding-4{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-4{padding:20px!important}}.govuk-\\!-padding-top-4{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-4{padding-top:20px!important}}.govuk-\\!-padding-right-4{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-4{padding-right:20px!important}}.govuk-\\!-padding-bottom-4{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-4{padding-bottom:20px!important}}.govuk-\\!-padding-left-4{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-4{padding-left:20px!important}}.govuk-\\!-padding-5{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-5{padding:25px!important}}.govuk-\\!-padding-top-5{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-5{padding-top:25px!important}}.govuk-\\!-padding-right-5{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-5{padding-right:25px!important}}.govuk-\\!-padding-bottom-5{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-5{padding-bottom:25px!important}}.govuk-\\!-padding-left-5{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-5{padding-left:25px!important}}.govuk-\\!-padding-6{padding:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-6{padding:30px!important}}.govuk-\\!-padding-top-6{padding-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-6{padding-top:30px!important}}.govuk-\\!-padding-right-6{padding-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-6{padding-right:30px!important}}.govuk-\\!-padding-bottom-6{padding-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-6{padding-bottom:30px!important}}.govuk-\\!-padding-left-6{padding-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-6{padding-left:30px!important}}.govuk-\\!-padding-7{padding:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-7{padding:40px!important}}.govuk-\\!-padding-top-7{padding-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-7{padding-top:40px!important}}.govuk-\\!-padding-right-7{padding-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-7{padding-right:40px!important}}.govuk-\\!-padding-bottom-7{padding-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-7{padding-bottom:40px!important}}.govuk-\\!-padding-left-7{padding-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-7{padding-left:40px!important}}.govuk-\\!-padding-8{padding:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-8{padding:50px!important}}.govuk-\\!-padding-top-8{padding-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-8{padding-top:50px!important}}.govuk-\\!-padding-right-8{padding-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-8{padding-right:50px!important}}.govuk-\\!-padding-bottom-8{padding-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-8{padding-bottom:50px!important}}.govuk-\\!-padding-left-8{padding-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-8{padding-left:50px!important}}.govuk-\\!-padding-9{padding:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-9{padding:60px!important}}.govuk-\\!-padding-top-9{padding-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-9{padding-top:60px!important}}.govuk-\\!-padding-right-9{padding-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-9{padding-right:60px!important}}.govuk-\\!-padding-bottom-9{padding-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-9{padding-bottom:60px!important}}.govuk-\\!-padding-left-9{padding-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-9{padding-left:60px!important}}.govuk-\\!-text-align-left{text-align:left!important}.govuk-\\!-text-align-centre{text-align:center!important}.govuk-\\!-text-align-right{text-align:right!important}.govuk-\\!-font-size-80{font-size:53px!important;font-size:3.3125rem!important;line-height:1.0377358491!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-80{font-size:80px!important;font-size:5rem!important;line-height:1!important}}@media print{.govuk-\\!-font-size-80{font-size:53pt!important;line-height:1.1!important}}.govuk-\\!-font-size-48{font-size:32px!important;font-size:2rem!important;line-height:1.09375!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-48{font-size:48px!important;font-size:3rem!important;line-height:1.0416666667!important}}@media print{.govuk-\\!-font-size-48{font-size:32pt!important;line-height:1.15!important}}.govuk-\\!-font-size-36{font-size:24px!important;font-size:1.5rem!important;line-height:1.0416666667!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-36{font-size:36px!important;font-size:2.25rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-36{font-size:24pt!important;line-height:1.05!important}}.govuk-\\!-font-size-27{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-27{font-size:27px!important;font-size:1.6875rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-27{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-24{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-24{font-size:24px!important;font-size:1.5rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-24{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-19{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-19{font-size:19px!important;font-size:1.1875rem!important;line-height:1.3157894737!important}}@media print{.govuk-\\!-font-size-19{font-size:14pt!important;line-height:1.15!important}}.govuk-\\!-font-size-16{font-size:14px!important;font-size:.875rem!important;line-height:1.1428571429!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-16{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-16{font-size:14pt!important;line-height:1.2!important}}.govuk-\\!-font-size-14{font-size:12px!important;font-size:.75rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-14{font-size:14px!important;font-size:.875rem!important;line-height:1.4285714286!important}}@media print{.govuk-\\!-font-size-14{font-size:12pt!important;line-height:1.2!important}}.govuk-\\!-font-weight-regular{font-weight:400!important}.govuk-\\!-font-weight-bold{font-weight:700!important}.govuk-\\!-width-full,.govuk-\\!-width-three-quarters{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-three-quarters{width:75%!important}}.govuk-\\!-width-two-thirds{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-two-thirds{width:66.66%!important}}.govuk-\\!-width-one-half{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-half{width:50%!important}}.govuk-\\!-width-one-third{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-third{width:33.33%!important}}.govuk-\\!-width-one-quarter{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-quarter{width:25%!important}}:host .govuk-label,:host .govuk-hint,:host .govuk-error-message{font-family:var(--postcode__font-family, "GDS Transport", arial, sans-serif);font-size:var(--postcode__font-size, 19px)}:host .govuk-input{font-family:var(--postcode__font-family, "GDS Transport", arial, sans-serif);font-size:var(--postcode__input__font-size, 19px);height:var(--postcode__input__height, 35px);padding:var(--postcode__input__padding, 5px 34px 5px 5px)}
110
+ `;var mp=Object.freeze,pp=Object.defineProperty,dC=Object.getOwnPropertyDescriptor,xi=(i,t,e,n)=>{for(var r=n>1?void 0:n?dC(t,e):t,o=i.length-1,s;o>=0;o--)(s=i[o])&&(r=(n?s(t,e,r):s(r))||r);return n&&r&&pp(t,e,r),r},cC=(i,t)=>mp(pp(i,"raw",{value:mp(t||i.slice())})),vp;q.PostcodeSearch=class extends Pn{constructor(){super(...arguments),this.id="postcode",this.errorId="postcode-error",this.label="Postcode",this.hintText="",this.errorMessage="Enter a valid UK postcode",this.onlyQuestionOnPage=!1,this._postcode="",this._sanitizedPostcode=null,this._showPostcodeError=!1,this.dispatch=(i,t)=>this.dispatchEvent(new CustomEvent(i,{detail:t}))}_onInputChange(i){const t=i.target.value,e=hC(t.trim()).valid;e?(this._sanitizedPostcode=hd(t.trim()),this._postcode=hd(t.trim())||t,this._showPostcodeError=!1):(this._sanitizedPostcode=null,this._postcode=t.toUpperCase()),this.dispatch("postcodeChange",{postcode:this._sanitizedPostcode||t,isValid:e})}_onBlur(){this._sanitizedPostcode||(this._showPostcodeError=!0),this._showError()}_onKeyUp(i){i.key==="Enter"&&!this._sanitizedPostcode&&(this._showPostcodeError=!0),this._showError()}_showError(){var e,n;const i=(e=this.shadowRoot)==null?void 0:e.querySelector(`#${this.errorId}`);i&&(i.style.display="none"),i&&this._showPostcodeError&&(i.style.display="");const t=(n=this.shadowRoot)==null?void 0:n.querySelector(".govuk-form-group");t&&this._showPostcodeError&&t.classList.add("govuk-form-group--error"),t&&!this._showPostcodeError&&t.classList.remove("govuk-form-group--error")}_makeLabel(){return this.onlyQuestionOnPage?Bi`<h1 class="govuk-label-wrapper">
111
111
  <label class="govuk-label govuk-label--l" for=${this.id}>
112
112
  ${this.label}
113
113
  </label>
114
- </h1>`:Bi`<label class="govuk-label" for=${this.id}>${this.label}</label>`}render(){return Bi(_p||(_p=cC([`<script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>
114
+ </h1>`:Bi`<label class="govuk-label" for=${this.id}>${this.label}</label>`}render(){return Bi(vp||(vp=cC([`<script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>
115
115
  <div class="govuk-form-group">
116
116
  `,`
117
117
  <div id="postcode-hint" class="govuk-hint">`,`</div>
@@ -137,4 +137,4 @@ northing meters`+i;var c=d/2,f=0,g=0,m,p,_,v,y;return c>0&&(m=1e5/Math.pow(10,c)
137
137
  @keyup=`,`
138
138
  tabindex="0"
139
139
  />
140
- </div>`])),this._makeLabel(),this.hintText,this.errorId,this.errorMessage,this.id,this.errorId,this._postcode,this._onInputChange,this._onBlur,this._onKeyUp)}},q.PostcodeSearch.styles=Ss(uC),xi([J({type:String})],q.PostcodeSearch.prototype,"id",2),xi([J({type:String})],q.PostcodeSearch.prototype,"errorId",2),xi([J({type:String})],q.PostcodeSearch.prototype,"label",2),xi([J({type:String})],q.PostcodeSearch.prototype,"hintText",2),xi([J({type:String})],q.PostcodeSearch.prototype,"errorMessage",2),xi([J({type:Boolean})],q.PostcodeSearch.prototype,"onlyQuestionOnPage",2),xi([Ui()],q.PostcodeSearch.prototype,"_postcode",2),xi([Ui()],q.PostcodeSearch.prototype,"_sanitizedPostcode",2),xi([Ui()],q.PostcodeSearch.prototype,"_showPostcodeError",2),q.PostcodeSearch=xi([vl("postcode-search")],q.PostcodeSearch),Object.defineProperties(q,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
140
+ </div>`])),this._makeLabel(),this.hintText,this.errorId,this.errorMessage,this.id,this.errorId,this._postcode,this._onInputChange,this._onBlur,this._onKeyUp)}},q.PostcodeSearch.styles=Cs(uC),xi([J({type:String})],q.PostcodeSearch.prototype,"id",2),xi([J({type:String})],q.PostcodeSearch.prototype,"errorId",2),xi([J({type:String})],q.PostcodeSearch.prototype,"label",2),xi([J({type:String})],q.PostcodeSearch.prototype,"hintText",2),xi([J({type:String})],q.PostcodeSearch.prototype,"errorMessage",2),xi([J({type:Boolean})],q.PostcodeSearch.prototype,"onlyQuestionOnPage",2),xi([Ui()],q.PostcodeSearch.prototype,"_postcode",2),xi([Ui()],q.PostcodeSearch.prototype,"_sanitizedPostcode",2),xi([Ui()],q.PostcodeSearch.prototype,"_showPostcodeError",2),q.PostcodeSearch=xi([vl("postcode-search")],q.PostcodeSearch),Object.defineProperties(q,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});