@maptiler/geocoding-control 1.0.1-rc1 → 1.0.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/leaflet.js +3972 -3972
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +1 -1
- package/leaflet.umd.js.map +1 -1
- package/maplibregl.js +1 -1
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +1 -1
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.js +1 -1
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +1 -1
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers.js +1 -1
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +1 -1
- package/openlayers.umd.js.map +1 -1
- package/package.json +1 -1
- package/react.js +1 -1
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/svelte/GeocodingControl.svelte +1 -1
- package/vanilla.js +1 -1
- package/vanilla.js.map +1 -1
- package/vanilla.umd.js +1 -1
- package/vanilla.umd.js.map +1 -1
package/vanilla.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(P,m){typeof exports=="object"&&typeof module<"u"?m(exports):typeof define=="function"&&define.amd?define(["exports"],m):(P=typeof globalThis<"u"?globalThis:P||self,m(P.maptilerGeocoder={}))})(this,function(P){"use strict";var Fn=Object.defineProperty;var Gn=(P,m,F)=>m in P?Fn(P,m,{enumerable:!0,configurable:!0,writable:!0,value:F}):P[m]=F;var Ye=(P,m,F)=>(Gn(P,typeof m!="symbol"?m+"":m,F),F),pt=(P,m,F)=>{if(!m.has(P))throw TypeError("Cannot "+F)};var oe=(P,m,F)=>(pt(P,m,"read from private field"),F?F.call(P):m.get(P)),Tt=(P,m,F)=>{if(m.has(P))throw TypeError("Cannot add the same private member more than once");m instanceof WeakSet?m.add(P):m.set(P,F)},Mt=(P,m,F,Le)=>(pt(P,m,"write to private field"),Le?Le.call(P,F):m.set(P,F),F);var Y;function m(){}function F(n,e){for(const t in e)n[t]=e[t];return n}function Le(n){return n()}function xe(){return Object.create(null)}function ie(n){n.forEach(Le)}function $e(n){return typeof n=="function"}function he(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Ue;function H(n,e){return n===e?!0:(Ue||(Ue=document.createElement("a")),Ue.href=e,n===Ue.href)}function Lt(n){return Object.keys(n).length===0}function Bt(n,e,t,r){if(n){const i=et(n,e,t,r);return n[0](i)}}function et(n,e,t,r){return n[1]&&r?F(t.ctx.slice(),n[1](r(e))):t.ctx}function Et(n,e,t,r){if(n[2]&&r){const i=n[2](r(t));if(e.dirty===void 0)return i;if(typeof i=="object"){const f=[],u=Math.max(e.dirty.length,i.length);for(let o=0;o<u;o+=1)f[o]=e.dirty[o]|i[o];return f}return e.dirty|i}return e.dirty}function Ct(n,e,t,r,i,f){if(i){const u=et(e,t,r,f);n.p(u,i)}}function Rt(n){if(n.ctx.length>32){const e=[],t=n.ctx.length/32;for(let r=0;r<t;r++)e[r]=-1;return e}return-1}function tt(n){return n??""}function T(n,e){n.appendChild(e)}function j(n,e,t){n.insertBefore(e,t||null)}function A(n){n.parentNode&&n.parentNode.removeChild(n)}function z(n){return document.createElement(n)}function ce(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function fe(n){return document.createTextNode(n)}function X(){return fe(" ")}function St(){return fe("")}function V(n,e,t,r){return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}function Ut(n){return function(e){return e.preventDefault(),n.call(this,e)}}function s(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function zt(n){return Array.from(n.childNodes)}function Be(n,e){e=""+e,n.data!==e&&(n.data=e)}function nt(n,e){n.value=e??""}function ue(n,e,t){n.classList.toggle(e,!!t)}function Pt(n,e,{bubbles:t=!1,cancelable:r=!1}={}){return new CustomEvent(n,{detail:e,bubbles:t,cancelable:r})}let Ee;function Ce(n){Ee=n}function rt(){if(!Ee)throw new Error("Function called outside component initialization");return Ee}function At(n){rt().$$.on_destroy.push(n)}function It(){const n=rt();return(e,t,{cancelable:r=!1}={})=>{const i=n.$$.callbacks[e];if(i){const f=Pt(e,t,{cancelable:r});return i.slice().forEach(u=>{u.call(n,f)}),!f.defaultPrevented}return!0}}function it(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(r=>r.call(this,e))}const we=[],Oe=[];let ve=[];const lt=[],jt=Promise.resolve();let Ne=!1;function Zt(){Ne||(Ne=!0,jt.then(st))}function Fe(n){ve.push(n)}const Ge=new Set;let ke=0;function st(){if(ke!==0)return;const n=Ee;do{try{for(;ke<we.length;){const e=we[ke];ke++,Ce(e),Wt(e.$$)}}catch(e){throw we.length=0,ke=0,e}for(Ce(null),we.length=0,ke=0;Oe.length;)Oe.pop()();for(let e=0;e<ve.length;e+=1){const t=ve[e];Ge.has(t)||(Ge.add(t),t())}ve.length=0}while(we.length);for(;lt.length;)lt.pop()();Ne=!1,Ge.clear(),Ce(n)}function Wt(n){if(n.fragment!==null){n.update(),ie(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(Fe)}}function Ot(n){const e=[],t=[];ve.forEach(r=>n.indexOf(r)===-1?e.push(r):t.push(r)),t.forEach(r=>r()),ve=e}const ze=new Set;let me;function Pe(){me={r:0,c:[],p:me}}function Ae(){me.r||ie(me.c),me=me.p}function Z(n,e){n&&n.i&&(ze.delete(n),n.i(e))}function G(n,e,t,r){if(n&&n.o){if(ze.has(n))return;ze.add(n),me.c.push(()=>{ze.delete(n),r&&(t&&n.d(1),r())}),n.o(e)}else r&&r()}function ot(n){return(n==null?void 0:n.length)!==void 0?n:Array.from(n)}function Nt(n,e){G(n,1,1,()=>{e.delete(n.key)})}function Ft(n,e,t,r,i,f,u,o,d,c,a,k){let y=n.length,S=f.length,U=y;const D={};for(;U--;)D[n[U].key]=U;const B=[],E=new Map,Q=new Map,g=[];for(U=S;U--;){const w=k(i,f,U),p=t(w);let h=u.get(p);h?r&&g.push(()=>h.p(w,e)):(h=c(p,w),h.c()),E.set(p,B[U]=h),p in D&&Q.set(p,Math.abs(U-D[p]))}const N=new Set,_=new Set;function C(w){Z(w,1),w.m(o,a),u.set(w.key,w),a=w.first,S--}for(;y&&S;){const w=B[S-1],p=n[y-1],h=w.key,v=p.key;w===p?(a=w.first,y--,S--):E.has(v)?!u.has(h)||N.has(h)?C(w):_.has(v)?y--:Q.get(h)>Q.get(v)?(_.add(h),C(w)):(N.add(v),y--):(d(p,u),y--)}for(;y--;){const w=n[y];E.has(w.key)||d(w,u)}for(;S;)C(B[S-1]);return ie(g),B}function ae(n){n&&n.c()}function le(n,e,t){const{fragment:r,after_update:i}=n.$$;r&&r.m(e,t),Fe(()=>{const f=n.$$.on_mount.map(Le).filter($e);n.$$.on_destroy?n.$$.on_destroy.push(...f):ie(f),n.$$.on_mount=[]}),i.forEach(Fe)}function se(n,e){const t=n.$$;t.fragment!==null&&(Ot(t.after_update),ie(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Gt(n,e){n.$$.dirty[0]===-1&&(we.push(n),Zt(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<<e%31}function ge(n,e,t,r,i,f,u=null,o=[-1]){const d=Ee;Ce(n);const c=n.$$={fragment:null,ctx:[],props:f,update:m,not_equal:i,bound:xe(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(d?d.$$.context:[])),callbacks:xe(),dirty:o,skip_bound:!1,root:e.target||d.$$.root};u&&u(c.root);let a=!1;if(c.ctx=t?t(n,e.props||{},(k,y,...S)=>{const U=S.length?S[0]:y;return c.ctx&&i(c.ctx[k],c.ctx[k]=U)&&(!c.skip_bound&&c.bound[k]&&c.bound[k](U),a&&Gt(n,k)),y}):[],c.update(),a=!0,ie(c.before_update),c.fragment=r?r(c.ctx):!1,e.target){if(e.hydrate){const k=zt(e.target);c.fragment&&c.fragment.l(k),k.forEach(A)}else c.fragment&&c.fragment.c();e.intro&&Z(n.$$.fragment),le(n,e.target,e.anchor),st()}Ce(d)}class _e{constructor(){Ye(this,"$$");Ye(this,"$$set")}$destroy(){se(this,1),this.$destroy=m}$on(e,t){if(!$e(t))return m;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(t),()=>{const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}$set(e){this.$$set&&!Lt(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Qt="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Qt);function Dt(n){let e,t;return{c(){e=ce("svg"),t=ce("path"),s(t,"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"),s(e,"viewBox","0 0 14 14"),s(e,"width","13"),s(e,"height","13"),s(e,"class","svelte-en2qvf")},m(r,i){j(r,e,i),T(e,t)},p:m,i:m,o:m,d(r){r&&A(e)}}}class ct extends _e{constructor(e){super(),ge(this,e,null,Dt,he,{})}}function qt(n){let e,t;return{c(){e=ce("svg"),t=ce("path"),s(t,"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"),s(e,"viewBox","0 0 30 30"),s(e,"fill","none"),s(e,"xmlns","http://www.w3.org/2000/svg"),s(e,"class","svelte-d2loi5")},m(r,i){j(r,e,i),T(e,t)},p:m,i:m,o:m,d(r){r&&A(e)}}}class ft extends _e{constructor(e){super(),ge(this,e,null,qt,he,{})}}function Vt(n){let e,t;return{c(){e=z("img"),H(e.src,t=n[3]+"area.svg")||s(e,"src",t),s(e,"alt",n[6]),s(e,"class","svelte-ltkwvy")},m(r,i){j(r,e,i)},p(r,i){i&8&&!H(e.src,t=r[3]+"area.svg")&&s(e,"src",t),i&64&&s(e,"alt",r[6])},d(r){r&&A(e)}}}function Kt(n){let e,t;return{c(){e=z("img"),H(e.src,t=n[3]+"poi.svg")||s(e,"src",t),s(e,"alt",n[6]),s(e,"class","svelte-ltkwvy")},m(r,i){j(r,e,i)},p(r,i){i&8&&!H(e.src,t=r[3]+"poi.svg")&&s(e,"src",t),i&64&&s(e,"alt",r[6])},d(r){r&&A(e)}}}function Ht(n){let e,t;return{c(){e=z("img"),H(e.src,t=n[3]+"postal_code.svg")||s(e,"src",t),s(e,"alt",n[6]),s(e,"class","svelte-ltkwvy")},m(r,i){j(r,e,i)},p(r,i){i&8&&!H(e.src,t=r[3]+"postal_code.svg")&&s(e,"src",t),i&64&&s(e,"alt",r[6])},d(r){r&&A(e)}}}function Jt(n){let e,t;return{c(){e=z("img"),H(e.src,t=n[3]+"street.svg")||s(e,"src",t),s(e,"alt",n[6]),s(e,"class","svelte-ltkwvy")},m(r,i){j(r,e,i)},p(r,i){i&8&&!H(e.src,t=r[3]+"street.svg")&&s(e,"src",t),i&64&&s(e,"alt",r[6])},d(r){r&&A(e)}}}function Xt(n){let e,t;return{c(){e=z("img"),H(e.src,t=n[3]+"road.svg")||s(e,"src",t),s(e,"alt",n[6]),s(e,"class","svelte-ltkwvy")},m(r,i){j(r,e,i)},p(r,i){i&8&&!H(e.src,t=r[3]+"road.svg")&&s(e,"src",t),i&64&&s(e,"alt",r[6])},d(r){r&&A(e)}}}function Yt(n){let e,t;return{c(){e=z("img"),H(e.src,t=n[3]+"housenumber.svg")||s(e,"src",t),s(e,"alt",n[6]),s(e,"class","svelte-ltkwvy")},m(r,i){j(r,e,i)},p(r,i){i&8&&!H(e.src,t=r[3]+"housenumber.svg")&&s(e,"src",t),i&64&&s(e,"alt",r[6])},d(r){r&&A(e)}}}function xt(n){let e,t,r,i;return{c(){e=z("img"),H(e.src,t=n[5])||s(e,"src",t),s(e,"alt",n[4]),s(e,"class","svelte-ltkwvy")},m(f,u){j(f,e,u),r||(i=V(e,"error",n[13]),r=!0)},p(f,u){u&32&&!H(e.src,t=f[5])&&s(e,"src",t),u&16&&s(e,"alt",f[4])},d(f){f&&A(e),r=!1,i()}}}function ut(n){let e,t;return{c(){e=z("span"),t=fe(n[6]),s(e,"class","secondary svelte-ltkwvy")},m(r,i){j(r,e,i),T(e,t)},p(r,i){i&64&&Be(t,r[6])},d(r){r&&A(e)}}}function $t(n){var w,p;let e,t,r,i,f,u,o,d,c=n[0].place_name.replace(/,.*/,"")+"",a,k,y=n[2]==="always"||n[2]&&!n[0].address&&((w=n[0].properties)==null?void 0:w.kind)!=="road"&&((p=n[0].properties)==null?void 0:p.kind)!=="road_relation"&&!n[0].id.startsWith("address.")&&!n[0].id.startsWith("postal_code.")&&(!n[0].id.startsWith("poi.")||!n[5]),S,U,D=n[0].place_name.replace(/[^,]*,?\s*/,"")+"",B,E,Q;function g(h,v){var x,L;return v&1&&(t=null),v&1&&(r=null),v&1&&(i=null),h[5]?xt:h[0].address?Yt:((x=h[0].properties)==null?void 0:x.kind)==="road"||((L=h[0].properties)==null?void 0:L.kind)==="road_relation"?Xt:(t==null&&(t=!!h[0].id.startsWith("address.")),t?Jt:(r==null&&(r=!!h[0].id.startsWith("postal_code.")),r?Ht:(i==null&&(i=!!h[0].id.startsWith("poi.")),i?Kt:Vt)))}let N=g(n,-1),_=N(n),C=y&&ut(n);return{c(){e=z("li"),_.c(),f=X(),u=z("span"),o=z("span"),d=z("span"),a=fe(c),k=X(),C&&C.c(),S=X(),U=z("span"),B=fe(D),s(d,"class","primary svelte-ltkwvy"),s(o,"class","svelte-ltkwvy"),s(U,"class","line2 svelte-ltkwvy"),s(u,"class","texts svelte-ltkwvy"),s(e,"tabindex","0"),s(e,"data-selected",n[1]),s(e,"class","svelte-ltkwvy"),ue(e,"selected",n[1])},m(h,v){j(h,e,v),_.m(e,null),T(e,f),T(e,u),T(u,o),T(o,d),T(d,a),T(o,k),C&&C.m(o,null),T(u,S),T(u,U),T(U,B),E||(Q=[V(e,"mouseenter",n[11]),V(e,"focus",n[12])],E=!0)},p(h,[v]){var x,L;N===(N=g(h,v))&&_?_.p(h,v):(_.d(1),_=N(h),_&&(_.c(),_.m(e,f))),v&1&&c!==(c=h[0].place_name.replace(/,.*/,"")+"")&&Be(a,c),v&37&&(y=h[2]==="always"||h[2]&&!h[0].address&&((x=h[0].properties)==null?void 0:x.kind)!=="road"&&((L=h[0].properties)==null?void 0:L.kind)!=="road_relation"&&!h[0].id.startsWith("address.")&&!h[0].id.startsWith("postal_code.")&&(!h[0].id.startsWith("poi.")||!h[5])),y?C?C.p(h,v):(C=ut(h),C.c(),C.m(o,null)):C&&(C.d(1),C=null),v&1&&D!==(D=h[0].place_name.replace(/[^,]*,?\s*/,"")+"")&&Be(B,D),v&2&&s(e,"data-selected",h[1]),v&2&&ue(e,"selected",h[1])},i:m,o:m,d(h){h&&A(e),_.d(),C&&C.d(),E=!1,ie(Q)}}}function en(n,e,t){var Q;let r,i,{feature:f}=e,{selected:u=!1}=e,{showPlaceType:o}=e,{missingIconsCache:d}=e,{iconsBaseUrl:c}=e;const a=(Q=f.properties)==null?void 0:Q.categories;let k,y,S=0;function U(g){y&&d.add(y),t(9,S++,S)}function D(g){it.call(this,n,g)}function B(g){it.call(this,n,g)}const E=g=>U(g.currentTarget);return n.$$set=g=>{"feature"in g&&t(0,f=g.feature),"selected"in g&&t(1,u=g.selected),"showPlaceType"in g&&t(2,o=g.showPlaceType),"missingIconsCache"in g&&t(8,d=g.missingIconsCache),"iconsBaseUrl"in g&&t(3,c=g.iconsBaseUrl)},n.$$.update=()=>{var g,N,_,C;if(n.$$.dirty&1848)do t(10,r--,r),t(4,k=a==null?void 0:a[r]),t(5,y=k?c+k.replace(/ /g,"_")+".svg":void 0);while(r>-1&&(!y||d.has(y)));n.$$.dirty&1&&t(6,i=f.id.startsWith("poi.")?(N=(g=f.properties)==null?void 0:g.categories)==null?void 0:N.join(", "):((C=(_=f.properties)==null?void 0:_.place_type_name)==null?void 0:C[0])??f.place_type[0])},t(10,r=(a==null?void 0:a.length)??0),[f,u,o,c,k,y,i,U,d,S,r,D,B,E]}class tn extends _e{constructor(e){super(),ge(this,e,en,$t,he,{feature:0,selected:1,showPlaceType:2,missingIconsCache:8,iconsBaseUrl:3})}}function nn(n){let e;return{c(){e=z("div"),e.innerHTML='<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><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"></path><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"></path></svg>',s(e,"class","svelte-7cmwmc")},m(t,r){j(t,e,r)},p:m,i:m,o:m,d(t){t&&A(e)}}}class rn extends _e{constructor(e){super(),ge(this,e,null,nn,he,{})}}function ln(n){let e,t;return{c(){e=ce("svg"),t=ce("path"),s(t,"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"),s(e,"viewBox","0 0 60.006 21.412"),s(e,"width","14"),s(e,"height","20"),s(e,"class","svelte-en2qvf")},m(r,i){j(r,e,i),T(e,t)},p:m,i:m,o:m,d(r){r&&A(e)}}}class sn extends _e{constructor(e){super(),ge(this,e,null,ln,he,{})}}function on(n){let e,t;return{c(){e=ce("svg"),t=ce("path"),s(t,"d","M13.101 14.261 8.74 9.899a4.797 4.797 0 0 1-1.425.748 5.165 5.165 0 0 1-1.603.248c-1.446 0-2.677-.5-3.693-1.503S.495 7.164.495 5.717c0-1.446.508-2.678 1.524-3.693C3.035 1.008 4.266.5 5.712.5c1.448 0 2.672.508 3.675 1.524 1.002 1.015 1.503 2.247 1.503 3.693 0 .558-.08 1.092-.239 1.603-.159.512-.411.98-.757 1.405l4.382 4.4a.74.74 0 0 1 .229.568.81.81 0 0 1-.249.568.787.787 0 0 1-.577.239.787.787 0 0 1-.578-.239ZM5.712 9.223c.97 0 1.796-.342 2.48-1.026a3.378 3.378 0 0 0 1.026-2.48c0-.982-.34-1.818-1.016-2.509-.677-.69-1.507-1.035-2.49-1.035a3.42 3.42 0 0 0-2.509 1.035 3.42 3.42 0 0 0-1.035 2.51c0 .982.345 1.812 1.035 2.488.691.678 1.527 1.017 2.51 1.017Z"),s(e,"width","14"),s(e,"height","14"),s(e,"viewBox","0 0 15 15"),s(e,"class","svelte-en2qvf")},m(r,i){j(r,e,i),T(e,t)},p:m,i:m,o:m,d(r){r&&A(e)}}}class cn extends _e{constructor(e){super(),ge(this,e,null,on,he,{})}}function fn(n,e,t){const r=e[1],i=e[0],f=r-i;return n===r&&t?n:((n-i)%f+f)%f+i}function at(n){const e=[...n];return e[2]<e[0]&&(e[2]+=360),e}let Re;async function un(n,e,t){const r=n==null?void 0:n.getCenterAndZoom();for(const i of e??[])if(!(r&&(i.minZoom!=null&&i.minZoom>r[0]||i.maxZoom!=null&&i.maxZoom<r[0]))){if(i.type==="fixed")return i.coordinates.join(",");e:if(i.type==="client-geolocation"){if(Re&&i.cachedLocationExpiry&&Re.time+i.cachedLocationExpiry>Date.now()){if(!Re.coords)break e;return Re.coords}let f;try{return f=await new Promise((u,o)=>{t.signal.addEventListener("abort",()=>{o(Error("aborted"))}),navigator.geolocation.getCurrentPosition(d=>{u([d.coords.longitude,d.coords.latitude].map(c=>c.toFixed(6)).join(","))},d=>{o(d)},i)}),f}catch{}finally{i.cachedLocationExpiry&&(Re={time:Date.now(),coords:f})}if(t.signal.aborted)return}if(i.type==="server-geolocation")return"ip";if(r&&i.type==="map-center")return r[1].toFixed(6)+","+r[2].toFixed(6)}}function dt(n,e,t){const r=n.slice();return r[77]=e[t],r[79]=t,r}function ht(n){let e,t;return e=new rn({}),{c(){ae(e.$$.fragment)},m(r,i){le(e,r,i),t=!0},i(r){t||(Z(e.$$.fragment,r),t=!0)},o(r){G(e.$$.fragment,r),t=!1},d(r){se(e,r)}}}function mt(n){let e,t,r,i,f;return t=new sn({}),{c(){e=z("button"),ae(t.$$.fragment),s(e,"type","button"),s(e,"title",n[9]),s(e,"class","svelte-1r7dvt7"),ue(e,"active",n[0])},m(u,o){j(u,e,o),le(t,e,null),r=!0,i||(f=V(e,"click",n[63]),i=!0)},p(u,o){(!r||o[0]&512)&&s(e,"title",u[9]),(!r||o[0]&1)&&ue(e,"active",u[0])},i(u){r||(Z(t.$$.fragment,u),r=!0)},o(u){G(t.$$.fragment,u),r=!1},d(u){u&&A(e),se(t),i=!1,f()}}}function an(n){let e,t=[],r=new Map,i,f,u,o=ot(n[13]);const d=c=>c[77].id+(c[77].address?","+c[77].address:"");for(let c=0;c<o.length;c+=1){let a=dt(n,o,c),k=d(a);r.set(k,t[c]=gt(k,a))}return{c(){e=z("ul");for(let c=0;c<t.length;c+=1)t[c].c();s(e,"class","svelte-1r7dvt7")},m(c,a){j(c,e,a);for(let k=0;k<t.length;k+=1)t[k]&&t[k].m(e,null);i=!0,f||(u=[V(e,"mouseleave",n[67]),V(e,"blur",n[68])],f=!0)},p(c,a){a[0]&8940544&&(o=ot(c[13]),Pe(),t=Ft(t,a,d,1,c,o,r,e,Nt,gt,null,dt),Ae())},i(c){if(!i){for(let a=0;a<o.length;a+=1)Z(t[a]);i=!0}},o(c){for(let a=0;a<t.length;a+=1)G(t[a]);i=!1},d(c){c&&A(e);for(let a=0;a<t.length;a+=1)t[a].d();f=!1,ie(u)}}}function dn(n){let e,t,r,i,f,u;return t=new ft({}),{c(){e=z("div"),ae(t.$$.fragment),r=X(),i=z("div"),f=fe(n[7]),s(i,"class","svelte-1r7dvt7"),s(e,"class","no-results svelte-1r7dvt7")},m(o,d){j(o,e,d),le(t,e,null),T(e,r),T(e,i),T(i,f),u=!0},p(o,d){(!u||d[0]&128)&&Be(f,o[7])},i(o){u||(Z(t.$$.fragment,o),u=!0)},o(o){G(t.$$.fragment,o),u=!1},d(o){o&&A(e),se(t)}}}function hn(n){let e="",t;return{c(){t=fe(e)},m(r,i){j(r,t,i)},p:m,i:m,o:m,d(r){r&&A(t)}}}function mn(n){let e,t,r,i,f,u,o,d,c,a,k;return t=new ft({}),d=new ct({}),{c(){e=z("div"),ae(t.$$.fragment),r=X(),i=z("div"),f=fe(n[6]),u=X(),o=z("button"),ae(d.$$.fragment),s(i,"class","svelte-1r7dvt7"),s(o,"class","svelte-1r7dvt7"),s(e,"class","error svelte-1r7dvt7")},m(y,S){j(y,e,S),le(t,e,null),T(e,r),T(e,i),T(i,f),T(e,u),T(e,o),le(d,o,null),c=!0,a||(k=V(o,"click",n[64]),a=!0)},p(y,S){(!c||S[0]&64)&&Be(f,y[6])},i(y){c||(Z(t.$$.fragment,y),Z(d.$$.fragment,y),c=!0)},o(y){G(t.$$.fragment,y),G(d.$$.fragment,y),c=!1},d(y){y&&A(e),se(t),se(d),a=!1,k()}}}function gt(n,e){let t,r,i;function f(){return e[65](e[79])}function u(){return e[66](e[77])}return r=new tn({props:{feature:e[77],showPlaceType:e[10],selected:e[14]===e[79],missingIconsCache:e[19],iconsBaseUrl:e[11]}}),r.$on("mouseenter",f),r.$on("focus",u),{key:n,first:null,c(){t=St(),ae(r.$$.fragment),this.first=t},m(o,d){j(o,t,d),le(r,o,d),i=!0},p(o,d){e=o;const c={};d[0]&8192&&(c.feature=e[77]),d[0]&1024&&(c.showPlaceType=e[10]),d[0]&24576&&(c.selected=e[14]===e[79]),d[0]&2048&&(c.iconsBaseUrl=e[11]),r.$set(c)},i(o){i||(Z(r.$$.fragment,o),i=!0)},o(o){G(r.$$.fragment,o),i=!1},d(o){o&&A(t),se(r,o)}}}function gn(n){let e,t,r,i,f,u,o,d,c,a,k,y,S,U,D,B,E,Q,g,N,_,C=!1;f=new cn({}),k=new ct({});let w=n[18]&&ht(),p=n[5]===!0&&mt(n);const h=n[55].default,v=Bt(h,n,n[54],null),x=[mn,hn,dn,an],L=[];function pe(b,I){var J,ye;return b[17]?0:b[15]?((J=b[13])==null?void 0:J.length)===0?2:b[15]&&((ye=b[13])!=null&&ye.length)?3:-1:1}return~(B=pe(n))&&(E=L[B]=x[B](n)),{c(){e=X(),t=z("form"),r=z("div"),i=z("button"),ae(f.$$.fragment),u=X(),o=z("input"),d=X(),c=z("div"),a=z("button"),ae(k.$$.fragment),y=X(),w&&w.c(),S=X(),p&&p.c(),U=X(),v&&v.c(),D=X(),E&&E.c(),s(i,"class","search-button svelte-1r7dvt7"),s(i,"type","button"),s(o,"placeholder",n[8]),s(o,"aria-label",n[8]),s(o,"class","svelte-1r7dvt7"),s(a,"type","button"),s(a,"title",n[3]),s(a,"class","svelte-1r7dvt7"),s(c,"class","clear-button-container svelte-1r7dvt7"),ue(c,"displayable",n[1]!==""),s(r,"class","input-group svelte-1r7dvt7"),s(t,"tabindex","0"),s(t,"class",Q=tt(n[2])+" svelte-1r7dvt7"),ue(t,"can-collapse",n[4]&&n[1]==="")},m(b,I){j(b,e,I),j(b,t,I),T(t,r),T(r,i),le(f,i,null),T(r,u),T(r,o),n[57](o),nt(o,n[1]),T(r,d),T(r,c),T(c,a),le(k,a,null),T(c,y),w&&w.m(c,null),T(r,S),p&&p.m(r,null),T(r,U),v&&v.m(r,null),T(t,D),~B&&L[B].m(t,null),g=!0,N||(_=[V(i,"click",n[56]),V(o,"input",n[58]),V(o,"focus",n[59]),V(o,"blur",n[60]),V(o,"keydown",n[21]),V(o,"input",n[61]),V(a,"click",n[62]),V(t,"submit",Ut(n[20]))],N=!0)},p(b,I){(!g||I[0]&256)&&s(o,"placeholder",b[8]),(!g||I[0]&256)&&s(o,"aria-label",b[8]),I[0]&2&&o.value!==b[1]&&nt(o,b[1]),(!g||I[0]&8)&&s(a,"title",b[3]),b[18]?w?I[0]&262144&&Z(w,1):(w=ht(),w.c(),Z(w,1),w.m(c,null)):w&&(Pe(),G(w,1,1,()=>{w=null}),Ae()),(!g||I[0]&2)&&ue(c,"displayable",b[1]!==""),b[5]===!0?p?(p.p(b,I),I[0]&32&&Z(p,1)):(p=mt(b),p.c(),Z(p,1),p.m(r,U)):p&&(Pe(),G(p,1,1,()=>{p=null}),Ae()),v&&v.p&&(!g||I[1]&8388608)&&Ct(v,h,b,b[54],g?Et(h,b[54],I,null):Rt(b[54]),null);let J=B;B=pe(b),B===J?~B&&L[B].p(b,I):(E&&(Pe(),G(L[J],1,1,()=>{L[J]=null}),Ae()),~B?(E=L[B],E?E.p(b,I):(E=L[B]=x[B](b),E.c()),Z(E,1),E.m(t,null)):E=null),(!g||I[0]&4&&Q!==(Q=tt(b[2])+" svelte-1r7dvt7"))&&s(t,"class",Q),(!g||I[0]&22)&&ue(t,"can-collapse",b[4]&&b[1]==="")},i(b){g||(Z(C),Z(f.$$.fragment,b),Z(k.$$.fragment,b),Z(w),Z(p),Z(v,b),Z(E),g=!0)},o(b){G(C),G(f.$$.fragment,b),G(k.$$.fragment,b),G(w),G(p),G(v,b),G(E),g=!1},d(b){b&&(A(e),A(t)),se(f),n[57](null),se(k),w&&w.d(),p&&p.d(),v&&v.d(b),~B&&L[B].d(),N=!1,ie(_)}}}function _n(n,e,t){let r,{$$slots:i={},$$scope:f}=e,{class:u=void 0}=e,{apiKey:o}=e,{bbox:d=void 0}=e,{clearButtonTitle:c="clear"}=e,{clearOnBlur:a=!1}=e,{collapsed:k=!1}=e,{country:y=void 0}=e,{debounceSearch:S=200}=e,{enableReverse:U=!1}=e,{errorMessage:D="Something went wrong…"}=e,{filter:B=()=>!0}=e,{flyTo:E=!0}=e,{fuzzyMatch:Q=!0}=e,{language:g=void 0}=e,{limit:N=void 0}=e,{mapController:_=void 0}=e,{minLength:C=2}=e,{noResultsMessage:w="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!"}=e,{placeholder:p="Search"}=e,{proximity:h=[{type:"server-geolocation"}]}=e,{reverseActive:v=U==="always"}=e,{reverseButtonTitle:x="toggle reverse geocoding"}=e,{searchValue:L=""}=e,{showFullGeometry:pe=!0}=e,{showPlaceType:b="ifNeeded"}=e,{showResultsWhileTyping:I=!0}=e,{types:J=void 0}=e,{zoom:ye=16}=e,{maxZoom:Se=18}=e,{apiUrl:Qe="https://api.maptiler.com/geocoding"}=e,{fetchParameters:De={}}=e,{iconsBaseUrl:_t="https://cdn.maptiler.com/maptiler-geocoding-control/v1.0.1-rc1/icons/"}=e,{adjustUrlQuery:qe=l=>{}}=e;function vn(){ee.focus()}function kn(){ee.blur()}function yt(l,O=!0){t(1,L=l),O?(t(14,W=-1),wt()):(He(),setTimeout(()=>{ee.focus(),ee.select()}))}function pn(){t(13,R=void 0),t(51,M=void 0),t(14,W=-1)}function Tn(){t(50,q=[]),t(51,M=void 0)}let Te=!1,R,q,M,bt="",ee,W=-1,te,Ie=[],be,Me,je,Ve;const Mn=new Set,de=It();At(()=>{_&&(_.setEventHandler(void 0),_.indicateReverse(!1),_.setSelectedMarker(-1),_.setMarkers(void 0,void 0))});function wt(l){if(Me&&(clearTimeout(Me),Me=void 0),W>-1&&R)t(51,M=R[W]),t(1,L=M.place_name.replace(/,.*/,"")),t(17,te=void 0),t(50,q=void 0),t(14,W=-1);else if(L){const O=l||!vt();Ke(L,{exact:!0}).then(()=>{t(50,q=R),t(51,M=void 0),O&&Ln()}).catch(ne=>t(17,te=ne))}}function vt(){return/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(L)}async function Ke(l,{byId:O=!1,exact:ne=!1}={}){t(17,te=void 0),be==null||be.abort();const re=new AbortController;t(18,be=re);try{const K=vt(),$=new URLSearchParams;if(g!==void 0&&$.set("language",Array.isArray(g)?g.join(","):g??""),J&&$.set("types",J.join(",")),d&&$.set("bbox",d.map(We=>We.toFixed(6)).join(",")),y&&$.set("country",Array.isArray(y)?y.join(","):y),!O&&!K){const We=await un(_,h,re);We&&$.set("proximity",We),(ne||!I)&&$.set("autocomplete","false"),$.set("fuzzyMatch",String(Q))}N!==void 0&&(!K||(J==null?void 0:J.length)===1)&&$.set("limit",String(N)),$.set("key",o),qe($);const Ze=Qe+"/"+encodeURIComponent(l)+".json?"+$.toString();if(Ze===bt){O?(t(13,R=void 0),t(51,M=Ie[0])):t(13,R=Ie);return}bt=Ze;const kt=await fetch(Ze,{signal:re.signal,...De});if(!kt.ok)throw new Error;const Xe=await kt.json();de("response",{url:Ze,featureCollection:Xe}),O?(t(13,R=void 0),t(51,M=Xe.features[0]),Ie=[M]):(t(13,R=Xe.features.filter(B)),Ie=R,K&&ee.focus())}catch(K){if(K&&typeof K=="object"&&"name"in K&&K.name==="AbortError")return;throw K}finally{re===be&&t(18,be=void 0)}}function Ln(){var ne;if(!(q!=null&&q.length)||!E)return;const l=[180,90,-180,-90],O=!q.some(re=>!re.matching_text);for(const re of q)if(O||!re.matching_text)for(const K of[0,1,2,3])l[K]=Math[K<2?"min":"max"](l[K],((ne=re.bbox)==null?void 0:ne[K])??re.center[K%2]);_&&q.length>0&&(M&&l[0]===l[2]&&l[1]===l[3]?_.flyTo(M.center,ye):_.fitBounds(at(l),50,Se))}function Bn(l){t(0,v=U==="always"),yt(fn(l[0],[-180,180],!0).toFixed(6)+","+l[1].toFixed(6))}function En(l){if(!R)return;let O=l.key==="ArrowDown"?1:l.key==="ArrowUp"?-1:0;O?(W===-1&&O===-1&&t(14,W=R.length),t(14,W+=O),W>=R.length&&t(14,W=-1),l.preventDefault()):["ArrowLeft","ArrowRight","Home","End"].includes(l.key)&&t(14,W=-1)}function He(l=!0){if(t(17,te=void 0),I){if(Me&&clearTimeout(Me),L.length<C)return;const O=L;Me=window.setTimeout(()=>{Ke(O).catch(ne=>t(17,te=ne))},l?S:0)}else t(13,R=void 0),t(17,te=void 0)}function Je(l){t(51,M=l),t(1,L=l.place_name),t(14,W=-1)}const Cn=()=>ee.focus();function Rn(l){Oe[l?"unshift":"push"](()=>{ee=l,t(16,ee)})}function Sn(){L=this.value,t(1,L),t(12,Te),t(26,a)}const Un=()=>t(12,Te=!0),zn=()=>t(12,Te=!1),Pn=()=>He(),An=()=>{t(1,L=""),ee.focus()},In=()=>t(0,v=!v),jn=()=>t(17,te=void 0),Zn=l=>t(14,W=l),Wn=l=>Je(l),On=()=>t(14,W=-1),Nn=()=>{};return n.$$set=l=>{"class"in l&&t(2,u=l.class),"apiKey"in l&&t(24,o=l.apiKey),"bbox"in l&&t(25,d=l.bbox),"clearButtonTitle"in l&&t(3,c=l.clearButtonTitle),"clearOnBlur"in l&&t(26,a=l.clearOnBlur),"collapsed"in l&&t(4,k=l.collapsed),"country"in l&&t(27,y=l.country),"debounceSearch"in l&&t(28,S=l.debounceSearch),"enableReverse"in l&&t(5,U=l.enableReverse),"errorMessage"in l&&t(6,D=l.errorMessage),"filter"in l&&t(29,B=l.filter),"flyTo"in l&&t(30,E=l.flyTo),"fuzzyMatch"in l&&t(31,Q=l.fuzzyMatch),"language"in l&&t(32,g=l.language),"limit"in l&&t(33,N=l.limit),"mapController"in l&&t(34,_=l.mapController),"minLength"in l&&t(35,C=l.minLength),"noResultsMessage"in l&&t(7,w=l.noResultsMessage),"placeholder"in l&&t(8,p=l.placeholder),"proximity"in l&&t(36,h=l.proximity),"reverseActive"in l&&t(0,v=l.reverseActive),"reverseButtonTitle"in l&&t(9,x=l.reverseButtonTitle),"searchValue"in l&&t(1,L=l.searchValue),"showFullGeometry"in l&&t(37,pe=l.showFullGeometry),"showPlaceType"in l&&t(10,b=l.showPlaceType),"showResultsWhileTyping"in l&&t(38,I=l.showResultsWhileTyping),"types"in l&&t(39,J=l.types),"zoom"in l&&t(40,ye=l.zoom),"maxZoom"in l&&t(41,Se=l.maxZoom),"apiUrl"in l&&t(42,Qe=l.apiUrl),"fetchParameters"in l&&t(43,De=l.fetchParameters),"iconsBaseUrl"in l&&t(11,_t=l.iconsBaseUrl),"adjustUrlQuery"in l&&t(44,qe=l.adjustUrlQuery),"$$scope"in l&&t(54,f=l.$$scope)},n.$$.update=()=>{if(n.$$.dirty[0]&67112960&&setTimeout(()=>{t(15,je=Te),a&&!Te&&t(1,L="")}),n.$$.dirty[0]&8194|n.$$.dirty[1]&16&&L.length<C&&(t(51,M=void 0),t(13,R=void 0),t(17,te=void 0),t(50,q=R)),n.$$.dirty[1]&1048640&&pe&&M&&!M.address&&M.geometry.type==="Point"&&Ke(M.id,{byId:!0}).catch(l=>t(17,te=l)),n.$$.dirty[0]&1073741824|n.$$.dirty[1]&3147272&&(_&&M&&M.id!==Ve&&E&&(!M.bbox||M.bbox[0]===M.bbox[2]&&M.bbox[1]===M.bbox[3]?_.flyTo(M.center,M.id.startsWith("poi.")||M.id.startsWith("address.")?Se:ye):_.fitBounds(at(M.bbox),50,Se),t(13,R=void 0),t(50,q=void 0),t(14,W=-1)),t(52,Ve=M==null?void 0:M.id)),n.$$.dirty[0]&8192|n.$$.dirty[1]&524288&&q!==R&&t(50,q=void 0),n.$$.dirty[1]&1572872&&_&&_.setMarkers(q,M),n.$$.dirty[0]&2&&t(14,W=-1),n.$$.dirty[0]&40961|n.$$.dirty[1]&8&&_&&_.setEventHandler(l=>{switch(l.type){case"mapClick":v&&Bn(l.coordinates);break;case"markerClick":{const O=R==null?void 0:R.find(ne=>ne.id===l.id);O&&Je(O)}break;case"markerMouseEnter":t(14,W=je?(R==null?void 0:R.findIndex(O=>O.id===l.id))??-1:-1);break;case"markerMouseLeave":t(14,W=-1);break}}),n.$$.dirty[0]&16384|n.$$.dirty[1]&8&&(_==null||_.setSelectedMarker(W)),n.$$.dirty[0]&24576&&t(53,r=R==null?void 0:R[W]),n.$$.dirty[0]&2|n.$$.dirty[1]&8){const l=/^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(L);_==null||_.setReverseMarker(l?[Number(l[1]),Number(l[2])]:void 0)}n.$$.dirty[1]&4194304&&de("select",r),n.$$.dirty[1]&1048576&&de("pick",M),n.$$.dirty[0]&40960&&de("optionsVisibilityChange",je&&!!R),n.$$.dirty[0]&8192&&de("featuresListed",R),n.$$.dirty[1]&524288&&de("featuresMarked",q),n.$$.dirty[0]&1&&de("reverseToggle",v),n.$$.dirty[0]&2&&de("queryChange",L),n.$$.dirty[0]&1|n.$$.dirty[1]&8&&_&&_.indicateReverse(v)},[v,L,u,c,k,U,D,w,p,x,b,_t,Te,R,W,je,ee,te,be,Mn,wt,En,He,Je,o,d,a,y,S,B,E,Q,g,N,_,C,h,pe,I,J,ye,Se,Qe,De,qe,vn,kn,yt,pn,Tn,q,M,Ve,r,f,i,Cn,Rn,Sn,Un,zn,Pn,An,In,jn,Zn,Wn,On,Nn]}let yn=class extends _e{constructor(e){super(),ge(this,e,_n,gn,he,{class:2,apiKey:24,bbox:25,clearButtonTitle:3,clearOnBlur:26,collapsed:4,country:27,debounceSearch:28,enableReverse:5,errorMessage:6,filter:29,flyTo:30,fuzzyMatch:31,language:32,limit:33,mapController:34,minLength:35,noResultsMessage:7,placeholder:8,proximity:36,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:37,showPlaceType:10,showResultsWhileTyping:38,types:39,zoom:40,maxZoom:41,apiUrl:42,fetchParameters:43,iconsBaseUrl:11,adjustUrlQuery:44,focus:45,blur:46,setQuery:47,clearList:48,clearMap:49},null,[-1,-1,-1])}get focus(){return this.$$.ctx[45]}get blur(){return this.$$.ctx[46]}get setQuery(){return this.$$.ctx[47]}get clearList(){return this.$$.ctx[48]}get clearMap(){return this.$$.ctx[49]}};const bn=new FinalizationRegistry(n=>{n.$destroy()});class wn extends EventTarget{constructor({target:t,...r}){super();Tt(this,Y,void 0);Mt(this,Y,new yn({target:t,props:r}));for(const i of["select","pick","featuresListed","featuresMarked","response","optionsVisibilityChange","reverseToggle","queryChange"])oe(this,Y).$on(i,f=>this.dispatchEvent(f));bn.register(this,oe(this,Y))}setOptions(t){oe(this,Y).$set(t)}setQuery(t,r=!0){var i;(i=oe(this,Y))==null||i.setQuery(t,r)}clearMap(){var t;(t=oe(this,Y))==null||t.clearMap()}clearList(){var t;(t=oe(this,Y))==null||t.clearList()}focus(){var t;(t=oe(this,Y))==null||t.focus()}blur(){var t;(t=oe(this,Y))==null||t.blur()}}Y=new WeakMap,P.GeocodingControl=wn,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(P,m){typeof exports=="object"&&typeof module<"u"?m(exports):typeof define=="function"&&define.amd?define(["exports"],m):(P=typeof globalThis<"u"?globalThis:P||self,m(P.maptilerGeocoder={}))})(this,function(P){"use strict";var Fn=Object.defineProperty;var Gn=(P,m,F)=>m in P?Fn(P,m,{enumerable:!0,configurable:!0,writable:!0,value:F}):P[m]=F;var Ye=(P,m,F)=>(Gn(P,typeof m!="symbol"?m+"":m,F),F),pt=(P,m,F)=>{if(!m.has(P))throw TypeError("Cannot "+F)};var oe=(P,m,F)=>(pt(P,m,"read from private field"),F?F.call(P):m.get(P)),Tt=(P,m,F)=>{if(m.has(P))throw TypeError("Cannot add the same private member more than once");m instanceof WeakSet?m.add(P):m.set(P,F)},Mt=(P,m,F,Le)=>(pt(P,m,"write to private field"),Le?Le.call(P,F):m.set(P,F),F);var Y;function m(){}function F(n,e){for(const t in e)n[t]=e[t];return n}function Le(n){return n()}function xe(){return Object.create(null)}function ie(n){n.forEach(Le)}function $e(n){return typeof n=="function"}function he(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Ue;function H(n,e){return n===e?!0:(Ue||(Ue=document.createElement("a")),Ue.href=e,n===Ue.href)}function Lt(n){return Object.keys(n).length===0}function Bt(n,e,t,r){if(n){const i=et(n,e,t,r);return n[0](i)}}function et(n,e,t,r){return n[1]&&r?F(t.ctx.slice(),n[1](r(e))):t.ctx}function Et(n,e,t,r){if(n[2]&&r){const i=n[2](r(t));if(e.dirty===void 0)return i;if(typeof i=="object"){const f=[],u=Math.max(e.dirty.length,i.length);for(let o=0;o<u;o+=1)f[o]=e.dirty[o]|i[o];return f}return e.dirty|i}return e.dirty}function Ct(n,e,t,r,i,f){if(i){const u=et(e,t,r,f);n.p(u,i)}}function Rt(n){if(n.ctx.length>32){const e=[],t=n.ctx.length/32;for(let r=0;r<t;r++)e[r]=-1;return e}return-1}function tt(n){return n??""}function T(n,e){n.appendChild(e)}function j(n,e,t){n.insertBefore(e,t||null)}function A(n){n.parentNode&&n.parentNode.removeChild(n)}function z(n){return document.createElement(n)}function ce(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function fe(n){return document.createTextNode(n)}function X(){return fe(" ")}function St(){return fe("")}function V(n,e,t,r){return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}function Ut(n){return function(e){return e.preventDefault(),n.call(this,e)}}function s(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function zt(n){return Array.from(n.childNodes)}function Be(n,e){e=""+e,n.data!==e&&(n.data=e)}function nt(n,e){n.value=e??""}function ue(n,e,t){n.classList.toggle(e,!!t)}function Pt(n,e,{bubbles:t=!1,cancelable:r=!1}={}){return new CustomEvent(n,{detail:e,bubbles:t,cancelable:r})}let Ee;function Ce(n){Ee=n}function rt(){if(!Ee)throw new Error("Function called outside component initialization");return Ee}function At(n){rt().$$.on_destroy.push(n)}function It(){const n=rt();return(e,t,{cancelable:r=!1}={})=>{const i=n.$$.callbacks[e];if(i){const f=Pt(e,t,{cancelable:r});return i.slice().forEach(u=>{u.call(n,f)}),!f.defaultPrevented}return!0}}function it(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(r=>r.call(this,e))}const we=[],Oe=[];let ve=[];const lt=[],jt=Promise.resolve();let Ne=!1;function Zt(){Ne||(Ne=!0,jt.then(st))}function Fe(n){ve.push(n)}const Ge=new Set;let ke=0;function st(){if(ke!==0)return;const n=Ee;do{try{for(;ke<we.length;){const e=we[ke];ke++,Ce(e),Wt(e.$$)}}catch(e){throw we.length=0,ke=0,e}for(Ce(null),we.length=0,ke=0;Oe.length;)Oe.pop()();for(let e=0;e<ve.length;e+=1){const t=ve[e];Ge.has(t)||(Ge.add(t),t())}ve.length=0}while(we.length);for(;lt.length;)lt.pop()();Ne=!1,Ge.clear(),Ce(n)}function Wt(n){if(n.fragment!==null){n.update(),ie(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(Fe)}}function Ot(n){const e=[],t=[];ve.forEach(r=>n.indexOf(r)===-1?e.push(r):t.push(r)),t.forEach(r=>r()),ve=e}const ze=new Set;let me;function Pe(){me={r:0,c:[],p:me}}function Ae(){me.r||ie(me.c),me=me.p}function Z(n,e){n&&n.i&&(ze.delete(n),n.i(e))}function G(n,e,t,r){if(n&&n.o){if(ze.has(n))return;ze.add(n),me.c.push(()=>{ze.delete(n),r&&(t&&n.d(1),r())}),n.o(e)}else r&&r()}function ot(n){return(n==null?void 0:n.length)!==void 0?n:Array.from(n)}function Nt(n,e){G(n,1,1,()=>{e.delete(n.key)})}function Ft(n,e,t,r,i,f,u,o,d,c,a,k){let y=n.length,S=f.length,U=y;const D={};for(;U--;)D[n[U].key]=U;const B=[],E=new Map,Q=new Map,g=[];for(U=S;U--;){const w=k(i,f,U),p=t(w);let h=u.get(p);h?r&&g.push(()=>h.p(w,e)):(h=c(p,w),h.c()),E.set(p,B[U]=h),p in D&&Q.set(p,Math.abs(U-D[p]))}const N=new Set,_=new Set;function C(w){Z(w,1),w.m(o,a),u.set(w.key,w),a=w.first,S--}for(;y&&S;){const w=B[S-1],p=n[y-1],h=w.key,v=p.key;w===p?(a=w.first,y--,S--):E.has(v)?!u.has(h)||N.has(h)?C(w):_.has(v)?y--:Q.get(h)>Q.get(v)?(_.add(h),C(w)):(N.add(v),y--):(d(p,u),y--)}for(;y--;){const w=n[y];E.has(w.key)||d(w,u)}for(;S;)C(B[S-1]);return ie(g),B}function ae(n){n&&n.c()}function le(n,e,t){const{fragment:r,after_update:i}=n.$$;r&&r.m(e,t),Fe(()=>{const f=n.$$.on_mount.map(Le).filter($e);n.$$.on_destroy?n.$$.on_destroy.push(...f):ie(f),n.$$.on_mount=[]}),i.forEach(Fe)}function se(n,e){const t=n.$$;t.fragment!==null&&(Ot(t.after_update),ie(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Gt(n,e){n.$$.dirty[0]===-1&&(we.push(n),Zt(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<<e%31}function ge(n,e,t,r,i,f,u=null,o=[-1]){const d=Ee;Ce(n);const c=n.$$={fragment:null,ctx:[],props:f,update:m,not_equal:i,bound:xe(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(d?d.$$.context:[])),callbacks:xe(),dirty:o,skip_bound:!1,root:e.target||d.$$.root};u&&u(c.root);let a=!1;if(c.ctx=t?t(n,e.props||{},(k,y,...S)=>{const U=S.length?S[0]:y;return c.ctx&&i(c.ctx[k],c.ctx[k]=U)&&(!c.skip_bound&&c.bound[k]&&c.bound[k](U),a&&Gt(n,k)),y}):[],c.update(),a=!0,ie(c.before_update),c.fragment=r?r(c.ctx):!1,e.target){if(e.hydrate){const k=zt(e.target);c.fragment&&c.fragment.l(k),k.forEach(A)}else c.fragment&&c.fragment.c();e.intro&&Z(n.$$.fragment),le(n,e.target,e.anchor),st()}Ce(d)}class _e{constructor(){Ye(this,"$$");Ye(this,"$$set")}$destroy(){se(this,1),this.$destroy=m}$on(e,t){if(!$e(t))return m;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(t),()=>{const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}$set(e){this.$$set&&!Lt(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Qt="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Qt);function Dt(n){let e,t;return{c(){e=ce("svg"),t=ce("path"),s(t,"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"),s(e,"viewBox","0 0 14 14"),s(e,"width","13"),s(e,"height","13"),s(e,"class","svelte-en2qvf")},m(r,i){j(r,e,i),T(e,t)},p:m,i:m,o:m,d(r){r&&A(e)}}}class ct extends _e{constructor(e){super(),ge(this,e,null,Dt,he,{})}}function qt(n){let e,t;return{c(){e=ce("svg"),t=ce("path"),s(t,"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"),s(e,"viewBox","0 0 30 30"),s(e,"fill","none"),s(e,"xmlns","http://www.w3.org/2000/svg"),s(e,"class","svelte-d2loi5")},m(r,i){j(r,e,i),T(e,t)},p:m,i:m,o:m,d(r){r&&A(e)}}}class ft extends _e{constructor(e){super(),ge(this,e,null,qt,he,{})}}function Vt(n){let e,t;return{c(){e=z("img"),H(e.src,t=n[3]+"area.svg")||s(e,"src",t),s(e,"alt",n[6]),s(e,"class","svelte-ltkwvy")},m(r,i){j(r,e,i)},p(r,i){i&8&&!H(e.src,t=r[3]+"area.svg")&&s(e,"src",t),i&64&&s(e,"alt",r[6])},d(r){r&&A(e)}}}function Kt(n){let e,t;return{c(){e=z("img"),H(e.src,t=n[3]+"poi.svg")||s(e,"src",t),s(e,"alt",n[6]),s(e,"class","svelte-ltkwvy")},m(r,i){j(r,e,i)},p(r,i){i&8&&!H(e.src,t=r[3]+"poi.svg")&&s(e,"src",t),i&64&&s(e,"alt",r[6])},d(r){r&&A(e)}}}function Ht(n){let e,t;return{c(){e=z("img"),H(e.src,t=n[3]+"postal_code.svg")||s(e,"src",t),s(e,"alt",n[6]),s(e,"class","svelte-ltkwvy")},m(r,i){j(r,e,i)},p(r,i){i&8&&!H(e.src,t=r[3]+"postal_code.svg")&&s(e,"src",t),i&64&&s(e,"alt",r[6])},d(r){r&&A(e)}}}function Jt(n){let e,t;return{c(){e=z("img"),H(e.src,t=n[3]+"street.svg")||s(e,"src",t),s(e,"alt",n[6]),s(e,"class","svelte-ltkwvy")},m(r,i){j(r,e,i)},p(r,i){i&8&&!H(e.src,t=r[3]+"street.svg")&&s(e,"src",t),i&64&&s(e,"alt",r[6])},d(r){r&&A(e)}}}function Xt(n){let e,t;return{c(){e=z("img"),H(e.src,t=n[3]+"road.svg")||s(e,"src",t),s(e,"alt",n[6]),s(e,"class","svelte-ltkwvy")},m(r,i){j(r,e,i)},p(r,i){i&8&&!H(e.src,t=r[3]+"road.svg")&&s(e,"src",t),i&64&&s(e,"alt",r[6])},d(r){r&&A(e)}}}function Yt(n){let e,t;return{c(){e=z("img"),H(e.src,t=n[3]+"housenumber.svg")||s(e,"src",t),s(e,"alt",n[6]),s(e,"class","svelte-ltkwvy")},m(r,i){j(r,e,i)},p(r,i){i&8&&!H(e.src,t=r[3]+"housenumber.svg")&&s(e,"src",t),i&64&&s(e,"alt",r[6])},d(r){r&&A(e)}}}function xt(n){let e,t,r,i;return{c(){e=z("img"),H(e.src,t=n[5])||s(e,"src",t),s(e,"alt",n[4]),s(e,"class","svelte-ltkwvy")},m(f,u){j(f,e,u),r||(i=V(e,"error",n[13]),r=!0)},p(f,u){u&32&&!H(e.src,t=f[5])&&s(e,"src",t),u&16&&s(e,"alt",f[4])},d(f){f&&A(e),r=!1,i()}}}function ut(n){let e,t;return{c(){e=z("span"),t=fe(n[6]),s(e,"class","secondary svelte-ltkwvy")},m(r,i){j(r,e,i),T(e,t)},p(r,i){i&64&&Be(t,r[6])},d(r){r&&A(e)}}}function $t(n){var w,p;let e,t,r,i,f,u,o,d,c=n[0].place_name.replace(/,.*/,"")+"",a,k,y=n[2]==="always"||n[2]&&!n[0].address&&((w=n[0].properties)==null?void 0:w.kind)!=="road"&&((p=n[0].properties)==null?void 0:p.kind)!=="road_relation"&&!n[0].id.startsWith("address.")&&!n[0].id.startsWith("postal_code.")&&(!n[0].id.startsWith("poi.")||!n[5]),S,U,D=n[0].place_name.replace(/[^,]*,?\s*/,"")+"",B,E,Q;function g(h,v){var x,L;return v&1&&(t=null),v&1&&(r=null),v&1&&(i=null),h[5]?xt:h[0].address?Yt:((x=h[0].properties)==null?void 0:x.kind)==="road"||((L=h[0].properties)==null?void 0:L.kind)==="road_relation"?Xt:(t==null&&(t=!!h[0].id.startsWith("address.")),t?Jt:(r==null&&(r=!!h[0].id.startsWith("postal_code.")),r?Ht:(i==null&&(i=!!h[0].id.startsWith("poi.")),i?Kt:Vt)))}let N=g(n,-1),_=N(n),C=y&&ut(n);return{c(){e=z("li"),_.c(),f=X(),u=z("span"),o=z("span"),d=z("span"),a=fe(c),k=X(),C&&C.c(),S=X(),U=z("span"),B=fe(D),s(d,"class","primary svelte-ltkwvy"),s(o,"class","svelte-ltkwvy"),s(U,"class","line2 svelte-ltkwvy"),s(u,"class","texts svelte-ltkwvy"),s(e,"tabindex","0"),s(e,"data-selected",n[1]),s(e,"class","svelte-ltkwvy"),ue(e,"selected",n[1])},m(h,v){j(h,e,v),_.m(e,null),T(e,f),T(e,u),T(u,o),T(o,d),T(d,a),T(o,k),C&&C.m(o,null),T(u,S),T(u,U),T(U,B),E||(Q=[V(e,"mouseenter",n[11]),V(e,"focus",n[12])],E=!0)},p(h,[v]){var x,L;N===(N=g(h,v))&&_?_.p(h,v):(_.d(1),_=N(h),_&&(_.c(),_.m(e,f))),v&1&&c!==(c=h[0].place_name.replace(/,.*/,"")+"")&&Be(a,c),v&37&&(y=h[2]==="always"||h[2]&&!h[0].address&&((x=h[0].properties)==null?void 0:x.kind)!=="road"&&((L=h[0].properties)==null?void 0:L.kind)!=="road_relation"&&!h[0].id.startsWith("address.")&&!h[0].id.startsWith("postal_code.")&&(!h[0].id.startsWith("poi.")||!h[5])),y?C?C.p(h,v):(C=ut(h),C.c(),C.m(o,null)):C&&(C.d(1),C=null),v&1&&D!==(D=h[0].place_name.replace(/[^,]*,?\s*/,"")+"")&&Be(B,D),v&2&&s(e,"data-selected",h[1]),v&2&&ue(e,"selected",h[1])},i:m,o:m,d(h){h&&A(e),_.d(),C&&C.d(),E=!1,ie(Q)}}}function en(n,e,t){var Q;let r,i,{feature:f}=e,{selected:u=!1}=e,{showPlaceType:o}=e,{missingIconsCache:d}=e,{iconsBaseUrl:c}=e;const a=(Q=f.properties)==null?void 0:Q.categories;let k,y,S=0;function U(g){y&&d.add(y),t(9,S++,S)}function D(g){it.call(this,n,g)}function B(g){it.call(this,n,g)}const E=g=>U(g.currentTarget);return n.$$set=g=>{"feature"in g&&t(0,f=g.feature),"selected"in g&&t(1,u=g.selected),"showPlaceType"in g&&t(2,o=g.showPlaceType),"missingIconsCache"in g&&t(8,d=g.missingIconsCache),"iconsBaseUrl"in g&&t(3,c=g.iconsBaseUrl)},n.$$.update=()=>{var g,N,_,C;if(n.$$.dirty&1848)do t(10,r--,r),t(4,k=a==null?void 0:a[r]),t(5,y=k?c+k.replace(/ /g,"_")+".svg":void 0);while(r>-1&&(!y||d.has(y)));n.$$.dirty&1&&t(6,i=f.id.startsWith("poi.")?(N=(g=f.properties)==null?void 0:g.categories)==null?void 0:N.join(", "):((C=(_=f.properties)==null?void 0:_.place_type_name)==null?void 0:C[0])??f.place_type[0])},t(10,r=(a==null?void 0:a.length)??0),[f,u,o,c,k,y,i,U,d,S,r,D,B,E]}class tn extends _e{constructor(e){super(),ge(this,e,en,$t,he,{feature:0,selected:1,showPlaceType:2,missingIconsCache:8,iconsBaseUrl:3})}}function nn(n){let e;return{c(){e=z("div"),e.innerHTML='<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><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"></path><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"></path></svg>',s(e,"class","svelte-7cmwmc")},m(t,r){j(t,e,r)},p:m,i:m,o:m,d(t){t&&A(e)}}}class rn extends _e{constructor(e){super(),ge(this,e,null,nn,he,{})}}function ln(n){let e,t;return{c(){e=ce("svg"),t=ce("path"),s(t,"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"),s(e,"viewBox","0 0 60.006 21.412"),s(e,"width","14"),s(e,"height","20"),s(e,"class","svelte-en2qvf")},m(r,i){j(r,e,i),T(e,t)},p:m,i:m,o:m,d(r){r&&A(e)}}}class sn extends _e{constructor(e){super(),ge(this,e,null,ln,he,{})}}function on(n){let e,t;return{c(){e=ce("svg"),t=ce("path"),s(t,"d","M13.101 14.261 8.74 9.899a4.797 4.797 0 0 1-1.425.748 5.165 5.165 0 0 1-1.603.248c-1.446 0-2.677-.5-3.693-1.503S.495 7.164.495 5.717c0-1.446.508-2.678 1.524-3.693C3.035 1.008 4.266.5 5.712.5c1.448 0 2.672.508 3.675 1.524 1.002 1.015 1.503 2.247 1.503 3.693 0 .558-.08 1.092-.239 1.603-.159.512-.411.98-.757 1.405l4.382 4.4a.74.74 0 0 1 .229.568.81.81 0 0 1-.249.568.787.787 0 0 1-.577.239.787.787 0 0 1-.578-.239ZM5.712 9.223c.97 0 1.796-.342 2.48-1.026a3.378 3.378 0 0 0 1.026-2.48c0-.982-.34-1.818-1.016-2.509-.677-.69-1.507-1.035-2.49-1.035a3.42 3.42 0 0 0-2.509 1.035 3.42 3.42 0 0 0-1.035 2.51c0 .982.345 1.812 1.035 2.488.691.678 1.527 1.017 2.51 1.017Z"),s(e,"width","14"),s(e,"height","14"),s(e,"viewBox","0 0 15 15"),s(e,"class","svelte-en2qvf")},m(r,i){j(r,e,i),T(e,t)},p:m,i:m,o:m,d(r){r&&A(e)}}}class cn extends _e{constructor(e){super(),ge(this,e,null,on,he,{})}}function fn(n,e,t){const r=e[1],i=e[0],f=r-i;return n===r&&t?n:((n-i)%f+f)%f+i}function at(n){const e=[...n];return e[2]<e[0]&&(e[2]+=360),e}let Re;async function un(n,e,t){const r=n==null?void 0:n.getCenterAndZoom();for(const i of e??[])if(!(r&&(i.minZoom!=null&&i.minZoom>r[0]||i.maxZoom!=null&&i.maxZoom<r[0]))){if(i.type==="fixed")return i.coordinates.join(",");e:if(i.type==="client-geolocation"){if(Re&&i.cachedLocationExpiry&&Re.time+i.cachedLocationExpiry>Date.now()){if(!Re.coords)break e;return Re.coords}let f;try{return f=await new Promise((u,o)=>{t.signal.addEventListener("abort",()=>{o(Error("aborted"))}),navigator.geolocation.getCurrentPosition(d=>{u([d.coords.longitude,d.coords.latitude].map(c=>c.toFixed(6)).join(","))},d=>{o(d)},i)}),f}catch{}finally{i.cachedLocationExpiry&&(Re={time:Date.now(),coords:f})}if(t.signal.aborted)return}if(i.type==="server-geolocation")return"ip";if(r&&i.type==="map-center")return r[1].toFixed(6)+","+r[2].toFixed(6)}}function dt(n,e,t){const r=n.slice();return r[77]=e[t],r[79]=t,r}function ht(n){let e,t;return e=new rn({}),{c(){ae(e.$$.fragment)},m(r,i){le(e,r,i),t=!0},i(r){t||(Z(e.$$.fragment,r),t=!0)},o(r){G(e.$$.fragment,r),t=!1},d(r){se(e,r)}}}function mt(n){let e,t,r,i,f;return t=new sn({}),{c(){e=z("button"),ae(t.$$.fragment),s(e,"type","button"),s(e,"title",n[9]),s(e,"class","svelte-1r7dvt7"),ue(e,"active",n[0])},m(u,o){j(u,e,o),le(t,e,null),r=!0,i||(f=V(e,"click",n[63]),i=!0)},p(u,o){(!r||o[0]&512)&&s(e,"title",u[9]),(!r||o[0]&1)&&ue(e,"active",u[0])},i(u){r||(Z(t.$$.fragment,u),r=!0)},o(u){G(t.$$.fragment,u),r=!1},d(u){u&&A(e),se(t),i=!1,f()}}}function an(n){let e,t=[],r=new Map,i,f,u,o=ot(n[13]);const d=c=>c[77].id+(c[77].address?","+c[77].address:"");for(let c=0;c<o.length;c+=1){let a=dt(n,o,c),k=d(a);r.set(k,t[c]=gt(k,a))}return{c(){e=z("ul");for(let c=0;c<t.length;c+=1)t[c].c();s(e,"class","svelte-1r7dvt7")},m(c,a){j(c,e,a);for(let k=0;k<t.length;k+=1)t[k]&&t[k].m(e,null);i=!0,f||(u=[V(e,"mouseleave",n[67]),V(e,"blur",n[68])],f=!0)},p(c,a){a[0]&8940544&&(o=ot(c[13]),Pe(),t=Ft(t,a,d,1,c,o,r,e,Nt,gt,null,dt),Ae())},i(c){if(!i){for(let a=0;a<o.length;a+=1)Z(t[a]);i=!0}},o(c){for(let a=0;a<t.length;a+=1)G(t[a]);i=!1},d(c){c&&A(e);for(let a=0;a<t.length;a+=1)t[a].d();f=!1,ie(u)}}}function dn(n){let e,t,r,i,f,u;return t=new ft({}),{c(){e=z("div"),ae(t.$$.fragment),r=X(),i=z("div"),f=fe(n[7]),s(i,"class","svelte-1r7dvt7"),s(e,"class","no-results svelte-1r7dvt7")},m(o,d){j(o,e,d),le(t,e,null),T(e,r),T(e,i),T(i,f),u=!0},p(o,d){(!u||d[0]&128)&&Be(f,o[7])},i(o){u||(Z(t.$$.fragment,o),u=!0)},o(o){G(t.$$.fragment,o),u=!1},d(o){o&&A(e),se(t)}}}function hn(n){let e="",t;return{c(){t=fe(e)},m(r,i){j(r,t,i)},p:m,i:m,o:m,d(r){r&&A(t)}}}function mn(n){let e,t,r,i,f,u,o,d,c,a,k;return t=new ft({}),d=new ct({}),{c(){e=z("div"),ae(t.$$.fragment),r=X(),i=z("div"),f=fe(n[6]),u=X(),o=z("button"),ae(d.$$.fragment),s(i,"class","svelte-1r7dvt7"),s(o,"class","svelte-1r7dvt7"),s(e,"class","error svelte-1r7dvt7")},m(y,S){j(y,e,S),le(t,e,null),T(e,r),T(e,i),T(i,f),T(e,u),T(e,o),le(d,o,null),c=!0,a||(k=V(o,"click",n[64]),a=!0)},p(y,S){(!c||S[0]&64)&&Be(f,y[6])},i(y){c||(Z(t.$$.fragment,y),Z(d.$$.fragment,y),c=!0)},o(y){G(t.$$.fragment,y),G(d.$$.fragment,y),c=!1},d(y){y&&A(e),se(t),se(d),a=!1,k()}}}function gt(n,e){let t,r,i;function f(){return e[65](e[79])}function u(){return e[66](e[77])}return r=new tn({props:{feature:e[77],showPlaceType:e[10],selected:e[14]===e[79],missingIconsCache:e[19],iconsBaseUrl:e[11]}}),r.$on("mouseenter",f),r.$on("focus",u),{key:n,first:null,c(){t=St(),ae(r.$$.fragment),this.first=t},m(o,d){j(o,t,d),le(r,o,d),i=!0},p(o,d){e=o;const c={};d[0]&8192&&(c.feature=e[77]),d[0]&1024&&(c.showPlaceType=e[10]),d[0]&24576&&(c.selected=e[14]===e[79]),d[0]&2048&&(c.iconsBaseUrl=e[11]),r.$set(c)},i(o){i||(Z(r.$$.fragment,o),i=!0)},o(o){G(r.$$.fragment,o),i=!1},d(o){o&&A(t),se(r,o)}}}function gn(n){let e,t,r,i,f,u,o,d,c,a,k,y,S,U,D,B,E,Q,g,N,_,C=!1;f=new cn({}),k=new ct({});let w=n[18]&&ht(),p=n[5]===!0&&mt(n);const h=n[55].default,v=Bt(h,n,n[54],null),x=[mn,hn,dn,an],L=[];function pe(b,I){var J,ye;return b[17]?0:b[15]?((J=b[13])==null?void 0:J.length)===0?2:b[15]&&((ye=b[13])!=null&&ye.length)?3:-1:1}return~(B=pe(n))&&(E=L[B]=x[B](n)),{c(){e=X(),t=z("form"),r=z("div"),i=z("button"),ae(f.$$.fragment),u=X(),o=z("input"),d=X(),c=z("div"),a=z("button"),ae(k.$$.fragment),y=X(),w&&w.c(),S=X(),p&&p.c(),U=X(),v&&v.c(),D=X(),E&&E.c(),s(i,"class","search-button svelte-1r7dvt7"),s(i,"type","button"),s(o,"placeholder",n[8]),s(o,"aria-label",n[8]),s(o,"class","svelte-1r7dvt7"),s(a,"type","button"),s(a,"title",n[3]),s(a,"class","svelte-1r7dvt7"),s(c,"class","clear-button-container svelte-1r7dvt7"),ue(c,"displayable",n[1]!==""),s(r,"class","input-group svelte-1r7dvt7"),s(t,"tabindex","0"),s(t,"class",Q=tt(n[2])+" svelte-1r7dvt7"),ue(t,"can-collapse",n[4]&&n[1]==="")},m(b,I){j(b,e,I),j(b,t,I),T(t,r),T(r,i),le(f,i,null),T(r,u),T(r,o),n[57](o),nt(o,n[1]),T(r,d),T(r,c),T(c,a),le(k,a,null),T(c,y),w&&w.m(c,null),T(r,S),p&&p.m(r,null),T(r,U),v&&v.m(r,null),T(t,D),~B&&L[B].m(t,null),g=!0,N||(_=[V(i,"click",n[56]),V(o,"input",n[58]),V(o,"focus",n[59]),V(o,"blur",n[60]),V(o,"keydown",n[21]),V(o,"input",n[61]),V(a,"click",n[62]),V(t,"submit",Ut(n[20]))],N=!0)},p(b,I){(!g||I[0]&256)&&s(o,"placeholder",b[8]),(!g||I[0]&256)&&s(o,"aria-label",b[8]),I[0]&2&&o.value!==b[1]&&nt(o,b[1]),(!g||I[0]&8)&&s(a,"title",b[3]),b[18]?w?I[0]&262144&&Z(w,1):(w=ht(),w.c(),Z(w,1),w.m(c,null)):w&&(Pe(),G(w,1,1,()=>{w=null}),Ae()),(!g||I[0]&2)&&ue(c,"displayable",b[1]!==""),b[5]===!0?p?(p.p(b,I),I[0]&32&&Z(p,1)):(p=mt(b),p.c(),Z(p,1),p.m(r,U)):p&&(Pe(),G(p,1,1,()=>{p=null}),Ae()),v&&v.p&&(!g||I[1]&8388608)&&Ct(v,h,b,b[54],g?Et(h,b[54],I,null):Rt(b[54]),null);let J=B;B=pe(b),B===J?~B&&L[B].p(b,I):(E&&(Pe(),G(L[J],1,1,()=>{L[J]=null}),Ae()),~B?(E=L[B],E?E.p(b,I):(E=L[B]=x[B](b),E.c()),Z(E,1),E.m(t,null)):E=null),(!g||I[0]&4&&Q!==(Q=tt(b[2])+" svelte-1r7dvt7"))&&s(t,"class",Q),(!g||I[0]&22)&&ue(t,"can-collapse",b[4]&&b[1]==="")},i(b){g||(Z(C),Z(f.$$.fragment,b),Z(k.$$.fragment,b),Z(w),Z(p),Z(v,b),Z(E),g=!0)},o(b){G(C),G(f.$$.fragment,b),G(k.$$.fragment,b),G(w),G(p),G(v,b),G(E),g=!1},d(b){b&&(A(e),A(t)),se(f),n[57](null),se(k),w&&w.d(),p&&p.d(),v&&v.d(b),~B&&L[B].d(),N=!1,ie(_)}}}function _n(n,e,t){let r,{$$slots:i={},$$scope:f}=e,{class:u=void 0}=e,{apiKey:o}=e,{bbox:d=void 0}=e,{clearButtonTitle:c="clear"}=e,{clearOnBlur:a=!1}=e,{collapsed:k=!1}=e,{country:y=void 0}=e,{debounceSearch:S=200}=e,{enableReverse:U=!1}=e,{errorMessage:D="Something went wrong…"}=e,{filter:B=()=>!0}=e,{flyTo:E=!0}=e,{fuzzyMatch:Q=!0}=e,{language:g=void 0}=e,{limit:N=void 0}=e,{mapController:_=void 0}=e,{minLength:C=2}=e,{noResultsMessage:w="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!"}=e,{placeholder:p="Search"}=e,{proximity:h=[{type:"server-geolocation"}]}=e,{reverseActive:v=U==="always"}=e,{reverseButtonTitle:x="toggle reverse geocoding"}=e,{searchValue:L=""}=e,{showFullGeometry:pe=!0}=e,{showPlaceType:b="ifNeeded"}=e,{showResultsWhileTyping:I=!0}=e,{types:J=void 0}=e,{zoom:ye=16}=e,{maxZoom:Se=18}=e,{apiUrl:Qe="https://api.maptiler.com/geocoding"}=e,{fetchParameters:De={}}=e,{iconsBaseUrl:_t="https://cdn.maptiler.com/maptiler-geocoding-control/v1.0.1/icons/"}=e,{adjustUrlQuery:qe=l=>{}}=e;function vn(){ee.focus()}function kn(){ee.blur()}function yt(l,O=!0){t(1,L=l),O?(t(14,W=-1),wt()):(He(),setTimeout(()=>{ee.focus(),ee.select()}))}function pn(){t(13,R=void 0),t(51,M=void 0),t(14,W=-1)}function Tn(){t(50,q=[]),t(51,M=void 0)}let Te=!1,R,q,M,bt="",ee,W=-1,te,Ie=[],be,Me,je,Ve;const Mn=new Set,de=It();At(()=>{_&&(_.setEventHandler(void 0),_.indicateReverse(!1),_.setSelectedMarker(-1),_.setMarkers(void 0,void 0))});function wt(l){if(Me&&(clearTimeout(Me),Me=void 0),W>-1&&R)t(51,M=R[W]),t(1,L=M.place_name.replace(/,.*/,"")),t(17,te=void 0),t(50,q=void 0),t(14,W=-1);else if(L){const O=l||!vt();Ke(L,{exact:!0}).then(()=>{t(50,q=R),t(51,M=void 0),O&&Ln()}).catch(ne=>t(17,te=ne))}}function vt(){return/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(L)}async function Ke(l,{byId:O=!1,exact:ne=!1}={}){t(17,te=void 0),be==null||be.abort();const re=new AbortController;t(18,be=re);try{const K=vt(),$=new URLSearchParams;if(g!==void 0&&$.set("language",Array.isArray(g)?g.join(","):g??""),J&&$.set("types",J.join(",")),d&&$.set("bbox",d.map(We=>We.toFixed(6)).join(",")),y&&$.set("country",Array.isArray(y)?y.join(","):y),!O&&!K){const We=await un(_,h,re);We&&$.set("proximity",We),(ne||!I)&&$.set("autocomplete","false"),$.set("fuzzyMatch",String(Q))}N!==void 0&&(!K||(J==null?void 0:J.length)===1)&&$.set("limit",String(N)),$.set("key",o),qe($);const Ze=Qe+"/"+encodeURIComponent(l)+".json?"+$.toString();if(Ze===bt){O?(t(13,R=void 0),t(51,M=Ie[0])):t(13,R=Ie);return}bt=Ze;const kt=await fetch(Ze,{signal:re.signal,...De});if(!kt.ok)throw new Error;const Xe=await kt.json();de("response",{url:Ze,featureCollection:Xe}),O?(t(13,R=void 0),t(51,M=Xe.features[0]),Ie=[M]):(t(13,R=Xe.features.filter(B)),Ie=R,K&&ee.focus())}catch(K){if(K&&typeof K=="object"&&"name"in K&&K.name==="AbortError")return;throw K}finally{re===be&&t(18,be=void 0)}}function Ln(){var ne;if(!(q!=null&&q.length)||!E)return;const l=[180,90,-180,-90],O=!q.some(re=>!re.matching_text);for(const re of q)if(O||!re.matching_text)for(const K of[0,1,2,3])l[K]=Math[K<2?"min":"max"](l[K],((ne=re.bbox)==null?void 0:ne[K])??re.center[K%2]);_&&q.length>0&&(M&&l[0]===l[2]&&l[1]===l[3]?_.flyTo(M.center,ye):_.fitBounds(at(l),50,Se))}function Bn(l){t(0,v=U==="always"),yt(fn(l[0],[-180,180],!0).toFixed(6)+","+l[1].toFixed(6))}function En(l){if(!R)return;let O=l.key==="ArrowDown"?1:l.key==="ArrowUp"?-1:0;O?(W===-1&&O===-1&&t(14,W=R.length),t(14,W+=O),W>=R.length&&t(14,W=-1),l.preventDefault()):["ArrowLeft","ArrowRight","Home","End"].includes(l.key)&&t(14,W=-1)}function He(l=!0){if(t(17,te=void 0),I){if(Me&&clearTimeout(Me),L.length<C)return;const O=L;Me=window.setTimeout(()=>{Ke(O).catch(ne=>t(17,te=ne))},l?S:0)}else t(13,R=void 0),t(17,te=void 0)}function Je(l){t(51,M=l),t(1,L=l.place_name),t(14,W=-1)}const Cn=()=>ee.focus();function Rn(l){Oe[l?"unshift":"push"](()=>{ee=l,t(16,ee)})}function Sn(){L=this.value,t(1,L),t(12,Te),t(26,a)}const Un=()=>t(12,Te=!0),zn=()=>t(12,Te=!1),Pn=()=>He(),An=()=>{t(1,L=""),ee.focus()},In=()=>t(0,v=!v),jn=()=>t(17,te=void 0),Zn=l=>t(14,W=l),Wn=l=>Je(l),On=()=>t(14,W=-1),Nn=()=>{};return n.$$set=l=>{"class"in l&&t(2,u=l.class),"apiKey"in l&&t(24,o=l.apiKey),"bbox"in l&&t(25,d=l.bbox),"clearButtonTitle"in l&&t(3,c=l.clearButtonTitle),"clearOnBlur"in l&&t(26,a=l.clearOnBlur),"collapsed"in l&&t(4,k=l.collapsed),"country"in l&&t(27,y=l.country),"debounceSearch"in l&&t(28,S=l.debounceSearch),"enableReverse"in l&&t(5,U=l.enableReverse),"errorMessage"in l&&t(6,D=l.errorMessage),"filter"in l&&t(29,B=l.filter),"flyTo"in l&&t(30,E=l.flyTo),"fuzzyMatch"in l&&t(31,Q=l.fuzzyMatch),"language"in l&&t(32,g=l.language),"limit"in l&&t(33,N=l.limit),"mapController"in l&&t(34,_=l.mapController),"minLength"in l&&t(35,C=l.minLength),"noResultsMessage"in l&&t(7,w=l.noResultsMessage),"placeholder"in l&&t(8,p=l.placeholder),"proximity"in l&&t(36,h=l.proximity),"reverseActive"in l&&t(0,v=l.reverseActive),"reverseButtonTitle"in l&&t(9,x=l.reverseButtonTitle),"searchValue"in l&&t(1,L=l.searchValue),"showFullGeometry"in l&&t(37,pe=l.showFullGeometry),"showPlaceType"in l&&t(10,b=l.showPlaceType),"showResultsWhileTyping"in l&&t(38,I=l.showResultsWhileTyping),"types"in l&&t(39,J=l.types),"zoom"in l&&t(40,ye=l.zoom),"maxZoom"in l&&t(41,Se=l.maxZoom),"apiUrl"in l&&t(42,Qe=l.apiUrl),"fetchParameters"in l&&t(43,De=l.fetchParameters),"iconsBaseUrl"in l&&t(11,_t=l.iconsBaseUrl),"adjustUrlQuery"in l&&t(44,qe=l.adjustUrlQuery),"$$scope"in l&&t(54,f=l.$$scope)},n.$$.update=()=>{if(n.$$.dirty[0]&67112960&&setTimeout(()=>{t(15,je=Te),a&&!Te&&t(1,L="")}),n.$$.dirty[0]&8194|n.$$.dirty[1]&16&&L.length<C&&(t(51,M=void 0),t(13,R=void 0),t(17,te=void 0),t(50,q=R)),n.$$.dirty[1]&1048640&&pe&&M&&!M.address&&M.geometry.type==="Point"&&Ke(M.id,{byId:!0}).catch(l=>t(17,te=l)),n.$$.dirty[0]&1073741824|n.$$.dirty[1]&3147272&&(_&&M&&M.id!==Ve&&E&&(!M.bbox||M.bbox[0]===M.bbox[2]&&M.bbox[1]===M.bbox[3]?_.flyTo(M.center,M.id.startsWith("poi.")||M.id.startsWith("address.")?Se:ye):_.fitBounds(at(M.bbox),50,Se),t(13,R=void 0),t(50,q=void 0),t(14,W=-1)),t(52,Ve=M==null?void 0:M.id)),n.$$.dirty[0]&8192|n.$$.dirty[1]&524288&&q!==R&&t(50,q=void 0),n.$$.dirty[1]&1572872&&_&&_.setMarkers(q,M),n.$$.dirty[0]&2&&t(14,W=-1),n.$$.dirty[0]&40961|n.$$.dirty[1]&8&&_&&_.setEventHandler(l=>{switch(l.type){case"mapClick":v&&Bn(l.coordinates);break;case"markerClick":{const O=R==null?void 0:R.find(ne=>ne.id===l.id);O&&Je(O)}break;case"markerMouseEnter":t(14,W=je?(R==null?void 0:R.findIndex(O=>O.id===l.id))??-1:-1);break;case"markerMouseLeave":t(14,W=-1);break}}),n.$$.dirty[0]&16384|n.$$.dirty[1]&8&&(_==null||_.setSelectedMarker(W)),n.$$.dirty[0]&24576&&t(53,r=R==null?void 0:R[W]),n.$$.dirty[0]&2|n.$$.dirty[1]&8){const l=/^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(L);_==null||_.setReverseMarker(l?[Number(l[1]),Number(l[2])]:void 0)}n.$$.dirty[1]&4194304&&de("select",r),n.$$.dirty[1]&1048576&&de("pick",M),n.$$.dirty[0]&40960&&de("optionsVisibilityChange",je&&!!R),n.$$.dirty[0]&8192&&de("featuresListed",R),n.$$.dirty[1]&524288&&de("featuresMarked",q),n.$$.dirty[0]&1&&de("reverseToggle",v),n.$$.dirty[0]&2&&de("queryChange",L),n.$$.dirty[0]&1|n.$$.dirty[1]&8&&_&&_.indicateReverse(v)},[v,L,u,c,k,U,D,w,p,x,b,_t,Te,R,W,je,ee,te,be,Mn,wt,En,He,Je,o,d,a,y,S,B,E,Q,g,N,_,C,h,pe,I,J,ye,Se,Qe,De,qe,vn,kn,yt,pn,Tn,q,M,Ve,r,f,i,Cn,Rn,Sn,Un,zn,Pn,An,In,jn,Zn,Wn,On,Nn]}let yn=class extends _e{constructor(e){super(),ge(this,e,_n,gn,he,{class:2,apiKey:24,bbox:25,clearButtonTitle:3,clearOnBlur:26,collapsed:4,country:27,debounceSearch:28,enableReverse:5,errorMessage:6,filter:29,flyTo:30,fuzzyMatch:31,language:32,limit:33,mapController:34,minLength:35,noResultsMessage:7,placeholder:8,proximity:36,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:37,showPlaceType:10,showResultsWhileTyping:38,types:39,zoom:40,maxZoom:41,apiUrl:42,fetchParameters:43,iconsBaseUrl:11,adjustUrlQuery:44,focus:45,blur:46,setQuery:47,clearList:48,clearMap:49},null,[-1,-1,-1])}get focus(){return this.$$.ctx[45]}get blur(){return this.$$.ctx[46]}get setQuery(){return this.$$.ctx[47]}get clearList(){return this.$$.ctx[48]}get clearMap(){return this.$$.ctx[49]}};const bn=new FinalizationRegistry(n=>{n.$destroy()});class wn extends EventTarget{constructor({target:t,...r}){super();Tt(this,Y,void 0);Mt(this,Y,new yn({target:t,props:r}));for(const i of["select","pick","featuresListed","featuresMarked","response","optionsVisibilityChange","reverseToggle","queryChange"])oe(this,Y).$on(i,f=>this.dispatchEvent(f));bn.register(this,oe(this,Y))}setOptions(t){oe(this,Y).$set(t)}setQuery(t,r=!0){var i;(i=oe(this,Y))==null||i.setQuery(t,r)}clearMap(){var t;(t=oe(this,Y))==null||t.clearMap()}clearList(){var t;(t=oe(this,Y))==null||t.clearList()}focus(){var t;(t=oe(this,Y))==null||t.focus()}blur(){var t;(t=oe(this,Y))==null||t.blur()}}Y=new WeakMap,P.GeocodingControl=wn,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
|
|
2
2
|
//# sourceMappingURL=vanilla.umd.cjs.map
|