@maptiler/geocoding-control 3.0.0 → 3.1.0-rc.1

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.
package/dist/index.umd.js CHANGED
@@ -1,71 +1,71 @@
1
- (function(c,U){typeof exports=="object"&&typeof module<"u"?U(exports):typeof define=="function"&&define.amd?define(["exports"],U):(c=typeof globalThis<"u"?globalThis:c||self,U(c.maptilerGeocoder={}))})(this,(function(c){"use strict";/**
1
+ (function(c,W){typeof exports=="object"&&typeof module<"u"?W(exports):typeof define=="function"&&define.amd?define(["exports"],W):(c=typeof globalThis<"u"?globalThis:c||self,W(c.maptilerGeocoder={}))})(this,(function(c){"use strict";/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const U=globalThis,$e=U.ShadowRoot&&(U.ShadyCSS===void 0||U.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ee=Symbol(),ze=new WeakMap;let Ve=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==Ee)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if($e&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=ze.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&ze.set(t,e))}return e}toString(){return this.cssText}};const _e=i=>new Ve(typeof i=="string"?i:i+"",void 0,Ee),F=(i,...e)=>{const t=i.length===1?i[0]:e.reduce(((s,r,o)=>s+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[o+1]),i[0]);return new Ve(t,i,Ee)},Gt=(i,e)=>{if($e)i.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const t of e){const s=document.createElement("style"),r=U.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=t.cssText,i.appendChild(s)}},qe=$e?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return _e(t)})(i):i;/**
5
+ */const W=globalThis,we=W.ShadowRoot&&(W.ShadyCSS===void 0||W.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Se=Symbol(),Qe=new WeakMap;let Je=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==Se)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(we&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=Qe.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Qe.set(t,e))}return e}toString(){return this.cssText}};const Me=i=>new Je(typeof i=="string"?i:i+"",void 0,Se),D=(i,...e)=>{const t=i.length===1?i[0]:e.reduce(((s,r,o)=>s+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[o+1]),i[0]);return new Je(t,i,Se)},Ht=(i,e)=>{if(we)i.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const t of e){const s=document.createElement("style"),r=W.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=t.cssText,i.appendChild(s)}},Xe=we?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return Me(t)})(i):i;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:Ut,defineProperty:Wt,getOwnPropertyDescriptor:Pt,getOwnPropertyNames:Ft,getOwnPropertySymbols:Rt,getPrototypeOf:Dt}=Object,ce=globalThis,Ze=ce.trustedTypes,Ht=Ze?Ze.emptyScript:"",Bt=ce.reactiveElementPolyfillSupport,J=(i,e)=>i,de={toAttribute(i,e){switch(e){case Boolean:i=i?Ht:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},Le=(i,e)=>!Ut(i,e),Ke={attribute:!0,type:String,converter:de,reflect:!1,useDefault:!1,hasChanged:Le};Symbol.metadata??=Symbol("metadata"),ce.litPropertyMetadata??=new WeakMap;let V=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Ke){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),r=this.getPropertyDescriptor(e,s,t);r!==void 0&&Wt(this.prototype,e,r)}}static getPropertyDescriptor(e,t,s){const{get:r,set:o}=Pt(this.prototype,e)??{get(){return this[t]},set(a){this[t]=a}};return{get:r,set(a){const n=r?.call(this);o?.call(this,a),this.requestUpdate(e,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ke}static _$Ei(){if(this.hasOwnProperty(J("elementProperties")))return;const e=Dt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(J("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(J("properties"))){const t=this.properties,s=[...Ft(t),...Rt(t)];for(const r of s)this.createProperty(r,t[r])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,r]of t)this.elementProperties.set(s,r)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const r=this._$Eu(t,s);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const r of s)t.unshift(qe(r))}else e!==void 0&&t.push(qe(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Gt(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){const s=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,s);if(r!==void 0&&s.reflect===!0){const o=(s.converter?.toAttribute!==void 0?s.converter:de).toAttribute(t,s.type);this._$Em=e,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(e,t){const s=this.constructor,r=s._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const o=s.getPropertyOptions(r),a=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:de;this._$Em=r;const n=a.fromAttribute(t,o.type);this[r]=n??this._$Ej?.get(r)??n,this._$Em=null}}requestUpdate(e,t,s){if(e!==void 0){const r=this.constructor,o=this[e];if(s??=r.getPropertyOptions(e),!((s.hasChanged??Le)(o,t)||s.useDefault&&s.reflect&&o===this._$Ej?.get(e)&&!this.hasAttribute(r._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:r,wrapped:o},a){s&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),o!==!0||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),r===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[r,o]of s){const{wrapped:a}=o,n=this[r];a!==!0||this._$AL.has(r)||n===void 0||this.C(r,void 0,o,n)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(t)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};V.elementStyles=[],V.shadowRootOptions={mode:"open"},V[J("elementProperties")]=new Map,V[J("finalized")]=new Map,Bt?.({ReactiveElement:V}),(ce.reactiveElementVersions??=[]).push("2.1.1");/**
9
+ */const{is:jt,defineProperty:zt,getOwnPropertyDescriptor:Vt,getOwnPropertyNames:qt,getOwnPropertySymbols:Zt,getPrototypeOf:Kt}=Object,pe=globalThis,Ye=pe.trustedTypes,Qt=Ye?Ye.emptyScript:"",Jt=pe.reactiveElementPolyfillSupport,Y=(i,e)=>i,me={toAttribute(i,e){switch(e){case Boolean:i=i?Qt:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},Ae=(i,e)=>!jt(i,e),et={attribute:!0,type:String,converter:me,reflect:!1,useDefault:!1,hasChanged:Ae};Symbol.metadata??=Symbol("metadata"),pe.litPropertyMetadata??=new WeakMap;let Z=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=et){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),r=this.getPropertyDescriptor(e,s,t);r!==void 0&&zt(this.prototype,e,r)}}static getPropertyDescriptor(e,t,s){const{get:r,set:o}=Vt(this.prototype,e)??{get(){return this[t]},set(a){this[t]=a}};return{get:r,set(a){const n=r?.call(this);o?.call(this,a),this.requestUpdate(e,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??et}static _$Ei(){if(this.hasOwnProperty(Y("elementProperties")))return;const e=Kt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Y("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Y("properties"))){const t=this.properties,s=[...qt(t),...Zt(t)];for(const r of s)this.createProperty(r,t[r])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,r]of t)this.elementProperties.set(s,r)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const r=this._$Eu(t,s);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const r of s)t.unshift(Xe(r))}else e!==void 0&&t.push(Xe(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ht(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){const s=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,s);if(r!==void 0&&s.reflect===!0){const o=(s.converter?.toAttribute!==void 0?s.converter:me).toAttribute(t,s.type);this._$Em=e,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(e,t){const s=this.constructor,r=s._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const o=s.getPropertyOptions(r),a=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:me;this._$Em=r;const n=a.fromAttribute(t,o.type);this[r]=n??this._$Ej?.get(r)??n,this._$Em=null}}requestUpdate(e,t,s){if(e!==void 0){const r=this.constructor,o=this[e];if(s??=r.getPropertyOptions(e),!((s.hasChanged??Ae)(o,t)||s.useDefault&&s.reflect&&o===this._$Ej?.get(e)&&!this.hasAttribute(r._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:r,wrapped:o},a){s&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),o!==!0||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),r===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[r,o]of s){const{wrapped:a}=o,n=this[r];a!==!0||this._$AL.has(r)||n===void 0||this.C(r,void 0,o,n)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(t)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};Z.elementStyles=[],Z.shadowRootOptions={mode:"open"},Z[Y("elementProperties")]=new Map,Z[Y("finalized")]=new Map,Jt?.({ReactiveElement:Z}),(pe.reactiveElementVersions??=[]).push("2.1.1");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const we=globalThis,he=we.trustedTypes,Qe=he?he.createPolicy("lit-html",{createHTML:i=>i}):void 0,Je="$lit$",W=`lit$${Math.random().toFixed(9).slice(2)}$`,Xe="?"+W,jt=`<${Xe}>`,R=document,X=()=>R.createComment(""),Y=i=>i===null||typeof i!="object"&&typeof i!="function",Se=Array.isArray,zt=i=>Se(i)||typeof i?.[Symbol.iterator]=="function",Me=`[
14
- \f\r]`,ee=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ye=/-->/g,et=/>/g,D=RegExp(`>|${Me}(?:([^\\s"'>=/]+)(${Me}*=${Me}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),tt=/'/g,it=/"/g,st=/^(?:script|style|textarea|title)$/i,rt=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),S=rt(1),ue=rt(2),G=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),ot=new WeakMap,H=R.createTreeWalker(R,129);function at(i,e){if(!Se(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Qe!==void 0?Qe.createHTML(e):e}const Vt=(i,e)=>{const t=i.length-1,s=[];let r,o=e===2?"<svg>":e===3?"<math>":"",a=ee;for(let n=0;n<t;n++){const l=i[n];let g,v,d=-1,b=0;for(;b<l.length&&(a.lastIndex=b,v=a.exec(l),v!==null);)b=a.lastIndex,a===ee?v[1]==="!--"?a=Ye:v[1]!==void 0?a=et:v[2]!==void 0?(st.test(v[2])&&(r=RegExp("</"+v[2],"g")),a=D):v[3]!==void 0&&(a=D):a===D?v[0]===">"?(a=r??ee,d=-1):v[1]===void 0?d=-2:(d=a.lastIndex-v[2].length,g=v[1],a=v[3]===void 0?D:v[3]==='"'?it:tt):a===it||a===tt?a=D:a===Ye||a===et?a=ee:(a=D,r=void 0);const m=a===D&&i[n+1].startsWith("/>")?" ":"";o+=a===ee?l+jt:d>=0?(s.push(g),l.slice(0,d)+Je+l.slice(d)+W+m):l+W+(d===-2?n:m)}return[at(i,o+(i[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};class te{constructor({strings:e,_$litType$:t},s){let r;this.parts=[];let o=0,a=0;const n=e.length-1,l=this.parts,[g,v]=Vt(e,t);if(this.el=te.createElement(g,s),H.currentNode=this.el.content,t===2||t===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(r=H.nextNode())!==null&&l.length<n;){if(r.nodeType===1){if(r.hasAttributes())for(const d of r.getAttributeNames())if(d.endsWith(Je)){const b=v[a++],m=r.getAttribute(d).split(W),y=/([.?@])?(.*)/.exec(b);l.push({type:1,index:o,name:y[2],strings:m,ctor:y[1]==="."?Zt:y[1]==="?"?Kt:y[1]==="@"?Qt:pe}),r.removeAttribute(d)}else d.startsWith(W)&&(l.push({type:6,index:o}),r.removeAttribute(d));if(st.test(r.tagName)){const d=r.textContent.split(W),b=d.length-1;if(b>0){r.textContent=he?he.emptyScript:"";for(let m=0;m<b;m++)r.append(d[m],X()),H.nextNode(),l.push({type:2,index:++o});r.append(d[b],X())}}}else if(r.nodeType===8)if(r.data===Xe)l.push({type:2,index:o});else{let d=-1;for(;(d=r.data.indexOf(W,d+1))!==-1;)l.push({type:7,index:o}),d+=W.length-1}o++}}static createElement(e,t){const s=R.createElement("template");return s.innerHTML=e,s}}function q(i,e,t=i,s){if(e===G)return e;let r=s!==void 0?t._$Co?.[s]:t._$Cl;const o=Y(e)?void 0:e._$litDirective$;return r?.constructor!==o&&(r?._$AO?.(!1),o===void 0?r=void 0:(r=new o(i),r._$AT(i,t,s)),s!==void 0?(t._$Co??=[])[s]=r:t._$Cl=r),r!==void 0&&(e=q(i,r._$AS(i,e.values),r,s)),e}let qt=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:s}=this._$AD,r=(e?.creationScope??R).importNode(t,!0);H.currentNode=r;let o=H.nextNode(),a=0,n=0,l=s[0];for(;l!==void 0;){if(a===l.index){let g;l.type===2?g=new Z(o,o.nextSibling,this,e):l.type===1?g=new l.ctor(o,l.name,l.strings,this,e):l.type===6&&(g=new Jt(o,this,e)),this._$AV.push(g),l=s[++n]}a!==l?.index&&(o=H.nextNode(),a++)}return H.currentNode=R,r}p(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}};class Z{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,s,r){this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=q(this,e,t),Y(e)?e===w||e==null||e===""?(this._$AH!==w&&this._$AR(),this._$AH=w):e!==this._$AH&&e!==G&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):zt(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==w&&Y(this._$AH)?this._$AA.nextSibling.data=e:this.T(R.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:s}=e,r=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=te.createElement(at(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(t);else{const o=new qt(r,this),a=o.u(this.options);o.p(t),this.T(a),this._$AH=o}}_$AC(e){let t=ot.get(e.strings);return t===void 0&&ot.set(e.strings,t=new te(e)),t}k(e){Se(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,r=0;for(const o of e)r===t.length?t.push(s=new Z(this.O(X()),this.O(X()),this,this.options)):s=t[r],s._$AI(o),r++;r<t.length&&(this._$AR(s&&s._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class pe{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,r,o){this.type=1,this._$AH=w,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=w}_$AI(e,t=this,s,r){const o=this.strings;let a=!1;if(o===void 0)e=q(this,e,t,0),a=!Y(e)||e!==this._$AH&&e!==G,a&&(this._$AH=e);else{const n=e;let l,g;for(e=o[0],l=0;l<o.length-1;l++)g=q(this,n[s+l],t,l),g===G&&(g=this._$AH[l]),a||=!Y(g)||g!==this._$AH[l],g===w?e=w:e!==w&&(e+=(g??"")+o[l+1]),this._$AH[l]=g}a&&!r&&this.j(e)}j(e){e===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Zt extends pe{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===w?void 0:e}}class Kt extends pe{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==w)}}class Qt extends pe{constructor(e,t,s,r,o){super(e,t,s,r,o),this.type=5}_$AI(e,t=this){if((e=q(this,e,t,0)??w)===G)return;const s=this._$AH,r=e===w&&s!==w||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,o=e!==w&&(s===w||r);r&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Jt{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){q(this,e)}}const Xt={I:Z},Yt=we.litHtmlPolyfillSupport;Yt?.(te,Z),(we.litHtmlVersions??=[]).push("3.3.1");const ei=(i,e,t)=>{const s=t?.renderBefore??e;let r=s._$litPart$;if(r===void 0){const o=t?.renderBefore??null;s._$litPart$=r=new Z(e.insertBefore(X(),o),o,void 0,t??{})}return r._$AI(i),r};/**
13
+ */const Ce=globalThis,fe=Ce.trustedTypes,tt=fe?fe.createPolicy("lit-html",{createHTML:i=>i}):void 0,it="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,st="?"+P,Xt=`<${st}>`,B=document,ee=()=>B.createComment(""),te=i=>i===null||typeof i!="object"&&typeof i!="function",xe=Array.isArray,Yt=i=>xe(i)||typeof i?.[Symbol.iterator]=="function",Ie=`[
14
+ \f\r]`,ie=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,rt=/-->/g,ot=/>/g,H=RegExp(`>|${Ie}(?:([^\\s"'>=/]+)(${Ie}*=${Ie}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),at=/'/g,nt=/"/g,lt=/^(?:script|style|textarea|title)$/i,ct=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),S=ct(1),ve=ct(2),U=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),dt=new WeakMap,j=B.createTreeWalker(B,129);function ht(i,e){if(!xe(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return tt!==void 0?tt.createHTML(e):e}const ei=(i,e)=>{const t=i.length-1,s=[];let r,o=e===2?"<svg>":e===3?"<math>":"",a=ie;for(let n=0;n<t;n++){const l=i[n];let g,v,p=-1,b=0;for(;b<l.length&&(a.lastIndex=b,v=a.exec(l),v!==null);)b=a.lastIndex,a===ie?v[1]==="!--"?a=rt:v[1]!==void 0?a=ot:v[2]!==void 0?(lt.test(v[2])&&(r=RegExp("</"+v[2],"g")),a=H):v[3]!==void 0&&(a=H):a===H?v[0]===">"?(a=r??ie,p=-1):v[1]===void 0?p=-2:(p=a.lastIndex-v[2].length,g=v[1],a=v[3]===void 0?H:v[3]==='"'?nt:at):a===nt||a===at?a=H:a===rt||a===ot?a=ie:(a=H,r=void 0);const m=a===H&&i[n+1].startsWith("/>")?" ":"";o+=a===ie?l+Xt:p>=0?(s.push(g),l.slice(0,p)+it+l.slice(p)+P+m):l+P+(p===-2?n:m)}return[ht(i,o+(i[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};class se{constructor({strings:e,_$litType$:t},s){let r;this.parts=[];let o=0,a=0;const n=e.length-1,l=this.parts,[g,v]=ei(e,t);if(this.el=se.createElement(g,s),j.currentNode=this.el.content,t===2||t===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(r=j.nextNode())!==null&&l.length<n;){if(r.nodeType===1){if(r.hasAttributes())for(const p of r.getAttributeNames())if(p.endsWith(it)){const b=v[a++],m=r.getAttribute(p).split(P),y=/([.?@])?(.*)/.exec(b);l.push({type:1,index:o,name:y[2],strings:m,ctor:y[1]==="."?ii:y[1]==="?"?si:y[1]==="@"?ri:ge}),r.removeAttribute(p)}else p.startsWith(P)&&(l.push({type:6,index:o}),r.removeAttribute(p));if(lt.test(r.tagName)){const p=r.textContent.split(P),b=p.length-1;if(b>0){r.textContent=fe?fe.emptyScript:"";for(let m=0;m<b;m++)r.append(p[m],ee()),j.nextNode(),l.push({type:2,index:++o});r.append(p[b],ee())}}}else if(r.nodeType===8)if(r.data===st)l.push({type:2,index:o});else{let p=-1;for(;(p=r.data.indexOf(P,p+1))!==-1;)l.push({type:7,index:o}),p+=P.length-1}o++}}static createElement(e,t){const s=B.createElement("template");return s.innerHTML=e,s}}function K(i,e,t=i,s){if(e===U)return e;let r=s!==void 0?t._$Co?.[s]:t._$Cl;const o=te(e)?void 0:e._$litDirective$;return r?.constructor!==o&&(r?._$AO?.(!1),o===void 0?r=void 0:(r=new o(i),r._$AT(i,t,s)),s!==void 0?(t._$Co??=[])[s]=r:t._$Cl=r),r!==void 0&&(e=K(i,r._$AS(i,e.values),r,s)),e}let ti=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:s}=this._$AD,r=(e?.creationScope??B).importNode(t,!0);j.currentNode=r;let o=j.nextNode(),a=0,n=0,l=s[0];for(;l!==void 0;){if(a===l.index){let g;l.type===2?g=new Q(o,o.nextSibling,this,e):l.type===1?g=new l.ctor(o,l.name,l.strings,this,e):l.type===6&&(g=new oi(o,this,e)),this._$AV.push(g),l=s[++n]}a!==l?.index&&(o=j.nextNode(),a++)}return j.currentNode=B,r}p(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}};class Q{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,s,r){this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=K(this,e,t),te(e)?e===w||e==null||e===""?(this._$AH!==w&&this._$AR(),this._$AH=w):e!==this._$AH&&e!==U&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Yt(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==w&&te(this._$AH)?this._$AA.nextSibling.data=e:this.T(B.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:s}=e,r=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=se.createElement(ht(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(t);else{const o=new ti(r,this),a=o.u(this.options);o.p(t),this.T(a),this._$AH=o}}_$AC(e){let t=dt.get(e.strings);return t===void 0&&dt.set(e.strings,t=new se(e)),t}k(e){xe(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,r=0;for(const o of e)r===t.length?t.push(s=new Q(this.O(ee()),this.O(ee()),this,this.options)):s=t[r],s._$AI(o),r++;r<t.length&&(this._$AR(s&&s._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class ge{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,r,o){this.type=1,this._$AH=w,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=w}_$AI(e,t=this,s,r){const o=this.strings;let a=!1;if(o===void 0)e=K(this,e,t,0),a=!te(e)||e!==this._$AH&&e!==U,a&&(this._$AH=e);else{const n=e;let l,g;for(e=o[0],l=0;l<o.length-1;l++)g=K(this,n[s+l],t,l),g===U&&(g=this._$AH[l]),a||=!te(g)||g!==this._$AH[l],g===w?e=w:e!==w&&(e+=(g??"")+o[l+1]),this._$AH[l]=g}a&&!r&&this.j(e)}j(e){e===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class ii extends ge{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===w?void 0:e}}class si extends ge{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==w)}}class ri extends ge{constructor(e,t,s,r,o){super(e,t,s,r,o),this.type=5}_$AI(e,t=this){if((e=K(this,e,t,0)??w)===U)return;const s=this._$AH,r=e===w&&s!==w||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,o=e!==w&&(s===w||r);r&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class oi{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){K(this,e)}}const ai={I:Q},ni=Ce.litHtmlPolyfillSupport;ni?.(se,Q),(Ce.litHtmlVersions??=[]).push("3.3.1");const li=(i,e,t)=>{const s=t?.renderBefore??e;let r=s._$litPart$;if(r===void 0){const o=t?.renderBefore??null;s._$litPart$=r=new Q(e.insertBefore(ee(),o),o,void 0,t??{})}return r._$AI(i),r};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
19
- */const Ae=globalThis;let k=class extends V{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ei(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return G}};k._$litElement$=!0,k.finalized=!0,Ae.litElementHydrateSupport?.({LitElement:k});const ti=Ae.litElementPolyfillSupport;ti?.({LitElement:k}),(Ae.litElementVersions??=[]).push("4.2.1");/**
19
+ */const Te=globalThis;let N=class extends Z{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=li(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return U}};N._$litElement$=!0,N.finalized=!0,Te.litElementHydrateSupport?.({LitElement:N});const ci=Te.litElementPolyfillSupport;ci?.({LitElement:N}),(Te.litElementVersions??=[]).push("4.2.1");/**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
23
- */const B=i=>(e,t)=>{t!==void 0?t.addInitializer((()=>{customElements.define(i,e)})):customElements.define(i,e)};/**
23
+ */const z=i=>(e,t)=>{t!==void 0?t.addInitializer((()=>{customElements.define(i,e)})):customElements.define(i,e)};/**
24
24
  * @license
25
25
  * Copyright 2017 Google LLC
26
26
  * SPDX-License-Identifier: BSD-3-Clause
27
- */const ii={attribute:!0,type:String,converter:de,reflect:!1,hasChanged:Le},si=(i=ii,e,t)=>{const{kind:s,metadata:r}=t;let o=globalThis.litPropertyMetadata.get(r);if(o===void 0&&globalThis.litPropertyMetadata.set(r,o=new Map),s==="setter"&&((i=Object.create(i)).wrapped=!0),o.set(t.name,i),s==="accessor"){const{name:a}=t;return{set(n){const l=e.get.call(this);e.set.call(this,n),this.requestUpdate(a,l,i)},init(n){return n!==void 0&&this.C(a,void 0,i,n),n}}}if(s==="setter"){const{name:a}=t;return function(n){const l=this[a];e.call(this,n),this.requestUpdate(a,l,i)}}throw Error("Unsupported decorator location: "+s)};function f(i){return(e,t)=>typeof t=="object"?si(i,e,t):((s,r,o)=>{const a=r.hasOwnProperty(o);return r.constructor.createProperty(o,s),a?Object.getOwnPropertyDescriptor(r,o):void 0})(i,e,t)}/**
27
+ */const di={attribute:!0,type:String,converter:me,reflect:!1,hasChanged:Ae},hi=(i=di,e,t)=>{const{kind:s,metadata:r}=t;let o=globalThis.litPropertyMetadata.get(r);if(o===void 0&&globalThis.litPropertyMetadata.set(r,o=new Map),s==="setter"&&((i=Object.create(i)).wrapped=!0),o.set(t.name,i),s==="accessor"){const{name:a}=t;return{set(n){const l=e.get.call(this);e.set.call(this,n),this.requestUpdate(a,l,i)},init(n){return n!==void 0&&this.C(a,void 0,i,n),n}}}if(s==="setter"){const{name:a}=t;return function(n){const l=this[a];e.call(this,n),this.requestUpdate(a,l,i)}}throw Error("Unsupported decorator location: "+s)};function f(i){return(e,t)=>typeof t=="object"?hi(i,e,t):((s,r,o)=>{const a=r.hasOwnProperty(o);return r.constructor.createProperty(o,s),a?Object.getOwnPropertyDescriptor(r,o):void 0})(i,e,t)}/**
28
28
  * @license
29
29
  * Copyright 2017 Google LLC
30
30
  * SPDX-License-Identifier: BSD-3-Clause
31
- */function x(i){return f({...i,state:!0,attribute:!1})}/**
31
+ */function C(i){return f({...i,state:!0,attribute:!1})}/**
32
32
  * @license
33
33
  * Copyright 2017 Google LLC
34
34
  * SPDX-License-Identifier: BSD-3-Clause
35
- */const ri=(i,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(i,e,t),t);/**
35
+ */const ui=(i,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(i,e,t),t);/**
36
36
  * @license
37
- * Copyright 2017 Google LLC
37
+ * Copyright 2021 Google LLC
38
38
  * SPDX-License-Identifier: BSD-3-Clause
39
- */function oi(i,e){return(t,s,r)=>{const o=a=>a.renderRoot?.querySelector(i)??null;return ri(t,s,{get(){return o(this)}})}}var ai=Object.getOwnPropertyDescriptor,ni=(i,e,t,s)=>{for(var r=s>1?void 0:s?ai(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=a(r)||r);return r};c.MaptilerGeocodeClearIconElement=class extends k{render(){return ue`
39
+ */function k(i){return(e,t)=>{const{slot:s,selector:r}=i??{},o="slot"+(s?`[name=${s}]`:":not([name])");return ui(e,t,{get(){const a=this.renderRoot?.querySelector(o),n=a?.assignedElements(i)??[];return r===void 0?n:n.filter((l=>l.matches(r)))}})}}var pi=Object.getOwnPropertyDescriptor,mi=(i,e,t,s)=>{for(var r=s>1?void 0:s?pi(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=a(r)||r);return r};c.MaptilerGeocodeClearIconElement=class extends N{render(){return ve`
40
40
  <svg viewBox="0 0 14 14" width="13" height="13">
41
41
  <path
42
42
  d="M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"
43
43
  />
44
44
  </svg>
45
- `}},c.MaptilerGeocodeClearIconElement.styles=F`
45
+ `}},c.MaptilerGeocodeClearIconElement.styles=D`
46
46
  svg {
47
47
  display: block;
48
- fill: var(--color-icon-button);
48
+ fill: var(--color-icon-button, #444952);
49
49
  }
50
- `,c.MaptilerGeocodeClearIconElement=ni([B("maptiler-geocode-clear-icon")],c.MaptilerGeocodeClearIconElement);var li=Object.getOwnPropertyDescriptor,ci=(i,e,t,s)=>{for(var r=s>1?void 0:s?li(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=a(r)||r);return r};c.MaptilerGeocodeFailIconElement=class extends k{render(){return ue`
50
+ `,c.MaptilerGeocodeClearIconElement=mi([z("maptiler-geocode-clear-icon")],c.MaptilerGeocodeClearIconElement);var fi=Object.getOwnPropertyDescriptor,vi=(i,e,t,s)=>{for(var r=s>1?void 0:s?fi(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=a(r)||r);return r};c.MaptilerGeocodeFailIconElement=class extends N{render(){return ve`
51
51
  <svg viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
52
52
  <path
53
53
  d="M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"
54
54
  />
55
55
  </svg>
56
- `}},c.MaptilerGeocodeFailIconElement.styles=F`
56
+ `}},c.MaptilerGeocodeFailIconElement.styles=D`
57
57
  svg {
58
58
  display: block;
59
- fill: #e15042;
59
+ fill: var(--color-fail-icon, #e15042);
60
60
  }
61
- `,c.MaptilerGeocodeFailIconElement=ci([B("maptiler-geocode-fail-icon")],c.MaptilerGeocodeFailIconElement);var di=Object.getOwnPropertyDescriptor,hi=(i,e,t,s)=>{for(var r=s>1?void 0:s?di(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=a(r)||r);return r};c.MaptilerGeocodeLoadingIconElement=class extends k{render(){return S`
61
+ `,c.MaptilerGeocodeFailIconElement=vi([z("maptiler-geocode-fail-icon")],c.MaptilerGeocodeFailIconElement);var gi=Object.getOwnPropertyDescriptor,bi=(i,e,t,s)=>{for(var r=s>1?void 0:s?gi(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=a(r)||r);return r};c.MaptilerGeocodeLoadingIconElement=class extends N{render(){return S`
62
62
  <div>
63
63
  <svg viewBox="0 0 18 18" width="24" height="24" class="loading-icon">
64
64
  <path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z" />
65
65
  <path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z" />
66
66
  </svg>
67
67
  </div>
68
- `}},c.MaptilerGeocodeLoadingIconElement.styles=F`
68
+ `}},c.MaptilerGeocodeLoadingIconElement.styles=D`
69
69
  div {
70
70
  position: absolute;
71
71
  left: 50%;
@@ -91,18 +91,18 @@
91
91
  transform: rotate(360deg);
92
92
  }
93
93
  }
94
- `,c.MaptilerGeocodeLoadingIconElement=hi([B("maptiler-geocode-loading-icon")],c.MaptilerGeocodeLoadingIconElement);var ui=Object.getOwnPropertyDescriptor,pi=(i,e,t,s)=>{for(var r=s>1?void 0:s?ui(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=a(r)||r);return r};c.MaptilerGeocodeReverseGeocodingIconElement=class extends k{render(){return ue`
94
+ `,c.MaptilerGeocodeLoadingIconElement=bi([z("maptiler-geocode-loading-icon")],c.MaptilerGeocodeLoadingIconElement);var yi=Object.getOwnPropertyDescriptor,$i=(i,e,t,s)=>{for(var r=s>1?void 0:s?yi(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=a(r)||r);return r};c.MaptilerGeocodeReverseGeocodingIconElement=class extends N{render(){return ve`
95
95
  <svg viewBox="0 0 60.006 21.412" width="14" height="20">
96
96
  <path
97
97
  d="M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"
98
98
  />
99
99
  </svg>
100
- `}},c.MaptilerGeocodeReverseGeocodingIconElement.styles=F`
100
+ `}},c.MaptilerGeocodeReverseGeocodingIconElement.styles=D`
101
101
  svg {
102
102
  display: block;
103
- fill: var(--color-icon-button);
103
+ fill: var(--color-icon-button, #444952);
104
104
  }
105
- `,c.MaptilerGeocodeReverseGeocodingIconElement=pi([B("maptiler-geocode-reverse-geocoding-icon")],c.MaptilerGeocodeReverseGeocodingIconElement);var mi=Object.getOwnPropertyDescriptor,fi=(i,e,t,s)=>{for(var r=s>1?void 0:s?mi(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=a(r)||r);return r};c.MaptilerGeocodeSearchIconElement=class extends k{render(){return ue`
105
+ `,c.MaptilerGeocodeReverseGeocodingIconElement=$i([z("maptiler-geocode-reverse-geocoding-icon")],c.MaptilerGeocodeReverseGeocodingIconElement);var Ei=Object.getOwnPropertyDescriptor,_i=(i,e,t,s)=>{for(var r=s>1?void 0:s?Ei(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=a(r)||r);return r};c.MaptilerGeocodeSearchIconElement=class extends N{render(){return ve`
106
106
  <svg
107
107
  xmlns="http://www.w3.org/2000/svg"
108
108
  width="13"
@@ -112,7 +112,7 @@
112
112
  <circle cx="4.789" cy="4.787" r="3.85" />
113
113
  <path d="M12.063 12.063 7.635 7.635" />
114
114
  </svg>
115
- `}},c.MaptilerGeocodeSearchIconElement.styles=F`
115
+ `}},c.MaptilerGeocodeSearchIconElement.styles=D`
116
116
  circle {
117
117
  stroke-width: 1.875;
118
118
  fill: none;
@@ -125,29 +125,29 @@
125
125
 
126
126
  svg {
127
127
  display: block;
128
- stroke: var(--color-icon-button);
128
+ stroke: var(--color-icon-button, #444952);
129
129
  }
130
- `,c.MaptilerGeocodeSearchIconElement=fi([B("maptiler-geocode-search-icon")],c.MaptilerGeocodeSearchIconElement);const vi=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i,nt=/^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/,lt=/^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i,ct=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i,dt=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i,ht=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;function gi(i){if(!["DMS","DM","DD"].includes(i))throw new Error("invalid format specified");if(this.decimalCoordinates&&this.decimalCoordinates.trim()){const e=this.decimalCoordinates.split(",").map(m=>Number(m.trim())),t=Number(e[0]),s=Number(e[1]),r=Math.abs(t),o=Math.abs(s),a=t>0?"N":"S",n=s>0?"E":"W";let l;i=="DD"&&(l=`${r}° ${a}, ${o}° ${n}`);const g=Math.floor(r),v=Math.floor(o),d=(r-g)*60,b=(o-v)*60;if(i=="DM"){let m=ut(d,3).toFixed(3).padStart(6,"0"),y=ut(b,3).toFixed(3).padStart(6,"0");m.endsWith(".000")&&y.endsWith(".000")&&(m=m.replace(/\.000$/,""),y=y.replace(/\.000$/,"")),l=`${g}° ${m}' ${a}, ${v}° ${y}' ${n}`}if(i=="DMS"){const m=Math.floor(d),y=Math.floor(b);let L=((d-m)*60).toFixed(1).padStart(4,"0"),A=((b-y)*60).toFixed(1).padStart(4,"0");const E=m.toString().padStart(2,"0"),N=y.toString().padStart(2,"0");L.endsWith(".0")&&A.endsWith(".0")&&(L=L.replace(/\.0$/,""),A=A.replace(/\.0$/,"")),l=`${g}° ${E}' ${L}" ${a}, ${v}° ${N}' ${A}" ${n}`}return l}else throw new Error("no decimal coordinates to convert")}function ut(i,e){const t=Math.pow(10,e);return Math.round((i+Number.EPSILON)*t)/t}function xe(i,e){e||(e=5),i=i.replace(/\s+/g," ").trim();let t=null,s=null,r="",o="",a=null,n=[],l=!1;if(vi.test(i))throw new Error("invalid coordinate value");if(nt.test(i))if(n=nt.exec(i),l=ie(n),l)t=Math.abs(n[1])+n[2]/60,Number(n[1])<0&&(t*=-1),s=Math.abs(n[3])+n[4]/60,Number(n[3])<0&&(s*=-1),a="DM";else throw new Error("invalid coordinate format");else if(lt.test(i))if(n=lt.exec(i),l=ie(n),l){if(t=n[2],s=n[6],t.includes(",")&&(t=t.replace(",",".")),s.includes(",")&&(s=s.replace(",",".")),a="DD",Number(Math.round(t))==Number(t))throw new Error("integer only coordinate provided");if(Number(Math.round(s))==Number(s))throw new Error("integer only coordinate provided");n[1]?(r=n[1],o=n[5]):n[4]&&(r=n[4],o=n[8])}else throw new Error("invalid decimal coordinate format");else if(ct.test(i))if(n=ct.exec(i),l=ie(n),l)t=Math.abs(parseInt(n[2])),n[4]&&(t+=n[4]/60,a="DM"),n[6]&&(t+=n[6].replace(",",".")/3600,a="DMS"),parseInt(n[2])<0&&(t=-1*t),s=Math.abs(parseInt(n[9])),n[11]&&(s+=n[11]/60),n[13]&&(s+=n[13].replace(",",".")/3600),parseInt(n[9])<0&&(s=-1*s),n[1]?(r=n[1],o=n[8]):n[7]&&(r=n[7],o=n[14]);else throw new Error("invalid DMS coordinates format");else if(dt.test(i))if(n=dt.exec(i),l=ie(n),l)t=Math.abs(parseInt(n[2])),n[4]&&(t+=n[4]/60,a="DM"),n[6]&&(t+=n[6]/3600,a="DMS"),parseInt(n[2])<0&&(t=-1*t),s=Math.abs(parseInt(n[10])),n[12]&&(s+=n[12]/60),n[14]&&(s+=n[14]/3600),parseInt(n[10])<0&&(s=-1*s),n[1]?(r=n[1],o=n[9]):n[8]&&(r=n[8],o=n[16]);else throw new Error("invalid DMS coordinates format");else if(ht.test(i)){if(n=ht.exec(i),l=ie(n),n.filter(g=>g).length<=5)throw new Error("invalid coordinates format");if(l)t=Math.abs(parseInt(n[2])),n[4]&&(t+=n[4].replace(",",".")/60,a="DM"),n[6]&&(t+=n[6].replace(",",".")/3600,a="DMS"),parseInt(n[2])<0&&(t=-1*t),s=Math.abs(parseInt(n[10])),n[12]&&(s+=n[12].replace(",",".")/60),n[14]&&(s+=n[14].replace(",",".")/3600),parseInt(n[10])<0&&(s=-1*s),n[1]?(r=n[1],o=n[9]):n[8]&&(r=n[8],o=n[16]);else throw new Error("invalid coordinates format")}if(l){if(Math.abs(s)>=180)throw new Error("invalid longitude value");if(Math.abs(t)>=90)throw new Error("invalid latitude value");if(r&&!o||!r&&o)throw new Error("invalid coordinates value");if(r&&r==o)throw new Error("invalid coordinates format");t.toString().includes(",")&&(t=t.replace(",",".")),s.toString().includes(",")&&(s=s.replace(",","."));let g=/S|SOUTH/i;g.test(r)&&t>0&&(t=-1*t),g=/W|WEST/i,g.test(o)&&s>0&&(s=-1*s);const v=n[0].trim();let d,b;const m=/[,/;\u0020]/g,y=v.match(m);if(y==null){const E=Math.floor(i.length/2);d=v.substring(0,E).trim(),b=v.substring(E).trim()}else{let E;y.length%2==1?E=Math.floor(y.length/2):E=y.length/2-1;let N=0;if(E==0)N=v.indexOf(y[0]),d=v.substring(0,N).trim(),b=v.substring(N+1).trim();else{let je=0,Ot=0;for(;je<=E;)N=v.indexOf(y[je],Ot),Ot=N+1,je++;d=v.substring(0,N).trim(),b=v.substring(N+1).trim()}}const L=d.split(".");if(L.length==2&&L[1]==0&&L[1].length!=2)throw new Error("invalid coordinates format");const A=b.split(".");if(A.length==2&&A[1]==0&&A[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(d)||/^\d+$/.test(b))throw new Error("degree only coordinate/s provided");return t=Number(Number(t).toFixed(e)),s=Number(Number(s).toFixed(e)),Object.freeze({verbatimCoordinates:v,verbatimLatitude:d,verbatimLongitude:b,decimalLatitude:t,decimalLongitude:s,decimalCoordinates:`${t},${s}`,originalFormat:a,closeEnough:bi,toCoordinateFormat:gi})}else throw new Error("coordinates pattern match failed")}function ie(i){if(!isNaN(i[0]))return!1;const e=[...i];if(e.shift(),e.length%2>0)return!1;const t=/^[-+]?\d+([\.,]\d+)?$/,s=/[eastsouthnorthwest]+/i,r=e.length/2;for(let o=0;o<r;o++){const a=e[o],n=e[o+r],l=t.test(a)&&t.test(n),g=s.test(a)&&s.test(n),v=a==n;if(!(a==null&&n==null)){if(a==null||n==null)return!1;if(l||g||v)continue;return!1}}return!0}function pt(i,e){const t=Math.abs(i-e);return Number(t.toFixed(6))<=1e-5}function bi(i){if(!i)throw new Error("coords must be provided");if(i.includes(",")){const e=i.split(",");if(Number(e[0])==NaN||Number(e[1])==NaN)throw new Error("coords are not valid decimals");return pt(this.decimalLatitude,Number(e[0]))&&pt(this.decimalLongitude,e[1])}else throw new Error("coords being tested must be separated by a comma")}const yi=Object.freeze({DMS:"DMS",DM:"DM",DD:"DD"});xe.to=yi;const $i=[{verbatimCoordinates:"40.123, -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:'40° 7´ 22.8" N 74° 7´ 22.8" W',verbatimLatitude:'40° 7´ 22.8" N',verbatimLongitude:'74° 7´ 22.8" W'},{verbatimCoordinates:"40° 7.38’ , -74° 7.38’",verbatimLatitude:"40° 7.38’",verbatimLongitude:"-74° 7.38’"},{verbatimCoordinates:"N40°7’22.8’’, W74°7’22.8’’",verbatimLatitude:"N40°7’22.8’’",verbatimLongitude:"W74°7’22.8’’"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:`40°7'22.8"N, 74°7'22.8"W`,verbatimLatitude:`40°7'22.8"N`,verbatimLongitude:`74°7'22.8"W`},{verbatimCoordinates:"40 7 22.8, -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"},{verbatimCoordinates:"40.123 -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123°,-74.123°",verbatimLatitude:"40.123°",verbatimLongitude:"-74.123°"},{verbatimCoordinates:"40.123N74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"4007.38N7407.38W",verbatimLatitude:"4007.38N",verbatimLongitude:"7407.38W"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:"400722.8N740722.8W",verbatimLatitude:"400722.8N",verbatimLongitude:"740722.8W"},{verbatimCoordinates:"N 40 7.38 W 74 7.38",verbatimLatitude:"N 40 7.38",verbatimLongitude:"W 74 7.38"},{verbatimCoordinates:"40:7:22.8N 74:7:22.8W",verbatimLatitude:"40:7:22.8N",verbatimLongitude:"74:7:22.8W"},{verbatimCoordinates:"40:7:23N,74:7:23W",verbatimLatitude:"40:7:23N",verbatimLongitude:"74:7:23W",decimalLatitude:40.1230555555,decimalLongitude:-74.1230555555},{verbatimCoordinates:'40°7’23"N 74°7’23"W',verbatimLatitude:'40°7’23"N',verbatimLongitude:'74°7’23"W',decimalLatitude:40.1230555555,decimalLongitude:-74.12305555555555},{verbatimCoordinates:'40°7’23"S 74°7’23"E',verbatimLatitude:'40°7’23"S',verbatimLongitude:'74°7’23"E',decimalLatitude:-40.1230555555,decimalLongitude:74.12305555555555},{verbatimCoordinates:'40°7’23" -74°7’23"',verbatimLatitude:'40°7’23"',verbatimLongitude:'-74°7’23"',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:'40d 7’ 23" N 74d 7’ 23" W',verbatimLatitude:'40d 7’ 23" N',verbatimLongitude:'74d 7’ 23" W',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:"40.123N 74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40 7 22.8; -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"}],Ei={decimalLatitude:40.123,decimalLongitude:-74.123},_i=[{verbatimCoordinates:`50°4'17.698"south, 14°24'2.826"east`,verbatimLatitude:`50°4'17.698"south`,verbatimLongitude:`14°24'2.826"east`,decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"50d4m17.698S 14d24m2.826E",verbatimLatitude:"50d4m17.698S",verbatimLongitude:"14d24m2.826E",decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"40:26:46N,79:56:55W",verbatimLatitude:"40:26:46N",verbatimLongitude:"79:56:55W",decimalLatitude:40.44611111111111,decimalLongitude:-79.9486111111111},{verbatimCoordinates:"40:26:46.302N 79:56:55.903W",verbatimLatitude:"40:26:46.302N",verbatimLongitude:"79:56:55.903W",decimalLatitude:40.446195,decimalLongitude:-79.94886194444445},{verbatimCoordinates:"40°26′47″N 79°58′36″W",verbatimLatitude:"40°26′47″N",verbatimLongitude:"79°58′36″W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40d 26′ 47″ N 79d 58′ 36″ W",verbatimLatitude:"40d 26′ 47″ N",verbatimLongitude:"79d 58′ 36″ W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40.446195N 79.948862W",verbatimLatitude:"40.446195N",verbatimLongitude:"79.948862W",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40,446195° 79,948862°",verbatimLatitude:"40,446195°",verbatimLongitude:"79,948862°",decimalLatitude:40.446195,decimalLongitude:79.948862},{verbatimCoordinates:"40° 26.7717, -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.446195, -79.948862",verbatimLatitude:"40.446195",verbatimLongitude:"-79.948862",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.123256; -74.123256",verbatimLatitude:"40.123256",verbatimLongitude:"-74.123256",decimalLatitude:40.123256,decimalLongitude:-74.123256},{verbatimCoordinates:"18°24S 22°45E",verbatimLatitude:"18°24S",verbatimLongitude:"22°45E",decimalLatitude:-18.4,decimalLongitude:22.75}],Li=[{verbatimCoordinates:"10.432342S 10.6345345E",verbatimLatitude:"10.432342S",verbatimLongitude:"10.6345345E",decimalLatitude:-10.432342,decimalLongitude:10.6345345},{verbatimCoordinates:"10.00S 10.00E",verbatimLatitude:"10.00S",verbatimLongitude:"10.00E",decimalLatitude:-10,decimalLongitude:10},{verbatimCoordinates:"00.00S 01.00E",verbatimLatitude:"00.00S",verbatimLongitude:"01.00E",decimalLatitude:0,decimalLongitude:1},{verbatimCoordinates:"18.24S 22.45E",verbatimLatitude:"18.24S",verbatimLongitude:"22.45E",decimalLatitude:-18.4,decimalLongitude:22.75},{verbatimCoordinates:"27deg 15min 45.2sec S 18deg 32min 53.7sec E",verbatimLatitude:"27deg 15min 45.2sec S",verbatimLongitude:"18deg 32min 53.7sec E",decimalLatitude:-27.262555555555554,decimalLongitude:18.54825},{verbatimCoordinates:"-23.3245° S / 28.2344° E",verbatimLatitude:"-23.3245° S",verbatimLongitude:"28.2344° E",decimalLatitude:-23.3245,decimalLongitude:28.2344},{verbatimCoordinates:"40° 26.7717 -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"27.15.45S 18.32.53E",verbatimLatitude:"27.15.45S",verbatimLongitude:"18.32.53E",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"-27.15.45 18.32.53",verbatimLatitude:"-27.15.45",verbatimLongitude:"18.32.53",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"27.15.45.2S 18.32.53.4E",verbatimLatitude:"27.15.45.2S",verbatimLongitude:"18.32.53.4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"27.15.45,2S 18.32.53,4E",verbatimLatitude:"27.15.45,2S",verbatimLongitude:"18.32.53,4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"S23.43563 ° E22.45634 °",verbatimLatitude:"S23.43563 °",verbatimLongitude:"E22.45634 °",decimalLatitude:-23.43563,decimalLongitude:22.45634},{verbatimCoordinates:"27,71372° S 23,07771° E",verbatimLatitude:"27,71372° S",verbatimLongitude:"23,07771° E",decimalLatitude:-27.71372,decimalLongitude:23.07771},{verbatimCoordinates:"27.45.34 S 23.23.23 E",verbatimLatitude:"27.45.34 S",verbatimLongitude:"23.23.23 E",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"S 27.45.34 E 23.23.23",verbatimLatitude:"S 27.45.34",verbatimLongitude:"E 23.23.23",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"53 16.3863,4 52.8171",verbatimLatitude:"53 16.3863",verbatimLongitude:"4 52.8171",decimalLatitude:53.273105,decimalLongitude:4.88029},{verbatimCoordinates:"50 8.2914,-5 2.4447",verbatimLatitude:"50 8.2914",verbatimLongitude:"-5 2.4447",decimalLatitude:50.13819,decimalLongitude:-5.040745},{verbatimCoordinates:"N 48° 30,6410', E 18° 57,4583'",verbatimLatitude:"N 48° 30,6410'",verbatimLongitude:"E 18° 57,4583'",decimalLatitude:48.51068,decimalLongitude:18.95764},{verbatimCoordinates:"1.23456, 18.33453",verbatimLatitude:"1.23456",verbatimLongitude:"18.33453",decimalLatitude:1.23456,decimalLongitude:18.33453}];function wi(){const i=[];return $i.forEach(e=>{e.decimalLatitude?i.push(e):i.push({...e,...Ei})}),[...i,..._i,...Li]}const Si=wi();xe.formats=Si.map(i=>i.verbatimCoordinates);const Mi=xe;/**
130
+ `,c.MaptilerGeocodeSearchIconElement=_i([z("maptiler-geocode-search-icon")],c.MaptilerGeocodeSearchIconElement);const Li=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i,ut=/^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/,pt=/^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i,mt=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i,ft=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i,vt=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;function wi(i){if(!["DMS","DM","DD"].includes(i))throw new Error("invalid format specified");if(this.decimalCoordinates&&this.decimalCoordinates.trim()){const e=this.decimalCoordinates.split(",").map(m=>Number(m.trim())),t=Number(e[0]),s=Number(e[1]),r=Math.abs(t),o=Math.abs(s),a=t>0?"N":"S",n=s>0?"E":"W";let l;i=="DD"&&(l=`${r}° ${a}, ${o}° ${n}`);const g=Math.floor(r),v=Math.floor(o),p=(r-g)*60,b=(o-v)*60;if(i=="DM"){let m=gt(p,3).toFixed(3).padStart(6,"0"),y=gt(b,3).toFixed(3).padStart(6,"0");m.endsWith(".000")&&y.endsWith(".000")&&(m=m.replace(/\.000$/,""),y=y.replace(/\.000$/,"")),l=`${g}° ${m}' ${a}, ${v}° ${y}' ${n}`}if(i=="DMS"){const m=Math.floor(p),y=Math.floor(b);let L=((p-m)*60).toFixed(1).padStart(4,"0"),A=((b-y)*60).toFixed(1).padStart(4,"0");const E=m.toString().padStart(2,"0"),T=y.toString().padStart(2,"0");L.endsWith(".0")&&A.endsWith(".0")&&(L=L.replace(/\.0$/,""),A=A.replace(/\.0$/,"")),l=`${g}° ${E}' ${L}" ${a}, ${v}° ${T}' ${A}" ${n}`}return l}else throw new Error("no decimal coordinates to convert")}function gt(i,e){const t=Math.pow(10,e);return Math.round((i+Number.EPSILON)*t)/t}function Ne(i,e){e||(e=5),i=i.replace(/\s+/g," ").trim();let t=null,s=null,r="",o="",a=null,n=[],l=!1;if(Li.test(i))throw new Error("invalid coordinate value");if(ut.test(i))if(n=ut.exec(i),l=re(n),l)t=Math.abs(n[1])+n[2]/60,Number(n[1])<0&&(t*=-1),s=Math.abs(n[3])+n[4]/60,Number(n[3])<0&&(s*=-1),a="DM";else throw new Error("invalid coordinate format");else if(pt.test(i))if(n=pt.exec(i),l=re(n),l){if(t=n[2],s=n[6],t.includes(",")&&(t=t.replace(",",".")),s.includes(",")&&(s=s.replace(",",".")),a="DD",Number(Math.round(t))==Number(t))throw new Error("integer only coordinate provided");if(Number(Math.round(s))==Number(s))throw new Error("integer only coordinate provided");n[1]?(r=n[1],o=n[5]):n[4]&&(r=n[4],o=n[8])}else throw new Error("invalid decimal coordinate format");else if(mt.test(i))if(n=mt.exec(i),l=re(n),l)t=Math.abs(parseInt(n[2])),n[4]&&(t+=n[4]/60,a="DM"),n[6]&&(t+=n[6].replace(",",".")/3600,a="DMS"),parseInt(n[2])<0&&(t=-1*t),s=Math.abs(parseInt(n[9])),n[11]&&(s+=n[11]/60),n[13]&&(s+=n[13].replace(",",".")/3600),parseInt(n[9])<0&&(s=-1*s),n[1]?(r=n[1],o=n[8]):n[7]&&(r=n[7],o=n[14]);else throw new Error("invalid DMS coordinates format");else if(ft.test(i))if(n=ft.exec(i),l=re(n),l)t=Math.abs(parseInt(n[2])),n[4]&&(t+=n[4]/60,a="DM"),n[6]&&(t+=n[6]/3600,a="DMS"),parseInt(n[2])<0&&(t=-1*t),s=Math.abs(parseInt(n[10])),n[12]&&(s+=n[12]/60),n[14]&&(s+=n[14]/3600),parseInt(n[10])<0&&(s=-1*s),n[1]?(r=n[1],o=n[9]):n[8]&&(r=n[8],o=n[16]);else throw new Error("invalid DMS coordinates format");else if(vt.test(i)){if(n=vt.exec(i),l=re(n),n.filter(g=>g).length<=5)throw new Error("invalid coordinates format");if(l)t=Math.abs(parseInt(n[2])),n[4]&&(t+=n[4].replace(",",".")/60,a="DM"),n[6]&&(t+=n[6].replace(",",".")/3600,a="DMS"),parseInt(n[2])<0&&(t=-1*t),s=Math.abs(parseInt(n[10])),n[12]&&(s+=n[12].replace(",",".")/60),n[14]&&(s+=n[14].replace(",",".")/3600),parseInt(n[10])<0&&(s=-1*s),n[1]?(r=n[1],o=n[9]):n[8]&&(r=n[8],o=n[16]);else throw new Error("invalid coordinates format")}if(l){if(Math.abs(s)>=180)throw new Error("invalid longitude value");if(Math.abs(t)>=90)throw new Error("invalid latitude value");if(r&&!o||!r&&o)throw new Error("invalid coordinates value");if(r&&r==o)throw new Error("invalid coordinates format");t.toString().includes(",")&&(t=t.replace(",",".")),s.toString().includes(",")&&(s=s.replace(",","."));let g=/S|SOUTH/i;g.test(r)&&t>0&&(t=-1*t),g=/W|WEST/i,g.test(o)&&s>0&&(s=-1*s);const v=n[0].trim();let p,b;const m=/[,/;\u0020]/g,y=v.match(m);if(y==null){const E=Math.floor(i.length/2);p=v.substring(0,E).trim(),b=v.substring(E).trim()}else{let E;y.length%2==1?E=Math.floor(y.length/2):E=y.length/2-1;let T=0;if(E==0)T=v.indexOf(y[0]),p=v.substring(0,T).trim(),b=v.substring(T+1).trim();else{let Ke=0,Bt=0;for(;Ke<=E;)T=v.indexOf(y[Ke],Bt),Bt=T+1,Ke++;p=v.substring(0,T).trim(),b=v.substring(T+1).trim()}}const L=p.split(".");if(L.length==2&&L[1]==0&&L[1].length!=2)throw new Error("invalid coordinates format");const A=b.split(".");if(A.length==2&&A[1]==0&&A[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(p)||/^\d+$/.test(b))throw new Error("degree only coordinate/s provided");return t=Number(Number(t).toFixed(e)),s=Number(Number(s).toFixed(e)),Object.freeze({verbatimCoordinates:v,verbatimLatitude:p,verbatimLongitude:b,decimalLatitude:t,decimalLongitude:s,decimalCoordinates:`${t},${s}`,originalFormat:a,closeEnough:Si,toCoordinateFormat:wi})}else throw new Error("coordinates pattern match failed")}function re(i){if(!isNaN(i[0]))return!1;const e=[...i];if(e.shift(),e.length%2>0)return!1;const t=/^[-+]?\d+([\.,]\d+)?$/,s=/[eastsouthnorthwest]+/i,r=e.length/2;for(let o=0;o<r;o++){const a=e[o],n=e[o+r],l=t.test(a)&&t.test(n),g=s.test(a)&&s.test(n),v=a==n;if(!(a==null&&n==null)){if(a==null||n==null)return!1;if(l||g||v)continue;return!1}}return!0}function bt(i,e){const t=Math.abs(i-e);return Number(t.toFixed(6))<=1e-5}function Si(i){if(!i)throw new Error("coords must be provided");if(i.includes(",")){const e=i.split(",");if(Number(e[0])==NaN||Number(e[1])==NaN)throw new Error("coords are not valid decimals");return bt(this.decimalLatitude,Number(e[0]))&&bt(this.decimalLongitude,e[1])}else throw new Error("coords being tested must be separated by a comma")}const Mi=Object.freeze({DMS:"DMS",DM:"DM",DD:"DD"});Ne.to=Mi;const Ai=[{verbatimCoordinates:"40.123, -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:'40° 7´ 22.8" N 74° 7´ 22.8" W',verbatimLatitude:'40° 7´ 22.8" N',verbatimLongitude:'74° 7´ 22.8" W'},{verbatimCoordinates:"40° 7.38’ , -74° 7.38’",verbatimLatitude:"40° 7.38’",verbatimLongitude:"-74° 7.38’"},{verbatimCoordinates:"N40°7’22.8’’, W74°7’22.8’’",verbatimLatitude:"N40°7’22.8’’",verbatimLongitude:"W74°7’22.8’’"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:`40°7'22.8"N, 74°7'22.8"W`,verbatimLatitude:`40°7'22.8"N`,verbatimLongitude:`74°7'22.8"W`},{verbatimCoordinates:"40 7 22.8, -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"},{verbatimCoordinates:"40.123 -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123°,-74.123°",verbatimLatitude:"40.123°",verbatimLongitude:"-74.123°"},{verbatimCoordinates:"40.123N74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"4007.38N7407.38W",verbatimLatitude:"4007.38N",verbatimLongitude:"7407.38W"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:"400722.8N740722.8W",verbatimLatitude:"400722.8N",verbatimLongitude:"740722.8W"},{verbatimCoordinates:"N 40 7.38 W 74 7.38",verbatimLatitude:"N 40 7.38",verbatimLongitude:"W 74 7.38"},{verbatimCoordinates:"40:7:22.8N 74:7:22.8W",verbatimLatitude:"40:7:22.8N",verbatimLongitude:"74:7:22.8W"},{verbatimCoordinates:"40:7:23N,74:7:23W",verbatimLatitude:"40:7:23N",verbatimLongitude:"74:7:23W",decimalLatitude:40.1230555555,decimalLongitude:-74.1230555555},{verbatimCoordinates:'40°7’23"N 74°7’23"W',verbatimLatitude:'40°7’23"N',verbatimLongitude:'74°7’23"W',decimalLatitude:40.1230555555,decimalLongitude:-74.12305555555555},{verbatimCoordinates:'40°7’23"S 74°7’23"E',verbatimLatitude:'40°7’23"S',verbatimLongitude:'74°7’23"E',decimalLatitude:-40.1230555555,decimalLongitude:74.12305555555555},{verbatimCoordinates:'40°7’23" -74°7’23"',verbatimLatitude:'40°7’23"',verbatimLongitude:'-74°7’23"',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:'40d 7’ 23" N 74d 7’ 23" W',verbatimLatitude:'40d 7’ 23" N',verbatimLongitude:'74d 7’ 23" W',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:"40.123N 74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40 7 22.8; -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"}],Ci={decimalLatitude:40.123,decimalLongitude:-74.123},xi=[{verbatimCoordinates:`50°4'17.698"south, 14°24'2.826"east`,verbatimLatitude:`50°4'17.698"south`,verbatimLongitude:`14°24'2.826"east`,decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"50d4m17.698S 14d24m2.826E",verbatimLatitude:"50d4m17.698S",verbatimLongitude:"14d24m2.826E",decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"40:26:46N,79:56:55W",verbatimLatitude:"40:26:46N",verbatimLongitude:"79:56:55W",decimalLatitude:40.44611111111111,decimalLongitude:-79.9486111111111},{verbatimCoordinates:"40:26:46.302N 79:56:55.903W",verbatimLatitude:"40:26:46.302N",verbatimLongitude:"79:56:55.903W",decimalLatitude:40.446195,decimalLongitude:-79.94886194444445},{verbatimCoordinates:"40°26′47″N 79°58′36″W",verbatimLatitude:"40°26′47″N",verbatimLongitude:"79°58′36″W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40d 26′ 47″ N 79d 58′ 36″ W",verbatimLatitude:"40d 26′ 47″ N",verbatimLongitude:"79d 58′ 36″ W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40.446195N 79.948862W",verbatimLatitude:"40.446195N",verbatimLongitude:"79.948862W",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40,446195° 79,948862°",verbatimLatitude:"40,446195°",verbatimLongitude:"79,948862°",decimalLatitude:40.446195,decimalLongitude:79.948862},{verbatimCoordinates:"40° 26.7717, -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.446195, -79.948862",verbatimLatitude:"40.446195",verbatimLongitude:"-79.948862",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.123256; -74.123256",verbatimLatitude:"40.123256",verbatimLongitude:"-74.123256",decimalLatitude:40.123256,decimalLongitude:-74.123256},{verbatimCoordinates:"18°24S 22°45E",verbatimLatitude:"18°24S",verbatimLongitude:"22°45E",decimalLatitude:-18.4,decimalLongitude:22.75}],Ii=[{verbatimCoordinates:"10.432342S 10.6345345E",verbatimLatitude:"10.432342S",verbatimLongitude:"10.6345345E",decimalLatitude:-10.432342,decimalLongitude:10.6345345},{verbatimCoordinates:"10.00S 10.00E",verbatimLatitude:"10.00S",verbatimLongitude:"10.00E",decimalLatitude:-10,decimalLongitude:10},{verbatimCoordinates:"00.00S 01.00E",verbatimLatitude:"00.00S",verbatimLongitude:"01.00E",decimalLatitude:0,decimalLongitude:1},{verbatimCoordinates:"18.24S 22.45E",verbatimLatitude:"18.24S",verbatimLongitude:"22.45E",decimalLatitude:-18.4,decimalLongitude:22.75},{verbatimCoordinates:"27deg 15min 45.2sec S 18deg 32min 53.7sec E",verbatimLatitude:"27deg 15min 45.2sec S",verbatimLongitude:"18deg 32min 53.7sec E",decimalLatitude:-27.262555555555554,decimalLongitude:18.54825},{verbatimCoordinates:"-23.3245° S / 28.2344° E",verbatimLatitude:"-23.3245° S",verbatimLongitude:"28.2344° E",decimalLatitude:-23.3245,decimalLongitude:28.2344},{verbatimCoordinates:"40° 26.7717 -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"27.15.45S 18.32.53E",verbatimLatitude:"27.15.45S",verbatimLongitude:"18.32.53E",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"-27.15.45 18.32.53",verbatimLatitude:"-27.15.45",verbatimLongitude:"18.32.53",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"27.15.45.2S 18.32.53.4E",verbatimLatitude:"27.15.45.2S",verbatimLongitude:"18.32.53.4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"27.15.45,2S 18.32.53,4E",verbatimLatitude:"27.15.45,2S",verbatimLongitude:"18.32.53,4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"S23.43563 ° E22.45634 °",verbatimLatitude:"S23.43563 °",verbatimLongitude:"E22.45634 °",decimalLatitude:-23.43563,decimalLongitude:22.45634},{verbatimCoordinates:"27,71372° S 23,07771° E",verbatimLatitude:"27,71372° S",verbatimLongitude:"23,07771° E",decimalLatitude:-27.71372,decimalLongitude:23.07771},{verbatimCoordinates:"27.45.34 S 23.23.23 E",verbatimLatitude:"27.45.34 S",verbatimLongitude:"23.23.23 E",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"S 27.45.34 E 23.23.23",verbatimLatitude:"S 27.45.34",verbatimLongitude:"E 23.23.23",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"53 16.3863,4 52.8171",verbatimLatitude:"53 16.3863",verbatimLongitude:"4 52.8171",decimalLatitude:53.273105,decimalLongitude:4.88029},{verbatimCoordinates:"50 8.2914,-5 2.4447",verbatimLatitude:"50 8.2914",verbatimLongitude:"-5 2.4447",decimalLatitude:50.13819,decimalLongitude:-5.040745},{verbatimCoordinates:"N 48° 30,6410', E 18° 57,4583'",verbatimLatitude:"N 48° 30,6410'",verbatimLongitude:"E 18° 57,4583'",decimalLatitude:48.51068,decimalLongitude:18.95764},{verbatimCoordinates:"1.23456, 18.33453",verbatimLatitude:"1.23456",verbatimLongitude:"18.33453",decimalLatitude:1.23456,decimalLongitude:18.33453}];function Ti(){const i=[];return Ai.forEach(e=>{e.decimalLatitude?i.push(e):i.push({...e,...Ci})}),[...i,...xi,...Ii]}const Ni=Ti();Ne.formats=Ni.map(i=>i.verbatimCoordinates);const Oi=Ne;/**
131
131
  * @license
132
132
  * Copyright 2017 Google LLC
133
133
  * SPDX-License-Identifier: BSD-3-Clause
134
- */const Ce={ATTRIBUTE:1,CHILD:2},Ie=i=>(...e)=>({_$litDirective$:i,values:e});let Te=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,s){this._$Ct=e,this._$AM=t,this._$Ci=s}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/**
134
+ */const Oe={ATTRIBUTE:1,CHILD:2},ke=i=>(...e)=>({_$litDirective$:i,values:e});let Ge=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,s){this._$Ct=e,this._$AM=t,this._$Ci=s}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/**
135
135
  * @license
136
136
  * Copyright 2018 Google LLC
137
137
  * SPDX-License-Identifier: BSD-3-Clause
138
- */const me=Ie(class extends Te{constructor(i){if(super(i),i.type!==Ce.ATTRIBUTE||i.name!=="class"||i.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter((e=>i[e])).join(" ")+" "}update(i,[e]){if(this.st===void 0){this.st=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter((s=>s!==""))));for(const s in e)e[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(e)}const t=i.element.classList;for(const s of this.st)s in e||(t.remove(s),this.st.delete(s));for(const s in e){const r=!!e[s];r===this.st.has(s)||this.nt?.has(s)||(r?(t.add(s),this.st.add(s)):(t.remove(s),this.st.delete(s)))}return G}});/**
138
+ */const be=ke(class extends Ge{constructor(i){if(super(i),i.type!==Oe.ATTRIBUTE||i.name!=="class"||i.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter((e=>i[e])).join(" ")+" "}update(i,[e]){if(this.st===void 0){this.st=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter((s=>s!==""))));for(const s in e)e[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(e)}const t=i.element.classList;for(const s of this.st)s in e||(t.remove(s),this.st.delete(s));for(const s in e){const r=!!e[s];r===this.st.has(s)||this.nt?.has(s)||(r?(t.add(s),this.st.add(s)):(t.remove(s),this.st.delete(s)))}return U}});/**
139
139
  * @license
140
140
  * Copyright 2020 Google LLC
141
141
  * SPDX-License-Identifier: BSD-3-Clause
142
- */const{I:Ai}=Xt,mt=()=>document.createComment(""),se=(i,e,t)=>{const s=i._$AA.parentNode,r=e===void 0?i._$AB:e._$AA;if(t===void 0){const o=s.insertBefore(mt(),r),a=s.insertBefore(mt(),r);t=new Ai(o,a,i,i.options)}else{const o=t._$AB.nextSibling,a=t._$AM,n=a!==i;if(n){let l;t._$AQ?.(i),t._$AM=i,t._$AP!==void 0&&(l=i._$AU)!==a._$AU&&t._$AP(l)}if(o!==r||n){let l=t._$AA;for(;l!==o;){const g=l.nextSibling;s.insertBefore(l,r),l=g}}}return t},j=(i,e,t=i)=>(i._$AI(e,t),i),xi={},Ci=(i,e=xi)=>i._$AH=e,Ii=i=>i._$AH,Ne=i=>{i._$AR(),i._$AA.remove()};/**
142
+ */const{I:ki}=ai,yt=()=>document.createComment(""),oe=(i,e,t)=>{const s=i._$AA.parentNode,r=e===void 0?i._$AB:e._$AA;if(t===void 0){const o=s.insertBefore(yt(),r),a=s.insertBefore(yt(),r);t=new ki(o,a,i,i.options)}else{const o=t._$AB.nextSibling,a=t._$AM,n=a!==i;if(n){let l;t._$AQ?.(i),t._$AM=i,t._$AP!==void 0&&(l=i._$AU)!==a._$AU&&t._$AP(l)}if(o!==r||n){let l=t._$AA;for(;l!==o;){const g=l.nextSibling;s.insertBefore(l,r),l=g}}}return t},V=(i,e,t=i)=>(i._$AI(e,t),i),Gi={},Ui=(i,e=Gi)=>i._$AH=e,Wi=i=>i._$AH,Ue=i=>{i._$AR(),i._$AA.remove()};/**
143
143
  * @license
144
144
  * Copyright 2017 Google LLC
145
145
  * SPDX-License-Identifier: BSD-3-Clause
146
- */const ft=(i,e,t)=>{const s=new Map;for(let r=e;r<=t;r++)s.set(i[r],r);return s},Ti=Ie(class extends Te{constructor(i){if(super(i),i.type!==Ce.CHILD)throw Error("repeat() can only be used in text expressions")}dt(i,e,t){let s;t===void 0?t=e:e!==void 0&&(s=e);const r=[],o=[];let a=0;for(const n of i)r[a]=s?s(n,a):a,o[a]=t(n,a),a++;return{values:o,keys:r}}render(i,e,t){return this.dt(i,e,t).values}update(i,[e,t,s]){const r=Ii(i),{values:o,keys:a}=this.dt(e,t,s);if(!Array.isArray(r))return this.ut=a,o;const n=this.ut??=[],l=[];let g,v,d=0,b=r.length-1,m=0,y=o.length-1;for(;d<=b&&m<=y;)if(r[d]===null)d++;else if(r[b]===null)b--;else if(n[d]===a[m])l[m]=j(r[d],o[m]),d++,m++;else if(n[b]===a[y])l[y]=j(r[b],o[y]),b--,y--;else if(n[d]===a[y])l[y]=j(r[d],o[y]),se(i,l[y+1],r[d]),d++,y--;else if(n[b]===a[m])l[m]=j(r[b],o[m]),se(i,r[d],r[b]),b--,m++;else if(g===void 0&&(g=ft(a,m,y),v=ft(n,d,b)),g.has(n[d]))if(g.has(n[b])){const L=v.get(a[m]),A=L!==void 0?r[L]:null;if(A===null){const E=se(i,r[d]);j(E,o[m]),l[m]=E}else l[m]=j(A,o[m]),se(i,r[d],A),r[L]=null;m++}else Ne(r[b]),b--;else Ne(r[d]),d++;for(;m<=y;){const L=se(i,l[y+1]);j(L,o[m]),l[m++]=L}for(;d<=b;){const L=r[d++];L!==null&&Ne(L)}return this.ut=a,Ci(i,l),G}});function Ni(i,e,t){const s=e[1],r=e[0],o=s-r;return i===s&&t?i:((i-r)%o+o)%o+r}let re;async function ki(i,e,t){for(const s of e??[])if(!(i&&(s.minZoom!=null&&s.minZoom>i[0]||s.maxZoom!=null&&s.maxZoom<i[0]))){if(s.type==="fixed")return s.coordinates.join(",");if(s.type==="client-geolocation")if(re&&s.cachedLocationExpiry&&re.time+s.cachedLocationExpiry>Date.now()){if(re.coords)return re.coords}else{let r;try{return r=await new Promise((o,a)=>{t.signal.addEventListener("abort",()=>{a(Error("aborted"))}),navigator.geolocation.getCurrentPosition(n=>{o([n.coords.longitude,n.coords.latitude].map(l=>l.toFixed(6)).join(","))},n=>{a(n)},s)}),r}catch{}finally{s.cachedLocationExpiry&&(re={time:Date.now(),coords:r})}if(t.signal.aborted)return}if(s.type==="server-geolocation")return"ip";if(i&&s.type==="map-center")return i[1].toFixed(6)+","+i[2].toFixed(6)}}/**
146
+ */const $t=(i,e,t)=>{const s=new Map;for(let r=e;r<=t;r++)s.set(i[r],r);return s},Pi=ke(class extends Ge{constructor(i){if(super(i),i.type!==Oe.CHILD)throw Error("repeat() can only be used in text expressions")}dt(i,e,t){let s;t===void 0?t=e:e!==void 0&&(s=e);const r=[],o=[];let a=0;for(const n of i)r[a]=s?s(n,a):a,o[a]=t(n,a),a++;return{values:o,keys:r}}render(i,e,t){return this.dt(i,e,t).values}update(i,[e,t,s]){const r=Wi(i),{values:o,keys:a}=this.dt(e,t,s);if(!Array.isArray(r))return this.ut=a,o;const n=this.ut??=[],l=[];let g,v,p=0,b=r.length-1,m=0,y=o.length-1;for(;p<=b&&m<=y;)if(r[p]===null)p++;else if(r[b]===null)b--;else if(n[p]===a[m])l[m]=V(r[p],o[m]),p++,m++;else if(n[b]===a[y])l[y]=V(r[b],o[y]),b--,y--;else if(n[p]===a[y])l[y]=V(r[p],o[y]),oe(i,l[y+1],r[p]),p++,y--;else if(n[b]===a[m])l[m]=V(r[b],o[m]),oe(i,r[p],r[b]),b--,m++;else if(g===void 0&&(g=$t(a,m,y),v=$t(n,p,b)),g.has(n[p]))if(g.has(n[b])){const L=v.get(a[m]),A=L!==void 0?r[L]:null;if(A===null){const E=oe(i,r[p]);V(E,o[m]),l[m]=E}else l[m]=V(A,o[m]),oe(i,r[p],A),r[L]=null;m++}else Ue(r[b]),b--;else Ue(r[p]),p++;for(;m<=y;){const L=oe(i,l[y+1]);V(L,o[m]),l[m++]=L}for(;p<=b;){const L=r[p++];L!==null&&Ue(L)}return this.ut=a,Ui(i,l),U}});function Fi(i,e,t){const s=e[1],r=e[0],o=s-r;return i===s&&t?i:((i-r)%o+o)%o+r}let ae;async function Ri(i,e,t){for(const s of e??[])if(!(i&&(s.minZoom!=null&&s.minZoom>i[0]||s.maxZoom!=null&&s.maxZoom<i[0]))){if(s.type==="fixed")return s.coordinates.join(",");if(s.type==="client-geolocation")if(ae&&s.cachedLocationExpiry&&ae.time+s.cachedLocationExpiry>Date.now()){if(ae.coords)return ae.coords}else{let r;try{return r=await new Promise((o,a)=>{t.signal.addEventListener("abort",()=>{a(Error("aborted"))}),navigator.geolocation.getCurrentPosition(n=>{o([n.coords.longitude,n.coords.latitude].map(l=>l.toFixed(6)).join(","))},n=>{a(n)},s)}),r}catch{}finally{s.cachedLocationExpiry&&(ae={time:Date.now(),coords:r})}if(t.signal.aborted)return}if(s.type==="server-geolocation")return"ip";if(i&&s.type==="map-center")return i[1].toFixed(6)+","+i[2].toFixed(6)}}/**
147
147
  * @license
148
148
  * Copyright 2018 Google LLC
149
149
  * SPDX-License-Identifier: BSD-3-Clause
150
- */const vt="important",Oi=" !"+vt,Gi=Ie(class extends Te{constructor(i){if(super(i),i.type!==Ce.ATTRIBUTE||i.name!=="style"||i.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(i){return Object.keys(i).reduce(((e,t)=>{const s=i[t];return s==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(i,[e]){const{style:t}=i.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const s of this.ft)e[s]==null&&(this.ft.delete(s),s.includes("-")?t.removeProperty(s):t[s]=null);for(const s in e){const r=e[s];if(r!=null){this.ft.add(s);const o=typeof r=="string"&&r.endsWith(Oi);s.includes("-")||o?t.setProperty(s,o?r.slice(0,-11):r,o?vt:""):t[s]=r}}return G}}),Ui=".sprite-icon{align-self:center;justify-self:center;opacity:.75;background-repeat:no-repeat}li{text-align:left;cursor:default;display:grid;grid-template-columns:40px 1fr;color:var(--color-text);padding:8px 0;font-size:14px;line-height:18px;min-width:fit-content;outline:0}li:first-child{padding-top:10px}li:last-child{padding-bottom:10px}li.picked{background-color:#e7edff}li.picked .secondary{color:#96a4c7;padding-left:4px}li.picked .line2{color:#96a4c7}li.selected{background-color:#f3f6ff;animation:backAndForth 5s linear infinite}li.selected .primary{color:#2b8bfb}li.selected .secondary{color:#a2adc7;padding-left:4px}li.selected .line2{color:#a2adc7}li>img{align-self:center;justify-self:center;opacity:.75}.texts{padding:0 17px 0 0}.texts>*{white-space:nowrap;display:block;min-width:fit-content}.primary{font-weight:600}.secondary{color:#aeb6c7;padding-left:4px}.line2{color:#aeb6c7}@keyframes backAndForth{0%{transform:translate(0)}10%{transform:translate(0)}45%{transform:translate(calc(-100% + 270px))}55%{transform:translate(calc(-100% + 270px))}90%{transform:translate(0)}to{transform:translate(0)}}";var Wi=Object.defineProperty,Pi=Object.getOwnPropertyDescriptor,gt=i=>{throw TypeError(i)},O=(i,e,t,s)=>{for(var r=s>1?void 0:s?Pi(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=(s?a(e,t,r):a(r))||r);return s&&r&&Wi(e,t,r),r},bt=(i,e,t)=>e.has(i)||gt("Cannot "+t),_=(i,e,t)=>(bt(i,e,"read from private field"),t?t.call(i):e.get(i)),Fi=(i,e,t)=>e.has(i)?gt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),K=(i,e,t)=>(bt(i,e,"access private method"),t),$,fe,oe,M,yt,$t,ke,Oe;const Et=typeof devicePixelRatio>"u"||devicePixelRatio>1.25,_t=Et?"@2x":"",Q=Et?2:1;let z,Lt,I=class extends k{constructor(){super(...arguments),Fi(this,$),this.itemStyle="default",this.showPlaceType="if-needed",this.missingIconsCache=new Set,this.iconsBaseUrl="",this.index=0}willUpdate(i){i.has("feature")&&_(this,$,fe)&&(this.index=_(this,$,fe).length,K(this,$,ke).call(this))}render(){return S`
150
+ */const Et="important",Di=" !"+Et,Bi=ke(class extends Ge{constructor(i){if(super(i),i.type!==Oe.ATTRIBUTE||i.name!=="style"||i.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(i){return Object.keys(i).reduce(((e,t)=>{const s=i[t];return s==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(i,[e]){const{style:t}=i.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const s of this.ft)e[s]==null&&(this.ft.delete(s),s.includes("-")?t.removeProperty(s):t[s]=null);for(const s in e){const r=e[s];if(r!=null){this.ft.add(s);const o=typeof r=="string"&&r.endsWith(Di);s.includes("-")||o?t.setProperty(s,o?r.slice(0,-11):r,o?Et:""):t[s]=r}}return U}}),Hi=".sprite-icon{align-self:center;justify-self:center;opacity:var(--icon-items-opacity, .75);background-repeat:no-repeat}li{text-align:left;cursor:default;display:grid;grid-template-columns:40px 1fr;color:var(--color-items, #444952);padding:8px 0;font-size:var(--font-size-items, 14px);line-height:1.3;min-width:fit-content;outline:0}li:first-child{padding-top:10px}li:last-child{padding-bottom:10px}li.picked{background-color:var(--color-items-picked-bg, #e7edff)}li.picked .secondary,li.picked .line2{color:var(--color-items-picked-secondary, #96a4c7)}li.selected{background-color:var(--color-items-selected-bg, #f3f6ff);animation:backAndForth 5s linear infinite}li.selected .primary{color:var(--color-items-selected, #2b8bfb)}li.selected .secondary,li.selected .line2{color:var(--color-items-selected-secondary, #a2adc7)}li>img{align-self:center;justify-self:center;opacity:var(--icon-opacity, .75)}.texts{padding:0 17px 0 0}.texts>*{white-space:nowrap;display:block;min-width:fit-content}.primary{font-weight:600}.secondary{color:var(--color-items-secondary, #aeb6c7);padding-left:4px}.line2{color:var(--color-items-secondary, #aeb6c7)}@keyframes backAndForth{0%{transform:translate(0)}10%{transform:translate(0)}45%{transform:translate(calc(-100% + 270px))}55%{transform:translate(calc(-100% + 270px))}90%{transform:translate(0)}to{transform:translate(0)}}";var ji=Object.defineProperty,zi=Object.getOwnPropertyDescriptor,_t=i=>{throw TypeError(i)},G=(i,e,t,s)=>{for(var r=s>1?void 0:s?zi(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=(s?a(e,t,r):a(r))||r);return s&&r&&ji(e,t,r),r},Lt=(i,e,t)=>e.has(i)||_t("Cannot "+t),_=(i,e,t)=>(Lt(i,e,"read from private field"),t?t.call(i):e.get(i)),Vi=(i,e,t)=>e.has(i)?_t("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),J=(i,e,t)=>(Lt(i,e,"access private method"),t),$,ne,le,M,wt,St,We,Pe;const Mt=typeof devicePixelRatio>"u"||devicePixelRatio>1.25,At=Mt?"@2x":"",X=Mt?2:1;let q,Ct,I=class extends N{constructor(){super(...arguments),Vi(this,$),this.itemStyle="default",this.showPlaceType="if-needed",this.missingIconsCache=new Set,this.iconsBaseUrl="",this.index=0}willUpdate(i){i.has("feature")&&_(this,$,ne)&&(this.index=_(this,$,ne).length,J(this,$,We).call(this))}render(){return S`
151
151
  <li
152
152
  tabindex="-1"
153
153
  role="option"
@@ -156,84 +156,104 @@
156
156
  class=${this.itemStyle}
157
157
  @click=${()=>this.dispatchEvent(new CustomEvent("select"))}
158
158
  >
159
- ${z&&this.spriteIcon?S`
159
+ ${q&&this.spriteIcon?S`
160
160
  <div
161
161
  class="sprite-icon"
162
- style=${Gi({width:`${this.spriteIcon.width/Q}px`,height:`${this.spriteIcon.height/Q}px`,backgroundImage:`url(${this.iconsBaseUrl}sprite${_t}.png)`,backgroundPosition:`-${this.spriteIcon.x/Q}px -${this.spriteIcon.y/Q}px`,backgroundSize:`${z.width/Q}px ${z.height/Q}px`})}
162
+ style=${Bi({width:`${this.spriteIcon.width/X}px`,height:`${this.spriteIcon.height/X}px`,backgroundImage:`url(${this.iconsBaseUrl}sprite${At}.png)`,backgroundPosition:`-${this.spriteIcon.x/X}px -${this.spriteIcon.y/X}px`,backgroundSize:`${q.width/X}px ${q.height/X}px`})}
163
163
  title=${_(this,$,M)}
164
164
  />
165
- `:this.imageUrl?S` <img src=${this.imageUrl} alt=${this.category} title=${_(this,$,M)} @error=${K(this,$,$t)} />`:this.feature?.address?S` <img src=${this.iconsBaseUrl+"housenumber.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `:this.feature?.id.startsWith("road.")?S` <img src=${this.iconsBaseUrl+"road.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `:this.feature?.id.startsWith("address.")?S` <img src=${this.iconsBaseUrl+"street.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `:this.feature?.id.startsWith("postal_code.")?S` <img src=${this.iconsBaseUrl+"postal_code.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `:this.feature?.id.startsWith("poi.")?S` <img src=${this.iconsBaseUrl+"poi.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `:_(this,$,oe)?S` <img src=${this.iconsBaseUrl+"reverse.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `:S` <img src=${this.iconsBaseUrl+"area.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `}
165
+ `:this.imageUrl?S` <img src=${this.imageUrl} alt=${this.category} title=${_(this,$,M)} @error=${J(this,$,St)} />`:this.feature?.address?S` <img src=${this.iconsBaseUrl+"housenumber.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `:this.feature?.id.startsWith("road.")?S` <img src=${this.iconsBaseUrl+"road.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `:this.feature?.id.startsWith("address.")?S` <img src=${this.iconsBaseUrl+"street.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `:this.feature?.id.startsWith("postal_code.")?S` <img src=${this.iconsBaseUrl+"postal_code.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `:this.feature?.id.startsWith("poi.")?S` <img src=${this.iconsBaseUrl+"poi.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `:_(this,$,le)?S` <img src=${this.iconsBaseUrl+"reverse.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `:S` <img src=${this.iconsBaseUrl+"area.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `}
166
166
 
167
167
  <span class="texts">
168
168
  <span>
169
- <span class="primary"> ${_(this,$,oe)?this.feature?.place_name:this.feature?.place_name.replace(/,.*/,"")} </span>
169
+ <span class="primary"> ${_(this,$,le)?this.feature?.place_name:this.feature?.place_name.replace(/,.*/,"")} </span>
170
170
 
171
- ${this.showPlaceType==="always"||this.showPlaceType!=="never"&&!this.feature?.address&&!this.feature?.id.startsWith("road.")&&!this.feature?.id.startsWith("address.")&&!this.feature?.id.startsWith("postal_code.")&&(!this.feature?.id.startsWith("poi.")||!this.imageUrl)&&!_(this,$,oe)?S` <span class="secondary"> ${_(this,$,M)} </span> `:w}
171
+ ${this.showPlaceType==="always"||this.showPlaceType!=="never"&&!this.feature?.address&&!this.feature?.id.startsWith("road.")&&!this.feature?.id.startsWith("address.")&&!this.feature?.id.startsWith("postal_code.")&&(!this.feature?.id.startsWith("poi.")||!this.imageUrl)&&!_(this,$,le)?S` <span class="secondary"> ${_(this,$,M)} </span> `:w}
172
172
  </span>
173
173
 
174
- <span class="line2"> ${_(this,$,oe)?this.feature?.text:this.feature?.place_name.replace(/[^,]*,?s*/,"")} </span>
174
+ <span class="line2"> ${_(this,$,le)?this.feature?.text:this.feature?.place_name.replace(/[^,]*,?s*/,"")} </span>
175
175
  </span>
176
176
  </li>
177
- `}};$=new WeakSet,fe=function(){return this.feature?.properties?.categories},oe=function(){return this.feature?.place_type[0]==="reverse"},M=function(){return this.feature?.properties?.categories?.join(", ")??this.feature?.place_type_name?.[0]??this.feature?.place_type[0]},yt=function(){Lt??=fetch(`${this.iconsBaseUrl}sprite${_t}.json`).then(i=>i.json()).then(i=>{z=i}).catch(()=>{z=null})},$t=function(){this.imageUrl&&this.missingIconsCache.add(this.imageUrl),K(this,$,ke).call(this)},ke=function(){z!==void 0?K(this,$,Oe).call(this):(K(this,$,yt).call(this),Lt?.then(()=>{K(this,$,Oe).call(this)}))},Oe=function(){do{if(this.index--,this.category=_(this,$,fe)?.[this.index],this.spriteIcon=this.category?z?.icons[this.category]:void 0,this.spriteIcon)break;this.imageUrl=this.category?this.iconsBaseUrl+this.category.replace(/ /g,"_")+".svg":void 0}while(this.index>-1&&(!this.imageUrl||this.missingIconsCache.has(this.imageUrl)))},I.styles=F`
178
- ${_e(Ui)}
179
- `,O([f({type:Object})],I.prototype,"feature",2),O([f({type:String})],I.prototype,"itemStyle",2),O([f({type:String})],I.prototype,"showPlaceType",2),O([f({attribute:!1})],I.prototype,"missingIconsCache",2),O([f({type:String})],I.prototype,"iconsBaseUrl",2),O([x()],I.prototype,"category",2),O([x()],I.prototype,"imageUrl",2),O([x()],I.prototype,"spriteIcon",2),O([x()],I.prototype,"index",2),I=O([B("maptiler-geocoder-feature-item")],I);const Ri="form{font-family:Open Sans,Ubuntu,Helvetica Neue,Arial,Helvetica,sans-serif;position:relative;background-color:#fff;z-index:10;border-radius:4px;margin:0;transition:max-width .25s;box-shadow:0 2px 5px #33335926;--color-text: #444952;--color-icon-button: #444952;pointer-events:all}form,form *,form *:after,form *:before{box-sizing:border-box}form.can-collapse{max-width:29px}form.can-collapse input::placeholder{transition:opacity .25s;opacity:0}form{width:270px;max-width:270px}form:focus-within,form:hover{width:270px;max-width:270px}form input::placeholder,form:focus-within input::placeholder,form:hover input::placeholder{opacity:1}input{font:inherit;font-size:14px;flex-grow:1;min-height:29px;background-color:transparent;color:#444952;white-space:nowrap;overflow:hidden;border:0;margin:0;padding:0}input:focus{color:#444952;outline:0;outline:none;box-shadow:none}ul,div.error,div.no-results{background-color:#fff;border-radius:4px;left:0;list-style:none;margin:0;padding:0;position:absolute;width:100%;top:calc(100% + 6px);overflow:hidden}ul{font-size:14px;line-height:16px;box-shadow:0 5px 10px #33335926}div.error,div.no-results{font:inherit;line-height:18px;font-size:12px;display:flex;gap:16px}div.error{padding:16px;font-weight:600;color:#e25041;background-color:#fbeae8}div.error div{flex-grow:1}div.error maptiler-geocode-fail-icon{flex-shrink:0;width:20px;height:20px}div.error button{flex-shrink:0}div.error button maptiler-geocode-clear-icon{--color-icon-button: #e25041}div.error button:hover maptiler-geocode-clear-icon,div.error button:active maptiler-geocode-clear-icon{--color-icon-button: inherit}div.no-results{padding:14px 24px 14px 16px;font-weight:400;color:#6b7c93;box-shadow:0 5px 10px #33335926}div.no-results maptiler-geocode-fail-icon{margin-top:4px;flex-shrink:0;width:20px;height:20px}ul.options.open-on-top{top:auto;bottom:calc(100% + 6px)}button{padding:0;margin:0;border:0;background-color:transparent;height:auto;width:auto}button:hover{background-color:transparent}button:hover,button:active{--color-icon-button: #2b8bfb}.input-group{display:flex;align-items:stretch;gap:7px;padding-inline:8px;border-radius:4px;overflow:hidden}.input-group:focus-within{outline:#2b8bfb solid 2px}.search-button{flex-shrink:0}.clear-button-container{display:flex;display:none;position:relative;align-items:stretch}.clear-button-container.displayable{display:flex;flex-shrink:0}:host(.maptiler-geocoder):not(:empty){box-shadow:none}:host(.maptiler-geocoder) .input-group{border:white solid 2px}:host(.maptiler-geocoder) .input-group:focus-within{border:#2b8bfb solid 2px;outline:0;outline:none}:host(.maptiler-geocoder) form.can-collapse{max-width:33px}:host(.maptiler-geocoder) form,:host(.maptiler-geocoder) form:focus-within,:host(.maptiler-geocoder) form:hover{width:270px;max-width:270px}:host(.leaflet-geocoder) .input-group{border:white solid 1px}:host(.leaflet-geocoder) form.can-collapse{max-width:30px}";var Di=Object.defineProperty,Hi=Object.getOwnPropertyDescriptor,wt=i=>{throw TypeError(i)},u=(i,e,t,s)=>{for(var r=s>1?void 0:s?Hi(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=(s?a(e,t,r):a(r))||r);return s&&r&&Di(e,t,r),r},Ge=(i,e,t)=>e.has(i)||wt("Cannot "+t),T=(i,e,t)=>(Ge(i,e,"read from private field"),t?t.call(i):e.get(i)),ae=(i,e,t)=>e.has(i)?wt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Ue=(i,e,t,s)=>(Ge(i,e,"write to private field"),e.set(i,t),t),p=(i,e,t)=>(Ge(i,e,"access private method"),t),ve,ne,We,le,h,ge,St,Pe,C,Fe,be,Re,De,P,He,ye,Mt,Be,At,xt,Ct,It,Tt,Nt,kt;c.MaptilerGeocoderElement=class extends k{constructor(){super(...arguments),ae(this,h),this.clearListOnPick=!1,this.clearOnBlur=!1,this.collapsed=!1,this.excludeTypes=!1,this.exhaustiveReverseGeocoding=!1,this.fetchFullGeometryOnPick=!1,this.keepListOpen=!1,this.openListOnTop=!1,this.reverseActive=!1,this.searchValue="",this.selectedItemIndex=-1,this.cachedFeatures=[],this.lastSearchUrl="",this.focused=!1,this.isFeatureListVisible=!1,this.isFeatureListInteractedWith=!1,ae(this,ve,!1),ae(this,ne),ae(this,We,new Set),ae(this,le)}firstUpdated(){Ue(this,ve,!0)}setOptions(e){const t={...e};for(const s of Object.keys(t))Bi.includes(s)||delete t[s];Object.assign(this,t)}setQuery(e){p(this,h,De).call(this,e,{external:!0}),p(this,h,Re).call(this)}submitQuery(e){p(this,h,He).call(this,e,{external:!0})}clearList(){p(this,h,P).call(this),this.picked=void 0,this.selectedItemIndex=-1}focus(e){this.input.focus(e)}blur(){this.input.blur()}addEventListener(e,t,s){super.addEventListener(e,t,s)}removeEventListener(e,t,s){super.removeEventListener(e,t,s)}handleMapChange(e){Ue(this,le,e)}handleMapClick(e){this.reverseActive&&p(this,h,Mt).call(this,e)}willUpdate(e){e.has("error")&&this.error&&console.error("[MapTilerGeocodingControl] Error:",this.error),e.has("enableReverse")&&(this.reverseActive=this.enableReverse==="always"),["picked"].some(t=>e.has(t))&&this.picked&&(this.clearListOnPick&&p(this,h,P).call(this),this.selectedItemIndex=-1),["searchValue","minLength"].some(t=>e.has(t))&&T(this,h,Pe)&&(p(this,h,P).call(this),this.error=void 0),["focused","listIsInteractedWith"].some(t=>e.has(t))&&this.clearOnBlur&&!this.focused&&!this.isFeatureListInteractedWith&&(this.searchValue=""),["selectFirst","listFeatures","selectedItemIndex","picked"].some(t=>e.has(t))&&this.selectFirst!==!1&&this.listFeatures?.length&&this.selectedItemIndex==-1&&!this.picked&&(this.selectedItemIndex=0),["listFeatures","selectedItemIndex"].some(t=>e.has(t))&&p(this,h,C).call(this,"select",{feature:T(this,h,ge)}),["picked"].some(t=>e.has(t))&&this.picked&&this.picked.id!==e.get("picked")?.id&&(this.fetchFullGeometryOnPick&&!this.picked.address&&this.picked.geometry.type==="Point"&&this.picked.place_type[0]!=="reverse"?p(this,h,ye).call(this,this.picked.id,{byId:!0}):Promise.resolve()).then(()=>{p(this,h,C).call(this,"pick",{feature:this.picked})},t=>{t&&typeof t=="object"&&"name"in t&&t.name==="AbortError"||(this.error=t,p(this,h,C).call(this,"pick",{feature:this.picked}))}),["listFeatures","focused","isFeatureListInteractedWith","keepListOpen"].some(t=>e.has(t))&&(this.isFeatureListVisible=!!this.listFeatures?.length&&(this.focused||this.isFeatureListInteractedWith||this.keepListOpen)),["isFeatureListVisible"].some(t=>e.has(t))&&(this.isFeatureListVisible?p(this,h,C).call(this,"featuresshow"):p(this,h,C).call(this,"featureshide")),["reverseActive"].some(t=>e.has(t))&&p(this,h,C).call(this,"reversetoggle",{reverse:this.reverseActive})}render(){return S`
180
- <form @submit=${p(this,h,Fe)} class=${me({"can-collapse":this.collapsed&&this.searchValue===""})}>
181
- <div class="input-group">
182
- <button
183
- class="search-button"
184
- type="button"
185
- @click=${()=>{this.input.focus()}}
186
- >
187
- <maptiler-geocode-search-icon></maptiler-geocode-search-icon>
188
- </button>
177
+ `}};$=new WeakSet,ne=function(){return this.feature?.properties?.categories},le=function(){return this.feature?.place_type[0]==="reverse"},M=function(){return _(this,$,ne)?.join(", ")??this.feature?.place_type_name?.[0]??this.feature?.place_type[0]},wt=function(){Ct??=fetch(`${this.iconsBaseUrl}sprite${At}.json`).then(i=>i.json()).then(i=>{q=i}).catch(()=>{q=null})},St=function(){this.imageUrl&&this.missingIconsCache.add(this.imageUrl),J(this,$,We).call(this)},We=function(){q!==void 0?J(this,$,Pe).call(this):(J(this,$,wt).call(this),Ct?.then(()=>{J(this,$,Pe).call(this)}))},Pe=function(){do{if(this.index--,this.category=_(this,$,ne)?.[this.index],this.spriteIcon=this.category?q?.icons[this.category]:void 0,this.spriteIcon)break;this.imageUrl=this.category?this.iconsBaseUrl+this.category.replace(/ /g,"_")+".svg":void 0}while(this.index>-1&&(!this.imageUrl||this.missingIconsCache.has(this.imageUrl)))},I.styles=D`
178
+ ${Me(Hi)}
179
+ `,G([f({type:Object})],I.prototype,"feature",2),G([f({type:String})],I.prototype,"itemStyle",2),G([f({type:String})],I.prototype,"showPlaceType",2),G([f({attribute:!1})],I.prototype,"missingIconsCache",2),G([f({type:String})],I.prototype,"iconsBaseUrl",2),G([C()],I.prototype,"category",2),G([C()],I.prototype,"imageUrl",2),G([C()],I.prototype,"spriteIcon",2),G([C()],I.prototype,"index",2),I=G([z("maptiler-geocoder-feature-item")],I);const qi='form{font-family:var(--font-family, "Open Sans", "Ubuntu", "Helvetica Neue", Arial, Helvetica, sans-serif);position:relative;background-color:var(--color-bg, #fff);z-index:10;border-radius:var(--radius, 4px);margin:0;transition:max-width .25s;box-shadow:var(--shadow, 0px 2px 5px rgba(51, 51, 89, .15));pointer-events:all}form,form *,form *:after,form *:before{box-sizing:border-box}form.can-collapse{max-width:var(--size-collapse-width, 29px)}form.can-collapse input::placeholder{transition:opacity .25s;opacity:0}form,form.can-collapse:focus-within,form.can-collapse:hover{width:var(--size-width, 270px);max-width:var(--size-width, 270px)}form input::placeholder,form:focus-within input::placeholder,form:hover input::placeholder{opacity:1}input{font:inherit;font-size:var(--font-size-input, 14px);flex-grow:1;min-height:var(--size-input-min-height, 29px);background-color:transparent;color:var(--color-input, #444952);white-space:nowrap;overflow:hidden;border:0;margin:0;padding:0}input:focus{color:var(--color-input-focus, #444952);outline:0;box-shadow:none}ul,div.error,div.no-results{background-color:var(--color-bg-dropdown, #fff);border-radius:var(--radius-dropdown, 4px);left:0;list-style:none;margin:0;padding:0;position:absolute;width:100%;top:calc(100% + 6px);overflow:hidden}ul{font-size:var(--font-size-items, 14px);line-height:16px;box-shadow:var(--shadow-dropdown, 0px 5px 10px rgba(51, 51, 89, .15))}div.error,div.no-results{font:inherit;line-height:18px;font-size:var(--font-size-error, 12px);display:flex;gap:16px}div.error{padding:16px;font-weight:600;color:var(--color-error-text, #e25041);background-color:var(--color-error-bg, #fbeae8)}div.error div{flex-grow:1}div.error maptiler-geocode-fail-icon{flex-shrink:0;width:20px;height:20px}div.error button{flex-shrink:0}div.error button maptiler-geocode-clear-icon{--color-icon-button: var(--color-error-icon, #e25041)}div.error button:hover maptiler-geocode-clear-icon,div.error button:active maptiler-geocode-clear-icon{--color-icon-button: inherit}div.no-results{padding:14px 24px 14px 16px;font-weight:400;color:var(--color-no-results-text, #6b7c93);box-shadow:var(--shadow-dropdown, 0px 5px 10px rgba(51, 51, 89, .15))}div.no-results maptiler-geocode-fail-icon{margin-top:4px;flex-shrink:0;width:20px;height:20px}ul.options.open-on-top{top:auto;bottom:calc(100% + 6px)}button{padding:0;margin:0;border:0;background-color:transparent;height:auto;width:auto}button:hover{background-color:transparent}button:hover,button:active{--color-icon-button: var(--color-icon-button-hover, #2b8bfb)}.input-group{display:flex;align-items:stretch;gap:var(--input-group-gap, 7px);padding:var(--input-group-padding, 0 8px);border-radius:var(--radius-input-group, 4px);overflow:hidden}.input-group:focus-within{outline:var(--color-focus-outline, #2b8bfb) solid var(--size-focus-outline, 2px)}.search-button{flex-shrink:0}.clear-button-container{display:none;position:relative;align-items:stretch}.clear-button-container.displayable{display:flex;flex-shrink:0}:host(.maptiler-geocoder):not(:empty){box-shadow:none}:host(.maptiler-geocoder) .input-group{border:var(--color-input-group-border, white solid 2px)}:host(.maptiler-geocoder) .input-group:focus-within{border:var(--color-input-group-border-focused, #2b8bfb solid 2px);outline:0}:host(.maptiler-geocoder) form.can-collapse{max-width:var(--size-collapse-width, 33px)}:host(.maptiler-geocoder) form,:host(.leaflet-geocoder) form,:host(.maptiler-geocoder) form.can-collapse:focus-within,:host(.leaflet-geocoder) form.can-collapse:focus-within,:host(.maptiler-geocoder) form.can-collapse:hover,:host(.leaflet-geocoder) form.can-collapse:hover{width:var(--size-width, 270px);max-width:var(--size-width, 270px)}:host(.leaflet-geocoder) .input-group{border:var(--color-input-group-border, white solid 1px)}:host(.leaflet-geocoder) form.can-collapse{max-width:var(--size-collapse-width, 30px)}';var Zi=Object.defineProperty,Ki=Object.getOwnPropertyDescriptor,xt=i=>{throw TypeError(i)},u=(i,e,t,s)=>{for(var r=s>1?void 0:s?Ki(e,t):e,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=(s?a(e,t,r):a(r))||r);return s&&r&&Zi(e,t,r),r},Fe=(i,e,t)=>e.has(i)||xt("Cannot "+t),O=(i,e,t)=>(Fe(i,e,"read from private field"),t?t.call(i):e.get(i)),ce=(i,e,t)=>e.has(i)?xt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Re=(i,e,t,s)=>(Fe(i,e,"write to private field"),e.set(i,t),t),h=(i,e,t)=>(Fe(i,e,"access private method"),t),ye,de,De,he,d,$e,Be,x,He,Ee,je,ze,F,Ve,_e,It,Tt,qe,Nt,Ot,kt,Gt,Ut,Wt,Pt,Ft,Rt,Dt,R,ue;const Ze="input:not([type]), input[type=text], input[type=search], select, textarea",Le="button, input[type=button]";c.MaptilerGeocoderElement=class extends N{constructor(){super(...arguments),ce(this,d),this.clearListOnPick=!1,this.clearOnBlur=!1,this.collapsed=!1,this.excludeTypes=!1,this.exhaustiveReverseGeocoding=!1,this.fetchFullGeometryOnPick=!1,this.keepListOpen=!1,this.openListOnTop=!1,this.reverseActive=!1,this.searchValue="",this.selectedItemIndex=-1,this.cachedFeatures=[],this.lastSearchUrl="",this.focused=!1,this.isFeatureListVisible=!1,this.isFeatureListInteractedWith=!1,ce(this,ye,!1),ce(this,de),ce(this,De,new Set),ce(this,he)}get isLoading(){return this.abortController!==void 0}get input(){for(const e of this.contentSlotElements){if(h(this,d,R).call(this,e))return e;const t=e.querySelector(Ze);if(h(this,d,R).call(this,t))return t}return this.inputSlotElements[0]}firstUpdated(){Re(this,ye,!0),this.input&&(this.input.value=this.searchValue)}setOptions(e){const t={...e};for(const s of Object.keys(t))Qi.includes(s)||delete t[s];Object.assign(this,t)}setQuery(e){h(this,d,ze).call(this,e,{external:!0}),h(this,d,je).call(this)}submitQuery(e){h(this,d,Ve).call(this,e,{external:!0})}clearList(){h(this,d,F).call(this),this.picked=void 0,this.selectedItemIndex=-1}focus(e){this.input?.focus(e)}blur(){this.input?.blur()}addEventListener(e,t,s){super.addEventListener(e,t,s)}removeEventListener(e,t,s){super.removeEventListener(e,t,s)}handleMapChange(e){Re(this,he,e)}handleMapClick(e){this.reverseActive&&h(this,d,It).call(this,e)}willUpdate(e){e.has("error")&&this.error&&console.error("[MapTilerGeocodingControl] Error:",this.error),e.has("enableReverse")&&(this.reverseActive=this.enableReverse==="always"),["picked"].some(t=>e.has(t))&&this.picked&&(this.clearListOnPick&&h(this,d,F).call(this),this.selectedItemIndex=-1),["searchValue","minLength"].some(t=>e.has(t))&&O(this,d,Be)&&(h(this,d,F).call(this),this.error=void 0),["focused","listIsInteractedWith"].some(t=>e.has(t))&&this.clearOnBlur&&!this.focused&&!this.isFeatureListInteractedWith&&(this.searchValue=""),["selectFirst","listFeatures","selectedItemIndex","picked"].some(t=>e.has(t))&&this.selectFirst!==!1&&this.listFeatures?.length&&this.selectedItemIndex==-1&&!this.picked&&(this.selectedItemIndex=0),["listFeatures","selectedItemIndex"].some(t=>e.has(t))&&h(this,d,x).call(this,"select",{feature:O(this,d,$e)}),["picked"].some(t=>e.has(t))&&this.picked&&this.picked.id!==e.get("picked")?.id&&(this.fetchFullGeometryOnPick&&!this.picked.address&&this.picked.geometry.type==="Point"&&this.picked.place_type[0]!=="reverse"?h(this,d,_e).call(this,this.picked.id,{byId:!0}):Promise.resolve()).then(()=>{h(this,d,x).call(this,"pick",{feature:this.picked})},t=>{t&&typeof t=="object"&&"name"in t&&t.name==="AbortError"||(this.error=t,h(this,d,x).call(this,"pick",{feature:this.picked}))}),["listFeatures","focused","isFeatureListInteractedWith","keepListOpen"].some(t=>e.has(t))&&(this.isFeatureListVisible=!!this.listFeatures?.length&&(this.focused||this.isFeatureListInteractedWith||this.keepListOpen)),["isFeatureListVisible"].some(t=>e.has(t))&&(this.isFeatureListVisible?h(this,d,x).call(this,"featuresshow"):h(this,d,x).call(this,"featureshide")),["reverseActive"].some(t=>e.has(t))&&h(this,d,x).call(this,"reversetoggle",{reverse:this.reverseActive}),["searchValue"].some(t=>e.has(t))&&this.input&&(this.input.value=this.searchValue)}render(){return S`
180
+ <form
181
+ class=${be({"can-collapse":this.collapsed&&this.searchValue===""})}
182
+ @submit=${h(this,d,He)}
183
+ @focusin=${h(this,d,kt)}
184
+ @focusout=${h(this,d,Gt)}
185
+ @click=${h(this,d,Tt)}
186
+ @keydown=${h(this,d,qe)}
187
+ @input=${h(this,d,Nt)}
188
+ @change=${h(this,d,Ot)}
189
+ >
190
+ <slot name="content">
191
+ <div class="input-group">
192
+ <slot name="start"></slot>
189
193
 
190
- <input
191
- .value=${this.searchValue}
192
- @focus=${()=>this.focused=!0}
193
- @blur=${()=>this.focused=!1}
194
- @click=${()=>this.focused=!0}
195
- @keydown=${p(this,h,Be)}
196
- @input=${p(this,h,At)}
197
- @change=${()=>this.picked=void 0}
198
- placeholder=${this.placeholder??"Search"}
199
- aria-label=${this.placeholder??"Search"}
200
- />
194
+ <slot name="search-button">
195
+ <button class="search-button" type="button">
196
+ <slot name="search-icon">
197
+ <maptiler-geocode-search-icon></maptiler-geocode-search-icon>
198
+ </slot>
199
+ </button>
200
+ </slot>
201
201
 
202
- <div class="clear-button-container ${me({displayable:this.searchValue!==""})}">
203
- ${T(this,h,St)?S`<maptiler-geocode-loading-icon></maptiler-geocode-loading-icon>`:S`
204
- <button type="button" @click=${p(this,h,kt)} title=${this.clearButtonTitle??"clear"}>
205
- <maptiler-geocode-clear-icon></maptiler-geocode-clear-icon>
206
- </button>
207
- `}
208
- </div>
202
+ <slot name="input">
203
+ <input placeholder=${this.placeholder??"Search"} aria-label=${this.placeholder??"Search"} />
204
+ </slot>
205
+
206
+ <div class="clear-button-container ${be({displayable:this.searchValue!==""})}">
207
+ ${this.isLoading?S`
208
+ <slot name="loading-icon">
209
+ <maptiler-geocode-loading-icon></maptiler-geocode-loading-icon>
210
+ </slot>
211
+ `:S`
212
+ <slot name="clear-button">
213
+ <button type="button" title=${this.clearButtonTitle??"clear"}>
214
+ <slot name="clear-icon">
215
+ <maptiler-geocode-clear-icon></maptiler-geocode-clear-icon>
216
+ </slot>
217
+ </button>
218
+ </slot>
219
+ `}
220
+ </div>
209
221
 
210
- ${this.enableReverse==="button"?S`
211
- <button
212
- type="button"
213
- class=${me({active:this.reverseActive})}
214
- title=${this.reverseButtonTitle??"toggle reverse geocoding"}
215
- @click=${()=>this.reverseActive=!this.reverseActive}
216
- >
217
- <maptiler-geocode-reverse-geocoding-icon></maptiler-geocode-reverse-geocoding-icon>
218
- </button>
219
- `:w}
222
+ ${this.enableReverse==="button"?S`
223
+ <slot name="reverse-button">
224
+ <button type="button" class=${be({active:this.reverseActive})} title=${this.reverseButtonTitle??"toggle reverse geocoding"}>
225
+ <slot name="reverse-icon">
226
+ <maptiler-geocode-reverse-geocoding-icon></maptiler-geocode-reverse-geocoding-icon>
227
+ </slot>
228
+ </button>
229
+ </slot>
230
+ `:w}
220
231
 
221
- <!-- <slot /> -->
222
- </div>
232
+ <slot name="end"></slot>
233
+ </div>
234
+ </slot>
223
235
 
224
236
  ${this.error?S`
225
237
  <div class="error">
226
- <maptiler-geocode-fail-icon></maptiler-geocode-fail-icon>
238
+ <slot name="error-icon">
239
+ <maptiler-geocode-fail-icon></maptiler-geocode-fail-icon>
240
+ </slot>
227
241
 
228
242
  <div>${this.errorMessage??"Something went wrong…"}</div>
229
243
 
230
- <button @click=${()=>this.error=void 0}>
231
- <maptiler-geocode-clear-icon></maptiler-geocode-clear-icon>
232
- </button>
244
+ <slot name="clear-error-button">
245
+ <button>
246
+ <slot name="clear-error-icon">
247
+ <maptiler-geocode-clear-icon></maptiler-geocode-clear-icon>
248
+ </slot>
249
+ </button>
250
+ </slot>
233
251
  </div>
234
252
  `:!this.focused&&!this.isFeatureListInteractedWith&&!this.keepListOpen||this.listFeatures===void 0?w:this.listFeatures.length===0?S`
235
253
  <div class="no-results">
236
- <maptiler-geocode-fail-icon></maptiler-geocode-fail-icon>
254
+ <slot name="no-results-icon">
255
+ <maptiler-geocode-fail-icon></maptiler-geocode-fail-icon>
256
+ </slot>
237
257
 
238
258
  <div>
239
259
  ${this.noResultsMessage??"Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!"}
@@ -241,28 +261,28 @@
241
261
  </div>
242
262
  `:S`
243
263
  <ul
244
- class="options ${me({"open-on-top":this.openListOnTop})}"
245
- @pointerleave=${p(this,h,It)}
246
- @pointerdown=${p(this,h,Tt)}
247
- @pointerup=${p(this,h,Nt)}
248
- @keydown=${p(this,h,Be)}
264
+ class="options ${be({"open-on-top":this.openListOnTop})}"
265
+ @pointerleave=${h(this,d,Pt)}
266
+ @pointerdown=${h(this,d,Ft)}
267
+ @pointerup=${h(this,d,Rt)}
268
+ @keydown=${h(this,d,qe)}
249
269
  role="listbox"
250
270
  >
251
- ${Ti(this.listFeatures,e=>e.id+(e.address?","+e.address:""),(e,t)=>S`
271
+ ${Pi(this.listFeatures,e=>e.id+(e.address?","+e.address:""),(e,t)=>S`
252
272
  <maptiler-geocoder-feature-item
253
273
  .feature=${e}
254
274
  .showPlaceType=${this.showPlaceType??"if-needed"}
255
275
  itemStyle=${this.selectedItemIndex===t?"selected":this.picked?.id===e.id?"picked":"default"}
256
- @pointerenter=${()=>{p(this,h,Ct).call(this,t)}}
257
- @select=${()=>{p(this,h,xt).call(this,e)}}
258
- .missingIconsCache=${T(this,We)}
259
- .iconsBaseUrl=${this.iconsBaseUrl??"https://cdn.maptiler.com/maptiler-geocoding-control/v3.0.0/icons/"}
276
+ @pointerenter=${()=>{h(this,d,Wt).call(this,t)}}
277
+ @select=${()=>{h(this,d,Ut).call(this,e)}}
278
+ .missingIconsCache=${O(this,De)}
279
+ .iconsBaseUrl=${this.iconsBaseUrl??"https://cdn.maptiler.com/maptiler-geocoding-control/v3.1.0-rc.1/icons/"}
260
280
  />
261
281
  `)}
262
282
  </ul>
263
283
  `}
264
284
  </form>
265
- `}},ve=new WeakMap,ne=new WeakMap,We=new WeakMap,le=new WeakMap,h=new WeakSet,ge=function(){return this.listFeatures?.[this.selectedItemIndex]},St=function(){return this.abortController!==void 0},Pe=function(){return this.searchValue.length<(this.minLength??2)},C=function(i,...[e]){T(this,ve)&&this.dispatchEvent(new CustomEvent(i,{bubbles:!0,composed:!0,detail:e}))},Fe=function(i,{external:e=!1}={}){i?.preventDefault(),this.focused=!1,clearTimeout(T(this,ne)),this.selectedItemIndex>-1&&this.listFeatures?(this.picked=this.listFeatures[this.selectedItemIndex],this.searchValue=this.picked.place_type[0]==="reverse"?this.picked.place_name:this.picked.place_name.replace(/,.*/,""),this.error=void 0,this.selectedItemIndex=-1):this.searchValue&&p(this,h,ye).call(this,this.searchValue,{exact:!0,external:e}).then(()=>{this.picked=void 0}).catch(t=>this.error=t)},be=function(i){try{return Mi(i,6)}catch{return!1}},Re=function(){setTimeout(()=>{this.input.focus(),this.focused=!0,this.input.select()})},De=function(i,{external:e=!1}={}){if(this.searchValue=i,p(this,h,C).call(this,"querychange",{query:this.searchValue,reverseCoords:p(this,h,be).call(this,i)}),this.error=void 0,this.picked=void 0,this.showResultsWhileTyping!==!1){if(clearTimeout(T(this,ne)),T(this,h,Pe))return;const t=this.searchValue;Ue(this,ne,window.setTimeout(()=>{p(this,h,ye).call(this,t,{external:e}).catch(s=>this.error=s)},this.debounceSearch??200))}else p(this,h,P).call(this)},P=function(){this.listFeatures!==void 0&&(this.listFeatures=void 0,p(this,h,C).call(this,"featuresclear"))},He=function(i,{external:e=!1}={}){this.searchValue=i,p(this,h,C).call(this,"querychange",{query:this.searchValue,reverseCoords:p(this,h,be).call(this,i)}),this.selectedItemIndex=-1,p(this,h,Fe).call(this,void 0,{external:e})},ye=async function(i,{byId:e=!1,exact:t=!1,external:s=!1}={}){this.error=void 0,this.abortController?.abort();const r=new AbortController;this.abortController=r;try{const o=this.apiUrl??"https://api.maptiler.com/geocoding",a=p(this,h,be).call(this,i),n=new URL(o+"/"+encodeURIComponent(a?`${a.decimalLongitude},${a.decimalLatitude}`:i)+".json"),l=n.searchParams;this.language!==void 0&&l.set("language",Array.isArray(this.language)?this.language.join(","):this.language??"");const[g]=T(this,le)??[void 0];let v=(!a||this.reverseGeocodingTypes===void 0?this.types:this.reverseGeocodingTypes)?.map(E=>typeof E=="string"?E:g===void 0||(E[0]??0)<=g&&g<(E[1]??1/0)?E[2]:void 0).filter(E=>E!==void 0);v&&(v=[...new Set(v)],l.set("types",v.join(",")));const d=!a||this.reverseGeocodingExcludeTypes===void 0?this.excludeTypes:this.reverseGeocodingExcludeTypes;if(d&&l.set("excludeTypes",String(d)),this.bbox&&l.set("bbox",this.bbox.map(E=>E.toFixed(6)).join(",")),this.country&&l.set("country",Array.isArray(this.country)?this.country.join(","):this.country),this.worldview&&l.set("worldview",this.worldview),!e&&!a){const E=this.proximity??[{type:"server-geolocation"}],N=await ki(T(this,le),E,r);N&&l.set("proximity",N),(t||this.showResultsWhileTyping===!1)&&l.set("autocomplete","false"),l.set("fuzzyMatch",String(this.fuzzyMatch!==!1))}const b=this.limit??5,m=this.reverseGeocodingLimit??b;m>1&&v?.length!==1&&console.warn("[MapTilerGeocodingControl] Warning: For reverse geocoding when limit > 1 then types must contain single value."),a?(m===1||this.exhaustiveReverseGeocoding||v?.length===1)&&l.set("limit",String(m)):l.set("limit",String(b)),this.apiKey&&l.set("key",this.apiKey),this.adjustUrl?.(n);const y=n.searchParams.get("types")===""&&n.searchParams.get("excludeTypes")!=="true",L=n.toString();if(L===this.lastSearchUrl){e?(this.clearListOnPick&&p(this,h,P).call(this),this.picked=this.cachedFeatures[0]):(this.listFeatures=this.cachedFeatures,p(this,h,C).call(this,"featureslisted",{features:this.listFeatures,external:s}),this.listFeatures[this.selectedItemIndex]?.id!==T(this,h,ge)?.id&&(this.selectedItemIndex=-1));return}p(this,h,C).call(this,"request",{urlObj:n}),this.lastSearchUrl=L;let A;if(y)A={type:"FeatureCollection",features:[]};else{const E=await fetch(L,{signal:r.signal,...this.fetchParameters});if(!E.ok)throw new Error(await E.text());A=await E.json()}p(this,h,C).call(this,"response",{url:L,featureCollection:A}),e?(this.clearListOnPick&&p(this,h,P).call(this),this.picked=A.features[0],this.cachedFeatures=[this.picked]):(this.listFeatures=A.features.filter(this.filter??(()=>!0)),a&&this.listFeatures.unshift({type:"Feature",properties:{},id:`reverse_${a.decimalLongitude}_${a.decimalLatitude}`,place_name:`${a.decimalLatitude}, ${a.decimalLongitude}`,text:a.toCoordinateFormat("DMS"),place_type:["reverse"],place_type_name:["reverse"],center:[a.decimalLongitude,a.decimalLatitude],bbox:[a.decimalLongitude,a.decimalLatitude,a.decimalLongitude,a.decimalLatitude],geometry:{type:"Point",coordinates:[a.decimalLongitude,a.decimalLatitude]}}),p(this,h,C).call(this,"featureslisted",{features:this.listFeatures,external:s}),this.cachedFeatures=this.listFeatures,this.listFeatures[this.selectedItemIndex]?.id!==T(this,h,ge)?.id&&(this.selectedItemIndex=-1),a&&this.input.focus())}catch(o){if(o&&typeof o=="object"&&"name"in o&&o.name==="AbortError")return;throw o}finally{r===this.abortController&&(this.abortController=void 0)}},Mt=function(i){this.reverseActive=this.enableReverse==="always",p(this,h,P).call(this),this.picked=void 0,p(this,h,He).call(this,`${i[1].toFixed(6)}, ${Ni(i[0],[-180,180],!0).toFixed(6)}`),p(this,h,Re).call(this)},Be=function(i){if(!this.listFeatures)return;const e=i.key==="ArrowDown"?1:i.key==="ArrowUp"?-1:0;e&&(this.input.focus(),this.focused=!0,i.preventDefault(),this.picked&&this.selectedItemIndex===-1&&(this.selectedItemIndex=this.listFeatures.findIndex(t=>t.id===this.picked?.id)),this.selectedItemIndex===(this.picked||this.selectFirst!==!1?0:-1)&&e===-1&&(this.selectedItemIndex=this.listFeatures.length),this.selectedItemIndex+=e,this.selectedItemIndex>=this.listFeatures.length&&(this.selectedItemIndex=-1),this.selectedItemIndex<0&&(this.picked||this.selectFirst!==!1)&&(this.selectedItemIndex=0))},At=function(i){p(this,h,De).call(this,i.target.value)},xt=function(i){(!this.picked||this.picked.id!==i.id)&&(this.picked=i,this.searchValue=i.place_name)},Ct=function(i){this.selectedItemIndex=i},It=function(){(!this.selectFirst||this.picked)&&(this.selectedItemIndex=-1),this.isFeatureListInteractedWith&&(this.isFeatureListInteractedWith=!1)},Tt=function(){this.isFeatureListInteractedWith=!0},Nt=function(){setTimeout(()=>{this.isFeatureListInteractedWith=!1})},kt=function(){this.searchValue="",p(this,h,C).call(this,"queryclear"),this.picked=void 0,this.input.focus()},c.MaptilerGeocoderElement.styles=F`
266
- ${_e(Ri)}
267
- `,u([f({attribute:!1})],c.MaptilerGeocoderElement.prototype,"adjustUrl",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"apiKey",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"apiUrl",2),u([f({type:Array})],c.MaptilerGeocoderElement.prototype,"bbox",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"clearButtonTitle",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"clearListOnPick",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"clearOnBlur",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"collapsed",2),u([f({attribute:!1})],c.MaptilerGeocoderElement.prototype,"country",2),u([f({type:Number})],c.MaptilerGeocoderElement.prototype,"debounceSearch",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"enableReverse",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"errorMessage",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"excludeTypes",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"exhaustiveReverseGeocoding",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"fetchFullGeometryOnPick",2),u([f({type:Object})],c.MaptilerGeocoderElement.prototype,"fetchParameters",2),u([f({attribute:!1})],c.MaptilerGeocoderElement.prototype,"filter",2),u([f({type:Object})],c.MaptilerGeocoderElement.prototype,"fuzzyMatch",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"iconsBaseUrl",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"keepListOpen",2),u([f({attribute:!1})],c.MaptilerGeocoderElement.prototype,"language",2),u([f({type:Number})],c.MaptilerGeocoderElement.prototype,"limit",2),u([f({type:Number})],c.MaptilerGeocoderElement.prototype,"minLength",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"noResultsMessage",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"openListOnTop",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"placeholder",2),u([f({type:Array})],c.MaptilerGeocoderElement.prototype,"proximity",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"reverseActive",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"reverseButtonTitle",2),u([f({type:Object})],c.MaptilerGeocoderElement.prototype,"reverseGeocodingExcludeTypes",2),u([f({type:Number})],c.MaptilerGeocoderElement.prototype,"reverseGeocodingLimit",2),u([f({type:Array})],c.MaptilerGeocoderElement.prototype,"reverseGeocodingTypes",2),u([f({type:Object})],c.MaptilerGeocoderElement.prototype,"selectFirst",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"showPlaceType",2),u([f({type:Object})],c.MaptilerGeocoderElement.prototype,"showResultsWhileTyping",2),u([f({type:Array})],c.MaptilerGeocoderElement.prototype,"types",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"worldview",2),u([oi("input")],c.MaptilerGeocoderElement.prototype,"input",2),u([x()],c.MaptilerGeocoderElement.prototype,"searchValue",2),u([x()],c.MaptilerGeocoderElement.prototype,"listFeatures",2),u([x()],c.MaptilerGeocoderElement.prototype,"selectedItemIndex",2),u([x()],c.MaptilerGeocoderElement.prototype,"picked",2),u([x()],c.MaptilerGeocoderElement.prototype,"cachedFeatures",2),u([x()],c.MaptilerGeocoderElement.prototype,"lastSearchUrl",2),u([x()],c.MaptilerGeocoderElement.prototype,"error",2),u([x()],c.MaptilerGeocoderElement.prototype,"abortController",2),u([x()],c.MaptilerGeocoderElement.prototype,"focused",2),u([x()],c.MaptilerGeocoderElement.prototype,"isFeatureListVisible",2),u([x()],c.MaptilerGeocoderElement.prototype,"isFeatureListInteractedWith",2),c.MaptilerGeocoderElement=u([B("maptiler-geocoder")],c.MaptilerGeocoderElement);const Bi=["adjustUrl","apiKey","apiUrl","bbox","clearButtonTitle","clearListOnPick","clearOnBlur","collapsed","country","debounceSearch","enableReverse","errorMessage","excludeTypes","reverseGeocodingExcludeTypes","exhaustiveReverseGeocoding","fetchParameters","fetchFullGeometryOnPick","filter","fuzzyMatch","iconsBaseUrl","keepListOpen","language","limit","reverseGeocodingLimit","minLength","noResultsMessage","openListOnTop","placeholder","proximity","reverseActive","reverseButtonTitle","selectFirst","showPlaceType","showResultsWhileTyping","types","reverseGeocodingTypes","worldview"];Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})}));
285
+ `}},ye=new WeakMap,de=new WeakMap,De=new WeakMap,he=new WeakMap,d=new WeakSet,$e=function(){return this.listFeatures?.[this.selectedItemIndex]},Be=function(){return this.searchValue.length<(this.minLength??2)},x=function(i,...[e]){O(this,ye)&&this.dispatchEvent(new CustomEvent(i,{bubbles:!0,composed:!0,detail:e}))},He=function(i,{external:e=!1}={}){i?.preventDefault(),this.focused=!1,clearTimeout(O(this,de)),this.selectedItemIndex>-1&&this.listFeatures?(this.picked=this.listFeatures[this.selectedItemIndex],this.searchValue=this.picked.place_type[0]==="reverse"?this.picked.place_name:this.picked.place_name.replace(/,.*/,""),this.error=void 0,this.selectedItemIndex=-1):this.searchValue&&h(this,d,_e).call(this,this.searchValue,{exact:!0,external:e}).then(()=>{this.picked=void 0}).catch(t=>this.error=t)},Ee=function(i){try{return Oi(i,6)}catch{return!1}},je=function(){setTimeout(()=>{this.input?.focus(),this.focused=!0,this.input instanceof HTMLSelectElement?this.input.showPicker():this.input?.select()})},ze=function(i,{external:e=!1}={}){if(this.searchValue=i,h(this,d,x).call(this,"querychange",{query:this.searchValue,reverseCoords:h(this,d,Ee).call(this,i)}),this.error=void 0,this.picked=void 0,this.showResultsWhileTyping!==!1){if(clearTimeout(O(this,de)),O(this,d,Be))return;const t=this.searchValue;Re(this,de,window.setTimeout(()=>{h(this,d,_e).call(this,t,{external:e}).catch(s=>this.error=s)},this.debounceSearch??200))}else h(this,d,F).call(this)},F=function(){this.listFeatures!==void 0&&(this.listFeatures=void 0,h(this,d,x).call(this,"featuresclear"))},Ve=function(i,{external:e=!1}={}){this.searchValue=i,h(this,d,x).call(this,"querychange",{query:this.searchValue,reverseCoords:h(this,d,Ee).call(this,i)}),this.selectedItemIndex=-1,h(this,d,He).call(this,void 0,{external:e})},_e=async function(i,{byId:e=!1,exact:t=!1,external:s=!1}={}){this.error=void 0,this.abortController?.abort();const r=new AbortController;this.abortController=r;try{const o=this.apiUrl??"https://api.maptiler.com/geocoding",a=h(this,d,Ee).call(this,i),n=new URL(o+"/"+encodeURIComponent(a?`${a.decimalLongitude},${a.decimalLatitude}`:i)+".json"),l=n.searchParams;this.language!==void 0&&l.set("language",Array.isArray(this.language)?this.language.join(","):this.language??"");const[g]=O(this,he)??[void 0];let v=(!a||this.reverseGeocodingTypes===void 0?this.types:this.reverseGeocodingTypes)?.map(E=>typeof E=="string"?E:g===void 0||(E[0]??0)<=g&&g<(E[1]??1/0)?E[2]:void 0).filter(E=>E!==void 0);v&&(v=[...new Set(v)],l.set("types",v.join(",")));const p=!a||this.reverseGeocodingExcludeTypes===void 0?this.excludeTypes:this.reverseGeocodingExcludeTypes;if(p&&l.set("excludeTypes",String(p)),this.bbox&&l.set("bbox",this.bbox.map(E=>E.toFixed(6)).join(",")),this.country&&l.set("country",Array.isArray(this.country)?this.country.join(","):this.country),this.worldview&&l.set("worldview",this.worldview),!e&&!a){const E=this.proximity??[{type:"server-geolocation"}],T=await Ri(O(this,he),E,r);T&&l.set("proximity",T),(t||this.showResultsWhileTyping===!1)&&l.set("autocomplete","false"),l.set("fuzzyMatch",String(this.fuzzyMatch!==!1))}const b=this.limit??5,m=this.reverseGeocodingLimit??b;m>1&&v?.length!==1&&console.warn("[MapTilerGeocodingControl] Warning: For reverse geocoding when limit > 1 then types must contain single value."),a?(m===1||this.exhaustiveReverseGeocoding||v?.length===1)&&l.set("limit",String(m)):l.set("limit",String(b)),this.apiKey&&l.set("key",this.apiKey),this.adjustUrl?.(n);const y=n.searchParams.get("types")===""&&n.searchParams.get("excludeTypes")!=="true",L=n.toString();if(L===this.lastSearchUrl){e?(this.clearListOnPick&&h(this,d,F).call(this),this.picked=this.cachedFeatures[0]):(this.listFeatures=this.cachedFeatures,h(this,d,x).call(this,"featureslisted",{features:this.listFeatures,external:s}),this.listFeatures[this.selectedItemIndex]?.id!==O(this,d,$e)?.id&&(this.selectedItemIndex=-1));return}h(this,d,x).call(this,"request",{urlObj:n}),this.lastSearchUrl=L;let A;if(y)A={type:"FeatureCollection",features:[]};else{const E=await fetch(L,{signal:r.signal,...this.fetchParameters});if(!E.ok)throw new Error(await E.text());A=await E.json()}h(this,d,x).call(this,"response",{url:L,featureCollection:A}),e?(this.clearListOnPick&&h(this,d,F).call(this),this.picked=A.features[0],this.cachedFeatures=[this.picked]):(this.listFeatures=A.features.filter(this.filter??(()=>!0)),a&&this.listFeatures.unshift({type:"Feature",properties:{},id:`reverse_${a.decimalLongitude}_${a.decimalLatitude}`,place_name:`${a.decimalLatitude}, ${a.decimalLongitude}`,text:a.toCoordinateFormat("DMS"),place_type:["reverse"],place_type_name:["reverse"],center:[a.decimalLongitude,a.decimalLatitude],bbox:[a.decimalLongitude,a.decimalLatitude,a.decimalLongitude,a.decimalLatitude],geometry:{type:"Point",coordinates:[a.decimalLongitude,a.decimalLatitude]}}),h(this,d,x).call(this,"featureslisted",{features:this.listFeatures,external:s}),this.cachedFeatures=this.listFeatures,this.listFeatures[this.selectedItemIndex]?.id!==O(this,d,$e)?.id&&(this.selectedItemIndex=-1),a&&this.input?.focus())}catch(o){if(o&&typeof o=="object"&&"name"in o&&o.name==="AbortError")return;throw o}finally{r===this.abortController&&(this.abortController=void 0)}},It=function(i){this.reverseActive=this.enableReverse==="always",h(this,d,F).call(this),this.picked=void 0,h(this,d,Ve).call(this,`${i[1].toFixed(6)}, ${Fi(i[0],[-180,180],!0).toFixed(6)}`),h(this,d,je).call(this)},Tt=function(i){h(this,d,R).call(this,i.target)?this.focused=!0:h(this,d,ue).call(this,i.target,this.searchButtonElements,this.searchIconElements,"search-button")?this.input?.focus():h(this,d,ue).call(this,i.target,this.clearButtonElements,this.clearIconElements,"clear-button")?h(this,d,Dt).call(this):h(this,d,ue).call(this,i.target,this.reverseButtonElements,this.reverseIconElements,"reverse-button")?this.reverseActive=!this.reverseActive:h(this,d,ue).call(this,i.target,this.clearErrorButtonElements,this.clearErrorIconElements,"clear-error-button")&&(this.error=void 0)},qe=function(i){if(!this.listFeatures)return;const e=i.key==="ArrowDown"?1:i.key==="ArrowUp"?-1:0;e&&(this.input?.focus(),this.focused=!0,i.preventDefault(),this.picked&&this.selectedItemIndex===-1&&(this.selectedItemIndex=this.listFeatures.findIndex(t=>t.id===this.picked?.id)),this.selectedItemIndex===(this.picked||this.selectFirst!==!1?0:-1)&&e===-1&&(this.selectedItemIndex=this.listFeatures.length),this.selectedItemIndex+=e,this.selectedItemIndex>=this.listFeatures.length&&(this.selectedItemIndex=-1),this.selectedItemIndex<0&&(this.picked||this.selectFirst!==!1)&&(this.selectedItemIndex=0))},Nt=function(i){h(this,d,R).call(this,i.target)&&h(this,d,ze).call(this,i.target.value)},Ot=function(i){h(this,d,R).call(this,i.target)&&(this.picked=void 0)},kt=function(i){h(this,d,R).call(this,i.target)&&(this.focused=!0)},Gt=function(i){h(this,d,R).call(this,i.target)&&(this.focused=!1)},Ut=function(i){(!this.picked||this.picked.id!==i.id)&&(this.picked=i,this.searchValue=i.place_name)},Wt=function(i){this.selectedItemIndex=i},Pt=function(){(!this.selectFirst||this.picked)&&(this.selectedItemIndex=-1),this.isFeatureListInteractedWith&&(this.isFeatureListInteractedWith=!1)},Ft=function(){this.isFeatureListInteractedWith=!0},Rt=function(){setTimeout(()=>{this.isFeatureListInteractedWith=!1})},Dt=function(){this.searchValue="",h(this,d,x).call(this,"queryclear"),this.picked=void 0,this.input?.focus()},R=function(i){return i instanceof HTMLElement&&i.matches(Ze)},ue=function(i,e,t,s){return i instanceof HTMLElement&&([...e,...t].some(r=>r.contains(i))||i.closest(`[data-${s}]`)!==null)},c.MaptilerGeocoderElement.styles=D`
286
+ ${Me(qi)}
287
+ `,u([f({attribute:!1})],c.MaptilerGeocoderElement.prototype,"adjustUrl",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"apiKey",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"apiUrl",2),u([f({type:Array})],c.MaptilerGeocoderElement.prototype,"bbox",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"clearButtonTitle",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"clearListOnPick",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"clearOnBlur",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"collapsed",2),u([f({attribute:!1})],c.MaptilerGeocoderElement.prototype,"country",2),u([f({type:Number})],c.MaptilerGeocoderElement.prototype,"debounceSearch",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"enableReverse",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"errorMessage",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"excludeTypes",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"exhaustiveReverseGeocoding",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"fetchFullGeometryOnPick",2),u([f({type:Object})],c.MaptilerGeocoderElement.prototype,"fetchParameters",2),u([f({attribute:!1})],c.MaptilerGeocoderElement.prototype,"filter",2),u([f({type:Object})],c.MaptilerGeocoderElement.prototype,"fuzzyMatch",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"iconsBaseUrl",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"keepListOpen",2),u([f({attribute:!1})],c.MaptilerGeocoderElement.prototype,"language",2),u([f({type:Number})],c.MaptilerGeocoderElement.prototype,"limit",2),u([f({type:Number})],c.MaptilerGeocoderElement.prototype,"minLength",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"noResultsMessage",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"openListOnTop",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"placeholder",2),u([f({type:Array})],c.MaptilerGeocoderElement.prototype,"proximity",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"reverseActive",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"reverseButtonTitle",2),u([f({type:Object})],c.MaptilerGeocoderElement.prototype,"reverseGeocodingExcludeTypes",2),u([f({type:Number})],c.MaptilerGeocoderElement.prototype,"reverseGeocodingLimit",2),u([f({type:Array})],c.MaptilerGeocoderElement.prototype,"reverseGeocodingTypes",2),u([f({type:Object})],c.MaptilerGeocoderElement.prototype,"selectFirst",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"showPlaceType",2),u([f({type:Object})],c.MaptilerGeocoderElement.prototype,"showResultsWhileTyping",2),u([f({type:Array})],c.MaptilerGeocoderElement.prototype,"types",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"worldview",2),u([k({slot:"content",flatten:!1})],c.MaptilerGeocoderElement.prototype,"contentSlotElements",2),u([k({slot:"input",flatten:!0,selector:Ze})],c.MaptilerGeocoderElement.prototype,"inputSlotElements",2),u([k({slot:"search-button",flatten:!0,selector:Le})],c.MaptilerGeocoderElement.prototype,"searchButtonElements",2),u([k({slot:"clear-button",flatten:!0,selector:Le})],c.MaptilerGeocoderElement.prototype,"clearButtonElements",2),u([k({slot:"reverse-button",flatten:!0,selector:Le})],c.MaptilerGeocoderElement.prototype,"reverseButtonElements",2),u([k({slot:"clear-error-button",flatten:!0,selector:Le})],c.MaptilerGeocoderElement.prototype,"clearErrorButtonElements",2),u([k({slot:"search-icon",flatten:!0})],c.MaptilerGeocoderElement.prototype,"searchIconElements",2),u([k({slot:"clear-icon",flatten:!0})],c.MaptilerGeocoderElement.prototype,"clearIconElements",2),u([k({slot:"reverse-icon",flatten:!0})],c.MaptilerGeocoderElement.prototype,"reverseIconElements",2),u([k({slot:"clear-error-icon",flatten:!0})],c.MaptilerGeocoderElement.prototype,"clearErrorIconElements",2),u([C()],c.MaptilerGeocoderElement.prototype,"searchValue",2),u([C()],c.MaptilerGeocoderElement.prototype,"listFeatures",2),u([C()],c.MaptilerGeocoderElement.prototype,"selectedItemIndex",2),u([C()],c.MaptilerGeocoderElement.prototype,"picked",2),u([C()],c.MaptilerGeocoderElement.prototype,"cachedFeatures",2),u([C()],c.MaptilerGeocoderElement.prototype,"lastSearchUrl",2),u([C()],c.MaptilerGeocoderElement.prototype,"error",2),u([C()],c.MaptilerGeocoderElement.prototype,"abortController",2),u([C()],c.MaptilerGeocoderElement.prototype,"focused",2),u([C()],c.MaptilerGeocoderElement.prototype,"isFeatureListVisible",2),u([C()],c.MaptilerGeocoderElement.prototype,"isFeatureListInteractedWith",2),c.MaptilerGeocoderElement=u([z("maptiler-geocoder")],c.MaptilerGeocoderElement);const Qi=["adjustUrl","apiKey","apiUrl","bbox","clearButtonTitle","clearListOnPick","clearOnBlur","collapsed","country","debounceSearch","enableReverse","errorMessage","excludeTypes","reverseGeocodingExcludeTypes","exhaustiveReverseGeocoding","fetchParameters","fetchFullGeometryOnPick","filter","fuzzyMatch","iconsBaseUrl","keepListOpen","language","limit","reverseGeocodingLimit","minLength","noResultsMessage","openListOnTop","placeholder","proximity","reverseActive","reverseButtonTitle","selectFirst","showPlaceType","showResultsWhileTyping","types","reverseGeocodingTypes","worldview"];Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})}));
268
288
  //# sourceMappingURL=index.umd.js.map