@opensystemslab/map 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,99 +1,60 @@
1
- (function(j,Gi){typeof exports=="object"&&typeof module<"u"?Gi(exports):typeof define=="function"&&define.amd?define(["exports"],Gi):(j=typeof globalThis<"u"?globalThis:j||self,Gi(j.ComponentLib={}))})(this,function(j){"use strict";/**
2
- * @license
3
- * Copyright 2019 Google LLC
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 Es=i=>new Md(typeof i=="string"?i:i+"",void 0,ul),Tp=(i,...t)=>{const e=i.length===1?i[0]:t.reduce((n,o,r)=>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.")})(o)+i[r+1],i[0]);return new Md(e,i,ul)},Ip=(i,t)=>{hl?i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const n=document.createElement("style"),o=Gi.litNonce;o!==void 0&&n.setAttribute("nonce",o),n.textContent=e.cssText,i.appendChild(n)})},Cd=hl?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return Es(e)})(i):i;/**
6
- * @license
7
- * Copyright 2017 Google LLC
8
- * SPDX-License-Identifier: BSD-3-Clause
9
- */var dl;const Ss=window,Ed=Ss.trustedTypes,zp=Ed?Ed.emptyScript:"",Sd=Ss.reactiveElementPolyfillSupport,cl={toAttribute(i,t){switch(t){case Boolean:i=i?zp: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),gl={attribute:!0,type:String,converter:cl,reflect:!1,hasChanged:Td};class go 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 o=this._$Ep(n,e);o!==void 0&&(this._$Ev.set(o,n),t.push(o))}),t}static createProperty(t,e=gl){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,o=this.getPropertyDescriptor(t,n,e);o!==void 0&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,n){return{get(){return this[e]},set(o){const r=this[t];this[e]=o,this.requestUpdate(t,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||gl}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 o of n)this.createProperty(o,e[o])}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 o of n)e.unshift(Cd(o))}else t!==void 0&&e.push(Cd(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 Ip(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=gl){var o;const r=this.constructor._$Ep(t,n);if(r!==void 0&&n.reflect===!0){const s=(((o=n.converter)===null||o===void 0?void 0:o.toAttribute)!==void 0?n.converter:cl).toAttribute(e,n.type);this._$El=t,s==null?this.removeAttribute(r):this.setAttribute(r,s),this._$El=null}}_$AK(t,e){var n;const o=this.constructor,r=o._$Ev.get(t);if(r!==void 0&&this._$El!==r){const s=o.getPropertyOptions(r),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=r,this[r]=a.fromAttribute(e,s.type),this._$El=null}}requestUpdate(t,e,n){let o=!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))):o=!1),!this.isUpdatePending&&o&&(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((o,r)=>this[r]=o),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(o=>{var r;return(r=o.hostUpdate)===null||r===void 0?void 0:r.call(o)}),this.update(n)):this._$Ek()}catch(o){throw e=!1,this._$Ek(),o}e&&this._$AE(n)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(n=>{var o;return(o=n.hostUpdated)===null||o===void 0?void 0:o.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){}}go.finalized=!0,go.elementProperties=new Map,go.elementStyles=[],go.shadowRootOptions={mode:"open"},Sd==null||Sd({ReactiveElement:go}),((dl=Ss.reactiveElementVersions)!==null&&dl!==void 0?dl:Ss.reactiveElementVersions=[]).push("1.4.1");/**
10
- * @license
11
- * Copyright 2017 Google LLC
12
- * SPDX-License-Identifier: BSD-3-Clause
13
- */var fl;const Ts=window,fo=Ts.trustedTypes,Id=fo?fo.createPolicy("lit-html",{createHTML:i=>i}):void 0,ji=`lit$${(Math.random()+"").slice(9)}$`,zd="?"+ji,Rp=`<${zd}>`,mo=document,ur=(i="")=>mo.createComment(i),dr=i=>i===null||typeof i!="object"&&typeof i!="function",Rd=Array.isArray,Ap=i=>Rd(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",cr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ad=/-->/g,Pd=/>/g,Rn=RegExp(`>|[
1
+ var CE=Object.defineProperty;var EE=(F,me,Mi)=>me in F?CE(F,me,{enumerable:!0,configurable:!0,writable:!0,value:Mi}):F[me]=Mi;var X=(F,me,Mi)=>(EE(F,typeof me!="symbol"?me+"":me,Mi),Mi);(function(F,me){typeof exports=="object"&&typeof module<"u"?me(exports):typeof define=="function"&&define.amd?define(["exports"],me):(F=typeof globalThis<"u"?globalThis:F||self,me(F.ComponentLib={}))})(this,function(F){var dd,cd,fd;"use strict";const me=window,Mi=me.ShadowRoot&&(me.ShadyCSS===void 0||me.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,dl=Symbol(),Ed=new WeakMap;let Sd=class{constructor(t,e,n){if(this._$cssResult$=!0,n!==dl)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(Mi&&t===void 0){const n=e!==void 0&&e.length===1;n&&(t=Ed.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&Ed.set(e,t))}return t}toString(){return this.cssText}};const Ts=i=>new Sd(typeof i=="string"?i:i+"",void 0,dl),Rp=(i,...t)=>{const e=i.length===1?i[0]:t.reduce((n,o,r)=>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.")})(o)+i[r+1],i[0]);return new Sd(e,i,dl)},Ap=(i,t)=>{Mi?i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const n=document.createElement("style"),o=me.litNonce;o!==void 0&&n.setAttribute("nonce",o),n.textContent=e.cssText,i.appendChild(n)})},Td=Mi?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return Ts(e)})(i):i;var cl;const Is=window,Id=Is.trustedTypes,Pp=Id?Id.emptyScript:"",zd=Is.reactiveElementPolyfillSupport,fl={toAttribute(i,t){switch(t){case Boolean:i=i?Pp: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}},Rd=(i,t)=>t!==i&&(t==t||i==i),gl={attribute:!0,type:String,converter:fl,reflect:!1,hasChanged:Rd};let mo=class 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 o=this._$Ep(n,e);o!==void 0&&(this._$Ev.set(o,n),t.push(o))}),t}static createProperty(t,e=gl){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,o=this.getPropertyDescriptor(t,n,e);o!==void 0&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,n){return{get(){return this[e]},set(o){const r=this[t];this[e]=o,this.requestUpdate(t,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||gl}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 o of n)this.createProperty(o,e[o])}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 o of n)e.unshift(Td(o))}else t!==void 0&&e.push(Td(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 Ap(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=gl){var o;const r=this.constructor._$Ep(t,n);if(r!==void 0&&n.reflect===!0){const s=(((o=n.converter)===null||o===void 0?void 0:o.toAttribute)!==void 0?n.converter:fl).toAttribute(e,n.type);this._$El=t,s==null?this.removeAttribute(r):this.setAttribute(r,s),this._$El=null}}_$AK(t,e){var n;const o=this.constructor,r=o._$Ev.get(t);if(r!==void 0&&this._$El!==r){const s=o.getPropertyOptions(r),a=typeof s.converter=="function"?{fromAttribute:s.converter}:((n=s.converter)===null||n===void 0?void 0:n.fromAttribute)!==void 0?s.converter:fl;this._$El=r,this[r]=a.fromAttribute(e,s.type),this._$El=null}}requestUpdate(t,e,n){let o=!0;t!==void 0&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||Rd)(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))):o=!1),!this.isUpdatePending&&o&&(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((o,r)=>this[r]=o),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(o=>{var r;return(r=o.hostUpdate)===null||r===void 0?void 0:r.call(o)}),this.update(n)):this._$Ek()}catch(o){throw e=!1,this._$Ek(),o}e&&this._$AE(n)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(n=>{var o;return(o=n.hostUpdated)===null||o===void 0?void 0:o.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){}};mo.finalized=!0,mo.elementProperties=new Map,mo.elementStyles=[],mo.shadowRootOptions={mode:"open"},zd==null||zd({ReactiveElement:mo}),((cl=Is.reactiveElementVersions)!==null&&cl!==void 0?cl:Is.reactiveElementVersions=[]).push("1.4.1");var ml;const zs=window,po=zs.trustedTypes,Ad=po?po.createPolicy("lit-html",{createHTML:i=>i}):void 0,Ui=`lit$${(Math.random()+"").slice(9)}$`,Pd="?"+Ui,Dp=`<${Pd}>`,vo=document,cr=(i="")=>vo.createComment(i),fr=i=>i===null||typeof i!="object"&&typeof i!="function",Dd=Array.isArray,Lp=i=>Dd(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",gr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ld=/-->/g,Od=/>/g,Dn=RegExp(`>|[
14
2
  \f\r](?:([^\\s"'>=/]+)([
15
3
  \f\r]*=[
16
4
  \f\r]*(?:[^
17
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Dd=/'/g,Ld=/"/g,Od=/^(?:script|style|textarea|title)$/i,Pp=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),Bi=Pp(1),po=Symbol.for("lit-noChange"),ie=Symbol.for("lit-nothing"),Fd=new WeakMap,Dp=(i,t,e)=>{var n,o;const r=(n=e==null?void 0:e.renderBefore)!==null&&n!==void 0?n:t;let s=r._$litPart$;if(s===void 0){const a=(o=e==null?void 0:e.renderBefore)!==null&&o!==void 0?o:null;r._$litPart$=s=new fr(t.insertBefore(ur(),a),a,void 0,e!=null?e:{})}return s._$AI(i),s},vo=mo.createTreeWalker(mo,129,null,!1),Lp=(i,t)=>{const e=i.length-1,n=[];let o,r=t===2?"<svg>":"",s=cr;for(let l=0;l<e;l++){const h=i[l];let u,d,c=-1,g=0;for(;g<h.length&&(s.lastIndex=g,d=s.exec(h),d!==null);)g=s.lastIndex,s===cr?d[1]==="!--"?s=Ad:d[1]!==void 0?s=Pd:d[2]!==void 0?(Od.test(d[2])&&(o=RegExp("</"+d[2],"g")),s=Rn):d[3]!==void 0&&(s=Rn):s===Rn?d[0]===">"?(s=o!=null?o:cr,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===Ad||s===Pd?s=cr:(s=Rn,o=void 0);const f=s===Rn&&i[l+1].startsWith("/>")?" ":"";r+=s===cr?h+Rp:c>=0?(n.push(u),h.slice(0,c)+"$lit$"+h.slice(c)+ji+f):h+ji+(c===-2?(n.push(void 0),l):f)}const a=r+(i[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Id!==void 0?Id.createHTML(a):a,n]};class gr{constructor({strings:t,_$litType$:e},n){let o;this.parts=[];let r=0,s=0;const a=t.length-1,l=this.parts,[h,u]=Lp(t,e);if(this.el=gr.createElement(h,n),vo.currentNode=this.el.content,e===2){const d=this.el.content,c=d.firstChild;c.remove(),d.append(...c.childNodes)}for(;(o=vo.nextNode())!==null&&l.length<a;){if(o.nodeType===1){if(o.hasAttributes()){const d=[];for(const c of o.getAttributeNames())if(c.endsWith("$lit$")||c.startsWith(ji)){const g=u[s++];if(d.push(c),g!==void 0){const f=o.getAttribute(g.toLowerCase()+"$lit$").split(ji),m=/([.?@])?(.*)/.exec(g);l.push({type:1,index:r,name:m[2],strings:f,ctor:m[1]==="."?Fp:m[1]==="?"?Gp:m[1]==="@"?jp:Is})}else l.push({type:6,index:r})}for(const c of d)o.removeAttribute(c)}if(Od.test(o.tagName)){const d=o.textContent.split(ji),c=d.length-1;if(c>0){o.textContent=fo?fo.emptyScript:"";for(let g=0;g<c;g++)o.append(d[g],ur()),vo.nextNode(),l.push({type:2,index:++r});o.append(d[c],ur())}}}else if(o.nodeType===8)if(o.data===zd)l.push({type:2,index:r});else{let d=-1;for(;(d=o.data.indexOf(ji,d+1))!==-1;)l.push({type:7,index:r}),d+=ji.length-1}r++}}static createElement(t,e){const n=mo.createElement("template");return n.innerHTML=t,n}}function _o(i,t,e=i,n){var o,r,s,a;if(t===po)return t;let l=n!==void 0?(o=e._$Cl)===null||o===void 0?void 0:o[n]:e._$Cu;const h=dr(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((r=l==null?void 0:l._$AO)===null||r===void 0||r.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=_o(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:o}=this._$AD,r=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:mo).importNode(n,!0);vo.currentNode=r;let s=vo.nextNode(),a=0,l=0,h=o[0];for(;h!==void 0;){if(a===h.index){let u;h.type===2?u=new fr(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=o[++l]}a!==(h==null?void 0:h.index)&&(s=vo.nextNode(),a++)}return r}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 fr{constructor(t,e,n,o){var r;this.type=2,this._$AH=ie,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=o,this._$C_=(r=o==null?void 0:o.isConnected)===null||r===void 0||r}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=_o(this,t,e),dr(t)?t===ie||t==null||t===""?(this._$AH!==ie&&this._$AR(),this._$AH=ie):t!==this._$AH&&t!==po&&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&&dr(this._$AH)?this._$AA.nextSibling.data=t:this.k(mo.createTextNode(t)),this._$AH=t}T(t){var e;const{values:n,_$litType$:o}=t,r=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=gr.createElement(o.h,this.options)),o);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===r)this._$AH.m(n);else{const s=new Op(r,this),a=s.p(this.options);s.m(n),this.k(a),this._$AH=s}}_$AC(t){let e=Fd.get(t.strings);return e===void 0&&Fd.set(t.strings,e=new gr(t)),e}O(t){Rd(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,o=0;for(const r of t)o===e.length?e.push(n=new fr(this.S(ur()),this.S(ur()),this,this.options)):n=e[o],n._$AI(r),o++;o<e.length&&(this._$AR(n&&n._$AB.nextSibling,o),e.length=o)}_$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 o=t.nextSibling;t.remove(),t=o}}setConnected(t){var e;this._$AM===void 0&&(this._$C_=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class Is{constructor(t,e,n,o,r){this.type=1,this._$AH=ie,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,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,o){const r=this.strings;let s=!1;if(r===void 0)t=_o(this,t,e,0),s=!dr(t)||t!==this._$AH&&t!==po,s&&(this._$AH=t);else{const a=t;let l,h;for(t=r[0],l=0;l<r.length-1;l++)h=_o(this,a[n+l],e,l),h===po&&(h=this._$AH[l]),s||(s=!dr(h)||h!==this._$AH[l]),h===ie?t=ie:t!==ie&&(t+=(h!=null?h:"")+r[l+1]),this._$AH[l]=h}s&&!o&&this.P(t)}P(t){t===ie?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}}class Fp extends Is{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===ie?void 0:t}}const Np=fo?fo.emptyScript:"";class Gp extends Is{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 Is{constructor(t,e,n,o,r){super(t,e,n,o,r),this.type=5}_$AI(t,e=this){var n;if((t=(n=_o(this,t,e,0))!==null&&n!==void 0?n:ie)===po)return;const o=this._$AH,r=t===ie&&o!==ie||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==ie&&(o===ie||r);r&&this.element.removeEventListener(this.name,this,o),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){_o(this,t)}}const Nd=Ts.litHtmlPolyfillSupport;Nd==null||Nd(gr,fr),((fl=Ts.litHtmlVersions)!==null&&fl!==void 0?fl:Ts.litHtmlVersions=[]).push("2.3.1");/**
18
- * @license
19
- * Copyright 2017 Google LLC
20
- * SPDX-License-Identifier: BSD-3-Clause
21
- */var ml,pl;class An extends go{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 po}}An.finalized=!0,An._$litElement$=!0,(ml=globalThis.litElementHydrateSupport)===null||ml===void 0||ml.call(globalThis,{LitElement:An});const Gd=globalThis.litElementPolyfillSupport;Gd==null||Gd({LitElement:An}),((pl=globalThis.litElementVersions)!==null&&pl!==void 0?pl:globalThis.litElementVersions=[]).push("3.2.2");/**
22
- * @license
23
- * Copyright 2017 Google LLC
24
- * SPDX-License-Identifier: BSD-3-Clause
25
- */const vl=i=>t=>typeof t=="function"?((e,n)=>(customElements.define(e,n),n))(i,t):((e,n)=>{const{kind:o,elements:r}=n;return{kind:o,elements:r,finisher(s){customElements.define(e,s)}}})(i,t);/**
26
- * @license
27
- * Copyright 2017 Google LLC
28
- * SPDX-License-Identifier: BSD-3-Clause
29
- */const Wp=(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,o,r)=>{o.constructor.createProperty(r,n)})(i,t,e):Wp(i,t)}/**
30
- * @license
31
- * Copyright 2017 Google LLC
32
- * SPDX-License-Identifier: BSD-3-Clause
33
- */function Wi(i){return J({...i,state:!0})}/**
34
- * @license
35
- * Copyright 2021 Google LLC
36
- * SPDX-License-Identifier: BSD-3-Clause
37
- */var _l;((_l=window.HTMLSlotElement)===null||_l===void 0?void 0:_l.prototype.assignedElements)!=null;class Zp{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const Qe=Zp,yo={PROPERTYCHANGE:"propertychange"};class Yp{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}const yl=Yp;function Xp(i,t,e){let n,o;e=e||Pn;let r=0,s=i.length,a=!1;for(;r<s;)n=r+(s-r>>1),o=+e(i[n],t),o<0?r=n+1:(s=n,a=!o);return a?r:~r}function Pn(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 o;if(e>0){for(o=1;o<n;++o)if(i[o]<t)return o-1}else if(e<0){for(o=1;o<n;++o)if(i[o]<=t)return o}else for(o=1;o<n;++o){if(i[o]==t)return o;if(i[o]<t)return typeof e=="function"?e(t,i[o-1],i[o])>0?o-1:o:i[o-1]-t<t-i[o]?o-1:o}return n-1}}function Up(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 o=0;o<n;o++)i[i.length]=e[o]}function Zi(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 Vp(i,t,e){const n=t||Pn;return i.every(function(o,r){if(r===0)return!0;const s=n(i[r-1],o);return!(s>0||e&&s===0)})}function Dn(){return!0}function xo(){return!1}function Ln(){}function qp(i){let t=!1,e,n,o;return function(){const r=Array.prototype.slice.call(arguments);return(!t||this!==o||!Zi(r,n))&&(t=!0,o=this,n=r,e=i.apply(this,arguments)),e}}function mr(i){for(const t in i)delete i[t]}function On(i){let t;for(t in i)return!1;return!t}class $p 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_={}),o=n[t]||(n[t]=[]);o.includes(e)||o.push(e)}dispatchEvent(t){const e=typeof t=="string",n=e?t:t.type,o=this.listeners_&&this.listeners_[n];if(!o)return;const r=e?new Qe(t):t;r.target||(r.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=o.length;h<u;++h)if("handleEvent"in o[h]?l=o[h].handleEvent(r):l=o[h].call(this,r),l===!1||r.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_&&mr(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 o=n.indexOf(e);o!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[o]=Ln,++this.pendingRemovals_[t]):(n.splice(o,1),n.length===0&&delete this.listeners_[t]))}}}const zs=$p,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 ft(i,t,e,n,o){if(n&&n!==i&&(e=e.bind(n)),o){const s=e;e=function(){i.removeEventListener(t,e),s.apply(this,arguments)}}const r={target:i,type:t,listener:e};return i.addEventListener(t,e),r}function Rs(i,t,e,n){return ft(i,t,e,n,!0)}function Ft(i){i&&i.target&&(i.target.removeEventListener(i.type,i.listener),mr(i))}class As extends zs{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,o=new Array(n);for(let r=0;r<n;++r)o[r]=ft(this,t[r],e);return o}else return ft(this,t,e)}onceInternal(t,e){let n;if(Array.isArray(t)){const o=t.length;n=new Array(o);for(let r=0;r<o;++r)n[r]=Rs(this,t[r],e)}else n=Rs(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 o=0,r=t.length;o<r;++o)this.removeEventListener(t[o],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)Ft(i[t]);else Ft(i)}const jd=As;function et(){throw new Error("Unimplemented abstract method.")}let Kp=0;function $(i){return i.ol_uid||(i.ol_uid=String(++Kp))}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,$(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=yo.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 o=this.values_||(this.values_={});if(n)o[t]=e;else{const r=o[t];o[t]=e,r!==e&&this.notify(t,r)}}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],On(this.values_)&&(this.values_=null),e||this.notify(t,n)}}}const hi=Qp,Yi={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"),Wd=typeof devicePixelRatio<"u"?devicePixelRatio:1,bl=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,n0=typeof Image<"u"&&Image.prototype.decode,Zd=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 Ae(i,t,e,n){let o;return e&&e.length?o=e.shift():bl?o=new OffscreenCanvas(i||300,t||300):o=document.createElement("canvas"),i&&(o.width=i),t&&(o.height=t),o.getContext("2d",n)}function kl(i){const t=i.canvas;t.width=1,t.height=1,i.clearRect(0,0,1,1)}function Yd(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 r0(i,t){const e=i.childNodes;for(let n=0;;++n){const o=e[n],r=t[n];if(!o&&!r)break;if(o!==r){if(!o){i.appendChild(r);continue}if(!r){i.removeChild(o),--n;continue}i.insertBefore(r,o)}}}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)Ft(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(ft(t,Yi.POSTRENDER,this.render,this)),t.render())}render(t){}setTarget(t){this.target_=typeof t=="string"?document.getElementById(t):t}}const bo=s0,Ps="ol-hidden",pr="ol-unselectable",Ml="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"),Ud=["style","variant","weight","size","lineHeight","family"],Vd=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,o=Ud.length;n<o;++n){const r=t[n+1];r!==void 0&&(e[Ud[n]]=r)}return e.families=e.family.split(/,\s?/),e},Pt={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 qd=l0;function gt(i,t){if(!i)throw new qd(t)}function Vt(i,t,e){return Math.min(Math.max(i,t),e)}function h0(i,t,e,n,o,r){const s=o-e,a=r-n;if(s!==0||a!==0){const l=((i-e)*s+(t-n)*a)/(s*s+a*a);l>1?(e=o,n=r):l>0&&(e+=s*l,n+=a*l)}return Fn(i,t,e,n)}function Fn(i,t,e,n){const o=e-i,r=n-t;return o*o+r*r}function u0(i){const t=i.length;for(let n=0;n<t;n++){let o=n,r=Math.abs(i[n][n]);for(let a=n+1;a<t;a++){const l=Math.abs(i[a][n]);l>r&&(r=l,o=a)}if(r===0)return null;const s=i[o];i[o]=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 o=n-1;o>=0;o--)i[o][t]-=i[o][n]*e[n]}return e}function Nn(i){return i*Math.PI/180}function Ui(i,t){const e=i%t;return e*t<0?e+t:e}function ki(i,t,e){return i+e*(t-i)}function $d(i,t){const e=Math.pow(10,t);return Math.round(i*e)/e}function Ds(i,t){return Math.floor($d(i,t))}function Ls(i,t){return Math.ceil($d(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[Pt.OPACITY]=t.opacity!==void 0?t.opacity:1,gt(typeof e[Pt.OPACITY]=="number",64),e[Pt.VISIBLE]=t.visible!==void 0?t.visible:!0,e[Pt.Z_INDEX]=t.zIndex,e[Pt.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[Pt.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[Pt.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[Pt.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=Vt(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(Pt.EXTENT)}getMaxResolution(){return this.get(Pt.MAX_RESOLUTION)}getMinResolution(){return this.get(Pt.MIN_RESOLUTION)}getMinZoom(){return this.get(Pt.MIN_ZOOM)}getMaxZoom(){return this.get(Pt.MAX_ZOOM)}getOpacity(){return this.get(Pt.OPACITY)}getSourceState(){return et()}getVisible(){return this.get(Pt.VISIBLE)}getZIndex(){return this.get(Pt.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(Pt.EXTENT,t)}setMaxResolution(t){this.set(Pt.MAX_RESOLUTION,t)}setMinResolution(t){this.set(Pt.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(Pt.MAX_ZOOM,t)}setMinZoom(t){this.set(Pt.MIN_ZOOM,t)}setOpacity(t){gt(typeof t=="number",64),this.set(Pt.OPACITY,t)}setVisible(t){this.set(Pt.VISIBLE,t)}setZIndex(t){this.set(Pt.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const Hd=d0,Vi={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};class c0 extends Hd{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(Pt.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(Pt.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed()}handleSourcePropertyChange_(){this.sourceChangeKey_&&(Ft(this.sourceChangeKey_),this.sourceChangeKey_=null);const t=this.getSource();t&&(this.sourceChangeKey_=ft(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(Pt.MAP,t)}getMapInternal(){return this.get(Pt.MAP)}setMap(t){this.mapPrecomposeKey_&&(Ft(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Ft(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=ft(t,Vi.PRECOMPOSE,function(e){const o=e.frameState.layerStatesArray,r=this.getLayerState(!1);gt(!o.some(function(s){return s.layer===r.layer}),67),o.push(r)},this),this.mapRenderKey_=ft(this,tt.CHANGE,t.render,t),this.changed())}setSource(t){this.set(Pt.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 Cl(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=c0;class g0 extends bo{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",o=t.expandClassName!==void 0?t.expandClassName:e+"-expand",r=t.collapseLabel!==void 0?t.collapseLabel:"\u203A",s=t.collapseClassName!==void 0?t.collapseClassName:e+"-collapse";typeof r=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=r,this.collapseLabel_.className=s):this.collapseLabel_=r;const a=t.label!==void 0?t.label:"i";typeof a=="string"?(this.label_=document.createElement("span"),this.label_.textContent=a,this.label_.className=o):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+" "+pr+" "+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 o=!0;const r=t.layerStatesArray;for(let s=0,a=r.length;s<a;++s){const l=r[s];if(!Cl(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(o=o&&h.getAttributionsCollapsible()!==!1,Array.isArray(d))for(let c=0,g=d.length;c<g;++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(o),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),!Zi(e,this.renderedAttributions_)){o0(this.ulElement_);for(let o=0,r=e.length;o<r;++o){const s=document.createElement("li");s.innerHTML=e[o],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_?Yd(this.collapseLabel_,this.label_):Yd(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 f0=g0,ge={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},El={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},ko={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_||ko[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 Fs=m0,vr=6378137,wo=Math.PI*vr,p0=[-wo,-wo,wo,wo],v0=[-180,-85,180,85],Ns=vr*Math.log(Math.tan(Math.PI/2));class Mo extends Fs{constructor(t){super({code:t,units:"m",extent:p0,global:!0,worldExtent:v0,getPointResolution:function(e,n){return e/Math.cosh(n[1]/vr)}})}}const Kd=[new Mo("EPSG:3857"),new Mo("EPSG:102100"),new Mo("EPSG:102113"),new Mo("EPSG:900913"),new Mo("http://www.opengis.net/def/crs/EPSG/0/3857"),new Mo("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 o=0;o<n;o+=e){t[o]=wo*i[o]/180;let r=vr*Math.log(Math.tan(Math.PI*(+i[o+1]+90)/360));r>Ns?r=Ns:r<-Ns&&(r=-Ns),t[o+1]=r}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 o=0;o<n;o+=e)t[o]=180*i[o]/wo,t[o+1]=360*Math.atan(Math.exp(i[o+1]/vr))/Math.PI-90;return t}const x0=6378137,Jd=[-180,-90,180,90],b0=Math.PI*x0/180;class Gn extends Fs{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 Co={};function Eo(i,t,e){const n=i.getCode(),o=t.getCode();n in Co||(Co[n]={}),Co[n][o]=e}function tc(i,t){let e;return i in Co&&t in Co[i]&&(e=Co[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)xr(t,i[e]);return t}function M0(i,t,e){const n=Math.min.apply(null,i),o=Math.min.apply(null,t),r=Math.max.apply(null,i),s=Math.max.apply(null,t);return ti(n,o,r,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,o;return t<i[0]?n=i[0]-t:i[2]<t?n=t-i[2]:n=0,e<i[1]?o=i[1]-e:i[3]<e?o=e-i[3]:o=0,n*n+o*o}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 Il(i,t){const e=i[0],n=i[1],o=i[2],r=i[3],s=t[0],a=t[1];let l=ne.UNKNOWN;return s<e?l=l|ne.LEFT:s>o&&(l=l|ne.RIGHT),a<n?l=l|ne.BELOW:a>r&&(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,o){return o?(o[0]=i,o[1]=t,o[2]=e,o[3]=n,o):[i,t,e,n]}function _r(i){return ti(1/0,1/0,-1/0,-1/0,i)}function yr(i,t){const e=i[0],n=i[1];return ti(e,n,e,n,t)}function zl(i,t,e,n,o){const r=_r(o);return nc(r,i,t,e,n)}function So(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 xr(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,o){for(;e<n;e+=o)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 Rl(i,t){let e;return e=t(js(i)),e||(e=t(Bs(i)),e)||(e=t(Ws(i)),e)||(e=t($i(i)),e)?e:!1}function Al(i){let t=0;return Ll(i)||(t=Nt(i)*Ue(i)),t}function js(i){return[i[0],i[1]]}function Bs(i){return[i[2],i[1]]}function qi(i){return[(i[0]+i[2])/2,(i[1]+i[3])/2]}function E0(i,t){let e;return t==="bottom-left"?e=js(i):t==="bottom-right"?e=Bs(i):t==="top-left"?e=$i(i):t==="top-right"?e=Ws(i):gt(!1,13),e}function Pl(i,t,e,n,o){const[r,s,a,l,h,u,d,c]=Dl(i,t,e,n);return ti(Math.min(r,a,h,d),Math.min(s,l,u,c),Math.max(r,a,h,d),Math.max(s,l,u,c),o)}function Dl(i,t,e,n){const o=t*n[0]/2,r=t*n[1]/2,s=Math.cos(e),a=Math.sin(e),l=o*s,h=o*a,u=r*s,d=r*a,c=i[0],g=i[1];return[c-l+d,g-h-u,c-l-d,g-h+u,c+l-d,g+h+u,c+l+d,g+h-u,c-l+d,g-h-u]}function Ue(i){return i[3]-i[1]}function Wn(i,t,e){const n=e||Ge();return $t(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]):_r(n),n}function $i(i){return[i[0],i[3]]}function Ws(i){return[i[2],i[3]]}function Nt(i){return i[2]-i[0]}function $t(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 o=Il(i,t),r=Il(i,e);if(o===ne.INTERSECTING||r===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],g=e[1],f=(g-d)/(c-u);let m,p;!!(r&ne.ABOVE)&&!(o&ne.ABOVE)&&(m=c-(g-h)/f,n=m>=s&&m<=l),!n&&!!(r&ne.RIGHT)&&!(o&ne.RIGHT)&&(p=g-(c-l)*f,n=p>=a&&p<=h),!n&&!!(r&ne.BELOW)&&!(o&ne.BELOW)&&(m=c-(g-a)/f,n=m>=s&&m<=l),!n&&!!(r&ne.LEFT)&&!(o&ne.LEFT)&&(p=g-(c-s)*f,n=p>=a&&p<=h)}return n}function I0(i,t,e,n){let o=[];if(n>1){const a=i[2]-i[0],l=i[3]-i[1];for(let h=0;h<n;++h)o.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 o=[i[0],i[1],i[2],i[1],i[2],i[3],i[0],i[3]];t(o,o,2);const r=[],s=[];for(let a=0,l=o.length;a<l;a+=2)r.push(o[a]),s.push(o[a+1]);return M0(r,s,e)}function oc(i,t){const e=t.getExtent(),n=qi(i);if(t.canWrapX()&&(n[0]<e[0]||n[0]>=e[2])){const o=Nt(e),s=Math.floor((n[0]-e[0])/o)*o;i[0]-=s,i[2]-=s}return i}function z0(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]]];oc(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 A0(i,t){const e=t.getRadius(),n=t.getCenter(),o=n[0],r=n[1],s=i[0],a=i[1];let l=s-o;const h=a-r;l===0&&h===0&&(l=1);const u=Math.sqrt(l*l+h*h),d=o+e*l/u,c=r+e*h/u;return[d,c]}function Ol(i,t){const e=i[0],n=i[1],o=t[0],r=t[1],s=o[0],a=o[1],l=r[0],h=r[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 g,f;return c<=0?(g=s,f=a):c>=1?(g=l,f=h):(g=s+c*u,f=a+c*d),[g,f]}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 Fl(i,t){const e=Math.cos(t),n=Math.sin(t),o=i[0]*e-i[1]*n,r=i[1]*e+i[0]*n;return i[0]=o,i[1]=r,i}function P0(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 rc(i,t){return Math.sqrt(wi(i,t))}function D0(i,t){return wi(i,Ol(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 o=0;return t.canWrapX()&&(i[0]<n[0]||i[0]>n[2])&&(e=e||Nt(n),o=Math.floor((i[0]-n[0])/e)),o}const ac=63710088e-1;function lc(i,t,e){e=e||ac;const n=Nn(i[1]),o=Nn(t[1]),r=(o-n)/2,s=Nn(t[0]-i[0])/2,a=Math.sin(r)*Math.sin(r)+Math.sin(s)*Math.sin(s)*Math.cos(n)*Math.cos(o);return 2*e*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function Zs(i,t){let e=0;const n=i.length;let o=i[n-1][0],r=i[n-1][1];for(let s=0;s<n;s++){const a=i[s][0],l=i[s][1];e+=Nn(a-o)*(2+Math.sin(Nn(r))+Math.sin(Nn(l))),o=a,r=l}return e*t*t/2}function hc(i,t){t=t||{};const e=t.radius||ac,n=t.projection||"EPSG:3857",o=i.getType();o!=="GeometryCollection"&&(i=i.clone().transform(n,"EPSG:4326"));let r=0,s,a,l,h,u,d;switch(o){case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"LinearRing":break;case"Polygon":{for(s=i.getCoordinates(),r=Math.abs(Zs(s[0],e)),l=1,h=s.length;l<h;++l)r-=Math.abs(Zs(s[l],e));break}case"MultiPolygon":{for(s=i.getCoordinates(),l=0,h=s.length;l<h;++l)for(a=s[l],r+=Math.abs(Zs(a[0],e)),u=1,d=a.length;u<d;++u)r-=Math.abs(Zs(a[u],e));break}case"GeometryCollection":{const c=i.getGeometries();for(l=0,h=c.length;l<h;++l)r+=hc(c[l],t);break}default:throw new Error("Unsupported geometry type: "+o)}return r}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,o=i.length;n<o;++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,o=i.length;n<o;++n)t[n]=i[n];i=t}return i}function dc(i){w0(i.getCode(),i),Eo(i,i,jl)}function O0(i){i.forEach(dc)}function Gt(i){return typeof i=="string"?k0(i):i||null}function Ys(i,t,e,n){i=Gt(i);let o;const r=i.getPointResolutionFunc();if(r){if(o=r(t,e),n&&n!==i.getUnits()){const s=i.getMetersPerUnit();s&&(o=o*s/ko[n])}}else{const s=i.getUnits();if(s=="degrees"&&!n||n=="degrees")o=t;else{const a=Zl(i,Gt("EPSG:4326"));if(a===uc&&s!=="degrees")o=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));o=(u+d)/2}const l=n?ko[n]:i.getMetersPerUnit();l!==void 0&&(o/=l)}}return o}function Bl(i){O0(i),i.forEach(function(t){i.forEach(function(e){t!==e&&Eo(t,e,jl)})})}function F0(i,t,e,n){i.forEach(function(o){t.forEach(function(r){Eo(o,r,e),Eo(r,o,n)})})}function Wl(i,t){return i?typeof i=="string"?Gt(i):i:Gt(t)}function cc(i){return function(t,e,n){const o=t.length;n=n!==void 0?n:2,e=e!==void 0?e:new Array(o);for(let r=0;r<o;r+=n){const s=i(t.slice(r,r+n)),a=s.length;for(let l=0,h=n;l<h;++l)e[r+l]=l>=a?t[r+l]:s[l]}return e}}function N0(i,t,e,n){const o=Gt(i),r=Gt(t);Eo(o,r,cc(e)),Eo(r,o,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]=Ui(n+180,360)-180),e}function Zn(i,t){if(i===t)return!0;const e=i.getUnits()===t.getUnits();return(i.getCode()===t.getCode()||Zl(i,t)===jl)&&e}function Zl(i,t){const e=i.getCode(),n=t.getCode();let o=tc(e,n);return o||(o=uc),o}function br(i,t){const e=Gt(i),n=Gt(t);return Zl(e,n)}function Xs(i,t,e){return br(t,e)(i,void 0,i.length)}function j0(i,t,e,n){const o=br(t,e);return I0(i,o,void 0,n)}function To(i,t){return i}function Zt(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 Yl(i,t){return i}function Hi(i,t){return i}function gc(i,t,e){return function(n){let o,r;if(i.canWrapX()){const s=i.getExtent(),a=Nt(s);n=n.slice(0),r=sc(n,i,a),r&&(n[0]=n[0]-r*a),n[0]=Vt(n[0],s[0],s[2]),n[1]=Vt(n[1],s[1],s[3]),o=e(n)}else o=e(n);return r&&t.canWrapX()&&(o[0]+=r*Nt(t.getExtent())),o}}function B0(){Bl(Kd),Bl(Qd),F0(Qd,Kd,_0,y0)}B0();const oe={ADD:"add",REMOVE:"remove"},fc={LENGTH:"length"};class Us extends Qe{constructor(t,e,n){super(t),this.element=e,this.index=n}}class W0 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,o=this.array_.length;n<o;++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,o=e.length;n<o;++n)t(e[n],n,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(fc.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 Us(oe.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,o=e.length;n<o;++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 Us(oe.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 o=this.array_[t];this.array_[t]=e,this.dispatchEvent(new Us(oe.REMOVE,o,t)),this.dispatchEvent(new Us(oe.ADD,e,t))}updateLength_(){this.set(fc.LENGTH,this.array_.length)}assertUnique_(t,e){for(let n=0,o=this.array_.length;n<o;++n)if(this.array_[n]===t&&n!==e)throw new qd(58)}}const Ve=W0,mc=new Array(6);function qe(){return[1,0,0,1,0,0]}function pc(i){return Vs(i,1,0,0,1,0,0)}function Xl(i,t){const e=i[0],n=i[1],o=i[2],r=i[3],s=i[4],a=i[5],l=t[0],h=t[1],u=t[2],d=t[3],c=t[4],g=t[5];return i[0]=e*l+o*h,i[1]=n*l+r*h,i[2]=e*u+o*d,i[3]=n*u+r*d,i[4]=e*c+o*g+s,i[5]=n*c+r*g+a,i}function Vs(i,t,e,n,o,r,s){return i[0]=t,i[1]=e,i[2]=n,i[3]=o,i[4]=r,i[5]=s,i}function Z0(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 Ul(i,t,e){return Xl(i,Vs(mc,t,0,0,e,0,0))}function Y0(i,t,e){return Vs(i,t,0,0,e,0,0)}function X0(i,t,e){return Xl(i,Vs(mc,1,0,0,1,t,e))}function Mi(i,t,e,n,o,r,s,a){const l=Math.sin(r),h=Math.cos(r);return i[0]=n*h,i[1]=o*l,i[2]=-n*l,i[3]=o*h,i[4]=s*n*h-a*n*l+t,i[5]=s*o*l+a*o*h+e,i}function Vl(i,t){const e=U0(t);gt(e!==0,32);const n=t[0],o=t[1],r=t[2],s=t[3],a=t[4],l=t[5];return i[0]=s/e,i[1]=-o/e,i[2]=-r/e,i[3]=n/e,i[4]=(r*l-s*a)/e,i[5]=-(n*l-o*a)/e,i}function U0(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 V0=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,q0=/^([a-z]*)$|^hsla?\(.*\)$/i;function ql(i){return typeof i=="string"?i:xc(i)}function $0(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 o;if(t.hasOwnProperty(n))o=t[n];else{if(e>=1024){let r=0;for(const s in t)(r++&3)===0&&(delete t[s],--e)}o=K0(n),t[n]=o,++e}return o}}();function kr(i){return Array.isArray(i)?i:H0(i)}function K0(i){let t,e,n,o,r;if(q0.exec(i)&&(i=$0(i)),V0.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?o=parseInt(i.substr(1+3*a,a),16):o=255,a==1&&(t=(t<<4)+t,e=(e<<4)+e,n=(n<<4)+n,l&&(o=(o<<4)+o)),r=[t,e,n,o/255]}else i.startsWith("rgba(")?(r=i.slice(5,-1).split(",").map(Number),yc(r)):i.startsWith("rgb(")?(r=i.slice(4,-1).split(",").map(Number),r.push(1),yc(r)):gt(!1,14);return r}function yc(i){return i[0]=Vt(i[0]+.5|0,0,255),i[1]=Vt(i[1]+.5|0,0,255),i[2]=Vt(i[2]+.5|0,0,255),i[3]=Vt(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 o=i[3]===void 0?1:Math.round(i[3]*100)/100;return"rgba("+t+","+e+","+n+","+o+")"}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 o=bc(t,e,n);return o in this.cache_?this.cache_[o]:null}set(t,e,n,o){const r=bc(t,e,n);this.cache_[r]=o,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function bc(i,t,e){const n=e?ql(e):"null";return t+":"+i+":"+n}const qs=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,o=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]),Vl(o,n)}forEachFeatureAtCoordinate(t,e,n,o,r,s,a,l){let h;const u=e.viewState;function d(x,k,w,E){return r.call(s,k,x?w:null,E)}const c=u.projection,g=Nl(t.slice(),c),f=[[0,0]];if(c.canWrapX()&&o){const x=c.getExtent(),k=Nt(x);f.push([-k,0],[k,0])}const m=e.layerStatesArray,p=m.length,_=[],v=[];for(let x=0;x<f.length;x++)for(let k=p-1;k>=0;--k){const w=m[k],E=w.layer;if(E.hasRenderer()&&Cl(w,u)&&a.call(l,E)){const M=E.getRenderer(),S=E.getSource();if(M&&S){const z=S.getWrapX()?g:t,P=d.bind(null,w.managed);v[0]=z[0]+f[x][0],v[1]=z[1]+f[x][1],h=M.forEachFeatureAtCoordinate(v,e,n,P,_)}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,o,r,s){return this.forEachFeatureAtCoordinate(t,e,n,o,Dn,this,r,s)!==void 0}getMap(){return this.map_}renderFrame(t){et()}scheduleExpireIconCache(t){qs.canExpireCache()&&t.postRenderFunctions.push(tv)}}function tv(i,t){qs.expire()}const ev=Q0;class iv extends Qe{constructor(t,e,n,o){super(t),this.inversePixelTransform=e,this.frameState=n,this.context=o}}const kc=iv,wc="10px sans-serif",Ci="#000",$s="round",wr=[],Mr=0,Io="round",Cr=10,Er="#000",Sr="center",Hs="middle",Yn=[0,0,0,0],Tr=1,Ei=new hi;let zo=null,$l;const Hl={},nv=function(){const t="32px ",e=["monospace","serif"],n=e.length,o="wmytzilWMYTZIL@#/&?$%10\uF013";let r,s;function a(h,u,d){let c=!0;for(let g=0;g<n;++g){const f=e[g];if(s=Ks(h+" "+u+" "+t+f,o),d!=f){const m=Ks(h+" "+u+" "+t+d+","+f,o);c=c&&m!=s}}return!!c}function l(){let h=!0;const u=Ei.getKeys();for(let d=0,c=u.length;d<c;++d){const g=u[d];Ei.get(g)<100&&(a.apply(this,g.split(`
38
- `))?(mr(Hl),zo=null,$l=void 0,Ei.set(g,100)):(Ei.set(g,Ei.get(g)+1,!0),h=!1))}h&&(clearInterval(r),r=void 0)}return function(h){const u=Vd(h);if(!u)return;const d=u.families;for(let c=0,g=d.length;c<g;++c){const f=d[c],m=u.style+`
5
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Fd=/'/g,Nd=/"/g,Gd=/^(?:script|style|textarea|title)$/i,Op=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),Wi=Op(1),_o=Symbol.for("lit-noChange"),oe=Symbol.for("lit-nothing"),jd=new WeakMap,Fp=(i,t,e)=>{var n,o;const r=(n=e==null?void 0:e.renderBefore)!==null&&n!==void 0?n:t;let s=r._$litPart$;if(s===void 0){const a=(o=e==null?void 0:e.renderBefore)!==null&&o!==void 0?o:null;r._$litPart$=s=new pr(t.insertBefore(cr(),a),a,void 0,e??{})}return s._$AI(i),s},yo=vo.createTreeWalker(vo,129,null,!1),Np=(i,t)=>{const e=i.length-1,n=[];let o,r=t===2?"<svg>":"",s=gr;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===gr?d[1]==="!--"?s=Ld:d[1]!==void 0?s=Od:d[2]!==void 0?(Gd.test(d[2])&&(o=RegExp("</"+d[2],"g")),s=Dn):d[3]!==void 0&&(s=Dn):s===Dn?d[0]===">"?(s=o??gr,c=-1):d[1]===void 0?c=-2:(c=s.lastIndex-d[2].length,u=d[1],s=d[3]===void 0?Dn:d[3]==='"'?Nd:Fd):s===Nd||s===Fd?s=Dn:s===Ld||s===Od?s=gr:(s=Dn,o=void 0);const g=s===Dn&&i[l+1].startsWith("/>")?" ":"";r+=s===gr?h+Dp:c>=0?(n.push(u),h.slice(0,c)+"$lit$"+h.slice(c)+Ui+g):h+Ui+(c===-2?(n.push(void 0),l):g)}const a=r+(i[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Ad!==void 0?Ad.createHTML(a):a,n]};class mr{constructor({strings:t,_$litType$:e},n){let o;this.parts=[];let r=0,s=0;const a=t.length-1,l=this.parts,[h,u]=Np(t,e);if(this.el=mr.createElement(h,n),yo.currentNode=this.el.content,e===2){const d=this.el.content,c=d.firstChild;c.remove(),d.append(...c.childNodes)}for(;(o=yo.nextNode())!==null&&l.length<a;){if(o.nodeType===1){if(o.hasAttributes()){const d=[];for(const c of o.getAttributeNames())if(c.endsWith("$lit$")||c.startsWith(Ui)){const f=u[s++];if(d.push(c),f!==void 0){const g=o.getAttribute(f.toLowerCase()+"$lit$").split(Ui),m=/([.?@])?(.*)/.exec(f);l.push({type:1,index:r,name:m[2],strings:g,ctor:m[1]==="."?jp:m[1]==="?"?Up:m[1]==="@"?Wp:Rs})}else l.push({type:6,index:r})}for(const c of d)o.removeAttribute(c)}if(Gd.test(o.tagName)){const d=o.textContent.split(Ui),c=d.length-1;if(c>0){o.textContent=po?po.emptyScript:"";for(let f=0;f<c;f++)o.append(d[f],cr()),yo.nextNode(),l.push({type:2,index:++r});o.append(d[c],cr())}}}else if(o.nodeType===8)if(o.data===Pd)l.push({type:2,index:r});else{let d=-1;for(;(d=o.data.indexOf(Ui,d+1))!==-1;)l.push({type:7,index:r}),d+=Ui.length-1}r++}}static createElement(t,e){const n=vo.createElement("template");return n.innerHTML=t,n}}function xo(i,t,e=i,n){var o,r,s,a;if(t===_o)return t;let l=n!==void 0?(o=e._$Cl)===null||o===void 0?void 0:o[n]:e._$Cu;const h=fr(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((r=l==null?void 0:l._$AO)===null||r===void 0||r.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=xo(i,l._$AS(i,t.values),l,n)),t}class Gp{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:o}=this._$AD,r=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:vo).importNode(n,!0);yo.currentNode=r;let s=yo.nextNode(),a=0,l=0,h=o[0];for(;h!==void 0;){if(a===h.index){let u;h.type===2?u=new pr(s,s.nextSibling,this,t):h.type===1?u=new h.ctor(s,h.name,h.strings,this,t):h.type===6&&(u=new Vp(s,this,t)),this.v.push(u),h=o[++l]}a!==(h==null?void 0:h.index)&&(s=yo.nextNode(),a++)}return r}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 pr{constructor(t,e,n,o){var r;this.type=2,this._$AH=oe,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=o,this._$C_=(r=o==null?void 0:o.isConnected)===null||r===void 0||r}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=xo(this,t,e),fr(t)?t===oe||t==null||t===""?(this._$AH!==oe&&this._$AR(),this._$AH=oe):t!==this._$AH&&t!==_o&&this.$(t):t._$litType$!==void 0?this.T(t):t.nodeType!==void 0?this.k(t):Lp(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!==oe&&fr(this._$AH)?this._$AA.nextSibling.data=t:this.k(vo.createTextNode(t)),this._$AH=t}T(t){var e;const{values:n,_$litType$:o}=t,r=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=mr.createElement(o.h,this.options)),o);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===r)this._$AH.m(n);else{const s=new Gp(r,this),a=s.p(this.options);s.m(n),this.k(a),this._$AH=s}}_$AC(t){let e=jd.get(t.strings);return e===void 0&&jd.set(t.strings,e=new mr(t)),e}O(t){Dd(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,o=0;for(const r of t)o===e.length?e.push(n=new pr(this.S(cr()),this.S(cr()),this,this.options)):n=e[o],n._$AI(r),o++;o<e.length&&(this._$AR(n&&n._$AB.nextSibling,o),e.length=o)}_$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 o=t.nextSibling;t.remove(),t=o}}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,o,r){this.type=1,this._$AH=oe,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=oe}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,o){const r=this.strings;let s=!1;if(r===void 0)t=xo(this,t,e,0),s=!fr(t)||t!==this._$AH&&t!==_o,s&&(this._$AH=t);else{const a=t;let l,h;for(t=r[0],l=0;l<r.length-1;l++)h=xo(this,a[n+l],e,l),h===_o&&(h=this._$AH[l]),s||(s=!fr(h)||h!==this._$AH[l]),h===oe?t=oe:t!==oe&&(t+=(h??"")+r[l+1]),this._$AH[l]=h}s&&!o&&this.P(t)}P(t){t===oe?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class jp extends Rs{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===oe?void 0:t}}const Bp=po?po.emptyScript:"";class Up extends Rs{constructor(){super(...arguments),this.type=4}P(t){t&&t!==oe?this.element.setAttribute(this.name,Bp):this.element.removeAttribute(this.name)}}let Wp=class extends Rs{constructor(t,e,n,o,r){super(t,e,n,o,r),this.type=5}_$AI(t,e=this){var n;if((t=(n=xo(this,t,e,0))!==null&&n!==void 0?n:oe)===_o)return;const o=this._$AH,r=t===oe&&o!==oe||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==oe&&(o===oe||r);r&&this.element.removeEventListener(this.name,this,o),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 Vp{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){xo(this,t)}}const Bd=zs.litHtmlPolyfillSupport;Bd==null||Bd(mr,pr),((ml=zs.litHtmlVersions)!==null&&ml!==void 0?ml:zs.litHtmlVersions=[]).push("2.3.1");var pl,vl;class Ln extends mo{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=Fp(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 _o}}Ln.finalized=!0,Ln._$litElement$=!0,(pl=globalThis.litElementHydrateSupport)===null||pl===void 0||pl.call(globalThis,{LitElement:Ln});const Ud=globalThis.litElementPolyfillSupport;Ud==null||Ud({LitElement:Ln}),((vl=globalThis.litElementVersions)!==null&&vl!==void 0?vl:globalThis.litElementVersions=[]).push("3.2.2");const _l=i=>t=>typeof t=="function"?((e,n)=>(customElements.define(e,n),n))(i,t):((e,n)=>{const{kind:o,elements:r}=n;return{kind:o,elements:r,finisher(s){customElements.define(e,s)}}})(i,t);const Xp=(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 K(i){return(t,e)=>e!==void 0?((n,o,r)=>{o.constructor.createProperty(r,n)})(i,t,e):Xp(i,t)}function Vi(i){return K({...i,state:!0})}var yl;((yl=window.HTMLSlotElement)===null||yl===void 0?void 0:yl.prototype.assignedElements)!=null;class Yp{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const ei=Yp,bo={PROPERTYCHANGE:"propertychange"};class qp{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}const xl=qp;function $p(i,t,e){let n,o;e=e||On;let r=0,s=i.length,a=!1;for(;r<s;)n=r+(s-r>>1),o=+e(i[n],t),o<0?r=n+1:(s=n,a=!o);return a?r:~r}function On(i,t){return i>t?1:i<t?-1:0}function bl(i,t,e){const n=i.length;if(i[0]<=t)return 0;if(t<=i[n-1])return n-1;{let o;if(e>0){for(o=1;o<n;++o)if(i[o]<t)return o-1}else if(e<0){for(o=1;o<n;++o)if(i[o]<=t)return o}else for(o=1;o<n;++o){if(i[o]==t)return o;if(i[o]<t)return typeof e=="function"?e(t,i[o-1],i[o])>0?o-1:o:i[o-1]-t<t-i[o]?o-1:o}return n-1}}function Zp(i,t,e){for(;t<e;){const n=i[t];i[t]=i[e],i[e]=n,++t,--e}}function ui(i,t){const e=Array.isArray(t)?t:[t],n=e.length;for(let o=0;o<n;o++)i[i.length]=e[o]}function Xi(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 Kp(i,t,e){const n=t||On;return i.every(function(o,r){if(r===0)return!0;const s=n(i[r-1],o);return!(s>0||e&&s===0)})}function Fn(){return!0}function ko(){return!1}function Nn(){}function Hp(i){let t=!1,e,n,o;return function(){const r=Array.prototype.slice.call(arguments);return(!t||this!==o||!Xi(r,n))&&(t=!0,o=this,n=r,e=i.apply(this,arguments)),e}}function vr(i){for(const t in i)delete i[t]}function Gn(i){let t;for(t in i)return!1;return!t}class Qp extends xl{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_={}),o=n[t]||(n[t]=[]);o.includes(e)||o.push(e)}dispatchEvent(t){const e=typeof t=="string",n=e?t:t.type,o=this.listeners_&&this.listeners_[n];if(!o)return;const r=e?new ei(t):t;r.target||(r.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=o.length;h<u;++h)if("handleEvent"in o[h]?l=o[h].handleEvent(r):l=o[h].call(this,r),l===!1||r.propagationStopped){l=!1;break}if(--s[n]===0){let h=a[n];for(delete a[n];h--;)this.removeEventListener(n,Nn);delete s[n]}return l}disposeInternal(){this.listeners_&&vr(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 o=n.indexOf(e);o!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[o]=Nn,++this.pendingRemovals_[t]):(n.splice(o,1),n.length===0&&delete this.listeners_[t]))}}}const As=Qp,et={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 pt(i,t,e,n,o){if(n&&n!==i&&(e=e.bind(n)),o){const s=e;e=function(){i.removeEventListener(t,e),s.apply(this,arguments)}}const r={target:i,type:t,listener:e};return i.addEventListener(t,e),r}function Ps(i,t,e,n){return pt(i,t,e,n,!0)}function Nt(i){i&&i.target&&(i.target.removeEventListener(i.type,i.listener),vr(i))}class Ds extends As{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(et.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const n=t.length,o=new Array(n);for(let r=0;r<n;++r)o[r]=pt(this,t[r],e);return o}else return pt(this,t,e)}onceInternal(t,e){let n;if(Array.isArray(t)){const o=t.length;n=new Array(o);for(let r=0;r<o;++r)n[r]=Ps(this,t[r],e)}else n=Ps(this,t,e);return e.ol_key=n,n}unInternal(t,e){const n=e.ol_key;if(n)Jp(n);else if(Array.isArray(t))for(let o=0,r=t.length;o<r;++o)this.removeEventListener(t[o],e);else this.removeEventListener(t,e)}}Ds.prototype.on,Ds.prototype.once,Ds.prototype.un;function Jp(i){if(Array.isArray(i))for(let t=0,e=i.length;t<e;++t)Nt(i[t]);else Nt(i)}const Wd=Ds;function it(){throw new Error("Unimplemented abstract method.")}let t0=0;function H(i){return i.ol_uid||(i.ol_uid=String(++t0))}const e0="7.0.0";class Vd extends ei{constructor(t,e,n){super(t),this.key=e,this.oldValue=n}}class i0 extends Wd{constructor(t){super(),this.on,this.once,this.un,H(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 Vd(n,t,e)),n=bo.PROPERTYCHANGE,this.hasListener(n)&&this.dispatchEvent(new Vd(n,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,n){const o=this.values_||(this.values_={});if(n)o[t]=e;else{const r=o[t];o[t]=e,r!==e&&this.notify(t,r)}}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],Gn(this.values_)&&(this.values_=null),e||this.notify(t,n)}}}const di=i0,Yi={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},qi=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",n0=qi.includes("firefox");qi.includes("safari")&&!qi.includes("chrom")&&(qi.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(qi));const o0=qi.includes("webkit")&&!qi.includes("edge"),r0=qi.includes("macintosh"),Xd=typeof devicePixelRatio<"u"?devicePixelRatio:1,kl=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,s0=typeof Image<"u"&&Image.prototype.decode,Yd=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 De(i,t,e,n){let o;return e&&e.length?o=e.shift():kl?o=new OffscreenCanvas(i||300,t||300):o=document.createElement("canvas"),i&&(o.width=i),t&&(o.height=t),o.getContext("2d",n)}function wl(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 Ml(i){return i&&i.parentNode?i.parentNode.removeChild(i):null}function a0(i){for(;i.lastChild;)i.removeChild(i.lastChild)}function l0(i,t){const e=i.childNodes;for(let n=0;;++n){const o=e[n],r=t[n];if(!o&&!r)break;if(o!==r){if(!o){i.appendChild(r);continue}if(!r){i.removeChild(o),--n;continue}i.insertBefore(r,o)}}}class h0 extends di{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(){Ml(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&Ml(this.element);for(let e=0,n=this.listenerKeys.length;e<n;++e)Nt(this.listenerKeys[e]);this.listenerKeys.length=0,this.map_=t,t&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==Nn&&this.listenerKeys.push(pt(t,Yi.POSTRENDER,this.render,this)),t.render())}render(t){}setTarget(t){this.target_=typeof t=="string"?document.getElementById(t):t}}const wo=h0,Ls="ol-hidden",_r="ol-unselectable",Cl="ol-control",$d="ol-collapsed",u0=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"),Zd=["style","variant","weight","size","lineHeight","family"],Kd=function(i){const t=i.match(u0);if(!t)return null;const e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let n=0,o=Zd.length;n<o;++n){const r=t[n+1];r!==void 0&&(e[Zd[n]]=r)}return e.families=e.family.split(/,\s?/),e},Dt={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 d0 extends Error{constructor(t){const n="Assertion failed. See https://openlayers.org/en/"+("v"+e0.split("-")[0])+"/doc/errors/#"+t+" for details.";super(n),this.code=t,this.name="AssertionError",this.message=n}}const Hd=d0;function gt(i,t){if(!i)throw new Hd(t)}function $t(i,t,e){return Math.min(Math.max(i,t),e)}function c0(i,t,e,n,o,r){const s=o-e,a=r-n;if(s!==0||a!==0){const l=((i-e)*s+(t-n)*a)/(s*s+a*a);l>1?(e=o,n=r):l>0&&(e+=s*l,n+=a*l)}return jn(i,t,e,n)}function jn(i,t,e,n){const o=e-i,r=n-t;return o*o+r*r}function f0(i){const t=i.length;for(let n=0;n<t;n++){let o=n,r=Math.abs(i[n][n]);for(let a=n+1;a<t;a++){const l=Math.abs(i[a][n]);l>r&&(r=l,o=a)}if(r===0)return null;const s=i[o];i[o]=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 o=n-1;o>=0;o--)i[o][t]-=i[o][n]*e[n]}return e}function Bn(i){return i*Math.PI/180}function $i(i,t){const e=i%t;return e*t<0?e+t:e}function Ci(i,t,e){return i+e*(t-i)}function Qd(i,t){const e=Math.pow(10,t);return Math.round(i*e)/e}function Os(i,t){return Math.floor(Qd(i,t))}function Fs(i,t){return Math.ceil(Qd(i,t))}class g0 extends di{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[Dt.OPACITY]=t.opacity!==void 0?t.opacity:1,gt(typeof e[Dt.OPACITY]=="number",64),e[Dt.VISIBLE]=t.visible!==void 0?t.visible:!0,e[Dt.Z_INDEX]=t.zIndex,e[Dt.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[Dt.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[Dt.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[Dt.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=$t(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 it()}getLayerStatesArray(t){return it()}getExtent(){return this.get(Dt.EXTENT)}getMaxResolution(){return this.get(Dt.MAX_RESOLUTION)}getMinResolution(){return this.get(Dt.MIN_RESOLUTION)}getMinZoom(){return this.get(Dt.MIN_ZOOM)}getMaxZoom(){return this.get(Dt.MAX_ZOOM)}getOpacity(){return this.get(Dt.OPACITY)}getSourceState(){return it()}getVisible(){return this.get(Dt.VISIBLE)}getZIndex(){return this.get(Dt.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(Dt.EXTENT,t)}setMaxResolution(t){this.set(Dt.MAX_RESOLUTION,t)}setMinResolution(t){this.set(Dt.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(Dt.MAX_ZOOM,t)}setMinZoom(t){this.set(Dt.MIN_ZOOM,t)}setOpacity(t){gt(typeof t=="number",64),this.set(Dt.OPACITY,t)}setVisible(t){this.set(Dt.VISIBLE,t)}setZIndex(t){this.set(Dt.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const Jd=g0,Zi={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};class m0 extends Jd{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(Dt.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(Dt.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed()}handleSourcePropertyChange_(){this.sourceChangeKey_&&(Nt(this.sourceChangeKey_),this.sourceChangeKey_=null);const t=this.getSource();t&&(this.sourceChangeKey_=pt(t,et.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(Dt.MAP,t)}getMapInternal(){return this.get(Dt.MAP)}setMap(t){this.mapPrecomposeKey_&&(Nt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Nt(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=pt(t,Zi.PRECOMPOSE,function(e){const o=e.frameState.layerStatesArray,r=this.getLayerState(!1);gt(!o.some(function(s){return s.layer===r.layer}),67),o.push(r)},this),this.mapRenderKey_=pt(this,et.CHANGE,t.render,t),this.changed())}setSource(t){this.set(Dt.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 Ns=m0;class p0 extends wo{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",o=t.expandClassName!==void 0?t.expandClassName:e+"-expand",r=t.collapseLabel!==void 0?t.collapseLabel:"›",s=t.collapseClassName!==void 0?t.collapseClassName:e+"-collapse";typeof r=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=r,this.collapseLabel_.className=s):this.collapseLabel_=r;const a=t.label!==void 0?t.label:"i";typeof a=="string"?(this.label_=document.createElement("span"),this.label_.textContent=a,this.label_.className=o):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(et.CLICK,this.handleClick_.bind(this),!1);const h=e+" "+_r+" "+Cl+(this.collapsed_&&this.collapsible_?" "+$d:"")+(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 o=!0;const r=t.layerStatesArray;for(let s=0,a=r.length;s<a;++s){const l=r[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(o=o&&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(o),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),!Xi(e,this.renderedAttributions_)){a0(this.ulElement_);for(let o=0,r=e.length;o<r;++o){const s=document.createElement("li");s.innerHTML=e[o],this.ulElement_.appendChild(s)}this.renderedAttributions_=e}}handleClick_(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle($d),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 v0=p0,pe={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},Sl={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},Mo={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937},Gs=class{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_||Mo[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_}},yr=6378137,Co=Math.PI*yr,_0=[-Co,-Co,Co,Co],y0=[-180,-85,180,85],js=yr*Math.log(Math.tan(Math.PI/2));class Eo extends Gs{constructor(t){super({code:t,units:"m",extent:_0,global:!0,worldExtent:y0,getPointResolution:function(e,n){return e/Math.cosh(n[1]/yr)}})}}const tc=[new Eo("EPSG:3857"),new Eo("EPSG:102100"),new Eo("EPSG:102113"),new Eo("EPSG:900913"),new Eo("http://www.opengis.net/def/crs/EPSG/0/3857"),new Eo("http://www.opengis.net/gml/srs/epsg.xml#3857")];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 o=0;o<n;o+=e){t[o]=Co*i[o]/180;let r=yr*Math.log(Math.tan(Math.PI*(+i[o+1]+90)/360));r>js?r=js:r<-js&&(r=-js),t[o+1]=r}return t}function b0(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 o=0;o<n;o+=e)t[o]=180*i[o]/Co,t[o+1]=360*Math.atan(Math.exp(i[o+1]/yr))/Math.PI-90;return t}const k0=6378137,ec=[-180,-90,180,90],w0=Math.PI*k0/180;class Un extends Gs{constructor(t,e){super({code:t,units:"degrees",extent:ec,axisOrientation:e,global:!0,metersPerUnit:w0,worldExtent:ec})}}const ic=[new Un("CRS:84"),new Un("EPSG:4326","neu"),new Un("urn:ogc:def:crs:OGC:1.3:CRS84"),new Un("urn:ogc:def:crs:OGC:2:84"),new Un("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Un("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Un("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Tl={};function M0(i){return Tl[i]||Tl[i.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function C0(i,t){Tl[i]=t}let So={};function To(i,t,e){const n=i.getCode(),o=t.getCode();n in So||(So[n]={}),So[n][o]=e}function nc(i,t){let e;return i in So&&t in So[i]&&(e=So[i][t]),e}const re={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function ke(i){const t=Be();for(let e=0,n=i.length;e<n;++e)kr(t,i[e]);return t}function E0(i,t,e){const n=Math.min.apply(null,i),o=Math.min.apply(null,t),r=Math.max.apply(null,i),s=Math.max.apply(null,t);return ii(n,o,r,s,e)}function ci(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 oc(i,t){return t?(t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t):i.slice()}function Wn(i,t,e){let n,o;return t<i[0]?n=i[0]-t:i[2]<t?n=t-i[2]:n=0,e<i[1]?o=i[1]-e:i[3]<e?o=e-i[3]:o=0,n*n+o*o}function Bs(i,t){return Il(i,t[0],t[1])}function Vn(i,t){return i[0]<=t[0]&&t[2]<=i[2]&&i[1]<=t[1]&&t[3]<=i[3]}function Il(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],o=i[2],r=i[3],s=t[0],a=t[1];let l=re.UNKNOWN;return s<e?l=l|re.LEFT:s>o&&(l=l|re.RIGHT),a<n?l=l|re.BELOW:a>r&&(l=l|re.ABOVE),l===re.UNKNOWN&&(l=re.INTERSECTING),l}function Be(){return[1/0,1/0,-1/0,-1/0]}function ii(i,t,e,n,o){return o?(o[0]=i,o[1]=t,o[2]=e,o[3]=n,o):[i,t,e,n]}function xr(i){return ii(1/0,1/0,-1/0,-1/0,i)}function br(i,t){const e=i[0],n=i[1];return ii(e,n,e,n,t)}function Rl(i,t,e,n,o){const r=xr(o);return sc(r,i,t,e,n)}function Io(i,t){return i[0]==t[0]&&i[2]==t[2]&&i[1]==t[1]&&i[3]==t[3]}function rc(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 kr(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 sc(i,t,e,n,o){for(;e<n;e+=o)S0(i,t[e],t[e+1]);return i}function S0(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 Al(i,t){let e;return e=t(Us(i)),e||(e=t(Ws(i)),e)||(e=t(Vs(i)),e)||(e=t(Hi(i)),e)?e:!1}function Pl(i){let t=0;return Ol(i)||(t=Gt(i)*$e(i)),t}function Us(i){return[i[0],i[1]]}function Ws(i){return[i[2],i[1]]}function Ki(i){return[(i[0]+i[2])/2,(i[1]+i[3])/2]}function T0(i,t){let e;return t==="bottom-left"?e=Us(i):t==="bottom-right"?e=Ws(i):t==="top-left"?e=Hi(i):t==="top-right"?e=Vs(i):gt(!1,13),e}function Dl(i,t,e,n,o){const[r,s,a,l,h,u,d,c]=Ll(i,t,e,n);return ii(Math.min(r,a,h,d),Math.min(s,l,u,c),Math.max(r,a,h,d),Math.max(s,l,u,c),o)}function Ll(i,t,e,n){const o=t*n[0]/2,r=t*n[1]/2,s=Math.cos(e),a=Math.sin(e),l=o*s,h=o*a,u=r*s,d=r*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 Xn(i,t,e){const n=e||Be();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]):xr(n),n}function Hi(i){return[i[0],i[3]]}function Vs(i){return[i[2],i[3]]}function Gt(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 Ol(i){return i[2]<i[0]||i[3]<i[1]}function I0(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 o=zl(i,t),r=zl(i,e);if(o===re.INTERSECTING||r===re.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;!!(r&re.ABOVE)&&!(o&re.ABOVE)&&(m=c-(f-h)/g,n=m>=s&&m<=l),!n&&!!(r&re.RIGHT)&&!(o&re.RIGHT)&&(p=f-(c-l)*g,n=p>=a&&p<=h),!n&&!!(r&re.BELOW)&&!(o&re.BELOW)&&(m=c-(f-a)/g,n=m>=s&&m<=l),!n&&!!(r&re.LEFT)&&!(o&re.LEFT)&&(p=f-(c-s)*g,n=p>=a&&p<=h)}return n}function R0(i,t,e,n){let o=[];if(n>1){const a=i[2]-i[0],l=i[3]-i[1];for(let h=0;h<n;++h)o.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 o=[i[0],i[1],i[2],i[1],i[2],i[3],i[0],i[3]];t(o,o,2);const r=[],s=[];for(let a=0,l=o.length;a<l;a+=2)r.push(o[a]),s.push(o[a+1]);return E0(r,s,e)}function ac(i,t){const e=t.getExtent(),n=Ki(i);if(t.canWrapX()&&(n[0]<e[0]||n[0]>=e[2])){const o=Gt(e),s=Math.floor((n[0]-e[0])/o)*o;i[0]-=s,i[2]-=s}return i}function A0(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]]];ac(i,t);const n=Gt(e);if(Gt(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 D0(i,t){const e=t.getRadius(),n=t.getCenter(),o=n[0],r=n[1],s=i[0],a=i[1];let l=s-o;const h=a-r;l===0&&h===0&&(l=1);const u=Math.sqrt(l*l+h*h),d=o+e*l/u,c=r+e*h/u;return[d,c]}function Fl(i,t){const e=i[0],n=i[1],o=t[0],r=t[1],s=o[0],a=o[1],l=r[0],h=r[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 ni(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 Nl(i,t){const e=Math.cos(t),n=Math.sin(t),o=i[0]*e-i[1]*n,r=i[1]*e+i[0]*n;return i[0]=o,i[1]=r,i}function L0(i,t){return i[0]*=t,i[1]*=t,i}function Ei(i,t){const e=i[0]-t[0],n=i[1]-t[1];return e*e+n*n}function lc(i,t){return Math.sqrt(Ei(i,t))}function O0(i,t){return Ei(i,Fl(i,t))}function Gl(i,t){if(t.canWrapX()){const e=Gt(t.getExtent()),n=hc(i,t,e);n&&(i[0]-=n*e)}return i}function hc(i,t,e){const n=t.getExtent();let o=0;return t.canWrapX()&&(i[0]<n[0]||i[0]>n[2])&&(e=e||Gt(n),o=Math.floor((i[0]-n[0])/e)),o}const uc=63710088e-1;function dc(i,t,e){e=e||uc;const n=Bn(i[1]),o=Bn(t[1]),r=(o-n)/2,s=Bn(t[0]-i[0])/2,a=Math.sin(r)*Math.sin(r)+Math.sin(s)*Math.sin(s)*Math.cos(n)*Math.cos(o);return 2*e*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function Xs(i,t){let e=0;const n=i.length;let o=i[n-1][0],r=i[n-1][1];for(let s=0;s<n;s++){const a=i[s][0],l=i[s][1];e+=Bn(a-o)*(2+Math.sin(Bn(r))+Math.sin(Bn(l))),o=a,r=l}return e*t*t/2}function cc(i,t){t=t||{};const e=t.radius||uc,n=t.projection||"EPSG:3857",o=i.getType();o!=="GeometryCollection"&&(i=i.clone().transform(n,"EPSG:4326"));let r=0,s,a,l,h,u,d;switch(o){case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"LinearRing":break;case"Polygon":{for(s=i.getCoordinates(),r=Math.abs(Xs(s[0],e)),l=1,h=s.length;l<h;++l)r-=Math.abs(Xs(s[l],e));break}case"MultiPolygon":{for(s=i.getCoordinates(),l=0,h=s.length;l<h;++l)for(a=s[l],r+=Math.abs(Xs(a[0],e)),u=1,d=a.length;u<d;++u)r-=Math.abs(Xs(a[u],e));break}case"GeometryCollection":{const c=i.getGeometries();for(l=0,h=c.length;l<h;++l)r+=cc(c[l],t);break}default:throw new Error("Unsupported geometry type: "+o)}return r}let jl=!0;function F0(i){jl=!(i===void 0?!0:i)}function Bl(i,t,e){if(t!==void 0){for(let n=0,o=i.length;n<o;++n)t[n]=i[n];t=t}else t=i.slice();return t}function fc(i,t,e){if(t!==void 0&&i!==t){for(let n=0,o=i.length;n<o;++n)t[n]=i[n];i=t}return i}function gc(i){C0(i.getCode(),i),To(i,i,Bl)}function N0(i){i.forEach(gc)}function jt(i){return typeof i=="string"?M0(i):i||null}function Ys(i,t,e,n){i=jt(i);let o;const r=i.getPointResolutionFunc();if(r){if(o=r(t,e),n&&n!==i.getUnits()){const s=i.getMetersPerUnit();s&&(o=o*s/Mo[n])}}else{const s=i.getUnits();if(s=="degrees"&&!n||n=="degrees")o=t;else{const a=Vl(i,jt("EPSG:4326"));if(a===fc&&s!=="degrees")o=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=dc(h.slice(0,2),h.slice(2,4)),d=dc(h.slice(4,6),h.slice(6,8));o=(u+d)/2}const l=n?Mo[n]:i.getMetersPerUnit();l!==void 0&&(o/=l)}}return o}function Ul(i){N0(i),i.forEach(function(t){i.forEach(function(e){t!==e&&To(t,e,Bl)})})}function G0(i,t,e,n){i.forEach(function(o){t.forEach(function(r){To(o,r,e),To(r,o,n)})})}function Wl(i,t){return i?typeof i=="string"?jt(i):i:jt(t)}function mc(i){return function(t,e,n){const o=t.length;n=n!==void 0?n:2,e=e!==void 0?e:new Array(o);for(let r=0;r<o;r+=n){const s=i(t.slice(r,r+n)),a=s.length;for(let l=0,h=n;l<h;++l)e[r+l]=l>=a?t[r+l]:s[l]}return e}}function j0(i,t,e,n){const o=jt(i),r=jt(t);To(o,r,mc(e)),To(r,o,mc(n))}function B0(i,t){const e=qs(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 Yn(i,t){if(i===t)return!0;const e=i.getUnits()===t.getUnits();return(i.getCode()===t.getCode()||Vl(i,t)===Bl)&&e}function Vl(i,t){const e=i.getCode(),n=t.getCode();let o=nc(e,n);return o||(o=fc),o}function wr(i,t){const e=jt(i),n=jt(t);return Vl(e,n)}function qs(i,t,e){return wr(t,e)(i,void 0,i.length)}function U0(i,t,e,n){const o=wr(t,e);return R0(i,o,void 0,n)}function zo(i,t){return i}function Vt(i,t){return jl&&!ni(i,[0,0])&&i[0]>=-180&&i[0]<=180&&i[1]>=-90&&i[1]<=90&&(jl=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),i}function Xl(i,t){return i}function Qi(i,t){return i}function pc(i,t,e){return function(n){let o,r;if(i.canWrapX()){const s=i.getExtent(),a=Gt(s);n=n.slice(0),r=hc(n,i,a),r&&(n[0]=n[0]-r*a),n[0]=$t(n[0],s[0],s[2]),n[1]=$t(n[1],s[1],s[3]),o=e(n)}else o=e(n);return r&&t.canWrapX()&&(o[0]+=r*Gt(t.getExtent())),o}}function W0(){Ul(tc),Ul(ic),G0(ic,tc,x0,b0)}W0();const se={ADD:"add",REMOVE:"remove"},vc={LENGTH:"length"};class $s extends ei{constructor(t,e,n){super(t),this.element=e,this.index=n}}class V0 extends di{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,o=this.array_.length;n<o;++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,o=e.length;n<o;++n)t(e[n],n,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(vc.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(se.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,o=e.length;n<o;++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(se.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 o=this.array_[t];this.array_[t]=e,this.dispatchEvent(new $s(se.REMOVE,o,t)),this.dispatchEvent(new $s(se.ADD,e,t))}updateLength_(){this.set(vc.LENGTH,this.array_.length)}assertUnique_(t,e){for(let n=0,o=this.array_.length;n<o;++n)if(this.array_[n]===t&&n!==e)throw new Hd(58)}}const Ze=V0,_c=new Array(6);function Ke(){return[1,0,0,1,0,0]}function yc(i){return Zs(i,1,0,0,1,0,0)}function Yl(i,t){const e=i[0],n=i[1],o=i[2],r=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+o*h,i[1]=n*l+r*h,i[2]=e*u+o*d,i[3]=n*u+r*d,i[4]=e*c+o*f+s,i[5]=n*c+r*f+a,i}function Zs(i,t,e,n,o,r,s){return i[0]=t,i[1]=e,i[2]=n,i[3]=o,i[4]=r,i[5]=s,i}function X0(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 ql(i,t,e){return Yl(i,Zs(_c,t,0,0,e,0,0))}function Y0(i,t,e){return Zs(i,t,0,0,e,0,0)}function q0(i,t,e){return Yl(i,Zs(_c,1,0,0,1,t,e))}function Si(i,t,e,n,o,r,s,a){const l=Math.sin(r),h=Math.cos(r);return i[0]=n*h,i[1]=o*l,i[2]=-n*l,i[3]=o*h,i[4]=s*n*h-a*n*l+t,i[5]=s*o*l+a*o*h+e,i}function $l(i,t){const e=$0(t);gt(e!==0,32);const n=t[0],o=t[1],r=t[2],s=t[3],a=t[4],l=t[5];return i[0]=s/e,i[1]=-o/e,i[2]=-r/e,i[3]=n/e,i[4]=(r*l-s*a)/e,i[5]=-(n*l-o*a)/e,i}function $0(i){return i[0]*i[3]-i[1]*i[2]}let xc;function bc(i){const t="matrix("+i.join(", ")+")";if(kl)return t;const e=xc||(xc=document.createElement("div"));return e.style.transform=t,e.style.transform}const Z0=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,K0=/^([a-z]*)$|^hsla?\(.*\)$/i;function Zl(i){return typeof i=="string"?i:wc(i)}function H0(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 Q0=function(){const t={};let e=0;return function(n){let o;if(t.hasOwnProperty(n))o=t[n];else{if(e>=1024){let r=0;for(const s in t)(r++&3)===0&&(delete t[s],--e)}o=J0(n),t[n]=o,++e}return o}}();function Mr(i){return Array.isArray(i)?i:Q0(i)}function J0(i){let t,e,n,o,r;if(K0.exec(i)&&(i=H0(i)),Z0.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?o=parseInt(i.substr(1+3*a,a),16):o=255,a==1&&(t=(t<<4)+t,e=(e<<4)+e,n=(n<<4)+n,l&&(o=(o<<4)+o)),r=[t,e,n,o/255]}else i.startsWith("rgba(")?(r=i.slice(5,-1).split(",").map(Number),kc(r)):i.startsWith("rgb(")?(r=i.slice(4,-1).split(",").map(Number),r.push(1),kc(r)):gt(!1,14);return r}function kc(i){return i[0]=$t(i[0]+.5|0,0,255),i[1]=$t(i[1]+.5|0,0,255),i[2]=$t(i[2]+.5|0,0,255),i[3]=$t(i[3],0,1),i}function wc(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 o=i[3]===void 0?1:Math.round(i[3]*100)/100;return"rgba("+t+","+e+","+n+","+o+")"}class tv{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 o=Mc(t,e,n);return o in this.cache_?this.cache_[o]:null}set(t,e,n,o){const r=Mc(t,e,n);this.cache_[r]=o,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function Mc(i,t,e){const n=e?Zl(e):"null";return t+":"+i+":"+n}const Ks=new tv;class ev extends xl{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){it()}calculateMatrices2D(t){const e=t.viewState,n=t.coordinateToPixelTransform,o=t.pixelToCoordinateTransform;Si(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),$l(o,n)}forEachFeatureAtCoordinate(t,e,n,o,r,s,a,l){let h;const u=e.viewState;function d(x,k,w,C){return r.call(s,k,x?w:null,C)}const c=u.projection,f=Gl(t.slice(),c),g=[[0,0]];if(c.canWrapX()&&o){const x=c.getExtent(),k=Gt(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 z=S.getWrapX()?f:t,P=d.bind(null,w.managed);v[0]=z[0]+g[x][0],v[1]=z[1]+g[x][1],h=M.forEachFeatureAtCoordinate(v,e,n,P,_)}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,o,r,s){return this.forEachFeatureAtCoordinate(t,e,n,o,Fn,this,r,s)!==void 0}getMap(){return this.map_}renderFrame(t){it()}scheduleExpireIconCache(t){Ks.canExpireCache()&&t.postRenderFunctions.push(iv)}}function iv(i,t){Ks.expire()}const nv=ev;class ov extends ei{constructor(t,e,n,o){super(t),this.inversePixelTransform=e,this.frameState=n,this.context=o}}const Cc=ov,Ec="10px sans-serif",Ti="#000",Hs="round",Cr=[],Er=0,Ro="round",Sr=10,Tr="#000",Ir="center",Qs="middle",qn=[0,0,0,0],zr=1,Ii=new di;let Ao=null,Kl;const Hl={},rv=function(){const t="32px ",e=["monospace","serif"],n=e.length,o="wmytzilWMYTZIL@#/&?$%10";let r,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,o),d!=g){const m=Js(h+" "+u+" "+t+d+","+g,o);c=c&&m!=s}}return!!c}function l(){let h=!0;const u=Ii.getKeys();for(let d=0,c=u.length;d<c;++d){const f=u[d];Ii.get(f)<100&&(a.apply(this,f.split(`
6
+ `))?(vr(Hl),Ao=null,Kl=void 0,Ii.set(f,100)):(Ii.set(f,Ii.get(f)+1,!0),h=!1))}h&&(clearInterval(r),r=void 0)}return function(h){const u=Kd(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
7
  `+u.weight+`
40
- `+f;Ei.get(m)===void 0&&(Ei.set(m,100,!0),a(u.style,u.weight,f)||(Ei.set(m,0,!0),r===void 0&&(r=setInterval(l,32))))}}}(),ov=function(){let i;return function(t){let e=Hl[t];if(e==null){if(bl){const n=Vd(t),o=Mc(t,"\u017Dg");e=(isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight))*(o.actualBoundingBoxAscent+o.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);Hl[t]=e}return e}}();function Mc(i,t){return zo||(zo=Ae(1,1)),i!=$l&&(zo.font=i,$l=zo.font),zo.measureText(t)}function Ks(i,t){return Mc(i,t).width}function Cc(i,t,e){if(t in e)return e[t];const n=t.split(`
41
- `).reduce((o,r)=>Math.max(o,Ks(i,r)),0);return e[t]=n,n}function rv(i,t){const e=[],n=[],o=[];let r=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){r=Math.max(r,s),o.push(s),s=0,a+=l;continue}const c=t[h+1]||i.font,g=Ks(c,d);e.push(g),s+=g;const f=ov(c);n.push(f),l=Math.max(l,f)}return{width:r,height:a,widths:e,heights:n,lineWidths:o}}function sv(i,t,e,n,o,r,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,o,r,s,a,0,0,s,a)):i.drawImage(n,o,r,s,a,l,h,s*u[0],a*u[1]),i.restore()}function av(i,t){const e=i.contextInstructions;for(let n=0,o=e.length;n<o;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_=ft(Ei,yo.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=pr+" 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 o=new kc(t,void 0,e);n.dispatchEvent(o)}}disposeInternal(){Ft(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(Vi.PRECOMPOSE,t);const e=t.layerStatesArray.sort(function(s,a){return s.zIndex-a.zIndex}),n=t.viewState;this.children_.length=0;const o=[];let r=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(!Cl(l,n)||u!="ready"&&u!="undefined"){h.unrender();continue}const d=h.render(t,r);!d||(d!==r&&(this.children_.push(d),r=d),"getDeclutter"in h&&o.push(h))}for(let s=o.length-1;s>=0;--s)o[s].renderDeclutter(t);r0(this.element_,this.children_),this.dispatchRenderEvent(Vi.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}}const hv=lv;class Ki extends Qe{constructor(t,e){super(t),this.layer=e}}const Kl={LAYERS:"layers"};class Jl extends Hd{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(Kl.LAYERS,this.handleLayersChanged_),n?Array.isArray(n)?n=new Ve(n.slice(),{unique:!0}):gt(typeof n.getArray=="function",43):n=new Ve(void 0,{unique:!0}),this.setLayers(n)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(Ft),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(ft(t,oe.ADD,this.handleLayersAdd_,this),ft(t,oe.REMOVE,this.handleLayersRemove_,this));for(const n in this.listenerKeys_)this.listenerKeys_[n].forEach(Ft);mr(this.listenerKeys_);const e=t.getArray();for(let n=0,o=e.length;n<o;n++){const r=e[n];this.registerLayerListeners_(r),this.dispatchEvent(new Ki("addlayer",r))}this.changed()}registerLayerListeners_(t){const e=[ft(t,yo.PROPERTYCHANGE,this.handleLayerChange_,this),ft(t,tt.CHANGE,this.handleLayerChange_,this)];t instanceof Jl&&e.push(ft(t,"addlayer",this.handleLayerGroupAdd_,this),ft(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[$(t)]=e}handleLayerGroupAdd_(t){this.dispatchEvent(new Ki("addlayer",t.layer))}handleLayerGroupRemove_(t){this.dispatchEvent(new Ki("removelayer",t.layer))}handleLayersAdd_(t){const e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new Ki("addlayer",e)),this.changed()}handleLayersRemove_(t){const e=t.element,n=$(e);this.listenerKeys_[n].forEach(Ft),delete this.listenerKeys_[n],this.dispatchEvent(new Ki("removelayer",e)),this.changed()}getLayers(){return this.get(Kl.LAYERS)}setLayers(t){const e=this.getLayers();if(e){const n=e.getArray();for(let o=0,r=n.length;o<r;++o)this.dispatchEvent(new Ki("removelayer",n[o]))}this.set(Kl.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 o=this.getLayerState();let r=o.zIndex;!t&&o.zIndex===void 0&&(r=0);for(let s=n,a=e.length;s<a;s++){const l=e[s];l.opacity*=o.opacity,l.visible=l.visible&&o.visible,l.maxResolution=Math.min(l.maxResolution,o.maxResolution),l.minResolution=Math.max(l.minResolution,o.minResolution),l.minZoom=Math.max(l.minZoom,o.minZoom),l.maxZoom=Math.min(l.maxZoom,o.maxZoom),o.extent!==void 0&&(l.extent!==void 0?l.extent=Wn(l.extent,o.extent):l.extent=o.extent),l.zIndex===void 0&&(l.zIndex=r)}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 Ro=uv;class dv extends Ro{constructor(t,e,n,o,r,s){super(t,e,r),this.originalEvent=n,this.pixel_=null,this.coordinate_=null,this.dragging=o!==void 0?o:!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,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 cv extends zs{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_=ft(n,El.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=ft(n,El.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(tt.TOUCHMOVE,this.boundHandleTouchMove_,Zd?{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 o in this.trackedTouches_)if(this.trackedTouches_[o].target!==e.target){delete this.trackedTouches_[o];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(Ft),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 o=t[n];this.down_[n]=typeof o=="function"?Ln:o}if(this.dragListenerKeys_.length===0){const n=this.map_.getOwnerDocument();this.dragListenerKeys_.push(ft(n,Mt.POINTERMOVE,this.handlePointerMove_,this),ft(n,Mt.POINTERUP,this.handlePointerUp_,this),ft(this.element_,Mt.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==n&&this.dragListenerKeys_.push(ft(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_&&(Ft(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(tt.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Ft(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Ft),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const gv=cv,Qs=1/0;class fv{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,mr(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 o=this.keyFunction_(n);return delete this.queuedElements_[o],n}enqueue(t){gt(!(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_,o=e.length,r=e[t],s=n[t],a=t;for(;t<o>>1;){const l=this.getLeftChildIndex_(t),h=this.getRightChildIndex_(t),u=h<o&&n[h]<n[l]?h:l;e[t]=e[u],n[t]=n[u],t=u}e[t]=r,n[t]=s,this.siftDown_(a,t)}siftDown_(t,e){const n=this.elements_,o=this.priorities_,r=n[e],s=o[e];for(;e>t;){const a=this.getParentIndex_(e);if(o[a]>s)n[e]=n[a],o[e]=o[a],e=a;else break}n[e]=r,o[e]=s}reprioritize(){const t=this.priorityFunction_,e=this.elements_,n=this.priorities_;let o=0;const r=e.length;let s,a,l;for(a=0;a<r;++a)s=e[a],l=t(s),l==Qs?delete this.queuedElements_[this.keyFunction_(s)]:(n[o]=l,e[o++]=s);e.length=o,n.length=o,this.heapify_()}}const mv=fv,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 o=e.getKey();o in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[o],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let n=0,o,r,s;for(;this.tilesLoading_<t&&n<e&&this.getCount()>0;)r=this.dequeue()[0],s=r.getKey(),o=r.getState(),o===N.IDLE&&!(s in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++n,r.load())}}const vv=pv;function _v(i,t,e,n,o){if(!i||!(e in i.wantedTiles)||!i.wantedTiles[e][t.getKey()])return Qs;const r=i.viewState.center,s=n[0]-r[0],a=n[1]-r[1];return 65536*Math.log(o)+Math.sqrt(s*s+a*a)/o}const qt={ANIMATING:0,INTERACTING:1},ii={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Ec=42,Ql=256;function Sc(i,t,e){return function(n,o,r,s,a){if(!n)return;if(!o&&!t)return n;const l=t?0:r[0]*o,h=t?0:r[1]*o,u=a?a[0]:0,d=a?a[1]:0;let c=i[0]+l/2+u,g=i[2]-l/2+u,f=i[1]+h/2+d,m=i[3]-h/2+d;c>g&&(c=(g+c)/2,g=c),f>m&&(f=(m+f)/2,m=f);let p=Vt(n[0],c,g),_=Vt(n[1],f,m);if(s&&e&&o){const v=30*o;p+=-v*Math.log(1+Math.max(0,c-n[0])/v)+v*Math.log(1+Math.max(0,n[0]-g)/v),_+=-v*Math.log(1+Math.max(0,f-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 o=Nt(t)/e[0],r=Ue(t)/e[1];return n?Math.min(i,Math.max(o,r)):Math.min(i,Math.min(o,r))}function eh(i,t,e){let n=Math.min(i,t);const o=50;return n*=Math.log(1+o*Math.max(0,i/t-1))/o+1,e&&(n=Math.max(n,e),n/=Math.log(1+o*Math.max(0,e/i-1))/o+1),Vt(n,e/2,t*2)}function xv(i,t,e,n){return t=t!==void 0?t:!0,function(o,r,s,a){if(o!==void 0){const l=i[0],h=i[i.length-1],u=e?th(l,e,s,n):l;if(a)return t?eh(o,u,h):Vt(o,h,u);const d=Math.min(u,o),c=Math.floor(xl(i,d,r));return i[c]>u&&c<i.length-1?i[c+1]:i[c]}else return}}function bv(i,t,e,n,o,r){return n=n!==void 0?n:!0,e=e!==void 0?e:0,function(s,a,l,h){if(s!==void 0){const u=o?th(t,o,l,r):t;if(h)return n?eh(s,u,e):Vt(s,e,u);const d=1e-9,c=Math.ceil(Math.log(t/u)/Math.log(i)-d),g=-a*(.5-d)+.5,f=Math.min(u,s),m=Math.floor(Math.log(t/f)/Math.log(i)+g),p=Math.max(c,m),_=t/Math.pow(i,p);return Vt(_,e,u)}else return}}function Tc(i,t,e,n,o){return e=e!==void 0?e:!0,function(r,s,a,l){if(r!==void 0){const h=n?th(i,n,a,o):i;return!e||!l?Vt(r,t,h):eh(r,h,t)}else return}}function ih(i){if(i!==void 0)return 0}function Ic(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 zc(i){return Math.pow(i,3)}function Ao(i){return 1-zc(1-i)}function Mv(i){return 3*i*i-2*i*i*i}function Cv(i){return i}function Ji(i,t,e,n,o,r){r=r||[];let s=0;for(let a=t;a<e;a+=n){const l=i[a],h=i[a+1];r[s++]=o[0]*l+o[2]*h+o[4],r[s++]=o[1]*l+o[3]*h+o[5]}return r&&r.length!=s&&(r.length=s),r}function nh(i,t,e,n,o,r,s){s=s||[];const a=Math.cos(o),l=Math.sin(o),h=r[0],u=r[1];let d=0;for(let c=t;c<e;c+=n){const g=i[c]-h,f=i[c+1]-u;s[d++]=h+g*a-f*l,s[d++]=u+g*l+f*a;for(let m=c+2;m<c+n;++m)s[d++]=i[m]}return s&&s.length!=d&&(s.length=d),s}function Ev(i,t,e,n,o,r,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,g=i[d+1]-h;a[u++]=l+o*c,a[u++]=h+r*g;for(let f=d+2;f<d+n;++f)a[u++]=i[f]}return a&&a.length!=u&&(a.length=u),a}function Rc(i,t,e,n,o,r,s){s=s||[];let a=0;for(let l=t;l<e;l+=n){s[a++]=i[l]+o,s[a++]=i[l+1]+r;for(let h=l+2;h<l+n;++h)s[a++]=i[h]}return s&&s.length!=a&&(s.length=a),s}const Ac=qe();class Sv extends hi{constructor(){super(),this.extent_=Ge(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=qp(function(t,e,n){if(!n)return this.getSimplifiedGeometry(e);const o=this.clone();return o.applyTransform(n),o.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return et()}closestPointXY(t,e,n,o){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]))&&_r(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),o=n.getUnits()=="tile-pixels"?function(r,s,a){const l=n.getExtent(),h=n.getWorldExtent(),u=Ue(h)/Ue(l);return Mi(Ac,h[0],h[3],u,-u,0,0,0),Ji(r,0,r.length,a,Ac,s),br(n,e)(r,s,a)}:br(n,e);return this.applyTransform(o),this}}const Pc=Sv;class Tv extends Pc{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(t){return zl(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 o;if(t)o=ta(t);else{for(let r=0;r<n;++r)if(e.length===0){this.layout="XY",this.stride=2;return}else e=e[0];o=e.length,t=Iv(o)}this.layout=t,this.stride=o}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const n=this.getFlatCoordinates();if(n){const o=this.getStride();nh(n,0,n.length,o,t,e,n),this.changed()}}scale(t,e,n){e===void 0&&(e=t),n||(n=qi(this.getExtent()));const o=this.getFlatCoordinates();if(o){const r=this.getStride();Ev(o,0,o.length,r,t,e,n,o),this.changed()}}translate(t,e){const n=this.getFlatCoordinates();if(n){const o=this.getStride();Rc(n,0,n.length,o,t,e,n),this.changed()}}}function Iv(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 zv(i,t,e){const n=i.getFlatCoordinates();if(n){const o=i.getStride();return Ji(n,0,n.length,o,t,e)}else return null}const Qi=Tv;function Dc(i,t,e,n,o,r,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=((o-a)*h+(r-l)*u)/(h*h+u*u);if(c>1)d=e;else if(c>0){for(let g=0;g<n;++g)s[g]=ki(i[t+g],i[e+g],c);s.length=n;return}else d=t}for(let c=0;c<n;++c)s[c]=i[d+c];s.length=n}function oh(i,t,e,n,o){let r=i[t],s=i[t+1];for(t+=n;t<e;t+=n){const a=i[t],l=i[t+1],h=Fn(r,s,a,l);h>o&&(o=h),r=a,s=l}return o}function rh(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){const a=e[r];o=oh(i,t,a,n,o),t=a}return o}function Rv(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){const a=e[r];o=rh(i,t,a,n,o),t=a[a.length-1]}return o}function sh(i,t,e,n,o,r,s,a,l,h,u){if(t==e)return h;let d,c;if(o===0)if(c=Fn(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 g=t+n;for(;g<e;)if(Dc(i,g-n,g,n,s,a,u),c=Fn(s,a,u[0],u[1]),c<h){for(h=c,d=0;d<n;++d)l[d]=u[d];l.length=n,g+=n}else g+=n*Math.max((Math.sqrt(c)-Math.sqrt(h))/o|0,1);if(r&&(Dc(i,e-n,t,n,s,a,u),c=Fn(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,o,r,s,a,l,h,u){u=u||[NaN,NaN];for(let d=0,c=e.length;d<c;++d){const g=e[d];h=sh(i,t,g,n,o,r,s,a,l,h,u),t=g}return h}function Av(i,t,e,n,o,r,s,a,l,h,u){u=u||[NaN,NaN];for(let d=0,c=e.length;d<c;++d){const g=e[d];h=ah(i,t,g,n,o,r,s,a,l,h,u),t=g[g.length-1]}return h}function Lc(i,t,e,n){for(let o=0,r=e.length;o<r;++o)i[t++]=e[o];return t}function ea(i,t,e,n){for(let o=0,r=e.length;o<r;++o){const s=e[o];for(let a=0;a<n;++a)i[t++]=s[a]}return t}function lh(i,t,e,n,o){o=o||[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=ea(i,t,e[s],n);o[r++]=l,t=l}return o.length=r,o}function Pv(i,t,e,n,o){o=o||[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=lh(i,t,e[s],n,o[r]);l.length===0&&(l[0]=t),o[r++]=l,t=l[l.length-1]}return o.length=r,o}function hh(i,t,e,n,o,r,s){const a=(e-t)/n;if(a<3){for(;t<e;t+=n)r[s++]=i[t],r[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 g=0;const f=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,f,m,p,_);k>g&&(u=v,g=k)}g>o&&(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]&&(r[s++]=i[t+d*n],r[s++]=i[t+d*n+1]);return s}function Dv(i,t,e,n,o,r,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l];s=hh(i,t,u,n,o,r,s),a.push(s),t=u}return s}function Xn(i,t){return t*Math.round(i/t)}function Lv(i,t,e,n,o,r,s){if(t==e)return s;let a=Xn(i[t],o),l=Xn(i[t+1],o);t+=n,r[s++]=a,r[s++]=l;let h,u;do if(h=Xn(i[t],o),u=Xn(i[t+1],o),t+=n,t==e)return r[s++]=h,r[s++]=u,s;while(h==a&&u==l);for(;t<e;){const d=Xn(i[t],o),c=Xn(i[t+1],o);if(t+=n,d==h&&c==u)continue;const g=h-a,f=u-l,m=d-a,p=c-l;if(g*p==f*m&&(g<0&&m<g||g==m||g>0&&m>g)&&(f<0&&p<f||f==p||f>0&&p>f)){h=d,u=c;continue}r[s++]=h,r[s++]=u,a=h,l=u,h=d,u=c}return r[s++]=h,r[s++]=u,s}function Oc(i,t,e,n,o,r,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l];s=Lv(i,t,u,n,o,r,s),a.push(s),t=u}return s}function Ov(i,t,e,n,o,r,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l],d=[];s=Oc(i,t,u,n,o,r,s,d),a.push(d),t=u[u.length-1]}return s}function tn(i,t,e,n,o){o=o!==void 0?o:[];let r=0;for(let s=t;s<e;s+=n)o[r++]=i.slice(s,s+n);return o.length=r,o}function Ir(i,t,e,n,o){o=o!==void 0?o:[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=e[s];o[r++]=tn(i,t,l,n,o[r]),t=l}return o.length=r,o}function uh(i,t,e,n,o){o=o!==void 0?o:[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=e[s];o[r++]=l.length===1&&l[0]===t?[]:Ir(i,t,l,n,o[r]),t=l[l.length-1]}return o.length=r,o}function Fc(i,t,e,n){let o=0,r=i[e-n],s=i[e-n+1];for(;t<e;t+=n){const a=i[t],l=i[t+1];o+=s*a-r*l,r=a,s=l}return o/2}function Nc(i,t,e,n){let o=0;for(let r=0,s=e.length;r<s;++r){const a=e[r];o+=Fc(i,t,a,n),t=a}return o}function Fv(i,t,e,n){let o=0;for(let r=0,s=e.length;r<s;++r){const a=e[r];o+=Nc(i,t,a,n),t=a[a.length-1]}return o}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,o){return o<jn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(oh(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,o))}getArea(){return Fc(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,o){const r=this.flatCoordinates,s=Fn(t,e,r[0],r[1]);if(s<o){const a=this.stride;for(let l=0;l<a;++l)n[l]=r[l];return n.length=a,s}else return o}getCoordinates(){return this.flatCoordinates?this.flatCoordinates.slice():[]}computeExtent(t){return yr(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,o){return!Rl(o,function(s){return!Un(i,t,e,n,s[0],s[1])})}function Un(i,t,e,n,o,r){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<=r?u>r&&(h-a)*(r-l)-(o-a)*(u-l)>0&&s++:u<=r&&(h-a)*(r-l)-(o-a)*(u-l)<0&&s--,a=h,l=u}return s!==0}function ch(i,t,e,n,o,r){if(e.length===0||!Un(i,t,e[0],n,o,r))return!1;for(let s=1,a=e.length;s<a;++s)if(Un(i,e[s-1],e[s],n,o,r))return!1;return!0}function Gv(i,t,e,n,o,r){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,o,r))return!0;t=l[l.length-1]}return!1}function gh(i,t,e,n,o,r,s){let a,l,h,u,d,c,g;const f=o[r+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],g=i[a+1],(f<=c&&g<=f||c<=f&&f<=g)&&(h=(f-c)/(g-c)*(d-u)+u,m.push(h)),u=d,c=g}let p=NaN,_=-1/0;for(m.sort(Pn),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,f)&&(p=h,_=v)),u=d}return isNaN(p)&&(p=o[r]),s?(s.push(p,f,_),s):[p,f,_]}function jc(i,t,e,n,o){let r=[];for(let s=0,a=e.length;s<a;++s){const l=e[s];r=gh(i,t,l,n,o,2*s,r),t=l[l.length-1]}return r}function Bc(i,t,e,n,o){let r;for(t+=n;t<e;t+=n)if(r=o(i.slice(t-n,t),i.slice(t,t+n)),r)return r;return!1}function na(i,t,e,n,o){const r=nc(Ge(),i,t,e,n);return $t(o,r)?Bn(o,r)||r[0]>=o[0]&&r[2]<=o[2]||r[1]>=o[1]&&r[3]<=o[3]?!0:Bc(i,t,e,n,function(s,a){return T0(o,s,a)}):!1}function jv(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){if(na(i,t,e[r],n,o))return!0;t=e[r]}return!1}function Wc(i,t,e,n,o){return!!(na(i,t,e,n,o)||Un(i,t,e,n,o[0],o[1])||Un(i,t,e,n,o[0],o[3])||Un(i,t,e,n,o[2],o[1])||Un(i,t,e,n,o[2],o[3]))}function Zc(i,t,e,n,o){if(!Wc(i,t,e[0],n,o))return!1;if(e.length===1)return!0;for(let r=1,s=e.length;r<s;++r)if(Nv(i,e[r-1],e[r],n,o)&&!na(i,e[r-1],e[r],n,o))return!1;return!0}function Bv(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){const a=e[r];if(Zc(i,t,a,n,o))return!0;t=a[a.length-1]}return!1}function Wv(i,t,e,n){for(;t<e-n;){for(let o=0;o<n;++o){const r=i[t+o];i[t+o]=i[e-n+o],i[e-n+o]=r}t+=n,e-=n}}function fh(i,t,e,n){let o=0,r=i[e-n],s=i[e-n+1];for(;t<e;t+=n){const a=i[t],l=i[t+1];o+=(a-r)*(l+s),r=a,s=l}return o===0?void 0:o>0}function Yc(i,t,e,n,o){o=o!==void 0?o:!1;for(let r=0,s=e.length;r<s;++r){const a=e[r],l=fh(i,t,a,n);if(r===0){if(o&&l||!o&&!l)return!1}else if(o&&!l||!o&&l)return!1;t=a}return!0}function Zv(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){const a=e[r];if(!Yc(i,t,a,n,o))return!1;a.length&&(t=a[a.length-1])}return!0}function mh(i,t,e,n,o){o=o!==void 0?o:!1;for(let r=0,s=e.length;r<s;++r){const a=e[r],l=fh(i,t,a,n);(r===0?o&&l||!o&&!l:o&&!l||!o&&l)&&Wv(i,t,a,n),t=a}return t}function Xc(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r)t=mh(i,t,e[r],n,o);return t}function Yv(i,t){const e=[];let n=0,o=0;for(let r=0,s=t.length;r<s;++r){const a=t[r];if(!fh(i,n,a,2))e.push(t.slice(o,r+1));else{if(e.length===0)continue;e[e.length-1].push(t[o])}o=r+1,n=a}return e}class Po 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 Po(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,n,o){return o<jn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rh(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,o))}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,Ir(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=qi(this.getExtent());this.flatInteriorPoint_=gh(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_,o=[];let r=0;for(let s=0,a=n.length;s<a;++s){const l=n[s],h=new Gc(e.slice(r,l),t);o.push(h),r=l}return o}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;Yc(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=Oc(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,n),new Po(e,"XY",n)}getType(){return"Polygon"}intersectsExtent(t){return Zc(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 Vn=Po;function Uc(i){const t=i[0],e=i[1],n=i[2],o=i[3],r=[t,e,t,o,n,o,n,e,t,e];return new Po(r,"XY",[r.length])}function Xv(i,t,e){t=t||32;const n=i.getStride(),o=i.getLayout(),r=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]=r[d]}const l=[a.length],h=new Po(a,o,l);return Uv(h,r,i.getRadius(),e),h}function Uv(i,t,e,n){const o=i.getFlatCoordinates(),r=i.getStride(),s=o.length/r-1,a=n||0;for(let l=0;l<=s;++l){const h=l*r,u=a+Ui(l,s)*2*Math.PI/s;o[h]=t[0]+e*Math.cos(u),o[h+1]=t[1]+e*Math.sin(u)}i.changed()}const ph=0;class Vv 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_=Wl(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=Zt(t.center,this.projection_)),t.extent&&(t.extent=Hi(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=$v(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 o=qv(t),r=n.constraint,s=Hv(t);this.constraints_={center:o,resolution:r,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 o=t||[0,0,0,0];e=e||[0,0,0,0];const r=this.getResolution(),s=r/2*(o[3]-e[3]+e[1]-o[1]),a=r/2*(o[0]-e[0]+e[2]-o[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 o=arguments[n];o.center&&(o=Object.assign({},o),o.center=Zt(o.center,this.getProjection())),o.anchor&&(o=Object.assign({},o),o.anchor=Zt(o.anchor,this.getProjection())),e[n]=o}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 o=0;for(;o<e&&!this.isDef();++o){const u=arguments[o];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(o===e){n&&oa(n,!0);return}let r=Date.now(),s=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_;const h=[];for(;o<e;++o){const u=arguments[o],d={start:r,complete:!1,anchor:u.anchor,duration:u.duration!==void 0?u.duration:1e3,easing:u.easing||Mv,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=Ui(u.rotation-l+Math.PI,2*Math.PI)-Math.PI;d.targetRotation=l+c,l=d.targetRotation}Kv(d)?d.complete=!0:r+=d.duration,h.push(d)}this.animations_.push(h),this.setHint(qt.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[qt.ANIMATING]>0}getInteracting(){return this.hints_[qt.INTERACTING]>0}cancelAnimations(){this.setHint(qt.ANIMATING,-this.hints_[qt.ANIMATING]);let t;for(let e=0,n=this.animations_.length;e<n;++e){const o=this.animations_[e];if(o[0].callback&&oa(o[0].callback,!1),!t)for(let r=0,s=o.length;r<s;++r){const a=o[r];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 o=this.animations_[n];let r=!0;for(let s=0,a=o.length;s<a;++s){const l=o[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):r=!1;const d=l.easing(u);if(l.sourceCenter){const c=l.sourceCenter[0],g=l.sourceCenter[1],f=l.targetCenter[0],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;const p=c+d*(f-c),_=g+d*(m-g);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 g=this.getViewportSize_(this.getRotation()),f=this.constraints_.resolution(c,0,g,!0);this.targetCenter_=this.calculateCenterZoom(f,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?Ui(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+d*(l.targetRotation-l.sourceRotation);if(l.anchor){const g=this.constraints_.rotation(c,!0);this.targetCenter_=this.calculateCenterRotate(g,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=c}if(this.applyTargetState_(!0),e=!0,!l.complete)break}if(r){this.animations_[n]=null,this.setHint(qt.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const s=o[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 o=this.getCenterInternal();return o!==void 0&&(n=[o[0]-e[0],o[1]-e[1]],Fl(n,t-this.getRotation()),R0(n,e)),n}calculateCenterZoom(t,e){let n;const o=this.getCenterInternal(),r=this.getResolution();if(o!==void 0&&r!==void 0){const s=e[0]-t*(e[0]-o[0])/r,a=e[1]-t*(e[1]-o[1])/r;n=[s,a]}return n}getViewportSize_(t){const e=this.viewportSize_;if(t){const n=e[0],o=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(o*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(o*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&&To(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 Yl(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();gt(e,1);const n=this.getResolution();gt(n!==void 0,2);const o=this.getRotation();return gt(o!==void 0,3),Pl(e,n,o,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(Hi(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const n=Nt(t)/e[0],o=Ue(t)/e[1];return Math.max(n,o)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,o=Math.log(e/n)/Math.log(t);return function(r){return e/Math.pow(t,r*o)}}getRotation(){return this.get(ii.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),o=this.minResolution_,r=Math.log(n/o)/e;return function(s){return Math.log(n/s)/e/r}}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 o=this.getCenterInternal();const r=this.padding_;if(r){const s=this.getViewportSizeMinusPadding_();o=vh(o,this.getViewportSize_(),[s[0]/2+r[3],s[1]/2+r[0]],e,n)}return{center:o.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,o;if(this.resolutions_){const r=xl(this.resolutions_,t,1);e=r,n=this.resolutions_[r],r==this.resolutions_.length-1?o=2:o=n/this.resolutions_[r+1]}else n=this.maxResolution_,o=this.zoomFactor_;return e+Math.log(n/t)/Math.log(o)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=Vt(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,Vt(t-e,0,1))}else return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let n;if(gt(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function",24),Array.isArray(t)){gt(!Ll(t),25);const o=Hi(t,this.getProjection());n=Uc(o)}else if(t.getType()==="Circle"){const o=Hi(t.getExtent(),this.getProjection());n=Uc(o),n.rotate(this.getRotation(),qi(o))}else n=t;this.fitInternal(n,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),n=Math.cos(e),o=Math.sin(-e),r=t.getFlatCoordinates(),s=t.getStride();let a=1/0,l=1/0,h=-1/0,u=-1/0;for(let d=0,c=r.length;d<c;d+=s){const g=r[d]*n-r[d+1]*o,f=r[d]*o+r[d+1]*n;a=Math.min(a,g),l=Math.min(l,f),h=Math.max(h,g),u=Math.max(u,f)}return[a,l,h,u]}fitInternal(t,e){e=e||{};let n=e.size;n||(n=this.getViewportSizeMinusPadding_());const o=e.padding!==void 0?e.padding:[0,0,0,0],r=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]-o[1]-o[3],n[1]-o[0]-o[2]]);l=isNaN(l)?s:Math.max(l,s),l=this.getConstrainedResolution(l,r?0:1);const h=this.getRotation(),u=Math.sin(h),d=Math.cos(h),c=qi(a);c[0]+=(o[1]-o[3])/2*l,c[1]+=(o[0]-o[2])/2*l;const g=c[0]*d-c[1]*u,f=c[1]*d+c[0]*u,m=this.getConstrainedCenter([g,f],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(Zt(t,this.getProjection()),e,n)}centerOnInternal(t,e,n){this.setCenterInternal(vh(t,e,n,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,n,o){let r;const s=this.padding_;if(s&&t){const a=this.getViewportSizeMinusPadding_(-n),l=vh(t,o,[a[0]/2+s[3],a[1]/2+s[0]],e,n);r=[t[0]-l[0],t[1]-l[1]]}return r}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(t){const e=To(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&&Zt(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const n=this.getAnimating()||this.getInteracting(),o=this.getViewportSize_(this.getRotation()),r=this.constraints_.resolution(this.targetResolution_*t,0,o,n);e&&(this.targetCenter_=this.calculateCenterZoom(r,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=Zt(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){const n=this.getAnimating()||this.getInteracting(),o=this.constraints_.rotation(this.targetRotation_+t,n);e&&(this.targetCenter_=this.calculateCenterRotate(o,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t&&Zt(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,o=this.constraints_.rotation(this.targetRotation_,n),r=this.getViewportSize_(o),s=this.constraints_.resolution(this.targetResolution_,0,r,n),a=this.constraints_.center(this.targetCenter_,s,r,n,this.calculateCenterShift(this.targetCenter_,s,o,r));this.get(ii.ROTATION)!==o&&this.set(ii.ROTATION,o),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 o=e||0,r=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(r),a=this.constraints_.resolution(this.targetResolution_,o,s),l=this.constraints_.center(this.targetCenter_,a,s,!1,this.calculateCenterShift(this.targetCenter_,a,r,s));if(t===0&&!this.cancelAnchor_){this.targetResolution_=a,this.targetRotation_=r,this.targetCenter_=l,this.applyTargetState_();return}n=n||(t===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==a||this.getRotation()!==r||!this.getCenterInternal()||!ei(this.getCenterInternal(),l))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:r,center:l,resolution:a,duration:t,easing:Ao,anchor:n}))}beginInteraction(){this.resolveConstraints(0),this.setHint(qt.INTERACTING,1)}endInteraction(t,e,n){n=n&&Zt(n,this.getProjection()),this.endInteractionInternal(t,e,n)}endInteractionInternal(t,e,n){this.setHint(qt.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 qv(i){if(i.extent!==void 0){const e=i.smoothExtentConstraint!==void 0?i.smoothExtentConstraint:!0;return Sc(i.extent,i.constrainOnlyCenter,e)}const t=Wl(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 $v(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=Wl(i.projection,"EPSG:3857"),g=c.getExtent();let f=i.constrainOnlyCenter,m=i.extent;if(!h&&!m&&c.isGlobal()&&(f=!1,m=g),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,!f&&m,d):t=Tc(e,n,u,!f&&m,d)}else{const _=(g?Math.max(Nt(g),Ue(g)):360*ko.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,!f&&m,d):t=Tc(e,n,u,!f&&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?wv():e===!1?Ic:typeof e=="number"?kv(e):Ic}else return ih}function Kv(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,o){const r=Math.cos(-o);let s=Math.sin(-o),a=i[0]*r-i[1]*s,l=i[1]*r+i[0]*s;a+=(t[0]/2-e[0])*n,l+=(e[1]-t[1]/2)*n,s=-s;const h=a*r-l*s,u=l*r+a*s;return[h,u]}const en=Vv;class Jv extends bo{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",o=t.compassClassName!==void 0?t.compassClassName:"ol-compass";this.label_=null,typeof n=="string"?(this.label_=document.createElement("span"),this.label_.className=o,this.label_.textContent=n):(this.label_=n,this.label_.classList.add(o));const r=t.tipLabel?t.tipLabel:"Reset rotation",s=document.createElement("button");s.className=e+"-reset",s.setAttribute("type","button"),s.title=r,s.appendChild(this.label_),s.addEventListener(tt.CLICK,this.handleClick_.bind(this),!1);const a=e+" "+pr+" "+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(Ps)}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:Ao}):e.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const n=e.viewState.rotation;if(n!=this.rotation_){const o="rotate("+n+"rad)";if(this.autoHide_){const r=this.element.classList.contains(Ps);!r&&n===0?this.element.classList.add(Ps):r&&n!==0&&this.element.classList.remove(Ps)}this.label_.style.transform=o}this.rotation_=n}}const Qv=Jv;class t_ extends bo{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,o=t.zoomInClassName!==void 0?t.zoomInClassName:e+"-in",r=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=o,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=r,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+" "+pr+" "+Ml,g=this.element;g.className=c,g.appendChild(u),g.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 o=n.getZoom();if(o!==void 0){const r=n.getConstrainedZoom(o+t);this.duration_>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:r,duration:this.duration_,easing:Ao})):n.setZoom(r)}}}const e_=t_;function Vc(i){i=i||{};const t=new Ve;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 f0(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 o=[n[0]+t[0],n[1]+t[1]];i.animateInternal({duration:e!==void 0?e:250,easing:Cv,center:i.getConstrainedCenter(o)})}}function yh(i,t,e,n){const o=i.getZoom();if(o===void 0)return;const r=i.getConstrainedZoom(o+t),s=i.getResolutionForZoom(r);i.getAnimating()&&i.cancelAnimations(),i.animate({resolution:s,anchor:e,duration:n!==void 0?n:250,easing:Ao})}const zr=i_;class o_ extends zr{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,o=t.map,r=t.coordinate,s=n.shiftKey?-this.delta_:this.delta_,a=o.getView();yh(a,s,r,this.duration_),n.preventDefault(),e=!0}return!e}}const r_=o_;class s_ extends zr{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 o=0;o<t;o++)e+=i[o].clientX,n+=i[o].clientY;return[e/t,n/t]}const nn=s_;function bh(i){const t=arguments;return function(e){let n=!0;for(let o=0,r=t.length;o<r&&(n=n&&t[o](e),!!n);++o);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)},qc=function(i){return i.map.getTargetElement().hasAttribute("tabindex")?h_(i):!0},kh=Dn,$c=function(i){const t=i.originalEvent;return t.button==0&&!(e0&&i0&&t.ctrlKey)},u_=function(i){return i.type==Mt.SINGLECLICK},wh=function(i){const t=i.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},Hc=function(i){const t=i.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},Kc=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 gt(t!==void 0,56),t.pointerType=="mouse"},Jc=function(i){const t=i.originalEvent;return gt(t!==void 0,56),t.isPrimary&&t.button===0};class d_ extends nn{constructor(t){super({stopDown:xo}),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(qc,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 o=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],s=t.map.getView();P0(o,s.getResolution()),Fl(o,s.getRotation()),s.adjustCenterInternal(o)}}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 o=this.kinetic_.getDistance(),r=this.kinetic_.getAngle(),s=n.getCenterInternal(),a=e.getPixelFromCoordinateInternal(s),l=e.getCoordinateFromPixelInternal([a[0]-o*Math.cos(r),a[1]-o*Math.sin(r)]);n.animateInternal({center:n.getConstrainedCenter(l),duration:500,easing:Ao})}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 g_ extends nn{constructor(t){t=t||{},super({stopDown:xo}),this.condition_=t.condition?t.condition:l_,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 o=e.getSize(),r=t.pixel,s=Math.atan2(o[1]/2-r[1],r[0]-o[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)&&$c(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}const f_=g_;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",o=this.element_.style;o.left=Math.min(t[0],e[0])+n,o.top=Math.min(t[1],e[1])+n,o.width=Math.abs(e[0]-t[0])+n,o.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_,o=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);o[4]=o[0].slice(),this.geometry_?this.geometry_.setCoordinates([o]):this.geometry_=new Vn([o])}getGeometry(){return this.geometry_}}const p_=m_,ra={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class Ch 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:$c,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,n){const o=n[0]-e[0],r=n[1]-e[1];return o*o+r*r>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Ch(ra.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 Ch(e?ra.BOXEND:ra.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 Ch(ra.BOXSTART,t.coordinate,t)),!0):!1}onBoxEnd(t){}}const __=v_;class y_ extends __{constructor(t){t=t||{};const e=t.condition?t.condition:Hc;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 o=this.getGeometry();if(this.out_){const r=n.rotatedExtentForGeometry(o),s=n.getResolutionForExtentInternal(r),a=n.getResolution()/s;o=o.clone(),o.scale(a*a)}n.fitInternal(o,{duration:this.duration_,easing:Ao})}}const x_=y_,qn={LEFT:37,UP:38,RIGHT:39,DOWN:40};class b_ extends zr{constructor(t){super(),t=t||{},this.defaultCondition_=function(e){return wh(e)&&Kc(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,o=n.keyCode;if(this.condition_(t)&&(o==qn.DOWN||o==qn.LEFT||o==qn.RIGHT||o==qn.UP)){const s=t.map.getView(),a=s.getResolution()*this.pixelDelta_;let l=0,h=0;o==qn.DOWN?h=-a:o==qn.LEFT?l=-a:o==qn.RIGHT?l=a:h=a;const u=[l,h];Fl(u,s.getRotation()),n_(s,u,this.duration_),n.preventDefault(),e=!0}}return!e}}const k_=b_;class w_ extends zr{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:Kc,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,o=n.charCode;if(this.condition_(t)&&(o=="+".charCodeAt(0)||o=="-".charCodeAt(0))){const r=t.map,s=o=="+".charCodeAt(0)?this.delta_:-this.delta_,a=r.getView();yh(a,s,void 0,this.duration_),n.preventDefault(),e=!0}}return!e}}const M_=w_;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 o=this.points_[e+2]-this.points_[n+2];if(o<1e3/60)return!1;const r=this.points_[e]-this.points_[n],s=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(s,r),this.initialVelocity_=Math.sqrt(r*r+s*s)/o,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}const E_=C_;class S_ extends zr{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(qc,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,o=t.originalEvent;o.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate);let r;if(t.type==tt.WHEEL&&(r=o.deltaY,t0&&o.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(r/=Wd),o.deltaMode===WheelEvent.DOM_DELTA_LINE&&(r*=40)),r===0)return!1;this.lastDelta_=r;const s=Date.now();this.startTime_===void 0&&(this.startTime_=s),(!this.mode_||s-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(r)<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(-r/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=s,!1;this.totalDelta_+=r;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=-Vt(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 I_ extends nn{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=xo),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],o=this.targetPointers[1],r=Math.atan2(o.clientY-n.clientY,o.clientX-n.clientX);if(this.lastAngle_!==void 0){const u=r-this.lastAngle_;this.rotationDelta_+=u,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=u}this.lastAngle_=r;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 z_=I_;class R_ extends nn{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=xo),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],o=this.targetPointers[1],r=n.clientX-o.clientX,s=n.clientY-o.clientY,a=Math.sqrt(r*r+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(),o=this.lastScaleDelta_>1?1:-1;return n.endInteraction(this.duration_,o),!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_=R_;function Qc(i){i=i||{};const t=new Ve,e=new E_(-.005,.05,100);return(i.altShiftDragRotate!==void 0?i.altShiftDragRotate:!0)&&t.push(new f_),(i.doubleClickZoom!==void 0?i.doubleClickZoom:!0)&&t.push(new r_({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 z_),(i.pinchZoom!==void 0?i.pinchZoom:!0)&&t.push(new A_({duration:i.zoomDuration})),(i.keyboard!==void 0?i.keyboard:!0)&&(t.push(new k_),t.push(new M_({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 tg(i){return i[0]>0&&i[1]>0}function P_(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 eg(i){if(i instanceof Os){i.setMapInternal(null);return}i instanceof Js&&i.getLayers().forEach(eg)}function ig(i,t){if(i instanceof Os){i.setMapInternal(t);return}if(i instanceof Js){const e=i.getLayers().getArray();for(let n=0,o=e.length;n<o;++n)ig(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:Wd,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=qe(),this.pixelToCoordinateTransform_=qe(),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||Vc(),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(ge.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(ge.VIEW,this.handleViewChanged_),this.addChangeListener(ge.SIZE,this.handleSizeChanged_),this.addChangeListener(ge.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const n=this;t.view&&!(t.view instanceof en)&&t.view.then(function(o){n.setView(new en(o))}),this.controls.addEventListener(oe.ADD,function(o){o.element.setMap(this)}.bind(this)),this.controls.addEventListener(oe.REMOVE,function(o){o.element.setMap(null)}.bind(this)),this.interactions.addEventListener(oe.ADD,function(o){o.element.setMap(this)}.bind(this)),this.interactions.addEventListener(oe.REMOVE,function(o){o.element.setMap(null)}.bind(this)),this.overlays_.addEventListener(oe.ADD,function(o){this.addOverlayInternal_(o.element)}.bind(this)),this.overlays_.addEventListener(oe.REMOVE,function(o){const r=o.element.getId();r!==void 0&&delete this.overlayIdIndex_[r.toString()],o.element.setMap(null)}.bind(this)),this.controls.forEach(function(o){o.setMap(this)}.bind(this)),this.interactions.forEach(function(o){o.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){ig(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 o=this.getCoordinateFromPixelInternal(t);n=n!==void 0?n:{};const r=n.hitTolerance!==void 0?n.hitTolerance:0,s=n.layerFilter!==void 0?n.layerFilter:Dn,a=n.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(o,this.frameState_,r,a,e,null,s,null)}getFeaturesAtPixel(t,e){const n=[];return this.forEachFeatureAtPixel(t,function(o){n.push(o)},e),n}getAllLayers(){const t=[];function e(n){n.forEach(function(o){o instanceof Js?e(o.getLayers()):t.push(o)})}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 o=e.layerFilter!==void 0?e.layerFilter:Dn,r=e.hitTolerance!==void 0?e.hitTolerance:0,s=e.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,r,s,o,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(ge.TARGET)}getTargetElement(){const t=this.getTarget();return t!==void 0?typeof t=="string"?document.getElementById(t):t:null}getCoordinateFromPixel(t){return To(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(ge.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof Ve){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 o=t[e];if(!o.visible)continue;const r=o.layer.getRenderer();if(r&&!r.ready)return!0;const s=o.layer.getSource();if(s&&s.loading)return!0}return!1}getPixelFromCoordinate(t){const e=Zt(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(ge.SIZE)}getView(){return this.get(ge.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,o){return _v(this.frameState_,t,e,n,o)}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===El.POINTERDOWN||n===tt.WHEEL||n===tt.KEYDOWN){const o=this.getOwnerDocument(),r=this.viewport_.getRootNode?this.viewport_.getRootNode():o,s=e.target;if(this.overlayContainerStopEvent_.contains(s)||!(r===o?o.documentElement:r).contains(s))return}if(t.frameState=this.frameState_,this.dispatchEvent(t)!==!1){const o=this.getInteractions().getArray().slice();for(let r=o.length-1;r>=0;r--){const s=o[r];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 o=this.maxTilesLoading_,r=o;if(t){const s=t.viewHints;if(s[qt.ANIMATING]||s[qt.INTERACTING]){const a=Date.now()-t.time>8;o=a?0:8,r=a?0:2}}e.getTilesLoading()<o&&(e.reprioritize(),e.loadMoreTiles(o,r))}t&&this.renderer_&&!t.animate&&(this.renderComplete_===!0?(this.hasListener(Vi.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(Vi.RENDERCOMPLETE,t),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new Ro(Yi.LOADEND,this,t)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new Ro(Yi.LOADSTART,this,t))));const n=this.postRenderFunctions_;for(let o=0,r=n.length;o<r;++o)n[o](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)Ft(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 gv(this,this.moveTolerance_);for(const o in Mt)this.mapBrowserEventHandler_.addEventListener(Mt[o],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(tt.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(tt.WHEEL,this.boundHandleBrowserEvent_,Zd?{passive:!1}:!1);const e=this.getOwnerDocument().defaultView,n=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.targetChangeHandlerKeys_=[ft(n,tt.KEYDOWN,this.handleBrowserEvent,this),ft(n,tt.KEYPRESS,this.handleBrowserEvent,this),ft(e,tt.RESIZE,this.updateSize,this)]}this.updateSize()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(Ft(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Ft(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=ft(t,yo.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=ft(t,tt.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(Ft),this.layerGroupPropertyListenerKeys_=null);const t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Ki("addlayer",t)),this.layerGroupPropertyListenerKeys_=[ft(t,yo.PROPERTYCHANGE,this.render,this),ft(t,tt.CHANGE,this.render,this),ft(t,"addlayer",this.handleLayerAdd_,this),ft(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 o=t[e].layer;o.hasRenderer()&&o.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){eg(t.layer)}removeOverlay(t){return this.getOverlays().remove(t)}renderFrame_(t){const e=this.getSize(),n=this.getView(),o=this.frameState_;let r=null;if(e!==void 0&&tg(e)&&n&&n.isDef()){const s=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=n.getState();if(r={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:Pl(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:$(this),renderTargets:{}},a.nextCenter&&a.nextResolution){const l=isNaN(a.nextRotation)?a.rotation:a.nextRotation;r.nextExtent=Pl(a.nextCenter,a.nextResolution,l,e)}}this.frameState_=r,this.renderer_.renderFrame(r),r&&(r.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,r.postRenderFunctions),o&&(!this.previousExtent_||!Ll(this.previousExtent_)&&!So(r.extent,this.previousExtent_))&&(this.dispatchEvent(new Ro(Yi.MOVESTART,this,o)),this.previousExtent_=_r(this.previousExtent_)),this.previousExtent_&&!r.viewHints[qt.ANIMATING]&&!r.viewHints[qt.INTERACTING]&&!So(r.extent,this.previousExtent_)&&(this.dispatchEvent(new Ro(Yi.MOVEEND,this,r)),ec(r.extent,this.previousExtent_))),this.dispatchEvent(new Ro(Yi.POSTRENDER,this,r)),this.renderComplete_=this.hasListener(Yi.LOADSTART)||this.hasListener(Yi.LOADEND)||this.hasListener(Vi.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 Ki("removelayer",e)),this.set(ge.LAYERGROUP,t)}setSize(t){this.set(ge.SIZE,t)}setTarget(t){this.set(ge.TARGET,t)}setView(t){if(!t||t instanceof en){this.set(ge.VIEW,t);return}this.set(ge.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),o=t.offsetWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight)-parseFloat(n.borderRightWidth),r=t.offsetHeight-parseFloat(n.borderTopWidth)-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom)-parseFloat(n.borderBottomWidth);!isNaN(o)&&!isNaN(r)&&(e=[o,r],!tg(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[ge.LAYERGROUP]=n,e[ge.TARGET]=i.target,e[ge.VIEW]=i.view instanceof en?i.view:new en;let o;i.controls!==void 0&&(Array.isArray(i.controls)?o=new Ve(i.controls.slice()):(gt(typeof i.controls.getArray=="function",47),o=i.controls));let r;i.interactions!==void 0&&(Array.isArray(i.interactions)?r=new Ve(i.interactions.slice()):(gt(typeof i.interactions.getArray=="function",48),r=i.interactions));let s;return i.overlays!==void 0?Array.isArray(i.overlays)?s=new Ve(i.overlays.slice()):(gt(typeof i.overlays.getArray=="function",49),s=i.overlays):s=new Ve,{controls:o,interactions:r,keyboardEventTarget:t,overlays:s,values:e}}const O_=D_,Eh="units",F_=[1,2,5],Rr=25.4/.28;class N_ extends bo{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+" "+pr,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(Eh,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(Eh)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(Eh,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,o=this.getUnits(),r=o=="degrees"?"degrees":"m";let s=Ys(n,t.resolution,e,r);const a=this.minWidth_*(this.dpi_||Rr)/Rr,l=this.maxWidth_!==void 0?this.maxWidth_*(this.dpi_||Rr)/Rr:void 0;let h=a*s,u="";if(o=="degrees"){const y=ko.degrees;h*=y,h<y/60?(u="\u2033",s*=3600):h<y?(u="\u2032",s*=60):u="\xB0"}else o=="imperial"?h<.9144?(u="in",s/=.0254):h<1609.344?(u="ft",s/=.3048):(u="mi",s/=1609.344):o=="nautical"?(s/=1852,u="NM"):o=="metric"?h<.001?(u="\u03BCm",s*=1e6):h<1?(u="mm",s*=1e3):h<1e3?u="m":(u="km",s/=1e3):o=="us"?h<.9144?(u="in",s*=39.37):h<1609.344?(u="ft",s/=.30480061):(u="mi",s/=1609.3472):gt(!1,33);let d=3*Math.floor(Math.log(a*s)/Math.log(10)),c,g,f,m,p,_;for(;;){f=Math.floor(d/3);const y=Math.pow(10,f);if(c=F_[(d%3+3)%3]*y,g=Math.round(c/s),isNaN(g)){this.element.style.display="none",this.renderedVisible_=!1;return}if(l!==void 0&&g>=l){c=m,g=p,f=_;break}else if(g>=a)break;m=c,p=g,_=f,++d}const v=this.scaleBar_?this.createScaleBar(g,c,u):c.toFixed(f<0?-f:0)+" "+u;this.renderedHTML_!=v&&(this.innerElement_.innerHTML=v,this.renderedHTML_=v),this.renderedWidth_!=g&&(this.innerElement_.style.width=g+"px",this.renderedWidth_=g),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,n){const o=this.getScaleForResolution(),r=o<1?Math.round(1/o).toLocaleString()+" : 1":"1 : "+Math.round(o).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;">`+r+"</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,o,r){const a=(t===0?0:Math.round(o/this.scaleBarSteps_*t*100)/100)+(t===0?"":" "+r),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=Ys(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),e=this.dpi_||Rr,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 Sh 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 Sh(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_&&(Ft(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=ft(t,tt.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?j_(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 j_(i){if(typeof i=="function")return i;{let t;return Array.isArray(i)?t=i:(gt(typeof i.getZIndex=="function",41),t=[i]),function(){return t}}}const Ti=Sh;class ng{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 Th(i,t,e){const n=e?Gt(e.featureProjection):null,o=e?Gt(e.dataProjection):null;let r;if(n&&o&&!Zn(n,o)?r=(t?i.clone():i).transform(t?n:o,t?o:n):r=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};r===i&&(r=i.clone()),r.applyTransform(a)}return r}class B_ extends ng{constructor(){super()}getType(){return"json"}readFeature(t,e){return this.readFeatureFromObject(sa(t),this.getReadOptions(t,e))}readFeatures(t,e){return this.readFeaturesFromObject(sa(t),this.getReadOptions(t,e))}readFeatureFromObject(t,e){return et()}readFeaturesFromObject(t,e){return et()}readGeometry(t,e){return this.readGeometryFromObject(sa(t),this.getReadOptions(t,e))}readGeometryFromObject(t,e){return et()}readProjection(t){return this.readProjectionFromObject(sa(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 sa(i){if(typeof i=="string"){const t=JSON.parse(i);return t||null}else return i!==null?i:null}const W_=B_;function aa(i,t,e,n,o,r,s){let a,l;const h=(e-t)/n;if(h===1)a=t;else if(h===2)a=t,l=o;else if(h!==0){let u=i[t],d=i[t+1],c=0;const g=[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)),g.push(c),u=_,d=v}const f=o*c,m=Xp(g,f);m<0?(l=(f-g[-m-2])/(g[-m-1]-g[-m-2]),a=t+(-m-2)*n):a=t+m*n}s=s>1?s:2,r=r||new Array(s);for(let u=0;u<s;++u)r[u]=a===void 0?NaN:l===void 0?i[a+u]:ki(i[a+u],i[a+n+u],l);return r}function Ih(i,t,e,n,o,r){if(e==t)return null;let s;if(o<i[t+n-1])return r?(s=i.slice(t,t+n),s[n-1]=o,s):null;if(i[e-1]<o)return r?(s=i.slice(e-n,e),s[n-1]=o,s):null;if(o==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;o<i[(c+1)*n-1]?l=c:a=c+1}const h=i[a*n-1];if(o==h)return i.slice((a-1)*n,(a-1)*n+n);const u=i[(a+1)*n-1],d=(o-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(o),s}function Z_(i,t,e,n,o,r,s){if(s)return Ih(i,t,e[e.length-1],n,o,r);let a;if(o<i[n-1])return r?(a=i.slice(0,n),a[n-1]=o,a):null;if(i[i.length-1]<o)return r?(a=i.slice(i.length-n),a[n-1]=o,a):null;for(let l=0,h=e.length;l<h;++l){const u=e[l];if(t!=u){if(o<i[t+n-1])return null;if(o<=i[u-1])return Ih(i,t,u,n,o,!1);t=u}}return null}function og(i,t,e,n){let o=i[t],r=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-o)*(l-o)+(h-r)*(h-r)),o=l,r=h}return s}class la 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 la(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,o){return o<jn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(oh(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,o))}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,Ih(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 aa(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return og(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 la(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 $n=la;class ha 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 o=this.getLayout();const r=t,s=[],a=[];for(let l=0,h=r.length;l<h;++l){const u=r[l];l===0&&(o=u.getLayout()),li(s,u.getFlatCoordinates()),a.push(s.length)}this.setFlatCoordinates(o,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 ha(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,n,o){return o<jn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rh(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,o))}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,Z_(this.flatCoordinates,0,this.ends_,this.stride,t,e,n))}getCoordinates(){return Ir(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(t){return t<0||this.ends_.length<=t?null:new $n(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,o=[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=e[s],h=new $n(t.slice(r,l),n);o.push(h),r=l}return o}getFlatMidpoints(){const t=[],e=this.flatCoordinates;let n=0;const o=this.ends_,r=this.stride;for(let s=0,a=o.length;s<a;++s){const l=o[s],h=aa(e,n,l,r,.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 ha(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 zh=ha;class Rh 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 Rh(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,o){if(o<jn(this.getExtent(),t,e))return o;const r=this.flatCoordinates,s=this.stride;for(let a=0,l=r.length;a<l;a+=s){const h=Fn(t,e,r[a],r[a+1]);if(h<o){o=h;for(let u=0;u<s;++u)n[u]=r[a+u];n.length=s}}return o}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,o=[];for(let r=0,s=t.length;r<s;r+=n){const a=new ni(t.slice(r,r+n),e);o.push(a)}return o}getType(){return"MultiPoint"}intersectsExtent(t){const e=this.flatCoordinates,n=this.stride;for(let o=0,r=e.length;o<r;o+=n){const s=e[o],a=e[o+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 Ar=Rh;function rg(i,t,e,n){const o=[];let r=Ge();for(let s=0,a=e.length;s<a;++s){const l=e[s];r=zl(i,t,l[0],n),o.push((r[0]+r[2])/2,(r[1]+r[3])/2),t=l[l.length-1]}return o}class ua 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 o=this.getLayout();const r=t,s=[],a=[];for(let l=0,h=r.length;l<h;++l){const u=r[l];l===0&&(o=u.getLayout());const d=s.length,c=u.getEnds();for(let g=0,f=c.length;g<f;++g)c[g]+=d;li(s,u.getFlatCoordinates()),a.push(c)}e=o,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 o=0,r=e.length;o<r;++o)e[o]+=n}this.endss_.push(e),this.changed()}clone(){const t=this.endss_.length,e=new Array(t);for(let o=0;o<t;++o)e[o]=this.endss_[o].slice();const n=new ua(this.flatCoordinates.slice(),this.layout,e);return n.applyProperties(this),n}closestPointXY(t,e,n,o){return o<jn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Rv(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,o))}containsXY(t,e){return Gv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return Fv(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=rg(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 Ar(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;Zv(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 ua(e,"XY",n)}getPolygon(t){if(t<0||this.endss_.length<=t)return null;let e;if(t===0)e=0;else{const r=this.endss_[t-1];e=r[r.length-1]}const n=this.endss_[t].slice(),o=n[n.length-1];if(e!==0)for(let r=0,s=n.length;r<s;++r)n[r]-=e;return new Vn(this.flatCoordinates.slice(e,o),this.layout,n)}getPolygons(){const t=this.layout,e=this.flatCoordinates,n=this.endss_,o=[];let r=0;for(let s=0,a=n.length;s<a;++s){const l=n[s].slice(),h=l[l.length-1];if(r!==0)for(let d=0,c=l.length;d<c;++d)l[d]-=r;const u=new Vn(e.slice(r,h),t,l);o.push(u),r=h}return o}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=Pv(this.flatCoordinates,0,t,this.stride,this.endss_);if(n.length===0)this.flatCoordinates.length=0;else{const o=n[n.length-1];this.flatCoordinates.length=o.length===0?0:o[o.length-1]}this.changed()}}const Ah=ua;class da extends Pc{constructor(t){super(),this.geometries_=t||null,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(Ft),this.changeEventsKeys_.length=0}listenGeometriesChange_(){if(!!this.geometries_)for(let t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push(ft(this.geometries_[t],tt.CHANGE,this.changed,this))}clone(){const t=new da(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t}closestPointXY(t,e,n,o){if(o<jn(this.getExtent(),t,e))return o;const r=this.geometries_;for(let s=0,a=r.length;s<a;++s)o=r[s].closestPointXY(t,e,n,o);return o}containsXY(t,e){const n=this.geometries_;for(let o=0,r=n.length;o<r;++o)if(n[o].containsXY(t,e))return!0;return!1}computeExtent(t){_r(t);const e=this.geometries_;for(let n=0,o=e.length;n<o;++n)ic(t,e[n].getExtent());return t}getGeometries(){return sg(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let t=[];const e=this.geometries_;for(let n=0,o=e.length;n<o;++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 o=!1;for(let r=0,s=n.length;r<s;++r){const a=n[r],l=a.getSimplifiedGeometry(t);e.push(l),l!==a&&(o=!0)}if(o){const r=new da(null);return r.setGeometriesArray(e),r}else return this.simplifiedGeometryMaxMinSquaredTolerance=t,this}getType(){return"GeometryCollection"}intersectsExtent(t){const e=this.geometries_;for(let n=0,o=e.length;n<o;++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 o=0,r=n.length;o<r;++o)n[o].rotate(t,e);this.changed()}scale(t,e,n){n||(n=qi(this.getExtent()));const o=this.geometries_;for(let r=0,s=o.length;r<s;++r)o[r].scale(t,e,n);this.changed()}setGeometries(t){this.setGeometriesArray(sg(t))}setGeometriesArray(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()}applyTransform(t){const e=this.geometries_;for(let n=0,o=e.length;n<o;++n)e[n].applyTransform(t);this.changed()}translate(t,e){const n=this.geometries_;for(let o=0,r=n.length;o<r;++o)n[o].translate(t,e);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function sg(i){const t=[];for(let e=0,n=i.length;e<n;++e)t.push(i[e].clone());return t}const Y_=da;class X_ extends W_{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 o=Ph(n.geometry,e),r=new Ti;return this.geometryName_?r.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in n!==void 0&&r.setGeometryName(n.geometry_name),r.setGeometry(o),"id"in n&&r.setId(n.id),n.properties&&r.setProperties(n.properties,!0),r}readFeaturesFromObject(t,e){const n=t;let o=null;if(n.type==="FeatureCollection"){const r=t;o=[];const s=r.features;for(let a=0,l=s.length;a<l;++a)o.push(this.readFeatureFromObject(s[a],e))}else o=[this.readFeatureFromObject(t,e)];return o}readGeometryFromObject(t,e){return Ph(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):gt(!1,36):n=this.dataProjection,n}writeFeatureObject(t,e){e=this.adaptOptions(e);const n={type:"Feature",geometry:null,properties:null},o=t.getId();if(o!==void 0&&(n.id=o),!t.hasProperties())return n;const r=t.getProperties(),s=t.getGeometry();return s&&(n.geometry=Dh(s,e),delete r[t.getGeometryName()]),On(r)||(n.properties=r),n}writeFeaturesObject(t,e){e=this.adaptOptions(e);const n=[];for(let o=0,r=t.length;o<r;++o)n.push(this.writeFeatureObject(t[o],e));return{type:"FeatureCollection",features:n}}writeGeometryObject(t,e){return Dh(t,this.adaptOptions(e))}}function Ph(i,t){if(!i)return null;let e;switch(i.type){case"Point":{e=V_(i);break}case"LineString":{e=q_(i);break}case"Polygon":{e=J_(i);break}case"MultiPoint":{e=H_(i);break}case"MultiLineString":{e=$_(i);break}case"MultiPolygon":{e=K_(i);break}case"GeometryCollection":{e=U_(i);break}default:throw new Error("Unsupported GeoJSON type: "+i.type)}return Th(e,!1,t)}function U_(i,t){const e=i.geometries.map(function(n){return Ph(n,t)});return new Y_(e)}function V_(i){return new ni(i.coordinates)}function q_(i){return new $n(i.coordinates)}function $_(i){return new zh(i.coordinates)}function H_(i){return new Ar(i.coordinates)}function K_(i){return new Ah(i.coordinates)}function J_(i){return new Vn(i.coordinates)}function Dh(i,t){i=Th(i,!0,t);const e=i.getType();let n;switch(e){case"Point":{n=o1(i);break}case"LineString":{n=t1(i);break}case"Polygon":{n=r1(i,t);break}case"MultiPoint":{n=i1(i);break}case"MultiLineString":{n=e1(i);break}case"MultiPolygon":{n=n1(i,t);break}case"GeometryCollection":{n=Q_(i,t);break}case"Circle":{n={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+e)}return n}function Q_(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 t1(i,t){return{type:"LineString",coordinates:i.getCoordinates()}}function e1(i,t){return{type:"MultiLineString",coordinates:i.getCoordinates()}}function i1(i,t){return{type:"MultiPoint",coordinates:i.getCoordinates()}}function n1(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 r1(i,t){let e;return t&&(e=t.rightHanded),{type:"Polygon",coordinates:i.getCoordinates(e)}}const Hn=X_;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 fe=Lh,Qt={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class Oh{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 Oh({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 ag=Oh;function lg(i,t,e){const n=i;let o=!0,r=!1,s=!1;const a=[Rs(n,tt.LOAD,function(){s=!0,r||t()})];return n.src&&n0?(r=!0,n.decode().then(function(){o&&t()}).catch(function(l){o&&(s?t():e())})):a.push(Rs(n,tt.ERROR,e)),function(){o=!1,a.forEach(Ft)}}let Pr=null;class s1 extends zs{constructor(t,e,n,o,r,s){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=o,this.canvas_={},this.color_=s,this.unlisten_=null,this.imageState_=r,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){Pr||(Pr=Ae(1,1)),Pr.drawImage(this.image_,0,0);try{Pr.getImageData(0,0,1,1),this.tainted_=!1}catch{Pr=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=Ae(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_=lg(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 o=n.getContext("2d");o.scale(t,t),o.drawImage(e,0,0),o.globalCompositeOperation="multiply",o.fillStyle=ql(this.color_),o.fillRect(0,0,n.width/t,n.height/t),o.globalCompositeOperation="destination-in",o.drawImage(e,0,0),this.canvas_[t]=n}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function a1(i,t,e,n,o,r){let s=qs.get(t,n,r);return s||(s=new s1(i,t,e,n,o,r),qs.set(t,n,r,s)),s}class Fh extends ag{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,n=t.rotation!==void 0?t.rotation:0,o=t.scale!==void 0?t.scale:1,r=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:n,scale:o,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:r,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;gt(!(a!==void 0&&s),4),gt(!s||s&&this.imgSize_,5),(a===void 0||a.length===0)&&s&&(a=s.src||$(s)),gt(a!==void 0&&a.length>0,6);const l=t.src!==void 0?Qt.IDLE:Qt.LOADED;this.color_=t.color!==void 0?kr(t.color):null,this.iconImage_=a1(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 Fh({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 o=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!o)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=o[0]),this.anchorYUnits_=="fraction"&&(t[1]*=o[1])}if(this.anchorOrigin_!="top-left"){if(!o)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+o[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+o[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 ca=Fh;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 ag{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_,o=Ae(n.size*t,n.size*t);this.draw_(n,o,t),e=o.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 o=this.radius_,r=this.radius2_===void 0?o:this.radius2_;if(o<r){const w=o;o=r,r=w}const s=this.radius2_===void 0?this.points_:this.points_*2,a=2*Math.PI/s,l=r*Math.sin(a),h=Math.sqrt(r*r-l*l),u=o-h,d=Math.sqrt(l*l+u*u),c=d/l;if(t==="miter"&&c<=n)return c*e;const g=e/2/c,f=e/2*(u/d),p=Math.sqrt((o+g)*(o+g)+f*f)-o;if(this.radius2_===void 0||t==="bevel")return p*2;const _=o*Math.sin(a),v=Math.sqrt(o*o-_*_),y=r-v,k=Math.sqrt(_*_+y*y)/_;if(k<=n){const w=k*e/2-r-o;return 2*Math.max(p,w)}return p*2}createRenderOptions(){let t=Io,e=0,n=null,o=0,r,s=0;this.stroke_&&(r=this.stroke_.getColor(),r===null&&(r=Er),r=di(r),s=this.stroke_.getWidth(),s===void 0&&(s=Tr),n=this.stroke_.getLineDash(),o=this.stroke_.getLineDashOffset(),t=this.stroke_.getLineJoin(),t===void 0&&(t=Io),e=this.stroke_.getMiterLimit(),e===void 0&&(e=Cr));const a=this.calculateLineJoinSize_(t,s,e),l=Math.max(this.radius_,this.radius2_||0),h=Math.ceil(2*l+a);return{strokeStyle:r,strokeWidth:s,size:h,lineDash:n,lineDashOffset:o,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 o=this.fill_.getColor();o===null&&(o=Ci),e.fillStyle=di(o),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=kr(e)),e===null?n=1:Array.isArray(e)&&(n=e.length===4?e[3]:1),n===0){const o=Ae(t.size,t.size);this.hitDetectionCanvas_=o.canvas,this.drawHitDetectionCanvas_(t,o)}}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 o=this.radius2_===void 0?n:this.radius2_;this.radius2_!==void 0&&(e*=2);const r=this.angle_-Math.PI/2,s=2*Math.PI/e;for(let a=0;a<e;a++){const l=r+a*s,h=a%2===0?n:o;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=Ci,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 Kn=jh;class on{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=ug,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 on({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_=ug,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function l1(i){let t;if(typeof i=="function")t=i;else{let e;Array.isArray(i)?e=i:(gt(typeof i.getZIndex=="function",41),e=[i]),t=function(){return e}}return t}let Bh=null;function h1(i,t){if(!Bh){const e=new fe({color:"rgba(255,255,255,0.4)"}),n=new ke({color:"#3399CC",width:1.25});Bh=[new on({image:new Kn({fill:e,stroke:n,radius:5}),fill:e,stroke:n})]}return Bh}function hg(){const i={},t=[255,255,255,1],e=[0,153,255,1],n=3;return i.Polygon=[new on({fill:new fe({color:[255,255,255,.5]})})],i.MultiPolygon=i.Polygon,i.LineString=[new on({stroke:new ke({color:t,width:n+2})}),new on({stroke:new ke({color:e,width:n})})],i.MultiLineString=i.LineString,i.Circle=i.Polygon.concat(i.LineString),i.Point=[new on({image:new Kn({radius:n*2,fill:new fe({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 ug(i){return i.getGeometry()}const le=on,u1="#333";class Wh{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 fe({color:u1}),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 Wh({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 dg=Wh;function d1(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Zh={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Zh.read=function(i,t,e,n,o){var r,s,a=o*8-n-1,l=(1<<a)-1,h=l>>1,u=-7,d=e?o-1:0,c=e?-1:1,g=i[t+d];for(d+=c,r=g&(1<<-u)-1,g>>=-u,u+=a;u>0;r=r*256+i[t+d],d+=c,u-=8);for(s=r&(1<<-u)-1,r>>=-u,u+=n;u>0;s=s*256+i[t+d],d+=c,u-=8);if(r===0)r=1-h;else{if(r===l)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,n),r=r-h}return(g?-1:1)*s*Math.pow(2,r-n)},Zh.write=function(i,t,e,n,o,r){var s,a,l,h=r*8-o-1,u=(1<<h)-1,d=u>>1,c=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:r-1,f=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,o),s=s+d):(a=t*Math.pow(2,d-1)*Math.pow(2,o),s=0));o>=8;i[e+g]=a&255,g+=f,a/=256,o-=8);for(s=s<<o|a,h+=o;h>0;i[e+g]=s&255,g+=f,s/=256,h-=8);i[e+g-f]|=m*128};var c1=Tt,fa=Zh;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 Yh=(1<<16)*(1<<16),cg=1/Yh,g1=12,gg=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(),o=n>>3,r=this.pos;this.type=n&7,i(o,t,this),this.pos===r&&this.skip(n)}return t},readMessage:function(i,t){return this.readFields(i,t,this.readVarint()+this.pos)},readFixed32:function(){var i=ma(this.buf,this.pos);return this.pos+=4,i},readSFixed32:function(){var i=mg(this.buf,this.pos);return this.pos+=4,i},readFixed64:function(){var i=ma(this.buf,this.pos)+ma(this.buf,this.pos+4)*Yh;return this.pos+=8,i},readSFixed64:function(){var i=ma(this.buf,this.pos)+mg(this.buf,this.pos+4)*Yh;return this.pos+=8,i},readFloat:function(){var i=fa.read(this.buf,this.pos,!0,23,4);return this.pos+=4,i},readDouble:function(){var i=fa.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,f1(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&&gg?T1(this.buf,t,i):S1(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=Ii(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=Ii(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=Ii(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=Ii(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=Ii(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=Ii(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=Ii(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=Ii(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=Ii(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),Lo(this.buf,i,this.pos),this.pos+=4},writeSFixed32:function(i){this.realloc(4),Lo(this.buf,i,this.pos),this.pos+=4},writeFixed64:function(i){this.realloc(8),Lo(this.buf,i&-1,this.pos),Lo(this.buf,Math.floor(i*cg),this.pos+4),this.pos+=8},writeSFixed64:function(i){this.realloc(8),Lo(this.buf,i&-1,this.pos),Lo(this.buf,Math.floor(i*cg),this.pos+4),this.pos+=8},writeVarint:function(i){if(i=+i||0,i>268435455||i<0){m1(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&&fg(t,e,this),this.pos=t-1,this.writeVarint(e),this.pos+=e},writeFloat:function(i){this.realloc(4),fa.write(this.buf,i,this.pos,!0,23,4),this.pos+=4},writeDouble:function(i){this.realloc(8),fa.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&&fg(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,_1,t)},writePackedSVarint:function(i,t){t.length&&this.writeMessage(i,y1,t)},writePackedBoolean:function(i,t){t.length&&this.writeMessage(i,k1,t)},writePackedFloat:function(i,t){t.length&&this.writeMessage(i,x1,t)},writePackedDouble:function(i,t){t.length&&this.writeMessage(i,b1,t)},writePackedFixed32:function(i,t){t.length&&this.writeMessage(i,w1,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,E1,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 f1(i,t,e){var n=e.buf,o,r;if(r=n[e.pos++],o=(r&112)>>4,r<128||(r=n[e.pos++],o|=(r&127)<<3,r<128)||(r=n[e.pos++],o|=(r&127)<<10,r<128)||(r=n[e.pos++],o|=(r&127)<<17,r<128)||(r=n[e.pos++],o|=(r&127)<<24,r<128)||(r=n[e.pos++],o|=(r&1)<<31,r<128))return Do(i,o,t);throw new Error("Expected varint not more than 10 bytes")}function Ii(i){return i.type===Tt.Bytes?i.readVarint()+i.pos:i.pos+1}function Do(i,t,e){return e?t*4294967296+(i>>>0):(t>>>0)*4294967296+(i>>>0)}function m1(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),p1(e,n,t),v1(n,t)}function p1(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 v1(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 fg(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 o=e.pos-1;o>=i;o--)e.buf[o+n]=e.buf[o]}function _1(i,t){for(var e=0;e<i.length;e++)t.writeVarint(i[e])}function y1(i,t){for(var e=0;e<i.length;e++)t.writeSVarint(i[e])}function x1(i,t){for(var e=0;e<i.length;e++)t.writeFloat(i[e])}function b1(i,t){for(var e=0;e<i.length;e++)t.writeDouble(i[e])}function k1(i,t){for(var e=0;e<i.length;e++)t.writeBoolean(i[e])}function w1(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 E1(i,t){for(var e=0;e<i.length;e++)t.writeSFixed64(i[e])}function ma(i,t){return(i[t]|i[t+1]<<8|i[t+2]<<16)+i[t+3]*16777216}function Lo(i,t,e){i[e]=t,i[e+1]=t>>>8,i[e+2]=t>>>16,i[e+3]=t>>>24}function mg(i,t){return(i[t]|i[t+1]<<8|i[t+2]<<16)+(i[t+3]<<24)}function S1(i,t,e){for(var n="",o=t;o<e;){var r=i[o],s=null,a=r>239?4:r>223?3:r>191?2:1;if(o+a>e)break;var l,h,u;a===1?r<128&&(s=r):a===2?(l=i[o+1],(l&192)===128&&(s=(r&31)<<6|l&63,s<=127&&(s=null))):a===3?(l=i[o+1],h=i[o+2],(l&192)===128&&(h&192)===128&&(s=(r&15)<<12|(l&63)<<6|h&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):a===4&&(l=i[o+1],h=i[o+2],u=i[o+3],(l&192)===128&&(h&192)===128&&(u&192)===128&&(s=(r&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),o+=a}return n}function T1(i,t,e){return gg.decode(i.subarray(t,e))}function I1(i,t,e){for(var n=0,o,r;n<t.length;n++){if(o=t.charCodeAt(n),o>55295&&o<57344)if(r)if(o<56320){i[e++]=239,i[e++]=191,i[e++]=189,r=o;continue}else o=r-55296<<10|o-56320|65536,r=null;else{o>56319||n+1===t.length?(i[e++]=239,i[e++]=191,i[e++]=189):r=o;continue}else r&&(i[e++]=239,i[e++]=191,i[e++]=189,r=null);o<128?i[e++]=o:(o<2048?i[e++]=o>>6|192:(o<65536?i[e++]=o>>12|224:(i[e++]=o>>18|240,i[e++]=o>>12&63|128),i[e++]=o>>6&63|128),i[e++]=o&63|128)}return e}class pa 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 pa(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,o){const r=this.flatCoordinates,s=t-r[0],a=e-r[1],l=s*s+a*a;if(l<o){if(l===0)for(let h=0;h<this.stride;++h)n[h]=r[h];else{const h=this.getRadius()/Math.sqrt(l);n[0]=r[0]+h*s,n[1]=r[1]+h*a;for(let u=2;u<this.stride;++u)n[u]=r[u]}return n.length=this.stride,l}else return o}containsXY(t,e){const n=this.flatCoordinates,o=t-n[0],r=e-n[1];return o*o+r*r<=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($t(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],o=t.slice();o[e]=o[0]+n;for(let r=1;r<e;++r)o[e+r]=t[r];this.setFlatCoordinates(this.layout,o),this.changed()}setCenterAndRadius(t,e,n){this.setLayout(n,t,0),this.flatCoordinates||(this.flatCoordinates=[]);const o=this.flatCoordinates;let r=Lc(o,0,t,this.stride);o[r++]=o[0]+e;for(let s=1,a=this.stride;s<a;++s)o[r++]=o[s];o.length=r,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(),o=this.getStride();this.setCenter(nh(n,0,n.length,o,t,e,n)),this.changed()}translate(t,e){const n=this.getCenter(),o=this.getStride();this.setCenter(Rc(n,0,n.length,o,t,e,n)),this.changed()}}pa.prototype.transform;const z1=pa,pg=qe();class Dr{constructor(t,e,n,o,r){this.styleFunction,this.extent_,this.id_=r,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=n,this.properties_=o}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_=this.type_==="Point"?yr(this.flatCoordinates_):zl(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=qi(this.getExtent());this.flatInteriorPoints_=gh(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=rg(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_=aa(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 o=0,r=n.length;o<r;++o){const s=n[o],a=aa(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 o=Ue(n)/Ue(e);Mi(pg,n[0],n[3],o,-o,0,0,0),Ji(this.flatCoordinates_,0,this.flatCoordinates_.length,2,pg,this.flatCoordinates_)}}getEnds(){return this.ends_}}Dr.prototype.getEndss=Dr.prototype.getEnds,Dr.prototype.getFlatCoordinates=Dr.prototype.getOrientedFlatCoordinates;const Xh=Dr;class R1 extends ng{constructor(t){super(),t=t||{},this.dataProjection=new Fs({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,o){t.pos=e.geometry;const r=t.readVarint()+t.pos;let s=1,a=0,l=0,h=0,u=0,d=0;for(;t.pos<r;){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&&(o.push(u),d=u),n.push(l,h),u+=2):s===7?u>d&&(n.push(n[d],n[d+1]),u+=2):gt(!1,59)}u>d&&(o.push(u),d=u)}createFeature_(t,e,n){const o=e.type;if(o===0)return null;let r;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(o,h.length);if(this.featureClass_===Xh)r=new this.featureClass_(u,l,h,s,a),r.transform(n.dataProjection);else{let d;if(u=="Polygon"){const f=Yv(l,h);d=f.length>1?new Ah(l,"XY",f):new Vn(l,"XY",h)}else d=u==="Point"?new ni(l,"XY"):u==="LineString"?new $n(l,"XY"):u==="MultiPoint"?new Ar(l,"XY"):u==="MultiLineString"?new zh(l,"XY",h):null;const c=this.featureClass_;r=new c,this.geometryName_&&r.setGeometryName(this.geometryName_);const g=Th(d,!1,n);r.setGeometry(g),a!==void 0&&r.setId(a),r.setProperties(s,!0)}return r}getType(){return"arraybuffer"}readFeatures(t,e){const n=this.layers_;e=this.adaptOptions(e);const o=Gt(e.dataProjection);o.setWorldExtent(e.extent),e.dataProjection=o;const r=new c1(t),s=r.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;o.setExtent(u);for(let d=0,c=h.length;d<c;++d){const g=L1(r,h,d),f=this.createFeature_(r,g,e);f!==null&&a.push(f)}}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:[]},o=e.readVarint()+e.pos;e.readFields(P1,n,o),n.length=n.features.length,n.length&&(t[n.name]=n)}}function P1(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 o=e.readVarint()+e.pos;for(;e.pos<o;)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 o=t.layer.keys[e.readVarint()],r=t.layer.values[e.readVarint()];t.properties[o]=r}}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,o={layer:t,type:0,properties:{}};return i.readFields(D1,o,n),o}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 F1=R1;function N1(i,t,e,n,o){vg(i,t,e||0,n||i.length-1,o||G1)}function vg(i,t,e,n,o){for(;n>e;){if(n-e>600){var r=n-e+1,s=t-e+1,a=Math.log(r),l=.5*Math.exp(2*a/3),h=.5*Math.sqrt(a*l*(r-l)/r)*(s-r/2<0?-1:1),u=Math.max(e,Math.floor(t-s*l/r+h)),d=Math.min(n,Math.floor(t+(r-s)*l/r+h));vg(i,t,u,d,o)}var c=i[t],g=e,f=n;for(Lr(i,e,t),o(i[n],c)>0&&Lr(i,e,n);g<f;){for(Lr(i,g,f),g++,f--;o(i[g],c)<0;)g++;for(;o(i[f],c)>0;)f--}o(i[e],c)===0?Lr(i,e,f):(f++,Lr(i,f,n)),f<=t&&(e=f+1),t<=f&&(n=f-1)}}function Lr(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 _g{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 o=this.toBBox,r=[];for(;e;){for(let s=0;s<e.children.length;s++){const a=e.children[s],l=e.leaf?o(a):a;_a(t,l)&&(e.leaf?n.push(a):Vh(t,l)?this._all(a,n):r.push(a))}e=r.pop()}return n}collides(t){let e=this.data;if(!_a(t,e))return!1;const n=[];for(;e;){for(let o=0;o<e.children.length;o++){const r=e.children[o],s=e.leaf?this.toBBox(r):r;if(_a(t,s)){if(e.leaf||Vh(t,s))return!0;n.push(r)}}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=Fo([]),this}remove(t,e){if(!t)return this;let n=this.data;const o=this.toBBox(t),r=[],s=[];let a,l,h;for(;n||r.length;){if(n||(n=r.pop(),l=r[r.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),r.push(n),this._condense(r),this}!h&&!n.leaf&&Vh(n,o)?(r.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,o){const r=n-e+1;let s=this._maxEntries,a;if(r<=s)return a=Fo(t.slice(e,n+1)),Oo(a,this.toBBox),a;o||(o=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/Math.pow(s,o-1))),a=Fo([]),a.leaf=!1,a.height=o;const l=Math.ceil(r/s),h=l*Math.ceil(Math.sqrt(s));yg(t,e,n,h,this.compareMinX);for(let u=e;u<=n;u+=h){const d=Math.min(u+h-1,n);yg(t,u,d,l,this.compareMinY);for(let c=u;c<=d;c+=l){const g=Math.min(c+l-1,d);a.children.push(this._build(t,c,g,o-1))}}return Oo(a,this.toBBox),a}_chooseSubtree(t,e,n,o){for(;o.push(e),!(e.leaf||o.length-1===n);){let r=1/0,s=1/0,a;for(let l=0;l<e.children.length;l++){const h=e.children[l],u=Uh(h),d=Z1(t,h)-u;d<s?(s=d,r=u<r?u:r,a=h):d===s&&u<r&&(r=u,a=h)}e=a||e.children[0]}return e}_insert(t,e,n){const o=n?t:this.toBBox(t),r=[],s=this._chooseSubtree(o,this.data,e,r);for(s.children.push(t),Fr(s,o);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(o,r,e)}_split(t,e){const n=t[e],o=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,o);const s=this._chooseSplitIndex(n,r,o),a=Fo(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,Oo(n,this.toBBox),Oo(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this.data=Fo([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Oo(this.data,this.toBBox)}_chooseSplitIndex(t,e,n){let o,r=1/0,s=1/0;for(let a=e;a<=n-e;a++){const l=Or(t,0,a,this.toBBox),h=Or(t,a,n,this.toBBox),u=Y1(l,h),d=Uh(l)+Uh(h);u<r?(r=u,o=a,s=d<s?d:s):u===r&&d<s&&(s=d,o=a)}return o||n-e}_chooseSplitAxis(t,e,n){const o=t.leaf?this.compareMinX:B1,r=t.leaf?this.compareMinY:W1,s=this._allDistMargin(t,e,n,o),a=this._allDistMargin(t,e,n,r);s<a&&t.children.sort(o)}_allDistMargin(t,e,n,o){t.children.sort(o);const r=this.toBBox,s=Or(t,0,e,r),a=Or(t,n-e,n,r);let l=va(s)+va(a);for(let h=e;h<n-e;h++){const u=t.children[h];Fr(s,t.leaf?r(u):u),l+=va(s)}for(let h=n-e-1;h>=e;h--){const u=t.children[h];Fr(a,t.leaf?r(u):u),l+=va(a)}return l}_adjustParentBBoxes(t,e,n){for(let o=n;o>=0;o--)Fr(e[o],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():Oo(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 Oo(i,t){Or(i,0,i.children.length,t,i)}function Or(i,t,e,n,o){o||(o=Fo(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let r=t;r<e;r++){const s=i.children[r];Fr(o,i.leaf?n(s):s)}return o}function Fr(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 W1(i,t){return i.minY-t.minY}function Uh(i){return(i.maxX-i.minX)*(i.maxY-i.minY)}function va(i){return i.maxX-i.minX+(i.maxY-i.minY)}function Z1(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 Y1(i,t){const e=Math.max(i.minX,t.minX),n=Math.max(i.minY,t.minY),o=Math.min(i.maxX,t.maxX),r=Math.min(i.maxY,t.maxY);return Math.max(0,o-e)*Math.max(0,r-n)}function Vh(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 Fo(i){return{children:i,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function yg(i,t,e,n,o){const r=[t,e];for(;r.length;){if(e=r.pop(),t=r.pop(),e-t<=n)continue;const s=t+Math.ceil((e-t)/n/2)*n;N1(i,s,t,e,o),r.push(t,s,s,e)}}function xg(i){return new le({fill:Nr(i,""),stroke:Gr(i,""),text:X1(i),image:U1(i)})}function Nr(i,t){const e=i[t+"fill-color"];if(!!e)return new fe({color:e})}function Gr(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 dg({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:Nr(i,"text-"),backgroundFill:Nr(i,"text-background-"),stroke:Gr(i,"text-"),backgroundStroke:Gr(i,"text-background-")}):void 0}function U1(i){const t=i["icon-src"],e=i["icon-img"];if(t||e)return new ca({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 r="shape-";return new ga({points:n,fill:Nr(i,r),stroke:Gr(i,r),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 o=i["circle-radius"];if(o){const r="circle-";return new Kn({radius:o,fill:Nr(i,r),stroke:Gr(i,r),displacement:i["circle-displacement"],scale:i["circle-scale"],rotation:i["circle-rotation"],rotateWithView:i["circle-rotate-with-view"],declutterMode:i["circle-declutter-mode"]})}}const bg={RENDER_ORDER:"renderOrder"};class V1 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(bg.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 _g(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(bg.RENDER_ORDER,t)}setStyle(t){let e;if(t===void 0)e=h1;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,o=new Array(n);for(let r=0;r<n;++r){const s=t[r];s instanceof le?o[r]=s:o[r]=xg(s)}e=o}else e=xg(t);this.style_=e,this.styleFunction_=t===null?void 0:l1(this.style_),this.changed()}}const kg=V1,jr={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=[jr.FILL],rn=[jr.STROKE],Jn=[jr.BEGIN_PATH],wg=[jr.CLOSE_PATH],Q=jr;class q1{drawCustom(t,e,n,o){}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 Mg=q1;class $1 extends Mg{constructor(t,e,n,o){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=o,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(),o=this.tmpCoordinate_,r=this.coordinates;let s=r.length;for(let a=0,l=t.length;a<l;a+=e)o[0]=t[a],o[1]=t[a+1],Gs(n,o)&&(r[s++]=o[0],r[s++]=o[1]);return s}appendFlatLineCoordinates(t,e,n,o,r,s){const a=this.coordinates;let l=a.length;const h=this.getBufferedMaxExtent();s&&(e+=o);let u=t[e],d=t[e+1];const c=this.tmpCoordinate_;let g=!0,f,m,p;for(f=e+o;f<n;f+=o)c[0]=t[f],c[1]=t[f+1],p=Il(h,c),p!==m?(g&&(a[l++]=u,a[l++]=d,g=!1),a[l++]=c[0],a[l++]=c[1]):p===ne.INTERSECTING?(a[l++]=c[0],a[l++]=c[1],g=!1):g=!0,u=c[0],d=c[1],m=p;return(r&&g||f===e+o)&&(a[l++]=u,a[l++]=d),l}drawCustomCoordinates_(t,e,n,o,r){for(let s=0,a=n.length;s<a;++s){const l=n[s],h=this.appendFlatLineCoordinates(t,e,l,o,!1,!1);r.push(h),e=l}return e}drawCustom(t,e,n,o){this.beginGeometry(t,e);const r=t.getType(),s=t.getStride(),a=this.coordinates.length;let l,h,u,d,c;switch(r){case"MultiPolygon":l=t.getOrientedFlatCoordinates(),d=[];const g=t.getEndss();c=0;for(let f=0,m=g.length;f<m;++f){const p=[];c=this.drawCustomCoordinates_(l,c,g[f],s,p),d.push(p)}this.instructions.push([Q.CUSTOM,a,d,t,n,uh]),this.hitDetectionInstructions.push([Q.CUSTOM,a,d,t,o||n,uh]);break;case"Polygon":case"MultiLineString":u=[],l=r=="Polygon"?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),c=this.drawCustomCoordinates_(l,0,t.getEnds(),s,u),this.instructions.push([Q.CUSTOM,a,u,t,n,Ir]),this.hitDetectionInstructions.push([Q.CUSTOM,a,u,t,o||n,Ir]);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,o||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,o||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,o||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 o,r,s=-1;for(e=0;e<n;++e)o=t[e],r=o[0],r==Q.END_GEOMETRY?s=e:r==Q.BEGIN_GEOMETRY&&(o[2]=e,Up(this.hitDetectionInstructions,s,e),s=-1)}setFillStrokeStyle(t,e){const n=this.state;if(t){const o=t.getColor();n.fillStyle=di(o||Ci)}else n.fillStyle=void 0;if(e){const o=e.getColor();n.strokeStyle=di(o||Er);const r=e.getLineCap();n.lineCap=r!==void 0?r:$s;const s=e.getLineDash();n.lineDash=s?s.slice():wr;const a=e.getLineDashOffset();n.lineDashOffset=a||Mr;const l=e.getLineJoin();n.lineJoin=l!==void 0?l:Io;const h=e.getWidth();n.lineWidth=h!==void 0?h:Tr;const u=e.getMiterLimit();n.miterLimit=u!==void 0?u:Cr,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,o=t.lineCap,r=t.lineDash,s=t.lineDashOffset,a=t.lineJoin,l=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=o||r!=t.currentLineDash&&!Zi(t.currentLineDash,r)||t.currentLineDashOffset!=s||t.currentLineJoin!=a||t.currentLineWidth!=l||t.currentMiterLimit!=h)&&(n!==void 0&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=o,t.currentLineDash=r,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 Br=$1;class H1 extends Br{constructor(t,e,n,o){super(t,e,n,o),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(),o=t.getStride(),r=this.coordinates.length,s=this.appendFlatPointCoordinates(n,o);this.instructions.push([Q.DRAW_IMAGE,r,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,r,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(),o=t.getStride(),r=this.coordinates.length,s=this.appendFlatPointCoordinates(n,o);this.instructions.push([Q.DRAW_IMAGE,r,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,r,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(),o=t.getSize(),r=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_=o[1],this.opacity_=t.getOpacity(),this.originX_=r[0],this.originY_=r[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=o[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const K1=H1;class J1 extends Br{constructor(t,e,n,o){super(t,e,n,o)}drawFlatCoordinates_(t,e,n,o){const r=this.coordinates.length,s=this.appendFlatLineCoordinates(t,e,n,o,!1,!1),a=[Q.MOVE_TO_LINE_TO,r,s];return this.instructions.push(a),this.hitDetectionInstructions.push(a),n}drawLineString(t,e){const n=this.state,o=n.strokeStyle,r=n.lineWidth;if(o===void 0||r===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,wr,Mr],Jn);const s=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(s,0,s.length,a),this.hitDetectionInstructions.push(rn),this.endGeometry(e)}drawMultiLineString(t,e){const n=this.state,o=n.strokeStyle,r=n.lineWidth;if(o===void 0||r===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(rn),this.endGeometry(e)}finish(){const t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(rn),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(rn),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(Jn)}}const Q1=J1;class ty extends Br{constructor(t,e,n,o){super(t,e,n,o)}drawFlatCoordinatess_(t,e,n,o){const r=this.state,s=r.fillStyle!==void 0,a=r.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,o,!0,!a),g=[Q.MOVE_TO_LINE_TO,d,c];this.instructions.push(g),this.hitDetectionInstructions.push(g),a&&(this.instructions.push(wg),this.hitDetectionInstructions.push(wg)),e=u}return s&&(this.instructions.push(ya),this.hitDetectionInstructions.push(ya)),a&&(this.instructions.push(rn),this.hitDetectionInstructions.push(rn)),e}drawCircle(t,e){const n=this.state,o=n.fillStyle,r=n.strokeStyle;if(o===void 0&&r===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_FILL_STYLE,Ci]),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(rn),this.hitDetectionInstructions.push(rn)),this.endGeometry(e)}drawPolygon(t,e){const n=this.state,o=n.fillStyle,r=n.strokeStyle;if(o===void 0&&r===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_FILL_STYLE,Ci]),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,o=n.fillStyle,r=n.strokeStyle;if(o===void 0&&r===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_FILL_STYLE,Ci]),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,o=e.length;n<o;++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 Cg=ty;function ey(i,t,e,n,o){let r=e,s=e,a=0,l=0,h=e,u,d,c,g,f,m,p,_,v,y;for(d=e;d<n;d+=o){const x=t[d],k=t[d+1];f!==void 0&&(v=x-f,y=k-m,g=Math.sqrt(v*v+y*y),p!==void 0&&(l+=c,u=Math.acos((p*v+_*y)/(c*g)),u>i&&(l>a&&(a=l,r=h,s=d),l=0,h=d-o)),c=g,p=v,_=y),f=x,m=k}return l+=g,l>a?[h,d]:[r,s]}const Wr={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 Br{constructor(t,e,n,o){super(t,e,n,o),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_,o=this.textStrokeState_,r=this.textState_;if(this.text_===""||!r||!n&&!o)return;const s=this.coordinates;let a=s.length;const l=t.getType();let h=null,u=t.getStride();if(r.placement==="line"&&(l=="LineString"||l=="MultiLineString"||l=="Polygon"||l=="MultiPolygon")){if(!$t(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=r.textAlign;let g=0,f;for(let m=0,p=d.length;m<p;++m){if(c==null){const v=ey(r.maxAngle,h,g,d[m],u);g=v[0],f=v[1]}else f=d[m];for(let v=g;v<f;v+=u)s.push(h[v],h[v+1]);const _=s.length;g=d[m],this.drawChars_(a,_),a=_}this.endGeometry(e)}else{let d=r.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(),r.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)r.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_(),(r.backgroundFill||r.backgroundStroke)&&(this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke),r.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),r.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let g=r.padding;if(g!=Yn&&(r.scale[0]<0||r.scale[1]<0)){let p=r.padding[0],_=r.padding[1],v=r.padding[2],y=r.padding[3];r.scale[0]<0&&(_=-_,y=-y),r.scale[1]<0&&(p=-p,v=-v),g=[p,_,v,y]}const f=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_,g==Yn?Yn:g.map(function(p){return p*f}),!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]);const m=1/f;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_,g,!!r.backgroundFill,!!r.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_,o=this.strokeKey_;t&&(o in this.strokeStates||(this.strokeStates[o]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||Sr,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_,o=this.textState_,r=this.strokeKey_,s=this.textKey_,a=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,h=Wr[o.textBaseline],u=this.textOffsetY_*l,d=this.text_,c=n?n.lineWidth*Math.abs(o.scale[0])/2:0;this.instructions.push([Q.DRAW_CHARS,t,e,h,o.overflow,a,o.maxAngle,l,u,r,c*l,d,s,1]),this.hitDetectionInstructions.push([Q.DRAW_CHARS,t,e,h,o.overflow,a,o.maxAngle,1,u,r,c,d,s,1/l])}setTextStyle(t,e){let n,o,r;if(!t)this.text_="";else{const s=t.getFill();s?(o=this.textFillState_,o||(o={},this.textFillState_=o),o.fillStyle=di(s.getColor()||Ci)):(o=null,this.textFillState_=o);const a=t.getStroke();if(!a)r=null,this.textStrokeState_=r;else{r=this.textStrokeState_,r||(r={},this.textStrokeState_=r);const f=a.getLineDash(),m=a.getLineDashOffset(),p=a.getWidth(),_=a.getMiterLimit();r.lineCap=a.getLineCap()||$s,r.lineDash=f?f.slice():wr,r.lineDashOffset=m===void 0?Mr:m,r.lineJoin=a.getLineJoin()||Io,r.lineWidth=p===void 0?Tr:p,r.miterLimit=_===void 0?Cr:_,r.strokeStyle=di(a.getColor()||Er)}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()||Hs,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||Yn,n.scale=h===void 0?[1,1]:h;const u=t.getOffsetX(),d=t.getOffsetY(),c=t.getRotateWithView(),g=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_=g===void 0?0:g,this.strokeKey_=r?(typeof r.strokeStyle=="string"?r.strokeStyle:$(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=o?typeof o.fillStyle=="string"?o.fillStyle:"|"+$(o.fillStyle):""}this.declutterImageWithText_=e}}const ny={Circle:Cg,Default:Br,Image:K1,LineString:Q1,Polygon:Cg,Text:iy};class oy{constructor(t,e,n,o){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=o,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 o in n){const r=n[o].finish();t[e][o]=r}}return t}getBuilder(t,e){const n=t!==void 0?t.toString():"0";let o=this.buildersByZIndex_[n];o===void 0&&(o={},this.buildersByZIndex_[n]=o);let r=o[e];if(r===void 0){const s=ny[e];r=new s(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),o[e]=r}return r}}const xa=oy;class ry 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(o,r){const s=this.loadedTileCallback.bind(this,n,o);return t.forEachLoadedTile(e,o,r,s)}.bind(this)}forEachFeatureAtCoordinate(t,e,n,o,r){}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=ry,Eg=[];let No=null;function ay(){const i=document.createElement("canvas");i.width=1,i.height=1,No=i.getContext("2d")}class ly extends sy{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=qe(),this.pixelTransform=qe(),this.inversePixelTransform=qe(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,n){No||ay(),No.clearRect(0,0,1,1);let o;try{No.drawImage(t,e,n,1,1,0,0,1,1),o=No.getImageData(0,0,1,1).data}catch{return No=null,null}return o}getBackground(t){let n=this.getLayer().getBackground();return typeof n=="function"&&(n=n(t.viewState.resolution)),n||void 0}useContainer(t,e,n){const o=this.getLayer().getClassName();let r,s;if(t&&t.className===o&&(!n||t&&t.style.backgroundColor&&Zi(kr(t.style.backgroundColor),kr(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){r=document.createElement("div"),r.className=o;let a=r.style;a.position="absolute",a.width="100%",a.height="100%",s=Ae();const l=s.canvas;r.appendChild(l),a=l.style,a.position="absolute",a.left="0",a.transformOrigin="top left",this.container=r,this.context=s}!this.containerReused&&n&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=n)}clipUnrotated(t,e,n){const o=$i(n),r=Ws(n),s=Bs(n),a=js(n);Jt(e.coordinateToPixelTransform,o),Jt(e.coordinateToPixelTransform,r),Jt(e.coordinateToPixelTransform,s),Jt(e.coordinateToPixelTransform,a);const l=this.inversePixelTransform;Jt(l,o),Jt(l,r),Jt(l,s),Jt(l,a),t.save(),t.beginPath(),t.moveTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(r[0]),Math.round(r[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 o=this.getLayer();if(o.hasListener(t)){const r=new kc(t,this.inversePixelTransform,n,e);o.dispatchEvent(r)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_(Vi.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(Vi.POSTRENDER,t,e)}getRenderTransform(t,e,n,o,r,s,a){const l=r/2,h=s/2,u=o/e,d=-u,c=-t[0]+a,g=-t[1];return Mi(this.tempTransform,l,h,u,d,-n,c,g)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const Sg=ly;function hy(i,t,e,n,o,r,s,a,l,h,u,d){let c=i[t],g=i[t+1],f=0,m=0,p=0,_=0;function v(){f=c,m=g,t+=n,c=i[t],g=i[t+1],_+=p,p=Math.sqrt((c-f)*(c-f)+(g-m)*(g-m))}do v();while(t<e-n&&_+p<r);let y=p===0?0:(r-_)/p;const x=ki(f,c,y),k=ki(m,g,y),w=t-n,E=_,M=r+a*l(h,o,u);for(;t<e-n&&_+p<M;)v();y=p===0?0:(M-_)/p;const S=ki(f,c,y),z=ki(m,g,y);let P;if(d){const Z=[x,k,S,z];nh(Z,0,4,2,d,Z,Z),P=Z[0]>Z[2]}else P=x>S;const G=Math.PI,A=[],at=w+n===t;t=w,p=0,_=E,c=i[t],g=i[t+1];let B;if(at){v(),B=Math.atan2(g-m,c-f),P&&(B+=B>0?-G:G);const Z=(S+x)/2,F=(z+k)/2;return A[0]=[Z,F,(M-r)/2,B,o],A}o=o.replace(/\n/g," ");for(let Z=0,F=o.length;Z<F;){v();let V=Math.atan2(g-m,c-f);if(P&&(V+=V>0?-G:G),B!==void 0){let b=V-B;if(b+=b>G?-2*G:b<-G?2*G:0,Math.abs(b)>s)return null}B=V;const D=Z;let H=0;for(;Z<F;++Z){const b=P?F-Z-1:Z,T=a*l(h,o[b],u);if(t+n<e&&_+p<r+H+T/2)break;H+=T}if(Z===D)continue;const Y=P?o.substring(F-D,F-Z):o.substring(D,Z);y=p===0?0:(r+H/2-_)/p;const I=ki(f,c,y),rt=ki(m,g,y);A.push([I,rt,H/2,V,Y]),r+=H}return A}const Go=Ge(),sn=[],zi=[],Ri=[],an=[];function Tg(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 Ig(i,t){return(t==="start"||t==="end")&&!uy.test(i)&&(t=t==="start"?"left":"right"),Wr[t]}function dy(i,t,e){return e>0&&i.push(`
43
- `,""),i.push(t,""),i}class cy{constructor(t,e,n,o){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=o.instructions,this.coordinates=o.coordinates,this.coordinateCache_={},this.renderedTransform_=qe(),this.hitDetectionInstructions=o.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=o.fillStates||{},this.strokeStates=o.strokeStates||{},this.textStates=o.textStates||{},this.widths_={},this.labels_={}}createLabel(t,e,n,o){const r=t+e+n+o;if(this.labels_[r])return this.labels_[r];const s=o?this.strokeStates[o]: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?Wr[l.justify]:Ig(Array.isArray(t)?t[0]:t,l.textAlign||Sr),g=o&&s.lineWidth?s.lineWidth:0,f=d?t:t.split(`
44
- `).reduce(dy,[]),{width:m,height:p,widths:_,heights:v,lineWidths:y}=rv(l,f),x=m+g,k=[],w=(x+2)*u[0],E=(p+g)*u[1],M={width:w<0?Math.floor(w):Math.ceil(w),height:E<0?Math.floor(E):Math.ceil(E),contextInstructions:k};(u[0]!=1||u[1]!=1)&&k.push("scale",u),o&&(k.push("strokeStyle",s.strokeStyle),k.push("lineWidth",g),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 z=c*x+S*g;const P=[],G=[];let A=0,at=0,B=0,Z=0,F;for(let V=0,D=f.length;V<D;V+=2){const H=f[V];if(H===`
45
- `){at+=A,A=0,z=c*x+S*g,++Z;continue}const Y=f[V+1]||l.font;Y!==F&&(o&&P.push("font",Y),n&&G.push("font",Y),F=Y),A=Math.max(A,v[B]);const I=[H,z+S*_[B]+c*(_[B]-y[Z]),.5*(g+A)+at];z+=_[B],o&&P.push("strokeText",I),n&&G.push("fillText",I),++B}return Array.prototype.push.apply(k,P),Array.prototype.push.apply(k,G),this.labels_[r]=M,M}replayTextBackground_(t,e,n,o,r,s,a){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,n),t.lineTo.apply(t,o),t.lineTo.apply(t,r),t.lineTo.apply(t,e),s&&(this.alignFill_=s[2],this.fill_(t)),a&&(this.setStrokeStyle_(t,a),t.stroke())}calculateImageOrLabelDimensions_(t,e,n,o,r,s,a,l,h,u,d,c,g,f,m,p){a*=c[0],l*=c[1];let _=n-a,v=o-l;const y=r+h>t?t-h:r,x=s+u>e?e-u:s,k=f[3]+y*c[0]+f[1],w=f[0]+x*c[1]+f[2],E=_-f[3],M=v-f[0];(m||d!==0)&&(sn[0]=E,an[0]=E,sn[1]=M,zi[1]=M,zi[0]=E+k,Ri[0]=zi[0],Ri[1]=M+w,an[1]=Ri[1]);let S;return d!==0?(S=Mi(qe(),n,o,1,1,d,-n,-o),Jt(S,sn),Jt(S,zi),Jt(S,Ri),Jt(S,an),ti(Math.min(sn[0],zi[0],Ri[0],an[0]),Math.min(sn[1],zi[1],Ri[1],an[1]),Math.max(sn[0],zi[0],Ri[0],an[0]),Math.max(sn[1],zi[1],Ri[1],an[1]),Go)):ti(Math.min(E,E+k),Math.min(M,M+w),Math.max(E,E+k),Math.max(M,M+w),Go),g&&(_=Math.round(_),v=Math.round(v)),{drawImageX:_,drawImageY:v,drawImageW:y,drawImageH:x,originX:h,originY:u,declutterBox:{minX:Go[0],minY:Go[1],maxX:Go[2],maxY:Go[3],value:p},canvasTransform:S,scale:c}}replayImageOrLabel_(t,e,n,o,r,s,a){const l=!!(s||a),h=o.declutterBox,u=t.canvas,d=a?a[2]*o.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,zi,Ri,an,s,a),sv(t,o.canvasTransform,r,n,o.originX,o.originY,o.drawImageW,o.drawImageH,o.drawImageX,o.drawImageY,o.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,o){const r=this.textStates[e],s=this.createLabel(t,e,o,n),a=this.strokeStates[n],l=this.pixelRatio,h=Ig(Array.isArray(t)?t[0]:t,r.textAlign||Sr),u=Wr[r.textBaseline||Hs],d=a&&a.lineWidth?a.lineWidth:0,c=s.width/l-2*r.scale[0],g=h*c+2*(.5-h)*d,f=u*s.height/l+2*(.5-u)*d;return{label:s,anchorX:g,anchorY:f}}execute_(t,e,n,o,r,s,a,l){let h;this.pixelCoordinates_&&Zi(n,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=Ji(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),Z0(this.renderedTransform_,n));let u=0;const d=o.length;let c=0,g,f,m,p,_,v,y,x,k,w,E,M,S=0,z=0,P=null,G=null;const A=this.coordinateCache_,at=this.viewRotation_,B=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,Z={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:at},F=this.instructions!=o||this.overlaps?0:200;let V,D,H,Y;for(;u<d;){const I=o[u];switch(I[0]){case Q.BEGIN_GEOMETRY:V=I[1],Y=I[3],V.getGeometry()?a!==void 0&&!$t(a,Y.getExtent())?u=I[2]+1:++u:u=I[2];break;case Q.BEGIN_PATH:S>F&&(this.fill_(t),S=0),z>F&&(t.stroke(),z=0),!S&&!z&&(t.beginPath(),p=NaN,_=NaN),++u;break;case Q.CIRCLE:c=I[1];const b=h[c],T=h[c+1],q=h[c+2],C=h[c+3],K=q-b,U=C-T,_t=Math.sqrt(K*K+U*U);t.moveTo(b+_t,T),t.arc(b,T,_t,0,2*Math.PI,!0),++u;break;case Q.CLOSE_PATH:t.closePath(),++u;break;case Q.CUSTOM:c=I[1],g=I[2];const Et=I[3],yt=I[4],Ct=I.length==6?I[5]:void 0;Z.geometry=Et,Z.feature=V,u in A||(A[u]=[]);const Lt=A[u];Ct?Ct(h,c,g,2,Lt):(Lt[0]=h[c],Lt[1]=h[c+1],Lt.length=2),yt(Lt,Z),++u;break;case Q.DRAW_IMAGE:c=I[1],g=I[2],x=I[3],f=I[4],m=I[5];let Dt=I[6];const jt=I[7],O=I[8],ut=I[9],pt=I[10];let kt=I[11];const xt=I[12];let st=I[13];const nt=I[14],wt=I[15];if(!x&&I.length>=20){k=I[19],w=I[20],E=I[21],M=I[22];const de=this.drawLabelWithPointPlacement_(k,w,E,M);x=de.label,I[3]=x;const bi=I[23];f=(de.anchorX-bi)*this.pixelRatio,I[4]=f;const _e=I[24];m=(de.anchorY-_e)*this.pixelRatio,I[5]=m,Dt=x.height,I[6]=Dt,st=x.width,I[13]=st}let It;I.length>25&&(It=I[25]);let Bt,bt,dt;I.length>17?(Bt=I[16],bt=I[17],dt=I[18]):(Bt=Yn,bt=!1,dt=!1),pt&&B?kt+=at:!pt&&!B&&(kt-=at);let Ot=0;for(;c<g;c+=2){if(It&&It[Ot++]<st/this.pixelRatio)continue;const de=this.calculateImageOrLabelDimensions_(x.width,x.height,h[c],h[c+1],st,Dt,f,m,O,ut,kt,xt,r,Bt,bt||dt,V),bi=[t,e,x,de,jt,bt?P: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 ze=g-c;if(!wt[ze]){wt[ze]=bi;continue}if(_e=wt[ze],delete wt[ze],Xe=Tg(_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=I[1],ct=I[2],ue=I[3],Ze=I[4];M=I[5];const Ut=I[6],Ie=I[7],Wt=I[8];E=I[9];const Kt=I[10];k=I[11],w=I[12];const Tn=[I[13],I[13]],ae=this.textStates[w],Ye=ae.font,ve=[ae.scale[0]*Ie,ae.scale[1]*Ie];let Fe;Ye in this.widths_?Fe=this.widths_[Ye]:(Fe={},this.widths_[Ye]=Fe);const Ni=og(h,St,ct,2),sl=Math.abs(ve[0])*Cc(Ye,k,Fe);if(Ze||sl<=Ni){const de=this.textStates[w].textAlign,bi=(Ni-sl)*Wr[de],_e=hy(h,St,ct,2,k,bi,Ut,Math.abs(ve[0]),Cc,Ye,Fe,B?0:this.viewRotation_);t:if(_e){const Xe=[];let ze,sr,ar,ye,Re;if(E)for(ze=0,sr=_e.length;ze<sr;++ze){Re=_e[ze],ar=Re[4],ye=this.createLabel(ar,w,"",E),f=Re[2]+(ve[0]<0?-Kt:Kt),m=ue*ye.height+(.5-ue)*2*Kt*ve[1]/ve[0]-Wt;const ee=this.calculateImageOrLabelDimensions_(ye.width,ye.height,Re[0],Re[1],ye.width,ye.height,f,m,0,0,Re[3],Tn,!1,Yn,!1,V);if(l&&l.collides(ee.declutterBox))break t;Xe.push([t,e,ye,ee,1,null,null])}if(M)for(ze=0,sr=_e.length;ze<sr;++ze){Re=_e[ze],ar=Re[4],ye=this.createLabel(ar,w,M,""),f=Re[2],m=ue*ye.height-Wt;const ee=this.calculateImageOrLabelDimensions_(ye.width,ye.height,Re[0],Re[1],ye.width,ye.height,f,m,0,0,Re[3],Tn,!1,Yn,!1,V);if(l&&l.collides(ee.declutterBox))break t;Xe.push([t,e,ye,ee,1,null,null])}l&&l.load(Xe.map(Tg));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){V=I[1];const de=s(V,Y);if(de)return de}++u;break;case Q.FILL:F?S++:this.fill_(t),++u;break;case Q.MOVE_TO_LINE_TO:for(c=I[1],g=I[2],D=h[c],H=h[c+1],v=D+.5|0,y=H+.5|0,(v!==p||y!==_)&&(t.moveTo(D,H),p=v,_=y),c+=2;c<g;c+=2)D=h[c],H=h[c+1],v=D+.5|0,y=H+.5|0,(c==g-2||v!==p||y!==_)&&(t.lineTo(D,H),p=v,_=y);++u;break;case Q.SET_FILL_STYLE:P=I,this.alignFill_=I[2],S&&(this.fill_(t),S=0,z&&(t.stroke(),z=0)),t.fillStyle=I[1],++u;break;case Q.SET_STROKE_STYLE:G=I,z&&(t.stroke(),z=0),this.setStrokeStyle_(t,I),++u;break;case Q.STROKE:F?z++:t.stroke(),++u;break;default:++u;break}}S&&this.fill_(t),z&&t.stroke()}execute(t,e,n,o,r,s){this.viewRotation_=o,this.execute_(t,e,n,this.instructions,r,void 0,void 0,s)}executeHitDetection(t,e,n,o,r){return this.viewRotation_=n,this.execute_(t,1,e,this.hitDetectionInstructions,!0,o,r)}}const gy=cy,qh=["Polygon","Circle","LineString","Image","Text","Default"];class fy{constructor(t,e,n,o,r,s){this.maxExtent_=t,this.overlaps_=o,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=s,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=qe(),this.createExecutors_(r)}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 o=t[e];for(const r in o){const s=o[r];n[r]=new gy(this.resolution_,this.pixelRatio_,this.overlaps_,s)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const n=this.executorsByZIndex_[e];for(let o=0,r=t.length;o<r;++o)if(t[o]in n)return!0}return!1}forEachFeatureAtCoordinate(t,e,n,o,r,s){o=Math.round(o);const a=o*2+1,l=Mi(this.hitDetectionTransform_,o+.5,o+.5,1/e,-1/e,-n,-t[0],-t[1]),h=!this.hitDetectionContext_;h&&(this.hitDetectionContext_=Ae(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(),xr(d,t),ui(d,e*(this.renderBuffer_+o),d));const c=my(o);let g;function f(k,w){const E=u.getImageData(0,0,a,a).data;for(let M=0,S=c.length;M<S;M++)if(E[c[M]]>0){if(!s||g!=="Image"&&g!=="Text"||s.includes(k)){const z=(c[M]-3)/4,P=o-z%a,G=o-(z/a|0),A=r(k,w,P*P+G*G);if(A)return A}u.clearRect(0,0,a,a);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);m.sort(Pn);let p,_,v,y,x;for(p=m.length-1;p>=0;--p){const k=m[p].toString();for(v=this.executorsByZIndex_[k],_=qh.length-1;_>=0;--_)if(g=qh[_],y=v[g],y!==void 0&&(x=y.executeHitDetection(u,l,n,f,d),x))return x}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const n=e[0],o=e[1],r=e[2],s=e[3],a=[n,o,n,s,r,s,r,o];return Ji(a,0,8,2,t,a),a}isEmpty(){return On(this.executorsByZIndex_)}execute(t,e,n,o,r,s,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(Pn),this.maxExtent_&&(t.save(),this.clip(t,n)),s=s||qh;let h,u,d,c,g,f;for(a&&l.reverse(),h=0,u=l.length;h<u;++h){const m=l[h].toString();for(g=this.executorsByZIndex_[m],d=0,c=s.length;d<c;++d){const p=s[d];f=g[p],f!==void 0&&f.execute(t,e,n,o,r,a)}}this.maxExtent_&&t.restore()}}const $h={};function my(i){if($h[i]!==void 0)return $h[i];const t=i*2+1,e=i*i,n=new Array(e+1);for(let r=0;r<=i;++r)for(let s=0;s<=i;++s){const a=r*r+s*s;if(a>e)break;let l=n[a];l||(l=[],n[a]=l),l.push(((i+r)*t+(i+s))*4+3),r>0&&l.push(((i-r)*t+(i+s))*4+3),s>0&&(l.push(((i+r)*t+(i-s))*4+3),r>0&&l.push(((i-r)*t+(i-s))*4+3))}const o=[];for(let r=0,s=n.length;r<s;++r)n[r]&&o.push(...n[r]);return $h[i]=o,o}const ba=fy;class py extends Mg{constructor(t,e,n,o,r,s,a){super(),this.context_=t,this.pixelRatio_=e,this.extent_=n,this.transform_=o,this.viewRotation_=r,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_=qe()}drawImages_(t,e,n,o){if(!this.image_)return;const r=Ji(t,e,n,o,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=r.length;u<d;u+=2){const c=r[u]-this.imageAnchorX_,g=r[u+1]-this.imageAnchorY_;if(h!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const f=c+this.imageAnchorX_,m=g+this.imageAnchorY_;Mi(a,f,m,1,1,h,-f,-m),s.setTransform.apply(s,a),s.translate(f,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,g,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(s.globalAlpha=l)}drawText_(t,e,n,o){if(!this.textState_||this.text_==="")return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const r=Ji(t,e,n,o,this.transform_,this.pixelCoordinates_),s=this.context_;let a=this.textRotation_;for(this.textRotateWithView_&&(a+=this.viewRotation_);e<n;e+=o){const l=r[e]+this.textOffsetX_,h=r[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,o,r){const s=this.context_,a=Ji(t,e,n,o,this.transform_,this.pixelCoordinates_);s.moveTo(a[0],a[1]);let l=a.length;r&&(l-=2);for(let h=2;h<l;h+=2)s.lineTo(a[h],a[h+1]);return r&&s.closePath(),n}drawRings_(t,e,n,o){for(let r=0,s=n.length;r<s;++r)e=this.moveToLineTo_(t,e,n[r],o,!0);return e}drawCircle(t){if(!!$t(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=zv(t,this.transform_,this.pixelCoordinates_),n=e[2]-e[0],o=e[3]-e[1],r=Math.sqrt(n*n+o*o),s=this.context_;s.beginPath(),s.arc(e[0],e[1],r,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||!$t(this.extent_,n.getExtent())||(this.setStyle(e),this.drawGeometry(n))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let n=0,o=e.length;n<o;++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_)),!!$t(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(!!$t(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const n=this.context_,o=t.getFlatCoordinates();let r=0;const s=t.getEnds(),a=t.getStride();n.beginPath();for(let l=0,h=s.length;l<h;++l)r=this.moveToLineTo_(o,r,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_)),!!$t(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_)),!!$t(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 o=0;const r=t.getEndss(),s=t.getStride();e.beginPath();for(let a=0,l=r.length;a<l;++a){const h=r[a];o=this.drawRings_(n,o,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),Zi(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_,o=t.textAlign?t.textAlign:Sr;n?(n.font!=t.font&&(n.font=t.font,e.font=t.font),n.textAlign!=o&&(n.textAlign=o,e.textAlign=o),n.textBaseline!=t.textBaseline&&(n.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=o,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:o,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(!t)this.fillState_=null;else{const n=t.getColor();this.fillState_={fillStyle:di(n||Ci)}}if(!e)this.strokeState_=null;else{const n=e.getColor(),o=e.getLineCap(),r=e.getLineDash(),s=e.getLineDashOffset(),a=e.getLineJoin(),l=e.getWidth(),h=e.getMiterLimit(),u=r||wr;this.strokeState_={lineCap:o!==void 0?o:$s,lineDash:this.pixelRatio_===1?u:u.map(d=>d*this.pixelRatio_),lineDashOffset:(s||Mr)*this.pixelRatio_,lineJoin:a!==void 0?a:Io,lineWidth:(l!==void 0?l:Tr)*this.pixelRatio_,miterLimit:h!==void 0?h:Cr,strokeStyle:di(n||Er)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}const n=t.getPixelRatio(this.pixelRatio_),o=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=o[0]*n,this.imageAnchorY_=o[1]*n,this.imageHeight_=e[1]*n,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[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 g=e.getColor();this.textFillState_={fillStyle:di(g||Ci)}}const n=t.getStroke();if(!n)this.textStrokeState_=null;else{const g=n.getColor(),f=n.getLineCap(),m=n.getLineDash(),p=n.getLineDashOffset(),_=n.getLineJoin(),v=n.getWidth(),y=n.getMiterLimit();this.textStrokeState_={lineCap:f!==void 0?f:$s,lineDash:m||wr,lineDashOffset:p||Mr,lineJoin:_!==void 0?_:Io,lineWidth:v!==void 0?v:Tr,miterLimit:y!==void 0?y:Cr,strokeStyle:di(g||Er)}}const o=t.getFont(),r=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:o!==void 0?o:wc,textAlign:d!==void 0?d:Sr,textBaseline:c!==void 0?c:Hs},this.text_=u!==void 0?Array.isArray(u)?u.reduce((g,f,m)=>g+=m%2?" ":f,""):u:"",this.textOffsetX_=r!==void 0?this.pixelRatio_*r: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 zg(i,t,e,n,o,r,s){const a=i[0]*je,l=i[1]*je,h=Ae(a,l);h.imageSmoothingEnabled=!1;const u=h.canvas,d=new vy(h,je,o,null,s),c=e.length,g=Math.floor((256*256*256-1)/c),f={};for(let p=1;p<=c;++p){const _=e[p-1],v=_.getStyleFunction()||n;if(!n)continue;let y=v(_,r);if(!y)continue;Array.isArray(y)||(y=[y]);const x=p*g,k="#"+("000000"+x.toString(16)).slice(-6);for(let w=0,E=y.length;w<E;++w){const M=y[w],S=M.getGeometryFunction()(_);if(!S||!$t(o,S.getExtent()))continue;const z=M.clone(),P=z.getFill();P&&P.setColor(k);const G=z.getStroke();G&&(G.setColor(k),G.setLineDash(null)),z.setText(void 0);const A=M.getImage();if(A&&A.getOpacity()!==0){const Z=A.getImageSize();if(!Z)continue;const F=Ae(Z[0],Z[1],void 0,{alpha:!1}),V=F.canvas;F.fillStyle=k,F.fillRect(0,0,V.width,V.height),z.setImage(new ca({img:V,imgSize:Z,anchor:A.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:A.getOrigin(),opacity:1,size:A.getSize(),scale:A.getScale(),rotation:A.getRotation(),rotateWithView:A.getRotateWithView()}))}const at=z.getZIndex()||0;let B=f[at];B||(B={},f[at]=B,B.Polygon=[],B.Circle=[],B.LineString=[],B.Point=[]),B[S.getType().replace("Multi","")].push(S,z)}}const m=Object.keys(f).map(Number).sort(Pn);for(let p=0,_=m.length;p<_;++p){const v=f[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 E=0,M=t.length;E<M;++E)d.setTransform(t[E]),d.drawGeometry(x[k])}}}return h.getImageData(0,0,u.width,u.height)}function Rg(i,t,e){const n=[];if(e){const o=Math.floor(Math.round(i[0])*je),r=Math.floor(Math.round(i[1])*je),s=(Vt(o,0,e.width-1)+Vt(r,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,Ag={Point:Ey,LineString:wy,Polygon:Ty,MultiPoint:Sy,MultiLineString:My,MultiPolygon:Cy,GeometryCollection:ky,Circle:xy};function yy(i,t){return parseInt($(i),10)-parseInt($(t),10)}function Pg(i,t){const e=Hh(i,t);return e*e}function Hh(i,t){return _y*i/t}function xy(i,t,e,n,o){const r=e.getFill(),s=e.getStroke();if(r||s){const l=i.getBuilder(e.getZIndex(),"Circle");l.setFillStrokeStyle(r,s),l.drawCircle(t,n)}const a=e.getText();if(a&&a.getText()){const l=(o||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}function ka(i,t,e,n,o,r,s){let a=!1;const l=e.getImage();if(l){const h=l.getImageState();h==Qt.LOADED||h==Qt.ERROR?l.unlistenImageChange(o):(h==Qt.IDLE&&l.load(),l.listenImageChange(o),a=!0)}return by(i,t,e,n,r,s),a}function by(i,t,e,n,o,r){const s=e.getGeometryFunction()(t);if(!s)return;const a=s.simplifyTransformed(n,o);if(e.getRenderer())Dg(i,a,e,t);else{const h=Ag[a.getType()];h(i,a,e,t,r)}}function Dg(i,t,e,n){if(t.getType()=="GeometryCollection"){const r=t.getGeometries();for(let s=0,a=r.length;s<a;++s)Dg(i,r[s],e,n);return}i.getBuilder(e.getZIndex(),"Default").drawCustom(t,n,e.getRenderer(),e.getHitDetectionRenderer())}function ky(i,t,e,n,o){const r=t.getGeometriesArray();let s,a;for(s=0,a=r.length;s<a;++s){const l=Ag[r[s].getType()];l(i,r[s],e,n,o)}}function wy(i,t,e,n,o){const r=e.getStroke();if(r){const a=i.getBuilder(e.getZIndex(),"LineString");a.setFillStrokeStyle(null,r),a.drawLineString(t,n)}const s=e.getText();if(s&&s.getText()){const a=(o||i).getBuilder(e.getZIndex(),"Text");a.setTextStyle(s),a.drawText(t,n)}}function My(i,t,e,n,o){const r=e.getStroke();if(r){const a=i.getBuilder(e.getZIndex(),"LineString");a.setFillStrokeStyle(null,r),a.drawMultiLineString(t,n)}const s=e.getText();if(s&&s.getText()){const a=(o||i).getBuilder(e.getZIndex(),"Text");a.setTextStyle(s),a.drawText(t,n)}}function Cy(i,t,e,n,o){const r=e.getFill(),s=e.getStroke();if(s||r){const l=i.getBuilder(e.getZIndex(),"Polygon");l.setFillStrokeStyle(r,s),l.drawMultiPolygon(t,n)}const a=e.getText();if(a&&a.getText()){const l=(o||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}function Ey(i,t,e,n,o){const r=e.getImage(),s=e.getText();let a;if(r){if(r.getImageState()!=Qt.LOADED)return;let l=i;if(o){const u=r.getDeclutterMode();if(u!=="none")if(l=o,u==="obstacle"){const d=i.getBuilder(e.getZIndex(),"Image");d.setImageStyle(r,a),d.drawPoint(t,n)}else s&&s.getText()&&(a={})}const h=l.getBuilder(e.getZIndex(),"Image");h.setImageStyle(r,a),h.drawPoint(t,n)}if(s&&s.getText()){let l=i;o&&(l=o);const h=l.getBuilder(e.getZIndex(),"Text");h.setTextStyle(s,a),h.drawText(t,n)}}function Sy(i,t,e,n,o){const r=e.getImage(),s=e.getText();let a;if(r){if(r.getImageState()!=Qt.LOADED)return;let l=i;if(o){const u=r.getDeclutterMode();if(u!=="none")if(l=o,u==="obstacle"){const d=i.getBuilder(e.getZIndex(),"Image");d.setImageStyle(r,a),d.drawMultiPoint(t,n)}else s&&s.getText()&&(a={})}const h=l.getBuilder(e.getZIndex(),"Image");h.setImageStyle(r,a),h.drawMultiPoint(t,n)}if(s&&s.getText()){let l=i;o&&(l=o);const h=l.getBuilder(e.getZIndex(),"Text");h.setTextStyle(s,a),h.drawText(t,n)}}function Ty(i,t,e,n,o){const r=e.getFill(),s=e.getStroke();if(r||s){const l=i.getBuilder(e.getZIndex(),"Polygon");l.setFillStrokeStyle(r,s),l.drawPolygon(t,n)}const a=e.getText();if(a&&a.getText()){const l=(o||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}class Iy extends Sg{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 o=e.extent,r=e.viewState,s=r.center,a=r.resolution,l=r.projection,h=r.rotation,u=l.getExtent(),d=this.getLayer().getSource(),c=e.pixelRatio,g=e.viewHints,f=!(g[qt.ANIMATING]||g[qt.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((o[2]-u[2])/y)+1:1;let k=v?Math.floor((o[0]-u[0])/y):0;do{const w=this.getRenderTransform(s,a,h,c,p,_,k*y);t.execute(m,1,w,h,f,void 0,n)}while(++k<x)}setupCompositionContext_(){if(this.opacity_!==1){const t=Ae(this.context.canvas.width,this.context.canvas.height,Eg);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_),Eg.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,o=t.layerStatesArray[t.layerIndex];Y0(this.pixelTransform,1/n,1/n),Vl(this.inversePixelTransform,this.pixelTransform);const r=_c(this.pixelTransform);this.useContainer(e,r,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!==r&&(a.style.transform=r)):this.containerReused||s.clearRect(0,0,u,d),this.preRender(s,t);const c=t.viewState;c.projection,this.opacity_=o.opacity,this.setupCompositionContext_();let g=!1,f=!0;if(o.extent&&this.clipping){const m=Hi(o.extent);f=$t(m,t.extent),g=f&&!Bn(m,t.extent),g&&this.clipUnrotated(this.compositionContext_,t,m)}return f&&this.renderWorlds(l,t),g&&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 o=this.renderedCenter_,r=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(o,r,s,je,d,c,0).slice());const g=h.getSource(),f=a.getExtent();if(g.getWrapX()&&a.canWrapX()&&!Bn(f,l)){let m=l[0];const p=Nt(f);let _=0,v;for(;m<f[0];)--_,v=p*_,u.push(this.getRenderTransform(o,r,s,je,d,c,v).slice()),m+=p;for(_=0,m=l[2];m>f[2];)++_,v=p*_,u.push(this.getRenderTransform(o,r,s,je,d,c,v).slice()),m-=p}this.hitDetectionImageData_=zg(n,u,this.renderedFeatures_,h.getStyleFunction(),l,r,s)}e(Rg(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))}forEachFeatureAtCoordinate(t,e,n,o,r){if(!this.replayGroup_)return;const s=e.viewState.resolution,a=e.viewState.rotation,l=this.getLayer(),h={},u=function(g,f,m){const p=$(g),_=h[p];if(_){if(_!==!0&&m<_.distanceSq){if(m===0)return h[p]=!0,r.splice(r.lastIndexOf(_),1),o(g,l,f);_.geometry=f,_.distanceSq=m}}else{if(m===0)return h[p]=!0,o(g,l,f);r.push(h[p]={feature:g,layer:l,geometry:f,distanceSq:m,callback:o})}};let d;const c=[this.replayGroup_];return this.declutterExecutorGroup&&c.push(this.declutterExecutorGroup),c.some(g=>d=g.forEachFeatureAtCoordinate(t,s,a,n,u,g===this.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map(f=>f.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 o=t.viewHints[qt.ANIMATING],r=t.viewHints[qt.INTERACTING],s=e.getUpdateWhileAnimating(),a=e.getUpdateWhileInteracting();if(this.ready&&!s&&o||!a&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=t.extent,h=t.viewState,u=h.projection,d=h.resolution,c=t.pixelRatio,g=e.getRevision(),f=e.getRenderBuffer();let m=e.getRenderOrder();m===void 0&&(m=yy);const p=h.center.slice(),_=ui(l,f*d),v=_.slice(),y=[_.slice()],x=u.getExtent();if(n.getWrapX()&&u.canWrapX()&&!Bn(x,t.extent)){const B=Nt(x),Z=Math.max(Nt(_)/2,B);_[0]=x[0]-Z,_[2]=x[2]+Z,Nl(p,u);const F=oc(y[0],u);F[0]<x[0]&&F[2]<x[2]?y.push([F[0]+B,F[1],F[2]+B,F[3]]):F[0]>x[0]&&F[2]>x[2]&&y.push([F[0]-B,F[1],F[2]-B,F[3]])}if(this.ready&&this.renderedResolution_==d&&this.renderedRevision_==g&&this.renderedRenderOrder_==m&&Bn(this.wrappedRenderedExtent_,_))return Zi(this.renderedExtent_,v)||(this.hitDetectionImageData_=null,this.renderedExtent_=v),this.renderedCenter_=p,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const k=new xa(Hh(d,c),_,d,c);let w;this.getLayer().getDeclutter()&&(w=new xa(Hh(d,c),_,d,c));let E;for(let B=0,Z=y.length;B<Z;++B)n.loadFeatures(y[B],d,u);const M=Pg(d,c);let S=!0;const z=function(B){let Z;const F=B.getStyleFunction()||e.getStyleFunction();if(F&&(Z=F(B,d)),Z){const V=this.renderFeature(B,M,Z,k,E,w);S=S&&!V}}.bind(this),P=Yl(_),G=n.getFeaturesInExtent(P);m&&G.sort(m);for(let B=0,Z=G.length;B<Z;++B)z(G[B]);this.renderedFeatures_=G,this.ready=S;const A=k.finish(),at=new ba(_,d,c,n.getOverlaps(),A,e.getRenderBuffer());return w&&(this.declutterExecutorGroup=new ba(_,d,c,n.getOverlaps(),w.finish(),e.getRenderBuffer())),this.renderedResolution_=d,this.renderedRevision_=g,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,o,r,s){if(!n)return!1;let a=!1;if(Array.isArray(n))for(let l=0,h=n.length;l<h;++l)a=ka(o,t,n[l],e,this.boundHandleStyleImageChange_,r,s)||a;else a=ka(o,t,n,e,this.boundHandleStyleImageChange_,r,s);return a}}const zy=Iy;class Ry extends kg{constructor(t){super(t)}createRenderer(){return new zy(this)}}const Qn=Ry;class Ay{constructor(t){this.rbush_=new _g(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_[$(e)]=n}load(t,e){const n=new Array(e.length);for(let o=0,r=e.length;o<r;o++){const s=t[o],a=e[o],l={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:a};n[o]=l,this.items_[$(a)]=l}this.rbush_.load(n)}remove(t){const e=$(t),n=this.items_[e];return delete this.items_[e],this.rbush_.remove(n)!==null}update(t,e){const n=this.items_[$(e)],o=[n.minX,n.minY,n.maxX,n.maxY];So(o,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(o){return o.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 o=0,r=t.length;o<r;o++)if(n=e(t[o]),n)return n;return n}isEmpty(){return On(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=Ay;class Py extends hi{constructor(t){super(),this.projection=Gt(t.projection),this.attributions_=Lg(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,o){e.viewResolver=n,e.viewRejector=o})}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_=Lg(t),this.changed()}setState(t){this.state_=t,this.changed()}}function Lg(i){return i?Array.isArray(i)?function(t){return i}:typeof i=="function"?i:function(t){return[i]}:null}const Og=Py,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 Fg(i,t,e,n,o,r,s){const a=new XMLHttpRequest;a.open("GET",typeof i=="function"?i(e,n,o):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?r(t.readFeatures(u,{extent:e,featureProjection:o}),t.readProjection(u)):s()}else s()},a.onerror=s,a.send()}function Ng(i,t){return function(e,n,o,r,s){const a=this;Fg(i,t,e,n,o,function(l,h){a.addFeatures(l),r!==void 0&&r(l)},s||Ln)}}class ln extends Qe{constructor(t,e,n){super(t),this.feature=e,this.features=n}}class Oy extends Og{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&&(gt(this.format_,7),this.loader_=Ng(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,o;Array.isArray(t.features)?o=t.features:t.features&&(n=t.features,o=n.getArray()),!e&&n===void 0&&(n=new Ve(o)),o!==void 0&&this.addFeaturesInternal(o),n!==void 0&&this.bindFeaturesCollection_(n)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=$(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const n=t.getGeometry();if(n){const o=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(o,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new ln(we.ADDFEATURE,t))}setupChangeEvents_(t,e){this.featureChangeKeys_[t]=[ft(e,tt.CHANGE,this.handleFeatureChange_,this),ft(e,yo.PROPERTYCHANGE,this.handleFeatureChange_,this)]}addToIndex_(t,e){let n=!0;const o=e.getId();return o!==void 0&&(o.toString()in this.idIndex_?n=!1:this.idIndex_[o.toString()]=e),n&&(gt(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),n}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],n=[],o=[];for(let r=0,s=t.length;r<s;r++){const a=t[r],l=$(a);this.addToIndex_(l,a)&&n.push(a)}for(let r=0,s=n.length;r<s;r++){const a=n[r],l=$(a);this.setupChangeEvents_(l,a);const h=a.getGeometry();if(h){const u=h.getExtent();e.push(u),o.push(a)}else this.nullGeometryFeatures_[l]=a}if(this.featuresRtree_&&this.featuresRtree_.load(e,o),this.hasListener(we.ADDFEATURE))for(let r=0,s=n.length;r<s;r++)this.dispatchEvent(new ln(we.ADDFEATURE,n[r]))}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(oe.ADD,function(n){e||(e=!0,this.addFeature(n.element),e=!1)}.bind(this)),t.addEventListener(oe.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(Ft);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const n=function(o){this.removeFeatureInternal(o)}.bind(this);this.featuresRtree_.forEach(n);for(const o in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[o])}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(o){if(o.getGeometry().intersectsCoordinate(t))return e(o)})}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 r=e(n);if(r)return r}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),On(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 o=z0(t,e);return[].concat(...o.map(r=>this.featuresRtree_.getInExtent(r)))}else return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const n=t[0],o=t[1];let r=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,o,s,a),a<d){r=h;const c=Math.sqrt(a);l[0]=n-c,l[1]=o-c,l[2]=n+c,l[3]=o+c}}}),r}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=$(e),o=e.getGeometry();if(!o)n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[n]=e);else{const s=o.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(s,e)):this.featuresRtree_&&this.featuresRtree_.update(s,e)}const r=e.getId();if(r!==void 0){const s=r.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_:$(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&On(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(t,e,n){const o=this.loadedExtentsRtree_,r=this.strategy_(t,e,n);for(let s=0,a=r.length;s<a;++s){const l=r[s];o.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)),o.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(o){if(So(o.extent,t))return n=o,!0}),n&&e.remove(n)}removeFeature(t){if(!t)return;const e=$(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=$(t),n=this.featureChangeKeys_[e];if(!n)return;n.forEach(Ft),delete this.featureChangeKeys_[e];const o=t.getId();return o!==void 0&&delete this.idIndex_[o.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){gt(this.format_,7),this.url_=t,this.setLoader(Ng(t,this.format_))}}const hn=Oy;class Fy extends zs{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 o=e-n+1e3/60;return o>=this.transition_?1:zc(o/this.transition_)}inTransition(t){return this.transition_?this.transitionStarts_[t]!==-1:!1}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}const Ma=Fy;class Ny extends Ma{constructor(t,e,n,o,r,s){super(t,e,s),this.crossOrigin_=o,this.src_=n,this.key=n,this.image_=new Image,o!==null&&(this.image_.crossOrigin=o),this.unlisten_=null,this.tileLoadFunction_=r}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_=lg(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function Gy(){const i=Ae(1,1);return i.fillStyle="rgba(0,0,0,0)",i.fillRect(0,0,1,1),i.canvas}const Gg=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 gt(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 gt(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){gt(!(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 jg(i,t,e,n){return n!==void 0?(n[0]=i,n[1]=t,n[2]=e,n):[i,t,e]}function jo(i,t,e){return i+"/"+t+"/"+e}function Bg(i){return jo(i[0],i[1],i[2])}function Wy(i){const[t,e,n]=i.substring(i.lastIndexOf("/")+1,i.length).split(",").map(Number);return jo(t,e,n)}function Wg(i){return i.split("/").map(Number)}function Zy(i){return(i[1]<<i[0])+i[2]}function Yy(i,t){const e=i[0],n=i[1],o=i[2];if(t.getMinZoom()>e||e>t.getMaxZoom())return!1;const r=t.getFullTileRange(e);return r?r.containsXY(n,o):!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=Wg(t)[0];this.forEach(function(o){o.tileCoord[0]!==n&&(this.remove(Bg(o.tileCoord)),o.release())}.bind(this))}}const Kh=Xy;class Zg{constructor(t,e,n,o){this.minX=t,this.maxX=e,this.minY=n,this.maxY=o}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 Bo(i,t,e,n,o){return o!==void 0?(o.minX=i,o.maxX=t,o.minY=e,o.maxY=n,o):new Zg(i,t,e,n)}const Yg=Zg,Xg=[];class Uy extends Ma{constructor(t,e,n,o){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=o.bind(void 0,this),this.wrappedTileCoord=n}getContext(t){const e=$(t);return e in this.context_||(this.context_[e]=Ae(1,1,Xg)),this.context_[e]}hasContext(t){return $(t)in this.context_}getImage(t){return this.hasContext(t)?this.getContext(t).canvas:null}getReplayState(t){const e=$(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),Xg.push(e.canvas),delete this.context_[t]}super.release()}}const Vy=Uy;class qy extends Ma{constructor(t,e,n,o,r,s){super(t,e,s),this.extent=null,this.format_=o,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=r,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 $y=qy,Ca={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"};class Ea extends Qe{constructor(t,e){super(t),this.feature=e}}class Hy extends nn{constructor(t){const e=t;e.stopDown||(e.stopDown=xo),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 o=this.mode_;if(o==="Circle")n=function(r,s,a){const l=s||new z1([NaN,NaN]),h=Zt(r[0]),u=wi(h,Zt(r[r.length-1]));return l.setCenterAndRadius(h,Math.sqrt(u),this.geometryLayout_),l};else{let r;o==="Point"?r=ni:o==="LineString"?r=$n:o==="Polygon"&&(r=Vn),n=function(s,a,l){return a?o==="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 r(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:Ky(),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:Hc,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,o=e[0]-n[0],r=e[1]-n[1],s=o*o+r*r;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,o=[this.finishCoordinate_];const r=this.mode_;if(r==="Point")e=!0;else if(r==="Circle")e=this.sketchCoords_.length===2;else if(r==="LineString")n=this.sketchCoords_.length>this.minPoints_;else if(r==="Polygon"){const s=this.sketchCoords_;n=s[0].length>this.minPoints_,o=[s[0][0],s[0][s[0].length-2]]}if(n){const s=this.getMap();for(let a=0,l=o.length;a<l;a++){const h=o[a],u=s.getPixelFromCoordinate(h),d=t[0]-u[0],c=t[1]-u[1],g=this.freehand_?1:this.snapTolerance_;if(e=Math.sqrt(d*d+c*c)<=g,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 $n(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 $n(this.sketchLineCoords_)));const o=this.geometryFunction_(this.sketchCoords_,void 0,e);this.sketchFeature_=new Ti,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(o),this.updateSketchFeatures_(),this.dispatchEvent(new Ea(Ca.DRAWSTART,this.sketchFeature_))}modifyDrawing_(t){const e=this.getMap(),n=this.sketchFeature_.getGeometry(),o=e.getView().getProjection(),r=ta(this.geometryLayout_);let s,a;for(;t.length<r;)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,o),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 o,r;const s=this.mode_;s==="LineString"||s==="Circle"?(this.finishCoordinate_=t.slice(),r=this.sketchCoords_,r.length>=this.maxPoints_&&(this.freehand_?r.pop():o=!0),r.push(t.slice()),this.geometryFunction_(r,e,n)):s==="Polygon"&&(r=this.sketchCoords_[0],r.length>=this.maxPoints_&&(this.freehand_?r.pop():o=!0),r.push(t.slice()),o&&(this.finishCoordinate_=r[0]),this.geometryFunction_(this.sketchCoords_,e,n)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),o&&this.finishDrawing()}removeLastPoint(){if(!this.sketchFeature_)return;const t=this.sketchFeature_.getGeometry(),e=this.getMap().getView().getProjection();let n;const o=this.mode_;if(o==="LineString"||o==="Circle"){if(n=this.sketchCoords_,n.splice(-2,1),n.length>=2){this.finishCoordinate_=n[n.length-2].slice();const r=this.finishCoordinate_.slice();n[n.length-1]=r,this.createOrUpdateSketchPoint_(r)}this.geometryFunction_(n,t,e),t.getType()==="Polygon"&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(o==="Polygon"){n=this.sketchCoords_[0],n.splice(-2,1);const r=this.sketchLine_.getGeometry();if(n.length>=2){const s=n[n.length-2].slice();n[n.length-1]=s,this.createOrUpdateSketchPoint_(s)}r.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(),o=this.getMap().getView().getProjection();this.mode_==="LineString"?(e.pop(),this.geometryFunction_(e,n,o)):this.mode_==="Polygon"&&(e[0].pop(),this.geometryFunction_(e,n,o),e=n.getCoordinates()),this.type_==="MultiPoint"?t.setGeometry(new Ar([e])):this.type_==="MultiLineString"?t.setGeometry(new zh([e])):this.type_==="MultiPolygon"&&t.setGeometry(new Ah([e])),this.dispatchEvent(new Ea(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 Ea(Ca.DRAWABORT,t))}appendCoordinates(t){const e=this.mode_,n=!this.sketchFeature_;n&&this.startDrawing_(t[0]);let o;if(e==="LineString"||e==="Circle")o=this.sketchCoords_;else if(e==="Polygon")o=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;n&&o.shift(),o.pop();for(let s=0;s<t.length;s++)this.addToDrawing_(t[s]);const r=t[t.length-1];this.addToDrawing_(r),this.modifyDrawing_(r)}extend(t){const n=t.getGeometry();this.sketchFeature_=t,this.sketchCoords_=n.getCoordinates();const o=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=o.slice(),this.sketchCoords_.push(o.slice()),this.sketchPoint_=new Ti(new ni(o)),this.updateSketchFeatures_(),this.dispatchEvent(new Ea(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 Ky(){const i=hg();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=Hy,Ug=0,Zr=1,Vg=[0,0,0,0],Wo=[],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 Ve(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(oe.ADD,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(oe.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 o=this.SEGMENT_WRITERS_[e.getType()];o&&o(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 Ve;const n=this.featuresBeingModified_.getArray();for(let o=0,r=e.length;o<r;++o){const s=e[o];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(o){t===o.feature&&n.push(o)});for(let o=n.length-1;o>=0;--o){const r=n[o];for(let s=this.dragSegments_.length-1;s>=0;--s)this.dragSegments_[s][0]===r&&this.dragSegments_.splice(s,1);e.remove(r)}}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(),o={feature:t,geometry:e,segment:[n,n]};this.rBush_.insert(e.getExtent(),o)}writeMultiPointGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length;o<r;++o){const s=n[o],a={feature:t,geometry:e,depth:[o],index:o,segment:[s,s]};this.rBush_.insert(e.getExtent(),a)}}writeLineStringGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length-1;o<r;++o){const s=n.slice(o,o+2),a={feature:t,geometry:e,index:o,segment:s};this.rBush_.insert(xe(s),a)}}writeMultiLineStringGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length;o<r;++o){const s=n[o];for(let a=0,l=s.length-1;a<l;++a){const h=s.slice(a,a+2),u={feature:t,geometry:e,depth:[o],index:a,segment:h};this.rBush_.insert(xe(h),u)}}}writePolygonGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length;o<r;++o){const s=n[o];for(let a=0,l=s.length-1;a<l;++a){const h=s.slice(a,a+2),u={feature:t,geometry:e,depth:[o],index:a,segment:h};this.rBush_.insert(xe(h),u)}}}writeMultiPolygonGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length;o<r;++o){const s=n[o];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),g={feature:t,geometry:e,depth:[a,o],index:u,segment:c};this.rBush_.insert(xe(c),g)}}}}writeCircleGeometry_(t,e){const n=e.getCenter(),o={feature:t,geometry:e,index:Ug,segment:[n,n]},r={feature:t,geometry:e,index:Zr,segment:[n,n]},s=[o,r];o.featureSegments=s,r.featureSegments=s,this.rBush_.insert(yr(n),o);let a=e;this.rBush_.insert(a.getExtent(),r)}writeGeometryCollectionGeometry_(t,e){const n=e.getGeometriesArray();for(let o=0;o<n.length;++o){const r=n[o],s=this.SEGMENT_WRITERS_[r.getType()];s(t,r)}}createOrUpdateVertexFeature_(t,e,n){let o=this.vertexFeature_;return o?o.getGeometry().setCoordinates(t):(o=new Ti(new ni(t)),this.vertexFeature_=o,this.overlay_.getSource().addFeature(o)),o.set("features",e),o.set("geometries",n),o}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=[],o=[];for(let r=0,s=this.dragSegments_.length;r<s;++r){const a=this.dragSegments_[r],l=a[0],h=l.feature;n.includes(h)||n.push(h);const u=l.geometry;o.includes(u)||o.push(u);const d=l.depth;let c;const g=l.segment,f=a[1];for(;e.length<u.getStride();)e.push(g[f][e.length]);switch(u.getType()){case"Point":c=e,g[0]=e,g[1]=e;break;case"MultiPoint":c=u.getCoordinates(),c[l.index]=e,g[0]=e,g[1]=e;break;case"LineString":c=u.getCoordinates(),c[l.index+f]=e,g[f]=e;break;case"MultiLineString":c=u.getCoordinates(),c[d[0]][l.index+f]=e,g[f]=e;break;case"Polygon":c=u.getCoordinates(),c[d[0]][l.index+f]=e,g[f]=e;break;case"MultiPolygon":c=u.getCoordinates(),c[d[1]][d[0]][l.index+f]=e,g[f]=e;break;case"Circle":if(g[0]=e,g[1]=e,l.index===Ug)this.changingFeature_=!0,u.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0,t.map.getView().getProjection();let m=rc(Zt(u.getCenter()),Zt(e));u.setRadius(m),this.changingFeature_=!1}break}c&&this.setGeometryCoordinates_(u,c)}this.createOrUpdateVertexFeature_(e,n,o)}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 o=[],r=n.getGeometry().getCoordinates(),s=xe([r]),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 g=$(d.geometry);const f=d.depth;if(f&&(g+="-"+f.join("-")),l[g]||(l[g]=new Array(2)),d.geometry.getType()==="Circle"&&d.index===Zr){const m=$g(e,d);ei(m,r)&&!l[g][0]&&(this.dragSegments_.push([d,0]),l[g][0]=d);continue}if(ei(c[0],r)&&!l[g][0]){this.dragSegments_.push([d,0]),l[g][0]=d;continue}if(ei(c[1],r)&&!l[g][1]){if(l[g][0]&&l[g][0].index===0){let m=d.geometry.getCoordinates();switch(d.geometry.getType()){case"LineString":case"MultiLineString":continue;case"MultiPolygon":m=m[f[1]];case"Polygon":if(d.index!==m[f[0]].length-2)continue;break}}this.dragSegments_.push([d,1]),l[g][1]=d;continue}$(c)in this.vertexSegments_&&!l[g][0]&&!l[g][1]&&this.insertVertexCondition_(t)&&o.push(d)}o.length&&this.willModifyFeatures_(t,[o]);for(let h=o.length-1;h>=0;--h)this.insertVertex_(o[h],r)}return!!this.vertexFeature_}handleUpEvent(t){for(let e=this.dragSegments_.length-1;e>=0;--e){const n=this.dragSegments_[e][0],o=n.geometry;if(o.getType()==="Circle"){const r=o.getCenter(),s=n.featureSegments[0],a=n.featureSegments[1];s.segment[0]=r,s.segment[1]=r,a.segment[0]=r,a.segment[1]=r,this.rBush_.update(yr(r),s);let l=o;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 o=n||e.getCoordinateFromPixel(t);e.getView().getProjection();const r=function(l,h){return qg(o,l)-qg(o,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=Hi(yr(o,Vg)),h=e.getView().getResolution()*this.pixelTolerance_,u=Yl(ui(l,h,Vg));s=this.rBush_.getInExtent(u)}if(s&&s.length>0){const l=s.sort(r)[0],h=l.segment;let u=$g(o,l);const d=e.getPixelFromCoordinate(u);let c=rc(t,d);if(a||c<=this.pixelTolerance_){const g={};if(g[$(h)]=!0,this.snapToPointer_||(this.delta_[0]=u[0]-o[0],this.delta_[1]=u[1]-o[1]),l.geometry.getType()==="Circle"&&l.index===Zr)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(u,[l.feature],[l.geometry]);else{const f=e.getPixelFromCoordinate(h[0]),m=e.getPixelFromCoordinate(h[1]),p=wi(d,f),_=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[$(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=$(s[y].geometry);w in v||(v[w]=!0,g[$(k)]=!0)}else break}}this.vertexSegments_=g;return}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)}insertVertex_(t,e){const n=t.segment,o=t.feature,r=t.geometry,s=t.depth,a=t.index;let l;for(;e.length<r.getStride();)e.push(0);switch(r.getType()){case"MultiLineString":l=r.getCoordinates(),l[s[0]].splice(a+1,0,e);break;case"Polygon":l=r.getCoordinates(),l[s[0]].splice(a+1,0,e);break;case"MultiPolygon":l=r.getCoordinates(),l[s[1]][s[0]].splice(a+1,0,e);break;case"LineString":l=r.getCoordinates(),l.splice(a+1,0,e);break;default:return}this.setGeometryCoordinates_(r,l);const h=this.rBush_;h.remove(t),this.updateSegmentIndices_(r,a,s,1);const u={segment:[n[0],e],feature:o,geometry:r,depth:s,index:a};h.insert(xe(u.segment),u),this.dragSegments_.push([u,1]);const d={segment:[e,n[1]],feature:o,geometry:r,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,o,r,s,a,l,h,u,d,c,g,f;for(l=t.length-1;l>=0;--l)s=t[l],g=s[0],f=$(g.feature),g.depth&&(f+="-"+g.depth.join("-")),f in e||(e[f]={}),s[1]===0?(e[f].right=g,e[f].index=g.index):s[1]==1&&(e[f].left=g,e[f].index=g.index+1);for(f in e){switch(c=e[f].right,u=e[f].left,h=e[f].index,d=h-1,u!==void 0?g=u:g=c,d<0&&(d=0),a=g.geometry,r=a.getCoordinates(),o=r,n=!1,a.getType()){case"MultiLineString":r[g.depth[0]].length>2&&(r[g.depth[0]].splice(h,1),n=!0);break;case"LineString":r.length>2&&(r.splice(h,1),n=!0);break;case"MultiPolygon":o=o[g.depth[1]];case"Polygon":o=o[g.depth[0]],o.length>4&&(h==o.length-1&&(h=0),o.splice(h,1),n=!0,h===0&&(o.pop(),o.push(o[0]),d=o.length-1));break}if(n){this.setGeometryCoordinates_(a,r);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:g.depth,feature:g.feature,geometry:g.geometry,index:d,segment:m};this.rBush_.insert(xe(p.segment),p)}this.updateSegmentIndices_(a,h,g.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,o){this.rBush_.forEachInExtent(t.getExtent(),function(r){r.geometry===t&&(n===void 0||r.depth===void 0||Zi(r.depth,n))&&r.index>e&&(r.index+=o)})}}function ex(i,t){return i.index-t.index}function qg(i,t,e){const n=t.geometry;if(n.getType()==="Circle"){let r=n;if(t.index===Zr){const s=wi(r.getCenter(),Zt(i)),a=Math.sqrt(s)-r.getRadius();return a*a}}const o=Zt(i);return Wo[0]=Zt(t.segment[0]),Wo[1]=Zt(t.segment[1]),D0(o,Wo)}function $g(i,t,e){const n=t.geometry;if(n.getType()==="Circle"&&t.index===Zr)return To(n.getClosestPoint(Zt(i)));const o=Zt(i);return Wo[0]=Zt(t.segment[0]),Wo[1]=Zt(t.segment[1]),To(Ol(o,Wo))}function ix(){const i=hg();return function(t,e){return i.Point}}const nx=tx;function Hg(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=xo),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=$(t),o=t.getGeometry();if(o){const r=this.GEOMETRY_SEGMENTERS_[o.getType()];if(r){this.indexedFeaturesExtents_[n]=o.getExtent(Ge());const s=[];if(r(s,o),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]=ft(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=Hg(t);this.addFeature(e)}handleFeatureRemove_(t){const e=Hg(t);this.removeFeature(e)}handleFeatureChange_(t){const e=t.target;if(this.handlingDownUpSequence){const n=$(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,o=$(t),r=this.indexedFeaturesExtents_[o];if(r){const s=this.rBush_,a=[];s.forEachInExtent(r,function(l){t===l.feature&&a.push(l)});for(let l=a.length-1;l>=0;--l)s.remove(a[l])}n&&(Ft(this.featureChangeListenerKeys_[o]),delete this.featureChangeListenerKeys_[o])}setMap(t){const e=this.getMap(),n=this.featuresListenerKeys_,o=this.getFeatures_();e&&(n.forEach(Ft),n.length=0,o.forEach(this.forEachFeatureRemove_.bind(this))),super.setMap(t),t&&(this.features_?n.push(ft(this.features_,oe.ADD,this.handleFeatureAdd_,this),ft(this.features_,oe.REMOVE,this.handleFeatureRemove_,this)):this.source_&&n.push(ft(this.source_,we.ADDFEATURE,this.handleFeatureAdd_,this),ft(this.source_,we.REMOVEFEATURE,this.handleFeatureRemove_,this)),o.forEach(this.forEachFeatureAdd_.bind(this)))}snapTo(t,e,n){const o=n.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+this.pixelTolerance_]),r=n.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_]),s=xe([o,r]),a=this.rBush_.getInExtent(s),l=a.length;if(l===0)return null;n.getView().getProjection();const h=Zt(e);let u,d=1/0;const c=this.pixelTolerance_*this.pixelTolerance_,g=()=>{if(u){const f=n.getPixelFromCoordinate(u);if(wi(t,f)<=c)return{vertex:u,vertexPixel:[Math.round(f[0]),Math.round(f[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=Zt(_),y=wi(h,v);y<d&&(u=_,d=y)})}const f=g();if(f)return f}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=To(A0(h,v))}else{const[v,y]=_.segment;y&&(tu[0]=Zt(v),tu[1]=Zt(y),p=Ol(h,tu))}if(p){const v=wi(h,p);v<d&&(u=p,d=v)}}const f=g();if(f)return f}return null}updateFeature_(t){this.removeFeature(t,!1),this.addFeature(t,!1)}segmentCircleGeometry_(t,e){this.getMap().getView().getProjection();const r=Xv(e).getCoordinates()[0];for(let s=0,a=r.length-1;s<a;++s)t.push(r.slice(s,s+2))}segmentGeometryCollectionGeometry_(t,e){const n=e.getGeometriesArray();for(let o=0;o<n.length;++o){const r=this.GEOMETRY_SEGMENTERS_[n[o].getType()];r&&r(t,n[o])}}segmentLineStringGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length-1;o<r;++o)t.push(n.slice(o,o+2))}segmentMultiLineStringGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length;o<r;++o){const s=n[o];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 o=0,r=n.length;o<r;++o){const s=n[o];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 o=0,r=n.length;o<r;++o){const s=n[o];for(let a=0,l=s.length-1;a<l;++a)t.push(s.slice(a,a+2))}}}const rx=ox,sx=.5,ax=10,Kg=.25;class lx{constructor(t,e,n,o,r,s){this.sourceProj_=t,this.targetProj_=e;let a={};const l=br(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_=o,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!o&&!!this.sourceProj_.getExtent()&&Nt(o)==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=$i(n),u=Ws(n),d=Bs(n),c=js(n),g=this.transformInv_(h),f=this.transformInv_(u),m=this.transformInv_(d),p=this.transformInv_(c),_=ax+(s?Math.max(0,Math.ceil(Math.log2(Al(n)/(s*s*256*256)))):0);if(this.addQuad_(h,u,d,c,g,f,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,o,r,s){this.triangles_.push({source:[o,r,s],target:[t,e,n]})}addQuad_(t,e,n,o,r,s,a,l,h){const u=xe([r,s,a,l]),d=this.sourceWorldWidth_?Nt(u)/this.sourceWorldWidth_:null,c=this.sourceWorldWidth_,g=this.sourceProj_.canWrapX()&&d>.5&&d<1;let f=!1;if(h>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const p=xe([t,e,n,o]);f=Nt(p)/this.targetWorldWidth_>Kg||f}!g&&this.sourceProj_.isGlobal()&&d&&(f=d>Kg||f)}if(!f&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!$t(u,this.maxSourceExtent_))return;let m=0;if(!f&&(!isFinite(r[0])||!isFinite(r[1])||!isFinite(s[0])||!isFinite(s[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(l[0])||!isFinite(l[1]))){if(h>0)f=!0;else if(m=(!isFinite(r[0])||!isFinite(r[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(!f){const p=[(t[0]+n[0])/2,(t[1]+n[1])/2],_=this.transformInv_(p);let v;g?v=(Ui(r[0],c)+Ui(a[0],c))/2-Ui(_[0],c):v=(r[0]+a[0])/2-_[0];const y=(r[1]+a[1])/2-_[1];f=v*v+y*y>this.errorThresholdSquared_}if(f){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=[(o[0]+t[0])/2,(o[1]+t[1])/2],y=this.transformInv_(v);this.addQuad_(t,e,p,v,r,s,_,y,h-1),this.addQuad_(v,p,n,o,y,_,a,l,h-1)}else{const p=[(t[0]+e[0])/2,(t[1]+e[1])/2],_=this.transformInv_(p),v=[(n[0]+o[0])/2,(n[1]+o[1])/2],y=this.transformInv_(v);this.addQuad_(t,p,v,o,r,_,y,l,h-1),this.addQuad_(p,e,n,v,_,s,a,y,h-1)}return}}if(g){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}(m&11)==0&&this.addTriangle_(t,n,o,r,a,l),(m&14)==0&&this.addTriangle_(t,n,e,r,a,s),m&&((m&13)==0&&this.addTriangle_(e,o,t,s,l,r),(m&7)==0&&this.addTriangle_(e,o,n,s,l,a))}calculateSourceExtent(){const t=Ge();return this.triangles_.forEach(function(e,n,o){const r=e.source;xr(t,r[0]),xr(t,r[1]),xr(t,r[2])}),t}getTriangles(){return this.triangles_}}const hx=lx;let eu;const Jg=[];function Qg(i,t,e,n,o){i.beginPath(),i.moveTo(0,0),i.lineTo(t,e),i.lineTo(n,o),i.closePath(),i.save(),i.clip(),i.fillRect(0,0,Math.max(t,n)+1,Math.max(e,o)),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)",Qg(i,4,5,4,0),Qg(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 tf(i,t,e,n){const o=Xs(e,t,i);let r=Ys(t,n,e);const s=t.getMetersPerUnit();s!==void 0&&(r*=s);const a=i.getMetersPerUnit();a!==void 0&&(r/=a);const l=i.getExtent();if(!l||Gs(l,o)){const h=Ys(i,r,o)/r;isFinite(h)&&h>0&&(r/=h)}return r}function dx(i,t,e,n){const o=qi(e);let r=tf(i,t,o,n);return(!isFinite(r)||r<=0)&&Rl(e,function(s){return r=tf(i,t,s,n),isFinite(r)&&r>0}),r}function cx(i,t,e,n,o,r,s,a,l,h,u,d){const c=Ae(Math.round(e*i),Math.round(e*t),Jg);if(d||(c.imageSmoothingEnabled=!1),l.length===0)return c.canvas;c.scale(e,e);function g(x){return Math.round(x*e)/e}c.globalCompositeOperation="lighter";const f=Ge();l.forEach(function(x,k,w){ic(f,x.extent)});const m=Nt(f),p=Ue(f),_=Ae(Math.round(e*m/n),Math.round(e*p/n));d||(_.imageSmoothingEnabled=!1);const v=e/n;l.forEach(function(x,k,w){const E=x.extent[0]-f[0],M=-(x.extent[3]-f[3]),S=Nt(x.extent),z=Ue(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,E*v,M*v,S*v,z*v)});const y=$i(s);return a.getTriangles().forEach(function(x,k,w){const E=x.source,M=x.target;let S=E[0][0],z=E[0][1],P=E[1][0],G=E[1][1],A=E[2][0],at=E[2][1];const B=g((M[0][0]-y[0])/r),Z=g(-(M[0][1]-y[1])/r),F=g((M[1][0]-y[0])/r),V=g(-(M[1][1]-y[1])/r),D=g((M[2][0]-y[0])/r),H=g(-(M[2][1]-y[1])/r),Y=S,I=z;S=0,z=0,P-=Y,G-=I,A-=Y,at-=I;const rt=[[P,G,0,0,F-B],[A,at,0,0,D-B],[0,0,P,G,V-Z],[0,0,A,at,H-Z]],b=u0(rt);if(!!b){if(c.save(),c.beginPath(),ux()||!d){c.moveTo(F,V);const T=4,q=B-F,C=Z-V;for(let K=0;K<T;K++)c.lineTo(F+g((K+1)*q/T),V+g(K*C/(T-1))),K!=T-1&&c.lineTo(F+g((K+1)*q/T),V+g((K+1)*C/(T-1)));c.lineTo(D,H)}else c.moveTo(F,V),c.lineTo(B,Z),c.lineTo(D,H);c.clip(),c.transform(b[0],b[2],b[1],b[3],B,Z),c.translate(f[0]-Y,f[3]-I),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 E=x.target,M=(E[0][0]-y[0])/r,S=-(E[0][1]-y[1])/r,z=(E[1][0]-y[0])/r,P=-(E[1][1]-y[1])/r,G=(E[2][0]-y[0])/r,A=-(E[2][1]-y[1])/r;c.beginPath(),c.moveTo(z,P),c.lineTo(M,S),c.lineTo(G,A),c.closePath(),c.stroke()}),c.restore()),c.canvas}class gx extends Ma{constructor(t,e,n,o,r,s,a,l,h,u,d,c){super(r,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_=o,this.wrappedTileCoord_=s||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const g=o.getTileCoordExtent(this.wrappedTileCoord_),f=this.targetTileGrid_.getExtent();let m=this.sourceTileGrid_.getExtent();const p=f?Wn(g,f):g;if(Al(p)===0){this.state=N.EMPTY;return}const _=t.getExtent();_&&(m?m=Wn(m,_):m=_);const v=o.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]=Vt(k[1],m[1],m[3]),k[3]=Vt(k[3],m[1],m[3])):k=Wn(k,m)),!Al(k))this.state=N.EMPTY;else{const w=e.getTileRangeForExtentAndZ(k,this.sourceZ_);for(let E=w.minX;E<=w.maxX;E++)for(let M=w.minY;M<=w.maxY;M++){const S=h(this.sourceZ_,E,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,o){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),o=typeof n=="number"?n:n[0],r=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(o,r,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,o){const r=e.getState();if(r==N.IDLE||r==N.LOADING){t++;const s=ft(e,tt.CHANGE,function(a){const l=e.getState();(l==N.LOADED||l==N.ERROR||l==N.EMPTY)&&(Ft(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,o){e.getState()==N.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Ft),this.sourcesListenerKeys_=null}release(){this.canvas_&&(kl(this.canvas_.getContext("2d")),Jg.push(this.canvas_),this.canvas_=null),super.release()}}const ef=gx;class fx extends Sg{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 Yg(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),n=t.getState(),o=e.getUseInterimTilesOnError();return n==N.LOADED||n==N.EMPTY||n==N.ERROR&&!o}getTile(t,e,n,o){const r=o.pixelRatio,s=o.viewState.projection,a=this.getLayer();let h=a.getSource().getTile(t,e,n,r,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(),o=Jt(e.pixelToCoordinateTransform,t.slice()),r=n.getExtent();if(r&&!Gs(r,o))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 g=u.getTileCoordForCoordAndZ(o,c),f=h.getTile(c,g[1],g[2],s,a);if(!(f instanceof Gg||f instanceof ef))return null;if(f.getState()!==N.LOADED)continue;const m=u.getOrigin(c),p=be(u.getTileSize(c)),_=u.getResolution(c),v=Math.floor(d*((o[0]-m[0])/_-g[1]*p[0])),y=Math.floor(d*((m[1]-o[1])/_-g[2]*p[1])),x=Math.round(d*h.getGutterForProjection(l.projection));return this.getImageData(f.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],o=t.viewState,r=o.projection,s=o.resolution,a=o.center,l=o.rotation,h=t.pixelRatio,u=this.getLayer(),d=u.getSource(),c=d.getRevision(),g=d.getTileGridForProjection(r),f=g.getZForResolution(s,d.zDirection),m=g.getResolution(f);let p=t.extent;const _=t.viewState.resolution,v=d.getTilePixelRatio(h),y=Math.round(Nt(p)/_*h),x=Math.round(Ue(p)/_*h),k=n.extent&&Hi(n.extent);k&&(p=Wn(p,Hi(n.extent)));const w=m*y/2/v,E=m*x/2/v,M=[a[0]-w,a[1]-E,a[0]+w,a[1]+E],S=g.getTileRangeForExtentAndZ(p,f),z={};z[f]={};const P=this.createLoadedTileFinder(d,r,z),G=this.tmpExtent,A=this.tmpTileRange_;this.newTiles_=!1;const at=l?Dl(o.center,_,l,t.size):void 0;for(let rt=S.minX;rt<=S.maxX;++rt)for(let b=S.minY;b<=S.maxY;++b){if(l&&!g.tileCoordIntersectsViewport([f,rt,b],at))continue;const T=this.getTile(f,rt,b,t);if(this.isDrawableTile(T)){const K=$(this);if(T.getState()==N.LOADED){z[f][T.tileCoord.toString()]=T;let U=T.inTransition(K);U&&n.opacity!==1&&(T.endTransition(K),U=!1),!this.newTiles_&&(U||!this.renderedTiles.includes(T))&&(this.newTiles_=!0)}if(T.getAlpha(K,t.time)===1)continue}const q=g.getTileCoordChildTileRange(T.tileCoord,A,G);let C=!1;q&&(C=P(f+1,q)),C||g.forEachTileCoordParentTileRange(T.tileCoord,P,A,G)}const B=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 Z=_c(this.pixelTransform);this.useContainer(e,Z,this.getBackground(t));const F=this.context,V=F.canvas;Vl(this.inversePixelTransform,this.pixelTransform),Mi(this.tempTransform,y/2,x/2,B,B,0,-y/2,-x/2),V.width!=y||V.height!=x?(V.width=y,V.height=x):this.containerReused||F.clearRect(0,0,y,x),k&&this.clipUnrotated(F,t,k),d.getInterpolate()||(F.imageSmoothingEnabled=!1),this.preRender(F,t),this.renderedTiles.length=0;let D=Object.keys(z).map(Number);D.sort(Pn);let H,Y,I;n.opacity===1&&(!this.containerReused||d.getOpaque(t.viewState.projection))?D=D.reverse():(H=[],Y=[]);for(let rt=D.length-1;rt>=0;--rt){const b=D[rt],T=d.getTilePixelSize(b,h,r),C=g.getResolution(b)/m,K=T[0]*C*B,U=T[1]*C*B,_t=g.getTileCoordForCoordAndZ($i(M),b),Et=g.getTileCoordExtent(_t),yt=Jt(this.tempTransform,[v*(Et[0]-M[0])/m,v*(M[3]-Et[3])/m]),Ct=v*d.getGutterForProjection(r),Lt=z[b];for(const Dt in Lt){const jt=Lt[Dt],O=jt.tileCoord,ut=_t[1]-O[1],pt=Math.round(yt[0]-(ut-1)*K),kt=_t[2]-O[2],xt=Math.round(yt[1]-(kt-1)*U),st=Math.round(yt[0]-ut*K),nt=Math.round(yt[1]-kt*U),wt=pt-st,It=xt-nt,Bt=f===b,bt=Bt&&jt.getAlpha($(this),t.time)!==1;let dt=!1;if(!bt)if(H){I=[st,nt,st+wt,nt,st+wt,nt+It,st,nt+It];for(let Ot=0,St=H.length;Ot<St;++Ot)if(f!==b&&b<Y[Ot]){const ct=H[Ot];$t([st,nt,st+wt,nt+It],[ct[0],ct[3],ct[4],ct[7]])&&(dt||(F.save(),dt=!0),F.beginPath(),F.moveTo(I[0],I[1]),F.lineTo(I[2],I[3]),F.lineTo(I[4],I[5]),F.lineTo(I[6],I[7]),F.moveTo(ct[6],ct[7]),F.lineTo(ct[4],ct[5]),F.lineTo(ct[2],ct[3]),F.lineTo(ct[0],ct[1]),F.clip())}H.push(I),Y.push(b)}else F.clearRect(st,nt,wt,It);this.drawTileImage(jt,t,st,nt,wt,It,Ct,Bt),H&&!bt?(dt&&F.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_||!So(this.renderedExtent_,M),this.renderedExtent_=M,this.renderedPixelRatio=h,this.renderedProjection=r,this.manageTilePyramid(t,d,g,h,r,p,f,u.getPreload()),this.scheduleExpireCache(t,d),this.postRender(F,t),n.extent&&F.restore(),F.imageSmoothingEnabled=!0,Z!==V.style.transform&&(V.style.transform=Z),this.container}drawTileImage(t,e,n,o,r,s,a,l){const h=this.getTileImage(t);if(!h)return;const u=$(this),d=e.layerStatesArray[e.layerIndex],c=d.opacity*(l?t.getAlpha(u,e.time):1),g=c!==this.context.globalAlpha;g&&(this.context.save(),this.context.globalAlpha=c),this.context.drawImage(h,a,a,h.width-2*a,h.height-2*a,n,o,r,s),g&&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(o,r,s){const a=$(o);a in s.usedTiles&&o.expireCache(s.viewState.projection,s.usedTiles[a])}.bind(null,e);t.postRenderFunctions.push(n)}}updateUsedTiles(t,e,n){const o=$(e);o in t||(t[o]={}),t[o][n.getKey()]=!0}manageTilePyramid(t,e,n,o,r,s,a,l,h){const u=$(e);u in t.wantedTiles||(t.wantedTiles[u]={});const d=t.wantedTiles[u],c=t.tileQueue,g=n.getMinZoom(),f=t.viewState.rotation,m=f?Dl(t.viewState.center,t.viewState.resolution,f,t.size):void 0;let p=0,_,v,y,x,k,w;for(w=g;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)f&&!n.tileCoordIntersectsViewport([w,x,k],m)||(a-w<=l?(++p,_=e.getTile(w,x,k,o,r),_.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,r));e.updateCacheSize(p,r)}}const nf=fx,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 nf{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.tmpTransform_=qe()}prepareTile(t,e,n){let o;const r=t.getState();return(r===N.LOADED||r===N.ERROR)&&(this.updateExecutorGroup_(t,e,n),this.tileImageNeedsRender_(t)&&(o=!0)),o}getTile(t,e,n,o){const r=o.pixelRatio,s=o.viewState,a=s.resolution,l=s.projection,h=this.getLayer(),u=h.getSource().getTile(t,e,n,r,l),d=o.viewHints,c=!(d[qt.ANIMATING]||d[qt.INTERACTING]);return(c||!u.wantedResolution)&&(u.wantedResolution=a),this.prepareTile(u,r,l)&&(c||Date.now()-o.time<8)&&h.getRenderMode()!=="vector"&&this.renderTileImage_(u,o),super.getTile(t,e,n,o)}isDrawableTile(t){const e=this.getLayer();return super.isDrawableTile(t)&&(e.getRenderMode()==="vector"?$(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 o=this.getLayer(),r=o.getRevision(),s=o.getRenderOrder()||null,a=t.wantedResolution,l=t.getReplayState(o);if(!l.dirty&&l.renderedResolution===a&&l.renderedRevision==r&&l.renderedRenderOrder==s)return;const h=o.getSource(),u=o.getDeclutter(),d=h.getTileGrid(),g=h.getTileGridForProjection(n).getTileCoordExtent(t.wrappedTileCoord),f=h.getSourceTiles(e,n,t),m=$(o);delete t.hitDetectionImageData[m],t.executorGroups[m]=[],u&&(t.declutterExecutorGroups[m]=[]),l.dirty=!1;for(let p=0,_=f.length;p<_;++p){const v=f[p];if(v.getState()!=N.LOADED)continue;const y=v.tileCoord,x=d.getTileCoordExtent(y),k=Wn(g,x),w=ui(k,o.getRenderBuffer()*a,this.tmpExtent),E=So(x,k)?null:w,M=new xa(0,w,a,e),S=u?new xa(0,k,a,e):void 0,z=Pg(a,e),P=function(Z){let F;const V=Z.getStyleFunction()||o.getStyleFunction();if(V&&(F=V(Z,a)),F){const D=this.renderFeature(Z,z,F,M,S);l.dirty=l.dirty||D}},G=v.getFeatures();s&&s!==l.renderedRenderOrder&&G.sort(s);for(let Z=0,F=G.length;Z<F;++Z){const V=G[Z];(!E||$t(E,V.getGeometry().getExtent()))&&P.call(this,V)}const A=M.finish(),at=o.getRenderMode()!=="vector"&&u&&f.length===1?null:k,B=new ba(at,a,e,h.getOverlaps(),A,o.getRenderBuffer());if(t.executorGroups[m].push(B),S){const Z=new ba(null,a,e,h.getOverlaps(),S.finish(),o.getRenderBuffer());t.declutterExecutorGroups[m].push(Z)}}l.renderedRevision=r,l.renderedRenderOrder=s,l.renderedResolution=a}forEachFeatureAtCoordinate(t,e,n,o,r){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={},g=function(p,_,v){let y=p.getId();y===void 0&&(y=$(p));const x=c[y];if(x){if(x!==!0&&v<x.distanceSq){if(v===0)return c[y]=!0,r.splice(r.lastIndexOf(x),1),o(p,l,_);x.geometry=_,x.distanceSq=v}}else{if(v===0)return c[y]=!0,o(p,l,_);r.push(c[y]={feature:p,layer:l,geometry:_,distanceSq:v,callback:o})}},f=this.renderedTiles;let m;for(let p=0,_=f.length;!m&&p<_;++p){const v=f[p],y=u.getTileCoordExtent(v.wrappedTileCoord);if(!$t(y,d))continue;const x=$(l),k=[v.executorGroups[x]],w=v.declutterExecutorGroups[x];w&&k.push(w),k.some(E=>{const M=E===w?e.declutterTree.all().map(S=>S.value):null;for(let S=0,z=E.length;S<z;++S)if(m=E[S].forEachFeatureAtCoordinate(t,s,a,n,g,M),m)return!0})}return m}getFeatures(t){return new Promise(function(e,n){const o=this.getLayer(),r=$(o),s=o.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 g;for(let y=0,x=this.renderedTiles.length;y<x;++y)if(c.toString()===this.renderedTiles[y].tileCoord.toString()){if(g=this.renderedTiles[y],g.getState()===N.LOADED){const k=u.getTileCoordExtent(g.tileCoord);s.getWrapX()&&a.canWrapX()&&!Bn(l,k)&&Nl(d,a);break}g=void 0}if(!g||g.loadingSourceTiles>0){e([]);return}const f=u.getTileCoordExtent(g.wrappedTileCoord),m=$i(f),p=[(d[0]-m[0])/h,(m[1]-d[1])/h],_=g.getSourceTiles().reduce(function(y,x){return y.concat(x.getFeatures())},[]);let v=g.hitDetectionImageData[r];if(!v&&!this.animatingOrInteracting_){const y=be(u.getTileSize(u.getZForResolution(h,s.zDirection))),x=this.renderedRotation_,k=[this.getRenderTransform(u.getTileCoordCenter(g.wrappedTileCoord),h,0,je,y[0]*je,y[1]*je,0)];v=zg(y,k,_,o.getStyleFunction(),u.getTileCoordExtent(g.wrappedTileCoord),g.getReplayState(o).renderedResolution,x),g.hitDetectionImageData[r]=v}e(Rg(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 o=t.viewHints,r=!(o[qt.ANIMATING]||o[qt.INTERACTING]),s=this.renderedTiles;for(let a=0,l=s.length;a<l;++a){const h=s[a],u=h.declutterExecutorGroups[$(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,r,void 0,t.declutterTree)}e.globalAlpha=n}getTileRenderTransform(t,e){const n=e.pixelRatio,o=e.viewState,r=o.center,s=o.resolution,a=o.rotation,l=e.size,h=Math.round(l[0]*n),u=Math.round(l[1]*n),c=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),g=t.tileCoord,f=c.getTileCoordExtent(t.wrappedTileCoord),m=c.getTileCoordExtent(g,this.tmpExtent)[0]-f[0];return Xl(Ul(this.inversePixelTransform.slice(),1/n,1/n),this.getRenderTransform(r,s,a,n,h,u,m))}postRender(t,e){const n=e.viewHints,o=!(n[qt.ANIMATING]||n[qt.INTERACTING]);this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;const r=this.getLayer(),s=r.getRenderMode(),a=t.globalAlpha;t.globalAlpha=r.getOpacity();const l=px[s],h=e.viewState,u=h.rotation,d=r.getSource(),g=d.getTileGridForProjection(h.projection).getZForResolution(h.resolution,d.zDirection),f=this.renderedTiles,m=[],p=[];let _=!0;for(let v=f.length-1;v>=0;--v){const y=f[v];_=_&&!y.getReplayState(r).dirty;const x=y.executorGroups[$(r)].filter(S=>S.hasExecutors(l));if(x.length===0)continue;const k=this.getTileRenderTransform(y,e),w=y.tileCoord[0];let E=!1;const M=x[0].getClipCoords(k);if(M){for(let S=0,z=m.length;S<z;++S)if(g!==w&&w<p[S]){const P=m[S];$t([M[0],M[3],M[4],M[7]],[P[0],P[3],P[4],P[7]])&&(E||(t.save(),E=!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(P[6],P[7]),t.lineTo(P[4],P[5]),t.lineTo(P[2],P[3]),t.lineTo(P[0],P[1]),t.clip())}m.push(M),p.push(w)}for(let S=0,z=x.length;S<z;++S)x[S].execute(t,1,k,u,o,l);E&&t.restore()}t.globalAlpha=a,this.ready=_,super.postRender(t,e)}renderFeature(t,e,n,o,r){if(!n)return!1;let s=!1;if(Array.isArray(n))for(let a=0,l=n.length;a<l;++a)s=ka(o,t,n[a],e,this.boundHandleStyleImageChange_,void 0,r)||s;else s=ka(o,t,n,e,this.boundHandleStyleImageChange_,void 0,r);return s}tileImageNeedsRender_(t){const e=this.getLayer();if(e.getRenderMode()==="vector")return!1;const n=t.getReplayState(e),o=e.getRevision(),r=t.wantedResolution;return n.renderedTileResolution!==r||n.renderedTileRevision!==o}renderTileImage_(t,e){const n=this.getLayer(),o=t.getReplayState(n),r=n.getRevision(),s=t.executorGroups[$(n)];o.renderedTileRevision=r;const a=t.wrappedTileCoord,l=a[0],h=n.getSource();let u=e.pixelRatio;const c=e.viewState.projection,g=h.getTileGridForProjection(c),f=g.getResolution(t.tileCoord[0]),m=e.pixelRatio/t.wantedResolution*f,p=g.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 E=pc(this.tmpTransform_);Ul(E,y,y),_.setTransform.apply(_,E)}const x=g.getTileCoordExtent(a,this.tmpExtent),k=m/p,w=pc(this.tmpTransform_);Ul(w,k,-k),X0(w,-x[0],-x[3]);for(let E=0,M=s.length;E<M;++E)s[E].execute(_,y,w,0,!0,mx[n.getRenderMode()]);o.renderedTileResolution=t.wantedResolution}}const _x=vx,un={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class yx extends kg{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";gt(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,gt(Vp(this.resolutions_,function(o,r){return r-o},!0),17);let e;if(!t.origins){for(let o=0,r=this.resolutions_.length-1;o<r;++o)if(!e)e=this.resolutions_[o]/this.resolutions_[o+1];else if(this.resolutions_[o]/this.resolutions_[o+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,gt(this.origins_.length==this.resolutions_.length,20));const n=t.extent;n!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=$i(n)),gt(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,t.tileSizes!==void 0&&(this.tileSizes_=t.tileSizes,gt(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=t.tileSize!==void 0?t.tileSize:this.tileSizes_?null:Ql,gt(!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(o,r){const s=new Yg(Math.min(0,o[0]),Math.max(o[0]-1,-1),Math.min(0,o[1]),Math.max(o[1]-1,-1));if(n){const a=this.getTileRangeForExtentAndZ(n,r);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 o=this.getTileRangeForExtentAndZ(t,e);for(let r=o.minX,s=o.maxX;r<=s;++r)for(let a=o.minY,l=o.maxY;a<=l;++a)n([e,r,a])}forEachTileCoordParentTileRange(t,e,n,o){let r,s,a,l=null,h=t[0]-1;for(this.zoomFactor_===2?(s=t[1],a=t[2]):l=this.getTileCoordExtent(t,o);h>=this.minZoom;){if(this.zoomFactor_===2?(s=Math.floor(s/2),a=Math.floor(a/2),r=Bo(s,s,a,a,n)):r=this.getTileRangeForExtentAndZ(l,h,n),e(h,r))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 r=t[1]*2,s=t[2]*2;return Bo(r,r+1,s,s+1,e)}const o=this.getTileCoordExtent(t,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(o,t[0]+1,e)}return null}getTileRangeForTileCoordAndZ(t,e,n){if(e>this.maxZoom||e<this.minZoom)return null;const o=t[0],r=t[1],s=t[2];if(e===o)return Bo(r,s,r,s,n);if(this.zoomFactor_){const l=Math.pow(this.zoomFactor_,e-o),h=Math.floor(r*l),u=Math.floor(s*l);if(e<o)return Bo(h,h,u,u,n);const d=Math.floor(l*(r+1))-1,c=Math.floor(l*(s+1))-1;return Bo(h,d,u,c,n)}const a=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(a,e,n)}getTileRangeExtent(t,e,n){const o=this.getOrigin(t),r=this.getResolution(t),s=be(this.getTileSize(t),this.tmpSize_),a=o[0]+e.minX*s[0]*r,l=o[0]+(e.maxX+1)*s[0]*r,h=o[1]+e.minY*s[1]*r,u=o[1]+(e.maxY+1)*s[1]*r;return ti(a,h,l,u,n)}getTileRangeForExtentAndZ(t,e,n){const o=bx;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,o);const r=o[1],s=o[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,o),Bo(r,o[1],s,o[2],n)}getTileCoordCenter(t){const e=this.getOrigin(t[0]),n=this.getResolution(t[0]),o=be(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*o[0]*n,e[1]-(t[2]+.5)*o[1]*n]}getTileCoordExtent(t,e){const n=this.getOrigin(t[0]),o=this.getResolution(t[0]),r=be(this.getTileSize(t[0]),this.tmpSize_),s=n[0]+t[1]*r[0]*o,a=n[1]-(t[2]+1)*r[1]*o,l=s+r[0]*o,h=a+r[1]*o;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,o,r){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 o?(u=Ls(u,dn)-1,d=Ls(d,dn)-1):(u=Ds(u,dn),d=Ds(d,dn)),jg(s,u,d,r)}getTileCoordForXYAndZ_(t,e,n,o,r){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 o?(h=Ls(h,dn)-1,u=Ls(u,dn)-1):(h=Ds(h,dn),u=Ds(u,dn)),jg(n,h,u,r)}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 Vt(n,this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(t,e){return Wc(e,0,e.length,2,this.getTileCoordExtent(t))}calculateTileRanges_(t){const e=this.resolutions_.length,n=new Array(e);for(let o=this.minZoom;o<e;++o)n[o]=this.getTileRangeForExtentAndZ(t,o);this.fullTileRanges_=n}}const nu=kx,ou={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};function of(i){let t=i.getDefaultTileGrid();return t||(t=Cx(i),i.setDefaultTileGrid(t)),t}function wx(i,t,e){const n=t[0],o=i.getTileCoordCenter(t),r=Sa(e);if(Gs(r,o))return t;{const s=Nt(r),a=Math.ceil((r[0]-o[0])/s);return o[0]+=s*a,i.getTileCoordForCoordAndZ(o,n)}}function Mx(i,t,e,n){n=n!==void 0?n:"top-left";const o=sf(i,t,e);return new nu({extent:i,origin:E0(i,n),resolutions:o,tileSize:e})}function rf(i){const t=i||{},e=t.extent||Gt("EPSG:3857").getExtent(),n={extent:e,minZoom:t.minZoom,tileSize:t.tileSize,resolutions:sf(e,t.maxZoom,t.tileSize,t.maxResolution)};return new nu(n)}function sf(i,t,e,n){t=t!==void 0?t:Ec,e=be(e!==void 0?e:Ql);const o=Ue(i),r=Nt(i);n=n>0?n:Math.max(r/e[0],o/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 o=Sa(i);return Mx(o,t,e,n)}function Sa(i){i=Gt(i);let t=i.getExtent();if(!t){const e=180*ko.degrees/i.getMetersPerUnit();t=ti(-e,-e,e,e)}return t}class Ex extends Og{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 Kh(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,o){const r=this.getTileCacheForProjection(t);if(!r)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=jo(e,u,d),h=!1,r.containsKey(l)&&(a=r.get(l),h=a.getState()===N.LOADED,h&&(h=o(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,o,r){return et()}getTileGrid(){return this.tileGrid}getTileGridForProjection(t){return this.tileGrid?this.tileGrid:of(t)}getTileCacheForProjection(t){const e=this.getProjection();return gt(e===null||Zn(e,t),68),this.tileCache}getTilePixelRatio(t){return this.tilePixelRatio_}getTilePixelSize(t,e,n){const o=this.getTileGridForProjection(n),r=this.getTilePixelRatio(e),s=be(o.getTileSize(t),this.tmpSize);return r==1?s:P_(s,r,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)),Yy(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,o){}}class Sx extends Qe{constructor(t,e){super(t),this.tile=e}}const Tx=Ex;function Ix(i,t){const e=/\{z\}/g,n=/\{x\}/g,o=/\{y\}/g,r=/\{-y\}/g;return function(s,a,l){if(s)return i.replace(e,s[0].toString()).replace(n,s[1].toString()).replace(o,s[2].toString()).replace(r,function(){const h=s[0],u=t.getFullTileRange(h);return gt(u,55),(u.getHeight()-s[2]-1).toString()})}}function zx(i,t){const e=i.length,n=new Array(e);for(let o=0;o<e;++o)n[o]=Ix(i[o],t);return Rx(n)}function Rx(i){return i.length===1?i[0]:function(t,e,n){if(t){const o=Zy(t),r=Ui(o,i.length);return i[r](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),o=e[2].charCodeAt(0);let r;for(r=n;r<=o;++r)t.push(i.replace(e[0],String.fromCharCode(r)));return t}if(e=/\{(\d+)-(\d+)\}/.exec(i),e){const n=parseInt(e[2],10);for(let o=parseInt(e[1],10);o<=n;o++)t.push(i.replace(e[0],o.toString()));return t}return t.push(i),t}class ru 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===ru.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=$(e),o=e.getState();let r;o==N.LOADING?(this.tileLoadingKeys_[n]=!0,r=ou.TILELOADSTART):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],r=o==N.ERROR?ou.TILELOADERROR:o==N.LOADED?ou.TILELOADEND:void 0),r!=null&&this.dispatchEvent(new Sx(r,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(zx(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,n){}useTile(t,e,n){const o=jo(t,e,n);this.tileCache.containsKey(o)&&this.tileCache.get(o)}}const af=ru;class Px extends af{constructor(t){const e=t.projection||"EPSG:3857",n=t.extent||Sa(e),o=t.tileGrid||rf({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:o,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 Kh(this.tileCache.highWaterMark),this.overlaps_=t.overlaps==null?!0:t.overlaps,this.tileClass=t.tileClass?t.tileClass:$y,this.tileGrids_={}}getFeaturesInExtent(t){const e=[],n=this.tileCache;if(n.getCount()===0)return e;const o=Wg(n.peekFirstKey())[0],r=this.tileGrid;return n.forEach(function(s){if(s.tileCoord[0]!==o||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($t(t,r.getTileCoordExtent(d))){const c=u.getFeatures();if(c)for(let g=0,f=c.length;g<f;++g){const m=c[g],p=m.getGeometry();$t(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),o=Object.keys(e).reduce((r,s)=>{const a=Wy(s),l=n.peek(a);if(l){const h=l.sourceTiles;for(let u=0,d=h.length;u<d;++u)r[h[u].getKey()]=!0}return r},{});super.expireCache(t,e),this.sourceTileCache.expireCache(o)}getSourceTiles(t,e,n){if(n.getState()===N.IDLE){n.setState(N.LOADING);const o=n.wrappedTileCoord,r=this.getTileGridForProjection(e),s=r.getTileCoordExtent(o),a=o[0],l=r.getResolution(a);ui(s,-l,s);const h=this.tileGrid,u=h.getExtent();u&&Wn(s,u,s);const d=h.getZForResolution(l,this.zDirection);h.forEachTileCoord(s,d,c=>{const g=this.tileUrlFunction(c,t,e),f=this.sourceTileCache.containsKey(g)?this.sourceTileCache.get(g):new this.tileClass(c,g?N.IDLE:N.EMPTY,g,this.format_,this.tileLoadFunction);n.sourceTiles.push(f);const m=f.getState();if(m<N.LOADED){const p=_=>{this.handleTileChange(_);const v=f.getState();if(v===N.LOADED||v===N.ERROR){const y=f.getKey();y in n.errorTileKeys?f.getState()===N.LOADED&&delete n.errorTileKeys[y]:n.loadingSourceTiles--,v===N.ERROR?n.errorTileKeys[y]=!0:f.removeEventListener(tt.CHANGE,p),n.loadingSourceTiles===0&&n.setState(On(n.errorTileKeys)?N.LOADED:N.ERROR)}};f.addEventListener(tt.CHANGE,p),n.loadingSourceTiles++}m===N.IDLE&&(f.extent=h.getTileCoordExtent(c),f.projection=e,f.resolution=h.getResolution(c[0]),this.sourceTileCache.set(g,f),f.load())}),n.loadingSourceTiles||n.setState(n.sourceTiles.some(c=>c.getState()===N.ERROR)?N.ERROR:N.LOADED)}return n.sourceTiles}getTile(t,e,n,o,r){const s=jo(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,r);const d=this.getTileGrid().getExtent(),c=this.getTileGridForProjection(r);if(u&&d){const m=c.getTileCoordExtent(u);ui(m,-c.getResolution(t),m),$t(d,m)||(u=null)}let g=!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){g=g&&!this.tileUrlFunction(y,o,r)}.bind(this))}const f=new Vy(h,g?N.EMPTY:N.IDLE,u,this.getSourceTiles.bind(this,o,r));return f.key=a,l?(f.interimTile=l,f.refreshInterimChain(),this.tileCache.replace(s,f)):this.tileCache.set(s,f),f}getTileGridForProjection(t){const e=t.getCode();let n=this.tileGrids_[e];if(!n){const o=this.tileGrid,r=o.getResolutions().slice(),s=r.map(function(h,u){return o.getOrigin(u)}),a=r.map(function(h,u){return o.getTileSize(u)}),l=Ec+1;for(let h=r.length;h<l;++h)r.push(r[h-1]/2),s.push(s[h-1]),a.push(a[h-1]);n=new nu({extent:o.getExtent(),origins:s,resolutions:r,tileSizes:a}),this.tileGrids_[e]=n}return n}getTilePixelRatio(t){return t}getTilePixelSize(t,e,n){const o=this.getTileGridForProjection(n),r=be(o.getTileSize(t),this.tmpSize);return[Math.round(r[0]*e),Math.round(r[1]*e)]}updateCacheSize(t,e){super.updateCacheSize(t*2,e),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(e).highWaterMark}}const Dx=Px;function Lx(i,t){i.setLoader(function(e,n,o){Fg(t,i.getFormat(),e,n,o,i.onLoad.bind(i),i.onError.bind(i))})}class Ox extends af{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:Fx,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:Gg,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 o in this.tileCacheForProjection){const r=this.tileCacheForProjection[o];r.expireCache(r==n?e:{})}}getGutterForProjection(t){return this.getProjection()&&t&&!Zn(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&&!Zn(this.getProjection(),t)?!1:super.getOpaque(t)}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||Zn(e,t)))return this.tileGrid;{const n=$(t);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=of(t)),this.tileGridForProjection[n]}}getTileCacheForProjection(t){const e=this.getProjection();if(!e||Zn(e,t))return this.tileCache;{const n=$(t);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new Kh(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]}}createTile_(t,e,n,o,r,s){const a=[t,e,n],l=this.getTileCoordForTileUrlFunction(a,r),h=l?this.tileUrlFunction(l,o,r):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,o,r){const s=this.getProjection();if(!s||!r||Zn(s,r))return this.getTileInternal(t,e,n,o,s||r);{const a=this.getTileCacheForProjection(r),l=[t,e,n];let h;const u=Bg(l);a.containsKey(u)&&(h=a.get(u));const d=this.getKey();if(h&&h.key==d)return h;{const c=this.getTileGridForProjection(s),g=this.getTileGridForProjection(r),f=this.getTileCoordForTileUrlFunction(l,r),m=new ef(s,c,r,g,l,f,this.getTilePixelRatio(o),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,o,r){let s=null;const a=jo(t,e,n),l=this.getKey();if(!this.tileCache.containsKey(a))s=this.createTile_(t,e,n,o,r,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,o,r,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 o=$(n);o in this.tileGridForProjection||(this.tileGridForProjection[o]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function Fx(i,t){i.getImage().src=t}const Nx=Ox;class Gx 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 jx=Gx;class Bx extends jx{constructor(t){super(t)}createRenderer(){return new nf(this)}}const Wx=Bx;var Zx={},lf,hf={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 Yr(i){return i=Math.round(i),i<0?0:i>255?255:i}function uf(i){return i<0?0:i>1?1:i}function su(i){return i[i.length-1]==="%"?Yr(parseFloat(i)/100*255):Yr(parseInt(i))}function Ta(i){return i[i.length-1]==="%"?uf(parseFloat(i)/100):uf(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 Yx(i){var t=i.replace(/ /g,"").toLowerCase();if(t in hf)return hf[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("("),o=t.indexOf(")");if(n!==-1&&o+1===t.length){var r=t.substr(0,n),s=t.substr(n+1,o-(n+1)).split(","),a=1;switch(r){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[Yr(au(c,d,l+1/3)*255),Yr(au(c,d,l)*255),Yr(au(c,d,l-1/3)*255),a];default:return null}}return null}try{lf=Zx.parseCSSColor=Yx}catch{}var zt=function(t,e,n,o){o===void 0&&(o=1),this.r=t,this.g=e,this.b=n,this.a=o};zt.parse=function(t){if(!!t){if(t instanceof zt)return t;if(typeof t=="string"){var e=lf(t);if(!!e)return new zt(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},zt.prototype.toString=function(){var t=this.toArray(),e=t[0],n=t[1],o=t[2],r=t[3];return"rgba("+Math.round(e)+","+Math.round(n)+","+Math.round(o)+","+r+")"},zt.prototype.toArray=function(){var t=this,e=t.r,n=t.g,o=t.b,r=t.a;return r===0?[0,0,0,0]:[e*255/r,n*255/r,o*255/r,r]},zt.prototype.toArray01=function(){var t=this,e=t.r,n=t.g,o=t.b,r=t.a;return r===0?[0,0,0,0]:[e/r,n/r,o/r,r]},zt.prototype.toArray01PremultipliedAlpha=function(){var t=this,e=t.r,n=t.g,o=t.b,r=t.a;return[e,n,o,r]},zt.black=new zt(0,0,0,1),zt.white=new zt(1,1,1,1),zt.transparent=new zt(0,0,0,0),zt.red=new zt(1,0,0,1),zt.blue=new zt(0,0,1,1);function Xr(i){return typeof i=="object"?["literal",i]:i}function Xx(i,t){var e=i.stops;if(!e)return Ux(i,t);var n=e&&typeof e[0][0]=="object",o=n||i.property!==void 0,r=n||!o;return e=e.map(function(s){return!o&&t.tokens&&typeof s[1]=="string"?[s[0],Hx(s[1])]:[s[0],Xr(s[1])]}),n?Vx(i,t,e):r?$x(i,t,e):hu(i,t,e)}function Ux(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,Xr(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 Vx(i,t,e){for(var n={},o={},r=[],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},o[l]=[],r.push(l)),o[l].push([a[0].value,a[1]])}var h=du({},t);if(h==="exponential"){for(var u=[lu(i),["linear"],["zoom"]],d=0,c=r;d<c.length;d+=1){var g=c[d],f=hu(n[g],t,o[g]);Zo(u,g,f,!1)}return u}else{for(var m=["step",["zoom"]],p=0,_=r;p<_.length;p+=1){var v=_[p],y=hu(n[v],t,o[v]);Zo(m,v,y,!0)}return uu(m),m}}function qx(i,t){if(i!==void 0)return i;if(t!==void 0)return t}function df(i,t){var e=Xr(qx(i.default,t.default));return e===void 0&&t.type==="resolvedImage"?"":e}function hu(i,t,e){var n=du(i,t),o=["get",i.property];if(n==="categorical"&&typeof e[0][0]=="boolean"){for(var r=["case"],s=0,a=e;s<a.length;s+=1){var l=a[s];r.push(["==",o,l[0]],l[1])}return r.push(df(i,t)),r}else if(n==="categorical"){for(var h=["match",o],u=0,d=e;u<d.length;u+=1){var c=d[u];Zo(h,c[0],c[1],!1)}return h.push(df(i,t)),h}else if(n==="interval"){for(var g=["step",["number",o]],f=0,m=e;f<m.length;f+=1){var p=m[f];Zo(g,p[0],p[1],!0)}return uu(g),i.default===void 0?g:["case",["==",["typeof",o],"number"],g,Xr(i.default)]}else if(n==="exponential"){for(var _=i.base!==void 0?i.base:1,v=[lu(i),_===1?["linear"]:["exponential",_],["number",o]],y=0,x=e;y<x.length;y+=1){var k=x[y];Zo(v,k[0],k[1],!1)}return i.default===void 0?v:["case",["==",["typeof",o],"number"],v,Xr(i.default)]}else throw new Error("Unknown property function type "+n)}function $x(i,t,e,n){n===void 0&&(n=["zoom"]);var o=du(i,t),r,s=!1;if(o==="interval")r=["step",n],s=!0;else if(o==="exponential"){var a=i.base!==void 0?i.base:1;r=[lu(i),a===1?["linear"]:["exponential",a],n]}else throw new Error('Unknown zoom function type "'+o+'"');for(var l=0,h=e;l<h.length;l+=1){var u=h[l];Zo(r,u[0],u[1],s)}return uu(r),r}function uu(i){i[0]==="step"&&i.length===3&&(i.push(0),i.push(i[3]))}function Zo(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,o=e.exec(i);o!==null;o=e.exec(i)){var r=i.slice(n,e.lastIndex-o[0].length);n=e.lastIndex,r.length>0&&t.push(r),t.push(["get",o[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),Ur=function(t,e){e===void 0&&(e=[]),this.parent=t,this.bindings={};for(var n=0,o=e;n<o.length;n+=1){var r=o[n],s=r[0],a=r[1];this.bindings[s]=a}};Ur.prototype.concat=function(t){return new Ur(this,t)},Ur.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.")},Ur.prototype.has=function(t){return this.bindings[t]?!0:this.parent?this.parent.has(t):!1};var Ia={kind:"null"},L={kind:"number"},mt={kind:"string"},lt={kind:"boolean"},Ai={kind:"color"},Yo={kind:"object"},ht={kind:"value"},Kx={kind:"error"},za={kind:"collator"},Ra={kind:"formatted"},Vr={kind:"resolvedImage"};function $e(i,t){return{kind:"array",itemType:i,N:t}}function Yt(i){if(i.kind==="array"){var t=Yt(i.itemType);return typeof i.N=="number"?"array<"+t+", "+i.N+">":i.itemType.kind==="value"?"array":"array<"+t+">"}else return i.kind}var Jx=[Ia,L,mt,lt,Ai,Ra,Yo,$e(ht),Vr];function qr(i,t){if(t.kind==="error")return null;if(i.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!qr(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 o=n[e];if(!qr(o,t))return null}}return"Expected "+Yt(i)+" but found "+Yt(t)+" instead."}function cu(i,t){return t.some(function(e){return e.kind===i.kind})}function $r(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 Hr=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"})};Hr.prototype.compare=function(t,e){return this.collator.compare(t,e)},Hr.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var gu=function(t,e,n,o,r){this.text=t.normalize?t.normalize():t,this.image=e,this.scale=n,this.fontStack=o,this.textColor=r},Pe=function(t){this.sections=t};Pe.fromString=function(t){return new Pe([new gu(t,null,null,null,null)])},Pe.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})},Pe.factory=function(t){return t instanceof Pe?t:Pe.fromString(t)},Pe.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(t){return t.text}).join("")},Pe.prototype.serialize=function(){for(var t=["format"],e=0,n=this.sections;e<n.length;e+=1){var o=n[e];if(o.image){t.push(["image",o.image.name]);continue}t.push(o.text);var r={};o.fontStack&&(r["text-font"]=["literal",o.fontStack.split(",")]),o.scale&&(r["font-scale"]=o.scale),o.textColor&&(r["text-color"]=["rgba"].concat(o.textColor.toArray())),t.push(r)}return t};var gi=function(t){this.name=t.name,this.available=t.available};gi.prototype.toString=function(){return this.name},gi.fromString=function(t){return t?new gi({name:t,available:!1}):null},gi.prototype.serialize=function(){return["image",this.name]};function cf(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 o=typeof n=="number"?[i,t,e,n]:[i,t,e];return"Invalid rgba value ["+o.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 zt)return!0;if(i instanceof Hr)return!0;if(i instanceof Pe)return!0;if(i instanceof gi)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 o in i)if(!Aa(i[o]))return!1;return!0}else return!1}function te(i){if(i===null)return Ia;if(typeof i=="string")return mt;if(typeof i=="boolean")return lt;if(typeof i=="number")return L;if(i instanceof zt)return Ai;if(i instanceof Hr)return za;if(i instanceof Pe)return Ra;if(i instanceof gi)return Vr;if(Array.isArray(i)){for(var t=i.length,e,n=0,o=i;n<o.length;n+=1){var r=o[n],s=te(r);if(!e)e=s;else{if(e===s)continue;e=ht;break}}return $e(e||ht,t)}else return Yo}function Kr(i){var t=typeof i;return i===null?"":t==="string"||t==="number"||t==="boolean"?String(i):i instanceof zt||i instanceof Pe||i instanceof gi?i.toString():JSON.stringify(i)}var fi=function(t,e){this.type=t,this.value=e};fi.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],o=te(n),r=e.expectedType;return o.kind==="array"&&o.N===0&&r&&r.kind==="array"&&(typeof r.N!="number"||r.N===0)&&(o=r),new fi(o,n)},fi.prototype.evaluate=function(){return this.value},fi.prototype.eachChild=function(){},fi.prototype.outputDefined=function(){return!0},fi.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof zt?["rgba"].concat(this.value.toArray()):this.value instanceof Pe?this.value.serialize():this.value};var re=function(t){this.name="ExpressionEvaluationError",this.message=t};re.prototype.toJSON=function(){return this.message};var fu={string:mt,number:L,boolean:lt,object:Yo},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,o,r=t[0];if(r==="array"){var s;if(t.length>2){var a=t[1];if(typeof a!="string"||!(a in fu)||a==="object")return e.error('The item type argument of "array" must be one of string, number, boolean',1);s=fu[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++}o=$e(s,l)}else o=fu[r];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(o,h)},Me.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var n=this.args[e].evaluate(t),o=qr(this.type,te(n));if(o){if(e===this.args.length-1)throw new re("Expected value to be of type "+Yt(this.type)+", but found "+Yt(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 o=t.N;(typeof o=="number"||this.args.length>1)&&e.push(o)}}return e.concat(this.args.map(function(r){return r.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 o=[],r=!1,s=1;s<=t.length-1;++s){var a=t[s];if(r&&typeof a=="object"&&!Array.isArray(a)){r=!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,$e(mt)),!h))return null;var u=null;if(a["text-color"]&&(u=e.parse(a["text-color"],1,Ai),!u))return null;var d=o[o.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 g=c.type.kind;if(g!=="string"&&g!=="value"&&g!=="null"&&g!=="resolvedImage")return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");r=!0,o.push({content:c,scale:null,font:null,textColor:null})}}return new cn(o)},cn.prototype.evaluate=function(t){var e=function(n){var o=n.content.evaluate(t);return te(o)===Vr?new gu("",o,null,null,null):new gu(Kr(o),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 Pe(this.sections.map(e))},cn.prototype.eachChild=function(t){for(var e=0,n=this.sections;e<n.length;e+=1){var o=n[e];t(o.content),o.scale&&t(o.scale),o.font&&t(o.font),o.textColor&&t(o.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 o=n[e];t.push(o.content.serialize());var r={};o.scale&&(r["font-scale"]=o.scale.serialize()),o.font&&(r["text-font"]=o.font.serialize()),o.textColor&&(r["text-color"]=o.textColor.serialize()),t.push(r)}return t};var gn=function(t){this.type=Vr,this.input=t};gn.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 gn(n):e.error("No image name provided.")},gn.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=gi.fromString(e);return n&&t.availableImages&&(n.available=t.availableImages.indexOf(e)>-1),n},gn.prototype.eachChild=function(t){t(this.input)},gn.prototype.outputDefined=function(){return!1},gn.prototype.serialize=function(){return["image",this.input.serialize()]};var Qx={"to-boolean":lt,"to-color":Ai,"to-number":L,"to-string":mt},He=function(t,e){this.type=t,this.args=e};He.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 o=Qx[n],r=[],s=1;s<t.length;s++){var a=e.parse(t[s],s,ht);if(!a)return null;r.push(a)}return new He(o,r)},He.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,o=0,r=this.args;o<r.length;o+=1){var s=r[o];if(e=s.evaluate(t),n=null,e instanceof zt)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=cf(e[0],e[1],e[2],e[3]),!n))return new zt(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new re(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 re("Could not convert "+JSON.stringify(l)+" to number.")}else return this.type.kind==="formatted"?Pe.fromString(Kr(this.args[0].evaluate(t))):this.type.kind==="resolvedImage"?gi.fromString(Kr(this.args[0].evaluate(t))):Kr(this.args[0].evaluate(t))},He.prototype.eachChild=function(t){this.args.forEach(t)},He.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},He.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 gn(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"],Pi=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};Pi.prototype.id=function(){return this.feature&&"id"in this.feature&&this.feature.id?this.feature.id:null},Pi.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?tb[this.feature.type]:this.feature.type:null},Pi.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Pi.prototype.canonicalID=function(){return this.canonical},Pi.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Pi.prototype.distanceFromCenter=function(){if(this.featureTileCoord&&this.featureDistanceData){var t=this.featureDistanceData.center,e=this.featureDistanceData.scale,n=this.featureTileCoord,o=n.x,r=n.y,s=o*e-t[0],a=r*e-t[1],l=this.featureDistanceData.bearing[0],h=this.featureDistanceData.bearing[1],u=l*s+h*a;return u}return 0},Pi.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=zt.parse(t)),e};var me=function(t,e,n,o){this.name=t,this.type=e,this._evaluate=n,this.args=o};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,o=t[0],r=me.definitions[o];if(!r)return e.error('Unknown expression "'+o+'". If you wanted a literal array, use ["literal", [...]].',0);for(var s=Array.isArray(r)?r[0]:r.type,a=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,l=a.filter(function(A){var at=A[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],g=c[0],f=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(g)?g[_-1]:g.type,x=h.parse(v,1+m.length,y);if(!x){p=!0;break}m.push(x)}if(!p){if(Array.isArray(g)&&g.length!==m.length){h.error("Expected "+g.length+" arguments, but found "+m.length+" instead.");continue}for(var k=0;k<m.length;k++){var w=Array.isArray(g)?g[k]:g.type,E=m[k];h.concat(k+1).checkSubtype(w,E.type)}if(h.errors.length===0)return new me(o,s,f,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(A){var at=A[0];return eb(at)}).join(" | "),z=[],P=1;P<t.length;P++){var G=e.parse(t[P],1+z.length);if(!G)return null;z.push(Yt(G.type))}e.error("Expected arguments of type "+S+", but found ("+z.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(Yt).join(", ")+")":"("+Yt(i.type)+"...)"}var fn=function(t,e,n){this.type=za,this.locale=n,this.caseSensitive=t,this.diacriticSensitive=e};fn.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 o=e.parse(n["case-sensitive"]===void 0?!1:n["case-sensitive"],1,lt);if(!o)return null;var r=e.parse(n["diacritic-sensitive"]===void 0?!1:n["diacritic-sensitive"],1,lt);if(!r)return null;var s=null;return n.locale&&(s=e.parse(n.locale,1,mt),!s)?null:new fn(o,r,s)},fn.prototype.evaluate=function(t){return new Hr(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},fn.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},fn.prototype.outputDefined=function(){return!1},fn.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 Pa(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=ib(i[0]),n=nb(i[1]),o=Math.pow(2,t.z);return[Math.round(e*o*mn),Math.round(n*o*mn)]}function rb(i,t,e){var n=i[0]-t[0],o=i[1]-t[1],r=i[0]-e[0],s=i[1]-e[1];return n*s-r*o===0&&n*r<=0&&o*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,o=t.length;n<o;n++)for(var r=t[n],s=0,a=r.length;s<a-1;s++){if(rb(i,r[s],r[s+1]))return!1;sb(i,r[s],r[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 gf(i,t,e,n){var o=i[0]-e[0],r=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=o*h-l*r,d=s*h-l*a;return u>0&&d<0||u<0&&d>0}function hb(i,t,e,n){var o=[t[0]-i[0],t[1]-i[1]],r=[n[0]-e[0],n[1]-e[1]];return lb(r,o)===0?!1:!!(gf(i,t,e,n)&&gf(e,n,i,t))}function ub(i,t,e){for(var n=0,o=e;n<o.length;n+=1)for(var r=o[n],s=0;s<r.length-1;++s)if(hb(i,t,r[s],r[s+1]))return!0;return!1}function ff(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(ff(i,t[e]))return!0;return!1}function vu(i,t,e){for(var n=[],o=0;o<i.length;o++){for(var r=[],s=0;s<i[o].length;s++){var a=ob(i[o][s],e);mu(t,a),r.push(a)}n.push(r)}return n}function mf(i,t,e){for(var n=[],o=0;o<i.length;o++){var r=vu(i[o],t,e);n.push(r)}return n}function pf(i,t,e,n){if(i[0]<e[0]||i[0]>e[2]){var o=n*.5,r=i[0]-e[0]>o?-n:e[0]-i[0]>o?n:0;r===0&&(r=i[0]-e[2]>o?-n:e[2]-i[0]>o?n:0),i[0]+=r}mu(t,i)}function cb(i){i[0]=i[1]=1/0,i[2]=i[3]=-1/0}function vf(i,t,e,n){var o=Math.pow(2,n.z)*mn,r=[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],g=[c.x+r[0],c.y+r[1]];pf(g,t,e,o),s.push(g)}return s}function _f(i,t,e,n){var o=Math.pow(2,n.z)*mn,r=[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 g=c[d],f=[g.x+r[0],g.y+r[1]];mu(t,f),u.push(f)}s.push(u)}if(t[2]-t[0]<=o/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];pf(x,t,e,o)}}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],o=i.canonicalID();if(!o)return!1;if(t.type==="Polygon"){var r=vu(t.coordinates,n,o),s=vf(i.geometry(),e,n,o);if(!Pa(e,n))return!1;for(var a=0,l=s;a<l.length;a+=1){var h=l[a];if(!pu(h,r))return!1}}if(t.type==="MultiPolygon"){var u=mf(t.coordinates,n,o),d=vf(i.geometry(),e,n,o);if(!Pa(e,n))return!1;for(var c=0,g=d;c<g.length;c+=1){var f=g[c];if(!ab(f,u))return!1}}return!0}function fb(i,t){var e=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],o=i.canonicalID();if(!o)return!1;if(t.type==="Polygon"){var r=vu(t.coordinates,n,o),s=_f(i.geometry(),e,n,o);if(!Pa(e,n))return!1;for(var a=0,l=s;a<l.length;a+=1){var h=l[a];if(!ff(h,r))return!1}}if(t.type==="MultiPolygon"){var u=mf(t.coordinates,n,o),d=_f(i.geometry(),e,n,o);if(!Pa(e,n))return!1;for(var c=0,g=d;c<g.length;c+=1){var f=g[c];if(!db(f,u))return!1}}return!0}var oi=function(t,e){this.type=lt,this.geojson=t,this.geometries=e};oi.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 o=0;o<n.features.length;++o){var r=n.features[o].geometry.type;if(r==="Polygon"||r==="MultiPolygon")return new oi(n,n.features[o].geometry)}else if(n.type==="Feature"){var s=n.geometry.type;if(s==="Polygon"||s==="MultiPolygon")return new oi(n,n.geometry)}else if(n.type==="Polygon"||n.type==="MultiPolygon")return new oi(n,n)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")},oi.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 fb(t,this.geometries)}return!1},oi.prototype.eachChild=function(){},oi.prototype.outputDefined=function(){return!0},oi.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 oi)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,o,r){e===void 0&&(e=[]),o===void 0&&(o=new Ur),r===void 0&&(r=[]),this.registry=t,this.path=e,this.key=e.map(function(s){return"["+s+"]"}).join(""),this.scope=o,this.errors=r,this.expectedType=n};vn.prototype.parse=function(t,e,n,o,r){return r===void 0&&(r={}),e?this.concat(e,n,o)._parse(t,r):this._parse(t,r)},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 He(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 o=t[0];if(typeof o!="string")return this.error("Expression name must be a string, but found "+typeof o+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var r=this.registry[o];if(r){var s=r.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 fi)&&s.type.kind!=="resolvedImage"&&xu(s)){var h=new Pi;try{s=new fi(s.type,s.evaluate(h))}catch(u){return this.error(u.message),null}}return s}return this.error('Unknown expression "'+o+'". 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 o=typeof t=="number"?this.path.concat(t):this.path,r=n?this.scope.concat(n):this.scope;return new vn(this.registry,o,e||null,r,this.errors)},vn.prototype.error=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var o=""+this.key+e.map(function(r){return"["+r+"]"}).join("");this.errors.push(new ci(o,t))},vn.prototype.checkSubtype=function(t,e){var n=qr(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 fn)return!1;if(i instanceof oi)return!1;var t=i instanceof He||i instanceof Me,e=!0;return i.eachChild(function(n){t?e=e&&xu(n):e=e&&n instanceof fi}),e?Da(i)&&yu(i,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"]):!1}function yf(i,t){for(var e=i.length-1,n=0,o=e,r=0,s,a;n<=o;)if(r=Math.floor((n+o)/2),s=i[r],a=i[r+1],s<=t){if(r===e||t<a)return r;n=r+1}else if(s>t)o=r-1;else throw new re("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 o=0,r=n;o<r.length;o+=1){var s=r[o],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 o=[],r=null;e.expectedType&&e.expectedType.kind!=="value"&&(r=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(o.length&&o[o.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,r);if(!d)return null;r=r||d.type,o.push([a,d])}return new _n(r,n,o)},_n.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(e.length===1)return n[0].evaluate(t);var o=this.input.evaluate(t);if(o<=e[0])return n[0].evaluate(t);var r=e.length;if(o>=e[r-1])return n[r-1].evaluate(t);var s=yf(e,o);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 o=n[e];t(o)}},_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=Xo;function Xo(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}Xo.prototype.sampleCurveX=function(i){return((this.ax*i+this.bx)*i+this.cx)*i},Xo.prototype.sampleCurveY=function(i){return((this.ay*i+this.by)*i+this.cy)*i},Xo.prototype.sampleCurveDerivativeX=function(i){return(3*this.ax*i+2*this.bx)*i+this.cx},Xo.prototype.solveCurveX=function(i,t){typeof t>"u"&&(t=1e-6);var e,n,o,r,s;for(o=i,s=0;s<8;s++){if(r=this.sampleCurveX(o)-i,Math.abs(r)<t)return o;var a=this.sampleCurveDerivativeX(o);if(Math.abs(a)<1e-6)break;o=o-r/a}if(e=0,n=1,o=i,o<e)return e;if(o>n)return n;for(;e<n;){if(r=this.sampleCurveX(o),Math.abs(r-i)<t)return o;i>r?e=o:n=o,o=(n-e)*.5+e}return o},Xo.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 zt(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,o){return Be(n,t[o],e)})}var _b=Object.freeze({__proto__:null,number:Be,color:pb,array:vb}),xf=.95047,bf=1,kf=1.08883,wf=4/29,Uo=6/29,Mf=3*Uo*Uo,yb=Uo*Uo*Uo,xb=Math.PI/180,bb=180/Math.PI;function bu(i){return i>yb?Math.pow(i,1/3):i/Mf+wf}function ku(i){return i>Uo?i*i*i:Mf*(i-wf)}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 Cf(i){var t=Mu(i.r),e=Mu(i.g),n=Mu(i.b),o=bu((.4124564*t+.3575761*e+.1804375*n)/xf),r=bu((.2126729*t+.7151522*e+.072175*n)/bf),s=bu((.0193339*t+.119192*e+.9503041*n)/kf);return{l:116*r-16,a:500*(o-r),b:200*(r-s),alpha:i.a}}function Ef(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=bf*ku(t),e=xf*ku(e),n=kf*ku(n),new zt(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=Cf(i),e=t.l,n=t.a,o=t.b,r=Math.atan2(o,n)*bb;return{h:r<0?r+360:r,c:Math.sqrt(n*n+o*o),l:e,alpha:i.a}}function Mb(i){var t=i.h*xb,e=i.c,n=i.l;return Ef({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 Eb(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 La={forward:Cf,reverse:Ef,interpolate:kb},Oa={forward:wb,reverse:Mb,interpolate:Eb},Ce=function(t,e,n,o,r){this.type=t,this.operator=e,this.interpolation=n,this.input=o,this.labels=[],this.outputs=[];for(var s=0,a=r;s<a.length;s+=1){var l=a[s],h=l[0],u=l[1];this.labels.push(h),this.outputs.push(u)}};Ce.interpolationFactor=function(t,e,n,o){var r=0;if(t.name==="exponential")r=Cu(e,t.base,n,o);else if(t.name==="linear")r=Cu(e,1,n,o);else if(t.name==="cubic-bezier"){var s=t.controlPoints,a=new mb(s[0],s[1],s[2],s[3]);r=a.solve(Cu(e,1,n,o))}return r},Ce.parse=function(t,e){var n=t[0],o=t[1],r=t[2],s=t.slice(3);if(!Array.isArray(o)||o.length===0)return e.error("Expected an interpolation type expression.",1);if(o[0]==="linear")o={name:"linear"};else if(o[0]==="exponential"){var a=o[1];if(typeof a!="number")return e.error("Exponential interpolation requires a numeric base.",1,1);o={name:"exponential",base:a}}else if(o[0]==="cubic-bezier"){var l=o.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);o={name:"cubic-bezier",controlPoints:l}}else return e.error("Unknown interpolation type "+String(o[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(r=e.parse(r,2,L),!r)return null;var h=[],u=null;n==="interpolate-hcl"||n==="interpolate-lab"?u=Ai:e.expectedType&&e.expectedType.kind!=="value"&&(u=e.expectedType);for(var d=0;d<s.length;d+=2){var c=s[d],g=s[d+1],f=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.',f);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.',f);var p=e.parse(g,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 "+Yt(u)+" is not interpolatable."):new Ce(u,n,o,r,h)},Ce.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(e.length===1)return n[0].evaluate(t);var o=this.input.evaluate(t);if(o<=e[0])return n[0].evaluate(t);var r=e.length;if(o>=e[r-1])return n[r-1].evaluate(t);var s=yf(e,o),a=e[s],l=e[s+1],h=Ce.interpolationFactor(this.interpolation,o,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"?Oa.reverse(Oa.interpolate(Oa.forward(u),Oa.forward(d),h)):La.reverse(La.interpolate(La.forward(u),La.forward(d),h))},Ce.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e<n.length;e+=1){var o=n[e];t(o)}},Ce.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},Ce.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 Cu(i,t,e,n){var o=n-e,r=i-e;return o===0?0:t===1?r/o:(Math.pow(t,r)-1)/(Math.pow(t,o)-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,o=e.expectedType;o&&o.kind!=="value"&&(n=o);for(var r=[],s=0,a=t.slice(1);s<a.length;s+=1){var l=a[s],h=e.parse(l,1+r.length,n,void 0,{typeAnnotation:"omit"});if(!h)return null;n=n||h.type,r.push(h)}var u=o&&r.some(function(d){return qr(o,d.type)});return u?new Di(ht,r):new Di(n,r)},Di.prototype.evaluate=function(t){for(var e=null,n=0,o,r=0,s=this.args;r<s.length;r+=1){var a=s[r];if(n++,e=a.evaluate(t),e&&e instanceof gi&&!e.available&&(o||(o=e),e=null,n===this.args.length))return o;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 o=n[e];t(o[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=[],o=1;o<t.length-1;o+=2){var r=t[o];if(typeof r!="string")return e.error("Expected string, but found "+typeof r+" instead.",o);if(/[^a-zA-Z0-9_]/.test(r))return e.error("Variable names must contain only alphanumeric characters or '_'.",o);var s=e.parse(t[o+1],o+1);if(!s)return null;n.push([r,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 o=n[e],r=o[0],s=o[1];t.push(r,s.serialize())}return t.push(this.result.serialize()),t};var to=function(t,e,n){this.type=t,this.index=e,this.input=n};to.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),o=e.parse(t[2],2,$e(e.expectedType||ht));if(!n||!o)return null;var r=o.type;return new to(r.itemType,n,o)},to.prototype.evaluate=function(t){var e=this.index.evaluate(t),n=this.input.evaluate(t);if(e<0)throw new re("Array index out of bounds: "+e+" < 0.");if(e>=n.length)throw new re("Array index out of bounds: "+e+" > "+(n.length-1)+".");if(e!==Math.floor(e))throw new re("Array index must be an integer, but found "+e+" instead.");return n[e]},to.prototype.eachChild=function(t){t(this.index),t(this.input)},to.prototype.outputDefined=function(){return!1},to.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var eo=function(t,e){this.type=lt,this.needle=t,this.haystack=e};eo.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),o=e.parse(t[2],2,ht);return!n||!o?null:cu(n.type,[lt,mt,L,Ia,ht])?new eo(n,o):e.error("Expected first argument to be of type boolean, string, number or null, but found "+Yt(n.type)+" instead")},eo.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(n==null)return!1;if(!$r(e,["boolean","string","number","null"]))throw new re("Expected first argument to be of type boolean, string, number or null, but found "+Yt(te(e))+" instead.");if(!$r(n,["string","array"]))throw new re("Expected second argument to be of type array or string, but found "+Yt(te(n))+" instead.");return n.indexOf(e)>=0},eo.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},eo.prototype.outputDefined=function(){return!0},eo.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),o=e.parse(t[2],2,ht);if(!n||!o)return null;if(!cu(n.type,[lt,mt,L,Ia,ht]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+Yt(n.type)+" instead");if(t.length===4){var r=e.parse(t[3],3,L);return r?new xn(n,o,r):null}else return new xn(n,o)},xn.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!$r(e,["boolean","string","number","null"]))throw new re("Expected first argument to be of type boolean, string, number or null, but found "+Yt(te(e))+" instead.");if(!$r(n,["string","array"]))throw new re("Expected second argument to be of type array or string, but found "+Yt(te(n))+" instead.");if(this.fromIndex){var o=this.fromIndex.evaluate(t);return n.indexOf(e,o)}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 io=function(t,e,n,o,r,s){this.inputType=t,this.type=e,this.input=n,this.cases=o,this.outputs=r,this.otherwise=s};io.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,o;e.expectedType&&e.expectedType.kind!=="value"&&(o=e.expectedType);for(var r={},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 g=c[d];if(typeof g!="number"&&typeof g!="string")return u.error("Branch labels must be numbers or strings.");if(typeof g=="number"&&Math.abs(g)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof g=="number"&&Math.floor(g)!==g)return u.error("Numeric branch labels must be integer values.");if(!n)n=te(g);else if(u.checkSubtype(n,te(g)))return null;if(typeof r[String(g)]<"u")return u.error("Branch labels must be unique.");r[String(g)]=s.length}var f=e.parse(h,a,o);if(!f)return null;o=o||f.type,s.push(f)}var m=e.parse(t[1],1,ht);if(!m)return null;var p=e.parse(t[t.length-1],t.length-1,o);return!p||m.type.kind!=="value"&&e.concat(1).checkSubtype(n,m.type)?null:new io(n,o,m,r,s,p)},io.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)},io.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},io.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})&&this.otherwise.outputDefined()},io.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],n=Object.keys(this.cases).sort(),o=[],r={},s=0,a=n;s<a.length;s+=1){var l=a[s],h=r[this.cases[l]];h===void 0?(r[this.cases[l]]=o.length,o.push([this.cases[l],[l]])):o[h][1].push(l)}for(var u=function(m){return t.inputType.kind==="number"?Number(m):m},d=0,c=o;d<c.length;d+=1){var g=c[d],h=g[0],f=g[1];f.length===1?e.push(u(f[0])):e.push(f.map(u)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e};var no=function(t,e,n){this.type=t,this.branches=e,this.otherwise=n};no.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 o=[],r=1;r<t.length-1;r+=2){var s=e.parse(t[r],r,lt);if(!s)return null;var a=e.parse(t[r+1],r+1,n);if(!a)return null;o.push([s,a]),n=n||a.type}var l=e.parse(t[t.length-1],t.length-1,n);return l?new no(n,o,l):null},no.prototype.evaluate=function(t){for(var e=0,n=this.branches;e<n.length;e+=1){var o=n[e],r=o[0],s=o[1];if(r.evaluate(t))return s.evaluate(t)}return this.otherwise.evaluate(t)},no.prototype.eachChild=function(t){for(var e=0,n=this.branches;e<n.length;e+=1){var o=n[e],r=o[0],s=o[1];t(r),t(s)}t(this.otherwise)},no.prototype.outputDefined=function(){return this.branches.every(function(t){t[0];var e=t[1];return e.outputDefined()})&&this.otherwise.outputDefined()},no.prototype.serialize=function(){var t=["case"];return this.eachChild(function(e){t.push(e.serialize())}),t};var bn=function(t,e,n,o){this.type=t,this.input=e,this.beginIndex=n,this.endIndex=o};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),o=e.parse(t[2],2,L);if(!n||!o)return null;if(!cu(n.type,[$e(ht),mt,ht]))return e.error("Expected first argument to be of type array or string, but found "+Yt(n.type)+" instead");if(t.length===4){var r=e.parse(t[3],3,L);return r?new bn(n.type,n,o,r):null}else return new bn(n.type,n,o)},bn.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=this.beginIndex.evaluate(t);if(!$r(e,["string","array"]))throw new re("Expected first argument to be of type array or string, but found "+Yt(te(e))+" instead.");if(this.endIndex){var o=this.endIndex.evaluate(t);return e.slice(n,o)}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 Sf(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 Ib(i,t,e){return t<e}function zb(i,t,e){return t>e}function Rb(i,t,e){return t<=e}function Ab(i,t,e){return t>=e}function Tf(i,t,e,n){return n.compare(t,e)===0}function Pb(i,t,e,n){return!Tf(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 Ob(i,t,e,n){return n.compare(t,e)<=0}function Fb(i,t,e,n){return n.compare(t,e)>=0}function Vo(i,t,e){var n=i!=="=="&&i!=="!=";return function(){function o(r,s,a){this.type=lt,this.lhs=r,this.rhs=s,this.collator=a,this.hasUntypedArgument=r.type.kind==="value"||s.type.kind==="value"}return o.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(!Sf(l,h.type))return a.concat(1).error('"'+l+`" comparisons are not supported for type '`+Yt(h.type)+"'.");var u=a.parse(s[2],2,ht);if(!u)return null;if(!Sf(l,u.type))return a.concat(2).error('"'+l+`" comparisons are not supported for type '`+Yt(u.type)+"'.");if(h.type.kind!==u.type.kind&&h.type.kind!=="value"&&u.type.kind!=="value")return a.error("Cannot compare types '"+Yt(h.type)+"' and '"+Yt(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,za),!d)return null}return new o(h,u,d)},o.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 re('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)},o.prototype.eachChild=function(s){s(this.lhs),s(this.rhs),this.collator&&s(this.collator)},o.prototype.outputDefined=function(){return!0},o.prototype.serialize=function(){var s=[i];return this.eachChild(function(a){s.push(a.serialize())}),s},o}()}var Nb=Vo("==",Sb,Tf),Gb=Vo("!=",Tb,Pb),jb=Vo("<",Ib,Db),Bb=Vo(">",zb,Lb),Wb=Vo("<=",Rb,Ob),Zb=Vo(">=",Ab,Fb),oo=function(t,e,n,o,r){this.type=mt,this.number=t,this.locale=e,this.currency=n,this.minFractionDigits=o,this.maxFractionDigits=r};oo.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 o=t[2];if(typeof o!="object"||Array.isArray(o))return e.error("NumberFormat options argument must be an object.");var r=null;if(o.locale&&(r=e.parse(o.locale,1,mt),!r))return null;var s=null;if(o.currency&&(s=e.parse(o.currency,1,mt),!s))return null;var a=null;if(o["min-fraction-digits"]&&(a=e.parse(o["min-fraction-digits"],1,L),!a))return null;var l=null;return o["max-fraction-digits"]&&(l=e.parse(o["max-fraction-digits"],1,L),!l)?null:new oo(n,r,s,a,l)},oo.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))},oo.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)},oo.prototype.outputDefined=function(){return!1},oo.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 ro=function(t){this.type=L,this.input=t};ro.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 "+Yt(n.type)+" instead."):new ro(n):null},ro.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 re("Expected value to be of type string or array, but found "+Yt(te(e))+" instead.")},ro.prototype.eachChild=function(t){t(this.input)},ro.prototype.outputDefined=function(){return!1},ro.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Eu={"==":Nb,"!=":Gb,">":Bb,"<":jb,">=":Zb,"<=":Wb,array:Me,at:to,boolean:Me,case:no,coalesce:Di,collator:fn,format:cn,image:gn,in:eo,"index-of":xn,interpolate:Ce,"interpolate-hcl":Ce,"interpolate-lab":Ce,length:ro,let:yn,literal:fi,match:io,number:Me,"number-format":oo,object:Me,slice:bn,step:_n,string:Me,"to-boolean":He,"to-color":He,"to-number":He,"to-string":He,var:pn,within:oi};function If(i,t){var e=t[0],n=t[1],o=t[2],r=t[3];e=e.evaluate(i),n=n.evaluate(i),o=o.evaluate(i);var s=r?r.evaluate(i):1,a=cf(e,n,o,s);if(a)throw new re(a);return new zt(e/255*s,n/255*s,o/255*s,s)}function zf(i,t){return i in t}function Su(i,t){var e=t[i];return typeof e>"u"?null:e}function Yb(i,t,e,n){for(;e<=n;){var o=e+n>>1;if(t[o]===i)return!0;t[o]>i?n=o-1:e=o+1}return!1}function so(i){return{type:i}}me.register(Eu,{error:[Kx,[mt],function(i,t){var e=t[0];throw new re(e.evaluate(i))}],typeof:[mt,[ht],function(i,t){var e=t[0];return Yt(te(e.evaluate(i)))}],"to-rgba":[$e(L,4),[Ai],function(i,t){var e=t[0];return e.evaluate(i).toArray()}],rgb:[Ai,[L,L,L],If],rgba:[Ai,[L,L,L,L],If],has:{type:lt,overloads:[[[mt],function(i,t){var e=t[0];return zf(e.evaluate(i),i.properties())}],[[mt,Yo],function(i,t){var e=t[0],n=t[1];return zf(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,Yo],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:[Yo,[],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,so(L),function(i,t){for(var e=0,n=0,o=t;n<o.length;n+=1){var r=o[n];e+=r.evaluate(i)}return e}],"*":[L,so(L),function(i,t){for(var e=1,n=0,o=t;n<o.length;n+=1){var r=o[n];e*=r.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,so(L),function(i,t){return Math.min.apply(Math,t.map(function(e){return e.evaluate(i)}))}],max:[L,so(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],o=i.properties()[e.value],r=n.value;return typeof o==typeof r&&o<r}],"filter-id-<":[lt,[ht],function(i,t){var e=t[0],n=i.id(),o=e.value;return typeof n==typeof o&&n<o}],"filter->":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],o=i.properties()[e.value],r=n.value;return typeof o==typeof r&&o>r}],"filter-id->":[lt,[ht],function(i,t){var e=t[0],n=i.id(),o=e.value;return typeof n==typeof o&&n>o}],"filter-<=":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],o=i.properties()[e.value],r=n.value;return typeof o==typeof r&&o<=r}],"filter-id-<=":[lt,[ht],function(i,t){var e=t[0],n=i.id(),o=e.value;return typeof n==typeof o&&n<=o}],"filter->=":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],o=i.properties()[e.value],r=n.value;return typeof o==typeof r&&o>=r}],"filter-id->=":[lt,[ht],function(i,t){var e=t[0],n=i.id(),o=e.value;return typeof n==typeof o&&n>=o}],"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,[$e(mt)],function(i,t){var e=t[0];return e.value.indexOf(i.geometryType())>=0}],"filter-id-in":[lt,[$e(ht)],function(i,t){var e=t[0];return e.value.indexOf(i.id())>=0}],"filter-in-small":[lt,[mt,$e(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,$e(ht)],function(i,t){var e=t[0],n=t[1];return Yb(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)}],[so(lt),function(i,t){for(var e=0,n=t;e<n.length;e+=1){var o=n[e];if(!o.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)}],[so(lt),function(i,t){for(var e=0,n=t;e<n.length;e+=1){var o=n[e];if(o.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,so(ht),function(i,t){return t.map(function(e){return Kr(e.evaluate(i))}).join("")}],"resolved-locale":[mt,[za],function(i,t){var e=t[0];return e.evaluate(i).resolvedLocale()}]});function Tu(i){return{result:"success",value:i}}function qo(i){return{result:"error",value:i}}function Xb(i){return i["property-type"]==="data-driven"||i["property-type"]==="cross-faded-data-driven"}function Ub(i){return!!i.expression&&i.expression.parameters.indexOf("zoom")>-1}function Vb(i){return!!i.expression&&i.expression.interpolated}function Rf(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}var Iu=function(t,e){this.expression=t,this._warningHistory={},this._evaluator=new Pi,this._defaultValue=e?Kb(e):null,this._enumValues=e&&e.type==="enum"?e.values:null};Iu.prototype.evaluateWithoutErrorHandling=function(t,e,n,o,r,s,a,l){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=n,this._evaluator.canonical=o||null,this._evaluator.availableImages=r||null,this._evaluator.formattedSection=s,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null,this.expression.evaluate(this._evaluator)},Iu.prototype.evaluate=function(t,e,n,o,r,s,a,l){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=n||null,this._evaluator.canonical=o||null,this._evaluator.availableImages=r||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 re("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 qb(i){return Array.isArray(i)&&i.length>0&&typeof i[0]=="string"&&i[0]in Eu}function zu(i,t){var e=new vn(Eu,[],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 Iu(n,t)):qo(e.errors)}var Fa=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent=t!=="constant"&&!_u(e.expression)};Fa.prototype.evaluateWithoutErrorHandling=function(t,e,n,o,r,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,o,r,s)},Fa.prototype.evaluate=function(t,e,n,o,r,s){return this._styleExpression.evaluate(t,e,n,o,r,s)};var Jr=function(t,e,n,o){this.kind=t,this.zoomStops=n,this._styleExpression=e,this.isStateDependent=t!=="camera"&&!_u(e.expression),this.interpolationType=o};Jr.prototype.evaluateWithoutErrorHandling=function(t,e,n,o,r,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,o,r,s)},Jr.prototype.evaluate=function(t,e,n,o,r,s){return this._styleExpression.evaluate(t,e,n,o,r,s)},Jr.prototype.interpolationFactor=function(t,e,n){return this.interpolationType?Ce.interpolationFactor(this.interpolationType,t,e,n):0};function $b(i,t){if(i=zu(i,t),i.result==="error")return i;var e=i.value.expression,n=Da(e);if(!n&&!Xb(t))return qo([new ci("","data expressions not supported")]);var o=yu(e,["zoom","pitch","distance-from-center"]);if(!o&&!Ub(t))return qo([new ci("","zoom expressions not supported")]);var r=Na(e);if(!r&&!o)return qo([new ci("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(r instanceof ci)return qo([r]);if(r instanceof Ce&&!Vb(t))return qo([new ci("",'"interpolate" expressions cannot be used with this property')]);if(!r)return Tu(n?new Fa("constant",i.value):new Fa("source",i.value));var s=r instanceof Ce?r.interpolation:void 0;return Tu(n?new Jr("camera",i.value,r.labels,s):new Jr("composite",i.value,r.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 o=n[e];if(t=Na(o),t)break}else(i instanceof _n||i instanceof Ce)&&i.input instanceof me&&i.input.name==="zoom"&&(t=i);return t instanceof ci||i.eachChild(function(r){var s=Na(r);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:Ai,string:mt,number:L,enum:mt,boolean:lt,formatted:Ra,resolvedImage:Vr};return i.type==="array"?$e(t[i.value]||ht,i.length):t[i.type]}function Kb(i){return i.type==="color"&&(Rf(i.default)||Array.isArray(i.default))?new zt(0,0,0,0):i.type==="color"?zt.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 Af={$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 Pf(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(!Pf(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};Pf(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.
8
+ `+g;Ii.get(m)===void 0&&(Ii.set(m,100,!0),a(u.style,u.weight,g)||(Ii.set(m,0,!0),r===void 0&&(r=setInterval(l,32))))}}}(),sv=function(){let i;return function(t){let e=Hl[t];if(e==null){if(kl){const n=Kd(t),o=Sc(t,"Žg");e=(isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight))*(o.actualBoundingBoxAscent+o.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);Hl[t]=e}return e}}();function Sc(i,t){return Ao||(Ao=De(1,1)),i!=Kl&&(Ao.font=i,Kl=Ao.font),Ao.measureText(t)}function Js(i,t){return Sc(i,t).width}function Tc(i,t,e){if(t in e)return e[t];const n=t.split(`
9
+ `).reduce((o,r)=>Math.max(o,Js(i,r)),0);return e[t]=n,n}function av(i,t){const e=[],n=[],o=[];let r=0,s=0,a=0,l=0;for(let h=0,u=t.length;h<=u;h+=2){const d=t[h];if(d===`
10
+ `||h===u){r=Math.max(r,s),o.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=sv(c);n.push(g),l=Math.max(l,g)}return{width:r,height:a,widths:e,heights:n,lineWidths:o}}function lv(i,t,e,n,o,r,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]),hv(n,i)):u[0]<0||u[1]<0?(i.translate(l,h),i.scale(u[0],u[1]),i.drawImage(n,o,r,s,a,0,0,s,a)):i.drawImage(n,o,r,s,a,l,h,s*u[0],a*u[1]),i.restore()}function hv(i,t){const e=i.contextInstructions;for(let n=0,o=e.length;n<o;n+=2)Array.isArray(e[n+1])?t[e[n]].apply(t,e[n+1]):t[e[n]]=e[n+1]}class uv extends nv{constructor(t){super(t),this.fontChangeListenerKey_=pt(Ii,bo.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=_r+" 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 o=new Cc(t,void 0,e);n.dispatchEvent(o)}}disposeInternal(){Nt(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(Zi.PRECOMPOSE,t);const e=t.layerStatesArray.sort(function(s,a){return s.zIndex-a.zIndex}),n=t.viewState;this.children_.length=0;const o=[];let r=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,r);!d||(d!==r&&(this.children_.push(d),r=d),"getDeclutter"in h&&o.push(h))}for(let s=o.length-1;s>=0;--s)o[s].renderDeclutter(t);l0(this.element_,this.children_),this.dispatchRenderEvent(Zi.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}}const dv=uv;class Ji extends ei{constructor(t,e){super(t),this.layer=e}}const Ql={LAYERS:"layers"};class Jl extends Jd{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(Ql.LAYERS,this.handleLayersChanged_),n?Array.isArray(n)?n=new Ze(n.slice(),{unique:!0}):gt(typeof n.getArray=="function",43):n=new Ze(void 0,{unique:!0}),this.setLayers(n)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(Nt),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(pt(t,se.ADD,this.handleLayersAdd_,this),pt(t,se.REMOVE,this.handleLayersRemove_,this));for(const n in this.listenerKeys_)this.listenerKeys_[n].forEach(Nt);vr(this.listenerKeys_);const e=t.getArray();for(let n=0,o=e.length;n<o;n++){const r=e[n];this.registerLayerListeners_(r),this.dispatchEvent(new Ji("addlayer",r))}this.changed()}registerLayerListeners_(t){const e=[pt(t,bo.PROPERTYCHANGE,this.handleLayerChange_,this),pt(t,et.CHANGE,this.handleLayerChange_,this)];t instanceof Jl&&e.push(pt(t,"addlayer",this.handleLayerGroupAdd_,this),pt(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[H(t)]=e}handleLayerGroupAdd_(t){this.dispatchEvent(new Ji("addlayer",t.layer))}handleLayerGroupRemove_(t){this.dispatchEvent(new Ji("removelayer",t.layer))}handleLayersAdd_(t){const e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new Ji("addlayer",e)),this.changed()}handleLayersRemove_(t){const e=t.element,n=H(e);this.listenerKeys_[n].forEach(Nt),delete this.listenerKeys_[n],this.dispatchEvent(new Ji("removelayer",e)),this.changed()}getLayers(){return this.get(Ql.LAYERS)}setLayers(t){const e=this.getLayers();if(e){const n=e.getArray();for(let o=0,r=n.length;o<r;++o)this.dispatchEvent(new Ji("removelayer",n[o]))}this.set(Ql.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 o=this.getLayerState();let r=o.zIndex;!t&&o.zIndex===void 0&&(r=0);for(let s=n,a=e.length;s<a;s++){const l=e[s];l.opacity*=o.opacity,l.visible=l.visible&&o.visible,l.maxResolution=Math.min(l.maxResolution,o.maxResolution),l.minResolution=Math.max(l.minResolution,o.minResolution),l.minZoom=Math.max(l.minZoom,o.minZoom),l.maxZoom=Math.min(l.maxZoom,o.maxZoom),o.extent!==void 0&&(l.extent!==void 0?l.extent=Xn(l.extent,o.extent):l.extent=o.extent),l.zIndex===void 0&&(l.zIndex=r)}return e}getSourceState(){return"ready"}}const ta=Jl;class cv extends ei{constructor(t,e,n){super(t),this.map=e,this.frameState=n!==void 0?n:null}}const Po=cv;class fv extends Po{constructor(t,e,n,o,r,s){super(t,e,r),this.originalEvent=n,this.pixel_=null,this.coordinate_=null,this.dragging=o!==void 0?o:!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 zi=fv,Ct={SINGLECLICK:"singleclick",CLICK:et.CLICK,DBLCLICK:et.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};class gv extends As{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_=pt(n,Sl.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=pt(n,Sl.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(et.TOUCHMOVE,this.boundHandleTouchMove_,Yd?{passive:!1}:!1)}emulateClick_(t){let e=new zi(Ct.CLICK,this.map_,t);this.dispatchEvent(e),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new zi(Ct.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;const n=new zi(Ct.SINGLECLICK,this.map_,t);this.dispatchEvent(n)}.bind(this),250)}updateActivePointers_(t){const e=t,n=e.pointerId;if(e.type==Ct.POINTERUP||e.type==Ct.POINTERCANCEL){delete this.trackedTouches_[n];for(const o in this.trackedTouches_)if(this.trackedTouches_[o].target!==e.target){delete this.trackedTouches_[o];break}}else(e.type==Ct.POINTERDOWN||e.type==Ct.POINTERMOVE)&&(this.trackedTouches_[n]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new zi(Ct.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(Nt),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 zi(Ct.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.down_={};for(const n in t){const o=t[n];this.down_[n]=typeof o=="function"?Nn:o}if(this.dragListenerKeys_.length===0){const n=this.map_.getOwnerDocument();this.dragListenerKeys_.push(pt(n,Ct.POINTERMOVE,this.handlePointerMove_,this),pt(n,Ct.POINTERUP,this.handlePointerUp_,this),pt(this.element_,Ct.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==n&&this.dragListenerKeys_.push(pt(this.element_.getRootNode(),Ct.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new zi(Ct.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 zi(Ct.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_&&(Nt(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(et.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Nt(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Nt),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const mv=gv,ea=1/0;class pv{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,vr(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 o=this.keyFunction_(n);return delete this.queuedElements_[o],n}enqueue(t){gt(!(this.keyFunction_(t)in this.queuedElements_),31);const e=this.priorityFunction_(t);return e!=ea?(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_,o=e.length,r=e[t],s=n[t],a=t;for(;t<o>>1;){const l=this.getLeftChildIndex_(t),h=this.getRightChildIndex_(t),u=h<o&&n[h]<n[l]?h:l;e[t]=e[u],n[t]=n[u],t=u}e[t]=r,n[t]=s,this.siftDown_(a,t)}siftDown_(t,e){const n=this.elements_,o=this.priorities_,r=n[e],s=o[e];for(;e>t;){const a=this.getParentIndex_(e);if(o[a]>s)n[e]=n[a],o[e]=o[a],e=a;else break}n[e]=r,o[e]=s}reprioritize(){const t=this.priorityFunction_,e=this.elements_,n=this.priorities_;let o=0;const r=e.length;let s,a,l;for(a=0;a<r;++a)s=e[a],l=t(s),l==ea?delete this.queuedElements_[this.keyFunction_(s)]:(n[o]=l,e[o++]=s);e.length=o,n.length=o,this.heapify_()}}const vv=pv,G={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class _v extends vv{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(et.CHANGE,this.boundHandleTileChange_),e}getTilesLoading(){return this.tilesLoading_}handleTileChange(t){const e=t.target,n=e.getState();if(n===G.LOADED||n===G.ERROR||n===G.EMPTY){n!==G.ERROR&&e.removeEventListener(et.CHANGE,this.boundHandleTileChange_);const o=e.getKey();o in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[o],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let n=0,o,r,s;for(;this.tilesLoading_<t&&n<e&&this.getCount()>0;)r=this.dequeue()[0],s=r.getKey(),o=r.getState(),o===G.IDLE&&!(s in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++n,r.load())}}const yv=_v;function xv(i,t,e,n,o){if(!i||!(e in i.wantedTiles)||!i.wantedTiles[e][t.getKey()])return ea;const r=i.viewState.center,s=n[0]-r[0],a=n[1]-r[1];return 65536*Math.log(o)+Math.sqrt(s*s+a*a)/o}const Zt={ANIMATING:0,INTERACTING:1},oi={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Ic=42,th=256;function zc(i,t,e){return function(n,o,r,s,a){if(!n)return;if(!o&&!t)return n;const l=t?0:r[0]*o,h=t?0:r[1]*o,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=$t(n[0],c,f),_=$t(n[1],g,m);if(s&&e&&o){const v=30*o;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 bv(i){return i}function eh(i,t,e,n){const o=Gt(t)/e[0],r=$e(t)/e[1];return n?Math.min(i,Math.max(o,r)):Math.min(i,Math.min(o,r))}function ih(i,t,e){let n=Math.min(i,t);const o=50;return n*=Math.log(1+o*Math.max(0,i/t-1))/o+1,e&&(n=Math.max(n,e),n/=Math.log(1+o*Math.max(0,e/i-1))/o+1),$t(n,e/2,t*2)}function kv(i,t,e,n){return t=t!==void 0?t:!0,function(o,r,s,a){if(o!==void 0){const l=i[0],h=i[i.length-1],u=e?eh(l,e,s,n):l;if(a)return t?ih(o,u,h):$t(o,h,u);const d=Math.min(u,o),c=Math.floor(bl(i,d,r));return i[c]>u&&c<i.length-1?i[c+1]:i[c]}else return}}function wv(i,t,e,n,o,r){return n=n!==void 0?n:!0,e=e!==void 0?e:0,function(s,a,l,h){if(s!==void 0){const u=o?eh(t,o,l,r):t;if(h)return n?ih(s,u,e):$t(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 $t(_,e,u)}else return}}function Rc(i,t,e,n,o){return e=e!==void 0?e:!0,function(r,s,a,l){if(r!==void 0){const h=n?eh(i,n,a,o):i;return!e||!l?$t(r,t,h):ih(r,h,t)}else return}}function nh(i){if(i!==void 0)return 0}function Ac(i){if(i!==void 0)return i}function Mv(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 Cv(i){return i=i||Bn(5),function(t,e){if(e)return t;if(t!==void 0)return Math.abs(t)<=i?0:t}}function Pc(i){return Math.pow(i,3)}function Do(i){return 1-Pc(1-i)}function Ev(i){return 3*i*i-2*i*i*i}function Sv(i){return i}function tn(i,t,e,n,o,r){r=r||[];let s=0;for(let a=t;a<e;a+=n){const l=i[a],h=i[a+1];r[s++]=o[0]*l+o[2]*h+o[4],r[s++]=o[1]*l+o[3]*h+o[5]}return r&&r.length!=s&&(r.length=s),r}function oh(i,t,e,n,o,r,s){s=s||[];const a=Math.cos(o),l=Math.sin(o),h=r[0],u=r[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 Tv(i,t,e,n,o,r,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+o*c,a[u++]=h+r*f;for(let g=d+2;g<d+n;++g)a[u++]=i[g]}return a&&a.length!=u&&(a.length=u),a}function Dc(i,t,e,n,o,r,s){s=s||[];let a=0;for(let l=t;l<e;l+=n){s[a++]=i[l]+o,s[a++]=i[l+1]+r;for(let h=l+2;h<l+n;++h)s[a++]=i[h]}return s&&s.length!=a&&(s.length=a),s}const Lc=Ke();class Iv extends di{constructor(){super(),this.extent_=Be(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=Hp(function(t,e,n){if(!n)return this.getSimplifiedGeometry(e);const o=this.clone();return o.applyTransform(n),o.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return it()}closestPointXY(t,e,n,o){return it()}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 it()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&xr(e),this.extentRevision_=this.getRevision()}return I0(this.extent_,t)}rotate(t,e){it()}scale(t,e,n){it()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return it()}getType(){return it()}applyTransform(t){it()}intersectsExtent(t){return it()}translate(t,e){it()}transform(t,e){const n=jt(t),o=n.getUnits()=="tile-pixels"?function(r,s,a){const l=n.getExtent(),h=n.getWorldExtent(),u=$e(h)/$e(l);return Si(Lc,h[0],h[3],u,-u,0,0,0),tn(r,0,r.length,a,Lc,s),wr(n,e)(r,s,a)}:wr(n,e);return this.applyTransform(o),this}}const Oc=Iv;class zv extends Oc{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 it()}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=ia(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){it()}setLayout(t,e,n){let o;if(t)o=ia(t);else{for(let r=0;r<n;++r)if(e.length===0){this.layout="XY",this.stride=2;return}else e=e[0];o=e.length,t=Rv(o)}this.layout=t,this.stride=o}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const n=this.getFlatCoordinates();if(n){const o=this.getStride();oh(n,0,n.length,o,t,e,n),this.changed()}}scale(t,e,n){e===void 0&&(e=t),n||(n=Ki(this.getExtent()));const o=this.getFlatCoordinates();if(o){const r=this.getStride();Tv(o,0,o.length,r,t,e,n,o),this.changed()}}translate(t,e){const n=this.getFlatCoordinates();if(n){const o=this.getStride();Dc(n,0,n.length,o,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 ia(i){let t;return i=="XY"?t=2:i=="XYZ"||i=="XYM"?t=3:i=="XYZM"&&(t=4),t}function Av(i,t,e){const n=i.getFlatCoordinates();if(n){const o=i.getStride();return tn(n,0,n.length,o,t,e)}else return null}const en=zv;function Fc(i,t,e,n,o,r,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=((o-a)*h+(r-l)*u)/(h*h+u*u);if(c>1)d=e;else if(c>0){for(let f=0;f<n;++f)s[f]=Ci(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,o){let r=i[t],s=i[t+1];for(t+=n;t<e;t+=n){const a=i[t],l=i[t+1],h=jn(r,s,a,l);h>o&&(o=h),r=a,s=l}return o}function sh(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){const a=e[r];o=rh(i,t,a,n,o),t=a}return o}function Pv(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){const a=e[r];o=sh(i,t,a,n,o),t=a[a.length-1]}return o}function ah(i,t,e,n,o,r,s,a,l,h,u){if(t==e)return h;let d,c;if(o===0)if(c=jn(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(Fc(i,f-n,f,n,s,a,u),c=jn(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))/o|0,1);if(r&&(Fc(i,e-n,t,n,s,a,u),c=jn(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 lh(i,t,e,n,o,r,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,o,r,s,a,l,h,u),t=f}return h}function Dv(i,t,e,n,o,r,s,a,l,h,u){u=u||[NaN,NaN];for(let d=0,c=e.length;d<c;++d){const f=e[d];h=lh(i,t,f,n,o,r,s,a,l,h,u),t=f[f.length-1]}return h}function Nc(i,t,e,n){for(let o=0,r=e.length;o<r;++o)i[t++]=e[o];return t}function na(i,t,e,n){for(let o=0,r=e.length;o<r;++o){const s=e[o];for(let a=0;a<n;++a)i[t++]=s[a]}return t}function hh(i,t,e,n,o){o=o||[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=na(i,t,e[s],n);o[r++]=l,t=l}return o.length=r,o}function Lv(i,t,e,n,o){o=o||[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=hh(i,t,e[s],n,o[r]);l.length===0&&(l[0]=t),o[r++]=l,t=l[l.length-1]}return o.length=r,o}function uh(i,t,e,n,o,r,s){const a=(e-t)/n;if(a<3){for(;t<e;t+=n)r[s++]=i[t],r[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=c0(y,x,g,m,p,_);k>f&&(u=v,f=k)}f>o&&(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]&&(r[s++]=i[t+d*n],r[s++]=i[t+d*n+1]);return s}function Ov(i,t,e,n,o,r,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l];s=uh(i,t,u,n,o,r,s),a.push(s),t=u}return s}function $n(i,t){return t*Math.round(i/t)}function Fv(i,t,e,n,o,r,s){if(t==e)return s;let a=$n(i[t],o),l=$n(i[t+1],o);t+=n,r[s++]=a,r[s++]=l;let h,u;do if(h=$n(i[t],o),u=$n(i[t+1],o),t+=n,t==e)return r[s++]=h,r[s++]=u,s;while(h==a&&u==l);for(;t<e;){const d=$n(i[t],o),c=$n(i[t+1],o);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}r[s++]=h,r[s++]=u,a=h,l=u,h=d,u=c}return r[s++]=h,r[s++]=u,s}function Gc(i,t,e,n,o,r,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l];s=Fv(i,t,u,n,o,r,s),a.push(s),t=u}return s}function Nv(i,t,e,n,o,r,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l],d=[];s=Gc(i,t,u,n,o,r,s,d),a.push(d),t=u[u.length-1]}return s}function nn(i,t,e,n,o){o=o!==void 0?o:[];let r=0;for(let s=t;s<e;s+=n)o[r++]=i.slice(s,s+n);return o.length=r,o}function Rr(i,t,e,n,o){o=o!==void 0?o:[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=e[s];o[r++]=nn(i,t,l,n,o[r]),t=l}return o.length=r,o}function dh(i,t,e,n,o){o=o!==void 0?o:[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=e[s];o[r++]=l.length===1&&l[0]===t?[]:Rr(i,t,l,n,o[r]),t=l[l.length-1]}return o.length=r,o}function jc(i,t,e,n){let o=0,r=i[e-n],s=i[e-n+1];for(;t<e;t+=n){const a=i[t],l=i[t+1];o+=s*a-r*l,r=a,s=l}return o/2}function Bc(i,t,e,n){let o=0;for(let r=0,s=e.length;r<s;++r){const a=e[r];o+=jc(i,t,a,n),t=a}return o}function Gv(i,t,e,n){let o=0;for(let r=0,s=e.length;r<s;++r){const a=e[r];o+=Bc(i,t,a,n),t=a[a.length-1]}return o}class oa extends en{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 oa(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,n,o){return o<Wn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ah(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,n,o))}getArea(){return jc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return nn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=uh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new oa(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=na(this.flatCoordinates,0,t,this.stride),this.changed()}}const Uc=oa;let Wc=class extends en{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new Wc(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,o){const r=this.flatCoordinates,s=jn(t,e,r[0],r[1]);if(s<o){const a=this.stride;for(let l=0;l<a;++l)n[l]=r[l];return n.length=a,s}else return o}getCoordinates(){return this.flatCoordinates?this.flatCoordinates.slice():[]}computeExtent(t){return br(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return Il(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Nc(this.flatCoordinates,0,t,this.stride),this.changed()}};const ri=Wc;function jv(i,t,e,n,o){return!Al(o,function(s){return!Zn(i,t,e,n,s[0],s[1])})}function Zn(i,t,e,n,o,r){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<=r?u>r&&(h-a)*(r-l)-(o-a)*(u-l)>0&&s++:u<=r&&(h-a)*(r-l)-(o-a)*(u-l)<0&&s--,a=h,l=u}return s!==0}function ch(i,t,e,n,o,r){if(e.length===0||!Zn(i,t,e[0],n,o,r))return!1;for(let s=1,a=e.length;s<a;++s)if(Zn(i,e[s-1],e[s],n,o,r))return!1;return!0}function Bv(i,t,e,n,o,r){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,o,r))return!0;t=l[l.length-1]}return!1}function fh(i,t,e,n,o,r,s){let a,l,h,u,d,c,f;const g=o[r+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(On),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=o[r]),s?(s.push(p,g,_),s):[p,g,_]}function Vc(i,t,e,n,o){let r=[];for(let s=0,a=e.length;s<a;++s){const l=e[s];r=fh(i,t,l,n,o,2*s,r),t=l[l.length-1]}return r}function Xc(i,t,e,n,o){let r;for(t+=n;t<e;t+=n)if(r=o(i.slice(t-n,t),i.slice(t,t+n)),r)return r;return!1}function ra(i,t,e,n,o){const r=sc(Be(),i,t,e,n);return Kt(o,r)?Vn(o,r)||r[0]>=o[0]&&r[2]<=o[2]||r[1]>=o[1]&&r[3]<=o[3]?!0:Xc(i,t,e,n,function(s,a){return z0(o,s,a)}):!1}function Uv(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){if(ra(i,t,e[r],n,o))return!0;t=e[r]}return!1}function Yc(i,t,e,n,o){return!!(ra(i,t,e,n,o)||Zn(i,t,e,n,o[0],o[1])||Zn(i,t,e,n,o[0],o[3])||Zn(i,t,e,n,o[2],o[1])||Zn(i,t,e,n,o[2],o[3]))}function qc(i,t,e,n,o){if(!Yc(i,t,e[0],n,o))return!1;if(e.length===1)return!0;for(let r=1,s=e.length;r<s;++r)if(jv(i,e[r-1],e[r],n,o)&&!ra(i,e[r-1],e[r],n,o))return!1;return!0}function Wv(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){const a=e[r];if(qc(i,t,a,n,o))return!0;t=a[a.length-1]}return!1}function Vv(i,t,e,n){for(;t<e-n;){for(let o=0;o<n;++o){const r=i[t+o];i[t+o]=i[e-n+o],i[e-n+o]=r}t+=n,e-=n}}function gh(i,t,e,n){let o=0,r=i[e-n],s=i[e-n+1];for(;t<e;t+=n){const a=i[t],l=i[t+1];o+=(a-r)*(l+s),r=a,s=l}return o===0?void 0:o>0}function $c(i,t,e,n,o){o=o!==void 0?o:!1;for(let r=0,s=e.length;r<s;++r){const a=e[r],l=gh(i,t,a,n);if(r===0){if(o&&l||!o&&!l)return!1}else if(o&&!l||!o&&l)return!1;t=a}return!0}function Xv(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){const a=e[r];if(!$c(i,t,a,n,o))return!1;a.length&&(t=a[a.length-1])}return!0}function mh(i,t,e,n,o){o=o!==void 0?o:!1;for(let r=0,s=e.length;r<s;++r){const a=e[r],l=gh(i,t,a,n);(r===0?o&&l||!o&&!l:o&&!l||!o&&l)&&Vv(i,t,a,n),t=a}return t}function Zc(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r)t=mh(i,t,e[r],n,o);return t}function Yv(i,t){const e=[];let n=0,o=0;for(let r=0,s=t.length;r<s;++r){const a=t[r];if(!gh(i,n,a,2))e.push(t.slice(o,r+1));else{if(e.length===0)continue;e[e.length-1].push(t[o])}o=r+1,n=a}return e}class Lo extends en{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?ui(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new Lo(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,n,o){return o<Wn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(sh(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),lh(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,n,o))}containsXY(t,e){return ch(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return Bc(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,Rr(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=Ki(this.getExtent());this.flatInteriorPoint_=fh(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new ri(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new Uc(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_,o=[];let r=0;for(let s=0,a=n.length;s<a;++s){const l=n[s],h=new Uc(e.slice(r,l),t);o.push(h),r=l}return o}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;$c(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=Gc(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,n),new Lo(e,"XY",n)}getType(){return"Polygon"}intersectsExtent(t){return qc(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=hh(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}const Kn=Lo;function Kc(i){const t=i[0],e=i[1],n=i[2],o=i[3],r=[t,e,t,o,n,o,n,e,t,e];return new Lo(r,"XY",[r.length])}function qv(i,t,e){t=t||32;const n=i.getStride(),o=i.getLayout(),r=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]=r[d]}const l=[a.length],h=new Lo(a,o,l);return $v(h,r,i.getRadius(),e),h}function $v(i,t,e,n){const o=i.getFlatCoordinates(),r=i.getStride(),s=o.length/r-1,a=n||0;for(let l=0;l<=s;++l){const h=l*r,u=a+$i(l,s)*2*Math.PI/s;o[h]=t[0]+e*Math.cos(u),o[h+1]=t[1]+e*Math.sin(u)}i.changed()}const ph=0;class Zv extends di{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=Wl(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=Qi(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const a in oi)delete e[a];this.setProperties(e,!0);const n=Hv(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 o=Kv(t),r=n.constraint,s=Qv(t);this.constraints_={center:o,resolution:r,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 o=t||[0,0,0,0];e=e||[0,0,0,0];const r=this.getResolution(),s=r/2*(o[3]-e[3]+e[1]-o[1]),a=r/2*(o[0]-e[0]+e[2]-o[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 o=arguments[n];o.center&&(o=Object.assign({},o),o.center=Vt(o.center,this.getProjection())),o.anchor&&(o=Object.assign({},o),o.anchor=Vt(o.anchor,this.getProjection())),e[n]=o}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 o=0;for(;o<e&&!this.isDef();++o){const u=arguments[o];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(o===e){n&&sa(n,!0);return}let r=Date.now(),s=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_;const h=[];for(;o<e;++o){const u=arguments[o],d={start:r,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:r+=d.duration,h.push(d)}this.animations_.push(h),this.setHint(Zt.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[Zt.ANIMATING]>0}getInteracting(){return this.hints_[Zt.INTERACTING]>0}cancelAnimations(){this.setHint(Zt.ANIMATING,-this.hints_[Zt.ANIMATING]);let t;for(let e=0,n=this.animations_.length;e<n;++e){const o=this.animations_[e];if(o[0].callback&&sa(o[0].callback,!1),!t)for(let r=0,s=o.length;r<s;++r){const a=o[r];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 o=this.animations_[n];let r=!0;for(let s=0,a=o.length;s<a;++s){const l=o[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):r=!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(r){this.animations_[n]=null,this.setHint(Zt.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const s=o[0].callback;s&&sa(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 o=this.getCenterInternal();return o!==void 0&&(n=[o[0]-e[0],o[1]-e[1]],Nl(n,t-this.getRotation()),P0(n,e)),n}calculateCenterZoom(t,e){let n;const o=this.getCenterInternal(),r=this.getResolution();if(o!==void 0&&r!==void 0){const s=e[0]-t*(e[0]-o[0])/r,a=e[1]-t*(e[1]-o[1])/r;n=[s,a]}return n}getViewportSize_(t){const e=this.viewportSize_;if(t){const n=e[0],o=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(o*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(o*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&&zo(t,this.getProjection())}getCenterInternal(){return this.get(oi.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 Xl(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();gt(e,1);const n=this.getResolution();gt(n!==void 0,2);const o=this.getRotation();return gt(o!==void 0,3),Dl(e,n,o,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(oi.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(Qi(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const n=Gt(t)/e[0],o=$e(t)/e[1];return Math.max(n,o)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,o=Math.log(e/n)/Math.log(t);return function(r){return e/Math.pow(t,r*o)}}getRotation(){return this.get(oi.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),o=this.minResolution_,r=Math.log(n/o)/e;return function(s){return Math.log(n/s)/e/r}}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 o=this.getCenterInternal();const r=this.padding_;if(r){const s=this.getViewportSizeMinusPadding_();o=vh(o,this.getViewportSize_(),[s[0]/2+r[3],s[1]/2+r[0]],e,n)}return{center:o.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,o;if(this.resolutions_){const r=bl(this.resolutions_,t,1);e=r,n=this.resolutions_[r],r==this.resolutions_.length-1?o=2:o=n/this.resolutions_[r+1]}else n=this.maxResolution_,o=this.zoomFactor_;return e+Math.log(n/t)/Math.log(o)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=$t(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,$t(t-e,0,1))}else return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let n;if(gt(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function",24),Array.isArray(t)){gt(!Ol(t),25);const o=Qi(t,this.getProjection());n=Kc(o)}else if(t.getType()==="Circle"){const o=Qi(t.getExtent(),this.getProjection());n=Kc(o),n.rotate(this.getRotation(),Ki(o))}else n=t;this.fitInternal(n,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),n=Math.cos(e),o=Math.sin(-e),r=t.getFlatCoordinates(),s=t.getStride();let a=1/0,l=1/0,h=-1/0,u=-1/0;for(let d=0,c=r.length;d<c;d+=s){const f=r[d]*n-r[d+1]*o,g=r[d]*o+r[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 o=e.padding!==void 0?e.padding:[0,0,0,0],r=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]-o[1]-o[3],n[1]-o[0]-o[2]]);l=isNaN(l)?s:Math.max(l,s),l=this.getConstrainedResolution(l,r?0:1);const h=this.getRotation(),u=Math.sin(h),d=Math.cos(h),c=Ki(a);c[0]+=(o[1]-o[3])/2*l,c[1]+=(o[0]-o[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:Nn;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),sa(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,o){let r;const s=this.padding_;if(s&&t){const a=this.getViewportSizeMinusPadding_(-n),l=vh(t,o,[a[0]/2+s[3],a[1]/2+s[0]],e,n);r=[t[0]-l[0],t[1]-l[1]]}return r}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(t){const e=zo(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(),o=this.getViewportSize_(this.getRotation()),r=this.constraints_.resolution(this.targetResolution_*t,0,o,n);e&&(this.targetCenter_=this.calculateCenterZoom(r,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(),o=this.constraints_.rotation(this.targetRotation_+t,n);e&&(this.targetCenter_=this.calculateCenterRotate(o,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,o=this.constraints_.rotation(this.targetRotation_,n),r=this.getViewportSize_(o),s=this.constraints_.resolution(this.targetResolution_,0,r,n),a=this.constraints_.center(this.targetCenter_,s,r,n,this.calculateCenterShift(this.targetCenter_,s,o,r));this.get(oi.ROTATION)!==o&&this.set(oi.ROTATION,o),this.get(oi.RESOLUTION)!==s&&(this.set(oi.RESOLUTION,s),this.set("zoom",this.getZoom(),!0)),(!a||!this.get(oi.CENTER)||!ni(this.get(oi.CENTER),a))&&this.set(oi.CENTER,a),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,n){t=t!==void 0?t:200;const o=e||0,r=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(r),a=this.constraints_.resolution(this.targetResolution_,o,s),l=this.constraints_.center(this.targetCenter_,a,s,!1,this.calculateCenterShift(this.targetCenter_,a,r,s));if(t===0&&!this.cancelAnchor_){this.targetResolution_=a,this.targetRotation_=r,this.targetCenter_=l,this.applyTargetState_();return}n=n||(t===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==a||this.getRotation()!==r||!this.getCenterInternal()||!ni(this.getCenterInternal(),l))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:r,center:l,resolution:a,duration:t,easing:Do,anchor:n}))}beginInteraction(){this.resolveConstraints(0),this.setHint(Zt.INTERACTING,1)}endInteraction(t,e,n){n=n&&Vt(n,this.getProjection()),this.endInteractionInternal(t,e,n)}endInteractionInternal(t,e,n){this.setHint(Zt.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 sa(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 zc(i.extent,i.constrainOnlyCenter,e)}const t=Wl(i.projection,"EPSG:3857");if(i.multiWorld!==!0&&t.isGlobal()){const e=t.getExtent().slice();return e[0]=-1/0,e[2]=1/0,zc(e,!1,!1)}return bv}function Hv(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=Wl(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=kv(p,u,!g&&m,d):t=Rc(e,n,u,!g&&m,d)}else{const _=(f?Math.max(Gt(f),$e(f)):360*Mo.degrees/c.getMetersPerUnit())/th/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=wv(l,e,n,u,!g&&m,d):t=Rc(e,n,u,!g&&m,d)}return{constraint:t,maxResolution:e,minResolution:n,minZoom:s,zoomFactor:l}}function Qv(i){if(i.enableRotation!==void 0?i.enableRotation:!0){const e=i.constrainRotation;return e===void 0||e===!0?Cv():e===!1?Ac:typeof e=="number"?Mv(e):Ac}else return nh}function Jv(i){return!(i.sourceCenter&&i.targetCenter&&!ni(i.sourceCenter,i.targetCenter)||i.sourceResolution!==i.targetResolution||i.sourceRotation!==i.targetRotation)}function vh(i,t,e,n,o){const r=Math.cos(-o);let s=Math.sin(-o),a=i[0]*r-i[1]*s,l=i[1]*r+i[0]*s;a+=(t[0]/2-e[0])*n,l+=(e[1]-t[1]/2)*n,s=-s;const h=a*r-l*s,u=l*r+a*s;return[h,u]}const on=Zv;class t_ extends wo{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:"⇧",o=t.compassClassName!==void 0?t.compassClassName:"ol-compass";this.label_=null,typeof n=="string"?(this.label_=document.createElement("span"),this.label_.className=o,this.label_.textContent=n):(this.label_=n,this.label_.classList.add(o));const r=t.tipLabel?t.tipLabel:"Reset rotation",s=document.createElement("button");s.className=e+"-reset",s.setAttribute("type","button"),s.title=r,s.appendChild(this.label_),s.addEventListener(et.CLICK,this.handleClick_.bind(this),!1);const a=e+" "+_r+" "+Cl,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(Ls)}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:Do}):e.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const n=e.viewState.rotation;if(n!=this.rotation_){const o="rotate("+n+"rad)";if(this.autoHide_){const r=this.element.classList.contains(Ls);!r&&n===0?this.element.classList.add(Ls):r&&n!==0&&this.element.classList.remove(Ls)}this.label_.style.transform=o}this.rotation_=n}}const e_=t_;class i_ extends wo{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,o=t.zoomInClassName!==void 0?t.zoomInClassName:e+"-in",r=t.zoomOutClassName!==void 0?t.zoomOutClassName:e+"-out",s=t.zoomInLabel!==void 0?t.zoomInLabel:"+",a=t.zoomOutLabel!==void 0?t.zoomOutLabel:"–",l=t.zoomInTipLabel!==void 0?t.zoomInTipLabel:"Zoom in",h=t.zoomOutTipLabel!==void 0?t.zoomOutTipLabel:"Zoom out",u=document.createElement("button");u.className=o,u.setAttribute("type","button"),u.title=l,u.appendChild(typeof s=="string"?document.createTextNode(s):s),u.addEventListener(et.CLICK,this.handleClick_.bind(this,n),!1);const d=document.createElement("button");d.className=r,d.setAttribute("type","button"),d.title=h,d.appendChild(typeof a=="string"?document.createTextNode(a):a),d.addEventListener(et.CLICK,this.handleClick_.bind(this,-n),!1);const c=e+" "+_r+" "+Cl,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 o=n.getZoom();if(o!==void 0){const r=n.getConstrainedZoom(o+t);this.duration_>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:r,duration:this.duration_,easing:Do})):n.setZoom(r)}}}const n_=i_;function Hc(i){i=i||{};const t=new Ze;return(i.zoom!==void 0?i.zoom:!0)&&t.push(new n_(i.zoomOptions)),(i.rotate!==void 0?i.rotate:!0)&&t.push(new e_(i.rotateOptions)),(i.attribution!==void 0?i.attribution:!0)&&t.push(new v0(i.attributionOptions)),t}const _h={ACTIVE:"active"};class o_ extends di{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 o=[n[0]+t[0],n[1]+t[1]];i.animateInternal({duration:e!==void 0?e:250,easing:Sv,center:i.getConstrainedCenter(o)})}}function yh(i,t,e,n){const o=i.getZoom();if(o===void 0)return;const r=i.getConstrainedZoom(o+t),s=i.getResolutionForZoom(r);i.getAnimating()&&i.cancelAnimations(),i.animate({resolution:s,anchor:e,duration:n!==void 0?n:250,easing:Do})}const Ar=o_;class s_ extends Ar{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==Ct.DBLCLICK){const n=t.originalEvent,o=t.map,r=t.coordinate,s=n.shiftKey?-this.delta_:this.delta_,a=o.getView();yh(a,s,r,this.duration_),n.preventDefault(),e=!0}return!e}}const a_=s_;class l_ extends Ar{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==Ct.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==Ct.POINTERUP){const n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==Ct.POINTERDOWN){const n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==Ct.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 o=0;o<t;o++)e+=i[o].clientX,n+=i[o].clientY;return[e/t,n/t]}const rn=l_;function bh(i){const t=arguments;return function(e){let n=!0;for(let o=0,r=t.length;o<r&&(n=n&&t[o](e),!!n);++o);return n}}const h_=function(i){const t=i.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},u_=function(i){const t=i.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},d_=function(i){const t=i.map.getTargetElement(),e=i.map.getOwnerDocument().activeElement;return t.contains(e)},Qc=function(i){return i.map.getTargetElement().hasAttribute("tabindex")?d_(i):!0},kh=Fn,Jc=function(i){const t=i.originalEvent;return t.button==0&&!(o0&&r0&&t.ctrlKey)},c_=function(i){return i.type==Ct.SINGLECLICK},wh=function(i){const t=i.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},tf=function(i){const t=i.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},ef=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 gt(t!==void 0,56),t.pointerType=="mouse"},nf=function(i){const t=i.originalEvent;return gt(t!==void 0,56),t.isPrimary&&t.button===0};class f_ extends rn{constructor(t){super({stopDown:ko}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:bh(wh,nf);this.condition_=t.onFocusOnly?bh(Qc,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 o=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],s=t.map.getView();L0(o,s.getResolution()),Nl(o,s.getRotation()),s.adjustCenterInternal(o)}}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 o=this.kinetic_.getDistance(),r=this.kinetic_.getAngle(),s=n.getCenterInternal(),a=e.getPixelFromCoordinateInternal(s),l=e.getCoordinateFromPixelInternal([a[0]-o*Math.cos(r),a[1]-o*Math.sin(r)]);n.animateInternal({center:n.getConstrainedCenter(l),duration:500,easing:Do})}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 g_=f_;class m_ extends rn{constructor(t){t=t||{},super({stopDown:ko}),this.condition_=t.condition?t.condition:u_,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===nh)return;const o=e.getSize(),r=t.pixel,s=Math.atan2(o[1]/2-r[1],r[0]-o[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)&&Jc(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}const p_=m_;class v_ extends xl{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",o=this.element_.style;o.left=Math.min(t[0],e[0])+n,o.top=Math.min(t[1],e[1])+n,o.width=Math.abs(e[0]-t[0])+n,o.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_,o=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);o[4]=o[0].slice(),this.geometry_?this.geometry_.setCoordinates([o]):this.geometry_=new Kn([o])}getGeometry(){return this.geometry_}}const __=v_,aa={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class Ch extends ei{constructor(t,e,n){super(t),this.coordinate=e,this.mapBrowserEvent=n}}class y_ extends rn{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new __(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:Jc,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,n){const o=n[0]-e[0],r=n[1]-e[1];return o*o+r*r>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Ch(aa.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 Ch(e?aa.BOXEND:aa.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 Ch(aa.BOXSTART,t.coordinate,t)),!0):!1}onBoxEnd(t){}}const x_=y_;class b_ extends x_{constructor(t){t=t||{};const e=t.condition?t.condition:tf;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 o=this.getGeometry();if(this.out_){const r=n.rotatedExtentForGeometry(o),s=n.getResolutionForExtentInternal(r),a=n.getResolution()/s;o=o.clone(),o.scale(a*a)}n.fitInternal(o,{duration:this.duration_,easing:Do})}}const k_=b_,Hn={LEFT:37,UP:38,RIGHT:39,DOWN:40};class w_ extends Ar{constructor(t){super(),t=t||{},this.defaultCondition_=function(e){return wh(e)&&ef(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==et.KEYDOWN){const n=t.originalEvent,o=n.keyCode;if(this.condition_(t)&&(o==Hn.DOWN||o==Hn.LEFT||o==Hn.RIGHT||o==Hn.UP)){const s=t.map.getView(),a=s.getResolution()*this.pixelDelta_;let l=0,h=0;o==Hn.DOWN?h=-a:o==Hn.LEFT?l=-a:o==Hn.RIGHT?l=a:h=a;const u=[l,h];Nl(u,s.getRotation()),r_(s,u,this.duration_),n.preventDefault(),e=!0}}return!e}}const M_=w_;class C_ extends Ar{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:ef,this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:100}handleEvent(t){let e=!1;if(t.type==et.KEYDOWN||t.type==et.KEYPRESS){const n=t.originalEvent,o=n.charCode;if(this.condition_(t)&&(o=="+".charCodeAt(0)||o=="-".charCodeAt(0))){const r=t.map,s=o=="+".charCodeAt(0)?this.delta_:-this.delta_,a=r.getView();yh(a,s,void 0,this.duration_),n.preventDefault(),e=!0}}return!e}}const E_=C_;class S_{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 o=this.points_[e+2]-this.points_[n+2];if(o<1e3/60)return!1;const r=this.points_[e]-this.points_[n],s=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(s,r),this.initialVelocity_=Math.sqrt(r*r+s*s)/o,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}const T_=S_;class I_ extends Ar{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(Qc,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!==et.WHEEL)return!0;const n=t.map,o=t.originalEvent;o.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate);let r;if(t.type==et.WHEEL&&(r=o.deltaY,n0&&o.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(r/=Xd),o.deltaMode===WheelEvent.DOM_DELTA_LINE&&(r*=40)),r===0)return!1;this.lastDelta_=r;const s=Date.now();this.startTime_===void 0&&(this.startTime_=s),(!this.mode_||s-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(r)<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(-r/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=s,!1;this.totalDelta_+=r;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=-$t(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_=I_;class R_ extends rn{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=ko),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],o=this.targetPointers[1],r=Math.atan2(o.clientY-n.clientY,o.clientX-n.clientX);if(this.lastAngle_!==void 0){const u=r-this.lastAngle_;this.rotationDelta_+=u,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=u}this.lastAngle_=r;const s=t.map,a=s.getView();if(a.getConstraints().rotation===nh)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 A_=R_;class P_ extends rn{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=ko),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],o=this.targetPointers[1],r=n.clientX-o.clientX,s=n.clientY-o.clientY,a=Math.sqrt(r*r+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(),o=this.lastScaleDelta_>1?1:-1;return n.endInteraction(this.duration_,o),!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 D_=P_;function of(i){i=i||{};const t=new Ze,e=new T_(-.005,.05,100);return(i.altShiftDragRotate!==void 0?i.altShiftDragRotate:!0)&&t.push(new p_),(i.doubleClickZoom!==void 0?i.doubleClickZoom:!0)&&t.push(new a_({delta:i.zoomDelta,duration:i.zoomDuration})),(i.dragPan!==void 0?i.dragPan:!0)&&t.push(new g_({onFocusOnly:i.onFocusOnly,kinetic:e})),(i.pinchRotate!==void 0?i.pinchRotate:!0)&&t.push(new A_),(i.pinchZoom!==void 0?i.pinchZoom:!0)&&t.push(new D_({duration:i.zoomDuration})),(i.keyboard!==void 0?i.keyboard:!0)&&(t.push(new M_),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 k_({duration:i.zoomDuration})),t}function rf(i){return i[0]>0&&i[1]>0}function L_(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 we(i,t){return Array.isArray(i)?i:(t===void 0?t=[i,i]:(t[0]=i,t[1]=i),t)}function sf(i){if(i instanceof Ns){i.setMapInternal(null);return}i instanceof ta&&i.getLayers().forEach(sf)}function af(i,t){if(i instanceof Ns){i.setMapInternal(t);return}if(i instanceof ta){const e=i.getLayers().getArray();for(let n=0,o=e.length;n<o;++n)af(e[n],t)}}let O_=class extends di{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:Xd,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=Ke(),this.pixelToCoordinateTransform_=Ke(),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||Hc(),this.interactions=e.interactions||of({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new yv(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(pe.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(pe.VIEW,this.handleViewChanged_),this.addChangeListener(pe.SIZE,this.handleSizeChanged_),this.addChangeListener(pe.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const n=this;t.view&&!(t.view instanceof on)&&t.view.then(function(o){n.setView(new on(o))}),this.controls.addEventListener(se.ADD,function(o){o.element.setMap(this)}.bind(this)),this.controls.addEventListener(se.REMOVE,function(o){o.element.setMap(null)}.bind(this)),this.interactions.addEventListener(se.ADD,function(o){o.element.setMap(this)}.bind(this)),this.interactions.addEventListener(se.REMOVE,function(o){o.element.setMap(null)}.bind(this)),this.overlays_.addEventListener(se.ADD,function(o){this.addOverlayInternal_(o.element)}.bind(this)),this.overlays_.addEventListener(se.REMOVE,function(o){const r=o.element.getId();r!==void 0&&delete this.overlayIdIndex_[r.toString()],o.element.setMap(null)}.bind(this)),this.controls.forEach(function(o){o.setMap(this)}.bind(this)),this.interactions.forEach(function(o){o.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){af(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 o=this.getCoordinateFromPixelInternal(t);n=n!==void 0?n:{};const r=n.hitTolerance!==void 0?n.hitTolerance:0,s=n.layerFilter!==void 0?n.layerFilter:Fn,a=n.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(o,this.frameState_,r,a,e,null,s,null)}getFeaturesAtPixel(t,e){const n=[];return this.forEachFeatureAtPixel(t,function(o){n.push(o)},e),n}getAllLayers(){const t=[];function e(n){n.forEach(function(o){o instanceof ta?e(o.getLayers()):t.push(o)})}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 o=e.layerFilter!==void 0?e.layerFilter:Fn,r=e.hitTolerance!==void 0?e.hitTolerance:0,s=e.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,r,s,o,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(pe.TARGET)}getTargetElement(){const t=this.getTarget();return t!==void 0?typeof t=="string"?document.getElementById(t):t:null}getCoordinateFromPixel(t){return zo(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(pe.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof Ze){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 o=t[e];if(!o.visible)continue;const r=o.layer.getRenderer();if(r&&!r.ready)return!0;const s=o.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(pe.SIZE)}getView(){return this.get(pe.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,o){return xv(this.frameState_,t,e,n,o)}handleBrowserEvent(t,e){e=e||t.type;const n=new zi(e,this,t);this.handleMapBrowserEvent(n)}handleMapBrowserEvent(t){if(!this.frameState_)return;const e=t.originalEvent,n=e.type;if(n===Sl.POINTERDOWN||n===et.WHEEL||n===et.KEYDOWN){const o=this.getOwnerDocument(),r=this.viewport_.getRootNode?this.viewport_.getRootNode():o,s=e.target;if(this.overlayContainerStopEvent_.contains(s)||!(r===o?o.documentElement:r).contains(s))return}if(t.frameState=this.frameState_,this.dispatchEvent(t)!==!1){const o=this.getInteractions().getArray().slice();for(let r=o.length-1;r>=0;r--){const s=o[r];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 o=this.maxTilesLoading_,r=o;if(t){const s=t.viewHints;if(s[Zt.ANIMATING]||s[Zt.INTERACTING]){const a=Date.now()-t.time>8;o=a?0:8,r=a?0:2}}e.getTilesLoading()<o&&(e.reprioritize(),e.loadMoreTiles(o,r))}t&&this.renderer_&&!t.animate&&(this.renderComplete_===!0?(this.hasListener(Zi.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(Zi.RENDERCOMPLETE,t),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new Po(Yi.LOADEND,this,t)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new Po(Yi.LOADSTART,this,t))));const n=this.postRenderFunctions_;for(let o=0,r=n.length;o<r;++o)n[o](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)Nt(this.targetChangeHandlerKeys_[e]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(et.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(et.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,Ml(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 dv(this)),this.mapBrowserEventHandler_=new mv(this,this.moveTolerance_);for(const o in Ct)this.mapBrowserEventHandler_.addEventListener(Ct[o],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(et.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(et.WHEEL,this.boundHandleBrowserEvent_,Yd?{passive:!1}:!1);const e=this.getOwnerDocument().defaultView,n=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.targetChangeHandlerKeys_=[pt(n,et.KEYDOWN,this.handleBrowserEvent,this),pt(n,et.KEYPRESS,this.handleBrowserEvent,this),pt(e,et.RESIZE,this.updateSize,this)]}this.updateSize()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(Nt(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Nt(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=pt(t,bo.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=pt(t,et.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(Nt),this.layerGroupPropertyListenerKeys_=null);const t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Ji("addlayer",t)),this.layerGroupPropertyListenerKeys_=[pt(t,bo.PROPERTYCHANGE,this.render,this),pt(t,et.CHANGE,this.render,this),pt(t,"addlayer",this.handleLayerAdd_,this),pt(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 o=t[e].layer;o.hasRenderer()&&o.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){sf(t.layer)}removeOverlay(t){return this.getOverlays().remove(t)}renderFrame_(t){const e=this.getSize(),n=this.getView(),o=this.frameState_;let r=null;if(e!==void 0&&rf(e)&&n&&n.isDef()){const s=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=n.getState();if(r={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:Dl(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:H(this),renderTargets:{}},a.nextCenter&&a.nextResolution){const l=isNaN(a.nextRotation)?a.rotation:a.nextRotation;r.nextExtent=Dl(a.nextCenter,a.nextResolution,l,e)}}this.frameState_=r,this.renderer_.renderFrame(r),r&&(r.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,r.postRenderFunctions),o&&(!this.previousExtent_||!Ol(this.previousExtent_)&&!Io(r.extent,this.previousExtent_))&&(this.dispatchEvent(new Po(Yi.MOVESTART,this,o)),this.previousExtent_=xr(this.previousExtent_)),this.previousExtent_&&!r.viewHints[Zt.ANIMATING]&&!r.viewHints[Zt.INTERACTING]&&!Io(r.extent,this.previousExtent_)&&(this.dispatchEvent(new Po(Yi.MOVEEND,this,r)),oc(r.extent,this.previousExtent_))),this.dispatchEvent(new Po(Yi.POSTRENDER,this,r)),this.renderComplete_=this.hasListener(Yi.LOADSTART)||this.hasListener(Yi.LOADEND)||this.hasListener(Zi.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 Ji("removelayer",e)),this.set(pe.LAYERGROUP,t)}setSize(t){this.set(pe.SIZE,t)}setTarget(t){this.set(pe.TARGET,t)}setView(t){if(!t||t instanceof on){this.set(pe.VIEW,t);return}this.set(pe.VIEW,new on);const e=this;t.then(function(n){e.setView(new on(n))})}updateSize(){const t=this.getTargetElement();let e;if(t){const n=getComputedStyle(t),o=t.offsetWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight)-parseFloat(n.borderRightWidth),r=t.offsetHeight-parseFloat(n.borderTopWidth)-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom)-parseFloat(n.borderBottomWidth);!isNaN(o)&&!isNaN(r)&&(e=[o,r],!rf(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 ta({layers:i.layers});e[pe.LAYERGROUP]=n,e[pe.TARGET]=i.target,e[pe.VIEW]=i.view instanceof on?i.view:new on;let o;i.controls!==void 0&&(Array.isArray(i.controls)?o=new Ze(i.controls.slice()):(gt(typeof i.controls.getArray=="function",47),o=i.controls));let r;i.interactions!==void 0&&(Array.isArray(i.interactions)?r=new Ze(i.interactions.slice()):(gt(typeof i.interactions.getArray=="function",48),r=i.interactions));let s;return i.overlays!==void 0?Array.isArray(i.overlays)?s=new Ze(i.overlays.slice()):(gt(typeof i.overlays.getArray=="function",49),s=i.overlays):s=new Ze,{controls:o,interactions:r,keyboardEventTarget:t,overlays:s,values:e}}const N_=O_,Eh="units",G_=[1,2,5],Pr=25.4/.28;class j_ extends wo{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+" "+_r,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(Eh,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(Eh)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(Eh,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,o=this.getUnits(),r=o=="degrees"?"degrees":"m";let s=Ys(n,t.resolution,e,r);const a=this.minWidth_*(this.dpi_||Pr)/Pr,l=this.maxWidth_!==void 0?this.maxWidth_*(this.dpi_||Pr)/Pr:void 0;let h=a*s,u="";if(o=="degrees"){const y=Mo.degrees;h*=y,h<y/60?(u="″",s*=3600):h<y?(u="′",s*=60):u="°"}else o=="imperial"?h<.9144?(u="in",s/=.0254):h<1609.344?(u="ft",s/=.3048):(u="mi",s/=1609.344):o=="nautical"?(s/=1852,u="NM"):o=="metric"?h<.001?(u="μm",s*=1e6):h<1?(u="mm",s*=1e3):h<1e3?u="m":(u="km",s/=1e3):o=="us"?h<.9144?(u="in",s*=39.37):h<1609.344?(u="ft",s/=.30480061):(u="mi",s/=1609.3472):gt(!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=G_[(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 o=this.getScaleForResolution(),r=o<1?Math.round(1/o).toLocaleString()+" : 1":"1 : "+Math.round(o).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;">`+r+"</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,o,r){const a=(t===0?0:Math.round(o/this.scaleBarSteps_*t*100)/100)+(t===0?"":" "+r),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=Ys(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),e=this.dpi_||Pr,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 B_=j_;class Sh extends di{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 Sh(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_&&(Nt(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=pt(t,et.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?U_(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 U_(i){if(typeof i=="function")return i;{let t;return Array.isArray(i)?t=i:(gt(typeof i.getZIndex=="function",41),t=[i]),function(){return t}}}const Ri=Sh;class lf{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}getReadOptions(t,e){if(e){let n=e.dataProjection?jt(e.dataProjection):this.readProjection(t);e.extent&&n&&n.getUnits()==="tile-pixels"&&(n=jt(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 it()}readFeature(t,e){return it()}readFeatures(t,e){return it()}readGeometry(t,e){return it()}readProjection(t){return it()}writeFeature(t,e){return it()}writeFeatures(t,e){return it()}writeGeometry(t,e){return it()}}function Th(i,t,e){const n=e?jt(e.featureProjection):null,o=e?jt(e.dataProjection):null;let r;if(n&&o&&!Yn(n,o)?r=(t?i.clone():i).transform(t?n:o,t?o:n):r=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};r===i&&(r=i.clone()),r.applyTransform(a)}return r}class W_ extends lf{constructor(){super()}getType(){return"json"}readFeature(t,e){return this.readFeatureFromObject(la(t),this.getReadOptions(t,e))}readFeatures(t,e){return this.readFeaturesFromObject(la(t),this.getReadOptions(t,e))}readFeatureFromObject(t,e){return it()}readFeaturesFromObject(t,e){return it()}readGeometry(t,e){return this.readGeometryFromObject(la(t),this.getReadOptions(t,e))}readGeometryFromObject(t,e){return it()}readProjection(t){return this.readProjectionFromObject(la(t))}readProjectionFromObject(t){return it()}writeFeature(t,e){return JSON.stringify(this.writeFeatureObject(t,e))}writeFeatureObject(t,e){return it()}writeFeatures(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))}writeFeaturesObject(t,e){return it()}writeGeometry(t,e){return JSON.stringify(this.writeGeometryObject(t,e))}writeGeometryObject(t,e){return it()}}function la(i){if(typeof i=="string"){const t=JSON.parse(i);return t||null}else return i!==null?i:null}const V_=W_;function ha(i,t,e,n,o,r,s){let a,l;const h=(e-t)/n;if(h===1)a=t;else if(h===2)a=t,l=o;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=o*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,r=r||new Array(s);for(let u=0;u<s;++u)r[u]=a===void 0?NaN:l===void 0?i[a+u]:Ci(i[a+u],i[a+n+u],l);return r}function Ih(i,t,e,n,o,r){if(e==t)return null;let s;if(o<i[t+n-1])return r?(s=i.slice(t,t+n),s[n-1]=o,s):null;if(i[e-1]<o)return r?(s=i.slice(e-n,e),s[n-1]=o,s):null;if(o==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;o<i[(c+1)*n-1]?l=c:a=c+1}const h=i[a*n-1];if(o==h)return i.slice((a-1)*n,(a-1)*n+n);const u=i[(a+1)*n-1],d=(o-h)/(u-h);s=[];for(let c=0;c<n-1;++c)s.push(Ci(i[(a-1)*n+c],i[a*n+c],d));return s.push(o),s}function X_(i,t,e,n,o,r,s){if(s)return Ih(i,t,e[e.length-1],n,o,r);let a;if(o<i[n-1])return r?(a=i.slice(0,n),a[n-1]=o,a):null;if(i[i.length-1]<o)return r?(a=i.slice(i.length-n),a[n-1]=o,a):null;for(let l=0,h=e.length;l<h;++l){const u=e[l];if(t!=u){if(o<i[t+n-1])return null;if(o<=i[u-1])return Ih(i,t,u,n,o,!1);t=u}}return null}function hf(i,t,e,n){let o=i[t],r=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-o)*(l-o)+(h-r)*(h-r)),o=l,r=h}return s}class ua extends en{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?ui(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,o){return o<Wn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ah(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,n,o))}forEachSegment(t){return Xc(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,Ih(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return nn(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 hf(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=uh(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=na(this.flatCoordinates,0,t,this.stride),this.changed()}}const Qn=ua;class da extends en{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 o=this.getLayout();const r=t,s=[],a=[];for(let l=0,h=r.length;l<h;++l){const u=r[l];l===0&&(o=u.getLayout()),ui(s,u.getFlatCoordinates()),a.push(s.length)}this.setFlatCoordinates(o,s),this.ends_=a}}appendLineString(t){this.flatCoordinates?ui(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,o){return o<Wn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(sh(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),lh(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,n,o))}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,X_(this.flatCoordinates,0,this.ends_,this.stride,t,e,n))}getCoordinates(){return Rr(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(t){return t<0||this.ends_.length<=t?null:new Qn(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,o=[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=e[s],h=new Qn(t.slice(r,l),n);o.push(h),r=l}return o}getFlatMidpoints(){const t=[],e=this.flatCoordinates;let n=0;const o=this.ends_,r=this.stride;for(let s=0,a=o.length;s<a;++s){const l=o[s],h=ha(e,n,l,r,.5);ui(t,h),n=l}return t}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Ov(this.flatCoordinates,0,this.ends_,this.stride,t,e,0,n),new da(e,"XY",n)}getType(){return"MultiLineString"}intersectsExtent(t){return Uv(this.flatCoordinates,0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=hh(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}const zh=da;class Rh extends en{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){this.flatCoordinates?ui(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()}clone(){const t=new Rh(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,o){if(o<Wn(this.getExtent(),t,e))return o;const r=this.flatCoordinates,s=this.stride;for(let a=0,l=r.length;a<l;a+=s){const h=jn(t,e,r[a],r[a+1]);if(h<o){o=h;for(let u=0;u<s;++u)n[u]=r[a+u];n.length=s}}return o}getCoordinates(){return nn(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 ri(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)}getPoints(){const t=this.flatCoordinates,e=this.layout,n=this.stride,o=[];for(let r=0,s=t.length;r<s;r+=n){const a=new ri(t.slice(r,r+n),e);o.push(a)}return o}getType(){return"MultiPoint"}intersectsExtent(t){const e=this.flatCoordinates,n=this.stride;for(let o=0,r=e.length;o<r;o+=n){const s=e[o],a=e[o+1];if(Il(t,s,a))return!0}return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=na(this.flatCoordinates,0,t,this.stride),this.changed()}}const Dr=Rh;function uf(i,t,e,n){const o=[];let r=Be();for(let s=0,a=e.length;s<a;++s){const l=e[s];r=Rl(i,t,l[0],n),o.push((r[0]+r[2])/2,(r[1]+r[3])/2),t=l[l.length-1]}return o}class ca extends en{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 o=this.getLayout();const r=t,s=[],a=[];for(let l=0,h=r.length;l<h;++l){const u=r[l];l===0&&(o=u.getLayout());const d=s.length,c=u.getEnds();for(let f=0,g=c.length;f<g;++f)c[f]+=d;ui(s,u.getFlatCoordinates()),a.push(c)}e=o,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;ui(this.flatCoordinates,t.getFlatCoordinates()),e=t.getEnds().slice();for(let o=0,r=e.length;o<r;++o)e[o]+=n}this.endss_.push(e),this.changed()}clone(){const t=this.endss_.length,e=new Array(t);for(let o=0;o<t;++o)e[o]=this.endss_[o].slice();const n=new ca(this.flatCoordinates.slice(),this.layout,e);return n.applyProperties(this),n}closestPointXY(t,e,n,o){return o<Wn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Pv(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Dv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,n,o))}containsXY(t,e){return Bv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return Gv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),Zc(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,dh(e,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const t=uf(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=Vc(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new Dr(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;Xv(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Zc(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Nv(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 r=this.endss_[t-1];e=r[r.length-1]}const n=this.endss_[t].slice(),o=n[n.length-1];if(e!==0)for(let r=0,s=n.length;r<s;++r)n[r]-=e;return new Kn(this.flatCoordinates.slice(e,o),this.layout,n)}getPolygons(){const t=this.layout,e=this.flatCoordinates,n=this.endss_,o=[];let r=0;for(let s=0,a=n.length;s<a;++s){const l=n[s].slice(),h=l[l.length-1];if(r!==0)for(let d=0,c=l.length;d<c;++d)l[d]-=r;const u=new Kn(e.slice(r,h),t,l);o.push(u),r=h}return o}getType(){return"MultiPolygon"}intersectsExtent(t){return Wv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);const n=Lv(this.flatCoordinates,0,t,this.stride,this.endss_);if(n.length===0)this.flatCoordinates.length=0;else{const o=n[n.length-1];this.flatCoordinates.length=o.length===0?0:o[o.length-1]}this.changed()}}const Ah=ca;class fa extends Oc{constructor(t){super(),this.geometries_=t||null,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(Nt),this.changeEventsKeys_.length=0}listenGeometriesChange_(){if(!!this.geometries_)for(let t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push(pt(this.geometries_[t],et.CHANGE,this.changed,this))}clone(){const t=new fa(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t}closestPointXY(t,e,n,o){if(o<Wn(this.getExtent(),t,e))return o;const r=this.geometries_;for(let s=0,a=r.length;s<a;++s)o=r[s].closestPointXY(t,e,n,o);return o}containsXY(t,e){const n=this.geometries_;for(let o=0,r=n.length;o<r;++o)if(n[o].containsXY(t,e))return!0;return!1}computeExtent(t){xr(t);const e=this.geometries_;for(let n=0,o=e.length;n<o;++n)rc(t,e[n].getExtent());return t}getGeometries(){return df(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let t=[];const e=this.geometries_;for(let n=0,o=e.length;n<o;++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 o=!1;for(let r=0,s=n.length;r<s;++r){const a=n[r],l=a.getSimplifiedGeometry(t);e.push(l),l!==a&&(o=!0)}if(o){const r=new fa(null);return r.setGeometriesArray(e),r}else return this.simplifiedGeometryMaxMinSquaredTolerance=t,this}getType(){return"GeometryCollection"}intersectsExtent(t){const e=this.geometries_;for(let n=0,o=e.length;n<o;++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 o=0,r=n.length;o<r;++o)n[o].rotate(t,e);this.changed()}scale(t,e,n){n||(n=Ki(this.getExtent()));const o=this.geometries_;for(let r=0,s=o.length;r<s;++r)o[r].scale(t,e,n);this.changed()}setGeometries(t){this.setGeometriesArray(df(t))}setGeometriesArray(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()}applyTransform(t){const e=this.geometries_;for(let n=0,o=e.length;n<o;++n)e[n].applyTransform(t);this.changed()}translate(t,e){const n=this.geometries_;for(let o=0,r=n.length;o<r;++o)n[o].translate(t,e);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function df(i){const t=[];for(let e=0,n=i.length;e<n;++e)t.push(i[e].clone());return t}const Y_=fa;class q_ extends V_{constructor(t){t=t||{},super(),this.dataProjection=jt(t.dataProjection?t.dataProjection:"EPSG:4326"),t.featureProjection&&(this.defaultFeatureProjection=jt(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 o=Ph(n.geometry,e),r=new Ri;return this.geometryName_?r.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in n!==void 0&&r.setGeometryName(n.geometry_name),r.setGeometry(o),"id"in n&&r.setId(n.id),n.properties&&r.setProperties(n.properties,!0),r}readFeaturesFromObject(t,e){const n=t;let o=null;if(n.type==="FeatureCollection"){const r=t;o=[];const s=r.features;for(let a=0,l=s.length;a<l;++a)o.push(this.readFeatureFromObject(s[a],e))}else o=[this.readFeatureFromObject(t,e)];return o}readGeometryFromObject(t,e){return Ph(t,e)}readProjectionFromObject(t){const e=t.crs;let n;return e?e.type=="name"?n=jt(e.properties.name):e.type==="EPSG"?n=jt("EPSG:"+e.properties.code):gt(!1,36):n=this.dataProjection,n}writeFeatureObject(t,e){e=this.adaptOptions(e);const n={type:"Feature",geometry:null,properties:null},o=t.getId();if(o!==void 0&&(n.id=o),!t.hasProperties())return n;const r=t.getProperties(),s=t.getGeometry();return s&&(n.geometry=Dh(s,e),delete r[t.getGeometryName()]),Gn(r)||(n.properties=r),n}writeFeaturesObject(t,e){e=this.adaptOptions(e);const n=[];for(let o=0,r=t.length;o<r;++o)n.push(this.writeFeatureObject(t[o],e));return{type:"FeatureCollection",features:n}}writeGeometryObject(t,e){return Dh(t,this.adaptOptions(e))}}function Ph(i,t){if(!i)return null;let e;switch(i.type){case"Point":{e=Z_(i);break}case"LineString":{e=K_(i);break}case"Polygon":{e=t1(i);break}case"MultiPoint":{e=Q_(i);break}case"MultiLineString":{e=H_(i);break}case"MultiPolygon":{e=J_(i);break}case"GeometryCollection":{e=$_(i);break}default:throw new Error("Unsupported GeoJSON type: "+i.type)}return Th(e,!1,t)}function $_(i,t){const e=i.geometries.map(function(n){return Ph(n,t)});return new Y_(e)}function Z_(i){return new ri(i.coordinates)}function K_(i){return new Qn(i.coordinates)}function H_(i){return new zh(i.coordinates)}function Q_(i){return new Dr(i.coordinates)}function J_(i){return new Ah(i.coordinates)}function t1(i){return new Kn(i.coordinates)}function Dh(i,t){i=Th(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=o1(i);break}case"MultiLineString":{n=n1(i);break}case"MultiPolygon":{n=r1(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){return t=Object.assign({},t),delete t.featureProjection,{type:"GeometryCollection",geometries:i.getGeometriesArray().map(function(n){return Dh(n,t)})}}function i1(i,t){return{type:"LineString",coordinates:i.getCoordinates()}}function n1(i,t){return{type:"MultiLineString",coordinates:i.getCoordinates()}}function o1(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 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 Jn=q_;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 ae=Lh,te={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class Oh{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=we(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Oh({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 it()}getImage(t){return it()}getHitDetectionImage(){return it()}getPixelRatio(t){return 1}getImageState(){return it()}getImageSize(){return it()}getOrigin(){return it()}getSize(){return it()}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_=we(t)}listenImageChange(t){it()}load(){it()}unlistenImageChange(t){it()}}const cf=Oh;function ff(i,t,e){const n=i;let o=!0,r=!1,s=!1;const a=[Ps(n,et.LOAD,function(){s=!0,r||t()})];return n.src&&s0?(r=!0,n.decode().then(function(){o&&t()}).catch(function(l){o&&(s?t():e())})):a.push(Ps(n,et.ERROR,e)),function(){o=!1,a.forEach(Nt)}}let Lr=null;class l1 extends As{constructor(t,e,n,o,r,s){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=o,this.canvas_={},this.color_=s,this.unlisten_=null,this.imageState_=r,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_===te.LOADED){Lr||(Lr=De(1,1)),Lr.drawImage(this.image_,0,0);try{Lr.getImageData(0,0,1,1),this.tainted_=!1}catch{Lr=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(et.CHANGE)}handleImageError_(){this.imageState_=te.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=te.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=De(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_===te.IDLE){this.image_||this.initializeImage_(),this.imageState_=te.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=ff(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==te.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 o=n.getContext("2d");o.scale(t,t),o.drawImage(e,0,0),o.globalCompositeOperation="multiply",o.fillStyle=Zl(this.color_),o.fillRect(0,0,n.width/t,n.height/t),o.globalCompositeOperation="destination-in",o.drawImage(e,0,0),this.canvas_[t]=n}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function h1(i,t,e,n,o,r){let s=Ks.get(t,n,r);return s||(s=new l1(i,t,e,n,o,r),Ks.set(t,n,r,s)),s}class Fh extends cf{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,n=t.rotation!==void 0?t.rotation:0,o=t.scale!==void 0?t.scale:1,r=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:n,scale:o,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:r,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;gt(!(a!==void 0&&s),4),gt(!s||s&&this.imgSize_,5),(a===void 0||a.length===0)&&s&&(a=s.src||H(s)),gt(a!==void 0&&a.length>0,6);const l=t.src!==void 0?te.IDLE:te.LOADED;this.color_=t.color!==void 0?Mr(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 Fh({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 o=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!o)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=o[0]),this.anchorYUnits_=="fraction"&&(t[1]*=o[1])}if(this.anchorOrigin_!="top-left"){if(!o)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+o[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+o[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(et.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(et.CHANGE,t)}}const ga=Fh;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 Me=Nh;function fi(i){return Array.isArray(i)?wc(i):i}class Gh extends cf{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_,o=De(n.size*t,n.size*t);this.draw_(n,o,t),e=o.canvas,this.canvas_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return te.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 o=this.radius_,r=this.radius2_===void 0?o:this.radius2_;if(o<r){const w=o;o=r,r=w}const s=this.radius2_===void 0?this.points_:this.points_*2,a=2*Math.PI/s,l=r*Math.sin(a),h=Math.sqrt(r*r-l*l),u=o-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((o+f)*(o+f)+g*g)-o;if(this.radius2_===void 0||t==="bevel")return p*2;const _=o*Math.sin(a),v=Math.sqrt(o*o-_*_),y=r-v,k=Math.sqrt(_*_+y*y)/_;if(k<=n){const w=k*e/2-r-o;return 2*Math.max(p,w)}return p*2}createRenderOptions(){let t=Ro,e=0,n=null,o=0,r,s=0;this.stroke_&&(r=this.stroke_.getColor(),r===null&&(r=Tr),r=fi(r),s=this.stroke_.getWidth(),s===void 0&&(s=zr),n=this.stroke_.getLineDash(),o=this.stroke_.getLineDashOffset(),t=this.stroke_.getLineJoin(),t===void 0&&(t=Ro),e=this.stroke_.getMiterLimit(),e===void 0&&(e=Sr));const a=this.calculateLineJoinSize_(t,s,e),l=Math.max(this.radius_,this.radius2_||0),h=Math.ceil(2*l+a);return{strokeStyle:r,strokeWidth:s,size:h,lineDash:n,lineDashOffset:o,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 o=this.fill_.getColor();o===null&&(o=Ti),e.fillStyle=fi(o),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=Mr(e)),e===null?n=1:Array.isArray(e)&&(n=e.length===4?e[3]:1),n===0){const o=De(t.size,t.size);this.hitDetectionCanvas_=o.canvas,this.drawHitDetectionCanvas_(t,o)}}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 o=this.radius2_===void 0?n:this.radius2_;this.radius2_!==void 0&&(e*=2);const r=this.angle_-Math.PI/2,s=2*Math.PI/e;for(let a=0;a<e;a++){const l=r+a*s,h=a%2===0?n:o;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=Ti,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 sn=jh;class an{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=mf,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 an({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_=mf,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:(gt(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 ae({color:"rgba(255,255,255,0.4)"}),n=new Me({color:"#3399CC",width:1.25});Bh=[new an({image:new sn({fill:e,stroke:n,radius:5}),fill:e,stroke:n})]}return Bh}function gf(){const i={},t=[255,255,255,1],e=[0,153,255,1],n=3;return i.Polygon=[new an({fill:new ae({color:[255,255,255,.5]})})],i.MultiPolygon=i.Polygon,i.LineString=[new an({stroke:new Me({color:t,width:n+2})}),new an({stroke:new Me({color:e,width:n})})],i.MultiLineString=i.LineString,i.Circle=i.Polygon.concat(i.LineString),i.Point=[new an({image:new sn({radius:n*2,fill:new ae({color:e}),stroke:new Me({color:t,width:n/2})}),zIndex:1/0})],i.MultiPoint=i.Point,i.GeometryCollection=i.Polygon.concat(i.LineString,i.Point),i}function mf(i){return i.getGeometry()}const ee=an,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_=we(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 ae({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_=we(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 pf=Uh;function f1(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Wh={};Wh.read=function(i,t,e,n,o){var r,s,a=o*8-n-1,l=(1<<a)-1,h=l>>1,u=-7,d=e?o-1:0,c=e?-1:1,f=i[t+d];for(d+=c,r=f&(1<<-u)-1,f>>=-u,u+=a;u>0;r=r*256+i[t+d],d+=c,u-=8);for(s=r&(1<<-u)-1,r>>=-u,u+=n;u>0;s=s*256+i[t+d],d+=c,u-=8);if(r===0)r=1-h;else{if(r===l)return s?NaN:(f?-1:1)*(1/0);s=s+Math.pow(2,n),r=r-h}return(f?-1:1)*s*Math.pow(2,r-n)},Wh.write=function(i,t,e,n,o,r){var s,a,l,h=r*8-o-1,u=(1<<h)-1,d=u>>1,c=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:r-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,o),s=s+d):(a=t*Math.pow(2,d-1)*Math.pow(2,o),s=0));o>=8;i[e+f]=a&255,f+=g,a/=256,o-=8);for(s=s<<o|a,h+=o;h>0;i[e+f]=s&255,f+=g,s/=256,h-=8);i[e+f-g]|=m*128};var g1=It,pa=Wh;function It(i){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(i)?i:new Uint8Array(i||0),this.pos=0,this.type=0,this.length=this.buf.length}It.Varint=0,It.Fixed64=1,It.Bytes=2,It.Fixed32=5;var Vh=(1<<16)*(1<<16),vf=1/Vh,m1=12,_f=typeof TextDecoder>"u"?null:new TextDecoder("utf8");It.prototype={destroy:function(){this.buf=null},readFields:function(i,t,e){for(e=e||this.length;this.pos<e;){var n=this.readVarint(),o=n>>3,r=this.pos;this.type=n&7,i(o,t,this),this.pos===r&&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=xf(this.buf,this.pos);return this.pos+=4,i},readFixed64:function(){var i=va(this.buf,this.pos)+va(this.buf,this.pos+4)*Vh;return this.pos+=8,i},readSFixed64:function(){var i=va(this.buf,this.pos)+xf(this.buf,this.pos+4)*Vh;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&&_f?z1(this.buf,t,i):I1(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!==It.Bytes)return i.push(this.readVarint(t));var e=Ai(this);for(i=i||[];this.pos<e;)i.push(this.readVarint(t));return i},readPackedSVarint:function(i){if(this.type!==It.Bytes)return i.push(this.readSVarint());var t=Ai(this);for(i=i||[];this.pos<t;)i.push(this.readSVarint());return i},readPackedBoolean:function(i){if(this.type!==It.Bytes)return i.push(this.readBoolean());var t=Ai(this);for(i=i||[];this.pos<t;)i.push(this.readBoolean());return i},readPackedFloat:function(i){if(this.type!==It.Bytes)return i.push(this.readFloat());var t=Ai(this);for(i=i||[];this.pos<t;)i.push(this.readFloat());return i},readPackedDouble:function(i){if(this.type!==It.Bytes)return i.push(this.readDouble());var t=Ai(this);for(i=i||[];this.pos<t;)i.push(this.readDouble());return i},readPackedFixed32:function(i){if(this.type!==It.Bytes)return i.push(this.readFixed32());var t=Ai(this);for(i=i||[];this.pos<t;)i.push(this.readFixed32());return i},readPackedSFixed32:function(i){if(this.type!==It.Bytes)return i.push(this.readSFixed32());var t=Ai(this);for(i=i||[];this.pos<t;)i.push(this.readSFixed32());return i},readPackedFixed64:function(i){if(this.type!==It.Bytes)return i.push(this.readFixed64());var t=Ai(this);for(i=i||[];this.pos<t;)i.push(this.readFixed64());return i},readPackedSFixed64:function(i){if(this.type!==It.Bytes)return i.push(this.readSFixed64());var t=Ai(this);for(i=i||[];this.pos<t;)i.push(this.readSFixed64());return i},skip:function(i){var t=i&7;if(t===It.Varint)for(;this.buf[this.pos++]>127;);else if(t===It.Bytes)this.pos=this.readVarint()+this.pos;else if(t===It.Fixed32)this.pos+=4;else if(t===It.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),Fo(this.buf,i,this.pos),this.pos+=4},writeSFixed32:function(i){this.realloc(4),Fo(this.buf,i,this.pos),this.pos+=4},writeFixed64:function(i){this.realloc(8),Fo(this.buf,i&-1,this.pos),Fo(this.buf,Math.floor(i*vf),this.pos+4),this.pos+=8},writeSFixed64:function(i){this.realloc(8),Fo(this.buf,i&-1,this.pos),Fo(this.buf,Math.floor(i*vf),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=R1(this.buf,i,this.pos);var e=this.pos-t;e>=128&&yf(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&&yf(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeMessage:function(i,t,e){this.writeTag(i,It.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,C1,t)},writePackedSFixed32:function(i,t){t.length&&this.writeMessage(i,E1,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,It.Bytes),this.writeBytes(t)},writeFixed32Field:function(i,t){this.writeTag(i,It.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(i,t){this.writeTag(i,It.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(i,t){this.writeTag(i,It.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(i,t){this.writeTag(i,It.Fixed64),this.writeSFixed64(t)},writeVarintField:function(i,t){this.writeTag(i,It.Varint),this.writeVarint(t)},writeSVarintField:function(i,t){this.writeTag(i,It.Varint),this.writeSVarint(t)},writeStringField:function(i,t){this.writeTag(i,It.Bytes),this.writeString(t)},writeFloatField:function(i,t){this.writeTag(i,It.Fixed32),this.writeFloat(t)},writeDoubleField:function(i,t){this.writeTag(i,It.Fixed64),this.writeDouble(t)},writeBooleanField:function(i,t){this.writeVarintField(i,Boolean(t))}};function p1(i,t,e){var n=e.buf,o,r;if(r=n[e.pos++],o=(r&112)>>4,r<128||(r=n[e.pos++],o|=(r&127)<<3,r<128)||(r=n[e.pos++],o|=(r&127)<<10,r<128)||(r=n[e.pos++],o|=(r&127)<<17,r<128)||(r=n[e.pos++],o|=(r&127)<<24,r<128)||(r=n[e.pos++],o|=(r&1)<<31,r<128))return Oo(i,o,t);throw new Error("Expected varint not more than 10 bytes")}function Ai(i){return i.type===It.Bytes?i.readVarint()+i.pos:i.pos+1}function Oo(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 yf(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 o=e.pos-1;o>=i;o--)e.buf[o+n]=e.buf[o]}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 C1(i,t){for(var e=0;e<i.length;e++)t.writeFixed32(i[e])}function E1(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 Fo(i,t,e){i[e]=t,i[e+1]=t>>>8,i[e+2]=t>>>16,i[e+3]=t>>>24}function xf(i,t){return(i[t]|i[t+1]<<8|i[t+2]<<16)+(i[t+3]<<24)}function I1(i,t,e){for(var n="",o=t;o<e;){var r=i[o],s=null,a=r>239?4:r>223?3:r>191?2:1;if(o+a>e)break;var l,h,u;a===1?r<128&&(s=r):a===2?(l=i[o+1],(l&192)===128&&(s=(r&31)<<6|l&63,s<=127&&(s=null))):a===3?(l=i[o+1],h=i[o+2],(l&192)===128&&(h&192)===128&&(s=(r&15)<<12|(l&63)<<6|h&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):a===4&&(l=i[o+1],h=i[o+2],u=i[o+3],(l&192)===128&&(h&192)===128&&(u&192)===128&&(s=(r&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),o+=a}return n}function z1(i,t,e){return _f.decode(i.subarray(t,e))}function R1(i,t,e){for(var n=0,o,r;n<t.length;n++){if(o=t.charCodeAt(n),o>55295&&o<57344)if(r)if(o<56320){i[e++]=239,i[e++]=191,i[e++]=189,r=o;continue}else o=r-55296<<10|o-56320|65536,r=null;else{o>56319||n+1===t.length?(i[e++]=239,i[e++]=191,i[e++]=189):r=o;continue}else r&&(i[e++]=239,i[e++]=191,i[e++]=189,r=null);o<128?i[e++]=o:(o<2048?i[e++]=o>>6|192:(o<65536?i[e++]=o>>12|224:(i[e++]=o>>18|240,i[e++]=o>>12&63|128),i[e++]=o>>6&63|128),i[e++]=o&63|128)}return e}class _a extends en{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 _a(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,o){const r=this.flatCoordinates,s=t-r[0],a=e-r[1],l=s*s+a*a;if(l<o){if(l===0)for(let h=0;h<this.stride;++h)n[h]=r[h];else{const h=this.getRadius()/Math.sqrt(l);n[0]=r[0]+h*s,n[1]=r[1]+h*a;for(let u=2;u<this.stride;++u)n[u]=r[u]}return n.length=this.stride,l}else return o}containsXY(t,e){const n=this.flatCoordinates,o=t-n[0],r=e-n[1];return o*o+r*r<=this.getRadiusSquared_()}getCenter(){return this.flatCoordinates.slice(0,this.stride)}computeExtent(t){const e=this.flatCoordinates,n=e[this.stride]-e[0];return ii(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:Al(t,this.intersectsCoordinate.bind(this))}return!1}setCenter(t){const e=this.stride,n=this.flatCoordinates[e]-this.flatCoordinates[0],o=t.slice();o[e]=o[0]+n;for(let r=1;r<e;++r)o[e+r]=t[r];this.setFlatCoordinates(this.layout,o),this.changed()}setCenterAndRadius(t,e,n){this.setLayout(n,t,0),this.flatCoordinates||(this.flatCoordinates=[]);const o=this.flatCoordinates;let r=Nc(o,0,t,this.stride);o[r++]=o[0]+e;for(let s=1,a=this.stride;s<a;++s)o[r++]=o[s];o.length=r,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(),o=this.getStride();this.setCenter(oh(n,0,n.length,o,t,e,n)),this.changed()}translate(t,e){const n=this.getCenter(),o=this.getStride();this.setCenter(Dc(n,0,n.length,o,t,e,n)),this.changed()}}_a.prototype.transform;const A1=_a,bf=Ke();class Or{constructor(t,e,n,o,r){this.styleFunction,this.extent_,this.id_=r,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=n,this.properties_=o}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_=this.type_==="Point"?br(this.flatCoordinates_):Rl(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=Ki(this.getExtent());this.flatInteriorPoints_=fh(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=uf(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=Vc(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 o=0,r=n.length;o<r;++o){const s=n[o],a=ha(t,e,s,2,.5);ui(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=jt(t);const e=t.getExtent(),n=t.getWorldExtent();if(e&&n){const o=$e(n)/$e(e);Si(bf,n[0],n[3],o,-o,0,0,0),tn(this.flatCoordinates_,0,this.flatCoordinates_.length,2,bf,this.flatCoordinates_)}}getEnds(){return this.ends_}}Or.prototype.getEndss=Or.prototype.getEnds,Or.prototype.getFlatCoordinates=Or.prototype.getOrientedFlatCoordinates;const Xh=Or;class P1 extends lf{constructor(t){super(),t=t||{},this.dataProjection=new Gs({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,o){t.pos=e.geometry;const r=t.readVarint()+t.pos;let s=1,a=0,l=0,h=0,u=0,d=0;for(;t.pos<r;){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&&(o.push(u),d=u),n.push(l,h),u+=2):s===7?u>d&&(n.push(n[d],n[d+1]),u+=2):gt(!1,59)}u>d&&(o.push(u),d=u)}createFeature_(t,e,n){const o=e.type;if(o===0)return null;let r;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=N1(o,h.length);if(this.featureClass_===Xh)r=new this.featureClass_(u,l,h,s,a),r.transform(n.dataProjection);else{let d;if(u=="Polygon"){const g=Yv(l,h);d=g.length>1?new Ah(l,"XY",g):new Kn(l,"XY",h)}else d=u==="Point"?new ri(l,"XY"):u==="LineString"?new Qn(l,"XY"):u==="MultiPoint"?new Dr(l,"XY"):u==="MultiLineString"?new zh(l,"XY",h):null;const c=this.featureClass_;r=new c,this.geometryName_&&r.setGeometryName(this.geometryName_);const f=Th(d,!1,n);r.setGeometry(f),a!==void 0&&r.setId(a),r.setProperties(s,!0)}return r}getType(){return"arraybuffer"}readFeatures(t,e){const n=this.layers_;e=this.adaptOptions(e);const o=jt(e.dataProjection);o.setWorldExtent(e.extent),e.dataProjection=o;const r=new g1(t),s=r.readFields(D1,{}),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;o.setExtent(u);for(let d=0,c=h.length;d<c;++d){const f=F1(r,h,d),g=this.createFeature_(r,f,e);g!==null&&a.push(g)}}return a}readProjection(t){return this.dataProjection}setLayers(t){this.layers_=t}}function D1(i,t,e){if(i===3){const n={keys:[],values:[],features:[]},o=e.readVarint()+e.pos;e.readFields(L1,n,o),n.length=n.features.length,n.length&&(t[n.name]=n)}}function L1(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 o=e.readVarint()+e.pos;for(;e.pos<o;)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 O1(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 o=t.layer.keys[e.readVarint()],r=t.layer.values[e.readVarint()];t.properties[o]=r}}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,o={layer:t,type:0,properties:{}};return i.readFields(O1,o,n),o}function N1(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 G1=P1;function j1(i,t,e,n,o){kf(i,t,e||0,n||i.length-1,o||B1)}function kf(i,t,e,n,o){for(;n>e;){if(n-e>600){var r=n-e+1,s=t-e+1,a=Math.log(r),l=.5*Math.exp(2*a/3),h=.5*Math.sqrt(a*l*(r-l)/r)*(s-r/2<0?-1:1),u=Math.max(e,Math.floor(t-s*l/r+h)),d=Math.min(n,Math.floor(t+(r-s)*l/r+h));kf(i,t,u,d,o)}var c=i[t],f=e,g=n;for(Fr(i,e,t),o(i[n],c)>0&&Fr(i,e,n);f<g;){for(Fr(i,f,g),f++,g--;o(i[f],c)<0;)f++;for(;o(i[g],c)>0;)g--}o(i[e],c)===0?Fr(i,e,g):(g++,Fr(i,g,n)),g<=t&&(e=g+1),t<=g&&(n=g-1)}}function Fr(i,t,e){var n=i[t];i[t]=i[e],i[e]=n}function B1(i,t){return i<t?-1:i>t?1:0}let wf=class{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(!xa(t,e))return n;const o=this.toBBox,r=[];for(;e;){for(let s=0;s<e.children.length;s++){const a=e.children[s],l=e.leaf?o(a):a;xa(t,l)&&(e.leaf?n.push(a):qh(t,l)?this._all(a,n):r.push(a))}e=r.pop()}return n}collides(t){let e=this.data;if(!xa(t,e))return!1;const n=[];for(;e;){for(let o=0;o<e.children.length;o++){const r=e.children[o],s=e.leaf?this.toBBox(r):r;if(xa(t,s)){if(e.leaf||qh(t,s))return!0;n.push(r)}}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=Go([]),this}remove(t,e){if(!t)return this;let n=this.data;const o=this.toBBox(t),r=[],s=[];let a,l,h;for(;n||r.length;){if(n||(n=r.pop(),l=r[r.length-1],a=s.pop(),h=!0),n.leaf){const u=U1(t,n.children,e);if(u!==-1)return n.children.splice(u,1),r.push(n),this._condense(r),this}!h&&!n.leaf&&qh(n,o)?(r.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,o){const r=n-e+1;let s=this._maxEntries,a;if(r<=s)return a=Go(t.slice(e,n+1)),No(a,this.toBBox),a;o||(o=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/Math.pow(s,o-1))),a=Go([]),a.leaf=!1,a.height=o;const l=Math.ceil(r/s),h=l*Math.ceil(Math.sqrt(s));Mf(t,e,n,h,this.compareMinX);for(let u=e;u<=n;u+=h){const d=Math.min(u+h-1,n);Mf(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,o-1))}}return No(a,this.toBBox),a}_chooseSubtree(t,e,n,o){for(;o.push(e),!(e.leaf||o.length-1===n);){let r=1/0,s=1/0,a;for(let l=0;l<e.children.length;l++){const h=e.children[l],u=Yh(h),d=X1(t,h)-u;d<s?(s=d,r=u<r?u:r,a=h):d===s&&u<r&&(r=u,a=h)}e=a||e.children[0]}return e}_insert(t,e,n){const o=n?t:this.toBBox(t),r=[],s=this._chooseSubtree(o,this.data,e,r);for(s.children.push(t),Gr(s,o);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(o,r,e)}_split(t,e){const n=t[e],o=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,o);const s=this._chooseSplitIndex(n,r,o),a=Go(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,No(n,this.toBBox),No(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this.data=Go([t,e]),this.data.height=t.height+1,this.data.leaf=!1,No(this.data,this.toBBox)}_chooseSplitIndex(t,e,n){let o,r=1/0,s=1/0;for(let a=e;a<=n-e;a++){const l=Nr(t,0,a,this.toBBox),h=Nr(t,a,n,this.toBBox),u=Y1(l,h),d=Yh(l)+Yh(h);u<r?(r=u,o=a,s=d<s?d:s):u===r&&d<s&&(s=d,o=a)}return o||n-e}_chooseSplitAxis(t,e,n){const o=t.leaf?this.compareMinX:W1,r=t.leaf?this.compareMinY:V1,s=this._allDistMargin(t,e,n,o),a=this._allDistMargin(t,e,n,r);s<a&&t.children.sort(o)}_allDistMargin(t,e,n,o){t.children.sort(o);const r=this.toBBox,s=Nr(t,0,e,r),a=Nr(t,n-e,n,r);let l=ya(s)+ya(a);for(let h=e;h<n-e;h++){const u=t.children[h];Gr(s,t.leaf?r(u):u),l+=ya(s)}for(let h=n-e-1;h>=e;h--){const u=t.children[h];Gr(a,t.leaf?r(u):u),l+=ya(a)}return l}_adjustParentBBoxes(t,e,n){for(let o=n;o>=0;o--)Gr(e[o],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():No(t[e],this.toBBox)}};function U1(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 No(i,t){Nr(i,0,i.children.length,t,i)}function Nr(i,t,e,n,o){o||(o=Go(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let r=t;r<e;r++){const s=i.children[r];Gr(o,i.leaf?n(s):s)}return o}function Gr(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 W1(i,t){return i.minX-t.minX}function V1(i,t){return i.minY-t.minY}function Yh(i){return(i.maxX-i.minX)*(i.maxY-i.minY)}function ya(i){return i.maxX-i.minX+(i.maxY-i.minY)}function X1(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 Y1(i,t){const e=Math.max(i.minX,t.minX),n=Math.max(i.minY,t.minY),o=Math.min(i.maxX,t.maxX),r=Math.min(i.maxY,t.maxY);return Math.max(0,o-e)*Math.max(0,r-n)}function qh(i,t){return i.minX<=t.minX&&i.minY<=t.minY&&t.maxX<=i.maxX&&t.maxY<=i.maxY}function xa(i,t){return t.minX<=i.maxX&&t.minY<=i.maxY&&t.maxX>=i.minX&&t.maxY>=i.minY}function Go(i){return{children:i,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Mf(i,t,e,n,o){const r=[t,e];for(;r.length;){if(e=r.pop(),t=r.pop(),e-t<=n)continue;const s=t+Math.ceil((e-t)/n/2)*n;j1(i,s,t,e,o),r.push(t,s,s,e)}}function Cf(i){return new ee({fill:jr(i,""),stroke:Br(i,""),text:q1(i),image:$1(i)})}function jr(i,t){const e=i[t+"fill-color"];if(!!e)return new ae({color:e})}function Br(i,t){const e=i[t+"stroke-width"],n=i[t+"stroke-color"];if(!(!e&&!n))return new Me({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 q1(i){const t=i["text-value"];return t?new pf({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:jr(i,"text-"),backgroundFill:jr(i,"text-background-"),stroke:Br(i,"text-"),backgroundStroke:Br(i,"text-background-")}):void 0}function $1(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 r="shape-";return new ma({points:n,fill:jr(i,r),stroke:Br(i,r),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 o=i["circle-radius"];if(o){const r="circle-";return new sn({radius:o,fill:jr(i,r),stroke:Br(i,r),displacement:i["circle-displacement"],scale:i["circle-scale"],rotation:i["circle-rotation"],rotateWithView:i["circle-rotate-with-view"],declutterMode:i["circle-declutter-mode"]})}}const Ef={RENDER_ORDER:"renderOrder"};class Z1 extends Ns{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(Ef.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 wf(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(Ef.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 ee)e=t;else if(Array.isArray(t)){const n=t.length,o=new Array(n);for(let r=0;r<n;++r){const s=t[r];s instanceof ee?o[r]=s:o[r]=Cf(s)}e=o}else e=Cf(t);this.style_=e,this.styleFunction_=t===null?void 0:u1(this.style_),this.changed()}}const Sf=Z1,Ur={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},ba=[Ur.FILL],ln=[Ur.STROKE],to=[Ur.BEGIN_PATH],Tf=[Ur.CLOSE_PATH],tt=Ur;class K1{drawCustom(t,e,n,o){}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 If=K1;class H1 extends If{constructor(t,e,n,o){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=o,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(),o=this.tmpCoordinate_,r=this.coordinates;let s=r.length;for(let a=0,l=t.length;a<l;a+=e)o[0]=t[a],o[1]=t[a+1],Bs(n,o)&&(r[s++]=o[0],r[s++]=o[1]);return s}appendFlatLineCoordinates(t,e,n,o,r,s){const a=this.coordinates;let l=a.length;const h=this.getBufferedMaxExtent();s&&(e+=o);let u=t[e],d=t[e+1];const c=this.tmpCoordinate_;let f=!0,g,m,p;for(g=e+o;g<n;g+=o)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===re.INTERSECTING?(a[l++]=c[0],a[l++]=c[1],f=!1):f=!0,u=c[0],d=c[1],m=p;return(r&&f||g===e+o)&&(a[l++]=u,a[l++]=d),l}drawCustomCoordinates_(t,e,n,o,r){for(let s=0,a=n.length;s<a;++s){const l=n[s],h=this.appendFlatLineCoordinates(t,e,l,o,!1,!1);r.push(h),e=l}return e}drawCustom(t,e,n,o){this.beginGeometry(t,e);const r=t.getType(),s=t.getStride(),a=this.coordinates.length;let l,h,u,d,c;switch(r){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([tt.CUSTOM,a,d,t,n,dh]),this.hitDetectionInstructions.push([tt.CUSTOM,a,d,t,o||n,dh]);break;case"Polygon":case"MultiLineString":u=[],l=r=="Polygon"?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),c=this.drawCustomCoordinates_(l,0,t.getEnds(),s,u),this.instructions.push([tt.CUSTOM,a,u,t,n,Rr]),this.hitDetectionInstructions.push([tt.CUSTOM,a,u,t,o||n,Rr]);break;case"LineString":case"Circle":l=t.getFlatCoordinates(),h=this.appendFlatLineCoordinates(l,0,l.length,s,!1,!1),this.instructions.push([tt.CUSTOM,a,h,t,n,nn]),this.hitDetectionInstructions.push([tt.CUSTOM,a,h,t,o||n,nn]);break;case"MultiPoint":l=t.getFlatCoordinates(),h=this.appendFlatPointCoordinates(l,s),h>a&&(this.instructions.push([tt.CUSTOM,a,h,t,n,nn]),this.hitDetectionInstructions.push([tt.CUSTOM,a,h,t,o||n,nn]));break;case"Point":l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),h=this.coordinates.length,this.instructions.push([tt.CUSTOM,a,h,t,n]),this.hitDetectionInstructions.push([tt.CUSTOM,a,h,t,o||n]);break}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[tt.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[tt.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 o,r,s=-1;for(e=0;e<n;++e)o=t[e],r=o[0],r==tt.END_GEOMETRY?s=e:r==tt.BEGIN_GEOMETRY&&(o[2]=e,Zp(this.hitDetectionInstructions,s,e),s=-1)}setFillStrokeStyle(t,e){const n=this.state;if(t){const o=t.getColor();n.fillStyle=fi(o||Ti)}else n.fillStyle=void 0;if(e){const o=e.getColor();n.strokeStyle=fi(o||Tr);const r=e.getLineCap();n.lineCap=r!==void 0?r:Hs;const s=e.getLineDash();n.lineDash=s?s.slice():Cr;const a=e.getLineDashOffset();n.lineDashOffset=a||Er;const l=e.getLineJoin();n.lineJoin=l!==void 0?l:Ro;const h=e.getWidth();n.lineWidth=h!==void 0?h:zr;const u=e.getMiterLimit();n.miterLimit=u!==void 0?u:Sr,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=[tt.SET_FILL_STYLE,e];return typeof e!="string"&&n.push(!0),n}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[tt.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,o=t.lineCap,r=t.lineDash,s=t.lineDashOffset,a=t.lineJoin,l=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=o||r!=t.currentLineDash&&!Xi(t.currentLineDash,r)||t.currentLineDashOffset!=s||t.currentLineJoin!=a||t.currentLineWidth!=l||t.currentMiterLimit!=h)&&(n!==void 0&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=o,t.currentLineDash=r,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=[tt.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=oc(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;ci(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const Wr=H1;class Q1 extends Wr{constructor(t,e,n,o){super(t,e,n,o),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(),o=t.getStride(),r=this.coordinates.length,s=this.appendFlatPointCoordinates(n,o);this.instructions.push([tt.DRAW_IMAGE,r,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([tt.DRAW_IMAGE,r,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(),o=t.getStride(),r=this.coordinates.length,s=this.appendFlatPointCoordinates(n,o);this.instructions.push([tt.DRAW_IMAGE,r,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([tt.DRAW_IMAGE,r,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(),o=t.getSize(),r=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_=o[1],this.opacity_=t.getOpacity(),this.originX_=r[0],this.originY_=r[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=o[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const J1=Q1;class ty extends Wr{constructor(t,e,n,o){super(t,e,n,o)}drawFlatCoordinates_(t,e,n,o){const r=this.coordinates.length,s=this.appendFlatLineCoordinates(t,e,n,o,!1,!1),a=[tt.MOVE_TO_LINE_TO,r,s];return this.instructions.push(a),this.hitDetectionInstructions.push(a),n}drawLineString(t,e){const n=this.state,o=n.strokeStyle,r=n.lineWidth;if(o===void 0||r===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([tt.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Cr,Er],to);const s=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(s,0,s.length,a),this.hitDetectionInstructions.push(ln),this.endGeometry(e)}drawMultiLineString(t,e){const n=this.state,o=n.strokeStyle,r=n.lineWidth;if(o===void 0||r===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([tt.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],to);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(ln),this.endGeometry(e)}finish(){const t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(ln),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(ln),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(to)}}const ey=ty;class iy extends Wr{constructor(t,e,n,o){super(t,e,n,o)}drawFlatCoordinatess_(t,e,n,o){const r=this.state,s=r.fillStyle!==void 0,a=r.strokeStyle!==void 0,l=n.length;this.instructions.push(to),this.hitDetectionInstructions.push(to);for(let h=0;h<l;++h){const u=n[h],d=this.coordinates.length,c=this.appendFlatLineCoordinates(t,e,u,o,!0,!a),f=[tt.MOVE_TO_LINE_TO,d,c];this.instructions.push(f),this.hitDetectionInstructions.push(f),a&&(this.instructions.push(Tf),this.hitDetectionInstructions.push(Tf)),e=u}return s&&(this.instructions.push(ba),this.hitDetectionInstructions.push(ba)),a&&(this.instructions.push(ln),this.hitDetectionInstructions.push(ln)),e}drawCircle(t,e){const n=this.state,o=n.fillStyle,r=n.strokeStyle;if(o===void 0&&r===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([tt.SET_FILL_STYLE,Ti]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([tt.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=[tt.CIRCLE,l];this.instructions.push(to,h),this.hitDetectionInstructions.push(to,h),n.fillStyle!==void 0&&(this.instructions.push(ba),this.hitDetectionInstructions.push(ba)),n.strokeStyle!==void 0&&(this.instructions.push(ln),this.hitDetectionInstructions.push(ln)),this.endGeometry(e)}drawPolygon(t,e){const n=this.state,o=n.fillStyle,r=n.strokeStyle;if(o===void 0&&r===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([tt.SET_FILL_STYLE,Ti]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([tt.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,o=n.fillStyle,r=n.strokeStyle;if(o===void 0&&r===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([tt.SET_FILL_STYLE,Ti]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([tt.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,o=e.length;n<o;++n)e[n]=$n(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 zf=iy;function ny(i,t,e,n,o){let r=e,s=e,a=0,l=0,h=e,u,d,c,f,g,m,p,_,v,y;for(d=e;d<n;d+=o){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,r=h,s=d),l=0,h=d-o)),c=f,p=v,_=y),g=x,m=k}return l+=f,l>a?[h,d]:[r,s]}const Vr={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class oy extends Wr{constructor(t,e,n,o){super(t,e,n,o),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_,o=this.textStrokeState_,r=this.textState_;if(this.text_===""||!r||!n&&!o)return;const s=this.coordinates;let a=s.length;const l=t.getType();let h=null,u=t.getStride();if(r.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=r.textAlign;let f=0,g;for(let m=0,p=d.length;m<p;++m){if(c==null){const v=ny(r.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=r.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(),r.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)r.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_(),(r.backgroundFill||r.backgroundStroke)&&(this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke),r.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),r.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let f=r.padding;if(f!=qn&&(r.scale[0]<0||r.scale[1]<0)){let p=r.padding[0],_=r.padding[1],v=r.padding[2],y=r.padding[3];r.scale[0]<0&&(_=-_,y=-y),r.scale[1]<0&&(p=-p,v=-v),f=[p,_,v,y]}const g=this.pixelRatio;this.instructions.push([tt.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}),!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]);const m=1/g;this.hitDetectionInstructions.push([tt.DRAW_IMAGE,a,c,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[m,m],NaN,void 0,this.declutterImageWithText_,f,!!r.backgroundFill,!!r.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_,o=this.strokeKey_;t&&(o in this.strokeStates||(this.strokeStates[o]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||Ir,justify:e.justify,textBaseline:e.textBaseline||Qs,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_,o=this.textState_,r=this.strokeKey_,s=this.textKey_,a=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,h=Vr[o.textBaseline],u=this.textOffsetY_*l,d=this.text_,c=n?n.lineWidth*Math.abs(o.scale[0])/2:0;this.instructions.push([tt.DRAW_CHARS,t,e,h,o.overflow,a,o.maxAngle,l,u,r,c*l,d,s,1]),this.hitDetectionInstructions.push([tt.DRAW_CHARS,t,e,h,o.overflow,a,o.maxAngle,1,u,r,c,d,s,1/l])}setTextStyle(t,e){let n,o,r;if(!t)this.text_="";else{const s=t.getFill();s?(o=this.textFillState_,o||(o={},this.textFillState_=o),o.fillStyle=fi(s.getColor()||Ti)):(o=null,this.textFillState_=o);const a=t.getStroke();if(!a)r=null,this.textStrokeState_=r;else{r=this.textStrokeState_,r||(r={},this.textStrokeState_=r);const g=a.getLineDash(),m=a.getLineDashOffset(),p=a.getWidth(),_=a.getMiterLimit();r.lineCap=a.getLineCap()||Hs,r.lineDash=g?g.slice():Cr,r.lineDashOffset=m===void 0?Er:m,r.lineJoin=a.getLineJoin()||Ro,r.lineWidth=p===void 0?zr:p,r.miterLimit=_===void 0?Sr:_,r.strokeStyle=fi(a.getColor()||Tr)}n=this.textState_;const l=t.getFont()||Ec;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()||Qs,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_=r?(typeof r.strokeStyle=="string"?r.strokeStyle:H(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=o?typeof o.fillStyle=="string"?o.fillStyle:"|"+H(o.fillStyle):""}this.declutterImageWithText_=e}}const ry={Circle:zf,Default:Wr,Image:J1,LineString:ey,Polygon:zf,Text:oy};class sy{constructor(t,e,n,o){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=o,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 o in n){const r=n[o].finish();t[e][o]=r}}return t}getBuilder(t,e){const n=t!==void 0?t.toString():"0";let o=this.buildersByZIndex_[n];o===void 0&&(o={},this.buildersByZIndex_[n]=o);let r=o[e];if(r===void 0){const s=ry[e];r=new s(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),o[e]=r}return r}}const ka=sy;class ay extends Wd{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return it()}getData(t){return null}prepareFrame(t){return it()}renderFrame(t,e){return it()}loadedTileCallback(t,e,n){t[e]||(t[e]={}),t[e][n.tileCoord.toString()]=n}createLoadedTileFinder(t,e,n){return function(o,r){const s=this.loadedTileCallback.bind(this,n,o);return t.forEachLoadedTile(e,o,r,s)}.bind(this)}forEachFeatureAtCoordinate(t,e,n,o,r){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){t.target.getState()===te.LOADED&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=te.LOADED&&e!=te.ERROR&&t.addEventListener(et.CHANGE,this.boundHandleImageChange_),e==te.IDLE&&(t.load(),e=t.getState()),e==te.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const ly=ay,Rf=[];let jo=null;function hy(){const i=document.createElement("canvas");i.width=1,i.height=1,jo=i.getContext("2d")}class uy extends ly{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=Ke(),this.pixelTransform=Ke(),this.inversePixelTransform=Ke(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,n){jo||hy(),jo.clearRect(0,0,1,1);let o;try{jo.drawImage(t,e,n,1,1,0,0,1,1),o=jo.getImageData(0,0,1,1).data}catch{return jo=null,null}return o}getBackground(t){let n=this.getLayer().getBackground();return typeof n=="function"&&(n=n(t.viewState.resolution)),n||void 0}useContainer(t,e,n){const o=this.getLayer().getClassName();let r,s;if(t&&t.className===o&&(!n||t&&t.style.backgroundColor&&Xi(Mr(t.style.backgroundColor),Mr(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){r=document.createElement("div"),r.className=o;let a=r.style;a.position="absolute",a.width="100%",a.height="100%",s=De();const l=s.canvas;r.appendChild(l),a=l.style,a.position="absolute",a.left="0",a.transformOrigin="top left",this.container=r,this.context=s}!this.containerReused&&n&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=n)}clipUnrotated(t,e,n){const o=Hi(n),r=Vs(n),s=Ws(n),a=Us(n);Jt(e.coordinateToPixelTransform,o),Jt(e.coordinateToPixelTransform,r),Jt(e.coordinateToPixelTransform,s),Jt(e.coordinateToPixelTransform,a);const l=this.inversePixelTransform;Jt(l,o),Jt(l,r),Jt(l,s),Jt(l,a),t.save(),t.beginPath(),t.moveTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(r[0]),Math.round(r[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 o=this.getLayer();if(o.hasListener(t)){const r=new Cc(t,this.inversePixelTransform,n,e);o.dispatchEvent(r)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_(Zi.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(Zi.POSTRENDER,t,e)}getRenderTransform(t,e,n,o,r,s,a){const l=r/2,h=s/2,u=o/e,d=-u,c=-t[0]+a,f=-t[1];return Si(this.tempTransform,l,h,u,d,-n,c,f)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const Af=uy;function dy(i,t,e,n,o,r,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<r);let y=p===0?0:(r-_)/p;const x=Ci(g,c,y),k=Ci(m,f,y),w=t-n,C=_,M=r+a*l(h,o,u);for(;t<e-n&&_+p<M;)v();y=p===0?0:(M-_)/p;const S=Ci(g,c,y),z=Ci(m,f,y);let P;if(d){const W=[x,k,S,z];oh(W,0,4,2,d,W,W),P=W[0]>W[2]}else P=x>S;const j=Math.PI,A=[],lt=w+n===t;t=w,p=0,_=C,c=i[t],f=i[t+1];let B;if(lt){v(),B=Math.atan2(f-m,c-g),P&&(B+=B>0?-j:j);const W=(S+x)/2,N=(z+k)/2;return A[0]=[W,N,(M-r)/2,B,o],A}o=o.replace(/\n/g," ");for(let W=0,N=o.length;W<N;){v();let $=Math.atan2(f-m,c-g);if(P&&($+=$>0?-j:j),B!==void 0){let b=$-B;if(b+=b>j?-2*j:b<-j?2*j:0,Math.abs(b)>s)return null}B=$;const D=W;let Q=0;for(;W<N;++W){const b=P?N-W-1:W,T=a*l(h,o[b],u);if(t+n<e&&_+p<r+Q+T/2)break;Q+=T}if(W===D)continue;const V=P?o.substring(N-D,N-W):o.substring(D,W);y=p===0?0:(r+Q/2-_)/p;const I=Ci(g,c,y),st=Ci(m,f,y);A.push([I,st,Q/2,$,V]),r+=Q}return A}const Bo=Be(),hn=[],Pi=[],Di=[],un=[];function Pf(i){return i[3].declutterBox}const cy=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 Df(i,t){return(t==="start"||t==="end")&&!cy.test(i)&&(t=t==="start"?"left":"right"),Vr[t]}function fy(i,t,e){return e>0&&i.push(`
11
+ `,""),i.push(t,""),i}class gy{constructor(t,e,n,o){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=o.instructions,this.coordinates=o.coordinates,this.coordinateCache_={},this.renderedTransform_=Ke(),this.hitDetectionInstructions=o.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=o.fillStates||{},this.strokeStates=o.strokeStates||{},this.textStates=o.textStates||{},this.widths_={},this.labels_={}}createLabel(t,e,n,o){const r=t+e+n+o;if(this.labels_[r])return this.labels_[r];const s=o?this.strokeStates[o]: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?Vr[l.justify]:Df(Array.isArray(t)?t[0]:t,l.textAlign||Ir),f=o&&s.lineWidth?s.lineWidth:0,g=d?t:t.split(`
12
+ `).reduce(fy,[]),{width:m,height:p,widths:_,heights:v,lineWidths:y}=av(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),o&&(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 z=c*x+S*f;const P=[],j=[];let A=0,lt=0,B=0,W=0,N;for(let $=0,D=g.length;$<D;$+=2){const Q=g[$];if(Q===`
13
+ `){lt+=A,A=0,z=c*x+S*f,++W;continue}const V=g[$+1]||l.font;V!==N&&(o&&P.push("font",V),n&&j.push("font",V),N=V),A=Math.max(A,v[B]);const I=[Q,z+S*_[B]+c*(_[B]-y[W]),.5*(f+A)+lt];z+=_[B],o&&P.push("strokeText",I),n&&j.push("fillText",I),++B}return Array.prototype.push.apply(k,P),Array.prototype.push.apply(k,j),this.labels_[r]=M,M}replayTextBackground_(t,e,n,o,r,s,a){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,n),t.lineTo.apply(t,o),t.lineTo.apply(t,r),t.lineTo.apply(t,e),s&&(this.alignFill_=s[2],this.fill_(t)),a&&(this.setStrokeStyle_(t,a),t.stroke())}calculateImageOrLabelDimensions_(t,e,n,o,r,s,a,l,h,u,d,c,f,g,m,p){a*=c[0],l*=c[1];let _=n-a,v=o-l;const y=r+h>t?t-h:r,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)&&(hn[0]=C,un[0]=C,hn[1]=M,Pi[1]=M,Pi[0]=C+k,Di[0]=Pi[0],Di[1]=M+w,un[1]=Di[1]);let S;return d!==0?(S=Si(Ke(),n,o,1,1,d,-n,-o),Jt(S,hn),Jt(S,Pi),Jt(S,Di),Jt(S,un),ii(Math.min(hn[0],Pi[0],Di[0],un[0]),Math.min(hn[1],Pi[1],Di[1],un[1]),Math.max(hn[0],Pi[0],Di[0],un[0]),Math.max(hn[1],Pi[1],Di[1],un[1]),Bo)):ii(Math.min(C,C+k),Math.min(M,M+w),Math.max(C,C+k),Math.max(M,M+w),Bo),f&&(_=Math.round(_),v=Math.round(v)),{drawImageX:_,drawImageY:v,drawImageW:y,drawImageH:x,originX:h,originY:u,declutterBox:{minX:Bo[0],minY:Bo[1],maxX:Bo[2],maxY:Bo[3],value:p},canvasTransform:S,scale:c}}replayImageOrLabel_(t,e,n,o,r,s,a){const l=!!(s||a),h=o.declutterBox,u=t.canvas,d=a?a[2]*o.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,hn,Pi,Di,un,s,a),lv(t,o.canvasTransform,r,n,o.originX,o.originY,o.drawImageW,o.drawImageH,o.drawImageX,o.drawImageY,o.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,o){const r=this.textStates[e],s=this.createLabel(t,e,o,n),a=this.strokeStates[n],l=this.pixelRatio,h=Df(Array.isArray(t)?t[0]:t,r.textAlign||Ir),u=Vr[r.textBaseline||Qs],d=a&&a.lineWidth?a.lineWidth:0,c=s.width/l-2*r.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,o,r,s,a,l){let h;this.pixelCoordinates_&&Xi(n,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=tn(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),X0(this.renderedTransform_,n));let u=0;const d=o.length;let c=0,f,g,m,p,_,v,y,x,k,w,C,M,S=0,z=0,P=null,j=null;const A=this.coordinateCache_,lt=this.viewRotation_,B=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,W={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:lt},N=this.instructions!=o||this.overlaps?0:200;let $,D,Q,V;for(;u<d;){const I=o[u];switch(I[0]){case tt.BEGIN_GEOMETRY:$=I[1],V=I[3],$.getGeometry()?a!==void 0&&!Kt(a,V.getExtent())?u=I[2]+1:++u:u=I[2];break;case tt.BEGIN_PATH:S>N&&(this.fill_(t),S=0),z>N&&(t.stroke(),z=0),!S&&!z&&(t.beginPath(),p=NaN,_=NaN),++u;break;case tt.CIRCLE:c=I[1];const b=h[c],T=h[c+1],Z=h[c+2],E=h[c+3],J=Z-b,q=E-T,yt=Math.sqrt(J*J+q*q);t.moveTo(b+yt,T),t.arc(b,T,yt,0,2*Math.PI,!0),++u;break;case tt.CLOSE_PATH:t.closePath(),++u;break;case tt.CUSTOM:c=I[1],f=I[2];const St=I[3],xt=I[4],Et=I.length==6?I[5]:void 0;W.geometry=St,W.feature=$,u in A||(A[u]=[]);const Ot=A[u];Et?Et(h,c,f,2,Ot):(Ot[0]=h[c],Ot[1]=h[c+1],Ot.length=2),xt(Ot,W),++u;break;case tt.DRAW_IMAGE:c=I[1],f=I[2],x=I[3],g=I[4],m=I[5];let Lt=I[6];const Bt=I[7],O=I[8],dt=I[9],_t=I[10];let wt=I[11];const bt=I[12];let at=I[13];const ot=I[14],Mt=I[15];if(!x&&I.length>=20){k=I[19],w=I[20],C=I[21],M=I[22];const fe=this.drawLabelWithPointPlacement_(k,w,C,M);x=fe.label,I[3]=x;const wi=I[23];g=(fe.anchorX-wi)*this.pixelRatio,I[4]=g;const xe=I[24];m=(fe.anchorY-xe)*this.pixelRatio,I[5]=m,Lt=x.height,I[6]=Lt,at=x.width,I[13]=at}let zt;I.length>25&&(zt=I[25]);let Ut,kt,ct;I.length>17?(Ut=I[16],kt=I[17],ct=I[18]):(Ut=qn,kt=!1,ct=!1),_t&&B?wt+=lt:!_t&&!B&&(wt-=lt);let Ft=0;for(;c<f;c+=2){if(zt&&zt[Ft++]<at/this.pixelRatio)continue;const fe=this.calculateImageOrLabelDimensions_(x.width,x.height,h[c],h[c+1],at,Lt,g,m,O,dt,wt,bt,r,Ut,kt||ct,$),wi=[t,e,x,fe,Bt,kt?P:null,ct?j:null];if(l){if(ot==="none")continue;if(ot==="obstacle"){l.insert(fe.declutterBox);continue}else{let xe,qe;if(Mt){const Ae=f-c;if(!Mt[Ae]){Mt[Ae]=wi;continue}if(xe=Mt[Ae],delete Mt[Ae],qe=Pf(xe),l.collides(qe))continue}if(l.collides(fe.declutterBox))continue;xe&&(l.insert(qe),this.replayImageOrLabel_.apply(this,xe)),l.insert(fe.declutterBox)}}this.replayImageOrLabel_.apply(this,wi)}++u;break;case tt.DRAW_CHARS:const Tt=I[1],ft=I[2],ce=I[3],Xe=I[4];M=I[5];const qt=I[6],Re=I[7],Wt=I[8];C=I[9];const Qt=I[10];k=I[11],w=I[12];const Rn=[I[13],I[13]],ue=this.textStates[w],Ye=ue.font,ye=[ue.scale[0]*Re,ue.scale[1]*Re];let Ge;Ye in this.widths_?Ge=this.widths_[Ye]:(Ge={},this.widths_[Ye]=Ge);const Bi=hf(h,Tt,ft,2),ll=Math.abs(ye[0])*Tc(Ye,k,Ge);if(Xe||ll<=Bi){const fe=this.textStates[w].textAlign,wi=(Bi-ll)*Vr[fe],xe=dy(h,Tt,ft,2,k,wi,qt,Math.abs(ye[0]),Tc,Ye,Ge,B?0:this.viewRotation_);t:if(xe){const qe=[];let Ae,lr,hr,be,Pe;if(C)for(Ae=0,lr=xe.length;Ae<lr;++Ae){Pe=xe[Ae],hr=Pe[4],be=this.createLabel(hr,w,"",C),g=Pe[2]+(ye[0]<0?-Qt:Qt),m=ce*be.height+(.5-ce)*2*Qt*ye[1]/ye[0]-Wt;const ne=this.calculateImageOrLabelDimensions_(be.width,be.height,Pe[0],Pe[1],be.width,be.height,g,m,0,0,Pe[3],Rn,!1,qn,!1,$);if(l&&l.collides(ne.declutterBox))break t;qe.push([t,e,be,ne,1,null,null])}if(M)for(Ae=0,lr=xe.length;Ae<lr;++Ae){Pe=xe[Ae],hr=Pe[4],be=this.createLabel(hr,w,M,""),g=Pe[2],m=ce*be.height-Wt;const ne=this.calculateImageOrLabelDimensions_(be.width,be.height,Pe[0],Pe[1],be.width,be.height,g,m,0,0,Pe[3],Rn,!1,qn,!1,$);if(l&&l.collides(ne.declutterBox))break t;qe.push([t,e,be,ne,1,null,null])}l&&l.load(qe.map(Pf));for(let ne=0,bs=qe.length;ne<bs;++ne)this.replayImageOrLabel_.apply(this,qe[ne])}}++u;break;case tt.END_GEOMETRY:if(s!==void 0){$=I[1];const fe=s($,V);if(fe)return fe}++u;break;case tt.FILL:N?S++:this.fill_(t),++u;break;case tt.MOVE_TO_LINE_TO:for(c=I[1],f=I[2],D=h[c],Q=h[c+1],v=D+.5|0,y=Q+.5|0,(v!==p||y!==_)&&(t.moveTo(D,Q),p=v,_=y),c+=2;c<f;c+=2)D=h[c],Q=h[c+1],v=D+.5|0,y=Q+.5|0,(c==f-2||v!==p||y!==_)&&(t.lineTo(D,Q),p=v,_=y);++u;break;case tt.SET_FILL_STYLE:P=I,this.alignFill_=I[2],S&&(this.fill_(t),S=0,z&&(t.stroke(),z=0)),t.fillStyle=I[1],++u;break;case tt.SET_STROKE_STYLE:j=I,z&&(t.stroke(),z=0),this.setStrokeStyle_(t,I),++u;break;case tt.STROKE:N?z++:t.stroke(),++u;break;default:++u;break}}S&&this.fill_(t),z&&t.stroke()}execute(t,e,n,o,r,s){this.viewRotation_=o,this.execute_(t,e,n,this.instructions,r,void 0,void 0,s)}executeHitDetection(t,e,n,o,r){return this.viewRotation_=n,this.execute_(t,1,e,this.hitDetectionInstructions,!0,o,r)}}const my=gy,$h=["Polygon","Circle","LineString","Image","Text","Default"];class py{constructor(t,e,n,o,r,s){this.maxExtent_=t,this.overlaps_=o,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=s,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=Ke(),this.createExecutors_(r)}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 o=t[e];for(const r in o){const s=o[r];n[r]=new my(this.resolution_,this.pixelRatio_,this.overlaps_,s)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const n=this.executorsByZIndex_[e];for(let o=0,r=t.length;o<r;++o)if(t[o]in n)return!0}return!1}forEachFeatureAtCoordinate(t,e,n,o,r,s){o=Math.round(o);const a=o*2+1,l=Si(this.hitDetectionTransform_,o+.5,o+.5,1/e,-1/e,-n,-t[0],-t[1]),h=!this.hitDetectionContext_;h&&(this.hitDetectionContext_=De(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=Be(),kr(d,t),ci(d,e*(this.renderBuffer_+o),d));const c=vy(o);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 z=(c[M]-3)/4,P=o-z%a,j=o-(z/a|0),A=r(k,w,P*P+j*j);if(A)return A}u.clearRect(0,0,a,a);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);m.sort(On);let p,_,v,y,x;for(p=m.length-1;p>=0;--p){const k=m[p].toString();for(v=this.executorsByZIndex_[k],_=$h.length-1;_>=0;--_)if(f=$h[_],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],o=e[1],r=e[2],s=e[3],a=[n,o,n,s,r,s,r,o];return tn(a,0,8,2,t,a),a}isEmpty(){return Gn(this.executorsByZIndex_)}execute(t,e,n,o,r,s,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(On),this.maxExtent_&&(t.save(),this.clip(t,n)),s=s||$h;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,o,r,a)}}this.maxExtent_&&t.restore()}}const Zh={};function vy(i){if(Zh[i]!==void 0)return Zh[i];const t=i*2+1,e=i*i,n=new Array(e+1);for(let r=0;r<=i;++r)for(let s=0;s<=i;++s){const a=r*r+s*s;if(a>e)break;let l=n[a];l||(l=[],n[a]=l),l.push(((i+r)*t+(i+s))*4+3),r>0&&l.push(((i-r)*t+(i+s))*4+3),s>0&&(l.push(((i+r)*t+(i-s))*4+3),r>0&&l.push(((i-r)*t+(i-s))*4+3))}const o=[];for(let r=0,s=n.length;r<s;++r)n[r]&&o.push(...n[r]);return Zh[i]=o,o}const wa=py;class _y extends If{constructor(t,e,n,o,r,s,a){super(),this.context_=t,this.pixelRatio_=e,this.extent_=n,this.transform_=o,this.viewRotation_=r,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_=Ke()}drawImages_(t,e,n,o){if(!this.image_)return;const r=tn(t,e,n,o,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=r.length;u<d;u+=2){const c=r[u]-this.imageAnchorX_,f=r[u+1]-this.imageAnchorY_;if(h!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const g=c+this.imageAnchorX_,m=f+this.imageAnchorY_;Si(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,o){if(!this.textState_||this.text_==="")return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const r=tn(t,e,n,o,this.transform_,this.pixelCoordinates_),s=this.context_;let a=this.textRotation_;for(this.textRotateWithView_&&(a+=this.viewRotation_);e<n;e+=o){const l=r[e]+this.textOffsetX_,h=r[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,o,r){const s=this.context_,a=tn(t,e,n,o,this.transform_,this.pixelCoordinates_);s.moveTo(a[0],a[1]);let l=a.length;r&&(l-=2);for(let h=2;h<l;h+=2)s.lineTo(a[h],a[h+1]);return r&&s.closePath(),n}drawRings_(t,e,n,o){for(let r=0,s=n.length;r<s;++r)e=this.moveToLineTo_(t,e,n[r],o,!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=Av(t,this.transform_,this.pixelCoordinates_),n=e[2]-e[0],o=e[3]-e[1],r=Math.sqrt(n*n+o*o),s=this.context_;s.beginPath(),s.arc(e[0],e[1],r,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,o=e.length;n<o;++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_,o=t.getFlatCoordinates();let r=0;const s=t.getEnds(),a=t.getStride();n.beginPath();for(let l=0,h=s.length;l<h;++l)r=this.moveToLineTo_(o,r,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 o=0;const r=t.getEndss(),s=t.getStride();e.beginPath();for(let a=0,l=r.length;a<l;++a){const h=r[a];o=this.drawRings_(n,o,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),Xi(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_,o=t.textAlign?t.textAlign:Ir;n?(n.font!=t.font&&(n.font=t.font,e.font=t.font),n.textAlign!=o&&(n.textAlign=o,e.textAlign=o),n.textBaseline!=t.textBaseline&&(n.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=o,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:o,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(!t)this.fillState_=null;else{const n=t.getColor();this.fillState_={fillStyle:fi(n||Ti)}}if(!e)this.strokeState_=null;else{const n=e.getColor(),o=e.getLineCap(),r=e.getLineDash(),s=e.getLineDashOffset(),a=e.getLineJoin(),l=e.getWidth(),h=e.getMiterLimit(),u=r||Cr;this.strokeState_={lineCap:o!==void 0?o:Hs,lineDash:this.pixelRatio_===1?u:u.map(d=>d*this.pixelRatio_),lineDashOffset:(s||Er)*this.pixelRatio_,lineJoin:a!==void 0?a:Ro,lineWidth:(l!==void 0?l:zr)*this.pixelRatio_,miterLimit:h!==void 0?h:Sr,strokeStyle:fi(n||Tr)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}const n=t.getPixelRatio(this.pixelRatio_),o=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=o[0]*n,this.imageAnchorY_=o[1]*n,this.imageHeight_=e[1]*n,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[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:fi(f||Ti)}}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:Hs,lineDash:m||Cr,lineDashOffset:p||Er,lineJoin:_!==void 0?_:Ro,lineWidth:v!==void 0?v:zr,miterLimit:y!==void 0?y:Sr,strokeStyle:fi(f||Tr)}}const o=t.getFont(),r=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:o!==void 0?o:Ec,textAlign:d!==void 0?d:Ir,textBaseline:c!==void 0?c:Qs},this.text_=u!==void 0?Array.isArray(u)?u.reduce((f,g,m)=>f+=m%2?" ":g,""):u:"",this.textOffsetX_=r!==void 0?this.pixelRatio_*r: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 yy=_y,Ue=.5;function Lf(i,t,e,n,o,r,s){const a=i[0]*Ue,l=i[1]*Ue,h=De(a,l);h.imageSmoothingEnabled=!1;const u=h.canvas,d=new yy(h,Ue,o,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(_,r);if(!y)continue;Array.isArray(y)||(y=[y]);const k="#"+("000000"+(p*f).toString(16)).slice(-6);for(let w=0,C=y.length;w<C;++w){const M=y[w],S=M.getGeometryFunction()(_);if(!S||!Kt(o,S.getExtent()))continue;const z=M.clone(),P=z.getFill();P&&P.setColor(k);const j=z.getStroke();j&&(j.setColor(k),j.setLineDash(null)),z.setText(void 0);const A=M.getImage();if(A&&A.getOpacity()!==0){const W=A.getImageSize();if(!W)continue;const N=De(W[0],W[1],void 0,{alpha:!1}),$=N.canvas;N.fillStyle=k,N.fillRect(0,0,$.width,$.height),z.setImage(new ga({img:$,imgSize:W,anchor:A.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:A.getOrigin(),opacity:1,size:A.getSize(),scale:A.getScale(),rotation:A.getRotation(),rotateWithView:A.getRotateWithView()}))}const lt=z.getZIndex()||0;let B=g[lt];B||(B={},g[lt]=B,B.Polygon=[],B.Circle=[],B.LineString=[],B.Point=[]),B[S.getType().replace("Multi","")].push(S,z)}}const m=Object.keys(g).map(Number).sort(On);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 Of(i,t,e){const n=[];if(e){const o=Math.floor(Math.round(i[0])*Ue),r=Math.floor(Math.round(i[1])*Ue),s=($t(o,0,e.width-1)+$t(r,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 xy=.5,Ff={Point:Ty,LineString:Cy,Polygon:zy,MultiPoint:Iy,MultiLineString:Ey,MultiPolygon:Sy,GeometryCollection:My,Circle:ky};function by(i,t){return parseInt(H(i),10)-parseInt(H(t),10)}function Nf(i,t){const e=Kh(i,t);return e*e}function Kh(i,t){return xy*i/t}function ky(i,t,e,n,o){const r=e.getFill(),s=e.getStroke();if(r||s){const l=i.getBuilder(e.getZIndex(),"Circle");l.setFillStrokeStyle(r,s),l.drawCircle(t,n)}const a=e.getText();if(a&&a.getText()){const l=(o||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}function Ma(i,t,e,n,o,r,s){let a=!1;const l=e.getImage();if(l){const h=l.getImageState();h==te.LOADED||h==te.ERROR?l.unlistenImageChange(o):(h==te.IDLE&&l.load(),l.listenImageChange(o),a=!0)}return wy(i,t,e,n,r,s),a}function wy(i,t,e,n,o,r){const s=e.getGeometryFunction()(t);if(!s)return;const a=s.simplifyTransformed(n,o);if(e.getRenderer())Gf(i,a,e,t);else{const h=Ff[a.getType()];h(i,a,e,t,r)}}function Gf(i,t,e,n){if(t.getType()=="GeometryCollection"){const r=t.getGeometries();for(let s=0,a=r.length;s<a;++s)Gf(i,r[s],e,n);return}i.getBuilder(e.getZIndex(),"Default").drawCustom(t,n,e.getRenderer(),e.getHitDetectionRenderer())}function My(i,t,e,n,o){const r=t.getGeometriesArray();let s,a;for(s=0,a=r.length;s<a;++s){const l=Ff[r[s].getType()];l(i,r[s],e,n,o)}}function Cy(i,t,e,n,o){const r=e.getStroke();if(r){const a=i.getBuilder(e.getZIndex(),"LineString");a.setFillStrokeStyle(null,r),a.drawLineString(t,n)}const s=e.getText();if(s&&s.getText()){const a=(o||i).getBuilder(e.getZIndex(),"Text");a.setTextStyle(s),a.drawText(t,n)}}function Ey(i,t,e,n,o){const r=e.getStroke();if(r){const a=i.getBuilder(e.getZIndex(),"LineString");a.setFillStrokeStyle(null,r),a.drawMultiLineString(t,n)}const s=e.getText();if(s&&s.getText()){const a=(o||i).getBuilder(e.getZIndex(),"Text");a.setTextStyle(s),a.drawText(t,n)}}function Sy(i,t,e,n,o){const r=e.getFill(),s=e.getStroke();if(s||r){const l=i.getBuilder(e.getZIndex(),"Polygon");l.setFillStrokeStyle(r,s),l.drawMultiPolygon(t,n)}const a=e.getText();if(a&&a.getText()){const l=(o||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}function Ty(i,t,e,n,o){const r=e.getImage(),s=e.getText();let a;if(r){if(r.getImageState()!=te.LOADED)return;let l=i;if(o){const u=r.getDeclutterMode();if(u!=="none")if(l=o,u==="obstacle"){const d=i.getBuilder(e.getZIndex(),"Image");d.setImageStyle(r,a),d.drawPoint(t,n)}else s&&s.getText()&&(a={})}const h=l.getBuilder(e.getZIndex(),"Image");h.setImageStyle(r,a),h.drawPoint(t,n)}if(s&&s.getText()){let l=i;o&&(l=o);const h=l.getBuilder(e.getZIndex(),"Text");h.setTextStyle(s,a),h.drawText(t,n)}}function Iy(i,t,e,n,o){const r=e.getImage(),s=e.getText();let a;if(r){if(r.getImageState()!=te.LOADED)return;let l=i;if(o){const u=r.getDeclutterMode();if(u!=="none")if(l=o,u==="obstacle"){const d=i.getBuilder(e.getZIndex(),"Image");d.setImageStyle(r,a),d.drawMultiPoint(t,n)}else s&&s.getText()&&(a={})}const h=l.getBuilder(e.getZIndex(),"Image");h.setImageStyle(r,a),h.drawMultiPoint(t,n)}if(s&&s.getText()){let l=i;o&&(l=o);const h=l.getBuilder(e.getZIndex(),"Text");h.setTextStyle(s,a),h.drawText(t,n)}}function zy(i,t,e,n,o){const r=e.getFill(),s=e.getStroke();if(r||s){const l=i.getBuilder(e.getZIndex(),"Polygon");l.setFillStrokeStyle(r,s),l.drawPolygon(t,n)}const a=e.getText();if(a&&a.getText()){const l=(o||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}class Ry extends Af{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_=Be(),this.wrappedRenderedExtent_=Be(),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 o=e.extent,r=e.viewState,s=r.center,a=r.resolution,l=r.projection,h=r.rotation,u=l.getExtent(),d=this.getLayer().getSource(),c=e.pixelRatio,f=e.viewHints,g=!(f[Zt.ANIMATING]||f[Zt.INTERACTING]),m=this.compositionContext_,p=Math.round(e.size[0]*c),_=Math.round(e.size[1]*c),v=d.getWrapX()&&l.canWrapX(),y=v?Gt(u):null,x=v?Math.ceil((o[2]-u[2])/y)+1:1;let k=v?Math.floor((o[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=De(this.context.canvas.width,this.context.canvas.height,Rf);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,wl(this.compositionContext_),Rf.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,o=t.layerStatesArray[t.layerIndex];Y0(this.pixelTransform,1/n,1/n),$l(this.inversePixelTransform,this.pixelTransform);const r=bc(this.pixelTransform);this.useContainer(e,r,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!==r&&(a.style.transform=r)):this.containerReused||s.clearRect(0,0,u,d),this.preRender(s,t);const c=t.viewState;c.projection,this.opacity_=o.opacity,this.setupCompositionContext_();let f=!1,g=!0;if(o.extent&&this.clipping){const m=Qi(o.extent);g=Kt(m,t.extent),f=g&&!Vn(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 o=this.renderedCenter_,r=this.renderedResolution_,s=this.renderedRotation_,a=this.renderedProjection_,l=this.wrappedRenderedExtent_,h=this.getLayer(),u=[],d=n[0]*Ue,c=n[1]*Ue;u.push(this.getRenderTransform(o,r,s,Ue,d,c,0).slice());const f=h.getSource(),g=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!Vn(g,l)){let m=l[0];const p=Gt(g);let _=0,v;for(;m<g[0];)--_,v=p*_,u.push(this.getRenderTransform(o,r,s,Ue,d,c,v).slice()),m+=p;for(_=0,m=l[2];m>g[2];)++_,v=p*_,u.push(this.getRenderTransform(o,r,s,Ue,d,c,v).slice()),m-=p}this.hitDetectionImageData_=Lf(n,u,this.renderedFeatures_,h.getStyleFunction(),l,r,s)}e(Of(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))}forEachFeatureAtCoordinate(t,e,n,o,r){if(!this.replayGroup_)return;const s=e.viewState.resolution,a=e.viewState.rotation,l=this.getLayer(),h={},u=function(f,g,m){const p=H(f),_=h[p];if(_){if(_!==!0&&m<_.distanceSq){if(m===0)return h[p]=!0,r.splice(r.lastIndexOf(_),1),o(f,l,g);_.geometry=g,_.distanceSq=m}}else{if(m===0)return h[p]=!0,o(f,l,g);r.push(h[p]={feature:f,layer:l,geometry:g,distanceSq:m,callback:o})}};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 o=t.viewHints[Zt.ANIMATING],r=t.viewHints[Zt.INTERACTING],s=e.getUpdateWhileAnimating(),a=e.getUpdateWhileInteracting();if(this.ready&&!s&&o||!a&&r)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=by);const p=h.center.slice(),_=ci(l,g*d),v=_.slice(),y=[_.slice()],x=u.getExtent();if(n.getWrapX()&&u.canWrapX()&&!Vn(x,t.extent)){const B=Gt(x),W=Math.max(Gt(_)/2,B);_[0]=x[0]-W,_[2]=x[2]+W,Gl(p,u);const N=ac(y[0],u);N[0]<x[0]&&N[2]<x[2]?y.push([N[0]+B,N[1],N[2]+B,N[3]]):N[0]>x[0]&&N[2]>x[2]&&y.push([N[0]-B,N[1],N[2]-B,N[3]])}if(this.ready&&this.renderedResolution_==d&&this.renderedRevision_==f&&this.renderedRenderOrder_==m&&Vn(this.wrappedRenderedExtent_,_))return Xi(this.renderedExtent_,v)||(this.hitDetectionImageData_=null,this.renderedExtent_=v),this.renderedCenter_=p,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const k=new ka(Kh(d,c),_,d,c);let w;this.getLayer().getDeclutter()&&(w=new ka(Kh(d,c),_,d,c));let C;for(let B=0,W=y.length;B<W;++B)n.loadFeatures(y[B],d,u);const M=Nf(d,c);let S=!0;const z=function(B){let W;const N=B.getStyleFunction()||e.getStyleFunction();if(N&&(W=N(B,d)),W){const $=this.renderFeature(B,M,W,k,C,w);S=S&&!$}}.bind(this),P=Xl(_),j=n.getFeaturesInExtent(P);m&&j.sort(m);for(let B=0,W=j.length;B<W;++B)z(j[B]);this.renderedFeatures_=j,this.ready=S;const A=k.finish(),lt=new wa(_,d,c,n.getOverlaps(),A,e.getRenderBuffer());return w&&(this.declutterExecutorGroup=new wa(_,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_=lt,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,n,o,r,s){if(!n)return!1;let a=!1;if(Array.isArray(n))for(let l=0,h=n.length;l<h;++l)a=Ma(o,t,n[l],e,this.boundHandleStyleImageChange_,r,s)||a;else a=Ma(o,t,n,e,this.boundHandleStyleImageChange_,r,s);return a}}const Ay=Ry;class Py extends Sf{constructor(t){super(t)}createRenderer(){return new Ay(this)}}const eo=Py;class Dy{constructor(t){this.rbush_=new wf(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_[H(e)]=n}load(t,e){const n=new Array(e.length);for(let o=0,r=e.length;o<r;o++){const s=t[o],a=e[o],l={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:a};n[o]=l,this.items_[H(a)]=l}this.rbush_.load(n)}remove(t){const e=H(t),n=this.items_[e];return delete this.items_[e],this.rbush_.remove(n)!==null}update(t,e){const n=this.items_[H(e)],o=[n.minX,n.minY,n.maxX,n.maxY];Io(o,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(o){return o.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 o=0,r=t.length;o<r;o++)if(n=e(t[o]),n)return n;return n}isEmpty(){return Gn(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){const e=this.rbush_.toJSON();return ii(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 Ca=Dy;class Ly extends di{constructor(t){super(),this.projection=jt(t.projection),this.attributions_=jf(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,o){e.viewResolver=n,e.viewRejector=o})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(){return it()}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=jf(t),this.changed()}setState(t){this.state_=t,this.changed()}}function jf(i){return i?Array.isArray(i)?function(t){return i}:typeof i=="function"?i:function(t){return[i]}:null}const Bf=Ly,Ce={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function Oy(i,t){return[[-1/0,-1/0,1/0,1/0]]}let Fy=!1;function Uf(i,t,e,n,o,r,s){const a=new XMLHttpRequest;a.open("GET",typeof i=="function"?i(e,n,o):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?r(t.readFeatures(u,{extent:e,featureProjection:o}),t.readProjection(u)):s()}else s()},a.onerror=s,a.send()}function Wf(i,t){return function(e,n,o,r,s){const a=this;Uf(i,t,e,n,o,function(l,h){a.addFeatures(l),r!==void 0&&r(l)},s||Nn)}}class dn extends ei{constructor(t,e,n){super(t),this.feature=e,this.features=n}}class Ny extends Bf{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_=Nn,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&&(gt(this.format_,7),this.loader_=Wf(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:Oy;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new Ca:null,this.loadedExtentsRtree_=new Ca,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let n,o;Array.isArray(t.features)?o=t.features:t.features&&(n=t.features,o=n.getArray()),!e&&n===void 0&&(n=new Ze(o)),o!==void 0&&this.addFeaturesInternal(o),n!==void 0&&this.bindFeaturesCollection_(n)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=H(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const n=t.getGeometry();if(n){const o=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(o,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new dn(Ce.ADDFEATURE,t))}setupChangeEvents_(t,e){this.featureChangeKeys_[t]=[pt(e,et.CHANGE,this.handleFeatureChange_,this),pt(e,bo.PROPERTYCHANGE,this.handleFeatureChange_,this)]}addToIndex_(t,e){let n=!0;const o=e.getId();return o!==void 0&&(o.toString()in this.idIndex_?n=!1:this.idIndex_[o.toString()]=e),n&&(gt(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),n}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],n=[],o=[];for(let r=0,s=t.length;r<s;r++){const a=t[r],l=H(a);this.addToIndex_(l,a)&&n.push(a)}for(let r=0,s=n.length;r<s;r++){const a=n[r],l=H(a);this.setupChangeEvents_(l,a);const h=a.getGeometry();if(h){const u=h.getExtent();e.push(u),o.push(a)}else this.nullGeometryFeatures_[l]=a}if(this.featuresRtree_&&this.featuresRtree_.load(e,o),this.hasListener(Ce.ADDFEATURE))for(let r=0,s=n.length;r<s;r++)this.dispatchEvent(new dn(Ce.ADDFEATURE,n[r]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(Ce.ADDFEATURE,function(n){e||(e=!0,t.push(n.feature),e=!1)}),this.addEventListener(Ce.REMOVEFEATURE,function(n){e||(e=!0,t.remove(n.feature),e=!1)}),t.addEventListener(se.ADD,function(n){e||(e=!0,this.addFeature(n.element),e=!1)}.bind(this)),t.addEventListener(se.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(Nt);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const n=function(o){this.removeFeatureInternal(o)}.bind(this);this.featuresRtree_.forEach(n);for(const o in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[o])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new dn(Ce.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(o){if(o.getGeometry().intersectsCoordinate(t))return e(o)})}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 r=e(n);if(r)return r}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),Gn(this.nullGeometryFeatures_)||ui(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 o=A0(t,e);return[].concat(...o.map(r=>this.featuresRtree_.getInExtent(r)))}else return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const n=t[0],o=t[1];let r=null;const s=[NaN,NaN];let a=1/0;const l=[-1/0,-1/0,1/0,1/0];return e=e||Fn,this.featuresRtree_.forEachInExtent(l,function(h){if(e(h)){const u=h.getGeometry(),d=a;if(a=u.closestPointXY(n,o,s,a),a<d){r=h;const c=Math.sqrt(a);l[0]=n-c,l[1]=o-c,l[2]=n+c,l[3]=o+c}}}),r}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=H(e),o=e.getGeometry();if(!o)n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[n]=e);else{const s=o.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(s,e)):this.featuresRtree_&&this.featuresRtree_.update(s,e)}const r=e.getId();if(r!==void 0){const s=r.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 dn(Ce.CHANGEFEATURE,e))}hasFeature(t){const e=t.getId();return e!==void 0?e in this.idIndex_:H(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&Gn(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(t,e,n){const o=this.loadedExtentsRtree_,r=this.strategy_(t,e,n);for(let s=0,a=r.length;s<a;++s){const l=r[s];o.forEachInExtent(l,function(u){return Vn(u.extent,l)})||(++this.loadingExtentsCount_,this.dispatchEvent(new dn(Ce.FEATURESLOADSTART)),this.loader_.call(this,l,e,n,function(u){--this.loadingExtentsCount_,this.dispatchEvent(new dn(Ce.FEATURESLOADEND,void 0,u))}.bind(this),function(){--this.loadingExtentsCount_,this.dispatchEvent(new dn(Ce.FEATURESLOADERROR))}.bind(this)),o.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(o){if(Io(o.extent,t))return n=o,!0}),n&&e.remove(n)}removeFeature(t){if(!t)return;const e=H(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=H(t),n=this.featureChangeKeys_[e];if(!n)return;n.forEach(Nt),delete this.featureChangeKeys_[e];const o=t.getId();return o!==void 0&&delete this.idIndex_[o.toString()],delete this.uidIndex_[e],this.dispatchEvent(new dn(Ce.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){gt(this.format_,7),this.url_=t,this.setLoader(Wf(t,this.format_))}}const cn=Ny,Ea=class extends As{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(et.CHANGE)}release(){this.state===G.ERROR&&this.setState(G.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){if(!this.interimTile)return this;let t=this.interimTile;do{if(t.getState()==G.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()==G.LOADED){t.interimTile=null;break}else t.getState()==G.LOADING?e=t:t.getState()==G.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!==G.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){it()}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 o=e-n+1e3/60;return o>=this.transition_?1:Pc(o/this.transition_)}inTransition(t){return this.transition_?this.transitionStarts_[t]!==-1:!1}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}};class Gy extends Ea{constructor(t,e,n,o,r,s){super(t,e,s),this.crossOrigin_=o,this.src_=n,this.key=n,this.image_=new Image,o!==null&&(this.image_.crossOrigin=o),this.unlisten_=null,this.tileLoadFunction_=r}getImage(){return this.image_}setImage(t){this.image_=t,this.state=G.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=G.ERROR,this.unlistenImage_(),this.image_=jy(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=G.LOADED:this.state=G.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==G.ERROR&&(this.state=G.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==G.IDLE&&(this.state=G.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=ff(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function jy(){const i=De(1,1);return i.fillStyle="rgba(0,0,0,0)",i.fillRect(0,0,1,1),i.canvas}const Vf=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 gt(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 gt(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){gt(!(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 Xf(i,t,e,n){return n!==void 0?(n[0]=i,n[1]=t,n[2]=e,n):[i,t,e]}function Uo(i,t,e){return i+"/"+t+"/"+e}function Yf(i){return Uo(i[0],i[1],i[2])}function Wy(i){const[t,e,n]=i.substring(i.lastIndexOf("/")+1,i.length).split(",").map(Number);return Uo(t,e,n)}function qf(i){return i.split("/").map(Number)}function Vy(i){return(i[1]<<i[0])+i[2]}function Xy(i,t){const e=i[0],n=i[1],o=i[2];if(t.getMinZoom()>e||e>t.getMaxZoom())return!1;const r=t.getFullTileRange(e);return r?r.containsXY(n,o):!0}class Yy 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=qf(t)[0];this.forEach(function(o){o.tileCoord[0]!==n&&(this.remove(Yf(o.tileCoord)),o.release())}.bind(this))}}const Hh=Yy;class $f{constructor(t,e,n,o){this.minX=t,this.maxX=e,this.minY=n,this.maxY=o}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 Wo(i,t,e,n,o){return o!==void 0?(o.minX=i,o.maxX=t,o.minY=e,o.maxY=n,o):new $f(i,t,e,n)}const Zf=$f,Kf=[];class qy extends Ea{constructor(t,e,n,o){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=o.bind(void 0,this),this.wrappedTileCoord=n}getContext(t){const e=H(t);return e in this.context_||(this.context_[e]=De(1,1,Kf)),this.context_[e]}hasContext(t){return H(t)in this.context_}getImage(t){return this.hasContext(t)?this.getContext(t).canvas:null}getReplayState(t){const e=H(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];wl(e),Kf.push(e.canvas),delete this.context_[t]}super.release()}}const $y=qy,Zy=class extends Ea{constructor(t,e,n,o,r,s){super(t,e,s),this.extent=null,this.format_=o,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=r,this.url_=n,this.key=n}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==G.IDLE&&(this.setState(G.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(G.ERROR)}setFeatures(t){this.features_=t,this.setState(G.LOADED)}setLoader(t){this.loader_=t}},Sa={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"};class Ta extends ei{constructor(t,e){super(t),this.feature=e}}class Ky extends rn{constructor(t){const e=t;e.stopDown||(e.stopDown=ko),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:Fn,this.geometryLayout_=t.geometryLayout?t.geometryLayout:"XY";let n=t.geometryFunction;if(!n){const o=this.mode_;if(o==="Circle")n=function(r,s,a){const l=s||new A1([NaN,NaN]),h=Vt(r[0]),u=Ei(h,Vt(r[r.length-1]));return l.setCenterAndRadius(h,Math.sqrt(u),this.geometryLayout_),l};else{let r;o==="Point"?r=ri:o==="LineString"?r=Qn:o==="Polygon"&&(r=Kn),n=function(s,a,l){return a?o==="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 r(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 eo({source:new cn({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:tf,this.addChangeListener(_h.ACTIVE,this.updateState_)}setMap(t){super.setMap(t),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(t){t.originalEvent.type===et.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_=this.mode_!=="Point"&&this.freehandCondition_(t);let e=t.type===Ct.POINTERMOVE,n=!0;return!this.freehand_&&this.lastDragTime_&&t.type===Ct.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===Ct.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(t.coordinate),n=!1):this.freehand_&&t.type===Ct.POINTERDOWN?n=!1:e&&this.getPointerCount()<2?(n=t.type===Ct.POINTERMOVE,n&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):(t.originalEvent.pointerType==="mouse"||t.type===Ct.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(t)):t.type===Ct.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 zi(Ct.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,o=e[0]-n[0],r=e[1]-n[1],s=o*o+r*r;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,o=[this.finishCoordinate_];const r=this.mode_;if(r==="Point")e=!0;else if(r==="Circle")e=this.sketchCoords_.length===2;else if(r==="LineString")n=this.sketchCoords_.length>this.minPoints_;else if(r==="Polygon"){const s=this.sketchCoords_;n=s[0].length>this.minPoints_,o=[s[0][0],s[0][s[0].length-2]]}if(n){const s=this.getMap();for(let a=0,l=o.length;a<l;a++){const h=o[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 Ri(new ri(t)),this.updateSketchFeatures_())}createOrUpdateCustomSketchLine_(t){this.sketchLine_||(this.sketchLine_=new Ri);const e=t.getLinearRing(0);let n=this.sketchLine_.getGeometry();n?(n.setFlatCoordinates(e.getLayout(),e.getFlatCoordinates()),n.changed()):(n=new Qn(e.getFlatCoordinates(),e.getLayout()),this.sketchLine_.setGeometry(n))}startDrawing_(t){const e=this.getMap().getView().getProjection(),n=ia(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 Ri(new Qn(this.sketchLineCoords_)));const o=this.geometryFunction_(this.sketchCoords_,void 0,e);this.sketchFeature_=new Ri,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(o),this.updateSketchFeatures_(),this.dispatchEvent(new Ta(Sa.DRAWSTART,this.sketchFeature_))}modifyDrawing_(t){const e=this.getMap(),n=this.sketchFeature_.getGeometry(),o=e.getView().getProjection(),r=ia(this.geometryLayout_);let s,a;for(;t.length<r;)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,o),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 o,r;const s=this.mode_;s==="LineString"||s==="Circle"?(this.finishCoordinate_=t.slice(),r=this.sketchCoords_,r.length>=this.maxPoints_&&(this.freehand_?r.pop():o=!0),r.push(t.slice()),this.geometryFunction_(r,e,n)):s==="Polygon"&&(r=this.sketchCoords_[0],r.length>=this.maxPoints_&&(this.freehand_?r.pop():o=!0),r.push(t.slice()),o&&(this.finishCoordinate_=r[0]),this.geometryFunction_(this.sketchCoords_,e,n)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),o&&this.finishDrawing()}removeLastPoint(){if(!this.sketchFeature_)return;const t=this.sketchFeature_.getGeometry(),e=this.getMap().getView().getProjection();let n;const o=this.mode_;if(o==="LineString"||o==="Circle"){if(n=this.sketchCoords_,n.splice(-2,1),n.length>=2){this.finishCoordinate_=n[n.length-2].slice();const r=this.finishCoordinate_.slice();n[n.length-1]=r,this.createOrUpdateSketchPoint_(r)}this.geometryFunction_(n,t,e),t.getType()==="Polygon"&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(o==="Polygon"){n=this.sketchCoords_[0],n.splice(-2,1);const r=this.sketchLine_.getGeometry();if(n.length>=2){const s=n[n.length-2].slice();n[n.length-1]=s,this.createOrUpdateSketchPoint_(s)}r.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(),o=this.getMap().getView().getProjection();this.mode_==="LineString"?(e.pop(),this.geometryFunction_(e,n,o)):this.mode_==="Polygon"&&(e[0].pop(),this.geometryFunction_(e,n,o),e=n.getCoordinates()),this.type_==="MultiPoint"?t.setGeometry(new Dr([e])):this.type_==="MultiLineString"?t.setGeometry(new zh([e])):this.type_==="MultiPolygon"&&t.setGeometry(new Ah([e])),this.dispatchEvent(new Ta(Sa.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 Ta(Sa.DRAWABORT,t))}appendCoordinates(t){const e=this.mode_,n=!this.sketchFeature_;n&&this.startDrawing_(t[0]);let o;if(e==="LineString"||e==="Circle")o=this.sketchCoords_;else if(e==="Polygon")o=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;n&&o.shift(),o.pop();for(let s=0;s<t.length;s++)this.addToDrawing_(t[s]);const r=t[t.length-1];this.addToDrawing_(r),this.modifyDrawing_(r)}extend(t){const n=t.getGeometry();this.sketchFeature_=t,this.sketchCoords_=n.getCoordinates();const o=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=o.slice(),this.sketchCoords_.push(o.slice()),this.sketchPoint_=new Ri(new ri(o)),this.updateSketchFeatures_(),this.dispatchEvent(new Ta(Sa.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=gf();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 Jy=Ky,Hf=0,Xr=1,Qf=[0,0,0,0],Vo=[],Qh={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"};class Jh extends ei{constructor(t,e,n){super(t),this.features=e,this.mapBrowserEvent=n}}class tx extends rn{constructor(t){super(t),this.on,this.once,this.un,this.boundHandleFeatureChange_=this.handleFeatureChange_.bind(this),this.condition_=t.condition?t.condition:nf,this.defaultDeleteCondition_=function(n){return h_(n)&&c_(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 Ca,this.pixelTolerance_=t.pixelTolerance!==void 0?t.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new eo({source:new cn({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 Ze(this.source_.getFeatures()),this.source_.addEventListener(Ce.ADDFEATURE,this.handleSourceAdd_.bind(this)),this.source_.addEventListener(Ce.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(se.ADD,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(se.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 o=this.SEGMENT_WRITERS_[e.getType()];o&&o(t,e)}const n=this.getMap();n&&n.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,n),t.addEventListener(et.CHANGE,this.boundHandleFeatureChange_)}willModifyFeatures_(t,e){if(!this.featuresBeingModified_){this.featuresBeingModified_=new Ze;const n=this.featuresBeingModified_.getArray();for(let o=0,r=e.length;o<r;++o){const s=e[o];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 Jh(Qh.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(et.CHANGE,this.boundHandleFeatureChange_)}removeFeatureSegmentData_(t){const e=this.rBush_,n=[];e.forEach(function(o){t===o.feature&&n.push(o)});for(let o=n.length-1;o>=0;--o){const r=n[o];for(let s=this.dragSegments_.length-1;s>=0;--s)this.dragSegments_[s][0]===r&&this.dragSegments_.splice(s,1);e.remove(r)}}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(),o={feature:t,geometry:e,segment:[n,n]};this.rBush_.insert(e.getExtent(),o)}writeMultiPointGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length;o<r;++o){const s=n[o],a={feature:t,geometry:e,depth:[o],index:o,segment:[s,s]};this.rBush_.insert(e.getExtent(),a)}}writeLineStringGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length-1;o<r;++o){const s=n.slice(o,o+2),a={feature:t,geometry:e,index:o,segment:s};this.rBush_.insert(ke(s),a)}}writeMultiLineStringGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length;o<r;++o){const s=n[o];for(let a=0,l=s.length-1;a<l;++a){const h=s.slice(a,a+2),u={feature:t,geometry:e,depth:[o],index:a,segment:h};this.rBush_.insert(ke(h),u)}}}writePolygonGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length;o<r;++o){const s=n[o];for(let a=0,l=s.length-1;a<l;++a){const h=s.slice(a,a+2),u={feature:t,geometry:e,depth:[o],index:a,segment:h};this.rBush_.insert(ke(h),u)}}}writeMultiPolygonGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length;o<r;++o){const s=n[o];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,o],index:u,segment:c};this.rBush_.insert(ke(c),f)}}}}writeCircleGeometry_(t,e){const n=e.getCenter(),o={feature:t,geometry:e,index:Hf,segment:[n,n]},r={feature:t,geometry:e,index:Xr,segment:[n,n]},s=[o,r];o.featureSegments=s,r.featureSegments=s,this.rBush_.insert(br(n),o);let a=e;this.rBush_.insert(a.getExtent(),r)}writeGeometryCollectionGeometry_(t,e){const n=e.getGeometriesArray();for(let o=0;o<n.length;++o){const r=n[o],s=this.SEGMENT_WRITERS_[r.getType()];s(t,r)}}createOrUpdateVertexFeature_(t,e,n){let o=this.vertexFeature_;return o?o.getGeometry().setCoordinates(t):(o=new Ri(new ri(t)),this.vertexFeature_=o,this.overlay_.getSource().addFeature(o)),o.set("features",e),o.set("geometries",n),o}handleEvent(t){if(!t.originalEvent)return!0;this.lastPointerEvent_=t;let e;return!t.map.getView().getInteracting()&&t.type==Ct.POINTERMOVE&&!this.handlingDownUpSequence&&this.handlePointerMove_(t),this.vertexFeature_&&this.deleteCondition_(t)&&(t.type!=Ct.SINGLECLICK||!this.ignoreNextSingleClick_?e=this.removePoint():e=!0),t.type==Ct.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=[],o=[];for(let r=0,s=this.dragSegments_.length;r<s;++r){const a=this.dragSegments_[r],l=a[0],h=l.feature;n.includes(h)||n.push(h);const u=l.geometry;o.includes(u)||o.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===Hf)this.changingFeature_=!0,u.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0,t.map.getView().getProjection();let m=lc(Vt(u.getCenter()),Vt(e));u.setRadius(m),this.changingFeature_=!1}break}c&&this.setGeometryCoordinates_(u,c)}this.createOrUpdateVertexFeature_(e,n,o)}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 o=[],r=n.getGeometry().getCoordinates(),s=ke([r]),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=H(d.geometry);const g=d.depth;if(g&&(f+="-"+g.join("-")),l[f]||(l[f]=new Array(2)),d.geometry.getType()==="Circle"&&d.index===Xr){const m=tg(e,d);ni(m,r)&&!l[f][0]&&(this.dragSegments_.push([d,0]),l[f][0]=d);continue}if(ni(c[0],r)&&!l[f][0]){this.dragSegments_.push([d,0]),l[f][0]=d;continue}if(ni(c[1],r)&&!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}H(c)in this.vertexSegments_&&!l[f][0]&&!l[f][1]&&this.insertVertexCondition_(t)&&o.push(d)}o.length&&this.willModifyFeatures_(t,[o]);for(let h=o.length-1;h>=0;--h)this.insertVertex_(o[h],r)}return!!this.vertexFeature_}handleUpEvent(t){for(let e=this.dragSegments_.length-1;e>=0;--e){const n=this.dragSegments_[e][0],o=n.geometry;if(o.getType()==="Circle"){const r=o.getCenter(),s=n.featureSegments[0],a=n.featureSegments[1];s.segment[0]=r,s.segment[1]=r,a.segment[0]=r,a.segment[1]=r,this.rBush_.update(br(r),s);let l=o;this.rBush_.update(l.getExtent(),a)}else this.rBush_.update(ke(n.segment),n)}return this.featuresBeingModified_&&(this.dispatchEvent(new Jh(Qh.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 o=n||e.getCoordinateFromPixel(t);e.getView().getProjection();const r=function(l,h){return Jf(o,l)-Jf(o,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=Qi(br(o,Qf)),h=e.getView().getResolution()*this.pixelTolerance_,u=Xl(ci(l,h,Qf));s=this.rBush_.getInExtent(u)}if(s&&s.length>0){const l=s.sort(r)[0],h=l.segment;let u=tg(o,l);const d=e.getPixelFromCoordinate(u);let c=lc(t,d);if(a||c<=this.pixelTolerance_){const f={};if(f[H(h)]=!0,this.snapToPointer_||(this.delta_[0]=u[0]-o[0],this.delta_[1]=u[1]-o[1]),l.geometry.getType()==="Circle"&&l.index===Xr)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(u,[l.feature],[l.geometry]);else{const g=e.getPixelFromCoordinate(h[0]),m=e.getPixelFromCoordinate(h[1]),p=Ei(d,g),_=Ei(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[H(l.geometry)]=!0;for(let y=1,x=s.length;y<x;++y){const k=s[y].segment;if(ni(h[0],k[0])&&ni(h[1],k[1])||ni(h[0],k[1])&&ni(h[1],k[0])){const w=H(s[y].geometry);w in v||(v[w]=!0,f[H(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,o=t.feature,r=t.geometry,s=t.depth,a=t.index;let l;for(;e.length<r.getStride();)e.push(0);switch(r.getType()){case"MultiLineString":l=r.getCoordinates(),l[s[0]].splice(a+1,0,e);break;case"Polygon":l=r.getCoordinates(),l[s[0]].splice(a+1,0,e);break;case"MultiPolygon":l=r.getCoordinates(),l[s[1]][s[0]].splice(a+1,0,e);break;case"LineString":l=r.getCoordinates(),l.splice(a+1,0,e);break;default:return}this.setGeometryCoordinates_(r,l);const h=this.rBush_;h.remove(t),this.updateSegmentIndices_(r,a,s,1);const u={segment:[n[0],e],feature:o,geometry:r,depth:s,index:a};h.insert(ke(u.segment),u),this.dragSegments_.push([u,1]);const d={segment:[e,n[1]],feature:o,geometry:r,depth:s,index:a+1};h.insert(ke(d.segment),d),this.dragSegments_.push([d,0]),this.ignoreNextSingleClick_=!0}removePoint(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=Ct.POINTERDRAG){const t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);const e=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new Jh(Qh.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null,e}return!1}removeVertex_(){const t=this.dragSegments_,e={};let n=!1,o,r,s,a,l,h,u,d,c,f,g;for(l=t.length-1;l>=0;--l)s=t[l],f=s[0],g=H(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,r=a.getCoordinates(),o=r,n=!1,a.getType()){case"MultiLineString":r[f.depth[0]].length>2&&(r[f.depth[0]].splice(h,1),n=!0);break;case"LineString":r.length>2&&(r.splice(h,1),n=!0);break;case"MultiPolygon":o=o[f.depth[1]];case"Polygon":o=o[f.depth[0]],o.length>4&&(h==o.length-1&&(h=0),o.splice(h,1),n=!0,h===0&&(o.pop(),o.push(o[0]),d=o.length-1));break}if(n){this.setGeometryCoordinates_(a,r);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(ke(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,o){this.rBush_.forEachInExtent(t.getExtent(),function(r){r.geometry===t&&(n===void 0||r.depth===void 0||Xi(r.depth,n))&&r.index>e&&(r.index+=o)})}}function ex(i,t){return i.index-t.index}function Jf(i,t,e){const n=t.geometry;if(n.getType()==="Circle"){let r=n;if(t.index===Xr){const s=Ei(r.getCenter(),Vt(i)),a=Math.sqrt(s)-r.getRadius();return a*a}}const o=Vt(i);return Vo[0]=Vt(t.segment[0]),Vo[1]=Vt(t.segment[1]),O0(o,Vo)}function tg(i,t,e){const n=t.geometry;if(n.getType()==="Circle"&&t.index===Xr)return zo(n.getClosestPoint(Vt(i)));const o=Vt(i);return Vo[0]=Vt(t.segment[0]),Vo[1]=Vt(t.segment[1]),zo(Fl(o,Vo))}function ix(){const i=gf();return function(t,e){return i.Point}}const nx=tx;function eg(i){if(i.feature)return i.feature;if(i.element)return i.element}const tu=[];class ox extends rn{constructor(t){t=t||{};const e=t;e.handleDownEvent||(e.handleDownEvent=Fn),e.stopDown||(e.stopDown=ko),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 Ca,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=H(t),o=t.getGeometry();if(o){const r=this.GEOMETRY_SEGMENTERS_[o.getType()];if(r){this.indexedFeaturesExtents_[n]=o.getExtent(Be());const s=[];if(r(s,o),s.length===1)this.rBush_.insert(ke(s[0]),{feature:t,segment:s[0]});else if(s.length>1){const a=s.map(h=>ke(h)),l=s.map(h=>({feature:t,segment:h}));this.rBush_.load(a,l)}}}e&&(this.featureChangeListenerKeys_[n]=pt(t,et.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=eg(t);this.addFeature(e)}handleFeatureRemove_(t){const e=eg(t);this.removeFeature(e)}handleFeatureChange_(t){const e=t.target;if(this.handlingDownUpSequence){const n=H(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,o=H(t),r=this.indexedFeaturesExtents_[o];if(r){const s=this.rBush_,a=[];s.forEachInExtent(r,function(l){t===l.feature&&a.push(l)});for(let l=a.length-1;l>=0;--l)s.remove(a[l])}n&&(Nt(this.featureChangeListenerKeys_[o]),delete this.featureChangeListenerKeys_[o])}setMap(t){const e=this.getMap(),n=this.featuresListenerKeys_,o=this.getFeatures_();e&&(n.forEach(Nt),n.length=0,o.forEach(this.forEachFeatureRemove_.bind(this))),super.setMap(t),t&&(this.features_?n.push(pt(this.features_,se.ADD,this.handleFeatureAdd_,this),pt(this.features_,se.REMOVE,this.handleFeatureRemove_,this)):this.source_&&n.push(pt(this.source_,Ce.ADDFEATURE,this.handleFeatureAdd_,this),pt(this.source_,Ce.REMOVEFEATURE,this.handleFeatureRemove_,this)),o.forEach(this.forEachFeatureAdd_.bind(this)))}snapTo(t,e,n){const o=n.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+this.pixelTolerance_]),r=n.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_]),s=ke([o,r]),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(Ei(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=Ei(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=zo(D0(h,v))}else{const[v,y]=_.segment;y&&(tu[0]=Vt(v),tu[1]=Vt(y),p=Fl(h,tu))}if(p){const v=Ei(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 r=qv(e).getCoordinates()[0];for(let s=0,a=r.length-1;s<a;++s)t.push(r.slice(s,s+2))}segmentGeometryCollectionGeometry_(t,e){const n=e.getGeometriesArray();for(let o=0;o<n.length;++o){const r=this.GEOMETRY_SEGMENTERS_[n[o].getType()];r&&r(t,n[o])}}segmentLineStringGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length-1;o<r;++o)t.push(n.slice(o,o+2))}segmentMultiLineStringGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length;o<r;++o){const s=n[o];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 o=0,r=n.length;o<r;++o){const s=n[o];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 o=0,r=n.length;o<r;++o){const s=n[o];for(let a=0,l=s.length-1;a<l;++a)t.push(s.slice(a,a+2))}}}const rx=ox,sx=.5,ax=10,ig=.25;class lx{constructor(t,e,n,o,r,s){this.sourceProj_=t,this.targetProj_=e;let a={};const l=wr(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_=o,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!o&&!!this.sourceProj_.getExtent()&&Gt(o)==Gt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Gt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Gt(this.targetProj_.getExtent()):null;const h=Hi(n),u=Vs(n),d=Ws(n),c=Us(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,o,r,s){this.triangles_.push({source:[o,r,s],target:[t,e,n]})}addQuad_(t,e,n,o,r,s,a,l,h){const u=ke([r,s,a,l]),d=this.sourceWorldWidth_?Gt(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=ke([t,e,n,o]);g=Gt(p)/this.targetWorldWidth_>ig||g}!f&&this.sourceProj_.isGlobal()&&d&&(g=d>ig||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(r[0])||!isFinite(r[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(r[0])||!isFinite(r[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(r[0],c)+$i(a[0],c))/2-$i(_[0],c):v=(r[0]+a[0])/2-_[0];const y=(r[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=[(o[0]+t[0])/2,(o[1]+t[1])/2],y=this.transformInv_(v);this.addQuad_(t,e,p,v,r,s,_,y,h-1),this.addQuad_(v,p,n,o,y,_,a,l,h-1)}else{const p=[(t[0]+e[0])/2,(t[1]+e[1])/2],_=this.transformInv_(p),v=[(n[0]+o[0])/2,(n[1]+o[1])/2],y=this.transformInv_(v);this.addQuad_(t,p,v,o,r,_,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,o,r,a,l),(m&14)==0&&this.addTriangle_(t,n,e,r,a,s),m&&((m&13)==0&&this.addTriangle_(e,o,t,s,l,r),(m&7)==0&&this.addTriangle_(e,o,n,s,l,a))}calculateSourceExtent(){const t=Be();return this.triangles_.forEach(function(e,n,o){const r=e.source;kr(t,r[0]),kr(t,r[1]),kr(t,r[2])}),t}getTriangles(){return this.triangles_}}const hx=lx;let eu;const ng=[];function og(i,t,e,n,o){i.beginPath(),i.moveTo(0,0),i.lineTo(t,e),i.lineTo(n,o),i.closePath(),i.save(),i.clip(),i.fillRect(0,0,Math.max(t,n)+1,Math.max(e,o)),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)",og(i,4,5,4,0),og(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 rg(i,t,e,n){const o=qs(e,t,i);let r=Ys(t,n,e);const s=t.getMetersPerUnit();s!==void 0&&(r*=s);const a=i.getMetersPerUnit();a!==void 0&&(r/=a);const l=i.getExtent();if(!l||Bs(l,o)){const h=Ys(i,r,o)/r;isFinite(h)&&h>0&&(r/=h)}return r}function dx(i,t,e,n){const o=Ki(e);let r=rg(i,t,o,n);return(!isFinite(r)||r<=0)&&Al(e,function(s){return r=rg(i,t,s,n),isFinite(r)&&r>0}),r}function cx(i,t,e,n,o,r,s,a,l,h,u,d){const c=De(Math.round(e*i),Math.round(e*t),ng);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=Be();l.forEach(function(x,k,w){rc(g,x.extent)});const m=Gt(g),p=$e(g),_=De(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=Gt(x.extent),z=$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,z*v)});const y=Hi(s);return a.getTriangles().forEach(function(x,k,w){const C=x.source,M=x.target;let S=C[0][0],z=C[0][1],P=C[1][0],j=C[1][1],A=C[2][0],lt=C[2][1];const B=f((M[0][0]-y[0])/r),W=f(-(M[0][1]-y[1])/r),N=f((M[1][0]-y[0])/r),$=f(-(M[1][1]-y[1])/r),D=f((M[2][0]-y[0])/r),Q=f(-(M[2][1]-y[1])/r),V=S,I=z;S=0,z=0,P-=V,j-=I,A-=V,lt-=I;const st=[[P,j,0,0,N-B],[A,lt,0,0,D-B],[0,0,P,j,$-W],[0,0,A,lt,Q-W]],b=f0(st);if(!!b){if(c.save(),c.beginPath(),ux()||!d){c.moveTo(N,$);const T=4,Z=B-N,E=W-$;for(let J=0;J<T;J++)c.lineTo(N+f((J+1)*Z/T),$+f(J*E/(T-1))),J!=T-1&&c.lineTo(N+f((J+1)*Z/T),$+f((J+1)*E/(T-1)));c.lineTo(D,Q)}else c.moveTo(N,$),c.lineTo(B,W),c.lineTo(D,Q);c.clip(),c.transform(b[0],b[2],b[1],b[3],B,W),c.translate(g[0]-V,g[3]-I),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])/r,S=-(C[0][1]-y[1])/r,z=(C[1][0]-y[0])/r,P=-(C[1][1]-y[1])/r,j=(C[2][0]-y[0])/r,A=-(C[2][1]-y[1])/r;c.beginPath(),c.moveTo(z,P),c.lineTo(M,S),c.lineTo(j,A),c.closePath(),c.stroke()}),c.restore()),c.canvas}class fx extends Ea{constructor(t,e,n,o,r,s,a,l,h,u,d,c){super(r,G.IDLE,{interpolate:!!c}),this.renderEdges_=d!==void 0?d:!1,this.pixelRatio_=a,this.gutter_=l,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=o,this.wrappedTileCoord_=s||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const f=o.getTileCoordExtent(this.wrappedTileCoord_),g=this.targetTileGrid_.getExtent();let m=this.sourceTileGrid_.getExtent();const p=g?Xn(f,g):f;if(Pl(p)===0){this.state=G.EMPTY;return}const _=t.getExtent();_&&(m?m=Xn(m,_):m=_);const v=o.getResolution(this.wrappedTileCoord_[0]),y=dx(t,n,p,v);if(!isFinite(y)||y<=0){this.state=G.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=G.EMPTY;return}this.sourceZ_=e.getZForResolution(y);let k=this.triangulation_.calculateSourceExtent();if(m&&(t.canWrapX()?(k[1]=$t(k[1],m[1],m[3]),k[3]=$t(k[3],m[1],m[3])):k=Xn(k,m)),!Pl(k))this.state=G.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=G.EMPTY)}}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(function(e,n,o){e&&e.getState()==G.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,t.length===0)this.state=G.ERROR;else{const e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),o=typeof n=="number"?n:n[0],r=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(o,r,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),s,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=G.LOADED}this.changed()}load(){if(this.state==G.IDLE){this.state=G.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,n,o){const r=e.getState();if(r==G.IDLE||r==G.LOADING){t++;const s=pt(e,et.CHANGE,function(a){const l=e.getState();(l==G.LOADED||l==G.ERROR||l==G.EMPTY)&&(Nt(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,o){e.getState()==G.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Nt),this.sourcesListenerKeys_=null}release(){this.canvas_&&(wl(this.canvas_.getContext("2d")),ng.push(this.canvas_),this.canvas_=null),super.release()}}const sg=fx;class gx extends Af{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=Be(),this.tmpTileRange_=new Zf(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),n=t.getState(),o=e.getUseInterimTilesOnError();return n==G.LOADED||n==G.EMPTY||n==G.ERROR&&!o}getTile(t,e,n,o){const r=o.pixelRatio,s=o.viewState.projection,a=this.getLayer();let h=a.getSource().getTile(t,e,n,r,s);return h.getState()==G.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(),o=Jt(e.pixelToCoordinateTransform,t.slice()),r=n.getExtent();if(r&&!Bs(r,o))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(o,c),g=h.getTile(c,f[1],f[2],s,a);if(!(g instanceof Vf||g instanceof sg))return null;if(g.getState()!==G.LOADED)continue;const m=u.getOrigin(c),p=we(u.getTileSize(c)),_=u.getResolution(c),v=Math.floor(d*((o[0]-m[0])/_-f[1]*p[0])),y=Math.floor(d*((m[1]-o[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],o=t.viewState,r=o.projection,s=o.resolution,a=o.center,l=o.rotation,h=t.pixelRatio,u=this.getLayer(),d=u.getSource(),c=d.getRevision(),f=d.getTileGridForProjection(r),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(Gt(p)/_*h),x=Math.round($e(p)/_*h),k=n.extent&&Qi(n.extent);k&&(p=Xn(p,Qi(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),z={};z[g]={};const P=this.createLoadedTileFinder(d,r,z),j=this.tmpExtent,A=this.tmpTileRange_;this.newTiles_=!1;const lt=l?Ll(o.center,_,l,t.size):void 0;for(let st=S.minX;st<=S.maxX;++st)for(let b=S.minY;b<=S.maxY;++b){if(l&&!f.tileCoordIntersectsViewport([g,st,b],lt))continue;const T=this.getTile(g,st,b,t);if(this.isDrawableTile(T)){const J=H(this);if(T.getState()==G.LOADED){z[g][T.tileCoord.toString()]=T;let q=T.inTransition(J);q&&n.opacity!==1&&(T.endTransition(J),q=!1),!this.newTiles_&&(q||!this.renderedTiles.includes(T))&&(this.newTiles_=!0)}if(T.getAlpha(J,t.time)===1)continue}const Z=f.getTileCoordChildTileRange(T.tileCoord,A,j);let E=!1;Z&&(E=P(g+1,Z)),E||f.forEachTileCoordParentTileRange(T.tileCoord,P,A,j)}const B=m/s*h/v;Si(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/h,1/h,l,-y/2,-x/2);const W=bc(this.pixelTransform);this.useContainer(e,W,this.getBackground(t));const N=this.context,$=N.canvas;$l(this.inversePixelTransform,this.pixelTransform),Si(this.tempTransform,y/2,x/2,B,B,0,-y/2,-x/2),$.width!=y||$.height!=x?($.width=y,$.height=x):this.containerReused||N.clearRect(0,0,y,x),k&&this.clipUnrotated(N,t,k),d.getInterpolate()||(N.imageSmoothingEnabled=!1),this.preRender(N,t),this.renderedTiles.length=0;let D=Object.keys(z).map(Number);D.sort(On);let Q,V,I;n.opacity===1&&(!this.containerReused||d.getOpaque(t.viewState.projection))?D=D.reverse():(Q=[],V=[]);for(let st=D.length-1;st>=0;--st){const b=D[st],T=d.getTilePixelSize(b,h,r),E=f.getResolution(b)/m,J=T[0]*E*B,q=T[1]*E*B,yt=f.getTileCoordForCoordAndZ(Hi(M),b),St=f.getTileCoordExtent(yt),xt=Jt(this.tempTransform,[v*(St[0]-M[0])/m,v*(M[3]-St[3])/m]),Et=v*d.getGutterForProjection(r),Ot=z[b];for(const Lt in Ot){const Bt=Ot[Lt],O=Bt.tileCoord,dt=yt[1]-O[1],_t=Math.round(xt[0]-(dt-1)*J),wt=yt[2]-O[2],bt=Math.round(xt[1]-(wt-1)*q),at=Math.round(xt[0]-dt*J),ot=Math.round(xt[1]-wt*q),Mt=_t-at,zt=bt-ot,Ut=g===b,kt=Ut&&Bt.getAlpha(H(this),t.time)!==1;let ct=!1;if(!kt)if(Q){I=[at,ot,at+Mt,ot,at+Mt,ot+zt,at,ot+zt];for(let Ft=0,Tt=Q.length;Ft<Tt;++Ft)if(g!==b&&b<V[Ft]){const ft=Q[Ft];Kt([at,ot,at+Mt,ot+zt],[ft[0],ft[3],ft[4],ft[7]])&&(ct||(N.save(),ct=!0),N.beginPath(),N.moveTo(I[0],I[1]),N.lineTo(I[2],I[3]),N.lineTo(I[4],I[5]),N.lineTo(I[6],I[7]),N.moveTo(ft[6],ft[7]),N.lineTo(ft[4],ft[5]),N.lineTo(ft[2],ft[3]),N.lineTo(ft[0],ft[1]),N.clip())}Q.push(I),V.push(b)}else N.clearRect(at,ot,Mt,zt);this.drawTileImage(Bt,t,at,ot,Mt,zt,Et,Ut),Q&&!kt?(ct&&N.restore(),this.renderedTiles.unshift(Bt)):this.renderedTiles.push(Bt),this.updateUsedTiles(t.usedTiles,d,Bt)}}return this.renderedRevision=c,this.renderedResolution=m,this.extentChanged=!this.renderedExtent_||!Io(this.renderedExtent_,M),this.renderedExtent_=M,this.renderedPixelRatio=h,this.renderedProjection=r,this.manageTilePyramid(t,d,f,h,r,p,g,u.getPreload()),this.scheduleExpireCache(t,d),this.postRender(N,t),n.extent&&N.restore(),N.imageSmoothingEnabled=!0,W!==$.style.transform&&($.style.transform=W),this.container}drawTileImage(t,e,n,o,r,s,a,l){const h=this.getTileImage(t);if(!h)return;const u=H(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,o,r,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(o,r,s){const a=H(o);a in s.usedTiles&&o.expireCache(s.viewState.projection,s.usedTiles[a])}.bind(null,e);t.postRenderFunctions.push(n)}}updateUsedTiles(t,e,n){const o=H(e);o in t||(t[o]={}),t[o][n.getKey()]=!0}manageTilePyramid(t,e,n,o,r,s,a,l,h){const u=H(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?Ll(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,o,r),_.getState()==G.IDLE&&(d[_.getKey()]=!0,c.isKeyQueued(_.getKey())||c.enqueue([_,u,n.getTileCoordCenter(_.tileCoord),y])),h!==void 0&&h(_)):e.useTile(w,x,k,r));e.updateCacheSize(p,r)}}const ag=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 ag{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.tmpTransform_=Ke()}prepareTile(t,e,n){let o;const r=t.getState();return(r===G.LOADED||r===G.ERROR)&&(this.updateExecutorGroup_(t,e,n),this.tileImageNeedsRender_(t)&&(o=!0)),o}getTile(t,e,n,o){const r=o.pixelRatio,s=o.viewState,a=s.resolution,l=s.projection,h=this.getLayer(),u=h.getSource().getTile(t,e,n,r,l),d=o.viewHints,c=!(d[Zt.ANIMATING]||d[Zt.INTERACTING]);return(c||!u.wantedResolution)&&(u.wantedResolution=a),this.prepareTile(u,r,l)&&(c||Date.now()-o.time<8)&&h.getRenderMode()!=="vector"&&this.renderTileImage_(u,o),super.getTile(t,e,n,o)}isDrawableTile(t){const e=this.getLayer();return super.isDrawableTile(t)&&(e.getRenderMode()==="vector"?H(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 o=this.getLayer(),r=o.getRevision(),s=o.getRenderOrder()||null,a=t.wantedResolution,l=t.getReplayState(o);if(!l.dirty&&l.renderedResolution===a&&l.renderedRevision==r&&l.renderedRenderOrder==s)return;const h=o.getSource(),u=o.getDeclutter(),d=h.getTileGrid(),f=h.getTileGridForProjection(n).getTileCoordExtent(t.wrappedTileCoord),g=h.getSourceTiles(e,n,t),m=H(o);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()!=G.LOADED)continue;const y=v.tileCoord,x=d.getTileCoordExtent(y),k=Xn(f,x),w=ci(k,o.getRenderBuffer()*a,this.tmpExtent),C=Io(x,k)?null:w,M=new ka(0,w,a,e),S=u?new ka(0,k,a,e):void 0,z=Nf(a,e),P=function(W){let N;const $=W.getStyleFunction()||o.getStyleFunction();if($&&(N=$(W,a)),N){const D=this.renderFeature(W,z,N,M,S);l.dirty=l.dirty||D}},j=v.getFeatures();s&&s!==l.renderedRenderOrder&&j.sort(s);for(let W=0,N=j.length;W<N;++W){const $=j[W];(!C||Kt(C,$.getGeometry().getExtent()))&&P.call(this,$)}const A=M.finish(),lt=o.getRenderMode()!=="vector"&&u&&g.length===1?null:k,B=new wa(lt,a,e,h.getOverlaps(),A,o.getRenderBuffer());if(t.executorGroups[m].push(B),S){const W=new wa(null,a,e,h.getOverlaps(),S.finish(),o.getRenderBuffer());t.declutterExecutorGroups[m].push(W)}}l.renderedRevision=r,l.renderedRenderOrder=s,l.renderedResolution=a}forEachFeatureAtCoordinate(t,e,n,o,r){const s=e.viewState.resolution,a=e.viewState.rotation;n=n??0;const l=this.getLayer(),u=l.getSource().getTileGridForProjection(e.viewState.projection),d=ke([t]);ci(d,s*n,d);const c={},f=function(p,_,v){let y=p.getId();y===void 0&&(y=H(p));const x=c[y];if(x){if(x!==!0&&v<x.distanceSq){if(v===0)return c[y]=!0,r.splice(r.lastIndexOf(x),1),o(p,l,_);x.geometry=_,x.distanceSq=v}}else{if(v===0)return c[y]=!0,o(p,l,_);r.push(c[y]={feature:p,layer:l,geometry:_,distanceSq:v,callback:o})}},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=H(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,z=C.length;S<z;++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 o=this.getLayer(),r=H(o),s=o.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()===G.LOADED){const k=u.getTileCoordExtent(f.tileCoord);s.getWrapX()&&a.canWrapX()&&!Vn(l,k)&&Gl(d,a);break}f=void 0}if(!f||f.loadingSourceTiles>0){e([]);return}const g=u.getTileCoordExtent(f.wrappedTileCoord),m=Hi(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[r];if(!v&&!this.animatingOrInteracting_){const y=we(u.getTileSize(u.getZForResolution(h,s.zDirection))),x=this.renderedRotation_,k=[this.getRenderTransform(u.getTileCoordCenter(f.wrappedTileCoord),h,0,Ue,y[0]*Ue,y[1]*Ue,0)];v=Lf(y,k,_,o.getStyleFunction(),u.getTileCoordExtent(f.wrappedTileCoord),f.getReplayState(o).renderedResolution,x),f.hitDetectionImageData[r]=v}e(Of(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 o=t.viewHints,r=!(o[Zt.ANIMATING]||o[Zt.INTERACTING]),s=this.renderedTiles;for(let a=0,l=s.length;a<l;++a){const h=s[a],u=h.declutterExecutorGroups[H(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,r,void 0,t.declutterTree)}e.globalAlpha=n}getTileRenderTransform(t,e){const n=e.pixelRatio,o=e.viewState,r=o.center,s=o.resolution,a=o.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 Yl(ql(this.inversePixelTransform.slice(),1/n,1/n),this.getRenderTransform(r,s,a,n,h,u,m))}postRender(t,e){const n=e.viewHints,o=!(n[Zt.ANIMATING]||n[Zt.INTERACTING]);this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;const r=this.getLayer(),s=r.getRenderMode(),a=t.globalAlpha;t.globalAlpha=r.getOpacity();const l=px[s],h=e.viewState,u=h.rotation,d=r.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(r).dirty;const x=y.executorGroups[H(r)].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,z=m.length;S<z;++S)if(f!==w&&w<p[S]){const P=m[S];Kt([M[0],M[3],M[4],M[7]],[P[0],P[3],P[4],P[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(P[6],P[7]),t.lineTo(P[4],P[5]),t.lineTo(P[2],P[3]),t.lineTo(P[0],P[1]),t.clip())}m.push(M),p.push(w)}for(let S=0,z=x.length;S<z;++S)x[S].execute(t,1,k,u,o,l);C&&t.restore()}t.globalAlpha=a,this.ready=_,super.postRender(t,e)}renderFeature(t,e,n,o,r){if(!n)return!1;let s=!1;if(Array.isArray(n))for(let a=0,l=n.length;a<l;++a)s=Ma(o,t,n[a],e,this.boundHandleStyleImageChange_,void 0,r)||s;else s=Ma(o,t,n,e,this.boundHandleStyleImageChange_,void 0,r);return s}tileImageNeedsRender_(t){const e=this.getLayer();if(e.getRenderMode()==="vector")return!1;const n=t.getReplayState(e),o=e.getRevision(),r=t.wantedResolution;return n.renderedTileResolution!==r||n.renderedTileRevision!==o}renderTileImage_(t,e){const n=this.getLayer(),o=t.getReplayState(n),r=n.getRevision(),s=t.executorGroups[H(n)];o.renderedTileRevision=r;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=yc(this.tmpTransform_);ql(C,y,y),_.setTransform.apply(_,C)}const x=f.getTileCoordExtent(a,this.tmpExtent),k=m/p,w=yc(this.tmpTransform_);ql(w,k,-k),q0(w,-x[0],-x[3]);for(let C=0,M=s.length;C<M;++C)s[C].execute(_,y,w,0,!0,mx[n.getRenderMode()]);o.renderedTileResolution=t.wantedResolution}}const _x=vx,fn={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class yx extends Sf{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";gt(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(fn.PRELOAD)}getUseInterimTilesOnError(){return this.get(fn.USE_INTERIM_TILES_ON_ERROR)}setPreload(t){this.set(fn.PRELOAD,t)}setUseInterimTilesOnError(t){this.set(fn.USE_INTERIM_TILES_ON_ERROR,t)}}const xx=yx,bx=[0,0,0],gn=5;class kx{constructor(t){this.minZoom=t.minZoom!==void 0?t.minZoom:0,this.resolutions_=t.resolutions,gt(Kp(this.resolutions_,function(o,r){return r-o},!0),17);let e;if(!t.origins){for(let o=0,r=this.resolutions_.length-1;o<r;++o)if(!e)e=this.resolutions_[o]/this.resolutions_[o+1];else if(this.resolutions_[o]/this.resolutions_[o+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,gt(this.origins_.length==this.resolutions_.length,20));const n=t.extent;n!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=Hi(n)),gt(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,t.tileSizes!==void 0&&(this.tileSizes_=t.tileSizes,gt(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=t.tileSize!==void 0?t.tileSize:this.tileSizes_?null:th,gt(!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(o,r){const s=new Zf(Math.min(0,o[0]),Math.max(o[0]-1,-1),Math.min(0,o[1]),Math.max(o[1]-1,-1));if(n){const a=this.getTileRangeForExtentAndZ(n,r);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 o=this.getTileRangeForExtentAndZ(t,e);for(let r=o.minX,s=o.maxX;r<=s;++r)for(let a=o.minY,l=o.maxY;a<=l;++a)n([e,r,a])}forEachTileCoordParentTileRange(t,e,n,o){let r,s,a,l=null,h=t[0]-1;for(this.zoomFactor_===2?(s=t[1],a=t[2]):l=this.getTileCoordExtent(t,o);h>=this.minZoom;){if(this.zoomFactor_===2?(s=Math.floor(s/2),a=Math.floor(a/2),r=Wo(s,s,a,a,n)):r=this.getTileRangeForExtentAndZ(l,h,n),e(h,r))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 r=t[1]*2,s=t[2]*2;return Wo(r,r+1,s,s+1,e)}const o=this.getTileCoordExtent(t,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(o,t[0]+1,e)}return null}getTileRangeForTileCoordAndZ(t,e,n){if(e>this.maxZoom||e<this.minZoom)return null;const o=t[0],r=t[1],s=t[2];if(e===o)return Wo(r,s,r,s,n);if(this.zoomFactor_){const l=Math.pow(this.zoomFactor_,e-o),h=Math.floor(r*l),u=Math.floor(s*l);if(e<o)return Wo(h,h,u,u,n);const d=Math.floor(l*(r+1))-1,c=Math.floor(l*(s+1))-1;return Wo(h,d,u,c,n)}const a=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(a,e,n)}getTileRangeExtent(t,e,n){const o=this.getOrigin(t),r=this.getResolution(t),s=we(this.getTileSize(t),this.tmpSize_),a=o[0]+e.minX*s[0]*r,l=o[0]+(e.maxX+1)*s[0]*r,h=o[1]+e.minY*s[1]*r,u=o[1]+(e.maxY+1)*s[1]*r;return ii(a,h,l,u,n)}getTileRangeForExtentAndZ(t,e,n){const o=bx;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,o);const r=o[1],s=o[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,o),Wo(r,o[1],s,o[2],n)}getTileCoordCenter(t){const e=this.getOrigin(t[0]),n=this.getResolution(t[0]),o=we(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*o[0]*n,e[1]-(t[2]+.5)*o[1]*n]}getTileCoordExtent(t,e){const n=this.getOrigin(t[0]),o=this.getResolution(t[0]),r=we(this.getTileSize(t[0]),this.tmpSize_),s=n[0]+t[1]*r[0]*o,a=n[1]-(t[2]+1)*r[1]*o,l=s+r[0]*o,h=a+r[1]*o;return ii(s,a,l,h,e)}getTileCoordForCoordAndResolution(t,e,n){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,n)}getTileCoordForXYAndResolution_(t,e,n,o,r){const s=this.getZForResolution(n),a=n/this.getResolution(s),l=this.getOrigin(s),h=we(this.getTileSize(s),this.tmpSize_);let u=a*(t-l[0])/n/h[0],d=a*(l[1]-e)/n/h[1];return o?(u=Fs(u,gn)-1,d=Fs(d,gn)-1):(u=Os(u,gn),d=Os(d,gn)),Xf(s,u,d,r)}getTileCoordForXYAndZ_(t,e,n,o,r){const s=this.getOrigin(n),a=this.getResolution(n),l=we(this.getTileSize(n),this.tmpSize_);let h=(t-s[0])/a/l[0],u=(s[1]-e)/a/l[1];return o?(h=Fs(h,gn)-1,u=Fs(u,gn)-1):(h=Os(h,gn),u=Os(u,gn)),Xf(n,h,u,r)}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=bl(this.resolutions_,t,e||0);return $t(n,this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(t,e){return Yc(e,0,e.length,2,this.getTileCoordExtent(t))}calculateTileRanges_(t){const e=this.resolutions_.length,n=new Array(e);for(let o=this.minZoom;o<e;++o)n[o]=this.getTileRangeForExtentAndZ(t,o);this.fullTileRanges_=n}}const nu=kx,ou={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};function lg(i){let t=i.getDefaultTileGrid();return t||(t=Cx(i),i.setDefaultTileGrid(t)),t}function wx(i,t,e){const n=t[0],o=i.getTileCoordCenter(t),r=Ia(e);if(Bs(r,o))return t;{const s=Gt(r),a=Math.ceil((r[0]-o[0])/s);return o[0]+=s*a,i.getTileCoordForCoordAndZ(o,n)}}function Mx(i,t,e,n){n=n!==void 0?n:"top-left";const o=ug(i,t,e);return new nu({extent:i,origin:T0(i,n),resolutions:o,tileSize:e})}function hg(i){const t=i||{},e=t.extent||jt("EPSG:3857").getExtent(),n={extent:e,minZoom:t.minZoom,tileSize:t.tileSize,resolutions:ug(e,t.maxZoom,t.tileSize,t.maxResolution)};return new nu(n)}function ug(i,t,e,n){t=t!==void 0?t:Ic,e=we(e!==void 0?e:th);const o=$e(i),r=Gt(i);n=n>0?n:Math.max(r/e[0],o/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 o=Ia(i);return Mx(o,t,e,n)}function Ia(i){i=jt(i);let t=i.getExtent();if(!t){const e=180*Mo.degrees/i.getMetersPerUnit();t=ii(-e,-e,e,e)}return t}class Ex extends Bf{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&&we(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,o){const r=this.getTileCacheForProjection(t);if(!r)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=Uo(e,u,d),h=!1,r.containsKey(l)&&(a=r.get(l),h=a.getState()===G.LOADED,h&&(h=o(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,o,r){return it()}getTileGrid(){return this.tileGrid}getTileGridForProjection(t){return this.tileGrid?this.tileGrid:lg(t)}getTileCacheForProjection(t){const e=this.getProjection();return gt(e===null||Yn(e,t),68),this.tileCache}getTilePixelRatio(t){return this.tilePixelRatio_}getTilePixelSize(t,e,n){const o=this.getTileGridForProjection(n),r=this.getTilePixelRatio(e),s=we(o.getTileSize(t),this.tmpSize);return r==1?s:L_(s,r,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)),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,o){}}class Sx extends ei{constructor(t,e){super(t),this.tile=e}}const Tx=Ex;function Ix(i,t){const e=/\{z\}/g,n=/\{x\}/g,o=/\{y\}/g,r=/\{-y\}/g;return function(s,a,l){if(s)return i.replace(e,s[0].toString()).replace(n,s[1].toString()).replace(o,s[2].toString()).replace(r,function(){const h=s[0],u=t.getFullTileRange(h);return gt(u,55),(u.getHeight()-s[2]-1).toString()})}}function zx(i,t){const e=i.length,n=new Array(e);for(let o=0;o<e;++o)n[o]=Ix(i[o],t);return Rx(n)}function Rx(i){return i.length===1?i[0]:function(t,e,n){if(t){const o=Vy(t),r=$i(o,i.length);return i[r](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),o=e[2].charCodeAt(0);let r;for(r=n;r<=o;++r)t.push(i.replace(e[0],String.fromCharCode(r)));return t}if(e=/\{(\d+)-(\d+)\}/.exec(i),e){const n=parseInt(e[2],10);for(let o=parseInt(e[1],10);o<=n;o++)t.push(i.replace(e[0],o.toString()));return t}return t.push(i),t}class ru 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===ru.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=H(e),o=e.getState();let r;o==G.LOADING?(this.tileLoadingKeys_[n]=!0,r=ou.TILELOADSTART):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],r=o==G.ERROR?ou.TILELOADERROR:o==G.LOADED?ou.TILELOADEND:void 0),r!=null&&this.dispatchEvent(new Sx(r,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(`
14
+ `);this.generateTileUrlFunction_?this.setTileUrlFunction(zx(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,n){}useTile(t,e,n){const o=Uo(t,e,n);this.tileCache.containsKey(o)&&this.tileCache.get(o)}}const dg=ru;class Px extends dg{constructor(t){const e=t.projection||"EPSG:3857",n=t.extent||Ia(e),o=t.tileGrid||hg({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:o,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:Zy,this.tileGrids_={}}getFeaturesInExtent(t){const e=[],n=this.tileCache;if(n.getCount()===0)return e;const o=qf(n.peekFirstKey())[0],r=this.tileGrid;return n.forEach(function(s){if(s.tileCoord[0]!==o||s.getState()!==G.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,r.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),o=Object.keys(e).reduce((r,s)=>{const a=Wy(s),l=n.peek(a);if(l){const h=l.sourceTiles;for(let u=0,d=h.length;u<d;++u)r[h[u].getKey()]=!0}return r},{});super.expireCache(t,e),this.sourceTileCache.expireCache(o)}getSourceTiles(t,e,n){if(n.getState()===G.IDLE){n.setState(G.LOADING);const o=n.wrappedTileCoord,r=this.getTileGridForProjection(e),s=r.getTileCoordExtent(o),a=o[0],l=r.getResolution(a);ci(s,-l,s);const h=this.tileGrid,u=h.getExtent();u&&Xn(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?G.IDLE:G.EMPTY,f,this.format_,this.tileLoadFunction);n.sourceTiles.push(g);const m=g.getState();if(m<G.LOADED){const p=_=>{this.handleTileChange(_);const v=g.getState();if(v===G.LOADED||v===G.ERROR){const y=g.getKey();y in n.errorTileKeys?g.getState()===G.LOADED&&delete n.errorTileKeys[y]:n.loadingSourceTiles--,v===G.ERROR?n.errorTileKeys[y]=!0:g.removeEventListener(et.CHANGE,p),n.loadingSourceTiles===0&&n.setState(Gn(n.errorTileKeys)?G.LOADED:G.ERROR)}};g.addEventListener(et.CHANGE,p),n.loadingSourceTiles++}m===G.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()===G.ERROR)?G.ERROR:G.LOADED)}return n.sourceTiles}getTile(t,e,n,o,r){const s=Uo(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,r);const d=this.getTileGrid().getExtent(),c=this.getTileGridForProjection(r);if(u&&d){const m=c.getTileCoordExtent(u);ci(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);ci(v,-p,v),m.forEachTileCoord(v,_,function(y){f=f&&!this.tileUrlFunction(y,o,r)}.bind(this))}const g=new $y(h,f?G.EMPTY:G.IDLE,u,this.getSourceTiles.bind(this,o,r));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 o=this.tileGrid,r=o.getResolutions().slice(),s=r.map(function(h,u){return o.getOrigin(u)}),a=r.map(function(h,u){return o.getTileSize(u)}),l=Ic+1;for(let h=r.length;h<l;++h)r.push(r[h-1]/2),s.push(s[h-1]),a.push(a[h-1]);n=new nu({extent:o.getExtent(),origins:s,resolutions:r,tileSizes:a}),this.tileGrids_[e]=n}return n}getTilePixelRatio(t){return t}getTilePixelSize(t,e,n){const o=this.getTileGridForProjection(n),r=we(o.getTileSize(t),this.tmpSize);return[Math.round(r[0]*e),Math.round(r[1]*e)]}updateCacheSize(t,e){super.updateCacheSize(t*2,e),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(e).highWaterMark}}const Dx=Px;function Lx(i,t){i.setLoader(function(e,n,o){Uf(t,i.getFormat(),e,n,o,i.onLoad.bind(i),i.onError.bind(i))})}class Ox extends dg{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:Fx,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:Vf,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 o in this.tileCacheForProjection){const r=this.tileCacheForProjection[o];r.expireCache(r==n?e:{})}}getGutterForProjection(t){return this.getProjection()&&t&&!Yn(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&&!Yn(this.getProjection(),t)?!1:super.getOpaque(t)}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||Yn(e,t)))return this.tileGrid;{const n=H(t);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=lg(t)),this.tileGridForProjection[n]}}getTileCacheForProjection(t){const e=this.getProjection();if(!e||Yn(e,t))return this.tileCache;{const n=H(t);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new Hh(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]}}createTile_(t,e,n,o,r,s){const a=[t,e,n],l=this.getTileCoordForTileUrlFunction(a,r),h=l?this.tileUrlFunction(l,o,r):void 0,u=new this.tileClass(a,h!==void 0?G.IDLE:G.EMPTY,h!==void 0?h:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=s,u.addEventListener(et.CHANGE,this.handleTileChange.bind(this)),u}getTile(t,e,n,o,r){const s=this.getProjection();if(!s||!r||Yn(s,r))return this.getTileInternal(t,e,n,o,s||r);{const a=this.getTileCacheForProjection(r),l=[t,e,n];let h;const u=Yf(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(r),g=this.getTileCoordForTileUrlFunction(l,r),m=new sg(s,c,r,f,l,g,this.getTilePixelRatio(o),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,o,r){let s=null;const a=Uo(t,e,n),l=this.getKey();if(!this.tileCache.containsKey(a))s=this.createTile_(t,e,n,o,r,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,o,r,l),h.getState()==G.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=jt(t);if(n){const o=H(n);o in this.tileGridForProjection||(this.tileGridForProjection[o]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function Fx(i,t){i.getImage().src=t}const Nx=Ox;class Gx extends Ns{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(fn.PRELOAD)}setPreload(t){this.set(fn.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(fn.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(fn.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 ag(this)}}const Ux=Bx;var Wx={},cg,fg={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 Yr(i){return i=Math.round(i),i<0?0:i>255?255:i}function gg(i){return i<0?0:i>1?1:i}function su(i){return i[i.length-1]==="%"?Yr(parseFloat(i)/100*255):Yr(parseInt(i))}function za(i){return i[i.length-1]==="%"?gg(parseFloat(i)/100):gg(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 Vx(i){var t=i.replace(/ /g,"").toLowerCase();if(t in fg)return fg[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("("),o=t.indexOf(")");if(n!==-1&&o+1===t.length){var r=t.substr(0,n),s=t.substr(n+1,o-(n+1)).split(","),a=1;switch(r){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[Yr(au(c,d,l+1/3)*255),Yr(au(c,d,l)*255),Yr(au(c,d,l-1/3)*255),a];default:return null}}return null}try{cg=Wx.parseCSSColor=Vx}catch{}var Rt=function(t,e,n,o){o===void 0&&(o=1),this.r=t,this.g=e,this.b=n,this.a=o};Rt.parse=function(t){if(!!t){if(t instanceof Rt)return t;if(typeof t=="string"){var e=cg(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],o=t[2],r=t[3];return"rgba("+Math.round(e)+","+Math.round(n)+","+Math.round(o)+","+r+")"},Rt.prototype.toArray=function(){var t=this,e=t.r,n=t.g,o=t.b,r=t.a;return r===0?[0,0,0,0]:[e*255/r,n*255/r,o*255/r,r]},Rt.prototype.toArray01=function(){var t=this,e=t.r,n=t.g,o=t.b,r=t.a;return r===0?[0,0,0,0]:[e/r,n/r,o/r,r]},Rt.prototype.toArray01PremultipliedAlpha=function(){var t=this,e=t.r,n=t.g,o=t.b,r=t.a;return[e,n,o,r]},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 qr(i){return typeof i=="object"?["literal",i]:i}function Xx(i,t){var e=i.stops;if(!e)return Yx(i,t);var n=e&&typeof e[0][0]=="object",o=n||i.property!==void 0,r=n||!o;return e=e.map(function(s){return!o&&t.tokens&&typeof s[1]=="string"?[s[0],Kx(s[1])]:[s[0],qr(s[1])]}),n?qx(i,t,e):r?Zx(i,t,e):hu(i,t,e)}function Yx(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,qr(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 qx(i,t,e){for(var n={},o={},r=[],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},o[l]=[],r.push(l)),o[l].push([a[0].value,a[1]])}var h=du({},t);if(h==="exponential"){for(var u=[lu(i),["linear"],["zoom"]],d=0,c=r;d<c.length;d+=1){var f=c[d],g=hu(n[f],t,o[f]);Xo(u,f,g,!1)}return u}else{for(var m=["step",["zoom"]],p=0,_=r;p<_.length;p+=1){var v=_[p],y=hu(n[v],t,o[v]);Xo(m,v,y,!0)}return uu(m),m}}function $x(i,t){if(i!==void 0)return i;if(t!==void 0)return t}function mg(i,t){var e=qr($x(i.default,t.default));return e===void 0&&t.type==="resolvedImage"?"":e}function hu(i,t,e){var n=du(i,t),o=["get",i.property];if(n==="categorical"&&typeof e[0][0]=="boolean"){for(var r=["case"],s=0,a=e;s<a.length;s+=1){var l=a[s];r.push(["==",o,l[0]],l[1])}return r.push(mg(i,t)),r}else if(n==="categorical"){for(var h=["match",o],u=0,d=e;u<d.length;u+=1){var c=d[u];Xo(h,c[0],c[1],!1)}return h.push(mg(i,t)),h}else if(n==="interval"){for(var f=["step",["number",o]],g=0,m=e;g<m.length;g+=1){var p=m[g];Xo(f,p[0],p[1],!0)}return uu(f),i.default===void 0?f:["case",["==",["typeof",o],"number"],f,qr(i.default)]}else if(n==="exponential"){for(var _=i.base!==void 0?i.base:1,v=[lu(i),_===1?["linear"]:["exponential",_],["number",o]],y=0,x=e;y<x.length;y+=1){var k=x[y];Xo(v,k[0],k[1],!1)}return i.default===void 0?v:["case",["==",["typeof",o],"number"],v,qr(i.default)]}else throw new Error("Unknown property function type "+n)}function Zx(i,t,e,n){n===void 0&&(n=["zoom"]);var o=du(i,t),r,s=!1;if(o==="interval")r=["step",n],s=!0;else if(o==="exponential"){var a=i.base!==void 0?i.base:1;r=[lu(i),a===1?["linear"]:["exponential",a],n]}else throw new Error('Unknown zoom function type "'+o+'"');for(var l=0,h=e;l<h.length;l+=1){var u=h[l];Xo(r,u[0],u[1],s)}return uu(r),r}function uu(i){i[0]==="step"&&i.length===3&&(i.push(0),i.push(i[3]))}function Xo(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 Kx(i){for(var t=["concat"],e=/{([^{}]+)}/g,n=0,o=e.exec(i);o!==null;o=e.exec(i)){var r=i.slice(n,e.lastIndex-o[0].length);n=e.lastIndex,r.length>0&&t.push(r),t.push(["get",o[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 gi=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),$r=function(t,e){e===void 0&&(e=[]),this.parent=t,this.bindings={};for(var n=0,o=e;n<o.length;n+=1){var r=o[n],s=r[0],a=r[1];this.bindings[s]=a}};$r.prototype.concat=function(t){return new $r(this,t)},$r.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.")},$r.prototype.has=function(t){return this.bindings[t]?!0:this.parent?this.parent.has(t):!1};var Ra={kind:"null"},L={kind:"number"},vt={kind:"string"},ht={kind:"boolean"},Li={kind:"color"},Yo={kind:"object"},ut={kind:"value"},Hx={kind:"error"},Aa={kind:"collator"},Pa={kind:"formatted"},Zr={kind:"resolvedImage"};function He(i,t){return{kind:"array",itemType:i,N:t}}function Xt(i){if(i.kind==="array"){var t=Xt(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,vt,ht,Li,Pa,Yo,He(ut),Zr];function Kr(i,t){if(t.kind==="error")return null;if(i.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!Kr(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 o=n[e];if(!Kr(o,t))return null}}return"Expected "+Xt(i)+" but found "+Xt(t)+" instead."}function cu(i,t){return t.some(function(e){return e.kind===i.kind})}function Hr(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 Qr=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"})};Qr.prototype.compare=function(t,e){return this.collator.compare(t,e)},Qr.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var fu=function(t,e,n,o,r){this.text=t.normalize?t.normalize():t,this.image=e,this.scale=n,this.fontStack=o,this.textColor=r},Le=function(t){this.sections=t};Le.fromString=function(t){return new Le([new fu(t,null,null,null,null)])},Le.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})},Le.factory=function(t){return t instanceof Le?t:Le.fromString(t)},Le.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(t){return t.text}).join("")},Le.prototype.serialize=function(){for(var t=["format"],e=0,n=this.sections;e<n.length;e+=1){var o=n[e];if(o.image){t.push(["image",o.image.name]);continue}t.push(o.text);var r={};o.fontStack&&(r["text-font"]=["literal",o.fontStack.split(",")]),o.scale&&(r["font-scale"]=o.scale),o.textColor&&(r["text-color"]=["rgba"].concat(o.textColor.toArray())),t.push(r)}return t};var mi=function(t){this.name=t.name,this.available=t.available};mi.prototype.toString=function(){return this.name},mi.fromString=function(t){return t?new mi({name:t,available:!1}):null},mi.prototype.serialize=function(){return["image",this.name]};function pg(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 o=typeof n=="number"?[i,t,e,n]:[i,t,e];return"Invalid rgba value ["+o.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 Da(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 Qr)return!0;if(i instanceof Le)return!0;if(i instanceof mi)return!0;if(Array.isArray(i)){for(var t=0,e=i;t<e.length;t+=1){var n=e[t];if(!Da(n))return!1}return!0}else if(typeof i=="object"){for(var o in i)if(!Da(i[o]))return!1;return!0}else return!1}function ie(i){if(i===null)return Ra;if(typeof i=="string")return vt;if(typeof i=="boolean")return ht;if(typeof i=="number")return L;if(i instanceof Rt)return Li;if(i instanceof Qr)return Aa;if(i instanceof Le)return Pa;if(i instanceof mi)return Zr;if(Array.isArray(i)){for(var t=i.length,e,n=0,o=i;n<o.length;n+=1){var r=o[n],s=ie(r);if(!e)e=s;else{if(e===s)continue;e=ut;break}}return He(e||ut,t)}else return Yo}function Jr(i){var t=typeof i;return i===null?"":t==="string"||t==="number"||t==="boolean"?String(i):i instanceof Rt||i instanceof Le||i instanceof mi?i.toString():JSON.stringify(i)}var pi=function(t,e){this.type=t,this.value=e};pi.parse=function(t,e){if(t.length!==2)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!Da(t[1]))return e.error("invalid value");var n=t[1],o=ie(n),r=e.expectedType;return o.kind==="array"&&o.N===0&&r&&r.kind==="array"&&(typeof r.N!="number"||r.N===0)&&(o=r),new pi(o,n)},pi.prototype.evaluate=function(){return this.value},pi.prototype.eachChild=function(){},pi.prototype.outputDefined=function(){return!0},pi.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 Le?this.value.serialize():this.value};var le=function(t){this.name="ExpressionEvaluationError",this.message=t};le.prototype.toJSON=function(){return this.message};var gu={string:vt,number:L,boolean:ht,object:Yo},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,o,r=t[0];if(r==="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=ut;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++}o=He(s,l)}else o=gu[r];for(var h=[];n<t.length;n++){var u=e.parse(t[n],n,ut);if(!u)return null;h.push(u)}return new Ee(o,h)},Ee.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var n=this.args[e].evaluate(t),o=Kr(this.type,ie(n));if(o){if(e===this.args.length-1)throw new le("Expected value to be of type "+Xt(this.type)+", but found "+Xt(ie(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 o=t.N;(typeof o=="number"||this.args.length>1)&&e.push(o)}}return e.concat(this.args.map(function(r){return r.serialize()}))};var mn=function(t){this.type=Pa,this.sections=t};mn.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 o=[],r=!1,s=1;s<=t.length-1;++s){var a=t[s];if(r&&typeof a=="object"&&!Array.isArray(a)){r=!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,He(vt)),!h))return null;var u=null;if(a["text-color"]&&(u=e.parse(a["text-color"],1,Li),!u))return null;var d=o[o.length-1];d.scale=l,d.font=h,d.textColor=u}else{var c=e.parse(t[s],1,ut);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'.");r=!0,o.push({content:c,scale:null,font:null,textColor:null})}}return new mn(o)},mn.prototype.evaluate=function(t){var e=function(n){var o=n.content.evaluate(t);return ie(o)===Zr?new fu("",o,null,null,null):new fu(Jr(o),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 Le(this.sections.map(e))},mn.prototype.eachChild=function(t){for(var e=0,n=this.sections;e<n.length;e+=1){var o=n[e];t(o.content),o.scale&&t(o.scale),o.font&&t(o.font),o.textColor&&t(o.textColor)}},mn.prototype.outputDefined=function(){return!1},mn.prototype.serialize=function(){for(var t=["format"],e=0,n=this.sections;e<n.length;e+=1){var o=n[e];t.push(o.content.serialize());var r={};o.scale&&(r["font-scale"]=o.scale.serialize()),o.font&&(r["text-font"]=o.font.serialize()),o.textColor&&(r["text-color"]=o.textColor.serialize()),t.push(r)}return t};var pn=function(t){this.type=Zr,this.input=t};pn.parse=function(t,e){if(t.length!==2)return e.error("Expected two arguments.");var n=e.parse(t[1],1,vt);return n?new pn(n):e.error("No image name provided.")},pn.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=mi.fromString(e);return n&&t.availableImages&&(n.available=t.availableImages.indexOf(e)>-1),n},pn.prototype.eachChild=function(t){t(this.input)},pn.prototype.outputDefined=function(){return!1},pn.prototype.serialize=function(){return["image",this.input.serialize()]};var Jx={"to-boolean":ht,"to-color":Li,"to-number":L,"to-string":vt},Qe=function(t,e){this.type=t,this.args=e};Qe.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 o=Jx[n],r=[],s=1;s<t.length;s++){var a=e.parse(t[s],s,ut);if(!a)return null;r.push(a)}return new Qe(o,r)},Qe.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,o=0,r=this.args;o<r.length;o+=1){var s=r[o];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=pg(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 le(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 le("Could not convert "+JSON.stringify(l)+" to number.")}else return this.type.kind==="formatted"?Le.fromString(Jr(this.args[0].evaluate(t))):this.type.kind==="resolvedImage"?mi.fromString(Jr(this.args[0].evaluate(t))):Jr(this.args[0].evaluate(t))},Qe.prototype.eachChild=function(t){this.args.forEach(t)},Qe.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},Qe.prototype.serialize=function(){if(this.type.kind==="formatted")return new mn([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new pn(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"],Oi=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};Oi.prototype.id=function(){return this.feature&&"id"in this.feature&&this.feature.id?this.feature.id:null},Oi.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?tb[this.feature.type]:this.feature.type:null},Oi.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Oi.prototype.canonicalID=function(){return this.canonical},Oi.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Oi.prototype.distanceFromCenter=function(){if(this.featureTileCoord&&this.featureDistanceData){var t=this.featureDistanceData.center,e=this.featureDistanceData.scale,n=this.featureTileCoord,o=n.x,r=n.y,s=o*e-t[0],a=r*e-t[1],l=this.featureDistanceData.bearing[0],h=this.featureDistanceData.bearing[1],u=l*s+h*a;return u}return 0},Oi.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=Rt.parse(t)),e};var ve=function(t,e,n,o){this.name=t,this.type=e,this._evaluate=n,this.args=o};ve.prototype.evaluate=function(t){return this._evaluate(t,this.args)},ve.prototype.eachChild=function(t){this.args.forEach(t)},ve.prototype.outputDefined=function(){return!1},ve.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},ve.parse=function(t,e){var n,o=t[0],r=ve.definitions[o];if(!r)return e.error('Unknown expression "'+o+'". If you wanted a literal array, use ["literal", [...]].',0);for(var s=Array.isArray(r)?r[0]:r.type,a=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,l=a.filter(function(A){var lt=A[0];return!Array.isArray(lt)||lt.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 xn(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 ve(o,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(A){var lt=A[0];return eb(lt)}).join(" | "),z=[],P=1;P<t.length;P++){var j=e.parse(t[P],1+z.length);if(!j)return null;z.push(Xt(j.type))}e.error("Expected arguments of type "+S+", but found ("+z.join(", ")+") instead.")}return null},ve.register=function(t,e){ve.definitions=e;for(var n in e)t[n]=ve};function eb(i){return Array.isArray(i)?"("+i.map(Xt).join(", ")+")":"("+Xt(i.type)+"...)"}var vn=function(t,e,n){this.type=Aa,this.locale=n,this.caseSensitive=t,this.diacriticSensitive=e};vn.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 o=e.parse(n["case-sensitive"]===void 0?!1:n["case-sensitive"],1,ht);if(!o)return null;var r=e.parse(n["diacritic-sensitive"]===void 0?!1:n["diacritic-sensitive"],1,ht);if(!r)return null;var s=null;return n.locale&&(s=e.parse(n.locale,1,vt),!s)?null:new vn(o,r,s)},vn.prototype.evaluate=function(t){return new Qr(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},vn.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},vn.prototype.outputDefined=function(){return!1},vn.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 _n=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 La(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=ib(i[0]),n=nb(i[1]),o=Math.pow(2,t.z);return[Math.round(e*o*_n),Math.round(n*o*_n)]}function rb(i,t,e){var n=i[0]-t[0],o=i[1]-t[1],r=i[0]-e[0],s=i[1]-e[1];return n*s-r*o===0&&n*r<=0&&o*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,o=t.length;n<o;n++)for(var r=t[n],s=0,a=r.length;s<a-1;s++){if(rb(i,r[s],r[s+1]))return!1;sb(i,r[s],r[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 vg(i,t,e,n){var o=i[0]-e[0],r=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=o*h-l*r,d=s*h-l*a;return u>0&&d<0||u<0&&d>0}function hb(i,t,e,n){var o=[t[0]-i[0],t[1]-i[1]],r=[n[0]-e[0],n[1]-e[1]];return lb(r,o)===0?!1:!!(vg(i,t,e,n)&&vg(e,n,i,t))}function ub(i,t,e){for(var n=0,o=e;n<o.length;n+=1)for(var r=o[n],s=0;s<r.length-1;++s)if(hb(i,t,r[s],r[s+1]))return!0;return!1}function _g(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(_g(i,t[e]))return!0;return!1}function vu(i,t,e){for(var n=[],o=0;o<i.length;o++){for(var r=[],s=0;s<i[o].length;s++){var a=ob(i[o][s],e);mu(t,a),r.push(a)}n.push(r)}return n}function yg(i,t,e){for(var n=[],o=0;o<i.length;o++){var r=vu(i[o],t,e);n.push(r)}return n}function xg(i,t,e,n){if(i[0]<e[0]||i[0]>e[2]){var o=n*.5,r=i[0]-e[0]>o?-n:e[0]-i[0]>o?n:0;r===0&&(r=i[0]-e[2]>o?-n:e[2]-i[0]>o?n:0),i[0]+=r}mu(t,i)}function cb(i){i[0]=i[1]=1/0,i[2]=i[3]=-1/0}function bg(i,t,e,n){var o=Math.pow(2,n.z)*_n,r=[n.x*_n,n.y*_n],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+r[0],c.y+r[1]];xg(f,t,e,o),s.push(f)}return s}function kg(i,t,e,n){var o=Math.pow(2,n.z)*_n,r=[n.x*_n,n.y*_n],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+r[0],f.y+r[1]];mu(t,g),u.push(g)}s.push(u)}if(t[2]-t[0]<=o/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];xg(x,t,e,o)}}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],o=i.canonicalID();if(!o)return!1;if(t.type==="Polygon"){var r=vu(t.coordinates,n,o),s=bg(i.geometry(),e,n,o);if(!La(e,n))return!1;for(var a=0,l=s;a<l.length;a+=1){var h=l[a];if(!pu(h,r))return!1}}if(t.type==="MultiPolygon"){var u=yg(t.coordinates,n,o),d=bg(i.geometry(),e,n,o);if(!La(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],o=i.canonicalID();if(!o)return!1;if(t.type==="Polygon"){var r=vu(t.coordinates,n,o),s=kg(i.geometry(),e,n,o);if(!La(e,n))return!1;for(var a=0,l=s;a<l.length;a+=1){var h=l[a];if(!_g(h,r))return!1}}if(t.type==="MultiPolygon"){var u=yg(t.coordinates,n,o),d=kg(i.geometry(),e,n,o);if(!La(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 si=function(t,e){this.type=ht,this.geojson=t,this.geometries=e};si.parse=function(t,e){if(t.length!==2)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(Da(t[1])){var n=t[1];if(n.type==="FeatureCollection")for(var o=0;o<n.features.length;++o){var r=n.features[o].geometry.type;if(r==="Polygon"||r==="MultiPolygon")return new si(n,n.features[o].geometry)}else if(n.type==="Feature"){var s=n.geometry.type;if(s==="Polygon"||s==="MultiPolygon")return new si(n,n.geometry)}else if(n.type==="Polygon"||n.type==="MultiPolygon")return new si(n,n)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")},si.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},si.prototype.eachChild=function(){},si.prototype.outputDefined=function(){return!0},si.prototype.serialize=function(){return["within",this.geojson]};function Oa(i){if(i instanceof ve){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 si)return!1;var t=!0;return i.eachChild(function(e){t&&!Oa(e)&&(t=!1)}),t}function _u(i){if(i instanceof ve&&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 ve&&t.indexOf(i.name)>=0)return!1;var e=!0;return i.eachChild(function(n){e&&!yu(n,t)&&(e=!1)}),e}var yn=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};yn.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 yn(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)},yn.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},yn.prototype.eachChild=function(){},yn.prototype.outputDefined=function(){return!1},yn.prototype.serialize=function(){return["var",this.name]};var xn=function(t,e,n,o,r){e===void 0&&(e=[]),o===void 0&&(o=new $r),r===void 0&&(r=[]),this.registry=t,this.path=e,this.key=e.map(function(s){return"["+s+"]"}).join(""),this.scope=o,this.errors=r,this.expectedType=n};xn.prototype.parse=function(t,e,n,o,r){return r===void 0&&(r={}),e?this.concat(e,n,o)._parse(t,r):this._parse(t,r)},xn.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 Qe(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 o=t[0];if(typeof o!="string")return this.error("Expression name must be a string, but found "+typeof o+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var r=this.registry[o];if(r){var s=r.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 pi)&&s.type.kind!=="resolvedImage"&&xu(s)){var h=new Oi;try{s=new pi(s.type,s.evaluate(h))}catch(u){return this.error(u.message),null}}return s}return this.error('Unknown expression "'+o+'". 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.")},xn.prototype.concat=function(t,e,n){var o=typeof t=="number"?this.path.concat(t):this.path,r=n?this.scope.concat(n):this.scope;return new xn(this.registry,o,e||null,r,this.errors)},xn.prototype.error=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var o=""+this.key+e.map(function(r){return"["+r+"]"}).join("");this.errors.push(new gi(o,t))},xn.prototype.checkSubtype=function(t,e){var n=Kr(t,e);return n&&this.error(n),n};function xu(i){if(i instanceof yn)return xu(i.boundExpression);if(i instanceof ve&&i.name==="error")return!1;if(i instanceof vn)return!1;if(i instanceof si)return!1;var t=i instanceof Qe||i instanceof Ee,e=!0;return i.eachChild(function(n){t?e=e&&xu(n):e=e&&n instanceof pi}),e?Oa(i)&&yu(i,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"]):!1}function wg(i,t){for(var e=i.length-1,n=0,o=e,r=0,s,a;n<=o;)if(r=Math.floor((n+o)/2),s=i[r],a=i[r+1],s<=t){if(r===e||t<a)return r;n=r+1}else if(s>t)o=r-1;else throw new le("Input is not a number.");return 0}var bn=function(t,e,n){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var o=0,r=n;o<r.length;o+=1){var s=r[o],a=s[0],l=s[1];this.labels.push(a),this.outputs.push(l)}};bn.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 o=[],r=null;e.expectedType&&e.expectedType.kind!=="value"&&(r=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(o.length&&o[o.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,r);if(!d)return null;r=r||d.type,o.push([a,d])}return new bn(r,n,o)},bn.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(e.length===1)return n[0].evaluate(t);var o=this.input.evaluate(t);if(o<=e[0])return n[0].evaluate(t);var r=e.length;if(o>=e[r-1])return n[r-1].evaluate(t);var s=wg(e,o);return n[s].evaluate(t)},bn.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e<n.length;e+=1){var o=n[e];t(o)}},bn.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},bn.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=qo;function qo(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}qo.prototype.sampleCurveX=function(i){return((this.ax*i+this.bx)*i+this.cx)*i},qo.prototype.sampleCurveY=function(i){return((this.ay*i+this.by)*i+this.cy)*i},qo.prototype.sampleCurveDerivativeX=function(i){return(3*this.ax*i+2*this.bx)*i+this.cx},qo.prototype.solveCurveX=function(i,t){typeof t>"u"&&(t=1e-6);var e,n,o,r,s;for(o=i,s=0;s<8;s++){if(r=this.sampleCurveX(o)-i,Math.abs(r)<t)return o;var a=this.sampleCurveDerivativeX(o);if(Math.abs(a)<1e-6)break;o=o-r/a}if(e=0,n=1,o=i,o<e)return e;if(o>n)return n;for(;e<n;){if(r=this.sampleCurveX(o),Math.abs(r-i)<t)return o;i>r?e=o:n=o,o=(n-e)*.5+e}return o},qo.prototype.solve=function(i,t){return this.sampleCurveY(this.solveCurveX(i,t))};function We(i,t,e){return i*(1-e)+t*e}function pb(i,t,e){return new Rt(We(i.r,t.r,e),We(i.g,t.g,e),We(i.b,t.b,e),We(i.a,t.a,e))}function vb(i,t,e){return i.map(function(n,o){return We(n,t[o],e)})}var _b=Object.freeze({__proto__:null,number:We,color:pb,array:vb}),Mg=.95047,Cg=1,Eg=1.08883,Sg=4/29,$o=6/29,Tg=3*$o*$o,yb=$o*$o*$o,xb=Math.PI/180,bb=180/Math.PI;function bu(i){return i>yb?Math.pow(i,1/3):i/Tg+Sg}function ku(i){return i>$o?i*i*i:Tg*(i-Sg)}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 Ig(i){var t=Mu(i.r),e=Mu(i.g),n=Mu(i.b),o=bu((.4124564*t+.3575761*e+.1804375*n)/Mg),r=bu((.2126729*t+.7151522*e+.072175*n)/Cg),s=bu((.0193339*t+.119192*e+.9503041*n)/Eg);return{l:116*r-16,a:500*(o-r),b:200*(r-s),alpha:i.a}}function zg(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=Cg*ku(t),e=Mg*ku(e),n=Eg*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 kb(i,t,e){return{l:We(i.l,t.l,e),a:We(i.a,t.a,e),b:We(i.b,t.b,e),alpha:We(i.alpha,t.alpha,e)}}function wb(i){var t=Ig(i),e=t.l,n=t.a,o=t.b,r=Math.atan2(o,n)*bb;return{h:r<0?r+360:r,c:Math.sqrt(n*n+o*o),l:e,alpha:i.a}}function Mb(i){var t=i.h*xb,e=i.c,n=i.l;return zg({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 Eb(i,t,e){return{h:Cb(i.h,t.h,e),c:We(i.c,t.c,e),l:We(i.l,t.l,e),alpha:We(i.alpha,t.alpha,e)}}var Fa={forward:Ig,reverse:zg,interpolate:kb},Na={forward:wb,reverse:Mb,interpolate:Eb},Se=function(t,e,n,o,r){this.type=t,this.operator=e,this.interpolation=n,this.input=o,this.labels=[],this.outputs=[];for(var s=0,a=r;s<a.length;s+=1){var l=a[s],h=l[0],u=l[1];this.labels.push(h),this.outputs.push(u)}};Se.interpolationFactor=function(t,e,n,o){var r=0;if(t.name==="exponential")r=Cu(e,t.base,n,o);else if(t.name==="linear")r=Cu(e,1,n,o);else if(t.name==="cubic-bezier"){var s=t.controlPoints,a=new mb(s[0],s[1],s[2],s[3]);r=a.solve(Cu(e,1,n,o))}return r},Se.parse=function(t,e){var n=t[0],o=t[1],r=t[2],s=t.slice(3);if(!Array.isArray(o)||o.length===0)return e.error("Expected an interpolation type expression.",1);if(o[0]==="linear")o={name:"linear"};else if(o[0]==="exponential"){var a=o[1];if(typeof a!="number")return e.error("Exponential interpolation requires a numeric base.",1,1);o={name:"exponential",base:a}}else if(o[0]==="cubic-bezier"){var l=o.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);o={name:"cubic-bezier",controlPoints:l}}else return e.error("Unknown interpolation type "+String(o[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(r=e.parse(r,2,L),!r)return null;var h=[],u=null;n==="interpolate-hcl"||n==="interpolate-lab"?u=Li: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 "+Xt(u)+" is not interpolatable."):new Se(u,n,o,r,h)},Se.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(e.length===1)return n[0].evaluate(t);var o=this.input.evaluate(t);if(o<=e[0])return n[0].evaluate(t);var r=e.length;if(o>=e[r-1])return n[r-1].evaluate(t);var s=wg(e,o),a=e[s],l=e[s+1],h=Se.interpolationFactor(this.interpolation,o,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"?Na.reverse(Na.interpolate(Na.forward(u),Na.forward(d),h)):Fa.reverse(Fa.interpolate(Fa.forward(u),Fa.forward(d),h))},Se.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e<n.length;e+=1){var o=n[e];t(o)}},Se.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},Se.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 Cu(i,t,e,n){var o=n-e,r=i-e;return o===0?0:t===1?r/o:(Math.pow(t,r)-1)/(Math.pow(t,o)-1)}var Fi=function(t,e){this.type=t,this.args=e};Fi.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var n=null,o=e.expectedType;o&&o.kind!=="value"&&(n=o);for(var r=[],s=0,a=t.slice(1);s<a.length;s+=1){var l=a[s],h=e.parse(l,1+r.length,n,void 0,{typeAnnotation:"omit"});if(!h)return null;n=n||h.type,r.push(h)}var u=o&&r.some(function(d){return Kr(o,d.type)});return u?new Fi(ut,r):new Fi(n,r)},Fi.prototype.evaluate=function(t){for(var e=null,n=0,o,r=0,s=this.args;r<s.length;r+=1){var a=s[r];if(n++,e=a.evaluate(t),e&&e instanceof mi&&!e.available&&(o||(o=e),e=null,n===this.args.length))return o;if(e!==null)break}return e},Fi.prototype.eachChild=function(t){this.args.forEach(t)},Fi.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},Fi.prototype.serialize=function(){var t=["coalesce"];return this.eachChild(function(e){t.push(e.serialize())}),t};var kn=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};kn.prototype.evaluate=function(t){return this.result.evaluate(t)},kn.prototype.eachChild=function(t){for(var e=0,n=this.bindings;e<n.length;e+=1){var o=n[e];t(o[1])}t(this.result)},kn.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=[],o=1;o<t.length-1;o+=2){var r=t[o];if(typeof r!="string")return e.error("Expected string, but found "+typeof r+" instead.",o);if(/[^a-zA-Z0-9_]/.test(r))return e.error("Variable names must contain only alphanumeric characters or '_'.",o);var s=e.parse(t[o+1],o+1);if(!s)return null;n.push([r,s])}var a=e.parse(t[t.length-1],t.length-1,e.expectedType,n);return a?new kn(n,a):null},kn.prototype.outputDefined=function(){return this.result.outputDefined()},kn.prototype.serialize=function(){for(var t=["let"],e=0,n=this.bindings;e<n.length;e+=1){var o=n[e],r=o[0],s=o[1];t.push(r,s.serialize())}return t.push(this.result.serialize()),t};var io=function(t,e,n){this.type=t,this.index=e,this.input=n};io.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),o=e.parse(t[2],2,He(e.expectedType||ut));if(!n||!o)return null;var r=o.type;return new io(r.itemType,n,o)},io.prototype.evaluate=function(t){var e=this.index.evaluate(t),n=this.input.evaluate(t);if(e<0)throw new le("Array index out of bounds: "+e+" < 0.");if(e>=n.length)throw new le("Array index out of bounds: "+e+" > "+(n.length-1)+".");if(e!==Math.floor(e))throw new le("Array index must be an integer, but found "+e+" instead.");return n[e]},io.prototype.eachChild=function(t){t(this.index),t(this.input)},io.prototype.outputDefined=function(){return!1},io.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var no=function(t,e){this.type=ht,this.needle=t,this.haystack=e};no.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,ut),o=e.parse(t[2],2,ut);return!n||!o?null:cu(n.type,[ht,vt,L,Ra,ut])?new no(n,o):e.error("Expected first argument to be of type boolean, string, number or null, but found "+Xt(n.type)+" instead")},no.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(n==null)return!1;if(!Hr(e,["boolean","string","number","null"]))throw new le("Expected first argument to be of type boolean, string, number or null, but found "+Xt(ie(e))+" instead.");if(!Hr(n,["string","array"]))throw new le("Expected second argument to be of type array or string, but found "+Xt(ie(n))+" instead.");return n.indexOf(e)>=0},no.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},no.prototype.outputDefined=function(){return!0},no.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var wn=function(t,e,n){this.type=L,this.needle=t,this.haystack=e,this.fromIndex=n};wn.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,ut),o=e.parse(t[2],2,ut);if(!n||!o)return null;if(!cu(n.type,[ht,vt,L,Ra,ut]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+Xt(n.type)+" instead");if(t.length===4){var r=e.parse(t[3],3,L);return r?new wn(n,o,r):null}else return new wn(n,o)},wn.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!Hr(e,["boolean","string","number","null"]))throw new le("Expected first argument to be of type boolean, string, number or null, but found "+Xt(ie(e))+" instead.");if(!Hr(n,["string","array"]))throw new le("Expected second argument to be of type array or string, but found "+Xt(ie(n))+" instead.");if(this.fromIndex){var o=this.fromIndex.evaluate(t);return n.indexOf(e,o)}return n.indexOf(e)},wn.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},wn.prototype.outputDefined=function(){return!1},wn.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 oo=function(t,e,n,o,r,s){this.inputType=t,this.type=e,this.input=n,this.cases=o,this.outputs=r,this.otherwise=s};oo.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,o;e.expectedType&&e.expectedType.kind!=="value"&&(o=e.expectedType);for(var r={},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=ie(f);else if(u.checkSubtype(n,ie(f)))return null;if(typeof r[String(f)]<"u")return u.error("Branch labels must be unique.");r[String(f)]=s.length}var g=e.parse(h,a,o);if(!g)return null;o=o||g.type,s.push(g)}var m=e.parse(t[1],1,ut);if(!m)return null;var p=e.parse(t[t.length-1],t.length-1,o);return!p||m.type.kind!=="value"&&e.concat(1).checkSubtype(n,m.type)?null:new oo(n,o,m,r,s,p)},oo.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=ie(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise;return n.evaluate(t)},oo.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},oo.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})&&this.otherwise.outputDefined()},oo.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],n=Object.keys(this.cases).sort(),o=[],r={},s=0,a=n;s<a.length;s+=1){var l=a[s],h=r[this.cases[l]];h===void 0?(r[this.cases[l]]=o.length,o.push([this.cases[l],[l]])):o[h][1].push(l)}for(var u=function(m){return t.inputType.kind==="number"?Number(m):m},d=0,c=o;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 ro=function(t,e,n){this.type=t,this.branches=e,this.otherwise=n};ro.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 o=[],r=1;r<t.length-1;r+=2){var s=e.parse(t[r],r,ht);if(!s)return null;var a=e.parse(t[r+1],r+1,n);if(!a)return null;o.push([s,a]),n=n||a.type}var l=e.parse(t[t.length-1],t.length-1,n);return l?new ro(n,o,l):null},ro.prototype.evaluate=function(t){for(var e=0,n=this.branches;e<n.length;e+=1){var o=n[e],r=o[0],s=o[1];if(r.evaluate(t))return s.evaluate(t)}return this.otherwise.evaluate(t)},ro.prototype.eachChild=function(t){for(var e=0,n=this.branches;e<n.length;e+=1){var o=n[e],r=o[0],s=o[1];t(r),t(s)}t(this.otherwise)},ro.prototype.outputDefined=function(){return this.branches.every(function(t){t[0];var e=t[1];return e.outputDefined()})&&this.otherwise.outputDefined()},ro.prototype.serialize=function(){var t=["case"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Mn=function(t,e,n,o){this.type=t,this.input=e,this.beginIndex=n,this.endIndex=o};Mn.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,ut),o=e.parse(t[2],2,L);if(!n||!o)return null;if(!cu(n.type,[He(ut),vt,ut]))return e.error("Expected first argument to be of type array or string, but found "+Xt(n.type)+" instead");if(t.length===4){var r=e.parse(t[3],3,L);return r?new Mn(n.type,n,o,r):null}else return new Mn(n.type,n,o)},Mn.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=this.beginIndex.evaluate(t);if(!Hr(e,["string","array"]))throw new le("Expected first argument to be of type array or string, but found "+Xt(ie(e))+" instead.");if(this.endIndex){var o=this.endIndex.evaluate(t);return e.slice(n,o)}return e.slice(n)},Mn.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},Mn.prototype.outputDefined=function(){return!1},Mn.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 Rg(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 Ib(i,t,e){return t<e}function zb(i,t,e){return t>e}function Rb(i,t,e){return t<=e}function Ab(i,t,e){return t>=e}function Ag(i,t,e,n){return n.compare(t,e)===0}function Pb(i,t,e,n){return!Ag(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 Ob(i,t,e,n){return n.compare(t,e)<=0}function Fb(i,t,e,n){return n.compare(t,e)>=0}function Zo(i,t,e){var n=i!=="=="&&i!=="!=";return function(){function o(r,s,a){this.type=ht,this.lhs=r,this.rhs=s,this.collator=a,this.hasUntypedArgument=r.type.kind==="value"||s.type.kind==="value"}return o.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,ut);if(!h)return null;if(!Rg(l,h.type))return a.concat(1).error('"'+l+`" comparisons are not supported for type '`+Xt(h.type)+"'.");var u=a.parse(s[2],2,ut);if(!u)return null;if(!Rg(l,u.type))return a.concat(2).error('"'+l+`" comparisons are not supported for type '`+Xt(u.type)+"'.");if(h.type.kind!==u.type.kind&&h.type.kind!=="value"&&u.type.kind!=="value")return a.error("Cannot compare types '"+Xt(h.type)+"' and '"+Xt(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,Aa),!d)return null}return new o(h,u,d)},o.prototype.evaluate=function(s){var a=this.lhs.evaluate(s),l=this.rhs.evaluate(s);if(n&&this.hasUntypedArgument){var h=ie(a),u=ie(l);if(h.kind!==u.kind||!(h.kind==="string"||h.kind==="number"))throw new le('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=ie(a),c=ie(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)},o.prototype.eachChild=function(s){s(this.lhs),s(this.rhs),this.collator&&s(this.collator)},o.prototype.outputDefined=function(){return!0},o.prototype.serialize=function(){var s=[i];return this.eachChild(function(a){s.push(a.serialize())}),s},o}()}var Nb=Zo("==",Sb,Ag),Gb=Zo("!=",Tb,Pb),jb=Zo("<",Ib,Db),Bb=Zo(">",zb,Lb),Ub=Zo("<=",Rb,Ob),Wb=Zo(">=",Ab,Fb),so=function(t,e,n,o,r){this.type=vt,this.number=t,this.locale=e,this.currency=n,this.minFractionDigits=o,this.maxFractionDigits=r};so.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 o=t[2];if(typeof o!="object"||Array.isArray(o))return e.error("NumberFormat options argument must be an object.");var r=null;if(o.locale&&(r=e.parse(o.locale,1,vt),!r))return null;var s=null;if(o.currency&&(s=e.parse(o.currency,1,vt),!s))return null;var a=null;if(o["min-fraction-digits"]&&(a=e.parse(o["min-fraction-digits"],1,L),!a))return null;var l=null;return o["max-fraction-digits"]&&(l=e.parse(o["max-fraction-digits"],1,L),!l)?null:new so(n,r,s,a,l)},so.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))},so.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)},so.prototype.outputDefined=function(){return!1},so.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 ao=function(t){this.type=L,this.input=t};ao.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 "+Xt(n.type)+" instead."):new ao(n):null},ao.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 le("Expected value to be of type string or array, but found "+Xt(ie(e))+" instead.")},ao.prototype.eachChild=function(t){t(this.input)},ao.prototype.outputDefined=function(){return!1},ao.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Eu={"==":Nb,"!=":Gb,">":Bb,"<":jb,">=":Wb,"<=":Ub,array:Ee,at:io,boolean:Ee,case:ro,coalesce:Fi,collator:vn,format:mn,image:pn,in:no,"index-of":wn,interpolate:Se,"interpolate-hcl":Se,"interpolate-lab":Se,length:ao,let:kn,literal:pi,match:oo,number:Ee,"number-format":so,object:Ee,slice:Mn,step:bn,string:Ee,"to-boolean":Qe,"to-color":Qe,"to-number":Qe,"to-string":Qe,var:yn,within:si};function Pg(i,t){var e=t[0],n=t[1],o=t[2],r=t[3];e=e.evaluate(i),n=n.evaluate(i),o=o.evaluate(i);var s=r?r.evaluate(i):1,a=pg(e,n,o,s);if(a)throw new le(a);return new Rt(e/255*s,n/255*s,o/255*s,s)}function Dg(i,t){return i in t}function Su(i,t){var e=t[i];return typeof e>"u"?null:e}function Vb(i,t,e,n){for(;e<=n;){var o=e+n>>1;if(t[o]===i)return!0;t[o]>i?n=o-1:e=o+1}return!1}function lo(i){return{type:i}}ve.register(Eu,{error:[Hx,[vt],function(i,t){var e=t[0];throw new le(e.evaluate(i))}],typeof:[vt,[ut],function(i,t){var e=t[0];return Xt(ie(e.evaluate(i)))}],"to-rgba":[He(L,4),[Li],function(i,t){var e=t[0];return e.evaluate(i).toArray()}],rgb:[Li,[L,L,L],Pg],rgba:[Li,[L,L,L,L],Pg],has:{type:ht,overloads:[[[vt],function(i,t){var e=t[0];return Dg(e.evaluate(i),i.properties())}],[[vt,Yo],function(i,t){var e=t[0],n=t[1];return Dg(e.evaluate(i),n.evaluate(i))}]]},get:{type:ut,overloads:[[[vt],function(i,t){var e=t[0];return Su(e.evaluate(i),i.properties())}],[[vt,Yo],function(i,t){var e=t[0],n=t[1];return Su(e.evaluate(i),n.evaluate(i))}]]},"feature-state":[ut,[vt],function(i,t){var e=t[0];return Su(e.evaluate(i),i.featureState||{})}],properties:[Yo,[],function(i){return i.properties()}],"geometry-type":[vt,[],function(i){return i.geometryType()}],id:[ut,[],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:[ut,[],function(i){return i.globals.accumulated===void 0?null:i.globals.accumulated}],"+":[L,lo(L),function(i,t){for(var e=0,n=0,o=t;n<o.length;n+=1){var r=o[n];e+=r.evaluate(i)}return e}],"*":[L,lo(L),function(i,t){for(var e=1,n=0,o=t;n<o.length;n+=1){var r=o[n];e*=r.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,lo(L),function(i,t){return Math.min.apply(Math,t.map(function(e){return e.evaluate(i)}))}],max:[L,lo(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-==":[ht,[vt,ut],function(i,t){var e=t[0],n=t[1];return i.properties()[e.value]===n.value}],"filter-id-==":[ht,[ut],function(i,t){var e=t[0];return i.id()===e.value}],"filter-type-==":[ht,[vt],function(i,t){var e=t[0];return i.geometryType()===e.value}],"filter-<":[ht,[vt,ut],function(i,t){var e=t[0],n=t[1],o=i.properties()[e.value],r=n.value;return typeof o==typeof r&&o<r}],"filter-id-<":[ht,[ut],function(i,t){var e=t[0],n=i.id(),o=e.value;return typeof n==typeof o&&n<o}],"filter->":[ht,[vt,ut],function(i,t){var e=t[0],n=t[1],o=i.properties()[e.value],r=n.value;return typeof o==typeof r&&o>r}],"filter-id->":[ht,[ut],function(i,t){var e=t[0],n=i.id(),o=e.value;return typeof n==typeof o&&n>o}],"filter-<=":[ht,[vt,ut],function(i,t){var e=t[0],n=t[1],o=i.properties()[e.value],r=n.value;return typeof o==typeof r&&o<=r}],"filter-id-<=":[ht,[ut],function(i,t){var e=t[0],n=i.id(),o=e.value;return typeof n==typeof o&&n<=o}],"filter->=":[ht,[vt,ut],function(i,t){var e=t[0],n=t[1],o=i.properties()[e.value],r=n.value;return typeof o==typeof r&&o>=r}],"filter-id->=":[ht,[ut],function(i,t){var e=t[0],n=i.id(),o=e.value;return typeof n==typeof o&&n>=o}],"filter-has":[ht,[ut],function(i,t){var e=t[0];return e.value in i.properties()}],"filter-has-id":[ht,[],function(i){return i.id()!==null&&i.id()!==void 0}],"filter-type-in":[ht,[He(vt)],function(i,t){var e=t[0];return e.value.indexOf(i.geometryType())>=0}],"filter-id-in":[ht,[He(ut)],function(i,t){var e=t[0];return e.value.indexOf(i.id())>=0}],"filter-in-small":[ht,[vt,He(ut)],function(i,t){var e=t[0],n=t[1];return n.value.indexOf(i.properties()[e.value])>=0}],"filter-in-large":[ht,[vt,He(ut)],function(i,t){var e=t[0],n=t[1];return Vb(i.properties()[e.value],n.value,0,n.value.length-1)}],all:{type:ht,overloads:[[[ht,ht],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)&&n.evaluate(i)}],[lo(ht),function(i,t){for(var e=0,n=t;e<n.length;e+=1){var o=n[e];if(!o.evaluate(i))return!1}return!0}]]},any:{type:ht,overloads:[[[ht,ht],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)||n.evaluate(i)}],[lo(ht),function(i,t){for(var e=0,n=t;e<n.length;e+=1){var o=n[e];if(o.evaluate(i))return!0}return!1}]]},"!":[ht,[ht],function(i,t){var e=t[0];return!e.evaluate(i)}],"is-supported-script":[ht,[vt],function(i,t){var e=t[0],n=i.globals&&i.globals.isSupportedScript;return n?n(e.evaluate(i)):!0}],upcase:[vt,[vt],function(i,t){var e=t[0];return e.evaluate(i).toUpperCase()}],downcase:[vt,[vt],function(i,t){var e=t[0];return e.evaluate(i).toLowerCase()}],concat:[vt,lo(ut),function(i,t){return t.map(function(e){return Jr(e.evaluate(i))}).join("")}],"resolved-locale":[vt,[Aa],function(i,t){var e=t[0];return e.evaluate(i).resolvedLocale()}]});function Tu(i){return{result:"success",value:i}}function Ko(i){return{result:"error",value:i}}function Xb(i){return i["property-type"]==="data-driven"||i["property-type"]==="cross-faded-data-driven"}function Yb(i){return!!i.expression&&i.expression.parameters.indexOf("zoom")>-1}function qb(i){return!!i.expression&&i.expression.interpolated}function Lg(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}var Iu=function(t,e){this.expression=t,this._warningHistory={},this._evaluator=new Oi,this._defaultValue=e?Hb(e):null,this._enumValues=e&&e.type==="enum"?e.values:null};Iu.prototype.evaluateWithoutErrorHandling=function(t,e,n,o,r,s,a,l){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=n,this._evaluator.canonical=o||null,this._evaluator.availableImages=r||null,this._evaluator.formattedSection=s,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null,this.expression.evaluate(this._evaluator)},Iu.prototype.evaluate=function(t,e,n,o,r,s,a,l){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=n||null,this._evaluator.canonical=o||null,this._evaluator.availableImages=r||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 le("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 $b(i){return Array.isArray(i)&&i.length>0&&typeof i[0]=="string"&&i[0]in Eu}function zu(i,t){var e=new xn(Eu,[],t?Kb(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 Iu(n,t)):Ko(e.errors)}var Ga=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent=t!=="constant"&&!_u(e.expression)};Ga.prototype.evaluateWithoutErrorHandling=function(t,e,n,o,r,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,o,r,s)},Ga.prototype.evaluate=function(t,e,n,o,r,s){return this._styleExpression.evaluate(t,e,n,o,r,s)};var ts=function(t,e,n,o){this.kind=t,this.zoomStops=n,this._styleExpression=e,this.isStateDependent=t!=="camera"&&!_u(e.expression),this.interpolationType=o};ts.prototype.evaluateWithoutErrorHandling=function(t,e,n,o,r,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,o,r,s)},ts.prototype.evaluate=function(t,e,n,o,r,s){return this._styleExpression.evaluate(t,e,n,o,r,s)},ts.prototype.interpolationFactor=function(t,e,n){return this.interpolationType?Se.interpolationFactor(this.interpolationType,t,e,n):0};function Zb(i,t){if(i=zu(i,t),i.result==="error")return i;var e=i.value.expression,n=Oa(e);if(!n&&!Xb(t))return Ko([new gi("","data expressions not supported")]);var o=yu(e,["zoom","pitch","distance-from-center"]);if(!o&&!Yb(t))return Ko([new gi("","zoom expressions not supported")]);var r=ja(e);if(!r&&!o)return Ko([new gi("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(r instanceof gi)return Ko([r]);if(r instanceof Se&&!qb(t))return Ko([new gi("",'"interpolate" expressions cannot be used with this property')]);if(!r)return Tu(n?new Ga("constant",i.value):new Ga("source",i.value));var s=r instanceof Se?r.interpolation:void 0;return Tu(n?new ts("camera",i.value,r.labels,s):new ts("composite",i.value,r.labels,s))}function ja(i){var t=null;if(i instanceof kn)t=ja(i.result);else if(i instanceof Fi)for(var e=0,n=i.args;e<n.length;e+=1){var o=n[e];if(t=ja(o),t)break}else(i instanceof bn||i instanceof Se)&&i.input instanceof ve&&i.input.name==="zoom"&&(t=i);return t instanceof gi||i.eachChild(function(r){var s=ja(r);s instanceof gi?t=s:!t&&s?t=new gi("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&s&&t!==s&&(t=new gi("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function Kb(i){var t={color:Li,string:vt,number:L,enum:vt,boolean:ht,formatted:Pa,resolvedImage:Zr};return i.type==="array"?He(t[i.value]||ut,i.length):t[i.type]}function Hb(i){return i.type==="color"&&(Lg(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 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 Qb(i)}var Og={$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 Fg(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(!Fg(n)&&typeof n!="boolean")return!1}return!0;default:return!0}}function Jb(i,t){if(t===void 0&&(t="fill"),i==null)return{filter:function(){return!0},needGeometry:!1,needFeature:!1};Fg(i)||(i=Ba(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
15
  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
16
  and paste the contents of this message in the report.
49
17
  Thank you!
50
18
  Filter Expression:
51
19
  `+JSON.stringify(e,null,2)+`
52
- `)}var o=Af["filter_"+t],r=zu(n,o),s=null;if(r.result==="error")throw new Error(r.value.map(function(d){return d.key+": "+d.message}).join(", "));s=function(d,c,g){return r.value.evaluate(d,c,{},g)};var a=null,l=null;if(n!==e){var h=zu(e,o);if(h.result==="error")throw new Error(h.value.map(function(d){return d.key+": "+d.message}).join(", "));a=function(d,c,g,f,m){return h.value.evaluate(d,c,{},g,void 0,void 0,f,m)},l=!Da(h.value.expression)}s=s;var u=Of(n);return{filter:s,dynamicFilter:a||void 0,needGeometry:u,needFeature:!!l}}function tk(i){if(!$o(i))return i;var t=Ru(i);return Lf(t),t=Df(t),t}function Df(i){if(!Array.isArray(i))return i;var t=nk(i);return t===!0?t:t.map(function(e){return Df(e)})}function Lf(i){var t=!1,e=[];if(i[0]==="case"){for(var n=1;n<i.length-1;n+=2)t=t||$o(i[n]),e.push(i[n+1]);e.push(i[i.length-1])}else if(i[0]==="match"){t=t||$o(i[1]);for(var o=2;o<i.length-1;o+=2)e.push(i[o+1]);e.push(i[i.length-1])}else if(i[0]==="step"){t=t||$o(i[1]);for(var r=1;r<i.length-1;r+=2)e.push(i[r+1])}t&&(i.length=0,i.push.apply(i,["any"].concat(e)));for(var s=1;s<i.length;s++)Lf(i[s])}function $o(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($o(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($o(e))return!0}return i}function ok(i,t){return i<t?-1:i>t?1:0}function Of(i){if(!Array.isArray(i))return!1;if(i[0]==="within")return!0;for(var t=1;t<i.length;t++)if(Of(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==="=="?Au(i[1],i[2],"=="):t==="!="?ja(Au(i[1],i[2],"==")):t==="<"||t===">"||t==="<="||t===">="?Au(i[1],i[2],t):t==="any"?rk(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"?Ff(i[1],i.slice(2)):t==="!in"?ja(Ff(i[1],i.slice(2))):t==="has"?Nf(i[1]):t==="!has"?ja(Nf(i[1])):t==="within"?i:!0;return e}function Au(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 rk(i){return["any"].concat(i.map(Ga))}function Ff(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 Nf(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(o){o in t&&(e[o]=t[o])}),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 Gf={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},Qr=" ",jf=/(italic|oblique)$/i,Bf={},Wf=function(i,t,e){var n=Bf[i];if(!n){Array.isArray(i)||(i=[i]);for(var o=400,r="normal",s=[],a,l,h=0,u=i.length;h<u;++h){var d=i[h],c=d.split(" "),g=c[c.length-1].toLowerCase();g=="normal"||g=="italic"||g=="oblique"?(r=l?r:g,c.pop(),g=c[c.length-1].toLowerCase()):jf.test(g)&&(g=g.replace(jf,""),r=l?r:c[c.length-1].replace(g,""));for(var f in Gf){var m=c.length>1?c[c.length-2].toLowerCase():"";if(g==f||g==f.replace("-","")||m+"-"+g==f){o=a?o:Gf[f],c.pop(),m&&f.startsWith(m)&&c.pop();break}}!a&&typeof g=="number"&&(o=g);var p=c.join(Qr).replace("Klokantech Noto Sans","Noto Sans");p.indexOf(Qr)!==-1&&(p='"'+p+'"'),s.push(p)}n=Bf[i]=[r,o,s]}return n[0]+Qr+n[1]+Qr+t+"px"+(e?"/"+e:"")+Qr+n[2]};function Pu(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 Zf(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 o=t[e];if(o<i&&e+1<n){var r=t[e]/t[e+1];return e+Math.log(t[e]/i)/Math.log(r)}}return n-1}var dk=Array(256).join("\u200A");function Du(i,t){if(t>=.05){for(var e="",n=i.split(`
20
+ `)}var o=Og["filter_"+t],r=zu(n,o),s=null;if(r.result==="error")throw new Error(r.value.map(function(d){return d.key+": "+d.message}).join(", "));s=function(d,c,f){return r.value.evaluate(d,c,{},f)};var a=null,l=null;if(n!==e){var h=zu(e,o);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=!Oa(h.value.expression)}s=s;var u=jg(n);return{filter:s,dynamicFilter:a||void 0,needGeometry:u,needFeature:!!l}}function tk(i){if(!Ho(i))return i;var t=Ru(i);return Gg(t),t=Ng(t),t}function Ng(i){if(!Array.isArray(i))return i;var t=nk(i);return t===!0?t:t.map(function(e){return Ng(e)})}function Gg(i){var t=!1,e=[];if(i[0]==="case"){for(var n=1;n<i.length-1;n+=2)t=t||Ho(i[n]),e.push(i[n+1]);e.push(i[i.length-1])}else if(i[0]==="match"){t=t||Ho(i[1]);for(var o=2;o<i.length-1;o+=2)e.push(i[o+1]);e.push(i[i.length-1])}else if(i[0]==="step"){t=t||Ho(i[1]);for(var r=1;r<i.length-1;r+=2)e.push(i[r+1])}t&&(i.length=0,i.push.apply(i,["any"].concat(e)));for(var s=1;s<i.length;s++)Gg(i[s])}function Ho(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(Ho(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(Ho(e))return!0}return i}function ok(i,t){return i<t?-1:i>t?1:0}function jg(i){if(!Array.isArray(i))return!1;if(i[0]==="within")return!0;for(var t=1;t<i.length;t++)if(jg(i[t]))return!0;return!1}function Ba(i){if(!i)return!0;var t=i[0];if(i.length<=1)return t!=="any";var e=t==="=="?Au(i[1],i[2],"=="):t==="!="?Ua(Au(i[1],i[2],"==")):t==="<"||t===">"||t==="<="||t===">="?Au(i[1],i[2],t):t==="any"?rk(i.slice(1)):t==="all"?["all"].concat(i.slice(1).map(Ba)):t==="none"?["all"].concat(i.slice(1).map(Ba).map(Ua)):t==="in"?Bg(i[1],i.slice(2)):t==="!in"?Ua(Bg(i[1],i.slice(2))):t==="has"?Ug(i[1]):t==="!has"?Ua(Ug(i[1])):t==="within"?i:!0;return e}function Au(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 rk(i){return["any"].concat(i.map(Ba))}function Bg(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 Ug(i){switch(i){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",i]}}function Ua(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(o){o in t&&(e[o]=t[o])}),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 Wg={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},es=" ",Vg=/(italic|oblique)$/i,Xg={},Yg=function(i,t,e){var n=Xg[i];if(!n){Array.isArray(i)||(i=[i]);for(var o=400,r="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"?(r=l?r:f,c.pop(),f=c[c.length-1].toLowerCase()):Vg.test(f)&&(f=f.replace(Vg,""),r=l?r:c[c.length-1].replace(f,""));for(var g in Wg){var m=c.length>1?c[c.length-2].toLowerCase():"";if(f==g||f==g.replace("-","")||m+"-"+f==g){o=a?o:Wg[g],c.pop(),m&&g.startsWith(m)&&c.pop();break}}!a&&typeof f=="number"&&(o=f);var p=c.join(es).replace("Klokantech Noto Sans","Noto Sans");p.indexOf(es)!==-1&&(p='"'+p+'"'),s.push(p)}n=Xg[i]=[r,o,s]}return n[0]+es+n[1]+es+t+"px"+(e?"/"+e:"")+es+n[2]};function Pu(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 qg(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 o=t[e];if(o<i&&e+1<n){var r=t[e]/t[e+1];return e+Math.log(t[e]/i)/Math.log(r)}}return n-1}var dk=Array(256).join("");function Du(i,t){if(t>=.05){for(var e="",n=i.split(`
53
21
  `),o=dk.slice(0,Math.round(t/.1)),r=0,s=n.length;r<s;++r)r>0&&(e+=`
54
- `),e+=n[r].split("").join(o);return e}return i}var Lu;function Yf(){return Lu||(Lu=Zf(1,1).getContext("2d")),Lu}function ao(i,t){return Yf().measureText(i).width+(i.length-1)*t}var Xf={};function Ou(i,t,e,n){if(i.indexOf(`
22
+ `),e+=n[r].split("").join(o);return e}return i}var Lu;function $g(){return Lu||(Lu=qg(1,1).getContext("2d")),Lu}function ho(i,t){return $g().measureText(i).width+(i.length-1)*t}var Zg={};function Ou(i,t,e,n){if(i.indexOf(`
55
23
  `)!==-1){for(var o=i.split(`
56
24
  `),r=[],s=0,a=o.length;s<a;++s)r.push(Ou(o[s],t,e,n));return r.join(`
57
- `)}var l=e+","+t+","+i+","+n,h=Xf[l];if(!h){var u=i.split(" ");if(u.length>1){var d=Yf();d.font=t;for(var c=d.measureText("M").width,g=c*e,f="",m=[],p=0,_=u.length;p<_;++p){var v=u[p],y=f+(f?" ":"")+v;ao(y,n)<=g?f=y:(f&&m.push(f),f=v)}f&&m.push(f);for(var x=0,k=m.length;x<k&&k>1;++x){var w=m[x];if(ao(w,n)<g*.35){var E=x>0?ao(m[x-1],n):1/0,M=x<k-1?ao(m[x+1],n):1/0;m.splice(x,1),k-=1,E<M?(m[x-1]+=" "+w,x-=1):m[x]=w+" "+m[x]}}for(var S=0,z=m.length-1;S<z;++S){var P=m[S],G=m[S+1];if(ao(P,n)>g*.7&&ao(G,n)<g*.6){var A=P.split(" "),at=A.pop();ao(at,n)<g*.2&&(m[S]=A.join(" "),m[S+1]=at+" "+G),z-=1}}h=m.join(`
58
- `)}else h=i;h=Du(h,n),Xf[l]=h}return h}var ck={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]},fk=function(i,t){var e=$b(i,t);if(e.result==="error")throw new Error(e.value.map(function(n){return n.key+": "+n.message}).join(", "));return e.value},Fu={},Ba={zoom:0},Wa,Nu;function it(i,t,e,n,o,r,s){var a=i.id;r||(r={},console.warn("No functionCache provided to getValue()")),r[a]||(r[a]={});var l=r[a];if(!l[e]){var h=(i[t]||Fu)[e],u=Af[t+"_"+i.type][e];h===void 0&&(h=u.default);var d=qb(h);if(!d&&Rf(h)&&(h=Xx(h,u),d=!0),d){var c=fk(h,u);l[e]=c.evaluate.bind(c)}else u.type=="color"&&(h=zt.parse(h)),l[e]=function(){return h}}return Ba.zoom=n,l[e](Ba,o,s)}function mk(i,t,e,n){var o=it(i,"layout","icon-allow-overlap",t,e,n);if(!o)return"declutter";var r=it(i,"layout","icon-ignore-placement",t,e,n);return r?"none":"obstacle"}function pk(i,t,e,n,o){return o||console.warn("No filterCache provided to evaluateFilter()"),i in o||(o[i]=Qb(t).filter),Ba.zoom=n,o[i](Ba,e)}function lo(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,o,r,s){if(n===void 0&&(n=hk),o===void 0&&(o=void 0),r===void 0&&(r=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(r){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=r}else if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope){var u=self;u.postMessage({action:"loadImage",src:r}),u.addEventListener("message",function(Z){Z.data.action==="imageLoaded"&&Z.data.src===r&&(a=Z.data.image,l=[a.width,a.height])})}}for(var d=lk(t.layers),c={},g=[],f={},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 E=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 z=c[E];z||(z=[],c[E]=z),z.push({layer:k,index:y}),g.push(w)}}var P=new ke,G=new fe,A=[],at=function(B,Z){var F=B.getProperties(),V=c[F.layer];if(!!V){var D=n.indexOf(Z);D==-1&&(D=uk(Z,n));for(var H=ck[B.getGeometry().getType()],Y={properties:F,type:H},I=i.get("mapbox-featurestate")[B.getId()],rt=-1,b=0,T=V.length;b<T;++b){var q=V[b],C=q.layer,K=C.id,U=C.layout||Fu,_t=C.paint||Fu;if(!(U.visibility==="none"||"minzoom"in C&&D<C.minzoom||"maxzoom"in C&&D>=C.maxzoom)){var Et=C.filter;if(!Et||pk(K,Et,Y,D,_)){var yt=void 0,Ct=void 0,Lt=void 0,Dt=void 0,jt=void 0,O=void 0,ut=q.index;if(H==3&&(C.type=="fill"||C.type=="fill-extrusion"))if(Ct=it(C,"paint",C.type+"-opacity",D,Y,p,I),C.type+"-pattern"in _t){var pt=it(C,"paint",C.type+"-pattern",D,Y,p,I);if(pt){var kt=typeof pt=="string"?Gu(pt,F):pt.toString();if(a&&o&&o[kt]){++rt,O=A[rt],(!O||!O.getFill()||O.getStroke()||O.getText())&&(O=new le({fill:new fe}),A[rt]=O),Lt=O.getFill(),O.setZIndex(ut);var xt=kt+"."+Ct,st=m[xt];if(!st){var nt=o[kt],wt=Zf(nt.width,nt.height),It=wt.getContext("2d");It.globalAlpha=Ct,It.drawImage(a,nt.x,nt.y,nt.width,nt.height,0,0,nt.width,nt.height),st=It.createPattern(wt,"repeat"),m[xt]=st}Lt.setColor(st)}}}else yt=lo(it(C,"paint",C.type+"-color",D,Y,p,I),Ct),C.type+"-outline-color"in _t&&(jt=lo(it(C,"paint",C.type+"-outline-color",D,Y,p,I),Ct)),jt||(jt=yt),(yt||jt)&&(++rt,O=A[rt],(!O||yt&&!O.getFill()||!yt&&O.getFill()||jt&&!O.getStroke()||!jt&&O.getStroke()||O.getText())&&(O=new le({fill:yt?new fe:void 0,stroke:jt?new ke:void 0}),A[rt]=O),yt&&(Lt=O.getFill(),Lt.setColor(yt)),jt&&(Dt=O.getStroke(),Dt.setColor(jt),Dt.setWidth(.5)),O.setZIndex(ut));if(H!=1&&C.type=="line"){yt=!("line-pattern"in _t)&&"line-color"in _t?lo(it(C,"paint","line-color",D,Y,p,I),it(C,"paint","line-opacity",D,Y,p,I)):void 0;var Bt=it(C,"paint","line-width",D,Y,p,I);yt&&Bt>0&&(++rt,O=A[rt],(!O||!O.getStroke()||O.getFill()||O.getText())&&(O=new le({stroke:new ke}),A[rt]=O),Dt=O.getStroke(),Dt.setLineCap(it(C,"layout","line-cap",D,Y,p,I)),Dt.setLineJoin(it(C,"layout","line-join",D,Y,p,I)),Dt.setMiterLimit(it(C,"layout","line-miter-limit",D,Y,p,I)),Dt.setColor(yt),Dt.setWidth(Bt),Dt.setLineDash(_t["line-dasharray"]?it(C,"paint","line-dasharray",D,Y,p,I).map(function(Ne){return Ne*Bt}):null),O.setZIndex(ut))}var bt=!1,dt=null,Ot=0,St=void 0,ct=void 0,ue=void 0;if((H==1||H==2)&&"icon-image"in U){var Ze=it(C,"layout","icon-image",D,Y,p,I);if(Ze){St=typeof Ze=="string"?Gu(Ze,F):Ze.toString();var Ut=void 0;if(a&&o&&o[St]){var Ie=it(C,"layout","icon-rotation-alignment",D,Y,p,I);if(H==2){var Wt=B.getGeometry();if(Wt.getFlatMidpoint||Wt.getFlatMidpoints){var Kt=Wt.getExtent(),Tn=Math.sqrt(Math.max(Math.pow((Kt[2]-Kt[0])/Z,2),Math.pow((Kt[3]-Kt[1])/Z,2)));if(Tn>150){var ae=Wt.getType()==="MultiLineString"?Wt.getFlatMidpoints():Wt.getFlatMidpoint();Nu||(Wa=[NaN,NaN],Nu=new Xh("Point",Wa,[],{},null)),Ut=Nu,Wa[0]=ae[0],Wa[1]=ae[1];var Ye=it(C,"layout","symbol-placement",D,Y,p,I);if(Ye==="line"&&Ie==="map")for(var ve=Wt.getStride(),Fe=Wt.getFlatCoordinates(),Ni=0,sl=Fe.length-ve;Ni<sl;Ni+=ve){var de=Fe[Ni],bi=Fe[Ni+1],_e=Fe[Ni+ve],Xe=Fe[Ni+ve+1],ze=Math.min(de,_e),sr=Math.min(bi,Xe),ar=Math.max(de,_e),ye=Math.max(bi,Xe);if(ae[0]>=ze&&ae[0]<=ar&&ae[1]>=sr&&ae[1]<=ye){Ot=Math.atan2(bi-Xe,_e-de);break}}}}}if(H!==2||Ut){var Re=it(C,"layout","icon-size",D,Y,p,I),ee=_t["icon-color"]!==void 0?it(C,"paint","icon-color",D,Y,p,I):null;if(!ee||ee.a!==0){var ys=St+"."+Re;if(ee!==null&&(ys+="."+ee),ct=f[ys],!ct){var xs=o[St],yE=mk(C,D,Y,p),dd=void 0;"icon-offset"in U&&(dd=it(C,"layout","icon-offset",D,Y,p,I),dd[1]*=-1),ct=new ca({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:Ie==="map",scale:Re/xs.pixelRatio,displacement:dd,declutterMode:yE}),f[ys]=ct}}ct&&(++rt,O=A[rt],(!O||!O.getImage()||O.getFill()||O.getStroke())&&(O=new le,A[rt]=O),O.setGeometry(Ut),ct.setRotation(Ot+Pu(it(C,"layout","icon-rotate",D,Y,p,I))),ct.setOpacity(it(C,"paint","icon-opacity",D,Y,p,I)),ct.setAnchor(gk[it(C,"layout","icon-anchor",D,Y,p,I)]),O.setImage(ct),dt=O.getText(),O.setText(void 0),O.setZIndex(ut),bt=!0,ue=!1)}else ue=!0}}}if(H==1&&C.type==="circle"){++rt,O=A[rt],(!O||!O.getImage()||O.getFill()||O.getStroke())&&(O=new le,A[rt]=O);var _p="circle-radius"in _t?it(C,"paint","circle-radius",D,Y,p,I):5,cd=lo(it(C,"paint","circle-stroke-color",D,Y,p,I),it(C,"paint","circle-stroke-opacity",D,Y,p,I)),gd=lo(it(C,"paint","circle-color",D,Y,p,I),it(C,"paint","circle-opacity",D,Y,p,I)),fd=it(C,"paint","circle-stroke-width",D,Y,p,I),yp=_p+"."+cd+"."+gd+"."+fd;ct=f[yp],ct||(ct=new Kn({radius:_p,stroke:cd&&fd>0?new ke({width:fd,color:cd}):void 0,fill:gd?new fe({color:gd}):void 0,declutterMode:"none"}),f[yp]=ct),O.setImage(ct),dt=O.getText(),O.setText(void 0),O.setGeometry(void 0),O.setZIndex(ut),bt=!0}var ce=void 0,bs=void 0,ks=void 0,In=void 0,ws=void 0,md=void 0;if("text-field"in U){In=Math.round(it(C,"layout","text-size",D,Y,p,I));var pd=it(C,"layout","text-font",D,Y,p,I);ks=it(C,"layout","text-line-height",D,Y,p,I),bs=Wf(s?s(pd):pd,In,ks),bs.includes("sans-serif")||(bs+=",sans-serif"),ws=it(C,"layout","text-letter-spacing",D,Y,p,I),md=it(C,"layout","text-max-width",D,Y,p,I);var lr=it(C,"layout","text-field",D,Y,p,I);typeof lr=="object"&&lr.sections?lr.sections.length===1?ce=lr.toString():ce=lr.sections.reduce(function(Ne,zn,CE){var Sp=zn.fontStack?zn.fontStack.split(","):pd,kd=Wf(s?s(Sp):Sp,In*(zn.scale||1),ks),hr=zn.text;if(hr===`
59
- `)return Ne.push(`
60
- `,""),Ne;if(H==2){Ne.push(Du(hr,ws),kd);return}hr=Ou(hr,kd,md,ws).split(`
61
- `);for(var ll=0,bE=hr.length;ll<bE;++ll)ll>0&&Ne.push(`
62
- `,""),Ne.push(hr[ll],kd);return Ne},[]):ce=Gu(lr,F).trim(),Ct=it(C,"paint","text-opacity",D,Y,p,I)}if(ce&&Ct&&!ue){bt||(++rt,O=A[rt],(!O||!O.getText()||O.getFill()||O.getStroke())&&(O=new le,A[rt]=O),O.setImage(void 0),O.setGeometry(void 0)),O.getText()||O.setText(dt||new dg({padding:[2,2,2,2]})),dt=O.getText();var xp=U["text-transform"];xp=="uppercase"?ce=Array.isArray(ce)?ce.map(function(Ne,zn){return zn%2?Ne:Ne.toUpperCase()}):ce.toUpperCase():xp=="lowercase"&&(ce=Array.isArray(ce)?ce.map(function(Ne,zn){return zn%2?Ne:Ne.toLowerCase()}):ce.toLowerCase());var bp=Array.isArray(ce)?ce:H==2?Du(ce,ws):Ou(ce,bs,md,ws);dt.setText(bp),dt.setFont(bs),dt.setRotation(Pu(it(C,"layout","text-rotate",D,Y,p,I)));var al=it(C,"layout","text-anchor",D,Y,p,I),vd=bt||H==1?"point":it(C,"layout","symbol-placement",D,Y,p,I);dt.setPlacement(vd),dt.setOverflow(vd==="point");var co=it(C,"paint","text-halo-width",D,Y,p,I),kp=it(C,"layout","text-offset",D,Y,p,I),wp=it(C,"paint","text-translate",D,Y,p,I),_d=0,yd=0;if(vd=="point"){var xd="center";al.indexOf("left")!==-1?(xd="left",yd=co):al.indexOf("right")!==-1&&(xd="right",yd=-co),dt.setTextAlign(xd);var xE=it(C,"layout","text-rotation-alignment",D,Y,p,I);dt.setRotateWithView(xE=="map")}else dt.setMaxAngle(Pu(it(C,"layout","text-max-angle",D,Y,p,I))*ce.length/bp.length),dt.setTextAlign(),dt.setRotateWithView(!1);var bd="middle";al.indexOf("bottom")==0?(bd="bottom",_d=-co-.5*(ks-1)*In):al.indexOf("top")==0&&(bd="top",_d=co+.5*(ks-1)*In),dt.setTextBaseline(bd);var Mp=it(C,"layout","text-justify",D,Y,p,I);dt.setJustify(Mp==="auto"?void 0:Mp),dt.setOffsetX(kp[0]*In+yd+wp[0]),dt.setOffsetY(kp[1]*In+_d+wp[1]),G.setColor(lo(it(C,"paint","text-color",D,Y,p,I),Ct)),dt.setFill(G);var Cp=lo(it(C,"paint","text-halo-color",D,Y,p,I),Ct);if(Cp){P.setColor(Cp),co*=2;var Ep=.5*In;P.setWidth(co<=Ep?co:Ep),dt.setStroke(P)}else dt.setStroke(void 0);var Ms=it(C,"layout","text-padding",D,Y,p,I),Cs=dt.getPadding();Ms!==Cs[0]&&(Cs[0]=Ms,Cs[1]=Ms,Cs[2]=Ms,Cs[3]=Ms),O.setZIndex(ut)}}}}if(rt>-1)return A.length=rt+1,A}};return i.setStyle(at),i.set("mapbox-source",v),i.set("mapbox-layers",g),i.set("mapbox-featurestate",{}),at}new Hn;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:rf({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 Uf=yk,Vf='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class xk extends Uf{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[Vf];const n=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",o=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:o,wrapX:t.wrapX,zDirection:t.zDirection})}}const bk=xk;function qf(i,t=[]){return(...e)=>(n=>n.length>=i.length?i(...n):qf(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 o=e.length;for(;n<o;)t=i(t,e[n],n,e),n++;return t}const Mk=qf(wk);function Ck(i){return typeof i=="string"?i[i.length-1]||"":i[i.length-1]}function $f(i,t){return arguments.length===1?e=>$f(i,e):i*t}Mk($f,1);function Hf(i,t){if(arguments.length===1)return o=>Hf(i,o);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 wE=Tp``,Ek="data:image/svg+xml;base64,PHN2ZyBpZD0iaWNvbiIKICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+LmNscy0xe2ZpbGw6bm9uZTt9PC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPmVyYXNlPC90aXRsZT4KICA8cmVjdCBmaWxsPSJ3aGl0ZSIgeD0iNyIgeT0iMjciIHdpZHRoPSIyMyIgaGVpZ2h0PSIyIiAvPgogIDxwYXRoIGZpbGw9IndoaXRlIiBkPSJNMjcuMzgsMTAuNTEsMTkuNDUsMi41OWEyLDIsMCwwLDAtMi44MywwbC0xNCwxNGEyLDIsMCwwLDAsMCwyLjgzTDcuMTMsMjRoOS41OUwyNy4zOCwxMy4zNEEyLDIsMCwwLDAsMjcuMzgsMTAuNTFaTTE1Ljg5LDIySDhMNCwxOGw2LjMxLTYuMzEsNy45Myw3LjkyWm0zLjc2LTMuNzYtNy45Mi03LjkzTDE4LDQsMjYsMTEuOTNaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDApIi8+CiAgPHJlY3QgZmlsbD0id2hpdGUiIGlkPSJfVHJhbnNwYXJlbnRfUmVjdGFuZ2xlXyIgZGF0YS1uYW1lPSImbHQ7VHJhbnNwYXJlbnQgUmVjdGFuZ2xlJmd0OyIgY2xhc3M9ImNscy0xIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIC8+Cjwvc3ZnPg==",Sk="data:image/svg+xml;base64,77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgdmVyc2lvbj0iMS4xIgogICB3aWR0aD0iMTAwIgogICBoZWlnaHQ9IjEwMCIKICAgaWQ9InN2ZzQ0NjAiCiAgIHNvZGlwb2RpOmRvY25hbWU9Im5vcnRoLWFycm93LW4uc3ZnIgogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjAgKDQwMzVhNGZiNDksIDIwMjAtMDUtMDEpIj4KICA8c29kaXBvZGk6bmFtZWR2aWV3CiAgICAgcGFnZWNvbG9yPSIjZmZmZmZmIgogICAgIGJvcmRlcmNvbG9yPSIjNjY2NjY2IgogICAgIGJvcmRlcm9wYWNpdHk9IjEiCiAgICAgb2JqZWN0dG9sZXJhbmNlPSIxMCIKICAgICBncmlkdG9sZXJhbmNlPSIxMCIKICAgICBndWlkZXRvbGVyYW5jZT0iMTAiCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAiCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiIKICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE5MjAiCiAgICAgaW5rc2NhcGU6d2luZG93LWhlaWdodD0iMTAxNyIKICAgICBpZD0ibmFtZWR2aWV3MTEiCiAgICAgc2hvd2dyaWQ9ImZhbHNlIgogICAgIGlua3NjYXBlOnpvb209IjIuODI4NDI3MSIKICAgICBpbmtzY2FwZTpjeD0iLTk3LjYyODQ3NSIKICAgICBpbmtzY2FwZTpjeT0iNjQuODk0MjI2IgogICAgIGlua3NjYXBlOndpbmRvdy14PSItOCIKICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTgiCiAgICAgaW5rc2NhcGU6d2luZG93LW1heGltaXplZD0iMSIKICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJzdmc0NDYwIgogICAgIGlua3NjYXBlOmRvY3VtZW50LXJvdGF0aW9uPSIwIiAvPgogIDxkZWZzCiAgICAgaWQ9ImRlZnM0NDYyIiAvPgogIDxtZXRhZGF0YQogICAgIGlkPSJtZXRhZGF0YTQ0NjUiPgogICAgPHJkZjpSREY+CiAgICAgIDxjYzpXb3JrCiAgICAgICAgIHJkZjphYm91dD0iIj4KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4KICAgICAgICA8ZGM6dHlwZQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiIC8+CiAgICAgICAgPGRjOnRpdGxlPjwvZGM6dGl0bGU+CiAgICAgIDwvY2M6V29yaz4KICAgIDwvcmRmOlJERj4KICA8L21ldGFkYXRhPgogIDxwYXRoCiAgICAgc29kaXBvZGk6bm9kZXR5cGVzPSJjY2NjY2NjY2NjY2NjY2NjY2N6Y2NjY2MiCiAgICAgZD0ibSA0Mi4wNjY0MDYsMCB2IDIwIGggMy43NTE5NTMgViA2Ljk1NzAzMTIgTCA1My44ODA4NTksMjAgaCA0LjA1MjczNSBWIDAgSCA1NC4xODE2NDEgViAxMy4zNTU0NjkgTCA0NS45OTYwOTQsMCBaIG0gNS41NzAzMTcsMjYuNjg3NTQxIC0yNS43NzE0ODksNjkuOTQ5MTc4IGMgLTAuODIyMDM0LDIuMjM4NzM0IDEuNjU4NjksNC4yNDc4MTEgMy42Nzc3MzUsMi45Nzg1MTUgTCA1MCw4NC4xOTUzMTIgNzQuNDU1MDc4LDk5LjYxNTIzNCBjIDIuMDE5NTI2LDEuMjcyOTg2IDQuNTA0MDY3LC0wLjczODExNiAzLjY3OTY4OCwtMi45Nzg1MTUgbCAtMjUuNzg5MDYzLC03MCBjIC0wLjQ3MzEyMywtMS4wOTU1OSAtMS4yODQwMDUsLTEuNjMxNDUgLTIuMzg0NzUyLC0xLjYzNDgxMyAtMS4xMDA3NDcsLTAuMDAzNCAtMi4wMTY5NzIsMC44NTYxIC0yLjMyNDIyOCwxLjY4NTYzNSB6IE0gNDcuNSw0MS41MTc1NzggdiAzOC4zNDM3NSBMIDI5LjA5OTYwOSw5MS40NjI4OTEgWiIKICAgICBzdHlsZT0iY29sb3I6IzAwMDAwMDtmb250LXN0eWxlOm5vcm1hbDtmb250LXZhcmlhbnQ6bm9ybWFsO2ZvbnQtd2VpZ2h0Om5vcm1hbDtmb250LXN0cmV0Y2g6bm9ybWFsO2ZvbnQtc2l6ZTptZWRpdW07bGluZS1oZWlnaHQ6bm9ybWFsO2ZvbnQtZmFtaWx5OnNhbnMtc2VyaWY7Zm9udC12YXJpYW50LWxpZ2F0dXJlczpub3JtYWw7Zm9udC12YXJpYW50LXBvc2l0aW9uOm5vcm1hbDtmb250LXZhcmlhbnQtY2Fwczpub3JtYWw7Zm9udC12YXJpYW50LW51bWVyaWM6bm9ybWFsO2ZvbnQtdmFyaWFudC1hbHRlcm5hdGVzOm5vcm1hbDtmb250LXZhcmlhbnQtZWFzdC1hc2lhbjpub3JtYWw7Zm9udC1mZWF0dXJlLXNldHRpbmdzOm5vcm1hbDtmb250LXZhcmlhdGlvbi1zZXR0aW5nczpub3JtYWw7dGV4dC1pbmRlbnQ6MDt0ZXh0LWFsaWduOnN0YXJ0O3RleHQtZGVjb3JhdGlvbjpub25lO3RleHQtZGVjb3JhdGlvbi1saW5lOm5vbmU7dGV4dC1kZWNvcmF0aW9uLXN0eWxlOnNvbGlkO3RleHQtZGVjb3JhdGlvbi1jb2xvcjojMDAwMDAwO2xldHRlci1zcGFjaW5nOm5vcm1hbDt3b3JkLXNwYWNpbmc6bm9ybWFsO3RleHQtdHJhbnNmb3JtOm5vbmU7d3JpdGluZy1tb2RlOmxyLXRiO2RpcmVjdGlvbjpsdHI7dGV4dC1vcmllbnRhdGlvbjptaXhlZDtkb21pbmFudC1iYXNlbGluZTphdXRvO2Jhc2VsaW5lLXNoaWZ0OmJhc2VsaW5lO3RleHQtYW5jaG9yOnN0YXJ0O3doaXRlLXNwYWNlOm5vcm1hbDtzaGFwZS1wYWRkaW5nOjA7c2hhcGUtbWFyZ2luOjA7aW5saW5lLXNpemU6MDtjbGlwLXJ1bGU6bm9uemVybztkaXNwbGF5OmlubGluZTtvdmVyZmxvdzp2aXNpYmxlO3Zpc2liaWxpdHk6dmlzaWJsZTtpc29sYXRpb246YXV0bzttaXgtYmxlbmQtbW9kZTpub3JtYWw7Y29sb3ItaW50ZXJwb2xhdGlvbjpzUkdCO2NvbG9yLWludGVycG9sYXRpb24tZmlsdGVyczpsaW5lYXJSR0I7c29saWQtY29sb3I6IzAwMDAwMDtzb2xpZC1vcGFjaXR5OjE7dmVjdG9yLWVmZmVjdDpub25lO2ZpbGw6cmdiKDAsIDAsIDApO2ZpbGwtb3BhY2l0eToxO2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDo1O3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2UtZGFzaG9mZnNldDowO3N0cm9rZS1vcGFjaXR5OjE7Y29sb3ItcmVuZGVyaW5nOmF1dG87aW1hZ2UtcmVuZGVyaW5nOmF1dG87c2hhcGUtcmVuZGVyaW5nOmF1dG87dGV4dC1yZW5kZXJpbmc6YXV0bztlbmFibGUtYmFja2dyb3VuZDphY2N1bXVsYXRlO3N0b3AtY29sb3I6IzAwMDAwMCIKICAgICBpZD0icGF0aDkxMCIgLz4KICA8ZwogICAgIHN0eWxlPSJmb250LXN0eWxlOm5vcm1hbDtmb250LXdlaWdodDpub3JtYWw7Zm9udC1zaXplOjI3Ljk0cHg7bGluZS1oZWlnaHQ6MTAwJTtmb250LWZhbWlseTpzYW5zLXNlcmlmO3RleHQtYWxpZ246ZW5kO2xldHRlci1zcGFjaW5nOjBweDt3b3JkLXNwYWNpbmc6MHB4O3RleHQtYW5jaG9yOmVuZDtmaWxsOnJnYigwLCAwLCAwKTtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS4xMTc2cHg7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46bWl0ZXI7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICBpZD0idGV4dDkwMyIKICAgICBhcmlhLWxhYmVsPSJOIiAvPgo8L3N2Zz4K",Tk="data:image/svg+xml;base64,PHN2ZyBpZD0iaWNvbiIKICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+LmNscy0xe2ZpbGw6bm9uZTt9PC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPnJlc2V0PC90aXRsZT4KICA8cGF0aCBmaWxsPSJ3aGl0ZSIgZD0iTTE4LDI4QTEyLDEyLDAsMSwwLDYsMTZ2Ni4yTDIuNCwxOC42LDEsMjBsNiw2LDYtNi0xLjQtMS40TDgsMjIuMlYxNkg4QTEwLDEwLDAsMSwxLDE4LDI2WiIvPgogIDxyZWN0IGZpbGw9IndoaXRlIiBpZD0iX1RyYW5zcGFyZW50X1JlY3RhbmdsZV8iIGRhdGEtbmFtZT0iJmx0O1RyYW5zcGFyZW50IFJlY3RhbmdsZSZndDsiIGNsYXNzPSJjbHMtMSIgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIi8+Cjwvc3ZnPgo=",Ik="data:image/svg+xml;base64,PHN2ZyBpZD0iaWNvbiIKICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+LmNscy0xe2ZpbGw6bm9uZTt9PC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPnRyYXNoLWNhbjwvdGl0bGU+CiAgPHJlY3QgZmlsbD0id2hpdGUiIHg9IjEyIiB5PSIxMiIgd2lkdGg9IjIiIGhlaWdodD0iMTIiLz4KICA8cmVjdCBmaWxsPSJ3aGl0ZSIgeD0iMTgiIHk9IjEyIiB3aWR0aD0iMiIgaGVpZ2h0PSIxMiIvPgogIDxwYXRoIGZpbGw9IndoaXRlIiBkPSJNNCw2VjhINlYyOGEyLDIsMCwwLDAsMiwySDI0YTIsMiwwLDAsMCwyLTJWOGgyVjZaTTgsMjhWOEgyNFYyOFoiLz4KICA8cmVjdCBmaWxsPSJ3aGl0ZSIgeD0iMTIiIHk9IjIiIHdpZHRoPSI4IiBoZWlnaHQ9IjIiLz4KICA8cmVjdCBmaWxsPSJ3aGl0ZSIgaWQ9Il9UcmFuc3BhcmVudF9SZWN0YW5nbGVfIiBkYXRhLW5hbWU9IiZsdDtUcmFuc3BhcmVudCBSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTEiIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIvPgo8L3N2Zz4=";function zk(i){return new G_({units:"metric",bar:i,steps:4,text:!1,minWidth:140})}function Rk(){const i=document.createElement("img");i.src=Sk,i.title="North";const t=document.createElement("div");return t.className="north-arrow-control ol-unselectable ol-control",t.appendChild(i),new bo({element:t})}function Ak(i,t){const e=document.createElement("button");if(e.title="Reset map view",t==="unicode")e.innerHTML="\u21BB";else{const o={reset:Tk,trash:Ik,erase:Ek},r=document.createElement("img");r.className="reset-icon",r.src=o[t],e.appendChild(r)}e.addEventListener("click",i,!1);const n=document.createElement("div");return n.className="reset-control ol-unselectable ol-control",n.appendChild(e),new bo({element:n})}const Za=new hn({features:[],wrapX:!1}),Pk=new Qn({source:Za,properties:{name:"pointsLayer"},style:new le({image:new Kn({radius:3,fill:new fe({color:"grey"})})})});function Dk(i,t){var n,o,r;const e=i&&((r=(o=(n=i.getSource())==null?void 0:n.getFeaturesInExtent(t))==null?void 0:o.filter(s=>{var a;return((a=s.getGeometry())==null?void 0:a.getType())!=="Point"}))==null?void 0:r.flatMap(s=>s.flatCoordinates_));if(e)return Hf(2,e).forEach((s,a)=>{Za.addFeature(new Ti({geometry:new ni(s),i:a}))})}const Kf={color:"#ff0000",width:3},Lk=new ke(Kf),Ok=new ke({...Kf,lineDash:[2,8]}),Jf=new fe({color:"rgba(255, 0, 0, 0.1)"}),Qf=new ga({stroke:new ke({color:"red",width:2}),points:4,radius1:15,radius2:1}),tm=new Kn({radius:6,fill:new fe({color:"#ff0000"})}),Fk=new le({image:new ga({fill:new fe({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 Vn){const e=t.getCoordinates()[0];return new Ar(e)}else return}}),Li=new hn,em=new Qn({source:Li,style:[new le({fill:Jf,stroke:Lk}),Fk]});function Nk(i){return new Qy({source:Li,type:"Polygon",style:new le({stroke:Ok,fill:Jf,image:i==="crosshair"?Qf:tm})})}const im=new rx({source:Za,pixelTolerance:15});function Gk(i){return new nx({source:Li,style:new le({image:i==="crosshair"?Qf:tm})})}const jk="data:image/svg+xml;base64,77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgdmVyc2lvbj0iMS4xIgogICB3aWR0aD0iMTAwIgogICBoZWlnaHQ9IjEwMCIKICAgaWQ9InN2ZzQ0NjAiCiAgIHNvZGlwb2RpOmRvY25hbWU9InVFQTE3LXBvaS1hbHQuc3ZnIgogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjAgKDQwMzVhNGZiNDksIDIwMjAtMDUtMDEpIj4KICA8c29kaXBvZGk6bmFtZWR2aWV3CiAgICAgcGFnZWNvbG9yPSIjZmZmZmZmIgogICAgIGJvcmRlcmNvbG9yPSIjNjY2NjY2IgogICAgIGJvcmRlcm9wYWNpdHk9IjEiCiAgICAgb2JqZWN0dG9sZXJhbmNlPSIxMCIKICAgICBncmlkdG9sZXJhbmNlPSIxMCIKICAgICBndWlkZXRvbGVyYW5jZT0iMTAiCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAiCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiIKICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE5MjAiCiAgICAgaW5rc2NhcGU6d2luZG93LWhlaWdodD0iMTAxNyIKICAgICBpZD0ibmFtZWR2aWV3MTEiCiAgICAgc2hvd2dyaWQ9ImZhbHNlIgogICAgIGlua3NjYXBlOnpvb209IjIuODU2NzExNCIKICAgICBpbmtzY2FwZTpjeD0iLTMxLjM3NjY1NyIKICAgICBpbmtzY2FwZTpjeT0iNTkuNTAwMTg0IgogICAgIGlua3NjYXBlOndpbmRvdy14PSItOCIKICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTgiCiAgICAgaW5rc2NhcGU6d2luZG93LW1heGltaXplZD0iMSIKICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJzdmc0NDYwIgogICAgIGlua3NjYXBlOmRvY3VtZW50LXJvdGF0aW9uPSIwIiAvPgogIDxkZWZzCiAgICAgaWQ9ImRlZnM0NDYyIiAvPgogIDxtZXRhZGF0YQogICAgIGlkPSJtZXRhZGF0YTQ0NjUiPgogICAgPHJkZjpSREY+CiAgICAgIDxjYzpXb3JrCiAgICAgICAgIHJkZjphYm91dD0iIj4KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4KICAgICAgICA8ZGM6dHlwZQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiIC8+CiAgICAgICAgPGRjOnRpdGxlIC8+CiAgICAgIDwvY2M6V29yaz4KICAgIDwvcmRmOlJERj4KICA8L21ldGFkYXRhPgogIDxwYXRoCiAgICAgZD0ibSA0Ny43ODE2MTQsNTUuMzU5OTU4IGMgNS41MTMyOSwwLjYzNDc4IDEwLjY4NzA5LC0xLjA0ODYzNCAxNC42Mzg1MjIsLTQuNzYzMDQ1IDQuMDEyMzI3LC0zLjc3MTIxNyA1LjgxNzEzMSwtNy45MTQzODggNS44MTcxMzEsLTEzLjM1NDE1OCAwLC01LjUwNzMzNyAtMS44MjMwNTIsLTkuNjMyODM1IC01Ljk1NTI1OSwtMTMuNDc4MTA4IC0xLjgyNjIzNiwtMS42OTkwMzkgLTQuMjI3MDUzLC0zLjA5NDUzNSAtNi44NDQyOTcsLTMuOTc3OTU0IC0yLjE0MDA0OCwtMC43MjI0OTUgLTYuODgyNywtMC45MDI0MDYgLTkuNDI2OTUyLC0wLjM1NzcyNiAtMi44MzI2MDQsMC42MDYyMzggLTYuMjAzMDg3LDIuMzY0OTE2IC04LjMzNTI5Miw0LjM0ODkxNCAtMy45OTAwNDgsMy43MTI0ODcgLTUuOTAxNzkxLDguMDc1MDE3IC01LjkwMTc5MSwxMy40NjUwNjQgMCwzLjIzMTM2IDAuNDcyMSw1LjI1NTEyNSAxLjkxNTU2Miw4LjIwNjI2IDEuMDUwMDgsMi4xNDY2OCAxLjQ0Mzg4NiwyLjY4MjA5NSAzLjQwNTkxNiw0LjYzMzEzNSAxLjcwODA1LDEuNjk4NTc0IDIuNjQ1MDQ0LDIuNDI1MDQxIDQuMDc0MjkxLDMuMTU4MzQgMi4zNTQ1NjMsMS4yMDgxMDIgNC40MDUwNzEsMS44NjUyNyA2LjYxMjE2OSwyLjExOTQ2OCB6IG0gMS4wMzYwNzYsNDQuMjEzNTUgYyAtMC4zODc4NjUsLTAuMjM1NDQgLTIuMTI2MjU2LC0xLjkyNTMxIC0zLjg2NDQzNywtMy43NTU1MyBDIDMxLjYzOTM2Niw4MS43OTg1NTggMjIuMzQ1MjM3LDY4LjE2MTE3MyAxNy4zMDAyMzEsNTUuMjQxMTQ3IDE1Ljc4MjI5NCw1MS4zNTQxNDEgMTUuMjE5ODAzLDQ5LjM5MTE1NiAxNC42MjU0ODYsNDUuOTExMjg0IDEyLjgwMjQzNiwzNS4yNDAxMyAxNC45ODU3NjksMjQuODE3MzIxIDIwLjg5Njg5NiwxNS45NTExNjUgMjMuMTQ3MjgsMTIuNTc2MzAyIDI3LjcxMjU0OCw4LjAwMDcxMzQgMzAuOTcxNjM0LDUuODUzNDQyNCBjIDExLjg5MTY0NCwtNy44MzUyNTcgMjYuMjIwMTcxLC03LjgwMjY1NyAzOC4xNjY1NSwwLjA4Njg4IDMuMTAwMzc3LDIuMDQ3MzU2IDcuNzEwODQsNi43MDE4NDI2IDkuOTA1NjMxLDkuOTk5Nzk0NiA0LjAxODQ4MSw2LjAzODg2NSA2LjE2MDAxNCwxMi4yMzcyNTkgNi44MTA1NywxOS43MTQ0NzIgMC41MzEwNyw2LjEwMjYyMyAtMC4zODMyMDgsMTIuMDYwMTU5IC0yLjg2Mjc0NSwxOC42OTQyMDQgLTQuODI1NjE1LDEyLjkwMjU2NiAtMTMuNTk3NTY3LDI1Ljc4MDgxNSAtMjguNzA1NDMyLDQyLjE0NDE0NSAtMy4zNzI4MTUsMy42NTI5OTIgLTMuOTcxMTYyLDMuOTkwMzYyIC01LjQ2ODUxOCwzLjA4MDYyIHoiCiAgICAgc3R5bGU9ImZpbGw6cmdiKDAsIDAsIDApO3N0cm9rZS13aWR0aDo0LjU1MzciCiAgICAgaWQ9InBhdGg0MTM1IgogICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiIC8+Cjwvc3ZnPgo=";/**
63
- * splaytree v3.1.0
64
- * Fast Splay tree for Node and browser
65
- *
66
- * @author Alexander Milevski <info@w8r.name>
67
- * @license MIT
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 Bk(i,t){return i>t?1:i<t?-1:0}function wn(i,t,e){for(var n=new kn(null,null),o=n,r=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}r.left=t,r=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}o.right=t,o=t,t=t.right}else break}return o.right=t.left,r.left=t.right,t.left=n.right,t.right=n.left,t}function ju(i,t,e,n){var o=new kn(i,t);if(e===null)return o.left=o.right=null,o;e=wn(i,e,n);var r=n(i,e.key);return r<0?(o.left=e.left,o.right=e,e.left=null):r>=0&&(o.right=e.right,o.left=e,e.right=null),o}function nm(i,t,e){var n=null,o=null;if(t){t=wn(i,t,e);var r=e(t.key,i);r===0?(n=t.left,o=t.right):r<0?(o=t.right,t.right=null,n=t):(n=t.left,t.left=null,o=t)}return{left:n,right:o}}function Wk(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,o){if(i){n(""+t+(e?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ")+o(i)+`
70
- `);var r=t+(e?" ":"\u2502 ");i.left&&Bu(i.left,r,!1,n,o),i.right&&Bu(i.right,r,!0,n,o)}}var Wu=function(){function i(t){t===void 0&&(t=Bk),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 o=this._comparator,r=wn(t,this._root,o),s=o(t,r.key);return s===0?this._root=r:(s<0?(n.left=r.left,n.right=r,r.left=null):s>0&&(n.right=r.right,n.left=r,r.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 o;if(e===null)return null;e=wn(t,e,n);var r=n(t,e.key);return r===0?(e.left===null?o=e.right:(o=wn(t,e.left,n),o.right=e.right),this._size--,o):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 o=n(t,e.key);if(o===0)return e;o<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 o=n(t,e.key);if(o===0)return!0;o<0?e=e.left:e=e.right}return!1},i.prototype.forEach=function(t,e){for(var n=this._root,o=[],r=!1;!r;)n!==null?(o.push(n),n=n.left):o.length!==0?(n=o.pop(),t.call(e,n),n=n.right):r=!0;return this},i.prototype.range=function(t,e,n,o){for(var r=[],s=this._comparator,a=this._root,l;r.length!==0||a;)if(a)r.push(a),a=a.left;else{if(a=r.pop(),l=s(a.key,e),l>0)break;if(s(a.key,t)>=0&&n.call(o,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,o=0,r=[];!n;)if(e)r.push(e),e=e.left;else if(r.length>0){if(e=r.pop(),o===t)return e;o++,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 o=this._comparator;e;){var r=o(t.key,e.key);if(r===0)break;r<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 o=this._comparator;e;){var r=o(t.key,e.key);if(r===0)break;r<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 Yk(this._root)},i.prototype.load=function(t,e,n){e===void 0&&(e=[]),n===void 0&&(n=!1);var o=t.length,r=this._comparator;if(n&&Xu(t,e,0,o-1,r),this._root===null)this._root=Zu(t,e,0,o),this._size=o;else{var s=Xk(this.toList(),Zk(t,e),r);o=this._size+o,this._root=Yu({head:s},0,o)}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 o=this._comparator,r=nm(t,this._root,o),s=r.left,a=r.right;o(t,e)<0?a=ju(e,n,a,o):s=ju(e,n,s,o),this._root=Wk(s,a,o)},i.prototype.split=function(t){return nm(t,this._root,this._comparator)},i}();function Zu(i,t,e,n){var o=n-e;if(o>0){var r=e+Math.floor(o/2),s=i[r],a=t[r],l=new kn(s,a);return l.left=Zu(i,t,e,r),l.right=Zu(i,t,r+1,n),l}return null}function Zk(i,t){for(var e=new kn(null,null),n=e,o=0;o<i.length;o++)n=n.next=new kn(i[o],t[o]);return n.next=null,e.next}function Yk(i){for(var t=i,e=[],n=!1,o=new kn(null,null),r=o;!n;)t?(e.push(t),t=t.left):e.length>0?(t=r=r.next=e.pop(),t=t.right):n=!0;return r.next=null,o.next}function Yu(i,t,e){var n=e-t;if(n>0){var o=t+Math.floor(n/2),r=Yu(i,t,o),s=i.head;return s.left=r,i.head=i.head.next,s.right=Yu(i,o+1,e),s}return null}function Xk(i,t,e){for(var n=new kn(null,null),o=n,r=i,s=t;r!==null&&s!==null;)e(r.key,s.key)<0?(o.next=r,r=r.next):(o.next=s,s=s.next),o=o.next;return r!==null?o.next=r:s!==null&&(o.next=s),n.next}function Xu(i,t,e,n,o){if(!(e>=n)){for(var r=i[e+n>>1],s=e-1,a=n+1;;){do s++;while(o(i[s],r)<0);do a--;while(o(i[a],r)>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,o),Xu(i,t,a+1,n,o)}}function Ke(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 Ee(i,t,e){return t&&om(i.prototype,t),e&&om(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},Uu=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,o=t.ur.x<e.ur.x?t.ur.x:e.ur.x,r=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:r},ur:{x:o,y:s}}},Mn=Number.EPSILON;Mn===void 0&&(Mn=Math.pow(2,-52));var Uk=Mn*Mn,Vu=function(t,e){if(-Mn<t&&t<Mn&&-Mn<e&&e<Mn)return 0;var n=t-e;return n*n<Uk*t*e?0:t<e?-1:1},Vk=function(){function i(){Ke(this,i),this.reset()}return Ee(i,[{key:"reset",value:function(){this.xRounder=new rm,this.yRounder=new rm}},{key:"round",value:function(e,n){return{x:this.xRounder.round(e),y:this.yRounder.round(n)}}}]),i}(),rm=function(){function i(){Ke(this,i),this.tree=new Wu,this.round(0)}return Ee(i,[{key:"round",value:function(e){var n=this.tree.add(e),o=this.tree.prev(n);if(o!==null&&Vu(n.key,o.key)===0)return this.tree.remove(e),o.key;var r=this.tree.next(n);return r!==null&&Vu(n.key,r.key)===0?(this.tree.remove(e),r.key):e}}]),i}(),es=new Vk,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 o={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y},s=is(o,r);return Vu(s,0)},Ya=function(t){return Math.sqrt(sm(t,t))},qk=function(t,e,n){var o={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y};return is(r,o)/Ya(r)/Ya(o)},$k=function(t,e,n){var o={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y};return sm(r,o)/Ya(r)/Ya(o)},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)}},Hk=function(t,e,n,o){if(e.x===0)return hm(n,o,t.x);if(o.x===0)return hm(t,e,n.x);if(e.y===0)return lm(n,o,t.y);if(o.y===0)return lm(t,e,n.y);var r=is(e,o);if(r==0)return null;var s={x:n.x-t.x,y:n.y-t.y},a=is(s,e)/r,l=is(s,o)/r,h=t.x+l*e.x,u=n.x+a*o.x,d=t.y+l*e.y,c=n.y+a*o.y,g=(h+u)/2,f=(d+c)/2;return{x:g,y:f}},mi=function(){Ee(i,null,[{key:"compare",value:function(e,n){var o=i.comparePoints(e.point,n.point);return o!==0?o:(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){Ke(this,i),t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}return Ee(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,o=0,r=n.length;o<r;o++){var s=n[o];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 o=this.point.events[n];if(o.segment.consumedBy===void 0)for(var r=n+1;r<e;r++){var s=this.point.events[r];s.consumedBy===void 0&&o.otherSE.point.events===s.otherSE.point.events&&o.segment.consume(s.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var e=[],n=0,o=this.point.events.length;n<o;n++){var r=this.point.events[n];r!==this&&!r.segment.ringOut&&r.segment.isInResult()&&e.push(r)}return e}},{key:"getLeftmostComparator",value:function(e){var n=this,o=new Map,r=function(a){var l=a.otherSE;o.set(a,{sine:qk(n.point,e.point,l.point),cosine:$k(n.point,e.point,l.point)})};return function(s,a){o.has(s)||r(s),o.has(a)||r(a);var l=o.get(s),h=l.sine,u=l.cosine,d=o.get(a),c=d.sine,g=d.cosine;return h>=0&&c>=0?u<g?1:u>g?-1:0:h<0&&c<0?u<g?-1:u>g?1:0:c<h?-1:c>h?1:0}}}]),i}(),Kk=0,Xa=function(){Ee(i,null,[{key:"compare",value:function(e,n){var o=e.leftSE.point.x,r=n.leftSE.point.x,s=e.rightSE.point.x,a=n.rightSE.point.x;if(a<o)return 1;if(s<r)return-1;var l=e.leftSE.point.y,h=n.leftSE.point.y,u=e.rightSE.point.y,d=n.rightSE.point.y;if(o<r){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 g=n.comparePoint(e.rightSE.point);return g!==0?g:-1}if(o>r){if(l<h&&l<d)return-1;if(l>h&&l>d)return 1;var f=n.comparePoint(e.leftSE.point);if(f!==0)return f;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-o,x=d-h,k=a-r;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,o){Ke(this,i),this.id=++Kk,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=n,this.windings=o}return Ee(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,o=this.rightSE.point,r=this.vector();if(n.x===o.x)return e.x===n.x?0:e.x<n.x?1:-1;var s=(e.y-n.y)/r.y,a=n.x+s*r.x;if(e.x===a)return 0;var l=(e.x-n.x)/r.x,h=n.y+l*r.y;return e.y===h?0:e.y<h?-1:1}},{key:"getIntersection",value:function(e){var n=this.bbox(),o=e.bbox(),r=Uu(n,o);if(r===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(o,s)&&e.comparePoint(s)===0,c=ts(n,h)&&this.comparePoint(h)===0,g=ts(o,a)&&e.comparePoint(a)===0;if(d&&u)return g&&!c?a:!g&&c?h:null;if(d)return c&&s.x===h.x&&s.y===h.y?null:s;if(u)return g&&a.x===l.x&&a.y===l.y?null:l;if(g&&c)return null;if(g)return a;if(c)return h;var f=Hk(s,this.vector(),l,e.vector());return f===null||!ts(r,f)?null:es.round(f.x,f.y)}},{key:"split",value:function(e){var n=[],o=e.events!==void 0,r=new mi(e,!0),s=new mi(e,!1),a=this.rightSE;this.replaceRightSE(s),n.push(s),n.push(r);var l=new i(r,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(),o&&(r.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,o=this.windings.length;n<o;n++)this.windings[n]*=-1}},{key:"consume",value:function(e){for(var n=this,o=e;n.consumedBy;)n=n.consumedBy;for(;o.consumedBy;)o=o.consumedBy;var r=i.compare(n,o);if(r!==0){if(r>0){var s=n;n=o,o=s}if(n.prev===o){var a=n;n=o,o=a}for(var l=0,h=o.rings.length;l<h;l++){var u=o.rings[l],d=o.windings[l],c=n.rings.indexOf(u);c===-1?(n.rings.push(u),n.windings.push(d)):n.windings[c]+=d}o.rings=null,o.windings=null,o.consumedBy=n,o.leftSE.consumedBy=n.leftSE,o.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,o=this._afterState.windings,r=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),o.push(h)):o[u]+=h}for(var d=[],c=[],g=0,f=n.length;g<f;g++)if(o[g]!==0){var m=n[g],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;r.indexOf(x)===-1&&r.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(ri.type){case"union":{var o=e.length===0,r=n.length===0;this._isInResult=o!==r;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===ri.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(ri.type))}return this._isInResult}}],[{key:"fromRing",value:function(e,n,o){var r,s,a,l=mi.comparePoints(e,n);if(l<0)r=e,s=n,a=1;else if(l>0)r=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(r,!0),u=new mi(s,!1);return new i(h,u,[o],[a])}}]),i}(),um=function(){function i(t,e,n){if(Ke(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 o=es.round(t[0][0],t[0][1]);this.bbox={ll:{x:o.x,y:o.y},ur:{x:o.x,y:o.y}};for(var r=o,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===r.x&&l.y===r.y||(this.segments.push(Xa.fromRing(r,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),r=l)}(o.x!==r.x||o.y!==r.y)&&this.segments.push(Xa.fromRing(r,o,this))}return Ee(i,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,o=this.segments.length;n<o;n++){var r=this.segments[n];e.push(r.leftSE),e.push(r.rightSE)}return e}}]),i}(),Jk=function(){function i(t,e){if(Ke(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,o=t.length;n<o;n++){var r=new um(t[n],this,!1);r.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=r.bbox.ll.x),r.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=r.bbox.ll.y),r.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=r.bbox.ur.y),this.interiorRings.push(r)}this.multiPoly=e}return Ee(i,[{key:"getSweepEvents",value:function(){for(var e=this.exteriorRing.getSweepEvents(),n=0,o=this.interiorRings.length;n<o;n++)for(var r=this.interiorRings[n].getSweepEvents(),s=0,a=r.length;s<a;s++)e.push(r[s]);return e}}]),i}(),dm=function(){function i(t,e){if(Ke(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,o=t.length;n<o;n++){var r=new Jk(t[n],this);r.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=r.bbox.ll.x),r.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=r.bbox.ll.y),r.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=r.bbox.ur.y),this.polys.push(r)}this.isSubject=e}return Ee(i,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,o=this.polys.length;n<o;n++)for(var r=this.polys[n].getSweepEvents(),s=0,a=r.length;s<a;s++)e.push(r[s]);return e}}]),i}(),Qk=function(){Ee(i,null,[{key:"factory",value:function(e){for(var n=[],o=0,r=e.length;o<r;o++){var s=e[o];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 g=l.getAvailableLinkedEvents();if(g.length===0){var f=u[0].point,m=u[u.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(f.x,",")+" ".concat(f.y,"]. Last matching segment found ends at")+" [".concat(m.x,", ").concat(m.y,"]."))}if(g.length===1){h=g[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=g.sort(k)[0].otherSE;break}n.push(new i(u))}}return n}}]);function i(t){Ke(this,i),this.events=t;for(var e=0,n=t.length;e<n;e++)t[e].segment.ringOut=this;this.poly=null}return Ee(i,[{key:"getGeom",value:function(){for(var e=this.events[0].point,n=[e],o=1,r=this.events.length-1;o<r;o++){var s=this.events[o].point,a=this.events[o+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,g=[],f=d;f!=c;f+=u)g.push([n[f].x,n[f].y]);return g}},{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,o=this.events.length;n<o;n++){var r=this.events[n];mi.compare(e,r)>0&&(e=r)}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){Ke(this,i),this.exteriorRing=t,t.poly=this,this.interiorRings=[]}return Ee(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,o=this.interiorRings.length;n<o;n++){var r=this.interiorRings[n].getGeom();r!==null&&e.push(r)}return e}}]),i}(),tw=function(){function i(t){Ke(this,i),this.rings=t,this.polys=this._composePolys(t)}return Ee(i,[{key:"getGeom",value:function(){for(var e=[],n=0,o=this.polys.length;n<o;n++){var r=this.polys[n].getGeom();r!==null&&e.push(r)}return e}},{key:"_composePolys",value:function(e){for(var n=[],o=0,r=e.length;o<r;o++){var s=e[o];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}(),ew=function(){function i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xa.compare;Ke(this,i),this.queue=t,this.tree=new Wu(e),this.segments=[]}return Ee(i,[{key:"process",value:function(e){var n=e.segment,o=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(n),o;var r=e.isLeft?this.tree.insert(n):this.tree.find(n);if(!r)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=r,a=r,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),g=0,f=c.length;g<f;g++)o.push(c[g])}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++)o.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),o.push(n.rightSE);for(var w=n.split(x),E=0,M=w.length;E<M;E++)o.push(w[E])}o.length>0?(this.tree.remove(n),o.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 z=this._splitSafely(l,S),P=0,G=z.length;P<G;P++)o.push(z[P]);if(!h.isAnEndpoint(S))for(var A=this._splitSafely(h,S),at=0,B=A.length;at<B;at++)o.push(A[at])}}this.tree.remove(n)}return o}},{key:"_splitSafely",value:function(e,n){this.tree.remove(e);var o=e.rightSE;this.queue.remove(o);var r=e.split(n);return r.push(o),e.consumedBy===void 0&&this.tree.insert(e),r}}]),i}(),gm=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,iw=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,nw=function(){function i(){Ke(this,i)}return Ee(i,[{key:"run",value:function(e,n,o){ri.type=e,es.reset();for(var r=[new dm(n,!0)],s=0,a=o.length;s<a;s++)r.push(new dm(o[s],!1));if(ri.numMultiPolys=r.length,ri.type==="difference")for(var l=r[0],h=1;h<r.length;)Uu(r[h].bbox,l.bbox)!==null?h++:r.splice(h,1);if(ri.type==="intersection"){for(var u=0,d=r.length;u<d;u++)for(var c=r[u],g=u+1,f=r.length;g<f;g++)if(Uu(c.bbox,r[g].bbox)===null)return[]}for(var m=new Wu(mi.compare),p=0,_=r.length;p<_;p++)for(var v=r[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 ew(m),w=m.size,E=m.pop();E;){var M=E.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>iw)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var z=k.process(M),P=0,G=z.length;P<G;P++){var A=z[P];A.consumedBy===void 0&&m.insert(A)}w=m.size,E=m.pop()}es.reset();var at=Qk.factory(k.segments),B=new tw(at);return B.getGeom()}}]),i}(),ri=new nw,ow=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return ri.run("union",t,n)},rw=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return ri.run("intersection",t,n)},sw=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return ri.run("xor",t,n)},aw=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return ri.run("difference",t,n)},lw={union:ow,intersection:rw,xor:sw,difference:aw};function fm(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 hw(i,t,e){e===void 0&&(e={});for(var n=0,o=i;n<o.length;n++){var r=o[n];if(r.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<r[r.length-1].length;s++)if(r[r.length-1][s]!==r[0][s])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:i};return fm(a,t,e)}function uw(i,t,e){e===void 0&&(e={});var n={type:"MultiPolygon",coordinates:i};return fm(n,t,e)}function mm(i){return i.type==="Feature"?i.geometry:i}function dw(i,t,e){e===void 0&&(e={});var n=mm(i),o=mm(t),r=lw.union(n.coordinates,o.coordinates);return r.length===0?null:r.length===1?hw(r[0],e.properties):uw(r,e.properties)}function qu(i,t){const e=hc(i),n=Math.round(e*100)/100,o=n/1e4;let r;return t==="m2"?r=n+" m\xB2":t==="ha"&&(r=o+" ha"),r}function ns(i,t,e){const n=t.getExtent();return i.getView().fit(ui(n,e))}function Ua(i,t){const[e,n,o]=Array.from(kr(i));return ql([e,n,o,t])}const cw="https://api.os.uk/features/v1/wfs",Ho=new hn,pi=new hn;function gw(i,t,e){return new Qn({source:pi,style:new le({stroke:e?void 0:new ke({width:3,color:i}),fill:new fe({color:t?Ua(i,.2):Ua(i,0)})})})}function pm(i,t,e){const n=`
25
+ `)}var l=e+","+t+","+i+","+n,h=Zg[l];if(!h){var u=i.split(" ");if(u.length>1){var d=$g();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;ho(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(ho(w,n)<f*.35){var C=x>0?ho(m[x-1],n):1/0,M=x<k-1?ho(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,z=m.length-1;S<z;++S){var P=m[S],j=m[S+1];if(ho(P,n)>f*.7&&ho(j,n)<f*.6){var A=P.split(" "),lt=A.pop();ho(lt,n)<f*.2&&(m[S]=A.join(" "),m[S+1]=lt+" "+j),z-=1}}h=m.join(`
26
+ `)}else h=i;h=Du(h,n),Zg[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=Zb(i,t);if(e.result==="error")throw new Error(e.value.map(function(n){return n.key+": "+n.message}).join(", "));return e.value},Fu={},Wa={zoom:0},Va,Nu;function nt(i,t,e,n,o,r,s){var a=i.id;r||(r={},console.warn("No functionCache provided to getValue()")),r[a]||(r[a]={});var l=r[a];if(!l[e]){var h=(i[t]||Fu)[e],u=Og[t+"_"+i.type][e];h===void 0&&(h=u.default);var d=$b(h);if(!d&&Lg(h)&&(h=Xx(h,u),d=!0),d){var c=gk(h,u);l[e]=c.evaluate.bind(c)}else u.type=="color"&&(h=Rt.parse(h)),l[e]=function(){return h}}return Wa.zoom=n,l[e](Wa,o,s)}function mk(i,t,e,n){var o=nt(i,"layout","icon-allow-overlap",t,e,n);if(!o)return"declutter";var r=nt(i,"layout","icon-ignore-placement",t,e,n);return r?"none":"obstacle"}function pk(i,t,e,n,o){return o||console.warn("No filterCache provided to evaluateFilter()"),i in o||(o[i]=Jb(t).filter),Wa.zoom=n,o[i](Wa,e)}function uo(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,o,r,s){if(n===void 0&&(n=hk),o===void 0&&(o=void 0),r===void 0&&(r=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(r){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=r}else if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope){var u=self;u.postMessage({action:"loadImage",src:r}),u.addEventListener("message",function(W){W.data.action==="imageLoaded"&&W.data.src===r&&(a=W.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 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 z=c[C];z||(z=[],c[C]=z),z.push({layer:k,index:y}),f.push(w)}}var P=new Me,j=new ae,A=[],lt=function(B,W){var N=B.getProperties(),$=c[N.layer];if(!!$){var D=n.indexOf(W);D==-1&&(D=uk(W,n));for(var Q=ck[B.getGeometry().getType()],V={properties:N,type:Q},I=i.get("mapbox-featurestate")[B.getId()],st=-1,b=0,T=$.length;b<T;++b){var Z=$[b],E=Z.layer,J=E.id,q=E.layout||Fu,yt=E.paint||Fu;if(!(q.visibility==="none"||"minzoom"in E&&D<E.minzoom||"maxzoom"in E&&D>=E.maxzoom)){var St=E.filter;if(!St||pk(J,St,V,D,_)){var xt=void 0,Et=void 0,Ot=void 0,Lt=void 0,Bt=void 0,O=void 0,dt=Z.index;if(Q==3&&(E.type=="fill"||E.type=="fill-extrusion"))if(Et=nt(E,"paint",E.type+"-opacity",D,V,p,I),E.type+"-pattern"in yt){var _t=nt(E,"paint",E.type+"-pattern",D,V,p,I);if(_t){var wt=typeof _t=="string"?Gu(_t,N):_t.toString();if(a&&o&&o[wt]){++st,O=A[st],(!O||!O.getFill()||O.getStroke()||O.getText())&&(O=new ee({fill:new ae}),A[st]=O),Ot=O.getFill(),O.setZIndex(dt);var bt=wt+"."+Et,at=m[bt];if(!at){var ot=o[wt],Mt=qg(ot.width,ot.height),zt=Mt.getContext("2d");zt.globalAlpha=Et,zt.drawImage(a,ot.x,ot.y,ot.width,ot.height,0,0,ot.width,ot.height),at=zt.createPattern(Mt,"repeat"),m[bt]=at}Ot.setColor(at)}}}else xt=uo(nt(E,"paint",E.type+"-color",D,V,p,I),Et),E.type+"-outline-color"in yt&&(Bt=uo(nt(E,"paint",E.type+"-outline-color",D,V,p,I),Et)),Bt||(Bt=xt),(xt||Bt)&&(++st,O=A[st],(!O||xt&&!O.getFill()||!xt&&O.getFill()||Bt&&!O.getStroke()||!Bt&&O.getStroke()||O.getText())&&(O=new ee({fill:xt?new ae:void 0,stroke:Bt?new Me:void 0}),A[st]=O),xt&&(Ot=O.getFill(),Ot.setColor(xt)),Bt&&(Lt=O.getStroke(),Lt.setColor(Bt),Lt.setWidth(.5)),O.setZIndex(dt));if(Q!=1&&E.type=="line"){xt=!("line-pattern"in yt)&&"line-color"in yt?uo(nt(E,"paint","line-color",D,V,p,I),nt(E,"paint","line-opacity",D,V,p,I)):void 0;var Ut=nt(E,"paint","line-width",D,V,p,I);xt&&Ut>0&&(++st,O=A[st],(!O||!O.getStroke()||O.getFill()||O.getText())&&(O=new ee({stroke:new Me}),A[st]=O),Lt=O.getStroke(),Lt.setLineCap(nt(E,"layout","line-cap",D,V,p,I)),Lt.setLineJoin(nt(E,"layout","line-join",D,V,p,I)),Lt.setMiterLimit(nt(E,"layout","line-miter-limit",D,V,p,I)),Lt.setColor(xt),Lt.setWidth(Ut),Lt.setLineDash(yt["line-dasharray"]?nt(E,"paint","line-dasharray",D,V,p,I).map(function(je){return je*Ut}):null),O.setZIndex(dt))}var kt=!1,ct=null,Ft=0,Tt=void 0,ft=void 0,ce=void 0;if((Q==1||Q==2)&&"icon-image"in q){var Xe=nt(E,"layout","icon-image",D,V,p,I);if(Xe){Tt=typeof Xe=="string"?Gu(Xe,N):Xe.toString();var qt=void 0;if(a&&o&&o[Tt]){var Re=nt(E,"layout","icon-rotation-alignment",D,V,p,I);if(Q==2){var Wt=B.getGeometry();if(Wt.getFlatMidpoint||Wt.getFlatMidpoints){var Qt=Wt.getExtent(),Rn=Math.sqrt(Math.max(Math.pow((Qt[2]-Qt[0])/W,2),Math.pow((Qt[3]-Qt[1])/W,2)));if(Rn>150){var ue=Wt.getType()==="MultiLineString"?Wt.getFlatMidpoints():Wt.getFlatMidpoint();Nu||(Va=[NaN,NaN],Nu=new Xh("Point",Va,[],{},null)),qt=Nu,Va[0]=ue[0],Va[1]=ue[1];var Ye=nt(E,"layout","symbol-placement",D,V,p,I);if(Ye==="line"&&Re==="map")for(var ye=Wt.getStride(),Ge=Wt.getFlatCoordinates(),Bi=0,ll=Ge.length-ye;Bi<ll;Bi+=ye){var fe=Ge[Bi],wi=Ge[Bi+1],xe=Ge[Bi+ye],qe=Ge[Bi+ye+1],Ae=Math.min(fe,xe),lr=Math.min(wi,qe),hr=Math.max(fe,xe),be=Math.max(wi,qe);if(ue[0]>=Ae&&ue[0]<=hr&&ue[1]>=lr&&ue[1]<=be){Ft=Math.atan2(wi-qe,xe-fe);break}}}}}if(Q!==2||qt){var Pe=nt(E,"layout","icon-size",D,V,p,I),ne=yt["icon-color"]!==void 0?nt(E,"paint","icon-color",D,V,p,I):null;if(!ne||ne.a!==0){var bs=Tt+"."+Pe;if(ne!==null&&(bs+="."+ne),ft=g[bs],!ft){var ks=o[Tt],kE=mk(E,D,V,p),gd=void 0;"icon-offset"in q&&(gd=nt(E,"layout","icon-offset",D,V,p,I),gd[1]*=-1),ft=new ga({color:ne?[ne.r*255,ne.g*255,ne.b*255,ne.a]:void 0,img:a,imgSize:l,size:[ks.width,ks.height],offset:[ks.x,ks.y],rotateWithView:Re==="map",scale:Pe/ks.pixelRatio,displacement:gd,declutterMode:kE}),g[bs]=ft}}ft&&(++st,O=A[st],(!O||!O.getImage()||O.getFill()||O.getStroke())&&(O=new ee,A[st]=O),O.setGeometry(qt),ft.setRotation(Ft+Pu(nt(E,"layout","icon-rotate",D,V,p,I))),ft.setOpacity(nt(E,"paint","icon-opacity",D,V,p,I)),ft.setAnchor(fk[nt(E,"layout","icon-anchor",D,V,p,I)]),O.setImage(ft),ct=O.getText(),O.setText(void 0),O.setZIndex(dt),kt=!0,ce=!1)}else ce=!0}}}if(Q==1&&E.type==="circle"){++st,O=A[st],(!O||!O.getImage()||O.getFill()||O.getStroke())&&(O=new ee,A[st]=O);var bp="circle-radius"in yt?nt(E,"paint","circle-radius",D,V,p,I):5,md=uo(nt(E,"paint","circle-stroke-color",D,V,p,I),nt(E,"paint","circle-stroke-opacity",D,V,p,I)),pd=uo(nt(E,"paint","circle-color",D,V,p,I),nt(E,"paint","circle-opacity",D,V,p,I)),vd=nt(E,"paint","circle-stroke-width",D,V,p,I),kp=bp+"."+md+"."+pd+"."+vd;ft=g[kp],ft||(ft=new sn({radius:bp,stroke:md&&vd>0?new Me({width:vd,color:md}):void 0,fill:pd?new ae({color:pd}):void 0,declutterMode:"none"}),g[kp]=ft),O.setImage(ft),ct=O.getText(),O.setText(void 0),O.setGeometry(void 0),O.setZIndex(dt),kt=!0}var ge=void 0,ws=void 0,Ms=void 0,An=void 0,Cs=void 0,_d=void 0;if("text-field"in q){An=Math.round(nt(E,"layout","text-size",D,V,p,I));var yd=nt(E,"layout","text-font",D,V,p,I);Ms=nt(E,"layout","text-line-height",D,V,p,I),ws=Yg(s?s(yd):yd,An,Ms),ws.includes("sans-serif")||(ws+=",sans-serif"),Cs=nt(E,"layout","text-letter-spacing",D,V,p,I),_d=nt(E,"layout","text-max-width",D,V,p,I);var ur=nt(E,"layout","text-field",D,V,p,I);typeof ur=="object"&&ur.sections?ur.sections.length===1?ge=ur.toString():ge=ur.sections.reduce(function(je,Pn,PE){var zp=Pn.fontStack?Pn.fontStack.split(","):yd,Cd=Yg(s?s(zp):zp,An*(Pn.scale||1),Ms),dr=Pn.text;if(dr===`
27
+ `)return je.push(`
28
+ `,""),je;if(Q==2){je.push(Du(dr,Cs),Cd);return}dr=Ou(dr,Cd,_d,Cs).split(`
29
+ `);for(var ul=0,ME=dr.length;ul<ME;++ul)ul>0&&je.push(`
30
+ `,""),je.push(dr[ul],Cd);return je},[]):ge=Gu(ur,N).trim(),Et=nt(E,"paint","text-opacity",D,V,p,I)}if(ge&&Et&&!ce){kt||(++st,O=A[st],(!O||!O.getText()||O.getFill()||O.getStroke())&&(O=new ee,A[st]=O),O.setImage(void 0),O.setGeometry(void 0)),O.getText()||O.setText(ct||new pf({padding:[2,2,2,2]})),ct=O.getText();var wp=q["text-transform"];wp=="uppercase"?ge=Array.isArray(ge)?ge.map(function(je,Pn){return Pn%2?je:je.toUpperCase()}):ge.toUpperCase():wp=="lowercase"&&(ge=Array.isArray(ge)?ge.map(function(je,Pn){return Pn%2?je:je.toLowerCase()}):ge.toLowerCase());var Mp=Array.isArray(ge)?ge:Q==2?Du(ge,Cs):Ou(ge,ws,_d,Cs);ct.setText(Mp),ct.setFont(ws),ct.setRotation(Pu(nt(E,"layout","text-rotate",D,V,p,I)));var hl=nt(E,"layout","text-anchor",D,V,p,I),xd=kt||Q==1?"point":nt(E,"layout","symbol-placement",D,V,p,I);ct.setPlacement(xd),ct.setOverflow(xd==="point");var go=nt(E,"paint","text-halo-width",D,V,p,I),Cp=nt(E,"layout","text-offset",D,V,p,I),Ep=nt(E,"paint","text-translate",D,V,p,I),bd=0,kd=0;if(xd=="point"){var wd="center";hl.indexOf("left")!==-1?(wd="left",kd=go):hl.indexOf("right")!==-1&&(wd="right",kd=-go),ct.setTextAlign(wd);var wE=nt(E,"layout","text-rotation-alignment",D,V,p,I);ct.setRotateWithView(wE=="map")}else ct.setMaxAngle(Pu(nt(E,"layout","text-max-angle",D,V,p,I))*ge.length/Mp.length),ct.setTextAlign(),ct.setRotateWithView(!1);var Md="middle";hl.indexOf("bottom")==0?(Md="bottom",bd=-go-.5*(Ms-1)*An):hl.indexOf("top")==0&&(Md="top",bd=go+.5*(Ms-1)*An),ct.setTextBaseline(Md);var Sp=nt(E,"layout","text-justify",D,V,p,I);ct.setJustify(Sp==="auto"?void 0:Sp),ct.setOffsetX(Cp[0]*An+kd+Ep[0]),ct.setOffsetY(Cp[1]*An+bd+Ep[1]),j.setColor(uo(nt(E,"paint","text-color",D,V,p,I),Et)),ct.setFill(j);var Tp=uo(nt(E,"paint","text-halo-color",D,V,p,I),Et);if(Tp){P.setColor(Tp),go*=2;var Ip=.5*An;P.setWidth(go<=Ip?go:Ip),ct.setStroke(P)}else ct.setStroke(void 0);var Es=nt(E,"layout","text-padding",D,V,p,I),Ss=ct.getPadding();Es!==Ss[0]&&(Ss[0]=Es,Ss[1]=Es,Ss[2]=Es,Ss[3]=Es),O.setZIndex(dt)}}}}if(st>-1)return A.length=st+1,A}};return i.setStyle(lt),i.set("mapbox-source",v),i.set("mapbox-layers",f),i.set("mapbox-featurestate",{}),lt}new Jn;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:hg({extent:Ia(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 Kg=yk,Hg='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class xk extends Kg{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[Hg];const n=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",o=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:o,wrapX:t.wrapX,zDirection:t.zDirection})}}const bk=xk;function Qg(i,t=[]){return(...e)=>(n=>n.length>=i.length?i(...n):Qg(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 o=e.length;for(;n<o;)t=i(t,e[n],n,e),n++;return t}const Mk=Qg(wk);function Ck(i){return typeof i=="string"?i[i.length-1]||"":i[i.length-1]}function Jg(i,t){return arguments.length===1?e=>Jg(i,e):i*t}Mk(Jg,1);function tm(i,t){if(arguments.length===1)return o=>tm(i,o);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 RE=Rp``,Ek="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iYSIKICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZpZXdCb3g9IjAgMCA0MCA1MCI+CiAgPGRlZnM+CiAgICA8c3R5bGU+LmMsLmQsLmV7ZmlsbDpub25lO30uZHtzdHJva2Utd2lkdGg6MnB4O30uZCwuZXtzdHJva2U6IzAwMDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9LmZ7Y2xpcC1wYXRoOnVybCgjYik7fS5ne2ZpbGwtcnVsZTpldmVub2RkO308L3N0eWxlPgogICAgPGNsaXBQYXRoIGlkPSJiIj4KICAgICAgPHJlY3QgY2xhc3M9ImMiIHg9IjMuNTEiIHk9IjMuNDgiIHdpZHRoPSIzMi42OCIgaGVpZ2h0PSIzMi42OCIvPgogICAgPC9jbGlwUGF0aD4KICA8L2RlZnM+CiAgPGcgY2xhc3M9ImYiPgogICAgPHBhdGggY2xhc3M9ImciIGQ9Ik0xNy4yNiwzLjQ4djYuNTRoMS4yM1Y1Ljc2bDIuNjQsNC4yNmgxLjMyVjMuNDhoLTEuMjNWNy44NWwtMi42OC00LjM3aC0xLjI4WiIvPgogIDwvZz4KICA8Y2lyY2xlIGNsYXNzPSJlIiBjeD0iMTkuOTYiIGN5PSIzMS40IiByPSIxNS4wNyIvPgogIDxsaW5lIGNsYXNzPSJkIiB4MT0iMTkuOTYiIHkxPSIxNi4zMyIgeDI9IjE5Ljk2IiB5Mj0iMzEuMjYiLz4KPC9zdmc+",Sk="data:image/svg+xml;base64,PHN2ZyBpZD0iaWNvbiIKICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+LmNscy0xe2ZpbGw6bm9uZTt9PC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPnRyYXNoLWNhbjwvdGl0bGU+CiAgPHJlY3QgZmlsbD0id2hpdGUiIHg9IjEyIiB5PSIxMiIgd2lkdGg9IjIiIGhlaWdodD0iMTIiLz4KICA8cmVjdCBmaWxsPSJ3aGl0ZSIgeD0iMTgiIHk9IjEyIiB3aWR0aD0iMiIgaGVpZ2h0PSIxMiIvPgogIDxwYXRoIGZpbGw9IndoaXRlIiBkPSJNNCw2VjhINlYyOGEyLDIsMCwwLDAsMiwySDI0YTIsMiwwLDAsMCwyLTJWOGgyVjZaTTgsMjhWOEgyNFYyOFoiLz4KICA8cmVjdCBmaWxsPSJ3aGl0ZSIgeD0iMTIiIHk9IjIiIHdpZHRoPSI4IiBoZWlnaHQ9IjIiLz4KICA8cmVjdCBmaWxsPSJ3aGl0ZSIgaWQ9Il9UcmFuc3BhcmVudF9SZWN0YW5nbGVfIiBkYXRhLW5hbWU9IiZsdDtUcmFuc3BhcmVudCBSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTEiIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIvPgo8L3N2Zz4=";function Tk(i){return new B_({units:"metric",bar:i,steps:4,text:!1,minWidth:140})}function Ik(){const i=document.createElement("img");i.src=Ek,i.title="North";const t=document.createElement("div");return t.className="north-arrow-control ol-unselectable ol-control",t.appendChild(i),new wo({element:t})}function zk(i,t){const e=document.createElement("button");if(e.title="Reset map view",t==="unicode")e.innerHTML="↻";else{const o=document.createElement("img");o.className="reset-icon",o.src=Sk,e.appendChild(o)}e.addEventListener("click",i,!1);const n=document.createElement("div");return n.className="reset-control ol-unselectable ol-control",n.appendChild(e),new wo({element:n})}const Xa=new cn({features:[],wrapX:!1}),Rk=new eo({source:Xa,properties:{name:"pointsLayer"},style:new ee({image:new sn({radius:3,fill:new ae({color:"grey"})})})});function Ak(i,t){var n,o,r;const e=i&&((r=(o=(n=i.getSource())==null?void 0:n.getFeaturesInExtent(t))==null?void 0:o.filter(s=>{var a;return((a=s.getGeometry())==null?void 0:a.getType())!=="Point"}))==null?void 0:r.flatMap(s=>s.flatCoordinates_));if(e)return tm(2,e).forEach((s,a)=>{Xa.addFeature(new Ri({geometry:new ri(s),i:a}))})}const em=new ma({stroke:new Me({color:"red",width:2}),points:4,radius1:15,radius2:1}),im=new sn({radius:6,fill:new ae({color:"#ff0000"})}),nm={color:"#ff0000",width:3},Pk=new Me(nm),Dk=new Me({...nm,lineDash:[2,8]}),om=new ae({color:"rgba(255, 0, 0, 0.1)"}),Lk=new ee({image:new ma({fill:new ae({color:"#fff"}),stroke:new Me({color:"#ff0000",width:2}),points:4,radius:5,angle:Math.PI/4}),geometry:function(i){const t=i.getGeometry();if(t instanceof Kn){const e=t.getCoordinates()[0];return new Dr(e)}else return}}),Ok=[new ee({fill:om,stroke:Pk}),Lk];function Fk(i){return new ee({stroke:Dk,fill:om,image:i==="crosshair"?em:im})}function Nk(i){return new ee({image:new sn({radius:9,fill:new ae({color:i})})})}function Gk(i){return new ee({fill:new ae({color:i})})}const Ni=new cn;function jk(i,t){return new eo({source:Ni,style:i==="Polygon"?Ok:Nk(t)})}function Bk(i,t,e){return new Jy({source:Ni,type:i,style:i==="Polygon"?Fk(t):Gk(e)})}const rm=new rx({source:Xa,pixelTolerance:15});function Uk(i){return new nx({source:Ni,style:new ee({image:i==="crosshair"?em:im})})}const Wk="data:image/svg+xml;base64,77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgdmVyc2lvbj0iMS4xIgogICB3aWR0aD0iMTAwIgogICBoZWlnaHQ9IjEwMCIKICAgaWQ9InN2ZzQ0NjAiCiAgIHNvZGlwb2RpOmRvY25hbWU9InVFQTE3LXBvaS1hbHQuc3ZnIgogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjAgKDQwMzVhNGZiNDksIDIwMjAtMDUtMDEpIj4KICA8c29kaXBvZGk6bmFtZWR2aWV3CiAgICAgcGFnZWNvbG9yPSIjZmZmZmZmIgogICAgIGJvcmRlcmNvbG9yPSIjNjY2NjY2IgogICAgIGJvcmRlcm9wYWNpdHk9IjEiCiAgICAgb2JqZWN0dG9sZXJhbmNlPSIxMCIKICAgICBncmlkdG9sZXJhbmNlPSIxMCIKICAgICBndWlkZXRvbGVyYW5jZT0iMTAiCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAiCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiIKICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE5MjAiCiAgICAgaW5rc2NhcGU6d2luZG93LWhlaWdodD0iMTAxNyIKICAgICBpZD0ibmFtZWR2aWV3MTEiCiAgICAgc2hvd2dyaWQ9ImZhbHNlIgogICAgIGlua3NjYXBlOnpvb209IjIuODU2NzExNCIKICAgICBpbmtzY2FwZTpjeD0iLTMxLjM3NjY1NyIKICAgICBpbmtzY2FwZTpjeT0iNTkuNTAwMTg0IgogICAgIGlua3NjYXBlOndpbmRvdy14PSItOCIKICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTgiCiAgICAgaW5rc2NhcGU6d2luZG93LW1heGltaXplZD0iMSIKICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJzdmc0NDYwIgogICAgIGlua3NjYXBlOmRvY3VtZW50LXJvdGF0aW9uPSIwIiAvPgogIDxkZWZzCiAgICAgaWQ9ImRlZnM0NDYyIiAvPgogIDxtZXRhZGF0YQogICAgIGlkPSJtZXRhZGF0YTQ0NjUiPgogICAgPHJkZjpSREY+CiAgICAgIDxjYzpXb3JrCiAgICAgICAgIHJkZjphYm91dD0iIj4KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4KICAgICAgICA8ZGM6dHlwZQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiIC8+CiAgICAgICAgPGRjOnRpdGxlIC8+CiAgICAgIDwvY2M6V29yaz4KICAgIDwvcmRmOlJERj4KICA8L21ldGFkYXRhPgogIDxwYXRoCiAgICAgZD0ibSA0Ny43ODE2MTQsNTUuMzU5OTU4IGMgNS41MTMyOSwwLjYzNDc4IDEwLjY4NzA5LC0xLjA0ODYzNCAxNC42Mzg1MjIsLTQuNzYzMDQ1IDQuMDEyMzI3LC0zLjc3MTIxNyA1LjgxNzEzMSwtNy45MTQzODggNS44MTcxMzEsLTEzLjM1NDE1OCAwLC01LjUwNzMzNyAtMS44MjMwNTIsLTkuNjMyODM1IC01Ljk1NTI1OSwtMTMuNDc4MTA4IC0xLjgyNjIzNiwtMS42OTkwMzkgLTQuMjI3MDUzLC0zLjA5NDUzNSAtNi44NDQyOTcsLTMuOTc3OTU0IC0yLjE0MDA0OCwtMC43MjI0OTUgLTYuODgyNywtMC45MDI0MDYgLTkuNDI2OTUyLC0wLjM1NzcyNiAtMi44MzI2MDQsMC42MDYyMzggLTYuMjAzMDg3LDIuMzY0OTE2IC04LjMzNTI5Miw0LjM0ODkxNCAtMy45OTAwNDgsMy43MTI0ODcgLTUuOTAxNzkxLDguMDc1MDE3IC01LjkwMTc5MSwxMy40NjUwNjQgMCwzLjIzMTM2IDAuNDcyMSw1LjI1NTEyNSAxLjkxNTU2Miw4LjIwNjI2IDEuMDUwMDgsMi4xNDY2OCAxLjQ0Mzg4NiwyLjY4MjA5NSAzLjQwNTkxNiw0LjYzMzEzNSAxLjcwODA1LDEuNjk4NTc0IDIuNjQ1MDQ0LDIuNDI1MDQxIDQuMDc0MjkxLDMuMTU4MzQgMi4zNTQ1NjMsMS4yMDgxMDIgNC40MDUwNzEsMS44NjUyNyA2LjYxMjE2OSwyLjExOTQ2OCB6IG0gMS4wMzYwNzYsNDQuMjEzNTUgYyAtMC4zODc4NjUsLTAuMjM1NDQgLTIuMTI2MjU2LC0xLjkyNTMxIC0zLjg2NDQzNywtMy43NTU1MyBDIDMxLjYzOTM2Niw4MS43OTg1NTggMjIuMzQ1MjM3LDY4LjE2MTE3MyAxNy4zMDAyMzEsNTUuMjQxMTQ3IDE1Ljc4MjI5NCw1MS4zNTQxNDEgMTUuMjE5ODAzLDQ5LjM5MTE1NiAxNC42MjU0ODYsNDUuOTExMjg0IDEyLjgwMjQzNiwzNS4yNDAxMyAxNC45ODU3NjksMjQuODE3MzIxIDIwLjg5Njg5NiwxNS45NTExNjUgMjMuMTQ3MjgsMTIuNTc2MzAyIDI3LjcxMjU0OCw4LjAwMDcxMzQgMzAuOTcxNjM0LDUuODUzNDQyNCBjIDExLjg5MTY0NCwtNy44MzUyNTcgMjYuMjIwMTcxLC03LjgwMjY1NyAzOC4xNjY1NSwwLjA4Njg4IDMuMTAwMzc3LDIuMDQ3MzU2IDcuNzEwODQsNi43MDE4NDI2IDkuOTA1NjMxLDkuOTk5Nzk0NiA0LjAxODQ4MSw2LjAzODg2NSA2LjE2MDAxNCwxMi4yMzcyNTkgNi44MTA1NywxOS43MTQ0NzIgMC41MzEwNyw2LjEwMjYyMyAtMC4zODMyMDgsMTIuMDYwMTU5IC0yLjg2Mjc0NSwxOC42OTQyMDQgLTQuODI1NjE1LDEyLjkwMjU2NiAtMTMuNTk3NTY3LDI1Ljc4MDgxNSAtMjguNzA1NDMyLDQyLjE0NDE0NSAtMy4zNzI4MTUsMy42NTI5OTIgLTMuOTcxMTYyLDMuOTkwMzYyIC01LjQ2ODUxOCwzLjA4MDYyIHoiCiAgICAgc3R5bGU9ImZpbGw6cmdiKDAsIDAsIDApO3N0cm9rZS13aWR0aDo0LjU1MzciCiAgICAgaWQ9InBhdGg0MTM1IgogICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiIC8+Cjwvc3ZnPgo=";var Cn=function(){function i(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return i}();function Vk(i,t){return i>t?1:i<t?-1:0}function En(i,t,e){for(var n=new Cn(null,null),o=n,r=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}r.left=t,r=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}o.right=t,o=t,t=t.right}else break}return o.right=t.left,r.left=t.right,t.left=n.right,t.right=n.left,t}function ju(i,t,e,n){var o=new Cn(i,t);if(e===null)return o.left=o.right=null,o;e=En(i,e,n);var r=n(i,e.key);return r<0?(o.left=e.left,o.right=e,e.left=null):r>=0&&(o.right=e.right,o.left=e,e.right=null),o}function sm(i,t,e){var n=null,o=null;if(t){t=En(i,t,e);var r=e(t.key,i);r===0?(n=t.left,o=t.right):r<0?(o=t.right,t.right=null,n=t):(n=t.left,t.left=null,o=t)}return{left:n,right:o}}function Xk(i,t,e){return t===null?i:(i===null||(t=En(i.key,t,e),t.left=i),t)}function Bu(i,t,e,n,o){if(i){n(""+t+(e?"└── ":"├── ")+o(i)+`
31
+ `);var r=t+(e?" ":"│ ");i.left&&Bu(i.left,r,!1,n,o),i.right&&Bu(i.right,r,!0,n,o)}}var Uu=function(){function i(t){t===void 0&&(t=Vk),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 Cn(t,e);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var o=this._comparator,r=En(t,this._root,o),s=o(t,r.key);return s===0?this._root=r:(s<0?(n.left=r.left,n.right=r,r.left=null):s>0&&(n.right=r.right,n.left=r,r.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 o;if(e===null)return null;e=En(t,e,n);var r=n(t,e.key);return r===0?(e.left===null?o=e.right:(o=En(t,e.left,n),o.right=e.right),this._size--,o):e},i.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=En(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 o=n(t,e.key);if(o===0)return e;o<0?e=e.left:e=e.right}return null},i.prototype.find=function(t){return this._root&&(this._root=En(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 o=n(t,e.key);if(o===0)return!0;o<0?e=e.left:e=e.right}return!1},i.prototype.forEach=function(t,e){for(var n=this._root,o=[],r=!1;!r;)n!==null?(o.push(n),n=n.left):o.length!==0?(n=o.pop(),t.call(e,n),n=n.right):r=!0;return this},i.prototype.range=function(t,e,n,o){for(var r=[],s=this._comparator,a=this._root,l;r.length!==0||a;)if(a)r.push(a),a=a.left;else{if(a=r.pop(),l=s(a.key,e),l>0)break;if(s(a.key,t)>=0&&n.call(o,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,o=0,r=[];!n;)if(e)r.push(e),e=e.left;else if(r.length>0){if(e=r.pop(),o===t)return e;o++,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 o=this._comparator;e;){var r=o(t.key,e.key);if(r===0)break;r<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 o=this._comparator;e;){var r=o(t.key,e.key);if(r===0)break;r<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 qk(this._root)},i.prototype.load=function(t,e,n){e===void 0&&(e=[]),n===void 0&&(n=!1);var o=t.length,r=this._comparator;if(n&&Xu(t,e,0,o-1,r),this._root===null)this._root=Wu(t,e,0,o),this._size=o;else{var s=$k(this.toList(),Yk(t,e),r);o=this._size+o,this._root=Vu({head:s},0,o)}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 o=this._comparator,r=sm(t,this._root,o),s=r.left,a=r.right;o(t,e)<0?a=ju(e,n,a,o):s=ju(e,n,s,o),this._root=Xk(s,a,o)},i.prototype.split=function(t){return sm(t,this._root,this._comparator)},i}();function Wu(i,t,e,n){var o=n-e;if(o>0){var r=e+Math.floor(o/2),s=i[r],a=t[r],l=new Cn(s,a);return l.left=Wu(i,t,e,r),l.right=Wu(i,t,r+1,n),l}return null}function Yk(i,t){for(var e=new Cn(null,null),n=e,o=0;o<i.length;o++)n=n.next=new Cn(i[o],t[o]);return n.next=null,e.next}function qk(i){for(var t=i,e=[],n=!1,o=new Cn(null,null),r=o;!n;)t?(e.push(t),t=t.left):e.length>0?(t=r=r.next=e.pop(),t=t.right):n=!0;return r.next=null,o.next}function Vu(i,t,e){var n=e-t;if(n>0){var o=t+Math.floor(n/2),r=Vu(i,t,o),s=i.head;return s.left=r,i.head=i.head.next,s.right=Vu(i,o+1,e),s}return null}function $k(i,t,e){for(var n=new Cn(null,null),o=n,r=i,s=t;r!==null&&s!==null;)e(r.key,s.key)<0?(o.next=r,r=r.next):(o.next=s,s=s.next),o=o.next;return r!==null?o.next=r:s!==null&&(o.next=s),n.next}function Xu(i,t,e,n,o){if(!(e>=n)){for(var r=i[e+n>>1],s=e-1,a=n+1;;){do s++;while(o(i[s],r)<0);do a--;while(o(i[a],r)>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,o),Xu(i,t,a+1,n,o)}}function Je(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}function am(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 Te(i,t,e){return t&&am(i.prototype,t),e&&am(i,e),i}var is=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},Yu=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,o=t.ur.x<e.ur.x?t.ur.x:e.ur.x,r=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:r},ur:{x:o,y:s}}},Sn=Number.EPSILON;Sn===void 0&&(Sn=Math.pow(2,-52));var Zk=Sn*Sn,qu=function(t,e){if(-Sn<t&&t<Sn&&-Sn<e&&e<Sn)return 0;var n=t-e;return n*n<Zk*t*e?0:t<e?-1:1},Kk=function(){function i(){Je(this,i),this.reset()}return Te(i,[{key:"reset",value:function(){this.xRounder=new lm,this.yRounder=new lm}},{key:"round",value:function(e,n){return{x:this.xRounder.round(e),y:this.yRounder.round(n)}}}]),i}(),lm=function(){function i(){Je(this,i),this.tree=new Uu,this.round(0)}return Te(i,[{key:"round",value:function(e){var n=this.tree.add(e),o=this.tree.prev(n);if(o!==null&&qu(n.key,o.key)===0)return this.tree.remove(e),o.key;var r=this.tree.next(n);return r!==null&&qu(n.key,r.key)===0?(this.tree.remove(e),r.key):e}}]),i}(),ns=new Kk,os=function(t,e){return t.x*e.y-t.y*e.x},hm=function(t,e){return t.x*e.x+t.y*e.y},um=function(t,e,n){var o={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y},s=os(o,r);return qu(s,0)},Ya=function(t){return Math.sqrt(hm(t,t))},Hk=function(t,e,n){var o={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y};return os(r,o)/Ya(r)/Ya(o)},Qk=function(t,e,n){var o={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y};return hm(r,o)/Ya(r)/Ya(o)},dm=function(t,e,n){return e.y===0?null:{x:t.x+e.x/e.y*(n-t.y),y:n}},cm=function(t,e,n){return e.x===0?null:{x:n,y:t.y+e.y/e.x*(n-t.x)}},Jk=function(t,e,n,o){if(e.x===0)return cm(n,o,t.x);if(o.x===0)return cm(t,e,n.x);if(e.y===0)return dm(n,o,t.y);if(o.y===0)return dm(t,e,n.y);var r=os(e,o);if(r==0)return null;var s={x:n.x-t.x,y:n.y-t.y},a=os(s,e)/r,l=os(s,o)/r,h=t.x+l*e.x,u=n.x+a*o.x,d=t.y+l*e.y,c=n.y+a*o.y,f=(h+u)/2,g=(d+c)/2;return{x:f,y:g}},vi=function(){Te(i,null,[{key:"compare",value:function(e,n){var o=i.comparePoints(e.point,n.point);return o!==0?o:(e.point!==n.point&&e.link(n),e.isLeft!==n.isLeft?e.isLeft?1:-1:qa.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){Je(this,i),t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}return Te(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,o=0,r=n.length;o<r;o++){var s=n[o];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 o=this.point.events[n];if(o.segment.consumedBy===void 0)for(var r=n+1;r<e;r++){var s=this.point.events[r];s.consumedBy===void 0&&o.otherSE.point.events===s.otherSE.point.events&&o.segment.consume(s.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var e=[],n=0,o=this.point.events.length;n<o;n++){var r=this.point.events[n];r!==this&&!r.segment.ringOut&&r.segment.isInResult()&&e.push(r)}return e}},{key:"getLeftmostComparator",value:function(e){var n=this,o=new Map,r=function(a){var l=a.otherSE;o.set(a,{sine:Hk(n.point,e.point,l.point),cosine:Qk(n.point,e.point,l.point)})};return function(s,a){o.has(s)||r(s),o.has(a)||r(a);var l=o.get(s),h=l.sine,u=l.cosine,d=o.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}(),tw=0,qa=function(){Te(i,null,[{key:"compare",value:function(e,n){var o=e.leftSE.point.x,r=n.leftSE.point.x,s=e.rightSE.point.x,a=n.rightSE.point.x;if(a<o)return 1;if(s<r)return-1;var l=e.leftSE.point.y,h=n.leftSE.point.y,u=e.rightSE.point.y,d=n.rightSE.point.y;if(o<r){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(o>r){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-o,x=d-h,k=a-r;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,o){Je(this,i),this.id=++tw,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=n,this.windings=o}return Te(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,o=this.rightSE.point,r=this.vector();if(n.x===o.x)return e.x===n.x?0:e.x<n.x?1:-1;var s=(e.y-n.y)/r.y,a=n.x+s*r.x;if(e.x===a)return 0;var l=(e.x-n.x)/r.x,h=n.y+l*r.y;return e.y===h?0:e.y<h?-1:1}},{key:"getIntersection",value:function(e){var n=this.bbox(),o=e.bbox(),r=Yu(n,o);if(r===null)return null;var s=this.leftSE.point,a=this.rightSE.point,l=e.leftSE.point,h=e.rightSE.point,u=is(n,l)&&this.comparePoint(l)===0,d=is(o,s)&&e.comparePoint(s)===0,c=is(n,h)&&this.comparePoint(h)===0,f=is(o,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=Jk(s,this.vector(),l,e.vector());return g===null||!is(r,g)?null:ns.round(g.x,g.y)}},{key:"split",value:function(e){var n=[],o=e.events!==void 0,r=new vi(e,!0),s=new vi(e,!1),a=this.rightSE;this.replaceRightSE(s),n.push(s),n.push(r);var l=new i(r,a,this.rings.slice(),this.windings.slice());return vi.comparePoints(l.leftSE.point,l.rightSE.point)>0&&l.swapEvents(),vi.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),o&&(r.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,o=this.windings.length;n<o;n++)this.windings[n]*=-1}},{key:"consume",value:function(e){for(var n=this,o=e;n.consumedBy;)n=n.consumedBy;for(;o.consumedBy;)o=o.consumedBy;var r=i.compare(n,o);if(r!==0){if(r>0){var s=n;n=o,o=s}if(n.prev===o){var a=n;n=o,o=a}for(var l=0,h=o.rings.length;l<h;l++){var u=o.rings[l],d=o.windings[l],c=n.rings.indexOf(u);c===-1?(n.rings.push(u),n.windings.push(d)):n.windings[c]+=d}o.rings=null,o.windings=null,o.consumedBy=n,o.leftSE.consumedBy=n.leftSE,o.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,o=this._afterState.windings,r=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),o.push(h)):o[u]+=h}for(var d=[],c=[],f=0,g=n.length;f<g;f++)if(o[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;r.indexOf(x)===-1&&r.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(ai.type){case"union":{var o=e.length===0,r=n.length===0;this._isInResult=o!==r;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===ai.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(ai.type))}return this._isInResult}}],[{key:"fromRing",value:function(e,n,o){var r,s,a,l=vi.comparePoints(e,n);if(l<0)r=e,s=n,a=1;else if(l>0)r=n,s=e,a=-1;else throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));var h=new vi(r,!0),u=new vi(s,!1);return new i(h,u,[o],[a])}}]),i}(),fm=function(){function i(t,e,n){if(Je(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 o=ns.round(t[0][0],t[0][1]);this.bbox={ll:{x:o.x,y:o.y},ur:{x:o.x,y:o.y}};for(var r=o,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=ns.round(t[s][0],t[s][1]);l.x===r.x&&l.y===r.y||(this.segments.push(qa.fromRing(r,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),r=l)}(o.x!==r.x||o.y!==r.y)&&this.segments.push(qa.fromRing(r,o,this))}return Te(i,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,o=this.segments.length;n<o;n++){var r=this.segments[n];e.push(r.leftSE),e.push(r.rightSE)}return e}}]),i}(),ew=function(){function i(t,e){if(Je(this,i),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new fm(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,o=t.length;n<o;n++){var r=new fm(t[n],this,!1);r.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=r.bbox.ll.x),r.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=r.bbox.ll.y),r.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=r.bbox.ur.y),this.interiorRings.push(r)}this.multiPoly=e}return Te(i,[{key:"getSweepEvents",value:function(){for(var e=this.exteriorRing.getSweepEvents(),n=0,o=this.interiorRings.length;n<o;n++)for(var r=this.interiorRings[n].getSweepEvents(),s=0,a=r.length;s<a;s++)e.push(r[s]);return e}}]),i}(),gm=function(){function i(t,e){if(Je(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,o=t.length;n<o;n++){var r=new ew(t[n],this);r.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=r.bbox.ll.x),r.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=r.bbox.ll.y),r.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=r.bbox.ur.y),this.polys.push(r)}this.isSubject=e}return Te(i,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,o=this.polys.length;n<o;n++)for(var r=this.polys[n].getSweepEvents(),s=0,a=r.length;s<a;s++)e.push(r[s]);return e}}]),i}(),iw=function(){Te(i,null,[{key:"factory",value:function(e){for(var n=[],o=0,r=e.length;o<r;o++){var s=e[o];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){Je(this,i),this.events=t;for(var e=0,n=t.length;e<n;e++)t[e].segment.ringOut=this;this.poly=null}return Te(i,[{key:"getGeom",value:function(){for(var e=this.events[0].point,n=[e],o=1,r=this.events.length-1;o<r;o++){var s=this.events[o].point,a=this.events[o+1].point;um(s,e,a)!==0&&(n.push(s),e=s)}if(n.length===1)return null;var l=n[0],h=n[1];um(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,o=this.events.length;n<o;n++){var r=this.events[n];vi.compare(e,r)>0&&(e=r)}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}(),mm=function(){function i(t){Je(this,i),this.exteriorRing=t,t.poly=this,this.interiorRings=[]}return Te(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,o=this.interiorRings.length;n<o;n++){var r=this.interiorRings[n].getGeom();r!==null&&e.push(r)}return e}}]),i}(),nw=function(){function i(t){Je(this,i),this.rings=t,this.polys=this._composePolys(t)}return Te(i,[{key:"getGeom",value:function(){for(var e=[],n=0,o=this.polys.length;n<o;n++){var r=this.polys[n].getGeom();r!==null&&e.push(r)}return e}},{key:"_composePolys",value:function(e){for(var n=[],o=0,r=e.length;o<r;o++){var s=e[o];if(!s.poly)if(s.isExteriorRing())n.push(new mm(s));else{var a=s.enclosingRing();a.poly||n.push(new mm(a)),a.poly.addInterior(s)}}return n}}]),i}(),ow=function(){function i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qa.compare;Je(this,i),this.queue=t,this.tree=new Uu(e),this.segments=[]}return Te(i,[{key:"process",value:function(e){var n=e.segment,o=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(n),o;var r=e.isLeft?this.tree.insert(n):this.tree.find(n);if(!r)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=r,a=r,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++)o.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++)o.push(_[v])}if(u!==null||m!==null){var x=null;if(u===null)x=m;else if(m===null)x=u;else{var k=vi.comparePoints(u,m);x=k<=0?u:m}this.queue.remove(n.rightSE),o.push(n.rightSE);for(var w=n.split(x),C=0,M=w.length;C<M;C++)o.push(w[C])}o.length>0?(this.tree.remove(n),o.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 z=this._splitSafely(l,S),P=0,j=z.length;P<j;P++)o.push(z[P]);if(!h.isAnEndpoint(S))for(var A=this._splitSafely(h,S),lt=0,B=A.length;lt<B;lt++)o.push(A[lt])}}this.tree.remove(n)}return o}},{key:"_splitSafely",value:function(e,n){this.tree.remove(e);var o=e.rightSE;this.queue.remove(o);var r=e.split(n);return r.push(o),e.consumedBy===void 0&&this.tree.insert(e),r}}]),i}(),pm=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,rw=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,sw=function(){function i(){Je(this,i)}return Te(i,[{key:"run",value:function(e,n,o){ai.type=e,ns.reset();for(var r=[new gm(n,!0)],s=0,a=o.length;s<a;s++)r.push(new gm(o[s],!1));if(ai.numMultiPolys=r.length,ai.type==="difference")for(var l=r[0],h=1;h<r.length;)Yu(r[h].bbox,l.bbox)!==null?h++:r.splice(h,1);if(ai.type==="intersection"){for(var u=0,d=r.length;u<d;u++)for(var c=r[u],f=u+1,g=r.length;f<g;f++)if(Yu(c.bbox,r[f].bbox)===null)return[]}for(var m=new Uu(vi.compare),p=0,_=r.length;p<_;p++)for(var v=r[p].getSweepEvents(),y=0,x=v.length;y<x;y++)if(m.insert(v[y]),m.size>pm)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 ow(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>pm)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(k.segments.length>rw)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var z=k.process(M),P=0,j=z.length;P<j;P++){var A=z[P];A.consumedBy===void 0&&m.insert(A)}w=m.size,C=m.pop()}ns.reset();var lt=iw.factory(k.segments),B=new nw(lt);return B.getGeom()}}]),i}(),ai=new sw,aw=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return ai.run("union",t,n)},lw=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return ai.run("intersection",t,n)},hw=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return ai.run("xor",t,n)},uw=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return ai.run("difference",t,n)},dw={union:aw,intersection:lw,xor:hw,difference:uw};function vm(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 cw(i,t,e){e===void 0&&(e={});for(var n=0,o=i;n<o.length;n++){var r=o[n];if(r.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<r[r.length-1].length;s++)if(r[r.length-1][s]!==r[0][s])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:i};return vm(a,t,e)}function fw(i,t,e){e===void 0&&(e={});var n={type:"MultiPolygon",coordinates:i};return vm(n,t,e)}function _m(i){return i.type==="Feature"?i.geometry:i}function gw(i,t,e){e===void 0&&(e={});var n=_m(i),o=_m(t),r=dw.union(n.coordinates,o.coordinates);return r.length===0?null:r.length===1?cw(r[0],e.properties):fw(r,e.properties)}function $u(i,t){const e=cc(i),n=Math.round(e*100)/100,o=n/1e4;let r;return t==="m2"?r=n+" m²":t==="ha"&&(r=o+" ha"),r}function rs(i,t,e){const n=t.getExtent();return i.getView().fit(ci(n,e))}function $a(i,t){const[e,n,o]=Array.from(Mr(i));return Zl([e,n,o,t])}const mw="https://api.os.uk/features/v1/wfs",Qo=new cn,_i=new cn;function pw(i,t,e){return new eo({source:_i,style:new ee({stroke:e?void 0:new Me({width:3,color:i}),fill:new ae({color:t?$a(i,.2):$a(i,0)})})})}function ym(i,t,e){const n=`
71
32
  <ogc:Filter>
72
33
  <ogc:Contains>
73
34
  <ogc:PropertyName>SHAPE</ogc:PropertyName>
74
35
  <gml:Point srsName="urn:ogc:def:crs:EPSG::4326">
75
- <gml:coordinates>${G0(i).reverse().join(",")}</gml:coordinates>
36
+ <gml:coordinates>${B0(i).reverse().join(",")}</gml:coordinates>
76
37
  </gml:Point>
77
38
  </ogc:Contains>
78
39
  </ogc:Filter>
79
- `;fetch(fw({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(r=>r.json()).then(r=>{if(!r.features.length)return;const s=r.features[0].properties,a=["TOID","DescriptiveGroup"];Object.keys(s).forEach(u=>a.includes(u)||delete s[u]);const l=new Hn,h=l.readFeatures(r,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"});e?h.forEach(u=>{const d=u.getProperties().TOID,c=Ho.getFeatureById(d);c?Ho.removeFeature(c):(u.setId(d),Ho.addFeature(u))}):(Ho.clear(),h.forEach(u=>{const d=u.getProperties().TOID;u.setId(d),Ho.addFeature(u)})),pi.clear(),pi.addFeature(l.readFeature(Ho.getFeatures().reduce((u,d)=>{const c=l.writeFeatureObject(d).geometry;return u?dw(u,c):c},null)))}).catch(r=>console.log(r))}function fw(i){const t=Object.keys(i).map(e=>e+"="+encodeURI(i[e])).join("&");return`${cw}?${t}`}const mw="https://api.os.uk/maps/raster/v1/zxy/Light_3857/{z}/{x}/{y}.png?key=",pw="https://api.os.uk/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf?srs=3857&key=",vw="https://api.os.uk/maps/vector/v1/vts/resources/styles?srs=3857&key=";function _w(i,t){return new Wx({source:t?new Uf({url:mw+t,attributions:[i],attributionsCollapsible:!1,maxZoom:20}):new bk({attributions:[Vf]})})}function yw(i,t){let e=new xx({declutter:!0,source:new Dx({format:new F1,url:pw+t,attributions:[i],attributionsCollapsible:!1})});return t&&fetch(vw+t).then(n=>n.json()).then(n=>_k(e,n,"esri")).catch(n=>console.log(n)),e}function xw(i){const t=Object.keys(i.defs),e=t.length;let n,o;for(n=0;n<e;++n){const r=t[n];if(!Gt(r)){const s=i.defs(r);let a=s.units;!a&&s.projName==="longlat"&&(a="degrees"),dc(new Fs({code:r,axisOrientation:s.axis,metersPerUnit:s.to_meter,units:a}))}}for(n=0;n<e;++n){const r=t[n],s=Gt(r);for(o=0;o<e;++o){const a=t[o],l=Gt(a);if(!tc(r,a))if(i.defs[r]===i.defs[a])Bl([s,l]);else{const h=i(r,a);N0(s,l,gc(s,l,h.forward),gc(l,s,h.inverse))}}}}function bw(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 ho=1,uo=2,Va=3,kw=4,$u=5,vm=6378137,ww=6356752314e-3,_m=.0066943799901413165,os=484813681109536e-20,R=Math.PI/2,Mw=.16666666666666666,Cw=.04722222222222222,Ew=.022156084656084655,W=1e-10,he=.017453292519943295,vi=57.29577951308232,Rt=Math.PI/4,rs=Math.PI*2,Ht=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 Sw={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var ym=/[\s_\-\/\(\)]/g;function Cn(i,t){if(i[t])return i[t];for(var e=Object.keys(i),n=t.toLowerCase().replace(ym,""),o=-1,r,s;++o<e.length;)if(r=e[o],s=r.toLowerCase().replace(ym,""),s===n)return i[r]}function Hu(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,o,r,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=Cn(Sw,a);l&&(t.to_meter=l.to_meter)},from_greenwich:function(a){t.from_greenwich=a*he},pm:function(a){var l=Cn(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)o=e[n],n in s?(r=s[n],typeof r=="function"?r(o):t[r]=o):t[n]=o;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t}var ss=1,xm=2,bm=3,qa=4,km=5,Ku=-1,Tw=/\s/,Iw=/[A-Za-z]/,zw=/[A-Za-z84_]/,$a=/[,\]]/,wm=/[\d\.E\-\+]/;function Oi(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}Oi.prototype.readCharicter=function(){var i=this.text[this.place++];if(this.state!==qa)for(;Tw.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 qa:return this.quoted(i);case km:return this.afterquote(i);case bm:return this.number(i);case Ku:return}},Oi.prototype.afterquote=function(i){if(i==='"'){this.word+='"',this.state=qa;return}if($a.test(i)){this.word=this.word.trim(),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in afterquote yet, index '+this.place)},Oi.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=Ku);return}},Oi.prototype.number=function(i){if(wm.test(i)){this.word+=i;return}if($a.test(i)){this.word=parseFloat(this.word),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in number yet, index '+this.place)},Oi.prototype.quoted=function(i){if(i==='"'){this.state=km;return}this.word+=i},Oi.prototype.keyword=function(i){if(zw.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($a.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in keyword yet, index '+this.place)},Oi.prototype.neutral=function(i){if(Iw.test(i)){this.word=i,this.state=xm;return}if(i==='"'){this.word="",this.state=qa;return}if(wm.test(i)){this.word=i,this.state=bm;return}if($a.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in neutral yet, index '+this.place)},Oi.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Ku)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function Rw(i){var t=new Oi(i);return t.output()}function Mm(i,t,e){Array.isArray(t)&&(e.unshift(t),t=null);var n=t?{}:i,o=e.reduce(function(r,s){return Ko(s,r),r},n);t&&(i[t]=o)}function Ko(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]={},Ko(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&&Ko(i[2],t[e]);return;case"SPHEROID":case"ELLIPSOID":t[e]={name:i[0],a:i[1],rf:i[2]},i.length===4&&Ko(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]],Mm(t,e,i);return;default:for(n=-1;++n<i.length;)if(!Array.isArray(i[n]))return Ko(i,t[e]);return Mm(t,e,i)}}var Aw=.017453292519943295;function Pw(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 Fi(i){return i*Aw}function Dw(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 o=[i.AXIS[e][0].toLowerCase(),i.AXIS[e][1].toLowerCase()];o[0].indexOf("north")!==-1||(o[0]==="y"||o[0]==="lat")&&o[1]==="north"?t+="n":o[0].indexOf("south")!==-1||(o[0]==="y"||o[0]==="lat")&&o[1]==="south"?t+="s":o[0].indexOf("east")!==-1||(o[0]==="x"||o[0]==="lon")&&o[1]==="east"?t+="e":(o[0].indexOf("west")!==-1||(o[0]==="x"||o[0]==="lon")&&o[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 r=i.GEOGCS;i.type==="GEOGCS"&&(r=i),r&&(r.DATUM?i.datumCode=r.DATUM.name.toLowerCase():i.datumCode=r.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"),r.DATUM&&r.DATUM.SPHEROID&&(i.ellps=r.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),i.ellps.toLowerCase().slice(0,13)==="international"&&(i.ellps="intl"),i.a=r.DATUM.SPHEROID.a,i.rf=parseFloat(r.DATUM.SPHEROID.rf,10)),r.DATUM&&r.DATUM.TOWGS84&&(i.datum_params=r.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 Pw(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",Fi],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",Fi],["x0","false_easting",s],["y0","false_northing",s],["long0","central_meridian",Fi],["lat0","latitude_of_origin",Fi],["lat0","standard_parallel_1",Fi],["lat1","standard_parallel_1",Fi],["lat2","standard_parallel_2",Fi],["azimuth","Azimuth"],["alpha","azimuth",Fi],["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=Fi(i.lat1>0?90:-90),i.lat_ts=i.lat1)}function Cm(i){var t=Rw(i),e=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",e]);var o={};return Ko(t,o),Dw(o),o}function Se(i){var t=this;if(arguments.length===2){var e=arguments[1];typeof e=="string"?e.charAt(0)==="+"?Se[i]=Hu(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}}bw(Se);function Lw(i){return typeof i=="string"}function Ow(i){return i in Se}var Fw=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Nw(i){return Fw.some(function(t){return i.indexOf(t)>-1})}var Gw=["3857","900913","3785","102113"];function jw(i){var t=Cn(i,"authority");if(!!t){var e=Cn(t,"epsg");return e&&Gw.indexOf(e)>-1}}function Bw(i){var t=Cn(i,"extension");if(!!t)return Cn(t,"proj4")}function Ww(i){return i[0]==="+"}function Zw(i){if(Lw(i)){if(Ow(i))return Se[i];if(Nw(i)){var t=Cm(i);if(jw(t))return Se["EPSG:3857"];var e=Bw(t);return e?Hu(e):t}if(Ww(i))return Hu(i)}else return i}function Em(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)<=Ht?i:i-as(i)*rs}function si(i,t,e){var n=i*e,o=.5*i;return n=Math.pow((1-n)/(1+n),o),Math.tan(.5*(R-t))/n}function ls(i,t){for(var e=.5*i,n,o,r=R-2*Math.atan(t),s=0;s<=15;s++)if(n=i*Math.sin(r),o=R-2*Math.atan(t*Math.pow((1-n)/(1+n),e))-r,r+=o,Math.abs(o)<=1e-10)return r;return-9999}function Yw(){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 Xw(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,o;if(Math.abs(Math.abs(e)-R)<=W)return null;if(this.sphere)n=this.x0+this.a*this.k0*X(t-this.long0),o=this.y0+this.a*this.k0*Math.log(Math.tan(Rt+.5*e));else{var r=Math.sin(e),s=si(this.e,e,r);n=this.x0+this.a*this.k0*X(t-this.long0),o=this.y0-this.a*this.k0*Math.log(s)}return i.x=n,i.y=o,i}function Uw(i){var t=i.x-this.x0,e=i.y-this.y0,n,o;if(this.sphere)o=R-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var r=Math.exp(-e/(this.a*this.k0));if(o=ls(this.e,r),o===-9999)return null}return n=X(this.long0+t/(this.a*this.k0)),i.x=n,i.y=o,i}var Vw=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];const qw={init:Yw,forward:Xw,inverse:Uw,names:Vw};function $w(){}function Sm(i){return i}var Hw=["longlat","identity"],Kw=[qw,{init:$w,forward:Sm,inverse:Sm,names:Hw}],Ha={},Ka=[];function Tm(i,t){var e=Ka.length;return i.names?(Ka[e]=i,i.names.forEach(function(n){Ha[n.toLowerCase()]=e}),this):(console.log(t),!0)}function Jw(i){if(!i)return!1;var t=i.toLowerCase();if(typeof Ha[t]<"u"&&Ka[Ha[t]])return Ka[Ha[t]]}function Qw(){Kw.forEach(Tm)}const t2={start:Qw,add:Tm,get:Jw};var ot={};ot.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},ot.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},ot.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},ot.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},ot.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},ot.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},ot.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},ot.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},ot.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},ot.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},ot.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},ot.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},ot.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},ot.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},ot.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},ot.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},ot.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},ot.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},ot.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},ot.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},ot.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},ot.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},ot.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},ot.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},ot.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},ot.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},ot.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},ot.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},ot.hough={a:6378270,rf:297,ellipseName:"Hough"},ot.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},ot.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},ot.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},ot.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},ot.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},ot.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},ot.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},ot.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},ot.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},ot.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},ot.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},ot.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var e2=ot.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};ot.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function i2(i,t,e,n){var o=i*i,r=t*t,s=(o-r)/o,a=0;n?(i*=1-s*(Mw+s*(Cw+s*Ew)),o=i*i,s=0):a=Math.sqrt(s);var l=(o-r)/r;return{es:s,e:a,ep2:l}}function n2(i,t,e,n,o){if(!i){var r=Cn(ot,n);r||(r=e2),i=r.a,t=r.b,e=r.rf}return e&&!t&&(t=(1-1/e)*i),(e===0||Math.abs(i-t)<W)&&(o=!0,t=i),{a:i,b:t,rf:e,sphere:o}}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 o2(i,t,e,n,o,r,s){var a={};return i===void 0||i==="none"?a.datum_type=$u:a.datum_type=kw,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=ho),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=uo,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=Va,a.grids=s),a.a=e,a.b=n,a.es=o,a.ep2=r,a}var Im={};function r2(i,t){var e=new DataView(t),n=l2(e),o=h2(e,n);o.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var r=u2(e,o,n),s={header:o,subgrids:r};return Im[i]=s,s}function s2(i){if(i===void 0)return null;var t=i.split(",");return t.map(a2)}function a2(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:Im[i]||null,isNull:!1}}function Jo(i){return i/3600*Math.PI/180}function l2(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 h2(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 u2(i,t,e){for(var n=176,o=[],r=0;r<t.nSubgrids;r++){var s=c2(i,n,e),a=g2(i,n,s,e),l=Math.round(1+(s.upperLongitude-s.lowerLongitude)/s.longitudeInterval),h=Math.round(1+(s.upperLatitude-s.lowerLatitude)/s.latitudeInterval);o.push({ll:[Jo(s.lowerLongitude),Jo(s.lowerLatitude)],del:[Jo(s.longitudeInterval),Jo(s.latitudeInterval)],lim:[l,h],count:s.gridNodeCount,cvs:d2(a)})}return o}function d2(i){return i.map(function(t){return[Jo(t.longitudeShift),Jo(t.latitudeShift)]})}function c2(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 g2(i,t,e,n){for(var o=t+176,r=16,s=[],a=0;a<e.gridNodeCount;a++){var l={latitudeShift:i.getFloat32(o+a*r,n),longitudeShift:i.getFloat32(o+a*r+4,n),latitudeAccuracy:i.getFloat32(o+a*r+8,n),longitudeAccuracy:i.getFloat32(o+a*r+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=Zw(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 o=Cn(se,e.datumCode);o&&(e.datum_params=e.datum_params||(o.towgs84?o.towgs84.split(","):null),e.ellps=o.ellipse,e.datumName=o.datumName?o.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 r=n2(e.a,e.b,e.rf,e.ellps,e.sphere),s=i2(r.a,r.b,r.rf,e.R_A),a=s2(e.nadgrids),l=e.datum||o2(e.datumCode,e.datum_params,r.a,r.b,s.es,s.ep2,a);Em(this,e),Em(this,n),this.a=r.a,this.b=r.b,this.rf=r.rf,this.sphere=r.sphere,this.es=s.es,this.e=s.e,this.ep2=s.ep2,this.datum=l,this.init(),t(null,this)}yi.projections=t2,yi.projections.start();function f2(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===ho?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===uo?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 zm(i,t,e){var n=i.x,o=i.y,r=i.z?i.z:0,s,a,l,h;if(o<-R&&o>-1.001*R)o=-R;else if(o>R&&o<1.001*R)o=R;else{if(o<-R)return{x:-1/0,y:-1/0,z:i.z};if(o>R)return{x:1/0,y:1/0,z:i.z}}return n>Math.PI&&(n-=2*Math.PI),a=Math.sin(o),h=Math.cos(o),l=a*a,s=e/Math.sqrt(1-t*l),{x:(s+r)*h*Math.cos(n),y:(s+r)*h*Math.sin(n),z:(s*(1-t)+r)*a}}function Rm(i,t,e,n){var o=1e-12,r=o*o,s=30,a,l,h,u,d,c,g,f,m,p,_,v,y,x=i.x,k=i.y,w=i.z?i.z:0,E,M,S;if(a=Math.sqrt(x*x+k*k),l=Math.sqrt(x*x+k*k+w*w),a/e<o){if(E=0,l/e<o)return M=R,S=-n,{x:i.x,y:i.y,z:i.z}}else E=Math.atan2(k,x);h=w/l,u=a/l,d=1/Math.sqrt(1-t*(2-t)*u*u),f=u*(1-t)*d,m=h*d,y=0;do y++,g=e/Math.sqrt(1-t*m*m),S=a*f+w*m-g*(1-t*m*m),c=t*g/(g+S),d=1/Math.sqrt(1-c*(2-c)*u*u),p=u*(1-c)*d,_=h*d,v=_*f-p*m,f=p,m=_;while(v*v>r&&y<s);return M=Math.atan(_/Math.abs(p)),{x:E,y:M,z:S}}function m2(i,t,e){if(t===ho)return{x:i.x+e[0],y:i.y+e[1],z:i.z+e[2]};if(t===uo){var n=e[0],o=e[1],r=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)+o,z:h*(-a*i.x+s*i.y+i.z)+r}}}function p2(i,t,e){if(t===ho)return{x:i.x-e[0],y:i.y-e[1],z:i.z-e[2]};if(t===uo){var n=e[0],o=e[1],r=e[2],s=e[3],a=e[4],l=e[5],h=e[6],u=(i.x-n)/h,d=(i.y-o)/h,c=(i.z-r)/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===ho||i===uo}function v2(i,t,e){if(f2(i,t)||i.datum_type===$u||t.datum_type===$u)return e;var n=i.a,o=i.es;if(i.datum_type===Va){var r=Am(i,!1,e);if(r!==0)return;n=vm,o=_m}var s=t.a,a=t.b,l=t.es;if(t.datum_type===Va&&(s=vm,a=ww,l=_m),o===l&&n===s&&!Ja(i.datum_type)&&!Ja(t.datum_type))return e;if(e=zm(e,o,n),Ja(i.datum_type)&&(e=m2(e,i.datum_type,i.datum_params)),Ja(t.datum_type)&&(e=p2(e,t.datum_type,t.datum_params)),e=Rm(e,l,s,a),t.datum_type===Va){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},o={x:Number.NaN,y:Number.NaN},r=[],s=0;s<i.grids.length;s++){var a=i.grids[s];if(r.push(a.name),a.isNull){o=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,g=l.ll[1]+(l.lim[1]-1)*l.del[1]+h;if(!(d>n.y||u>n.x||g<n.y||c<n.x)&&(o=_2(n,t,l),!isNaN(o.x)))break}return isNaN(o.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*vi+" "+n.y*vi+" tried: '"+r+"'"),-1):(e.x=-o.x,e.y=o.y,0)}function _2(i,t,e){var n={x:Number.NaN,y:Number.NaN};if(isNaN(i.x))return n;var o={x:i.x,y:i.y};o.x-=e.ll[0],o.y-=e.ll[1],o.x=X(o.x-Math.PI)+Math.PI;var r=Pm(o,e);if(t){if(isNaN(r.x))return n;r.x=o.x-r.x,r.y=o.y-r.y;var s=9,a=1e-12,l,h;do{if(h=Pm(r,e),isNaN(h.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}l={x:o.x-(h.x+r.x),y:o.y-(h.y+r.y)},r.x+=l.x,r.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(r.x+e.ll[0]),n.y=r.y+e.ll[1]}else isNaN(r.x)||(n.x=i.x+r.x,n.y=i.y+r.y);return n}function Pm(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)},o={x:e.x-1*n.x,y:e.y-1*n.y},r={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 r;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=o.x*o.y,c=o.x*(1-o.y),g=(1-o.x)*(1-o.y),f=(1-o.x)*o.y;return r.x=g*a.x+c*l.x+f*u.x+d*h.x,r.y=g*a.y+c*l.y+f*u.y+d*h.y,r}function Dm(i,t,e){var n=e.x,o=e.y,r=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=o,"ns".indexOf(i.axis[l])!==-1?a="y":a="x"):(s=r,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 y2(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 x2(i,t){return(i.datum.datum_type===ho||i.datum.datum_type===uo)&&t.datumCode!=="WGS84"||(t.datum.datum_type===ho||t.datum.datum_type===uo)&&i.datumCode!=="WGS84"}function Qa(i,t,e,n){var o;if(Array.isArray(e)&&(e=Lm(e)),y2(e),i.datum&&t.datum&&x2(i,t)&&(o=new yi("WGS84"),e=Qa(i,o,e,n),i=o),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=v2(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 Fm=yi("WGS84");function Qu(i,t,e,n){var o,r,s;return Array.isArray(e)?(o=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 o.z=="number"?[o.x,o.y,o.z].concat(e.splice(3)):[o.x,o.y,e[2]].concat(e.splice(3)):[o.x,o.y].concat(e.splice(2)):[o.x,o.y]):(r=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;r[a]=e[a]}),r)}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,o;return typeof t>"u"?(t=i,i=Fm,n=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,t=i,i=Fm,n=!0),t=Nm(t),e?Qu(i,t,e):(o={forward:function(r,s){return Qu(i,t,r,s)},inverse:function(r,s){return Qu(t,i,r,s)}},n&&(o.oProj=t),o)}var Gm=6,jm="AJSAJS",Bm="AFAFAF",Qo=65,Oe=73,Je=79,hs=86,us=90;const b2={forward:Wm,inverse:k2,toPoint:Zm};function Wm(i,t){return t=t||5,C2(w2({lat:i[1],lon:i[0]}),t)}function k2(i){var t=ed(Um(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function Zm(i){var t=ed(Um(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 Ym(i){return 180*(i/Math.PI)}function w2(i){var t=i.lat,e=i.lon,n=6378137,o=.00669438,r=.9996,s,a,l,h,u,d,c,g=td(t),f=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=o/(1-o),l=n/Math.sqrt(1-o*Math.sin(g)*Math.sin(g)),h=Math.tan(g)*Math.tan(g),u=a*Math.cos(g)*Math.cos(g),d=Math.cos(g)*(f-m),c=n*((1-o/4-3*o*o/64-5*o*o*o/256)*g-(3*o/8+3*o*o/32+45*o*o*o/1024)*Math.sin(2*g)+(15*o*o/256+45*o*o*o/1024)*Math.sin(4*g)-35*o*o*o/3072*Math.sin(6*g));var _=r*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=r*(c+l*Math.tan(g)*(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:M2(t)}}function ed(i){var t=i.northing,e=i.easting,n=i.zoneLetter,o=i.zoneNumber;if(o<0||o>60)return null;var r=.9996,s=6378137,a=.00669438,l,h=(1-Math.sqrt(1-a))/(1+Math.sqrt(1-a)),u,d,c,g,f,m,p,_,v,y=e-5e5,x=t;n<"N"&&(x-=1e7),p=(o-1)*6-180+3,l=a/(1-a),m=x/r,_=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),g=s*(1-a)/Math.pow(1-a*Math.sin(v)*Math.sin(v),1.5),f=y/(u*r);var k=v-u*Math.tan(v)/g*(f*f/2-(5+3*d+10*c-4*c*c-9*l)*f*f*f*f/24+(61+90*d+298*c+45*d*d-252*l-3*c*c)*f*f*f*f*f*f/720);k=Ym(k);var w=(f-(1+2*d+c)*f*f*f/6+(5-2*c+28*d-3*c*c+8*l+24*d*d)*f*f*f*f*f/120)/Math.cos(v);w=p+Ym(w);var E;if(i.accuracy){var M=ed({northing:i.northing+i.accuracy,easting:i.easting+i.accuracy,zoneLetter:i.zoneLetter,zoneNumber:i.zoneNumber});E={top:M.lat,right:M.lon,bottom:k,left:w}}else E={lat:k,lon:w};return E}function M2(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 C2(i,t){var e="00000"+i.easting,n="00000"+i.northing;return i.zoneNumber+i.zoneLetter+E2(i.easting,i.northing,i.zoneNumber)+e.substr(e.length-5,t)+n.substr(n.length-5,t)}function E2(i,t,e){var n=Xm(e),o=Math.floor(i/1e5),r=Math.floor(t/1e5)%20;return S2(o,r,n)}function Xm(i){var t=i%Gm;return t===0&&(t=Gm),t}function S2(i,t,e){var n=e-1,o=jm.charCodeAt(n),r=Bm.charCodeAt(n),s=o+i-1,a=r+t,l=!1;s>us&&(s=s-us+Qo-1,l=!0),(s===Oe||o<Oe&&s>Oe||(s>Oe||o<Oe)&&l)&&s++,(s===Je||o<Je&&s>Je||(s>Je||o<Je)&&l)&&(s++,s===Oe&&s++),s>us&&(s=s-us+Qo-1),a>hs?(a=a-hs+Qo-1,l=!0):l=!1,(a===Oe||r<Oe&&a>Oe||(a>Oe||r<Oe)&&l)&&a++,(a===Je||r<Je&&a>Je||(a>Je||r<Je)&&l)&&(a++,a===Oe&&a++),a>hs&&(a=a-hs+Qo-1);var h=String.fromCharCode(s)+String.fromCharCode(a);return h}function Um(i){if(i&&i.length===0)throw"MGRSPoint coverting from nothing";for(var t=i.length,e=null,n="",o,r=0;!/[A-Z]/.test(o=i.charAt(r));){if(r>=2)throw"MGRSPoint bad conversion from: "+i;n+=o,r++}var s=parseInt(n,10);if(r===0||r+3>t)throw"MGRSPoint bad conversion from: "+i;var a=i.charAt(r++);if(a<="A"||a==="B"||a==="Y"||a>="Z"||a==="I"||a==="O")throw"MGRSPoint zone letter "+a+" not handled: "+i;e=i.substring(r,r+=2);for(var l=Xm(s),h=T2(e.charAt(0),l),u=I2(e.charAt(1),l);u<z2(a);)u+=2e6;var d=t-r;if(d%2!==0)throw`MGRSPoint has to have an even number
40
+ `;fetch(vw({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(r=>r.json()).then(r=>{if(!r.features.length)return;const s=r.features[0].properties,a=["TOID","DescriptiveGroup"];Object.keys(s).forEach(u=>a.includes(u)||delete s[u]);const l=new Jn,h=l.readFeatures(r,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"});e?h.forEach(u=>{const d=u.getProperties().TOID,c=Qo.getFeatureById(d);c?Qo.removeFeature(c):(u.setId(d),Qo.addFeature(u))}):(Qo.clear(),h.forEach(u=>{const d=u.getProperties().TOID;u.setId(d),Qo.addFeature(u)})),_i.clear(),_i.addFeature(l.readFeature(Qo.getFeatures().reduce((u,d)=>{const c=l.writeFeatureObject(d).geometry;return u?gw(u,c):c},null)))}).catch(r=>console.log(r))}function vw(i){const t=Object.keys(i).map(e=>e+"="+encodeURI(i[e])).join("&");return`${mw}?${t}`}const _w="https://api.os.uk/maps/raster/v1/zxy/Light_3857/{z}/{x}/{y}.png?key=",yw="https://api.os.uk/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf?srs=3857&key=",xw="https://api.os.uk/maps/vector/v1/vts/resources/styles?srs=3857&key=";function bw(i,t){return new Ux({source:t?new Kg({url:_w+t,attributions:[i],attributionsCollapsible:!1,maxZoom:20}):new bk({attributions:[Hg]})})}function kw(i,t){let e=new xx({declutter:!0,source:new Dx({format:new G1,url:yw+t,attributions:[i],attributionsCollapsible:!1})});return t&&fetch(xw+t).then(n=>n.json()).then(n=>_k(e,n,"esri")).catch(n=>console.log(n)),e}function ww(i){const t=Object.keys(i.defs),e=t.length;let n,o;for(n=0;n<e;++n){const r=t[n];if(!jt(r)){const s=i.defs(r);let a=s.units;!a&&s.projName==="longlat"&&(a="degrees"),gc(new Gs({code:r,axisOrientation:s.axis,metersPerUnit:s.to_meter,units:a}))}}for(n=0;n<e;++n){const r=t[n],s=jt(r);for(o=0;o<e;++o){const a=t[o],l=jt(a);if(!nc(r,a))if(i.defs[r]===i.defs[a])Ul([s,l]);else{const h=i(r,a);j0(s,l,pc(s,l,h.forward),pc(l,s,h.inverse))}}}}function Mw(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 co=1,fo=2,Za=3,Cw=4,Zu=5,xm=6378137,Ew=6356752314e-3,bm=.0066943799901413165,ss=484813681109536e-20,R=Math.PI/2,Sw=.16666666666666666,Tw=.04722222222222222,Iw=.022156084656084655,U=1e-10,de=.017453292519943295,yi=57.29577951308232,At=Math.PI/4,as=Math.PI*2,Ht=3.14159265359,Oe={};Oe.greenwich=0,Oe.lisbon=-9.131906111111,Oe.paris=2.337229166667,Oe.bogota=-74.080916666667,Oe.madrid=-3.687938888889,Oe.rome=12.452333333333,Oe.bern=7.439583333333,Oe.jakarta=106.807719444444,Oe.ferro=-17.666666666667,Oe.brussels=4.367975,Oe.stockholm=18.058277777778,Oe.athens=23.7163375,Oe.oslo=10.722916666667;const zw={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var km=/[\s_\-\/\(\)]/g;function Tn(i,t){if(i[t])return i[t];for(var e=Object.keys(i),n=t.toLowerCase().replace(km,""),o=-1,r,s;++o<e.length;)if(r=e[o],s=r.toLowerCase().replace(km,""),s===n)return i[r]}function Ku(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,o,r,s={proj:"projName",datum:"datumCode",rf:function(a){t.rf=parseFloat(a)},lat_0:function(a){t.lat0=a*de},lat_1:function(a){t.lat1=a*de},lat_2:function(a){t.lat2=a*de},lat_ts:function(a){t.lat_ts=a*de},lon_0:function(a){t.long0=a*de},lon_1:function(a){t.long1=a*de},lon_2:function(a){t.long2=a*de},alpha:function(a){t.alpha=parseFloat(a)*de},gamma:function(a){t.rectified_grid_angle=parseFloat(a)},lonc:function(a){t.longc=a*de},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=Tn(zw,a);l&&(t.to_meter=l.to_meter)},from_greenwich:function(a){t.from_greenwich=a*de},pm:function(a){var l=Tn(Oe,a);t.from_greenwich=(l||parseFloat(a))*de},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)o=e[n],n in s?(r=s[n],typeof r=="function"?r(o):t[r]=o):t[n]=o;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t}var ls=1,wm=2,Mm=3,Ka=4,Cm=5,Hu=-1,Rw=/\s/,Aw=/[A-Za-z]/,Pw=/[A-Za-z84_]/,Ha=/[,\]]/,Em=/[\d\.E\-\+]/;function Gi(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=ls}Gi.prototype.readCharicter=function(){var i=this.text[this.place++];if(this.state!==Ka)for(;Rw.test(i);){if(this.place>=this.text.length)return;i=this.text[this.place++]}switch(this.state){case ls:return this.neutral(i);case wm:return this.keyword(i);case Ka:return this.quoted(i);case Cm:return this.afterquote(i);case Mm:return this.number(i);case Hu:return}},Gi.prototype.afterquote=function(i){if(i==='"'){this.word+='"',this.state=Ka;return}if(Ha.test(i)){this.word=this.word.trim(),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in afterquote yet, index '+this.place)},Gi.prototype.afterItem=function(i){if(i===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=ls;return}if(i==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=ls,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Hu);return}},Gi.prototype.number=function(i){if(Em.test(i)){this.word+=i;return}if(Ha.test(i)){this.word=parseFloat(this.word),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in number yet, index '+this.place)},Gi.prototype.quoted=function(i){if(i==='"'){this.state=Cm;return}this.word+=i},Gi.prototype.keyword=function(i){if(Pw.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=ls;return}if(Ha.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in keyword yet, index '+this.place)},Gi.prototype.neutral=function(i){if(Aw.test(i)){this.word=i,this.state=wm;return}if(i==='"'){this.word="",this.state=Ka;return}if(Em.test(i)){this.word=i,this.state=Mm;return}if(Ha.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in neutral yet, index '+this.place)},Gi.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 Dw(i){var t=new Gi(i);return t.output()}function Sm(i,t,e){Array.isArray(t)&&(e.unshift(t),t=null);var n=t?{}:i,o=e.reduce(function(r,s){return Jo(s,r),r},n);t&&(i[t]=o)}function Jo(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]={},Jo(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&&Jo(i[2],t[e]);return;case"SPHEROID":case"ELLIPSOID":t[e]={name:i[0],a:i[1],rf:i[2]},i.length===4&&Jo(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]],Sm(t,e,i);return;default:for(n=-1;++n<i.length;)if(!Array.isArray(i[n]))return Jo(i,t[e]);return Sm(t,e,i)}}var Lw=.017453292519943295;function Ow(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 ji(i){return i*Lw}function Fw(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 o=[i.AXIS[e][0].toLowerCase(),i.AXIS[e][1].toLowerCase()];o[0].indexOf("north")!==-1||(o[0]==="y"||o[0]==="lat")&&o[1]==="north"?t+="n":o[0].indexOf("south")!==-1||(o[0]==="y"||o[0]==="lat")&&o[1]==="south"?t+="s":o[0].indexOf("east")!==-1||(o[0]==="x"||o[0]==="lon")&&o[1]==="east"?t+="e":(o[0].indexOf("west")!==-1||(o[0]==="x"||o[0]==="lon")&&o[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 r=i.GEOGCS;i.type==="GEOGCS"&&(r=i),r&&(r.DATUM?i.datumCode=r.DATUM.name.toLowerCase():i.datumCode=r.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"),r.DATUM&&r.DATUM.SPHEROID&&(i.ellps=r.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),i.ellps.toLowerCase().slice(0,13)==="international"&&(i.ellps="intl"),i.a=r.DATUM.SPHEROID.a,i.rf=parseFloat(r.DATUM.SPHEROID.rf,10)),r.DATUM&&r.DATUM.TOWGS84&&(i.datum_params=r.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 Ow(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",ji],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",ji],["x0","false_easting",s],["y0","false_northing",s],["long0","central_meridian",ji],["lat0","latitude_of_origin",ji],["lat0","standard_parallel_1",ji],["lat1","standard_parallel_1",ji],["lat2","standard_parallel_2",ji],["azimuth","Azimuth"],["alpha","azimuth",ji],["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=ji(i.lat1>0?90:-90),i.lat_ts=i.lat1)}function Tm(i){var t=Dw(i),e=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",e]);var o={};return Jo(t,o),Fw(o),o}function Ie(i){var t=this;if(arguments.length===2){var e=arguments[1];typeof e=="string"?e.charAt(0)==="+"?Ie[i]=Ku(arguments[1]):Ie[i]=Tm(arguments[1]):Ie[i]=e}else if(arguments.length===1){if(Array.isArray(i))return i.map(function(n){Array.isArray(n)?Ie.apply(t,n):Ie(n)});if(typeof i=="string"){if(i in Ie)return Ie[i]}else"EPSG"in i?Ie["EPSG:"+i.EPSG]=i:"ESRI"in i?Ie["ESRI:"+i.ESRI]=i:"IAU2000"in i?Ie["IAU2000:"+i.IAU2000]=i:console.log(i);return}}Mw(Ie);function Nw(i){return typeof i=="string"}function Gw(i){return i in Ie}var jw=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Bw(i){return jw.some(function(t){return i.indexOf(t)>-1})}var Uw=["3857","900913","3785","102113"];function Ww(i){var t=Tn(i,"authority");if(!!t){var e=Tn(t,"epsg");return e&&Uw.indexOf(e)>-1}}function Vw(i){var t=Tn(i,"extension");if(!!t)return Tn(t,"proj4")}function Xw(i){return i[0]==="+"}function Yw(i){if(Nw(i)){if(Gw(i))return Ie[i];if(Bw(i)){var t=Tm(i);if(Ww(t))return Ie["EPSG:3857"];var e=Vw(t);return e?Ku(e):t}if(Xw(i))return Ku(i)}else return i}function Im(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 xi(i,t,e){var n=i*t;return e/Math.sqrt(1-n*n)}function hs(i){return i<0?-1:1}function Y(i){return Math.abs(i)<=Ht?i:i-hs(i)*as}function li(i,t,e){var n=i*e,o=.5*i;return n=Math.pow((1-n)/(1+n),o),Math.tan(.5*(R-t))/n}function us(i,t){for(var e=.5*i,n,o,r=R-2*Math.atan(t),s=0;s<=15;s++)if(n=i*Math.sin(r),o=R-2*Math.atan(t*Math.pow((1-n)/(1+n),e))-r,r+=o,Math.abs(o)<=1e-10)return r;return-9999}function qw(){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=xi(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function $w(i){var t=i.x,e=i.y;if(e*yi>90&&e*yi<-90&&t*yi>180&&t*yi<-180)return null;var n,o;if(Math.abs(Math.abs(e)-R)<=U)return null;if(this.sphere)n=this.x0+this.a*this.k0*Y(t-this.long0),o=this.y0+this.a*this.k0*Math.log(Math.tan(At+.5*e));else{var r=Math.sin(e),s=li(this.e,e,r);n=this.x0+this.a*this.k0*Y(t-this.long0),o=this.y0-this.a*this.k0*Math.log(s)}return i.x=n,i.y=o,i}function Zw(i){var t=i.x-this.x0,e=i.y-this.y0,n,o;if(this.sphere)o=R-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var r=Math.exp(-e/(this.a*this.k0));if(o=us(this.e,r),o===-9999)return null}return n=Y(this.long0+t/(this.a*this.k0)),i.x=n,i.y=o,i}var Kw=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];const Hw={init:qw,forward:$w,inverse:Zw,names:Kw};function Qw(){}function zm(i){return i}var Jw=["longlat","identity"],t2=[Hw,{init:Qw,forward:zm,inverse:zm,names:Jw}],Qa={},Ja=[];function Rm(i,t){var e=Ja.length;return i.names?(Ja[e]=i,i.names.forEach(function(n){Qa[n.toLowerCase()]=e}),this):(console.log(t),!0)}function e2(i){if(!i)return!1;var t=i.toLowerCase();if(typeof Qa[t]<"u"&&Ja[Qa[t]])return Ja[Qa[t]]}function i2(){t2.forEach(Rm)}const n2={start:i2,add:Rm,get:e2};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 o2=rt.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};rt.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function r2(i,t,e,n){var o=i*i,r=t*t,s=(o-r)/o,a=0;n?(i*=1-s*(Sw+s*(Tw+s*Iw)),o=i*i,s=0):a=Math.sqrt(s);var l=(o-r)/r;return{es:s,e:a,ep2:l}}function s2(i,t,e,n,o){if(!i){var r=Tn(rt,n);r||(r=o2),i=r.a,t=r.b,e=r.rf}return e&&!t&&(t=(1-1/e)*i),(e===0||Math.abs(i-t)<U)&&(o=!0,t=i),{a:i,b:t,rf:e,sphere:o}}var he={};he.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},he.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},he.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},he.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},he.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},he.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},he.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},he.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},he.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},he.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},he.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},he.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},he.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},he.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},he.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},he.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},he.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function a2(i,t,e,n,o,r,s){var a={};return i===void 0||i==="none"?a.datum_type=Zu:a.datum_type=Cw,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=co),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=fo,a.datum_params[3]*=ss,a.datum_params[4]*=ss,a.datum_params[5]*=ss,a.datum_params[6]=a.datum_params[6]/1e6+1)),s&&(a.datum_type=Za,a.grids=s),a.a=e,a.b=n,a.es=o,a.ep2=r,a}var Am={};function l2(i,t){var e=new DataView(t),n=d2(e),o=c2(e,n);o.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var r=f2(e,o,n),s={header:o,subgrids:r};return Am[i]=s,s}function h2(i){if(i===void 0)return null;var t=i.split(",");return t.map(u2)}function u2(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:Am[i]||null,isNull:!1}}function tr(i){return i/3600*Math.PI/180}function d2(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 c2(i,t){return{nFields:i.getInt32(8,t),nSubgridFields:i.getInt32(24,t),nSubgrids:i.getInt32(40,t),shiftType:Qu(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 Qu(i,t,e){return String.fromCharCode.apply(null,new Uint8Array(i.buffer.slice(t,e)))}function f2(i,t,e){for(var n=176,o=[],r=0;r<t.nSubgrids;r++){var s=m2(i,n,e),a=p2(i,n,s,e),l=Math.round(1+(s.upperLongitude-s.lowerLongitude)/s.longitudeInterval),h=Math.round(1+(s.upperLatitude-s.lowerLatitude)/s.latitudeInterval);o.push({ll:[tr(s.lowerLongitude),tr(s.lowerLatitude)],del:[tr(s.longitudeInterval),tr(s.latitudeInterval)],lim:[l,h],count:s.gridNodeCount,cvs:g2(a)})}return o}function g2(i){return i.map(function(t){return[tr(t.longitudeShift),tr(t.latitudeShift)]})}function m2(i,t,e){return{name:Qu(i,t+8,t+16).trim(),parent:Qu(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 p2(i,t,e,n){for(var o=t+176,r=16,s=[],a=0;a<e.gridNodeCount;a++){var l={latitudeShift:i.getFloat32(o+a*r,n),longitudeShift:i.getFloat32(o+a*r+4,n),latitudeAccuracy:i.getFloat32(o+a*r+8,n),longitudeAccuracy:i.getFloat32(o+a*r+12,n)};s.push(l)}return s}function bi(i,t){if(!(this instanceof bi))return new bi(i);t=t||function(h){if(h)throw h};var e=Yw(i);if(typeof e!="object"){t(i);return}var n=bi.projections.get(e.projName);if(!n){t(i);return}if(e.datumCode&&e.datumCode!=="none"){var o=Tn(he,e.datumCode);o&&(e.datum_params=e.datum_params||(o.towgs84?o.towgs84.split(","):null),e.ellps=o.ellipse,e.datumName=o.datumName?o.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 r=s2(e.a,e.b,e.rf,e.ellps,e.sphere),s=r2(r.a,r.b,r.rf,e.R_A),a=h2(e.nadgrids),l=e.datum||a2(e.datumCode,e.datum_params,r.a,r.b,s.es,s.ep2,a);Im(this,e),Im(this,n),this.a=r.a,this.b=r.b,this.rf=r.rf,this.sphere=r.sphere,this.es=s.es,this.e=s.e,this.ep2=s.ep2,this.datum=l,this.init(),t(null,this)}bi.projections=n2,bi.projections.start();function v2(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===co?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===fo?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 Pm(i,t,e){var n=i.x,o=i.y,r=i.z?i.z:0,s,a,l,h;if(o<-R&&o>-1.001*R)o=-R;else if(o>R&&o<1.001*R)o=R;else{if(o<-R)return{x:-1/0,y:-1/0,z:i.z};if(o>R)return{x:1/0,y:1/0,z:i.z}}return n>Math.PI&&(n-=2*Math.PI),a=Math.sin(o),h=Math.cos(o),l=a*a,s=e/Math.sqrt(1-t*l),{x:(s+r)*h*Math.cos(n),y:(s+r)*h*Math.sin(n),z:(s*(1-t)+r)*a}}function Dm(i,t,e,n){var o=1e-12,r=o*o,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<o){if(C=0,l/e<o)return M=R,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>r&&y<s);return M=Math.atan(_/Math.abs(p)),{x:C,y:M,z:S}}function _2(i,t,e){if(t===co)return{x:i.x+e[0],y:i.y+e[1],z:i.z+e[2]};if(t===fo){var n=e[0],o=e[1],r=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)+o,z:h*(-a*i.x+s*i.y+i.z)+r}}}function y2(i,t,e){if(t===co)return{x:i.x-e[0],y:i.y-e[1],z:i.z-e[2]};if(t===fo){var n=e[0],o=e[1],r=e[2],s=e[3],a=e[4],l=e[5],h=e[6],u=(i.x-n)/h,d=(i.y-o)/h,c=(i.z-r)/h;return{x:u+l*d-a*c,y:-l*u+d+s*c,z:a*u-s*d+c}}}function tl(i){return i===co||i===fo}function x2(i,t,e){if(v2(i,t)||i.datum_type===Zu||t.datum_type===Zu)return e;var n=i.a,o=i.es;if(i.datum_type===Za){var r=Lm(i,!1,e);if(r!==0)return;n=xm,o=bm}var s=t.a,a=t.b,l=t.es;if(t.datum_type===Za&&(s=xm,a=Ew,l=bm),o===l&&n===s&&!tl(i.datum_type)&&!tl(t.datum_type))return e;if(e=Pm(e,o,n),tl(i.datum_type)&&(e=_2(e,i.datum_type,i.datum_params)),tl(t.datum_type)&&(e=y2(e,t.datum_type,t.datum_params)),e=Dm(e,l,s,a),t.datum_type===Za){var h=Lm(t,!0,e);if(h!==0)return}return e}function Lm(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},o={x:Number.NaN,y:Number.NaN},r=[],s=0;s<i.grids.length;s++){var a=i.grids[s];if(r.push(a.name),a.isNull){o=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)&&(o=b2(n,t,l),!isNaN(o.x)))break}return isNaN(o.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*yi+" "+n.y*yi+" tried: '"+r+"'"),-1):(e.x=-o.x,e.y=o.y,0)}function b2(i,t,e){var n={x:Number.NaN,y:Number.NaN};if(isNaN(i.x))return n;var o={x:i.x,y:i.y};o.x-=e.ll[0],o.y-=e.ll[1],o.x=Y(o.x-Math.PI)+Math.PI;var r=Om(o,e);if(t){if(isNaN(r.x))return n;r.x=o.x-r.x,r.y=o.y-r.y;var s=9,a=1e-12,l,h;do{if(h=Om(r,e),isNaN(h.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}l={x:o.x-(h.x+r.x),y:o.y-(h.y+r.y)},r.x+=l.x,r.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=Y(r.x+e.ll[0]),n.y=r.y+e.ll[1]}else isNaN(r.x)||(n.x=i.x+r.x,n.y=i.y+r.y);return n}function Om(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)},o={x:e.x-1*n.x,y:e.y-1*n.y},r={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 r;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=o.x*o.y,c=o.x*(1-o.y),f=(1-o.x)*(1-o.y),g=(1-o.x)*o.y;return r.x=f*a.x+c*l.x+g*u.x+d*h.x,r.y=f*a.y+c*l.y+g*u.y+d*h.y,r}function Fm(i,t,e){var n=e.x,o=e.y,r=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=o,"ns".indexOf(i.axis[l])!==-1?a="y":a="x"):(s=r,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 Nm(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 k2(i){Gm(i.x),Gm(i.y)}function Gm(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 w2(i,t){return(i.datum.datum_type===co||i.datum.datum_type===fo)&&t.datumCode!=="WGS84"||(t.datum.datum_type===co||t.datum.datum_type===fo)&&i.datumCode!=="WGS84"}function el(i,t,e,n){var o;if(Array.isArray(e)&&(e=Nm(e)),k2(e),i.datum&&t.datum&&w2(i,t)&&(o=new bi("WGS84"),e=el(i,o,e,n),i=o),n&&i.axis!=="enu"&&(e=Fm(i,!1,e)),i.projName==="longlat")e={x:e.x*de,y:e.y*de,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=x2(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*yi,y:e.y*yi,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"?Fm(t,!0,e):e}var jm=bi("WGS84");function Ju(i,t,e,n){var o,r,s;return Array.isArray(e)?(o=el(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 o.z=="number"?[o.x,o.y,o.z].concat(e.splice(3)):[o.x,o.y,e[2]].concat(e.splice(3)):[o.x,o.y].concat(e.splice(2)):[o.x,o.y]):(r=el(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;r[a]=e[a]}),r)}function Bm(i){return i instanceof bi?i:i.oProj?i.oProj:bi(i)}function Fe(i,t,e){i=Bm(i);var n=!1,o;return typeof t>"u"?(t=i,i=jm,n=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,t=i,i=jm,n=!0),t=Bm(t),e?Ju(i,t,e):(o={forward:function(r,s){return Ju(i,t,r,s)},inverse:function(r,s){return Ju(t,i,r,s)}},n&&(o.oProj=t),o)}var Um=6,Wm="AJSAJS",Vm="AFAFAF",er=65,Ne=73,ti=79,ds=86,cs=90;const M2={forward:Xm,inverse:C2,toPoint:Ym};function Xm(i,t){return t=t||5,T2(E2({lat:i[1],lon:i[0]}),t)}function C2(i){var t=ed(Zm(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function Ym(i){var t=ed(Zm(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 E2(i){var t=i.lat,e=i.lon,n=6378137,o=.00669438,r=.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=o/(1-o),l=n/Math.sqrt(1-o*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-o/4-3*o*o/64-5*o*o*o/256)*f-(3*o/8+3*o*o/32+45*o*o*o/1024)*Math.sin(2*f)+(15*o*o/256+45*o*o*o/1024)*Math.sin(4*f)-35*o*o*o/3072*Math.sin(6*f));var _=r*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=r*(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:S2(t)}}function ed(i){var t=i.northing,e=i.easting,n=i.zoneLetter,o=i.zoneNumber;if(o<0||o>60)return null;var r=.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=(o-1)*6-180+3,l=a/(1-a),m=x/r,_=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*r);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 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 S2(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 T2(i,t){var e="00000"+i.easting,n="00000"+i.northing;return i.zoneNumber+i.zoneLetter+I2(i.easting,i.northing,i.zoneNumber)+e.substr(e.length-5,t)+n.substr(n.length-5,t)}function I2(i,t,e){var n=$m(e),o=Math.floor(i/1e5),r=Math.floor(t/1e5)%20;return z2(o,r,n)}function $m(i){var t=i%Um;return t===0&&(t=Um),t}function z2(i,t,e){var n=e-1,o=Wm.charCodeAt(n),r=Vm.charCodeAt(n),s=o+i-1,a=r+t,l=!1;s>cs&&(s=s-cs+er-1,l=!0),(s===Ne||o<Ne&&s>Ne||(s>Ne||o<Ne)&&l)&&s++,(s===ti||o<ti&&s>ti||(s>ti||o<ti)&&l)&&(s++,s===Ne&&s++),s>cs&&(s=s-cs+er-1),a>ds?(a=a-ds+er-1,l=!0):l=!1,(a===Ne||r<Ne&&a>Ne||(a>Ne||r<Ne)&&l)&&a++,(a===ti||r<ti&&a>ti||(a>ti||r<ti)&&l)&&(a++,a===Ne&&a++),a>ds&&(a=a-ds+er-1);var h=String.fromCharCode(s)+String.fromCharCode(a);return h}function Zm(i){if(i&&i.length===0)throw"MGRSPoint coverting from nothing";for(var t=i.length,e=null,n="",o,r=0;!/[A-Z]/.test(o=i.charAt(r));){if(r>=2)throw"MGRSPoint bad conversion from: "+i;n+=o,r++}var s=parseInt(n,10);if(r===0||r+3>t)throw"MGRSPoint bad conversion from: "+i;var a=i.charAt(r++);if(a<="A"||a==="B"||a==="Y"||a>="Z"||a==="I"||a==="O")throw"MGRSPoint zone letter "+a+" not handled: "+i;e=i.substring(r,r+=2);for(var l=$m(s),h=R2(e.charAt(0),l),u=A2(e.charAt(1),l);u<P2(a);)u+=2e6;var d=t-r;if(d%2!==0)throw`MGRSPoint has to have an even number
80
41
  of digits after the zone letter and two 100km letters - front
81
42
  half for easting meters, second half for
82
- northing meters`+i;var c=d/2,g=0,f=0,m,p,_,v,y;return c>0&&(m=1e5/Math.pow(10,c),p=i.substring(r,r+c),g=parseFloat(p)*m,_=i.substring(r+c),f=parseFloat(_)*m),v=g+h,y=f+u,{easting:v,northing:y,zoneLetter:a,zoneNumber:s,accuracy:m}}function T2(i,t){for(var e=jm.charCodeAt(t-1),n=1e5,o=!1;e!==i.charCodeAt(0);){if(e++,e===Oe&&e++,e===Je&&e++,e>us){if(o)throw"Bad character: "+i;e=Qo,o=!0}n+=1e5}return n}function I2(i,t){if(i>"V")throw"MGRSPoint given invalid Northing "+i;for(var e=Bm.charCodeAt(t-1),n=0,o=!1;e!==i.charCodeAt(0);){if(e++,e===Oe&&e++,e===Je&&e++,e>hs){if(o)throw"Bad character: "+i;e=Qo,o=!0}n+=1e5}return n}function z2(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 tr(i,t,e){if(!(this instanceof tr))return new tr(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")}tr.fromMGRS=function(i){return new tr(Zm(i))},tr.prototype.toMGRS=function(i){return Wm([this.x,this.y],i)};var R2=1,A2=.25,Vm=.046875,qm=.01953125,$m=.01068115234375,P2=.75,D2=.46875,L2=.013020833333333334,O2=.007120768229166667,F2=.3645833333333333,N2=.005696614583333333,G2=.3076171875;function Hm(i){var t=[];t[0]=R2-i*(A2+i*(Vm+i*(qm+i*$m))),t[1]=i*(P2-i*(Vm+i*(qm+i*$m)));var e=i*i;return t[2]=e*(D2-i*(L2+i*O2)),e*=i,t[3]=e*(F2-i*N2),t[4]=e*i*G2,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 j2=20;function Km(i,t,e){for(var n=1/(1-t),o=i,r=j2;r;--r){var s=Math.sin(o),a=1-t*s*s;if(a=(tl(o,s,Math.cos(o),e)-i)*(a*Math.sqrt(a))*n,o-=a,Math.abs(a)<W)return o}return o}function B2(){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 W2(i){var t=i.x,e=i.y,n=X(t-this.long0),o,r,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),g=Math.pow(c,2),f=Math.abs(l)>W?Math.tan(e):0,m=Math.pow(f,2),p=Math.pow(m,2);o=1-this.es*Math.pow(a,2),u=u/Math.sqrt(o);var _=tl(e,a,l,this.en);r=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*g+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)<W)return 93;if(r=.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>W)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=r,i.y=s,i}function Z2(i){var t,e,n,o,r=(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=Km(t,this.es,this.en),Math.abs(e)<R){var d=Math.sin(e),c=Math.cos(e),g=Math.abs(c)>W?Math.tan(e):0,f=this.ep2*Math.pow(c,2),m=Math.pow(f,2),p=Math.pow(g,2),_=Math.pow(p,2);t=1-this.es*Math.pow(d,2);var v=r*Math.sqrt(t)/this.k0,y=Math.pow(v,2);t=t*g,n=e-t*y/(1-this.es)*.5*(1-y/12*(5+3*p-9*f*p+f-4*m-y/30*(61+90*p-252*f*p+45*_+46*f-y/56*(1385+3633*p+4095*_+1574*_*p)))),o=X(this.long0+v*(1-y/6*(1+2*p+f-y/20*(5+28*p+24*_+8*f*p+6*f-y/42*(61+662*p+1320*_+720*_*p))))/c)}else n=R*as(s),o=0;else{var a=Math.exp(r/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?o=0:o=X(Math.atan2(l,u)+this.long0)}return i.x=o,i.y=n,i}var Y2=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const el={init:B2,forward:W2,inverse:Z2,names:Y2};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 X2(i){var t=1+i,e=t-1;return e===0?i:i*Math.log(t)/e}function U2(i){var t=Math.abs(i);return t=X2(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,o=i[n],r=0,s;--n>=0;)s=-r+e*o+i[n],r=o,o=s;return t+s*Math.sin(2*t)}function V2(i,t){for(var e=2*Math.cos(t),n=i.length-1,o=i[n],r=0,s;--n>=0;)s=-r+e*o+i[n],r=o,o=s;return Math.sin(t)*s}function q2(i){var t=Math.exp(i);return t=(t+1/t)/2,t}function Qm(i,t,e){for(var n=Math.sin(t),o=Math.cos(t),r=Jm(e),s=q2(e),a=2*o*s,l=-2*n*r,h=i.length-1,u=i[h],d=0,c=0,g=0,f,m;--h>=0;)f=c,m=d,c=u,d=g,u=-f+a*c-l*d+i[h],g=-m+l*c+a*d;return a=n*s,l=o*r,[a*u-l*g,a*g+l*u]}function $2(){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+V2(this.gtu,2*n))}function H2(i){var t=X(i.x-this.long0),e=i.y;e=id(this.cbg,e);var n=Math.sin(e),o=Math.cos(e),r=Math.sin(t),s=Math.cos(t);e=Math.atan2(n,s*o),t=Math.atan2(r*o,ai(n,o*s)),t=U2(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 K2(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,o;if(Math.abs(t)<=2.623395162778){var r=Qm(this.utg,2*e,2*t);e=e+r[0],t=t+r[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),o=id(this.cgb,e)}else n=1/0,o=1/0;return i.x=n,i.y=o,i}var J2=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"];const il={init:$2,forward:H2,inverse:K2,names:J2};function Q2(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 t5="etmerc";function e5(){var i=Q2(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 i5=["Universal Transverse Mercator System","utm"];const n5={init:e5,names:i5,dependsOn:t5};function nd(i,t){return Math.pow((1-i)/(1+i),t)}var o5=20;function r5(){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 s5(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 a5(i){for(var t=1e-14,e=i.x/this.C,n=i.y,o=Math.pow(Math.tan(.5*n+Rt)/this.K,1/this.C),r=o5;r>0&&(n=2*Math.atan(o*nd(this.e*Math.sin(i.y),-.5*this.e))-R,!(Math.abs(n-i.y)<t));--r)i.y=n;return r?(i.x=e,i.y=n,i):null}var l5=["gauss"];const od={init:r5,forward:s5,inverse:a5,names:l5};function h5(){od.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 u5(i){var t,e,n,o;return i.x=X(i.x-this.long0),od.forward.apply(this,[i]),t=Math.sin(i.y),e=Math.cos(i.y),n=Math.cos(i.x),o=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*e*n),i.x=o*e*Math.sin(i.x),i.y=o*(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 d5(i){var t,e,n,o,r;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,r=Math.sqrt(i.x*i.x+i.y*i.y)){var s=2*Math.atan2(r,this.R2);t=Math.sin(s),e=Math.cos(s),o=Math.asin(e*this.sinc0+i.y*t*this.cosc0/r),n=Math.atan2(i.x*t,r*this.cosc0*e-i.y*this.sinc0*t)}else o=this.phic0,n=0;return i.x=n,i.y=o,od.inverse.apply(this,[i]),i.x=X(i.x+this.long0),i}var c5=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const g5={init:h5,forward:u5,inverse:d5,names:c5};function f5(i,t,e){return t*=e,Math.tan(.5*(R+i))*Math.pow((1-t)/(1+t),.5*e)}function m5(){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)<=W&&(this.k0=.5*(1+as(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=W&&(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)<=W&&(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 p5(i){var t=i.x,e=i.y,n=Math.sin(e),o=Math.cos(e),r,s,a,l,h,u,d=X(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=W&&Math.abs(e+this.lat0)<=W?(i.x=NaN,i.y=NaN,i):this.sphere?(r=2*this.k0/(1+this.sinlat0*n+this.coslat0*o*Math.cos(d)),i.x=this.a*r*o*Math.sin(d)+this.x0,i.y=this.a*r*(this.coslat0*n-this.sinlat0*o*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)<=W?(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)<W?(r=2*this.a*this.k0/(1+l*Math.cos(d)),i.y=r*a):(r=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*a+this.cosX0*l*Math.cos(d))),i.y=r*(this.cosX0*a-this.sinX0*l*Math.cos(d))+this.y0),i.x=r*l*Math.sin(d)+this.x0,i))}function v5(i){i.x-=this.x0,i.y-=this.y0;var t,e,n,o,r,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<=W?(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)<W?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)<=W){if(s<=W)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 o=2*Math.atan(s*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,s<=W?r=this.X0:(r=Math.asin(Math.cos(o)*this.sinX0+i.y*Math.sin(o)*this.cosX0/s),t=X(this.long0+Math.atan2(i.x*Math.sin(o),s*this.cosX0*Math.cos(o)-i.y*this.sinX0*Math.sin(o)))),e=-1*ls(this.e,Math.tan(.5*(R+r)));return i.x=t,i.y=e,i}var _5=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"];const y5={init:m5,forward:p5,inverse:v5,names:_5,ssfn_:f5};function x5(){var i=this.lat0;this.lambda0=this.long0;var t=Math.sin(i),e=this.a,n=this.rf,o=1/n,r=2*o-Math.pow(o,2),s=this.e=Math.sqrt(r);this.R=this.k0*e*Math.sqrt(1-r)/(1-r*Math.pow(t,2)),this.alpha=Math.sqrt(1+r/(1-r)*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 b5(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,o=2*(Math.atan(Math.exp(n))-Math.PI/4),r=this.alpha*(i.x-this.lambda0),s=Math.atan(Math.sin(r)/(Math.sin(this.b0)*Math.tan(o)+Math.cos(this.b0)*Math.cos(r))),a=Math.asin(Math.cos(this.b0)*Math.sin(o)-Math.sin(this.b0)*Math.cos(o)*Math.cos(r));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 k5(i){for(var t=i.x-this.x0,e=i.y-this.y0,n=t/this.R,o=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),r=Math.asin(Math.cos(this.b0)*Math.sin(o)+Math.sin(this.b0)*Math.cos(o)*Math.cos(n)),s=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(o))),a=this.lambda0+s/this.alpha,l=0,h=r,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+r/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 w5=["somerc"];const M5={init:x5,forward:b5,inverse:k5,names:w5};var er=1e-7;function C5(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 E5(){var i,t,e,n,o,r,s,a,l,h,u=0,d,c=0,g=0,f=0,m=0,p=0,_=0;this.no_off=C5(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(g=this.long1,m=this.lat1,f=this.long2,p=this.lat2,Math.abs(m-p)<=er||(i=Math.abs(m))<=er||Math.abs(i-R)<=er||Math.abs(Math.abs(this.lat0)-R)<=er||Math.abs(Math.abs(p)-R)<=er)throw new Error;var x=1-this.es;t=Math.sqrt(x),Math.abs(this.lat0)>W?(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)),o=n*n-1,o<=0?o=0:(o=Math.sqrt(o),this.lat0<0&&(o=-o)),this.E=o+=n,this.E*=Math.pow(si(this.e,this.lat0,a),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=o=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*(o-1/o)*Math.tan(d))/this.B):(r=Math.pow(si(this.e,m,Math.sin(m)),this.B),s=Math.pow(si(this.e,p,Math.sin(p)),this.B),o=this.E/r,l=(s-r)/(s+r),h=this.E*this.E,h=(h-s*r)/(h+s*r),i=g-f,i<-Math.pi?f-=rs:i>Math.pi&&(f+=rs),this.lam0=X(.5*(g+f)-Math.atan(h*Math.tan(.5*this.B*(g-f))/l)/this.B),d=Math.atan(2*Math.sin(this.B*X(g-this.lam0))/(o-1/o)),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)),o=.5*d,this.v_pole_n=this.ArB*Math.log(Math.tan(Rt-o)),this.v_pole_s=this.ArB*Math.log(Math.tan(Rt+o))}function S5(i){var t={},e,n,o,r,s,a,l,h;if(i.x=i.x-this.lam0,Math.abs(Math.abs(i.y)-R)>W){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),r=Math.sin(this.B*i.x),o=(e*this.singam-r*this.cosgam)/n,Math.abs(Math.abs(o)-1)<W)throw new Error;h=.5*this.ArB*Math.log((1-o)/(1+o)),a=Math.cos(this.B*i.x),Math.abs(a)<er?l=this.A*i.x:l=this.ArB*Math.atan2(e*this.cosgam+r*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 T5(i){var t,e,n,o,r,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),o=.5*(n-1/n),r=.5*(n+1/n),s=Math.sin(this.BrA*t),a=(s*this.cosgam+o*this.singam)/r,Math.abs(Math.abs(a)-1)<W)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(o*this.cosgam-s*this.singam,Math.cos(this.BrA*t))}return l.x+=this.lam0,l}var I5=["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 z5={init:E5,forward:S5,inverse:T5,names:I5};function R5(){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)<W)){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),o=si(this.e,this.lat1,t),r=Math.sin(this.lat2),s=Math.cos(this.lat2),a=_i(this.e,r,s),l=si(this.e,this.lat2,r),h=si(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>W?this.ns=Math.log(n/a)/Math.log(o/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(o,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function A5(i){var t=i.x,e=i.y;Math.abs(2*Math.abs(e)-Math.PI)<=W&&(e=as(e)*(R-2*W));var n=Math.abs(Math.abs(e)-R),o,r;if(n>W)o=si(this.e,e,Math.sin(e)),r=this.a*this.f0*Math.pow(o,this.ns);else{if(n=e*this.ns,n<=0)return null;r=0}var s=this.ns*X(t-this.long0);return i.x=this.k0*(r*Math.sin(s))+this.x0,i.y=this.k0*(this.rh-r*Math.cos(s))+this.y0,i}function P5(i){var t,e,n,o,r,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),o=ls(this.e,n),o===-9999)return null}else o=-R;return r=X(l/this.ns+this.long0),i.x=r,i.y=o,i}var D5=["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 L5={init:R5,forward:A5,inverse:P5,names:D5};function O5(){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 F5(i){var t,e,n,o,r,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,o=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(n)),r=Math.asin(Math.cos(e)*Math.sin(n)/Math.cos(o)),s=this.n*r,a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(o/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 N5(i){var t,e,n,o,r,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),r=Math.atan2(i.y,i.x),o=r/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(o)),e=Math.asin(Math.cos(n)*Math.sin(o)/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 G5=["Krovak","krovak"];const j5={init:O5,forward:F5,inverse:N5,names:G5};function Te(i,t,e,n,o){return i*o-t*Math.sin(2*o)+e*Math.sin(4*o)-n*Math.sin(6*o)}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 gs(i){return .05859375*i*i*(1+.75*i)}function fs(i){return i*i*i*(35/3072)}function ir(i,t,e){var n=t*e;return i/Math.sqrt(1-n*n)}function nr(i){return Math.abs(i)<R?i:i-as(i)*Math.PI}function nl(i,t,e,n,o){var r,s;r=i/t;for(var a=0;a<15;a++)if(s=(i-(t*r-e*Math.sin(2*r)+n*Math.sin(4*r)-o*Math.sin(6*r)))/(t-2*e*Math.cos(2*r)+4*n*Math.cos(4*r)-6*o*Math.cos(6*r)),r+=s,Math.abs(s)<=1e-10)return r;return NaN}function B5(){this.sphere||(this.e0=ds(this.es),this.e1=cs(this.es),this.e2=gs(this.es),this.e3=fs(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0))}function W5(i){var t,e,n=i.x,o=i.y;if(n=X(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(o)*Math.sin(n)),e=this.a*(Math.atan2(Math.tan(o),Math.cos(n))-this.lat0);else{var r=Math.sin(o),s=Math.cos(o),a=ir(this.a,this.e,r),l=Math.tan(o)*Math.tan(o),h=n*Math.cos(o),u=h*h,d=this.es*s*s/(1-this.es),c=this.a*Te(this.e0,this.e1,this.e2,this.e3,o);t=a*h*(1-u*l*(1/6-(8-l+8*d)*u/120)),e=c-this.ml0+a*r/s*u*(.5+(5-l+6*d)*u/24)}return i.x=t+this.x0,i.y=e+this.y0,i}function Z5(i){i.x-=this.x0,i.y-=this.y0;var t=i.x/this.a,e=i.y/this.a,n,o;if(this.sphere){var r=e+this.lat0;n=Math.asin(Math.sin(r)*Math.cos(t)),o=Math.atan2(Math.tan(t),Math.cos(r))}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)<=W)return i.x=this.long0,i.y=R,e<0&&(i.y*=-1),i;var l=ir(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),o=d*(1-c*(u/3+(1+3*u)*u*c/15))/Math.cos(a)}return i.x=X(o+this.long0),i.y=nr(n),i}var Y5=["Cassini","Cassini_Soldner","cass"];const X5={init:B5,forward:W5,inverse:Z5,names:Y5};function En(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 U5=1,V5=2,q5=3,$5=4;function H5(){var i=Math.abs(this.lat0);if(Math.abs(i-R)<W?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(i)<W?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=En(this.e,1),this.mmf=.5/(1-this.es),this.apa=rM(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=En(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 K5(i){var t,e,n,o,r,s,a,l,h,u,d=i.x,c=i.y;if(d=X(d-this.long0),this.sphere){if(r=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*r+this.cosph0*u*n,e<=W)return null;e=Math.sqrt(2/e),t=e*u*Math.sin(d),e*=this.mode===this.EQUIT?r:this.cosph0*r-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)<W)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),o=Math.sin(d),r=Math.sin(c),s=En(this.e,r),(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)<W)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*o;break;case this.N_POLE:case this.S_POLE:s>=0?(t=(h=Math.sqrt(s))*o,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 J5(i){i.x-=this.x0,i.y-=this.y0;var t=i.x/this.a,e=i.y/this.a,n,o,r,s,a,l,h;if(this.sphere){var u=0,d,c=0;if(d=Math.sqrt(t*t+e*e),o=d*.5,o>1)return null;switch(o=2*Math.asin(o),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(c=Math.sin(o),u=Math.cos(o)),this.mode){case this.EQUIT:o=Math.abs(d)<=W?0:Math.asin(e*c/d),t*=c,e=u*d;break;case this.OBLIQ:o=Math.abs(d)<=W?this.lat0:Math.asin(u*this.sinph0+e*c*this.cosph0/d),t*=c*this.cosph0,e=(u-Math.sin(o)*this.sinph0)*d;break;case this.N_POLE:e=-e,o=R-o;break;case this.S_POLE:o-=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<W)return i.x=this.long0,i.y=this.lat0,i;s=2*Math.asin(.5*l/this.rq),r=Math.cos(s),t*=s=Math.sin(s),this.mode===this.OBLIQ?(h=r*this.sinb1+e*s*this.cosb1/l,a=this.qp*h,e=l*this.cosb1*r-e*this.sinb1*s):(h=e*s/l,a=this.qp*h,e=l*r)}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),o=sM(Math.asin(h),this.apa)}return i.x=X(this.long0+n),i.y=o,i}var Q5=.3333333333333333,tM=.17222222222222222,eM=.10257936507936508,iM=.06388888888888888,nM=.0664021164021164,oM=.016415012942191543;function rM(i){var t,e=[];return e[0]=i*Q5,t=i*i,e[0]+=t*tM,e[1]=t*iM,t*=i,e[0]+=t*eM,e[1]+=t*nM,e[2]=t*oM,e}function sM(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 aM=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const lM={init:H5,forward:K5,inverse:J5,names:aM,S_POLE:U5,N_POLE:V5,EQUIT:q5,OBLIQ:$5};function Sn(i){return Math.abs(i)>1&&(i=i>1?1:-1),Math.asin(i)}function hM(){Math.abs(this.lat1+this.lat2)<W||(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=En(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=En(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=En(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>W?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 uM(i){var t=i.x,e=i.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var n=En(this.e3,this.sin_phi,this.cos_phi),o=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,r=this.ns0*X(t-this.long0),s=o*Math.sin(r)+this.x0,a=this.rh-o*Math.cos(r)+this.y0;return i.x=s,i.y=a,i}function dM(i){var t,e,n,o,r,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),o=0,t!==0&&(o=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)),r=X(o/this.ns0+this.long0),i.x=r,i.y=s,i}function cM(i,t){var e,n,o,r,s,a=Sn(.5*t);if(i<W)return a;for(var l=i*i,h=1;h<=25;h++)if(e=Math.sin(a),n=Math.cos(a),o=i*e,r=1-o*o,s=.5*r*r/n*(t/(1-l)-e/r+.5/i*Math.log((1-o)/(1+o))),a=a+s,Math.abs(s)<=1e-7)return a;return null}var gM=["Albers_Conic_Equal_Area","Albers","aea"];const fM={init:hM,forward:uM,inverse:dM,names:gM,phi1z:cM};function mM(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function pM(i){var t,e,n,o,r,s,a,l,h=i.x,u=i.y;return n=X(h-this.long0),t=Math.sin(u),e=Math.cos(u),o=Math.cos(n),s=this.sin_p14*t+this.cos_p14*e*o,r=1,s>0||Math.abs(s)<=W?(a=this.x0+this.a*r*e*Math.sin(n)/s,l=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*e*o)/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*o)),i.x=a,i.y=l,i}function vM(i){var t,e,n,o,r,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))?(o=Math.atan2(t,this.rc),e=Math.sin(o),n=Math.cos(o),s=Sn(n*this.sin_p14+i.y*e*this.cos_p14/t),r=Math.atan2(i.x*e,t*this.cos_p14*n-i.y*this.sin_p14*e),r=X(this.long0+r)):(s=this.phic0,r=0),i.x=r,i.y=s,i}var _M=["gnom"];const yM={init:mM,forward:pM,inverse:vM,names:_M};function xM(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),o,r,s,a,l=0;l<30;l++)if(r=Math.sin(n),s=Math.cos(n),a=i*r,o=Math.pow(1-a*a,2)/(2*s)*(t/(1-i*i)-r/(1-a*a)+.5/i*Math.log((1-a)/(1+a))),n+=o,Math.abs(o)<=1e-10)return n;return NaN}function bM(){this.sphere||(this.k0=_i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function kM(i){var t=i.x,e=i.y,n,o,r=X(t-this.long0);if(this.sphere)n=this.x0+this.a*r*Math.cos(this.lat_ts),o=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var s=En(this.e,Math.sin(e));n=this.x0+this.a*this.k0*r,o=this.y0+this.a*s*.5/this.k0}return i.x=n,i.y=o,i}function wM(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=xM(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 MM=["cea"];const CM={init:bM,forward:kM,inverse:wM,names:MM};function EM(){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 SM(i){var t=i.x,e=i.y,n=X(t-this.long0),o=nr(e-this.lat0);return i.x=this.x0+this.a*n*this.rc,i.y=this.y0+this.a*o,i}function TM(i){var t=i.x,e=i.y;return i.x=X(this.long0+(t-this.x0)/(this.a*this.rc)),i.y=nr(this.lat0+(e-this.y0)/this.a),i}var IM=["Equirectangular","Equidistant_Cylindrical","eqc"];const zM={init:EM,forward:SM,inverse:TM,names:IM};var tp=20;function RM(){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=gs(this.es),this.e3=fs(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0)}function AM(i){var t=i.x,e=i.y,n,o,r,s=X(t-this.long0);if(r=s*Math.sin(e),this.sphere)Math.abs(e)<=W?(n=this.a*s,o=-1*this.a*this.lat0):(n=this.a*Math.sin(r)/Math.tan(e),o=this.a*(nr(e-this.lat0)+(1-Math.cos(r))/Math.tan(e)));else if(Math.abs(e)<=W)n=this.a*s,o=-1*this.ml0;else{var a=ir(this.a,this.e,Math.sin(e))/Math.tan(e);n=a*Math.sin(r),o=this.a*Te(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+a*(1-Math.cos(r))}return i.x=n+this.x0,i.y=o+this.y0,i}function PM(i){var t,e,n,o,r,s,a,l,h;if(n=i.x-this.x0,o=i.y-this.y0,this.sphere)if(Math.abs(o+this.a*this.lat0)<=W)t=X(n/this.a+this.long0),e=0;else{s=this.lat0+o/this.a,a=n*n/this.a/this.a+s*s,l=s;var u;for(r=tp;r;--r)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)<=W){e=l;break}t=X(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(e))}else if(Math.abs(o+this.ml0)<=W)e=0,t=X(this.long0+n/this.a);else{s=(this.ml0+o)/this.a,a=n*n/this.a/this.a+s*s,l=s;var d,c,g,f,m;for(r=tp;r;--r)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),g=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),f=c/this.a,h=(s*(d*f+1)-f-.5*d*(f*f+a))/(this.es*Math.sin(2*l)*(f*f+a-2*s*f)/(4*d)+(s-f)*(d*g-2/Math.sin(2*l))-g),l-=h,Math.abs(h)<=W){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 DM=["Polyconic","poly"];const LM={init:RM,forward:AM,inverse:PM,names:DM};function OM(){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 FM(i){var t,e=i.x,n=i.y,o=n-this.lat0,r=e-this.long0,s=o/os*1e-5,a=r,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,g=0,f,m,p=0,_=0;for(t=1;t<=6;t++)f=c*u-g*d,m=g*u+c*d,c=f,g=m,p=p+this.B_re[t]*c-this.B_im[t]*g,_=_+this.B_im[t]*c+this.B_re[t]*g;return i.x=_*this.a+this.x0,i.y=p*this.a+this.y0,i}function NM(i){var t,e=i.x,n=i.y,o=e-this.x0,r=n-this.y0,s=r/this.a,a=o/this.a,l=1,h=0,u,d,c=0,g=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,g=g+this.C_im[t]*l+this.C_re[t]*h;for(var f=0;f<this.iterations;f++){var m=c,p=g,_,v,y=s,x=a;for(t=2;t<=6;t++)_=m*c-p*g,v=p*c+m*g,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*g,v=p*c+m*g,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 E=k*k+w*w;c=(y*k+x*w)/E,g=(x*k-y*w)/E}var M=c,S=g,z=1,P=0;for(t=1;t<=9;t++)z=z*M,P=P+this.D[t]*z;var G=this.lat0+P*os*1e5,A=this.long0+S;return i.x=A,i.y=G,i}var GM=["New_Zealand_Map_Grid","nzmg"];const jM={init:OM,forward:FM,inverse:NM,names:GM};function BM(){}function WM(i){var t=i.x,e=i.y,n=X(t-this.long0),o=this.x0+this.a*n,r=this.y0+this.a*Math.log(Math.tan(Math.PI/4+e/2.5))*1.25;return i.x=o,i.y=r,i}function ZM(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 YM=["Miller_Cylindrical","mill"];const XM={init:BM,forward:WM,inverse:ZM,names:YM};var UM=20;function VM(){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 qM(i){var t,e,n=i.x,o=i.y;if(n=X(n-this.long0),this.sphere){if(!this.m)o=this.n!==1?Math.asin(this.n*Math.sin(o)):o;else for(var r=this.n*Math.sin(o),s=UM;s;--s){var a=(this.m*o+Math.sin(o)-r)/(this.m+Math.cos(o));if(o-=a,Math.abs(a)<W)break}t=this.a*this.C_x*n*(this.m+Math.cos(o)),e=this.a*this.C_y*o}else{var l=Math.sin(o),h=Math.cos(o);e=this.a*tl(o,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 $M(i){var t,e,n,o;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=nr(t)):(t=Km(i.y/this.a,this.es,this.en),o=Math.abs(t),o<R?(o=Math.sin(t),e=this.long0+i.x*Math.sqrt(1-this.es*o*o)/(this.a*Math.cos(t)),n=X(e)):o-W<R&&(n=this.long0)),i.x=n,i.y=t,i}var HM=["Sinusoidal","sinu"];const KM={init:VM,forward:qM,inverse:$M,names:HM};function JM(){}function QM(i){for(var t=i.x,e=i.y,n=X(t-this.long0),o=e,r=Math.PI*Math.sin(e);;){var s=-(o+Math.sin(o)-r)/(1+Math.cos(o));if(o+=s,Math.abs(s)<W)break}o/=2,Math.PI/2-Math.abs(e)<W&&(n=0);var a=.900316316158*this.a*n*Math.cos(o)+this.x0,l=1.4142135623731*this.a*Math.sin(o)+this.y0;return i.x=a,i.y=l,i}function tC(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 o=Math.asin(e);return i.x=n,i.y=o,i}var eC=["Mollweide","moll"];const iC={init:JM,forward:QM,inverse:tC,names:eC};function nC(){Math.abs(this.lat1+this.lat2)<W||(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=gs(this.es),this.e3=fs(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)<W?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 oC(i){var t=i.x,e=i.y,n;if(this.sphere)n=this.a*(this.g-e);else{var o=Te(this.e0,this.e1,this.e2,this.e3,e);n=this.a*(this.g-o)}var r=this.ns*X(t-this.long0),s=this.x0+n*Math.sin(r),a=this.y0+this.rh-n*Math.cos(r);return i.x=s,i.y=a,i}function rC(i){i.x-=this.x0,i.y=this.rh-i.y+this.y0;var t,e,n,o;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 r=0;if(e!==0&&(r=Math.atan2(t*i.x,t*i.y)),this.sphere)return o=X(this.long0+r/this.ns),n=nr(this.g-e/this.a),i.x=o,i.y=n,i;var s=this.g-e/this.a;return n=nl(s,this.e0,this.e1,this.e2,this.e3),o=X(this.long0+r/this.ns),i.x=o,i.y=n,i}var sC=["Equidistant_Conic","eqdc"];const aC={init:nC,forward:oC,inverse:rC,names:sC};function lC(){this.R=this.a}function hC(i){var t=i.x,e=i.y,n=X(t-this.long0),o,r;Math.abs(e)<=W&&(o=this.x0+this.R*n,r=this.y0);var s=Sn(2*Math.abs(e/Math.PI));(Math.abs(n)<=W||Math.abs(Math.abs(e)-R)<=W)&&(o=this.x0,e>=0?r=this.y0+Math.PI*this.R*Math.tan(.5*s):r=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,g=d*(2/h-1),f=g*g,m=Math.PI*this.R*(a*(d-f)+Math.sqrt(l*(d-f)*(d-f)-(f+l)*(c-f)))/(f+l);n<0&&(m=-m),o=this.x0+m;var p=l+d;return m=Math.PI*this.R*(g*p-a*Math.sqrt((f+l)*(l+1)-p*p))/(f+l),e>=0?r=this.y0+m:r=this.y0-m,i.x=o,i.y=r,i}function uC(i){var t,e,n,o,r,s,a,l,h,u,d,c,g;return i.x-=this.x0,i.y-=this.y0,d=Math.PI*this.R,n=i.x/d,o=i.y/d,r=n*n+o*o,s=-Math.abs(o)*(1+r),a=s-2*o*o+n*n,l=-2*s+1+2*o*o+r*r,g=o*o/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*g/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)<W?t=this.long0:t=X(this.long0+Math.PI*(r-1+Math.sqrt(1+2*(n*n-o*o)+r*r))/2/n),i.x=t,i.y=e,i}var dC=["Van_der_Grinten_I","VanDerGrinten","vandg"];const cC={init:lC,forward:hC,inverse:uC,names:dC};function gC(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function fC(i){var t=i.x,e=i.y,n=Math.sin(i.y),o=Math.cos(i.y),r=X(t-this.long0),s,a,l,h,u,d,c,g,f,m,p,_,v,y,x,k,w,E,M,S,z,P,G;return this.sphere?Math.abs(this.sin_p12-1)<=W?(i.x=this.x0+this.a*(R-e)*Math.sin(r),i.y=this.y0-this.a*(R-e)*Math.cos(r),i):Math.abs(this.sin_p12+1)<=W?(i.x=this.x0+this.a*(R+e)*Math.sin(r),i.y=this.y0+this.a*(R+e)*Math.cos(r),i):(E=this.sin_p12*n+this.cos_p12*o*Math.cos(r),k=Math.acos(E),w=k?k/Math.sin(k):1,i.x=this.x0+this.a*w*o*Math.sin(r),i.y=this.y0+this.a*w*(this.cos_p12*n-this.sin_p12*o*Math.cos(r)),i):(s=ds(this.es),a=cs(this.es),l=gs(this.es),h=fs(this.es),Math.abs(this.sin_p12-1)<=W?(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(r),i.y=this.y0-(u-d)*Math.cos(r),i):Math.abs(this.sin_p12+1)<=W?(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(r),i.y=this.y0+(u+d)*Math.cos(r),i):(c=n/o,g=ir(this.a,this.e,this.sin_p12),f=ir(this.a,this.e,n),m=Math.atan((1-this.es)*c+this.es*g*this.sin_p12/(f*o)),p=Math.atan2(Math.sin(r),this.cos_p12*Math.tan(m)-this.sin_p12*Math.cos(r)),p===0?M=Math.asin(this.cos_p12*Math.sin(m)-this.sin_p12*Math.cos(m)):Math.abs(Math.abs(p)-Math.PI)<=W?M=-Math.asin(this.cos_p12*Math.sin(m)-this.sin_p12*Math.cos(m)):M=Math.asin(Math.sin(r)*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,z=S*M,P=z*M,G=P*M,k=g*M*(1-S*x*(1-x)/6+z/8*y*(1-2*x)+P/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 mC(i){i.x-=this.x0,i.y-=this.y0;var t,e,n,o,r,s,a,l,h,u,d,c,g,f,m,p,_,v,y,x,k,w,E,M;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),o=Math.cos(e),r=this.long0,Math.abs(t)<=W?s=this.lat0:(s=Sn(o*this.sin_p12+i.y*n*this.cos_p12/t),a=Math.abs(this.lat0)-R,Math.abs(a)<=W?this.lat0>=0?r=X(this.long0+Math.atan2(i.x,-i.y)):r=X(this.long0-Math.atan2(-i.x,i.y)):r=X(this.long0+Math.atan2(i.x*n,t*this.cos_p12*o-i.y*this.sin_p12*n))),i.x=r,i.y=s,i)):(l=ds(this.es),h=cs(this.es),u=gs(this.es),d=fs(this.es),Math.abs(this.sin_p12-1)<=W?(c=this.a*Te(l,h,u,d,R),t=Math.sqrt(i.x*i.x+i.y*i.y),g=c-t,s=nl(g/this.a,l,h,u,d),r=X(this.long0+Math.atan2(i.x,-1*i.y)),i.x=r,i.y=s,i):Math.abs(this.sin_p12+1)<=W?(c=this.a*Te(l,h,u,d,R),t=Math.sqrt(i.x*i.x+i.y*i.y),g=t-c,s=nl(g/this.a,l,h,u,d),r=X(this.long0+Math.atan2(i.x,i.y)),i.x=r,i.y=s,i):(t=Math.sqrt(i.x*i.x+i.y*i.y),p=Math.atan2(i.x,i.y),f=ir(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/f,w=k-y*(1+y)*Math.pow(k,3)/6-x*(1+3*y)*Math.pow(k,4)/24,E=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)*_),r=X(this.long0+Math.asin(Math.sin(p)*Math.sin(w)/Math.cos(m))),M=Math.sin(m),s=Math.atan2((M-this.es*E*this.sin_p12)*Math.tan(m),M*(1-this.es)),i.x=r,i.y=s,i))}var pC=["Azimuthal_Equidistant","aeqd"];const vC={init:gC,forward:fC,inverse:mC,names:pC};function _C(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function yC(i){var t,e,n,o,r,s,a,l,h=i.x,u=i.y;return n=X(h-this.long0),t=Math.sin(u),e=Math.cos(u),o=Math.cos(n),s=this.sin_p14*t+this.cos_p14*e*o,r=1,(s>0||Math.abs(s)<=W)&&(a=this.a*r*e*Math.sin(n),l=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*e*o)),i.x=a,i.y=l,i}function xC(i){var t,e,n,o,r,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),o=Math.cos(e),s=this.long0,Math.abs(t)<=W?(a=this.lat0,i.x=s,i.y=a,i):(a=Sn(o*this.sin_p14+i.y*n*this.cos_p14/t),r=Math.abs(this.lat0)-R,Math.abs(r)<=W?(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*o-i.y*this.sin_p14*n)),i.x=s,i.y=a,i))}var bC=["ortho"];const kC={init:_C,forward:yC,inverse:xC,names:bC};var Xt={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},At={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function wC(){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 MC(i){var t={x:0,y:0},e,n,o,r,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)r=R-e,n>=Rt&&n<=R+Rt?(l.value=At.AREA_0,o=n-R):n>R+Rt||n<=-(R+Rt)?(l.value=At.AREA_1,o=n>0?n-Ht:n+Ht):n>-(R+Rt)&&n<=-Rt?(l.value=At.AREA_2,o=n+R):(l.value=At.AREA_3,o=n);else if(this.face===Xt.BOTTOM)r=R+e,n>=Rt&&n<=R+Rt?(l.value=At.AREA_0,o=-n+R):n<Rt&&n>=-Rt?(l.value=At.AREA_1,o=-n):n<-Rt&&n>=-(R+Rt)?(l.value=At.AREA_2,o=-n-R):(l.value=At.AREA_3,o=n>0?-n+Ht:-n-Ht);else{var h,u,d,c,g,f,m;this.face===Xt.RIGHT?n=or(n,+R):this.face===Xt.BACK?n=or(n,+Ht):this.face===Xt.LEFT&&(n=or(n,-R)),c=Math.sin(e),g=Math.cos(e),f=Math.sin(n),m=Math.cos(n),h=g*m,u=g*f,d=c,this.face===Xt.FRONT?(r=Math.acos(h),o=ol(r,d,u,l)):this.face===Xt.RIGHT?(r=Math.acos(u),o=ol(r,d,-h,l)):this.face===Xt.BACK?(r=Math.acos(-h),o=ol(r,d,-u,l)):this.face===Xt.LEFT?(r=Math.acos(-u),o=ol(r,d,h,l)):(r=o=0,l.value=At.AREA_0)}return a=Math.atan(12/Ht*(o+Math.acos(Math.sin(o)*Math.cos(Rt))-R)),s=Math.sqrt((1-Math.cos(r))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(o))))),l.value===At.AREA_1?a+=R:l.value===At.AREA_2?a+=Ht:l.value===At.AREA_3&&(a+=1.5*Ht),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 CC(i){var t={lam:0,phi:0},e,n,o,r,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=At.AREA_0:i.y>=0&&i.y>=Math.abs(i.x)?(d.value=At.AREA_1,e-=R):i.x<0&&-i.x>=Math.abs(i.y)?(d.value=At.AREA_2,e=e<0?e+Ht:e-Ht):(d.value=At.AREA_3,e+=R),u=Ht/12*Math.tan(e),s=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),a=Math.atan(s),o=Math.cos(e),r=Math.tan(n),l=1-o*o*r*r*(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===At.AREA_0?t.lam=a+R:d.value===At.AREA_1?t.lam=a<0?a+Ht:a-Ht:d.value===At.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===At.AREA_0?t.lam=-a+R:d.value===At.AREA_1?t.lam=-a:d.value===At.AREA_2?t.lam=-a-R:t.lam=a<0?-a-Ht:-a+Ht;else{var c,g,f;c=l,u=c*c,u>=1?f=0:f=Math.sqrt(1-u)*Math.sin(a),u+=f*f,u>=1?g=0:g=Math.sqrt(1-u),d.value===At.AREA_1?(u=g,g=-f,f=u):d.value===At.AREA_2?(g=-g,f=-f):d.value===At.AREA_3&&(u=g,g=f,f=-u),this.face===Xt.RIGHT?(u=c,c=-g,g=u):this.face===Xt.BACK?(c=-c,g=-g):this.face===Xt.LEFT&&(u=c,c=g,g=-u),t.phi=Math.acos(-f)-R,t.lam=Math.atan2(g,c),this.face===Xt.RIGHT?t.lam=or(t.lam,-R):this.face===Xt.BACK?t.lam=or(t.lam,-Ht):this.face===Xt.LEFT&&(t.lam=or(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 ol(i,t,e,n){var o;return i<W?(n.value=At.AREA_0,o=0):(o=Math.atan2(t,e),Math.abs(o)<=Rt?n.value=At.AREA_0:o>Rt&&o<=R+Rt?(n.value=At.AREA_1,o-=R):o>R+Rt||o<=-(R+Rt)?(n.value=At.AREA_2,o=o>=0?o-Ht:o+Ht):(n.value=At.AREA_3,o+=R)),o}function or(i,t){var e=i+t;return e<-Ht?e+=rs:e>+Ht&&(e-=rs),e}var EC=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const SC={init:wC,forward:MC,inverse:CC,names:EC};var rd=[[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,TC=1/np,rr=18,rl=function(i,t){return i[0]+t*(i[1]+t*(i[2]+t*i[3]))},IC=function(i,t){return i[1]+t*(2*i[2]+t*3*i[3])};function zC(i,t,e,n){for(var o=t;n;--n){var r=i(o);if(o-=r,Math.abs(r)<e)break}return o}function RC(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function AC(i){var t=X(i.x-this.long0),e=Math.abs(i.y),n=Math.floor(e*np);n<0?n=0:n>=rr&&(n=rr-1),e=vi*(e-TC*n);var o={x:rl(rd[n],e)*t,y:rl(ms[n],e)};return i.y<0&&(o.y=-o.y),o.x=o.x*this.a*ep+this.x0,o.y=o.y*this.a*ip+this.y0,o}function PC(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/=rd[rr][0],t.y=i.y<0?-R:R;else{var e=Math.floor(t.y*rr);for(e<0?e=0:e>=rr&&(e=rr-1);;)if(ms[e][0]>t.y)--e;else if(ms[e+1][0]<=t.y)++e;else break;var n=ms[e],o=5*(t.y-n[0])/(ms[e+1][0]-n[0]);o=zC(function(r){return(rl(n,r)-t.y)/IC(n,r)},o,W,100),t.x/=rl(rd[e],o),t.y=(5*e+o)*he,i.y<0&&(t.y=-t.y)}return t.x=X(t.x+this.long0),t}var DC=["Robinson","robin"];const LC={init:RC,forward:AC,inverse:PC,names:DC};function OC(){this.name="geocent"}function FC(i){var t=zm(i,this.es,this.a);return t}function NC(i){var t=Rm(i,this.es,this.a,this.b);return t}var GC=["Geocentric","geocentric","geocent","Geocent"];const jC={init:OC,forward:FC,inverse:NC,names:GC};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 BC(){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)<W?this.mode=this.lat0<0?pe.S_POLE:pe.N_POLE:Math.abs(this.lat0)<W?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 WC(i){i.x-=this.long0;var t=Math.sin(i.y),e=Math.cos(i.y),n=Math.cos(i.x),o,r;switch(this.mode){case pe.OBLIQ:r=this.sinph0*t+this.cosph0*e*n;break;case pe.EQUIT:r=e*n;break;case pe.S_POLE:r=-t;break;case pe.N_POLE:r=t;break}switch(r=this.pn1/(this.p-r),o=r*e*Math.sin(i.x),this.mode){case pe.OBLIQ:r*=this.cosph0*t-this.sinph0*e*n;break;case pe.EQUIT:r*=t;break;case pe.N_POLE:r*=-(e*n);break;case pe.S_POLE:r*=e*n;break}var s,a;return s=r*this.cg+o*this.sg,a=1/(s*this.sw*this.h1+this.cw),o=(o*this.cg-r*this.sg)*this.cw*a,r=s*a,i.x=o*this.a,i.y=r*this.a,i}function ZC(i){i.x/=this.a,i.y/=this.a;var t={x:i.x,y:i.y},e,n,o;o=1/(this.pn1-i.y*this.sw),e=this.pn1*i.x*o,n=this.pn1*i.y*this.cw*o,i.x=e*this.cg+n*this.sg,i.y=n*this.cg-e*this.sg;var r=ai(i.x,i.y);if(Math.abs(r)<W)t.x=0,t.y=i.y;else{var s,a;switch(a=1-r*r*this.pfact,a=(this.p-Math.sqrt(a))/(this.pn1/r+r/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/r),i.y=(s-this.sinph0*Math.sin(t.y))*r,i.x*=a*this.cosph0;break;case pe.EQUIT:t.y=Math.asin(i.y*a/r),i.y=s*r,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 YC=["Tilted_Perspective","tpers"];const XC={init:BC,forward:WC,inverse:ZC,names:YC};function UC(){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 VC(i){var t=i.x,e=i.y,n,o,r,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(o=a*Math.cos(t)*Math.cos(e),r=a*Math.sin(t)*Math.cos(e),s=a*Math.sin(e),(this.radius_g-o)*o-r*r-s*s*this.radius_p_inv2<0)return i.x=Number.NaN,i.y=Number.NaN,i;n=this.radius_g-o,this.flip_axis?(i.x=this.radius_g_1*Math.atan(r/ai(s,n)),i.y=this.radius_g_1*Math.atan(s/n)):(i.x=this.radius_g_1*Math.atan(r/n),i.y=this.radius_g_1*Math.atan(s/ai(r,n)))}else this.shape==="sphere"&&(n=Math.cos(e),o=Math.cos(t)*n,r=Math.sin(t)*n,s=Math.sin(e),n=this.radius_g-o,this.flip_axis?(i.x=this.radius_g_1*Math.atan(r/ai(s,n)),i.y=this.radius_g_1*Math.atan(s/n)):(i.x=this.radius_g_1*Math.atan(r/n),i.y=this.radius_g_1*Math.atan(s/ai(r,n))));return i.x=i.x*this.a,i.y=i.y*this.a,i}function qC(i){var t=-1,e=0,n=0,o,r,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(o=e*e+l*l+t*t,r=2*this.radius_g*t,s=r*r-4*o*this.C,s<0)return i.x=Number.NaN,i.y=Number.NaN,i;a=(-r-Math.sqrt(s))/(2*o),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)),o=e*e+n*n+t*t,r=2*this.radius_g*t,s=r*r-4*o*this.C,s<0)return i.x=Number.NaN,i.y=Number.NaN,i;a=(-r-Math.sqrt(s))/(2*o),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 $C=["Geostationary Satellite View","Geostationary_Satellite","geos"];const HC={init:UC,forward:VC,inverse:qC,names:$C};function KC(i){i.Proj.projections.add(el),i.Proj.projections.add(il),i.Proj.projections.add(n5),i.Proj.projections.add(g5),i.Proj.projections.add(y5),i.Proj.projections.add(M5),i.Proj.projections.add(z5),i.Proj.projections.add(L5),i.Proj.projections.add(j5),i.Proj.projections.add(X5),i.Proj.projections.add(lM),i.Proj.projections.add(fM),i.Proj.projections.add(yM),i.Proj.projections.add(CM),i.Proj.projections.add(zM),i.Proj.projections.add(LM),i.Proj.projections.add(jM),i.Proj.projections.add(XM),i.Proj.projections.add(KM),i.Proj.projections.add(iC),i.Proj.projections.add(aC),i.Proj.projections.add(cC),i.Proj.projections.add(vC),i.Proj.projections.add(kC),i.Proj.projections.add(SC),i.Proj.projections.add(LC),i.Proj.projections.add(jC),i.Proj.projections.add(XC),i.Proj.projections.add(HC)}Le.defaultDatum="WGS84",Le.Proj=yi,Le.WGS84=new Le.Proj("WGS84"),Le.Point=tr,Le.toPoint=Lm,Le.defs=Se,Le.nadgrid=r2,Le.transform=Qa,Le.mgrs=b2,Le.version="__VERSION__",KC(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"),xw(Le);const op=Gt("EPSG:27700"),JC=`: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}.reset-control img{width:30px;height:auto}.north-arrow-control img{width:44px;height:auto}.north-arrow-control{top:.5em;right:.5em;border-radius:0!important;background-color:none!important}#area{position:absolute;bottom:0;left:0;z-index:100;background:white}
83
- `;var rp=Object.freeze,sp=Object.defineProperty,QC=Object.getOwnPropertyDescriptor,vt=(i,t,e,n)=>{for(var o=n>1?void 0:n?QC(t,e):t,r=i.length-1,s;r>=0;r--)(s=i[r])&&(o=(n?s(t,e,o):s(o))||o);return n&&o&&sp(t,e,o),o},tE=(i,t)=>rp(sp(i,"raw",{value:rp(t||i.slice())})),ap;j.MyMap=class extends An{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.markerImage="circle",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.resetControlImage="unicode",this.staticMode=!1,this.areaUnit="m2",this.showScale=!1,this.useScaleBarStyle=!1,this.showNorthArrow=!1,this.dispatch=(i,t)=>this.dispatchEvent(new CustomEvent(i,{detail:t}))}firstUpdated(){var p;const i=this.renderRoot.querySelector(`#${this.id}`),t=!this.disableVectorTiles&&Boolean(this.osVectorTilesApiKey),e=_w(this.osCopyright,this.osVectorTilesApiKey),n=yw(this.osCopyright,this.osVectorTilesApiKey),o=this.projection==="EPSG:27700"&&Boolean(op)?op:this.projection,r=Xs([this.longitude,this.latitude],o,"EPSG:3857"),s=new O_({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:r,zoom:this.zoom,enableRotation:!1}),controls:Vc({attribution:!0,zoom:!this.staticMode,rotate:!1}),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=Nk(this.drawPointer),l=Gk(this.drawPointer);this.showScale&&s.addControl(zk(this.useScaleBarStyle)),this.showNorthArrow&&s.addControl(Rk());const h=()=>{this.showFeaturesAtPoint?ns(s,pi,this.featureBuffer):d.getFeatures().length>0?ns(s,d,this.geojsonBuffer):(s.getView().setCenter(r),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))};this.hideResetControl||s.addControl(Ak(h,this.resetControlImage));const u=(p=this.renderRoot)==null?void 0:p.querySelectorAll(".ol-control button");u==null||u.forEach(_=>_.setAttribute("aria-label",_.getAttribute("title")||"")),s.on("pointerdrag",()=>{s.getViewport().style.cursor="grabbing"}),s.on("pointermove",()=>{s.getViewport().style.cursor="grab"});const d=new hn;if(this.geojsonData.type==="FeatureCollection"){let _=new Hn().readFeatures(this.geojsonData,{featureProjection:"EPSG:3857"});d.addFeatures(_)}else if(this.geojsonData.type==="Feature"){let _=new Hn().readFeature(this.geojsonData,{featureProjection:"EPSG:3857"});d.addFeature(_)}const c=new Qn({source:d,style:new le({stroke:new ke({color:this.geojsonColor,width:3}),fill:new fe({color:this.geojsonFill?Ua(this.geojsonColor,.2):Ua(this.geojsonColor,0)})})});if(s.addLayer(c),d.getFeatures().length>0){ns(s,d,this.geojsonBuffer);const _=d.getFeatures()[0].getGeometry();_&&this.dispatch("geojsonDataArea",qu(_,this.areaUnit))}if(this.drawMode){Li.clear();const _=Object.keys(this.drawGeojsonData.geometry).length>0;if(_){let v=new Hn().readFeature(this.drawGeojsonData,{featureProjection:"EPSG:3857"});Li.addFeature(v),ns(s,Li,this.drawGeojsonDataBuffer)}s.addLayer(em),_||s.addInteraction(a),s.addInteraction(l),s.addInteraction(im),Li.on("change",()=>{var y;const v=Li.getFeatures();if(v.length>0){const x=(y=Ck(v))==null?void 0:y.getGeometry();this.dispatch("geojsonChange",new Hn().writeFeaturesObject(v,{featureProjection:"EPSG:3857"})),x&&this.dispatch("areaChange",qu(x,this.areaUnit)),s.removeInteraction(a)}})}if(this.drawMode&&Boolean(this.osVectorTilesApiKey)&&!this.disableVectorTiles){s.addLayer(Pk),em.setZIndex(1001);const v=()=>{Za.clear();const y=s.getView().getZoom();if(y&&y>=20){const x=s.getView().calculateExtent(s.getSize());Dk(n,x)}};s.on("loadend",v),s.on("moveend",()=>{var x;((x=n.getSource())==null?void 0:x.getState())==="ready"&&setTimeout(v,200)})}if(this.showFeaturesAtPoint&&Boolean(this.osFeaturesApiKey)){pm(r,this.osFeaturesApiKey,!1),this.clickFeatures&&s.on("singleclick",v=>{pm(v.coordinate,this.osFeaturesApiKey,!0)});const _=gw(this.featureColor,this.featureFill,this.featureBorderNone);s.addLayer(_),pi.on("change",()=>{if(pi.getState()==="ready"&&pi.getFeatures().length>0){ns(s,pi,this.featureBuffer),this.dispatch("featuresGeojsonChange",new Hn().writeFeaturesObject(pi.getFeatures(),{featureProjection:"EPSG:3857"}));const v=pi.getFeatures()[0].getGeometry();v&&this.dispatch("featuresAreaChange",qu(v,this.areaUnit))}})}const g=new Kn({radius:9,fill:new fe({color:this.markerColor})}),f=new ca({src:jk,scale:.5}),m=()=>{switch(this.markerImage){case"circle":return g;case"pin":return f}};if(this.showMarker){const _=new ni(Xs([this.markerLongitude,this.markerLatitude],o,"EPSG:3857")),v=new Qn({source:new hn({features:[new Ti(_)]}),style:new le({image:m()})});s.addLayer(v)}setTimeout(()=>{window.dispatchEvent(new Event("resize")),i.style.opacity="1",this.dispatch("ready")},500)}render(){return Bi(ap||(ap=tE([`<script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>
43
+ 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(r,r+c),f=parseFloat(p)*m,_=i.substring(r+c),g=parseFloat(_)*m),v=f+h,y=g+u,{easting:v,northing:y,zoneLetter:a,zoneNumber:s,accuracy:m}}function R2(i,t){for(var e=Wm.charCodeAt(t-1),n=1e5,o=!1;e!==i.charCodeAt(0);){if(e++,e===Ne&&e++,e===ti&&e++,e>cs){if(o)throw"Bad character: "+i;e=er,o=!0}n+=1e5}return n}function A2(i,t){if(i>"V")throw"MGRSPoint given invalid Northing "+i;for(var e=Vm.charCodeAt(t-1),n=0,o=!1;e!==i.charCodeAt(0);){if(e++,e===Ne&&e++,e===ti&&e++,e>ds){if(o)throw"Bad character: "+i;e=er,o=!0}n+=1e5}return n}function P2(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 ir(i,t,e){if(!(this instanceof ir))return new ir(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")}ir.fromMGRS=function(i){return new ir(Ym(i))},ir.prototype.toMGRS=function(i){return Xm([this.x,this.y],i)};var D2=1,L2=.25,Km=.046875,Hm=.01953125,Qm=.01068115234375,O2=.75,F2=.46875,N2=.013020833333333334,G2=.007120768229166667,j2=.3645833333333333,B2=.005696614583333333,U2=.3076171875;function Jm(i){var t=[];t[0]=D2-i*(L2+i*(Km+i*(Hm+i*Qm))),t[1]=i*(O2-i*(Km+i*(Hm+i*Qm)));var e=i*i;return t[2]=e*(F2-i*(N2+i*G2)),e*=i,t[3]=e*(j2-i*B2),t[4]=e*i*U2,t}function il(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 W2=20;function tp(i,t,e){for(var n=1/(1-t),o=i,r=W2;r;--r){var s=Math.sin(o),a=1-t*s*s;if(a=(il(o,s,Math.cos(o),e)-i)*(a*Math.sqrt(a))*n,o-=a,Math.abs(a)<U)return o}return o}function V2(){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=Jm(this.es),this.ml0=il(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function X2(i){var t=i.x,e=i.y,n=Y(t-this.long0),o,r,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)>U?Math.tan(e):0,m=Math.pow(g,2),p=Math.pow(m,2);o=1-this.es*Math.pow(a,2),u=u/Math.sqrt(o);var _=il(e,a,l,this.en);r=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)<U)return 93;if(r=.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>U)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=r,i.y=s,i}function Y2(i){var t,e,n,o,r=(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=tp(t,this.es,this.en),Math.abs(e)<R){var d=Math.sin(e),c=Math.cos(e),f=Math.abs(c)>U?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=r*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)))),o=Y(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*hs(s),o=0;else{var a=Math.exp(r/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?o=0:o=Y(Math.atan2(l,u)+this.long0)}return i.x=o,i.y=n,i}var q2=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const nl={init:V2,forward:X2,inverse:Y2,names:q2};function ep(i){var t=Math.exp(i);return t=(t-1/t)/2,t}function hi(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 $2(i){var t=1+i,e=t-1;return e===0?i:i*Math.log(t)/e}function Z2(i){var t=Math.abs(i);return t=$2(t*(1+t/(hi(1,t)+1))),i<0?-t:t}function id(i,t){for(var e=2*Math.cos(2*t),n=i.length-1,o=i[n],r=0,s;--n>=0;)s=-r+e*o+i[n],r=o,o=s;return t+s*Math.sin(2*t)}function K2(i,t){for(var e=2*Math.cos(t),n=i.length-1,o=i[n],r=0,s;--n>=0;)s=-r+e*o+i[n],r=o,o=s;return Math.sin(t)*s}function H2(i){var t=Math.exp(i);return t=(t+1/t)/2,t}function ip(i,t,e){for(var n=Math.sin(t),o=Math.cos(t),r=ep(e),s=H2(e),a=2*o*s,l=-2*n*r,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=o*r,[a*u-l*f,a*f+l*u]}function Q2(){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&&(nl.init.apply(this),this.forward=nl.forward,this.inverse=nl.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+K2(this.gtu,2*n))}function J2(i){var t=Y(i.x-this.long0),e=i.y;e=id(this.cbg,e);var n=Math.sin(e),o=Math.cos(e),r=Math.sin(t),s=Math.cos(t);e=Math.atan2(n,s*o),t=Math.atan2(r*o,hi(n,o*s)),t=Z2(Math.tan(t));var a=ip(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 t5(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,o;if(Math.abs(t)<=2.623395162778){var r=ip(this.utg,2*e,2*t);e=e+r[0],t=t+r[1],t=Math.atan(ep(t));var s=Math.sin(e),a=Math.cos(e),l=Math.sin(t),h=Math.cos(t);e=Math.atan2(s*h,hi(l,h*a)),t=Math.atan2(l,h*a),n=Y(t+this.long0),o=id(this.cgb,e)}else n=1/0,o=1/0;return i.x=n,i.y=o,i}var e5=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"];const ol={init:Q2,forward:J2,inverse:t5,names:e5};function i5(i,t){if(i===void 0){if(i=Math.floor((Y(t)+Math.PI)*30/Math.PI)+1,i<0)return 0;if(i>60)return 60}return i}var n5="etmerc";function o5(){var i=i5(this.zone,this.long0);if(i===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(i)-183)*de,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,ol.init.apply(this),this.forward=ol.forward,this.inverse=ol.inverse}var r5=["Universal Transverse Mercator System","utm"];const s5={init:o5,names:r5,dependsOn:n5};function nd(i,t){return Math.pow((1-i)/(1+i),t)}var a5=20;function l5(){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+At)/(Math.pow(Math.tan(.5*this.lat0+At),this.C)*nd(this.e*i,this.ratexp))}function h5(i){var t=i.x,e=i.y;return i.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+At),this.C)*nd(this.e*Math.sin(e),this.ratexp))-R,i.x=this.C*t,i}function u5(i){for(var t=1e-14,e=i.x/this.C,n=i.y,o=Math.pow(Math.tan(.5*n+At)/this.K,1/this.C),r=a5;r>0&&(n=2*Math.atan(o*nd(this.e*Math.sin(i.y),-.5*this.e))-R,!(Math.abs(n-i.y)<t));--r)i.y=n;return r?(i.x=e,i.y=n,i):null}var d5=["gauss"];const od={init:l5,forward:h5,inverse:u5,names:d5};function c5(){od.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 f5(i){var t,e,n,o;return i.x=Y(i.x-this.long0),od.forward.apply(this,[i]),t=Math.sin(i.y),e=Math.cos(i.y),n=Math.cos(i.x),o=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*e*n),i.x=o*e*Math.sin(i.x),i.y=o*(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 g5(i){var t,e,n,o,r;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,r=Math.sqrt(i.x*i.x+i.y*i.y)){var s=2*Math.atan2(r,this.R2);t=Math.sin(s),e=Math.cos(s),o=Math.asin(e*this.sinc0+i.y*t*this.cosc0/r),n=Math.atan2(i.x*t,r*this.cosc0*e-i.y*this.sinc0*t)}else o=this.phic0,n=0;return i.x=n,i.y=o,od.inverse.apply(this,[i]),i.x=Y(i.x+this.long0),i}var m5=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const p5={init:c5,forward:f5,inverse:g5,names:m5};function v5(i,t,e){return t*=e,Math.tan(.5*(R+i))*Math.pow((1-t)/(1+t),.5*e)}function _5(){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)<=U&&(this.k0=.5*(1+hs(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=U&&(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)<=U&&(this.k0=.5*this.cons*xi(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/li(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=xi(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 y5(i){var t=i.x,e=i.y,n=Math.sin(e),o=Math.cos(e),r,s,a,l,h,u,d=Y(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=U&&Math.abs(e+this.lat0)<=U?(i.x=NaN,i.y=NaN,i):this.sphere?(r=2*this.k0/(1+this.sinlat0*n+this.coslat0*o*Math.cos(d)),i.x=this.a*r*o*Math.sin(d)+this.x0,i.y=this.a*r*(this.coslat0*n-this.sinlat0*o*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)<=U?(h=li(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)<U?(r=2*this.a*this.k0/(1+l*Math.cos(d)),i.y=r*a):(r=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*a+this.cosX0*l*Math.cos(d))),i.y=r*(this.cosX0*a-this.sinX0*l*Math.cos(d))+this.y0),i.x=r*l*Math.sin(d)+this.x0,i))}function x5(i){i.x-=this.x0,i.y-=this.y0;var t,e,n,o,r,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<=U?(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)<U?this.lat0>0?t=Y(this.long0+Math.atan2(i.x,-1*i.y)):t=Y(this.long0+Math.atan2(i.x,i.y)):t=Y(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)<=U){if(s<=U)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*us(this.e,n),t=this.con*Y(this.con*this.long0+Math.atan2(i.x,-1*i.y))}else o=2*Math.atan(s*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,s<=U?r=this.X0:(r=Math.asin(Math.cos(o)*this.sinX0+i.y*Math.sin(o)*this.cosX0/s),t=Y(this.long0+Math.atan2(i.x*Math.sin(o),s*this.cosX0*Math.cos(o)-i.y*this.sinX0*Math.sin(o)))),e=-1*us(this.e,Math.tan(.5*(R+r)));return i.x=t,i.y=e,i}var b5=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"];const k5={init:_5,forward:y5,inverse:x5,names:b5,ssfn_:v5};function w5(){var i=this.lat0;this.lambda0=this.long0;var t=Math.sin(i),e=this.a,n=this.rf,o=1/n,r=2*o-Math.pow(o,2),s=this.e=Math.sqrt(r);this.R=this.k0*e*Math.sqrt(1-r)/(1-r*Math.pow(t,2)),this.alpha=Math.sqrt(1+r/(1-r)*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 M5(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,o=2*(Math.atan(Math.exp(n))-Math.PI/4),r=this.alpha*(i.x-this.lambda0),s=Math.atan(Math.sin(r)/(Math.sin(this.b0)*Math.tan(o)+Math.cos(this.b0)*Math.cos(r))),a=Math.asin(Math.cos(this.b0)*Math.sin(o)-Math.sin(this.b0)*Math.cos(o)*Math.cos(r));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 C5(i){for(var t=i.x-this.x0,e=i.y-this.y0,n=t/this.R,o=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),r=Math.asin(Math.cos(this.b0)*Math.sin(o)+Math.sin(this.b0)*Math.cos(o)*Math.cos(n)),s=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(o))),a=this.lambda0+s/this.alpha,l=0,h=r,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+r/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 E5=["somerc"];const S5={init:w5,forward:M5,inverse:C5,names:E5};var nr=1e-7;function T5(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 I5(){var i,t,e,n,o,r,s,a,l,h,u=0,d,c=0,f=0,g=0,m=0,p=0,_=0;this.no_off=T5(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*de),v||y)c=this.longc;else if(f=this.long1,m=this.lat1,g=this.long2,p=this.lat2,Math.abs(m-p)<=nr||(i=Math.abs(m))<=nr||Math.abs(i-R)<=nr||Math.abs(Math.abs(this.lat0)-R)<=nr||Math.abs(Math.abs(p)-R)<=nr)throw new Error;var x=1-this.es;t=Math.sqrt(x),Math.abs(this.lat0)>U?(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)),o=n*n-1,o<=0?o=0:(o=Math.sqrt(o),this.lat0<0&&(o=-o)),this.E=o+=n,this.E*=Math.pow(li(this.e,this.lat0,a),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=o=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*(o-1/o)*Math.tan(d))/this.B):(r=Math.pow(li(this.e,m,Math.sin(m)),this.B),s=Math.pow(li(this.e,p,Math.sin(p)),this.B),o=this.E/r,l=(s-r)/(s+r),h=this.E*this.E,h=(h-s*r)/(h+s*r),i=f-g,i<-Math.pi?g-=as:i>Math.pi&&(g+=as),this.lam0=Y(.5*(f+g)-Math.atan(h*Math.tan(.5*this.B*(f-g))/l)/this.B),d=Math.atan(2*Math.sin(this.B*Y(f-this.lam0))/(o-1/o)),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)),o=.5*d,this.v_pole_n=this.ArB*Math.log(Math.tan(At-o)),this.v_pole_s=this.ArB*Math.log(Math.tan(At+o))}function z5(i){var t={},e,n,o,r,s,a,l,h;if(i.x=i.x-this.lam0,Math.abs(Math.abs(i.y)-R)>U){if(s=this.E/Math.pow(li(this.e,i.y,Math.sin(i.y)),this.B),a=1/s,e=.5*(s-a),n=.5*(s+a),r=Math.sin(this.B*i.x),o=(e*this.singam-r*this.cosgam)/n,Math.abs(Math.abs(o)-1)<U)throw new Error;h=.5*this.ArB*Math.log((1-o)/(1+o)),a=Math.cos(this.B*i.x),Math.abs(a)<nr?l=this.A*i.x:l=this.ArB*Math.atan2(e*this.cosgam+r*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 R5(i){var t,e,n,o,r,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),o=.5*(n-1/n),r=.5*(n+1/n),s=Math.sin(this.BrA*t),a=(s*this.cosgam+o*this.singam)/r,Math.abs(Math.abs(a)-1)<U)l.x=0,l.y=a<0?-R:R;else{if(l.y=this.E/Math.sqrt((1+a)/(1-a)),l.y=us(this.e,Math.pow(l.y,1/this.B)),l.y===1/0)throw new Error;l.x=-this.rB*Math.atan2(o*this.cosgam-s*this.singam,Math.cos(this.BrA*t))}return l.x+=this.lam0,l}var A5=["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 P5={init:I5,forward:z5,inverse:R5,names:A5};function D5(){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)<U)){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=xi(this.e,t,e),o=li(this.e,this.lat1,t),r=Math.sin(this.lat2),s=Math.cos(this.lat2),a=xi(this.e,r,s),l=li(this.e,this.lat2,r),h=li(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>U?this.ns=Math.log(n/a)/Math.log(o/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(o,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function L5(i){var t=i.x,e=i.y;Math.abs(2*Math.abs(e)-Math.PI)<=U&&(e=hs(e)*(R-2*U));var n=Math.abs(Math.abs(e)-R),o,r;if(n>U)o=li(this.e,e,Math.sin(e)),r=this.a*this.f0*Math.pow(o,this.ns);else{if(n=e*this.ns,n<=0)return null;r=0}var s=this.ns*Y(t-this.long0);return i.x=this.k0*(r*Math.sin(s))+this.x0,i.y=this.k0*(this.rh-r*Math.cos(s))+this.y0,i}function O5(i){var t,e,n,o,r,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),o=us(this.e,n),o===-9999)return null}else o=-R;return r=Y(l/this.ns+this.long0),i.x=r,i.y=o,i}var F5=["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 N5={init:D5,forward:L5,inverse:O5,names:F5};function G5(){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 j5(i){var t,e,n,o,r,s,a,l=i.x,h=i.y,u=Y(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,o=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(n)),r=Math.asin(Math.cos(e)*Math.sin(n)/Math.cos(o)),s=this.n*r,a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(o/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 B5(i){var t,e,n,o,r,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),r=Math.atan2(i.y,i.x),o=r/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(o)),e=Math.asin(Math.cos(n)*Math.sin(o)/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 U5=["Krovak","krovak"];const W5={init:G5,forward:j5,inverse:B5,names:U5};function ze(i,t,e,n,o){return i*o-t*Math.sin(2*o)+e*Math.sin(4*o)-n*Math.sin(6*o)}function fs(i){return 1-.25*i*(1+i/16*(3+1.25*i))}function gs(i){return .375*i*(1+.25*i*(1+.46875*i))}function ms(i){return .05859375*i*i*(1+.75*i)}function ps(i){return i*i*i*(35/3072)}function or(i,t,e){var n=t*e;return i/Math.sqrt(1-n*n)}function rr(i){return Math.abs(i)<R?i:i-hs(i)*Math.PI}function rl(i,t,e,n,o){var r,s;r=i/t;for(var a=0;a<15;a++)if(s=(i-(t*r-e*Math.sin(2*r)+n*Math.sin(4*r)-o*Math.sin(6*r)))/(t-2*e*Math.cos(2*r)+4*n*Math.cos(4*r)-6*o*Math.cos(6*r)),r+=s,Math.abs(s)<=1e-10)return r;return NaN}function V5(){this.sphere||(this.e0=fs(this.es),this.e1=gs(this.es),this.e2=ms(this.es),this.e3=ps(this.es),this.ml0=this.a*ze(this.e0,this.e1,this.e2,this.e3,this.lat0))}function X5(i){var t,e,n=i.x,o=i.y;if(n=Y(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(o)*Math.sin(n)),e=this.a*(Math.atan2(Math.tan(o),Math.cos(n))-this.lat0);else{var r=Math.sin(o),s=Math.cos(o),a=or(this.a,this.e,r),l=Math.tan(o)*Math.tan(o),h=n*Math.cos(o),u=h*h,d=this.es*s*s/(1-this.es),c=this.a*ze(this.e0,this.e1,this.e2,this.e3,o);t=a*h*(1-u*l*(1/6-(8-l+8*d)*u/120)),e=c-this.ml0+a*r/s*u*(.5+(5-l+6*d)*u/24)}return i.x=t+this.x0,i.y=e+this.y0,i}function Y5(i){i.x-=this.x0,i.y-=this.y0;var t=i.x/this.a,e=i.y/this.a,n,o;if(this.sphere){var r=e+this.lat0;n=Math.asin(Math.sin(r)*Math.cos(t)),o=Math.atan2(Math.tan(t),Math.cos(r))}else{var s=this.ml0/this.a+e,a=rl(s,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-R)<=U)return i.x=this.long0,i.y=R,e<0&&(i.y*=-1),i;var l=or(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),o=d*(1-c*(u/3+(1+3*u)*u*c/15))/Math.cos(a)}return i.x=Y(o+this.long0),i.y=rr(n),i}var q5=["Cassini","Cassini_Soldner","cass"];const $5={init:V5,forward:X5,inverse:Y5,names:q5};function In(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 Z5=1,K5=2,H5=3,Q5=4;function J5(){var i=Math.abs(this.lat0);if(Math.abs(i-R)<U?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(i)<U?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=In(this.e,1),this.mmf=.5/(1-this.es),this.apa=lM(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=In(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 tM(i){var t,e,n,o,r,s,a,l,h,u,d=i.x,c=i.y;if(d=Y(d-this.long0),this.sphere){if(r=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*r+this.cosph0*u*n,e<=U)return null;e=Math.sqrt(2/e),t=e*u*Math.sin(d),e*=this.mode===this.EQUIT?r:this.cosph0*r-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)<U)return null;e=At-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),o=Math.sin(d),r=Math.sin(c),s=In(this.e,r),(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)<U)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*o;break;case this.N_POLE:case this.S_POLE:s>=0?(t=(h=Math.sqrt(s))*o,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 eM(i){i.x-=this.x0,i.y-=this.y0;var t=i.x/this.a,e=i.y/this.a,n,o,r,s,a,l,h;if(this.sphere){var u=0,d,c=0;if(d=Math.sqrt(t*t+e*e),o=d*.5,o>1)return null;switch(o=2*Math.asin(o),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(c=Math.sin(o),u=Math.cos(o)),this.mode){case this.EQUIT:o=Math.abs(d)<=U?0:Math.asin(e*c/d),t*=c,e=u*d;break;case this.OBLIQ:o=Math.abs(d)<=U?this.lat0:Math.asin(u*this.sinph0+e*c*this.cosph0/d),t*=c*this.cosph0,e=(u-Math.sin(o)*this.sinph0)*d;break;case this.N_POLE:e=-e,o=R-o;break;case this.S_POLE:o-=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<U)return i.x=this.long0,i.y=this.lat0,i;s=2*Math.asin(.5*l/this.rq),r=Math.cos(s),t*=s=Math.sin(s),this.mode===this.OBLIQ?(h=r*this.sinb1+e*s*this.cosb1/l,a=this.qp*h,e=l*this.cosb1*r-e*this.sinb1*s):(h=e*s/l,a=this.qp*h,e=l*r)}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),o=hM(Math.asin(h),this.apa)}return i.x=Y(this.long0+n),i.y=o,i}var iM=.3333333333333333,nM=.17222222222222222,oM=.10257936507936508,rM=.06388888888888888,sM=.0664021164021164,aM=.016415012942191543;function lM(i){var t,e=[];return e[0]=i*iM,t=i*i,e[0]+=t*nM,e[1]=t*rM,t*=i,e[0]+=t*oM,e[1]+=t*sM,e[2]=t*aM,e}function hM(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 uM=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const dM={init:J5,forward:tM,inverse:eM,names:uM,S_POLE:Z5,N_POLE:K5,EQUIT:H5,OBLIQ:Q5};function zn(i){return Math.abs(i)>1&&(i=i>1?1:-1),Math.asin(i)}function cM(){Math.abs(this.lat1+this.lat2)<U||(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=xi(this.e3,this.sin_po,this.cos_po),this.qs1=In(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=xi(this.e3,this.sin_po,this.cos_po),this.qs2=In(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=In(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>U?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 fM(i){var t=i.x,e=i.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var n=In(this.e3,this.sin_phi,this.cos_phi),o=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,r=this.ns0*Y(t-this.long0),s=o*Math.sin(r)+this.x0,a=this.rh-o*Math.cos(r)+this.y0;return i.x=s,i.y=a,i}function gM(i){var t,e,n,o,r,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),o=0,t!==0&&(o=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)),r=Y(o/this.ns0+this.long0),i.x=r,i.y=s,i}function mM(i,t){var e,n,o,r,s,a=zn(.5*t);if(i<U)return a;for(var l=i*i,h=1;h<=25;h++)if(e=Math.sin(a),n=Math.cos(a),o=i*e,r=1-o*o,s=.5*r*r/n*(t/(1-l)-e/r+.5/i*Math.log((1-o)/(1+o))),a=a+s,Math.abs(s)<=1e-7)return a;return null}var pM=["Albers_Conic_Equal_Area","Albers","aea"];const vM={init:cM,forward:fM,inverse:gM,names:pM,phi1z:mM};function _M(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function yM(i){var t,e,n,o,r,s,a,l,h=i.x,u=i.y;return n=Y(h-this.long0),t=Math.sin(u),e=Math.cos(u),o=Math.cos(n),s=this.sin_p14*t+this.cos_p14*e*o,r=1,s>0||Math.abs(s)<=U?(a=this.x0+this.a*r*e*Math.sin(n)/s,l=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*e*o)/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*o)),i.x=a,i.y=l,i}function xM(i){var t,e,n,o,r,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))?(o=Math.atan2(t,this.rc),e=Math.sin(o),n=Math.cos(o),s=zn(n*this.sin_p14+i.y*e*this.cos_p14/t),r=Math.atan2(i.x*e,t*this.cos_p14*n-i.y*this.sin_p14*e),r=Y(this.long0+r)):(s=this.phic0,r=0),i.x=r,i.y=s,i}var bM=["gnom"];const kM={init:_M,forward:yM,inverse:xM,names:bM};function wM(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),o,r,s,a,l=0;l<30;l++)if(r=Math.sin(n),s=Math.cos(n),a=i*r,o=Math.pow(1-a*a,2)/(2*s)*(t/(1-i*i)-r/(1-a*a)+.5/i*Math.log((1-a)/(1+a))),n+=o,Math.abs(o)<=1e-10)return n;return NaN}function MM(){this.sphere||(this.k0=xi(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function CM(i){var t=i.x,e=i.y,n,o,r=Y(t-this.long0);if(this.sphere)n=this.x0+this.a*r*Math.cos(this.lat_ts),o=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var s=In(this.e,Math.sin(e));n=this.x0+this.a*this.k0*r,o=this.y0+this.a*s*.5/this.k0}return i.x=n,i.y=o,i}function EM(i){i.x-=this.x0,i.y-=this.y0;var t,e;return this.sphere?(t=Y(this.long0+i.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(i.y/this.a*Math.cos(this.lat_ts))):(e=wM(this.e,2*i.y*this.k0/this.a),t=Y(this.long0+i.x/(this.a*this.k0))),i.x=t,i.y=e,i}var SM=["cea"];const TM={init:MM,forward:CM,inverse:EM,names:SM};function IM(){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 zM(i){var t=i.x,e=i.y,n=Y(t-this.long0),o=rr(e-this.lat0);return i.x=this.x0+this.a*n*this.rc,i.y=this.y0+this.a*o,i}function RM(i){var t=i.x,e=i.y;return i.x=Y(this.long0+(t-this.x0)/(this.a*this.rc)),i.y=rr(this.lat0+(e-this.y0)/this.a),i}var AM=["Equirectangular","Equidistant_Cylindrical","eqc"];const PM={init:IM,forward:zM,inverse:RM,names:AM};var np=20;function DM(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=fs(this.es),this.e1=gs(this.es),this.e2=ms(this.es),this.e3=ps(this.es),this.ml0=this.a*ze(this.e0,this.e1,this.e2,this.e3,this.lat0)}function LM(i){var t=i.x,e=i.y,n,o,r,s=Y(t-this.long0);if(r=s*Math.sin(e),this.sphere)Math.abs(e)<=U?(n=this.a*s,o=-1*this.a*this.lat0):(n=this.a*Math.sin(r)/Math.tan(e),o=this.a*(rr(e-this.lat0)+(1-Math.cos(r))/Math.tan(e)));else if(Math.abs(e)<=U)n=this.a*s,o=-1*this.ml0;else{var a=or(this.a,this.e,Math.sin(e))/Math.tan(e);n=a*Math.sin(r),o=this.a*ze(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+a*(1-Math.cos(r))}return i.x=n+this.x0,i.y=o+this.y0,i}function OM(i){var t,e,n,o,r,s,a,l,h;if(n=i.x-this.x0,o=i.y-this.y0,this.sphere)if(Math.abs(o+this.a*this.lat0)<=U)t=Y(n/this.a+this.long0),e=0;else{s=this.lat0+o/this.a,a=n*n/this.a/this.a+s*s,l=s;var u;for(r=np;r;--r)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)<=U){e=l;break}t=Y(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(e))}else if(Math.abs(o+this.ml0)<=U)e=0,t=Y(this.long0+n/this.a);else{s=(this.ml0+o)/this.a,a=n*n/this.a/this.a+s*s,l=s;var d,c,f,g,m;for(r=np;r;--r)if(m=this.e*Math.sin(l),d=Math.sqrt(1-m*m)*Math.tan(l),c=this.a*ze(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)<=U){e=l;break}d=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),t=Y(this.long0+Math.asin(n*d/this.a)/Math.sin(e))}return i.x=t,i.y=e,i}var FM=["Polyconic","poly"];const NM={init:DM,forward:LM,inverse:OM,names:FM};function GM(){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 jM(i){var t,e=i.x,n=i.y,o=n-this.lat0,r=e-this.long0,s=o/ss*1e-5,a=r,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 BM(i){var t,e=i.x,n=i.y,o=e-this.x0,r=n-this.y0,s=r/this.a,a=o/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,z=1,P=0;for(t=1;t<=9;t++)z=z*M,P=P+this.D[t]*z;var j=this.lat0+P*ss*1e5,A=this.long0+S;return i.x=A,i.y=j,i}var UM=["New_Zealand_Map_Grid","nzmg"];const WM={init:GM,forward:jM,inverse:BM,names:UM};function VM(){}function XM(i){var t=i.x,e=i.y,n=Y(t-this.long0),o=this.x0+this.a*n,r=this.y0+this.a*Math.log(Math.tan(Math.PI/4+e/2.5))*1.25;return i.x=o,i.y=r,i}function YM(i){i.x-=this.x0,i.y-=this.y0;var t=Y(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 qM=["Miller_Cylindrical","mill"];const $M={init:VM,forward:XM,inverse:YM,names:qM};var ZM=20;function KM(){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=Jm(this.es)}function HM(i){var t,e,n=i.x,o=i.y;if(n=Y(n-this.long0),this.sphere){if(!this.m)o=this.n!==1?Math.asin(this.n*Math.sin(o)):o;else for(var r=this.n*Math.sin(o),s=ZM;s;--s){var a=(this.m*o+Math.sin(o)-r)/(this.m+Math.cos(o));if(o-=a,Math.abs(a)<U)break}t=this.a*this.C_x*n*(this.m+Math.cos(o)),e=this.a*this.C_y*o}else{var l=Math.sin(o),h=Math.cos(o);e=this.a*il(o,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 QM(i){var t,e,n,o;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=zn((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=zn(Math.sin(t)/this.n)),n=Y(n+this.long0),t=rr(t)):(t=tp(i.y/this.a,this.es,this.en),o=Math.abs(t),o<R?(o=Math.sin(t),e=this.long0+i.x*Math.sqrt(1-this.es*o*o)/(this.a*Math.cos(t)),n=Y(e)):o-U<R&&(n=this.long0)),i.x=n,i.y=t,i}var JM=["Sinusoidal","sinu"];const tC={init:KM,forward:HM,inverse:QM,names:JM};function eC(){}function iC(i){for(var t=i.x,e=i.y,n=Y(t-this.long0),o=e,r=Math.PI*Math.sin(e);;){var s=-(o+Math.sin(o)-r)/(1+Math.cos(o));if(o+=s,Math.abs(s)<U)break}o/=2,Math.PI/2-Math.abs(e)<U&&(n=0);var a=.900316316158*this.a*n*Math.cos(o)+this.x0,l=1.4142135623731*this.a*Math.sin(o)+this.y0;return i.x=a,i.y=l,i}function nC(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=Y(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 o=Math.asin(e);return i.x=n,i.y=o,i}var oC=["Mollweide","moll"];const rC={init:eC,forward:iC,inverse:nC,names:oC};function sC(){Math.abs(this.lat1+this.lat2)<U||(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=fs(this.es),this.e1=gs(this.es),this.e2=ms(this.es),this.e3=ps(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=xi(this.e,this.sinphi,this.cosphi),this.ml1=ze(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<U?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=xi(this.e,this.sinphi,this.cosphi),this.ml2=ze(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=ze(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function aC(i){var t=i.x,e=i.y,n;if(this.sphere)n=this.a*(this.g-e);else{var o=ze(this.e0,this.e1,this.e2,this.e3,e);n=this.a*(this.g-o)}var r=this.ns*Y(t-this.long0),s=this.x0+n*Math.sin(r),a=this.y0+this.rh-n*Math.cos(r);return i.x=s,i.y=a,i}function lC(i){i.x-=this.x0,i.y=this.rh-i.y+this.y0;var t,e,n,o;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 r=0;if(e!==0&&(r=Math.atan2(t*i.x,t*i.y)),this.sphere)return o=Y(this.long0+r/this.ns),n=rr(this.g-e/this.a),i.x=o,i.y=n,i;var s=this.g-e/this.a;return n=rl(s,this.e0,this.e1,this.e2,this.e3),o=Y(this.long0+r/this.ns),i.x=o,i.y=n,i}var hC=["Equidistant_Conic","eqdc"];const uC={init:sC,forward:aC,inverse:lC,names:hC};function dC(){this.R=this.a}function cC(i){var t=i.x,e=i.y,n=Y(t-this.long0),o,r;Math.abs(e)<=U&&(o=this.x0+this.R*n,r=this.y0);var s=zn(2*Math.abs(e/Math.PI));(Math.abs(n)<=U||Math.abs(Math.abs(e)-R)<=U)&&(o=this.x0,e>=0?r=this.y0+Math.PI*this.R*Math.tan(.5*s):r=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),o=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?r=this.y0+m:r=this.y0-m,i.x=o,i.y=r,i}function fC(i){var t,e,n,o,r,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,o=i.y/d,r=n*n+o*o,s=-Math.abs(o)*(1+r),a=s-2*o*o+n*n,l=-2*s+1+2*o*o+r*r,f=o*o/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)<U?t=this.long0:t=Y(this.long0+Math.PI*(r-1+Math.sqrt(1+2*(n*n-o*o)+r*r))/2/n),i.x=t,i.y=e,i}var gC=["Van_der_Grinten_I","VanDerGrinten","vandg"];const mC={init:dC,forward:cC,inverse:fC,names:gC};function pC(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function vC(i){var t=i.x,e=i.y,n=Math.sin(i.y),o=Math.cos(i.y),r=Y(t-this.long0),s,a,l,h,u,d,c,f,g,m,p,_,v,y,x,k,w,C,M,S,z,P,j;return this.sphere?Math.abs(this.sin_p12-1)<=U?(i.x=this.x0+this.a*(R-e)*Math.sin(r),i.y=this.y0-this.a*(R-e)*Math.cos(r),i):Math.abs(this.sin_p12+1)<=U?(i.x=this.x0+this.a*(R+e)*Math.sin(r),i.y=this.y0+this.a*(R+e)*Math.cos(r),i):(C=this.sin_p12*n+this.cos_p12*o*Math.cos(r),k=Math.acos(C),w=k?k/Math.sin(k):1,i.x=this.x0+this.a*w*o*Math.sin(r),i.y=this.y0+this.a*w*(this.cos_p12*n-this.sin_p12*o*Math.cos(r)),i):(s=fs(this.es),a=gs(this.es),l=ms(this.es),h=ps(this.es),Math.abs(this.sin_p12-1)<=U?(u=this.a*ze(s,a,l,h,R),d=this.a*ze(s,a,l,h,e),i.x=this.x0+(u-d)*Math.sin(r),i.y=this.y0-(u-d)*Math.cos(r),i):Math.abs(this.sin_p12+1)<=U?(u=this.a*ze(s,a,l,h,R),d=this.a*ze(s,a,l,h,e),i.x=this.x0+(u+d)*Math.sin(r),i.y=this.y0+(u+d)*Math.cos(r),i):(c=n/o,f=or(this.a,this.e,this.sin_p12),g=or(this.a,this.e,n),m=Math.atan((1-this.es)*c+this.es*f*this.sin_p12/(g*o)),p=Math.atan2(Math.sin(r),this.cos_p12*Math.tan(m)-this.sin_p12*Math.cos(r)),p===0?M=Math.asin(this.cos_p12*Math.sin(m)-this.sin_p12*Math.cos(m)):Math.abs(Math.abs(p)-Math.PI)<=U?M=-Math.asin(this.cos_p12*Math.sin(m)-this.sin_p12*Math.cos(m)):M=Math.asin(Math.sin(r)*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,z=S*M,P=z*M,j=P*M,k=f*M*(1-S*x*(1-x)/6+z/8*y*(1-2*x)+P/120*(x*(4-7*x)-3*_*_*(1-7*x))-j/48*y),i.x=this.x0+k*Math.sin(p),i.y=this.y0+k*Math.cos(p),i))}function _C(i){i.x-=this.x0,i.y-=this.y0;var t,e,n,o,r,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*R*this.a?void 0:(e=t/this.a,n=Math.sin(e),o=Math.cos(e),r=this.long0,Math.abs(t)<=U?s=this.lat0:(s=zn(o*this.sin_p12+i.y*n*this.cos_p12/t),a=Math.abs(this.lat0)-R,Math.abs(a)<=U?this.lat0>=0?r=Y(this.long0+Math.atan2(i.x,-i.y)):r=Y(this.long0-Math.atan2(-i.x,i.y)):r=Y(this.long0+Math.atan2(i.x*n,t*this.cos_p12*o-i.y*this.sin_p12*n))),i.x=r,i.y=s,i)):(l=fs(this.es),h=gs(this.es),u=ms(this.es),d=ps(this.es),Math.abs(this.sin_p12-1)<=U?(c=this.a*ze(l,h,u,d,R),t=Math.sqrt(i.x*i.x+i.y*i.y),f=c-t,s=rl(f/this.a,l,h,u,d),r=Y(this.long0+Math.atan2(i.x,-1*i.y)),i.x=r,i.y=s,i):Math.abs(this.sin_p12+1)<=U?(c=this.a*ze(l,h,u,d,R),t=Math.sqrt(i.x*i.x+i.y*i.y),f=t-c,s=rl(f/this.a,l,h,u,d),r=Y(this.long0+Math.atan2(i.x,i.y)),i.x=r,i.y=s,i):(t=Math.sqrt(i.x*i.x+i.y*i.y),p=Math.atan2(i.x,i.y),g=or(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)*_),r=Y(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=r,i.y=s,i))}var yC=["Azimuthal_Equidistant","aeqd"];const xC={init:pC,forward:vC,inverse:_C,names:yC};function bC(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function kC(i){var t,e,n,o,r,s,a,l,h=i.x,u=i.y;return n=Y(h-this.long0),t=Math.sin(u),e=Math.cos(u),o=Math.cos(n),s=this.sin_p14*t+this.cos_p14*e*o,r=1,(s>0||Math.abs(s)<=U)&&(a=this.a*r*e*Math.sin(n),l=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*e*o)),i.x=a,i.y=l,i}function wC(i){var t,e,n,o,r,s,a;return i.x-=this.x0,i.y-=this.y0,t=Math.sqrt(i.x*i.x+i.y*i.y),e=zn(t/this.a),n=Math.sin(e),o=Math.cos(e),s=this.long0,Math.abs(t)<=U?(a=this.lat0,i.x=s,i.y=a,i):(a=zn(o*this.sin_p14+i.y*n*this.cos_p14/t),r=Math.abs(this.lat0)-R,Math.abs(r)<=U?(this.lat0>=0?s=Y(this.long0+Math.atan2(i.x,-i.y)):s=Y(this.long0-Math.atan2(-i.x,i.y)),i.x=s,i.y=a,i):(s=Y(this.long0+Math.atan2(i.x*n,t*this.cos_p14*o-i.y*this.sin_p14*n)),i.x=s,i.y=a,i))}var MC=["ortho"];const CC={init:bC,forward:kC,inverse:wC,names:MC};var Yt={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 EC(){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-At/2?this.face=Yt.TOP:this.lat0<=-(R-At/2)?this.face=Yt.BOTTOM:Math.abs(this.long0)<=At?this.face=Yt.FRONT:Math.abs(this.long0)<=R+At?this.face=this.long0>0?Yt.RIGHT:Yt.LEFT:this.face=Yt.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 SC(i){var t={x:0,y:0},e,n,o,r,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===Yt.TOP)r=R-e,n>=At&&n<=R+At?(l.value=Pt.AREA_0,o=n-R):n>R+At||n<=-(R+At)?(l.value=Pt.AREA_1,o=n>0?n-Ht:n+Ht):n>-(R+At)&&n<=-At?(l.value=Pt.AREA_2,o=n+R):(l.value=Pt.AREA_3,o=n);else if(this.face===Yt.BOTTOM)r=R+e,n>=At&&n<=R+At?(l.value=Pt.AREA_0,o=-n+R):n<At&&n>=-At?(l.value=Pt.AREA_1,o=-n):n<-At&&n>=-(R+At)?(l.value=Pt.AREA_2,o=-n-R):(l.value=Pt.AREA_3,o=n>0?-n+Ht:-n-Ht);else{var h,u,d,c,f,g,m;this.face===Yt.RIGHT?n=sr(n,+R):this.face===Yt.BACK?n=sr(n,+Ht):this.face===Yt.LEFT&&(n=sr(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===Yt.FRONT?(r=Math.acos(h),o=sl(r,d,u,l)):this.face===Yt.RIGHT?(r=Math.acos(u),o=sl(r,d,-h,l)):this.face===Yt.BACK?(r=Math.acos(-h),o=sl(r,d,-u,l)):this.face===Yt.LEFT?(r=Math.acos(-u),o=sl(r,d,h,l)):(r=o=0,l.value=Pt.AREA_0)}return a=Math.atan(12/Ht*(o+Math.acos(Math.sin(o)*Math.cos(At))-R)),s=Math.sqrt((1-Math.cos(r))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(o))))),l.value===Pt.AREA_1?a+=R:l.value===Pt.AREA_2?a+=Ht:l.value===Pt.AREA_3&&(a+=1.5*Ht),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 TC(i){var t={lam:0,phi:0},e,n,o,r,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+Ht:e-Ht):(d.value=Pt.AREA_3,e+=R),u=Ht/12*Math.tan(e),s=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),a=Math.atan(s),o=Math.cos(e),r=Math.tan(n),l=1-o*o*r*r*(1-Math.cos(Math.atan(1/Math.cos(a)))),l<-1?l=-1:l>1&&(l=1),this.face===Yt.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+Ht:a-Ht:d.value===Pt.AREA_2?t.lam=a-R:t.lam=a;else if(this.face===Yt.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-Ht:-a+Ht;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===Yt.RIGHT?(u=c,c=-f,f=u):this.face===Yt.BACK?(c=-c,f=-f):this.face===Yt.LEFT&&(u=c,c=f,f=-u),t.phi=Math.acos(-g)-R,t.lam=Math.atan2(f,c),this.face===Yt.RIGHT?t.lam=sr(t.lam,-R):this.face===Yt.BACK?t.lam=sr(t.lam,-Ht):this.face===Yt.LEFT&&(t.lam=sr(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 sl(i,t,e,n){var o;return i<U?(n.value=Pt.AREA_0,o=0):(o=Math.atan2(t,e),Math.abs(o)<=At?n.value=Pt.AREA_0:o>At&&o<=R+At?(n.value=Pt.AREA_1,o-=R):o>R+At||o<=-(R+At)?(n.value=Pt.AREA_2,o=o>=0?o-Ht:o+Ht):(n.value=Pt.AREA_3,o+=R)),o}function sr(i,t){var e=i+t;return e<-Ht?e+=as:e>+Ht&&(e-=as),e}var IC=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const zC={init:EC,forward:SC,inverse:TC,names:IC};var rd=[[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]],vs=[[-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]],op=.8487,rp=1.3523,sp=yi/5,RC=1/sp,ar=18,al=function(i,t){return i[0]+t*(i[1]+t*(i[2]+t*i[3]))},AC=function(i,t){return i[1]+t*(2*i[2]+t*3*i[3])};function PC(i,t,e,n){for(var o=t;n;--n){var r=i(o);if(o-=r,Math.abs(r)<e)break}return o}function DC(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function LC(i){var t=Y(i.x-this.long0),e=Math.abs(i.y),n=Math.floor(e*sp);n<0?n=0:n>=ar&&(n=ar-1),e=yi*(e-RC*n);var o={x:al(rd[n],e)*t,y:al(vs[n],e)};return i.y<0&&(o.y=-o.y),o.x=o.x*this.a*op+this.x0,o.y=o.y*this.a*rp+this.y0,o}function OC(i){var t={x:(i.x-this.x0)/(this.a*op),y:Math.abs(i.y-this.y0)/(this.a*rp)};if(t.y>=1)t.x/=rd[ar][0],t.y=i.y<0?-R:R;else{var e=Math.floor(t.y*ar);for(e<0?e=0:e>=ar&&(e=ar-1);;)if(vs[e][0]>t.y)--e;else if(vs[e+1][0]<=t.y)++e;else break;var n=vs[e],o=5*(t.y-n[0])/(vs[e+1][0]-n[0]);o=PC(function(r){return(al(n,r)-t.y)/AC(n,r)},o,U,100),t.x/=al(rd[e],o),t.y=(5*e+o)*de,i.y<0&&(t.y=-t.y)}return t.x=Y(t.x+this.long0),t}var FC=["Robinson","robin"];const NC={init:DC,forward:LC,inverse:OC,names:FC};function GC(){this.name="geocent"}function jC(i){var t=Pm(i,this.es,this.a);return t}function BC(i){var t=Dm(i,this.es,this.a,this.b);return t}var UC=["Geocentric","geocentric","geocent","Geocent"];const WC={init:GC,forward:jC,inverse:BC,names:UC};var _e={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},_s={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 VC(){if(Object.keys(_s).forEach(function(e){if(typeof this[e]>"u")this[e]=_s[e].def;else{if(_s[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);_s[e].num&&(this[e]=parseFloat(this[e]))}_s[e].degrees&&(this[e]=this[e]*de)}.bind(this)),Math.abs(Math.abs(this.lat0)-R)<U?this.mode=this.lat0<0?_e.S_POLE:_e.N_POLE:Math.abs(this.lat0)<U?this.mode=_e.EQUIT:(this.mode=_e.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 XC(i){i.x-=this.long0;var t=Math.sin(i.y),e=Math.cos(i.y),n=Math.cos(i.x),o,r;switch(this.mode){case _e.OBLIQ:r=this.sinph0*t+this.cosph0*e*n;break;case _e.EQUIT:r=e*n;break;case _e.S_POLE:r=-t;break;case _e.N_POLE:r=t;break}switch(r=this.pn1/(this.p-r),o=r*e*Math.sin(i.x),this.mode){case _e.OBLIQ:r*=this.cosph0*t-this.sinph0*e*n;break;case _e.EQUIT:r*=t;break;case _e.N_POLE:r*=-(e*n);break;case _e.S_POLE:r*=e*n;break}var s,a;return s=r*this.cg+o*this.sg,a=1/(s*this.sw*this.h1+this.cw),o=(o*this.cg-r*this.sg)*this.cw*a,r=s*a,i.x=o*this.a,i.y=r*this.a,i}function YC(i){i.x/=this.a,i.y/=this.a;var t={x:i.x,y:i.y},e,n,o;o=1/(this.pn1-i.y*this.sw),e=this.pn1*i.x*o,n=this.pn1*i.y*this.cw*o,i.x=e*this.cg+n*this.sg,i.y=n*this.cg-e*this.sg;var r=hi(i.x,i.y);if(Math.abs(r)<U)t.x=0,t.y=i.y;else{var s,a;switch(a=1-r*r*this.pfact,a=(this.p-Math.sqrt(a))/(this.pn1/r+r/this.pn1),s=Math.sqrt(1-a*a),this.mode){case _e.OBLIQ:t.y=Math.asin(s*this.sinph0+i.y*a*this.cosph0/r),i.y=(s-this.sinph0*Math.sin(t.y))*r,i.x*=a*this.cosph0;break;case _e.EQUIT:t.y=Math.asin(i.y*a/r),i.y=s*r,i.x*=a;break;case _e.N_POLE:t.y=Math.asin(s),i.y=-i.y;break;case _e.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 qC=["Tilted_Perspective","tpers"];const $C={init:VC,forward:XC,inverse:YC,names:qC};function ZC(){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 KC(i){var t=i.x,e=i.y,n,o,r,s;if(t=t-this.long0,this.shape==="ellipse"){e=Math.atan(this.radius_p2*Math.tan(e));var a=this.radius_p/hi(this.radius_p*Math.cos(e),Math.sin(e));if(o=a*Math.cos(t)*Math.cos(e),r=a*Math.sin(t)*Math.cos(e),s=a*Math.sin(e),(this.radius_g-o)*o-r*r-s*s*this.radius_p_inv2<0)return i.x=Number.NaN,i.y=Number.NaN,i;n=this.radius_g-o,this.flip_axis?(i.x=this.radius_g_1*Math.atan(r/hi(s,n)),i.y=this.radius_g_1*Math.atan(s/n)):(i.x=this.radius_g_1*Math.atan(r/n),i.y=this.radius_g_1*Math.atan(s/hi(r,n)))}else this.shape==="sphere"&&(n=Math.cos(e),o=Math.cos(t)*n,r=Math.sin(t)*n,s=Math.sin(e),n=this.radius_g-o,this.flip_axis?(i.x=this.radius_g_1*Math.atan(r/hi(s,n)),i.y=this.radius_g_1*Math.atan(s/n)):(i.x=this.radius_g_1*Math.atan(r/n),i.y=this.radius_g_1*Math.atan(s/hi(r,n))));return i.x=i.x*this.a,i.y=i.y*this.a,i}function HC(i){var t=-1,e=0,n=0,o,r,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)*hi(1,n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*hi(1,e));var l=n/this.radius_p;if(o=e*e+l*l+t*t,r=2*this.radius_g*t,s=r*r-4*o*this.C,s<0)return i.x=Number.NaN,i.y=Number.NaN,i;a=(-r-Math.sqrt(s))/(2*o),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)),o=e*e+n*n+t*t,r=2*this.radius_g*t,s=r*r-4*o*this.C,s<0)return i.x=Number.NaN,i.y=Number.NaN,i;a=(-r-Math.sqrt(s))/(2*o),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 QC=["Geostationary Satellite View","Geostationary_Satellite","geos"];const JC={init:ZC,forward:KC,inverse:HC,names:QC};function tE(i){i.Proj.projections.add(nl),i.Proj.projections.add(ol),i.Proj.projections.add(s5),i.Proj.projections.add(p5),i.Proj.projections.add(k5),i.Proj.projections.add(S5),i.Proj.projections.add(P5),i.Proj.projections.add(N5),i.Proj.projections.add(W5),i.Proj.projections.add($5),i.Proj.projections.add(dM),i.Proj.projections.add(vM),i.Proj.projections.add(kM),i.Proj.projections.add(TM),i.Proj.projections.add(PM),i.Proj.projections.add(NM),i.Proj.projections.add(WM),i.Proj.projections.add($M),i.Proj.projections.add(tC),i.Proj.projections.add(rC),i.Proj.projections.add(uC),i.Proj.projections.add(mC),i.Proj.projections.add(xC),i.Proj.projections.add(CC),i.Proj.projections.add(zC),i.Proj.projections.add(NC),i.Proj.projections.add(WC),i.Proj.projections.add($C),i.Proj.projections.add(JC)}Fe.defaultDatum="WGS84",Fe.Proj=bi,Fe.WGS84=new Fe.Proj("WGS84"),Fe.Point=ir,Fe.toPoint=Nm,Fe.defs=Ie,Fe.nadgrid=l2,Fe.transform=el,Fe.mgrs=M2,Fe.version="__VERSION__",tE(Fe),Fe.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"),ww(Fe);const ap=jt("EPSG:27700"),eE=`: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}.ol-scale-line{background-color:transparent}.ol-scale-line-inner{border:.2em solid #2c2c2c;border-top:none;color:#2c2c2c;font-size:1em;font-family:inherit}.reset-control{top:114px;left:.5em}.reset-control img{width:30px;height:auto}.north-arrow-control img{width:54px;height:auto}.north-arrow-control{top:.5em;right:.5em;border-radius:0!important;background-color:transparent!important}#area{position:absolute;bottom:0;left:0;z-index:100;background:white}
44
+ `;var lp=Object.freeze,hp=Object.defineProperty,iE=Object.getOwnPropertyDescriptor,mt=(i,t,e,n)=>{for(var o=n>1?void 0:n?iE(t,e):t,r=i.length-1,s;r>=0;r--)(s=i[r])&&(o=(n?s(t,e,o):s(o))||o);return n&&o&&hp(t,e,o),o},nE=(i,t)=>lp(hp(i,"raw",{value:lp(t||i.slice())})),up;F.MyMap=(dd=class extends Ln{constructor(){super();X(this,"id","map");X(this,"latitude",51.507351);X(this,"longitude",-.127758);X(this,"projection","EPSG:4326");X(this,"zoom",10);X(this,"minZoom",7);X(this,"maxZoom",22);X(this,"drawMode",!1);X(this,"drawType","Polygon");X(this,"drawPointColor","#2c2c2c");X(this,"drawGeojsonData",{type:"Feature",geometry:{}});X(this,"drawGeojsonDataBuffer",100);X(this,"drawPointer","crosshair");X(this,"showFeaturesAtPoint",!1);X(this,"clickFeatures",!1);X(this,"featureColor","#0000ff");X(this,"featureFill",!1);X(this,"featureBorderNone",!1);X(this,"featureBuffer",40);X(this,"showMarker",!1);X(this,"markerImage","circle");X(this,"markerLatitude",this.latitude);X(this,"markerLongitude",this.longitude);X(this,"markerColor","#2c2c2c");X(this,"geojsonData",{type:"FeatureCollection",features:[]});X(this,"geojsonColor","#ff0000");X(this,"geojsonFill",!1);X(this,"geojsonBuffer",12);X(this,"disableVectorTiles",!1);X(this,"osVectorTilesApiKey","a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex");X(this,"osFeaturesApiKey","a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex");X(this,"osCopyright",`© Crown copyright and database rights ${new Date().getFullYear()} OS (0)100024857`);X(this,"hideResetControl",!1);X(this,"resetControlImage","unicode");X(this,"staticMode",!1);X(this,"areaUnit","m2");X(this,"showScale",!1);X(this,"useScaleBarStyle",!1);X(this,"showNorthArrow",!1);X(this,"map");X(this,"dispatch",(e,n)=>this.dispatchEvent(new CustomEvent(e,{detail:n})))}firstUpdated(){var y;const e=this.renderRoot.querySelector(`#${this.id}`),n=!this.disableVectorTiles&&Boolean(this.osVectorTilesApiKey),o=bw(this.osCopyright,this.osVectorTilesApiKey),r=kw(this.osCopyright,this.osVectorTilesApiKey),s=this.projection==="EPSG:27700"&&Boolean(ap)?ap:this.projection,a=qs([this.longitude,this.latitude],s,"EPSG:3857"),l=new N_({target:e,layers:[n?r:o],view:new on({projection:"EPSG:3857",extent:U0([-10.76418,49.528423,1.9134116,61.331151],"EPSG:4326","EPSG:3857"),minZoom:this.minZoom,maxZoom:this.maxZoom,center:a,zoom:this.zoom,enableRotation:!1}),controls:Hc({attribution:!0,zoom:!this.staticMode,rotate:!1}),interactions:of({doubleClickZoom:!this.staticMode,dragPan:!this.staticMode,mouseWheelZoom:!this.staticMode})});this.map=l,window.olMap={}.VITEST?this.map:void 0;const h=Bk(this.drawType,this.drawPointer,this.drawPointColor),u=Uk(this.drawPointer);this.showScale&&l.addControl(Tk(this.useScaleBarStyle)),this.showNorthArrow&&l.addControl(Ik());const d=()=>{this.showFeaturesAtPoint?rs(l,_i,this.featureBuffer):f.getFeatures().length>0?rs(l,f,this.geojsonBuffer):(l.getView().setCenter(a),l.getView().setZoom(this.zoom)),this.drawMode&&(Ni.clear(),this.dispatch("geojsonChange",{}),this.drawType==="Polygon"&&this.dispatch("areaChange",`0 ${this.areaUnit==="m2"?"m²":this.areaUnit}`),l.addInteraction(h),l.addInteraction(rm))};this.hideResetControl||l.addControl(zk(d,this.resetControlImage));const c=(y=this.renderRoot)==null?void 0:y.querySelectorAll(".ol-control button");c==null||c.forEach(x=>x.setAttribute("aria-label",x.getAttribute("title")||"")),l.on("pointerdrag",()=>{l.getViewport().style.cursor="grabbing"}),l.on("pointermove",()=>{l.getViewport().style.cursor="grab"});const f=new cn;if(this.geojsonData.type==="FeatureCollection"){let x=new Jn().readFeatures(this.geojsonData,{featureProjection:"EPSG:3857"});f.addFeatures(x)}else if(this.geojsonData.type==="Feature"){let x=new Jn().readFeature(this.geojsonData,{featureProjection:"EPSG:3857"});f.addFeature(x)}const g=new eo({source:f,style:new ee({stroke:new Me({color:this.geojsonColor,width:3}),fill:new ae({color:this.geojsonFill?$a(this.geojsonColor,.2):$a(this.geojsonColor,0)})})});if(l.addLayer(g),f.getFeatures().length>0){rs(l,f,this.geojsonBuffer);const x=f.getFeatures()[0].getGeometry();x&&this.dispatch("geojsonDataArea",$u(x,this.areaUnit))}const m=jk(this.drawType,this.drawPointColor);if(this.drawMode){Ni.clear();const x=Object.keys(this.drawGeojsonData.geometry).length>0;if(x){let k=new Jn().readFeature(this.drawGeojsonData,{featureProjection:"EPSG:3857"});Ni.addFeature(k),rs(l,Ni,this.drawGeojsonDataBuffer)}l.addLayer(m),x||l.addInteraction(h),l.addInteraction(u),l.addInteraction(rm),Ni.on("change",()=>{var w;const k=Ni.getFeatures();if(k.length>0){const C=(w=Ck(k))==null?void 0:w.getGeometry();this.dispatch("geojsonChange",new Jn().writeFeaturesObject(k,{featureProjection:"EPSG:3857"})),C&&this.drawType==="Polygon"&&this.dispatch("areaChange",$u(C,this.areaUnit)),l.removeInteraction(h)}})}if(this.drawMode&&this.drawType==="Polygon"&&Boolean(this.osVectorTilesApiKey)&&!this.disableVectorTiles){l.addLayer(Rk),m.setZIndex(1001);const k=()=>{Xa.clear();const w=l.getView().getZoom();if(w&&w>=20){const C=l.getView().calculateExtent(l.getSize());Ak(r,C)}};l.on("loadend",k),l.on("moveend",()=>{var C;((C=r.getSource())==null?void 0:C.getState())==="ready"&&setTimeout(k,200)})}if(this.showFeaturesAtPoint&&Boolean(this.osFeaturesApiKey)){ym(a,this.osFeaturesApiKey,!1),this.clickFeatures&&l.on("singleclick",k=>{ym(k.coordinate,this.osFeaturesApiKey,!0)});const x=pw(this.featureColor,this.featureFill,this.featureBorderNone);l.addLayer(x),_i.on("change",()=>{if(_i.getState()==="ready"&&_i.getFeatures().length>0){rs(l,_i,this.featureBuffer),this.dispatch("featuresGeojsonChange",new Jn().writeFeaturesObject(_i.getFeatures(),{featureProjection:"EPSG:3857"}));const k=_i.getFeatures()[0].getGeometry();k&&this.dispatch("featuresAreaChange",$u(k,this.areaUnit))}})}const p=new sn({radius:9,fill:new ae({color:this.markerColor})}),_=new ga({src:Wk,scale:.5}),v=()=>{switch(this.markerImage){case"circle":return p;case"pin":return _}};if(this.showMarker){const x=new ri(qs([this.markerLongitude,this.markerLatitude],s,"EPSG:3857")),k=new eo({source:new cn({features:[new Ri(x)]}),style:new ee({image:v()})});l.addLayer(k)}setTimeout(()=>{window.dispatchEvent(new Event("resize")),e.style.opacity="1",this.dispatch("ready")},500)}render(){return Wi(up||(up=nE([`<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
84
45
  <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()}},j.MyMap.styles=Es(JC),vt([J({type:String})],j.MyMap.prototype,"id",2),vt([J({type:Number})],j.MyMap.prototype,"latitude",2),vt([J({type:Number})],j.MyMap.prototype,"longitude",2),vt([J({type:String})],j.MyMap.prototype,"projection",2),vt([J({type:Number})],j.MyMap.prototype,"zoom",2),vt([J({type:Number})],j.MyMap.prototype,"minZoom",2),vt([J({type:Number})],j.MyMap.prototype,"maxZoom",2),vt([J({type:Boolean})],j.MyMap.prototype,"drawMode",2),vt([J({type:Object})],j.MyMap.prototype,"drawGeojsonData",2),vt([J({type:Number})],j.MyMap.prototype,"drawGeojsonDataBuffer",2),vt([J({type:String})],j.MyMap.prototype,"drawPointer",2),vt([J({type:Boolean})],j.MyMap.prototype,"showFeaturesAtPoint",2),vt([J({type:Boolean})],j.MyMap.prototype,"clickFeatures",2),vt([J({type:String})],j.MyMap.prototype,"featureColor",2),vt([J({type:Boolean})],j.MyMap.prototype,"featureFill",2),vt([J({type:Boolean})],j.MyMap.prototype,"featureBorderNone",2),vt([J({type:Number})],j.MyMap.prototype,"featureBuffer",2),vt([J({type:Boolean})],j.MyMap.prototype,"showMarker",2),vt([J({type:String})],j.MyMap.prototype,"markerImage",2),vt([J({type:Number})],j.MyMap.prototype,"markerLatitude",2),vt([J({type:Number})],j.MyMap.prototype,"markerLongitude",2),vt([J({type:String})],j.MyMap.prototype,"markerColor",2),vt([J({type:Object})],j.MyMap.prototype,"geojsonData",2),vt([J({type:String})],j.MyMap.prototype,"geojsonColor",2),vt([J({type:Boolean})],j.MyMap.prototype,"geojsonFill",2),vt([J({type:Number})],j.MyMap.prototype,"geojsonBuffer",2),vt([J({type:Boolean})],j.MyMap.prototype,"disableVectorTiles",2),vt([J({type:String})],j.MyMap.prototype,"osVectorTilesApiKey",2),vt([J({type:String})],j.MyMap.prototype,"osFeaturesApiKey",2),vt([J({type:String})],j.MyMap.prototype,"osCopyright",2),vt([J({type:Boolean})],j.MyMap.prototype,"hideResetControl",2),vt([J({type:String})],j.MyMap.prototype,"resetControlImage",2),vt([J({type:Boolean})],j.MyMap.prototype,"staticMode",2),vt([J({type:String})],j.MyMap.prototype,"areaUnit",2),vt([J({type:Boolean})],j.MyMap.prototype,"showScale",2),vt([J({type:Boolean})],j.MyMap.prototype,"useScaleBarStyle",2),vt([J({type:Boolean})],j.MyMap.prototype,"showNorthArrow",2),j.MyMap=vt([vl("my-map")],j.MyMap);var lp={exports:{}};(function(i,t){(function(n,o){i.exports=o()})(window,function(){return function(e){var n={};function o(r){if(n[r])return n[r].exports;var s=n[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,o),s.l=!0,s.exports}return o.m=e,o.c=n,o.d=function(r,s,a){o.o(r,s)||Object.defineProperty(r,s,{enumerable:!0,get:a})},o.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},o.t=function(r,s){if(1&s&&(r=o(r)),8&s||4&s&&typeof r=="object"&&r&&r.__esModule)return r;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:r}),2&s&&typeof r!="string")for(var l in r)o.d(a,l,function(h){return r[h]}.bind(null,l));return a},o.n=function(r){var s=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(s,"a",s),s},o.o=function(r,s){return Object.prototype.hasOwnProperty.call(r,s)},o.p="/",o(o.s=37)}([function(e,n,o){var r=o(1),s=o(6),a=o(7),l=o(16),h=o(18),u="prototype",d=function(c,g,f){var m,p,_,v,y=c&d.F,x=c&d.G,k=c&d.S,w=c&d.P,E=c&d.B,M=x?r:k?r[g]||(r[g]={}):(r[g]||{})[u],S=x?s:s[g]||(s[g]={}),z=S[u]||(S[u]={});for(m in x&&(f=g),f)_=((p=!y&&M&&M[m]!==void 0)?M:f)[m],v=E&&p?h(_,r):w&&typeof _=="function"?h(Function.call,_):_,M&&l(M,m,_,c&d.U),S[m]!=_&&a(S,m,v),w&&z[m]!=_&&(z[m]=_)};r.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 o=e.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=o)},function(e,n){e.exports=function(o){return typeof o=="object"?o!==null:typeof o=="function"}},function(e,n,o){e.exports=!o(4)(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(e,n){e.exports=function(o){try{return!!o()}catch{return!0}}},function(e,n,o){o.r(n),o.d(n,"h",function(){return h}),o.d(n,"createElement",function(){return h}),o.d(n,"cloneElement",function(){return c}),o.d(n,"Component",function(){return Y}),o.d(n,"render",function(){return I}),o.d(n,"rerender",function(){return p}),o.d(n,"options",function(){return s});var r=function(){},s={},a=[],l=[];function h(b,T){var q,C,K,U,_t=l;for(U=arguments.length;2<U--;)a.push(arguments[U]);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(U=C.length;U--;)a.push(C[U]);else typeof C=="boolean"&&(C=null),(K=typeof b!="function")&&(C==null?C="":typeof C=="number"?C=String(C):typeof C!="string"&&(K=!1)),K&&q?_t[_t.length-1]+=C:_t===l?_t=[C]:_t.push(C),q=K;var Et=new r;return Et.nodeName=b,Et.children=_t,Et.attributes=T==null?void 0:T,Et.key=T==null?void 0:T.key,s.vnode!==void 0&&s.vnode(Et),Et}function u(b,T){for(var q in T)b[q]=T[q];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 g=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,f=[];function m(b){!b._dirty&&(b._dirty=!0)&&f.push(b)==1&&(s.debounceRendering||d)(p)}function p(){var b,T=f;for(f=[];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 q=b.nodeName.defaultProps;if(q!==void 0)for(var C in q)T[C]===void 0&&(T[C]=q[C]);return T}function y(b){var T=b.parentNode;T&&T.removeChild(b)}function x(b,T,q,C,K){if(T==="className"&&(T="class"),T!=="key")if(T==="ref")q&&q(null),C&&C(b);else if(T!=="class"||K)if(T==="style"){if(C&&typeof C!="string"&&typeof q!="string"||(b.style.cssText=C||""),C&&typeof C=="object"){if(typeof q!="string")for(var U in q)U in C||(b.style[U]="");for(var U in C)b.style[U]=typeof C[U]=="number"&&g.test(U)===!1?C[U]+"px":C[U]}}else if(T==="dangerouslySetInnerHTML")C&&(b.innerHTML=C.__html||"");else if(T[0]=="o"&&T[1]=="n"){var _t=T!==(T=T.replace(/Capture$/,""));T=T.toLowerCase().substring(2),C?q||b.addEventListener(T,k,_t):b.removeEventListener(T,k,_t),(b._listeners||(b._listeners={}))[T]=C}else if(T!=="list"&&T!=="type"&&!K&&T in b){try{b[T]=C==null?"":C}catch{}C!=null&&C!==!1||T=="spellcheck"||b.removeAttribute(T)}else{var Et=K&&T!==(T=T.replace(/^xlink:?/,""));C==null||C===!1?Et?b.removeAttributeNS("http://www.w3.org/1999/xlink",T.toLowerCase()):b.removeAttribute(T):typeof C!="function"&&(Et?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=[],E=0,M=!1,S=!1;function z(){for(var b;b=w.pop();)s.afterMount&&s.afterMount(b),b.componentDidMount&&b.componentDidMount()}function P(b,T,q,C,K,U){E++||(M=K!=null&&K.ownerSVGElement!==void 0,S=b!=null&&!("__preactattr_"in b));var _t=G(b,T,q,C,U);return K&&_t.parentNode!==K&&K.appendChild(_t),--E||(S=!1,U||z()),_t}function G(b,T,q,C,K){var U=b,_t=M;if(T!=null&&typeof T!="boolean"||(T=""),typeof T=="string"||typeof T=="number")return b&&b.splitText!==void 0&&b.parentNode&&(!b._component||K)?b.nodeValue!=T&&(b.nodeValue=T):(U=document.createTextNode(T),b&&(b.parentNode&&b.parentNode.replaceChild(U,b),A(b,!0))),U.__preactattr_=!0,U;var Et=T.nodeName;if(typeof Et=="function")return function(ut,pt,kt,xt){for(var st=ut&&ut._component,nt=st,wt=ut,It=st&&ut._componentConstructor===pt.nodeName,Bt=It,bt=v(pt);st&&!Bt&&(st=st._parentComponent);)Bt=st.constructor===pt.nodeName;return st&&Bt&&(!xt||st._component)?(V(st,bt,3,kt,xt),ut=st.base):(nt&&!It&&(H(nt),ut=wt=null),st=Z(pt.nodeName,bt,kt),ut&&!st.nextBase&&(st.nextBase=ut,wt=null),V(st,bt,1,kt,xt),ut=st.base,wt&&ut!==wt&&(wt._component=null,A(wt,!1))),ut}(b,T,q,C);if(M=Et==="svg"||Et!=="foreignObject"&&M,Et=String(Et),(!b||!_(b,Et))&&(U=function(ut,pt){var kt=pt?document.createElementNS("http://www.w3.org/2000/svg",ut):document.createElement(ut);return kt.normalizedNodeName=ut,kt}(Et,M),b)){for(;b.firstChild;)U.appendChild(b.firstChild);b.parentNode&&b.parentNode.replaceChild(U,b),A(b,!0)}var yt=U.firstChild,Ct=U.__preactattr_,Lt=T.children;if(Ct==null){Ct=U.__preactattr_={};for(var Dt=U.attributes,jt=Dt.length;jt--;)Ct[Dt[jt].name]=Dt[jt].value}return!S&&Lt&&Lt.length===1&&typeof Lt[0]=="string"&&yt!=null&&yt.splitText!==void 0&&yt.nextSibling==null?yt.nodeValue!=Lt[0]&&(yt.nodeValue=Lt[0]):(Lt&&Lt.length||yt!=null)&&function(ut,pt,kt,xt,st){var nt,wt,It,Bt,bt,dt=ut.childNodes,Ot=[],St={},ct=0,ue=0,Ze=dt.length,Ut=0,Ie=pt?pt.length:0;if(Ze!==0)for(var Wt=0;Wt<Ze;Wt++){var Kt=dt[Wt],Tn=Kt.__preactattr_,ae=Ie&&Tn?Kt._component?Kt._component.__key:Tn.key:null;ae!=null?(ct++,St[ae]=Kt):(Tn||(Kt.splitText!==void 0?!st||Kt.nodeValue.trim():st))&&(Ot[Ut++]=Kt)}if(Ie!==0)for(var Wt=0;Wt<Ie;Wt++){Bt=pt[Wt],bt=null;var ae=Bt.key;if(ae!=null)ct&&St[ae]!==void 0&&(bt=St[ae],St[ae]=void 0,ct--);else if(ue<Ut){for(nt=ue;nt<Ut;nt++)if(Ot[nt]!==void 0&&(Ye=wt=Ot[nt],Fe=st,typeof(ve=Bt)=="string"||typeof ve=="number"?Ye.splitText!==void 0:typeof ve.nodeName=="string"?!Ye._componentConstructor&&_(Ye,ve.nodeName):Fe||Ye._componentConstructor===ve.nodeName)){bt=wt,Ot[nt]=void 0,nt===Ut-1&&Ut--,nt===ue&&ue++;break}}bt=G(bt,Bt,kt,xt),It=dt[Wt],bt&&bt!==ut&&bt!==It&&(It==null?ut.appendChild(bt):bt===It.nextSibling?y(It):ut.insertBefore(bt,It))}var Ye,ve,Fe;if(ct)for(var Wt in St)St[Wt]!==void 0&&A(St[Wt],!1);for(;ue<=Ut;)(bt=Ot[Ut--])!==void 0&&A(bt,!1)}(U,Lt,q,C,S||Ct.dangerouslySetInnerHTML!=null),function(ut,pt,kt){var xt;for(xt in kt)pt&&pt[xt]!=null||kt[xt]==null||x(ut,xt,kt[xt],kt[xt]=void 0,M);for(xt in pt)xt==="children"||xt==="innerHTML"||xt in kt&&pt[xt]===(xt==="value"||xt==="checked"?ut[xt]:kt[xt])||x(ut,xt,kt[xt],kt[xt]=pt[xt],M)}(U,T.attributes,Ct),M=_t,U}function A(b,T){var q=b._component;q?H(q):(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;A(b,!0),b=T}}var B=[];function Z(b,T,q){var C,K=B.length;for(b.prototype&&b.prototype.render?(C=new b(T,q),Y.call(C,T,q)):((C=new Y(T,q)).constructor=b,C.render=F);K--;)if(B[K].constructor===b)return C.nextBase=B[K].nextBase,B.splice(K,1),C;return C}function F(b,T,q){return this.constructor(b,q)}function V(b,T,q,C,K){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||K?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,q!==0&&(q!==1&&s.syncComponentUpdates===!1&&b.base?m(b):D(b,1,K)),b.__ref&&b.__ref(b))}function D(b,T,q,C){if(!b._disable){var K,U,_t,Et=b.props,yt=b.state,Ct=b.context,Lt=b.prevProps||Et,Dt=b.prevState||yt,jt=b.prevContext||Ct,O=b.base,ut=b.nextBase,pt=O||ut,kt=b._component,xt=!1,st=jt;if(b.constructor.getDerivedStateFromProps&&(yt=u(u({},yt),b.constructor.getDerivedStateFromProps(Et,yt)),b.state=yt),O&&(b.props=Lt,b.state=Dt,b.context=jt,T!==2&&b.shouldComponentUpdate&&b.shouldComponentUpdate(Et,yt,Ct)===!1?xt=!0:b.componentWillUpdate&&b.componentWillUpdate(Et,yt,Ct),b.props=Et,b.state=yt,b.context=Ct),b.prevProps=b.prevState=b.prevContext=b.nextBase=null,b._dirty=!1,!xt){K=b.render(Et,yt,Ct),b.getChildContext&&(Ct=u(u({},Ct),b.getChildContext())),O&&b.getSnapshotBeforeUpdate&&(st=b.getSnapshotBeforeUpdate(Lt,Dt));var nt,wt,It=K&&K.nodeName;if(typeof It=="function"){var Bt=v(K);(U=kt)&&U.constructor===It&&Bt.key==U.__key?V(U,Bt,1,Ct,!1):(nt=U,b._component=U=Z(It,Bt,Ct),U.nextBase=U.nextBase||ut,U._parentComponent=b,V(U,Bt,0,Ct,!1),D(U,1,q,!0)),wt=U.base}else _t=pt,(nt=kt)&&(_t=b._component=null),(pt||T===1)&&(_t&&(_t._component=null),wt=function(ct,ue,Ze,Ut,Ie,Wt){E++||(M=Ie!=null&&Ie.ownerSVGElement!==void 0,S=ct!=null&&!("__preactattr_"in ct));var Kt=G(ct,ue,Ze,Ut,Wt);return Ie&&Kt.parentNode!==Ie&&Ie.appendChild(Kt),--E||(S=!1,Wt||z()),Kt}(_t,K,Ct,q||!O,pt&&pt.parentNode,!0));if(pt&&wt!==pt&&U!==kt){var bt=pt.parentNode;bt&&wt!==bt&&(bt.replaceChild(wt,pt),nt||(pt._component=null,A(pt,!1)))}if(nt&&H(nt),(b.base=wt)&&!C){for(var dt=b,Ot=b;Ot=Ot._parentComponent;)(dt=Ot).base=wt;wt._component=dt,wt._componentConstructor=dt.constructor}}for(!O||q?w.unshift(b):xt||(b.componentDidUpdate&&b.componentDidUpdate(Lt,Dt,st),s.afterUpdate&&s.afterUpdate(b));b._renderCallbacks.length;)b._renderCallbacks.pop().call(b);E||C||z()}}function H(b){s.beforeUnmount&&s.beforeUnmount(b);var T=b.base;b._disable=!0,b.componentWillUnmount&&b.componentWillUnmount(),b.base=null;var q=b._component;q?H(q):T&&(T.__preactattr_&&T.__preactattr_.ref&&T.__preactattr_.ref(null),y(b.nextBase=T),B.push(b),at(T)),b.__ref&&b.__ref(null)}function Y(b,T){this._dirty=!0,this.context=T,this.props=b,this.state=this.state||{},this._renderCallbacks=[]}function I(b,T,q){return P(q,b,{},!1,T,!1)}u(Y.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 rt={h,createElement:h,cloneElement:c,Component:Y,render:I,rerender:p,options:s};n.default=rt},function(e,n){var o=e.exports={version:"2.5.7"};typeof __e=="number"&&(__e=o)},function(e,n,o){var r=o(8),s=o(40);e.exports=o(3)?function(a,l,h){return r.f(a,l,s(1,h))}:function(a,l,h){return a[l]=h,a}},function(e,n,o){var r=o(9),s=o(38),a=o(39),l=Object.defineProperty;n.f=o(3)?Object.defineProperty:function(h,u,d){if(r(h),u=a(u,!0),r(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,o){var r=o(2);e.exports=function(s){if(!r(s))throw TypeError(s+" is not an object!");return s}},function(e,n){var o=0,r=Math.random();e.exports=function(s){return"Symbol(".concat(s===void 0?"":s,")_",(++o+r).toString(36))}},function(e,n,o){var r=o(22);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(s){return r(s)=="String"?s.split(""):Object(s)}},function(e,n){e.exports=function(o){if(o==null)throw TypeError("Can't call method on "+o);return o}},function(e,n,o){var r=o(4);e.exports=function(s,a){return!!s&&r(function(){a?s.call(null,function(){},1):s.call(null)})}},function(e,n,o){var r=o(0);r(r.S+r.F,"Object",{assign:o(41)})},function(e,n,o){var r=o(2),s=o(1).document,a=r(s)&&r(s.createElement);e.exports=function(l){return a?s.createElement(l):{}}},function(e,n,o){var r=o(1),s=o(7),a=o(17),l=o(10)("src"),h="toString",u=Function[h],d=(""+u).split(h);o(6).inspectSource=function(c){return u.call(c)},(e.exports=function(c,g,f,m){var p=typeof f=="function";p&&(a(f,"name")||s(f,"name",g)),c[g]!==f&&(p&&(a(f,l)||s(f,l,c[g]?""+c[g]:d.join(String(g)))),c===r?c[g]=f:m?c[g]?c[g]=f:s(c,g,f):(delete c[g],s(c,g,f)))})(Function.prototype,h,function(){return typeof this=="function"&&this[l]||u.call(this)})},function(e,n){var o={}.hasOwnProperty;e.exports=function(r,s){return o.call(r,s)}},function(e,n,o){var r=o(19);e.exports=function(s,a,l){if(r(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(o){if(typeof o!="function")throw TypeError(o+" is not a function!");return o}},function(e,n,o){var r=o(42),s=o(28);e.exports=Object.keys||function(a){return r(a,s)}},function(e,n,o){var r=o(11),s=o(12);e.exports=function(a){return r(s(a))}},function(e,n){var o={}.toString;e.exports=function(r){return o.call(r).slice(8,-1)}},function(e,n,o){var r=o(21),s=o(24),a=o(43);e.exports=function(l){return function(h,u,d){var c,g=r(h),f=s(g.length),m=a(d,f);if(l&&u!=u){for(;m<f;)if((c=g[m++])!=c)return!0}else for(;m<f;m++)if((l||m in g)&&g[m]===u)return l||m||0;return!l&&-1}}},function(e,n,o){var r=o(25),s=Math.min;e.exports=function(a){return 0<a?s(r(a),9007199254740991):0}},function(e,n){var o=Math.ceil,r=Math.floor;e.exports=function(s){return isNaN(s=+s)?0:(0<s?r:o)(s)}},function(e,n,o){var r=o(27)("keys"),s=o(10);e.exports=function(a){return r[a]||(r[a]=s(a))}},function(e,n,o){var r=o(6),s=o(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:r.version,mode:o(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,o){var r=o(12);e.exports=function(s){return Object(r(s))}},function(e,n,o){var r=o(8).f,s=Function.prototype,a=/^\s*function ([^ (]*)/;"name"in s||o(3)&&r(s,"name",{configurable:!0,get:function(){try{return(""+this).match(a)[1]}catch{return""}}})},function(e,n,o){var r=o(0),s=o(32)(1);r(r.P+r.F*!o(13)([].map,!0),"Array",{map:function(a){return s(this,a,arguments[1])}})},function(e,n,o){var r=o(18),s=o(11),a=o(29),l=o(24),h=o(47);e.exports=function(u,d){var c=u==1,g=u==2,f=u==3,m=u==4,p=u==6,_=u==5||p,v=d||h;return function(y,x,k){for(var w,E,M=a(y),S=s(M),z=r(x,k,3),P=l(S.length),G=0,A=c?v(y,P):g?v(y,0):void 0;G<P;G++)if((_||G in S)&&(E=z(w=S[G],G,M),u)){if(c)A[G]=E;else if(E)switch(u){case 3:return!0;case 5:return w;case 6:return G;case 2:A.push(w)}else if(m)return!1}return p?-1:f||m?m:A}}},function(e,n,o){var r=o(22);e.exports=Array.isArray||function(s){return r(s)=="Array"}},function(e,n,o){var r=o(27)("wks"),s=o(10),a=o(1).Symbol,l=typeof a=="function";(e.exports=function(h){return r[h]||(r[h]=l&&a[h]||(l?a:s)("Symbol."+h))}).store=r},function(e,n,o){var r=o(0),s=o(23)(!1),a=[].indexOf,l=!!a&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(l||!o(13)(a)),"Array",{indexOf:function(h){return l?a.apply(this,arguments)||0:s(this,h,arguments[1])}})},function(e,n,o){var r=o(0);r(r.S,"Object",{create:o(52)})},function(e,n,o){n.__esModule=!0,n.default=void 0,o(14),o(30),o(31),o(35),o(49),o(50);var r=o(5),s=function(d){return d&&d.__esModule?d:{default:d}}(o(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,r.render)((0,r.createElement)(s.default,u),u.element)}var l=function(d){return function(c,g){g(d.filter(function(f){return f.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(f){return f.value||u.preserveNullOptions});u.source=d.map(function(f){return f.textContent||f.innerText})}if(u.onConfirm=u.onConfirm||function(f){var m=[].filter.call(u.selectElement.options,function(p){return(p.textContent||p.innerText)===f})[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 g=document.createElement("div");u.selectElement.parentNode.insertBefore(g,u.selectElement),a(Object.assign({},u,{element:g})),u.selectElement.style.display="none",u.selectElement.id=u.selectElement.id+"-select"};var h=a;n.default=h},function(e,n,o){e.exports=!o(3)&&!o(4)(function(){return Object.defineProperty(o(15)("div"),"a",{get:function(){return 7}}).a!=7})},function(e,n,o){var r=o(2);e.exports=function(s,a){if(!r(s))return s;var l,h;if(a&&typeof(l=s.toString)=="function"&&!r(h=l.call(s))||typeof(l=s.valueOf)=="function"&&!r(h=l.call(s))||!a&&typeof(l=s.toString)=="function"&&!r(h=l.call(s)))return h;throw TypeError("Can't convert object to primitive value")}},function(e,n){e.exports=function(o,r){return{enumerable:!(1&o),configurable:!(2&o),writable:!(4&o),value:r}}},function(e,n,o){var r=o(20),s=o(45),a=o(46),l=o(29),h=o(11),u=Object.assign;e.exports=!u||o(4)(function(){var d={},c={},g=Symbol(),f="abcdefghijklmnopqrst";return d[g]=7,f.split("").forEach(function(m){c[m]=m}),u({},d)[g]!=7||Object.keys(u({},c)).join("")!=f})?function(d,c){for(var g=l(d),f=arguments.length,m=1,p=s.f,_=a.f;m<f;)for(var v,y=h(arguments[m++]),x=p?r(y).concat(p(y)):r(y),k=x.length,w=0;w<k;)_.call(y,v=x[w++])&&(g[v]=y[v]);return g}:u},function(e,n,o){var r=o(17),s=o(21),a=o(23)(!1),l=o(26)("IE_PROTO");e.exports=function(h,u){var d,c=s(h),g=0,f=[];for(d in c)d!=l&&r(c,d)&&f.push(d);for(;u.length>g;)r(c,d=u[g++])&&(~a(f,d)||f.push(d));return f}},function(e,n,o){var r=o(25),s=Math.max,a=Math.min;e.exports=function(l,h){return(l=r(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,o){var r=o(48);e.exports=function(s,a){return new(r(s))(a)}},function(e,n,o){var r=o(2),s=o(33),a=o(34)("species");e.exports=function(l){var h;return s(l)&&(typeof(h=l.constructor)!="function"||h!==Array&&!s(h.prototype)||(h=void 0),r(h)&&(h=h[a])===null&&(h=void 0)),h===void 0?Array:h}},function(e,n,o){var r=o(0),s=o(32)(2);r(r.P+r.F*!o(13)([].filter,!0),"Array",{filter:function(a){return s(this,a,arguments[1])}})},function(e,n,o){var r=o(0);r(r.S,"Array",{isArray:o(33)})},function(e,n,o){n.__esModule=!0,n.default=void 0,o(14),o(36),o(30),o(31),o(35),o(55),o(58);var r=o(5),s=l(o(60)),a=l(o(61));function l(f){return f&&f.__esModule?f:{default:f}}function h(){return(h=Object.assign||function(f){for(var m=1;m<arguments.length;m++){var p=arguments[m];for(var _ in p)Object.prototype.hasOwnProperty.call(p,_)&&(f[_]=p[_])}return f}).apply(this,arguments)}function u(f){if(f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f}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 g=function(f){function m(_){var v;return(v=f.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,f);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,E=k&&v.focused===null;if(w&&E){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,E=y.selected,M=_.relatedTarget===null,S=_.relatedTarget===this.elementReferences[-1],z=x!==v&&x!==-1;if(!z&&M||!(z||S)){var P=k&&c();this.handleComponentBlur({menuOpen:P,query:this.templateInputValue(w[E])})}},p.handleInputBlur=function(_){var v=this.state,y=v.focused,x=v.menuOpen,k=v.options,w=v.query,E=v.selected;if(y===-1){var M=x&&c(),S=c()?w:this.templateInputValue(k[E]);this.handleComponentBlur({menuOpen:M,query:S})}},p.handleInputChange=function(_){var v=this,y=this.props,x=y.minLength,k=y.source,w=y.showAllValues,E=this.hasAutoselect(),M=_.target.value,S=M.length===0,z=this.state.query.length!==M.length,P=M.length>=x;this.setState({query:M,ariaHint:S}),w||!S&&z&&P?k(M,function(G){var A=0<G.length;v.setState({menuOpen:A,options:G,selected:E&&A?0:-1,validChoiceMade:!1})}):!S&&P||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,E=!x&&y.length>=w&&0<k.length;E?this.setState(function(M){var S=M.menuOpen;return{focused:-1,menuOpen:E||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(E){v.setState({menuOpen:!0,options:E,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,E=y.minLength,M=y.name,S=y.placeholder,z=y.required,P=y.showAllValues,G=y.tNoResults,A=y.tStatusQueryTooShort,at=y.tStatusNoResults,B=y.tStatusSelectedOption,Z=y.tStatusResults,F=y.tAssistiveHint,V=y.dropdownArrow,D=this.state,H=D.focused,Y=D.hovered,I=D.menuOpen,rt=D.options,b=D.query,T=D.selected,q=D.ariaHint,C=D.validChoiceMade,K=this.hasAutoselect(),U=H===-1,_t=rt.length===0,Et=b.length!==0,yt=b.length>=E,Ct=this.props.showNoOptionsFound&&U&&_t&&Et&&yt,Lt=x+"__wrapper",Dt=x+"__input",jt=H!==null?" "+Dt+"--focused":"",O=this.props.showAllValues?" "+Dt+"--show-all-values":" "+Dt+"--default",ut=x+"__dropdown-arrow-down",pt=H!==-1&&H!==null,kt=x+"__menu",xt=kt+"--"+k,st=kt+"--"+(I||Ct?"visible":"hidden"),nt=x+"__option",wt=x+"__hint",It=this.templateInputValue(rt[T]),Bt=It&&It.toLowerCase().indexOf(b.toLowerCase())===0&&K?b+It.substr(b.length):"",bt=w+"__assistiveHint",dt=q?{"aria-describedby":bt}:null;return P&&typeof(_=V({className:ut}))=="string"&&(_=(0,r.createElement)("div",{className:x+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:_}})),(0,r.createElement)("div",{className:Lt,onKeyDown:this.handleKeyDown},(0,r.createElement)(s.default,{id:w,length:rt.length,queryLength:b.length,minQueryLength:E,selectedOption:this.templateInputValue(rt[T]),selectedOptionIndex:T,validChoiceMade:C,isInFocus:this.state.focused!==null,tQueryTooShort:A,tNoResults:at,tSelectedOption:B,tResults:Z}),Bt&&(0,r.createElement)("span",null,(0,r.createElement)("input",{className:wt,readonly:!0,tabIndex:"-1",value:Bt})),(0,r.createElement)("input",h({"aria-expanded":I?"true":"false","aria-activedescendant":!!pt&&w+"__option--"+H,"aria-owns":w+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"},dt,{autoComplete:"off",className:""+Dt+jt+O,id:w,onClick:function(Ot){return v.handleInputClick(Ot)},onBlur:this.handleInputBlur},function(St){return{onInput:St}}(this.handleInputChange),{onFocus:this.handleInputFocus,name:M,placeholder:S,ref:function(Ot){v.elementReferences[-1]=Ot},type:"text",role:"combobox",required:z,value:b})),_,(0,r.createElement)("ul",{className:kt+" "+xt+" "+st,onMouseLeave:function(Ot){return v.handleListMouseLeave(Ot)},id:w+"__listbox",role:"listbox"},rt.map(function(Ot,St){var ct=(H===-1?T===St:H===St)&&Y===null?" "+nt+"--focused":"",ue=St%2?" "+nt+"--odd":"",Ze=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 "+rt.length+"</span>":"";return(0,r.createElement)("li",{"aria-selected":H===St?"true":"false",className:""+nt+ct+ue,dangerouslySetInnerHTML:{__html:v.templateSuggestion(Ot)+Ze},id:w+"__option--"+St,key:St,onBlur:function(Ut){return v.handleOptionBlur(Ut,St)},onClick:function(Ut){return v.handleOptionClick(Ut,St)},onMouseDown:v.handleOptionMouseDown,onMouseEnter:function(Ut){return v.handleOptionMouseEnter(Ut,St)},ref:function(Ut){v.elementReferences[St]=Ut},role:"option",tabIndex:"-1","aria-posinset":St+1,"aria-setsize":rt.length})}),Ct&&(0,r.createElement)("li",{className:nt+" "+nt+"--no-results"},G())),(0,r.createElement)("span",{id:bt,style:{display:"none"}},F()))},m}(r.Component);(n.default=g).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,o){var r=o(9),s=o(53),a=o(28),l=o(26)("IE_PROTO"),h=function(){},u="prototype",d=function(){var c,g=o(15)("iframe"),f=a.length;for(g.style.display="none",o(54).appendChild(g),g.src="javascript:",(c=g.contentWindow.document).open(),c.write("<script>document.F=Object<\/script>"),c.close(),d=c.F;f--;)delete d[u][a[f]];return d()};e.exports=Object.create||function(c,g){var f;return c!==null?(h[u]=r(c),f=new h,h[u]=null,f[l]=c):f=d(),g===void 0?f:s(f,g)}},function(e,n,o){var r=o(8),s=o(9),a=o(20);e.exports=o(3)?Object.defineProperties:function(l,h){s(l);for(var u,d=a(h),c=d.length,g=0;g<c;)r.f(l,u=d[g++],h[u]);return l}},function(e,n,o){var r=o(1).document;e.exports=r&&r.documentElement},function(e,n,o){var r=o(0);r(r.P,"Function",{bind:o(56)})},function(e,n,o){var r=o(19),s=o(2),a=o(57),l=[].slice,h={};e.exports=Function.bind||function(u){var d=r(this),c=l.call(arguments,1),g=function(){var f=c.concat(l.call(arguments));return this instanceof g?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,f.length,f):a(d,f,u)};return s(d.prototype)&&(g.prototype=d.prototype),g}},function(e,n){e.exports=function(o,r,s){var a=s===void 0;switch(r.length){case 0:return a?o():o.call(s);case 1:return a?o(r[0]):o.call(s,r[0]);case 2:return a?o(r[0],r[1]):o.call(s,r[0],r[1]);case 3:return a?o(r[0],r[1],r[2]):o.call(s,r[0],r[1],r[2]);case 4:return a?o(r[0],r[1],r[2],r[3]):o.call(s,r[0],r[1],r[2],r[3])}return o.apply(s,r)}},function(e,n,o){o(59)("match",1,function(r,s,a){return[function(l){var h=r(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,o){var r=o(7),s=o(16),a=o(4),l=o(12),h=o(34);e.exports=function(u,d,c){var g=h(u),f=c(l,g,""[u]),m=f[0],p=f[1];a(function(){var _={};return _[g]=function(){return 7},""[u](_)!=7})&&(s(String.prototype,u,m),r(RegExp.prototype,g,d==2?function(_,v){return p.call(_,this,v)}:function(_){return p.call(_,this)}))}},function(e,n,o){n.__esModule=!0,n.default=void 0,o(36);var r=o(5),s=function(h,u,d){var c;return function(){var g=this,f=arguments,m=function(){c=null,d||h.apply(g,f)},p=d&&!c;clearTimeout(c),c=setTimeout(m,u),p&&h.apply(g,f)}},a=function(l){function h(){for(var d,c=arguments.length,g=new Array(c),f=0;f<c;f++)g[f]=arguments[f];return(d=l.call.apply(l,[this].concat(g))||this).state={bump:!1,debounced:!1},d}(function(c,g){c.prototype=Object.create(g.prototype),(c.prototype.constructor=c).__proto__=g})(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(g){return{bump:!g.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,g=d.length,f=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,E=w.bump,M=w.debounced,S=w.silenced,z=f<m,P=g===0,G=p?x(p,g,_):"",A=null;return A=z?v(m):P?y():k(g,G),this.debounceStatusUpdate(),(0,r.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,r.createElement)("div",{id:c+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!S&&M&&E?A:""),(0,r.createElement)("div",{id:c+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},S||!M||E?"":A))},h}(r.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,o){n.__esModule=!0,n.default=void 0;var r=o(5),s=function(l){var h=l.className;return(0,r.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:h,focusable:"false"},(0,r.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,r.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};n.default=s}]).default})})(lp);const eE=d1(lp.exports),iE=`@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,nE=Object.getOwnPropertyDescriptor,We=(i,t,e,n)=>{for(var o=n>1?void 0:n?nE(t,e):t,r=i.length-1,s;r>=0;r--)(s=i[r])&&(o=(n?s(t,e,o):s(o))||o);return n&&o&&up(t,e,o),o},oE=(i,t)=>hp(up(i,"raw",{value:hp(t||i.slice())})),dp;j.AddressAutocomplete=class extends An{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(){eE({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(o=>o.json()).then(o=>{var s,a,l;(o.error||o.fault)&&(this._osError=((s=o.error)==null?void 0:s.message)||((a=o.fault)==null?void 0:a.faultstring)||"Something went wrong"),this._totalAddresses=(l=o.header)==null?void 0:l.totalresults;const r=t.concat(o.results||[]);if(this._addressesInPostcode=r,this.dispatch("ready",{postcode:this.postcode,status:`fetched ${this._addressesInPostcode.length}/${this._totalAddresses} addresses`}),o.results){o.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(o=>console.log(o))}_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>
46
+ <div id="`,'" class="map" tabindex="0" />'])),this.id)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.map)==null||e.dispose()}},X(dd,"styles",Ts(eE)),dd),mt([K({type:String})],F.MyMap.prototype,"id",2),mt([K({type:Number})],F.MyMap.prototype,"latitude",2),mt([K({type:Number})],F.MyMap.prototype,"longitude",2),mt([K({type:String})],F.MyMap.prototype,"projection",2),mt([K({type:Number})],F.MyMap.prototype,"zoom",2),mt([K({type:Number})],F.MyMap.prototype,"minZoom",2),mt([K({type:Number})],F.MyMap.prototype,"maxZoom",2),mt([K({type:Boolean})],F.MyMap.prototype,"drawMode",2),mt([K({type:String})],F.MyMap.prototype,"drawType",2),mt([K({type:String})],F.MyMap.prototype,"drawPointColor",2),mt([K({type:Object})],F.MyMap.prototype,"drawGeojsonData",2),mt([K({type:Number})],F.MyMap.prototype,"drawGeojsonDataBuffer",2),mt([K({type:String})],F.MyMap.prototype,"drawPointer",2),mt([K({type:Boolean})],F.MyMap.prototype,"showFeaturesAtPoint",2),mt([K({type:Boolean})],F.MyMap.prototype,"clickFeatures",2),mt([K({type:String})],F.MyMap.prototype,"featureColor",2),mt([K({type:Boolean})],F.MyMap.prototype,"featureFill",2),mt([K({type:Boolean})],F.MyMap.prototype,"featureBorderNone",2),mt([K({type:Number})],F.MyMap.prototype,"featureBuffer",2),mt([K({type:Boolean})],F.MyMap.prototype,"showMarker",2),mt([K({type:String})],F.MyMap.prototype,"markerImage",2),mt([K({type:Number})],F.MyMap.prototype,"markerLatitude",2),mt([K({type:Number})],F.MyMap.prototype,"markerLongitude",2),mt([K({type:String})],F.MyMap.prototype,"markerColor",2),mt([K({type:Object})],F.MyMap.prototype,"geojsonData",2),mt([K({type:String})],F.MyMap.prototype,"geojsonColor",2),mt([K({type:Boolean})],F.MyMap.prototype,"geojsonFill",2),mt([K({type:Number})],F.MyMap.prototype,"geojsonBuffer",2),mt([K({type:Boolean})],F.MyMap.prototype,"disableVectorTiles",2),mt([K({type:String})],F.MyMap.prototype,"osVectorTilesApiKey",2),mt([K({type:String})],F.MyMap.prototype,"osFeaturesApiKey",2),mt([K({type:String})],F.MyMap.prototype,"osCopyright",2),mt([K({type:Boolean})],F.MyMap.prototype,"hideResetControl",2),mt([K({type:String})],F.MyMap.prototype,"resetControlImage",2),mt([K({type:Boolean})],F.MyMap.prototype,"staticMode",2),mt([K({type:String})],F.MyMap.prototype,"areaUnit",2),mt([K({type:Boolean})],F.MyMap.prototype,"showScale",2),mt([K({type:Boolean})],F.MyMap.prototype,"useScaleBarStyle",2),mt([K({type:Boolean})],F.MyMap.prototype,"showNorthArrow",2),F.MyMap=mt([_l("my-map")],F.MyMap);var dp={exports:{}};(function(i,t){(function(n,o){i.exports=o()})(window,function(){return function(e){var n={};function o(r){if(n[r])return n[r].exports;var s=n[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,o),s.l=!0,s.exports}return o.m=e,o.c=n,o.d=function(r,s,a){o.o(r,s)||Object.defineProperty(r,s,{enumerable:!0,get:a})},o.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},o.t=function(r,s){if(1&s&&(r=o(r)),8&s||4&s&&typeof r=="object"&&r&&r.__esModule)return r;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:r}),2&s&&typeof r!="string")for(var l in r)o.d(a,l,function(h){return r[h]}.bind(null,l));return a},o.n=function(r){var s=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(s,"a",s),s},o.o=function(r,s){return Object.prototype.hasOwnProperty.call(r,s)},o.p="/",o(o.s=37)}([function(e,n,o){var r=o(1),s=o(6),a=o(7),l=o(16),h=o(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?r:k?r[f]||(r[f]={}):(r[f]||{})[u],S=x?s:s[f]||(s[f]={}),z=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(_,r):w&&typeof _=="function"?h(Function.call,_):_,M&&l(M,m,_,c&d.U),S[m]!=_&&a(S,m,v),w&&z[m]!=_&&(z[m]=_)};r.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 o=e.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=o)},function(e,n){e.exports=function(o){return typeof o=="object"?o!==null:typeof o=="function"}},function(e,n,o){e.exports=!o(4)(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(e,n){e.exports=function(o){try{return!!o()}catch{return!0}}},function(e,n,o){o.r(n),o.d(n,"h",function(){return h}),o.d(n,"createElement",function(){return h}),o.d(n,"cloneElement",function(){return c}),o.d(n,"Component",function(){return V}),o.d(n,"render",function(){return I}),o.d(n,"rerender",function(){return p}),o.d(n,"options",function(){return s});var r=function(){},s={},a=[],l=[];function h(b,T){var Z,E,J,q,yt=l;for(q=arguments.length;2<q--;)a.push(arguments[q]);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(q=E.length;q--;)a.push(E[q]);else typeof E=="boolean"&&(E=null),(J=typeof b!="function")&&(E==null?E="":typeof E=="number"?E=String(E):typeof E!="string"&&(J=!1)),J&&Z?yt[yt.length-1]+=E:yt===l?yt=[E]:yt.push(E),Z=J;var St=new r;return St.nodeName=b,St.children=yt,St.attributes=T??void 0,St.key=T==null?void 0:T.key,s.vnode!==void 0&&s.vnode(St),St}function u(b,T){for(var Z in T)b[Z]=T[Z];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 Z=b.nodeName.defaultProps;if(Z!==void 0)for(var E in Z)T[E]===void 0&&(T[E]=Z[E]);return T}function y(b){var T=b.parentNode;T&&T.removeChild(b)}function x(b,T,Z,E,J){if(T==="className"&&(T="class"),T!=="key")if(T==="ref")Z&&Z(null),E&&E(b);else if(T!=="class"||J)if(T==="style"){if(E&&typeof E!="string"&&typeof Z!="string"||(b.style.cssText=E||""),E&&typeof E=="object"){if(typeof Z!="string")for(var q in Z)q in E||(b.style[q]="");for(var q in E)b.style[q]=typeof E[q]=="number"&&f.test(q)===!1?E[q]+"px":E[q]}}else if(T==="dangerouslySetInnerHTML")E&&(b.innerHTML=E.__html||"");else if(T[0]=="o"&&T[1]=="n"){var yt=T!==(T=T.replace(/Capture$/,""));T=T.toLowerCase().substring(2),E?Z||b.addEventListener(T,k,yt):b.removeEventListener(T,k,yt),(b._listeners||(b._listeners={}))[T]=E}else if(T!=="list"&&T!=="type"&&!J&&T in b){try{b[T]=E??""}catch{}E!=null&&E!==!1||T=="spellcheck"||b.removeAttribute(T)}else{var St=J&&T!==(T=T.replace(/^xlink:?/,""));E==null||E===!1?St?b.removeAttributeNS("http://www.w3.org/1999/xlink",T.toLowerCase()):b.removeAttribute(T):typeof E!="function"&&(St?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 z(){for(var b;b=w.pop();)s.afterMount&&s.afterMount(b),b.componentDidMount&&b.componentDidMount()}function P(b,T,Z,E,J,q){C++||(M=J!=null&&J.ownerSVGElement!==void 0,S=b!=null&&!("__preactattr_"in b));var yt=j(b,T,Z,E,q);return J&&yt.parentNode!==J&&J.appendChild(yt),--C||(S=!1,q||z()),yt}function j(b,T,Z,E,J){var q=b,yt=M;if(T!=null&&typeof T!="boolean"||(T=""),typeof T=="string"||typeof T=="number")return b&&b.splitText!==void 0&&b.parentNode&&(!b._component||J)?b.nodeValue!=T&&(b.nodeValue=T):(q=document.createTextNode(T),b&&(b.parentNode&&b.parentNode.replaceChild(q,b),A(b,!0))),q.__preactattr_=!0,q;var St=T.nodeName;if(typeof St=="function")return function(dt,_t,wt,bt){for(var at=dt&&dt._component,ot=at,Mt=dt,zt=at&&dt._componentConstructor===_t.nodeName,Ut=zt,kt=v(_t);at&&!Ut&&(at=at._parentComponent);)Ut=at.constructor===_t.nodeName;return at&&Ut&&(!bt||at._component)?($(at,kt,3,wt,bt),dt=at.base):(ot&&!zt&&(Q(ot),dt=Mt=null),at=W(_t.nodeName,kt,wt),dt&&!at.nextBase&&(at.nextBase=dt,Mt=null),$(at,kt,1,wt,bt),dt=at.base,Mt&&dt!==Mt&&(Mt._component=null,A(Mt,!1))),dt}(b,T,Z,E);if(M=St==="svg"||St!=="foreignObject"&&M,St=String(St),(!b||!_(b,St))&&(q=function(dt,_t){var wt=_t?document.createElementNS("http://www.w3.org/2000/svg",dt):document.createElement(dt);return wt.normalizedNodeName=dt,wt}(St,M),b)){for(;b.firstChild;)q.appendChild(b.firstChild);b.parentNode&&b.parentNode.replaceChild(q,b),A(b,!0)}var xt=q.firstChild,Et=q.__preactattr_,Ot=T.children;if(Et==null){Et=q.__preactattr_={};for(var Lt=q.attributes,Bt=Lt.length;Bt--;)Et[Lt[Bt].name]=Lt[Bt].value}return!S&&Ot&&Ot.length===1&&typeof Ot[0]=="string"&&xt!=null&&xt.splitText!==void 0&&xt.nextSibling==null?xt.nodeValue!=Ot[0]&&(xt.nodeValue=Ot[0]):(Ot&&Ot.length||xt!=null)&&function(dt,_t,wt,bt,at){var ot,Mt,zt,Ut,kt,ct=dt.childNodes,Ft=[],Tt={},ft=0,ce=0,Xe=ct.length,qt=0,Re=_t?_t.length:0;if(Xe!==0)for(var Wt=0;Wt<Xe;Wt++){var Qt=ct[Wt],Rn=Qt.__preactattr_,ue=Re&&Rn?Qt._component?Qt._component.__key:Rn.key:null;ue!=null?(ft++,Tt[ue]=Qt):(Rn||(Qt.splitText!==void 0?!at||Qt.nodeValue.trim():at))&&(Ft[qt++]=Qt)}if(Re!==0)for(var Wt=0;Wt<Re;Wt++){Ut=_t[Wt],kt=null;var ue=Ut.key;if(ue!=null)ft&&Tt[ue]!==void 0&&(kt=Tt[ue],Tt[ue]=void 0,ft--);else if(ce<qt){for(ot=ce;ot<qt;ot++)if(Ft[ot]!==void 0&&(Ye=Mt=Ft[ot],Ge=at,typeof(ye=Ut)=="string"||typeof ye=="number"?Ye.splitText!==void 0:typeof ye.nodeName=="string"?!Ye._componentConstructor&&_(Ye,ye.nodeName):Ge||Ye._componentConstructor===ye.nodeName)){kt=Mt,Ft[ot]=void 0,ot===qt-1&&qt--,ot===ce&&ce++;break}}kt=j(kt,Ut,wt,bt),zt=ct[Wt],kt&&kt!==dt&&kt!==zt&&(zt==null?dt.appendChild(kt):kt===zt.nextSibling?y(zt):dt.insertBefore(kt,zt))}var Ye,ye,Ge;if(ft)for(var Wt in Tt)Tt[Wt]!==void 0&&A(Tt[Wt],!1);for(;ce<=qt;)(kt=Ft[qt--])!==void 0&&A(kt,!1)}(q,Ot,Z,E,S||Et.dangerouslySetInnerHTML!=null),function(dt,_t,wt){var bt;for(bt in wt)_t&&_t[bt]!=null||wt[bt]==null||x(dt,bt,wt[bt],wt[bt]=void 0,M);for(bt in _t)bt==="children"||bt==="innerHTML"||bt in wt&&_t[bt]===(bt==="value"||bt==="checked"?dt[bt]:wt[bt])||x(dt,bt,wt[bt],wt[bt]=_t[bt],M)}(q,T.attributes,Et),M=yt,q}function A(b,T){var Z=b._component;Z?Q(Z):(b.__preactattr_!=null&&b.__preactattr_.ref&&b.__preactattr_.ref(null),T!==!1&&b.__preactattr_!=null||y(b),lt(b))}function lt(b){for(b=b.lastChild;b;){var T=b.previousSibling;A(b,!0),b=T}}var B=[];function W(b,T,Z){var E,J=B.length;for(b.prototype&&b.prototype.render?(E=new b(T,Z),V.call(E,T,Z)):((E=new V(T,Z)).constructor=b,E.render=N);J--;)if(B[J].constructor===b)return E.nextBase=B[J].nextBase,B.splice(J,1),E;return E}function N(b,T,Z){return this.constructor(b,Z)}function $(b,T,Z,E,J){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||J?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,Z!==0&&(Z!==1&&s.syncComponentUpdates===!1&&b.base?m(b):D(b,1,J)),b.__ref&&b.__ref(b))}function D(b,T,Z,E){if(!b._disable){var J,q,yt,St=b.props,xt=b.state,Et=b.context,Ot=b.prevProps||St,Lt=b.prevState||xt,Bt=b.prevContext||Et,O=b.base,dt=b.nextBase,_t=O||dt,wt=b._component,bt=!1,at=Bt;if(b.constructor.getDerivedStateFromProps&&(xt=u(u({},xt),b.constructor.getDerivedStateFromProps(St,xt)),b.state=xt),O&&(b.props=Ot,b.state=Lt,b.context=Bt,T!==2&&b.shouldComponentUpdate&&b.shouldComponentUpdate(St,xt,Et)===!1?bt=!0:b.componentWillUpdate&&b.componentWillUpdate(St,xt,Et),b.props=St,b.state=xt,b.context=Et),b.prevProps=b.prevState=b.prevContext=b.nextBase=null,b._dirty=!1,!bt){J=b.render(St,xt,Et),b.getChildContext&&(Et=u(u({},Et),b.getChildContext())),O&&b.getSnapshotBeforeUpdate&&(at=b.getSnapshotBeforeUpdate(Ot,Lt));var ot,Mt,zt=J&&J.nodeName;if(typeof zt=="function"){var Ut=v(J);(q=wt)&&q.constructor===zt&&Ut.key==q.__key?$(q,Ut,1,Et,!1):(ot=q,b._component=q=W(zt,Ut,Et),q.nextBase=q.nextBase||dt,q._parentComponent=b,$(q,Ut,0,Et,!1),D(q,1,Z,!0)),Mt=q.base}else yt=_t,(ot=wt)&&(yt=b._component=null),(_t||T===1)&&(yt&&(yt._component=null),Mt=function(ft,ce,Xe,qt,Re,Wt){C++||(M=Re!=null&&Re.ownerSVGElement!==void 0,S=ft!=null&&!("__preactattr_"in ft));var Qt=j(ft,ce,Xe,qt,Wt);return Re&&Qt.parentNode!==Re&&Re.appendChild(Qt),--C||(S=!1,Wt||z()),Qt}(yt,J,Et,Z||!O,_t&&_t.parentNode,!0));if(_t&&Mt!==_t&&q!==wt){var kt=_t.parentNode;kt&&Mt!==kt&&(kt.replaceChild(Mt,_t),ot||(_t._component=null,A(_t,!1)))}if(ot&&Q(ot),(b.base=Mt)&&!E){for(var ct=b,Ft=b;Ft=Ft._parentComponent;)(ct=Ft).base=Mt;Mt._component=ct,Mt._componentConstructor=ct.constructor}}for(!O||Z?w.unshift(b):bt||(b.componentDidUpdate&&b.componentDidUpdate(Ot,Lt,at),s.afterUpdate&&s.afterUpdate(b));b._renderCallbacks.length;)b._renderCallbacks.pop().call(b);C||E||z()}}function Q(b){s.beforeUnmount&&s.beforeUnmount(b);var T=b.base;b._disable=!0,b.componentWillUnmount&&b.componentWillUnmount(),b.base=null;var Z=b._component;Z?Q(Z):T&&(T.__preactattr_&&T.__preactattr_.ref&&T.__preactattr_.ref(null),y(b.nextBase=T),B.push(b),lt(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 I(b,T,Z){return P(Z,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 st={h,createElement:h,cloneElement:c,Component:V,render:I,rerender:p,options:s};n.default=st},function(e,n){var o=e.exports={version:"2.5.7"};typeof __e=="number"&&(__e=o)},function(e,n,o){var r=o(8),s=o(40);e.exports=o(3)?function(a,l,h){return r.f(a,l,s(1,h))}:function(a,l,h){return a[l]=h,a}},function(e,n,o){var r=o(9),s=o(38),a=o(39),l=Object.defineProperty;n.f=o(3)?Object.defineProperty:function(h,u,d){if(r(h),u=a(u,!0),r(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,o){var r=o(2);e.exports=function(s){if(!r(s))throw TypeError(s+" is not an object!");return s}},function(e,n){var o=0,r=Math.random();e.exports=function(s){return"Symbol(".concat(s===void 0?"":s,")_",(++o+r).toString(36))}},function(e,n,o){var r=o(22);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(s){return r(s)=="String"?s.split(""):Object(s)}},function(e,n){e.exports=function(o){if(o==null)throw TypeError("Can't call method on "+o);return o}},function(e,n,o){var r=o(4);e.exports=function(s,a){return!!s&&r(function(){a?s.call(null,function(){},1):s.call(null)})}},function(e,n,o){var r=o(0);r(r.S+r.F,"Object",{assign:o(41)})},function(e,n,o){var r=o(2),s=o(1).document,a=r(s)&&r(s.createElement);e.exports=function(l){return a?s.createElement(l):{}}},function(e,n,o){var r=o(1),s=o(7),a=o(17),l=o(10)("src"),h="toString",u=Function[h],d=(""+u).split(h);o(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===r?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 o={}.hasOwnProperty;e.exports=function(r,s){return o.call(r,s)}},function(e,n,o){var r=o(19);e.exports=function(s,a,l){if(r(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(o){if(typeof o!="function")throw TypeError(o+" is not a function!");return o}},function(e,n,o){var r=o(42),s=o(28);e.exports=Object.keys||function(a){return r(a,s)}},function(e,n,o){var r=o(11),s=o(12);e.exports=function(a){return r(s(a))}},function(e,n){var o={}.toString;e.exports=function(r){return o.call(r).slice(8,-1)}},function(e,n,o){var r=o(21),s=o(24),a=o(43);e.exports=function(l){return function(h,u,d){var c,f=r(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,o){var r=o(25),s=Math.min;e.exports=function(a){return 0<a?s(r(a),9007199254740991):0}},function(e,n){var o=Math.ceil,r=Math.floor;e.exports=function(s){return isNaN(s=+s)?0:(0<s?r:o)(s)}},function(e,n,o){var r=o(27)("keys"),s=o(10);e.exports=function(a){return r[a]||(r[a]=s(a))}},function(e,n,o){var r=o(6),s=o(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:r.version,mode:o(44)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,n){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,n,o){var r=o(12);e.exports=function(s){return Object(r(s))}},function(e,n,o){var r=o(8).f,s=Function.prototype,a=/^\s*function ([^ (]*)/;"name"in s||o(3)&&r(s,"name",{configurable:!0,get:function(){try{return(""+this).match(a)[1]}catch{return""}}})},function(e,n,o){var r=o(0),s=o(32)(1);r(r.P+r.F*!o(13)([].map,!0),"Array",{map:function(a){return s(this,a,arguments[1])}})},function(e,n,o){var r=o(18),s=o(11),a=o(29),l=o(24),h=o(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),z=r(x,k,3),P=l(S.length),j=0,A=c?v(y,P):f?v(y,0):void 0;j<P;j++)if((_||j in S)&&(C=z(w=S[j],j,M),u)){if(c)A[j]=C;else if(C)switch(u){case 3:return!0;case 5:return w;case 6:return j;case 2:A.push(w)}else if(m)return!1}return p?-1:g||m?m:A}}},function(e,n,o){var r=o(22);e.exports=Array.isArray||function(s){return r(s)=="Array"}},function(e,n,o){var r=o(27)("wks"),s=o(10),a=o(1).Symbol,l=typeof a=="function";(e.exports=function(h){return r[h]||(r[h]=l&&a[h]||(l?a:s)("Symbol."+h))}).store=r},function(e,n,o){var r=o(0),s=o(23)(!1),a=[].indexOf,l=!!a&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(l||!o(13)(a)),"Array",{indexOf:function(h){return l?a.apply(this,arguments)||0:s(this,h,arguments[1])}})},function(e,n,o){var r=o(0);r(r.S,"Object",{create:o(52)})},function(e,n,o){n.__esModule=!0,n.default=void 0,o(14),o(30),o(31),o(35),o(49),o(50);var r=o(5),s=function(d){return d&&d.__esModule?d:{default:d}}(o(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,r.render)((0,r.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,o){e.exports=!o(3)&&!o(4)(function(){return Object.defineProperty(o(15)("div"),"a",{get:function(){return 7}}).a!=7})},function(e,n,o){var r=o(2);e.exports=function(s,a){if(!r(s))return s;var l,h;if(a&&typeof(l=s.toString)=="function"&&!r(h=l.call(s))||typeof(l=s.valueOf)=="function"&&!r(h=l.call(s))||!a&&typeof(l=s.toString)=="function"&&!r(h=l.call(s)))return h;throw TypeError("Can't convert object to primitive value")}},function(e,n){e.exports=function(o,r){return{enumerable:!(1&o),configurable:!(2&o),writable:!(4&o),value:r}}},function(e,n,o){var r=o(20),s=o(45),a=o(46),l=o(29),h=o(11),u=Object.assign;e.exports=!u||o(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?r(y).concat(p(y)):r(y),k=x.length,w=0;w<k;)_.call(y,v=x[w++])&&(f[v]=y[v]);return f}:u},function(e,n,o){var r=o(17),s=o(21),a=o(23)(!1),l=o(26)("IE_PROTO");e.exports=function(h,u){var d,c=s(h),f=0,g=[];for(d in c)d!=l&&r(c,d)&&g.push(d);for(;u.length>f;)r(c,d=u[f++])&&(~a(g,d)||g.push(d));return g}},function(e,n,o){var r=o(25),s=Math.max,a=Math.min;e.exports=function(l,h){return(l=r(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,o){var r=o(48);e.exports=function(s,a){return new(r(s))(a)}},function(e,n,o){var r=o(2),s=o(33),a=o(34)("species");e.exports=function(l){var h;return s(l)&&(typeof(h=l.constructor)!="function"||h!==Array&&!s(h.prototype)||(h=void 0),r(h)&&(h=h[a])===null&&(h=void 0)),h===void 0?Array:h}},function(e,n,o){var r=o(0),s=o(32)(2);r(r.P+r.F*!o(13)([].filter,!0),"Array",{filter:function(a){return s(this,a,arguments[1])}})},function(e,n,o){var r=o(0);r(r.S,"Array",{isArray:o(33)})},function(e,n,o){n.__esModule=!0,n.default=void 0,o(14),o(36),o(30),o(31),o(35),o(55),o(58);var r=o(5),s=l(o(60)),a=l(o(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],z=x!==v&&x!==-1;if(!z&&M||!(z||S)){var P=k&&c();this.handleComponentBlur({menuOpen:P,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,z=this.state.query.length!==M.length,P=M.length>=x;this.setState({query:M,ariaHint:S}),w||!S&&z&&P?k(M,function(j){var A=0<j.length;v.setState({menuOpen:A,options:j,selected:C&&A?0:-1,validChoiceMade:!1})}):!S&&P||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,z=y.required,P=y.showAllValues,j=y.tNoResults,A=y.tStatusQueryTooShort,lt=y.tStatusNoResults,B=y.tStatusSelectedOption,W=y.tStatusResults,N=y.tAssistiveHint,$=y.dropdownArrow,D=this.state,Q=D.focused,V=D.hovered,I=D.menuOpen,st=D.options,b=D.query,T=D.selected,Z=D.ariaHint,E=D.validChoiceMade,J=this.hasAutoselect(),q=Q===-1,yt=st.length===0,St=b.length!==0,xt=b.length>=C,Et=this.props.showNoOptionsFound&&q&&yt&&St&&xt,Ot=x+"__wrapper",Lt=x+"__input",Bt=Q!==null?" "+Lt+"--focused":"",O=this.props.showAllValues?" "+Lt+"--show-all-values":" "+Lt+"--default",dt=x+"__dropdown-arrow-down",_t=Q!==-1&&Q!==null,wt=x+"__menu",bt=wt+"--"+k,at=wt+"--"+(I||Et?"visible":"hidden"),ot=x+"__option",Mt=x+"__hint",zt=this.templateInputValue(st[T]),Ut=zt&&zt.toLowerCase().indexOf(b.toLowerCase())===0&&J?b+zt.substr(b.length):"",kt=w+"__assistiveHint",ct=Z?{"aria-describedby":kt}:null;return P&&typeof(_=$({className:dt}))=="string"&&(_=(0,r.createElement)("div",{className:x+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:_}})),(0,r.createElement)("div",{className:Ot,onKeyDown:this.handleKeyDown},(0,r.createElement)(s.default,{id:w,length:st.length,queryLength:b.length,minQueryLength:C,selectedOption:this.templateInputValue(st[T]),selectedOptionIndex:T,validChoiceMade:E,isInFocus:this.state.focused!==null,tQueryTooShort:A,tNoResults:lt,tSelectedOption:B,tResults:W}),Ut&&(0,r.createElement)("span",null,(0,r.createElement)("input",{className:Mt,readonly:!0,tabIndex:"-1",value:Ut})),(0,r.createElement)("input",h({"aria-expanded":I?"true":"false","aria-activedescendant":!!_t&&w+"__option--"+Q,"aria-owns":w+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"},ct,{autoComplete:"off",className:""+Lt+Bt+O,id:w,onClick:function(Ft){return v.handleInputClick(Ft)},onBlur:this.handleInputBlur},function(Tt){return{onInput:Tt}}(this.handleInputChange),{onFocus:this.handleInputFocus,name:M,placeholder:S,ref:function(Ft){v.elementReferences[-1]=Ft},type:"text",role:"combobox",required:z,value:b})),_,(0,r.createElement)("ul",{className:wt+" "+bt+" "+at,onMouseLeave:function(Ft){return v.handleListMouseLeave(Ft)},id:w+"__listbox",role:"listbox"},st.map(function(Ft,Tt){var ft=(Q===-1?T===Tt:Q===Tt)&&V===null?" "+ot+"--focused":"",ce=Tt%2?" "+ot+"--odd":"",Xe=c()?"<span id="+w+"__option-suffix--"+Tt+' 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"> '+(Tt+1)+" of "+st.length+"</span>":"";return(0,r.createElement)("li",{"aria-selected":Q===Tt?"true":"false",className:""+ot+ft+ce,dangerouslySetInnerHTML:{__html:v.templateSuggestion(Ft)+Xe},id:w+"__option--"+Tt,key:Tt,onBlur:function(qt){return v.handleOptionBlur(qt,Tt)},onClick:function(qt){return v.handleOptionClick(qt,Tt)},onMouseDown:v.handleOptionMouseDown,onMouseEnter:function(qt){return v.handleOptionMouseEnter(qt,Tt)},ref:function(qt){v.elementReferences[Tt]=qt},role:"option",tabIndex:"-1","aria-posinset":Tt+1,"aria-setsize":st.length})}),Et&&(0,r.createElement)("li",{className:ot+" "+ot+"--no-results"},j())),(0,r.createElement)("span",{id:kt,style:{display:"none"}},N()))},m}(r.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,o){var r=o(9),s=o(53),a=o(28),l=o(26)("IE_PROTO"),h=function(){},u="prototype",d=function(){var c,f=o(15)("iframe"),g=a.length;for(f.style.display="none",o(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]=r(c),g=new h,h[u]=null,g[l]=c):g=d(),f===void 0?g:s(g,f)}},function(e,n,o){var r=o(8),s=o(9),a=o(20);e.exports=o(3)?Object.defineProperties:function(l,h){s(l);for(var u,d=a(h),c=d.length,f=0;f<c;)r.f(l,u=d[f++],h[u]);return l}},function(e,n,o){var r=o(1).document;e.exports=r&&r.documentElement},function(e,n,o){var r=o(0);r(r.P,"Function",{bind:o(56)})},function(e,n,o){var r=o(19),s=o(2),a=o(57),l=[].slice,h={};e.exports=Function.bind||function(u){var d=r(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(o,r,s){var a=s===void 0;switch(r.length){case 0:return a?o():o.call(s);case 1:return a?o(r[0]):o.call(s,r[0]);case 2:return a?o(r[0],r[1]):o.call(s,r[0],r[1]);case 3:return a?o(r[0],r[1],r[2]):o.call(s,r[0],r[1],r[2]);case 4:return a?o(r[0],r[1],r[2],r[3]):o.call(s,r[0],r[1],r[2],r[3])}return o.apply(s,r)}},function(e,n,o){o(59)("match",1,function(r,s,a){return[function(l){var h=r(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,o){var r=o(7),s=o(16),a=o(4),l=o(12),h=o(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),r(RegExp.prototype,f,d==2?function(_,v){return p.call(_,this,v)}:function(_){return p.call(_,this)}))}},function(e,n,o){n.__esModule=!0,n.default=void 0,o(36);var r=o(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,z=g<m,P=f===0,j=p?x(p,f,_):"",A=null;return A=z?v(m):P?y():k(f,j),this.debounceStatusUpdate(),(0,r.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,r.createElement)("div",{id:c+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!S&&M&&C?A:""),(0,r.createElement)("div",{id:c+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},S||!M||C?"":A))},h}(r.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,o){n.__esModule=!0,n.default=void 0;var r=o(5),s=function(l){var h=l.className;return(0,r.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:h,focusable:"false"},(0,r.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,r.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};n.default=s}]).default})})(dp);const oE=f1(dp.exports),rE=`@charset "UTF-8";.govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@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)}
47
+ `;var cp=Object.freeze,fp=Object.defineProperty,sE=Object.getOwnPropertyDescriptor,Ve=(i,t,e,n)=>{for(var o=n>1?void 0:n?sE(t,e):t,r=i.length-1,s;r>=0;r--)(s=i[r])&&(o=(n?s(t,e,o):s(o))||o);return n&&o&&fp(t,e,o),o},aE=(i,t)=>cp(fp(i,"raw",{value:cp(t||i.slice())})),gp;F.AddressAutocomplete=(cd=class extends Ln{constructor(){super(...arguments);X(this,"id","autocomplete");X(this,"postcode","SE5 0HU");X(this,"label","Select an address");X(this,"initialAddress","");X(this,"osPlacesApiKey","a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex");X(this,"arrowStyle","default");X(this,"labelStyle","responsive");X(this,"_totalAddresses");X(this,"_addressesInPostcode",[]);X(this,"_options",[]);X(this,"_selectedAddress",null);X(this,"_osError");X(this,"dispatch",(e,n)=>this.dispatchEvent(new CustomEvent(e,{detail:n})))}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(){oE({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:e=>{this._selectedAddress=this._addressesInPostcode.filter(n=>n.LPI.ADDRESS.split(`, ${n.LPI.ADMINISTRATIVE_AREA}`)[0]===e)[0],this._selectedAddress&&this.dispatch("addressSelection",{address:this._selectedAddress})}})}async _fetchData(e=0,n=[]){const o={postcode:this.postcode,dataset:"LPI",maxResults:"100",output_srs:"EPSG:4326",lr:"EN",key:this.osPlacesApiKey},r=`https://api.os.uk/search/places/v1/postcode?${new URLSearchParams(o)}`;await fetch(r+`&offset=${e}`).then(s=>s.json()).then(s=>{var l,h,u;(s.error||s.fault)&&(this._osError=((l=s.error)==null?void 0:l.message)||((h=s.fault)==null?void 0:h.faultstring)||"Something went wrong"),this._totalAddresses=(u=s.header)==null?void 0:u.totalresults;const a=n.concat(s.results||[]);if(this._addressesInPostcode=a,this.dispatch("ready",{postcode:this.postcode,status:`fetched ${this._addressesInPostcode.length}/${this._totalAddresses} addresses`}),s.results){s.results.filter(c=>c.LPI.LPI_LOGICAL_STATUS_CODE_DESCRIPTION==="APPROVED").map(c=>{this._options.push(c.LPI.ADDRESS.split(`, ${c.LPI.ADMINISTRATIVE_AREA}`)[0])});const d=new Intl.Collator([],{numeric:!0});this._options.sort((c,f)=>d.compare(c,f))}this._totalAddresses&&this._totalAddresses>this._addressesInPostcode.length&&this._fetchData(this._addressesInPostcode.length,this._addressesInPostcode)}).catch(s=>console.log(s))}_getLabelClasses(){let e="govuk-label";return this.labelStyle==="static"&&(e+=" govuk-label--static"),e}_getErrorMessageContainer(e){const n=e?"govuk-warning-text":"",o=e?Wi` <span class="govuk-warning-text__icon" aria-hidden="true">!</span>
87
48
  <strong class="govuk-warning-text__text">
88
49
  <span class="govuk-warning-text__assistive">Warning</span>
89
- ${i}
90
- </strong>`:null;return Bi`<div
50
+ ${e}
51
+ </strong>`:null;return Wi`<div
91
52
  id="error-message-container"
92
- class="${t}"
53
+ class="${n}"
93
54
  role="status"
94
55
  >
95
- ${e}
96
- </div>`}_getAutocomplete(i){return i?null:Bi`
56
+ ${o}
57
+ </div>`}_getAutocomplete(e){return e?null:Wi`
97
58
  <link
98
59
  rel="stylesheet"
99
60
  href="https://cdn.jsdelivr.net/npm/accessible-autocomplete@2.0.4/dist/accessible-autocomplete.min.css"
@@ -102,16 +63,16 @@ northing meters`+i;var c=d/2,g=0,f=0,m,p,_,v,y;return c>0&&(m=1e5/Math.pow(10,c)
102
63
  ${this.label}
103
64
  </label>
104
65
  <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(dp||(dp=oE([`
106
- <script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>
66
+ `}render(){let e;return this.osPlacesApiKey?this._osError?e=this._osError:this._totalAddresses===0&&(e=`No addresses found in postcode ${this.postcode}`):e="Missing OS Places API key",Wi(gp||(gp=aE([`
67
+ <script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
107
68
  `,`
108
69
  `,`
109
- `])),this._getErrorMessageContainer(i),this._getAutocomplete(i))}},j.AddressAutocomplete.styles=Es(iE),We([J({type:String})],j.AddressAutocomplete.prototype,"id",2),We([J({type:String})],j.AddressAutocomplete.prototype,"postcode",2),We([J({type:String})],j.AddressAutocomplete.prototype,"label",2),We([J({type:String})],j.AddressAutocomplete.prototype,"initialAddress",2),We([J({type:String})],j.AddressAutocomplete.prototype,"osPlacesApiKey",2),We([J({type:String})],j.AddressAutocomplete.prototype,"arrowStyle",2),We([J({type:String})],j.AddressAutocomplete.prototype,"labelStyle",2),We([Wi()],j.AddressAutocomplete.prototype,"_totalAddresses",2),We([Wi()],j.AddressAutocomplete.prototype,"_addressesInPostcode",2),We([Wi()],j.AddressAutocomplete.prototype,"_options",2),We([Wi()],j.AddressAutocomplete.prototype,"_selectedAddress",2),We([Wi()],j.AddressAutocomplete.prototype,"_osError",2),j.AddressAutocomplete=We([vl("address-autocomplete")],j.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 o in t)Object.prototype.hasOwnProperty.call(t,o)&&(i[o]=t[o])}return i},sd.apply(this,arguments)},cp=/^([a-z]{1,2}\d)([a-z])$/i,rE=/[a-z]{2}$/i,gp=/\d[a-z]{2}$/i,sE=/^[a-z]{1,2}\d[a-z\d]?\s*\d[a-z]{2}$/i,aE=/^[a-z]{1,2}/i,lE={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]},hE=/\s+/gi,fp=function(i){return i.replace(hE,"").toUpperCase()},ld=function(i,t){return fp(i).match(t)},vs=function(i){return i.match(sE)!==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)?fp(i).replace(gp,""):null},ud=function(i){if(!vs(i))return null;var t=ld(i,gp);return ad(t)},uE=function(i){if(!vs(i))return null;var t=ld(i,aE);return ad(t)},dE=function(i){var t=_s(i);if(t===null)return null;var e=ud(i);return e===null?null:t+" "+e[0]},cE=function(i){if(!vs(i))return null;var t=ld(i,rE);return ad(t)},gE=function(i){var t=_s(i);if(t===null)return null;var e=t.match(cp);return e===null?t:e[1]},fE=function(i){var t=_s(i);if(t===null)return null;var e=t.match(cp);return e===null?null:t},mE=function(i){return vs(i)?{valid:!0,postcode:hd(i),incode:ud(i),outcode:_s(i),area:uE(i),district:gE(i),subDistrict:fE(i),sector:dE(i),unit:cE(i)}:sd({},lE)};const pE=`@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,vE=Object.getOwnPropertyDescriptor,xi=(i,t,e,n)=>{for(var o=n>1?void 0:n?vE(t,e):t,r=i.length-1,s;r>=0;r--)(s=i[r])&&(o=(n?s(t,e,o):s(o))||o);return n&&o&&pp(t,e,o),o},_E=(i,t)=>mp(pp(i,"raw",{value:mp(t||i.slice())})),vp;j.PostcodeSearch=class extends An{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=mE(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">
70
+ `])),this._getErrorMessageContainer(e),this._getAutocomplete(e))}},X(cd,"styles",Ts(rE)),cd),Ve([K({type:String})],F.AddressAutocomplete.prototype,"id",2),Ve([K({type:String})],F.AddressAutocomplete.prototype,"postcode",2),Ve([K({type:String})],F.AddressAutocomplete.prototype,"label",2),Ve([K({type:String})],F.AddressAutocomplete.prototype,"initialAddress",2),Ve([K({type:String})],F.AddressAutocomplete.prototype,"osPlacesApiKey",2),Ve([K({type:String})],F.AddressAutocomplete.prototype,"arrowStyle",2),Ve([K({type:String})],F.AddressAutocomplete.prototype,"labelStyle",2),Ve([Vi()],F.AddressAutocomplete.prototype,"_totalAddresses",2),Ve([Vi()],F.AddressAutocomplete.prototype,"_addressesInPostcode",2),Ve([Vi()],F.AddressAutocomplete.prototype,"_options",2),Ve([Vi()],F.AddressAutocomplete.prototype,"_selectedAddress",2),Ve([Vi()],F.AddressAutocomplete.prototype,"_osError",2),F.AddressAutocomplete=Ve([_l("address-autocomplete")],F.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 o in t)Object.prototype.hasOwnProperty.call(t,o)&&(i[o]=t[o])}return i},sd.apply(this,arguments)},mp=/^([a-z]{1,2}\d)([a-z])$/i,lE=/[a-z]{2}$/i,pp=/\d[a-z]{2}$/i,hE=/^[a-z]{1,2}\d[a-z\d]?\s*\d[a-z]{2}$/i,uE=/^[a-z]{1,2}/i,dE={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]},cE=/\s+/gi,vp=function(i){return i.replace(cE,"").toUpperCase()},ld=function(i,t){return vp(i).match(t)},ys=function(i){return i.match(hE)!==null},hd=function(i){var t=xs(i);if(t===null)return null;var e=ud(i);return e===null?null:t+" "+e},xs=function(i){return ys(i)?vp(i).replace(pp,""):null},ud=function(i){if(!ys(i))return null;var t=ld(i,pp);return ad(t)},fE=function(i){if(!ys(i))return null;var t=ld(i,uE);return ad(t)},gE=function(i){var t=xs(i);if(t===null)return null;var e=ud(i);return e===null?null:t+" "+e[0]},mE=function(i){if(!ys(i))return null;var t=ld(i,lE);return ad(t)},pE=function(i){var t=xs(i);if(t===null)return null;var e=t.match(mp);return e===null?t:e[1]},vE=function(i){var t=xs(i);if(t===null)return null;var e=t.match(mp);return e===null?null:t},_E=function(i){return ys(i)?{valid:!0,postcode:hd(i),incode:ud(i),outcode:xs(i),area:fE(i),district:pE(i),subDistrict:vE(i),sector:gE(i),unit:mE(i)}:sd({},dE)};const yE=`@charset "UTF-8";.govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@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)}
71
+ `;var _p=Object.freeze,yp=Object.defineProperty,xE=Object.getOwnPropertyDescriptor,ki=(i,t,e,n)=>{for(var o=n>1?void 0:n?xE(t,e):t,r=i.length-1,s;r>=0;r--)(s=i[r])&&(o=(n?s(t,e,o):s(o))||o);return n&&o&&yp(t,e,o),o},bE=(i,t)=>_p(yp(i,"raw",{value:_p(t||i.slice())})),xp;F.PostcodeSearch=(fd=class extends Ln{constructor(){super(...arguments);X(this,"id","postcode");X(this,"errorId","postcode-error");X(this,"label","Postcode");X(this,"hintText","");X(this,"errorMessage","Enter a valid UK postcode");X(this,"onlyQuestionOnPage",!1);X(this,"_postcode","");X(this,"_sanitizedPostcode",null);X(this,"_showPostcodeError",!1);X(this,"dispatch",(e,n)=>this.dispatchEvent(new CustomEvent(e,{detail:n})))}_onInputChange(e){const n=e.target.value,o=_E(n.trim()).valid;o?(this._sanitizedPostcode=hd(n.trim()),this._postcode=hd(n.trim())||n,this._showPostcodeError=!1):(this._sanitizedPostcode=null,this._postcode=n.toUpperCase()),this.dispatch("postcodeChange",{postcode:this._sanitizedPostcode||n,isValid:o})}_onBlur(){this._sanitizedPostcode||(this._showPostcodeError=!0),this._showError()}_onKeyUp(e){e.key==="Enter"&&!this._sanitizedPostcode&&(this._showPostcodeError=!0),this._showError()}_showError(){var o,r;const e=(o=this.shadowRoot)==null?void 0:o.querySelector(`#${this.errorId}`);e&&(e.style.display="none"),e&&this._showPostcodeError&&(e.style.display="");const n=(r=this.shadowRoot)==null?void 0:r.querySelector(".govuk-form-group");n&&this._showPostcodeError&&n.classList.add("govuk-form-group--error"),n&&!this._showPostcodeError&&n.classList.remove("govuk-form-group--error")}_makeLabel(){return this.onlyQuestionOnPage?Wi`<h1 class="govuk-label-wrapper">
111
72
  <label class="govuk-label govuk-label--l" for=${this.id}>
112
73
  ${this.label}
113
74
  </label>
114
- </h1>`:Bi`<label class="govuk-label" for=${this.id}>${this.label}</label>`}render(){return Bi(vp||(vp=_E([`<script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>
75
+ </h1>`:Wi`<label class="govuk-label" for=${this.id}>${this.label}</label>`}render(){return Wi(xp||(xp=bE([`<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
115
76
  <div class="govuk-form-group">
116
77
  `,`
117
78
  <div id="postcode-hint" class="govuk-hint">`,`</div>
@@ -137,4 +98,4 @@ northing meters`+i;var c=d/2,g=0,f=0,m,p,_,v,y;return c>0&&(m=1e5/Math.pow(10,c)
137
98
  @keyup=`,`
138
99
  tabindex="0"
139
100
  />
140
- </div>`])),this._makeLabel(),this.hintText,this.errorId,this.errorMessage,this.id,this.errorId,this._postcode,this._onInputChange,this._onBlur,this._onKeyUp)}},j.PostcodeSearch.styles=Es(pE),xi([J({type:String})],j.PostcodeSearch.prototype,"id",2),xi([J({type:String})],j.PostcodeSearch.prototype,"errorId",2),xi([J({type:String})],j.PostcodeSearch.prototype,"label",2),xi([J({type:String})],j.PostcodeSearch.prototype,"hintText",2),xi([J({type:String})],j.PostcodeSearch.prototype,"errorMessage",2),xi([J({type:Boolean})],j.PostcodeSearch.prototype,"onlyQuestionOnPage",2),xi([Wi()],j.PostcodeSearch.prototype,"_postcode",2),xi([Wi()],j.PostcodeSearch.prototype,"_sanitizedPostcode",2),xi([Wi()],j.PostcodeSearch.prototype,"_showPostcodeError",2),j.PostcodeSearch=xi([vl("postcode-search")],j.PostcodeSearch),Object.defineProperties(j,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
101
+ </div>`])),this._makeLabel(),this.hintText,this.errorId,this.errorMessage,this.id,this.errorId,this._postcode,this._onInputChange,this._onBlur,this._onKeyUp)}},X(fd,"styles",Ts(yE)),fd),ki([K({type:String})],F.PostcodeSearch.prototype,"id",2),ki([K({type:String})],F.PostcodeSearch.prototype,"errorId",2),ki([K({type:String})],F.PostcodeSearch.prototype,"label",2),ki([K({type:String})],F.PostcodeSearch.prototype,"hintText",2),ki([K({type:String})],F.PostcodeSearch.prototype,"errorMessage",2),ki([K({type:Boolean})],F.PostcodeSearch.prototype,"onlyQuestionOnPage",2),ki([Vi()],F.PostcodeSearch.prototype,"_postcode",2),ki([Vi()],F.PostcodeSearch.prototype,"_sanitizedPostcode",2),ki([Vi()],F.PostcodeSearch.prototype,"_showPostcodeError",2),F.PostcodeSearch=ki([_l("postcode-search")],F.PostcodeSearch),Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})});