@maptiler/geocoding-control 0.0.77 → 0.0.78
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 +1 -1
- package/leaflet.umd.js +1 -1
- package/maplibregl.js +1 -1
- package/maplibregl.umd.js +1 -1
- package/package.json +1 -1
- package/react.js +1 -1
- package/react.umd.js +1 -1
- package/src/lib/GeocodingControl.svelte +1 -1
package/leaflet.js
CHANGED
|
@@ -1008,7 +1008,7 @@ function Gl(r, t, e) {
|
|
|
1008
1008
|
e(16, pr = void 0);
|
|
1009
1009
|
const Ui = ta(), Ge = new URLSearchParams();
|
|
1010
1010
|
C != null && Ge.set("language", Array.isArray(C) ? C.join(",") : C), St && Ge.set("types", St.join(",")), Ui || (u && Ge.set("bbox", u.map((kr) => kr.toFixed(6)).join(",")), h && Ge.set("country", Array.isArray(h) ? h.join(",") : h)), Ft || (A && Ge.set("proximity", A.map((kr) => kr.toFixed(6)).join(",")), (Bn || !Y) && Ge.set("autocomplete", "false"), Ge.set("fuzzyMatch", String(I))), S !== void 0 && Ge.set("limit", String(S)), Ge.set("key", a);
|
|
1011
|
-
const Gr = "https://api.maptiler.com/geocoding/" + encodeURIComponent(N
|
|
1011
|
+
const Gr = "https://api.maptiler.com/geocoding/" + encodeURIComponent(N) + ".json?" + Ge.toString();
|
|
1012
1012
|
if (Gr === Zs) {
|
|
1013
1013
|
Ft ? (e(12, nt = void 0), e(45, vt = Co[0])) : e(12, nt = Co);
|
|
1014
1014
|
return;
|
package/leaflet.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Ot,Qt){typeof exports=="object"&&typeof module<"u"?Qt(exports,require("leaflet")):typeof define=="function"&&define.amd?define(["exports","leaflet"],Qt):(Ot=typeof globalThis<"u"?globalThis:Ot||self,Qt(Ot.leafletMaptilerGeocoder={},Ot.leaflet))})(this,function(Ot,Qt){var Bn,ii;"use strict";var ju=(Ot,Qt,tn)=>{if(!Qt.has(Ot))throw TypeError("Cannot "+tn)};var ir=(Ot,Qt,tn)=>(ju(Ot,Qt,"read from private field"),tn?tn.call(Ot):Qt.get(Ot)),ta=(Ot,Qt,tn)=>{if(Qt.has(Ot))throw TypeError("Cannot add the same private member more than once");Qt instanceof WeakSet?Qt.add(Ot):Qt.set(Ot,tn)},ls=(Ot,Qt,tn,en)=>(ju(Ot,Qt,"write to private field"),en?en.call(Ot,tn):Qt.set(Ot,tn),tn);function tn(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>r[e]})}}return t.default=r,Object.freeze(t)}const en=tn(Qt);function It(){}function Ku(r,t){for(const e in t)r[e]=t[e];return r}function ea(r){return r()}function na(){return Object.create(null)}function yr(r){r.forEach(ea)}function ra(r){return typeof r=="function"}function li(r,t){return r!=r?t==t:r!==t||r&&typeof r=="object"||typeof r=="function"}function Qu(r){return Object.keys(r).length===0}function Ju(r,t,e,n){if(r){const i=ia(r,t,e,n);return r[0](i)}}function ia(r,t,e,n){return r[1]&&n?Ku(e.ctx.slice(),r[1](n(t))):e.ctx}function Zu(r,t,e,n){if(r[2]&&n){const i=r[2](n(e));if(t.dirty===void 0)return i;if(typeof i=="object"){const o=[],s=Math.max(t.dirty.length,i.length);for(let a=0;a<s;a+=1)o[a]=t.dirty[a]|i[a];return o}return t.dirty|i}return t.dirty}function $u(r,t,e,n,i,o){if(i){const s=ia(t,e,n,o);r.p(s,i)}}function tl(r){if(r.ctx.length>32){const t=[],e=r.ctx.length/32;for(let n=0;n<e;n++)t[n]=-1;return t}return-1}function oa(r){return r??""}function ut(r,t){r.appendChild(t)}function ze(r,t,e){r.insertBefore(t,e||null)}function Re(r){r.parentNode&&r.parentNode.removeChild(r)}function el(r,t){for(let e=0;e<r.length;e+=1)r[e]&&r[e].d(t)}function Jt(r){return document.createElement(r)}function mr(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function kr(r){return document.createTextNode(r)}function kn(){return kr(" ")}function Ve(r,t,e,n){return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}function nl(r){return function(t){return t.preventDefault(),r.call(this,t)}}function B(r,t,e){e==null?r.removeAttribute(t):r.getAttribute(t)!==e&&r.setAttribute(t,e)}function rl(r){return Array.from(r.childNodes)}function Yi(r,t){t=""+t,r.wholeText!==t&&(r.data=t)}function sa(r,t){r.value=t??""}function nn(r,t,e){r.classList[e?"add":"remove"](t)}function il(r,t,{bubbles:e=!1,cancelable:n=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(r,e,n,t),i}let Hi;function Wi(r){Hi=r}function aa(){if(!Hi)throw new Error("Function called outside component initialization");return Hi}function ol(r){aa().$$.on_destroy.push(r)}function sl(){const r=aa();return(t,e,{cancelable:n=!1}={})=>{const i=r.$$.callbacks[t];if(i){const o=il(t,e,{cancelable:n});return i.slice().forEach(s=>{s.call(r,o)}),!o.defaultPrevented}return!0}}const ci=[],cs=[];let fi=[];const ua=[],al=Promise.resolve();let fs=!1;function ul(){fs||(fs=!0,al.then(la))}function hs(r){fi.push(r)}const gs=new Set;let hi=0;function la(){if(hi!==0)return;const r=Hi;do{try{for(;hi<ci.length;){const t=ci[hi];hi++,Wi(t),ll(t.$$)}}catch(t){throw ci.length=0,hi=0,t}for(Wi(null),ci.length=0,hi=0;cs.length;)cs.pop()();for(let t=0;t<fi.length;t+=1){const e=fi[t];gs.has(e)||(gs.add(e),e())}fi.length=0}while(ci.length);for(;ua.length;)ua.pop()();fs=!1,gs.clear(),Wi(r)}function ll(r){if(r.fragment!==null){r.update(),yr(r.before_update);const t=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,t),r.after_update.forEach(hs)}}function cl(r){const t=[],e=[];fi.forEach(n=>r.indexOf(n)===-1?t.push(n):e.push(n)),e.forEach(n=>n()),fi=t}const So=new Set;let zr;function wo(){zr={r:0,c:[],p:zr}}function Lo(){zr.r||yr(zr.c),zr=zr.p}function Zt(r,t){r&&r.i&&(So.delete(r),r.i(t))}function Oe(r,t,e,n){if(r&&r.o){if(So.has(r))return;So.add(r),zr.c.push(()=>{So.delete(r),n&&(e&&r.d(1),n())}),r.o(t)}else n&&n()}function ji(r){r&&r.c()}function gi(r,t,e,n){const{fragment:i,after_update:o}=r.$$;i&&i.m(t,e),n||hs(()=>{const s=r.$$.on_mount.map(ea).filter(ra);r.$$.on_destroy?r.$$.on_destroy.push(...s):yr(s),r.$$.on_mount=[]}),o.forEach(hs)}function pi(r,t){const e=r.$$;e.fragment!==null&&(cl(e.after_update),yr(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function fl(r,t){r.$$.dirty[0]===-1&&(ci.push(r),ul(),r.$$.dirty.fill(0)),r.$$.dirty[t/31|0]|=1<<t%31}function di(r,t,e,n,i,o,s,a=[-1]){const u=Hi;Wi(r);const l=r.$$={fragment:null,ctx:[],props:o,update:It,not_equal:i,bound:na(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:na(),dirty:a,skip_bound:!1,root:t.target||u.$$.root};s&&s(l.root);let c=!1;if(l.ctx=e?e(r,t.props||{},(f,h,...g)=>{const p=g.length?g[0]:h;return l.ctx&&i(l.ctx[f],l.ctx[f]=p)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](p),c&&fl(r,f)),h}):[],l.update(),c=!0,yr(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){const f=rl(t.target);l.fragment&&l.fragment.l(f),f.forEach(Re)}else l.fragment&&l.fragment.c();t.intro&&Zt(r.$$.fragment),gi(r,t.target,t.anchor,t.customElement),la()}Wi(u)}class vi{$destroy(){pi(this,1),this.$destroy=It}$on(t,e){if(!ra(e))return It;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const i=n.indexOf(e);i!==-1&&n.splice(i,1)}}$set(t){this.$$set&&!Qu(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const hf="";function hl(r){let t,e;return{c(){t=mr("svg"),e=mr("path"),B(e,"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"),B(t,"viewBox","0 0 60.006 21.412"),B(t,"width","14"),B(t,"height","20"),B(t,"class","svelte-en2qvf")},m(n,i){ze(n,t,i),ut(t,e)},p:It,i:It,o:It,d(n){n&&Re(t)}}}class gl extends vi{constructor(t){super(),di(this,t,null,hl,li,{})}}const gf="";function pl(r){let t,e;return{c(){t=mr("svg"),e=mr("path"),B(e,"d","M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"),B(t,"viewBox","0 0 18 18"),B(t,"width","16"),B(t,"height","16"),B(t,"class","svelte-en2qvf")},m(n,i){ze(n,t,i),ut(t,e)},p:It,i:It,o:It,d(n){n&&Re(t)}}}class dl extends vi{constructor(t){super(),di(this,t,null,pl,li,{})}}const pf="";function vl(r){let t;return{c(){t=Jt("div"),t.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>',B(t,"class","svelte-7cmwmc")},m(e,n){ze(e,t,n)},p:It,i:It,o:It,d(e){e&&Re(t)}}}class yl extends vi{constructor(t){super(),di(this,t,null,vl,li,{})}}const df="";function ml(r){let t,e,n;return{c(){t=mr("svg"),e=mr("path"),B(e,"stroke-width","4"),B(e,"fill-rule","evenodd"),B(e,"clip-rule","evenodd"),B(e,"d","M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"),B(e,"class","svelte-1k1cmht"),B(t,"width",n=r[0]!=="list"?void 0:"20"),B(t,"viewBox","0 0 70 85"),B(t,"fill","none"),B(t,"class","svelte-1k1cmht"),nn(t,"in-map",r[0]!=="list"),nn(t,"list-icon",r[0]==="list")},m(i,o){ze(i,t,o),ut(t,e)},p(i,[o]){o&1&&n!==(n=i[0]!=="list"?void 0:"20")&&B(t,"width",n),o&1&&nn(t,"in-map",i[0]!=="list"),o&1&&nn(t,"list-icon",i[0]==="list")},i:It,o:It,d(i){i&&Re(t)}}}function _l(r,t,e){let{displayIn:n}=t;return r.$$set=i=>{"displayIn"in i&&e(0,n=i.displayIn)},[n]}class ca extends vi{constructor(t){super(),di(this,t,_l,ml,li,{displayIn:0})}}const vf="";function El(r){let t,e;return{c(){t=mr("svg"),e=mr("path"),B(e,"d","M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"),B(t,"viewBox","0 0 18 18"),B(t,"xml:space","preserve"),B(t,"width","20"),B(t,"class","svelte-en2qvf")},m(n,i){ze(n,t,i),ut(t,e)},p:It,i:It,o:It,d(n){n&&Re(t)}}}class Il extends vi{constructor(t){super(),di(this,t,null,El,li,{})}}const yf="";function fa(r,t,e){const n=r.slice();return n[69]=t[e],n[71]=e,n}function ha(r){let t,e;return t=new yl({}),{c(){ji(t.$$.fragment)},m(n,i){gi(t,n,i),e=!0},i(n){e||(Zt(t.$$.fragment,n),e=!0)},o(n){Oe(t.$$.fragment,n),e=!1},d(n){pi(t,n)}}}function ga(r){let t,e,n,i,o;return e=new gl({}),{c(){t=Jt("button"),ji(e.$$.fragment),B(t,"type","button"),B(t,"title",r[9]),B(t,"class","svelte-z0d4ta"),nn(t,"active",r[0])},m(s,a){ze(s,t,a),gi(e,t,null),n=!0,i||(o=Ve(t,"click",r[56]),i=!0)},p(s,a){(!n||a[0]&512)&&B(t,"title",s[9]),(!n||a[0]&1)&&nn(t,"active",s[0])},i(s){n||(Zt(e.$$.fragment,s),n=!0)},o(s){Oe(e.$$.fragment,s),n=!1},d(s){s&&Re(t),pi(e),i=!1,o()}}}function Cl(r){let t,e,n,i,o=r[12],s=[];for(let u=0;u<o.length;u+=1)s[u]=da(fa(r,o,u));const a=u=>Oe(s[u],1,1,()=>{s[u]=null});return{c(){t=Jt("ul");for(let u=0;u<s.length;u+=1)s[u].c();B(t,"class","svelte-z0d4ta")},m(u,l){ze(u,t,l);for(let c=0;c<s.length;c+=1)s[c]&&s[c].m(t,null);e=!0,n||(i=[Ve(t,"mouseleave",r[59]),Ve(t,"blur",r[60])],n=!0)},p(u,l){if(l[0]&2110464){o=u[12];let c;for(c=0;c<o.length;c+=1){const f=fa(u,o,c);s[c]?(s[c].p(f,l),Zt(s[c],1)):(s[c]=da(f),s[c].c(),Zt(s[c],1),s[c].m(t,null))}for(wo(),c=o.length;c<s.length;c+=1)a(c);Lo()}},i(u){if(!e){for(let l=0;l<o.length;l+=1)Zt(s[l]);e=!0}},o(u){s=s.filter(Boolean);for(let l=0;l<s.length;l+=1)Oe(s[l]);e=!1},d(u){u&&Re(t),el(s,u),n=!1,yr(i)}}}function Nl(r){let t,e;return{c(){t=Jt("div"),e=kr(r[7]),B(t,"class","no-results svelte-z0d4ta")},m(n,i){ze(n,t,i),ut(t,e)},p(n,i){i[0]&128&&Yi(e,n[7])},i:It,o:It,d(n){n&&Re(t)}}}function xl(r){let t="",e;return{c(){e=kr(t)},m(n,i){ze(n,e,i)},p:It,i:It,o:It,d(n){n&&Re(e)}}}function Sl(r){let t,e;return{c(){t=Jt("div"),e=kr(r[6]),B(t,"class","error svelte-z0d4ta")},m(n,i){ze(n,t,i),ut(t,e)},p(n,i){i[0]&64&&Yi(e,n[6])},i:It,o:It,d(n){n&&Re(t)}}}function pa(r){var i,o;let t,e=(((o=(i=r[69].properties)==null?void 0:i.place_type_name)==null?void 0:o[0])??r[69].place_type[0])+"",n;return{c(){t=Jt("span"),n=kr(e),B(t,"class","svelte-z0d4ta")},m(s,a){ze(s,t,a),ut(t,n)},p(s,a){var u,l;a[0]&4096&&e!==(e=(((l=(u=s[69].properties)==null?void 0:u.place_type_name)==null?void 0:l[0])??s[69].place_type[0])+"")&&Yi(n,e)},d(s){s&&Re(t)}}}function da(r){let t,e,n,i,o,s,a=r[69].place_name.replace(/,.*/,"")+"",u,l,c,f,h,g=r[69].place_name.replace(/[^,]*,?\s*/,"")+"",p,m,d,y,I,C;e=new ca({props:{displayIn:"list"}});let S=r[10]&&pa(r);function x(){return r[57](r[71])}function L(){return r[58](r[69])}return{c(){t=Jt("li"),ji(e.$$.fragment),n=kn(),i=Jt("span"),o=Jt("span"),s=Jt("span"),u=kr(a),l=kn(),S&&S.c(),c=kn(),f=Jt("span"),h=Jt("span"),p=kr(g),m=kn(),B(s,"class","svelte-z0d4ta"),B(o,"class","svelte-z0d4ta"),B(i,"class","svelte-z0d4ta"),B(h,"class","svelte-z0d4ta"),B(f,"class","svelte-z0d4ta"),B(t,"tabindex","0"),B(t,"data-selected",d=r[13]===r[71]),B(t,"class","svelte-z0d4ta"),nn(t,"selected",r[13]===r[71])},m(D,T){ze(D,t,T),gi(e,t,null),ut(t,n),ut(t,i),ut(i,o),ut(o,s),ut(s,u),ut(o,l),S&&S.m(o,null),ut(t,c),ut(t,f),ut(f,h),ut(h,p),ut(t,m),y=!0,I||(C=[Ve(t,"mouseenter",x),Ve(t,"focus",L)],I=!0)},p(D,T){r=D,(!y||T[0]&4096)&&a!==(a=r[69].place_name.replace(/,.*/,"")+"")&&Yi(u,a),r[10]?S?S.p(r,T):(S=pa(r),S.c(),S.m(o,null)):S&&(S.d(1),S=null),(!y||T[0]&4096)&&g!==(g=r[69].place_name.replace(/[^,]*,?\s*/,"")+"")&&Yi(p,g),(!y||T[0]&8192&&d!==(d=r[13]===r[71]))&&B(t,"data-selected",d),(!y||T[0]&8192)&&nn(t,"selected",r[13]===r[71])},i(D){y||(Zt(e.$$.fragment,D),y=!0)},o(D){Oe(e.$$.fragment,D),y=!1},d(D){D&&Re(t),pi(e),S&&S.d(),I=!1,yr(C)}}}function wl(r){let t,e,n,i,o,s,a,u,l,c,f,h,g,p,m,d,y,I,C,S;i=new Il({}),c=new dl({});let x=r[17]&&ha(),L=r[5]===!0&&ga(r);const D=r[48].default,T=Ju(D,r,r[47],null),F=[Sl,xl,Nl,Cl],q=[];function j(P,X){var R,Y;return P[16]?0:P[14]?((R=P[12])==null?void 0:R.length)===0?2:P[14]&&((Y=P[12])!=null&&Y.length)?3:-1:1}return~(m=j(r))&&(d=q[m]=F[m](r)),{c(){t=Jt("form"),e=Jt("div"),n=Jt("button"),ji(i.$$.fragment),o=kn(),s=Jt("input"),a=kn(),u=Jt("div"),l=Jt("button"),ji(c.$$.fragment),f=kn(),x&&x.c(),h=kn(),L&&L.c(),g=kn(),T&&T.c(),p=kn(),d&&d.c(),B(n,"type","button"),B(n,"class","svelte-z0d4ta"),B(s,"placeholder",r[8]),B(s,"aria-label",r[8]),B(s,"class","svelte-z0d4ta"),B(l,"type","button"),B(l,"title",r[3]),B(l,"class","svelte-z0d4ta"),nn(l,"displayable",r[1]!==""),B(u,"class","clear-button-container svelte-z0d4ta"),B(e,"class","input-group svelte-z0d4ta"),B(t,"tabindex","0"),B(t,"class",y=oa(r[2])+" svelte-z0d4ta"),nn(t,"can-collapse",r[4]&&r[1]==="")},m(P,X){ze(P,t,X),ut(t,e),ut(e,n),gi(i,n,null),ut(e,o),ut(e,s),r[50](s),sa(s,r[1]),ut(e,a),ut(e,u),ut(u,l),gi(c,l,null),ut(u,f),x&&x.m(u,null),ut(e,h),L&&L.m(e,null),ut(e,g),T&&T.m(e,null),ut(t,p),~m&&q[m].m(t,null),I=!0,C||(S=[Ve(n,"click",r[49]),Ve(s,"input",r[51]),Ve(s,"focus",r[52]),Ve(s,"blur",r[53]),Ve(s,"keydown",r[19]),Ve(s,"input",r[54]),Ve(l,"click",r[55]),Ve(t,"submit",nl(r[18]))],C=!0)},p(P,X){(!I||X[0]&256)&&B(s,"placeholder",P[8]),(!I||X[0]&256)&&B(s,"aria-label",P[8]),X[0]&2&&s.value!==P[1]&&sa(s,P[1]),(!I||X[0]&8)&&B(l,"title",P[3]),(!I||X[0]&2)&&nn(l,"displayable",P[1]!==""),P[17]?x?X[0]&131072&&Zt(x,1):(x=ha(),x.c(),Zt(x,1),x.m(u,null)):x&&(wo(),Oe(x,1,1,()=>{x=null}),Lo()),P[5]===!0?L?(L.p(P,X),X[0]&32&&Zt(L,1)):(L=ga(P),L.c(),Zt(L,1),L.m(e,g)):L&&(wo(),Oe(L,1,1,()=>{L=null}),Lo()),T&&T.p&&(!I||X[1]&65536)&&$u(T,D,P,P[47],I?Zu(D,P[47],X,null):tl(P[47]),null);let R=m;m=j(P),m===R?~m&&q[m].p(P,X):(d&&(wo(),Oe(q[R],1,1,()=>{q[R]=null}),Lo()),~m?(d=q[m],d?d.p(P,X):(d=q[m]=F[m](P),d.c()),Zt(d,1),d.m(t,null)):d=null),(!I||X[0]&4&&y!==(y=oa(P[2])+" svelte-z0d4ta"))&&B(t,"class",y),(!I||X[0]&22)&&nn(t,"can-collapse",P[4]&&P[1]==="")},i(P){I||(Zt(i.$$.fragment,P),Zt(c.$$.fragment,P),Zt(x),Zt(L),Zt(T,P),Zt(d),I=!0)},o(P){Oe(i.$$.fragment,P),Oe(c.$$.fragment,P),Oe(x),Oe(L),Oe(T,P),Oe(d),I=!1},d(P){P&&Re(t),pi(i),r[50](null),pi(c),x&&x.d(),L&&L.d(),T&&T.d(P),~m&&q[m].d(),C=!1,yr(S)}}}function Ll(r,t,e){const n=t[1],i=t[0],o=n-i;return r===n&&e?r:((r-i)%o+o)%o+i}function bl(r,t,e){let n,{$$slots:i={},$$scope:o}=t,{class:s=void 0}=t,{apiKey:a}=t,{bbox:u=void 0}=t,{clearButtonTitle:l="clear"}=t,{clearOnBlur:c=!1}=t,{collapsed:f=!1}=t,{country:h=void 0}=t,{debounceSearch:g=200}=t,{enableReverse:p=!1}=t,{errorMessage:m="Searching failed"}=t,{filter:d=()=>!0}=t,{flyTo:y=!0}=t,{fuzzyMatch:I=!0}=t,{language:C=void 0}=t,{limit:S=void 0}=t,{mapController:x=void 0}=t,{minLength:L=2}=t,{noResultsMessage:D="No results found"}=t,{placeholder:T="Search"}=t,{proximity:F=void 0}=t,{reverseActive:q=p==="always"}=t,{reverseButtonTitle:j="toggle reverse geocoding"}=t,{searchValue:P=""}=t,{showFullGeometry:X=!0}=t,{showPlaceType:R=!1}=t,{showResultsWhileTyping:Y=!0}=t,{trackProximity:at=!0}=t,{types:Rt=void 0}=t,{zoom:Kt=16}=t,{fetchParameters:me={}}=t;function oi(){nr.focus()}function Gn(){nr.blur()}function er(N,Xt=!0){e(1,P=N),Xt?(e(13,qt=-1),Hu()):(Qs(),setTimeout(()=>{nr.focus(),nr.select()}))}let _e=!1,rt,Dt,Et,Yu="",nr,qt=-1,Br,as=[],si,Xi,us;const Gr=sl();ol(()=>{x&&(x.setEventHandler(void 0),x.indicateReverse(!1),x.setSelectedMarker(-1),x.setMarkers(void 0,void 0))});function Hu(N){if(Xi&&(clearTimeout(Xi),Xi=void 0),qt>-1&&rt)e(45,Et=rt[qt]),e(1,P=Et.place_name.replace(/,.*/,"")),e(16,Br=void 0),e(44,Dt=void 0),e(13,qt=-1);else if(P){const Xt=N||!Wu();Ks(P,{exact:!0}).then(()=>{e(44,Dt=rt),e(45,Et=void 0),Xt&&Qc()}).catch(rr=>e(16,Br=rr))}}function Wu(){return/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(P)}async function Ks(N,{byId:Xt=!1,exact:rr=!1}={}){e(16,Br=void 0);const xo=Wu(),$e=new URLSearchParams;C!=null&&$e.set("language",Array.isArray(C)?C.join(","):C),Rt&&$e.set("types",Rt.join(",")),xo||(u&&$e.set("bbox",u.map(ui=>ui.toFixed(6)).join(",")),h&&$e.set("country",Array.isArray(h)?h.join(","):h)),Xt||(F&&$e.set("proximity",F.map(ui=>ui.toFixed(6)).join(",")),(rr||!Y)&&$e.set("autocomplete","false"),$e.set("fuzzyMatch",String(I))),S!==void 0&&$e.set("limit",String(S)),$e.set("key",a);const ai="https://api.maptiler.com/geocoding/"+encodeURIComponent(N.replaceAll(";",","))+".json?"+$e.toString();if(ai===Yu){Xt?(e(12,rt=void 0),e(45,Et=as[0])):e(12,rt=as);return}Yu=ai,si==null||si.abort();const Pe=new AbortController;e(17,si=Pe);let Zs;try{Zs=await fetch(ai,{signal:Pe.signal,...me}).finally(()=>{Pe===si&&e(17,si=void 0)})}catch(ui){if(ui&&typeof ui=="object"&&ui.name==="AbortError")return;throw new Error}if(!Zs.ok)throw new Error;const $s=await Zs.json();Gr("response",{url:ai,featureCollection:$s}),Xt?(e(12,rt=void 0),e(45,Et=$s.features[0]),as=[Et]):(e(12,rt=$s.features.filter(d)),as=rt,xo&&nr.focus())}function Qc(){var rr,xo,$e,ai;if(!(Dt!=null&&Dt.length)||!y)return;const N=[180,90,-180,-90],Xt=!Dt.some(Pe=>!Pe.matching_text);for(const Pe of Dt)(Xt||!Pe.matching_text)&&(N[0]=Math.min(N[0],((rr=Pe.bbox)==null?void 0:rr[0])??Pe.center[0]),N[1]=Math.min(N[1],((xo=Pe.bbox)==null?void 0:xo[1])??Pe.center[1]),N[2]=Math.max(N[2],(($e=Pe.bbox)==null?void 0:$e[2])??Pe.center[0]),N[3]=Math.max(N[3],((ai=Pe.bbox)==null?void 0:ai[3])??Pe.center[1]));x&&Dt.length>0&&(Et&&N[0]===N[2]&&N[1]===N[3]?x.flyTo(Et.center,Kt):x.fitBounds(N,50))}function Jc(N){e(0,q=p==="always"),er(Ll(N[0],[-180,180],!0).toFixed(6)+","+N[1].toFixed(6))}function Zc(N){if(!rt)return;let Xt=N.key==="ArrowDown"?1:N.key==="ArrowUp"?-1:0;Xt?(qt===-1&&Xt===-1&&e(13,qt=rt.length),e(13,qt+=Xt),qt>=rt.length&&e(13,qt=-1),N.preventDefault()):["ArrowLeft","ArrowRight","Home","End"].includes(N.key)&&e(13,qt=-1)}function Qs(N=!0){if(Y&&P.length>L){Xi&&clearTimeout(Xi);const Xt=P;Xi=window.setTimeout(()=>{Ks(Xt).catch(rr=>e(16,Br=rr))},N?g:0)}else e(12,rt=void 0),e(16,Br=void 0)}function Js(N){e(45,Et=N),e(1,P=N.place_name),e(13,qt=-1)}const $c=()=>nr.focus();function tf(N){cs[N?"unshift":"push"](()=>{nr=N,e(15,nr)})}function ef(){P=this.value,e(1,P),e(11,_e),e(25,c)}const nf=()=>e(11,_e=!0),rf=()=>e(11,_e=!1),of=()=>Qs(),sf=()=>{e(1,P=""),nr.focus()},af=()=>e(0,q=!q),uf=N=>e(13,qt=N),lf=N=>Js(N),cf=()=>e(13,qt=-1),ff=()=>{};return r.$$set=N=>{"class"in N&&e(2,s=N.class),"apiKey"in N&&e(23,a=N.apiKey),"bbox"in N&&e(24,u=N.bbox),"clearButtonTitle"in N&&e(3,l=N.clearButtonTitle),"clearOnBlur"in N&&e(25,c=N.clearOnBlur),"collapsed"in N&&e(4,f=N.collapsed),"country"in N&&e(26,h=N.country),"debounceSearch"in N&&e(27,g=N.debounceSearch),"enableReverse"in N&&e(5,p=N.enableReverse),"errorMessage"in N&&e(6,m=N.errorMessage),"filter"in N&&e(28,d=N.filter),"flyTo"in N&&e(29,y=N.flyTo),"fuzzyMatch"in N&&e(30,I=N.fuzzyMatch),"language"in N&&e(31,C=N.language),"limit"in N&&e(32,S=N.limit),"mapController"in N&&e(33,x=N.mapController),"minLength"in N&&e(34,L=N.minLength),"noResultsMessage"in N&&e(7,D=N.noResultsMessage),"placeholder"in N&&e(8,T=N.placeholder),"proximity"in N&&e(22,F=N.proximity),"reverseActive"in N&&e(0,q=N.reverseActive),"reverseButtonTitle"in N&&e(9,j=N.reverseButtonTitle),"searchValue"in N&&e(1,P=N.searchValue),"showFullGeometry"in N&&e(35,X=N.showFullGeometry),"showPlaceType"in N&&e(10,R=N.showPlaceType),"showResultsWhileTyping"in N&&e(36,Y=N.showResultsWhileTyping),"trackProximity"in N&&e(37,at=N.trackProximity),"types"in N&&e(38,Rt=N.types),"zoom"in N&&e(39,Kt=N.zoom),"fetchParameters"in N&&e(40,me=N.fetchParameters),"$$scope"in N&&e(47,o=N.$$scope)},r.$$.update=()=>{if(r.$$.dirty[1]&64&&(at||e(22,F=void 0)),r.$$.dirty[0]&33556480&&setTimeout(()=>{e(14,us=_e),c&&!_e&&e(1,P="")}),r.$$.dirty[0]&4098&&(P||(e(45,Et=void 0),e(12,rt=void 0),e(16,Br=void 0),e(44,Dt=rt))),r.$$.dirty[1]&16400&&X&&Et&&!Et.address&&Et.geometry.type==="Point"&&Ks(Et.id,{byId:!0}).catch(N=>e(16,Br=N)),r.$$.dirty[0]&536870912|r.$$.dirty[1]&16644&&x&&Et&&y&&(!Et.bbox||Et.bbox[0]===Et.bbox[2]&&Et.bbox[1]===Et.bbox[3]?x.flyTo(Et.center,Kt):x.fitBounds(Et.bbox,50),e(12,rt=void 0),e(44,Dt=void 0),e(13,qt=-1)),r.$$.dirty[0]&4096|r.$$.dirty[1]&8192&&Dt!==rt&&e(44,Dt=void 0),r.$$.dirty[1]&24580&&x&&x.setMarkers(Dt,Et),r.$$.dirty[0]&2&&e(13,qt=-1),r.$$.dirty[0]&20481|r.$$.dirty[1]&68&&x&&x.setEventHandler(N=>{switch(N.type){case"mapClick":q&&Jc(N.coordinates);break;case"proximityChange":e(22,F=at?N.proximity:void 0);break;case"markerClick":{const Xt=rt==null?void 0:rt.find(rr=>rr.id===N.id);Xt&&Js(Xt)}break;case"markerMouseEnter":e(13,qt=us?(rt==null?void 0:rt.findIndex(Xt=>Xt.id===N.id))??-1:-1);break;case"markerMouseLeave":e(13,qt=-1);break}}),r.$$.dirty[0]&8192|r.$$.dirty[1]&4&&(x==null||x.setSelectedMarker(qt)),r.$$.dirty[0]&12288&&e(46,n=rt==null?void 0:rt[qt]),r.$$.dirty[0]&2|r.$$.dirty[1]&4){const N=/^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(P);x==null||x.setReverseMarker(N?[Number(N[1]),Number(N[2])]:void 0)}r.$$.dirty[1]&32768&&Gr("select",n),r.$$.dirty[1]&16384&&Gr("pick",Et),r.$$.dirty[0]&20480&&Gr("optionsVisibilityChange",us&&!!rt),r.$$.dirty[0]&4096&&Gr("featuresListed",rt),r.$$.dirty[1]&8192&&Gr("featuresMarked",Dt),r.$$.dirty[0]&1&&Gr("reverseToggle",q),r.$$.dirty[0]&2&&Gr("queryChange",P),r.$$.dirty[0]&1|r.$$.dirty[1]&4&&x&&x.indicateReverse(q)},[q,P,s,l,f,p,m,D,T,j,R,_e,rt,qt,us,nr,Br,si,Hu,Zc,Qs,Js,F,a,u,c,h,g,d,y,I,C,S,x,L,X,Y,at,Rt,Kt,me,oi,Gn,er,Dt,Et,n,o,i,$c,tf,ef,nf,rf,of,sf,af,uf,lf,cf,ff]}let Pl=class extends vi{constructor(t){super(),di(this,t,bl,wl,li,{class:2,apiKey:23,bbox:24,clearButtonTitle:3,clearOnBlur:25,collapsed:4,country:26,debounceSearch:27,enableReverse:5,errorMessage:6,filter:28,flyTo:29,fuzzyMatch:30,language:31,limit:32,mapController:33,minLength:34,noResultsMessage:7,placeholder:8,proximity:22,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:35,showPlaceType:10,showResultsWhileTyping:36,trackProximity:37,types:38,zoom:39,fetchParameters:40,focus:41,blur:42,setQuery:43},null,[-1,-1,-1])}get focus(){return this.$$.ctx[41]}get blur(){return this.$$.ctx[42]}get setQuery(){return this.$$.ctx[43]}};/**
|
|
1
|
+
(function(Ot,Qt){typeof exports=="object"&&typeof module<"u"?Qt(exports,require("leaflet")):typeof define=="function"&&define.amd?define(["exports","leaflet"],Qt):(Ot=typeof globalThis<"u"?globalThis:Ot||self,Qt(Ot.leafletMaptilerGeocoder={},Ot.leaflet))})(this,function(Ot,Qt){var Bn,ii;"use strict";var ju=(Ot,Qt,tn)=>{if(!Qt.has(Ot))throw TypeError("Cannot "+tn)};var ir=(Ot,Qt,tn)=>(ju(Ot,Qt,"read from private field"),tn?tn.call(Ot):Qt.get(Ot)),ta=(Ot,Qt,tn)=>{if(Qt.has(Ot))throw TypeError("Cannot add the same private member more than once");Qt instanceof WeakSet?Qt.add(Ot):Qt.set(Ot,tn)},ls=(Ot,Qt,tn,en)=>(ju(Ot,Qt,"write to private field"),en?en.call(Ot,tn):Qt.set(Ot,tn),tn);function tn(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>r[e]})}}return t.default=r,Object.freeze(t)}const en=tn(Qt);function It(){}function Ku(r,t){for(const e in t)r[e]=t[e];return r}function ea(r){return r()}function na(){return Object.create(null)}function yr(r){r.forEach(ea)}function ra(r){return typeof r=="function"}function li(r,t){return r!=r?t==t:r!==t||r&&typeof r=="object"||typeof r=="function"}function Qu(r){return Object.keys(r).length===0}function Ju(r,t,e,n){if(r){const i=ia(r,t,e,n);return r[0](i)}}function ia(r,t,e,n){return r[1]&&n?Ku(e.ctx.slice(),r[1](n(t))):e.ctx}function Zu(r,t,e,n){if(r[2]&&n){const i=r[2](n(e));if(t.dirty===void 0)return i;if(typeof i=="object"){const o=[],s=Math.max(t.dirty.length,i.length);for(let a=0;a<s;a+=1)o[a]=t.dirty[a]|i[a];return o}return t.dirty|i}return t.dirty}function $u(r,t,e,n,i,o){if(i){const s=ia(t,e,n,o);r.p(s,i)}}function tl(r){if(r.ctx.length>32){const t=[],e=r.ctx.length/32;for(let n=0;n<e;n++)t[n]=-1;return t}return-1}function oa(r){return r??""}function ut(r,t){r.appendChild(t)}function ze(r,t,e){r.insertBefore(t,e||null)}function Re(r){r.parentNode&&r.parentNode.removeChild(r)}function el(r,t){for(let e=0;e<r.length;e+=1)r[e]&&r[e].d(t)}function Jt(r){return document.createElement(r)}function mr(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function kr(r){return document.createTextNode(r)}function kn(){return kr(" ")}function Ve(r,t,e,n){return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}function nl(r){return function(t){return t.preventDefault(),r.call(this,t)}}function B(r,t,e){e==null?r.removeAttribute(t):r.getAttribute(t)!==e&&r.setAttribute(t,e)}function rl(r){return Array.from(r.childNodes)}function Yi(r,t){t=""+t,r.wholeText!==t&&(r.data=t)}function sa(r,t){r.value=t??""}function nn(r,t,e){r.classList[e?"add":"remove"](t)}function il(r,t,{bubbles:e=!1,cancelable:n=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(r,e,n,t),i}let Hi;function Wi(r){Hi=r}function aa(){if(!Hi)throw new Error("Function called outside component initialization");return Hi}function ol(r){aa().$$.on_destroy.push(r)}function sl(){const r=aa();return(t,e,{cancelable:n=!1}={})=>{const i=r.$$.callbacks[t];if(i){const o=il(t,e,{cancelable:n});return i.slice().forEach(s=>{s.call(r,o)}),!o.defaultPrevented}return!0}}const ci=[],cs=[];let fi=[];const ua=[],al=Promise.resolve();let fs=!1;function ul(){fs||(fs=!0,al.then(la))}function hs(r){fi.push(r)}const gs=new Set;let hi=0;function la(){if(hi!==0)return;const r=Hi;do{try{for(;hi<ci.length;){const t=ci[hi];hi++,Wi(t),ll(t.$$)}}catch(t){throw ci.length=0,hi=0,t}for(Wi(null),ci.length=0,hi=0;cs.length;)cs.pop()();for(let t=0;t<fi.length;t+=1){const e=fi[t];gs.has(e)||(gs.add(e),e())}fi.length=0}while(ci.length);for(;ua.length;)ua.pop()();fs=!1,gs.clear(),Wi(r)}function ll(r){if(r.fragment!==null){r.update(),yr(r.before_update);const t=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,t),r.after_update.forEach(hs)}}function cl(r){const t=[],e=[];fi.forEach(n=>r.indexOf(n)===-1?t.push(n):e.push(n)),e.forEach(n=>n()),fi=t}const So=new Set;let zr;function wo(){zr={r:0,c:[],p:zr}}function Lo(){zr.r||yr(zr.c),zr=zr.p}function Zt(r,t){r&&r.i&&(So.delete(r),r.i(t))}function Oe(r,t,e,n){if(r&&r.o){if(So.has(r))return;So.add(r),zr.c.push(()=>{So.delete(r),n&&(e&&r.d(1),n())}),r.o(t)}else n&&n()}function ji(r){r&&r.c()}function gi(r,t,e,n){const{fragment:i,after_update:o}=r.$$;i&&i.m(t,e),n||hs(()=>{const s=r.$$.on_mount.map(ea).filter(ra);r.$$.on_destroy?r.$$.on_destroy.push(...s):yr(s),r.$$.on_mount=[]}),o.forEach(hs)}function pi(r,t){const e=r.$$;e.fragment!==null&&(cl(e.after_update),yr(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function fl(r,t){r.$$.dirty[0]===-1&&(ci.push(r),ul(),r.$$.dirty.fill(0)),r.$$.dirty[t/31|0]|=1<<t%31}function di(r,t,e,n,i,o,s,a=[-1]){const u=Hi;Wi(r);const l=r.$$={fragment:null,ctx:[],props:o,update:It,not_equal:i,bound:na(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:na(),dirty:a,skip_bound:!1,root:t.target||u.$$.root};s&&s(l.root);let c=!1;if(l.ctx=e?e(r,t.props||{},(f,h,...g)=>{const p=g.length?g[0]:h;return l.ctx&&i(l.ctx[f],l.ctx[f]=p)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](p),c&&fl(r,f)),h}):[],l.update(),c=!0,yr(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){const f=rl(t.target);l.fragment&&l.fragment.l(f),f.forEach(Re)}else l.fragment&&l.fragment.c();t.intro&&Zt(r.$$.fragment),gi(r,t.target,t.anchor,t.customElement),la()}Wi(u)}class vi{$destroy(){pi(this,1),this.$destroy=It}$on(t,e){if(!ra(e))return It;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const i=n.indexOf(e);i!==-1&&n.splice(i,1)}}$set(t){this.$$set&&!Qu(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const hf="";function hl(r){let t,e;return{c(){t=mr("svg"),e=mr("path"),B(e,"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"),B(t,"viewBox","0 0 60.006 21.412"),B(t,"width","14"),B(t,"height","20"),B(t,"class","svelte-en2qvf")},m(n,i){ze(n,t,i),ut(t,e)},p:It,i:It,o:It,d(n){n&&Re(t)}}}class gl extends vi{constructor(t){super(),di(this,t,null,hl,li,{})}}const gf="";function pl(r){let t,e;return{c(){t=mr("svg"),e=mr("path"),B(e,"d","M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"),B(t,"viewBox","0 0 18 18"),B(t,"width","16"),B(t,"height","16"),B(t,"class","svelte-en2qvf")},m(n,i){ze(n,t,i),ut(t,e)},p:It,i:It,o:It,d(n){n&&Re(t)}}}class dl extends vi{constructor(t){super(),di(this,t,null,pl,li,{})}}const pf="";function vl(r){let t;return{c(){t=Jt("div"),t.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>',B(t,"class","svelte-7cmwmc")},m(e,n){ze(e,t,n)},p:It,i:It,o:It,d(e){e&&Re(t)}}}class yl extends vi{constructor(t){super(),di(this,t,null,vl,li,{})}}const df="";function ml(r){let t,e,n;return{c(){t=mr("svg"),e=mr("path"),B(e,"stroke-width","4"),B(e,"fill-rule","evenodd"),B(e,"clip-rule","evenodd"),B(e,"d","M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"),B(e,"class","svelte-1k1cmht"),B(t,"width",n=r[0]!=="list"?void 0:"20"),B(t,"viewBox","0 0 70 85"),B(t,"fill","none"),B(t,"class","svelte-1k1cmht"),nn(t,"in-map",r[0]!=="list"),nn(t,"list-icon",r[0]==="list")},m(i,o){ze(i,t,o),ut(t,e)},p(i,[o]){o&1&&n!==(n=i[0]!=="list"?void 0:"20")&&B(t,"width",n),o&1&&nn(t,"in-map",i[0]!=="list"),o&1&&nn(t,"list-icon",i[0]==="list")},i:It,o:It,d(i){i&&Re(t)}}}function _l(r,t,e){let{displayIn:n}=t;return r.$$set=i=>{"displayIn"in i&&e(0,n=i.displayIn)},[n]}class ca extends vi{constructor(t){super(),di(this,t,_l,ml,li,{displayIn:0})}}const vf="";function El(r){let t,e;return{c(){t=mr("svg"),e=mr("path"),B(e,"d","M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"),B(t,"viewBox","0 0 18 18"),B(t,"xml:space","preserve"),B(t,"width","20"),B(t,"class","svelte-en2qvf")},m(n,i){ze(n,t,i),ut(t,e)},p:It,i:It,o:It,d(n){n&&Re(t)}}}class Il extends vi{constructor(t){super(),di(this,t,null,El,li,{})}}const yf="";function fa(r,t,e){const n=r.slice();return n[69]=t[e],n[71]=e,n}function ha(r){let t,e;return t=new yl({}),{c(){ji(t.$$.fragment)},m(n,i){gi(t,n,i),e=!0},i(n){e||(Zt(t.$$.fragment,n),e=!0)},o(n){Oe(t.$$.fragment,n),e=!1},d(n){pi(t,n)}}}function ga(r){let t,e,n,i,o;return e=new gl({}),{c(){t=Jt("button"),ji(e.$$.fragment),B(t,"type","button"),B(t,"title",r[9]),B(t,"class","svelte-z0d4ta"),nn(t,"active",r[0])},m(s,a){ze(s,t,a),gi(e,t,null),n=!0,i||(o=Ve(t,"click",r[56]),i=!0)},p(s,a){(!n||a[0]&512)&&B(t,"title",s[9]),(!n||a[0]&1)&&nn(t,"active",s[0])},i(s){n||(Zt(e.$$.fragment,s),n=!0)},o(s){Oe(e.$$.fragment,s),n=!1},d(s){s&&Re(t),pi(e),i=!1,o()}}}function Cl(r){let t,e,n,i,o=r[12],s=[];for(let u=0;u<o.length;u+=1)s[u]=da(fa(r,o,u));const a=u=>Oe(s[u],1,1,()=>{s[u]=null});return{c(){t=Jt("ul");for(let u=0;u<s.length;u+=1)s[u].c();B(t,"class","svelte-z0d4ta")},m(u,l){ze(u,t,l);for(let c=0;c<s.length;c+=1)s[c]&&s[c].m(t,null);e=!0,n||(i=[Ve(t,"mouseleave",r[59]),Ve(t,"blur",r[60])],n=!0)},p(u,l){if(l[0]&2110464){o=u[12];let c;for(c=0;c<o.length;c+=1){const f=fa(u,o,c);s[c]?(s[c].p(f,l),Zt(s[c],1)):(s[c]=da(f),s[c].c(),Zt(s[c],1),s[c].m(t,null))}for(wo(),c=o.length;c<s.length;c+=1)a(c);Lo()}},i(u){if(!e){for(let l=0;l<o.length;l+=1)Zt(s[l]);e=!0}},o(u){s=s.filter(Boolean);for(let l=0;l<s.length;l+=1)Oe(s[l]);e=!1},d(u){u&&Re(t),el(s,u),n=!1,yr(i)}}}function Nl(r){let t,e;return{c(){t=Jt("div"),e=kr(r[7]),B(t,"class","no-results svelte-z0d4ta")},m(n,i){ze(n,t,i),ut(t,e)},p(n,i){i[0]&128&&Yi(e,n[7])},i:It,o:It,d(n){n&&Re(t)}}}function xl(r){let t="",e;return{c(){e=kr(t)},m(n,i){ze(n,e,i)},p:It,i:It,o:It,d(n){n&&Re(e)}}}function Sl(r){let t,e;return{c(){t=Jt("div"),e=kr(r[6]),B(t,"class","error svelte-z0d4ta")},m(n,i){ze(n,t,i),ut(t,e)},p(n,i){i[0]&64&&Yi(e,n[6])},i:It,o:It,d(n){n&&Re(t)}}}function pa(r){var i,o;let t,e=(((o=(i=r[69].properties)==null?void 0:i.place_type_name)==null?void 0:o[0])??r[69].place_type[0])+"",n;return{c(){t=Jt("span"),n=kr(e),B(t,"class","svelte-z0d4ta")},m(s,a){ze(s,t,a),ut(t,n)},p(s,a){var u,l;a[0]&4096&&e!==(e=(((l=(u=s[69].properties)==null?void 0:u.place_type_name)==null?void 0:l[0])??s[69].place_type[0])+"")&&Yi(n,e)},d(s){s&&Re(t)}}}function da(r){let t,e,n,i,o,s,a=r[69].place_name.replace(/,.*/,"")+"",u,l,c,f,h,g=r[69].place_name.replace(/[^,]*,?\s*/,"")+"",p,m,d,y,I,C;e=new ca({props:{displayIn:"list"}});let S=r[10]&&pa(r);function x(){return r[57](r[71])}function L(){return r[58](r[69])}return{c(){t=Jt("li"),ji(e.$$.fragment),n=kn(),i=Jt("span"),o=Jt("span"),s=Jt("span"),u=kr(a),l=kn(),S&&S.c(),c=kn(),f=Jt("span"),h=Jt("span"),p=kr(g),m=kn(),B(s,"class","svelte-z0d4ta"),B(o,"class","svelte-z0d4ta"),B(i,"class","svelte-z0d4ta"),B(h,"class","svelte-z0d4ta"),B(f,"class","svelte-z0d4ta"),B(t,"tabindex","0"),B(t,"data-selected",d=r[13]===r[71]),B(t,"class","svelte-z0d4ta"),nn(t,"selected",r[13]===r[71])},m(D,T){ze(D,t,T),gi(e,t,null),ut(t,n),ut(t,i),ut(i,o),ut(o,s),ut(s,u),ut(o,l),S&&S.m(o,null),ut(t,c),ut(t,f),ut(f,h),ut(h,p),ut(t,m),y=!0,I||(C=[Ve(t,"mouseenter",x),Ve(t,"focus",L)],I=!0)},p(D,T){r=D,(!y||T[0]&4096)&&a!==(a=r[69].place_name.replace(/,.*/,"")+"")&&Yi(u,a),r[10]?S?S.p(r,T):(S=pa(r),S.c(),S.m(o,null)):S&&(S.d(1),S=null),(!y||T[0]&4096)&&g!==(g=r[69].place_name.replace(/[^,]*,?\s*/,"")+"")&&Yi(p,g),(!y||T[0]&8192&&d!==(d=r[13]===r[71]))&&B(t,"data-selected",d),(!y||T[0]&8192)&&nn(t,"selected",r[13]===r[71])},i(D){y||(Zt(e.$$.fragment,D),y=!0)},o(D){Oe(e.$$.fragment,D),y=!1},d(D){D&&Re(t),pi(e),S&&S.d(),I=!1,yr(C)}}}function wl(r){let t,e,n,i,o,s,a,u,l,c,f,h,g,p,m,d,y,I,C,S;i=new Il({}),c=new dl({});let x=r[17]&&ha(),L=r[5]===!0&&ga(r);const D=r[48].default,T=Ju(D,r,r[47],null),F=[Sl,xl,Nl,Cl],q=[];function j(P,X){var R,Y;return P[16]?0:P[14]?((R=P[12])==null?void 0:R.length)===0?2:P[14]&&((Y=P[12])!=null&&Y.length)?3:-1:1}return~(m=j(r))&&(d=q[m]=F[m](r)),{c(){t=Jt("form"),e=Jt("div"),n=Jt("button"),ji(i.$$.fragment),o=kn(),s=Jt("input"),a=kn(),u=Jt("div"),l=Jt("button"),ji(c.$$.fragment),f=kn(),x&&x.c(),h=kn(),L&&L.c(),g=kn(),T&&T.c(),p=kn(),d&&d.c(),B(n,"type","button"),B(n,"class","svelte-z0d4ta"),B(s,"placeholder",r[8]),B(s,"aria-label",r[8]),B(s,"class","svelte-z0d4ta"),B(l,"type","button"),B(l,"title",r[3]),B(l,"class","svelte-z0d4ta"),nn(l,"displayable",r[1]!==""),B(u,"class","clear-button-container svelte-z0d4ta"),B(e,"class","input-group svelte-z0d4ta"),B(t,"tabindex","0"),B(t,"class",y=oa(r[2])+" svelte-z0d4ta"),nn(t,"can-collapse",r[4]&&r[1]==="")},m(P,X){ze(P,t,X),ut(t,e),ut(e,n),gi(i,n,null),ut(e,o),ut(e,s),r[50](s),sa(s,r[1]),ut(e,a),ut(e,u),ut(u,l),gi(c,l,null),ut(u,f),x&&x.m(u,null),ut(e,h),L&&L.m(e,null),ut(e,g),T&&T.m(e,null),ut(t,p),~m&&q[m].m(t,null),I=!0,C||(S=[Ve(n,"click",r[49]),Ve(s,"input",r[51]),Ve(s,"focus",r[52]),Ve(s,"blur",r[53]),Ve(s,"keydown",r[19]),Ve(s,"input",r[54]),Ve(l,"click",r[55]),Ve(t,"submit",nl(r[18]))],C=!0)},p(P,X){(!I||X[0]&256)&&B(s,"placeholder",P[8]),(!I||X[0]&256)&&B(s,"aria-label",P[8]),X[0]&2&&s.value!==P[1]&&sa(s,P[1]),(!I||X[0]&8)&&B(l,"title",P[3]),(!I||X[0]&2)&&nn(l,"displayable",P[1]!==""),P[17]?x?X[0]&131072&&Zt(x,1):(x=ha(),x.c(),Zt(x,1),x.m(u,null)):x&&(wo(),Oe(x,1,1,()=>{x=null}),Lo()),P[5]===!0?L?(L.p(P,X),X[0]&32&&Zt(L,1)):(L=ga(P),L.c(),Zt(L,1),L.m(e,g)):L&&(wo(),Oe(L,1,1,()=>{L=null}),Lo()),T&&T.p&&(!I||X[1]&65536)&&$u(T,D,P,P[47],I?Zu(D,P[47],X,null):tl(P[47]),null);let R=m;m=j(P),m===R?~m&&q[m].p(P,X):(d&&(wo(),Oe(q[R],1,1,()=>{q[R]=null}),Lo()),~m?(d=q[m],d?d.p(P,X):(d=q[m]=F[m](P),d.c()),Zt(d,1),d.m(t,null)):d=null),(!I||X[0]&4&&y!==(y=oa(P[2])+" svelte-z0d4ta"))&&B(t,"class",y),(!I||X[0]&22)&&nn(t,"can-collapse",P[4]&&P[1]==="")},i(P){I||(Zt(i.$$.fragment,P),Zt(c.$$.fragment,P),Zt(x),Zt(L),Zt(T,P),Zt(d),I=!0)},o(P){Oe(i.$$.fragment,P),Oe(c.$$.fragment,P),Oe(x),Oe(L),Oe(T,P),Oe(d),I=!1},d(P){P&&Re(t),pi(i),r[50](null),pi(c),x&&x.d(),L&&L.d(),T&&T.d(P),~m&&q[m].d(),C=!1,yr(S)}}}function Ll(r,t,e){const n=t[1],i=t[0],o=n-i;return r===n&&e?r:((r-i)%o+o)%o+i}function bl(r,t,e){let n,{$$slots:i={},$$scope:o}=t,{class:s=void 0}=t,{apiKey:a}=t,{bbox:u=void 0}=t,{clearButtonTitle:l="clear"}=t,{clearOnBlur:c=!1}=t,{collapsed:f=!1}=t,{country:h=void 0}=t,{debounceSearch:g=200}=t,{enableReverse:p=!1}=t,{errorMessage:m="Searching failed"}=t,{filter:d=()=>!0}=t,{flyTo:y=!0}=t,{fuzzyMatch:I=!0}=t,{language:C=void 0}=t,{limit:S=void 0}=t,{mapController:x=void 0}=t,{minLength:L=2}=t,{noResultsMessage:D="No results found"}=t,{placeholder:T="Search"}=t,{proximity:F=void 0}=t,{reverseActive:q=p==="always"}=t,{reverseButtonTitle:j="toggle reverse geocoding"}=t,{searchValue:P=""}=t,{showFullGeometry:X=!0}=t,{showPlaceType:R=!1}=t,{showResultsWhileTyping:Y=!0}=t,{trackProximity:at=!0}=t,{types:Rt=void 0}=t,{zoom:Kt=16}=t,{fetchParameters:me={}}=t;function oi(){nr.focus()}function Gn(){nr.blur()}function er(N,Xt=!0){e(1,P=N),Xt?(e(13,qt=-1),Hu()):(Qs(),setTimeout(()=>{nr.focus(),nr.select()}))}let _e=!1,rt,Dt,Et,Yu="",nr,qt=-1,Br,as=[],si,Xi,us;const Gr=sl();ol(()=>{x&&(x.setEventHandler(void 0),x.indicateReverse(!1),x.setSelectedMarker(-1),x.setMarkers(void 0,void 0))});function Hu(N){if(Xi&&(clearTimeout(Xi),Xi=void 0),qt>-1&&rt)e(45,Et=rt[qt]),e(1,P=Et.place_name.replace(/,.*/,"")),e(16,Br=void 0),e(44,Dt=void 0),e(13,qt=-1);else if(P){const Xt=N||!Wu();Ks(P,{exact:!0}).then(()=>{e(44,Dt=rt),e(45,Et=void 0),Xt&&Qc()}).catch(rr=>e(16,Br=rr))}}function Wu(){return/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(P)}async function Ks(N,{byId:Xt=!1,exact:rr=!1}={}){e(16,Br=void 0);const xo=Wu(),$e=new URLSearchParams;C!=null&&$e.set("language",Array.isArray(C)?C.join(","):C),Rt&&$e.set("types",Rt.join(",")),xo||(u&&$e.set("bbox",u.map(ui=>ui.toFixed(6)).join(",")),h&&$e.set("country",Array.isArray(h)?h.join(","):h)),Xt||(F&&$e.set("proximity",F.map(ui=>ui.toFixed(6)).join(",")),(rr||!Y)&&$e.set("autocomplete","false"),$e.set("fuzzyMatch",String(I))),S!==void 0&&$e.set("limit",String(S)),$e.set("key",a);const ai="https://api.maptiler.com/geocoding/"+encodeURIComponent(N)+".json?"+$e.toString();if(ai===Yu){Xt?(e(12,rt=void 0),e(45,Et=as[0])):e(12,rt=as);return}Yu=ai,si==null||si.abort();const Pe=new AbortController;e(17,si=Pe);let Zs;try{Zs=await fetch(ai,{signal:Pe.signal,...me}).finally(()=>{Pe===si&&e(17,si=void 0)})}catch(ui){if(ui&&typeof ui=="object"&&ui.name==="AbortError")return;throw new Error}if(!Zs.ok)throw new Error;const $s=await Zs.json();Gr("response",{url:ai,featureCollection:$s}),Xt?(e(12,rt=void 0),e(45,Et=$s.features[0]),as=[Et]):(e(12,rt=$s.features.filter(d)),as=rt,xo&&nr.focus())}function Qc(){var rr,xo,$e,ai;if(!(Dt!=null&&Dt.length)||!y)return;const N=[180,90,-180,-90],Xt=!Dt.some(Pe=>!Pe.matching_text);for(const Pe of Dt)(Xt||!Pe.matching_text)&&(N[0]=Math.min(N[0],((rr=Pe.bbox)==null?void 0:rr[0])??Pe.center[0]),N[1]=Math.min(N[1],((xo=Pe.bbox)==null?void 0:xo[1])??Pe.center[1]),N[2]=Math.max(N[2],(($e=Pe.bbox)==null?void 0:$e[2])??Pe.center[0]),N[3]=Math.max(N[3],((ai=Pe.bbox)==null?void 0:ai[3])??Pe.center[1]));x&&Dt.length>0&&(Et&&N[0]===N[2]&&N[1]===N[3]?x.flyTo(Et.center,Kt):x.fitBounds(N,50))}function Jc(N){e(0,q=p==="always"),er(Ll(N[0],[-180,180],!0).toFixed(6)+","+N[1].toFixed(6))}function Zc(N){if(!rt)return;let Xt=N.key==="ArrowDown"?1:N.key==="ArrowUp"?-1:0;Xt?(qt===-1&&Xt===-1&&e(13,qt=rt.length),e(13,qt+=Xt),qt>=rt.length&&e(13,qt=-1),N.preventDefault()):["ArrowLeft","ArrowRight","Home","End"].includes(N.key)&&e(13,qt=-1)}function Qs(N=!0){if(Y&&P.length>L){Xi&&clearTimeout(Xi);const Xt=P;Xi=window.setTimeout(()=>{Ks(Xt).catch(rr=>e(16,Br=rr))},N?g:0)}else e(12,rt=void 0),e(16,Br=void 0)}function Js(N){e(45,Et=N),e(1,P=N.place_name),e(13,qt=-1)}const $c=()=>nr.focus();function tf(N){cs[N?"unshift":"push"](()=>{nr=N,e(15,nr)})}function ef(){P=this.value,e(1,P),e(11,_e),e(25,c)}const nf=()=>e(11,_e=!0),rf=()=>e(11,_e=!1),of=()=>Qs(),sf=()=>{e(1,P=""),nr.focus()},af=()=>e(0,q=!q),uf=N=>e(13,qt=N),lf=N=>Js(N),cf=()=>e(13,qt=-1),ff=()=>{};return r.$$set=N=>{"class"in N&&e(2,s=N.class),"apiKey"in N&&e(23,a=N.apiKey),"bbox"in N&&e(24,u=N.bbox),"clearButtonTitle"in N&&e(3,l=N.clearButtonTitle),"clearOnBlur"in N&&e(25,c=N.clearOnBlur),"collapsed"in N&&e(4,f=N.collapsed),"country"in N&&e(26,h=N.country),"debounceSearch"in N&&e(27,g=N.debounceSearch),"enableReverse"in N&&e(5,p=N.enableReverse),"errorMessage"in N&&e(6,m=N.errorMessage),"filter"in N&&e(28,d=N.filter),"flyTo"in N&&e(29,y=N.flyTo),"fuzzyMatch"in N&&e(30,I=N.fuzzyMatch),"language"in N&&e(31,C=N.language),"limit"in N&&e(32,S=N.limit),"mapController"in N&&e(33,x=N.mapController),"minLength"in N&&e(34,L=N.minLength),"noResultsMessage"in N&&e(7,D=N.noResultsMessage),"placeholder"in N&&e(8,T=N.placeholder),"proximity"in N&&e(22,F=N.proximity),"reverseActive"in N&&e(0,q=N.reverseActive),"reverseButtonTitle"in N&&e(9,j=N.reverseButtonTitle),"searchValue"in N&&e(1,P=N.searchValue),"showFullGeometry"in N&&e(35,X=N.showFullGeometry),"showPlaceType"in N&&e(10,R=N.showPlaceType),"showResultsWhileTyping"in N&&e(36,Y=N.showResultsWhileTyping),"trackProximity"in N&&e(37,at=N.trackProximity),"types"in N&&e(38,Rt=N.types),"zoom"in N&&e(39,Kt=N.zoom),"fetchParameters"in N&&e(40,me=N.fetchParameters),"$$scope"in N&&e(47,o=N.$$scope)},r.$$.update=()=>{if(r.$$.dirty[1]&64&&(at||e(22,F=void 0)),r.$$.dirty[0]&33556480&&setTimeout(()=>{e(14,us=_e),c&&!_e&&e(1,P="")}),r.$$.dirty[0]&4098&&(P||(e(45,Et=void 0),e(12,rt=void 0),e(16,Br=void 0),e(44,Dt=rt))),r.$$.dirty[1]&16400&&X&&Et&&!Et.address&&Et.geometry.type==="Point"&&Ks(Et.id,{byId:!0}).catch(N=>e(16,Br=N)),r.$$.dirty[0]&536870912|r.$$.dirty[1]&16644&&x&&Et&&y&&(!Et.bbox||Et.bbox[0]===Et.bbox[2]&&Et.bbox[1]===Et.bbox[3]?x.flyTo(Et.center,Kt):x.fitBounds(Et.bbox,50),e(12,rt=void 0),e(44,Dt=void 0),e(13,qt=-1)),r.$$.dirty[0]&4096|r.$$.dirty[1]&8192&&Dt!==rt&&e(44,Dt=void 0),r.$$.dirty[1]&24580&&x&&x.setMarkers(Dt,Et),r.$$.dirty[0]&2&&e(13,qt=-1),r.$$.dirty[0]&20481|r.$$.dirty[1]&68&&x&&x.setEventHandler(N=>{switch(N.type){case"mapClick":q&&Jc(N.coordinates);break;case"proximityChange":e(22,F=at?N.proximity:void 0);break;case"markerClick":{const Xt=rt==null?void 0:rt.find(rr=>rr.id===N.id);Xt&&Js(Xt)}break;case"markerMouseEnter":e(13,qt=us?(rt==null?void 0:rt.findIndex(Xt=>Xt.id===N.id))??-1:-1);break;case"markerMouseLeave":e(13,qt=-1);break}}),r.$$.dirty[0]&8192|r.$$.dirty[1]&4&&(x==null||x.setSelectedMarker(qt)),r.$$.dirty[0]&12288&&e(46,n=rt==null?void 0:rt[qt]),r.$$.dirty[0]&2|r.$$.dirty[1]&4){const N=/^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(P);x==null||x.setReverseMarker(N?[Number(N[1]),Number(N[2])]:void 0)}r.$$.dirty[1]&32768&&Gr("select",n),r.$$.dirty[1]&16384&&Gr("pick",Et),r.$$.dirty[0]&20480&&Gr("optionsVisibilityChange",us&&!!rt),r.$$.dirty[0]&4096&&Gr("featuresListed",rt),r.$$.dirty[1]&8192&&Gr("featuresMarked",Dt),r.$$.dirty[0]&1&&Gr("reverseToggle",q),r.$$.dirty[0]&2&&Gr("queryChange",P),r.$$.dirty[0]&1|r.$$.dirty[1]&4&&x&&x.indicateReverse(q)},[q,P,s,l,f,p,m,D,T,j,R,_e,rt,qt,us,nr,Br,si,Hu,Zc,Qs,Js,F,a,u,c,h,g,d,y,I,C,S,x,L,X,Y,at,Rt,Kt,me,oi,Gn,er,Dt,Et,n,o,i,$c,tf,ef,nf,rf,of,sf,af,uf,lf,cf,ff]}let Pl=class extends vi{constructor(t){super(),di(this,t,bl,wl,li,{class:2,apiKey:23,bbox:24,clearButtonTitle:3,clearOnBlur:25,collapsed:4,country:26,debounceSearch:27,enableReverse:5,errorMessage:6,filter:28,flyTo:29,fuzzyMatch:30,language:31,limit:32,mapController:33,minLength:34,noResultsMessage:7,placeholder:8,proximity:22,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:35,showPlaceType:10,showResultsWhileTyping:36,trackProximity:37,types:38,zoom:39,fetchParameters:40,focus:41,blur:42,setQuery:43},null,[-1,-1,-1])}get focus(){return this.$$.ctx[41]}get blur(){return this.$$.ctx[42]}get setQuery(){return this.$$.ctx[43]}};/**
|
|
2
2
|
* splaytree v3.1.1
|
|
3
3
|
* Fast Splay tree for Node and browser
|
|
4
4
|
*
|
package/maplibregl.js
CHANGED
|
@@ -1007,7 +1007,7 @@ function Gl(r, t, e) {
|
|
|
1007
1007
|
e(16, gr = void 0);
|
|
1008
1008
|
const Vi = $s(), Ge = new URLSearchParams();
|
|
1009
1009
|
C != null && Ge.set("language", Array.isArray(C) ? C.join(",") : C), St && Ge.set("types", St.join(",")), Vi || (u && Ge.set("bbox", u.map((Gr) => Gr.toFixed(6)).join(",")), h && Ge.set("country", Array.isArray(h) ? h.join(",") : h)), Ft || (A && Ge.set("proximity", A.map((Gr) => Gr.toFixed(6)).join(",")), (Bn || !Y) && Ge.set("autocomplete", "false"), Ge.set("fuzzyMatch", String(E))), N !== void 0 && Ge.set("limit", String(N)), Ge.set("key", a);
|
|
1010
|
-
const Br = "https://api.maptiler.com/geocoding/" + encodeURIComponent(S
|
|
1010
|
+
const Br = "https://api.maptiler.com/geocoding/" + encodeURIComponent(S) + ".json?" + Ge.toString();
|
|
1011
1011
|
if (Br === Js) {
|
|
1012
1012
|
Ft ? (e(12, nt = void 0), e(45, vt = Io[0])) : e(12, nt = Io);
|
|
1013
1013
|
return;
|
package/maplibregl.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Dt,K){typeof exports=="object"&&typeof module<"u"?K(exports):typeof define=="function"&&define.amd?define(["exports"],K):(Dt=typeof globalThis<"u"?globalThis:Dt||self,K(Dt.maplibreglMaptilerGeocoder={}))})(this,function(Dt){var An,ni;"use strict";var Hu=(Dt,K,$e)=>{if(!K.has(Dt))throw TypeError("Cannot "+$e)};var nr=(Dt,K,$e)=>(Hu(Dt,K,"read from private field"),$e?$e.call(Dt):K.get(Dt)),$s=(Dt,K,$e)=>{if(K.has(Dt))throw TypeError("Cannot add the same private member more than once");K instanceof WeakSet?K.add(Dt):K.set(Dt,$e)},us=(Dt,K,$e,qi)=>(Hu(Dt,K,"write to private field"),qi?qi.call(Dt,$e):K.set(Dt,$e),$e);function K(){}function $e(r,t){for(const e in t)r[e]=t[e];return r}function qi(r){return r()}function ta(){return Object.create(null)}function dr(r){r.forEach(qi)}function ea(r){return typeof r=="function"}function ai(r,t){return r!=r?t==t:r!==t||r&&typeof r=="object"||typeof r=="function"}function Wu(r){return Object.keys(r).length===0}function ju(r,t,e,n){if(r){const i=na(r,t,e,n);return r[0](i)}}function na(r,t,e,n){return r[1]&&n?$e(e.ctx.slice(),r[1](n(t))):e.ctx}function Ku(r,t,e,n){if(r[2]&&n){const i=r[2](n(e));if(t.dirty===void 0)return i;if(typeof i=="object"){const o=[],s=Math.max(t.dirty.length,i.length);for(let a=0;a<s;a+=1)o[a]=t.dirty[a]|i[a];return o}return t.dirty|i}return t.dirty}function Qu(r,t,e,n,i,o){if(i){const s=na(t,e,n,o);r.p(s,i)}}function Ju(r){if(r.ctx.length>32){const t=[],e=r.ctx.length/32;for(let n=0;n<e;n++)t[n]=-1;return t}return-1}function ra(r){return r??""}function lt(r,t){r.appendChild(t)}function ke(r,t,e){r.insertBefore(t,e||null)}function Pe(r){r.parentNode&&r.parentNode.removeChild(r)}function Zu(r,t){for(let e=0;e<r.length;e+=1)r[e]&&r[e].d(t)}function Qt(r){return document.createElement(r)}function vr(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function Br(r){return document.createTextNode(r)}function Bn(){return Br(" ")}function ze(r,t,e,n){return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}function $u(r){return function(t){return t.preventDefault(),r.call(this,t)}}function B(r,t,e){e==null?r.removeAttribute(t):r.getAttribute(t)!==e&&r.setAttribute(t,e)}function tl(r){return Array.from(r.childNodes)}function Xi(r,t){t=""+t,r.wholeText!==t&&(r.data=t)}function ia(r,t){r.value=t??""}function tn(r,t,e){r.classList[e?"add":"remove"](t)}function el(r,t,{bubbles:e=!1,cancelable:n=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(r,e,n,t),i}let Yi;function Hi(r){Yi=r}function oa(){if(!Yi)throw new Error("Function called outside component initialization");return Yi}function nl(r){oa().$$.on_destroy.push(r)}function rl(){const r=oa();return(t,e,{cancelable:n=!1}={})=>{const i=r.$$.callbacks[t];if(i){const o=el(t,e,{cancelable:n});return i.slice().forEach(s=>{s.call(r,o)}),!o.defaultPrevented}return!0}}const ui=[],ls=[];let li=[];const sa=[],il=Promise.resolve();let cs=!1;function ol(){cs||(cs=!0,il.then(aa))}function fs(r){li.push(r)}const hs=new Set;let ci=0;function aa(){if(ci!==0)return;const r=Yi;do{try{for(;ci<ui.length;){const t=ui[ci];ci++,Hi(t),sl(t.$$)}}catch(t){throw ui.length=0,ci=0,t}for(Hi(null),ui.length=0,ci=0;ls.length;)ls.pop()();for(let t=0;t<li.length;t+=1){const e=li[t];hs.has(e)||(hs.add(e),e())}li.length=0}while(ui.length);for(;sa.length;)sa.pop()();cs=!1,hs.clear(),Hi(r)}function sl(r){if(r.fragment!==null){r.update(),dr(r.before_update);const t=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,t),r.after_update.forEach(fs)}}function al(r){const t=[],e=[];li.forEach(n=>r.indexOf(n)===-1?t.push(n):e.push(n)),e.forEach(n=>n()),li=t}const xo=new Set;let Gr;function So(){Gr={r:0,c:[],p:Gr}}function wo(){Gr.r||dr(Gr.c),Gr=Gr.p}function Jt(r,t){r&&r.i&&(xo.delete(r),r.i(t))}function Re(r,t,e,n){if(r&&r.o){if(xo.has(r))return;xo.add(r),Gr.c.push(()=>{xo.delete(r),n&&(e&&r.d(1),n())}),r.o(t)}else n&&n()}function Wi(r){r&&r.c()}function fi(r,t,e,n){const{fragment:i,after_update:o}=r.$$;i&&i.m(t,e),n||fs(()=>{const s=r.$$.on_mount.map(qi).filter(ea);r.$$.on_destroy?r.$$.on_destroy.push(...s):dr(s),r.$$.on_mount=[]}),o.forEach(fs)}function hi(r,t){const e=r.$$;e.fragment!==null&&(al(e.after_update),dr(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function ul(r,t){r.$$.dirty[0]===-1&&(ui.push(r),ol(),r.$$.dirty.fill(0)),r.$$.dirty[t/31|0]|=1<<t%31}function gi(r,t,e,n,i,o,s,a=[-1]){const u=Yi;Hi(r);const l=r.$$={fragment:null,ctx:[],props:o,update:K,not_equal:i,bound:ta(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:ta(),dirty:a,skip_bound:!1,root:t.target||u.$$.root};s&&s(l.root);let c=!1;if(l.ctx=e?e(r,t.props||{},(f,h,...g)=>{const p=g.length?g[0]:h;return l.ctx&&i(l.ctx[f],l.ctx[f]=p)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](p),c&&ul(r,f)),h}):[],l.update(),c=!0,dr(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){const f=tl(t.target);l.fragment&&l.fragment.l(f),f.forEach(Pe)}else l.fragment&&l.fragment.c();t.intro&&Jt(r.$$.fragment),fi(r,t.target,t.anchor,t.customElement),aa()}Hi(u)}class pi{$destroy(){hi(this,1),this.$destroy=K}$on(t,e){if(!ea(e))return K;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const i=n.indexOf(e);i!==-1&&n.splice(i,1)}}$set(t){this.$$set&&!Wu(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const lf="";function ll(r){let t,e;return{c(){t=vr("svg"),e=vr("path"),B(e,"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"),B(t,"viewBox","0 0 60.006 21.412"),B(t,"width","14"),B(t,"height","20"),B(t,"class","svelte-en2qvf")},m(n,i){ke(n,t,i),lt(t,e)},p:K,i:K,o:K,d(n){n&&Pe(t)}}}class cl extends pi{constructor(t){super(),gi(this,t,null,ll,ai,{})}}const cf="";function fl(r){let t,e;return{c(){t=vr("svg"),e=vr("path"),B(e,"d","M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"),B(t,"viewBox","0 0 18 18"),B(t,"width","16"),B(t,"height","16"),B(t,"class","svelte-en2qvf")},m(n,i){ke(n,t,i),lt(t,e)},p:K,i:K,o:K,d(n){n&&Pe(t)}}}class hl extends pi{constructor(t){super(),gi(this,t,null,fl,ai,{})}}const ff="";function gl(r){let t;return{c(){t=Qt("div"),t.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>',B(t,"class","svelte-7cmwmc")},m(e,n){ke(e,t,n)},p:K,i:K,o:K,d(e){e&&Pe(t)}}}class pl extends pi{constructor(t){super(),gi(this,t,null,gl,ai,{})}}const hf="";function dl(r){let t,e,n;return{c(){t=vr("svg"),e=vr("path"),B(e,"stroke-width","4"),B(e,"fill-rule","evenodd"),B(e,"clip-rule","evenodd"),B(e,"d","M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"),B(e,"class","svelte-1k1cmht"),B(t,"width",n=r[0]!=="list"?void 0:"20"),B(t,"viewBox","0 0 70 85"),B(t,"fill","none"),B(t,"class","svelte-1k1cmht"),tn(t,"in-map",r[0]!=="list"),tn(t,"list-icon",r[0]==="list")},m(i,o){ke(i,t,o),lt(t,e)},p(i,[o]){o&1&&n!==(n=i[0]!=="list"?void 0:"20")&&B(t,"width",n),o&1&&tn(t,"in-map",i[0]!=="list"),o&1&&tn(t,"list-icon",i[0]==="list")},i:K,o:K,d(i){i&&Pe(t)}}}function vl(r,t,e){let{displayIn:n}=t;return r.$$set=i=>{"displayIn"in i&&e(0,n=i.displayIn)},[n]}class ua extends pi{constructor(t){super(),gi(this,t,vl,dl,ai,{displayIn:0})}}const gf="";function yl(r){let t,e;return{c(){t=vr("svg"),e=vr("path"),B(e,"d","M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"),B(t,"viewBox","0 0 18 18"),B(t,"xml:space","preserve"),B(t,"width","20"),B(t,"class","svelte-en2qvf")},m(n,i){ke(n,t,i),lt(t,e)},p:K,i:K,o:K,d(n){n&&Pe(t)}}}class ml extends pi{constructor(t){super(),gi(this,t,null,yl,ai,{})}}const pf="";function la(r,t,e){const n=r.slice();return n[69]=t[e],n[71]=e,n}function ca(r){let t,e;return t=new pl({}),{c(){Wi(t.$$.fragment)},m(n,i){fi(t,n,i),e=!0},i(n){e||(Jt(t.$$.fragment,n),e=!0)},o(n){Re(t.$$.fragment,n),e=!1},d(n){hi(t,n)}}}function fa(r){let t,e,n,i,o;return e=new cl({}),{c(){t=Qt("button"),Wi(e.$$.fragment),B(t,"type","button"),B(t,"title",r[9]),B(t,"class","svelte-z0d4ta"),tn(t,"active",r[0])},m(s,a){ke(s,t,a),fi(e,t,null),n=!0,i||(o=ze(t,"click",r[56]),i=!0)},p(s,a){(!n||a[0]&512)&&B(t,"title",s[9]),(!n||a[0]&1)&&tn(t,"active",s[0])},i(s){n||(Jt(e.$$.fragment,s),n=!0)},o(s){Re(e.$$.fragment,s),n=!1},d(s){s&&Pe(t),hi(e),i=!1,o()}}}function _l(r){let t,e,n,i,o=r[12],s=[];for(let u=0;u<o.length;u+=1)s[u]=ga(la(r,o,u));const a=u=>Re(s[u],1,1,()=>{s[u]=null});return{c(){t=Qt("ul");for(let u=0;u<s.length;u+=1)s[u].c();B(t,"class","svelte-z0d4ta")},m(u,l){ke(u,t,l);for(let c=0;c<s.length;c+=1)s[c]&&s[c].m(t,null);e=!0,n||(i=[ze(t,"mouseleave",r[59]),ze(t,"blur",r[60])],n=!0)},p(u,l){if(l[0]&2110464){o=u[12];let c;for(c=0;c<o.length;c+=1){const f=la(u,o,c);s[c]?(s[c].p(f,l),Jt(s[c],1)):(s[c]=ga(f),s[c].c(),Jt(s[c],1),s[c].m(t,null))}for(So(),c=o.length;c<s.length;c+=1)a(c);wo()}},i(u){if(!e){for(let l=0;l<o.length;l+=1)Jt(s[l]);e=!0}},o(u){s=s.filter(Boolean);for(let l=0;l<s.length;l+=1)Re(s[l]);e=!1},d(u){u&&Pe(t),Zu(s,u),n=!1,dr(i)}}}function El(r){let t,e;return{c(){t=Qt("div"),e=Br(r[7]),B(t,"class","no-results svelte-z0d4ta")},m(n,i){ke(n,t,i),lt(t,e)},p(n,i){i[0]&128&&Xi(e,n[7])},i:K,o:K,d(n){n&&Pe(t)}}}function Il(r){let t="",e;return{c(){e=Br(t)},m(n,i){ke(n,e,i)},p:K,i:K,o:K,d(n){n&&Pe(e)}}}function Cl(r){let t,e;return{c(){t=Qt("div"),e=Br(r[6]),B(t,"class","error svelte-z0d4ta")},m(n,i){ke(n,t,i),lt(t,e)},p(n,i){i[0]&64&&Xi(e,n[6])},i:K,o:K,d(n){n&&Pe(t)}}}function ha(r){var i,o;let t,e=(((o=(i=r[69].properties)==null?void 0:i.place_type_name)==null?void 0:o[0])??r[69].place_type[0])+"",n;return{c(){t=Qt("span"),n=Br(e),B(t,"class","svelte-z0d4ta")},m(s,a){ke(s,t,a),lt(t,n)},p(s,a){var u,l;a[0]&4096&&e!==(e=(((l=(u=s[69].properties)==null?void 0:u.place_type_name)==null?void 0:l[0])??s[69].place_type[0])+"")&&Xi(n,e)},d(s){s&&Pe(t)}}}function ga(r){let t,e,n,i,o,s,a=r[69].place_name.replace(/,.*/,"")+"",u,l,c,f,h,g=r[69].place_name.replace(/[^,]*,?\s*/,"")+"",p,y,v,m,E,C;e=new ua({props:{displayIn:"list"}});let N=r[10]&&ha(r);function x(){return r[57](r[71])}function L(){return r[58](r[69])}return{c(){t=Qt("li"),Wi(e.$$.fragment),n=Bn(),i=Qt("span"),o=Qt("span"),s=Qt("span"),u=Br(a),l=Bn(),N&&N.c(),c=Bn(),f=Qt("span"),h=Qt("span"),p=Br(g),y=Bn(),B(s,"class","svelte-z0d4ta"),B(o,"class","svelte-z0d4ta"),B(i,"class","svelte-z0d4ta"),B(h,"class","svelte-z0d4ta"),B(f,"class","svelte-z0d4ta"),B(t,"tabindex","0"),B(t,"data-selected",v=r[13]===r[71]),B(t,"class","svelte-z0d4ta"),tn(t,"selected",r[13]===r[71])},m(D,T){ke(D,t,T),fi(e,t,null),lt(t,n),lt(t,i),lt(i,o),lt(o,s),lt(s,u),lt(o,l),N&&N.m(o,null),lt(t,c),lt(t,f),lt(f,h),lt(h,p),lt(t,y),m=!0,E||(C=[ze(t,"mouseenter",x),ze(t,"focus",L)],E=!0)},p(D,T){r=D,(!m||T[0]&4096)&&a!==(a=r[69].place_name.replace(/,.*/,"")+"")&&Xi(u,a),r[10]?N?N.p(r,T):(N=ha(r),N.c(),N.m(o,null)):N&&(N.d(1),N=null),(!m||T[0]&4096)&&g!==(g=r[69].place_name.replace(/[^,]*,?\s*/,"")+"")&&Xi(p,g),(!m||T[0]&8192&&v!==(v=r[13]===r[71]))&&B(t,"data-selected",v),(!m||T[0]&8192)&&tn(t,"selected",r[13]===r[71])},i(D){m||(Jt(e.$$.fragment,D),m=!0)},o(D){Re(e.$$.fragment,D),m=!1},d(D){D&&Pe(t),hi(e),N&&N.d(),E=!1,dr(C)}}}function Nl(r){let t,e,n,i,o,s,a,u,l,c,f,h,g,p,y,v,m,E,C,N;i=new ml({}),c=new hl({});let x=r[17]&&ca(),L=r[5]===!0&&fa(r);const D=r[48].default,T=ju(D,r,r[47],null),F=[Cl,Il,El,_l],q=[];function j(P,X){var R,Y;return P[16]?0:P[14]?((R=P[12])==null?void 0:R.length)===0?2:P[14]&&((Y=P[12])!=null&&Y.length)?3:-1:1}return~(y=j(r))&&(v=q[y]=F[y](r)),{c(){t=Qt("form"),e=Qt("div"),n=Qt("button"),Wi(i.$$.fragment),o=Bn(),s=Qt("input"),a=Bn(),u=Qt("div"),l=Qt("button"),Wi(c.$$.fragment),f=Bn(),x&&x.c(),h=Bn(),L&&L.c(),g=Bn(),T&&T.c(),p=Bn(),v&&v.c(),B(n,"type","button"),B(n,"class","svelte-z0d4ta"),B(s,"placeholder",r[8]),B(s,"aria-label",r[8]),B(s,"class","svelte-z0d4ta"),B(l,"type","button"),B(l,"title",r[3]),B(l,"class","svelte-z0d4ta"),tn(l,"displayable",r[1]!==""),B(u,"class","clear-button-container svelte-z0d4ta"),B(e,"class","input-group svelte-z0d4ta"),B(t,"tabindex","0"),B(t,"class",m=ra(r[2])+" svelte-z0d4ta"),tn(t,"can-collapse",r[4]&&r[1]==="")},m(P,X){ke(P,t,X),lt(t,e),lt(e,n),fi(i,n,null),lt(e,o),lt(e,s),r[50](s),ia(s,r[1]),lt(e,a),lt(e,u),lt(u,l),fi(c,l,null),lt(u,f),x&&x.m(u,null),lt(e,h),L&&L.m(e,null),lt(e,g),T&&T.m(e,null),lt(t,p),~y&&q[y].m(t,null),E=!0,C||(N=[ze(n,"click",r[49]),ze(s,"input",r[51]),ze(s,"focus",r[52]),ze(s,"blur",r[53]),ze(s,"keydown",r[19]),ze(s,"input",r[54]),ze(l,"click",r[55]),ze(t,"submit",$u(r[18]))],C=!0)},p(P,X){(!E||X[0]&256)&&B(s,"placeholder",P[8]),(!E||X[0]&256)&&B(s,"aria-label",P[8]),X[0]&2&&s.value!==P[1]&&ia(s,P[1]),(!E||X[0]&8)&&B(l,"title",P[3]),(!E||X[0]&2)&&tn(l,"displayable",P[1]!==""),P[17]?x?X[0]&131072&&Jt(x,1):(x=ca(),x.c(),Jt(x,1),x.m(u,null)):x&&(So(),Re(x,1,1,()=>{x=null}),wo()),P[5]===!0?L?(L.p(P,X),X[0]&32&&Jt(L,1)):(L=fa(P),L.c(),Jt(L,1),L.m(e,g)):L&&(So(),Re(L,1,1,()=>{L=null}),wo()),T&&T.p&&(!E||X[1]&65536)&&Qu(T,D,P,P[47],E?Ku(D,P[47],X,null):Ju(P[47]),null);let R=y;y=j(P),y===R?~y&&q[y].p(P,X):(v&&(So(),Re(q[R],1,1,()=>{q[R]=null}),wo()),~y?(v=q[y],v?v.p(P,X):(v=q[y]=F[y](P),v.c()),Jt(v,1),v.m(t,null)):v=null),(!E||X[0]&4&&m!==(m=ra(P[2])+" svelte-z0d4ta"))&&B(t,"class",m),(!E||X[0]&22)&&tn(t,"can-collapse",P[4]&&P[1]==="")},i(P){E||(Jt(i.$$.fragment,P),Jt(c.$$.fragment,P),Jt(x),Jt(L),Jt(T,P),Jt(v),E=!0)},o(P){Re(i.$$.fragment,P),Re(c.$$.fragment,P),Re(x),Re(L),Re(T,P),Re(v),E=!1},d(P){P&&Pe(t),hi(i),r[50](null),hi(c),x&&x.d(),L&&L.d(),T&&T.d(P),~y&&q[y].d(),C=!1,dr(N)}}}function xl(r,t,e){const n=t[1],i=t[0],o=n-i;return r===n&&e?r:((r-i)%o+o)%o+i}function Sl(r,t,e){let n,{$$slots:i={},$$scope:o}=t,{class:s=void 0}=t,{apiKey:a}=t,{bbox:u=void 0}=t,{clearButtonTitle:l="clear"}=t,{clearOnBlur:c=!1}=t,{collapsed:f=!1}=t,{country:h=void 0}=t,{debounceSearch:g=200}=t,{enableReverse:p=!1}=t,{errorMessage:y="Searching failed"}=t,{filter:v=()=>!0}=t,{flyTo:m=!0}=t,{fuzzyMatch:E=!0}=t,{language:C=void 0}=t,{limit:N=void 0}=t,{mapController:x=void 0}=t,{minLength:L=2}=t,{noResultsMessage:D="No results found"}=t,{placeholder:T="Search"}=t,{proximity:F=void 0}=t,{reverseActive:q=p==="always"}=t,{reverseButtonTitle:j="toggle reverse geocoding"}=t,{searchValue:P=""}=t,{showFullGeometry:X=!0}=t,{showPlaceType:R=!1}=t,{showResultsWhileTyping:Y=!0}=t,{trackProximity:ut=!0}=t,{types:Rt=void 0}=t,{zoom:Kt=16}=t,{fetchParameters:ye={}}=t;function ri(){tr.focus()}function Fn(){tr.blur()}function $n(S,Xt=!0){e(1,P=S),Xt?(e(13,qt=-1),Xu()):(Ks(),setTimeout(()=>{tr.focus(),tr.select()}))}let me=!1,it,Ot,It,qu="",tr,qt=-1,Ar,ss=[],ii,Ui,as;const Fr=rl();nl(()=>{x&&(x.setEventHandler(void 0),x.indicateReverse(!1),x.setSelectedMarker(-1),x.setMarkers(void 0,void 0))});function Xu(S){if(Ui&&(clearTimeout(Ui),Ui=void 0),qt>-1&&it)e(45,It=it[qt]),e(1,P=It.place_name.replace(/,.*/,"")),e(16,Ar=void 0),e(44,Ot=void 0),e(13,qt=-1);else if(P){const Xt=S||!Yu();js(P,{exact:!0}).then(()=>{e(44,Ot=it),e(45,It=void 0),Xt&&Wc()}).catch(er=>e(16,Ar=er))}}function Yu(){return/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(P)}async function js(S,{byId:Xt=!1,exact:er=!1}={}){e(16,Ar=void 0);const No=Yu(),Ze=new URLSearchParams;C!=null&&Ze.set("language",Array.isArray(C)?C.join(","):C),Rt&&Ze.set("types",Rt.join(",")),No||(u&&Ze.set("bbox",u.map(si=>si.toFixed(6)).join(",")),h&&Ze.set("country",Array.isArray(h)?h.join(","):h)),Xt||(F&&Ze.set("proximity",F.map(si=>si.toFixed(6)).join(",")),(er||!Y)&&Ze.set("autocomplete","false"),Ze.set("fuzzyMatch",String(E))),N!==void 0&&Ze.set("limit",String(N)),Ze.set("key",a);const oi="https://api.maptiler.com/geocoding/"+encodeURIComponent(S.replaceAll(";",","))+".json?"+Ze.toString();if(oi===qu){Xt?(e(12,it=void 0),e(45,It=ss[0])):e(12,it=ss);return}qu=oi,ii==null||ii.abort();const be=new AbortController;e(17,ii=be);let Js;try{Js=await fetch(oi,{signal:be.signal,...ye}).finally(()=>{be===ii&&e(17,ii=void 0)})}catch(si){if(si&&typeof si=="object"&&si.name==="AbortError")return;throw new Error}if(!Js.ok)throw new Error;const Zs=await Js.json();Fr("response",{url:oi,featureCollection:Zs}),Xt?(e(12,it=void 0),e(45,It=Zs.features[0]),ss=[It]):(e(12,it=Zs.features.filter(v)),ss=it,No&&tr.focus())}function Wc(){var er,No,Ze,oi;if(!(Ot!=null&&Ot.length)||!m)return;const S=[180,90,-180,-90],Xt=!Ot.some(be=>!be.matching_text);for(const be of Ot)(Xt||!be.matching_text)&&(S[0]=Math.min(S[0],((er=be.bbox)==null?void 0:er[0])??be.center[0]),S[1]=Math.min(S[1],((No=be.bbox)==null?void 0:No[1])??be.center[1]),S[2]=Math.max(S[2],((Ze=be.bbox)==null?void 0:Ze[2])??be.center[0]),S[3]=Math.max(S[3],((oi=be.bbox)==null?void 0:oi[3])??be.center[1]));x&&Ot.length>0&&(It&&S[0]===S[2]&&S[1]===S[3]?x.flyTo(It.center,Kt):x.fitBounds(S,50))}function jc(S){e(0,q=p==="always"),$n(xl(S[0],[-180,180],!0).toFixed(6)+","+S[1].toFixed(6))}function Kc(S){if(!it)return;let Xt=S.key==="ArrowDown"?1:S.key==="ArrowUp"?-1:0;Xt?(qt===-1&&Xt===-1&&e(13,qt=it.length),e(13,qt+=Xt),qt>=it.length&&e(13,qt=-1),S.preventDefault()):["ArrowLeft","ArrowRight","Home","End"].includes(S.key)&&e(13,qt=-1)}function Ks(S=!0){if(Y&&P.length>L){Ui&&clearTimeout(Ui);const Xt=P;Ui=window.setTimeout(()=>{js(Xt).catch(er=>e(16,Ar=er))},S?g:0)}else e(12,it=void 0),e(16,Ar=void 0)}function Qs(S){e(45,It=S),e(1,P=S.place_name),e(13,qt=-1)}const Qc=()=>tr.focus();function Jc(S){ls[S?"unshift":"push"](()=>{tr=S,e(15,tr)})}function Zc(){P=this.value,e(1,P),e(11,me),e(25,c)}const $c=()=>e(11,me=!0),tf=()=>e(11,me=!1),ef=()=>Ks(),nf=()=>{e(1,P=""),tr.focus()},rf=()=>e(0,q=!q),of=S=>e(13,qt=S),sf=S=>Qs(S),af=()=>e(13,qt=-1),uf=()=>{};return r.$$set=S=>{"class"in S&&e(2,s=S.class),"apiKey"in S&&e(23,a=S.apiKey),"bbox"in S&&e(24,u=S.bbox),"clearButtonTitle"in S&&e(3,l=S.clearButtonTitle),"clearOnBlur"in S&&e(25,c=S.clearOnBlur),"collapsed"in S&&e(4,f=S.collapsed),"country"in S&&e(26,h=S.country),"debounceSearch"in S&&e(27,g=S.debounceSearch),"enableReverse"in S&&e(5,p=S.enableReverse),"errorMessage"in S&&e(6,y=S.errorMessage),"filter"in S&&e(28,v=S.filter),"flyTo"in S&&e(29,m=S.flyTo),"fuzzyMatch"in S&&e(30,E=S.fuzzyMatch),"language"in S&&e(31,C=S.language),"limit"in S&&e(32,N=S.limit),"mapController"in S&&e(33,x=S.mapController),"minLength"in S&&e(34,L=S.minLength),"noResultsMessage"in S&&e(7,D=S.noResultsMessage),"placeholder"in S&&e(8,T=S.placeholder),"proximity"in S&&e(22,F=S.proximity),"reverseActive"in S&&e(0,q=S.reverseActive),"reverseButtonTitle"in S&&e(9,j=S.reverseButtonTitle),"searchValue"in S&&e(1,P=S.searchValue),"showFullGeometry"in S&&e(35,X=S.showFullGeometry),"showPlaceType"in S&&e(10,R=S.showPlaceType),"showResultsWhileTyping"in S&&e(36,Y=S.showResultsWhileTyping),"trackProximity"in S&&e(37,ut=S.trackProximity),"types"in S&&e(38,Rt=S.types),"zoom"in S&&e(39,Kt=S.zoom),"fetchParameters"in S&&e(40,ye=S.fetchParameters),"$$scope"in S&&e(47,o=S.$$scope)},r.$$.update=()=>{if(r.$$.dirty[1]&64&&(ut||e(22,F=void 0)),r.$$.dirty[0]&33556480&&setTimeout(()=>{e(14,as=me),c&&!me&&e(1,P="")}),r.$$.dirty[0]&4098&&(P||(e(45,It=void 0),e(12,it=void 0),e(16,Ar=void 0),e(44,Ot=it))),r.$$.dirty[1]&16400&&X&&It&&!It.address&&It.geometry.type==="Point"&&js(It.id,{byId:!0}).catch(S=>e(16,Ar=S)),r.$$.dirty[0]&536870912|r.$$.dirty[1]&16644&&x&&It&&m&&(!It.bbox||It.bbox[0]===It.bbox[2]&&It.bbox[1]===It.bbox[3]?x.flyTo(It.center,Kt):x.fitBounds(It.bbox,50),e(12,it=void 0),e(44,Ot=void 0),e(13,qt=-1)),r.$$.dirty[0]&4096|r.$$.dirty[1]&8192&&Ot!==it&&e(44,Ot=void 0),r.$$.dirty[1]&24580&&x&&x.setMarkers(Ot,It),r.$$.dirty[0]&2&&e(13,qt=-1),r.$$.dirty[0]&20481|r.$$.dirty[1]&68&&x&&x.setEventHandler(S=>{switch(S.type){case"mapClick":q&&jc(S.coordinates);break;case"proximityChange":e(22,F=ut?S.proximity:void 0);break;case"markerClick":{const Xt=it==null?void 0:it.find(er=>er.id===S.id);Xt&&Qs(Xt)}break;case"markerMouseEnter":e(13,qt=as?(it==null?void 0:it.findIndex(Xt=>Xt.id===S.id))??-1:-1);break;case"markerMouseLeave":e(13,qt=-1);break}}),r.$$.dirty[0]&8192|r.$$.dirty[1]&4&&(x==null||x.setSelectedMarker(qt)),r.$$.dirty[0]&12288&&e(46,n=it==null?void 0:it[qt]),r.$$.dirty[0]&2|r.$$.dirty[1]&4){const S=/^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(P);x==null||x.setReverseMarker(S?[Number(S[1]),Number(S[2])]:void 0)}r.$$.dirty[1]&32768&&Fr("select",n),r.$$.dirty[1]&16384&&Fr("pick",It),r.$$.dirty[0]&20480&&Fr("optionsVisibilityChange",as&&!!it),r.$$.dirty[0]&4096&&Fr("featuresListed",it),r.$$.dirty[1]&8192&&Fr("featuresMarked",Ot),r.$$.dirty[0]&1&&Fr("reverseToggle",q),r.$$.dirty[0]&2&&Fr("queryChange",P),r.$$.dirty[0]&1|r.$$.dirty[1]&4&&x&&x.indicateReverse(q)},[q,P,s,l,f,p,y,D,T,j,R,me,it,qt,as,tr,Ar,ii,Xu,Kc,Ks,Qs,F,a,u,c,h,g,v,m,E,C,N,x,L,X,Y,ut,Rt,Kt,ye,ri,Fn,$n,Ot,It,n,o,i,Qc,Jc,Zc,$c,tf,ef,nf,rf,of,sf,af,uf]}let wl=class extends pi{constructor(t){super(),gi(this,t,Sl,Nl,ai,{class:2,apiKey:23,bbox:24,clearButtonTitle:3,clearOnBlur:25,collapsed:4,country:26,debounceSearch:27,enableReverse:5,errorMessage:6,filter:28,flyTo:29,fuzzyMatch:30,language:31,limit:32,mapController:33,minLength:34,noResultsMessage:7,placeholder:8,proximity:22,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:35,showPlaceType:10,showResultsWhileTyping:36,trackProximity:37,types:38,zoom:39,fetchParameters:40,focus:41,blur:42,setQuery:43},null,[-1,-1,-1])}get focus(){return this.$$.ctx[41]}get blur(){return this.$$.ctx[42]}get setQuery(){return this.$$.ctx[43]}};/**
|
|
1
|
+
(function(Dt,K){typeof exports=="object"&&typeof module<"u"?K(exports):typeof define=="function"&&define.amd?define(["exports"],K):(Dt=typeof globalThis<"u"?globalThis:Dt||self,K(Dt.maplibreglMaptilerGeocoder={}))})(this,function(Dt){var An,ni;"use strict";var Hu=(Dt,K,$e)=>{if(!K.has(Dt))throw TypeError("Cannot "+$e)};var nr=(Dt,K,$e)=>(Hu(Dt,K,"read from private field"),$e?$e.call(Dt):K.get(Dt)),$s=(Dt,K,$e)=>{if(K.has(Dt))throw TypeError("Cannot add the same private member more than once");K instanceof WeakSet?K.add(Dt):K.set(Dt,$e)},us=(Dt,K,$e,qi)=>(Hu(Dt,K,"write to private field"),qi?qi.call(Dt,$e):K.set(Dt,$e),$e);function K(){}function $e(r,t){for(const e in t)r[e]=t[e];return r}function qi(r){return r()}function ta(){return Object.create(null)}function dr(r){r.forEach(qi)}function ea(r){return typeof r=="function"}function ai(r,t){return r!=r?t==t:r!==t||r&&typeof r=="object"||typeof r=="function"}function Wu(r){return Object.keys(r).length===0}function ju(r,t,e,n){if(r){const i=na(r,t,e,n);return r[0](i)}}function na(r,t,e,n){return r[1]&&n?$e(e.ctx.slice(),r[1](n(t))):e.ctx}function Ku(r,t,e,n){if(r[2]&&n){const i=r[2](n(e));if(t.dirty===void 0)return i;if(typeof i=="object"){const o=[],s=Math.max(t.dirty.length,i.length);for(let a=0;a<s;a+=1)o[a]=t.dirty[a]|i[a];return o}return t.dirty|i}return t.dirty}function Qu(r,t,e,n,i,o){if(i){const s=na(t,e,n,o);r.p(s,i)}}function Ju(r){if(r.ctx.length>32){const t=[],e=r.ctx.length/32;for(let n=0;n<e;n++)t[n]=-1;return t}return-1}function ra(r){return r??""}function lt(r,t){r.appendChild(t)}function ke(r,t,e){r.insertBefore(t,e||null)}function Pe(r){r.parentNode&&r.parentNode.removeChild(r)}function Zu(r,t){for(let e=0;e<r.length;e+=1)r[e]&&r[e].d(t)}function Qt(r){return document.createElement(r)}function vr(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function Br(r){return document.createTextNode(r)}function Bn(){return Br(" ")}function ze(r,t,e,n){return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}function $u(r){return function(t){return t.preventDefault(),r.call(this,t)}}function B(r,t,e){e==null?r.removeAttribute(t):r.getAttribute(t)!==e&&r.setAttribute(t,e)}function tl(r){return Array.from(r.childNodes)}function Xi(r,t){t=""+t,r.wholeText!==t&&(r.data=t)}function ia(r,t){r.value=t??""}function tn(r,t,e){r.classList[e?"add":"remove"](t)}function el(r,t,{bubbles:e=!1,cancelable:n=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(r,e,n,t),i}let Yi;function Hi(r){Yi=r}function oa(){if(!Yi)throw new Error("Function called outside component initialization");return Yi}function nl(r){oa().$$.on_destroy.push(r)}function rl(){const r=oa();return(t,e,{cancelable:n=!1}={})=>{const i=r.$$.callbacks[t];if(i){const o=el(t,e,{cancelable:n});return i.slice().forEach(s=>{s.call(r,o)}),!o.defaultPrevented}return!0}}const ui=[],ls=[];let li=[];const sa=[],il=Promise.resolve();let cs=!1;function ol(){cs||(cs=!0,il.then(aa))}function fs(r){li.push(r)}const hs=new Set;let ci=0;function aa(){if(ci!==0)return;const r=Yi;do{try{for(;ci<ui.length;){const t=ui[ci];ci++,Hi(t),sl(t.$$)}}catch(t){throw ui.length=0,ci=0,t}for(Hi(null),ui.length=0,ci=0;ls.length;)ls.pop()();for(let t=0;t<li.length;t+=1){const e=li[t];hs.has(e)||(hs.add(e),e())}li.length=0}while(ui.length);for(;sa.length;)sa.pop()();cs=!1,hs.clear(),Hi(r)}function sl(r){if(r.fragment!==null){r.update(),dr(r.before_update);const t=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,t),r.after_update.forEach(fs)}}function al(r){const t=[],e=[];li.forEach(n=>r.indexOf(n)===-1?t.push(n):e.push(n)),e.forEach(n=>n()),li=t}const xo=new Set;let Gr;function So(){Gr={r:0,c:[],p:Gr}}function wo(){Gr.r||dr(Gr.c),Gr=Gr.p}function Jt(r,t){r&&r.i&&(xo.delete(r),r.i(t))}function Re(r,t,e,n){if(r&&r.o){if(xo.has(r))return;xo.add(r),Gr.c.push(()=>{xo.delete(r),n&&(e&&r.d(1),n())}),r.o(t)}else n&&n()}function Wi(r){r&&r.c()}function fi(r,t,e,n){const{fragment:i,after_update:o}=r.$$;i&&i.m(t,e),n||fs(()=>{const s=r.$$.on_mount.map(qi).filter(ea);r.$$.on_destroy?r.$$.on_destroy.push(...s):dr(s),r.$$.on_mount=[]}),o.forEach(fs)}function hi(r,t){const e=r.$$;e.fragment!==null&&(al(e.after_update),dr(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function ul(r,t){r.$$.dirty[0]===-1&&(ui.push(r),ol(),r.$$.dirty.fill(0)),r.$$.dirty[t/31|0]|=1<<t%31}function gi(r,t,e,n,i,o,s,a=[-1]){const u=Yi;Hi(r);const l=r.$$={fragment:null,ctx:[],props:o,update:K,not_equal:i,bound:ta(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:ta(),dirty:a,skip_bound:!1,root:t.target||u.$$.root};s&&s(l.root);let c=!1;if(l.ctx=e?e(r,t.props||{},(f,h,...g)=>{const p=g.length?g[0]:h;return l.ctx&&i(l.ctx[f],l.ctx[f]=p)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](p),c&&ul(r,f)),h}):[],l.update(),c=!0,dr(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){const f=tl(t.target);l.fragment&&l.fragment.l(f),f.forEach(Pe)}else l.fragment&&l.fragment.c();t.intro&&Jt(r.$$.fragment),fi(r,t.target,t.anchor,t.customElement),aa()}Hi(u)}class pi{$destroy(){hi(this,1),this.$destroy=K}$on(t,e){if(!ea(e))return K;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const i=n.indexOf(e);i!==-1&&n.splice(i,1)}}$set(t){this.$$set&&!Wu(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const lf="";function ll(r){let t,e;return{c(){t=vr("svg"),e=vr("path"),B(e,"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"),B(t,"viewBox","0 0 60.006 21.412"),B(t,"width","14"),B(t,"height","20"),B(t,"class","svelte-en2qvf")},m(n,i){ke(n,t,i),lt(t,e)},p:K,i:K,o:K,d(n){n&&Pe(t)}}}class cl extends pi{constructor(t){super(),gi(this,t,null,ll,ai,{})}}const cf="";function fl(r){let t,e;return{c(){t=vr("svg"),e=vr("path"),B(e,"d","M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"),B(t,"viewBox","0 0 18 18"),B(t,"width","16"),B(t,"height","16"),B(t,"class","svelte-en2qvf")},m(n,i){ke(n,t,i),lt(t,e)},p:K,i:K,o:K,d(n){n&&Pe(t)}}}class hl extends pi{constructor(t){super(),gi(this,t,null,fl,ai,{})}}const ff="";function gl(r){let t;return{c(){t=Qt("div"),t.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>',B(t,"class","svelte-7cmwmc")},m(e,n){ke(e,t,n)},p:K,i:K,o:K,d(e){e&&Pe(t)}}}class pl extends pi{constructor(t){super(),gi(this,t,null,gl,ai,{})}}const hf="";function dl(r){let t,e,n;return{c(){t=vr("svg"),e=vr("path"),B(e,"stroke-width","4"),B(e,"fill-rule","evenodd"),B(e,"clip-rule","evenodd"),B(e,"d","M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"),B(e,"class","svelte-1k1cmht"),B(t,"width",n=r[0]!=="list"?void 0:"20"),B(t,"viewBox","0 0 70 85"),B(t,"fill","none"),B(t,"class","svelte-1k1cmht"),tn(t,"in-map",r[0]!=="list"),tn(t,"list-icon",r[0]==="list")},m(i,o){ke(i,t,o),lt(t,e)},p(i,[o]){o&1&&n!==(n=i[0]!=="list"?void 0:"20")&&B(t,"width",n),o&1&&tn(t,"in-map",i[0]!=="list"),o&1&&tn(t,"list-icon",i[0]==="list")},i:K,o:K,d(i){i&&Pe(t)}}}function vl(r,t,e){let{displayIn:n}=t;return r.$$set=i=>{"displayIn"in i&&e(0,n=i.displayIn)},[n]}class ua extends pi{constructor(t){super(),gi(this,t,vl,dl,ai,{displayIn:0})}}const gf="";function yl(r){let t,e;return{c(){t=vr("svg"),e=vr("path"),B(e,"d","M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"),B(t,"viewBox","0 0 18 18"),B(t,"xml:space","preserve"),B(t,"width","20"),B(t,"class","svelte-en2qvf")},m(n,i){ke(n,t,i),lt(t,e)},p:K,i:K,o:K,d(n){n&&Pe(t)}}}class ml extends pi{constructor(t){super(),gi(this,t,null,yl,ai,{})}}const pf="";function la(r,t,e){const n=r.slice();return n[69]=t[e],n[71]=e,n}function ca(r){let t,e;return t=new pl({}),{c(){Wi(t.$$.fragment)},m(n,i){fi(t,n,i),e=!0},i(n){e||(Jt(t.$$.fragment,n),e=!0)},o(n){Re(t.$$.fragment,n),e=!1},d(n){hi(t,n)}}}function fa(r){let t,e,n,i,o;return e=new cl({}),{c(){t=Qt("button"),Wi(e.$$.fragment),B(t,"type","button"),B(t,"title",r[9]),B(t,"class","svelte-z0d4ta"),tn(t,"active",r[0])},m(s,a){ke(s,t,a),fi(e,t,null),n=!0,i||(o=ze(t,"click",r[56]),i=!0)},p(s,a){(!n||a[0]&512)&&B(t,"title",s[9]),(!n||a[0]&1)&&tn(t,"active",s[0])},i(s){n||(Jt(e.$$.fragment,s),n=!0)},o(s){Re(e.$$.fragment,s),n=!1},d(s){s&&Pe(t),hi(e),i=!1,o()}}}function _l(r){let t,e,n,i,o=r[12],s=[];for(let u=0;u<o.length;u+=1)s[u]=ga(la(r,o,u));const a=u=>Re(s[u],1,1,()=>{s[u]=null});return{c(){t=Qt("ul");for(let u=0;u<s.length;u+=1)s[u].c();B(t,"class","svelte-z0d4ta")},m(u,l){ke(u,t,l);for(let c=0;c<s.length;c+=1)s[c]&&s[c].m(t,null);e=!0,n||(i=[ze(t,"mouseleave",r[59]),ze(t,"blur",r[60])],n=!0)},p(u,l){if(l[0]&2110464){o=u[12];let c;for(c=0;c<o.length;c+=1){const f=la(u,o,c);s[c]?(s[c].p(f,l),Jt(s[c],1)):(s[c]=ga(f),s[c].c(),Jt(s[c],1),s[c].m(t,null))}for(So(),c=o.length;c<s.length;c+=1)a(c);wo()}},i(u){if(!e){for(let l=0;l<o.length;l+=1)Jt(s[l]);e=!0}},o(u){s=s.filter(Boolean);for(let l=0;l<s.length;l+=1)Re(s[l]);e=!1},d(u){u&&Pe(t),Zu(s,u),n=!1,dr(i)}}}function El(r){let t,e;return{c(){t=Qt("div"),e=Br(r[7]),B(t,"class","no-results svelte-z0d4ta")},m(n,i){ke(n,t,i),lt(t,e)},p(n,i){i[0]&128&&Xi(e,n[7])},i:K,o:K,d(n){n&&Pe(t)}}}function Il(r){let t="",e;return{c(){e=Br(t)},m(n,i){ke(n,e,i)},p:K,i:K,o:K,d(n){n&&Pe(e)}}}function Cl(r){let t,e;return{c(){t=Qt("div"),e=Br(r[6]),B(t,"class","error svelte-z0d4ta")},m(n,i){ke(n,t,i),lt(t,e)},p(n,i){i[0]&64&&Xi(e,n[6])},i:K,o:K,d(n){n&&Pe(t)}}}function ha(r){var i,o;let t,e=(((o=(i=r[69].properties)==null?void 0:i.place_type_name)==null?void 0:o[0])??r[69].place_type[0])+"",n;return{c(){t=Qt("span"),n=Br(e),B(t,"class","svelte-z0d4ta")},m(s,a){ke(s,t,a),lt(t,n)},p(s,a){var u,l;a[0]&4096&&e!==(e=(((l=(u=s[69].properties)==null?void 0:u.place_type_name)==null?void 0:l[0])??s[69].place_type[0])+"")&&Xi(n,e)},d(s){s&&Pe(t)}}}function ga(r){let t,e,n,i,o,s,a=r[69].place_name.replace(/,.*/,"")+"",u,l,c,f,h,g=r[69].place_name.replace(/[^,]*,?\s*/,"")+"",p,y,v,m,E,C;e=new ua({props:{displayIn:"list"}});let N=r[10]&&ha(r);function x(){return r[57](r[71])}function L(){return r[58](r[69])}return{c(){t=Qt("li"),Wi(e.$$.fragment),n=Bn(),i=Qt("span"),o=Qt("span"),s=Qt("span"),u=Br(a),l=Bn(),N&&N.c(),c=Bn(),f=Qt("span"),h=Qt("span"),p=Br(g),y=Bn(),B(s,"class","svelte-z0d4ta"),B(o,"class","svelte-z0d4ta"),B(i,"class","svelte-z0d4ta"),B(h,"class","svelte-z0d4ta"),B(f,"class","svelte-z0d4ta"),B(t,"tabindex","0"),B(t,"data-selected",v=r[13]===r[71]),B(t,"class","svelte-z0d4ta"),tn(t,"selected",r[13]===r[71])},m(D,T){ke(D,t,T),fi(e,t,null),lt(t,n),lt(t,i),lt(i,o),lt(o,s),lt(s,u),lt(o,l),N&&N.m(o,null),lt(t,c),lt(t,f),lt(f,h),lt(h,p),lt(t,y),m=!0,E||(C=[ze(t,"mouseenter",x),ze(t,"focus",L)],E=!0)},p(D,T){r=D,(!m||T[0]&4096)&&a!==(a=r[69].place_name.replace(/,.*/,"")+"")&&Xi(u,a),r[10]?N?N.p(r,T):(N=ha(r),N.c(),N.m(o,null)):N&&(N.d(1),N=null),(!m||T[0]&4096)&&g!==(g=r[69].place_name.replace(/[^,]*,?\s*/,"")+"")&&Xi(p,g),(!m||T[0]&8192&&v!==(v=r[13]===r[71]))&&B(t,"data-selected",v),(!m||T[0]&8192)&&tn(t,"selected",r[13]===r[71])},i(D){m||(Jt(e.$$.fragment,D),m=!0)},o(D){Re(e.$$.fragment,D),m=!1},d(D){D&&Pe(t),hi(e),N&&N.d(),E=!1,dr(C)}}}function Nl(r){let t,e,n,i,o,s,a,u,l,c,f,h,g,p,y,v,m,E,C,N;i=new ml({}),c=new hl({});let x=r[17]&&ca(),L=r[5]===!0&&fa(r);const D=r[48].default,T=ju(D,r,r[47],null),F=[Cl,Il,El,_l],q=[];function j(P,X){var R,Y;return P[16]?0:P[14]?((R=P[12])==null?void 0:R.length)===0?2:P[14]&&((Y=P[12])!=null&&Y.length)?3:-1:1}return~(y=j(r))&&(v=q[y]=F[y](r)),{c(){t=Qt("form"),e=Qt("div"),n=Qt("button"),Wi(i.$$.fragment),o=Bn(),s=Qt("input"),a=Bn(),u=Qt("div"),l=Qt("button"),Wi(c.$$.fragment),f=Bn(),x&&x.c(),h=Bn(),L&&L.c(),g=Bn(),T&&T.c(),p=Bn(),v&&v.c(),B(n,"type","button"),B(n,"class","svelte-z0d4ta"),B(s,"placeholder",r[8]),B(s,"aria-label",r[8]),B(s,"class","svelte-z0d4ta"),B(l,"type","button"),B(l,"title",r[3]),B(l,"class","svelte-z0d4ta"),tn(l,"displayable",r[1]!==""),B(u,"class","clear-button-container svelte-z0d4ta"),B(e,"class","input-group svelte-z0d4ta"),B(t,"tabindex","0"),B(t,"class",m=ra(r[2])+" svelte-z0d4ta"),tn(t,"can-collapse",r[4]&&r[1]==="")},m(P,X){ke(P,t,X),lt(t,e),lt(e,n),fi(i,n,null),lt(e,o),lt(e,s),r[50](s),ia(s,r[1]),lt(e,a),lt(e,u),lt(u,l),fi(c,l,null),lt(u,f),x&&x.m(u,null),lt(e,h),L&&L.m(e,null),lt(e,g),T&&T.m(e,null),lt(t,p),~y&&q[y].m(t,null),E=!0,C||(N=[ze(n,"click",r[49]),ze(s,"input",r[51]),ze(s,"focus",r[52]),ze(s,"blur",r[53]),ze(s,"keydown",r[19]),ze(s,"input",r[54]),ze(l,"click",r[55]),ze(t,"submit",$u(r[18]))],C=!0)},p(P,X){(!E||X[0]&256)&&B(s,"placeholder",P[8]),(!E||X[0]&256)&&B(s,"aria-label",P[8]),X[0]&2&&s.value!==P[1]&&ia(s,P[1]),(!E||X[0]&8)&&B(l,"title",P[3]),(!E||X[0]&2)&&tn(l,"displayable",P[1]!==""),P[17]?x?X[0]&131072&&Jt(x,1):(x=ca(),x.c(),Jt(x,1),x.m(u,null)):x&&(So(),Re(x,1,1,()=>{x=null}),wo()),P[5]===!0?L?(L.p(P,X),X[0]&32&&Jt(L,1)):(L=fa(P),L.c(),Jt(L,1),L.m(e,g)):L&&(So(),Re(L,1,1,()=>{L=null}),wo()),T&&T.p&&(!E||X[1]&65536)&&Qu(T,D,P,P[47],E?Ku(D,P[47],X,null):Ju(P[47]),null);let R=y;y=j(P),y===R?~y&&q[y].p(P,X):(v&&(So(),Re(q[R],1,1,()=>{q[R]=null}),wo()),~y?(v=q[y],v?v.p(P,X):(v=q[y]=F[y](P),v.c()),Jt(v,1),v.m(t,null)):v=null),(!E||X[0]&4&&m!==(m=ra(P[2])+" svelte-z0d4ta"))&&B(t,"class",m),(!E||X[0]&22)&&tn(t,"can-collapse",P[4]&&P[1]==="")},i(P){E||(Jt(i.$$.fragment,P),Jt(c.$$.fragment,P),Jt(x),Jt(L),Jt(T,P),Jt(v),E=!0)},o(P){Re(i.$$.fragment,P),Re(c.$$.fragment,P),Re(x),Re(L),Re(T,P),Re(v),E=!1},d(P){P&&Pe(t),hi(i),r[50](null),hi(c),x&&x.d(),L&&L.d(),T&&T.d(P),~y&&q[y].d(),C=!1,dr(N)}}}function xl(r,t,e){const n=t[1],i=t[0],o=n-i;return r===n&&e?r:((r-i)%o+o)%o+i}function Sl(r,t,e){let n,{$$slots:i={},$$scope:o}=t,{class:s=void 0}=t,{apiKey:a}=t,{bbox:u=void 0}=t,{clearButtonTitle:l="clear"}=t,{clearOnBlur:c=!1}=t,{collapsed:f=!1}=t,{country:h=void 0}=t,{debounceSearch:g=200}=t,{enableReverse:p=!1}=t,{errorMessage:y="Searching failed"}=t,{filter:v=()=>!0}=t,{flyTo:m=!0}=t,{fuzzyMatch:E=!0}=t,{language:C=void 0}=t,{limit:N=void 0}=t,{mapController:x=void 0}=t,{minLength:L=2}=t,{noResultsMessage:D="No results found"}=t,{placeholder:T="Search"}=t,{proximity:F=void 0}=t,{reverseActive:q=p==="always"}=t,{reverseButtonTitle:j="toggle reverse geocoding"}=t,{searchValue:P=""}=t,{showFullGeometry:X=!0}=t,{showPlaceType:R=!1}=t,{showResultsWhileTyping:Y=!0}=t,{trackProximity:ut=!0}=t,{types:Rt=void 0}=t,{zoom:Kt=16}=t,{fetchParameters:ye={}}=t;function ri(){tr.focus()}function Fn(){tr.blur()}function $n(S,Xt=!0){e(1,P=S),Xt?(e(13,qt=-1),Xu()):(Ks(),setTimeout(()=>{tr.focus(),tr.select()}))}let me=!1,it,Ot,It,qu="",tr,qt=-1,Ar,ss=[],ii,Ui,as;const Fr=rl();nl(()=>{x&&(x.setEventHandler(void 0),x.indicateReverse(!1),x.setSelectedMarker(-1),x.setMarkers(void 0,void 0))});function Xu(S){if(Ui&&(clearTimeout(Ui),Ui=void 0),qt>-1&&it)e(45,It=it[qt]),e(1,P=It.place_name.replace(/,.*/,"")),e(16,Ar=void 0),e(44,Ot=void 0),e(13,qt=-1);else if(P){const Xt=S||!Yu();js(P,{exact:!0}).then(()=>{e(44,Ot=it),e(45,It=void 0),Xt&&Wc()}).catch(er=>e(16,Ar=er))}}function Yu(){return/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(P)}async function js(S,{byId:Xt=!1,exact:er=!1}={}){e(16,Ar=void 0);const No=Yu(),Ze=new URLSearchParams;C!=null&&Ze.set("language",Array.isArray(C)?C.join(","):C),Rt&&Ze.set("types",Rt.join(",")),No||(u&&Ze.set("bbox",u.map(si=>si.toFixed(6)).join(",")),h&&Ze.set("country",Array.isArray(h)?h.join(","):h)),Xt||(F&&Ze.set("proximity",F.map(si=>si.toFixed(6)).join(",")),(er||!Y)&&Ze.set("autocomplete","false"),Ze.set("fuzzyMatch",String(E))),N!==void 0&&Ze.set("limit",String(N)),Ze.set("key",a);const oi="https://api.maptiler.com/geocoding/"+encodeURIComponent(S)+".json?"+Ze.toString();if(oi===qu){Xt?(e(12,it=void 0),e(45,It=ss[0])):e(12,it=ss);return}qu=oi,ii==null||ii.abort();const be=new AbortController;e(17,ii=be);let Js;try{Js=await fetch(oi,{signal:be.signal,...ye}).finally(()=>{be===ii&&e(17,ii=void 0)})}catch(si){if(si&&typeof si=="object"&&si.name==="AbortError")return;throw new Error}if(!Js.ok)throw new Error;const Zs=await Js.json();Fr("response",{url:oi,featureCollection:Zs}),Xt?(e(12,it=void 0),e(45,It=Zs.features[0]),ss=[It]):(e(12,it=Zs.features.filter(v)),ss=it,No&&tr.focus())}function Wc(){var er,No,Ze,oi;if(!(Ot!=null&&Ot.length)||!m)return;const S=[180,90,-180,-90],Xt=!Ot.some(be=>!be.matching_text);for(const be of Ot)(Xt||!be.matching_text)&&(S[0]=Math.min(S[0],((er=be.bbox)==null?void 0:er[0])??be.center[0]),S[1]=Math.min(S[1],((No=be.bbox)==null?void 0:No[1])??be.center[1]),S[2]=Math.max(S[2],((Ze=be.bbox)==null?void 0:Ze[2])??be.center[0]),S[3]=Math.max(S[3],((oi=be.bbox)==null?void 0:oi[3])??be.center[1]));x&&Ot.length>0&&(It&&S[0]===S[2]&&S[1]===S[3]?x.flyTo(It.center,Kt):x.fitBounds(S,50))}function jc(S){e(0,q=p==="always"),$n(xl(S[0],[-180,180],!0).toFixed(6)+","+S[1].toFixed(6))}function Kc(S){if(!it)return;let Xt=S.key==="ArrowDown"?1:S.key==="ArrowUp"?-1:0;Xt?(qt===-1&&Xt===-1&&e(13,qt=it.length),e(13,qt+=Xt),qt>=it.length&&e(13,qt=-1),S.preventDefault()):["ArrowLeft","ArrowRight","Home","End"].includes(S.key)&&e(13,qt=-1)}function Ks(S=!0){if(Y&&P.length>L){Ui&&clearTimeout(Ui);const Xt=P;Ui=window.setTimeout(()=>{js(Xt).catch(er=>e(16,Ar=er))},S?g:0)}else e(12,it=void 0),e(16,Ar=void 0)}function Qs(S){e(45,It=S),e(1,P=S.place_name),e(13,qt=-1)}const Qc=()=>tr.focus();function Jc(S){ls[S?"unshift":"push"](()=>{tr=S,e(15,tr)})}function Zc(){P=this.value,e(1,P),e(11,me),e(25,c)}const $c=()=>e(11,me=!0),tf=()=>e(11,me=!1),ef=()=>Ks(),nf=()=>{e(1,P=""),tr.focus()},rf=()=>e(0,q=!q),of=S=>e(13,qt=S),sf=S=>Qs(S),af=()=>e(13,qt=-1),uf=()=>{};return r.$$set=S=>{"class"in S&&e(2,s=S.class),"apiKey"in S&&e(23,a=S.apiKey),"bbox"in S&&e(24,u=S.bbox),"clearButtonTitle"in S&&e(3,l=S.clearButtonTitle),"clearOnBlur"in S&&e(25,c=S.clearOnBlur),"collapsed"in S&&e(4,f=S.collapsed),"country"in S&&e(26,h=S.country),"debounceSearch"in S&&e(27,g=S.debounceSearch),"enableReverse"in S&&e(5,p=S.enableReverse),"errorMessage"in S&&e(6,y=S.errorMessage),"filter"in S&&e(28,v=S.filter),"flyTo"in S&&e(29,m=S.flyTo),"fuzzyMatch"in S&&e(30,E=S.fuzzyMatch),"language"in S&&e(31,C=S.language),"limit"in S&&e(32,N=S.limit),"mapController"in S&&e(33,x=S.mapController),"minLength"in S&&e(34,L=S.minLength),"noResultsMessage"in S&&e(7,D=S.noResultsMessage),"placeholder"in S&&e(8,T=S.placeholder),"proximity"in S&&e(22,F=S.proximity),"reverseActive"in S&&e(0,q=S.reverseActive),"reverseButtonTitle"in S&&e(9,j=S.reverseButtonTitle),"searchValue"in S&&e(1,P=S.searchValue),"showFullGeometry"in S&&e(35,X=S.showFullGeometry),"showPlaceType"in S&&e(10,R=S.showPlaceType),"showResultsWhileTyping"in S&&e(36,Y=S.showResultsWhileTyping),"trackProximity"in S&&e(37,ut=S.trackProximity),"types"in S&&e(38,Rt=S.types),"zoom"in S&&e(39,Kt=S.zoom),"fetchParameters"in S&&e(40,ye=S.fetchParameters),"$$scope"in S&&e(47,o=S.$$scope)},r.$$.update=()=>{if(r.$$.dirty[1]&64&&(ut||e(22,F=void 0)),r.$$.dirty[0]&33556480&&setTimeout(()=>{e(14,as=me),c&&!me&&e(1,P="")}),r.$$.dirty[0]&4098&&(P||(e(45,It=void 0),e(12,it=void 0),e(16,Ar=void 0),e(44,Ot=it))),r.$$.dirty[1]&16400&&X&&It&&!It.address&&It.geometry.type==="Point"&&js(It.id,{byId:!0}).catch(S=>e(16,Ar=S)),r.$$.dirty[0]&536870912|r.$$.dirty[1]&16644&&x&&It&&m&&(!It.bbox||It.bbox[0]===It.bbox[2]&&It.bbox[1]===It.bbox[3]?x.flyTo(It.center,Kt):x.fitBounds(It.bbox,50),e(12,it=void 0),e(44,Ot=void 0),e(13,qt=-1)),r.$$.dirty[0]&4096|r.$$.dirty[1]&8192&&Ot!==it&&e(44,Ot=void 0),r.$$.dirty[1]&24580&&x&&x.setMarkers(Ot,It),r.$$.dirty[0]&2&&e(13,qt=-1),r.$$.dirty[0]&20481|r.$$.dirty[1]&68&&x&&x.setEventHandler(S=>{switch(S.type){case"mapClick":q&&jc(S.coordinates);break;case"proximityChange":e(22,F=ut?S.proximity:void 0);break;case"markerClick":{const Xt=it==null?void 0:it.find(er=>er.id===S.id);Xt&&Qs(Xt)}break;case"markerMouseEnter":e(13,qt=as?(it==null?void 0:it.findIndex(Xt=>Xt.id===S.id))??-1:-1);break;case"markerMouseLeave":e(13,qt=-1);break}}),r.$$.dirty[0]&8192|r.$$.dirty[1]&4&&(x==null||x.setSelectedMarker(qt)),r.$$.dirty[0]&12288&&e(46,n=it==null?void 0:it[qt]),r.$$.dirty[0]&2|r.$$.dirty[1]&4){const S=/^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(P);x==null||x.setReverseMarker(S?[Number(S[1]),Number(S[2])]:void 0)}r.$$.dirty[1]&32768&&Fr("select",n),r.$$.dirty[1]&16384&&Fr("pick",It),r.$$.dirty[0]&20480&&Fr("optionsVisibilityChange",as&&!!it),r.$$.dirty[0]&4096&&Fr("featuresListed",it),r.$$.dirty[1]&8192&&Fr("featuresMarked",Ot),r.$$.dirty[0]&1&&Fr("reverseToggle",q),r.$$.dirty[0]&2&&Fr("queryChange",P),r.$$.dirty[0]&1|r.$$.dirty[1]&4&&x&&x.indicateReverse(q)},[q,P,s,l,f,p,y,D,T,j,R,me,it,qt,as,tr,Ar,ii,Xu,Kc,Ks,Qs,F,a,u,c,h,g,v,m,E,C,N,x,L,X,Y,ut,Rt,Kt,ye,ri,Fn,$n,Ot,It,n,o,i,Qc,Jc,Zc,$c,tf,ef,nf,rf,of,sf,af,uf]}let wl=class extends pi{constructor(t){super(),gi(this,t,Sl,Nl,ai,{class:2,apiKey:23,bbox:24,clearButtonTitle:3,clearOnBlur:25,collapsed:4,country:26,debounceSearch:27,enableReverse:5,errorMessage:6,filter:28,flyTo:29,fuzzyMatch:30,language:31,limit:32,mapController:33,minLength:34,noResultsMessage:7,placeholder:8,proximity:22,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:35,showPlaceType:10,showResultsWhileTyping:36,trackProximity:37,types:38,zoom:39,fetchParameters:40,focus:41,blur:42,setQuery:43},null,[-1,-1,-1])}get focus(){return this.$$.ctx[41]}get blur(){return this.$$.ctx[42]}get setQuery(){return this.$$.ctx[43]}};/**
|
|
2
2
|
* splaytree v3.1.1
|
|
3
3
|
* Fast Splay tree for Node and browser
|
|
4
4
|
*
|
package/package.json
CHANGED
package/react.js
CHANGED
|
@@ -999,7 +999,7 @@ function fn(t, e, n) {
|
|
|
999
999
|
n(16, X = void 0);
|
|
1000
1000
|
const be = Qe(), V = new URLSearchParams();
|
|
1001
1001
|
F != null && V.set("language", Array.isArray(F) ? F.join(",") : F), Me && V.set("types", Me.join(",")), be || (f && V.set("bbox", f.map((re) => re.toFixed(6)).join(",")), I && V.set("country", Array.isArray(I) ? I.join(",") : I)), E || (Z && V.set("proximity", Z.map((re) => re.toFixed(6)).join(",")), (U || !te) && V.set("autocomplete", "false"), V.set("fuzzyMatch", String(C))), z !== void 0 && V.set("limit", String(z)), V.set("key", m);
|
|
1002
|
-
const le = "https://api.maptiler.com/geocoding/" + encodeURIComponent(r
|
|
1002
|
+
const le = "https://api.maptiler.com/geocoding/" + encodeURIComponent(r) + ".json?" + V.toString();
|
|
1003
1003
|
if (le === He) {
|
|
1004
1004
|
E ? (n(12, g = void 0), n(45, y = Ce[0])) : n(12, g = Ce);
|
|
1005
1005
|
return;
|
package/react.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(ne,K){typeof exports=="object"&&typeof module<"u"?K(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],K):(ne=typeof globalThis<"u"?globalThis:ne||self,K(ne.MaptilerGeocoder={},ne.React))})(this,function(ne,K){"use strict";function b(){}function ut(t,e){for(const n in e)t[n]=e[n];return t}function qe(t){return t()}function He(){return Object.create(null)}function Y(t){t.forEach(qe)}function Ke(t){return typeof t=="function"}function ue(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function ft(t){return Object.keys(t).length===0}function at(t,e,n,l){if(t){const c=Qe(t,e,n,l);return t[0](c)}}function Qe(t,e,n,l){return t[1]&&l?ut(n.ctx.slice(),t[1](l(e))):n.ctx}function dt(t,e,n,l){if(t[2]&&l){const c=t[2](l(n));if(e.dirty===void 0)return c;if(typeof c=="object"){const u=[],i=Math.max(e.dirty.length,c.length);for(let m=0;m<i;m+=1)u[m]=e.dirty[m]|c[m];return u}return e.dirty|c}return e.dirty}function ht(t,e,n,l,c,u){if(c){const i=Qe(e,n,l,u);t.p(i,c)}}function mt(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let l=0;l<n;l++)e[l]=-1;return e}return-1}function Ue(t){return t??""}function _(t,e){t.appendChild(e)}function F(t,e,n){t.insertBefore(e,n||null)}function G(t){t.parentNode&&t.parentNode.removeChild(t)}function _t(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function B(t){return document.createElement(t)}function $(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function le(t){return document.createTextNode(t)}function U(){return le(" ")}function V(t,e,n,l){return t.addEventListener(e,n,l),()=>t.removeEventListener(e,n,l)}function gt(t){return function(e){return e.preventDefault(),t.call(this,e)}}function o(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function yt(t){return Array.from(t.childNodes)}function we(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function We(t,e){t.value=e??""}function Q(t,e,n){t.classList[n?"add":"remove"](e)}function bt(t,e,{bubbles:n=!1,cancelable:l=!1}={}){const c=document.createEvent("CustomEvent");return c.initCustomEvent(t,n,l,e),c}let ke;function ve(t){ke=t}function Ze(){if(!ke)throw new Error("Function called outside component initialization");return ke}function wt(t){Ze().$$.on_destroy.push(t)}function kt(){const t=Ze();return(e,n,{cancelable:l=!1}={})=>{const c=t.$$.callbacks[e];if(c){const u=bt(e,n,{cancelable:l});return c.slice().forEach(i=>{i.call(t,u)}),!u.defaultPrevented}return!0}}const fe=[],Ae=[];let ae=[];const Je=[],vt=Promise.resolve();let Pe=!1;function pt(){Pe||(Pe=!0,vt.then(Xe))}function Ne(t){ae.push(t)}const je=new Set;let de=0;function Xe(){if(de!==0)return;const t=ke;do{try{for(;de<fe.length;){const e=fe[de];de++,ve(e),zt(e.$$)}}catch(e){throw fe.length=0,de=0,e}for(ve(null),fe.length=0,de=0;Ae.length;)Ae.pop()();for(let e=0;e<ae.length;e+=1){const n=ae[e];je.has(n)||(je.add(n),n())}ae.length=0}while(fe.length);for(;Je.length;)Je.pop()();Pe=!1,je.clear(),ve(t)}function zt(t){if(t.fragment!==null){t.update(),Y(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Ne)}}function Mt(t){const e=[],n=[];ae.forEach(l=>t.indexOf(l)===-1?e.push(l):n.push(l)),n.forEach(l=>l()),ae=e}const Te=new Set;let re;function Re(){re={r:0,c:[],p:re}}function Ce(){re.r||Y(re.c),re=re.p}function S(t,e){t&&t.i&&(Te.delete(t),t.i(e))}function O(t,e,n,l){if(t&&t.o){if(Te.has(t))return;Te.add(t),re.c.push(()=>{Te.delete(t),l&&(n&&t.d(1),l())}),t.o(e)}else l&&l()}function pe(t){t&&t.c()}function he(t,e,n,l){const{fragment:c,after_update:u}=t.$$;c&&c.m(e,n),l||Ne(()=>{const i=t.$$.on_mount.map(qe).filter(Ke);t.$$.on_destroy?t.$$.on_destroy.push(...i):Y(i),t.$$.on_mount=[]}),u.forEach(Ne)}function me(t,e){const n=t.$$;n.fragment!==null&&(Mt(n.after_update),Y(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Tt(t,e){t.$$.dirty[0]===-1&&(fe.push(t),pt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function _e(t,e,n,l,c,u,i,m=[-1]){const f=ke;ve(t);const a=t.$$={fragment:null,ctx:[],props:u,update:b,not_equal:c,bound:He(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(f?f.$$.context:[])),callbacks:He(),dirty:m,skip_bound:!1,root:e.target||f.$$.root};i&&i(a.root);let h=!1;if(a.ctx=n?n(t,e.props||{},(v,I,...N)=>{const D=N.length?N[0]:I;return a.ctx&&c(a.ctx[v],a.ctx[v]=D)&&(!a.skip_bound&&a.bound[v]&&a.bound[v](D),h&&Tt(t,v)),I}):[],a.update(),h=!0,Y(a.before_update),a.fragment=l?l(a.ctx):!1,e.target){if(e.hydrate){const v=yt(e.target);a.fragment&&a.fragment.l(v),v.forEach(G)}else a.fragment&&a.fragment.c();e.intro&&S(t.$$.fragment),he(t,e.target,e.anchor,e.customElement),Xe()}ve(f)}class ge{$destroy(){me(this,1),this.$destroy=b}$on(e,n){if(!Ke(n))return b;const l=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return l.push(n),()=>{const c=l.indexOf(n);c!==-1&&l.splice(c,1)}}$set(e){this.$$set&&!ft(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const an="";function Rt(t){let e,n;return{c(){e=$("svg"),n=$("path"),o(n,"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"),o(e,"viewBox","0 0 60.006 21.412"),o(e,"width","14"),o(e,"height","20"),o(e,"class","svelte-en2qvf")},m(l,c){F(l,e,c),_(e,n)},p:b,i:b,o:b,d(l){l&&G(e)}}}class Ct extends ge{constructor(e){super(),_e(this,e,null,Rt,ue,{})}}const dn="";function Et(t){let e,n;return{c(){e=$("svg"),n=$("path"),o(n,"d","M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"),o(e,"viewBox","0 0 18 18"),o(e,"width","16"),o(e,"height","16"),o(e,"class","svelte-en2qvf")},m(l,c){F(l,e,c),_(e,n)},p:b,i:b,o:b,d(l){l&&G(e)}}}class Bt extends ge{constructor(e){super(),_e(this,e,null,Et,ue,{})}}const hn="";function St(t){let e;return{c(){e=B("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>',o(e,"class","svelte-7cmwmc")},m(n,l){F(n,e,l)},p:b,i:b,o:b,d(n){n&&G(e)}}}class Lt extends ge{constructor(e){super(),_e(this,e,null,St,ue,{})}}const mn="";function It(t){let e,n,l;return{c(){e=$("svg"),n=$("path"),o(n,"stroke-width","4"),o(n,"fill-rule","evenodd"),o(n,"clip-rule","evenodd"),o(n,"d","M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"),o(n,"class","svelte-1k1cmht"),o(e,"width",l=t[0]!=="list"?void 0:"20"),o(e,"viewBox","0 0 70 85"),o(e,"fill","none"),o(e,"class","svelte-1k1cmht"),Q(e,"in-map",t[0]!=="list"),Q(e,"list-icon",t[0]==="list")},m(c,u){F(c,e,u),_(e,n)},p(c,[u]){u&1&&l!==(l=c[0]!=="list"?void 0:"20")&&o(e,"width",l),u&1&&Q(e,"in-map",c[0]!=="list"),u&1&&Q(e,"list-icon",c[0]==="list")},i:b,o:b,d(c){c&&G(e)}}}function At(t,e,n){let{displayIn:l}=e;return t.$$set=c=>{"displayIn"in c&&n(0,l=c.displayIn)},[l]}class Pt extends ge{constructor(e){super(),_e(this,e,At,It,ue,{displayIn:0})}}const _n="";function Nt(t){let e,n;return{c(){e=$("svg"),n=$("path"),o(n,"d","M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"),o(e,"viewBox","0 0 18 18"),o(e,"xml:space","preserve"),o(e,"width","20"),o(e,"class","svelte-en2qvf")},m(l,c){F(l,e,c),_(e,n)},p:b,i:b,o:b,d(l){l&&G(e)}}}class jt extends ge{constructor(e){super(),_e(this,e,null,Nt,ue,{})}}const gn="";function Ye(t,e,n){const l=t.slice();return l[69]=e[n],l[71]=n,l}function $e(t){let e,n;return e=new Lt({}),{c(){pe(e.$$.fragment)},m(l,c){he(e,l,c),n=!0},i(l){n||(S(e.$$.fragment,l),n=!0)},o(l){O(e.$$.fragment,l),n=!1},d(l){me(e,l)}}}function et(t){let e,n,l,c,u;return n=new Ct({}),{c(){e=B("button"),pe(n.$$.fragment),o(e,"type","button"),o(e,"title",t[9]),o(e,"class","svelte-z0d4ta"),Q(e,"active",t[0])},m(i,m){F(i,e,m),he(n,e,null),l=!0,c||(u=V(e,"click",t[56]),c=!0)},p(i,m){(!l||m[0]&512)&&o(e,"title",i[9]),(!l||m[0]&1)&&Q(e,"active",i[0])},i(i){l||(S(n.$$.fragment,i),l=!0)},o(i){O(n.$$.fragment,i),l=!1},d(i){i&&G(e),me(n),c=!1,u()}}}function xt(t){let e,n,l,c,u=t[12],i=[];for(let f=0;f<u.length;f+=1)i[f]=nt(Ye(t,u,f));const m=f=>O(i[f],1,1,()=>{i[f]=null});return{c(){e=B("ul");for(let f=0;f<i.length;f+=1)i[f].c();o(e,"class","svelte-z0d4ta")},m(f,a){F(f,e,a);for(let h=0;h<i.length;h+=1)i[h]&&i[h].m(e,null);n=!0,l||(c=[V(e,"mouseleave",t[59]),V(e,"blur",t[60])],l=!0)},p(f,a){if(a[0]&2110464){u=f[12];let h;for(h=0;h<u.length;h+=1){const v=Ye(f,u,h);i[h]?(i[h].p(v,a),S(i[h],1)):(i[h]=nt(v),i[h].c(),S(i[h],1),i[h].m(e,null))}for(Re(),h=u.length;h<i.length;h+=1)m(h);Ce()}},i(f){if(!n){for(let a=0;a<u.length;a+=1)S(i[a]);n=!0}},o(f){i=i.filter(Boolean);for(let a=0;a<i.length;a+=1)O(i[a]);n=!1},d(f){f&&G(e),_t(i,f),l=!1,Y(c)}}}function Gt(t){let e,n;return{c(){e=B("div"),n=le(t[7]),o(e,"class","no-results svelte-z0d4ta")},m(l,c){F(l,e,c),_(e,n)},p(l,c){c[0]&128&&we(n,l[7])},i:b,o:b,d(l){l&&G(e)}}}function Ot(t){let e="",n;return{c(){n=le(e)},m(l,c){F(l,n,c)},p:b,i:b,o:b,d(l){l&&G(n)}}}function Dt(t){let e,n;return{c(){e=B("div"),n=le(t[6]),o(e,"class","error svelte-z0d4ta")},m(l,c){F(l,e,c),_(e,n)},p(l,c){c[0]&64&&we(n,l[6])},i:b,o:b,d(l){l&&G(e)}}}function tt(t){var c,u;let e,n=(((u=(c=t[69].properties)==null?void 0:c.place_type_name)==null?void 0:u[0])??t[69].place_type[0])+"",l;return{c(){e=B("span"),l=le(n),o(e,"class","svelte-z0d4ta")},m(i,m){F(i,e,m),_(e,l)},p(i,m){var f,a;m[0]&4096&&n!==(n=(((a=(f=i[69].properties)==null?void 0:f.place_type_name)==null?void 0:a[0])??i[69].place_type[0])+"")&&we(l,n)},d(i){i&&G(e)}}}function nt(t){let e,n,l,c,u,i,m=t[69].place_name.replace(/,.*/,"")+"",f,a,h,v,I,N=t[69].place_name.replace(/[^,]*,?\s*/,"")+"",D,p,k,L,R,q;n=new Pt({props:{displayIn:"list"}});let z=t[10]&&tt(t);function d(){return t[57](t[71])}function w(){return t[58](t[69])}return{c(){e=B("li"),pe(n.$$.fragment),l=U(),c=B("span"),u=B("span"),i=B("span"),f=le(m),a=U(),z&&z.c(),h=U(),v=B("span"),I=B("span"),D=le(N),p=U(),o(i,"class","svelte-z0d4ta"),o(u,"class","svelte-z0d4ta"),o(c,"class","svelte-z0d4ta"),o(I,"class","svelte-z0d4ta"),o(v,"class","svelte-z0d4ta"),o(e,"tabindex","0"),o(e,"data-selected",k=t[13]===t[71]),o(e,"class","svelte-z0d4ta"),Q(e,"selected",t[13]===t[71])},m(P,M){F(P,e,M),he(n,e,null),_(e,l),_(e,c),_(c,u),_(u,i),_(i,f),_(u,a),z&&z.m(u,null),_(e,h),_(e,v),_(v,I),_(I,D),_(e,p),L=!0,R||(q=[V(e,"mouseenter",d),V(e,"focus",w)],R=!0)},p(P,M){t=P,(!L||M[0]&4096)&&m!==(m=t[69].place_name.replace(/,.*/,"")+"")&&we(f,m),t[10]?z?z.p(t,M):(z=tt(t),z.c(),z.m(u,null)):z&&(z.d(1),z=null),(!L||M[0]&4096)&&N!==(N=t[69].place_name.replace(/[^,]*,?\s*/,"")+"")&&we(D,N),(!L||M[0]&8192&&k!==(k=t[13]===t[71]))&&o(e,"data-selected",k),(!L||M[0]&8192)&&Q(e,"selected",t[13]===t[71])},i(P){L||(S(n.$$.fragment,P),L=!0)},o(P){O(n.$$.fragment,P),L=!1},d(P){P&&G(e),me(n),z&&z.d(),R=!1,Y(q)}}}function Ft(t){let e,n,l,c,u,i,m,f,a,h,v,I,N,D,p,k,L,R,q,z;c=new jt({}),h=new Bt({});let d=t[17]&&$e(),w=t[5]===!0&&et(t);const P=t[48].default,M=at(P,t,t[47],null),J=[Dt,Ot,Gt,xt],A=[];function ze(s,T){var X,ie;return s[16]?0:s[14]?((X=s[12])==null?void 0:X.length)===0?2:s[14]&&((ie=s[12])!=null&&ie.length)?3:-1:1}return~(p=ze(t))&&(k=A[p]=J[p](t)),{c(){e=B("form"),n=B("div"),l=B("button"),pe(c.$$.fragment),u=U(),i=B("input"),m=U(),f=B("div"),a=B("button"),pe(h.$$.fragment),v=U(),d&&d.c(),I=U(),w&&w.c(),N=U(),M&&M.c(),D=U(),k&&k.c(),o(l,"type","button"),o(l,"class","svelte-z0d4ta"),o(i,"placeholder",t[8]),o(i,"aria-label",t[8]),o(i,"class","svelte-z0d4ta"),o(a,"type","button"),o(a,"title",t[3]),o(a,"class","svelte-z0d4ta"),Q(a,"displayable",t[1]!==""),o(f,"class","clear-button-container svelte-z0d4ta"),o(n,"class","input-group svelte-z0d4ta"),o(e,"tabindex","0"),o(e,"class",L=Ue(t[2])+" svelte-z0d4ta"),Q(e,"can-collapse",t[4]&&t[1]==="")},m(s,T){F(s,e,T),_(e,n),_(n,l),he(c,l,null),_(n,u),_(n,i),t[50](i),We(i,t[1]),_(n,m),_(n,f),_(f,a),he(h,a,null),_(f,v),d&&d.m(f,null),_(n,I),w&&w.m(n,null),_(n,N),M&&M.m(n,null),_(e,D),~p&&A[p].m(e,null),R=!0,q||(z=[V(l,"click",t[49]),V(i,"input",t[51]),V(i,"focus",t[52]),V(i,"blur",t[53]),V(i,"keydown",t[19]),V(i,"input",t[54]),V(a,"click",t[55]),V(e,"submit",gt(t[18]))],q=!0)},p(s,T){(!R||T[0]&256)&&o(i,"placeholder",s[8]),(!R||T[0]&256)&&o(i,"aria-label",s[8]),T[0]&2&&i.value!==s[1]&&We(i,s[1]),(!R||T[0]&8)&&o(a,"title",s[3]),(!R||T[0]&2)&&Q(a,"displayable",s[1]!==""),s[17]?d?T[0]&131072&&S(d,1):(d=$e(),d.c(),S(d,1),d.m(f,null)):d&&(Re(),O(d,1,1,()=>{d=null}),Ce()),s[5]===!0?w?(w.p(s,T),T[0]&32&&S(w,1)):(w=et(s),w.c(),S(w,1),w.m(n,N)):w&&(Re(),O(w,1,1,()=>{w=null}),Ce()),M&&M.p&&(!R||T[1]&65536)&&ht(M,P,s,s[47],R?dt(P,s[47],T,null):mt(s[47]),null);let X=p;p=ze(s),p===X?~p&&A[p].p(s,T):(k&&(Re(),O(A[X],1,1,()=>{A[X]=null}),Ce()),~p?(k=A[p],k?k.p(s,T):(k=A[p]=J[p](s),k.c()),S(k,1),k.m(e,null)):k=null),(!R||T[0]&4&&L!==(L=Ue(s[2])+" svelte-z0d4ta"))&&o(e,"class",L),(!R||T[0]&22)&&Q(e,"can-collapse",s[4]&&s[1]==="")},i(s){R||(S(c.$$.fragment,s),S(h.$$.fragment,s),S(d),S(w),S(M,s),S(k),R=!0)},o(s){O(c.$$.fragment,s),O(h.$$.fragment,s),O(d),O(w),O(M,s),O(k),R=!1},d(s){s&&G(e),me(c),t[50](null),me(h),d&&d.d(),w&&w.d(),M&&M.d(s),~p&&A[p].d(),q=!1,Y(z)}}}function Vt(t,e,n){const l=e[1],c=e[0],u=l-c;return t===l&&n?t:((t-c)%u+u)%u+c}function qt(t,e,n){let l,{$$slots:c={},$$scope:u}=e,{class:i=void 0}=e,{apiKey:m}=e,{bbox:f=void 0}=e,{clearButtonTitle:a="clear"}=e,{clearOnBlur:h=!1}=e,{collapsed:v=!1}=e,{country:I=void 0}=e,{debounceSearch:N=200}=e,{enableReverse:D=!1}=e,{errorMessage:p="Searching failed"}=e,{filter:k=()=>!0}=e,{flyTo:L=!0}=e,{fuzzyMatch:R=!0}=e,{language:q=void 0}=e,{limit:z=void 0}=e,{mapController:d=void 0}=e,{minLength:w=2}=e,{noResultsMessage:P="No results found"}=e,{placeholder:M="Search"}=e,{proximity:J=void 0}=e,{reverseActive:A=D==="always"}=e,{reverseButtonTitle:ze="toggle reverse geocoding"}=e,{searchValue:s=""}=e,{showFullGeometry:T=!0}=e,{showPlaceType:X=!1}=e,{showResultsWhileTyping:ie=!0}=e,{trackProximity:Ee=!0}=e,{types:Be=void 0}=e,{zoom:Se=16}=e,{fetchParameters:xe={}}=e;function Ut(){W.focus()}function Wt(){W.blur()}function it(r,E=!0){n(1,s=r),E?(n(13,C=-1),ot()):(Oe(),setTimeout(()=>{W.focus(),W.select()}))}let ye=!1,g,j,y,ct="",W,C=-1,ee,Le=[],ce,be,Ie;const te=kt();wt(()=>{d&&(d.setEventHandler(void 0),d.indicateReverse(!1),d.setSelectedMarker(-1),d.setMarkers(void 0,void 0))});function ot(r){if(be&&(clearTimeout(be),be=void 0),C>-1&&g)n(45,y=g[C]),n(1,s=y.place_name.replace(/,.*/,"")),n(16,ee=void 0),n(44,j=void 0),n(13,C=-1);else if(s){const E=r||!st();Ge(s,{exact:!0}).then(()=>{n(44,j=g),n(45,y=void 0),E&&Zt()}).catch(Z=>n(16,ee=Z))}}function st(){return/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(s)}async function Ge(r,{byId:E=!1,exact:Z=!1}={}){n(16,ee=void 0);const Me=st(),H=new URLSearchParams;q!=null&&H.set("language",Array.isArray(q)?q.join(","):q),Be&&H.set("types",Be.join(",")),Me||(f&&H.set("bbox",f.map(se=>se.toFixed(6)).join(",")),I&&H.set("country",Array.isArray(I)?I.join(","):I)),E||(J&&H.set("proximity",J.map(se=>se.toFixed(6)).join(",")),(Z||!ie)&&H.set("autocomplete","false"),H.set("fuzzyMatch",String(R))),z!==void 0&&H.set("limit",String(z)),H.set("key",m);const oe="https://api.maptiler.com/geocoding/"+encodeURIComponent(r.replaceAll(";",","))+".json?"+H.toString();if(oe===ct){E?(n(12,g=void 0),n(45,y=Le[0])):n(12,g=Le);return}ct=oe,ce==null||ce.abort();const x=new AbortController;n(17,ce=x);let Fe;try{Fe=await fetch(oe,{signal:x.signal,...xe}).finally(()=>{x===ce&&n(17,ce=void 0)})}catch(se){if(se&&typeof se=="object"&&se.name==="AbortError")return;throw new Error}if(!Fe.ok)throw new Error;const Ve=await Fe.json();te("response",{url:oe,featureCollection:Ve}),E?(n(12,g=void 0),n(45,y=Ve.features[0]),Le=[y]):(n(12,g=Ve.features.filter(k)),Le=g,Me&&W.focus())}function Zt(){var Z,Me,H,oe;if(!(j!=null&&j.length)||!L)return;const r=[180,90,-180,-90],E=!j.some(x=>!x.matching_text);for(const x of j)(E||!x.matching_text)&&(r[0]=Math.min(r[0],((Z=x.bbox)==null?void 0:Z[0])??x.center[0]),r[1]=Math.min(r[1],((Me=x.bbox)==null?void 0:Me[1])??x.center[1]),r[2]=Math.max(r[2],((H=x.bbox)==null?void 0:H[2])??x.center[0]),r[3]=Math.max(r[3],((oe=x.bbox)==null?void 0:oe[3])??x.center[1]));d&&j.length>0&&(y&&r[0]===r[2]&&r[1]===r[3]?d.flyTo(y.center,Se):d.fitBounds(r,50))}function Jt(r){n(0,A=D==="always"),it(Vt(r[0],[-180,180],!0).toFixed(6)+","+r[1].toFixed(6))}function Xt(r){if(!g)return;let E=r.key==="ArrowDown"?1:r.key==="ArrowUp"?-1:0;E?(C===-1&&E===-1&&n(13,C=g.length),n(13,C+=E),C>=g.length&&n(13,C=-1),r.preventDefault()):["ArrowLeft","ArrowRight","Home","End"].includes(r.key)&&n(13,C=-1)}function Oe(r=!0){if(ie&&s.length>w){be&&clearTimeout(be);const E=s;be=window.setTimeout(()=>{Ge(E).catch(Z=>n(16,ee=Z))},r?N:0)}else n(12,g=void 0),n(16,ee=void 0)}function De(r){n(45,y=r),n(1,s=r.place_name),n(13,C=-1)}const Yt=()=>W.focus();function $t(r){Ae[r?"unshift":"push"](()=>{W=r,n(15,W)})}function en(){s=this.value,n(1,s),n(11,ye),n(25,h)}const tn=()=>n(11,ye=!0),nn=()=>n(11,ye=!1),ln=()=>Oe(),rn=()=>{n(1,s=""),W.focus()},cn=()=>n(0,A=!A),on=r=>n(13,C=r),sn=r=>De(r),un=()=>n(13,C=-1),fn=()=>{};return t.$$set=r=>{"class"in r&&n(2,i=r.class),"apiKey"in r&&n(23,m=r.apiKey),"bbox"in r&&n(24,f=r.bbox),"clearButtonTitle"in r&&n(3,a=r.clearButtonTitle),"clearOnBlur"in r&&n(25,h=r.clearOnBlur),"collapsed"in r&&n(4,v=r.collapsed),"country"in r&&n(26,I=r.country),"debounceSearch"in r&&n(27,N=r.debounceSearch),"enableReverse"in r&&n(5,D=r.enableReverse),"errorMessage"in r&&n(6,p=r.errorMessage),"filter"in r&&n(28,k=r.filter),"flyTo"in r&&n(29,L=r.flyTo),"fuzzyMatch"in r&&n(30,R=r.fuzzyMatch),"language"in r&&n(31,q=r.language),"limit"in r&&n(32,z=r.limit),"mapController"in r&&n(33,d=r.mapController),"minLength"in r&&n(34,w=r.minLength),"noResultsMessage"in r&&n(7,P=r.noResultsMessage),"placeholder"in r&&n(8,M=r.placeholder),"proximity"in r&&n(22,J=r.proximity),"reverseActive"in r&&n(0,A=r.reverseActive),"reverseButtonTitle"in r&&n(9,ze=r.reverseButtonTitle),"searchValue"in r&&n(1,s=r.searchValue),"showFullGeometry"in r&&n(35,T=r.showFullGeometry),"showPlaceType"in r&&n(10,X=r.showPlaceType),"showResultsWhileTyping"in r&&n(36,ie=r.showResultsWhileTyping),"trackProximity"in r&&n(37,Ee=r.trackProximity),"types"in r&&n(38,Be=r.types),"zoom"in r&&n(39,Se=r.zoom),"fetchParameters"in r&&n(40,xe=r.fetchParameters),"$$scope"in r&&n(47,u=r.$$scope)},t.$$.update=()=>{if(t.$$.dirty[1]&64&&(Ee||n(22,J=void 0)),t.$$.dirty[0]&33556480&&setTimeout(()=>{n(14,Ie=ye),h&&!ye&&n(1,s="")}),t.$$.dirty[0]&4098&&(s||(n(45,y=void 0),n(12,g=void 0),n(16,ee=void 0),n(44,j=g))),t.$$.dirty[1]&16400&&T&&y&&!y.address&&y.geometry.type==="Point"&&Ge(y.id,{byId:!0}).catch(r=>n(16,ee=r)),t.$$.dirty[0]&536870912|t.$$.dirty[1]&16644&&d&&y&&L&&(!y.bbox||y.bbox[0]===y.bbox[2]&&y.bbox[1]===y.bbox[3]?d.flyTo(y.center,Se):d.fitBounds(y.bbox,50),n(12,g=void 0),n(44,j=void 0),n(13,C=-1)),t.$$.dirty[0]&4096|t.$$.dirty[1]&8192&&j!==g&&n(44,j=void 0),t.$$.dirty[1]&24580&&d&&d.setMarkers(j,y),t.$$.dirty[0]&2&&n(13,C=-1),t.$$.dirty[0]&20481|t.$$.dirty[1]&68&&d&&d.setEventHandler(r=>{switch(r.type){case"mapClick":A&&Jt(r.coordinates);break;case"proximityChange":n(22,J=Ee?r.proximity:void 0);break;case"markerClick":{const E=g==null?void 0:g.find(Z=>Z.id===r.id);E&&De(E)}break;case"markerMouseEnter":n(13,C=Ie?(g==null?void 0:g.findIndex(E=>E.id===r.id))??-1:-1);break;case"markerMouseLeave":n(13,C=-1);break}}),t.$$.dirty[0]&8192|t.$$.dirty[1]&4&&(d==null||d.setSelectedMarker(C)),t.$$.dirty[0]&12288&&n(46,l=g==null?void 0:g[C]),t.$$.dirty[0]&2|t.$$.dirty[1]&4){const r=/^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(s);d==null||d.setReverseMarker(r?[Number(r[1]),Number(r[2])]:void 0)}t.$$.dirty[1]&32768&&te("select",l),t.$$.dirty[1]&16384&&te("pick",y),t.$$.dirty[0]&20480&&te("optionsVisibilityChange",Ie&&!!g),t.$$.dirty[0]&4096&&te("featuresListed",g),t.$$.dirty[1]&8192&&te("featuresMarked",j),t.$$.dirty[0]&1&&te("reverseToggle",A),t.$$.dirty[0]&2&&te("queryChange",s),t.$$.dirty[0]&1|t.$$.dirty[1]&4&&d&&d.indicateReverse(A)},[A,s,i,a,v,D,p,P,M,ze,X,ye,g,C,Ie,W,ee,ce,ot,Xt,Oe,De,J,m,f,h,I,N,k,L,R,q,z,d,w,T,ie,Ee,Be,Se,xe,Ut,Wt,it,j,y,l,u,c,Yt,$t,en,tn,nn,ln,rn,cn,on,sn,un,fn]}class Ht extends ge{constructor(e){super(),_e(this,e,qt,Ft,ue,{class:2,apiKey:23,bbox:24,clearButtonTitle:3,clearOnBlur:25,collapsed:4,country:26,debounceSearch:27,enableReverse:5,errorMessage:6,filter:28,flyTo:29,fuzzyMatch:30,language:31,limit:32,mapController:33,minLength:34,noResultsMessage:7,placeholder:8,proximity:22,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:35,showPlaceType:10,showResultsWhileTyping:36,trackProximity:37,types:38,zoom:39,fetchParameters:40,focus:41,blur:42,setQuery:43},null,[-1,-1,-1])}get focus(){return this.$$.ctx[41]}get blur(){return this.$$.ctx[42]}get setQuery(){return this.$$.ctx[43]}}const lt=["featuresListed","featuresMarked","optionsVisibilityChange","pick","querychange","response","reversetoggle","select"],Kt=["apiKey","bbox","clearButtonTitle","clearOnBlur","collapsed","country","debounceSearch","enableReverse","errorMessage","filter","fuzzyMatch","language","limit","minLength","noResultsMessage","placeholder","proximity","reverseButtonTitle","showFullGeometry","showPlaceType","showResultsWhileTyping","trackProximity","types","zoom","mapController"];function rt(t){return"on"+t[0].toUpperCase()+t.slice(1)}const Qt=K.forwardRef(function(e,n){const l=K.useRef(),c=K.useRef(),u={...e};for(const i of lt)delete u[rt(i)];K.useEffect(()=>{if(!l.current)throw new Error;const i=new Ht({target:l.current,props:u});return c.current=i,()=>i.$destroy()},[]);for(const i of Kt)K.useEffect(()=>{c.current&&e[i]!==void 0&&c.current.$set({[i]:e[i]})},[e[i]]);for(const i of lt){const m=e[rt(i)];K.useEffect(()=>{var f;(f=c.current)==null||f.$on(i,m?a=>{m(a.detail)}:void 0)},[m])}return K.useImperativeHandle(n,()=>({setQuery:(i,m=!0)=>{var f;return(f=c.current)==null?void 0:f.setQuery(i,m)},focus:()=>{var i;return(i=c.current)==null?void 0:i.focus()},blur:()=>{var i;return(i=c.current)==null?void 0:i.blur()}})),K.createElement("div",{ref:l})});ne.GeocodingControl=Qt,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(ne,K){typeof exports=="object"&&typeof module<"u"?K(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],K):(ne=typeof globalThis<"u"?globalThis:ne||self,K(ne.MaptilerGeocoder={},ne.React))})(this,function(ne,K){"use strict";function b(){}function ut(t,e){for(const n in e)t[n]=e[n];return t}function qe(t){return t()}function He(){return Object.create(null)}function Y(t){t.forEach(qe)}function Ke(t){return typeof t=="function"}function ue(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function ft(t){return Object.keys(t).length===0}function at(t,e,n,l){if(t){const c=Qe(t,e,n,l);return t[0](c)}}function Qe(t,e,n,l){return t[1]&&l?ut(n.ctx.slice(),t[1](l(e))):n.ctx}function dt(t,e,n,l){if(t[2]&&l){const c=t[2](l(n));if(e.dirty===void 0)return c;if(typeof c=="object"){const u=[],i=Math.max(e.dirty.length,c.length);for(let m=0;m<i;m+=1)u[m]=e.dirty[m]|c[m];return u}return e.dirty|c}return e.dirty}function ht(t,e,n,l,c,u){if(c){const i=Qe(e,n,l,u);t.p(i,c)}}function mt(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let l=0;l<n;l++)e[l]=-1;return e}return-1}function Ue(t){return t??""}function _(t,e){t.appendChild(e)}function F(t,e,n){t.insertBefore(e,n||null)}function G(t){t.parentNode&&t.parentNode.removeChild(t)}function _t(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function B(t){return document.createElement(t)}function $(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function le(t){return document.createTextNode(t)}function U(){return le(" ")}function V(t,e,n,l){return t.addEventListener(e,n,l),()=>t.removeEventListener(e,n,l)}function gt(t){return function(e){return e.preventDefault(),t.call(this,e)}}function o(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function yt(t){return Array.from(t.childNodes)}function we(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function We(t,e){t.value=e??""}function Q(t,e,n){t.classList[n?"add":"remove"](e)}function bt(t,e,{bubbles:n=!1,cancelable:l=!1}={}){const c=document.createEvent("CustomEvent");return c.initCustomEvent(t,n,l,e),c}let ke;function ve(t){ke=t}function Ze(){if(!ke)throw new Error("Function called outside component initialization");return ke}function wt(t){Ze().$$.on_destroy.push(t)}function kt(){const t=Ze();return(e,n,{cancelable:l=!1}={})=>{const c=t.$$.callbacks[e];if(c){const u=bt(e,n,{cancelable:l});return c.slice().forEach(i=>{i.call(t,u)}),!u.defaultPrevented}return!0}}const fe=[],Pe=[];let ae=[];const Je=[],vt=Promise.resolve();let Ae=!1;function pt(){Ae||(Ae=!0,vt.then(Xe))}function Ne(t){ae.push(t)}const je=new Set;let de=0;function Xe(){if(de!==0)return;const t=ke;do{try{for(;de<fe.length;){const e=fe[de];de++,ve(e),zt(e.$$)}}catch(e){throw fe.length=0,de=0,e}for(ve(null),fe.length=0,de=0;Pe.length;)Pe.pop()();for(let e=0;e<ae.length;e+=1){const n=ae[e];je.has(n)||(je.add(n),n())}ae.length=0}while(fe.length);for(;Je.length;)Je.pop()();Ae=!1,je.clear(),ve(t)}function zt(t){if(t.fragment!==null){t.update(),Y(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Ne)}}function Mt(t){const e=[],n=[];ae.forEach(l=>t.indexOf(l)===-1?e.push(l):n.push(l)),n.forEach(l=>l()),ae=e}const Te=new Set;let re;function Re(){re={r:0,c:[],p:re}}function Ce(){re.r||Y(re.c),re=re.p}function S(t,e){t&&t.i&&(Te.delete(t),t.i(e))}function O(t,e,n,l){if(t&&t.o){if(Te.has(t))return;Te.add(t),re.c.push(()=>{Te.delete(t),l&&(n&&t.d(1),l())}),t.o(e)}else l&&l()}function pe(t){t&&t.c()}function he(t,e,n,l){const{fragment:c,after_update:u}=t.$$;c&&c.m(e,n),l||Ne(()=>{const i=t.$$.on_mount.map(qe).filter(Ke);t.$$.on_destroy?t.$$.on_destroy.push(...i):Y(i),t.$$.on_mount=[]}),u.forEach(Ne)}function me(t,e){const n=t.$$;n.fragment!==null&&(Mt(n.after_update),Y(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Tt(t,e){t.$$.dirty[0]===-1&&(fe.push(t),pt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function _e(t,e,n,l,c,u,i,m=[-1]){const f=ke;ve(t);const a=t.$$={fragment:null,ctx:[],props:u,update:b,not_equal:c,bound:He(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(f?f.$$.context:[])),callbacks:He(),dirty:m,skip_bound:!1,root:e.target||f.$$.root};i&&i(a.root);let h=!1;if(a.ctx=n?n(t,e.props||{},(v,I,...N)=>{const D=N.length?N[0]:I;return a.ctx&&c(a.ctx[v],a.ctx[v]=D)&&(!a.skip_bound&&a.bound[v]&&a.bound[v](D),h&&Tt(t,v)),I}):[],a.update(),h=!0,Y(a.before_update),a.fragment=l?l(a.ctx):!1,e.target){if(e.hydrate){const v=yt(e.target);a.fragment&&a.fragment.l(v),v.forEach(G)}else a.fragment&&a.fragment.c();e.intro&&S(t.$$.fragment),he(t,e.target,e.anchor,e.customElement),Xe()}ve(f)}class ge{$destroy(){me(this,1),this.$destroy=b}$on(e,n){if(!Ke(n))return b;const l=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return l.push(n),()=>{const c=l.indexOf(n);c!==-1&&l.splice(c,1)}}$set(e){this.$$set&&!ft(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const an="";function Rt(t){let e,n;return{c(){e=$("svg"),n=$("path"),o(n,"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"),o(e,"viewBox","0 0 60.006 21.412"),o(e,"width","14"),o(e,"height","20"),o(e,"class","svelte-en2qvf")},m(l,c){F(l,e,c),_(e,n)},p:b,i:b,o:b,d(l){l&&G(e)}}}class Ct extends ge{constructor(e){super(),_e(this,e,null,Rt,ue,{})}}const dn="";function Et(t){let e,n;return{c(){e=$("svg"),n=$("path"),o(n,"d","M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"),o(e,"viewBox","0 0 18 18"),o(e,"width","16"),o(e,"height","16"),o(e,"class","svelte-en2qvf")},m(l,c){F(l,e,c),_(e,n)},p:b,i:b,o:b,d(l){l&&G(e)}}}class Bt extends ge{constructor(e){super(),_e(this,e,null,Et,ue,{})}}const hn="";function St(t){let e;return{c(){e=B("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>',o(e,"class","svelte-7cmwmc")},m(n,l){F(n,e,l)},p:b,i:b,o:b,d(n){n&&G(e)}}}class Lt extends ge{constructor(e){super(),_e(this,e,null,St,ue,{})}}const mn="";function It(t){let e,n,l;return{c(){e=$("svg"),n=$("path"),o(n,"stroke-width","4"),o(n,"fill-rule","evenodd"),o(n,"clip-rule","evenodd"),o(n,"d","M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"),o(n,"class","svelte-1k1cmht"),o(e,"width",l=t[0]!=="list"?void 0:"20"),o(e,"viewBox","0 0 70 85"),o(e,"fill","none"),o(e,"class","svelte-1k1cmht"),Q(e,"in-map",t[0]!=="list"),Q(e,"list-icon",t[0]==="list")},m(c,u){F(c,e,u),_(e,n)},p(c,[u]){u&1&&l!==(l=c[0]!=="list"?void 0:"20")&&o(e,"width",l),u&1&&Q(e,"in-map",c[0]!=="list"),u&1&&Q(e,"list-icon",c[0]==="list")},i:b,o:b,d(c){c&&G(e)}}}function Pt(t,e,n){let{displayIn:l}=e;return t.$$set=c=>{"displayIn"in c&&n(0,l=c.displayIn)},[l]}class At extends ge{constructor(e){super(),_e(this,e,Pt,It,ue,{displayIn:0})}}const _n="";function Nt(t){let e,n;return{c(){e=$("svg"),n=$("path"),o(n,"d","M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"),o(e,"viewBox","0 0 18 18"),o(e,"xml:space","preserve"),o(e,"width","20"),o(e,"class","svelte-en2qvf")},m(l,c){F(l,e,c),_(e,n)},p:b,i:b,o:b,d(l){l&&G(e)}}}class jt extends ge{constructor(e){super(),_e(this,e,null,Nt,ue,{})}}const gn="";function Ye(t,e,n){const l=t.slice();return l[69]=e[n],l[71]=n,l}function $e(t){let e,n;return e=new Lt({}),{c(){pe(e.$$.fragment)},m(l,c){he(e,l,c),n=!0},i(l){n||(S(e.$$.fragment,l),n=!0)},o(l){O(e.$$.fragment,l),n=!1},d(l){me(e,l)}}}function et(t){let e,n,l,c,u;return n=new Ct({}),{c(){e=B("button"),pe(n.$$.fragment),o(e,"type","button"),o(e,"title",t[9]),o(e,"class","svelte-z0d4ta"),Q(e,"active",t[0])},m(i,m){F(i,e,m),he(n,e,null),l=!0,c||(u=V(e,"click",t[56]),c=!0)},p(i,m){(!l||m[0]&512)&&o(e,"title",i[9]),(!l||m[0]&1)&&Q(e,"active",i[0])},i(i){l||(S(n.$$.fragment,i),l=!0)},o(i){O(n.$$.fragment,i),l=!1},d(i){i&&G(e),me(n),c=!1,u()}}}function xt(t){let e,n,l,c,u=t[12],i=[];for(let f=0;f<u.length;f+=1)i[f]=nt(Ye(t,u,f));const m=f=>O(i[f],1,1,()=>{i[f]=null});return{c(){e=B("ul");for(let f=0;f<i.length;f+=1)i[f].c();o(e,"class","svelte-z0d4ta")},m(f,a){F(f,e,a);for(let h=0;h<i.length;h+=1)i[h]&&i[h].m(e,null);n=!0,l||(c=[V(e,"mouseleave",t[59]),V(e,"blur",t[60])],l=!0)},p(f,a){if(a[0]&2110464){u=f[12];let h;for(h=0;h<u.length;h+=1){const v=Ye(f,u,h);i[h]?(i[h].p(v,a),S(i[h],1)):(i[h]=nt(v),i[h].c(),S(i[h],1),i[h].m(e,null))}for(Re(),h=u.length;h<i.length;h+=1)m(h);Ce()}},i(f){if(!n){for(let a=0;a<u.length;a+=1)S(i[a]);n=!0}},o(f){i=i.filter(Boolean);for(let a=0;a<i.length;a+=1)O(i[a]);n=!1},d(f){f&&G(e),_t(i,f),l=!1,Y(c)}}}function Gt(t){let e,n;return{c(){e=B("div"),n=le(t[7]),o(e,"class","no-results svelte-z0d4ta")},m(l,c){F(l,e,c),_(e,n)},p(l,c){c[0]&128&&we(n,l[7])},i:b,o:b,d(l){l&&G(e)}}}function Ot(t){let e="",n;return{c(){n=le(e)},m(l,c){F(l,n,c)},p:b,i:b,o:b,d(l){l&&G(n)}}}function Dt(t){let e,n;return{c(){e=B("div"),n=le(t[6]),o(e,"class","error svelte-z0d4ta")},m(l,c){F(l,e,c),_(e,n)},p(l,c){c[0]&64&&we(n,l[6])},i:b,o:b,d(l){l&&G(e)}}}function tt(t){var c,u;let e,n=(((u=(c=t[69].properties)==null?void 0:c.place_type_name)==null?void 0:u[0])??t[69].place_type[0])+"",l;return{c(){e=B("span"),l=le(n),o(e,"class","svelte-z0d4ta")},m(i,m){F(i,e,m),_(e,l)},p(i,m){var f,a;m[0]&4096&&n!==(n=(((a=(f=i[69].properties)==null?void 0:f.place_type_name)==null?void 0:a[0])??i[69].place_type[0])+"")&&we(l,n)},d(i){i&&G(e)}}}function nt(t){let e,n,l,c,u,i,m=t[69].place_name.replace(/,.*/,"")+"",f,a,h,v,I,N=t[69].place_name.replace(/[^,]*,?\s*/,"")+"",D,p,k,L,R,q;n=new At({props:{displayIn:"list"}});let z=t[10]&&tt(t);function d(){return t[57](t[71])}function w(){return t[58](t[69])}return{c(){e=B("li"),pe(n.$$.fragment),l=U(),c=B("span"),u=B("span"),i=B("span"),f=le(m),a=U(),z&&z.c(),h=U(),v=B("span"),I=B("span"),D=le(N),p=U(),o(i,"class","svelte-z0d4ta"),o(u,"class","svelte-z0d4ta"),o(c,"class","svelte-z0d4ta"),o(I,"class","svelte-z0d4ta"),o(v,"class","svelte-z0d4ta"),o(e,"tabindex","0"),o(e,"data-selected",k=t[13]===t[71]),o(e,"class","svelte-z0d4ta"),Q(e,"selected",t[13]===t[71])},m(A,M){F(A,e,M),he(n,e,null),_(e,l),_(e,c),_(c,u),_(u,i),_(i,f),_(u,a),z&&z.m(u,null),_(e,h),_(e,v),_(v,I),_(I,D),_(e,p),L=!0,R||(q=[V(e,"mouseenter",d),V(e,"focus",w)],R=!0)},p(A,M){t=A,(!L||M[0]&4096)&&m!==(m=t[69].place_name.replace(/,.*/,"")+"")&&we(f,m),t[10]?z?z.p(t,M):(z=tt(t),z.c(),z.m(u,null)):z&&(z.d(1),z=null),(!L||M[0]&4096)&&N!==(N=t[69].place_name.replace(/[^,]*,?\s*/,"")+"")&&we(D,N),(!L||M[0]&8192&&k!==(k=t[13]===t[71]))&&o(e,"data-selected",k),(!L||M[0]&8192)&&Q(e,"selected",t[13]===t[71])},i(A){L||(S(n.$$.fragment,A),L=!0)},o(A){O(n.$$.fragment,A),L=!1},d(A){A&&G(e),me(n),z&&z.d(),R=!1,Y(q)}}}function Ft(t){let e,n,l,c,u,i,m,f,a,h,v,I,N,D,p,k,L,R,q,z;c=new jt({}),h=new Bt({});let d=t[17]&&$e(),w=t[5]===!0&&et(t);const A=t[48].default,M=at(A,t,t[47],null),J=[Dt,Ot,Gt,xt],P=[];function ze(s,T){var X,ie;return s[16]?0:s[14]?((X=s[12])==null?void 0:X.length)===0?2:s[14]&&((ie=s[12])!=null&&ie.length)?3:-1:1}return~(p=ze(t))&&(k=P[p]=J[p](t)),{c(){e=B("form"),n=B("div"),l=B("button"),pe(c.$$.fragment),u=U(),i=B("input"),m=U(),f=B("div"),a=B("button"),pe(h.$$.fragment),v=U(),d&&d.c(),I=U(),w&&w.c(),N=U(),M&&M.c(),D=U(),k&&k.c(),o(l,"type","button"),o(l,"class","svelte-z0d4ta"),o(i,"placeholder",t[8]),o(i,"aria-label",t[8]),o(i,"class","svelte-z0d4ta"),o(a,"type","button"),o(a,"title",t[3]),o(a,"class","svelte-z0d4ta"),Q(a,"displayable",t[1]!==""),o(f,"class","clear-button-container svelte-z0d4ta"),o(n,"class","input-group svelte-z0d4ta"),o(e,"tabindex","0"),o(e,"class",L=Ue(t[2])+" svelte-z0d4ta"),Q(e,"can-collapse",t[4]&&t[1]==="")},m(s,T){F(s,e,T),_(e,n),_(n,l),he(c,l,null),_(n,u),_(n,i),t[50](i),We(i,t[1]),_(n,m),_(n,f),_(f,a),he(h,a,null),_(f,v),d&&d.m(f,null),_(n,I),w&&w.m(n,null),_(n,N),M&&M.m(n,null),_(e,D),~p&&P[p].m(e,null),R=!0,q||(z=[V(l,"click",t[49]),V(i,"input",t[51]),V(i,"focus",t[52]),V(i,"blur",t[53]),V(i,"keydown",t[19]),V(i,"input",t[54]),V(a,"click",t[55]),V(e,"submit",gt(t[18]))],q=!0)},p(s,T){(!R||T[0]&256)&&o(i,"placeholder",s[8]),(!R||T[0]&256)&&o(i,"aria-label",s[8]),T[0]&2&&i.value!==s[1]&&We(i,s[1]),(!R||T[0]&8)&&o(a,"title",s[3]),(!R||T[0]&2)&&Q(a,"displayable",s[1]!==""),s[17]?d?T[0]&131072&&S(d,1):(d=$e(),d.c(),S(d,1),d.m(f,null)):d&&(Re(),O(d,1,1,()=>{d=null}),Ce()),s[5]===!0?w?(w.p(s,T),T[0]&32&&S(w,1)):(w=et(s),w.c(),S(w,1),w.m(n,N)):w&&(Re(),O(w,1,1,()=>{w=null}),Ce()),M&&M.p&&(!R||T[1]&65536)&&ht(M,A,s,s[47],R?dt(A,s[47],T,null):mt(s[47]),null);let X=p;p=ze(s),p===X?~p&&P[p].p(s,T):(k&&(Re(),O(P[X],1,1,()=>{P[X]=null}),Ce()),~p?(k=P[p],k?k.p(s,T):(k=P[p]=J[p](s),k.c()),S(k,1),k.m(e,null)):k=null),(!R||T[0]&4&&L!==(L=Ue(s[2])+" svelte-z0d4ta"))&&o(e,"class",L),(!R||T[0]&22)&&Q(e,"can-collapse",s[4]&&s[1]==="")},i(s){R||(S(c.$$.fragment,s),S(h.$$.fragment,s),S(d),S(w),S(M,s),S(k),R=!0)},o(s){O(c.$$.fragment,s),O(h.$$.fragment,s),O(d),O(w),O(M,s),O(k),R=!1},d(s){s&&G(e),me(c),t[50](null),me(h),d&&d.d(),w&&w.d(),M&&M.d(s),~p&&P[p].d(),q=!1,Y(z)}}}function Vt(t,e,n){const l=e[1],c=e[0],u=l-c;return t===l&&n?t:((t-c)%u+u)%u+c}function qt(t,e,n){let l,{$$slots:c={},$$scope:u}=e,{class:i=void 0}=e,{apiKey:m}=e,{bbox:f=void 0}=e,{clearButtonTitle:a="clear"}=e,{clearOnBlur:h=!1}=e,{collapsed:v=!1}=e,{country:I=void 0}=e,{debounceSearch:N=200}=e,{enableReverse:D=!1}=e,{errorMessage:p="Searching failed"}=e,{filter:k=()=>!0}=e,{flyTo:L=!0}=e,{fuzzyMatch:R=!0}=e,{language:q=void 0}=e,{limit:z=void 0}=e,{mapController:d=void 0}=e,{minLength:w=2}=e,{noResultsMessage:A="No results found"}=e,{placeholder:M="Search"}=e,{proximity:J=void 0}=e,{reverseActive:P=D==="always"}=e,{reverseButtonTitle:ze="toggle reverse geocoding"}=e,{searchValue:s=""}=e,{showFullGeometry:T=!0}=e,{showPlaceType:X=!1}=e,{showResultsWhileTyping:ie=!0}=e,{trackProximity:Ee=!0}=e,{types:Be=void 0}=e,{zoom:Se=16}=e,{fetchParameters:xe={}}=e;function Ut(){W.focus()}function Wt(){W.blur()}function it(r,E=!0){n(1,s=r),E?(n(13,C=-1),ot()):(Oe(),setTimeout(()=>{W.focus(),W.select()}))}let ye=!1,g,j,y,ct="",W,C=-1,ee,Le=[],ce,be,Ie;const te=kt();wt(()=>{d&&(d.setEventHandler(void 0),d.indicateReverse(!1),d.setSelectedMarker(-1),d.setMarkers(void 0,void 0))});function ot(r){if(be&&(clearTimeout(be),be=void 0),C>-1&&g)n(45,y=g[C]),n(1,s=y.place_name.replace(/,.*/,"")),n(16,ee=void 0),n(44,j=void 0),n(13,C=-1);else if(s){const E=r||!st();Ge(s,{exact:!0}).then(()=>{n(44,j=g),n(45,y=void 0),E&&Zt()}).catch(Z=>n(16,ee=Z))}}function st(){return/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(s)}async function Ge(r,{byId:E=!1,exact:Z=!1}={}){n(16,ee=void 0);const Me=st(),H=new URLSearchParams;q!=null&&H.set("language",Array.isArray(q)?q.join(","):q),Be&&H.set("types",Be.join(",")),Me||(f&&H.set("bbox",f.map(se=>se.toFixed(6)).join(",")),I&&H.set("country",Array.isArray(I)?I.join(","):I)),E||(J&&H.set("proximity",J.map(se=>se.toFixed(6)).join(",")),(Z||!ie)&&H.set("autocomplete","false"),H.set("fuzzyMatch",String(R))),z!==void 0&&H.set("limit",String(z)),H.set("key",m);const oe="https://api.maptiler.com/geocoding/"+encodeURIComponent(r)+".json?"+H.toString();if(oe===ct){E?(n(12,g=void 0),n(45,y=Le[0])):n(12,g=Le);return}ct=oe,ce==null||ce.abort();const x=new AbortController;n(17,ce=x);let Fe;try{Fe=await fetch(oe,{signal:x.signal,...xe}).finally(()=>{x===ce&&n(17,ce=void 0)})}catch(se){if(se&&typeof se=="object"&&se.name==="AbortError")return;throw new Error}if(!Fe.ok)throw new Error;const Ve=await Fe.json();te("response",{url:oe,featureCollection:Ve}),E?(n(12,g=void 0),n(45,y=Ve.features[0]),Le=[y]):(n(12,g=Ve.features.filter(k)),Le=g,Me&&W.focus())}function Zt(){var Z,Me,H,oe;if(!(j!=null&&j.length)||!L)return;const r=[180,90,-180,-90],E=!j.some(x=>!x.matching_text);for(const x of j)(E||!x.matching_text)&&(r[0]=Math.min(r[0],((Z=x.bbox)==null?void 0:Z[0])??x.center[0]),r[1]=Math.min(r[1],((Me=x.bbox)==null?void 0:Me[1])??x.center[1]),r[2]=Math.max(r[2],((H=x.bbox)==null?void 0:H[2])??x.center[0]),r[3]=Math.max(r[3],((oe=x.bbox)==null?void 0:oe[3])??x.center[1]));d&&j.length>0&&(y&&r[0]===r[2]&&r[1]===r[3]?d.flyTo(y.center,Se):d.fitBounds(r,50))}function Jt(r){n(0,P=D==="always"),it(Vt(r[0],[-180,180],!0).toFixed(6)+","+r[1].toFixed(6))}function Xt(r){if(!g)return;let E=r.key==="ArrowDown"?1:r.key==="ArrowUp"?-1:0;E?(C===-1&&E===-1&&n(13,C=g.length),n(13,C+=E),C>=g.length&&n(13,C=-1),r.preventDefault()):["ArrowLeft","ArrowRight","Home","End"].includes(r.key)&&n(13,C=-1)}function Oe(r=!0){if(ie&&s.length>w){be&&clearTimeout(be);const E=s;be=window.setTimeout(()=>{Ge(E).catch(Z=>n(16,ee=Z))},r?N:0)}else n(12,g=void 0),n(16,ee=void 0)}function De(r){n(45,y=r),n(1,s=r.place_name),n(13,C=-1)}const Yt=()=>W.focus();function $t(r){Pe[r?"unshift":"push"](()=>{W=r,n(15,W)})}function en(){s=this.value,n(1,s),n(11,ye),n(25,h)}const tn=()=>n(11,ye=!0),nn=()=>n(11,ye=!1),ln=()=>Oe(),rn=()=>{n(1,s=""),W.focus()},cn=()=>n(0,P=!P),on=r=>n(13,C=r),sn=r=>De(r),un=()=>n(13,C=-1),fn=()=>{};return t.$$set=r=>{"class"in r&&n(2,i=r.class),"apiKey"in r&&n(23,m=r.apiKey),"bbox"in r&&n(24,f=r.bbox),"clearButtonTitle"in r&&n(3,a=r.clearButtonTitle),"clearOnBlur"in r&&n(25,h=r.clearOnBlur),"collapsed"in r&&n(4,v=r.collapsed),"country"in r&&n(26,I=r.country),"debounceSearch"in r&&n(27,N=r.debounceSearch),"enableReverse"in r&&n(5,D=r.enableReverse),"errorMessage"in r&&n(6,p=r.errorMessage),"filter"in r&&n(28,k=r.filter),"flyTo"in r&&n(29,L=r.flyTo),"fuzzyMatch"in r&&n(30,R=r.fuzzyMatch),"language"in r&&n(31,q=r.language),"limit"in r&&n(32,z=r.limit),"mapController"in r&&n(33,d=r.mapController),"minLength"in r&&n(34,w=r.minLength),"noResultsMessage"in r&&n(7,A=r.noResultsMessage),"placeholder"in r&&n(8,M=r.placeholder),"proximity"in r&&n(22,J=r.proximity),"reverseActive"in r&&n(0,P=r.reverseActive),"reverseButtonTitle"in r&&n(9,ze=r.reverseButtonTitle),"searchValue"in r&&n(1,s=r.searchValue),"showFullGeometry"in r&&n(35,T=r.showFullGeometry),"showPlaceType"in r&&n(10,X=r.showPlaceType),"showResultsWhileTyping"in r&&n(36,ie=r.showResultsWhileTyping),"trackProximity"in r&&n(37,Ee=r.trackProximity),"types"in r&&n(38,Be=r.types),"zoom"in r&&n(39,Se=r.zoom),"fetchParameters"in r&&n(40,xe=r.fetchParameters),"$$scope"in r&&n(47,u=r.$$scope)},t.$$.update=()=>{if(t.$$.dirty[1]&64&&(Ee||n(22,J=void 0)),t.$$.dirty[0]&33556480&&setTimeout(()=>{n(14,Ie=ye),h&&!ye&&n(1,s="")}),t.$$.dirty[0]&4098&&(s||(n(45,y=void 0),n(12,g=void 0),n(16,ee=void 0),n(44,j=g))),t.$$.dirty[1]&16400&&T&&y&&!y.address&&y.geometry.type==="Point"&&Ge(y.id,{byId:!0}).catch(r=>n(16,ee=r)),t.$$.dirty[0]&536870912|t.$$.dirty[1]&16644&&d&&y&&L&&(!y.bbox||y.bbox[0]===y.bbox[2]&&y.bbox[1]===y.bbox[3]?d.flyTo(y.center,Se):d.fitBounds(y.bbox,50),n(12,g=void 0),n(44,j=void 0),n(13,C=-1)),t.$$.dirty[0]&4096|t.$$.dirty[1]&8192&&j!==g&&n(44,j=void 0),t.$$.dirty[1]&24580&&d&&d.setMarkers(j,y),t.$$.dirty[0]&2&&n(13,C=-1),t.$$.dirty[0]&20481|t.$$.dirty[1]&68&&d&&d.setEventHandler(r=>{switch(r.type){case"mapClick":P&&Jt(r.coordinates);break;case"proximityChange":n(22,J=Ee?r.proximity:void 0);break;case"markerClick":{const E=g==null?void 0:g.find(Z=>Z.id===r.id);E&&De(E)}break;case"markerMouseEnter":n(13,C=Ie?(g==null?void 0:g.findIndex(E=>E.id===r.id))??-1:-1);break;case"markerMouseLeave":n(13,C=-1);break}}),t.$$.dirty[0]&8192|t.$$.dirty[1]&4&&(d==null||d.setSelectedMarker(C)),t.$$.dirty[0]&12288&&n(46,l=g==null?void 0:g[C]),t.$$.dirty[0]&2|t.$$.dirty[1]&4){const r=/^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(s);d==null||d.setReverseMarker(r?[Number(r[1]),Number(r[2])]:void 0)}t.$$.dirty[1]&32768&&te("select",l),t.$$.dirty[1]&16384&&te("pick",y),t.$$.dirty[0]&20480&&te("optionsVisibilityChange",Ie&&!!g),t.$$.dirty[0]&4096&&te("featuresListed",g),t.$$.dirty[1]&8192&&te("featuresMarked",j),t.$$.dirty[0]&1&&te("reverseToggle",P),t.$$.dirty[0]&2&&te("queryChange",s),t.$$.dirty[0]&1|t.$$.dirty[1]&4&&d&&d.indicateReverse(P)},[P,s,i,a,v,D,p,A,M,ze,X,ye,g,C,Ie,W,ee,ce,ot,Xt,Oe,De,J,m,f,h,I,N,k,L,R,q,z,d,w,T,ie,Ee,Be,Se,xe,Ut,Wt,it,j,y,l,u,c,Yt,$t,en,tn,nn,ln,rn,cn,on,sn,un,fn]}class Ht extends ge{constructor(e){super(),_e(this,e,qt,Ft,ue,{class:2,apiKey:23,bbox:24,clearButtonTitle:3,clearOnBlur:25,collapsed:4,country:26,debounceSearch:27,enableReverse:5,errorMessage:6,filter:28,flyTo:29,fuzzyMatch:30,language:31,limit:32,mapController:33,minLength:34,noResultsMessage:7,placeholder:8,proximity:22,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:35,showPlaceType:10,showResultsWhileTyping:36,trackProximity:37,types:38,zoom:39,fetchParameters:40,focus:41,blur:42,setQuery:43},null,[-1,-1,-1])}get focus(){return this.$$.ctx[41]}get blur(){return this.$$.ctx[42]}get setQuery(){return this.$$.ctx[43]}}const lt=["featuresListed","featuresMarked","optionsVisibilityChange","pick","querychange","response","reversetoggle","select"],Kt=["apiKey","bbox","clearButtonTitle","clearOnBlur","collapsed","country","debounceSearch","enableReverse","errorMessage","filter","fuzzyMatch","language","limit","minLength","noResultsMessage","placeholder","proximity","reverseButtonTitle","showFullGeometry","showPlaceType","showResultsWhileTyping","trackProximity","types","zoom","mapController"];function rt(t){return"on"+t[0].toUpperCase()+t.slice(1)}const Qt=K.forwardRef(function(e,n){const l=K.useRef(),c=K.useRef(),u={...e};for(const i of lt)delete u[rt(i)];K.useEffect(()=>{if(!l.current)throw new Error;const i=new Ht({target:l.current,props:u});return c.current=i,()=>i.$destroy()},[]);for(const i of Kt)K.useEffect(()=>{c.current&&e[i]!==void 0&&c.current.$set({[i]:e[i]})},[e[i]]);for(const i of lt){const m=e[rt(i)];K.useEffect(()=>{var f;(f=c.current)==null||f.$on(i,m?a=>{m(a.detail)}:void 0)},[m])}return K.useImperativeHandle(n,()=>({setQuery:(i,m=!0)=>{var f;return(f=c.current)==null?void 0:f.setQuery(i,m)},focus:()=>{var i;return(i=c.current)==null?void 0:i.focus()},blur:()=>{var i;return(i=c.current)==null?void 0:i.blur()}})),K.createElement("div",{ref:l})});ne.GeocodingControl=Qt,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
|