@eox/layercontrol 0.18.0 → 0.18.1-dev.1721833788.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,87 +1,195 @@
1
- (function(C,_){typeof exports=="object"&&typeof module<"u"?_(exports):typeof define=="function"&&define.amd?define(["exports"],_):(C=typeof globalThis<"u"?globalThis:C||self,_(C["eox-layercontrol"]={}))})(this,function(C){"use strict";var la=Object.defineProperty;var yo=C=>{throw TypeError(C)};var ua=(C,_,H)=>_ in C?la(C,_,{enumerable:!0,configurable:!0,writable:!0,value:H}):C[_]=H;var L=(C,_,H)=>ua(C,typeof _!="symbol"?_+"":_,H),qn=(C,_,H)=>_.has(C)||yo("Cannot "+H);var M=(C,_,H)=>(qn(C,_,"read from private field"),H?H.call(C):_.get(C)),O=(C,_,H)=>_.has(C)?yo("Cannot add the same private member more than once"):_ instanceof WeakSet?_.add(C):_.set(C,H),$e=(C,_,H,Gt)=>(qn(C,_,"write to private field"),Gt?Gt.call(C,H):_.set(C,H),H),Y=(C,_,H)=>(qn(C,_,"access private method"),H);/**
1
+ (function(Z,j){typeof exports=="object"&&typeof module<"u"?j(exports):typeof define=="function"&&define.amd?define(["exports"],j):(Z=typeof globalThis<"u"?globalThis:Z||self,j(Z["eox-layercontrol"]={}))})(this,function(Z){"use strict";var lg=Object.defineProperty;var wl=Z=>{throw TypeError(Z)};var ug=(Z,j,st)=>j in Z?lg(Z,j,{enumerable:!0,configurable:!0,writable:!0,value:st}):Z[j]=st;var ht=(Z,j,st)=>ug(Z,typeof j!="symbol"?j+"":j,st),Cs=(Z,j,st)=>j.has(Z)||wl("Cannot "+st);var nt=(Z,j,st)=>(Cs(Z,j,"read from private field"),st?st.call(Z):j.get(Z)),tt=(Z,j,st)=>j.has(Z)?wl("Cannot add the same private member more than once"):j instanceof WeakSet?j.add(Z):j.set(Z,st),Wn=(Z,j,st,un)=>(Cs(Z,j,"write to private field"),un?un.call(Z,st):j.set(Z,st),st),vt=(Z,j,st)=>(Cs(Z,j,"access private method"),st);/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */var go,me,ye,be,Ze,bo,Xe,Ye,ve,qe,We,Ge,Je,Ct,cn,vo,Ke,Qe,tn,en,nn,on,rn,wo,Z,Eo,xo,Wn,So,$o,hn,sn,an,Wt,ln,_o,un;const _=globalThis,H=_.ShadowRoot&&(_.ShadyCSS===void 0||_.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Gt=Symbol(),Gn=new WeakMap;let Ao=class{constructor(t,n,i){if(this._$cssResult$=!0,i!==Gt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=n}get styleSheet(){let t=this.o;const n=this.t;if(H&&t===void 0){const i=n!==void 0&&n.length===1;i&&(t=Gn.get(n)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Gn.set(n,t))}return t}toString(){return this.cssText}};const Co=e=>new Ao(typeof e=="string"?e:e+"",void 0,Gt),To=(e,t)=>{if(H)e.adoptedStyleSheets=t.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of t){const i=document.createElement("style"),o=_.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=n.cssText,e.appendChild(i)}},Jn=H?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let n="";for(const i of t.cssRules)n+=i.cssText;return Co(n)})(e):e;/**
5
+ */var xl,on,Hn,Gn,Ni,Cl,Ui,Fi,kn,Bi,Xi,Hi,Gi,Ee,tr,Sl,ki,Vi,ji,zi,Wi,Yi,Zi,Al,bt,Il,$l,Ss,Pl,Ml,er,Ki,qi,an,Ji,Ol,Qi;const j=globalThis,st=j.ShadowRoot&&(j.ShadyCSS===void 0||j.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,un=Symbol(),As=new WeakMap;let Ll=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==un)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(st&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=As.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&As.set(e,t))}return t}toString(){return this.cssText}};const Dl=n=>new Ll(typeof n=="string"?n:n+"",void 0,un),Nl=(n,t)=>{if(st)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),r=j.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=e.cssText,n.appendChild(i)}},Is=st?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return Dl(e)})(n):n;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:Po,defineProperty:Oo,getOwnPropertyDescriptor:Ro,getOwnPropertyNames:Do,getOwnPropertySymbols:No,getPrototypeOf:Mo}=Object,xt=globalThis,Kn=xt.trustedTypes,Io=Kn?Kn.emptyScript:"",pn=xt.reactiveElementPolyfillSupport,Jt=(e,t)=>e,fn={toAttribute(e,t){switch(t){case Boolean:e=e?Io:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},Qn=(e,t)=>!Po(e,t),ti={attribute:!0,type:String,converter:fn,reflect:!1,hasChanged:Qn};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),xt.litPropertyMetadata??(xt.litPropertyMetadata=new WeakMap);class kt extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,n=ti){if(n.state&&(n.attribute=!1),this._$Ei(),this.elementProperties.set(t,n),!n.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,n);o!==void 0&&Oo(this.prototype,t,o)}}static getPropertyDescriptor(t,n,i){const{get:o,set:r}=Ro(this.prototype,t)??{get(){return this[n]},set(s){this[n]=s}};return{get(){return o==null?void 0:o.call(this)},set(s){const a=o==null?void 0:o.call(this);r.call(this,s),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ti}static _$Ei(){if(this.hasOwnProperty(Jt("elementProperties")))return;const t=Mo(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Jt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Jt("properties"))){const n=this.properties,i=[...Do(n),...No(n)];for(const o of i)this.createProperty(o,n[o])}const t=this[Symbol.metadata];if(t!==null){const n=litPropertyMetadata.get(t);if(n!==void 0)for(const[i,o]of n)this.elementProperties.set(i,o)}this._$Eh=new Map;for(const[n,i]of this.elementProperties){const o=this._$Eu(n,i);o!==void 0&&this._$Eh.set(o,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const n=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const o of i)n.unshift(Jn(o))}else t!==void 0&&n.push(Jn(t));return n}static _$Eu(t,n){const i=n.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(n=>n(this))}addController(t){var n;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((n=t.hostConnected)==null||n.call(t))}removeController(t){var n;(n=this._$EO)==null||n.delete(t)}_$E_(){const t=new Map,n=this.constructor.elementProperties;for(const i of n.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return To(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(n=>{var i;return(i=n.hostConnected)==null?void 0:i.call(n)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(n=>{var i;return(i=n.hostDisconnected)==null?void 0:i.call(n)})}attributeChangedCallback(t,n,i){this._$AK(t,i)}_$EC(t,n){var r;const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(o!==void 0&&i.reflect===!0){const s=(((r=i.converter)==null?void 0:r.toAttribute)!==void 0?i.converter:fn).toAttribute(n,i.type);this._$Em=t,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(t,n){var r;const i=this.constructor,o=i._$Eh.get(t);if(o!==void 0&&this._$Em!==o){const s=i.getPropertyOptions(o),a=typeof s.converter=="function"?{fromAttribute:s.converter}:((r=s.converter)==null?void 0:r.fromAttribute)!==void 0?s.converter:fn;this._$Em=o,this[o]=a.fromAttribute(n,s.type),this._$Em=null}}requestUpdate(t,n,i){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??Qn)(this[t],n))return;this.P(t,n,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,n,i){this._$AL.has(t)||this._$AL.set(t,n),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,s]of this._$Ep)this[r]=s;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[r,s]of o)s.wrapped!==!0||this._$AL.has(r)||this[r]===void 0||this.P(r,this[r],s)}let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),(i=this._$EO)==null||i.forEach(o=>{var r;return(r=o.hostUpdate)==null?void 0:r.call(o)}),this.update(n)):this._$EU()}catch(o){throw t=!1,this._$EU(),o}t&&this._$AE(n)}willUpdate(t){}_$AE(t){var n;(n=this._$EO)==null||n.forEach(i=>{var o;return(o=i.hostUpdated)==null?void 0:o.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(n=>this._$EC(n,this[n]))),this._$EU()}updated(t){}firstUpdated(t){}}kt.elementStyles=[],kt.shadowRootOptions={mode:"open"},kt[Jt("elementProperties")]=new Map,kt[Jt("finalized")]=new Map,pn==null||pn({ReactiveElement:kt}),(xt.reactiveElementVersions??(xt.reactiveElementVersions=[])).push("2.0.4");/**
9
+ */const{is:Ul,defineProperty:Fl,getOwnPropertyDescriptor:Bl,getOwnPropertyNames:Xl,getOwnPropertySymbols:Hl,getPrototypeOf:Gl}=Object,ae=globalThis,$s=ae.trustedTypes,kl=$s?$s.emptyScript:"",nr=ae.reactiveElementPolyfillSupport,cn=(n,t)=>n,ir={toAttribute(n,t){switch(t){case Boolean:n=n?kl:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},Ps=(n,t)=>!Ul(n,t),Ms={attribute:!0,type:String,converter:ir,reflect:!1,hasChanged:Ps};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),ae.litPropertyMetadata??(ae.litPropertyMetadata=new WeakMap);class De extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Ms){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,e);r!==void 0&&Fl(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){const{get:r,set:s}=Bl(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get(){return r==null?void 0:r.call(this)},set(o){const a=r==null?void 0:r.call(this);s.call(this,o),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ms}static _$Ei(){if(this.hasOwnProperty(cn("elementProperties")))return;const t=Gl(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(cn("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(cn("properties"))){const e=this.properties,i=[...Xl(e),...Hl(e)];for(const r of i)this.createProperty(r,e[r])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,r]of e)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const r=this._$Eu(e,i);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const r of i)e.unshift(Is(r))}else t!==void 0&&e.push(Is(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Nl(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostConnected)==null?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){var s;const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(r!==void 0&&i.reflect===!0){const o=(((s=i.converter)==null?void 0:s.toAttribute)!==void 0?i.converter:ir).toAttribute(e,i.type);this._$Em=t,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){var s;const i=this.constructor,r=i._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const o=i.getPropertyOptions(r),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((s=o.converter)==null?void 0:s.fromAttribute)!==void 0?o.converter:ir;this._$Em=r,this[r]=a.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,i){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??Ps)(this[t],e))return;this.P(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,o]of this._$Ep)this[s]=o;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[s,o]of r)o.wrapped!==!0||this._$AL.has(s)||this[s]===void 0||this.P(s,this[s],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(r=>{var s;return(s=r.hostUpdate)==null?void 0:s.call(r)}),this.update(e)):this._$EU()}catch(r){throw t=!1,this._$EU(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(i=>{var r;return(r=i.hostUpdated)==null?void 0:r.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}De.elementStyles=[],De.shadowRootOptions={mode:"open"},De[cn("elementProperties")]=new Map,De[cn("finalized")]=new Map,nr==null||nr({ReactiveElement:De}),(ae.reactiveElementVersions??(ae.reactiveElementVersions=[])).push("2.0.4");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const Kt=globalThis,_e=Kt.trustedTypes,ei=_e?_e.createPolicy("lit-html",{createHTML:e=>e}):void 0,gn="$lit$",gt=`lit$${(Math.random()+"").slice(9)}$`,mn="?"+gt,Ho=`<${mn}>`,Ot=document,Qt=()=>Ot.createComment(""),te=e=>e===null||typeof e!="object"&&typeof e!="function",ni=Array.isArray,ii=e=>ni(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",yn=`[
14
- \f\r]`,ee=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,oi=/-->/g,ri=/>/g,Rt=RegExp(`>|${yn}(?:([^\\s"'>=/]+)(${yn}*=${yn}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),si=/'/g,ai=/"/g,li=/^(?:script|style|textarea|title)$/i,Bo=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),x=Bo(1),st=Symbol.for("lit-noChange"),T=Symbol.for("lit-nothing"),ui=new WeakMap,Dt=Ot.createTreeWalker(Ot,129);function di(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return ei!==void 0?ei.createHTML(t):t}const ci=(e,t)=>{const n=e.length-1,i=[];let o,r=t===2?"<svg>":"",s=ee;for(let a=0;a<n;a++){const l=e[a];let u,c,d=-1,p=0;for(;p<l.length&&(s.lastIndex=p,c=s.exec(l),c!==null);)p=s.lastIndex,s===ee?c[1]==="!--"?s=oi:c[1]!==void 0?s=ri:c[2]!==void 0?(li.test(c[2])&&(o=RegExp("</"+c[2],"g")),s=Rt):c[3]!==void 0&&(s=Rt):s===Rt?c[0]===">"?(s=o??ee,d=-1):c[1]===void 0?d=-2:(d=s.lastIndex-c[2].length,u=c[1],s=c[3]===void 0?Rt:c[3]==='"'?ai:si):s===ai||s===si?s=Rt:s===oi||s===ri?s=ee:(s=Rt,o=void 0);const f=s===Rt&&e[a+1].startsWith("/>")?" ":"";r+=s===ee?l+Ho:d>=0?(i.push(u),l.slice(0,d)+gn+l.slice(d)+gt+f):l+gt+(d===-2?a:f)}return[di(e,r+(e[n]||"<?>")+(t===2?"</svg>":"")),i]};class ne{constructor({strings:t,_$litType$:n},i){let o;this.parts=[];let r=0,s=0;const a=t.length-1,l=this.parts,[u,c]=ci(t,n);if(this.el=ne.createElement(u,i),Dt.currentNode=this.el.content,n===2){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(o=Dt.nextNode())!==null&&l.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(const d of o.getAttributeNames())if(d.endsWith(gn)){const p=c[s++],f=o.getAttribute(d).split(gt),g=/([.?@])?(.*)/.exec(p);l.push({type:1,index:r,name:g[2],strings:f,ctor:g[1]==="."?pi:g[1]==="?"?fi:g[1]==="@"?gi:ie}),o.removeAttribute(d)}else d.startsWith(gt)&&(l.push({type:6,index:r}),o.removeAttribute(d));if(li.test(o.tagName)){const d=o.textContent.split(gt),p=d.length-1;if(p>0){o.textContent=_e?_e.emptyScript:"";for(let f=0;f<p;f++)o.append(d[f],Qt()),Dt.nextNode(),l.push({type:2,index:++r});o.append(d[p],Qt())}}}else if(o.nodeType===8)if(o.data===mn)l.push({type:2,index:r});else{let d=-1;for(;(d=o.data.indexOf(gt,d+1))!==-1;)l.push({type:7,index:r}),d+=gt.length-1}r++}}static createElement(t,n){const i=Ot.createElement("template");return i.innerHTML=t,i}}function Nt(e,t,n=e,i){var s,a;if(t===st)return t;let o=i!==void 0?(s=n._$Co)==null?void 0:s[i]:n._$Cl;const r=te(t)?void 0:t._$litDirective$;return(o==null?void 0:o.constructor)!==r&&((a=o==null?void 0:o._$AO)==null||a.call(o,!1),r===void 0?o=void 0:(o=new r(e),o._$AT(e,n,i)),i!==void 0?(n._$Co??(n._$Co=[]))[i]=o:n._$Cl=o),o!==void 0&&(t=Nt(e,o._$AS(e,t.values),o,i)),t}class hi{constructor(t,n){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:n},parts:i}=this._$AD,o=((t==null?void 0:t.creationScope)??Ot).importNode(n,!0);Dt.currentNode=o;let r=Dt.nextNode(),s=0,a=0,l=i[0];for(;l!==void 0;){if(s===l.index){let u;l.type===2?u=new Ut(r,r.nextSibling,this,t):l.type===1?u=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(u=new mi(r,this,t)),this._$AV.push(u),l=i[++a]}s!==(l==null?void 0:l.index)&&(r=Dt.nextNode(),s++)}return Dt.currentNode=Ot,o}p(t){let n=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,n),n+=i.strings.length-2):i._$AI(t[n])),n++}}class Ut{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,n,i,o){this.type=2,this._$AH=T,this._$AN=void 0,this._$AA=t,this._$AB=n,this._$AM=i,this.options=o,this._$Cv=(o==null?void 0:o.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=n.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,n=this){t=Nt(this,t,n),te(t)?t===T||t==null||t===""?(this._$AH!==T&&this._$AR(),this._$AH=T):t!==this._$AH&&t!==st&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ii(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==T&&te(this._$AH)?this._$AA.nextSibling.data=t:this.T(Ot.createTextNode(t)),this._$AH=t}$(t){var r;const{values:n,_$litType$:i}=t,o=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=ne.createElement(di(i.h,i.h[0]),this.options)),i);if(((r=this._$AH)==null?void 0:r._$AD)===o)this._$AH.p(n);else{const s=new hi(o,this),a=s.u(this.options);s.p(n),this.T(a),this._$AH=s}}_$AC(t){let n=ui.get(t.strings);return n===void 0&&ui.set(t.strings,n=new ne(t)),n}k(t){ni(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let i,o=0;for(const r of t)o===n.length?n.push(i=new Ut(this.S(Qt()),this.S(Qt()),this,this.options)):i=n[o],i._$AI(r),o++;o<n.length&&(this._$AR(i&&i._$AB.nextSibling,o),n.length=o)}_$AR(t=this._$AA.nextSibling,n){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,n);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){var n;this._$AM===void 0&&(this._$Cv=t,(n=this._$AP)==null||n.call(this,t))}}class ie{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,n,i,o,r){this.type=1,this._$AH=T,this._$AN=void 0,this.element=t,this.name=n,this._$AM=o,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=T}_$AI(t,n=this,i,o){const r=this.strings;let s=!1;if(r===void 0)t=Nt(this,t,n,0),s=!te(t)||t!==this._$AH&&t!==st,s&&(this._$AH=t);else{const a=t;let l,u;for(t=r[0],l=0;l<r.length-1;l++)u=Nt(this,a[i+l],n,l),u===st&&(u=this._$AH[l]),s||(s=!te(u)||u!==this._$AH[l]),u===T?t=T:t!==T&&(t+=(u??"")+r[l+1]),this._$AH[l]=u}s&&!o&&this.j(t)}j(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class pi extends ie{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===T?void 0:t}}class fi extends ie{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==T)}}class gi extends ie{constructor(t,n,i,o,r){super(t,n,i,o,r),this.type=5}_$AI(t,n=this){if((t=Nt(this,t,n,0)??T)===st)return;const i=this._$AH,o=t===T&&i!==T||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==T&&(i===T||o);o&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var n;typeof this._$AH=="function"?this._$AH.call(((n=this.options)==null?void 0:n.host)??this.element,t):this._$AH.handleEvent(t)}}class mi{constructor(t,n,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Nt(this,t)}}const Vo={P:gn,A:gt,C:mn,M:1,L:ci,R:hi,D:ii,V:Nt,I:Ut,H:ie,N:fi,U:gi,B:pi,F:mi},bn=Kt.litHtmlPolyfillSupport;bn==null||bn(ne,Ut),(Kt.litHtmlVersions??(Kt.litHtmlVersions=[])).push("3.1.2");const Lo=(e,t,n)=>{const i=(n==null?void 0:n.renderBefore)??t;let o=i._$litPart$;if(o===void 0){const r=(n==null?void 0:n.renderBefore)??null;i._$litPart$=o=new Ut(t.insertBefore(Qt(),r),r,void 0,n??{})}return o._$AI(e),o};/**
13
+ */const hn=globalThis,Yn=hn.trustedTypes,Os=Yn?Yn.createPolicy("lit-html",{createHTML:n=>n}):void 0,rr="$lit$",qt=`lit$${(Math.random()+"").slice(9)}$`,sr="?"+qt,Vl=`<${sr}>`,be=document,dn=()=>be.createComment(""),fn=n=>n===null||typeof n!="object"&&typeof n!="function",Ls=Array.isArray,Ds=n=>Ls(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",or=`[
14
+ \f\r]`,gn=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ns=/-->/g,Us=/>/g,ve=RegExp(`>|${or}(?:([^\\s"'>=/]+)(${or}*=${or}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Fs=/'/g,Bs=/"/g,Xs=/^(?:script|style|textarea|title)$/i,jl=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),B=jl(1),Nt=Symbol.for("lit-noChange"),K=Symbol.for("lit-nothing"),Hs=new WeakMap,Te=be.createTreeWalker(be,129);function Gs(n,t){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Os!==void 0?Os.createHTML(t):t}const ks=(n,t)=>{const e=n.length-1,i=[];let r,s=t===2?"<svg>":"",o=gn;for(let a=0;a<e;a++){const l=n[a];let u,h,c=-1,d=0;for(;d<l.length&&(o.lastIndex=d,h=o.exec(l),h!==null);)d=o.lastIndex,o===gn?h[1]==="!--"?o=Ns:h[1]!==void 0?o=Us:h[2]!==void 0?(Xs.test(h[2])&&(r=RegExp("</"+h[2],"g")),o=ve):h[3]!==void 0&&(o=ve):o===ve?h[0]===">"?(o=r??gn,c=-1):h[1]===void 0?c=-2:(c=o.lastIndex-h[2].length,u=h[1],o=h[3]===void 0?ve:h[3]==='"'?Bs:Fs):o===Bs||o===Fs?o=ve:o===Ns||o===Us?o=gn:(o=ve,r=void 0);const f=o===ve&&n[a+1].startsWith("/>")?" ":"";s+=o===gn?l+Vl:c>=0?(i.push(u),l.slice(0,c)+rr+l.slice(c)+qt+f):l+qt+(c===-2?a:f)}return[Gs(n,s+(n[e]||"<?>")+(t===2?"</svg>":"")),i]};class pn{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let s=0,o=0;const a=t.length-1,l=this.parts,[u,h]=ks(t,e);if(this.el=pn.createElement(u,i),Te.currentNode=this.el.content,e===2){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(r=Te.nextNode())!==null&&l.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(const c of r.getAttributeNames())if(c.endsWith(rr)){const d=h[o++],f=r.getAttribute(c).split(qt),g=/([.?@])?(.*)/.exec(d);l.push({type:1,index:s,name:g[2],strings:f,ctor:g[1]==="."?js:g[1]==="?"?zs:g[1]==="@"?Ws:mn}),r.removeAttribute(c)}else c.startsWith(qt)&&(l.push({type:6,index:s}),r.removeAttribute(c));if(Xs.test(r.tagName)){const c=r.textContent.split(qt),d=c.length-1;if(d>0){r.textContent=Yn?Yn.emptyScript:"";for(let f=0;f<d;f++)r.append(c[f],dn()),Te.nextNode(),l.push({type:2,index:++s});r.append(c[d],dn())}}}else if(r.nodeType===8)if(r.data===sr)l.push({type:2,index:s});else{let c=-1;for(;(c=r.data.indexOf(qt,c+1))!==-1;)l.push({type:7,index:s}),c+=qt.length-1}s++}}static createElement(t,e){const i=be.createElement("template");return i.innerHTML=t,i}}function xe(n,t,e=n,i){var o,a;if(t===Nt)return t;let r=i!==void 0?(o=e._$Co)==null?void 0:o[i]:e._$Cl;const s=fn(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==s&&((a=r==null?void 0:r._$AO)==null||a.call(r,!1),s===void 0?r=void 0:(r=new s(n),r._$AT(n,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=r:e._$Cl=r),r!==void 0&&(t=xe(n,r._$AS(n,t.values),r,i)),t}class Vs{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,r=((t==null?void 0:t.creationScope)??be).importNode(e,!0);Te.currentNode=r;let s=Te.nextNode(),o=0,a=0,l=i[0];for(;l!==void 0;){if(o===l.index){let u;l.type===2?u=new Ne(s,s.nextSibling,this,t):l.type===1?u=new l.ctor(s,l.name,l.strings,this,t):l.type===6&&(u=new Ys(s,this,t)),this._$AV.push(u),l=i[++a]}o!==(l==null?void 0:l.index)&&(s=Te.nextNode(),o++)}return Te.currentNode=be,r}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Ne{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,i,r){this.type=2,this._$AH=K,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=(r==null?void 0:r.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=xe(this,t,e),fn(t)?t===K||t==null||t===""?(this._$AH!==K&&this._$AR(),this._$AH=K):t!==this._$AH&&t!==Nt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ds(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==K&&fn(this._$AH)?this._$AA.nextSibling.data=t:this.T(be.createTextNode(t)),this._$AH=t}$(t){var s;const{values:e,_$litType$:i}=t,r=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=pn.createElement(Gs(i.h,i.h[0]),this.options)),i);if(((s=this._$AH)==null?void 0:s._$AD)===r)this._$AH.p(e);else{const o=new Vs(r,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(t){let e=Hs.get(t.strings);return e===void 0&&Hs.set(t.strings,e=new pn(t)),e}k(t){Ls(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const s of t)r===e.length?e.push(i=new Ne(this.S(dn()),this.S(dn()),this,this.options)):i=e[r],i._$AI(s),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class mn{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,r,s){this.type=1,this._$AH=K,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=K}_$AI(t,e=this,i,r){const s=this.strings;let o=!1;if(s===void 0)t=xe(this,t,e,0),o=!fn(t)||t!==this._$AH&&t!==Nt,o&&(this._$AH=t);else{const a=t;let l,u;for(t=s[0],l=0;l<s.length-1;l++)u=xe(this,a[i+l],e,l),u===Nt&&(u=this._$AH[l]),o||(o=!fn(u)||u!==this._$AH[l]),u===K?t=K:t!==K&&(t+=(u??"")+s[l+1]),this._$AH[l]=u}o&&!r&&this.j(t)}j(t){t===K?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class js extends mn{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===K?void 0:t}}class zs extends mn{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==K)}}class Ws extends mn{constructor(t,e,i,r,s){super(t,e,i,r,s),this.type=5}_$AI(t,e=this){if((t=xe(this,t,e,0)??K)===Nt)return;const i=this._$AH,r=t===K&&i!==K||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,s=t!==K&&(i===K||r);r&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Ys{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){xe(this,t)}}const zl={P:rr,A:qt,C:sr,M:1,L:ks,R:Vs,D:Ds,V:xe,I:Ne,H:mn,N:zs,U:Ws,B:js,F:Ys},ar=hn.litHtmlPolyfillSupport;ar==null||ar(pn,Ne),(hn.litHtmlVersions??(hn.litHtmlVersions=[])).push("3.1.2");const Wl=(n,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let r=i._$litPart$;if(r===void 0){const s=(e==null?void 0:e.renderBefore)??null;i._$litPart$=r=new Ne(t.insertBefore(dn(),s),s,void 0,e??{})}return r._$AI(n),r};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
19
- */let et=class extends kt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var n;const t=super.createRenderRoot();return(n=this.renderOptions).renderBefore??(n.renderBefore=t.firstChild),t}update(t){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Lo(n,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return st}};et._$litElement$=!0,et.finalized=!0,(go=globalThis.litElementHydrateSupport)==null||go.call(globalThis,{LitElement:et});const vn=globalThis.litElementPolyfillSupport;vn==null||vn({LitElement:et}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.4");/**
19
+ */let Mt=class extends De{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Wl(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return Nt}};Mt._$litElement$=!0,Mt.finalized=!0,(xl=globalThis.litElementHydrateSupport)==null||xl.call(globalThis,{LitElement:Mt});const lr=globalThis.litElementPolyfillSupport;lr==null||lr({LitElement:Mt}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.4");/**
20
20
  * @license
21
21
  * Copyright 2021 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
23
- */function at(e,t,n){return e?t(e):n==null?void 0:n(e)}/**
23
+ */function Ut(n,t,e){return n?t(n):e==null?void 0:e(n)}/**
24
24
  * @license
25
25
  * Copyright 2017 Google LLC
26
26
  * SPDX-License-Identifier: BSD-3-Clause
27
- */const St={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},wn=e=>(...t)=>({_$litDirective$:e,values:t});class En{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,n,i){this._$Ct=t,this._$AM=n,this._$Ci=i}_$AS(t,n){return this.update(t,n)}update(t,n){return this.render(...n)}}/**
27
+ */const le={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ur=n=>(...t)=>({_$litDirective$:n,values:t});class cr{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
28
28
  * @license
29
29
  * Copyright 2020 Google LLC
30
30
  * SPDX-License-Identifier: BSD-3-Clause
31
- */const{I:ko}=Vo,Uo=e=>e.strings===void 0,yi=()=>document.createComment(""),oe=(e,t,n)=>{var r;const i=e._$AA.parentNode,o=t===void 0?e._$AB:t._$AA;if(n===void 0){const s=i.insertBefore(yi(),o),a=i.insertBefore(yi(),o);n=new ko(s,a,e,e.options)}else{const s=n._$AB.nextSibling,a=n._$AM,l=a!==e;if(l){let u;(r=n._$AQ)==null||r.call(n,e),n._$AM=e,n._$AP!==void 0&&(u=e._$AU)!==a._$AU&&n._$AP(u)}if(s!==o||l){let u=n._$AA;for(;u!==s;){const c=u.nextSibling;i.insertBefore(u,o),u=c}}}return n},Mt=(e,t,n=e)=>(e._$AI(t,n),e),Fo={},bi=(e,t=Fo)=>e._$AH=t,jo=e=>e._$AH,xn=e=>{var i;(i=e._$AP)==null||i.call(e,!1,!0);let t=e._$AA;const n=e._$AB.nextSibling;for(;t!==n;){const o=t.nextSibling;t.remove(),t=o}};/**
31
+ */const{I:Yl}=zl,Zl=n=>n.strings===void 0,Zs=()=>document.createComment(""),_n=(n,t,e)=>{var s;const i=n._$AA.parentNode,r=t===void 0?n._$AB:t._$AA;if(e===void 0){const o=i.insertBefore(Zs(),r),a=i.insertBefore(Zs(),r);e=new Yl(o,a,n,n.options)}else{const o=e._$AB.nextSibling,a=e._$AM,l=a!==n;if(l){let u;(s=e._$AQ)==null||s.call(e,n),e._$AM=n,e._$AP!==void 0&&(u=n._$AU)!==a._$AU&&e._$AP(u)}if(o!==r||l){let u=e._$AA;for(;u!==o;){const h=u.nextSibling;i.insertBefore(u,r),u=h}}}return e},Re=(n,t,e=n)=>(n._$AI(t,e),n),Kl={},Ks=(n,t=Kl)=>n._$AH=t,ql=n=>n._$AH,hr=n=>{var i;(i=n._$AP)==null||i.call(n,!1,!0);let t=n._$AA;const e=n._$AB.nextSibling;for(;t!==e;){const r=t.nextSibling;t.remove(),t=r}};/**
32
32
  * @license
33
33
  * Copyright 2017 Google LLC
34
34
  * SPDX-License-Identifier: BSD-3-Clause
35
- */const vi=(e,t,n)=>{const i=new Map;for(let o=t;o<=n;o++)i.set(e[o],o);return i},zo=wn(class extends En{constructor(e){if(super(e),e.type!==St.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,n){let i;n===void 0?n=t:t!==void 0&&(i=t);const o=[],r=[];let s=0;for(const a of e)o[s]=i?i(a,s):s,r[s]=n(a,s),s++;return{values:r,keys:o}}render(e,t,n){return this.dt(e,t,n).values}update(e,[t,n,i]){const o=jo(e),{values:r,keys:s}=this.dt(t,n,i);if(!Array.isArray(o))return this.ut=s,r;const a=this.ut??(this.ut=[]),l=[];let u,c,d=0,p=o.length-1,f=0,g=r.length-1;for(;d<=p&&f<=g;)if(o[d]===null)d++;else if(o[p]===null)p--;else if(a[d]===s[f])l[f]=Mt(o[d],r[f]),d++,f++;else if(a[p]===s[g])l[g]=Mt(o[p],r[g]),p--,g--;else if(a[d]===s[g])l[g]=Mt(o[d],r[g]),oe(e,l[g+1],o[d]),d++,g--;else if(a[p]===s[f])l[f]=Mt(o[p],r[f]),oe(e,o[d],o[p]),p--,f++;else if(u===void 0&&(u=vi(s,f,g),c=vi(a,d,p)),u.has(a[d]))if(u.has(a[p])){const y=c.get(s[f]),D=y!==void 0?o[y]:null;if(D===null){const X=oe(e,o[d]);Mt(X,r[f]),l[f]=X}else l[f]=Mt(D,r[f]),oe(e,o[d],D),o[y]=null;f++}else xn(o[p]),p--;else xn(o[d]),d++;for(;f<=g;){const y=oe(e,l[g+1]);Mt(y,r[f]),l[f++]=y}for(;d<=p;){const y=o[d++];y!==null&&xn(y)}return this.ut=s,bi(e,l),st}});/**
35
+ */const qs=(n,t,e)=>{const i=new Map;for(let r=t;r<=e;r++)i.set(n[r],r);return i},Jl=ur(class extends cr{constructor(n){if(super(n),n.type!==le.CHILD)throw Error("repeat() can only be used in text expressions")}dt(n,t,e){let i;e===void 0?e=t:t!==void 0&&(i=t);const r=[],s=[];let o=0;for(const a of n)r[o]=i?i(a,o):o,s[o]=e(a,o),o++;return{values:s,keys:r}}render(n,t,e){return this.dt(n,t,e).values}update(n,[t,e,i]){const r=ql(n),{values:s,keys:o}=this.dt(t,e,i);if(!Array.isArray(r))return this.ut=o,s;const a=this.ut??(this.ut=[]),l=[];let u,h,c=0,d=r.length-1,f=0,g=s.length-1;for(;c<=d&&f<=g;)if(r[c]===null)c++;else if(r[d]===null)d--;else if(a[c]===o[f])l[f]=Re(r[c],s[f]),c++,f++;else if(a[d]===o[g])l[g]=Re(r[d],s[g]),d--,g--;else if(a[c]===o[g])l[g]=Re(r[c],s[g]),_n(n,l[g+1],r[c]),c++,g--;else if(a[d]===o[f])l[f]=Re(r[d],s[f]),_n(n,r[c],r[d]),d--,f++;else if(u===void 0&&(u=qs(o,f,g),h=qs(a,c,d)),u.has(a[c]))if(u.has(a[d])){const p=h.get(o[f]),m=p!==void 0?r[p]:null;if(m===null){const y=_n(n,r[c]);Re(y,s[f]),l[f]=y}else l[f]=Re(m,s[f]),_n(n,r[c],m),r[p]=null;f++}else hr(r[d]),d--;else hr(r[c]),c++;for(;f<=g;){const p=_n(n,l[g+1]);Re(p,s[f]),l[f++]=p}for(;c<=d;){const p=r[c++];p!==null&&hr(p)}return this.ut=o,Ks(n,l),Nt}});/**
36
36
  * wms-capabilities @0.6.0
37
37
  * @description WMS service Capabilities > JSON, based on openlayers
38
38
  * @license BSD-2-Clause
39
39
  * @preserve
40
- */var E=e=>e!==void 0,wi=(e,t,n)=>t in e?e[t]:e[t]=n;const re={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12};class Zo{constructor(t){this._parser=new t}toDocument(t){return this._parser.parseFromString(t,"application/xml")}getAllTextContent(t,n){return Ae(t,n).join("")}}function Ae(e,t){return Ei(e,t,[]).join("")}function Ei(e,t,n){if(e.nodeType===re.CDATA_SECTION||e.nodeType===re.TEXT)t?n.push(String(e.nodeValue).replace(/(\r\n|\r|\n)/g,"")):n.push(e.nodeValue);else{var i;for(i=e.firstChild;i;i=i.nextSibling)Ei(i,t,n)}return n}function Xo(e,t,n,i){for(var o=Yo(t);o;o=qo(o)){var r=o.namespaceURI||null,s=e[r];if(E(s)){var a=s[o.localName];E(a)&&a.call(i,o,n)}}}function Yo(e){let t=e.firstElementChild||e.firstChild;for(;t&&t.nodeType!==re.ELEMENT;)t=t.nextSibling;return t}function qo(e){let t=e.nextElementSibling||e.nextSibling;for(;t&&t.nodeType!==re.ELEMENT;)t=t.nextSibling;return t}function F(e,t,n){return Wo(e,t,n)}function Wo(e,t,n){var i=E(n)?n:{},o,r;for(o=0,r=e.length;o<r;++o)i[e[o]]=t;return i}function xi(e,t){return function(n,i){var o=e.call(E(t)?t:this,n,i);if(E(o)){var r=i[i.length-1];r.push(o)}}}function k(e,t,n,i,o){return i.push(e),Xo(t,n,i,o),i.pop()}function m(e,t,n){return function(i,o){let r=e.call(E(n)?n:this,i,o);if(E(r)){var s=o[o.length-1],a=E(t)?t:i.localName;s[a]=r}}}function Q(e,t,n){return function(i,o){var r=e.call(E(n)?n:this,i,o);if(E(r)){var s=o[o.length-1],a=E(t)?t:i.localName,l=wi(s,a,[]);l.push(r)}}}const Go=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function Jo(e){return e.replace(Go,"")}function It(e){const t=/^\s*(true|1)|(false|0)\s*$/.exec(e);if(t)return E(t[1])||!1}function Ft(e){return mt(Ae(e,!1))}function mt(e){const t=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(e);if(t)return parseFloat(t[1])}function Sn(e){return Ce(Ae(e,!1))}function Ce(e){const t=/^\s*(\d+)\s*$/.exec(e);if(t)return parseInt(t[1],10)}function $(e){return Jo(Ae(e,!1))}const Ko="http://www.w3.org/1999/xlink";function $n(e){return e.getAttributeNS(Ko,"href")}function Qo(e,t){return k({},Ar,e,t)}function Si(e){return[mt(e.getAttribute("minx")),mt(e.getAttribute("miny")),mt(e.getAttribute("maxx")),mt(e.getAttribute("maxy"))]}function tr(e,t){const n=Si(e),i=[mt(e.getAttribute("resx")),mt(e.getAttribute("resy"))];return{crs:e.getAttribute("CRS")||e.getAttribute("SRS"),extent:n,res:i}}function er(e,t){const n=Si(e);if(!(!E(n[0])||!E(n[1])||!E(n[2])||!E(n[3])))return n}function nr(e,t){const n=parseFloat(e.getAttribute("min")),i=parseFloat(e.getAttribute("max"));return{min:n,max:i}}function ir(e,t){const n=k({},Cr,e,t);if(!E(n))return;const i=n.westBoundLongitude,o=n.southBoundLatitude,r=n.eastBoundLongitude,s=n.northBoundLatitude;if(!(!E(i)||!E(o)||!E(r)||!E(s)))return[i,o,r,s]}function or(e,t){return k({},wr,e,t)}function rr(e,t){return k({},Er,e,t)}function sr(e,t){return k({},xr,e,t)}function ar(e,t){return k({},Sr,e,t)}function lr(e,t){return k({},$r,e,t)}function ur(e,t){return k([],_r,e,t)}function dr(e,t){const n=It(e.getAttribute("queryable"));return k({queryable:E(n)?n:!1},Ai,e,t)}function cr(e,t){var n=t[t.length-1];const i=k({},Ai,e,t);if(!E(i))return;let o=It(e.getAttribute("queryable"));E(o)||(o=n.queryable),i.queryable=E(o)?o:!1;let r=Ce(e.getAttribute("cascaded"));E(r)||(r=n.cascaded),i.cascaded=r;let s=It(e.getAttribute("opaque"));E(s)||(s=n.opaque),i.opaque=E(s)?s:!1;let a=It(e.getAttribute("noSubsets"));E(a)||(a=n.noSubsets),i.noSubsets=E(a)?a:!1;let l=mt(e.getAttribute("fixedWidth"));E(l)||(l=n.fixedWidth),i.fixedWidth=l;let u=mt(e.getAttribute("fixedHeight"));E(u)||(u=n.fixedHeight),i.fixedHeight=u;const c=["Style","CRS","AuthorityURL"];for(let p=0,f=c.length;p<f;p++){const g=c[p],y=n[g];if(E(y)){let D=wi(i,g,[]);D=D.concat(y),i[g]=D}}const d=["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"];for(let p=0,f=d.length;p<f;p++){const g=d[p],y=i[g];if(!E(y)){const D=n[g];i[g]=D}}return i}function hr(e,t){return{name:e.getAttribute("name"),units:e.getAttribute("units"),unitSymbol:e.getAttribute("unitSymbol"),default:e.getAttribute("default"),multipleValues:It(e.getAttribute("multipleValues")),nearestValue:It(e.getAttribute("nearestValue")),current:It(e.getAttribute("current")),values:$(e)}}function yt(e,t){return k({},Nr,e,t)}function pr(e,t){return k({},Tr,e,t)}function fr(e,t){return k({},Or,e,t)}function gr(e,t){return k({},Rr,e,t)}function _n(e,t){return k({},Pr,e,t)}function $i(e,t){var n=yt(e,t);if(E(n)){const i=[Ce(e.getAttribute("width")),Ce(e.getAttribute("height"))];return n.size=i,n}}function mr(e,t){var n=yt(e,t);if(E(n))return n.name=e.getAttribute("name"),n}function yr(e,t){var n=yt(e,t);if(E(n))return n.type=e.getAttribute("type"),n}function br(e,t){return k({},Dr,e,t)}function _i(e,t){return k([],Mr,e,t)}const j=[null,"http://www.opengis.net/wms"],vr=F(j,{Service:m(rr),Capability:m(or)}),wr=F(j,{Request:m(pr),Exception:m(ur),Layer:m(dr)}),Er=F(j,{Name:m($),Title:m($),Abstract:m($),KeywordList:m(_i),OnlineResource:m($n),ContactInformation:m(sr),Fees:m($),AccessConstraints:m($),LayerLimit:m(Sn),MaxWidth:m(Sn),MaxHeight:m(Sn)}),xr=F(j,{ContactPersonPrimary:m(ar),ContactPosition:m($),ContactAddress:m(lr),ContactVoiceTelephone:m($),ContactFacsimileTelephone:m($),ContactElectronicMailAddress:m($)}),Sr=F(j,{ContactPerson:m($),ContactOrganization:m($)}),$r=F(j,{AddressType:m($),Address:m($),City:m($),StateOrProvince:m($),PostCode:m($),Country:m($)}),_r=F(j,{Format:xi($)}),Ai=F(j,{Name:m($),Title:m($),Abstract:m($),KeywordList:m(_i),CRS:Q($),SRS:Q($),EX_GeographicBoundingBox:m(ir),LatLonBoundingBox:m(er),BoundingBox:Q(tr),Dimension:Q(hr),Attribution:m(Qo),AuthorityURL:Q(mr),Identifier:Q($),MetadataURL:Q(yr),DataURL:Q(yt),FeatureListURL:Q(yt),Style:Q(br),MinScaleDenominator:m(Ft),MaxScaleDenominator:m(Ft),ScaleHint:m(nr),Layer:Q(cr)}),Ar=F(j,{Title:m($),OnlineResource:m($n),LogoURL:m($i)}),Cr=F(j,{westBoundLongitude:m(Ft),eastBoundLongitude:m(Ft),southBoundLatitude:m(Ft),northBoundLatitude:m(Ft)}),Tr=F(j,{GetCapabilities:m(_n),GetMap:m(_n),GetFeatureInfo:m(_n)}),Pr=F(j,{Format:Q($),DCPType:Q(fr)}),Or=F(j,{HTTP:m(gr)}),Rr=F(j,{Get:m(yt),Post:m(yt)}),Dr=F(j,{Name:m($),Title:m($),Abstract:m($),LegendURL:Q($i),StyleSheetURL:m(yt),StyleURL:m(yt)}),Nr=F(j,{Format:m($),OnlineResource:m($n)}),Mr=F(j,{Keyword:xi($)});class Ir{constructor(t,n){!n&&typeof window<"u"&&(n=window.DOMParser),this.version=void 0,this._parser=new Zo(n),this._data=t}data(t){return this._data=t,this}toJSON(t){return t=t||this._data,this.parse(t)}parse(t){return this.readFromDocument(this._parser.toDocument(t))}readFromDocument(t){for(let n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==re.ELEMENT)return this.readFromNode(n);return null}readFromNode(t){return this.version=t.getAttribute("version"),k({version:this.version},vr,t,[])||null}}async function Hr(e){let t=new URL(e),n=t.searchParams;n.set("SERVICE","WMS"),n.set("REQUEST","GetCapabilities");let i=t.toString();const o=await fetch(i);if(o.ok){const r=await o.text();return new Ir(r).toJSON()}else throw new Error(`Error: ${o.status}`)}function An(e){const t=/\b(?:wms|ows)\b/i,n=/{(?:z|x|y-?)}\/{(?:z|x|y-?)}\/{(?:z|x|y-?)}/i;return t.test(e)?"TileWMS":n.test(e)?"XYZ":!1}function Br(e){const n=/^(?:(?:https?|ftp):\/\/|\/\/)?(?:localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|(?:\w+[\w-]*\.)+\w+)(?::\d+)?(?:\/\S*)?$/.test(e),i=An(e);return!!(e&&n&&i)}function Ci(e){return e.replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,'"$2": ').replace(/,\s*}/g,"}").replace(/,\s*]/g,"]").replace(/\s*(\{|}|\[|\]|,)\s*/g,"$1").replaceAll('": //',"://")}function Vr(e){try{return JSON.parse(Ci(e)),!!e}catch{return!1}}function Lr(e,t){const n=new URL(e).searchParams;Object.entries(t).forEach(([s,a])=>{typeof a=="object"&&!Array.isArray(a)&&a!==null?Object.keys(a).forEach(l=>{n.set(l,a[l])}):n.set(s,a)});const i=e.split("?")[0],o=n.toString();return`${i}?${o}`}/**!
40
+ */var U=n=>n!==void 0,Js=(n,t,e)=>t in n?n[t]:n[t]=e;const yn={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12};class Ql{constructor(t){this._parser=new t}toDocument(t){return this._parser.parseFromString(t,"application/xml")}getAllTextContent(t,e){return Zn(t,e).join("")}}function Zn(n,t){return Qs(n,t,[]).join("")}function Qs(n,t,e){if(n.nodeType===yn.CDATA_SECTION||n.nodeType===yn.TEXT)t?e.push(String(n.nodeValue).replace(/(\r\n|\r|\n)/g,"")):e.push(n.nodeValue);else{var i;for(i=n.firstChild;i;i=i.nextSibling)Qs(i,t,e)}return e}function tu(n,t,e,i){for(var r=eu(t);r;r=nu(r)){var s=r.namespaceURI||null,o=n[s];if(U(o)){var a=o[r.localName];U(a)&&a.call(i,r,e)}}}function eu(n){let t=n.firstElementChild||n.firstChild;for(;t&&t.nodeType!==yn.ELEMENT;)t=t.nextSibling;return t}function nu(n){let t=n.nextElementSibling||n.nextSibling;for(;t&&t.nodeType!==yn.ELEMENT;)t=t.nextSibling;return t}function pt(n,t,e){return iu(n,t,e)}function iu(n,t,e){var i=U(e)?e:{},r,s;for(r=0,s=n.length;r<s;++r)i[n[r]]=t;return i}function to(n,t){return function(e,i){var r=n.call(U(t)?t:this,e,i);if(U(r)){var s=i[i.length-1];s.push(r)}}}function dt(n,t,e,i,r){return i.push(n),tu(t,e,i,r),i.pop()}function S(n,t,e){return function(i,r){let s=n.call(U(e)?e:this,i,r);if(U(s)){var o=r[r.length-1],a=U(t)?t:i.localName;o[a]=s}}}function St(n,t,e){return function(i,r){var s=n.call(U(e)?e:this,i,r);if(U(s)){var o=r[r.length-1],a=U(t)?t:i.localName,l=Js(o,a,[]);l.push(s)}}}const ru=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function su(n){return n.replace(ru,"")}function we(n){const t=/^\s*(true|1)|(false|0)\s*$/.exec(n);if(t)return U(t[1])||!1}function Ue(n){return Jt(Zn(n,!1))}function Jt(n){const t=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(n);if(t)return parseFloat(t[1])}function dr(n){return Kn(Zn(n,!1))}function Kn(n){const t=/^\s*(\d+)\s*$/.exec(n);if(t)return parseInt(t[1],10)}function G(n){return su(Zn(n,!1))}const ou="http://www.w3.org/1999/xlink";function fr(n){return n.getAttributeNS(ou,"href")}function au(n,t){return dt({},Lu,n,t)}function eo(n){return[Jt(n.getAttribute("minx")),Jt(n.getAttribute("miny")),Jt(n.getAttribute("maxx")),Jt(n.getAttribute("maxy"))]}function lu(n,t){const e=eo(n),i=[Jt(n.getAttribute("resx")),Jt(n.getAttribute("resy"))];return{crs:n.getAttribute("CRS")||n.getAttribute("SRS"),extent:e,res:i}}function uu(n,t){const e=eo(n);if(!(!U(e[0])||!U(e[1])||!U(e[2])||!U(e[3])))return e}function cu(n,t){const e=parseFloat(n.getAttribute("min")),i=parseFloat(n.getAttribute("max"));return{min:e,max:i}}function hu(n,t){const e=dt({},Du,n,t);if(!U(e))return;const i=e.westBoundLongitude,r=e.southBoundLatitude,s=e.eastBoundLongitude,o=e.northBoundLatitude;if(!(!U(i)||!U(r)||!U(s)||!U(o)))return[i,r,s,o]}function du(n,t){return dt({},Au,n,t)}function fu(n,t){return dt({},Iu,n,t)}function gu(n,t){return dt({},$u,n,t)}function pu(n,t){return dt({},Pu,n,t)}function mu(n,t){return dt({},Mu,n,t)}function _u(n,t){return dt([],Ou,n,t)}function yu(n,t){const e=we(n.getAttribute("queryable"));return dt({queryable:U(e)?e:!1},ro,n,t)}function Eu(n,t){var e=t[t.length-1];const i=dt({},ro,n,t);if(!U(i))return;let r=we(n.getAttribute("queryable"));U(r)||(r=e.queryable),i.queryable=U(r)?r:!1;let s=Kn(n.getAttribute("cascaded"));U(s)||(s=e.cascaded),i.cascaded=s;let o=we(n.getAttribute("opaque"));U(o)||(o=e.opaque),i.opaque=U(o)?o:!1;let a=we(n.getAttribute("noSubsets"));U(a)||(a=e.noSubsets),i.noSubsets=U(a)?a:!1;let l=Jt(n.getAttribute("fixedWidth"));U(l)||(l=e.fixedWidth),i.fixedWidth=l;let u=Jt(n.getAttribute("fixedHeight"));U(u)||(u=e.fixedHeight),i.fixedHeight=u;const h=["Style","CRS","AuthorityURL"];for(let d=0,f=h.length;d<f;d++){const g=h[d],p=e[g];if(U(p)){let m=Js(i,g,[]);m=m.concat(p),i[g]=m}}const c=["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"];for(let d=0,f=c.length;d<f;d++){const g=c[d],p=i[g];if(!U(p)){const m=e[g];i[g]=m}}return i}function bu(n,t){return{name:n.getAttribute("name"),units:n.getAttribute("units"),unitSymbol:n.getAttribute("unitSymbol"),default:n.getAttribute("default"),multipleValues:we(n.getAttribute("multipleValues")),nearestValue:we(n.getAttribute("nearestValue")),current:we(n.getAttribute("current")),values:G(n)}}function Qt(n,t){return dt({},Hu,n,t)}function vu(n,t){return dt({},Nu,n,t)}function Tu(n,t){return dt({},Fu,n,t)}function xu(n,t){return dt({},Bu,n,t)}function gr(n,t){return dt({},Uu,n,t)}function no(n,t){var e=Qt(n,t);if(U(e)){const i=[Kn(n.getAttribute("width")),Kn(n.getAttribute("height"))];return e.size=i,e}}function Ru(n,t){var e=Qt(n,t);if(U(e))return e.name=n.getAttribute("name"),e}function wu(n,t){var e=Qt(n,t);if(U(e))return e.type=n.getAttribute("type"),e}function Cu(n,t){return dt({},Xu,n,t)}function io(n,t){return dt([],Gu,n,t)}const mt=[null,"http://www.opengis.net/wms"],Su=pt(mt,{Service:S(fu),Capability:S(du)}),Au=pt(mt,{Request:S(vu),Exception:S(_u),Layer:S(yu)}),Iu=pt(mt,{Name:S(G),Title:S(G),Abstract:S(G),KeywordList:S(io),OnlineResource:S(fr),ContactInformation:S(gu),Fees:S(G),AccessConstraints:S(G),LayerLimit:S(dr),MaxWidth:S(dr),MaxHeight:S(dr)}),$u=pt(mt,{ContactPersonPrimary:S(pu),ContactPosition:S(G),ContactAddress:S(mu),ContactVoiceTelephone:S(G),ContactFacsimileTelephone:S(G),ContactElectronicMailAddress:S(G)}),Pu=pt(mt,{ContactPerson:S(G),ContactOrganization:S(G)}),Mu=pt(mt,{AddressType:S(G),Address:S(G),City:S(G),StateOrProvince:S(G),PostCode:S(G),Country:S(G)}),Ou=pt(mt,{Format:to(G)}),ro=pt(mt,{Name:S(G),Title:S(G),Abstract:S(G),KeywordList:S(io),CRS:St(G),SRS:St(G),EX_GeographicBoundingBox:S(hu),LatLonBoundingBox:S(uu),BoundingBox:St(lu),Dimension:St(bu),Attribution:S(au),AuthorityURL:St(Ru),Identifier:St(G),MetadataURL:St(wu),DataURL:St(Qt),FeatureListURL:St(Qt),Style:St(Cu),MinScaleDenominator:S(Ue),MaxScaleDenominator:S(Ue),ScaleHint:S(cu),Layer:St(Eu)}),Lu=pt(mt,{Title:S(G),OnlineResource:S(fr),LogoURL:S(no)}),Du=pt(mt,{westBoundLongitude:S(Ue),eastBoundLongitude:S(Ue),southBoundLatitude:S(Ue),northBoundLatitude:S(Ue)}),Nu=pt(mt,{GetCapabilities:S(gr),GetMap:S(gr),GetFeatureInfo:S(gr)}),Uu=pt(mt,{Format:St(G),DCPType:St(Tu)}),Fu=pt(mt,{HTTP:S(xu)}),Bu=pt(mt,{Get:S(Qt),Post:S(Qt)}),Xu=pt(mt,{Name:S(G),Title:S(G),Abstract:S(G),LegendURL:St(no),StyleSheetURL:S(Qt),StyleURL:S(Qt)}),Hu=pt(mt,{Format:S(G),OnlineResource:S(fr)}),Gu=pt(mt,{Keyword:to(G)});class ku{constructor(t,e){!e&&typeof window<"u"&&(e=window.DOMParser),this.version=void 0,this._parser=new Ql(e),this._data=t}data(t){return this._data=t,this}toJSON(t){return t=t||this._data,this.parse(t)}parse(t){return this.readFromDocument(this._parser.toDocument(t))}readFromDocument(t){for(let e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==yn.ELEMENT)return this.readFromNode(e);return null}readFromNode(t){return this.version=t.getAttribute("version"),dt({version:this.version},Su,t,[])||null}}async function Vu(n){let t=new URL(n),e=t.searchParams;e.set("SERVICE","WMS"),e.set("REQUEST","GetCapabilities");let i=t.toString();const r=await fetch(i);if(r.ok){const s=await r.text();return new ku(s).toJSON()}else throw new Error(`Error: ${r.status}`)}function pr(n){const t=/\b(?:wms|ows)\b/i,e=/{(?:z|x|y-?)}\/{(?:z|x|y-?)}\/{(?:z|x|y-?)}/i;return t.test(n)?"TileWMS":e.test(n)?"XYZ":!1}function ju(n){const e=/^(?:(?:https?|ftp):\/\/|\/\/)?(?:localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|(?:\w+[\w-]*\.)+\w+)(?::\d+)?(?:\/\S*)?$/.test(n),i=pr(n);return!!(n&&e&&i)}function so(n){return n.replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,'"$2": ').replace(/,\s*}/g,"}").replace(/,\s*]/g,"]").replace(/\s*(\{|}|\[|\]|,)\s*/g,"$1").replaceAll('": //',"://")}function zu(n){try{return JSON.parse(so(n)),!!n}catch{return!1}}function Wu(n,t){const e=new URL(n).searchParams;Object.entries(t).forEach(([o,a])=>{typeof a=="object"&&!Array.isArray(a)&&a!==null?Object.keys(a).forEach(l=>{e.set(l,a[l])}):e.set(o,a)});const i=n.split("?")[0],r=e.toString();return`${i}?${r}`}/**!
41
41
  * Sortable 1.15.2
42
42
  * @author RubaXa <trash@rubaxa.org>
43
43
  * @author owenm <owen23355@gmail.com>
44
44
  * @license MIT
45
- */function Ti(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ti(Object(n),!0).forEach(function(i){kr(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ti(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Te(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Te=function(t){return typeof t}:Te=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Te(e)}function kr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bt(){return bt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},bt.apply(this,arguments)}function Ur(e,t){if(e==null)return{};var n={},i=Object.keys(e),o,r;for(r=0;r<i.length;r++)o=i[r],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Fr(e,t){if(e==null)return{};var n=Ur(e,t),i,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var jr="1.15.2";function vt(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var wt=vt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),se=vt(/Edge/i),Pi=vt(/firefox/i),ae=vt(/safari/i)&&!vt(/chrome/i)&&!vt(/android/i),Oi=vt(/iP(ad|od|hone)/i),Ri=vt(/chrome/i)&&vt(/android/i),Di={capture:!1,passive:!1};function A(e,t,n){e.addEventListener(t,n,!wt&&Di)}function S(e,t,n){e.removeEventListener(t,n,!wt&&Di)}function Pe(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function zr(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function ut(e,t,n,i){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&Pe(e,t):Pe(e,t))||i&&e===n)return e;if(e===n)break}while(e=zr(e))}return null}var Ni=/\s+/g;function nt(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(Ni," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(Ni," ")}}function b(e,t,n){var i=e&&e.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=n+(typeof n=="string"?"":"px")}}function jt(e,t){var n="";if(typeof e=="string")n=e;else do{var i=b(e,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function Mi(e,t,n){if(e){var i=e.getElementsByTagName(t),o=0,r=i.length;if(n)for(;o<r;o++)n(i[o],o);return i}return[]}function ft(){var e=document.scrollingElement;return e||document.documentElement}function B(e,t,n,i,o){if(!(!e.getBoundingClientRect&&e!==window)){var r,s,a,l,u,c,d;if(e!==window&&e.parentNode&&e!==ft()?(r=e.getBoundingClientRect(),s=r.top,a=r.left,l=r.bottom,u=r.right,c=r.height,d=r.width):(s=0,a=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!wt))do if(o&&o.getBoundingClientRect&&(b(o,"transform")!=="none"||n&&b(o,"position")!=="static")){var p=o.getBoundingClientRect();s-=p.top+parseInt(b(o,"border-top-width")),a-=p.left+parseInt(b(o,"border-left-width")),l=s+r.height,u=a+r.width;break}while(o=o.parentNode);if(i&&e!==window){var f=jt(o||e),g=f&&f.a,y=f&&f.d;f&&(s/=y,a/=g,d/=g,c/=y,l=s+c,u=a+d)}return{top:s,left:a,bottom:l,right:u,width:d,height:c}}}function Ii(e,t,n){for(var i=$t(e,!0),o=B(e)[t];i;){var r=B(i)[n],s=void 0;if(n==="top"||n==="left"?s=o>=r:s=o<=r,!s)return i;if(i===ft())break;i=$t(i,!1)}return!1}function zt(e,t,n,i){for(var o=0,r=0,s=e.children;r<s.length;){if(s[r].style.display!=="none"&&s[r]!==v.ghost&&(i||s[r]!==v.dragged)&&ut(s[r],n.draggable,e,!1)){if(o===t)return s[r];o++}r++}return null}function Cn(e,t){for(var n=e.lastElementChild;n&&(n===v.ghost||b(n,"display")==="none"||t&&!Pe(n,t));)n=n.previousElementSibling;return n||null}function lt(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==v.clone&&(!t||Pe(e,t))&&n++;return n}function Hi(e){var t=0,n=0,i=ft();if(e)do{var o=jt(e),r=o.a,s=o.d;t+=e.scrollLeft*r,n+=e.scrollTop*s}while(e!==i&&(e=e.parentNode));return[t,n]}function Zr(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n)}return-1}function $t(e,t){if(!e||!e.getBoundingClientRect)return ft();var n=e,i=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=b(n);if(n.clientWidth<n.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return ft();if(i||t)return n;i=!0}}while(n=n.parentNode);return ft()}function Xr(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function Tn(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var le;function Bi(e,t){return function(){if(!le){var n=arguments,i=this;n.length===1?e.call(i,n[0]):e.apply(i,n),le=setTimeout(function(){le=void 0},t)}}}function Yr(){clearTimeout(le),le=void 0}function Vi(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function Li(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function ki(e,t,n){var i={};return Array.from(e.children).forEach(function(o){var r,s,a,l;if(!(!ut(o,t.draggable,e,!1)||o.animated||o===n)){var u=B(o);i.left=Math.min((r=i.left)!==null&&r!==void 0?r:1/0,u.left),i.top=Math.min((s=i.top)!==null&&s!==void 0?s:1/0,u.top),i.right=Math.max((a=i.right)!==null&&a!==void 0?a:-1/0,u.right),i.bottom=Math.max((l=i.bottom)!==null&&l!==void 0?l:-1/0,u.bottom)}}),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var it="Sortable"+new Date().getTime();function qr(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(o){if(!(b(o,"display")==="none"||o===v.ghost)){e.push({target:o,rect:B(o)});var r=pt({},e[e.length-1].rect);if(o.thisAnimationDuration){var s=jt(o,!0);s&&(r.top-=s.f,r.left-=s.e)}o.fromRect=r}})}},addAnimationState:function(i){e.push(i)},removeAnimationState:function(i){e.splice(Zr(e,{target:i}),1)},animateAll:function(i){var o=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var r=!1,s=0;e.forEach(function(a){var l=0,u=a.target,c=u.fromRect,d=B(u),p=u.prevFromRect,f=u.prevToRect,g=a.rect,y=jt(u,!0);y&&(d.top-=y.f,d.left-=y.e),u.toRect=d,u.thisAnimationDuration&&Tn(p,d)&&!Tn(c,d)&&(g.top-d.top)/(g.left-d.left)===(c.top-d.top)/(c.left-d.left)&&(l=Gr(g,p,f,o.options)),Tn(d,c)||(u.prevFromRect=c,u.prevToRect=d,l||(l=o.options.animation),o.animate(u,g,d,l)),l&&(r=!0,s=Math.max(s,l),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},l),u.thisAnimationDuration=l)}),clearTimeout(t),r?t=setTimeout(function(){typeof i=="function"&&i()},s):typeof i=="function"&&i(),e=[]},animate:function(i,o,r,s){if(s){b(i,"transition",""),b(i,"transform","");var a=jt(this.el),l=a&&a.a,u=a&&a.d,c=(o.left-r.left)/(l||1),d=(o.top-r.top)/(u||1);i.animatingX=!!c,i.animatingY=!!d,b(i,"transform","translate3d("+c+"px,"+d+"px,0)"),this.forRepaintDummy=Wr(i),b(i,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),b(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){b(i,"transition",""),b(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},s)}}}}function Wr(e){return e.offsetWidth}function Gr(e,t,n,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*i.animation}var Zt=[],Pn={initializeByDefault:!0},ue={mount:function(t){for(var n in Pn)Pn.hasOwnProperty(n)&&!(n in t)&&(t[n]=Pn[n]);Zt.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Zt.push(t)},pluginEvent:function(t,n,i){var o=this;this.eventCanceled=!1,i.cancel=function(){o.eventCanceled=!0};var r=t+"Global";Zt.forEach(function(s){n[s.pluginName]&&(n[s.pluginName][r]&&n[s.pluginName][r](pt({sortable:n},i)),n.options[s.pluginName]&&n[s.pluginName][t]&&n[s.pluginName][t](pt({sortable:n},i)))})},initializePlugins:function(t,n,i,o){Zt.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var u=new a(t,n,t.options);u.sortable=t,u.options=t.options,t[l]=u,bt(i,u.defaults)}});for(var r in t.options)if(t.options.hasOwnProperty(r)){var s=this.modifyOption(t,r,t.options[r]);typeof s<"u"&&(t.options[r]=s)}},getEventProperties:function(t,n){var i={};return Zt.forEach(function(o){typeof o.eventProperties=="function"&&bt(i,o.eventProperties.call(n[o.pluginName],t))}),i},modifyOption:function(t,n,i){var o;return Zt.forEach(function(r){t[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[n]=="function"&&(o=r.optionListeners[n].call(t[r.pluginName],i))}),o}};function Jr(e){var t=e.sortable,n=e.rootEl,i=e.name,o=e.targetEl,r=e.cloneEl,s=e.toEl,a=e.fromEl,l=e.oldIndex,u=e.newIndex,c=e.oldDraggableIndex,d=e.newDraggableIndex,p=e.originalEvent,f=e.putSortable,g=e.extraEventProperties;if(t=t||n&&n[it],!!t){var y,D=t.options,X="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!wt&&!se?y=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(i,!0,!0)),y.to=s||n,y.from=a||n,y.item=o||n,y.clone=r,y.oldIndex=l,y.newIndex=u,y.oldDraggableIndex=c,y.newDraggableIndex=d,y.originalEvent=p,y.pullMode=f?f.lastPutMode:void 0;var U=pt(pt({},g),ue.getEventProperties(i,t));for(var rt in U)y[rt]=U[rt];n&&n.dispatchEvent(y),D[X]&&D[X].call(t,y)}}var Kr=["evt"],tt=function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.evt,r=Fr(i,Kr);ue.pluginEvent.bind(v)(t,n,pt({dragEl:h,parentEl:I,ghostEl:w,rootEl:R,nextEl:Ht,lastDownEl:Oe,cloneEl:N,cloneHidden:_t,dragStarted:ce,putSortable:z,activeSortable:v.active,originalEvent:o,oldIndex:Xt,oldDraggableIndex:de,newIndex:ot,newDraggableIndex:At,hideGhostForTarget:Yi,unhideGhostForTarget:qi,cloneNowHidden:function(){_t=!0},cloneNowShown:function(){_t=!1},dispatchSortableEvent:function(a){J({sortable:n,name:a,originalEvent:o})}},r))};function J(e){Jr(pt({putSortable:z,cloneEl:N,targetEl:h,rootEl:R,oldIndex:Xt,oldDraggableIndex:de,newIndex:ot,newDraggableIndex:At},e))}var h,I,w,R,Ht,Oe,N,_t,Xt,ot,de,At,Re,z,Yt=!1,De=!1,Ne=[],Bt,dt,On,Rn,Ui,Fi,ce,qt,he,pe=!1,Me=!1,Ie,q,Dn=[],Nn=!1,He=[],Be=typeof document<"u",Ve=Oi,ji=se||wt?"cssFloat":"float",Qr=Be&&!Ri&&!Oi&&"draggable"in document.createElement("div"),zi=function(){if(Be){if(wt)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),Zi=function(t,n){var i=b(t),o=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=zt(t,0,n),s=zt(t,1,n),a=r&&b(r),l=s&&b(s),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+B(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+B(s).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&a.float!=="none"){var d=a.float==="left"?"left":"right";return s&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return r&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||u>=o&&i[ji]==="none"||s&&i[ji]==="none"&&u+c>o)?"vertical":"horizontal"},ts=function(t,n,i){var o=i?t.left:t.top,r=i?t.right:t.bottom,s=i?t.width:t.height,a=i?n.left:n.top,l=i?n.right:n.bottom,u=i?n.width:n.height;return o===a||r===l||o+s/2===a+u/2},es=function(t,n){var i;return Ne.some(function(o){var r=o[it].options.emptyInsertThreshold;if(!(!r||Cn(o))){var s=B(o),a=t>=s.left-r&&t<=s.right+r,l=n>=s.top-r&&n<=s.bottom+r;if(a&&l)return i=o}}),i},Xi=function(t){function n(r,s){return function(a,l,u,c){var d=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(r==null&&(s||d))return!0;if(r==null||r===!1)return!1;if(s&&r==="clone")return r;if(typeof r=="function")return n(r(a,l,u,c),s)(a,l,u,c);var p=(s?a:l).options.group.name;return r===!0||typeof r=="string"&&r===p||r.join&&r.indexOf(p)>-1}}var i={},o=t.group;(!o||Te(o)!="object")&&(o={name:o}),i.name=o.name,i.checkPull=n(o.pull,!0),i.checkPut=n(o.put),i.revertClone=o.revertClone,t.group=i},Yi=function(){!zi&&w&&b(w,"display","none")},qi=function(){!zi&&w&&b(w,"display","")};Be&&!Ri&&document.addEventListener("click",function(e){if(De)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),De=!1,!1},!0);var Vt=function(t){if(h){t=t.touches?t.touches[0]:t;var n=es(t.clientX,t.clientY);if(n){var i={};for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);i.target=i.rootEl=n,i.preventDefault=void 0,i.stopPropagation=void 0,n[it]._onDragOver(i)}}},ns=function(t){h&&h.parentNode[it]._isOutsideThisEl(t.target)};function v(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=bt({},t),e[it]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Zi(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,a){s.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:v.supportPointer!==!1&&"PointerEvent"in window&&!ae,emptyInsertThreshold:5};ue.initializePlugins(this,e,n);for(var i in n)!(i in t)&&(t[i]=n[i]);Xi(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:Qr,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?A(e,"pointerdown",this._onTapStart):(A(e,"mousedown",this._onTapStart),A(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(A(e,"dragover",this),A(e,"dragenter",this)),Ne.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),bt(this,qr())}v.prototype={constructor:v,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(qt=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,h):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,i=this.el,o=this.options,r=o.preventOnFilter,s=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(ds(i),!h&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||o.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&ae&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=ut(l,o.draggable,i,!1),!(l&&l.animated)&&Oe!==l)){if(Xt=lt(l),de=lt(l,o.draggable),typeof c=="function"){if(c.call(this,t,l,this)){J({sortable:n,rootEl:u,name:"filter",targetEl:l,toEl:i,fromEl:i}),tt("filter",n,{evt:t}),r&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(d){if(d=ut(u,d.trim(),i,!1),d)return J({sortable:n,rootEl:d,name:"filter",targetEl:l,fromEl:i,toEl:i}),tt("filter",n,{evt:t}),!0}),c)){r&&t.cancelable&&t.preventDefault();return}o.handle&&!ut(u,o.handle,i,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,n,i){var o=this,r=o.el,s=o.options,a=r.ownerDocument,l;if(i&&!h&&i.parentNode===r){var u=B(i);if(R=r,h=i,I=h.parentNode,Ht=h.nextSibling,Oe=i,Re=s.group,v.dragged=h,Bt={target:h,clientX:(n||t).clientX,clientY:(n||t).clientY},Ui=Bt.clientX-u.left,Fi=Bt.clientY-u.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,h.style["will-change"]="all",l=function(){if(tt("delayEnded",o,{evt:t}),v.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!Pi&&o.nativeDraggable&&(h.draggable=!0),o._triggerDragStart(t,n),J({sortable:o,name:"choose",originalEvent:t}),nt(h,s.chosenClass,!0)},s.ignore.split(",").forEach(function(c){Mi(h,c.trim(),Mn)}),A(a,"dragover",Vt),A(a,"mousemove",Vt),A(a,"touchmove",Vt),A(a,"mouseup",o._onDrop),A(a,"touchend",o._onDrop),A(a,"touchcancel",o._onDrop),Pi&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),tt("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(se||wt))){if(v.eventCanceled){this._onDrop();return}A(a,"mouseup",o._disableDelayedDrag),A(a,"touchend",o._disableDelayedDrag),A(a,"touchcancel",o._disableDelayedDrag),A(a,"mousemove",o._delayedDragTouchMoveHandler),A(a,"touchmove",o._delayedDragTouchMoveHandler),s.supportPointer&&A(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,s.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){h&&Mn(h),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;S(t,"mouseup",this._disableDelayedDrag),S(t,"touchend",this._disableDelayedDrag),S(t,"touchcancel",this._disableDelayedDrag),S(t,"mousemove",this._delayedDragTouchMoveHandler),S(t,"touchmove",this._delayedDragTouchMoveHandler),S(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?A(document,"pointermove",this._onTouchMove):n?A(document,"touchmove",this._onTouchMove):A(document,"mousemove",this._onTouchMove):(A(h,"dragend",this),A(R,"dragstart",this._onDragStart));try{document.selection?ke(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(Yt=!1,R&&h){tt("dragStarted",this,{evt:n}),this.nativeDraggable&&A(document,"dragover",ns);var i=this.options;!t&&nt(h,i.dragClass,!1),nt(h,i.ghostClass,!0),v.active=this,t&&this._appendGhost(),J({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(dt){this._lastX=dt.clientX,this._lastY=dt.clientY,Yi();for(var t=document.elementFromPoint(dt.clientX,dt.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(dt.clientX,dt.clientY),t!==n);)n=t;if(h.parentNode[it]._isOutsideThisEl(t),n)do{if(n[it]){var i=void 0;if(i=n[it]._onDragOver({clientX:dt.clientX,clientY:dt.clientY,target:t,rootEl:n}),i&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);qi()}},_onTouchMove:function(t){if(Bt){var n=this.options,i=n.fallbackTolerance,o=n.fallbackOffset,r=t.touches?t.touches[0]:t,s=w&&jt(w,!0),a=w&&s&&s.a,l=w&&s&&s.d,u=Ve&&q&&Hi(q),c=(r.clientX-Bt.clientX+o.x)/(a||1)+(u?u[0]-Dn[0]:0)/(a||1),d=(r.clientY-Bt.clientY+o.y)/(l||1)+(u?u[1]-Dn[1]:0)/(l||1);if(!v.active&&!Yt){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(w){s?(s.e+=c-(On||0),s.f+=d-(Rn||0)):s={a:1,b:0,c:0,d:1,e:c,f:d};var p="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");b(w,"webkitTransform",p),b(w,"mozTransform",p),b(w,"msTransform",p),b(w,"transform",p),On=c,Rn=d,dt=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!w){var t=this.options.fallbackOnBody?document.body:R,n=B(h,!0,Ve,!0,t),i=this.options;if(Ve){for(q=t;b(q,"position")==="static"&&b(q,"transform")==="none"&&q!==document;)q=q.parentNode;q!==document.body&&q!==document.documentElement?(q===document&&(q=ft()),n.top+=q.scrollTop,n.left+=q.scrollLeft):q=ft(),Dn=Hi(q)}w=h.cloneNode(!0),nt(w,i.ghostClass,!1),nt(w,i.fallbackClass,!0),nt(w,i.dragClass,!0),b(w,"transition",""),b(w,"transform",""),b(w,"box-sizing","border-box"),b(w,"margin",0),b(w,"top",n.top),b(w,"left",n.left),b(w,"width",n.width),b(w,"height",n.height),b(w,"opacity","0.8"),b(w,"position",Ve?"absolute":"fixed"),b(w,"zIndex","100000"),b(w,"pointerEvents","none"),v.ghost=w,t.appendChild(w),b(w,"transform-origin",Ui/parseInt(w.style.width)*100+"% "+Fi/parseInt(w.style.height)*100+"%")}},_onDragStart:function(t,n){var i=this,o=t.dataTransfer,r=i.options;if(tt("dragStart",this,{evt:t}),v.eventCanceled){this._onDrop();return}tt("setupClone",this),v.eventCanceled||(N=Li(h),N.removeAttribute("id"),N.draggable=!1,N.style["will-change"]="",this._hideClone(),nt(N,this.options.chosenClass,!1),v.clone=N),i.cloneId=ke(function(){tt("clone",i),!v.eventCanceled&&(i.options.removeCloneOnHide||R.insertBefore(N,h),i._hideClone(),J({sortable:i,name:"clone"}))}),!n&&nt(h,r.dragClass,!0),n?(De=!0,i._loopId=setInterval(i._emulateDragOver,50)):(S(document,"mouseup",i._onDrop),S(document,"touchend",i._onDrop),S(document,"touchcancel",i._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(i,o,h)),A(document,"drop",i),b(h,"transform","translateZ(0)")),Yt=!0,i._dragStartId=ke(i._dragStarted.bind(i,n,t)),A(document,"selectstart",i),ce=!0,ae&&b(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,i=t.target,o,r,s,a=this.options,l=a.group,u=v.active,c=Re===l,d=a.sort,p=z||u,f,g=this,y=!1;if(Nn)return;function D(Se,sa){tt(Se,g,pt({evt:t,isOwner:c,axis:f?"vertical":"horizontal",revert:s,dragRect:o,targetRect:r,canSort:d,fromSortable:p,target:i,completed:U,onMove:function(mo,aa){return Le(R,n,h,o,mo,B(mo),t,aa)},changed:rt},sa))}function X(){D("dragOverAnimationCapture"),g.captureAnimationState(),g!==p&&p.captureAnimationState()}function U(Se){return D("dragOverCompleted",{insertion:Se}),Se&&(c?u._hideClone():u._showClone(g),g!==p&&(nt(h,z?z.options.ghostClass:u.options.ghostClass,!1),nt(h,a.ghostClass,!0)),z!==g&&g!==v.active?z=g:g===v.active&&z&&(z=null),p===g&&(g._ignoreWhileAnimating=i),g.animateAll(function(){D("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===h&&!h.animated||i===n&&!i.animated)&&(qt=null),!a.dragoverBubble&&!t.rootEl&&i!==document&&(h.parentNode[it]._isOutsideThisEl(t.target),!Se&&Vt(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),y=!0}function rt(){ot=lt(h),At=lt(h,a.draggable),J({sortable:g,name:"change",toEl:n,newIndex:ot,newDraggableIndex:At,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=ut(i,a.draggable,n,!0),D("dragOver"),v.eventCanceled)return y;if(h.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||g._ignoreWhileAnimating===i)return U(!1);if(De=!1,u&&!a.disabled&&(c?d||(s=I!==R):z===this||(this.lastPutMode=Re.checkPull(this,u,h,t))&&l.checkPut(this,u,h,t))){if(f=this._getDirection(t,i)==="vertical",o=B(h),D("dragOverValid"),v.eventCanceled)return y;if(s)return I=R,X(),this._hideClone(),D("revert"),v.eventCanceled||(Ht?R.insertBefore(h,Ht):R.appendChild(h)),U(!0);var K=Cn(n,a.draggable);if(!K||ss(t,f,this)&&!K.animated){if(K===h)return U(!1);if(K&&n===t.target&&(i=K),i&&(r=B(i)),Le(R,n,h,o,i,r,t,!!i)!==!1)return X(),K&&K.nextSibling?n.insertBefore(h,K.nextSibling):n.appendChild(h),I=n,rt(),U(!0)}else if(K&&rs(t,f,this)){var ct=zt(n,0,a,!0);if(ct===h)return U(!1);if(i=ct,r=B(i),Le(R,n,h,o,i,r,t,!1)!==!1)return X(),n.insertBefore(h,ct),I=n,rt(),U(!0)}else if(i.parentNode===n){r=B(i);var P=0,W,ht=h.parentNode!==n,G=!ts(h.animated&&h.toRect||o,i.animated&&i.toRect||r,f),we=f?"top":"left",Tt=Ii(i,"top","top")||Ii(h,"top","top"),Ee=Tt?Tt.scrollTop:void 0;qt!==i&&(W=r[we],pe=!1,Me=!G&&a.invertSwap||ht),P=as(t,i,r,f,G?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,Me,qt===i);var Et;if(P!==0){var Lt=lt(h);do Lt-=P,Et=I.children[Lt];while(Et&&(b(Et,"display")==="none"||Et===w))}if(P===0||Et===i)return U(!1);qt=i,he=P;var xe=i.nextElementSibling,Pt=!1;Pt=P===1;var dn=Le(R,n,h,o,i,r,t,Pt);if(dn!==!1)return(dn===1||dn===-1)&&(Pt=dn===1),Nn=!0,setTimeout(os,30),X(),Pt&&!xe?n.appendChild(h):i.parentNode.insertBefore(h,Pt?xe:i),Tt&&Vi(Tt,0,Ee-Tt.scrollTop),I=h.parentNode,W!==void 0&&!Me&&(Ie=Math.abs(W-B(i)[we])),rt(),U(!0)}if(n.contains(h))return U(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){S(document,"mousemove",this._onTouchMove),S(document,"touchmove",this._onTouchMove),S(document,"pointermove",this._onTouchMove),S(document,"dragover",Vt),S(document,"mousemove",Vt),S(document,"touchmove",Vt)},_offUpEvents:function(){var t=this.el.ownerDocument;S(t,"mouseup",this._onDrop),S(t,"touchend",this._onDrop),S(t,"pointerup",this._onDrop),S(t,"touchcancel",this._onDrop),S(document,"selectstart",this)},_onDrop:function(t){var n=this.el,i=this.options;if(ot=lt(h),At=lt(h,i.draggable),tt("drop",this,{evt:t}),I=h&&h.parentNode,ot=lt(h),At=lt(h,i.draggable),v.eventCanceled){this._nulling();return}Yt=!1,Me=!1,pe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),In(this.cloneId),In(this._dragStartId),this.nativeDraggable&&(S(document,"drop",this),S(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ae&&b(document.body,"user-select",""),b(h,"transform",""),t&&(ce&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),w&&w.parentNode&&w.parentNode.removeChild(w),(R===I||z&&z.lastPutMode!=="clone")&&N&&N.parentNode&&N.parentNode.removeChild(N),h&&(this.nativeDraggable&&S(h,"dragend",this),Mn(h),h.style["will-change"]="",ce&&!Yt&&nt(h,z?z.options.ghostClass:this.options.ghostClass,!1),nt(h,this.options.chosenClass,!1),J({sortable:this,name:"unchoose",toEl:I,newIndex:null,newDraggableIndex:null,originalEvent:t}),R!==I?(ot>=0&&(J({rootEl:I,name:"add",toEl:I,fromEl:R,originalEvent:t}),J({sortable:this,name:"remove",toEl:I,originalEvent:t}),J({rootEl:I,name:"sort",toEl:I,fromEl:R,originalEvent:t}),J({sortable:this,name:"sort",toEl:I,originalEvent:t})),z&&z.save()):ot!==Xt&&ot>=0&&(J({sortable:this,name:"update",toEl:I,originalEvent:t}),J({sortable:this,name:"sort",toEl:I,originalEvent:t})),v.active&&((ot==null||ot===-1)&&(ot=Xt,At=de),J({sortable:this,name:"end",toEl:I,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){tt("nulling",this),R=h=I=w=Ht=N=Oe=_t=Bt=dt=ce=ot=At=Xt=de=qt=he=z=Re=v.dragged=v.ghost=v.clone=v.active=null,He.forEach(function(t){t.checked=!0}),He.length=On=Rn=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":h&&(this._onDragOver(t),is(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,i=this.el.children,o=0,r=i.length,s=this.options;o<r;o++)n=i[o],ut(n,s.draggable,this.el,!1)&&t.push(n.getAttribute(s.dataIdAttr)||us(n));return t},sort:function(t,n){var i={},o=this.el;this.toArray().forEach(function(r,s){var a=o.children[s];ut(a,this.options.draggable,o,!1)&&(i[r]=a)},this),n&&this.captureAnimationState(),t.forEach(function(r){i[r]&&(o.removeChild(i[r]),o.appendChild(i[r]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return ut(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var i=this.options;if(n===void 0)return i[t];var o=ue.modifyOption(this,t,n);typeof o<"u"?i[t]=o:i[t]=n,t==="group"&&Xi(i)},destroy:function(){tt("destroy",this);var t=this.el;t[it]=null,S(t,"mousedown",this._onTapStart),S(t,"touchstart",this._onTapStart),S(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(S(t,"dragover",this),S(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ne.splice(Ne.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!_t){if(tt("hideClone",this),v.eventCanceled)return;b(N,"display","none"),this.options.removeCloneOnHide&&N.parentNode&&N.parentNode.removeChild(N),_t=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(_t){if(tt("showClone",this),v.eventCanceled)return;h.parentNode==R&&!this.options.group.revertClone?R.insertBefore(N,h):Ht?R.insertBefore(N,Ht):R.appendChild(N),this.options.group.revertClone&&this.animate(h,N),b(N,"display",""),_t=!1}}};function is(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Le(e,t,n,i,o,r,s,a){var l,u=e[it],c=u.options.onMove,d;return window.CustomEvent&&!wt&&!se?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=e,l.dragged=n,l.draggedRect=i,l.related=o||t,l.relatedRect=r||B(t),l.willInsertAfter=a,l.originalEvent=s,e.dispatchEvent(l),c&&(d=c.call(u,l,s)),d}function Mn(e){e.draggable=!1}function os(){Nn=!1}function rs(e,t,n){var i=B(zt(n.el,0,n.options,!0)),o=ki(n.el,n.options,w),r=10;return t?e.clientX<o.left-r||e.clientY<i.top&&e.clientX<i.right:e.clientY<o.top-r||e.clientY<i.bottom&&e.clientX<i.left}function ss(e,t,n){var i=B(Cn(n.el,n.options.draggable)),o=ki(n.el,n.options,w),r=10;return t?e.clientX>o.right+r||e.clientY>i.bottom&&e.clientX>i.left:e.clientY>o.bottom+r||e.clientX>i.right&&e.clientY>i.top}function as(e,t,n,i,o,r,s,a){var l=i?e.clientY:e.clientX,u=i?n.height:n.width,c=i?n.top:n.left,d=i?n.bottom:n.right,p=!1;if(!s){if(a&&Ie<u*o){if(!pe&&(he===1?l>c+u*r/2:l<d-u*r/2)&&(pe=!0),pe)p=!0;else if(he===1?l<c+Ie:l>d-Ie)return-he}else if(l>c+u*(1-o)/2&&l<d-u*(1-o)/2)return ls(t)}return p=p||s,p&&(l<c+u*r/2||l>d-u*r/2)?l>c+u/2?1:-1:0}function ls(e){return lt(h)<lt(e)?1:-1}function us(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function ds(e){He.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var i=t[n];i.checked&&He.push(i)}}function ke(e){return setTimeout(e,0)}function In(e){return clearTimeout(e)}Be&&A(document,"touchmove",function(e){(v.active||Yt)&&e.cancelable&&e.preventDefault()}),v.utils={on:A,off:S,css:b,find:Mi,is:function(t,n){return!!ut(t,n,t,!1)},extend:Xr,throttle:Bi,closest:ut,toggleClass:nt,clone:Li,index:lt,nextTick:ke,cancelNextTick:In,detectDirection:Zi,getChild:zt},v.get=function(e){return e[it]},v.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(v.utils=pt(pt({},v.utils),i.utils)),ue.mount(i)})},v.create=function(e,t){return new v(e,t)},v.version=jr;var V=[],fe,Hn,Bn=!1,Vn,Ln,Ue,ge;function cs(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(n){var i=n.originalEvent;this.sortable.nativeDraggable?A(document,"dragover",this._handleAutoScroll):this.options.supportPointer?A(document,"pointermove",this._handleFallbackAutoScroll):i.touches?A(document,"touchmove",this._handleFallbackAutoScroll):A(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var i=n.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?S(document,"dragover",this._handleAutoScroll):(S(document,"pointermove",this._handleFallbackAutoScroll),S(document,"touchmove",this._handleFallbackAutoScroll),S(document,"mousemove",this._handleFallbackAutoScroll)),Wi(),Fe(),Yr()},nulling:function(){Ue=Hn=fe=Bn=ge=Vn=Ln=null,V.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,i){var o=this,r=(n.touches?n.touches[0]:n).clientX,s=(n.touches?n.touches[0]:n).clientY,a=document.elementFromPoint(r,s);if(Ue=n,i||this.options.forceAutoScrollFallback||se||wt||ae){kn(n,this.options,a,i);var l=$t(a,!0);Bn&&(!ge||r!==Vn||s!==Ln)&&(ge&&Wi(),ge=setInterval(function(){var u=$t(document.elementFromPoint(r,s),!0);u!==l&&(l=u,Fe()),kn(n,o.options,u,i)},10),Vn=r,Ln=s)}else{if(!this.options.bubbleScroll||$t(a,!0)===ft()){Fe();return}kn(n,this.options,$t(a,!1),!1)}}},bt(e,{pluginName:"scroll",initializeByDefault:!0})}function Fe(){V.forEach(function(e){clearInterval(e.pid)}),V=[]}function Wi(){clearInterval(ge)}var kn=Bi(function(e,t,n,i){if(t.scroll){var o=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,a=t.scrollSpeed,l=ft(),u=!1,c;Hn!==n&&(Hn=n,Fe(),fe=t.scroll,c=t.scrollFn,fe===!0&&(fe=$t(n,!0)));var d=0,p=fe;do{var f=p,g=B(f),y=g.top,D=g.bottom,X=g.left,U=g.right,rt=g.width,K=g.height,ct=void 0,P=void 0,W=f.scrollWidth,ht=f.scrollHeight,G=b(f),we=f.scrollLeft,Tt=f.scrollTop;f===l?(ct=rt<W&&(G.overflowX==="auto"||G.overflowX==="scroll"||G.overflowX==="visible"),P=K<ht&&(G.overflowY==="auto"||G.overflowY==="scroll"||G.overflowY==="visible")):(ct=rt<W&&(G.overflowX==="auto"||G.overflowX==="scroll"),P=K<ht&&(G.overflowY==="auto"||G.overflowY==="scroll"));var Ee=ct&&(Math.abs(U-o)<=s&&we+rt<W)-(Math.abs(X-o)<=s&&!!we),Et=P&&(Math.abs(D-r)<=s&&Tt+K<ht)-(Math.abs(y-r)<=s&&!!Tt);if(!V[d])for(var Lt=0;Lt<=d;Lt++)V[Lt]||(V[Lt]={});(V[d].vx!=Ee||V[d].vy!=Et||V[d].el!==f)&&(V[d].el=f,V[d].vx=Ee,V[d].vy=Et,clearInterval(V[d].pid),(Ee!=0||Et!=0)&&(u=!0,V[d].pid=setInterval((function(){i&&this.layer===0&&v.active._onTouchMove(Ue);var xe=V[this.layer].vy?V[this.layer].vy*a:0,Pt=V[this.layer].vx?V[this.layer].vx*a:0;typeof c=="function"&&c.call(v.dragged.parentNode[it],Pt,xe,e,Ue,V[this.layer].el)!=="continue"||Vi(V[this.layer].el,Pt,xe)}).bind({layer:d}),24))),d++}while(t.bubbleScroll&&p!==l&&(p=$t(p,!1)));Bn=u}},30),Gi=function(t){var n=t.originalEvent,i=t.putSortable,o=t.dragEl,r=t.activeSortable,s=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(n){var u=i||r;a();var c=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,d=document.elementFromPoint(c.clientX,c.clientY);l(),u&&!u.el.contains(d)&&(s("spill"),this.onSpill({dragEl:o,putSortable:i}))}};function Un(){}Un.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var o=zt(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(n,o):this.sortable.el.appendChild(n),this.sortable.animateAll(),i&&i.animateAll()},drop:Gi},bt(Un,{pluginName:"revertOnSpill"});function Fn(){}Fn.prototype={onSpill:function(t){var n=t.dragEl,i=t.putSortable,o=i||this.sortable;o.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),o.animateAll()},drop:Gi},bt(Fn,{pluginName:"removeOnSpill"}),v.mount(new cs),v.mount(Fn,Un);const hs=e=>{const t=e.item;let n=Array.prototype.slice.call(t.parentNode.childNodes);return n=n.filter(i=>i.nodeType!=Node.ELEMENT_NODE||!i.classList.contains("sortable-fallback")),n},ps=(e,t,n,i,o,r)=>{const a=e.item.parentNode;for(const y of n)a.appendChild(y);if(e.oldIndex==e.newIndex)return;const l=i.getArray(),u=e.item.querySelector("eox-layercontrol-layer").layer.get(o),c=l.find(y=>y.get(o)===u),d=r.dataset.layer,p=l.find(y=>y.get(o)==d);let f,g;for(f=0;f<l.length;f++)if(l[f]==c){i.removeAt(f);break}for(g=0;g<l.length;g++)if(l[g]===p){f>g?i.insertAt(g,c):i.insertAt(g+1,c);break}t.requestUpdate()};function fs(e,t,n,i){let o=[],r=null;e._sortable=v.create(e,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:s=>o=hs(s),onMove:s=>{r=s.related},onEnd:s=>ps(s,i,o,t,n,r)})}function gs(e,t,n,i){const o=e.getArray();let r=!1;o.forEach(s=>{const a=s.ol_uid;s.get(t)||(s.set(t,a),r=!0),s.get(n)||(s.set(n,`layer ${a}`),r=!0),r&&i.requestUpdate()})}function jn(e,t,n){let i=[];const o=(r,s,a)=>{i=[...i,...r.filter(u=>u.get(s)===a)];const l=r.filter(u=>u.getLayers);return l.length>0&&l.forEach(u=>o(u.getLayers().getArray(),s,a)),i};return o(e,t,n),i}function ms(e,t,n){if(!e||!t)return!1;if(!Ji(e,n))return!0;const i=e.get("minZoom"),o=e.get("maxZoom"),r=t.getView().getZoom();return r>i&&r<o}function Ji(e,t){const n=e.get("minZoom"),i=e.get("maxZoom");return!!(t&&(n!==-1/0||i!==1/0))}function ys(e,t){var o,r,s;return!e||!t?void 0:e.getLayers?"group":((s=(o=t.getInteractions().getArray().filter(a=>a.freehand_!==void 0).map(a=>a.source_))==null?void 0:o.ol_uid)==null?void 0:s.includes(e.getSource?(r=e.getSource())==null?void 0:r.ol_uid:void 0))?"draw":e.declutter_!==void 0?"vector":"raster"}function Ki(e,t){var i;let n={};for(const o in e){const r=e[o].type;if(r&&r!=="object")n[o]=r==="number"?Number(t[o]):t[o];else if(typeof e[o]=="object"&&((i=e[o])!=null&&i.properties)){const s=Ki(e[o].properties,t);Object.keys(s).length>0&&(n[o]=s)}}return n}function bs(e,t){var r;if(!t||!e.getSource().getTileUrlFunction())return null;const n=new URL(e.getSource().getTileUrlFunction()([0,0,0])),i=Object.fromEntries(n.searchParams.entries()),o=Ki(((r=t.schema)==null?void 0:r.properties)||t.schema,i);return Object.keys(o).length?o:null}const vs=(e,t)=>e==null?void 0:e.filter(n=>["remove","sort"].filter(i=>t!=null&&t.get("layerControlDisable")?i!=="sort":!0).includes(n)),ws=(e,t)=>e==null?void 0:e.filter(n=>{let i=!0;return["remove","sort"].includes(n)&&(i=!1),n==="info"&&(i=t.get("description")),n==="config"&&(i=t.get("layerConfig")),i}),Es=(e,t)=>x`
46
- <button slot="${e}-icon" class="icon">${t?e:T}</button>
47
- `,xs=e=>x`
45
+ */function oo(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),e.push.apply(e,i)}return e}function jt(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?oo(Object(e),!0).forEach(function(i){Yu(n,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):oo(Object(e)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(e,i))})}return n}function qn(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qn=function(t){return typeof t}:qn=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qn(n)}function Yu(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function te(){return te=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},te.apply(this,arguments)}function Zu(n,t){if(n==null)return{};var e={},i=Object.keys(n),r,s;for(s=0;s<i.length;s++)r=i[s],!(t.indexOf(r)>=0)&&(e[r]=n[r]);return e}function Ku(n,t){if(n==null)return{};var e=Zu(n,t),i,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(r=0;r<s.length;r++)i=s[r],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(n,i)&&(e[i]=n[i])}return e}var qu="1.15.2";function ee(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var ne=ee(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),En=ee(/Edge/i),ao=ee(/firefox/i),bn=ee(/safari/i)&&!ee(/chrome/i)&&!ee(/android/i),lo=ee(/iP(ad|od|hone)/i),uo=ee(/chrome/i)&&ee(/android/i),co={capture:!1,passive:!1};function z(n,t,e){n.addEventListener(t,e,!ne&&co)}function H(n,t,e){n.removeEventListener(t,e,!ne&&co)}function Jn(n,t){if(t){if(t[0]===">"&&(t=t.substring(1)),n)try{if(n.matches)return n.matches(t);if(n.msMatchesSelector)return n.msMatchesSelector(t);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(t)}catch{return!1}return!1}}function Ju(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function Xt(n,t,e,i){if(n){e=e||document;do{if(t!=null&&(t[0]===">"?n.parentNode===e&&Jn(n,t):Jn(n,t))||i&&n===e)return n;if(n===e)break}while(n=Ju(n))}return null}var ho=/\s+/g;function Ot(n,t,e){if(n&&t)if(n.classList)n.classList[e?"add":"remove"](t);else{var i=(" "+n.className+" ").replace(ho," ").replace(" "+t+" "," ");n.className=(i+(e?" "+t:"")).replace(ho," ")}}function $(n,t,e){var i=n&&n.style;if(i){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(e=n.currentStyle),t===void 0?e:e[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=e+(typeof e=="string"?"":"px")}}function Fe(n,t){var e="";if(typeof n=="string")e=n;else do{var i=$(n,"transform");i&&i!=="none"&&(e=i+" "+e)}while(!t&&(n=n.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(e)}function fo(n,t,e){if(n){var i=n.getElementsByTagName(t),r=0,s=i.length;if(e)for(;r<s;r++)e(i[r],r);return i}return[]}function zt(){var n=document.scrollingElement;return n||document.documentElement}function lt(n,t,e,i,r){if(!(!n.getBoundingClientRect&&n!==window)){var s,o,a,l,u,h,c;if(n!==window&&n.parentNode&&n!==zt()?(s=n.getBoundingClientRect(),o=s.top,a=s.left,l=s.bottom,u=s.right,h=s.height,c=s.width):(o=0,a=0,l=window.innerHeight,u=window.innerWidth,h=window.innerHeight,c=window.innerWidth),(t||e)&&n!==window&&(r=r||n.parentNode,!ne))do if(r&&r.getBoundingClientRect&&($(r,"transform")!=="none"||e&&$(r,"position")!=="static")){var d=r.getBoundingClientRect();o-=d.top+parseInt($(r,"border-top-width")),a-=d.left+parseInt($(r,"border-left-width")),l=o+s.height,u=a+s.width;break}while(r=r.parentNode);if(i&&n!==window){var f=Fe(r||n),g=f&&f.a,p=f&&f.d;f&&(o/=p,a/=g,c/=g,h/=p,l=o+h,u=a+c)}return{top:o,left:a,bottom:l,right:u,width:c,height:h}}}function go(n,t,e){for(var i=ue(n,!0),r=lt(n)[t];i;){var s=lt(i)[e],o=void 0;if(e==="top"||e==="left"?o=r>=s:o=r<=s,!o)return i;if(i===zt())break;i=ue(i,!1)}return!1}function Be(n,t,e,i){for(var r=0,s=0,o=n.children;s<o.length;){if(o[s].style.display!=="none"&&o[s]!==P.ghost&&(i||o[s]!==P.dragged)&&Xt(o[s],e.draggable,n,!1)){if(r===t)return o[s];r++}s++}return null}function mr(n,t){for(var e=n.lastElementChild;e&&(e===P.ghost||$(e,"display")==="none"||t&&!Jn(e,t));)e=e.previousElementSibling;return e||null}function Ft(n,t){var e=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==P.clone&&(!t||Jn(n,t))&&e++;return e}function po(n){var t=0,e=0,i=zt();if(n)do{var r=Fe(n),s=r.a,o=r.d;t+=n.scrollLeft*s,e+=n.scrollTop*o}while(n!==i&&(n=n.parentNode));return[t,e]}function Qu(n,t){for(var e in n)if(n.hasOwnProperty(e)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===n[e][i])return Number(e)}return-1}function ue(n,t){if(!n||!n.getBoundingClientRect)return zt();var e=n,i=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var r=$(e);if(e.clientWidth<e.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return zt();if(i||t)return e;i=!0}}while(e=e.parentNode);return zt()}function tc(n,t){if(n&&t)for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function _r(n,t){return Math.round(n.top)===Math.round(t.top)&&Math.round(n.left)===Math.round(t.left)&&Math.round(n.height)===Math.round(t.height)&&Math.round(n.width)===Math.round(t.width)}var vn;function mo(n,t){return function(){if(!vn){var e=arguments,i=this;e.length===1?n.call(i,e[0]):n.apply(i,e),vn=setTimeout(function(){vn=void 0},t)}}}function ec(){clearTimeout(vn),vn=void 0}function _o(n,t,e){n.scrollLeft+=t,n.scrollTop+=e}function yo(n){var t=window.Polymer,e=window.jQuery||window.Zepto;return t&&t.dom?t.dom(n).cloneNode(!0):e?e(n).clone(!0)[0]:n.cloneNode(!0)}function Eo(n,t,e){var i={};return Array.from(n.children).forEach(function(r){var s,o,a,l;if(!(!Xt(r,t.draggable,n,!1)||r.animated||r===e)){var u=lt(r);i.left=Math.min((s=i.left)!==null&&s!==void 0?s:1/0,u.left),i.top=Math.min((o=i.top)!==null&&o!==void 0?o:1/0,u.top),i.right=Math.max((a=i.right)!==null&&a!==void 0?a:-1/0,u.right),i.bottom=Math.max((l=i.bottom)!==null&&l!==void 0?l:-1/0,u.bottom)}}),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var Lt="Sortable"+new Date().getTime();function nc(){var n=[],t;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(r){if(!($(r,"display")==="none"||r===P.ghost)){n.push({target:r,rect:lt(r)});var s=jt({},n[n.length-1].rect);if(r.thisAnimationDuration){var o=Fe(r,!0);o&&(s.top-=o.f,s.left-=o.e)}r.fromRect=s}})}},addAnimationState:function(i){n.push(i)},removeAnimationState:function(i){n.splice(Qu(n,{target:i}),1)},animateAll:function(i){var r=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var s=!1,o=0;n.forEach(function(a){var l=0,u=a.target,h=u.fromRect,c=lt(u),d=u.prevFromRect,f=u.prevToRect,g=a.rect,p=Fe(u,!0);p&&(c.top-=p.f,c.left-=p.e),u.toRect=c,u.thisAnimationDuration&&_r(d,c)&&!_r(h,c)&&(g.top-c.top)/(g.left-c.left)===(h.top-c.top)/(h.left-c.left)&&(l=rc(g,d,f,r.options)),_r(c,h)||(u.prevFromRect=h,u.prevToRect=c,l||(l=r.options.animation),r.animate(u,g,c,l)),l&&(s=!0,o=Math.max(o,l),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},l),u.thisAnimationDuration=l)}),clearTimeout(t),s?t=setTimeout(function(){typeof i=="function"&&i()},o):typeof i=="function"&&i(),n=[]},animate:function(i,r,s,o){if(o){$(i,"transition",""),$(i,"transform","");var a=Fe(this.el),l=a&&a.a,u=a&&a.d,h=(r.left-s.left)/(l||1),c=(r.top-s.top)/(u||1);i.animatingX=!!h,i.animatingY=!!c,$(i,"transform","translate3d("+h+"px,"+c+"px,0)"),this.forRepaintDummy=ic(i),$(i,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),$(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){$(i,"transition",""),$(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},o)}}}}function ic(n){return n.offsetWidth}function rc(n,t,e,i){return Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))/Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))*i.animation}var Xe=[],yr={initializeByDefault:!0},Tn={mount:function(t){for(var e in yr)yr.hasOwnProperty(e)&&!(e in t)&&(t[e]=yr[e]);Xe.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Xe.push(t)},pluginEvent:function(t,e,i){var r=this;this.eventCanceled=!1,i.cancel=function(){r.eventCanceled=!0};var s=t+"Global";Xe.forEach(function(o){e[o.pluginName]&&(e[o.pluginName][s]&&e[o.pluginName][s](jt({sortable:e},i)),e.options[o.pluginName]&&e[o.pluginName][t]&&e[o.pluginName][t](jt({sortable:e},i)))})},initializePlugins:function(t,e,i,r){Xe.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var u=new a(t,e,t.options);u.sortable=t,u.options=t.options,t[l]=u,te(i,u.defaults)}});for(var s in t.options)if(t.options.hasOwnProperty(s)){var o=this.modifyOption(t,s,t.options[s]);typeof o<"u"&&(t.options[s]=o)}},getEventProperties:function(t,e){var i={};return Xe.forEach(function(r){typeof r.eventProperties=="function"&&te(i,r.eventProperties.call(e[r.pluginName],t))}),i},modifyOption:function(t,e,i){var r;return Xe.forEach(function(s){t[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[e]=="function"&&(r=s.optionListeners[e].call(t[s.pluginName],i))}),r}};function sc(n){var t=n.sortable,e=n.rootEl,i=n.name,r=n.targetEl,s=n.cloneEl,o=n.toEl,a=n.fromEl,l=n.oldIndex,u=n.newIndex,h=n.oldDraggableIndex,c=n.newDraggableIndex,d=n.originalEvent,f=n.putSortable,g=n.extraEventProperties;if(t=t||e&&e[Lt],!!t){var p,m=t.options,y="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!ne&&!En?p=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(p=document.createEvent("Event"),p.initEvent(i,!0,!0)),p.to=o||e,p.from=a||e,p.item=r||e,p.clone=s,p.oldIndex=l,p.newIndex=u,p.oldDraggableIndex=h,p.newDraggableIndex=c,p.originalEvent=d,p.pullMode=f?f.lastPutMode:void 0;var _=jt(jt({},g),Tn.getEventProperties(i,t));for(var T in _)p[T]=_[T];e&&e.dispatchEvent(p),m[y]&&m[y].call(t,p)}}var oc=["evt"],At=function(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=i.evt,s=Ku(i,oc);Tn.pluginEvent.bind(P)(t,e,jt({dragEl:R,parentEl:rt,ghostEl:O,rootEl:et,nextEl:Ce,lastDownEl:Qn,cloneEl:it,cloneHidden:ce,dragStarted:Rn,putSortable:_t,activeSortable:P.active,originalEvent:r,oldIndex:He,oldDraggableIndex:xn,newIndex:Dt,newDraggableIndex:he,hideGhostForTarget:Co,unhideGhostForTarget:So,cloneNowHidden:function(){ce=!0},cloneNowShown:function(){ce=!1},dispatchSortableEvent:function(a){xt({sortable:e,name:a,originalEvent:r})}},s))};function xt(n){sc(jt({putSortable:_t,cloneEl:it,targetEl:R,rootEl:et,oldIndex:He,oldDraggableIndex:xn,newIndex:Dt,newDraggableIndex:he},n))}var R,rt,O,et,Ce,Qn,it,ce,He,Dt,xn,he,ti,_t,Ge=!1,ei=!1,ni=[],Se,Ht,Er,br,bo,vo,Rn,ke,wn,Cn=!1,ii=!1,ri,Tt,vr=[],Tr=!1,si=[],oi=typeof document<"u",ai=lo,To=En||ne?"cssFloat":"float",ac=oi&&!uo&&!lo&&"draggable"in document.createElement("div"),xo=function(){if(oi){if(ne)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),Ro=function(t,e){var i=$(t),r=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),s=Be(t,0,e),o=Be(t,1,e),a=s&&$(s),l=o&&$(o),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+lt(s).width,h=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+lt(o).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&a.float&&a.float!=="none"){var c=a.float==="left"?"left":"right";return o&&(l.clear==="both"||l.clear===c)?"vertical":"horizontal"}return s&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||u>=r&&i[To]==="none"||o&&i[To]==="none"&&u+h>r)?"vertical":"horizontal"},lc=function(t,e,i){var r=i?t.left:t.top,s=i?t.right:t.bottom,o=i?t.width:t.height,a=i?e.left:e.top,l=i?e.right:e.bottom,u=i?e.width:e.height;return r===a||s===l||r+o/2===a+u/2},uc=function(t,e){var i;return ni.some(function(r){var s=r[Lt].options.emptyInsertThreshold;if(!(!s||mr(r))){var o=lt(r),a=t>=o.left-s&&t<=o.right+s,l=e>=o.top-s&&e<=o.bottom+s;if(a&&l)return i=r}}),i},wo=function(t){function e(s,o){return function(a,l,u,h){var c=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(s==null&&(o||c))return!0;if(s==null||s===!1)return!1;if(o&&s==="clone")return s;if(typeof s=="function")return e(s(a,l,u,h),o)(a,l,u,h);var d=(o?a:l).options.group.name;return s===!0||typeof s=="string"&&s===d||s.join&&s.indexOf(d)>-1}}var i={},r=t.group;(!r||qn(r)!="object")&&(r={name:r}),i.name=r.name,i.checkPull=e(r.pull,!0),i.checkPut=e(r.put),i.revertClone=r.revertClone,t.group=i},Co=function(){!xo&&O&&$(O,"display","none")},So=function(){!xo&&O&&$(O,"display","")};oi&&!uo&&document.addEventListener("click",function(n){if(ei)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),ei=!1,!1},!0);var Ae=function(t){if(R){t=t.touches?t.touches[0]:t;var e=uc(t.clientX,t.clientY);if(e){var i={};for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[Lt]._onDragOver(i)}}},cc=function(t){R&&R.parentNode[Lt]._isOutsideThisEl(t.target)};function P(n,t){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=t=te({},t),n[Lt]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ro(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(o,a){o.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:P.supportPointer!==!1&&"PointerEvent"in window&&!bn,emptyInsertThreshold:5};Tn.initializePlugins(this,n,e);for(var i in e)!(i in t)&&(t[i]=e[i]);wo(t);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=t.forceFallback?!1:ac,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?z(n,"pointerdown",this._onTapStart):(z(n,"mousedown",this._onTapStart),z(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(z(n,"dragover",this),z(n,"dragenter",this)),ni.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),te(this,nc())}P.prototype={constructor:P,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(ke=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,R):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,r=this.options,s=r.preventOnFilter,o=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,h=r.filter;if(yc(i),!R&&!(/mousedown|pointerdown/.test(o)&&t.button!==0||r.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&bn&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=Xt(l,r.draggable,i,!1),!(l&&l.animated)&&Qn!==l)){if(He=Ft(l),xn=Ft(l,r.draggable),typeof h=="function"){if(h.call(this,t,l,this)){xt({sortable:e,rootEl:u,name:"filter",targetEl:l,toEl:i,fromEl:i}),At("filter",e,{evt:t}),s&&t.cancelable&&t.preventDefault();return}}else if(h&&(h=h.split(",").some(function(c){if(c=Xt(u,c.trim(),i,!1),c)return xt({sortable:e,rootEl:c,name:"filter",targetEl:l,fromEl:i,toEl:i}),At("filter",e,{evt:t}),!0}),h)){s&&t.cancelable&&t.preventDefault();return}r.handle&&!Xt(u,r.handle,i,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,i){var r=this,s=r.el,o=r.options,a=s.ownerDocument,l;if(i&&!R&&i.parentNode===s){var u=lt(i);if(et=s,R=i,rt=R.parentNode,Ce=R.nextSibling,Qn=i,ti=o.group,P.dragged=R,Se={target:R,clientX:(e||t).clientX,clientY:(e||t).clientY},bo=Se.clientX-u.left,vo=Se.clientY-u.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,R.style["will-change"]="all",l=function(){if(At("delayEnded",r,{evt:t}),P.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!ao&&r.nativeDraggable&&(R.draggable=!0),r._triggerDragStart(t,e),xt({sortable:r,name:"choose",originalEvent:t}),Ot(R,o.chosenClass,!0)},o.ignore.split(",").forEach(function(h){fo(R,h.trim(),xr)}),z(a,"dragover",Ae),z(a,"mousemove",Ae),z(a,"touchmove",Ae),z(a,"mouseup",r._onDrop),z(a,"touchend",r._onDrop),z(a,"touchcancel",r._onDrop),ao&&this.nativeDraggable&&(this.options.touchStartThreshold=4,R.draggable=!0),At("delayStart",this,{evt:t}),o.delay&&(!o.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(En||ne))){if(P.eventCanceled){this._onDrop();return}z(a,"mouseup",r._disableDelayedDrag),z(a,"touchend",r._disableDelayedDrag),z(a,"touchcancel",r._disableDelayedDrag),z(a,"mousemove",r._delayedDragTouchMoveHandler),z(a,"touchmove",r._delayedDragTouchMoveHandler),o.supportPointer&&z(a,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(l,o.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){R&&xr(R),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;H(t,"mouseup",this._disableDelayedDrag),H(t,"touchend",this._disableDelayedDrag),H(t,"touchcancel",this._disableDelayedDrag),H(t,"mousemove",this._delayedDragTouchMoveHandler),H(t,"touchmove",this._delayedDragTouchMoveHandler),H(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?z(document,"pointermove",this._onTouchMove):e?z(document,"touchmove",this._onTouchMove):z(document,"mousemove",this._onTouchMove):(z(R,"dragend",this),z(et,"dragstart",this._onDragStart));try{document.selection?ui(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(Ge=!1,et&&R){At("dragStarted",this,{evt:e}),this.nativeDraggable&&z(document,"dragover",cc);var i=this.options;!t&&Ot(R,i.dragClass,!1),Ot(R,i.ghostClass,!0),P.active=this,t&&this._appendGhost(),xt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Ht){this._lastX=Ht.clientX,this._lastY=Ht.clientY,Co();for(var t=document.elementFromPoint(Ht.clientX,Ht.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Ht.clientX,Ht.clientY),t!==e);)e=t;if(R.parentNode[Lt]._isOutsideThisEl(t),e)do{if(e[Lt]){var i=void 0;if(i=e[Lt]._onDragOver({clientX:Ht.clientX,clientY:Ht.clientY,target:t,rootEl:e}),i&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);So()}},_onTouchMove:function(t){if(Se){var e=this.options,i=e.fallbackTolerance,r=e.fallbackOffset,s=t.touches?t.touches[0]:t,o=O&&Fe(O,!0),a=O&&o&&o.a,l=O&&o&&o.d,u=ai&&Tt&&po(Tt),h=(s.clientX-Se.clientX+r.x)/(a||1)+(u?u[0]-vr[0]:0)/(a||1),c=(s.clientY-Se.clientY+r.y)/(l||1)+(u?u[1]-vr[1]:0)/(l||1);if(!P.active&&!Ge){if(i&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(O){o?(o.e+=h-(Er||0),o.f+=c-(br||0)):o={a:1,b:0,c:0,d:1,e:h,f:c};var d="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");$(O,"webkitTransform",d),$(O,"mozTransform",d),$(O,"msTransform",d),$(O,"transform",d),Er=h,br=c,Ht=s}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!O){var t=this.options.fallbackOnBody?document.body:et,e=lt(R,!0,ai,!0,t),i=this.options;if(ai){for(Tt=t;$(Tt,"position")==="static"&&$(Tt,"transform")==="none"&&Tt!==document;)Tt=Tt.parentNode;Tt!==document.body&&Tt!==document.documentElement?(Tt===document&&(Tt=zt()),e.top+=Tt.scrollTop,e.left+=Tt.scrollLeft):Tt=zt(),vr=po(Tt)}O=R.cloneNode(!0),Ot(O,i.ghostClass,!1),Ot(O,i.fallbackClass,!0),Ot(O,i.dragClass,!0),$(O,"transition",""),$(O,"transform",""),$(O,"box-sizing","border-box"),$(O,"margin",0),$(O,"top",e.top),$(O,"left",e.left),$(O,"width",e.width),$(O,"height",e.height),$(O,"opacity","0.8"),$(O,"position",ai?"absolute":"fixed"),$(O,"zIndex","100000"),$(O,"pointerEvents","none"),P.ghost=O,t.appendChild(O),$(O,"transform-origin",bo/parseInt(O.style.width)*100+"% "+vo/parseInt(O.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,r=t.dataTransfer,s=i.options;if(At("dragStart",this,{evt:t}),P.eventCanceled){this._onDrop();return}At("setupClone",this),P.eventCanceled||(it=yo(R),it.removeAttribute("id"),it.draggable=!1,it.style["will-change"]="",this._hideClone(),Ot(it,this.options.chosenClass,!1),P.clone=it),i.cloneId=ui(function(){At("clone",i),!P.eventCanceled&&(i.options.removeCloneOnHide||et.insertBefore(it,R),i._hideClone(),xt({sortable:i,name:"clone"}))}),!e&&Ot(R,s.dragClass,!0),e?(ei=!0,i._loopId=setInterval(i._emulateDragOver,50)):(H(document,"mouseup",i._onDrop),H(document,"touchend",i._onDrop),H(document,"touchcancel",i._onDrop),r&&(r.effectAllowed="move",s.setData&&s.setData.call(i,r,R)),z(document,"drop",i),$(R,"transform","translateZ(0)")),Ge=!0,i._dragStartId=ui(i._dragStarted.bind(i,e,t)),z(document,"selectstart",i),Rn=!0,bn&&$(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,i=t.target,r,s,o,a=this.options,l=a.group,u=P.active,h=ti===l,c=a.sort,d=_t||u,f,g=this,p=!1;if(Tr)return;function m(Pt,Vt){At(Pt,g,jt({evt:t,isOwner:h,axis:f?"vertical":"horizontal",revert:o,dragRect:r,targetRect:s,canSort:c,fromSortable:d,target:i,completed:_,onMove:function(re,se){return li(et,e,R,r,re,lt(re),t,se)},changed:T},Vt))}function y(){m("dragOverAnimationCapture"),g.captureAnimationState(),g!==d&&d.captureAnimationState()}function _(Pt){return m("dragOverCompleted",{insertion:Pt}),Pt&&(h?u._hideClone():u._showClone(g),g!==d&&(Ot(R,_t?_t.options.ghostClass:u.options.ghostClass,!1),Ot(R,a.ghostClass,!0)),_t!==g&&g!==P.active?_t=g:g===P.active&&_t&&(_t=null),d===g&&(g._ignoreWhileAnimating=i),g.animateAll(function(){m("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(i===R&&!R.animated||i===e&&!i.animated)&&(ke=null),!a.dragoverBubble&&!t.rootEl&&i!==document&&(R.parentNode[Lt]._isOutsideThisEl(t.target),!Pt&&Ae(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),p=!0}function T(){Dt=Ft(R),he=Ft(R,a.draggable),xt({sortable:g,name:"change",toEl:e,newIndex:Dt,newDraggableIndex:he,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=Xt(i,a.draggable,e,!0),m("dragOver"),P.eventCanceled)return p;if(R.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||g._ignoreWhileAnimating===i)return _(!1);if(ei=!1,u&&!a.disabled&&(h?c||(o=rt!==et):_t===this||(this.lastPutMode=ti.checkPull(this,u,R,t))&&l.checkPut(this,u,R,t))){if(f=this._getDirection(t,i)==="vertical",r=lt(R),m("dragOverValid"),P.eventCanceled)return p;if(o)return rt=et,y(),this._hideClone(),m("revert"),P.eventCanceled||(Ce?et.insertBefore(R,Ce):et.appendChild(R)),_(!0);var E=mr(e,a.draggable);if(!E||gc(t,f,this)&&!E.animated){if(E===R)return _(!1);if(E&&e===t.target&&(i=E),i&&(s=lt(i)),li(et,e,R,r,i,s,t,!!i)!==!1)return y(),E&&E.nextSibling?e.insertBefore(R,E.nextSibling):e.appendChild(R),rt=e,T(),_(!0)}else if(E&&fc(t,f,this)){var b=Be(e,0,a,!0);if(b===R)return _(!1);if(i=b,s=lt(i),li(et,e,R,r,i,s,t,!1)!==!1)return y(),e.insertBefore(R,b),rt=e,T(),_(!0)}else if(i.parentNode===e){s=lt(i);var v=0,C,w=R.parentNode!==e,I=!lc(R.animated&&R.toRect||r,i.animated&&i.toRect||s,f),X=f?"top":"left",F=go(i,"top","top")||go(R,"top","top"),V=F?F.scrollTop:void 0;ke!==i&&(C=s[X],Cn=!1,ii=!I&&a.invertSwap||w),v=pc(t,i,s,f,I?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,ii,ke===i);var q;if(v!==0){var J=Ft(R);do J-=v,q=rt.children[J];while(q&&($(q,"display")==="none"||q===O))}if(v===0||q===i)return _(!1);ke=i,wn=v;var at=i.nextElementSibling,Q=!1;Q=v===1;var Ct=li(et,e,R,r,i,s,t,Q);if(Ct!==!1)return(Ct===1||Ct===-1)&&(Q=Ct===1),Tr=!0,setTimeout(dc,30),y(),Q&&!at?e.appendChild(R):i.parentNode.insertBefore(R,Q?at:i),F&&_o(F,0,V-F.scrollTop),rt=R.parentNode,C!==void 0&&!ii&&(ri=Math.abs(C-lt(i)[X])),T(),_(!0)}if(e.contains(R))return _(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){H(document,"mousemove",this._onTouchMove),H(document,"touchmove",this._onTouchMove),H(document,"pointermove",this._onTouchMove),H(document,"dragover",Ae),H(document,"mousemove",Ae),H(document,"touchmove",Ae)},_offUpEvents:function(){var t=this.el.ownerDocument;H(t,"mouseup",this._onDrop),H(t,"touchend",this._onDrop),H(t,"pointerup",this._onDrop),H(t,"touchcancel",this._onDrop),H(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;if(Dt=Ft(R),he=Ft(R,i.draggable),At("drop",this,{evt:t}),rt=R&&R.parentNode,Dt=Ft(R),he=Ft(R,i.draggable),P.eventCanceled){this._nulling();return}Ge=!1,ii=!1,Cn=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Rr(this.cloneId),Rr(this._dragStartId),this.nativeDraggable&&(H(document,"drop",this),H(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),bn&&$(document.body,"user-select",""),$(R,"transform",""),t&&(Rn&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),O&&O.parentNode&&O.parentNode.removeChild(O),(et===rt||_t&&_t.lastPutMode!=="clone")&&it&&it.parentNode&&it.parentNode.removeChild(it),R&&(this.nativeDraggable&&H(R,"dragend",this),xr(R),R.style["will-change"]="",Rn&&!Ge&&Ot(R,_t?_t.options.ghostClass:this.options.ghostClass,!1),Ot(R,this.options.chosenClass,!1),xt({sortable:this,name:"unchoose",toEl:rt,newIndex:null,newDraggableIndex:null,originalEvent:t}),et!==rt?(Dt>=0&&(xt({rootEl:rt,name:"add",toEl:rt,fromEl:et,originalEvent:t}),xt({sortable:this,name:"remove",toEl:rt,originalEvent:t}),xt({rootEl:rt,name:"sort",toEl:rt,fromEl:et,originalEvent:t}),xt({sortable:this,name:"sort",toEl:rt,originalEvent:t})),_t&&_t.save()):Dt!==He&&Dt>=0&&(xt({sortable:this,name:"update",toEl:rt,originalEvent:t}),xt({sortable:this,name:"sort",toEl:rt,originalEvent:t})),P.active&&((Dt==null||Dt===-1)&&(Dt=He,he=xn),xt({sortable:this,name:"end",toEl:rt,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){At("nulling",this),et=R=rt=O=Ce=it=Qn=ce=Se=Ht=Rn=Dt=he=He=xn=ke=wn=_t=ti=P.dragged=P.ghost=P.clone=P.active=null,si.forEach(function(t){t.checked=!0}),si.length=Er=br=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":R&&(this._onDragOver(t),hc(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,i=this.el.children,r=0,s=i.length,o=this.options;r<s;r++)e=i[r],Xt(e,o.draggable,this.el,!1)&&t.push(e.getAttribute(o.dataIdAttr)||_c(e));return t},sort:function(t,e){var i={},r=this.el;this.toArray().forEach(function(s,o){var a=r.children[o];Xt(a,this.options.draggable,r,!1)&&(i[s]=a)},this),e&&this.captureAnimationState(),t.forEach(function(s){i[s]&&(r.removeChild(i[s]),r.appendChild(i[s]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return Xt(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(e===void 0)return i[t];var r=Tn.modifyOption(this,t,e);typeof r<"u"?i[t]=r:i[t]=e,t==="group"&&wo(i)},destroy:function(){At("destroy",this);var t=this.el;t[Lt]=null,H(t,"mousedown",this._onTapStart),H(t,"touchstart",this._onTapStart),H(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(H(t,"dragover",this),H(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),ni.splice(ni.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!ce){if(At("hideClone",this),P.eventCanceled)return;$(it,"display","none"),this.options.removeCloneOnHide&&it.parentNode&&it.parentNode.removeChild(it),ce=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(ce){if(At("showClone",this),P.eventCanceled)return;R.parentNode==et&&!this.options.group.revertClone?et.insertBefore(it,R):Ce?et.insertBefore(it,Ce):et.appendChild(it),this.options.group.revertClone&&this.animate(R,it),$(it,"display",""),ce=!1}}};function hc(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function li(n,t,e,i,r,s,o,a){var l,u=n[Lt],h=u.options.onMove,c;return window.CustomEvent&&!ne&&!En?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=n,l.dragged=e,l.draggedRect=i,l.related=r||t,l.relatedRect=s||lt(t),l.willInsertAfter=a,l.originalEvent=o,n.dispatchEvent(l),h&&(c=h.call(u,l,o)),c}function xr(n){n.draggable=!1}function dc(){Tr=!1}function fc(n,t,e){var i=lt(Be(e.el,0,e.options,!0)),r=Eo(e.el,e.options,O),s=10;return t?n.clientX<r.left-s||n.clientY<i.top&&n.clientX<i.right:n.clientY<r.top-s||n.clientY<i.bottom&&n.clientX<i.left}function gc(n,t,e){var i=lt(mr(e.el,e.options.draggable)),r=Eo(e.el,e.options,O),s=10;return t?n.clientX>r.right+s||n.clientY>i.bottom&&n.clientX>i.left:n.clientY>r.bottom+s||n.clientX>i.right&&n.clientY>i.top}function pc(n,t,e,i,r,s,o,a){var l=i?n.clientY:n.clientX,u=i?e.height:e.width,h=i?e.top:e.left,c=i?e.bottom:e.right,d=!1;if(!o){if(a&&ri<u*r){if(!Cn&&(wn===1?l>h+u*s/2:l<c-u*s/2)&&(Cn=!0),Cn)d=!0;else if(wn===1?l<h+ri:l>c-ri)return-wn}else if(l>h+u*(1-r)/2&&l<c-u*(1-r)/2)return mc(t)}return d=d||o,d&&(l<h+u*s/2||l>c-u*s/2)?l>h+u/2?1:-1:0}function mc(n){return Ft(R)<Ft(n)?1:-1}function _c(n){for(var t=n.tagName+n.className+n.src+n.href+n.textContent,e=t.length,i=0;e--;)i+=t.charCodeAt(e);return i.toString(36)}function yc(n){si.length=0;for(var t=n.getElementsByTagName("input"),e=t.length;e--;){var i=t[e];i.checked&&si.push(i)}}function ui(n){return setTimeout(n,0)}function Rr(n){return clearTimeout(n)}oi&&z(document,"touchmove",function(n){(P.active||Ge)&&n.cancelable&&n.preventDefault()}),P.utils={on:z,off:H,css:$,find:fo,is:function(t,e){return!!Xt(t,e,t,!1)},extend:tc,throttle:mo,closest:Xt,toggleClass:Ot,clone:yo,index:Ft,nextTick:ui,cancelNextTick:Rr,detectDirection:Ro,getChild:Be},P.get=function(n){return n[Lt]},P.mount=function(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(P.utils=jt(jt({},P.utils),i.utils)),Tn.mount(i)})},P.create=function(n,t){return new P(n,t)},P.version=qu;var ut=[],Sn,wr,Cr=!1,Sr,Ar,ci,An;function Ec(){function n(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return n.prototype={dragStarted:function(e){var i=e.originalEvent;this.sortable.nativeDraggable?z(document,"dragover",this._handleAutoScroll):this.options.supportPointer?z(document,"pointermove",this._handleFallbackAutoScroll):i.touches?z(document,"touchmove",this._handleFallbackAutoScroll):z(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var i=e.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?H(document,"dragover",this._handleAutoScroll):(H(document,"pointermove",this._handleFallbackAutoScroll),H(document,"touchmove",this._handleFallbackAutoScroll),H(document,"mousemove",this._handleFallbackAutoScroll)),Ao(),hi(),ec()},nulling:function(){ci=wr=Sn=Cr=An=Sr=Ar=null,ut.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,i){var r=this,s=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(s,o);if(ci=e,i||this.options.forceAutoScrollFallback||En||ne||bn){Ir(e,this.options,a,i);var l=ue(a,!0);Cr&&(!An||s!==Sr||o!==Ar)&&(An&&Ao(),An=setInterval(function(){var u=ue(document.elementFromPoint(s,o),!0);u!==l&&(l=u,hi()),Ir(e,r.options,u,i)},10),Sr=s,Ar=o)}else{if(!this.options.bubbleScroll||ue(a,!0)===zt()){hi();return}Ir(e,this.options,ue(a,!1),!1)}}},te(n,{pluginName:"scroll",initializeByDefault:!0})}function hi(){ut.forEach(function(n){clearInterval(n.pid)}),ut=[]}function Ao(){clearInterval(An)}var Ir=mo(function(n,t,e,i){if(t.scroll){var r=(n.touches?n.touches[0]:n).clientX,s=(n.touches?n.touches[0]:n).clientY,o=t.scrollSensitivity,a=t.scrollSpeed,l=zt(),u=!1,h;wr!==e&&(wr=e,hi(),Sn=t.scroll,h=t.scrollFn,Sn===!0&&(Sn=ue(e,!0)));var c=0,d=Sn;do{var f=d,g=lt(f),p=g.top,m=g.bottom,y=g.left,_=g.right,T=g.width,E=g.height,b=void 0,v=void 0,C=f.scrollWidth,w=f.scrollHeight,I=$(f),X=f.scrollLeft,F=f.scrollTop;f===l?(b=T<C&&(I.overflowX==="auto"||I.overflowX==="scroll"||I.overflowX==="visible"),v=E<w&&(I.overflowY==="auto"||I.overflowY==="scroll"||I.overflowY==="visible")):(b=T<C&&(I.overflowX==="auto"||I.overflowX==="scroll"),v=E<w&&(I.overflowY==="auto"||I.overflowY==="scroll"));var V=b&&(Math.abs(_-r)<=o&&X+T<C)-(Math.abs(y-r)<=o&&!!X),q=v&&(Math.abs(m-s)<=o&&F+E<w)-(Math.abs(p-s)<=o&&!!F);if(!ut[c])for(var J=0;J<=c;J++)ut[J]||(ut[J]={});(ut[c].vx!=V||ut[c].vy!=q||ut[c].el!==f)&&(ut[c].el=f,ut[c].vx=V,ut[c].vy=q,clearInterval(ut[c].pid),(V!=0||q!=0)&&(u=!0,ut[c].pid=setInterval((function(){i&&this.layer===0&&P.active._onTouchMove(ci);var at=ut[this.layer].vy?ut[this.layer].vy*a:0,Q=ut[this.layer].vx?ut[this.layer].vx*a:0;typeof h=="function"&&h.call(P.dragged.parentNode[Lt],Q,at,n,ci,ut[this.layer].el)!=="continue"||_o(ut[this.layer].el,Q,at)}).bind({layer:c}),24))),c++}while(t.bubbleScroll&&d!==l&&(d=ue(d,!1)));Cr=u}},30),Io=function(t){var e=t.originalEvent,i=t.putSortable,r=t.dragEl,s=t.activeSortable,o=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var u=i||s;a();var h=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(h.clientX,h.clientY);l(),u&&!u.el.contains(c)&&(o("spill"),this.onSpill({dragEl:r,putSortable:i}))}};function $r(){}$r.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var r=Be(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:Io},te($r,{pluginName:"revertOnSpill"});function Pr(){}Pr.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable,r=i||this.sortable;r.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),r.animateAll()},drop:Io},te(Pr,{pluginName:"removeOnSpill"}),P.mount(new Ec),P.mount(Pr,$r);const bc=n=>{const t=n.item;let e=Array.prototype.slice.call(t.parentNode.childNodes);return e=e.filter(i=>i.nodeType!=Node.ELEMENT_NODE||!i.classList.contains("sortable-fallback")),e},vc=(n,t,e,i,r,s)=>{const a=n.item.parentNode;for(const p of e)a.appendChild(p);if(n.oldIndex==n.newIndex)return;const l=i.getArray(),u=n.item.querySelector("eox-layercontrol-layer").layer.get(r),h=l.find(p=>p.get(r)===u),c=s.dataset.layer,d=l.find(p=>p.get(r)==c);let f,g;for(f=0;f<l.length;f++)if(l[f]==h){i.removeAt(f);break}for(g=0;g<l.length;g++)if(l[g]===d){f>g?i.insertAt(g,h):i.insertAt(g+1,h);break}t.requestUpdate()};function Tc(n,t,e,i){let r=[],s=null;n._sortable=P.create(n,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:o=>r=bc(o),onMove:o=>{s=o.related},onEnd:o=>vc(o,i,r,t,e,s)})}function xc(n,t,e,i){const r=n.getArray();let s=!1;r.forEach(o=>{const a=o.ol_uid;o.get(t)||(o.set(t,a),s=!0),o.get(e)||(o.set(e,`layer ${a}`),s=!0),s&&i.requestUpdate()})}function Mr(n,t,e){let i=[];const r=(s,o,a)=>{i=[...i,...s.filter(u=>u.get(o)===a)];const l=s.filter(u=>u.getLayers);return l.length>0&&l.forEach(u=>r(u.getLayers().getArray(),o,a)),i};return r(n,t,e),i}function Rc(n,t,e){if(!n||!t)return!1;if(!$o(n,e))return!0;const i=n.get("minZoom"),r=n.get("maxZoom"),s=t.getView().getZoom();return s>i&&s<r}function $o(n,t){const e=n.get("minZoom"),i=n.get("maxZoom");return!!(t&&(e!==-1/0||i!==1/0))}function wc(n,t){var r,s,o;return!n||!t?void 0:n.getLayers?"group":((o=(r=t.getInteractions().getArray().filter(a=>a.freehand_!==void 0).map(a=>a.source_))==null?void 0:r.ol_uid)==null?void 0:o.includes(n.getSource?(s=n.getSource())==null?void 0:s.ol_uid:void 0))?"draw":n.declutter_!==void 0?"vector":"raster"}class Or{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const Cc={PROPERTYCHANGE:"propertychange"};class Po{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function Mo(n,t){return n>t?1:n<t?-1:0}function Sc(n,t){return n<t?1:n>t?-1:0}function Oo(n,t,e){if(n[0]<=t)return 0;const i=n.length;if(t<=n[i-1])return i-1;if(typeof e=="function"){for(let r=1;r<i;++r){const s=n[r];if(s===t)return r;if(s<t)return e(t,n[r-1],s)>0?r-1:r}return i-1}if(e>0){for(let r=1;r<i;++r)if(n[r]<t)return r-1;return i-1}if(e<0){for(let r=1;r<i;++r)if(n[r]<=t)return r;return i-1}for(let r=1;r<i;++r){if(n[r]==t)return r;if(n[r]<t)return n[r-1]-t<t-n[r]?r-1:r}return i-1}function Ac(n,t){const e=Array.isArray(t)?t:[t],i=e.length;for(let r=0;r<i;r++)n[n.length]=e[r]}function Ic(n,t){const e=n.length;if(e!==t.length)return!1;for(let i=0;i<e;i++)if(n[i]!==t[i])return!1;return!0}function Lr(){}function $c(n){let t=!1,e,i,r;return function(){const s=Array.prototype.slice.call(arguments);return(!t||this!==r||!Ic(s,i))&&(t=!0,r=this,i=s,e=n.apply(this,arguments)),e}}function Dr(n){for(const t in n)delete n[t]}function Pc(n){let t;for(t in n)return!1;return!t}class Nr extends Po{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),r=i[t]||(i[t]=[]);r.includes(e)||r.push(e)}dispatchEvent(t){const e=typeof t=="string",i=e?t:t.type,r=this.listeners_&&this.listeners_[i];if(!r)return;const s=e?new Or(t):t;s.target||(s.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});i in o||(o[i]=0,a[i]=0),++o[i];let l;for(let u=0,h=r.length;u<h;++u)if("handleEvent"in r[u]?l=r[u].handleEvent(s):l=r[u].call(this,s),l===!1||s.propagationStopped){l=!1;break}if(--o[i]===0){let u=a[i];for(delete a[i];u--;)this.removeEventListener(i,Lr);delete o[i]}return l}disposeInternal(){this.listeners_&&Dr(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){if(!this.listeners_)return;const i=this.listeners_[t];if(!i)return;const r=i.indexOf(e);r!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[r]=Lr,++this.pendingRemovals_[t]):(i.splice(r,1),i.length===0&&delete this.listeners_[t]))}}const It={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 de(n,t,e,i,r){if(i&&i!==n&&(e=e.bind(i)),r){const o=e;e=function(){n.removeEventListener(t,e),o.apply(this,arguments)}}const s={target:n,type:t,listener:e};return n.addEventListener(t,e),s}function di(n,t,e,i){return de(n,t,e,i,!0)}function Wt(n){n&&n.target&&(n.target.removeEventListener(n.type,n.listener),Dr(n))}class In extends Nr{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(It.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,r=new Array(i);for(let s=0;s<i;++s)r[s]=de(this,t[s],e);return r}return de(this,t,e)}onceInternal(t,e){let i;if(Array.isArray(t)){const r=t.length;i=new Array(r);for(let s=0;s<r;++s)i[s]=di(this,t[s],e)}else i=di(this,t,e);return e.ol_key=i,i}unInternal(t,e){const i=e.ol_key;if(i)Mc(i);else if(Array.isArray(t))for(let r=0,s=t.length;r<s;++r)this.removeEventListener(t[r],e);else this.removeEventListener(t,e)}}In.prototype.on,In.prototype.once,In.prototype.un;function Mc(n){if(Array.isArray(n))for(let t=0,e=n.length;t<e;++t)Wt(n[t]);else Wt(n)}function ot(){throw new Error("Unimplemented abstract method.")}let Oc=0;function Yt(n){return n.ol_uid||(n.ol_uid=String(++Oc))}class Lo extends Or{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}}class Ur extends In{constructor(t){super(),this.on,this.once,this.un,Yt(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_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(t,e){let i;i=`change:${t}`,this.hasListener(i)&&this.dispatchEvent(new Lo(i,t,e)),i=Cc.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new Lo(i,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,i){const r=this.values_||(this.values_={});if(i)r[t]=e;else{const s=r[t];r[t]=e,s!==e&&this.notify(t,s)}}setProperties(t,e){for(const i in t)this.set(i,t[i],e)}applyProperties(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const i=this.values_[t];delete this.values_[t],Pc(this.values_)&&(this.values_=null),e||this.notify(t,i)}}}const W={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"};function Bt(n,t){if(!n)throw new Error(t)}function ft(n,t,e){return Math.min(Math.max(n,t),e)}function Lc(n,t,e,i,r,s){const o=r-e,a=s-i;if(o!==0||a!==0){const l=((n-e)*o+(t-i)*a)/(o*o+a*a);l>1?(e=r,i=s):l>0&&(e+=o*l,i+=a*l)}return Ve(n,t,e,i)}function Ve(n,t,e,i){const r=e-n,s=i-t;return r*r+s*s}function Dc(n){const t=n.length;for(let i=0;i<t;i++){let r=i,s=Math.abs(n[i][i]);for(let a=i+1;a<t;a++){const l=Math.abs(n[a][i]);l>s&&(s=l,r=a)}if(s===0)return null;const o=n[r];n[r]=n[i],n[i]=o;for(let a=i+1;a<t;a++){const l=-n[a][i]/n[i][i];for(let u=i;u<t+1;u++)i==u?n[a][u]=0:n[a][u]+=l*n[i][u]}}const e=new Array(t);for(let i=t-1;i>=0;i--){e[i]=n[i][t]/n[i][i];for(let r=i-1;r>=0;r--)n[r][t]-=n[r][i]*e[i]}return e}function fi(n){return n*Math.PI/180}function $n(n,t){const e=n%t;return e*t<0?e+t:e}function Nc(n,t,e){return n+e*(t-n)}class Uc extends Ur{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[W.OPACITY]=t.opacity!==void 0?t.opacity:1,Bt(typeof e[W.OPACITY]=="number","Layer opacity must be a number"),e[W.VISIBLE]=t.visible!==void 0?t.visible:!0,e[W.Z_INDEX]=t.zIndex,e[W.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[W.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[W.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[W.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},i=this.getZIndex();return e.opacity=ft(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=i===void 0&&!e.managed?1/0:i,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 ot()}getLayerStatesArray(t){return ot()}getExtent(){return this.get(W.EXTENT)}getMaxResolution(){return this.get(W.MAX_RESOLUTION)}getMinResolution(){return this.get(W.MIN_RESOLUTION)}getMinZoom(){return this.get(W.MIN_ZOOM)}getMaxZoom(){return this.get(W.MAX_ZOOM)}getOpacity(){return this.get(W.OPACITY)}getSourceState(){return ot()}getVisible(){return this.get(W.VISIBLE)}getZIndex(){return this.get(W.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(W.EXTENT,t)}setMaxResolution(t){this.set(W.MAX_RESOLUTION,t)}setMinResolution(t){this.set(W.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(W.MAX_ZOOM,t)}setMinZoom(t){this.set(W.MIN_ZOOM,t)}setOpacity(t){Bt(typeof t=="number","Layer opacity must be a number"),this.set(W.OPACITY,t)}setVisible(t){this.set(W.VISIBLE,t)}setZIndex(t){this.set(W.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const Ie={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},fe={ANIMATING:0,INTERACTING:1},Gt={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Fc=256,gi={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class Do{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_||gi[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 Pn=6378137,je=Math.PI*Pn,Bc=[-je,-je,je,je],Xc=[-180,-85,180,85],pi=Pn*Math.log(Math.tan(Math.PI/2));class ze extends Do{constructor(t){super({code:t,units:"m",extent:Bc,global:!0,worldExtent:Xc,getPointResolution:function(e,i){return e/Math.cosh(i[1]/Pn)}})}}const No=[new ze("EPSG:3857"),new ze("EPSG:102100"),new ze("EPSG:102113"),new ze("EPSG:900913"),new ze("http://www.opengis.net/def/crs/EPSG/0/3857"),new ze("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Hc(n,t,e){const i=n.length;e=e>1?e:2,t===void 0&&(e>2?t=n.slice():t=new Array(i));for(let r=0;r<i;r+=e){t[r]=je*n[r]/180;let s=Pn*Math.log(Math.tan(Math.PI*(+n[r+1]+90)/360));s>pi?s=pi:s<-pi&&(s=-pi),t[r+1]=s}return t}function Gc(n,t,e){const i=n.length;e=e>1?e:2,t===void 0&&(e>2?t=n.slice():t=new Array(i));for(let r=0;r<i;r+=e)t[r]=180*n[r]/je,t[r+1]=360*Math.atan(Math.exp(n[r+1]/Pn))/Math.PI-90;return t}const kc=6378137,Uo=[-180,-90,180,90],Vc=Math.PI*kc/180;class $e extends Do{constructor(t,e){super({code:t,units:"degrees",extent:Uo,axisOrientation:e,global:!0,metersPerUnit:Vc,worldExtent:Uo})}}const Fo=[new $e("CRS:84"),new $e("EPSG:4326","neu"),new $e("urn:ogc:def:crs:OGC:1.3:CRS84"),new $e("urn:ogc:def:crs:OGC:2:84"),new $e("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new $e("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new $e("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Fr={};function jc(n){return Fr[n]||Fr[n.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function zc(n,t){Fr[n]=t}let We={};function mi(n,t,e){const i=n.getCode(),r=t.getCode();i in We||(We[i]={}),We[i][r]=e}function Wc(n,t){let e;return n in We&&t in We[n]&&(e=We[n][t]),e}const yt={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function Br(n){const t=Ye();for(let e=0,i=n.length;e<i;++e)_i(t,n[e]);return t}function Bo(n,t,e){let i,r;return t<n[0]?i=n[0]-t:n[2]<t?i=t-n[2]:i=0,e<n[1]?r=n[1]-e:n[3]<e?r=e-n[3]:r=0,i*i+r*r}function Xr(n,t){return Xo(n,t[0],t[1])}function Yc(n,t){return n[0]<=t[0]&&t[2]<=n[2]&&n[1]<=t[1]&&t[3]<=n[3]}function Xo(n,t,e){return n[0]<=t&&t<=n[2]&&n[1]<=e&&e<=n[3]}function Ho(n,t){const e=n[0],i=n[1],r=n[2],s=n[3],o=t[0],a=t[1];let l=yt.UNKNOWN;return o<e?l=l|yt.LEFT:o>r&&(l=l|yt.RIGHT),a<i?l=l|yt.BELOW:a>s&&(l=l|yt.ABOVE),l===yt.UNKNOWN&&(l=yt.INTERSECTING),l}function Ye(){return[1/0,1/0,-1/0,-1/0]}function Hr(n,t,e,i,r){return r?(r[0]=n,r[1]=t,r[2]=e,r[3]=i,r):[n,t,e,i]}function Gr(n){return Hr(1/0,1/0,-1/0,-1/0,n)}function Zc(n,t){const e=n[0],i=n[1];return Hr(e,i,e,i,t)}function Kc(n,t,e,i,r){const s=Gr(r);return Go(s,n,t,e,i)}function qc(n,t){return t[0]<n[0]&&(n[0]=t[0]),t[2]>n[2]&&(n[2]=t[2]),t[1]<n[1]&&(n[1]=t[1]),t[3]>n[3]&&(n[3]=t[3]),n}function _i(n,t){t[0]<n[0]&&(n[0]=t[0]),t[0]>n[2]&&(n[2]=t[0]),t[1]<n[1]&&(n[1]=t[1]),t[1]>n[3]&&(n[3]=t[1])}function Go(n,t,e,i,r){for(;e<i;e+=r)Jc(n,t[e],t[e+1]);return n}function Jc(n,t,e){n[0]=Math.min(n[0],t),n[1]=Math.min(n[1],e),n[2]=Math.max(n[2],t),n[3]=Math.max(n[3],e)}function ko(n,t){let e;return e=t(Vo(n)),e||(e=t(jo(n)),e)||(e=t(zo(n)),e)||(e=t(kr(n)),e)?e:!1}function Mn(n){let t=0;return Ei(n)||(t=ct(n)*kt(n)),t}function Vo(n){return[n[0],n[1]]}function jo(n){return[n[2],n[1]]}function Ze(n){return[(n[0]+n[2])/2,(n[1]+n[3])/2]}function Qc(n,t,e,i,r){const[s,o,a,l,u,h,c,d]=th(n,t,e,i);return Hr(Math.min(s,a,u,c),Math.min(o,l,h,d),Math.max(s,a,u,c),Math.max(o,l,h,d),r)}function th(n,t,e,i){const r=t*i[0]/2,s=t*i[1]/2,o=Math.cos(e),a=Math.sin(e),l=r*o,u=r*a,h=s*o,c=s*a,d=n[0],f=n[1];return[d-l+c,f-u-h,d-l-c,f-u+h,d+l-c,f+u+h,d+l+c,f+u-h,d-l+c,f-u-h]}function kt(n){return n[3]-n[1]}function Zt(n,t,e){const i=e||Ye();return yi(n,t)?(n[0]>t[0]?i[0]=n[0]:i[0]=t[0],n[1]>t[1]?i[1]=n[1]:i[1]=t[1],n[2]<t[2]?i[2]=n[2]:i[2]=t[2],n[3]<t[3]?i[3]=n[3]:i[3]=t[3]):Gr(i),i}function kr(n){return[n[0],n[3]]}function zo(n){return[n[2],n[3]]}function ct(n){return n[2]-n[0]}function yi(n,t){return n[0]<=t[2]&&n[2]>=t[0]&&n[1]<=t[3]&&n[3]>=t[1]}function Ei(n){return n[2]<n[0]||n[3]<n[1]}function eh(n,t){return t?(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t):n}function nh(n,t,e){let i=!1;const r=Ho(n,t),s=Ho(n,e);if(r===yt.INTERSECTING||s===yt.INTERSECTING)i=!0;else{const o=n[0],a=n[1],l=n[2],u=n[3],h=t[0],c=t[1],d=e[0],f=e[1],g=(f-c)/(d-h);let p,m;s&yt.ABOVE&&!(r&yt.ABOVE)&&(p=d-(f-u)/g,i=p>=o&&p<=l),!i&&s&yt.RIGHT&&!(r&yt.RIGHT)&&(m=f-(d-l)*g,i=m>=a&&m<=u),!i&&s&yt.BELOW&&!(r&yt.BELOW)&&(p=d-(f-a)/g,i=p>=o&&p<=l),!i&&s&yt.LEFT&&!(r&yt.LEFT)&&(m=f-(d-o)*g,i=m>=a&&m<=u)}return i}function ih(n,t){const e=t.getExtent(),i=Ze(n);if(t.canWrapX()&&(i[0]<e[0]||i[0]>=e[2])){const r=ct(e),o=Math.floor((i[0]-e[0])/r)*r;n[0]-=o,n[2]-=o}return n}function Wo(n,t,e){if(t.canWrapX()){const i=t.getExtent();if(!isFinite(n[0])||!isFinite(n[2]))return[[i[0],n[1],i[2],n[3]]];ih(n,t);const r=ct(i);if(ct(n)>r&&!e)return[[i[0],n[1],i[2],n[3]]];if(n[0]<i[0])return[[n[0]+r,n[1],i[2],n[3]],[i[0],n[1],n[2],n[3]]];if(n[2]>i[2])return[[n[0],n[1],i[2],n[3]],[i[0],n[1],n[2]-r,n[3]]]}return[n]}function rh(n,t){return n[0]+=+t[0],n[1]+=+t[1],n}function bi(n,t){let e=!0;for(let i=n.length-1;i>=0;--i)if(n[i]!=t[i]){e=!1;break}return e}function sh(n,t){const e=Math.cos(t),i=Math.sin(t),r=n[0]*e-n[1]*i,s=n[1]*e+n[0]*i;return n[0]=r,n[1]=s,n}const oh=63710088e-1;function Yo(n,t,e){e=e||oh;const i=fi(n[1]),r=fi(t[1]),s=(r-i)/2,o=fi(t[0]-n[0])/2,a=Math.sin(s)*Math.sin(s)+Math.sin(o)*Math.sin(o)*Math.cos(i)*Math.cos(r);return 2*e*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function ah(...n){console.warn(...n)}let Vr=!0;function lh(n){Vr=!(n===void 0?!0:n)}function Zo(n,t){if(t!==void 0){for(let e=0,i=n.length;e<i;++e)t[e]=n[e];t=t}else t=n.slice();return t}function Ko(n,t){if(t!==void 0&&n!==t){for(let e=0,i=n.length;e<i;++e)t[e]=n[e];n=t}return n}function uh(n){zc(n.getCode(),n),mi(n,n,Zo)}function ch(n){n.forEach(uh)}function Pe(n){return typeof n=="string"?jc(n):n||null}function qo(n,t,e,i){n=Pe(n);let r;const s=n.getPointResolutionFunc();if(s){if(r=s(t,e),i&&i!==n.getUnits()){const o=n.getMetersPerUnit();o&&(r=r*o/gi[i])}}else{const o=n.getUnits();if(o=="degrees"&&!i||i=="degrees")r=t;else{const a=Qo(n,Pe("EPSG:4326"));if(a===Ko&&o!=="degrees")r=t*n.getMetersPerUnit();else{let u=[e[0]-t/2,e[1],e[0]+t/2,e[1],e[0],e[1]-t/2,e[0],e[1]+t/2];u=a(u,u,2);const h=Yo(u.slice(0,2),u.slice(2,4)),c=Yo(u.slice(4,6),u.slice(6,8));r=(h+c)/2}const l=i?gi[i]:n.getMetersPerUnit();l!==void 0&&(r/=l)}}return r}function Jo(n){ch(n),n.forEach(function(t){n.forEach(function(e){t!==e&&mi(t,e,Zo)})})}function hh(n,t,e,i){n.forEach(function(r){t.forEach(function(s){mi(r,s,e),mi(s,r,i)})})}function jr(n,t){return n?typeof n=="string"?Pe(n):n:Pe(t)}function Qo(n,t){const e=n.getCode(),i=t.getCode();let r=Wc(e,i);return r||(r=Ko),r}function vi(n,t){const e=Pe(n),i=Pe(t);return Qo(e,i)}function dh(n,t,e){return vi(t,e)(n,void 0,n.length)}function ta(n,t){return n}function ge(n,t){return Vr&&!bi(n,[0,0])&&n[0]>=-180&&n[0]<=180&&n[1]>=-90&&n[1]<=90&&(Vr=!1,ah("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),n}function fh(n,t){return n}function Ke(n,t){return n}function gh(){Jo(No),Jo(Fo),hh(Fo,No,Hc,Gc)}gh();function ea(n,t,e){return function(i,r,s,o,a){if(!i)return;if(!r&&!t)return i;const l=t?0:s[0]*r,u=t?0:s[1]*r,h=a?a[0]:0,c=a?a[1]:0;let d=n[0]+l/2+h,f=n[2]-l/2+h,g=n[1]+u/2+c,p=n[3]-u/2+c;d>f&&(d=(f+d)/2,f=d),g>p&&(g=(p+g)/2,p=g);let m=ft(i[0],d,f),y=ft(i[1],g,p);if(o&&e&&r){const _=30*r;m+=-_*Math.log(1+Math.max(0,d-i[0])/_)+_*Math.log(1+Math.max(0,i[0]-f)/_),y+=-_*Math.log(1+Math.max(0,g-i[1])/_)+_*Math.log(1+Math.max(0,i[1]-p)/_)}return[m,y]}}function ph(n){return n}function zr(n,t,e,i){const r=ct(t)/e[0],s=kt(t)/e[1];return i?Math.min(n,Math.max(r,s)):Math.min(n,Math.min(r,s))}function Wr(n,t,e){let i=Math.min(n,t);const r=50;return i*=Math.log(1+r*Math.max(0,n/t-1))/r+1,e&&(i=Math.max(i,e),i/=Math.log(1+r*Math.max(0,e/n-1))/r+1),ft(i,e/2,t*2)}function mh(n,t,e,i){return t=t!==void 0?t:!0,function(r,s,o,a){if(r!==void 0){const l=n[0],u=n[n.length-1],h=e?zr(l,e,o,i):l;if(a)return t?Wr(r,h,u):ft(r,u,h);const c=Math.min(h,r),d=Math.floor(Oo(n,c,s));return n[d]>h&&d<n.length-1?n[d+1]:n[d]}}}function _h(n,t,e,i,r,s){return i=i!==void 0?i:!0,e=e!==void 0?e:0,function(o,a,l,u){if(o!==void 0){const h=r?zr(t,r,l,s):t;if(u)return i?Wr(o,h,e):ft(o,e,h);const c=1e-9,d=Math.ceil(Math.log(t/h)/Math.log(n)-c),f=-a*(.5-c)+.5,g=Math.min(h,o),p=Math.floor(Math.log(t/g)/Math.log(n)+f),m=Math.max(d,p),y=t/Math.pow(n,m);return ft(y,e,h)}}}function na(n,t,e,i,r){return e=e!==void 0?e:!0,function(s,o,a,l){if(s!==void 0){const u=i?zr(n,i,a,r):n;return!e||!l?ft(s,t,u):Wr(s,u,t)}}}function yh(n){if(n!==void 0)return 0}function ia(n){if(n!==void 0)return n}function Eh(n){const t=2*Math.PI/n;return function(e,i){if(i)return e;if(e!==void 0)return e=Math.floor(e/t+.5)*t,e}}function bh(n){const t=n===void 0?fi(5):n;return function(e,i){return i||e===void 0?e:Math.abs(e)<=t?0:e}}function ra(n){return Math.pow(n,3)}function vh(n){return 1-ra(1-n)}function Th(n){return 3*n*n-2*n*n*n}const Yr=new Array(6);function On(){return[1,0,0,1,0,0]}function xh(n){return Ti(n,1,0,0,1,0,0)}function Zr(n,t){const e=n[0],i=n[1],r=n[2],s=n[3],o=n[4],a=n[5],l=t[0],u=t[1],h=t[2],c=t[3],d=t[4],f=t[5];return n[0]=e*l+r*u,n[1]=i*l+s*u,n[2]=e*h+r*c,n[3]=i*h+s*c,n[4]=e*d+r*f+o,n[5]=i*d+s*f+a,n}function Ti(n,t,e,i,r,s,o){return n[0]=t,n[1]=e,n[2]=i,n[3]=r,n[4]=s,n[5]=o,n}function Rh(n,t){const e=t[0],i=t[1];return t[0]=n[0]*e+n[2]*i+n[4],t[1]=n[1]*e+n[3]*i+n[5],t}function wh(n,t){const e=Math.cos(t),i=Math.sin(t);return Zr(n,Ti(Yr,e,i,-i,e,0,0))}function sa(n,t,e){return Zr(n,Ti(Yr,t,0,0,e,0,0))}function Ch(n,t,e){return Zr(n,Ti(Yr,1,0,0,1,t,e))}function Kr(n,t,e,i,r,s,o,a){const l=Math.sin(s),u=Math.cos(s);return n[0]=i*u,n[1]=r*l,n[2]=-i*l,n[3]=r*u,n[4]=o*i*u-a*i*l+t,n[5]=o*r*l+a*r*u+e,n}function Sh(n,t,e,i,r,s){s=s||[];let o=0;for(let a=t;a<e;a+=i){const l=n[a],u=n[a+1];s[o++]=r[0]*l+r[2]*u+r[4],s[o++]=r[1]*l+r[3]*u+r[5]}return s&&s.length!=o&&(s.length=o),s}function Ah(n,t,e,i,r,s,o){o=o||[];const a=Math.cos(r),l=Math.sin(r),u=s[0],h=s[1];let c=0;for(let d=t;d<e;d+=i){const f=n[d]-u,g=n[d+1]-h;o[c++]=u+f*a-g*l,o[c++]=h+f*l+g*a;for(let p=d+2;p<d+i;++p)o[c++]=n[p]}return o&&o.length!=c&&(o.length=c),o}function Ih(n,t,e,i,r,s,o,a){a=a||[];const l=o[0],u=o[1];let h=0;for(let c=t;c<e;c+=i){const d=n[c]-l,f=n[c+1]-u;a[h++]=l+r*d,a[h++]=u+s*f;for(let g=c+2;g<c+i;++g)a[h++]=n[g]}return a&&a.length!=h&&(a.length=h),a}function $h(n,t,e,i,r,s,o){o=o||[];let a=0;for(let l=t;l<e;l+=i){o[a++]=n[l]+r,o[a++]=n[l+1]+s;for(let u=l+2;u<l+i;++u)o[a++]=n[u]}return o&&o.length!=a&&(o.length=a),o}const oa=On();class Ph extends Ur{constructor(){super(),this.extent_=Ye(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=$c((t,e,i)=>{if(!i)return this.getSimplifiedGeometry(e);const r=this.clone();return r.applyTransform(i),r.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return ot()}closestPointXY(t,e,i,r){return ot()}containsXY(t,e){const i=this.getClosestPoint([t,e]);return i[0]===t&&i[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 ot()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&Gr(e),this.extentRevision_=this.getRevision()}return eh(this.extent_,t)}rotate(t,e){ot()}scale(t,e,i){ot()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return ot()}getType(){return ot()}applyTransform(t){ot()}intersectsExtent(t){return ot()}translate(t,e){ot()}transform(t,e){const i=Pe(t),r=i.getUnits()=="tile-pixels"?function(s,o,a){const l=i.getExtent(),u=i.getWorldExtent(),h=kt(u)/kt(l);return Kr(oa,u[0],u[3],h,-h,0,0,0),Sh(s,0,s.length,a,oa,o),vi(i,e)(s,o,a)}:vi(i,e);return this.applyTransform(r),this}}class qr extends Ph{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return Kc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return ot()}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=aa(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){ot()}setLayout(t,e,i){let r;if(t)r=aa(t);else{for(let s=0;s<i;++s){if(e.length===0){this.layout="XY",this.stride=2;return}e=e[0]}r=e.length,t=Mh(r)}this.layout=t,this.stride=r}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const i=this.getFlatCoordinates();if(i){const r=this.getStride();Ah(i,0,i.length,r,t,e,i),this.changed()}}scale(t,e,i){e===void 0&&(e=t),i||(i=Ze(this.getExtent()));const r=this.getFlatCoordinates();if(r){const s=this.getStride();Ih(r,0,r.length,s,t,e,i,r),this.changed()}}translate(t,e){const i=this.getFlatCoordinates();if(i){const r=this.getStride();$h(i,0,i.length,r,t,e,i),this.changed()}}}function Mh(n){let t;return n==2?t="XY":n==3?t="XYZ":n==4&&(t="XYZM"),t}function aa(n){let t;return n=="XY"?t=2:n=="XYZ"||n=="XYM"?t=3:n=="XYZM"&&(t=4),t}function la(n,t,e,i,r,s,o){const a=n[t],l=n[t+1],u=n[e]-a,h=n[e+1]-l;let c;if(u===0&&h===0)c=t;else{const d=((r-a)*u+(s-l)*h)/(u*u+h*h);if(d>1)c=e;else if(d>0){for(let f=0;f<i;++f)o[f]=Nc(n[t+f],n[e+f],d);o.length=i;return}else c=t}for(let d=0;d<i;++d)o[d]=n[c+d];o.length=i}function ua(n,t,e,i,r){let s=n[t],o=n[t+1];for(t+=i;t<e;t+=i){const a=n[t],l=n[t+1],u=Ve(s,o,a,l);u>r&&(r=u),s=a,o=l}return r}function Oh(n,t,e,i,r){for(let s=0,o=e.length;s<o;++s){const a=e[s];r=ua(n,t,a,i,r),t=a}return r}function ca(n,t,e,i,r,s,o,a,l,u,h){if(t==e)return u;let c,d;if(r===0){if(d=Ve(o,a,n[t],n[t+1]),d<u){for(c=0;c<i;++c)l[c]=n[t+c];return l.length=i,d}return u}h=h||[NaN,NaN];let f=t+i;for(;f<e;)if(la(n,f-i,f,i,o,a,h),d=Ve(o,a,h[0],h[1]),d<u){for(u=d,c=0;c<i;++c)l[c]=h[c];l.length=i,f+=i}else f+=i*Math.max((Math.sqrt(d)-Math.sqrt(u))/r|0,1);if(s&&(la(n,e-i,t,i,o,a,h),d=Ve(o,a,h[0],h[1]),d<u)){for(u=d,c=0;c<i;++c)l[c]=h[c];l.length=i}return u}function Lh(n,t,e,i,r,s,o,a,l,u,h){h=h||[NaN,NaN];for(let c=0,d=e.length;c<d;++c){const f=e[c];u=ca(n,t,f,i,r,s,o,a,l,u,h),t=f}return u}function Dh(n,t,e,i){for(let r=0,s=e.length;r<s;++r)n[t++]=e[r];return t}function ha(n,t,e,i){for(let r=0,s=e.length;r<s;++r){const o=e[r];for(let a=0;a<i;++a)n[t++]=o[a]}return t}function Nh(n,t,e,i,r){r=r||[];let s=0;for(let o=0,a=e.length;o<a;++o){const l=ha(n,t,e[o],i);r[s++]=l,t=l}return r.length=s,r}function Uh(n,t,e,i,r,s,o){const a=(e-t)/i;if(a<3){for(;t<e;t+=i)s[o++]=n[t],s[o++]=n[t+1];return o}const l=new Array(a);l[0]=1,l[a-1]=1;const u=[t,e-i];let h=0;for(;u.length>0;){const c=u.pop(),d=u.pop();let f=0;const g=n[d],p=n[d+1],m=n[c],y=n[c+1];for(let _=d+i;_<c;_+=i){const T=n[_],E=n[_+1],b=Lc(T,E,g,p,m,y);b>f&&(h=_,f=b)}f>r&&(l[(h-t)/i]=1,d+i<h&&u.push(d,h),h+i<c&&u.push(h,c))}for(let c=0;c<a;++c)l[c]&&(s[o++]=n[t+c*i],s[o++]=n[t+c*i+1]);return o}function qe(n,t){return t*Math.round(n/t)}function Fh(n,t,e,i,r,s,o){if(t==e)return o;let a=qe(n[t],r),l=qe(n[t+1],r);t+=i,s[o++]=a,s[o++]=l;let u,h;do if(u=qe(n[t],r),h=qe(n[t+1],r),t+=i,t==e)return s[o++]=u,s[o++]=h,o;while(u==a&&h==l);for(;t<e;){const c=qe(n[t],r),d=qe(n[t+1],r);if(t+=i,c==u&&d==h)continue;const f=u-a,g=h-l,p=c-a,m=d-l;if(f*m==g*p&&(f<0&&p<f||f==p||f>0&&p>f)&&(g<0&&m<g||g==m||g>0&&m>g)){u=c,h=d;continue}s[o++]=u,s[o++]=h,a=u,l=h,u=c,h=d}return s[o++]=u,s[o++]=h,o}function Bh(n,t,e,i,r,s,o,a){for(let l=0,u=e.length;l<u;++l){const h=e[l];o=Fh(n,t,h,i,r,s,o),a.push(o),t=h}return o}function da(n,t,e,i,r){r=r!==void 0?r:[];let s=0;for(let o=t;o<e;o+=i)r[s++]=n.slice(o,o+i);return r.length=s,r}function Xh(n,t,e,i,r){r=r!==void 0?r:[];let s=0;for(let o=0,a=e.length;o<a;++o){const l=e[o];r[s++]=da(n,t,l,i,r[s]),t=l}return r.length=s,r}function fa(n,t,e,i){let r=0;const s=n[e-i],o=n[e-i+1];let a=0,l=0;for(;t<e;t+=i){const u=n[t]-s,h=n[t+1]-o;r+=l*u-a*h,a=u,l=h}return r/2}function Hh(n,t,e,i){let r=0;for(let s=0,o=e.length;s<o;++s){const a=e[s];r+=fa(n,t,a,i),t=a}return r}class Ln extends qr{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 Ln(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,r){return r<Bo(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(ua(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ca(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,r))}getArea(){return fa(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return da(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 Ln(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ha(this.flatCoordinates,0,t,this.stride),this.changed()}}class Jr extends qr{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new Jr(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,r){const s=this.flatCoordinates,o=Ve(t,e,s[0],s[1]);if(o<r){const a=this.stride;for(let l=0;l<a;++l)i[l]=s[l];return i.length=a,o}return r}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(t){return Zc(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return Xo(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Dh(this.flatCoordinates,0,t,this.stride),this.changed()}}function Gh(n,t,e,i,r){return!ko(r,function(o){return!Me(n,t,e,i,o[0],o[1])})}function Me(n,t,e,i,r,s){let o=0,a=n[e-i],l=n[e-i+1];for(;t<e;t+=i){const u=n[t],h=n[t+1];l<=s?h>s&&(u-a)*(s-l)-(r-a)*(h-l)>0&&o++:h<=s&&(u-a)*(s-l)-(r-a)*(h-l)<0&&o--,a=u,l=h}return o!==0}function ga(n,t,e,i,r,s){if(e.length===0||!Me(n,t,e[0],i,r,s))return!1;for(let o=1,a=e.length;o<a;++o)if(Me(n,e[o-1],e[o],i,r,s))return!1;return!0}function kh(n,t,e,i,r,s,o){let a,l,u,h,c,d,f;const g=r[s+1],p=[];for(let _=0,T=e.length;_<T;++_){const E=e[_];for(h=n[E-i],d=n[E-i+1],a=t;a<E;a+=i)c=n[a],f=n[a+1],(g<=d&&f<=g||d<=g&&g<=f)&&(u=(g-d)/(f-d)*(c-h)+h,p.push(u)),h=c,d=f}let m=NaN,y=-1/0;for(p.sort(Mo),h=p[0],a=1,l=p.length;a<l;++a){c=p[a];const _=Math.abs(c-h);_>y&&(u=(h+c)/2,ga(n,t,e,i,u,g)&&(m=u,y=_)),h=c}return isNaN(m)&&(m=r[s]),o?(o.push(m,g,y),o):[m,g,y]}function Vh(n,t,e,i,r){let s;for(t+=i;t<e;t+=i)if(s=r(n.slice(t-i,t),n.slice(t,t+i)),s)return s;return!1}function pa(n,t,e,i,r){const s=Go(Ye(),n,t,e,i);return yi(r,s)?Yc(r,s)||s[0]>=r[0]&&s[2]<=r[2]||s[1]>=r[1]&&s[3]<=r[3]?!0:Vh(n,t,e,i,function(o,a){return nh(r,o,a)}):!1}function jh(n,t,e,i,r){return!!(pa(n,t,e,i,r)||Me(n,t,e,i,r[0],r[1])||Me(n,t,e,i,r[0],r[3])||Me(n,t,e,i,r[2],r[1])||Me(n,t,e,i,r[2],r[3]))}function zh(n,t,e,i,r){if(!jh(n,t,e[0],i,r))return!1;if(e.length===1)return!0;for(let s=1,o=e.length;s<o;++s)if(Gh(n,e[s-1],e[s],i,r)&&!pa(n,e[s-1],e[s],i,r))return!1;return!0}function Wh(n,t,e,i){for(;t<e-i;){for(let r=0;r<i;++r){const s=n[t+r];n[t+r]=n[e-i+r],n[e-i+r]=s}t+=i,e-=i}}function ma(n,t,e,i){let r=0,s=n[e-i],o=n[e-i+1];for(;t<e;t+=i){const a=n[t],l=n[t+1];r+=(a-s)*(l+o),s=a,o=l}return r===0?void 0:r>0}function Yh(n,t,e,i,r){r=r!==void 0?r:!1;for(let s=0,o=e.length;s<o;++s){const a=e[s],l=ma(n,t,a,i);if(s===0){if(r&&l||!r&&!l)return!1}else if(r&&!l||!r&&l)return!1;t=a}return!0}function _a(n,t,e,i,r){r=r!==void 0?r:!1;for(let s=0,o=e.length;s<o;++s){const a=e[s],l=ma(n,t,a,i);(s===0?r&&l||!r&&!l:r&&!l||!r&&l)&&Wh(n,t,a,i),t=a}return t}class xi extends qr{constructor(t,e,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,e!==void 0&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?Ac(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new xi(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,r){return r<Bo(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Oh(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Lh(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,r))}containsXY(t,e){return ga(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return Hh(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),_a(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,Xh(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=Ze(this.getExtent());this.flatInteriorPoint_=kh(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new Jr(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new Ln(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,i=this.ends_,r=[];let s=0;for(let o=0,a=i.length;o<a;++o){const l=i[o],u=new Ln(e.slice(s,l),t);r.push(u),s=l}return r}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;Yh(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=_a(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=Bh(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,i),new xi(e,"XY",i)}getType(){return"Polygon"}intersectsExtent(t){return zh(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=Nh(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()}}function ya(n){if(Ei(n))throw new Error("Cannot create polygon from empty extent");const t=n[0],e=n[1],i=n[2],r=n[3],s=[t,e,t,r,i,r,i,e,t,e];return new xi(s,"XY",[s.length])}const Qr=0;class Ea extends Ur{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=jr(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&&lh(),t.center&&(t.center=ge(t.center,this.projection_)),t.extent&&(t.extent=Ke(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const a in Gt)delete e[a];this.setProperties(e,!0);const i=Kh(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=i.minZoom;const r=Zh(t),s=i.constraint,o=qh(t);this.constraints_={center:r,resolution:s,rotation:o},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 i=this.getCenterInternal();if(i){const r=t||[0,0,0,0];e=e||[0,0,0,0];const s=this.getResolution(),o=s/2*(r[3]-e[3]+e[1]-r[1]),a=s/2*(r[0]-e[0]+e[2]-r[2]);this.setCenterInternal([i[0]+o,i[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 i=0;i<e.length;++i){let r=arguments[i];r.center&&(r=Object.assign({},r),r.center=ge(r.center,this.getProjection())),r.anchor&&(r=Object.assign({},r),r.anchor=ge(r.anchor,this.getProjection())),e[i]=r}this.animateInternal.apply(this,e)}animateInternal(t){let e=arguments.length,i;e>1&&typeof arguments[e-1]=="function"&&(i=arguments[e-1],--e);let r=0;for(;r<e&&!this.isDef();++r){const h=arguments[r];h.center&&this.setCenterInternal(h.center),h.zoom!==void 0?this.setZoom(h.zoom):h.resolution&&this.setResolution(h.resolution),h.rotation!==void 0&&this.setRotation(h.rotation)}if(r===e){i&&Ri(i,!0);return}let s=Date.now(),o=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_;const u=[];for(;r<e;++r){const h=arguments[r],c={start:s,complete:!1,anchor:h.anchor,duration:h.duration!==void 0?h.duration:1e3,easing:h.easing||Th,callback:i};if(h.center&&(c.sourceCenter=o,c.targetCenter=h.center.slice(),o=c.targetCenter),h.zoom!==void 0?(c.sourceResolution=a,c.targetResolution=this.getResolutionForZoom(h.zoom),a=c.targetResolution):h.resolution&&(c.sourceResolution=a,c.targetResolution=h.resolution,a=c.targetResolution),h.rotation!==void 0){c.sourceRotation=l;const d=$n(h.rotation-l+Math.PI,2*Math.PI)-Math.PI;c.targetRotation=l+d,l=c.targetRotation}Jh(c)?c.complete=!0:s+=c.duration,u.push(c)}this.animations_.push(u),this.setHint(fe.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[fe.ANIMATING]>0}getInteracting(){return this.hints_[fe.INTERACTING]>0}cancelAnimations(){this.setHint(fe.ANIMATING,-this.hints_[fe.ANIMATING]);let t;for(let e=0,i=this.animations_.length;e<i;++e){const r=this.animations_[e];if(r[0].callback&&Ri(r[0].callback,!1),!t)for(let s=0,o=r.length;s<o;++s){const a=r[s];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 i=this.animations_.length-1;i>=0;--i){const r=this.animations_[i];let s=!0;for(let o=0,a=r.length;o<a;++o){const l=r[o];if(l.complete)continue;const u=t-l.start;let h=l.duration>0?u/l.duration:1;h>=1?(l.complete=!0,h=1):s=!1;const c=l.easing(h);if(l.sourceCenter){const d=l.sourceCenter[0],f=l.sourceCenter[1],g=l.targetCenter[0],p=l.targetCenter[1];this.nextCenter_=l.targetCenter;const m=d+c*(g-d),y=f+c*(p-f);this.targetCenter_=[m,y]}if(l.sourceResolution&&l.targetResolution){const d=c===1?l.targetResolution:l.sourceResolution+c*(l.targetResolution-l.sourceResolution);if(l.anchor){const f=this.getViewportSize_(this.getRotation()),g=this.constraints_.resolution(d,0,f,!0);this.targetCenter_=this.calculateCenterZoom(g,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=d,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const d=c===1?$n(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+c*(l.targetRotation-l.sourceRotation);if(l.anchor){const f=this.constraints_.rotation(d,!0);this.targetCenter_=this.calculateCenterRotate(f,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=d}if(this.applyTargetState_(!0),e=!0,!l.complete)break}if(s){this.animations_[i]=null,this.setHint(fe.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const o=r[0].callback;o&&Ri(o,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const r=this.getCenterInternal();return r!==void 0&&(i=[r[0]-e[0],r[1]-e[1]],sh(i,t-this.getRotation()),rh(i,e)),i}calculateCenterZoom(t,e){let i;const r=this.getCenterInternal(),s=this.getResolution();if(r!==void 0&&s!==void 0){const o=e[0]-t*(e[0]-r[0])/s,a=e[1]-t*(e[1]-r[1])/s;i=[o,a]}return i}getViewportSize_(t){const e=this.viewportSize_;if(t){const i=e[0],r=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(r*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(r*Math.cos(t))]}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&&ta(t,this.getProjection())}getCenterInternal(){return this.get(Gt.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 fh(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();Bt(e,"The view center is not defined");const i=this.getResolution();Bt(i!==void 0,"The view resolution is not defined");const r=this.getRotation();return Bt(r!==void 0,"The view rotation is not defined"),Qc(e,i,r,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(Gt.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(Ke(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=ct(t)/e[0],r=kt(t)/e[1];return Math.max(i,r)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,r=Math.log(e/i)/Math.log(t);return function(s){return e/Math.pow(t,s*r)}}getRotation(){return this.get(Gt.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,s=Math.log(i/r)/e;return function(o){return Math.log(i/o)/e/s}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),i=this.getRotation();let r=this.getCenterInternal();const s=this.padding_;if(s){const o=this.getViewportSizeMinusPadding_();r=ts(r,this.getViewportSize_(),[o[0]/2+s[3],o[1]/2+s[0]],e,i)}return{center:r.slice(0),projection:t!==void 0?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,i,r;if(this.resolutions_){const s=Oo(this.resolutions_,t,1);e=s,i=this.resolutions_[s],s==this.resolutions_.length-1?r=2:r=i/this.resolutions_[s+1]}else i=this.maxResolution_,r=this.zoomFactor_;return e+Math.log(i/t)/Math.log(r)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=ft(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,ft(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if(Bt(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){Bt(!Ei(t),"Cannot fit empty extent provided as `geometry`");const r=Ke(t,this.getProjection());i=ya(r)}else if(t.getType()==="Circle"){const r=Ke(t.getExtent(),this.getProjection());i=ya(r),i.rotate(this.getRotation(),Ze(r))}else i=t;this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),r=Math.sin(-e),s=t.getFlatCoordinates(),o=t.getStride();let a=1/0,l=1/0,u=-1/0,h=-1/0;for(let c=0,d=s.length;c<d;c+=o){const f=s[c]*i-s[c+1]*r,g=s[c]*r+s[c+1]*i;a=Math.min(a,f),l=Math.min(l,g),u=Math.max(u,f),h=Math.max(h,g)}return[a,l,u,h]}fitInternal(t,e){e=e||{};let i=e.size;i||(i=this.getViewportSizeMinusPadding_());const r=e.padding!==void 0?e.padding:[0,0,0,0],s=e.nearest!==void 0?e.nearest:!1;let o;e.minResolution!==void 0?o=e.minResolution:e.maxZoom!==void 0?o=this.getResolutionForZoom(e.maxZoom):o=0;const a=this.rotatedExtentForGeometry(t);let l=this.getResolutionForExtentInternal(a,[i[0]-r[1]-r[3],i[1]-r[0]-r[2]]);l=isNaN(l)?o:Math.max(l,o),l=this.getConstrainedResolution(l,s?0:1);const u=this.getRotation(),h=Math.sin(u),c=Math.cos(u),d=Ze(a);d[0]+=(r[1]-r[3])/2*l,d[1]+=(r[0]-r[2])/2*l;const f=d[0]*c-d[1]*h,g=d[1]*c+d[0]*h,p=this.getConstrainedCenter([f,g],l),m=e.callback?e.callback:Lr;e.duration!==void 0?this.animateInternal({resolution:l,center:p,duration:e.duration,easing:e.easing},m):(this.targetResolution_=l,this.targetCenter_=p,this.applyTargetState_(!1,!0),Ri(m,!0))}centerOn(t,e,i){this.centerOnInternal(ge(t,this.getProjection()),e,i)}centerOnInternal(t,e,i){this.setCenterInternal(ts(t,e,i,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,i,r){let s;const o=this.padding_;if(o&&t){const a=this.getViewportSizeMinusPadding_(-i),l=ts(t,r,[a[0]/2+o[3],a[1]/2+o[0]],e,i);s=[t[0]-l[0],t[1]-l[1]]}return s}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(t){const e=ta(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&&ge(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const i=this.getAnimating()||this.getInteracting(),r=this.getViewportSize_(this.getRotation()),s=this.constraints_.resolution(this.targetResolution_*t,0,r,i);e&&(this.targetCenter_=this.calculateCenterZoom(s,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=ge(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){const i=this.getAnimating()||this.getInteracting(),r=this.constraints_.rotation(this.targetRotation_+t,i);e&&(this.targetCenter_=this.calculateCenterRotate(r,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t&&ge(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 i=this.getAnimating()||this.getInteracting()||e,r=this.constraints_.rotation(this.targetRotation_,i),s=this.getViewportSize_(r),o=this.constraints_.resolution(this.targetResolution_,0,s,i),a=this.constraints_.center(this.targetCenter_,o,s,i,this.calculateCenterShift(this.targetCenter_,o,r,s));this.get(Gt.ROTATION)!==r&&this.set(Gt.ROTATION,r),this.get(Gt.RESOLUTION)!==o&&(this.set(Gt.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),(!a||!this.get(Gt.CENTER)||!bi(this.get(Gt.CENTER),a))&&this.set(Gt.CENTER,a),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,i){t=t!==void 0?t:200;const r=e||0,s=this.constraints_.rotation(this.targetRotation_),o=this.getViewportSize_(s),a=this.constraints_.resolution(this.targetResolution_,r,o),l=this.constraints_.center(this.targetCenter_,a,o,!1,this.calculateCenterShift(this.targetCenter_,a,s,o));if(t===0&&!this.cancelAnchor_){this.targetResolution_=a,this.targetRotation_=s,this.targetCenter_=l,this.applyTargetState_();return}i=i||(t===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==a||this.getRotation()!==s||!this.getCenterInternal()||!bi(this.getCenterInternal(),l))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:l,resolution:a,duration:t,easing:vh,anchor:i}))}beginInteraction(){this.resolveConstraints(0),this.setHint(fe.INTERACTING,1)}endInteraction(t,e,i){i=i&&ge(i,this.getProjection()),this.endInteractionInternal(t,e,i)}endInteractionInternal(t,e,i){this.getInteracting()&&(this.setHint(fe.INTERACTING,-1),this.resolveConstraints(t,e,i))}getConstrainedCenter(t,e){const i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),i)}getConstrainedZoom(t,e){const i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,e))}getConstrainedResolution(t,e){e=e||0;const i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,i)}}function Ri(n,t){setTimeout(function(){n(t)},0)}function Zh(n){if(n.extent!==void 0){const e=n.smoothExtentConstraint!==void 0?n.smoothExtentConstraint:!0;return ea(n.extent,n.constrainOnlyCenter,e)}const t=jr(n.projection,"EPSG:3857");if(n.multiWorld!==!0&&t.isGlobal()){const e=t.getExtent().slice();return e[0]=-1/0,e[2]=1/0,ea(e,!1,!1)}return ph}function Kh(n){let t,e,i,o=n.minZoom!==void 0?n.minZoom:Qr,a=n.maxZoom!==void 0?n.maxZoom:28;const l=n.zoomFactor!==void 0?n.zoomFactor:2,u=n.multiWorld!==void 0?n.multiWorld:!1,h=n.smoothResolutionConstraint!==void 0?n.smoothResolutionConstraint:!0,c=n.showFullExtent!==void 0?n.showFullExtent:!1,d=jr(n.projection,"EPSG:3857"),f=d.getExtent();let g=n.constrainOnlyCenter,p=n.extent;if(!u&&!p&&d.isGlobal()&&(g=!1,p=f),n.resolutions!==void 0){const m=n.resolutions;e=m[o],i=m[a]!==void 0?m[a]:m[m.length-1],n.constrainResolution?t=mh(m,h,!g&&p,c):t=na(e,i,h,!g&&p,c)}else{const y=(f?Math.max(ct(f),kt(f)):360*gi.degrees/d.getMetersPerUnit())/Fc/Math.pow(2,Qr),_=y/Math.pow(2,28-Qr);e=n.maxResolution,e!==void 0?o=0:e=y/Math.pow(l,o),i=n.minResolution,i===void 0&&(n.maxZoom!==void 0?n.maxResolution!==void 0?i=e/Math.pow(l,a):i=y/Math.pow(l,a):i=_),a=o+Math.floor(Math.log(e/i)/Math.log(l)),i=e/Math.pow(l,a-o),n.constrainResolution?t=_h(l,e,i,h,!g&&p,c):t=na(e,i,h,!g&&p,c)}return{constraint:t,maxResolution:e,minResolution:i,minZoom:o,zoomFactor:l}}function qh(n){if(n.enableRotation!==void 0?n.enableRotation:!0){const e=n.constrainRotation;return e===void 0||e===!0?bh():e===!1?ia:typeof e=="number"?Eh(e):ia}return yh}function Jh(n){return!(n.sourceCenter&&n.targetCenter&&!bi(n.sourceCenter,n.targetCenter)||n.sourceResolution!==n.targetResolution||n.sourceRotation!==n.targetRotation)}function ts(n,t,e,i,r){const s=Math.cos(-r);let o=Math.sin(-r),a=n[0]*s-n[1]*o,l=n[1]*s+n[0]*o;a+=(t[0]/2-e[0])*i,l+=(e[1]-t[1]/2)*i,o=-o;const u=a*s-l*o,h=l*s+a*o;return[u,h]}class Qh extends Uc{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.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(W.SOURCE,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return t=t||[],t.push(this),t}getLayerStatesArray(t){return t=t||[],t.push(this.getLayerState()),t}getSource(){return this.get(W.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),!(this.sourceReady_||this.getSource().getState()!=="ready")&&(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(Wt(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=de(t,It.CHANGE,this.handleSourceChange_,this),t.getState()==="ready"&&(this.sourceReady_=!0,setTimeout(()=>{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}isVisible(t){let e;const i=this.getMapInternal();!t&&i&&(t=i.getView()),t instanceof Ea?e={viewState:t.getState(),extent:t.calculateExtent()}:e=t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray());let r;e.layerStatesArray?r=e.layerStatesArray.find(o=>o.layer===this):r=this.getLayerState();const s=this.getExtent();return td(r,e.viewState)&&(!s||yi(s,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e;const i=this.getSource();if(i&&(e=i.getAttributions()),!e)return[];const r=t instanceof Ea?t.getViewStateAndExtent():t;let s=e(r);return Array.isArray(s)||(s=[s]),s}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(t,e){}renderDeferred(t){const e=this.getRenderer();e&&e.renderDeferred(t)}setMapInternal(t){t||this.unrender(),this.set(W.MAP,t)}getMapInternal(){return this.get(W.MAP)}setMap(t){this.mapPrecomposeKey_&&(Wt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Wt(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=de(t,Ie.PRECOMPOSE,function(e){const r=e.frameState.layerStatesArray,s=this.getLayerState(!1);Bt(!r.some(function(o){return o.layer===s.layer}),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),r.push(s)},this),this.mapRenderKey_=de(this,It.CHANGE,t.render,t),this.changed())}setSource(t){this.set(W.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 td(n,t){if(!n.visible)return!1;const e=t.resolution;if(e<n.minResolution||e>=n.maxResolution)return!1;const i=t.zoom;return i>n.minZoom&&i<=n.maxZoom}const wi={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class ed extends Qh{constructor(t){t=t||{};const e=Object.assign({},t),i=t.cacheSize;delete t.cacheSize,delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.cacheSize_=i,this.setPreload(t.preload!==void 0?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0)}getCacheSize(){return this.cacheSize_}getPreload(){return this.get(wi.PRELOAD)}setPreload(t){this.set(wi.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(wi.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(wi.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}const ba=.5,A={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class es extends Nr{constructor(t,e,i){super(),i=i||{},this.tileCoord=t,this.state=e,this.key="",this.transition_=i.transition===void 0?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(It.CHANGE)}release(){this.state===A.ERROR&&this.setState(A.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(this.state!==A.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){ot()}getAlpha(t,e){if(!this.transition_)return 1;let i=this.transitionStarts_[t];if(!i)i=e,this.transitionStarts_[t]=i;else if(i===-1)return 1;const r=e-i+1e3/60;return r>=this.transition_?1:ra(r/this.transition_)}inTransition(t){return this.transition_?this.transitionStarts_[t]!==-1:!1}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}const pe=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"";pe.includes("firefox");const nd=pe.includes("safari")&&!pe.includes("chrom")&&(pe.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(pe));pe.includes("webkit")&&pe.includes("edge"),pe.includes("macintosh");const id=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,rd=typeof Image<"u"&&Image.prototype.decode;(function(){let n=!1;try{const t=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return n})();function me(n,t,e,i){let r;return e&&e.length?r=e.shift():id?r=new OffscreenCanvas(n||300,t||300):r=document.createElement("canvas"),n&&(r.width=n),t&&(r.height=t),r.getContext("2d",i)}function Dn(n){const t=n.canvas;t.width=1,t.height=1,n.clearRect(0,0,1,1)}function Ci(n){return n instanceof Image||n instanceof HTMLCanvasElement||n instanceof HTMLVideoElement||n instanceof ImageBitmap?n:null}function ns(n){return n instanceof Uint8Array||n instanceof Uint8ClampedArray||n instanceof Float32Array||n instanceof DataView?n:null}const sd=new Error("disposed");let Je=null;function od(n){Je||(Je=me(n.width,n.height,void 0,{willReadFrequently:!0}));const t=Je.canvas,e=n.width;t.width!==e&&(t.width=e);const i=n.height;return t.height!==i&&(t.height=i),Je.clearRect(0,0,e,i),Je.drawImage(n,0,0),Je.getImageData(0,0,e,i).data}const ad=[256,256];class va extends es{constructor(t){const e=A.IDLE;super(t.tileCoord,e,{transition:t.transition,interpolate:t.interpolate}),this.loader_=t.loader,this.data_=null,this.error_=null,this.size_=t.size||null,this.controller_=t.controller||null}getSize(){if(this.size_)return this.size_;const t=Ci(this.data_);return t?[t.width,t.height]:ad}getData(){return this.data_}getError(){return this.error_}load(){if(this.state!==A.IDLE&&this.state!==A.ERROR)return;this.state=A.LOADING,this.changed();const t=this;this.loader_().then(function(e){t.data_=e,t.state=A.LOADED,t.changed()}).catch(function(e){t.error_=e,t.state=A.ERROR,t.changed()})}disposeInternal(){this.controller_&&(this.controller_.abort(sd),this.controller_=null),super.disposeInternal()}}const ld=10,Ta=.25;class xa{constructor(t,e,i,r,s,o){this.sourceProj_=t,this.targetProj_=e;let a={};const l=vi(this.targetProj_,this.sourceProj_);this.transformInv_=function(_){const T=_[0]+"/"+_[1];return a[T]||(a[T]=l(_)),a[T]},this.maxSourceExtent_=r,this.errorThresholdSquared_=s*s,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&ct(r)>=ct(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?ct(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?ct(this.targetProj_.getExtent()):null;const u=kr(i),h=zo(i),c=jo(i),d=Vo(i),f=this.transformInv_(u),g=this.transformInv_(h),p=this.transformInv_(c),m=this.transformInv_(d),y=ld+(o?Math.max(0,Math.ceil(Math.log2(Mn(i)/(o*o*256*256)))):0);if(this.addQuad_(u,h,c,d,f,g,p,m,y),this.wrapsXInSource_){let _=1/0;this.triangles_.forEach(function(T,E,b){_=Math.min(_,T.source[0][0],T.source[1][0],T.source[2][0])}),this.triangles_.forEach(T=>{if(Math.max(T.source[0][0],T.source[1][0],T.source[2][0])-_>this.sourceWorldWidth_/2){const E=[[T.source[0][0],T.source[0][1]],[T.source[1][0],T.source[1][1]],[T.source[2][0],T.source[2][1]]];E[0][0]-_>this.sourceWorldWidth_/2&&(E[0][0]-=this.sourceWorldWidth_),E[1][0]-_>this.sourceWorldWidth_/2&&(E[1][0]-=this.sourceWorldWidth_),E[2][0]-_>this.sourceWorldWidth_/2&&(E[2][0]-=this.sourceWorldWidth_);const b=Math.min(E[0][0],E[1][0],E[2][0]);Math.max(E[0][0],E[1][0],E[2][0])-b<this.sourceWorldWidth_/2&&(T.source=E)}})}a={}}addTriangle_(t,e,i,r,s,o){this.triangles_.push({source:[r,s,o],target:[t,e,i]})}addQuad_(t,e,i,r,s,o,a,l,u){const h=Br([s,o,a,l]),c=this.sourceWorldWidth_?ct(h)/this.sourceWorldWidth_:null,d=this.sourceWorldWidth_,f=this.sourceProj_.canWrapX()&&c>.5&&c<1;let g=!1;if(u>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const m=Br([t,e,i,r]);g=ct(m)/this.targetWorldWidth_>Ta||g}!f&&this.sourceProj_.isGlobal()&&c&&(g=c>Ta||g)}if(!g&&this.maxSourceExtent_&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3])&&!yi(h,this.maxSourceExtent_))return;let p=0;if(!g&&(!isFinite(s[0])||!isFinite(s[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(l[0])||!isFinite(l[1]))){if(u>0)g=!0;else if(p=(!isFinite(s[0])||!isFinite(s[1])?8:0)+(!isFinite(o[0])||!isFinite(o[1])?4:0)+(!isFinite(a[0])||!isFinite(a[1])?2:0)+(!isFinite(l[0])||!isFinite(l[1])?1:0),p!=1&&p!=2&&p!=4&&p!=8)return}if(u>0){if(!g){const m=[(t[0]+i[0])/2,(t[1]+i[1])/2],y=this.transformInv_(m);let _;f?_=($n(s[0],d)+$n(a[0],d))/2-$n(y[0],d):_=(s[0]+a[0])/2-y[0];const T=(s[1]+a[1])/2-y[1];g=_*_+T*T>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){const m=[(e[0]+i[0])/2,(e[1]+i[1])/2],y=this.transformInv_(m),_=[(r[0]+t[0])/2,(r[1]+t[1])/2],T=this.transformInv_(_);this.addQuad_(t,e,m,_,s,o,y,T,u-1),this.addQuad_(_,m,i,r,T,y,a,l,u-1)}else{const m=[(t[0]+e[0])/2,(t[1]+e[1])/2],y=this.transformInv_(m),_=[(i[0]+r[0])/2,(i[1]+r[1])/2],T=this.transformInv_(_);this.addQuad_(t,m,_,r,s,y,T,l,u-1),this.addQuad_(m,e,i,_,y,o,a,T,u-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}p&11||this.addTriangle_(t,i,r,s,a,l),p&14||this.addTriangle_(t,i,e,s,a,o),p&&(p&13||this.addTriangle_(e,r,t,o,l,s),p&7||this.addTriangle_(e,r,i,o,l,a))}calculateSourceExtent(){const t=Ye();return this.triangles_.forEach(function(e,i,r){const s=e.source;_i(t,s[0]),_i(t,s[1]),_i(t,s[2])}),t}getTriangles(){return this.triangles_}}let is;const ie=[];function Ra(n,t,e,i,r){n.beginPath(),n.moveTo(0,0),n.lineTo(t,e),n.lineTo(i,r),n.closePath(),n.save(),n.clip(),n.fillRect(0,0,Math.max(t,i)+1,Math.max(e,r)),n.restore()}function rs(n,t){return Math.abs(n[t*4]-210)>2||Math.abs(n[t*4+3]-.75*255)>2}function ud(){if(is===void 0){const n=me(6,6,ie);n.globalCompositeOperation="lighter",n.fillStyle="rgba(210, 0, 0, 0.75)",Ra(n,4,5,4,0),Ra(n,4,5,0,5);const t=n.getImageData(0,0,3,3).data;is=rs(t,0)||rs(t,4)||rs(t,8),Dn(n),ie.push(n.canvas)}return is}function wa(n,t,e,i){const r=dh(e,t,n);let s=qo(t,i,e);const o=t.getMetersPerUnit();o!==void 0&&(s*=o);const a=n.getMetersPerUnit();a!==void 0&&(s/=a);const l=n.getExtent();if(!l||Xr(l,r)){const u=qo(n,s,r)/s;isFinite(u)&&u>0&&(s/=u)}return s}function Ca(n,t,e,i){const r=Ze(e);let s=wa(n,t,r,i);return(!isFinite(s)||s<=0)&&ko(e,function(o){return s=wa(n,t,o,i),isFinite(s)&&s>0}),s}function Sa(n,t,e,i,r,s,o,a,l,u,h,c,d,f){const g=me(Math.round(e*n),Math.round(e*t),ie);if(c||(g.imageSmoothingEnabled=!1),l.length===0)return g.canvas;g.scale(e,e);function p(b){return Math.round(b*e)/e}g.globalCompositeOperation="lighter";const m=Ye();l.forEach(function(b,v,C){qc(m,b.extent)});let y;const _=e/i,T=(c?1:1+Math.pow(2,-24))/_;if(!d||l.length!==1||u!==0){if(y=me(Math.round(ct(m)*_),Math.round(kt(m)*_),ie),c||(y.imageSmoothingEnabled=!1),r&&f){const b=(r[0]-m[0])*_,v=-(r[3]-m[3])*_,C=ct(r)*_,w=kt(r)*_;y.rect(b,v,C,w),y.clip()}l.forEach(function(b,v,C){if(b.image.width>0&&b.image.height>0){if(b.clipExtent){y.save();const V=(b.clipExtent[0]-m[0])*_,q=-(b.clipExtent[3]-m[3])*_,J=ct(b.clipExtent)*_,at=kt(b.clipExtent)*_;y.rect(c?V:Math.round(V),c?q:Math.round(q),c?J:Math.round(V+J)-Math.round(V),c?at:Math.round(q+at)-Math.round(q)),y.clip()}const w=(b.extent[0]-m[0])*_,I=-(b.extent[3]-m[3])*_,X=ct(b.extent)*_,F=kt(b.extent)*_;y.drawImage(b.image,u,u,b.image.width-2*u,b.image.height-2*u,c?w:Math.round(w),c?I:Math.round(I),c?X:Math.round(w+X)-Math.round(w),c?F:Math.round(I+F)-Math.round(I)),b.clipExtent&&y.restore()}})}const E=kr(o);return a.getTriangles().forEach(function(b,v,C){const w=b.source,I=b.target;let X=w[0][0],F=w[0][1],V=w[1][0],q=w[1][1],J=w[2][0],at=w[2][1];const Q=p((I[0][0]-E[0])/s),Ct=p(-(I[0][1]-E[1])/s),Pt=p((I[1][0]-E[0])/s),Vt=p(-(I[1][1]-E[1])/s),ln=p((I[2][0]-E[0])/s),re=p(-(I[2][1]-E[1])/s),se=X,ws=F;X=0,F=0,V-=se,q-=ws,J-=se,at-=ws;const ag=[[V,q,0,0,Pt-Q],[J,at,0,0,ln-Q],[0,0,V,q,Vt-Ct],[0,0,J,at,re-Ct]],Vn=Dc(ag);if(!Vn)return;if(g.save(),g.beginPath(),ud()||!c){g.moveTo(Pt,Vt);const oe=4,zn=Q-Pt,Rl=Ct-Vt;for(let Le=0;Le<oe;Le++)g.lineTo(Pt+p((Le+1)*zn/oe),Vt+p(Le*Rl/(oe-1))),Le!=oe-1&&g.lineTo(Pt+p((Le+1)*zn/oe),Vt+p((Le+1)*Rl/(oe-1)));g.lineTo(ln,re)}else g.moveTo(Pt,Vt),g.lineTo(Q,Ct),g.lineTo(ln,re);g.clip(),g.transform(Vn[0],Vn[2],Vn[1],Vn[3],Q,Ct),g.translate(m[0]-se,m[3]-ws);let jn;if(y)jn=y.canvas,g.scale(T,-T);else{const oe=l[0],zn=oe.extent;jn=oe.image,g.scale(ct(zn)/jn.width,-kt(zn)/jn.height)}g.drawImage(jn,0,0),g.restore()}),y&&(Dn(y),ie.push(y.canvas)),h&&(g.save(),g.globalCompositeOperation="source-over",g.strokeStyle="black",g.lineWidth=1,a.getTriangles().forEach(function(b,v,C){const w=b.target,I=(w[0][0]-E[0])/s,X=-(w[0][1]-E[1])/s,F=(w[1][0]-E[0])/s,V=-(w[1][1]-E[1])/s,q=(w[2][0]-E[0])/s,J=-(w[2][1]-E[1])/s;g.beginPath(),g.moveTo(F,V),g.lineTo(I,X),g.lineTo(q,J),g.closePath(),g.stroke()}),g.restore()),g.canvas}class Aa extends va{constructor(t){super({tileCoord:t.tileCoord,loader:()=>Promise.resolve(new Uint8ClampedArray(4)),interpolate:t.interpolate,transition:t.transition}),this.pixelRatio_=t.pixelRatio,this.gutter_=t.gutter,this.reprojData_=null,this.reprojError_=null,this.reprojSize_=void 0,this.sourceTileGrid_=t.sourceTileGrid,this.targetTileGrid_=t.targetTileGrid,this.wrappedTileCoord_=t.wrappedTileCoord||t.tileCoord,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const e=t.sourceProj,i=e.getExtent(),r=t.sourceTileGrid.getExtent();this.clipExtent_=e.canWrapX()?r?Zt(i,r):i:r;const s=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),o=this.targetTileGrid_.getExtent();let a=this.sourceTileGrid_.getExtent();const l=o?Zt(s,o):s;if(Mn(l)===0){this.state=A.EMPTY;return}i&&(a?a=Zt(a,i):a=i);const u=this.targetTileGrid_.getResolution(this.wrappedTileCoord_[0]),h=t.targetProj,c=Ca(e,h,l,u);if(!isFinite(c)||c<=0){this.state=A.EMPTY;return}const d=t.errorThreshold!==void 0?t.errorThreshold:ba;if(this.triangulation_=new xa(e,h,l,a,c*d,u),this.triangulation_.getTriangles().length===0){this.state=A.EMPTY;return}this.sourceZ_=this.sourceTileGrid_.getZForResolution(c);let f=this.triangulation_.calculateSourceExtent();if(a&&(e.canWrapX()?(f[1]=ft(f[1],a[1],a[3]),f[3]=ft(f[3],a[1],a[3])):f=Zt(f,a)),!Mn(f))this.state=A.EMPTY;else{let g=0,p=0;e.canWrapX()&&(g=ct(i),p=Math.floor((f[0]-i[0])/g)),Wo(f.slice(),e,!0).forEach(y=>{const _=this.sourceTileGrid_.getTileRangeForExtentAndZ(y,this.sourceZ_),T=t.getTileFunction;for(let E=_.minX;E<=_.maxX;E++)for(let b=_.minY;b<=_.maxY;b++){const v=T(this.sourceZ_,E,b,this.pixelRatio_);if(v){const C=p*g;this.sourceTiles_.push({tile:v,offset:C})}}++p}),this.sourceTiles_.length===0&&(this.state=A.EMPTY)}}getSize(){return this.reprojSize_}getData(){return this.reprojData_}getError(){return this.reprojError_}reproject_(){const t=[];let e=!1;if(this.sourceTiles_.forEach(g=>{var Ct;const p=g.tile;if(!p||p.getState()!==A.LOADED)return;const m=p.getSize(),y=this.gutter_;let _;const T=ns(p.getData());T?_=T:(e=!0,_=od(Ci(p.getData())));const E=[m[0]+2*y,m[1]+2*y],b=_ instanceof Float32Array,v=E[0]*E[1],C=b?Float32Array:Uint8ClampedArray,w=new C(_.buffer),I=C.BYTES_PER_ELEMENT,X=I*w.length/v,F=w.byteLength/E[1],V=Math.floor(F/I/E[0]),q=v*V;let J=w;if(w.length!==q){J=new C(q);let Pt=0,Vt=0;const ln=E[0]*V;for(let re=0;re<E[1];++re){for(let se=0;se<ln;++se)J[Pt++]=w[Vt+se];Vt+=F/I}}const at=this.sourceTileGrid_.getTileCoordExtent(p.tileCoord);at[0]+=g.offset,at[2]+=g.offset;const Q=(Ct=this.clipExtent_)==null?void 0:Ct.slice();Q&&(Q[0]+=g.offset,Q[2]+=g.offset),t.push({extent:at,clipExtent:Q,data:new Uint8ClampedArray(J.buffer),dataType:C,bytesPerPixel:X,pixelSize:E})}),this.sourceTiles_.length=0,t.length===0){this.state=A.ERROR,this.changed();return}const i=this.wrappedTileCoord_[0],r=this.targetTileGrid_.getTileSize(i),s=typeof r=="number"?r:r[0],o=typeof r=="number"?r:r[1],a=this.targetTileGrid_.getResolution(i),l=this.sourceTileGrid_.getResolution(this.sourceZ_),u=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);let h,c;const d=t[0].bytesPerPixel,f=Math.ceil(d/3);for(let g=f-1;g>=0;--g){const p=[];for(let b=0,v=t.length;b<v;++b){const C=t[b],w=C.data,I=C.pixelSize,X=I[0],F=I[1],V=me(X,F,ie),q=V.createImageData(X,F),J=q.data;let at=g*3;for(let Q=0,Ct=J.length;Q<Ct;Q+=4)J[Q]=w[at],J[Q+1]=w[at+1],J[Q+2]=w[at+2],J[Q+3]=255,at+=d;V.putImageData(q,0,0),p.push({extent:C.extent,clipExtent:C.clipExtent,image:V.canvas})}const m=Sa(s,o,this.pixelRatio_,l,this.sourceTileGrid_.getExtent(),a,u,this.triangulation_,p,this.gutter_,!1,!1,!1);for(let b=0,v=p.length;b<v;++b){const w=p[b].image.getContext("2d");Dn(w),ie.push(w.canvas)}const y=m.getContext("2d"),_=y.getImageData(0,0,m.width,m.height);Dn(y),ie.push(m),h||(c=new Uint8ClampedArray(d*_.width*_.height),h=new t[0].dataType(c.buffer));const T=_.data;let E=g*3;for(let b=0,v=T.length;b<v;b+=4)T[b+3]===255?(c[E]=T[b],c[E+1]=T[b+1],c[E+2]=T[b+2]):(c[E]=0,c[E+1]=0,c[E+2]=0),E+=d}if(e){const g=me(s,o),p=new ImageData(h,s);g.putImageData(p,0,0),this.reprojData_=g.canvas}else this.reprojData_=h;this.reprojSize_=[Math.round(s*this.pixelRatio_),Math.round(o*this.pixelRatio_)],this.state=A.LOADED,this.changed()}load(){if(this.state!==A.IDLE&&this.state!==A.ERROR)return;this.state=A.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(({tile:e})=>{const i=e.getState();if(i!==A.IDLE&&i!==A.LOADING)return;t++;const r=de(e,It.CHANGE,function(){const s=e.getState();(s==A.LOADED||s==A.ERROR||s==A.EMPTY)&&(Wt(r),t--,t===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(r)}),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:e}){e.getState()==A.IDLE&&e.load()})}unlistenSources_(){this.sourcesListenerKeys_.forEach(Wt),this.sourcesListenerKeys_=null}}class ss extends es{constructor(t,e,i,r,s,o,a,l,u,h,c,d){super(s,A.IDLE,d),this.renderEdges_=c!==void 0?c:!1,this.pixelRatio_=a,this.gutter_=l,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=r,this.wrappedTileCoord_=o||s,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0,this.clipExtent_=t.canWrapX()?t.getExtent():void 0;const f=r.getTileCoordExtent(this.wrappedTileCoord_),g=this.targetTileGrid_.getExtent();let p=this.sourceTileGrid_.getExtent();const m=g?Zt(f,g):f;if(Mn(m)===0){this.state=A.EMPTY;return}const y=t.getExtent();y&&(p?p=Zt(p,y):p=y);const _=r.getResolution(this.wrappedTileCoord_[0]),T=Ca(t,i,m,_);if(!isFinite(T)||T<=0){this.state=A.EMPTY;return}const E=h!==void 0?h:ba;if(this.triangulation_=new xa(t,i,m,p,T*E,_),this.triangulation_.getTriangles().length===0){this.state=A.EMPTY;return}this.sourceZ_=e.getZForResolution(T);let b=this.triangulation_.calculateSourceExtent();if(p&&(t.canWrapX()?(b[1]=ft(b[1],p[1],p[3]),b[3]=ft(b[3],p[1],p[3])):b=Zt(b,p)),!Mn(b))this.state=A.EMPTY;else{let v=0,C=0;t.canWrapX()&&(v=ct(y),C=Math.floor((b[0]-y[0])/v)),Wo(b.slice(),t,!0).forEach(I=>{const X=e.getTileRangeForExtentAndZ(I,this.sourceZ_);for(let F=X.minX;F<=X.maxX;F++)for(let V=X.minY;V<=X.maxY;V++){const q=u(this.sourceZ_,F,V,a);if(q){const J=C*v;this.sourceTiles_.push({tile:q,offset:J})}}++C}),this.sourceTiles_.length===0&&(this.state=A.EMPTY)}}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(e=>{var r;const i=e.tile;if(i&&i.getState()==A.LOADED){const s=this.sourceTileGrid_.getTileCoordExtent(i.tileCoord);s[0]+=e.offset,s[2]+=e.offset;const o=(r=this.clipExtent_)==null?void 0:r.slice();o&&(o[0]+=e.offset,o[2]+=e.offset),t.push({extent:s,clipExtent:o,image:i.getImage()})}}),this.sourceTiles_.length=0,t.length===0)this.state=A.ERROR;else{const e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),r=typeof i=="number"?i:i[0],s=typeof i=="number"?i:i[1],o=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Sa(r,s,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=A.LOADED}this.changed()}load(){if(this.state==A.IDLE){this.state=A.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(({tile:e})=>{const i=e.getState();if(i==A.IDLE||i==A.LOADING){t++;const r=de(e,It.CHANGE,function(s){const o=e.getState();(o==A.LOADED||o==A.ERROR||o==A.EMPTY)&&(Wt(r),t--,t===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(r)}}),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:e},i,r){e.getState()==A.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Wt),this.sourcesListenerKeys_=null}release(){this.canvas_&&(Dn(this.canvas_.getContext("2d")),ie.push(this.canvas_),this.canvas_=null),super.release()}}const Qe={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function cd(n,t,e){const i=n;let r=!0,s=!1,o=!1;const a=[di(i,It.LOAD,function(){o=!0,s||t()})];return i.src&&rd?(s=!0,i.decode().then(function(){r&&t()}).catch(function(l){r&&(o?t():e())})):a.push(di(i,It.ERROR,e)),function(){r=!1,a.forEach(Wt)}}class Ia extends es{constructor(t,e,i,r,s,o){super(t,e,o),this.crossOrigin_=r,this.src_=i,this.key=i,this.image_=new Image,r!==null&&(this.image_.crossOrigin=r),this.unlisten_=null,this.tileLoadFunction_=s}getImage(){return this.image_}setImage(t){this.image_=t,this.state=A.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=A.ERROR,this.unlistenImage_(),this.image_=hd(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=A.LOADED:this.state=A.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==A.ERROR&&(this.state=A.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==A.IDLE&&(this.state=A.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=cd(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function hd(){const n=me(1,1);return n.fillStyle="rgba(0,0,0,0)",n.fillRect(0,0,1,1),n.canvas}class dd extends Nr{constructor(t){super(),this.tile,this.handleTileChange_=this.handleTileChange_.bind(this),this.gutter_=t.gutter||0,this.helper_=t.helper,this.loaded=!1,this.ready=!1}setTile(t){if(t!==this.tile)if(this.tile&&this.tile.removeEventListener(It.CHANGE,this.handleTileChange_),this.tile=t,this.loaded=t.getState()===A.LOADED,this.loaded)this.uploadTile();else{if(t instanceof Ia){const e=t.getImage();e instanceof Image&&!e.crossOrigin&&(e.crossOrigin="anonymous")}t.addEventListener(It.CHANGE,this.handleTileChange_)}}uploadTile(){ot()}setReady(){this.ready=!0,this.dispatchEvent(It.CHANGE)}handleTileChange_(){this.tile.getState()===A.LOADED&&(this.loaded=!0,this.uploadTile())}disposeInternal(){this.tile.removeEventListener(It.CHANGE,this.handleTileChange_)}}const os=34962,as=34963,fd=35040,ls=35044,gd=35048,pd=5121,md=5123,_d=5125,$a=5126,Pa=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function yd(n,t){t=Object.assign({preserveDrawingBuffer:!0,antialias:!nd},t);const e=Pa.length;for(let i=0;i<e;++i)try{const r=n.getContext(Pa[i],t);if(r)return r}catch{}return null}const Ed={STATIC_DRAW:ls,STREAM_DRAW:fd,DYNAMIC_DRAW:gd};class Ma{constructor(t,e){this.array_=null,this.type_=t,Bt(t===os||t===as,"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`"),this.usage_=e!==void 0?e:Ed.STATIC_DRAW}ofSize(t){return this.array_=new(us(this.type_))(t),this}fromArray(t){return this.array_=us(this.type_).from(t),this}fromArrayBuffer(t){return this.array_=new(us(this.type_))(t),this}getType(){return this.type_}getArray(){return this.array_}getUsage(){return this.usage_}getSize(){return this.array_?this.array_.length:0}}function us(n){switch(n){case os:return Float32Array;case as:return Uint32Array;default:return Float32Array}}function Nn(n,t){return Array.isArray(n)?n:(t===void 0?t=[n,n]:(t[0]=n,t[1]=n),t)}function Oa(n,t,e){const i=e?n.LINEAR:n.NEAREST;n.bindTexture(n.TEXTURE_2D,t),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,i),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,i)}function bd(n,t,e,i){Oa(n,t,i),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e)}function La(n,t,e,i,r,s){const o=n.getGL();let a,l;e instanceof Float32Array?(a=o.FLOAT,n.getExtension("OES_texture_float"),l=n.getExtension("OES_texture_float_linear")!==null):(a=o.UNSIGNED_BYTE,l=!0),Oa(o,t,s&&l);const u=e.byteLength/i[1];let h=1;u%8===0?h=8:u%4===0?h=4:u%2===0&&(h=2);let c;switch(r){case 1:{c=o.LUMINANCE;break}case 2:{c=o.LUMINANCE_ALPHA;break}case 3:{c=o.RGB;break}case 4:{c=o.RGBA;break}default:throw new Error(`Unsupported number of bands: ${r}`)}const d=o.getParameter(o.UNPACK_ALIGNMENT);o.pixelStorei(o.UNPACK_ALIGNMENT,h),o.texImage2D(o.TEXTURE_2D,0,c,i[0],i[1],0,c,a,e),o.pixelStorei(o.UNPACK_ALIGNMENT,d)}let tn=null;function vd(){tn=me(1,1,void 0,{willReadFrequently:!0})}class Td extends dd{constructor(t){super(t),this.textures=[],this.renderSize_=Nn(t.grid.getTileSize(t.tile.tileCoord[0])),this.bandCount=NaN;const e=new Ma(os,ls);e.fromArray([0,1,1,1,1,0,0,0]),this.helper_.flushBufferData(e),this.coords=e,this.setTile(t.tile)}uploadTile(){const t=this.helper_,e=t.getGL(),i=this.tile;this.textures.length=0;let r;i instanceof Ia||i instanceof ss?r=i.getImage():r=i.getData();const s=Ci(r);if(s){const _=e.createTexture();this.textures.push(_),this.bandCount=4,bd(e,_,s,i.interpolate),this.setReady();return}r=ns(r);const o=i.getSize(),a=[o[0]+2*this.gutter_,o[1]+2*this.gutter_],l=r instanceof Float32Array,u=a[0]*a[1],h=l?Float32Array:Uint8Array,c=h.BYTES_PER_ELEMENT,d=r.byteLength/a[1];this.bandCount=Math.floor(d/c/a[0]);const f=Math.ceil(this.bandCount/4);if(f===1){const _=e.createTexture();this.textures.push(_),La(t,_,r,a,this.bandCount,i.interpolate),this.setReady();return}const g=new Array(f);for(let _=0;_<f;++_){const T=e.createTexture();this.textures.push(T);const E=_<f-1?4:(this.bandCount-1)%4+1;g[_]=new h(u*E)}let p=0,m=0;const y=a[0]*this.bandCount;for(let _=0;_<a[1];++_){for(let T=0;T<y;++T){const E=r[m+T],b=Math.floor(p/this.bandCount),v=T%this.bandCount,C=Math.floor(v/4),w=g[C],I=w.length/u,X=v%4;w[b*I+X]=E,++p}m+=d/c}for(let _=0;_<f;++_){const T=this.textures[_],E=g[_],b=E.length/u;La(t,T,E,a,b,i.interpolate)}this.setReady()}disposeInternal(){const t=this.helper_.getGL();this.helper_.deleteBuffer(this.coords);for(let e=0;e<this.textures.length;++e)t.deleteTexture(this.textures[e]);this.tile.removeEventListener(It.CHANGE,this.handleTileChange_)}getImagePixelData_(t,e,i){const r=this.gutter_,s=this.renderSize_[0],o=this.renderSize_[1];tn||vd(),tn.clearRect(0,0,1,1);const a=t.width,l=t.height,u=a-2*r,h=l-2*r,c=r+Math.floor(u*(e/s)),d=r+Math.floor(h*(i/o));let f;try{tn.drawImage(t,c,d,1,1,0,0,1,1),f=tn.getImageData(0,0,1,1).data}catch{return tn=null,null}return f}getArrayPixelData_(t,e,i,r){const s=this.gutter_,o=this.renderSize_[0],a=this.renderSize_[1],l=e[0],u=e[1],h=l+2*s,c=u+2*s,d=s+Math.floor(l*(i/o)),f=s+Math.floor(u*(r/a));if(t instanceof DataView){const p=t.byteLength/(h*c),m=p*(f*h+d),y=t.buffer.slice(m,m+p);return new DataView(y)}const g=this.bandCount*(f*h+d);return t.slice(g,g+this.bandCount)}getPixelData(t,e){if(!this.loaded)return null;if(this.tile instanceof va){const i=this.tile.getData(),r=ns(i);if(r){const s=this.tile.getSize();return this.getArrayPixelData_(r,s,t,e)}return this.getImagePixelData_(Ci(i),t,e)}return this.getImagePixelData_(this.tile.getImage(),t,e)}}class xd{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 i=this.entries_[t];return Bt(i!==void 0,"Tried to get a value for a key that does not exist in the cache"),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(t){const e=this.entries_[t];return Bt(e!==void 0,"Tried to get a value for a key that does not exist in the cache"),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,i;for(i=this.newest_;i;i=i.older)t[e++]=i.key_;return t}getValues(){const t=new Array(this.count_);let e=0,i;for(i=this.newest_;i;i=i.older)t[e++]=i.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){var e;return(e=this.entries_[t])==null?void 0:e.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){Bt(!(t in this.entries_),"Tried to set a value for a key that is used already");const i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_}setSize(t){this.highWaterMark=t}}class Rd{constructor(t,e,i,r){this.minX=t,this.maxX=e,this.minY=i,this.maxY=r}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}const wd=5;class Cd extends In{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null,this.staleKeys_=new Array,this.maxStaleKeys=wd}getStaleKeys(){return this.staleKeys_}prependStaleKey(t){this.staleKeys_.unshift(t),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}getFeatures(t){return ot()}getData(t){return null}prepareFrame(t){return ot()}renderFrame(t,e){return ot()}forEachFeatureAtCoordinate(t,e,i,r,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;(e.getState()===Qe.LOADED||e.getState()===Qe.ERROR)&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=Qe.LOADED&&e!=Qe.ERROR&&t.addEventListener(It.CHANGE,this.boundHandleImageChange_),e==Qe.IDLE&&(t.load(),e=t.getState()),e==Qe.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}renderDeferred(t){}disposeInternal(){delete this.layer_,super.disposeInternal()}}class cs extends Or{constructor(t,e,i,r){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=r}}const Si={LOST:"webglcontextlost",RESTORED:"webglcontextrestored"},Sd=`
46
+ precision mediump float;
47
+
48
+ attribute vec2 a_position;
49
+ varying vec2 v_texCoord;
50
+ varying vec2 v_screenCoord;
51
+
52
+ uniform vec2 u_screenSize;
53
+
54
+ void main() {
55
+ v_texCoord = a_position * 0.5 + 0.5;
56
+ v_screenCoord = v_texCoord * u_screenSize;
57
+ gl_Position = vec4(a_position, 0.0, 1.0);
58
+ }
59
+ `,Ad=`
60
+ precision mediump float;
61
+
62
+ uniform sampler2D u_image;
63
+ uniform float u_opacity;
64
+
65
+ varying vec2 v_texCoord;
66
+
67
+ void main() {
68
+ gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;
69
+ }
70
+ `;class Da{constructor(t){this.gl_=t.webGlContext;const e=this.gl_;this.scaleRatio_=t.scaleRatio||1,this.renderTargetTexture_=e.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=e.createFramebuffer(),this.depthBuffer_=e.createRenderbuffer();const i=e.createShader(e.VERTEX_SHADER);e.shaderSource(i,t.vertexShader||Sd),e.compileShader(i);const r=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(r,t.fragmentShader||Ad),e.compileShader(r),this.renderTargetProgram_=e.createProgram(),e.attachShader(this.renderTargetProgram_,i),e.attachShader(this.renderTargetProgram_,r),e.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=e.createBuffer();const s=[-1,-1,1,-1,-1,1,1,-1,1,1,-1,1];e.bindBuffer(e.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),e.bufferData(e.ARRAY_BUFFER,new Float32Array(s),e.STATIC_DRAW),this.renderTargetAttribLocation_=e.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetOpacityLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_opacity"),this.renderTargetTextureLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],t.uniforms&&Object.keys(t.uniforms).forEach(o=>{this.uniforms_.push({value:t.uniforms[o],location:e.getUniformLocation(this.renderTargetProgram_,o)})})}getGL(){return this.gl_}init(t){const e=this.getGL(),i=[e.drawingBufferWidth*this.scaleRatio_,e.drawingBufferHeight*this.scaleRatio_];if(e.bindFramebuffer(e.FRAMEBUFFER,this.getFrameBuffer()),e.bindRenderbuffer(e.RENDERBUFFER,this.getDepthBuffer()),e.viewport(0,0,i[0],i[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==i[0]||this.renderTargetTextureSize_[1]!==i[1]){this.renderTargetTextureSize_=i;const r=0,s=e.RGBA,o=0,a=e.RGBA,l=e.UNSIGNED_BYTE,u=null;e.bindTexture(e.TEXTURE_2D,this.renderTargetTexture_),e.texImage2D(e.TEXTURE_2D,r,s,i[0],i[1],o,a,l,u),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.renderTargetTexture_,0),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,i[0],i[1]),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,this.depthBuffer_)}}apply(t,e,i,r){const s=this.getGL(),o=t.size;if(s.bindFramebuffer(s.FRAMEBUFFER,e?e.getFrameBuffer():null),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,this.renderTargetTexture_),!e){const l=Yt(s.canvas);if(!t.renderTargets[l]){const u=s.getContextAttributes();u&&u.preserveDrawingBuffer&&(s.clearColor(0,0,0,0),s.clearDepth(1),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT)),t.renderTargets[l]=!0}}s.disable(s.DEPTH_TEST),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA),s.viewport(0,0,s.drawingBufferWidth,s.drawingBufferHeight),s.bindBuffer(s.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),s.useProgram(this.renderTargetProgram_),s.enableVertexAttribArray(this.renderTargetAttribLocation_),s.vertexAttribPointer(this.renderTargetAttribLocation_,2,s.FLOAT,!1,0,0),s.uniform2f(this.renderTargetUniformLocation_,o[0],o[1]),s.uniform1i(this.renderTargetTextureLocation_,0);const a=t.layerStatesArray[t.layerIndex].opacity;s.uniform1f(this.renderTargetOpacityLocation_,a),this.applyUniforms(t),i&&i(s,t),s.drawArrays(s.TRIANGLES,0,6),r&&r(s,t)}getFrameBuffer(){return this.frameBuffer_}getDepthBuffer(){return this.depthBuffer_}applyUniforms(t){const e=this.getGL();let i,r=1;this.uniforms_.forEach(function(s){if(i=typeof s.value=="function"?s.value(t):s.value,i instanceof HTMLCanvasElement||i instanceof ImageData)s.texture||(s.texture=e.createTexture()),e.activeTexture(e[`TEXTURE${r}`]),e.bindTexture(e.TEXTURE_2D,s.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),i instanceof ImageData?e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,i.width,i.height,0,e.UNSIGNED_BYTE,new Uint8Array(i.data)):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,i),e.uniform1i(s.location,r++);else if(Array.isArray(i))switch(i.length){case 2:e.uniform2f(s.location,i[0],i[1]);return;case 3:e.uniform3f(s.location,i[0],i[1],i[2]);return;case 4:e.uniform4f(s.location,i[0],i[1],i[2],i[3]);return;default:return}else typeof i=="number"&&e.uniform1f(s.location,i)})}}function Na(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function Ua(n,t){return n[0]=t[0],n[1]=t[1],n[4]=t[2],n[5]=t[3],n[12]=t[4],n[13]=t[5],n}const _e={PROJECTION_MATRIX:"u_projectionMatrix",SCREEN_TO_WORLD_MATRIX:"u_screenToWorldMatrix",TIME:"u_time",ZOOM:"u_zoom",RESOLUTION:"u_resolution",ROTATION:"u_rotation",VIEWPORT_SIZE_PX:"u_viewportSizePx",PIXEL_RATIO:"u_pixelRatio",HIT_DETECTION:"u_hitDetection"},Un={UNSIGNED_BYTE:pd,UNSIGNED_SHORT:md,UNSIGNED_INT:_d,FLOAT:$a},Ai={};function Fa(n){return"shared/"+n}let Ba=0;function Id(){const n="unique/"+Ba;return Ba+=1,n}function $d(n){let t=Ai[n];if(!t){const e=document.createElement("canvas");e.width=1,e.height=1,e.style.position="absolute",e.style.left="0",t={users:0,context:yd(e)},Ai[n]=t}return t.users+=1,t.context}function Pd(n){const t=Ai[n];if(!t||(t.users-=1,t.users>0))return;const e=t.context,i=e.getExtension("WEBGL_lose_context");i&&i.loseContext();const r=e.canvas;r.width=1,r.height=1,delete Ai[n]}class Md extends Po{constructor(t){super(),t=t||{},this.boundHandleWebGLContextLost_=this.handleWebGLContextLost.bind(this),this.boundHandleWebGLContextRestored_=this.handleWebGLContextRestored.bind(this),this.canvasCacheKey_=t.canvasCacheKey?Fa(t.canvasCacheKey):Id(),this.gl_=$d(this.canvasCacheKey_),this.bufferCache_={},this.extensionCache_={},this.currentProgram_=null,this.needsToBeRecreated_=!1;const e=this.gl_.canvas;e.addEventListener(Si.LOST,this.boundHandleWebGLContextLost_),e.addEventListener(Si.RESTORED,this.boundHandleWebGLContextRestored_),this.offsetRotateMatrix_=On(),this.offsetScaleMatrix_=On(),this.tmpMat4_=Na(),this.uniformLocationsByProgram_={},this.attribLocationsByProgram_={},this.uniforms_=[],t.uniforms&&this.setUniforms(t.uniforms),this.postProcessPasses_=t.postProcesses?t.postProcesses.map(i=>new Da({webGlContext:this.gl_,scaleRatio:i.scaleRatio,vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,uniforms:i.uniforms})):[new Da({webGlContext:this.gl_})],this.shaderCompileErrors_=null,this.startTime_=Date.now()}setUniforms(t){this.uniforms_=[],this.addUniforms(t)}addUniforms(t){for(const e in t)this.uniforms_.push({name:e,value:t[e]})}canvasCacheKeyMatches(t){return this.canvasCacheKey_===Fa(t)}getExtension(t){if(t in this.extensionCache_)return this.extensionCache_[t];const e=this.gl_.getExtension(t);return this.extensionCache_[t]=e,e}bindBuffer(t){const e=this.gl_,i=Yt(t);let r=this.bufferCache_[i];if(!r){const s=e.createBuffer();r={buffer:t,webGlBuffer:s},this.bufferCache_[i]=r}e.bindBuffer(t.getType(),r.webGlBuffer)}flushBufferData(t){const e=this.gl_;this.bindBuffer(t),e.bufferData(t.getType(),t.getArray(),t.getUsage())}deleteBuffer(t){const e=this.gl_,i=Yt(t),r=this.bufferCache_[i];r&&!e.isContextLost()&&e.deleteBuffer(r.webGlBuffer),delete this.bufferCache_[i]}disposeInternal(){const t=this.gl_.canvas;t.removeEventListener(Si.LOST,this.boundHandleWebGLContextLost_),t.removeEventListener(Si.RESTORED,this.boundHandleWebGLContextRestored_),Pd(this.canvasCacheKey_),delete this.gl_}prepareDraw(t,e,i){const r=this.gl_,s=this.getCanvas(),o=t.size,a=t.pixelRatio;(s.width!==o[0]*a||s.height!==o[1]*a)&&(s.width=o[0]*a,s.height=o[1]*a,s.style.width=o[0]+"px",s.style.height=o[1]+"px");for(let l=this.postProcessPasses_.length-1;l>=0;l--)this.postProcessPasses_[l].init(t);r.bindTexture(r.TEXTURE_2D,null),r.clearColor(0,0,0,0),r.depthRange(0,1),r.clearDepth(1),r.clear(r.COLOR_BUFFER_BIT|r.DEPTH_BUFFER_BIT),r.enable(r.BLEND),r.blendFunc(r.ONE,e?r.ZERO:r.ONE_MINUS_SRC_ALPHA),i?(r.enable(r.DEPTH_TEST),r.depthFunc(r.LEQUAL)):r.disable(r.DEPTH_TEST)}bindTexture(t,e,i){const r=this.gl_;r.activeTexture(r.TEXTURE0+e),r.bindTexture(r.TEXTURE_2D,t),r.uniform1i(this.getUniformLocation(i),e)}prepareDrawToRenderTarget(t,e,i,r){const s=this.gl_,o=e.getSize();s.bindFramebuffer(s.FRAMEBUFFER,e.getFramebuffer()),s.bindRenderbuffer(s.RENDERBUFFER,e.getDepthbuffer()),s.viewport(0,0,o[0],o[1]),s.bindTexture(s.TEXTURE_2D,e.getTexture()),s.clearColor(0,0,0,0),s.depthRange(0,1),s.clearDepth(1),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.enable(s.BLEND),s.blendFunc(s.ONE,i?s.ZERO:s.ONE_MINUS_SRC_ALPHA),r?(s.enable(s.DEPTH_TEST),s.depthFunc(s.LEQUAL)):s.disable(s.DEPTH_TEST)}drawElements(t,e){const i=this.gl_;this.getExtension("OES_element_index_uint");const r=i.UNSIGNED_INT,s=4,o=e-t,a=t*s;i.drawElements(i.TRIANGLES,o,r,a)}finalizeDraw(t,e,i){for(let r=0,s=this.postProcessPasses_.length;r<s;r++)r===s-1?this.postProcessPasses_[r].apply(t,null,e,i):this.postProcessPasses_[r].apply(t,this.postProcessPasses_[r+1])}getCanvas(){return this.gl_.canvas}getGL(){return this.gl_}applyFrameState(t){const e=t.size,i=t.viewState.rotation,r=t.pixelRatio;this.setUniformFloatValue(_e.TIME,(Date.now()-this.startTime_)*.001),this.setUniformFloatValue(_e.ZOOM,t.viewState.zoom),this.setUniformFloatValue(_e.RESOLUTION,t.viewState.resolution),this.setUniformFloatValue(_e.PIXEL_RATIO,r),this.setUniformFloatVec2(_e.VIEWPORT_SIZE_PX,[e[0],e[1]]),this.setUniformFloatValue(_e.ROTATION,i)}applyHitDetectionUniform(t){const e=this.getUniformLocation(_e.HIT_DETECTION);this.getGL().uniform1i(e,t?1:0),t&&this.setUniformFloatValue(_e.PIXEL_RATIO,.5)}applyUniforms(t){const e=this.gl_;let i,r=0;this.uniforms_.forEach(s=>{if(i=typeof s.value=="function"?s.value(t):s.value,i instanceof HTMLCanvasElement||i instanceof HTMLImageElement||i instanceof ImageData||i instanceof WebGLTexture){i instanceof WebGLTexture&&!s.texture?(s.prevValue=void 0,s.texture=i):s.texture||(s.prevValue=void 0,s.texture=e.createTexture()),this.bindTexture(s.texture,r,s.name),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);const o=!(i instanceof HTMLImageElement)||i.complete;!(i instanceof WebGLTexture)&&o&&s.prevValue!==i&&(s.prevValue=i,e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,i)),r++}else if(Array.isArray(i)&&i.length===6)this.setUniformMatrixValue(s.name,Ua(this.tmpMat4_,i));else if(Array.isArray(i)&&i.length<=4)switch(i.length){case 2:e.uniform2f(this.getUniformLocation(s.name),i[0],i[1]);return;case 3:e.uniform3f(this.getUniformLocation(s.name),i[0],i[1],i[2]);return;case 4:e.uniform4f(this.getUniformLocation(s.name),i[0],i[1],i[2],i[3]);return;default:return}else typeof i=="number"&&e.uniform1f(this.getUniformLocation(s.name),i)})}useProgram(t,e){this.gl_.useProgram(t),this.currentProgram_=t,this.applyFrameState(e),this.applyUniforms(e)}compileShader(t,e){const i=this.gl_,r=i.createShader(e);return i.shaderSource(r,t),i.compileShader(r),r}getProgram(t,e){const i=this.gl_,r=this.compileShader(t,i.FRAGMENT_SHADER),s=this.compileShader(e,i.VERTEX_SHADER),o=i.createProgram();if(i.attachShader(o,r),i.attachShader(o,s),i.linkProgram(o),!i.getShaderParameter(r,i.COMPILE_STATUS)){const a=`Fragment shader compilation failed: ${i.getShaderInfoLog(r)}`;throw new Error(a)}if(i.deleteShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS)){const a=`Vertex shader compilation failed: ${i.getShaderInfoLog(s)}`;throw new Error(a)}if(i.deleteShader(s),!i.getProgramParameter(o,i.LINK_STATUS)){const a=`GL program linking failed: ${i.getProgramInfoLog(o)}`;throw new Error(a)}return o}getUniformLocation(t){const e=Yt(this.currentProgram_);return this.uniformLocationsByProgram_[e]===void 0&&(this.uniformLocationsByProgram_[e]={}),this.uniformLocationsByProgram_[e][t]===void 0&&(this.uniformLocationsByProgram_[e][t]=this.gl_.getUniformLocation(this.currentProgram_,t)),this.uniformLocationsByProgram_[e][t]}getAttributeLocation(t){const e=Yt(this.currentProgram_);return this.attribLocationsByProgram_[e]===void 0&&(this.attribLocationsByProgram_[e]={}),this.attribLocationsByProgram_[e][t]===void 0&&(this.attribLocationsByProgram_[e][t]=this.gl_.getAttribLocation(this.currentProgram_,t)),this.attribLocationsByProgram_[e][t]}makeProjectionTransform(t,e){const i=t.size,r=t.viewState.rotation,s=t.viewState.resolution,o=t.viewState.center;return Kr(e,0,0,2/(s*i[0]),2/(s*i[1]),-r,-o[0],-o[1]),e}setUniformFloatValue(t,e){this.gl_.uniform1f(this.getUniformLocation(t),e)}setUniformFloatVec2(t,e){this.gl_.uniform2fv(this.getUniformLocation(t),e)}setUniformFloatVec4(t,e){this.gl_.uniform4fv(this.getUniformLocation(t),e)}setUniformMatrixValue(t,e){this.gl_.uniformMatrix4fv(this.getUniformLocation(t),!1,e)}enableAttributeArray_(t,e,i,r,s){const o=this.getAttributeLocation(t);o<0||(this.gl_.enableVertexAttribArray(o),this.gl_.vertexAttribPointer(o,e,i,!1,r,s))}enableAttributes(t){const e=Od(t);let i=0;for(let r=0;r<t.length;r++){const s=t[r];this.enableAttributeArray_(s.name,s.size,s.type||$a,e,i),i+=s.size*Xa(s.type)}}handleWebGLContextLost(t){Dr(this.bufferCache_),this.currentProgram_=null,t.preventDefault()}handleWebGLContextRestored(){this.needsToBeRecreated_=!0}needsToBeRecreated(){return this.needsToBeRecreated_}createTexture(t,e,i){const r=this.gl_;i=i||r.createTexture();const s=0,o=r.RGBA,a=0,l=r.RGBA,u=r.UNSIGNED_BYTE;return r.bindTexture(r.TEXTURE_2D,i),e?r.texImage2D(r.TEXTURE_2D,s,o,l,u,e):r.texImage2D(r.TEXTURE_2D,s,o,t[0],t[1],a,l,u,null),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),i}}function Od(n){let t=0;for(let e=0;e<n.length;e++){const i=n[e];t+=i.size*Xa(i.type)}return t}function Xa(n){switch(n){case Un.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case Un.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case Un.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case Un.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}class hs extends Cd{constructor(t,e){super(t),e=e||{},this.inversePixelTransform_=On(),this.pixelContext_=null,this.postProcesses_=e.postProcesses,this.uniforms_=e.uniforms,this.helper,t.addChangeListener(W.MAP,this.removeHelper.bind(this)),this.dispatchPreComposeEvent=this.dispatchPreComposeEvent.bind(this),this.dispatchPostComposeEvent=this.dispatchPostComposeEvent.bind(this)}dispatchPreComposeEvent(t,e){const i=this.getLayer();if(i.hasListener(Ie.PRECOMPOSE)){const r=new cs(Ie.PRECOMPOSE,void 0,e,t);i.dispatchEvent(r)}}dispatchPostComposeEvent(t,e){const i=this.getLayer();if(i.hasListener(Ie.POSTCOMPOSE)){const r=new cs(Ie.POSTCOMPOSE,void 0,e,t);i.dispatchEvent(r)}}reset(t){this.uniforms_=t.uniforms,this.helper&&this.helper.setUniforms(this.uniforms_)}removeHelper(){this.helper&&(this.helper.dispose(),delete this.helper)}prepareFrame(t){if(this.getLayer().getRenderSource()){let e=!0,i=-1,r;for(let o=0,a=t.layerStatesArray.length;o<a;o++){const l=t.layerStatesArray[o].layer,u=l.getRenderer();if(!(u instanceof hs)){e=!0;continue}const h=l.getClassName();if((e||h!==r)&&(i+=1,e=!1),r=h,u===this)break}const s="map/"+t.mapId+"/group/"+i;(!this.helper||!this.helper.canvasCacheKeyMatches(s)||this.helper.needsToBeRecreated())&&(this.removeHelper(),this.helper=new Md({postProcesses:this.postProcesses_,uniforms:this.uniforms_,canvasCacheKey:s}),r&&(this.helper.getCanvas().className=r),this.afterHelperCreated())}return this.prepareFrameInternal(t)}afterHelperCreated(){}prepareFrameInternal(t){return!0}disposeInternal(){this.removeHelper(),super.disposeInternal()}dispatchRenderEvent_(t,e,i){const r=this.getLayer();if(r.hasListener(t)){Kr(this.inversePixelTransform_,0,0,i.pixelRatio,-i.pixelRatio,0,0,-i.size[1]);const s=new cs(t,this.inversePixelTransform_,i,e);r.dispatchEvent(s)}}preRender(t,e){this.dispatchRenderEvent_(Ie.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(Ie.POSTRENDER,t,e)}}function Ha(n,t,e,i){return i!==void 0?(i[0]=n,i[1]=t,i[2]=e,i):[n,t,e]}function Ld(n,t,e){return n+"/"+t+"/"+e}function en(n){return Ld(n[0],n[1],n[2])}const Dd={TILE_TRANSFORM:"u_tileTransform",TRANSITION_ALPHA:"u_transitionAlpha",DEPTH:"u_depth",RENDER_EXTENT:"u_renderExtent",PATTERN_ORIGIN:"u_patternOrigin",RESOLUTION:"u_resolution",ZOOM:"u_zoom",GLOBAL_ALPHA:"u_globalAlpha",PROJECTION_MATRIX:"u_projectionMatrix",SCREEN_TO_WORLD_MATRIX:"u_screenToWorldMatrix"},Nd={};function Ga(n){return 1/(n+2)}function Ud(){return{tileIds:new Set,representationsByZ:{}}}function ka(n,t){return n.tileIds.has(Yt(t))}function Va(n,t,e){const i=n.representationsByZ;e in i||(i[e]=new Set),i[e].add(t),n.tileIds.add(Yt(t.tile))}function ds(n,t){const e=n.layerStatesArray[n.layerIndex];e.extent&&(t=Zt(t,Ke(e.extent,n.viewState.projection)));const i=e.layer.getRenderSource();if(!i.getWrapX()){const r=i.getTileGridForProjection(n.viewState.projection).getExtent();r&&(t=Zt(t,r))}return t}function fs(n,t){return`${n.getKey()},${en(t)}`}class Fd extends hs{constructor(t,e){super(t,{uniforms:e.uniforms,postProcesses:e.postProcesses}),this.renderComplete=!1,this.tileTransform_=On(),this.tempMat4=Na(),this.tempTileRange_=new Rd(0,0,0,0),this.tempTileCoord_=Ha(0,0,0),this.tempSize_=[0,0];const i=e.cacheSize!==void 0?e.cacheSize:512;this.tileRepresentationCache=new xd(i),this.frameState=null,this.projection_=void 0}reset(t){super.reset({uniforms:t.uniforms})}prepareFrameInternal(t){this.projection_?t.viewState.projection!==this.projection_&&(this.clearCache(),this.projection_=t.viewState.projection):this.projection_=t.viewState.projection;const i=this.getLayer().getRenderSource();return!i||Ei(ds(t,t.extent))?!1:i.getState()==="ready"}createTileRepresentation(t){return ot()}enqueueTiles(t,e,i,r,s){const o=t.viewState,a=this.getLayer(),l=a.getRenderSource(),u=l.getTileGridForProjection(o.projection),h=l.getGutterForProjection(o.projection),c=Yt(l);c in t.wantedTiles||(t.wantedTiles[c]={});const d=t.wantedTiles[c],f=this.tileRepresentationCache,g=a.getMapInternal(),p=Math.max(i-s,u.getMinZoom(),u.getZForResolution(Math.min(a.getMaxResolution(),g?g.getView().getResolutionForZoom(Math.max(a.getMinZoom(),0)):u.getResolution(0)),l.zDirection));for(let m=i;m>=p;--m){const y=u.getTileRangeForExtentAndZ(e,m,this.tempTileRange_),_=u.getResolution(m);for(let T=y.minX;T<=y.maxX;++T)for(let E=y.minY;E<=y.maxY;++E){const b=Ha(m,T,E,this.tempTileCoord_),v=fs(l,b);let C,w;if(f.containsKey(v)&&(C=f.get(v),w=C.tile),(!C||C.tile.key!==l.getKey())&&(w=l.getTile(m,T,E,t.pixelRatio,o.projection),!w)||ka(r,w))continue;C?C.setTile(w):(C=this.createTileRepresentation({tile:w,grid:u,helper:this.helper,gutter:h}),f.set(v,C)),Va(r,C,m);const I=w.getKey();d[I]=!0,w.getState()===A.IDLE&&(t.tileQueue.isKeyQueued(I)||t.tileQueue.enqueue([w,c,u.getTileCoordCenter(b),_]))}}}beforeTilesRender(t,e){this.helper.prepareDraw(this.frameState,!e,!0)}beforeTilesMaskRender(t){return!1}renderTile(t,e,i,r,s,o,a,l,u,h,c){}renderTileMask(t,e,i,r){}drawTile_(t,e,i,r,s,o,a){if(!e.ready)return;const u=e.tile.tileCoord,h=en(u),c=h in o?o[h]:1,d=a.getResolution(i),f=Nn(a.getTileSize(i),this.tempSize_),g=a.getOrigin(i),p=a.getTileCoordExtent(u),m=c<1?-1:Ga(i);c<1&&(t.animate=!0);const y=t.viewState,_=y.center[0],T=y.center[1],E=f[0]+2*r,b=f[1]+2*r,v=E/b,C=(_-g[0])/(f[0]*d),w=(g[1]-T)/(f[1]*d),I=y.resolution/d,X=u[1],F=u[2];xh(this.tileTransform_),sa(this.tileTransform_,2/(t.size[0]*I/E),-2/(t.size[1]*I/E)),wh(this.tileTransform_,y.rotation),sa(this.tileTransform_,1,1/v),Ch(this.tileTransform_,(f[0]*(X-C)-r)/E,(f[1]*(F-w)-r)/b),this.renderTile(e,this.tileTransform_,t,s,d,f,g,p,m,r,c)}renderFrame(t){this.frameState=t,this.renderComplete=!0;const e=this.helper.getGL();this.preRender(e,t);const i=t.viewState,r=this.getLayer(),s=r.getRenderSource(),o=s.getTileGridForProjection(i.projection),a=s.getGutterForProjection(i.projection),l=ds(t,t.extent),u=o.getZForResolution(i.resolution,s.zDirection),h=Ud(),c=r.getPreload();if(t.nextExtent){const v=o.getZForResolution(i.nextResolution,s.zDirection),C=ds(t,t.nextExtent);this.enqueueTiles(t,C,v,h,c)}this.enqueueTiles(t,l,u,h,0),c>0&&setTimeout(()=>{this.enqueueTiles(t,l,u-1,h,c-1)},0);const d={},f=Yt(this),g=t.time;let p=!1;const m=h.representationsByZ;if(u in m)for(const v of m[u]){const C=v.tile;if((C instanceof ss||C instanceof Aa)&&C.getState()===A.EMPTY)continue;const w=C.tileCoord;if(v.ready){const F=C.getAlpha(f,g);if(F===1){C.endTransition(f);continue}p=!0;const V=en(w);d[V]=F}if(this.renderComplete=!1,this.findAltTiles_(o,w,u+1,h))continue;const X=o.getMinZoom();for(let F=u-1;F>=X&&!this.findAltTiles_(o,w,F,h);--F);}const y=Object.keys(m).map(Number).sort(Sc);if(this.beforeTilesMaskRender(t))for(let v=0,C=y.length;v<C;++v){const w=y[v];for(const I of m[w]){const X=I.tile.tileCoord;if(en(X)in d)continue;const V=o.getTileCoordExtent(X);this.renderTileMask(I,w,V,Ga(w))}}this.beforeTilesRender(t,p);for(let v=0,C=y.length;v<C;++v){const w=y[v];for(const I of m[w]){const X=I.tile.tileCoord;en(X)in d||this.drawTile_(t,I,w,a,l,d,o)}}if(u in m)for(const v of m[u]){const C=v.tile.tileCoord;en(C)in d&&this.drawTile_(t,v,u,a,l,d,o)}this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);const T=this.helper.getCanvas(),E=this.tileRepresentationCache;for(;E.canExpireCache();)E.pop().dispose();const b=function(v,C){s.expireCache(C.viewState.projection,Nd)};return t.postRenderFunctions.push(b),this.postRender(e,t),T}findAltTiles_(t,e,i,r){const s=t.getTileRangeForTileCoordAndZ(e,i,this.tempTileRange_);if(!s)return!1;let o=!0;const a=this.tileRepresentationCache,l=this.getLayer().getRenderSource();for(let u=s.minX;u<=s.maxX;++u)for(let h=s.minY;h<=s.maxY;++h){const c=fs(l,[i,u,h]);let d=!1;if(a.containsKey(c)){const f=a.get(c);f.ready&&!ka(r,f.tile)&&(Va(r,f,i),d=!0)}d||(o=!1)}return o}clearCache(){const t=this.tileRepresentationCache;t.forEach(e=>e.dispose()),t.clear()}removeHelper(){this.helper&&this.clearCache(),super.removeHelper()}disposeInternal(){super.disposeInternal(),delete this.frameState}}const L={...Dd,TILE_TEXTURE_ARRAY:"u_tileTextures",TEXTURE_PIXEL_WIDTH:"u_texturePixelWidth",TEXTURE_PIXEL_HEIGHT:"u_texturePixelHeight",TEXTURE_RESOLUTION:"u_textureResolution",TEXTURE_ORIGIN_X:"u_textureOriginX",TEXTURE_ORIGIN_Y:"u_textureOriginY"},Ii={TEXTURE_COORD:"a_textureCoord"},Bd=[{name:Ii.TEXTURE_COORD,size:2,type:Un.FLOAT}];class Xd extends Fd{constructor(t,e){super(t,e),this.program_,this.vertexShader_=e.vertexShader,this.fragmentShader_=e.fragmentShader,this.indices_=new Ma(as,ls),this.indices_.fromArray([0,1,3,1,2,3]),this.paletteTextures_=e.paletteTextures||[]}reset(t){if(super.reset(t),this.helper){const e=this.helper.getGL();for(const i of this.paletteTextures_)i.delete(e)}this.vertexShader_=t.vertexShader,this.fragmentShader_=t.fragmentShader,this.paletteTextures_=t.paletteTextures||[],this.helper&&(this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_))}afterHelperCreated(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.helper.flushBufferData(this.indices_)}removeHelper(){if(this.helper){const t=this.helper.getGL();for(const e of this.paletteTextures_)e.delete(t)}super.removeHelper()}createTileRepresentation(t){return new Td(t)}beforeTilesRender(t,e){super.beforeTilesRender(t,e),this.helper.useProgram(this.program_,t)}renderTile(t,e,i,r,s,o,a,l,u,h,c){const d=this.helper.getGL();this.helper.bindBuffer(t.coords),this.helper.bindBuffer(this.indices_),this.helper.enableAttributes(Bd);let f=0;for(;f<t.textures.length;){const v=`${L.TILE_TEXTURE_ARRAY}[${f}]`;this.helper.bindTexture(t.textures[f],f,v),++f}for(let v=0;v<this.paletteTextures_.length;++v){const C=this.paletteTextures_[v],w=C.getTexture(d);this.helper.bindTexture(w,f,C.name),++f}const g=i.viewState,p=o[0]+2*h,m=o[1]+2*h,_=t.tile.tileCoord,T=_[1],E=_[2];this.helper.setUniformMatrixValue(L.TILE_TRANSFORM,Ua(this.tempMat4,e)),this.helper.setUniformFloatValue(L.TRANSITION_ALPHA,c),this.helper.setUniformFloatValue(L.DEPTH,u);let b=r;h>0&&(b=l,Zt(b,r,b)),this.helper.setUniformFloatVec4(L.RENDER_EXTENT,b),this.helper.setUniformFloatValue(L.RESOLUTION,g.resolution),this.helper.setUniformFloatValue(L.ZOOM,g.zoom),this.helper.setUniformFloatValue(L.TEXTURE_PIXEL_WIDTH,p),this.helper.setUniformFloatValue(L.TEXTURE_PIXEL_HEIGHT,m),this.helper.setUniformFloatValue(L.TEXTURE_RESOLUTION,s),this.helper.setUniformFloatValue(L.TEXTURE_ORIGIN_X,a[0]+T*o[0]*s-h*s),this.helper.setUniformFloatValue(L.TEXTURE_ORIGIN_Y,a[1]-E*o[1]*s+h*s),this.helper.drawElements(0,this.indices_.getSize())}getData(t){if(!this.helper.getGL())return null;const i=this.frameState;if(!i)return null;const r=this.getLayer(),s=Rh(i.pixelToCoordinateTransform,t.slice()),o=i.viewState,a=r.getExtent();if(a&&!Xr(Ke(a,o.projection),s))return null;const l=r.getSources(Br([s]),o.resolution);let u,h,c;for(u=l.length-1;u>=0;--u)if(h=l[u],h.getState()==="ready"){if(c=h.getTileGridForProjection(o.projection),h.getWrapX())break;const f=c.getExtent();if(!f||Xr(f,s))break}if(u<0)return null;const d=this.tileRepresentationCache;for(let f=c.getZForResolution(o.resolution);f>=c.getMinZoom();--f){const g=c.getTileCoordForCoordAndZ(s,f),p=fs(h,g);if(!d.containsKey(p))continue;const m=d.get(p),y=m.tile;if((y instanceof ss||y instanceof Aa)&&y.getState()===A.EMPTY)return null;if(!m.loaded)continue;const _=c.getOrigin(f),T=Nn(c.getTileSize(f)),E=c.getResolution(f),b=(s[0]-_[0])/E-g[1]*T[0],v=(_[1]-s[1])/E-g[2]*T[1];return m.getPixelData(b,v)}return null}disposeInternal(){const t=this.helper;if(t){const e=t.getGL();for(const i of this.paletteTextures_)i.delete(e);this.paletteTextures_.length=0,e.deleteProgram(this.program_),delete this.program_,t.deleteBuffer(this.indices_)}super.disposeInternal(),delete this.indices_}}const $i={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]};var Rt={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"]};Rt.whitepoint={2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}},Rt.max=Rt.whitepoint[2].D65,Rt.rgb=function(n,t){t=t||Rt.whitepoint[2].E;var e=n[0]/t[0],i=n[1]/t[1],r=n[2]/t[2],s,o,a;return s=e*3.240969941904521+i*-1.537383177570093+r*-.498610760293,o=e*-.96924363628087+i*1.87596750150772+r*.041555057407175,a=e*.055630079696993+i*-.20397695888897+r*1.056971514242878,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s=s*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o=o*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=a*12.92,s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),[s*255,o*255,a*255]},$i.xyz=function(n,t){var e=n[0]/255,i=n[1]/255,r=n[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;var s=e*.41239079926595+i*.35758433938387+r*.18048078840183,o=e*.21263900587151+i*.71516867876775+r*.072192315360733,a=e*.019330818715591+i*.11919477979462+r*.95053215224966;return t=t||Rt.whitepoint[2].E,[s*t[0],o*t[1],a*t[2]]};const ja={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(n,t,e){var i,r,s,o,a,l,u,h,c,d,f,g,p;if(s=n[0],o=n[1],a=n[2],s===0)return[0,0,0];var m=.0011070564598794539;return t=t||"D65",e=e||2,c=Rt.whitepoint[e][t][0],d=Rt.whitepoint[e][t][1],f=Rt.whitepoint[e][t][2],g=4*c/(c+15*d+3*f),p=9*d/(c+15*d+3*f),i=o/(13*s)+g||0,r=a/(13*s)+p||0,u=s>8?d*Math.pow((s+16)/116,3):d*s*m,l=u*9*i/(4*r)||0,h=u*(12-3*i-20*r)/(4*r)||0,[l,u,h]}};Rt.luv=function(n,t,e){var i,r,s,o,a,l,u,h,c,d,f,g,p,m=.008856451679035631,y=903.2962962962961;t=t||"D65",e=e||2,c=Rt.whitepoint[e][t][0],d=Rt.whitepoint[e][t][1],f=Rt.whitepoint[e][t][2],g=4*c/(c+15*d+3*f),p=9*d/(c+15*d+3*f),l=n[0],u=n[1],h=n[2],i=4*l/(l+15*u+3*h)||0,r=9*u/(l+15*u+3*h)||0;var _=u/d;return s=_<=m?y*_:116*Math.pow(_,1/3)-16,o=13*s*(i-g),a=13*s*(r-p),[s,o,a]},ja.lchuv=function(n){var t=n[0],e=n[1],i=n[2],r=Math.sqrt(e*e+i*i),s=Math.atan2(i,e),o=s*360/2/Math.PI;return o<0&&(o+=360),[t,r,o]},Rt.lchuv=function(n){return ja.lchuv(Rt.luv(n))};var Pi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function za(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Hd={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const Wa=za(Hd);var Ya={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function Gd(n){var h,c;var t,e=[],i=1,r;if(typeof n=="number")return{space:"rgb",values:[n>>>16,(n&65280)>>>8,n&255],alpha:1};if(typeof n=="number")return{space:"rgb",values:[n>>>16,(n&65280)>>>8,n&255],alpha:1};if(n=String(n).toLowerCase(),Wa[n])e=Wa[n].slice(),r="rgb";else if(n==="transparent")i=0,r="rgb",e=[0,0,0];else if(n[0]==="#"){var s=n.slice(1),o=s.length,a=o<=4;i=1,a?(e=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],o===4&&(i=parseInt(s[3]+s[3],16)/255)):(e=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],o===8&&(i=parseInt(s[6]+s[7],16)/255)),e[0]||(e[0]=0),e[1]||(e[1]=0),e[2]||(e[2]=0),r="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(n)){var l=t[1];r=l.replace(/a$/,"");var u=r==="cmyk"?4:r==="gray"?1:3;e=t[2].trim().split(/\s*[,\/]\s*|\s+/),r==="color"&&(r=e.shift()),e=e.map(function(d,f){if(d[d.length-1]==="%")return d=parseFloat(d)/100,f===3?d:r==="rgb"?d*255:r[0]==="h"||r[0]==="l"&&!f?d*100:r==="lab"?d*125:r==="lch"?f<2?d*150:d*360:r[0]==="o"&&!f?d:r==="oklab"?d*.4:r==="oklch"?f<2?d*.4:d*360:d;if(r[f]==="h"||f===2&&r[r.length-1]==="h"){if(Ya[d]!==void 0)return Ya[d];if(d.endsWith("deg"))return parseFloat(d);if(d.endsWith("turn"))return parseFloat(d)*360;if(d.endsWith("grad"))return parseFloat(d)*360/400;if(d.endsWith("rad"))return parseFloat(d)*180/Math.PI}return d==="none"?0:parseFloat(d)}),i=e.length>u?e.pop():1}else/[0-9](?:\s|\/|,)/.test(n)&&(e=n.match(/([0-9]+)/g).map(function(d){return parseFloat(d)}),r=((c=(h=n.match(/([a-z])/ig))==null?void 0:h.join(""))==null?void 0:c.toLowerCase())||"rgb");return{space:r,values:e,alpha:i}}const gs={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(n){var t=n[0]/360,e=n[1]/100,i=n[2]/100,r,s,o,a,l,u=0;if(e===0)return l=i*255,[l,l,l];for(s=i<.5?i*(1+e):i+e-i*e,r=2*i-s,a=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?r+(s-r)*6*o:2*o<1?s:3*o<2?r+(s-r)*(2/3-o)*6:r,a[u++]=l*255;return a}};$i.hsl=function(n){var t=n[0]/255,e=n[1]/255,i=n[2]/255,r=Math.min(t,e,i),s=Math.max(t,e,i),o=s-r,a,l,u;return s===r?a=0:t===s?a=(e-i)/o:e===s?a=2+(i-t)/o:i===s&&(a=4+(t-e)/o),a=Math.min(a*60,360),a<0&&(a+=360),u=(r+s)/2,s===r?l=0:u<=.5?l=o/(s+r):l=o/(2-s-r),[a,l*100,u*100]};function kd(n){Array.isArray(n)&&n.raw&&(n=String.raw(...arguments)),n instanceof Number&&(n=+n);var t,e=Gd(n);if(!e.space)return[];const i=e.space[0]==="h"?gs.min:$i.min,r=e.space[0]==="h"?gs.max:$i.max;return t=Array(3),t[0]=Math.min(Math.max(e.values[0],i[0]),r[0]),t[1]=Math.min(Math.max(e.values[1],i[1]),r[1]),t[2]=Math.min(Math.max(e.values[2],i[2]),r[2]),e.space[0]==="h"&&(t=gs.rgb(t)),t.push(Math.min(Math.max(e.alpha,0),1)),t}const Vd=1024,Fn={};let ps=0;function Za(n){if(Fn.hasOwnProperty(n))return Fn[n];if(ps>=Vd){let e=0;for(const i in Fn)e++&3||(delete Fn[i],--ps)}const t=kd(n);if(t.length!==4)throw new Error('failed to parse "'+n+'" as color');for(const e of t)if(isNaN(e))throw new Error('failed to parse "'+n+'" as color');return jd(t),Fn[n]=t,++ps,t}function Ka(n){return Array.isArray(n)?n:Za(n)}function jd(n){return n[0]=ft(n[0]+.5|0,0,255),n[1]=ft(n[1]+.5|0,0,255),n[2]=ft(n[2]+.5|0,0,255),n[3]=ft(n[3],0,1),n}let Oe=0;const $t=1<<Oe++,D=1<<Oe++,wt=1<<Oe++,Kt=1<<Oe++,Mi=1<<Oe++,nn=1<<Oe++,Oi=Math.pow(2,Oe)-1,ms={[$t]:"boolean",[D]:"number",[wt]:"string",[Kt]:"color",[Mi]:"number[]",[nn]:"size"},zd=Object.keys(ms).map(Number).sort(Mo);function Wd(n){return n in ms}function rn(n){const t=[];for(const e of zd)Bn(n,e)&&t.push(ms[e]);return t.length===0?"untyped":t.length<3?t.join(" or "):t.slice(0,-1).join(", ")+", or "+t[t.length-1]}function Bn(n,t){return(n&t)===t}function ye(n,t){return n===t}class gt{constructor(t,e){if(!Wd(t))throw new Error(`literal expressions must have a specific type, got ${rn(t)}`);this.type=t,this.value=e}}class qa{constructor(t,e,...i){this.type=t,this.operator=e,this.args=i}}function Yd(){return{variables:new Set,properties:new Set,featureId:!1,geometryType:!1}}function Et(n,t,e){switch(typeof n){case"boolean":{if(ye(t,wt))return new gt(wt,n?"true":"false");if(!Bn(t,$t))throw new Error(`got a boolean, but expected ${rn(t)}`);return new gt($t,n)}case"number":{if(ye(t,nn))return new gt(nn,Nn(n));if(ye(t,$t))return new gt($t,!!n);if(ye(t,wt))return new gt(wt,n.toString());if(!Bn(t,D))throw new Error(`got a number, but expected ${rn(t)}`);return new gt(D,n)}case"string":{if(ye(t,Kt))return new gt(Kt,Za(n));if(ye(t,$t))return new gt($t,!!n);if(!Bn(t,wt))throw new Error(`got a string, but expected ${rn(t)}`);return new gt(wt,n)}}if(!Array.isArray(n))throw new Error("expression must be an array or a primitive value");if(n.length===0)throw new Error("empty expression");if(typeof n[0]=="string")return af(n,t,e);for(const i of n)if(typeof i!="number")throw new Error("expected an array of numbers");if(ye(t,nn)){if(n.length!==2)throw new Error(`expected an array of two values for a size, got ${n.length}`);return new gt(nn,n)}if(ye(t,Kt)){if(n.length===3)return new gt(Kt,[...n,1]);if(n.length===4)return new gt(Kt,n);throw new Error(`expected an array of 3 or 4 values for a color, got ${n.length}`)}if(!Bn(t,Mi))throw new Error(`got an array of numbers, but expected ${rn(t)}`);return new gt(Mi,n)}const x={Get:"get",Var:"var",Concat:"concat",GeometryType:"geometry-type",Any:"any",All:"all",Not:"!",Resolution:"resolution",Zoom:"zoom",Time:"time",Equal:"==",NotEqual:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string"},Zd={[x.Get]:M(N(1,1/0),Kd),[x.Var]:M(N(1,1),qd),[x.Id]:M(Jd,Xn),[x.Concat]:M(N(2,1/0),Y(wt)),[x.GeometryType]:M(Qd,Xn),[x.Resolution]:M(Xn),[x.Zoom]:M(Xn),[x.Time]:M(Xn),[x.Any]:M(N(2,1/0),Y($t)),[x.All]:M(N(2,1/0),Y($t)),[x.Not]:M(N(1,1),Y($t)),[x.Equal]:M(N(2,2),Y(Oi)),[x.NotEqual]:M(N(2,2),Y(Oi)),[x.GreaterThan]:M(N(2,2),Y(D)),[x.GreaterThanOrEqualTo]:M(N(2,2),Y(D)),[x.LessThan]:M(N(2,2),Y(D)),[x.LessThanOrEqualTo]:M(N(2,2),Y(D)),[x.Multiply]:M(N(2,1/0),Ja),[x.Coalesce]:M(N(2,1/0),Ja),[x.Divide]:M(N(2,2),Y(D)),[x.Add]:M(N(2,1/0),Y(D)),[x.Subtract]:M(N(2,2),Y(D)),[x.Clamp]:M(N(3,3),Y(D)),[x.Mod]:M(N(2,2),Y(D)),[x.Pow]:M(N(2,2),Y(D)),[x.Abs]:M(N(1,1),Y(D)),[x.Floor]:M(N(1,1),Y(D)),[x.Ceil]:M(N(1,1),Y(D)),[x.Round]:M(N(1,1),Y(D)),[x.Sin]:M(N(1,1),Y(D)),[x.Cos]:M(N(1,1),Y(D)),[x.Atan]:M(N(1,2),Y(D)),[x.Sqrt]:M(N(1,1),Y(D)),[x.Match]:M(N(4,1/0),Qa,ef),[x.Between]:M(N(3,3),Y(D)),[x.Interpolate]:M(N(6,1/0),Qa,nf),[x.Case]:M(N(3,1/0),tf,rf),[x.In]:M(N(2,2),sf),[x.Number]:M(N(1,1/0),Y(Oi)),[x.String]:M(N(1,1/0),Y(Oi)),[x.Array]:M(N(1,1/0),Y(D)),[x.Color]:M(N(1,4),Y(D)),[x.Band]:M(N(1,3),Y(D)),[x.Palette]:M(N(2,2),of),[x.ToString]:M(N(1,1),Y($t|D|wt|Kt))};function Kd(n,t,e){const i=n.length-1,r=new Array(i);for(let s=0;s<i;++s){const o=n[s+1];switch(typeof o){case"number":{r[s]=new gt(D,o);break}case"string":{r[s]=new gt(wt,o);break}default:throw new Error(`expected a string key or numeric array index for a get operation, got ${o}`)}s===0&&e.properties.add(String(o))}return r}function qd(n,t,e){const i=n[1];if(typeof i!="string")throw new Error("expected a string argument for var operation");return e.variables.add(i),[new gt(wt,i)]}function Jd(n,t,e){e.featureId=!0}function Qd(n,t,e){e.geometryType=!0}function Xn(n,t,e){const i=n[0];if(n.length!==1)throw new Error(`expected no arguments for ${i} operation`);return[]}function N(n,t){return function(e,i,r){const s=e[0],o=e.length-1;if(n===t){if(o!==n){const a=n===1?"":"s";throw new Error(`expected ${n} argument${a} for ${s}, got ${o}`)}}else if(o<n||o>t){const a=t===1/0?`${n} or more`:`${n} to ${t}`;throw new Error(`expected ${a} arguments for ${s}, got ${o}`)}}}function Ja(n,t,e){const i=n.length-1,r=new Array(i);for(let s=0;s<i;++s){const o=Et(n[s+1],t,e);r[s]=o}return r}function Y(n){return function(t,e,i){const r=t.length-1,s=new Array(r);for(let o=0;o<r;++o){const a=Et(t[o+1],n,i);s[o]=a}return s}}function tf(n,t,e){const i=n[0],r=n.length-1;if(r%2===0)throw new Error(`expected an odd number of arguments for ${i}, got ${r} instead`)}function Qa(n,t,e){const i=n[0],r=n.length-1;if(r%2===1)throw new Error(`expected an even number of arguments for operation ${i}, got ${r} instead`)}function ef(n,t,e){const i=n.length-1,r=wt|D|$t,s=Et(n[1],r,e),o=Et(n[n.length-1],t,e),a=new Array(i-2);for(let l=0;l<i-2;l+=2){try{const u=Et(n[l+2],s.type,e);a[l]=u}catch(u){throw new Error(`failed to parse argument ${l+1} of match expression: ${u.message}`)}try{const u=Et(n[l+3],o.type,e);a[l+1]=u}catch(u){throw new Error(`failed to parse argument ${l+2} of match expression: ${u.message}`)}}return[s,...a,o]}function nf(n,t,e){const i=n[1];let r;switch(i[0]){case"linear":r=1;break;case"exponential":const l=i[1];if(typeof l!="number"||l<=0)throw new Error(`expected a number base for exponential interpolation, got ${JSON.stringify(l)} instead`);r=l;break;default:throw new Error(`invalid interpolation type: ${JSON.stringify(i)}`)}const s=new gt(D,r);let o;try{o=Et(n[2],D,e)}catch(l){throw new Error(`failed to parse argument 1 in interpolate expression: ${l.message}`)}const a=new Array(n.length-3);for(let l=0;l<a.length;l+=2){try{const u=Et(n[l+3],D,e);a[l]=u}catch(u){throw new Error(`failed to parse argument ${l+2} for interpolate expression: ${u.message}`)}try{const u=Et(n[l+4],t,e);a[l+1]=u}catch(u){throw new Error(`failed to parse argument ${l+3} for interpolate expression: ${u.message}`)}}return[s,o,...a]}function rf(n,t,e){const i=Et(n[n.length-1],t,e),r=new Array(n.length-1);for(let s=0;s<r.length-1;s+=2){try{const o=Et(n[s+1],$t,e);r[s]=o}catch(o){throw new Error(`failed to parse argument ${s} of case expression: ${o.message}`)}try{const o=Et(n[s+2],i.type,e);r[s+1]=o}catch(o){throw new Error(`failed to parse argument ${s+1} of case expression: ${o.message}`)}}return r[r.length-1]=i,r}function sf(n,t,e){let i=n[2];if(!Array.isArray(i))throw new Error('the second argument for the "in" operator must be an array');let r;if(typeof i[0]=="string"){if(i[0]!=="literal")throw new Error('for the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions');if(!Array.isArray(i[1]))throw new Error('failed to parse "in" expression: the literal operator must be followed by an array');i=i[1],r=wt}else r=D;const s=new Array(i.length);for(let a=0;a<s.length;a++)try{const l=Et(i[a],r,e);s[a]=l}catch(l){throw new Error(`failed to parse haystack item ${a} for "in" expression: ${l.message}`)}return[Et(n[1],r,e),...s]}function of(n,t,e){let i;try{i=Et(n[1],D,e)}catch(o){throw new Error(`failed to parse first argument in palette expression: ${o.message}`)}const r=n[2];if(!Array.isArray(r))throw new Error("the second argument of palette must be an array");const s=new Array(r.length);for(let o=0;o<s.length;o++){let a;try{a=Et(r[o],Kt,e)}catch(l){throw new Error(`failed to parse color at index ${o} in palette expression: ${l.message}`)}if(!(a instanceof gt))throw new Error(`the palette color at index ${o} must be a literal value`);s[o]=a}return[i,...s]}function M(...n){return function(t,e,i){const r=t[0];let s;for(let o=0;o<n.length;o++){const a=n[o](t,e,i);if(o==n.length-1){if(!a)throw new Error("expected last argument validator to return the parsed args");s=a}}return new qa(e,r,...s)}}function af(n,t,e){const i=n[0],r=Zd[i];if(!r)throw new Error(`unknown operator: ${i}`);return r(n,t,e)}function tl(n){if(!n)return"";const t=n.getType();switch(t){case"Point":case"LineString":case"Polygon":return t;case"MultiPoint":case"MultiLineString":case"MultiPolygon":return t.substring(5);case"Circle":return"Polygon";case"GeometryCollection":return tl(n.getGeometries()[0]);default:return""}}class lf{constructor(t,e){this.name=t,this.data=e,this.texture_=null}getTexture(t){if(!this.texture_){const e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.data.length/4,1,0,t.RGBA,t.UNSIGNED_BYTE,this.data),this.texture_=e}return this.texture_}delete(t){this.texture_&&t.deleteTexture(this.texture_),this.texture_=null}}function uf(n,t){return`operator_${n}_${Object.keys(t.functions).length}`}function Li(n){const t=n.toString();return t.includes(".")?t:t+".0"}function _s(n){if(n.length<2||n.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return`vec${n.length}(${n.map(Li).join(", ")})`}function cf(n){const t=Ka(n),e=t.length>3?t[3]:1;return _s([t[0]/255*e,t[1]/255*e,t[2]/255*e,e])}function hf(n){const t=Nn(n);return _s(t)}const ys={};let df=0;function el(n){return n in ys||(ys[n]=df++),ys[n]}function ff(n){return Li(el(n))}function nl(n){return"u_var_"+n}function gf(){return{inFragmentShader:!1,variables:{},properties:{},functions:{},bandCount:0,style:{}}}const Es="getBandValue",il="u_paletteTextures";function pf(n,t,e,i){const r=Et(n,t,e);return bs(r,t,i)}function k(n){return(t,e,i)=>{const r=e.args.length,s=new Array(r);for(let o=0;o<r;++o)s[o]=bs(e.args[o],i,t);return n(s,t)}}const mf={[x.Get]:(n,t)=>{const i=t.args[0].value;return i in n.properties||(n.properties[i]={name:i,type:t.type}),(n.inFragmentShader?"v_prop_":"a_prop_")+i},[x.GeometryType]:(n,t,e)=>{const i="geometryType";return i in n.properties||(n.properties[i]={name:i,type:wt,evaluator:o=>tl(o.getGeometry())}),(n.inFragmentShader?"v_prop_":"a_prop_")+i},[x.Var]:(n,t)=>{const i=t.args[0].value;return i in n.variables||(n.variables[i]={name:i,type:t.type}),nl(i)},[x.Resolution]:()=>"u_resolution",[x.Zoom]:()=>"u_zoom",[x.Time]:()=>"u_time",[x.Any]:k(n=>`(${n.join(" || ")})`),[x.All]:k(n=>`(${n.join(" && ")})`),[x.Not]:k(([n])=>`(!${n})`),[x.Equal]:k(([n,t])=>`(${n} == ${t})`),[x.NotEqual]:k(([n,t])=>`(${n} != ${t})`),[x.GreaterThan]:k(([n,t])=>`(${n} > ${t})`),[x.GreaterThanOrEqualTo]:k(([n,t])=>`(${n} >= ${t})`),[x.LessThan]:k(([n,t])=>`(${n} < ${t})`),[x.LessThanOrEqualTo]:k(([n,t])=>`(${n} <= ${t})`),[x.Multiply]:k(n=>`(${n.join(" * ")})`),[x.Divide]:k(([n,t])=>`(${n} / ${t})`),[x.Add]:k(n=>`(${n.join(" + ")})`),[x.Subtract]:k(([n,t])=>`(${n} - ${t})`),[x.Clamp]:k(([n,t,e])=>`clamp(${n}, ${t}, ${e})`),[x.Mod]:k(([n,t])=>`mod(${n}, ${t})`),[x.Pow]:k(([n,t])=>`pow(${n}, ${t})`),[x.Abs]:k(([n])=>`abs(${n})`),[x.Floor]:k(([n])=>`floor(${n})`),[x.Ceil]:k(([n])=>`ceil(${n})`),[x.Round]:k(([n])=>`floor(${n} + 0.5)`),[x.Sin]:k(([n])=>`sin(${n})`),[x.Cos]:k(([n])=>`cos(${n})`),[x.Atan]:k(([n,t])=>t!==void 0?`atan(${n}, ${t})`:`atan(${n})`),[x.Sqrt]:k(([n])=>`sqrt(${n})`),[x.Match]:k(n=>{const t=n[0],e=n[n.length-1];let i=null;for(let r=n.length-3;r>=1;r-=2){const s=n[r],o=n[r+1];i=`(${t} == ${s} ? ${o} : ${i||e})`}return i}),[x.Between]:k(([n,t,e])=>`(${n} >= ${t} && ${n} <= ${e})`),[x.Interpolate]:k(([n,t,...e])=>{let i="";for(let r=0;r<e.length-2;r+=2){const s=e[r],o=i||e[r+1],a=e[r+2],l=e[r+3];let u;n===Li(1)?u=`(${t} - ${s}) / (${a} - ${s})`:u=`(pow(${n}, (${t} - ${s})) - 1.0) / (pow(${n}, (${a} - ${s})) - 1.0)`,i=`mix(${o}, ${l}, clamp(${u}, 0.0, 1.0))`}return i}),[x.Case]:k(n=>{const t=n[n.length-1];let e=null;for(let i=n.length-3;i>=0;i-=2){const r=n[i],s=n[i+1];e=`(${r} ? ${s} : ${e||t})`}return e}),[x.In]:k(([n,...t],e)=>{const i=uf("in",e),r=[];for(let s=0;s<t.length;s+=1)r.push(` if (inputValue == ${t[s]}) { return true; }`);return e.functions[i]=`bool ${i}(float inputValue) {
71
+ ${r.join(`
72
+ `)}
73
+ return false;
74
+ }`,`${i}(${n})`}),[x.Array]:k(n=>`vec${n.length}(${n.join(", ")})`),[x.Color]:k(n=>{if(n.length===1)return`vec4(vec3(${n[0]} / 255.0), 1.0)`;if(n.length===2)return`(${n[1]} * vec4(vec3(${n[0]} / 255.0), 1.0))`;const t=n.slice(0,3).map(i=>`${i} / 255.0`);return n.length===3?`vec4(${t.join(", ")}, 1.0)`:`(${n[3]} * vec4(${t.join(", ")}, 1.0))`}),[x.Band]:k(([n,t,e],i)=>{if(!(Es in i.functions)){let r="";const s=i.bandCount||1;for(let o=0;o<s;o++){const a=Math.floor(o/4);let l=o%4;o===s-1&&l===1&&(l=3);const u=`${L.TILE_TEXTURE_ARRAY}[${a}]`;r+=` if (band == ${o+1}.0) {
75
+ return texture2D(${u}, v_textureCoord + vec2(dx, dy))[${l}];
76
+ }
77
+ `}i.functions[Es]=`float getBandValue(float band, float xOffset, float yOffset) {
78
+ float dx = xOffset / ${L.TEXTURE_PIXEL_WIDTH};
79
+ float dy = yOffset / ${L.TEXTURE_PIXEL_HEIGHT};
80
+ ${r}
81
+ }`}return`${Es}(${n}, ${t??"0.0"}, ${e??"0.0"})`}),[x.Palette]:(n,t)=>{const[e,...i]=t.args,r=i.length,s=new Uint8Array(r*4);for(let u=0;u<i.length;u++){const h=i[u].value,c=Ka(h),d=u*4;s[d]=c[0],s[d+1]=c[1],s[d+2]=c[2],s[d+3]=c[3]*255}n.paletteTextures||(n.paletteTextures=[]);const o=`${il}[${n.paletteTextures.length}]`,a=new lf(o,s);n.paletteTextures.push(a);const l=bs(e,D,n);return`texture2D(${o}, vec2((${l} + 0.5) / ${r}.0, 0.5))`}};function bs(n,t,e){if(n instanceof qa){const i=mf[n.operator];if(i===void 0)throw new Error(`No compiler defined for this operator: ${JSON.stringify(n.operator)}`);return i(e,n,t)}if((n.type&D)>0)return Li(n.value);if((n.type&$t)>0)return n.value.toString();if((n.type&wt)>0)return ff(n.value.toString());if((n.type&Kt)>0)return cf(n.value);if((n.type&Mi)>0)return _s(n.value);if((n.type&nn)>0)return hf(n.value);throw new Error(`Unexpected expression ${n.value} (expected type ${rn(t)})`)}function sn(n,t,e){const i=Yd();return pf(t,e,i,n)}function rl(n,t){const e=`
82
+ attribute vec2 ${Ii.TEXTURE_COORD};
83
+ uniform mat4 ${L.TILE_TRANSFORM};
84
+ uniform float ${L.TEXTURE_PIXEL_WIDTH};
85
+ uniform float ${L.TEXTURE_PIXEL_HEIGHT};
86
+ uniform float ${L.TEXTURE_RESOLUTION};
87
+ uniform float ${L.TEXTURE_ORIGIN_X};
88
+ uniform float ${L.TEXTURE_ORIGIN_Y};
89
+ uniform float ${L.DEPTH};
90
+
91
+ varying vec2 v_textureCoord;
92
+ varying vec2 v_mapCoord;
93
+
94
+ void main() {
95
+ v_textureCoord = ${Ii.TEXTURE_COORD};
96
+ v_mapCoord = vec2(
97
+ ${L.TEXTURE_ORIGIN_X} + ${L.TEXTURE_RESOLUTION} * ${L.TEXTURE_PIXEL_WIDTH} * v_textureCoord[0],
98
+ ${L.TEXTURE_ORIGIN_Y} - ${L.TEXTURE_RESOLUTION} * ${L.TEXTURE_PIXEL_HEIGHT} * v_textureCoord[1]
99
+ );
100
+ gl_Position = ${L.TILE_TRANSFORM} * vec4(${Ii.TEXTURE_COORD}, ${L.DEPTH}, 1.0);
101
+ }
102
+ `,i={...gf(),inFragmentShader:!0,bandCount:t,style:n},r=[];if(n.color!==void 0){const c=sn(i,n.color,Kt);r.push(`color = ${c};`)}if(n.contrast!==void 0){const c=sn(i,n.contrast,D);r.push(`color.rgb = clamp((${c} + 1.0) * color.rgb - (${c} / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(n.exposure!==void 0){const c=sn(i,n.exposure,D);r.push(`color.rgb = clamp((${c} + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(n.saturation!==void 0){const c=sn(i,n.saturation,D);r.push(`
103
+ float saturation = ${c} + 1.0;
104
+ float sr = (1.0 - saturation) * 0.2126;
105
+ float sg = (1.0 - saturation) * 0.7152;
106
+ float sb = (1.0 - saturation) * 0.0722;
107
+ mat3 saturationMatrix = mat3(
108
+ sr + saturation, sr, sr,
109
+ sg, sg + saturation, sg,
110
+ sb, sb, sb + saturation
111
+ );
112
+ color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));
113
+ `)}if(n.gamma!==void 0){const c=sn(i,n.gamma,D);r.push(`color.rgb = pow(color.rgb, vec3(1.0 / ${c}));`)}if(n.brightness!==void 0){const c=sn(i,n.brightness,D);r.push(`color.rgb = clamp(color.rgb + ${c}, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}const s={},o=Object.keys(i.variables).length;if(o>1&&!n.variables)throw new Error(`Missing variables in style (expected ${i.variables})`);for(let c=0;c<o;++c){const d=i.variables[Object.keys(i.variables)[c]];if(!(d.name in n.variables))throw new Error(`Missing '${d.name}' in style variables`);const f=nl(d.name);s[f]=function(){let g=n.variables[d.name];return typeof g=="string"&&(g=el(g)),g!==void 0?g:-9999999}}const a=Object.keys(s).map(function(c){return`uniform float ${c};`}),l=Math.ceil(t/4);a.push(`uniform sampler2D ${L.TILE_TEXTURE_ARRAY}[${l}];`),i.paletteTextures&&a.push(`uniform sampler2D ${il}[${i.paletteTextures.length}];`);const u=Object.keys(i.functions).map(function(c){return i.functions[c]}),h=`
114
+ #ifdef GL_FRAGMENT_PRECISION_HIGH
115
+ precision highp float;
116
+ #else
117
+ precision mediump float;
118
+ #endif
119
+
120
+ varying vec2 v_textureCoord;
121
+ varying vec2 v_mapCoord;
122
+ uniform vec4 ${L.RENDER_EXTENT};
123
+ uniform float ${L.TRANSITION_ALPHA};
124
+ uniform float ${L.TEXTURE_PIXEL_WIDTH};
125
+ uniform float ${L.TEXTURE_PIXEL_HEIGHT};
126
+ uniform float ${L.RESOLUTION};
127
+ uniform float ${L.ZOOM};
128
+
129
+ ${a.join(`
130
+ `)}
131
+
132
+ ${u.join(`
133
+ `)}
134
+
135
+ void main() {
136
+ if (
137
+ v_mapCoord[0] < ${L.RENDER_EXTENT}[0] ||
138
+ v_mapCoord[1] < ${L.RENDER_EXTENT}[1] ||
139
+ v_mapCoord[0] > ${L.RENDER_EXTENT}[2] ||
140
+ v_mapCoord[1] > ${L.RENDER_EXTENT}[3]
141
+ ) {
142
+ discard;
143
+ }
144
+
145
+ vec4 color = texture2D(${L.TILE_TEXTURE_ARRAY}[0], v_textureCoord);
146
+
147
+ ${r.join(`
148
+ `)}
149
+
150
+ gl_FragColor = color;
151
+ gl_FragColor.rgb *= gl_FragColor.a;
152
+ gl_FragColor *= ${L.TRANSITION_ALPHA};
153
+ }`;return{vertexShader:e,fragmentShader:h,uniforms:s,paletteTextures:i.paletteTextures}}class sl extends ed{constructor(t){t=t?Object.assign({},t):{};const e=t.style||{};delete t.style,super(t),this.sources_=t.sources,this.renderedSource_=null,this.renderedResolution_=NaN,this.style_=e,this.styleVariables_=this.style_.variables||{},this.addChangeListener(W.SOURCE,this.handleSourceUpdate_)}getSources(t,e){const i=this.getSource();return this.sources_?typeof this.sources_=="function"?this.sources_(t,e):this.sources_:i?[i]:[]}getRenderSource(){return this.renderedSource_||this.getSource()}getSourceState(){const t=this.getRenderSource();return t?t.getState():"undefined"}handleSourceUpdate_(){this.hasRenderer()&&this.getRenderer().clearCache(),this.getSource()&&this.setStyle(this.style_)}getSourceBandCount_(){const t=Number.MAX_SAFE_INTEGER,e=this.getSources([-t,-t,t,t],t);return e&&e.length&&"bandCount"in e[0]?e[0].bandCount:4}createRenderer(){const t=rl(this.style_,this.getSourceBandCount_());return new Xd(this,{vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,cacheSize:this.getCacheSize(),paletteTextures:t.paletteTextures})}renderSources(t,e){const i=this.getRenderer();let r;for(let s=0,o=e.length;s<o;++s)this.renderedSource_=e[s],i.prepareFrame(t)&&(r=i.renderFrame(t));return r}render(t,e){this.rendered=!0;const i=t.viewState,r=this.getSources(t.extent,i.resolution);let s=!0;for(let a=0,l=r.length;a<l;++a){const u=r[a],h=u.getState();if(h=="loading"){const c=()=>{u.getState()=="ready"&&(u.removeEventListener("change",c),this.changed())};u.addEventListener("change",c)}s=s&&h=="ready"}const o=this.renderSources(t,r);if(this.getRenderer().renderComplete&&s)return this.renderedResolution_=i.resolution,o;if(this.renderedResolution_>.5*i.resolution){const a=this.getSources(t.extent,this.renderedResolution_).filter(l=>!r.includes(l));if(a.length>0)return this.renderSources(t,a)}return o}setStyle(t){this.styleVariables_=t.variables||{},this.style_=t;const e=rl(this.style_,this.getSourceBandCount_());this.getRenderer().reset({vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,uniforms:e.uniforms,paletteTextures:e.paletteTextures}),this.changed()}updateStyleVariables(t){Object.assign(this.styleVariables_,t),this.changed()}}sl.prototype.dispose;const _f=sl;function ol(n,t){var i;let e={};for(const r in n){const s=n[r].type;if(s&&s!=="object")e[r]=s==="number"?Number(t[r]):t[r];else if(typeof n[r]=="object"&&((i=n[r])!=null&&i.properties)){const o=ol(n[r].properties,t);Object.keys(o).length>0&&(e[r]=o)}}return e}function yf(n,t){var s,o,a,l,u;if(!t)return null;let e={},i=n.get("type")==="WebGLTile"||n instanceof _f?(s=n.style_)==null?void 0:s.variables:(o=t.style)==null?void 0:o.variables;if((t.type==="style"||t.style)&&i)e=i;else if((l=(a=n.getSource())==null?void 0:a.getTileUrlFunction)!=null&&l.call(a)){const h=new URL(n.getSource().getTileUrlFunction()([0,0,0]));e=Object.fromEntries(h.searchParams.entries())}else return null;const r=ol(((u=t.schema)==null?void 0:u.properties)||t.schema,e);return Object.keys(r).length?r:null}const Ef=(n,t)=>n==null?void 0:n.filter(e=>["remove","sort"].filter(i=>t!=null&&t.get("layerControlDisable")?i!=="sort":!0).includes(e)),bf=(n,t)=>n==null?void 0:n.filter(e=>{let i=!0;return["remove","sort"].includes(e)&&(i=!1),e==="info"&&(i=t.get("description")),e==="config"&&(i=t.get("layerConfig")),i}),vf=(n,t)=>B`
154
+ <button slot="${n}-icon" class="icon">${t?n:K}</button>
155
+ `,Tf=n=>B`
48
156
  <button
49
157
  class="remove-icon icon"
50
- @click=${()=>{const{layer:t}=e;t==null||t.set("layerControlOptional",!0),t==null||t.setVisible(!1),e.dispatchEvent(new CustomEvent("changed",{detail:t,bubbles:!0}))}}
158
+ @click=${()=>{const{layer:t}=n;t==null||t.set("layerControlOptional",!0),t==null||t.setVisible(!1),n.dispatchEvent(new CustomEvent("changed",{detail:t,bubbles:!0}))}}
51
159
  >
52
- ${e.unstyled?"x":T}
160
+ ${n.unstyled?"x":K}
53
161
  </button>
54
- `,Ss=e=>x`
162
+ `,xf=n=>B`
55
163
  <span class="button sort-icon icon drag-handle">
56
- ${e?"═":T}
164
+ ${n?"═":K}
57
165
  </span>
58
- `,Qi=e=>{var n;const t=["layerControlHide","layerControlOptional"];return(n=e==null?void 0:e.getArray())==null?void 0:n.filter(i=>t.every(o=>!i.get(o)))};/**
166
+ `,al=n=>{var e;const t=["layerControlHide","layerControlOptional"];return(e=n==null?void 0:n.getArray())==null?void 0:e.filter(i=>t.every(r=>!i.get(r)))};/**
59
167
  * @license
60
168
  * Copyright 2020 Google LLC
61
169
  * SPDX-License-Identifier: BSD-3-Clause
62
- */const to=wn(class extends En{constructor(e){if(super(e),e.type!==St.PROPERTY&&e.type!==St.ATTRIBUTE&&e.type!==St.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Uo(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===st||t===T)return t;const n=e.element,i=e.name;if(e.type===St.PROPERTY){if(t===n[i])return st}else if(e.type===St.BOOLEAN_ATTRIBUTE){if(!!t===n.hasAttribute(i))return st}else if(e.type===St.ATTRIBUTE&&n.getAttribute(i)===t+"")return st;return bi(e),t}});/**
170
+ */const ll=ur(class extends cr{constructor(n){if(super(n),n.type!==le.PROPERTY&&n.type!==le.ATTRIBUTE&&n.type!==le.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Zl(n))throw Error("`live` bindings can only contain a single expression")}render(n){return n}update(n,[t]){if(t===Nt||t===K)return t;const e=n.element,i=n.name;if(n.type===le.PROPERTY){if(t===e[i])return Nt}else if(n.type===le.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(i))return Nt}else if(n.type===le.ATTRIBUTE&&e.getAttribute(i)===t+"")return Nt;return Ks(n),t}});/**
63
171
  * @license
64
172
  * Copyright 2017 Google LLC
65
173
  * SPDX-License-Identifier: BSD-3-Clause
66
- */class zn extends En{constructor(t){if(super(t),this.it=T,t.type!==St.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===T||t==null)return this._t=void 0,this.it=t;if(t===st)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const n=[t];return n.raw=n,this._t={_$litType$:this.constructor.resultType,strings:n,values:[]}}}zn.directiveName="unsafeHTML",zn.resultType=1;const $s=wn(zn);/**
174
+ */class vs extends cr{constructor(t){if(super(t),this.it=K,t.type!==le.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===K||t==null)return this._t=void 0,this.it=t;if(t===Nt)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}vs.directiveName="unsafeHTML",vs.resultType=1;const Rf=ur(vs);/**
67
175
  * @license
68
176
  * Copyright 2021 Google LLC
69
177
  * SPDX-License-Identifier: BSD-3-Clause
70
- */function*je(e,t){if(e!==void 0){let n=0;for(const i of e)yield t(i,n++)}}const _s=(e,t,n)=>{let i=t;return n.layer.getSource().getTileUrlFunction()&&(i||(i=n.layer.getSource().getTileUrlFunction()),n.layer.getSource().setTileUrlFunction((...o)=>Lr(i(...o),e)),n.layer.getSource().setKey(new Date)),i};var ze=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function As(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cs="Expected a function",eo=NaN,Ts="[object Symbol]",Ps=/^\s+|\s+$/g,Os=/^[-+]0x[0-9a-f]+$/i,Rs=/^0b[01]+$/i,Ds=/^0o[0-7]+$/i,Ns=parseInt,Ms=typeof ze=="object"&&ze&&ze.Object===Object&&ze,Is=typeof self=="object"&&self&&self.Object===Object&&self,Hs=Ms||Is||Function("return this")(),Bs=Object.prototype,Vs=Bs.toString,Ls=Math.max,ks=Math.min,Zn=function(){return Hs.Date.now()};function Us(e,t,n){var i,o,r,s,a,l,u=0,c=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(Cs);t=no(t)||0,Xn(n)&&(c=!!n.leading,d="maxWait"in n,r=d?Ls(no(n.maxWait)||0,t):r,p="trailing"in n?!!n.trailing:p);function f(P){var W=i,ht=o;return i=o=void 0,u=P,s=e.apply(ht,W),s}function g(P){return u=P,a=setTimeout(X,t),c?f(P):s}function y(P){var W=P-l,ht=P-u,G=t-W;return d?ks(G,r-ht):G}function D(P){var W=P-l,ht=P-u;return l===void 0||W>=t||W<0||d&&ht>=r}function X(){var P=Zn();if(D(P))return U(P);a=setTimeout(X,y(P))}function U(P){return a=void 0,p&&i?f(P):(i=o=void 0,s)}function rt(){a!==void 0&&clearTimeout(a),u=0,i=l=o=a=void 0}function K(){return a===void 0?s:U(Zn())}function ct(){var P=Zn(),W=D(P);if(i=arguments,o=this,l=P,W){if(a===void 0)return g(l);if(d)return a=setTimeout(X,t),f(l)}return a===void 0&&(a=setTimeout(X,t)),s}return ct.cancel=rt,ct.flush=K,ct}function Xn(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Fs(e){return!!e&&typeof e=="object"}function js(e){return typeof e=="symbol"||Fs(e)&&Vs.call(e)==Ts}function no(e){if(typeof e=="number")return e;if(js(e))return eo;if(Xn(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Xn(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Ps,"");var n=Rs.test(e);return n||Ds.test(e)?Ns(e.slice(2),n?2:8):Os.test(e)?eo:+e}var zs=Us;const io=As(zs);class oo extends et{constructor(){super();O(this,Ze);O(this,me,{});O(this,ye,null);O(this,be);O(this,Xe,"");O(this,Ye,"");this.layer=null,this.unstyled=!1,this.noShadow=!1,this.layerConfig=null,this.debouncedDataChange=io(Y(this,Ze,bo),1e3,{leading:!0})}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){$e(this,ye,bs(this.layer,this.layerConfig)),customElements.get("eox-jsonform")||console.error("Please import @eox/jsonform in order to use layerconfig");const n={disable_edit_json:!0,disable_collapse:!0,disable_properties:!0};return x`
178
+ */function*Di(n,t){if(n!==void 0){let e=0;for(const i of n)yield t(i,e++)}}const wf=(n,t,e)=>{let i=t;return e.layer.getSource().getTileUrlFunction()&&(i||(i=e.layer.getSource().getTileUrlFunction()),e.layer.getSource().setTileUrlFunction((...r)=>Wu(i(...r),n)),e.layer.getSource().setKey(new Date)),i};function Cf(n,t,e){const i="updateStyleVariables"in t,r="setStyle"in t,s=i?t.style_:e.style;let o=s==null?void 0:s.variables;if(o){const a=ul(n);if(s.variables={...o,...a},i)t.updateStyleVariables(a);else if(r){const l=Sf(s);t.setStyle(l)}}}const ul=n=>{const t={};for(const e in n)if(typeof n[e]=="object"&&n[e]!==null){const i=ul(n[e]);for(const r in i)t[r]=i==null?void 0:i[r]}else t[e]=n==null?void 0:n[e];return t};function Sf(n){let t=n;if("variables"in n){let e=JSON.stringify(n);const{variables:i}=n;for(const r in i)typeof i[r]=="number"?e=e.replaceAll(`["var","${r}"]`,i[r]):e=e.replaceAll(`["var","${r}"]`,`"${i[r]}"`);t=JSON.parse(e)}return t}var Af="Expected a function",cl=NaN,If="[object Symbol]",$f=/^\s+|\s+$/g,Pf=/^[-+]0x[0-9a-f]+$/i,Mf=/^0b[01]+$/i,Of=/^0o[0-7]+$/i,Lf=parseInt,Df=typeof Pi=="object"&&Pi&&Pi.Object===Object&&Pi,Nf=typeof self=="object"&&self&&self.Object===Object&&self,Uf=Df||Nf||Function("return this")(),Ff=Object.prototype,Bf=Ff.toString,Xf=Math.max,Hf=Math.min,Ts=function(){return Uf.Date.now()};function Gf(n,t,e){var i,r,s,o,a,l,u=0,h=!1,c=!1,d=!0;if(typeof n!="function")throw new TypeError(Af);t=hl(t)||0,xs(e)&&(h=!!e.leading,c="maxWait"in e,s=c?Xf(hl(e.maxWait)||0,t):s,d="trailing"in e?!!e.trailing:d);function f(v){var C=i,w=r;return i=r=void 0,u=v,o=n.apply(w,C),o}function g(v){return u=v,a=setTimeout(y,t),h?f(v):o}function p(v){var C=v-l,w=v-u,I=t-C;return c?Hf(I,s-w):I}function m(v){var C=v-l,w=v-u;return l===void 0||C>=t||C<0||c&&w>=s}function y(){var v=Ts();if(m(v))return _(v);a=setTimeout(y,p(v))}function _(v){return a=void 0,d&&i?f(v):(i=r=void 0,o)}function T(){a!==void 0&&clearTimeout(a),u=0,i=l=r=a=void 0}function E(){return a===void 0?o:_(Ts())}function b(){var v=Ts(),C=m(v);if(i=arguments,r=this,l=v,C){if(a===void 0)return g(l);if(c)return a=setTimeout(y,t),f(l)}return a===void 0&&(a=setTimeout(y,t)),o}return b.cancel=T,b.flush=E,b}function xs(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function kf(n){return!!n&&typeof n=="object"}function Vf(n){return typeof n=="symbol"||kf(n)&&Bf.call(n)==If}function hl(n){if(typeof n=="number")return n;if(Vf(n))return cl;if(xs(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=xs(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=n.replace($f,"");var e=Mf.test(n);return e||Of.test(n)?Lf(n.slice(2),e?2:8):Pf.test(n)?cl:+n}var jf=Gf;const dl=za(jf);class fl extends Mt{constructor(){super();tt(this,Ni);tt(this,on,{});tt(this,Hn,null);tt(this,Gn);tt(this,Ui,"");tt(this,Fi,"");this.layer=null,this.unstyled=!1,this.noShadow=!1,this.layerConfig=null,this.debouncedDataChange=dl(vt(this,Ni,Cl),1e3,{leading:!0})}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){Wn(this,Hn,yf(this.layer,this.layerConfig)),customElements.get("eox-jsonform")||console.error("Please import @eox/jsonform in order to use layerconfig");const e={disable_edit_json:!0,disable_collapse:!0,disable_properties:!0};return B`
71
179
  <style>
72
- ${M(this,Xe)}
73
- ${!this.unstyled&&M(this,Ye)}
180
+ ${nt(this,Ui)}
181
+ ${!this.unstyled&&nt(this,Fi)}
74
182
  </style>
75
- ${at(this.layerConfig,()=>x`
183
+ ${Ut(this.layerConfig,()=>B`
76
184
  <!-- Render a JSON form for layer configuration -->
77
185
  <eox-jsonform
78
186
  .schema=${this.layerConfig.schema}
79
- .value=${M(this,ye)}
80
- .options=${n}
187
+ .value=${nt(this,Hn)}
188
+ .options=${e}
81
189
  @change=${this.debouncedDataChange}
82
190
  ></eox-jsonform>
83
191
  `)}
84
- `}}me=new WeakMap,ye=new WeakMap,be=new WeakMap,Ze=new WeakSet,bo=function(n){$e(this,me,n.detail),$e(this,be,_s(M(this,me),M(this,be),this)),this.requestUpdate()},Xe=new WeakMap,Ye=new WeakMap,L(oo,"properties",{layer:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},layerConfig:{attribute:!1}}),customElements.define("eox-layercontrol-layerconfig",oo);class ro extends et{constructor(){super();O(this,ve,n=>this.selectedTab===n&&"highlighted");O(this,qe,`
192
+ `}}on=new WeakMap,Hn=new WeakMap,Gn=new WeakMap,Ni=new WeakSet,Cl=function(e){Wn(this,on,e.detail),this.layerConfig.type==="style"||this.layerConfig.style?"setStyle"in this.layer||"updateStyleVariables"in this.layer?Cf(nt(this,on),this.layer,this.layerConfig):console.error(`Layer type ${this.layer.get("type")??""} does not support styles configuration`):(Wn(this,Gn,wf(nt(this,on),nt(this,Gn),this)),this.requestUpdate())},Ui=new WeakMap,Fi=new WeakMap,ht(fl,"properties",{layer:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},layerConfig:{attribute:!1}}),customElements.define("eox-layercontrol-layerconfig",fl);class gl extends Mt{constructor(){super();tt(this,kn,e=>this.selectedTab===e&&"highlighted");tt(this,Bi,`
85
193
  .tabbed figure {
86
194
  margin: 0;
87
195
  }
@@ -101,7 +209,7 @@
101
209
  .tabbed label.highlighted {
102
210
  background: lightgrey;
103
211
  }
104
- `);O(this,We,`
212
+ `);tt(this,Xi,`
105
213
  .tabbed {
106
214
  font-size: small;
107
215
  }
@@ -122,33 +230,33 @@
122
230
  background: #00417011;
123
231
  border-top: 1px solid #0041701a;
124
232
  }
125
- `);this.actions=[],this.selectedTab=0,this.tabs=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const n=this.tabs,i=this.actions,o=i.length+n.length>1;return x`
233
+ `);this.actions=[],this.selectedTab=0,this.tabs=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=this.tabs,i=this.actions,r=i.length+e.length>1;return B`
126
234
  <style>
127
- ${M(this,qe)}
128
- ${!this.unstyled&&M(this,We)}
235
+ ${nt(this,Bi)}
236
+ ${!this.unstyled&&nt(this,Xi)}
129
237
  </style>
130
238
  <div class="tabbed">
131
239
  <!-- Navigation for tabs and actions -->
132
- ${at(o,()=>x`
240
+ ${Ut(r,()=>B`
133
241
  <nav>
134
242
  <div>
135
243
  <!-- Labels for tabs -->
136
- ${je(n,(r,s)=>x`
244
+ ${Di(e,(s,o)=>B`
137
245
  <label
138
- class=${M(this,ve).call(this,s)}
139
- @click=${()=>this.selectedTab=s}
246
+ class=${nt(this,kn).call(this,o)}
247
+ @click=${()=>this.selectedTab=o}
140
248
  >
141
249
  <!-- Customizable icon for each tab -->
142
- <slot name=${`${r}-icon`}>${r}</slot>
250
+ <slot name=${`${s}-icon`}>${s}</slot>
143
251
  </label>
144
252
  `)}
145
253
  </div>
146
254
  <div>
147
255
  <!-- Icons for actions -->
148
- ${je(i,r=>x`
256
+ ${Di(i,s=>B`
149
257
  <span>
150
258
  <!-- Customizable icon for each action -->
151
- <slot name=${`${r}-icon`}>${r}</slot>
259
+ <slot name=${`${s}-icon`}>${s}</slot>
152
260
  </span>
153
261
  `)}
154
262
  </div>
@@ -156,15 +264,15 @@
156
264
  `)}
157
265
  <figure>
158
266
  <!-- Content for each tab -->
159
- ${je(n,(r,s)=>x`
160
- <div class="tab ${M(this,ve).call(this,s)}">
267
+ ${Di(e,(s,o)=>B`
268
+ <div class="tab ${nt(this,kn).call(this,o)}">
161
269
  <!-- Content slot for each tab -->
162
- <slot name=${`${r}-content`}>${r}</slot>
270
+ <slot name=${`${s}-content`}>${s}</slot>
163
271
  </div>
164
272
  `)}
165
273
  </figure>
166
274
  </div>
167
- `}}ve=new WeakMap,qe=new WeakMap,We=new WeakMap,L(ro,"properties",{actions:{attribute:!1},selectedTab:{state:!0},tabs:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-tabs",ro);const Zs=`
275
+ `}}kn=new WeakMap,Bi=new WeakMap,Xi=new WeakMap,ht(gl,"properties",{actions:{attribute:!1},selectedTab:{state:!0},tabs:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-tabs",gl);const zf=`
168
276
  button,
169
277
  .button {
170
278
  /* TODO: why does this only work here and not from :root? */
@@ -288,7 +396,7 @@ button.smallest.icon::before {
288
396
  width: 16px;
289
397
  padding: 0px;
290
398
  }
291
- `,Xs=`
399
+ `,Wf=`
292
400
  input[type=radio] {
293
401
  appearance: none;
294
402
  -webkit-appearance: none;
@@ -316,7 +424,7 @@ input[type=radio]:checked:after {
316
424
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eradiobox-marked%3C/title%3E%3Cpath d='M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z' /%3E%3C/svg%3E");
317
425
 
318
426
  }
319
- `,so=`
427
+ `,pl=`
320
428
  input[type=checkbox] {
321
429
  appearance: none;
322
430
  -webkit-appearance: none;
@@ -339,7 +447,7 @@ input[type=checkbox]:checked:after {
339
447
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckbox-marked%3C/title%3E%3Cpath d='M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z' /%3E%3C/svg%3E");
340
448
 
341
449
  }
342
- `,Ys=`
450
+ `,Yf=`
343
451
  input[type="range"] {
344
452
  -webkit-appearance: none;
345
453
  width: 90%;
@@ -416,11 +524,11 @@ input[type="range"]:focus::-webkit-slider-thumb {
416
524
  input::-moz-focus-inner, input::-moz-focus-outer {
417
525
  border: 0;
418
526
  }
419
- `;class ao extends et{constructor(){super();L(this,"_removeButton",()=>xs(this));L(this,"_sortButton",()=>Ss(this.unstyled));L(this,"_button",n=>Es(n,this.unstyled));O(this,Ge,"");O(this,Je,`
420
- ${Zs}
421
- ${Xs}
422
- ${so}
423
- ${Ys}
527
+ `;class ml extends Mt{constructor(){super();ht(this,"_removeButton",()=>Tf(this));ht(this,"_sortButton",()=>xf(this.unstyled));ht(this,"_button",e=>vf(e,this.unstyled));tt(this,Hi,"");tt(this,Gi,`
528
+ ${zf}
529
+ ${Wf}
530
+ ${pl}
531
+ ${Yf}
424
532
  .drag-handle {
425
533
  cursor: n-resize;
426
534
  }
@@ -512,35 +620,35 @@ input::-moz-focus-inner, input::-moz-focus-outer {
512
620
  [slot=opacity-content] {
513
621
  padding: 12px 6px;
514
622
  }
515
- `);this.layer=null,this.tools=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var l;const n=vs(this.tools,this.layer),i=ws(this.tools,this.layer),o=this[`_${n==null?void 0:n[0]}Button`]?this[`_${n==null?void 0:n[0]}Button`]():T,r=((l=this.tools)==null?void 0:l.length)===1?`${this.tools[0]}-icon`:"",s=n==null?void 0:n.length,a=i==null?void 0:i.length;return x`
623
+ `);this.layer=null,this.tools=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var l;const e=Ef(this.tools,this.layer),i=bf(this.tools,this.layer),r=this[`_${e==null?void 0:e[0]}Button`]?this[`_${e==null?void 0:e[0]}Button`]():K,s=((l=this.tools)==null?void 0:l.length)===1?`${this.tools[0]}-icon`:"",o=e==null?void 0:e.length,a=i==null?void 0:i.length;return B`
516
624
  <style>
517
- ${M(this,Ge)}
518
- ${!this.unstyled&&M(this,Je)}
625
+ ${nt(this,Hi)}
626
+ ${!this.unstyled&&nt(this,Gi)}
519
627
  </style>
520
- ${at(s+a>0,()=>x`
521
- ${at(s===1&&a===0,()=>x`
628
+ ${Ut(o+a>0,()=>B`
629
+ ${Ut(o===1&&a===0,()=>B`
522
630
  <div class="single-action-container">
523
- <div class="single-action">${o}</div>
631
+ <div class="single-action">${r}</div>
524
632
  </div>
525
- `,()=>{var u;return x`
633
+ `,()=>{var u;return B`
526
634
  <details
527
635
  class="tools"
528
- open=${this.layer.get("layerControlToolsExpand")||T}
636
+ open=${this.layer.get("layerControlToolsExpand")||K}
529
637
  >
530
638
  <summary>
531
- <button class="icon ${r}">Tools</button>
639
+ <button class="icon ${s}">Tools</button>
532
640
  </summary>
533
641
  <eox-layercontrol-tabs
534
642
  .noShadow=${!1}
535
- .actions=${n}
643
+ .actions=${e}
536
644
  .tabs=${i}
537
645
  .unstyled=${this.unstyled}
538
646
  >
539
647
  <!-- Rendering tabs and content -->
540
- ${je(i,c=>this._button(c))}
648
+ ${Di(i,h=>this._button(h))}
541
649
 
542
650
  <div slot="info-content">
543
- ${$s(this.layer.get("description"))}
651
+ ${Rf(this.layer.get("description"))}
544
652
  </div>
545
653
  <div slot="opacity-content">
546
654
  <!-- Input for opacity -->
@@ -549,13 +657,13 @@ input::-moz-focus-inner, input::-moz-focus-outer {
549
657
  min="0"
550
658
  max="1"
551
659
  step="0.01"
552
- value=${to((u=this.layer)==null?void 0:u.getOpacity())}
553
- @input=${c=>this.layer.setOpacity(parseFloat(c.target.value))}
660
+ value=${ll((u=this.layer)==null?void 0:u.getOpacity())}
661
+ @input=${h=>this.layer.setOpacity(parseFloat(h.target.value))}
554
662
  />
555
663
  </div>
556
664
  <div slot="config-content">
557
665
  <!-- Layer configuration -->
558
- ${at(this.layer.get("layerConfig"),()=>x`
666
+ ${Ut(this.layer.get("layerConfig"),()=>B`
559
667
  <eox-layercontrol-layerconfig
560
668
  slot="config-content"
561
669
  .layer=${this.layer}
@@ -572,8 +680,8 @@ input::-moz-focus-inner, input::-moz-focus-outer {
572
680
  </details>
573
681
  `})}
574
682
  `)}
575
- `}}Ge=new WeakMap,Je=new WeakMap,L(ao,"properties",{layer:{attribute:!1},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer-tools",ao);const qs=e=>{const t=()=>{const n=ms(e.layer,e.map,e.showLayerZoomState);let i=!1;!n&&e.currLayerVisibilityBasedOnZoom?(e.currLayerVisibilityBasedOnZoom=!1,i=!0):n&&!e.currLayerVisibilityBasedOnZoom&&(e.currLayerVisibilityBasedOnZoom=!0,i=!0),i&&(e.requestUpdate(),e.dispatchEvent(new CustomEvent("change:resolution",{bubbles:!0})))};Ji(e.layer,e.showLayerZoomState)&&(t(),e.map.getView().on("change:resolution",()=>t()))},Ws=(e,t)=>{const n=t.layer;n.setVisible(e.target.checked),e.target.checked&&n.get("layerControlExclusive")&&t.closest(".layers > ul").querySelectorAll("eox-layercontrol-layer").forEach(o=>{var r;o.layer!==n&&((r=o.layer)!=null&&r.get("layerControlExclusive"))&&(o.layer.setVisible(!1),o.requestUpdate())}),t.dispatchEvent(new CustomEvent("changed",{bubbles:!0,detail:n})),t.requestUpdate()};class lo extends et{constructor(){super();O(this,Ct);L(this,"currLayerVisibilityBasedOnZoom",!0);O(this,Ke,"");O(this,Qe,`
576
- ${so}
683
+ `}}Hi=new WeakMap,Gi=new WeakMap,ht(ml,"properties",{layer:{attribute:!1},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer-tools",ml);const Zf=n=>{const t=()=>{const e=Rc(n.layer,n.map,n.showLayerZoomState);let i=!1;!e&&n.currLayerVisibilityBasedOnZoom?(n.currLayerVisibilityBasedOnZoom=!1,i=!0):e&&!n.currLayerVisibilityBasedOnZoom&&(n.currLayerVisibilityBasedOnZoom=!0,i=!0),i&&(n.requestUpdate(),n.dispatchEvent(new CustomEvent("change:resolution",{bubbles:!0})))};$o(n.layer,n.showLayerZoomState)&&(t(),n.map.getView().on("change:resolution",()=>t()))},Kf=(n,t)=>{const e=t.layer;e.setVisible(n.target.checked),n.target.checked&&e.get("layerControlExclusive")&&t.closest(".layers > ul").querySelectorAll("eox-layercontrol-layer").forEach(r=>{var s;r.layer!==e&&((s=r.layer)!=null&&s.get("layerControlExclusive"))&&(r.layer.setVisible(!1),r.requestUpdate())}),t.dispatchEvent(new CustomEvent("changed",{bubbles:!0,detail:e})),t.requestUpdate()};class _l extends Mt{constructor(){super();tt(this,Ee);ht(this,"currLayerVisibilityBasedOnZoom",!0);tt(this,ki,"");tt(this,Vi,`
684
+ ${pl}
577
685
  eox-layercontrol-layer {
578
686
  width: 100%;
579
687
  }
@@ -613,25 +721,25 @@ input::-moz-focus-inner, input::-moz-focus-outer {
613
721
  [data-type=draw] .title::before {
614
722
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Evector-square-edit%3C/title%3E%3Cpath d='M22.7 14.4L21.7 15.4L19.6 13.3L20.6 12.3C20.8 12.1 21.2 12.1 21.4 12.3L22.7 13.6C22.9 13.8 22.9 14.1 22.7 14.4M13 19.9L19.1 13.8L21.2 15.9L15.1 22H13V19.9M11 19.9V19.1L11.6 18.5L12.1 18H8V16H6V8H8V6H16V8H18V12.1L19.1 11L19.3 10.8C19.5 10.6 19.8 10.4 20.1 10.3V8H22.1V2H16.1V4H8V2H2V8H4V16H2V22H8V20L11 19.9M18 4H20V6H18V4M4 4H6V6H4V4M6 20H4V18H6V20Z' /%3E%3C/svg%3E");
615
723
  }
616
- `);this.layer=null,this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}firstUpdated(){qs(this)}render(){var l;const n=this.layer.getVisible(),i=n?"visible":"",o=this.currLayerVisibilityBasedOnZoom?"":"zoom-state-invisible",r=Y(this,Ct,cn).call(this,"layerControlDisable")?"disabled":"",s=Y(this,Ct,cn).call(this,"layerControlExclusive")?"radio":"checkbox",a=((l=this.tools)==null?void 0:l.length)>0;return x`
724
+ `);this.layer=null,this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}firstUpdated(){Zf(this)}render(){var l;const e=this.layer.getVisible(),i=e?"visible":"",r=this.currLayerVisibilityBasedOnZoom?"":"zoom-state-invisible",s=vt(this,Ee,tr).call(this,"layerControlDisable")?"disabled":"",o=vt(this,Ee,tr).call(this,"layerControlExclusive")?"radio":"checkbox",a=((l=this.tools)==null?void 0:l.length)>0;return B`
617
725
  <style>
618
- ${M(this,Ke)}
619
- ${!this.unstyled&&M(this,Qe)}
726
+ ${nt(this,ki)}
727
+ ${!this.unstyled&&nt(this,Vi)}
620
728
  </style>
621
- ${at(this.layer,()=>x`
729
+ ${Ut(this.layer,()=>B`
622
730
  <!-- Render the layer -->
623
- <div class="layer ${i} ${o}">
624
- <label class="drag-handle ${r}">
731
+ <div class="layer ${i} ${r}">
732
+ <label class="drag-handle ${s}">
625
733
  <!-- Input element for layer visibility -->
626
734
  <input
627
- type=${s}
628
- .checked=${to(n)}
629
- @click=${Y(this,Ct,vo)}
735
+ type=${o}
736
+ .checked=${ll(e)}
737
+ @click=${vt(this,Ee,Sl)}
630
738
  />
631
739
 
632
740
  <!-- Layer title -->
633
- <span class="title">${Y(this,Ct,cn).call(this,this.titleProperty)}</span>
634
- ${at(a,()=>x`<span class="tools-placeholder"></span>`)}
741
+ <span class="title">${vt(this,Ee,tr).call(this,this.titleProperty)}</span>
742
+ ${Ut(a,()=>B`<span class="tools-placeholder"></span>`)}
635
743
  </label>
636
744
  </div>
637
745
 
@@ -643,7 +751,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
643
751
  .unstyled=${this.unstyled}
644
752
  ></eox-layercontrol-layer-tools>
645
753
  `)}
646
- `}}Ct=new WeakSet,cn=function(n){var i;return(i=this.layer)==null?void 0:i.get(n)},vo=function(n){Ws(n,this)},Ke=new WeakMap,Qe=new WeakMap,L(lo,"properties",{layer:{attribute:!1},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer",lo);class uo extends et{constructor(){super();O(this,tn,"");O(this,en,`
754
+ `}}Ee=new WeakSet,tr=function(e){var i;return(i=this.layer)==null?void 0:i.get(e)},Sl=function(e){Kf(e,this)},ki=new WeakMap,Vi=new WeakMap,ht(_l,"properties",{layer:{attribute:!1},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer",_l);class yl extends Mt{constructor(){super();tt(this,ji,"");tt(this,zi,`
647
755
  details summary {
648
756
  cursor: pointer;
649
757
  display: flex;
@@ -667,15 +775,15 @@ input::-moz-focus-inner, input::-moz-focus-outer {
667
775
  details[data-children-length="0"] summary::before {
668
776
  display: none;
669
777
  }
670
- `);this.group=null,this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var o,r;const n=!!((o=this.group)!=null&&o.get("layerControlExpand")),i=(r=Qi(this.group.getLayers()))==null?void 0:r.length;return x`
778
+ `);this.group=null,this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var r,s;const e=!!((r=this.group)!=null&&r.get("layerControlExpand")),i=(s=al(this.group.getLayers()))==null?void 0:s.length;return B`
671
779
  <style>
672
- ${M(this,tn)}
673
- ${!this.unstyled&&M(this,en)}
780
+ ${nt(this,ji)}
781
+ ${!this.unstyled&&nt(this,zi)}
674
782
  </style>
675
- ${at(this.group,()=>x`
783
+ ${Ut(this.group,()=>B`
676
784
  <!-- Render the details element with the layer control -->
677
785
  <details
678
- open=${n||T}
786
+ open=${e||K}
679
787
  data-children-length=${i}
680
788
  >
681
789
  <summary>
@@ -706,7 +814,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
706
814
  ></eox-layercontrol-layer-list>
707
815
  </details>
708
816
  `)}
709
- `}}tn=new WeakMap,en=new WeakMap,L(uo,"properties",{group:{attribute:!1},idProperty:{attribute:"id-property"},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer-group",uo);const Gs=e=>{const{layers:t,idProperty:n,titleProperty:i,renderRoot:o}=e,r=io(()=>{e.requestUpdate(),e.dispatchEvent(new CustomEvent("changed",{bubbles:!0}))},50),s=()=>r();if(t&&(t.hasListener("change:length")&&(t==null||t.un("change:length",s)),t.on("change:length",s),t)){const a=o.querySelector("ul");gs(t,n,i,e),fs(a,t,n,e)}};class co extends et{constructor(){super();O(this,nn,"");O(this,on,`
817
+ `}}ji=new WeakMap,zi=new WeakMap,ht(yl,"properties",{group:{attribute:!1},idProperty:{attribute:"id-property"},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer-group",yl);const qf=n=>{const{layers:t,idProperty:e,titleProperty:i,renderRoot:r}=n,s=dl(()=>{n.requestUpdate(),n.dispatchEvent(new CustomEvent("changed",{bubbles:!0}))},50),o=()=>s();if(t&&(t.hasListener("change:length")&&(t==null||t.un("change:length",o)),t.on("change:length",o),t)){const a=r.querySelector("ul");xc(t,e,i,n),Tc(a,t,e,n)}};class El extends Mt{constructor(){super();tt(this,Wi,"");tt(this,Yi,`
710
818
  ul {
711
819
  padding: 0;
712
820
  margin: 0;
@@ -734,19 +842,19 @@ input::-moz-focus-inner, input::-moz-focus-outer {
734
842
  }
735
843
  li.sortable-ghost {
736
844
  }
737
- `);this.idProperty="id",this.layers=null,this.map=null,this.tools=void 0,this.titleProperty="title",this.showLayerZoomState=!1,this.unstyled=!1,this.noShadow=!1}firstUpdated(){Gs(this)}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const n=this.layers?Qi(this.layers).reverse():[];return x`
845
+ `);this.idProperty="id",this.layers=null,this.map=null,this.tools=void 0,this.titleProperty="title",this.showLayerZoomState=!1,this.unstyled=!1,this.noShadow=!1}firstUpdated(){qf(this)}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=this.layers?al(this.layers).reverse():[];return B`
738
846
  <style>
739
- ${M(this,nn)}
740
- ${!this.unstyled&&M(this,on)}
847
+ ${nt(this,Wi)}
848
+ ${!this.unstyled&&nt(this,Yi)}
741
849
  </style>
742
850
  <ul>
743
- ${at(this.layers,()=>x`
744
- ${zo(n,i=>i,i=>x`
851
+ ${Ut(this.layers,()=>B`
852
+ ${Jl(e,i=>i,i=>B`
745
853
  <li
746
854
  data-layer="${i.get(this.idProperty)}"
747
- data-type="${ys(i,this.map)}"
855
+ data-type="${wc(i,this.map)}"
748
856
  >
749
- ${i.getLayers?x`
857
+ ${i.getLayers?B`
750
858
  <eox-layercontrol-layer-group
751
859
  .noShadow=${!0}
752
860
  .group=${i}
@@ -759,7 +867,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
759
867
  @changed=${()=>this.requestUpdate()}
760
868
  >
761
869
  </eox-layercontrol-layer-group>
762
- `:x`
870
+ `:B`
763
871
  <eox-layercontrol-layer
764
872
  .noShadow=${!0}
765
873
  .layer=${i}
@@ -775,7 +883,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
775
883
  `)}
776
884
  `)}
777
885
  </ul>
778
- `}}nn=new WeakMap,on=new WeakMap,L(co,"properties",{idProperty:{attribute:"id-property"},layers:{attribute:!1},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer-list",co);const Js=e=>{const t=e.querySelector("select[name=optional]"),n=t?t.value:null,i=jn(e.layers.getArray(),"layerControlOptional",!0).find(o=>(o.get(e.idProperty)||o.ol_uid)===n);i==null||i.set("layerControlOptional",!1),i==null||i.setVisible(!0),e.dispatchEvent(new CustomEvent("changed",{bubbles:!0})),e.renderRoot.parentNode.querySelectorAll("eox-layercontrol-layer-list").forEach(o=>o.requestUpdate()),e.requestUpdate()};class ho extends et{constructor(){super();O(this,rn);this.idProperty="id",this.layers=null,this.titleProperty="title",this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const n=jn(this.layers.getArray(),"layerControlOptional",!0);return x`
886
+ `}}Wi=new WeakMap,Yi=new WeakMap,ht(El,"properties",{idProperty:{attribute:"id-property"},layers:{attribute:!1},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer-list",El);const Jf=n=>{const t=n.querySelector("select[name=optional]"),e=t?t.value:null,i=Mr(n.layers.getArray(),"layerControlOptional",!0).find(r=>(r.get(n.idProperty)||r.ol_uid)===e);i==null||i.set("layerControlOptional",!1),i==null||i.setVisible(!0),n.dispatchEvent(new CustomEvent("changed",{bubbles:!0})),n.renderRoot.parentNode.querySelectorAll("eox-layercontrol-layer-list").forEach(r=>r.requestUpdate()),n.requestUpdate()};class bl extends Mt{constructor(){super();tt(this,Zi);this.idProperty="id",this.layers=null,this.titleProperty="title",this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=Mr(this.layers.getArray(),"layerControlOptional",!0);return B`
779
887
  <!-- Label for the dropdown -->
780
888
  <label for="optional">Optional layers</label>
781
889
 
@@ -787,19 +895,19 @@ input::-moz-focus-inner, input::-moz-focus-outer {
787
895
  </option>
788
896
 
789
897
  <!-- Mapping through filtered layers list to generate dropdown options -->
790
- ${n.map(i=>{const o=i.get(this.idProperty)||i.ol_uid,r=i.get(this.titleProperty),s=`layer ${i.get(this.idProperty)}`;return x` <option value="${o}">${r||s}</option> `})}
898
+ ${e.map(i=>{const r=i.get(this.idProperty)||i.ol_uid,s=i.get(this.titleProperty),o=`layer ${i.get(this.idProperty)}`;return B` <option value="${r}">${s||o}</option> `})}
791
899
  </select>
792
900
 
793
901
  <!-- Button to handle adding layers -->
794
- <button @click="${Y(this,rn,wo)}">add</button>
795
- `}}rn=new WeakSet,wo=function(){Js(this)},L(ho,"properties",{idProperty:{attribute:"id-property"},layers:{attribute:!1},titleProperty:{attribute:"title-property",type:String},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-optional-list",ho);const Ks=(e,t)=>{t.jsonInput=e.target.value,t.requestUpdate()},po=e=>{const t=JSON.parse(`{"data":${Ci(e.jsonInput)}}`);Array.isArray(t.data)?t.data.forEach(n=>{e.eoxMap.addOrUpdateLayer(n)}):e.eoxMap.addOrUpdateLayer(t.data),e.jsonInput=null,e.requestUpdate()},Qs=(e,t)=>{t.urlInput=e.target.value,t.requestUpdate()};async function ta(e){const t=e.urlInput;if(e.wmsCapabilities=null,e.searchLoad=!0,e.requestUpdate(),!t)return!1;if(An(t)==="XYZ")return{Name:t};try{const n=await Hr(t);e.wmsCapabilities=n}catch{}finally{e.searchLoad=!1,e.requestUpdate()}return!1}const ea=(e,t)=>{const{Name:n}=e,i=An(t.urlInput)||"XYZ",o={type:"Tile",properties:{id:n,title:n},source:{type:i,url:t.urlInput,params:{LAYERS:n}}};t.jsonInput=JSON.stringify(o)},na=(e,t)=>{t.open=e||null,t.urlInput=null,t.jsonInput=null,t.wmsCapabilities=null,t.requestUpdate()};class fo extends et{constructor(){super();O(this,Z);L(this,"urlInput",null);L(this,"jsonInput",null);L(this,"open",null);L(this,"searchLoad",!1);L(this,"wmsCapabilities",null);O(this,sn,`
902
+ <button @click="${vt(this,Zi,Al)}">add</button>
903
+ `}}Zi=new WeakSet,Al=function(){Jf(this)},ht(bl,"properties",{idProperty:{attribute:"id-property"},layers:{attribute:!1},titleProperty:{attribute:"title-property",type:String},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-optional-list",bl);const Qf=(n,t)=>{t.jsonInput=n.target.value,t.requestUpdate()},vl=n=>{const t=JSON.parse(`{"data":${so(n.jsonInput)}}`);Array.isArray(t.data)?t.data.forEach(e=>{n.eoxMap.addOrUpdateLayer(e)}):n.eoxMap.addOrUpdateLayer(t.data),n.jsonInput=null,n.requestUpdate()},tg=(n,t)=>{t.urlInput=n.target.value,t.requestUpdate()};async function eg(n){const t=n.urlInput;if(n.wmsCapabilities=null,n.searchLoad=!0,n.requestUpdate(),!t)return!1;if(pr(t)==="XYZ")return{Name:t};try{const e=await Vu(t);n.wmsCapabilities=e}catch{}finally{n.searchLoad=!1,n.requestUpdate()}return!1}const ng=(n,t)=>{const{Name:e}=n,i=pr(t.urlInput)||"XYZ",r={type:"Tile",properties:{id:e,title:e},source:{type:i,url:t.urlInput,params:{LAYERS:e}}};t.jsonInput=JSON.stringify(r)},ig=(n,t)=>{t.open=n||null,t.urlInput=null,t.jsonInput=null,t.wmsCapabilities=null,t.requestUpdate()};class Tl extends Mt{constructor(){super();tt(this,bt);ht(this,"urlInput",null);ht(this,"jsonInput",null);ht(this,"open",null);ht(this,"searchLoad",!1);ht(this,"wmsCapabilities",null);tt(this,Ki,`
796
904
  .eox-add-layer-main .open {
797
905
  position: relative;
798
906
  }
799
907
  .eox-add-layer-main .close {
800
908
  display: none;
801
909
  }
802
- `);O(this,an,`
910
+ `);tt(this,qi,`
803
911
  .eox-add {
804
912
  background: #f0f2f5;
805
913
  border-top: 1px solid #0041701a;
@@ -932,24 +1040,24 @@ input::-moz-focus-inner, input::-moz-focus-outer {
932
1040
  font-weight: bold;
933
1041
  display: inline-block;
934
1042
  }
935
- `);this.eoxMap=null,this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const n=this.open?"open":"close",i=this.open==="url",o=this.open==="json",r=!Br(this.urlInput)||this.searchLoad?!0:T;return x`
1043
+ `);this.eoxMap=null,this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=this.open?"open":"close",i=this.open==="url",r=this.open==="json",s=!ju(this.urlInput)||this.searchLoad?!0:K;return B`
936
1044
  <style>
937
- ${M(this,sn)}
938
- ${!this.unstyled&&M(this,an)}
1045
+ ${nt(this,Ki)}
1046
+ ${!this.unstyled&&nt(this,qi)}
939
1047
  </style>
940
1048
  <div class="eox-add-layer-main">
941
1049
  <div class="eox-add-layer-col">
942
1050
  <!-- Tabbed interface for URL and JSON -->
943
- <ul class="eox-add-layer-tab ${n}">
1051
+ <ul class="eox-add-layer-tab ${e}">
944
1052
  <li
945
- @click=${()=>Y(this,Z,hn).call(this,"url")}
1053
+ @click=${()=>vt(this,bt,er).call(this,"url")}
946
1054
  class="${i?"active":""}"
947
1055
  >
948
1056
  URL
949
1057
  </li>
950
1058
  <li
951
- @click=${()=>Y(this,Z,hn).call(this,"json")}
952
- class="${o?"active":""}"
1059
+ @click=${()=>vt(this,bt,er).call(this,"json")}
1060
+ class="${r?"active":""}"
953
1061
  >
954
1062
  JSON
955
1063
  </li>
@@ -958,13 +1066,13 @@ input::-moz-focus-inner, input::-moz-focus-outer {
958
1066
  <!-- Button to toggle tabs -->
959
1067
  <button
960
1068
  class="add-icon icon"
961
- @click=${()=>Y(this,Z,hn).call(this,this.open?null:"url")}
1069
+ @click=${()=>vt(this,bt,er).call(this,this.open?null:"url")}
962
1070
  >
963
1071
  ${this.unstyled?"Add Layer":""}
964
1072
  </button>
965
1073
  </div>
966
- <div class="eox-add ${n}">
967
- ${i?x`
1074
+ <div class="eox-add ${e}">
1075
+ ${i?B`
968
1076
  <!-- Input field for URL -->
969
1077
  <div class="eox-add-layer-col">
970
1078
  <input
@@ -972,71 +1080,71 @@ input::-moz-focus-inner, input::-moz-focus-outer {
972
1080
  class="add-url"
973
1081
  placeholder="Add URL (WMS/XYZ)"
974
1082
  .value="${this.urlInput}"
975
- @input=${Y(this,Z,Eo)}
1083
+ @input=${vt(this,bt,Il)}
976
1084
  >
977
1085
  </input>
978
1086
  <!-- Search button for URL -->
979
1087
  <button
980
1088
  class="search-icon"
981
- disabled=${r}
982
- @click=${Y(this,Z,xo)}
1089
+ disabled=${s}
1090
+ @click=${vt(this,bt,$l)}
983
1091
  >
984
1092
  ${this.unstyled?"Search":""}
985
1093
  </button>
986
1094
  </div>
987
1095
 
988
1096
  <!-- Display layers for WMS capabilities -->
989
- ${this.wmsCapabilities?x`<ul class="search-lists">
990
- ${this.wmsCapabilities.Capability.Layer.Layer.map(s=>{const a=s.Name;return x`
1097
+ ${this.wmsCapabilities?B`<ul class="search-lists">
1098
+ ${this.wmsCapabilities.Capability.Layer.Layer.map(o=>{const a=o.Name;return B`
991
1099
  <li class="search-list">
992
1100
  ${a}
993
1101
  <!-- Button to add layer -->
994
1102
  <button
995
1103
  class="add-layer-icon icon"
996
- @click=${()=>Y(this,Z,Wn).call(this,s)}
1104
+ @click=${()=>vt(this,bt,Ss).call(this,o)}
997
1105
  >
998
1106
  ${this.unstyled?"+":""}
999
1107
  </button>
1000
1108
  </li>
1001
1109
  `})}
1002
- </ul>`:T}
1003
- `:x`
1110
+ </ul>`:K}
1111
+ `:B`
1004
1112
  <!-- Textarea for JSON input -->
1005
1113
  <textarea
1006
1114
  class="add-layer-input"
1007
1115
  placeholder="Please put a valid eox-map layer JSON."
1008
- @input=${Y(this,Z,$o)}
1116
+ @input=${vt(this,bt,Ml)}
1009
1117
  .value=${this.jsonInput}
1010
1118
  ></textarea>
1011
1119
 
1012
1120
  <!-- Button to add JSON layer -->
1013
1121
  <button
1014
1122
  class="add-layer-icon json-add-layer"
1015
- disabled=${Vr(this.jsonInput)?T:!0}
1016
- @click=${Y(this,Z,So)}
1123
+ disabled=${zu(this.jsonInput)?K:!0}
1124
+ @click=${vt(this,bt,Pl)}
1017
1125
  >
1018
1126
  ${this.unstyled?"Add JSON":""}
1019
1127
  </button>
1020
1128
  `}
1021
1129
  </div>
1022
1130
  </div>
1023
- `}}Z=new WeakSet,Eo=function(n){Qs(n,this)},xo=async function(){const n=await ta(this);n&&Y(this,Z,Wn).call(this,n)},Wn=function(n){ea(n,this),po(this)},So=function(){po(this)},$o=function(n){Ks(n,this)},hn=function(n){na(n,this)},sn=new WeakMap,an=new WeakMap,L(fo,"properties",{eoxMap:{attribute:!1,state:!0},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-add-layers",fo);const ia=(e,t)=>{if(t.requestUpdate(),e.target.tagName==="EOX-LAYERCONTROL-LAYER-TOOLS"){const n=t.renderRoot.querySelector("eox-layercontrol-optional-list");n==null||n.requestUpdate()}},oa=e=>{let t;return typeof e=="string"?t=document.querySelector(e):t=e,t},ra=e=>{const t=oa(e.for);return t&&t.map!==e.map&&(e.map=t.map),t};class Yn extends et{constructor(){super();O(this,ln);O(this,Wt);O(this,un,"* { font-family: Roboto, sans-serif; }");this.for="eox-map",this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=["info","opacity","config","remove","sort"],this.addExternalLayers=!1,this.unstyled=!1,this.styleOverride=""}firstUpdated(){$e(this,Wt,ra(this))}render(){var o,r,s;const n=(o=this.map)==null?void 0:o.getLayers().getArray(),i=n&&((r=jn(n,"layerControlOptional",!0))==null?void 0:r.length)>0;return x`
1131
+ `}}bt=new WeakSet,Il=function(e){tg(e,this)},$l=async function(){const e=await eg(this);e&&vt(this,bt,Ss).call(this,e)},Ss=function(e){ng(e,this),vl(this)},Pl=function(){vl(this)},Ml=function(e){Qf(e,this)},er=function(e){ig(e,this)},Ki=new WeakMap,qi=new WeakMap,ht(Tl,"properties",{eoxMap:{attribute:!1,state:!0},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-add-layers",Tl);const rg=(n,t)=>{if(t.requestUpdate(),n.target.tagName==="EOX-LAYERCONTROL-LAYER-TOOLS"){const e=t.renderRoot.querySelector("eox-layercontrol-optional-list");e==null||e.requestUpdate()}},sg=n=>{let t;return typeof n=="string"?t=document.querySelector(n):t=n,t},og=n=>{const t=sg(n.for);return t&&t.map!==n.map&&(n.map=t.map),t};class Rs extends Mt{constructor(){super();tt(this,Ji);tt(this,an);tt(this,Qi,"* { font-family: Roboto, sans-serif; }");this.for="eox-map",this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=["info","opacity","config","remove","sort"],this.addExternalLayers=!1,this.unstyled=!1,this.styleOverride=""}firstUpdated(){Wn(this,an,og(this))}render(){var r,s,o;const e=(r=this.map)==null?void 0:r.getLayers().getArray(),i=e&&((s=Mr(e,"layerControlOptional",!0))==null?void 0:s.length)>0;return B`
1024
1132
  <style>
1025
- ${!this.unstyled&&M(this,un)}
1133
+ ${!this.unstyled&&nt(this,Qi)}
1026
1134
  ${this.styleOverride}
1027
1135
  </style>
1028
1136
 
1029
1137
  <!-- Conditional rendering of add layers component -->
1030
- ${at(this.addExternalLayers&&((s=M(this,Wt))==null?void 0:s.addOrUpdateLayer),()=>x`
1138
+ ${Ut(this.addExternalLayers&&((o=nt(this,an))==null?void 0:o.addOrUpdateLayer),()=>B`
1031
1139
  <eox-layercontrol-add-layers
1032
1140
  .noShadow=${!0}
1033
- .eoxMap=${M(this,Wt)}
1141
+ .eoxMap=${nt(this,an)}
1034
1142
  .unstyled=${this.unstyled}
1035
1143
  ></eox-layercontrol-add-layers>
1036
1144
  `)}
1037
1145
 
1038
1146
  <!-- Conditional rendering of layer list component -->
1039
- ${at(this.map,()=>x`
1147
+ ${Ut(this.map,()=>B`
1040
1148
  <eox-layercontrol-layer-list
1041
1149
  .noShadow=${!0}
1042
1150
  class="layers"
@@ -1047,12 +1155,12 @@ input::-moz-focus-inner, input::-moz-focus-outer {
1047
1155
  .showLayerZoomState=${this.showLayerZoomState}
1048
1156
  .tools=${this.tools}
1049
1157
  .unstyled=${this.unstyled}
1050
- @changed=${Y(this,ln,_o)}
1158
+ @changed=${vt(this,Ji,Ol)}
1051
1159
  ></eox-layercontrol-layer-list>
1052
1160
  `)}
1053
1161
 
1054
1162
  <!-- Conditional rendering of optional list component -->
1055
- ${at(i,()=>x`
1163
+ ${Ut(i,()=>B`
1056
1164
  <eox-layercontrol-optional-list
1057
1165
  .noShadow=${!0}
1058
1166
  .idProperty=${this.idProperty}
@@ -1061,4 +1169,4 @@ input::-moz-focus-inner, input::-moz-focus-outer {
1061
1169
  @changed=${()=>this.requestUpdate()}
1062
1170
  ></eox-layercontrol-optional-list>
1063
1171
  `)}
1064
- `}}Wt=new WeakMap,ln=new WeakSet,_o=function(n){ia(n,this),this.dispatchEvent(new CustomEvent("layerchange",{detail:n.detail}))},un=new WeakMap,L(Yn,"properties",{for:{type:String},idProperty:{attribute:"id-property"},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},addExternalLayers:{attribute:!1},unstyled:{type:Boolean},styleOverride:{type:String}}),customElements.define("eox-layercontrol",Yn),C.EOxLayerControl=Yn,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
1172
+ `}}an=new WeakMap,Ji=new WeakSet,Ol=function(e){rg(e,this),this.dispatchEvent(new CustomEvent("layerchange",{detail:e.detail}))},Qi=new WeakMap,ht(Rs,"properties",{for:{type:String},idProperty:{attribute:"id-property"},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},addExternalLayers:{attribute:!1},unstyled:{type:Boolean},styleOverride:{type:String}}),customElements.define("eox-layercontrol",Rs),Z.EOxLayerControl=Rs,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});