PageSourceSearch

https://www.sylience.fr/_nuxt/DJyJ89cp.js

js sylience.fr collected 2026-10-08 21:22:12 UTC 58,619 bytes, 3 lines download raw bytes

1import{c as I,d as yt,g as _t}from"./CuXfEcPf.js";import{r as bt}from"./DQ172AOg.js";function Et(p,s){for(var r=0;r<s.length;r++){const n=s[r];if(typeof n!="string"&&!Array.isArray(n)){for(const t in n)if(t!=="default"&&!(t in p)){const u=Object.getOwnPropertyDescriptor(n,t);u&&Object.defineProperty(p,t,u.get?u:{enumerable:!0,get:()=>n[t]})}}}return Object.freeze(Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}))}var U,qe;function T(){if(qe)return U;qe=1,U=s;var p=Object.prototype.hasOwnProperty;function s(){for(var r={},n=0;n<arguments.length;n++){var t=arguments[n];for(var u in t)p.call(t,u)&&(r[u]=t[u])}return r}return U}var H={exports:{}},Le;function xt(){return Le||(Le=1,(function(p,s){(function(){var r={};p.exports=r,r.simpleFilter=function(n,t){return t.filter(function(u){return r.test(n,u)})},r.test=function(n,t){return r.match(n,t)!==null},r.match=function(n,t,u){u=u||{};var o=0,c=[],i=t.length,l=0,g=0,f=u.pre||"",y=u.post||"",E=u.caseSensitive&&t||t.toLowerCase(),h;n=u.caseSensitive&&n||n.toLowerCase();for(var v=0;v<i;v++)h=t[v],E[v]===n[o]?(h=f+h+y,o+=1,g+=1+g):g=0,l+=g,c[c.length]=h;return o===n.length?(l=E===n?1/0:l,{rendered:c.join(""),score:l}):null},r.filter=function(n,t,u){return!t||t.length===0?[]:typeof n!="string"?t:(u=u||{},t.reduce(function(o,c,i,l){var g=c;u.extract&&(g=u.extract(c));var f=r.match(n,g,u);return f!=null&&(o[o.length]={string:f.rendered,score:f.score,index:i,original:c}),o},[]).sort(function(o,c){var i=c.score-o.score;return i||o.index-c.index}))}})()})(H)),H.exports}var K,Ce;function wt(){if(Ce)return K;Ce=1;var p=function(s){return this.component=s,this.items=[],this.active=0,this.wrapper=document.createElement("div"),this.wrapper.className="suggestions-wrapper",this.element=document.createElement("ul"),this.element.className="suggestions",this.wrapper.appendChild(this.element),this.selectingListItem=!1,s.el.parentNode.insertBefore(this.wrapper,s.el.nextSibling),this};return p.prototype.show=function(){this.element.style.display="block"},p.prototype.hide=function(){this.element.style.display="none"},p.prototype.add=function(s){this.items.push(s)},p.prototype.clear=function(){this.items=[],this.active=0},p.prototype.isEmpty=function(){return!this.items.length},p.prototype.isVisible=function(){return this.element.style.display==="block"},p.prototype.draw=function(){if(this.element.innerHTML="",this.items.length===0){this.hide();return}for(var s=0;s<this.items.length;s++)this.drawItem(this.items[s],this.active===s);this.show()},p.prototype.drawItem=function(s,r){var n=document.createElement("li"),t=document.createElement("a");r&&(n.className+=" active"),t.innerHTML=s.string,n.appendChild(t),this.element.appendChild(n),n.addEventListener("mousedown",(function(){this.selectingListItem=!0}).bind(this)),n.addEventListener("mouseup",(function(){this.handleMouseUp.call(this,s)}).bind(this))},p.prototype.handleMouseUp=function(s){this.selectingListItem=!1,this.component.value(s.original),this.clear(),this.draw()},p.prototype.move=function(s){this.active=s,this.draw()},p.prototype.previous=function(){this.move(this.active===0?this.items.length-1:this.active-1)},p.prototype.next=function(){this.move(this.active===this.items.length-1?0:this.active+1)},p.prototype.drawError=function(s){var r=document.createElement("li");r.innerHTML=s,this.element.appendChild(r),this.show()},K=p,K}var $,Ae;function Rt(){if(Ae)return $;Ae=1;var p=T(),s=xt(),r=wt(),n=function(t,u,o){return o=o||{},this.options=p({minLength:2,limit:5,filter:!0,hideOnBlur:!0},o),this.el=t,this.data=u||[],this.list=new r(this),this.query="",this.selected=null,this.list.draw(),this.el.addEventListener("keyup",(function(c){this.handleKeyUp(c.keyCode)}).bind(this),!1),this.el.addEventListener("keydown",(function(c){this.handleKeyDown(c)}).bind(this)),this.el.addEventListener("focus",(function(){this.handleFocus()}).bind(this)),this.el.addEventListener("blur",(function(){this.handleBlur()}).bind(this)),this.el.addEventListener("paste",(function(c){this.handlePaste(c)}).bind(this)),this.render=this.options.render?this.options.render.bind(this):this.render.bind(this),this.getItemV
1alue=this.options.getItemValue?this.options.getItemValue.bind(this):this.getItemValue.bind(this),this};return n.prototype.handleKeyUp=function(t){t===40||t===38||t===27||t===13||t===9||this.handleInputChange(this.el.value)},n.prototype.handleKeyDown=function(t){switch(t.keyCode){case 13:case 9:this.list.isEmpty()||(this.list.isVisible()&&t.preventDefault(),this.value(this.list.items[this.list.active].original),this.list.hide());break;case 27:this.list.isEmpty()||this.list.hide();break;case 38:this.list.previous();break;case 40:this.list.next();break}},n.prototype.handleBlur=function(){!this.list.selectingListItem&&this.options.hideOnBlur&&this.list.hide()},n.prototype.handlePaste=function(t){if(t.clipboardData)this.handleInputChange(t.clipboardData.getData("Text"));else{var u=this;setTimeout(function(){u.handleInputChange(t.target.value)},100)}},n.prototype.handleInputChange=function(t){if(this.query=this.normalize(t),this.list.clear(),this.query.length<this.options.minLength){this.list.draw();return}this.getCandidates((function(u){for(var o=0;o<u.length&&(this.list.add(u[o]),o!==this.options.limit-1);o++);this.list.draw()}).bind(this))},n.prototype.handleFocus=function(){this.list.isEmpty()||this.list.show(),this.list.selectingListItem=!1},n.prototype.update=function(t){this.data=t,this.handleKeyUp()},n.prototype.clear=function(){this.data=[],this.list.clear()},n.prototype.normalize=function(t){return t=t.toLowerCase(),t},n.prototype.match=function(t,u){return t.indexOf(u)>-1},n.prototype.value=function(t){if(this.selected=t,this.el.value=this.getItemValue(t),document.createEvent){var u=document.createEvent("HTMLEvents");u.initEvent("change",!0,!1),this.el.dispatchEvent(u)}else this.el.fireEvent("onchange")},n.prototype.getCandidates=function(t){var u={pre:"<strong>",post:"</strong>",extract:(function(c){return this.getItemValue(c)}).bind(this)},o;this.options.filter?(o=s.filter(this.query,this.data,u),o=o.map((function(c){return{original:c.original,string:this.render(c.original,c.string)}}).bind(this))):o=this.data.map((function(c){var i=this.render(c);return{original:c,string:i}}).bind(this)),t(o)}
1,n.prototype.getItemValue=function(t){return t},n.prototype.render=function(t,u){if(u)return u;for(var o=t.original?this.getItemValue(t.original):this.getItemValue(t),c=this.normalize(o),i=c.lastIndexOf(this.query);i>-1;){var l=i+this.query.length;o=o.slice(0,i)+"<strong>"+o.slice(i,l)+"</strong>"+o.slice(l),i=c.slice(0,i).lastIndexOf(this.query)}return o},n.prototype.renderError=function(t){this.list.drawError(t)},$=n,$}var Q,ke;function St(){if(ke)return Q;ke=1;var p=Rt();return Q=p,typeof window<"u"&&(window.Suggestions=p),Q}var Z,Ie;function Ot(){if(Ie)return Z;Ie=1;var p="Expected a function",s=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,o=/^0o[0-7]+$/i,c=parseInt,i=typeof I=="object"&&I&&I.Object===Object&&I,l=typeof self=="object"&&self&&self.Object===Object&&self,g=i||l||Function("return this")(),f=Object.prototype,y=f.toString,E=Math.max,h=Math.min,v=function(){return g.Date.now()};function e(_,R,x){var w,q,A,L,S,C,P=0,we=!1,M=!1,F=!0;if(typeof _!="function")throw new TypeError(p);R=b(R)||0,a(x)&&(we=!!x.leading,M="maxWait"in x,A=M?E(b(x.maxWait)||0,R):A,F="trailing"in x?!!x.trailing:F);function D(O){var k=w,B=q;return w=q=void 0,P=O,L=_.apply(B,k),L}function pt(O){return P=O,S=setTimeout(G,R),we?D(O):L}function gt(O){var k=O-C,B=O-P,Oe=R-k;return M?h(Oe,A-B):Oe}function Re(O){var k=O-C,B=O-P;return C===void 0||k>=R||k<0||M&&B>=A}function G(){var O=v();if(Re(O))return Se(O);S=setTimeout(G,gt(O))}function Se(O){return S=void 0,F&&w?D(O):(w=q=void 0,L)}function vt(){S!==void 0&&clearTimeout(S),P=0,w=C=q=S=void 0}function mt(){return S===void 0?L:Se(v())}function V(){var O=v(),k=Re(O);if(w=arguments,q=this,C=O,k){if(S===void 0)return pt(C);if(M)return S=setTimeout(G,R),D(C)}return S===void 0&&(S=setTimeout(G,R)),L}return V.cancel=vt,V.flush=mt,V}function a(_){var R=typeof _;return!!_&&(R=="object"||R=="function")}function d(_){return!!_&&typeof _=="object"}function m(_){return typeof _=="symbol"||d(_)&&y.call(_)==r}function b(_){if(typeof _=="number")return _;if(m(_))return s;if(a(_)){var R=typeof _.valueOf=="function"?_.valueOf():_;_=a(R)?R+"":R}if(typeof _!="string")return _===0?_:+_;_=_.replace(n,"");var x=u.test(_);return x||o.test(_)?c(_.slice(2),x?2:8):t.test(_)?s:+_}return Z=e,Z}var W,Te;function qt(){return Te||(Te=1,W={fr:{name:"France",bbox:[[-4.59235,41.380007],[9.560016,51.148506]]},us:{name:"United States",bbox:[[-171.791111,18.91619],[-66.96466,71.357764]]},ru:{name:"Russia",bbox:[[19.66064,41.151416],[190.10042,81.2504]]},ca:{name:"Canada",bbox:[[-140.99778,41.675105],[-52.648099,83.23324]]}}),W}var X,Pe;function Lt(){if(Pe)return X;Pe=1;function p(n){var t=n.match(/\s*(.+)\s*=\s*"?([^"]+)"?/);return t?{key:t[1],value:t[2]}:null}function s(n){var t=n.match(/<?([^>]*)>(.*)/);if(!t)return null;var u=t[1],o=t[2].split(";"),c=null,i=o.reduce(function(l,g){var f=p(g);return f?f.key==="rel"?(c||(c=f.value),l):(l[f.key]=f.value,l):l},{});return c?{url:u,rel:c,params:i}:null}function r(n){return n?n.split(/,\s*</).reduce(function(t,u){var o=s(u);if(!o)return t;var c=o.rel.split(/\s+/);return c.forEach(function(i){t[i]||(t[i]={url:o.url,params:o.params})}),t},{}):{}}return X=r,X}var J,Me;function Ct(){if(Me)return J;Me=1;var p=Lt();function s(r,n){this.request=r,this.headers=n.headers,this.rawBody=n.body,this.statusCode=n.statusCode;try{this.body=JSON.parse(n.body||"{}")}catch{this.body=n.body}this.links=p(this.headers.link)}return s.prototype.hasNextPage=function(){return!!this.links.next},s.prototype.nextPage=function(){return this.hasNextPage()?this.request._extend({path:this.links.next.url}):null},J=s,J}var Y,Be;function z(){return Be||(Be=1,Y={API_ORIGIN:"https://api.mapbox.com",EVENT_PROGRESS_DOWNLOAD:"downloadProgress",EVENT_PROGRESS_UPLOAD:"uploadProgress",EVENT_ERROR:"error",EVENT_RESPONSE:"response",ERROR_HTTP:"HttpError",ERROR_REQUEST_ABORTED:"RequestAbortedError"}),Y}var ee,je;function At(){if(je)return ee;je=1;var p=z();function s(r){var n=r.type||p.ERROR_HTTP,t;if(r.body)try{t=JSON.parse(r.body)}catch{t=r.body}else t=null;var u=r.message||null;u||(typeof t=="string"?u=t:t&&typeof t.message=="string"?u=t.message:n===p.ERROR_REQUEST_ABORTED&&(u="Request aborted")),this.message=u,this.type=n,this.statusCode=r.statusCode||null,this.request=r.request,this.body=t}return ee=s,ee}var te,Ge;function kt(){if(Ge)return te;Ge=1;function p(r){var n=r.indexOf(":"),t=r.substring(0,n).trim().toLowerCase(),u=r.substring(n+1).trim();return{name:t,value:u}}function s(r){var n={};
1return r&&r.trim().split(/[\r|\n]+/).forEach(function(t){var u=p(t);n[u.name]=u.value}),n}return te=s,te}var re,Ne;function It(){if(Ne)return re;Ne=1;var p=Ct(),s=At(),r=z(),n=kt(),t={};function u(f){var y=t[f.id];y&&(y.abort(),delete t[f.id])}function o(f,y){return new p(f,{body:y.response,headers:n(y.getAllResponseHeaders()),statusCode:y.status})}function c(f){var y=f.total,E=f.loaded,h=100*E/y;return{total:y,transferred:E,percent:h}}function i(f,y){return new Promise(function(E,h){y.onprogress=function(a){f.emitter.emit(r.EVENT_PROGRESS_DOWNLOAD,c(a))};var v=f.file;v&&(y.upload.onprogress=function(a){f.emitter.emit(r.EVENT_PROGRESS_UPLOAD,c(a))}),y.onerror=function(a){h(a)},y.onabort=function(){var a=new s({request:f,type:r.ERROR_REQUEST_ABORTED});h(a)},y.onload=function(){if(delete t[f.id],y.status<200||y.status>=400){var a=new s({request:f,body:y.response,statusCode:y.status});h(a);return}E(y)};var e=f.body;typeof e=="string"?y.send(e):e?y.send(JSON.stringify(e)):v?y.send(v):y.send(),t[f.id]=y}).then(function(E){return o(f,E)})}function l(f,y){var E=f.url(y),h=new window.XMLHttpRequest;return h.open(f.method,E),Object.keys(f.headers).forEach(function(v){h.setRequestHeader(v,f.headers[v])}),h}function g(f){return Promise.resolve().then(function(){var y=l(f,f.client.accessToken);return i(f,y)})}return re={browserAbort:u,sendRequestXhr:i,browserSend:g,createRequestXhr:l},re}var j={exports:{}};var Tt=j.exports,ze;function Pt(){return ze||(ze=1,(function(p,s){(function(r){var n=s,t=p&&p.exports==n&&p,u=typeof I=="object"&&I;(u.global===u||u.window===u)&&(r=u);var o=function(h){this.message=h};o.prototype=new Error,o.prototype.name="InvalidCharacterError";var c=function(h){throw new o(h)},i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=/[\t\n\f\r ]/g,g=function(h){h=String(h).replace(l,"");var v=h.length;v%4==0&&(h=h.replace(/==?$/,""),v=h.length),(v%4==1||/[^+a-zA-Z0-9/]/.test(h))&&c("Invalid character: the string to be decoded is not correctly encoded.");for(var e=0,a,d,m="",b=-1;++b<v;)d=i.indexOf(h.charAt(b)),a=e%4?a*64+d:d,e++%4&&(m+=String.fromCharCode(255&a>>(-2*e&6)));return m},f=function(h){h=String(h),/[^\0-\xFF]/.test(h)&&c("The string to be encoded contains characters outside of the Latin1 range.");for(var v=h.length%3,e="",a=-1,d,m,b,_,R=h.length-v;++a<R;)d=h.charCodeAt(a)<<16,m=h.charCodeAt(++a)<<8,b=h.charCodeAt(++a),_=d+m+b,e+=i.charAt(_>>18&63)+i.charAt(_>>12&63)+i.charAt(_>>6&63)+i.charAt(_&63);return v==2?(d=h.charCodeAt(a)<<8,m=h.charCodeAt(++a),_=d+m,e+=i.charAt(_>>10)+i.charAt(_>>4&63)+i.charAt(_<<2&63)+"="):v==1&&(_=h.charCodeAt(a),e+=i.charAt(_>>2)+i.charAt(_<<4&63)+"=="),e},y={encode:f,decode:g,version:"0.1.0"};if(n&&!n.nodeType)if(t)t.exports=y;else for(var E in y)y.hasOwnProperty(E)&&(n[E]=y[E]);else r.base64=y})(Tt)})(j,j.exports)),j.exports}var ne,Fe;function ut(){if(Fe)return ne;Fe=1;var p=Pt(),s={};function r(u){if(s[u])return s[u];var o=u.split("."),c=o[0],i=o[1];if(!i)throw new Error("Invalid token");var l=n(i),g={usage:c,user:l.u};return t(l,"a")&&(g.authorization=l.a),t(l,"exp")&&(g.expires=l.exp*1e3),t(l,"iat")&&(g.created=l.iat*1e3),t(l,"scopes")&&(g.scopes=l.scopes),t(l,"client")&&(g.client=l.client),t(l,"ll")&&(g.lastLogin=l.ll),t(l,"iu")&&(g.impersonator=l.iu),s[u]=g,g}function n(u){try{return JSON.parse(p.decode(u))}catch{throw new Error("Invalid token")}}function t(u,o){return Object.prototype.hasOwnProperty.call(u,o)}return ne=r,ne}var ie={exports:{}},De;function Mt(){return De||(De=1,(function(p){var s=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function t(i,l,g){this.fn=i,this.context=l,this.once=g||!1}function u(i,l,g,f,y){if(typeof g!="function")throw new TypeError("The listener must be a function");var E=new t(g,f||i,y),h=r?r+l:l;return i._events[h]?i._events[h].fn?i._events[h]=[i._events[h],E]:i._events[h].push(E):(i._events[h]=E,i._eventsCount++),i}function o(i,l){--i._eventsCount===0?i._events=new n:delete i._events[l]}function c(){this._events=new n,this._eventsCount=0}c.prototype.eventNames=function(){var l=[],g,f;if(this._eventsCount===0)return l;for(f in g=this._events)s.call(g,f)&&l.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(g)):l},c.prototype.listeners=function(l){var g=r?r+l:l,f=this._events[g];if(!f)return[];if(f.fn)return[f.fn];for(var y=0,E=f.length,h=new Array(E);y<E;y++)h[y]=f[y].fn;return h},c.prototype.listenerCount=function(l){var g=r?r+l:l,f=this._events[g];return f?f.fn?1:f.length:0},c.prototype.emit=function(l,g,f,y,E,h){var v=r?r+l:l;if(!this._events[v])return!1;var e=this._events[v],a=arguments.length,d,m;
1if(e.fn){switch(e.once&&this.removeListener(l,e.fn,void 0,!0),a){case 1:return e.fn.call(e.context),!0;case 2:return e.fn.call(e.context,g),!0;case 3:return e.fn.call(e.context,g,f),!0;case 4:return e.fn.call(e.context,g,f,y),!0;case 5:return e.fn.call(e.context,g,f,y,E),!0;case 6:return e.fn.call(e.context,g,f,y,E,h),!0}for(m=1,d=new Array(a-1);m<a;m++)d[m-1]=arguments[m];e.fn.apply(e.context,d)}else{var b=e.length,_;for(m=0;m<b;m++)switch(e[m].once&&this.removeListener(l,e[m].fn,void 0,!0),a){case 1:e[m].fn.call(e[m].context);break;case 2:e[m].fn.call(e[m].context,g);break;case 3:e[m].fn.call(e[m].context,g,f);break;case 4:e[m].fn.call(e[m].context,g,f,y);break;default:if(!d)for(_=1,d=new Array(a-1);_<a;_++)d[_-1]=arguments[_];e[m].fn.apply(e[m].context,d)}}return!0},c.prototype.on=function(l,g,f){return u(this,l,g,f,!1)},c.prototype.once=function(l,g,f){return u(this,l,g,f,!0)},c.prototype.removeListener=function(l,g,f,y){var E=r?r+l:l;if(!this._events[E])return this;if(!g)return o(this,E),this;var h=this._events[E];if(h.fn)h.fn===g&&(!y||h.once)&&(!f||h.context===f)&&o(this,E);else{for(var v=0,e=[],a=h.length;v<a;v++)(h[v].fn!==g||y&&!h[v].once||f&&h[v].context!==f)&&e.push(h[v]);e.length?this._events[E]=e.length===1?e[0]:e:o(this,E)}return this},c.prototype.removeAllListeners=function(l){var g;return l?(g=r?r+l:l,this._events[g]&&o(this,g)):(this._events=new n,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,p.exports=c})(ie)),ie.exports}var se,Ve;function Bt(){if(Ve)return se;Ve=1;function p(o){return o.map(encodeURIComponent).join(",")}function s(o){return Array.isArray(o)?p(o):encodeURIComponent(String(o))}function r(o,c,i){if(i===!1||i===null)return o;var l=/\?/.test(o)?"&":"?",g=encodeURIComponent(c);return i!==void 0&&i!==""&&i!==!0&&(g+="="+s(i)),""+o+l+g}function n(o,c){if(!c)return o;var i=o;return Object.keys(c).forEach(function(l){var g=c[l];g!==void 0&&(Array.isArray(g)&&(g=g.filter(function(f){return f!=null}).join(",")),i=r(i,l,g))}),i}function t(o,c){if(!c||o.slice(0,4)==="http")return o;var i=o[0]==="/"?"":"/";return""+c.replace(/\/$/,"")+i+o}function u(o,c){return c?o.replace(/\/:([a-zA-Z0-9]+)/g,function(i,l){var g=c[l];if(g===void 0)throw new Error("Unspecified route parameter "+l);var f=s(g);return"/"+f}):o}return se={appendQueryObject:n,appendQueryParam:r,prependOrigin:t,interpolateRouteParams:u},se}var oe,Ue;function jt(){if(Ue)return oe;Ue=1;var p=ut(),s=T(),r=Mt(),n=Bt(),t=z(),u=1;function o(c,i){if(!c)throw new Error("MapiRequest requires a client");if(!i||!i.path||!i.method)throw new Error("MapiRequest requires an options object with path and method properties");var l={};i.body&&(l["content-type"]="application/json");var g=s(l,i.headers),f=Object.keys(g).reduce(function(y,E){return y[E.toLowerCase()]=g[E],y},{});this.id=u++,this._options=i,this.emitter=new r,this.client=c,this.response=null,this.error=null,this.sent=!1,this.aborted=!1,this.path=i.path,this.method=i.method,this.origin=i.origin||c.origin,this.query=i.query||{},this.params=i.params||{},this.body=i.body||null,this.file=i.file||null,this.encoding=i.encoding||"utf8",this.sendFileAs=i.sendFileAs||null,this.headers=f}return o.prototype.url=function(i){var l=n.prependOrigin(this.path,this.origin);l=n.appendQueryObject(l,this.query);var g=this.params,f=i??this.client.accessToken;if(f){l=n.appendQueryParam(l,"access_token",f);var y=p(f).user;g=s({ownerId:y},g)}return l=n.interpolateRouteParams(l,g),l},o.prototype.send=function(){var i=this;if(i.sent)throw new Error("This request has already been sent. Check the response and error properties. Create a new request with clone().");return i.sent=!0,i.client.sendRequest(i).then(function(l){return i.response=l,i.emitter.emit(t.EVENT_RESPONSE,l),l},function(l){throw i.error=l,i.emitter.emit(t.EVENT_ERROR,l),l})},o.prototype.abort=function(){this._nextPageRequest&&(this._nextPageRequest.abort(),delete this._nextPageRequest),!(this.response||this.error||this.aborted)&&(this.aborted=!0,this.client.abortRequest
1(this))},o.prototype.eachPage=function(i){var l=this;function g(E){function h(){delete l._nextPageRequest;var v=E.nextPage();v&&(l._nextPageRequest=v,y(v))}i(null,E,h)}function f(E){i(E,null,function(){})}function y(E){E.send().then(g,f)}y(this)},o.prototype.clone=function(){return this._extend()},o.prototype._extend=function(i){var l=s(this._options,i);return new o(this.client,l)},oe=o,oe}var ae,He;function lt(){if(He)return ae;He=1;var p=ut(),s=jt(),r=z();function n(t){if(!t||!t.accessToken)throw new Error("Cannot create a client without an access token");p(t.accessToken),this.accessToken=t.accessToken,this.origin=t.origin||r.API_ORIGIN}return n.prototype.createRequest=function(u){return new s(this,u)},ae=n,ae}var ue,Ke;function ct(){if(Ke)return ue;Ke=1;var p=It(),s=lt();function r(t){s.call(this,t)}r.prototype=Object.create(s.prototype),r.prototype.constructor=r,r.prototype.sendRequest=p.browserSend,r.prototype.abortRequest=p.browserAbort;function n(t){return new r(t)}return ue=n,ue}var le,$e;function Gt(){if($e)return le;$e=1;var p=ct();return le=p,le}var ce,Qe;function Nt(){if(Qe)return ce;Qe=1;var p=Object.prototype.toString;return ce=function(s){var r;return p.call(s)==="[object Object]"&&(r=Object.getPrototypeOf(s),r===null||r===Object.getPrototypeOf({}))},ce}var he,Ze;function zt(){if(Ze)return he;Ze=1;var p=Nt(),s=T(),r="value",n=`
2  `,t={};t.assert=function(h,v){return v=v||{},function(e){var a=o(h,e);if(a){var d=c(a,v);throw v.apiName&&(d=v.apiName+": "+d),new Error(d)}}},t.shape=function(v){var e=E(v);return function(d){var m=o(t.plainObject,d);if(m)return m;for(var b,_,R=[],x=0;x<e.length;x++)b=e[x].key,_=e[x].value,m=o(_,d[b]),m&&R.push([b].concat(m));return R.length<2?R[0]:function(w){R=R.map(function(L){var S=L[0],C=c(L,w).split(`
3`).join(n);return"- "+S+": "+C});var q=w.path.join("."),A=q===r?"":" of "+q;return"The following properties"+A+" have invalid values:"+n+R.join(n)}}},t.strictShape=function(v){var e=t.shape(v);return function(d){var m=e(d);if(m)return m;var b=Object.keys(d).reduce(function(_,R){return v[R]===void 0&&_.push(R),_},[]);if(b.length!==0)return function(){return"The following keys are invalid: "+b.join(", ")}}},t.arrayOf=function(v){return u(v)},t.tuple=function(){var v=Array.isArray(arguments[0])?arguments[0]:Array.prototype.slice.call(arguments);return u(v)};function u(h){var v=Array.isArray(h),e=function(a){return v?h[a]:h};return function(d){var m=o(t.plainArray,d);if(m)return m;if(v&&d.length!==h.length)return"an array with "+h.length+" items";for(var b=0;b<d.length;b++)if(m=o(e(b),d[b]),m)return[b].concat(m)}}t.required=function(v){function e(a){return a==null?function(d){return f(d,y(d.path)?"cannot be undefined/null.":"is required.")}:v.apply(this,arguments)}return e.__required=!0,e},t.oneOfType=function(){var v=Array.isArray(arguments[0])?arguments[0]:Array.prototype.slice.call(arguments);return function(a){var d=v.map(function(m){return o(m,a)}).filter(Boolean);if(d.length===v.length)return d.every(function(m){return m.length===1&&typeof m[0]=="string"})?i(d.map(function(m){return m[0]})):d.reduce(function(m,b){return b.length>m.length?b:m})}},t.equal=function(v){return function(a){if(a!==v)return JSON.stringify(v)}},t.oneOf=function(){var v=Array.isArray(arguments[0])?arguments[0]:Array.prototype.slice.call(arguments),e=v.map(function(a){return t.equal(a)});return t.oneOfType.apply(this,e)},t.range=function(v){var e=v[0],a=v[1];return function(m){var b=o(t.number,m);if(b||m<e||m>a)return"number between "+e+" & "+a+" (inclusive)"}},t.any=function(){},t.boolean=function(v){if(typeof v!="boolean")return"boolean"},t.number=function(v){if(typeof v!="number")return"number"},t.plainArray=function(v){if(!Array.isArray(v))return"array"},t.plainObject=function(v){if(!p(v))return"object"},t.string=function(v){if(typeof v!="string")return"string"},t.func=function(v){if(typeof v!="function")return"function"};function o(h,v){if(!(v==null&&!h.hasOwnProperty("__required"))){var e=h(v);if(e)return Array.isArray(e)?e:[e]}}function c(h,v){var e=h.length,a=h[e-1],d=h.slice(0,e-1);
3return d.length===0&&(d=[r]),v=s(v,{path:d}),typeof a=="function"?a(v):f(v,l(a))}function i(h){return h.length<2?h[0]:h.length===2?h.join(" or "):h.slice(0,-1).join(", ")+", or "+h.slice(-1)}function l(h){return"must be "+g(h)+"."}function g(h){return/^an? /.test(h)?h:/^[aeiou]/i.test(h)?"an "+h:/^[a-z]/i.test(h)?"a "+h:h}function f(h,v){var e=y(h.path),a=h.path.join(".")+" "+v,d=e?"Item at position ":"";return d+a}function y(h){return typeof h[h.length-1]=="number"||typeof h[0]=="number"}function E(h){return Object.keys(h||{}).map(function(v){return{key:v,value:h[v]}})}return t.validate=o,t.processMessage=c,he=t,he}var fe,We;function Ft(){if(We)return fe;We=1;var p=T(),s=zt();function r(o){if(typeof window<"u")return o instanceof I.Blob||o instanceof I.ArrayBuffer?void 0:"Blob or ArrayBuffer";if(!(typeof o=="string"||o.pipe!==void 0))return"Filename or Readable stream"}function n(o,c){return s.assert(s.strictShape(o),c)}function t(o){var c="date";if(typeof o=="boolean")return c;try{var i=new Date(o);if(i.getTime&&isNaN(i.getTime()))return c}catch{return c}}function u(o){return s.tuple(s.number,s.number)(o)}return fe=p(s,{file:r,date:t,coordinates:u,assertShape:n}),fe}var de,Xe;function Dt(){if(Xe)return de;Xe=1;function p(s,r){var n=function(t,u){return r.indexOf(t)!==-1&&u!==void 0};return typeof r=="function"&&(n=r),Object.keys(s).filter(function(t){return n(t,s[t])}).reduce(function(t,u){return t[u]=s[u],t},{})}return de=p,de}var pe,Je;function Vt(){if(Je)return pe;Je=1;function p(s,r){return Object.keys(s).reduce(function(n,t){return n[t]=r(t,s[t]),n},{})}return pe=p,pe}var ge,Ye;function Ut(){if(Ye)return ge;Ye=1;var p=Vt();function s(r){return p(r,function(n,t){return typeof t=="boolean"?JSON.stringify(t):t})}return ge=s,ge}var ve,et;function Ht(){if(et)return ve;et=1;var p=lt(),s=ct();function r(n){return function(t){var u;p.prototype.isPrototypeOf(t)?u=t:u=s(t);var o=Object.create(n);return o.client=u,o}}return ve=r,ve}var me,tt;function Kt(){if(tt)return me;tt=1;var p=T(),s=Ft(),r=Dt(),n=Ut(),t=Ht(),u={},o=["country","region","postcode","district","place","locality","neighborhood","address","poi","poi.landmark"];return u.forwardGeocode=function(c){s.assertShape({query:s.required(s.string),mode:s.oneOf("mapbox.places","mapbox.places-permanent"),countries:s.arrayOf(s.string),proximity:s.oneOf(s.coordinates,"ip"),types:s.arrayOf(s.oneOf(o)),autocomplete:s.boolean,bbox:s.arrayOf(s.number),limit:s.number,language:s.arrayOf(s.string),routing:s.boolean,fuzzyMatch:s.boolean,worldview:s.string,
3session_token:s.string})(c),c.mode=c.mode||"mapbox.places";var i=n(p({country:c.countries},r(c,["proximity","types","autocomplete","bbox","limit","language","routing","fuzzyMatch","worldview","session_token"])));return this.client.createRequest({method:"GET",path:"/geocoding/v5/:mode/:query.json",params:r(c,["mode","query"]),query:i})},u.reverseGeocode=function(c){s.assertShape({query:s.required(s.coordinates),mode:s.oneOf("mapbox.places","mapbox.places-permanent"),countries:s.arrayOf(s.string),types:s.arrayOf(s.oneOf(o)),bbox:s.arrayOf(s.number),limit:s.number,language:s.arrayOf(s.string),reverseMode:s.oneOf("distance","score"),routing:s.boolean,worldview:s.string,session_token:s.string})(c),c.mode=c.mode||"mapbox.places";var i=n(p({country:c.countries},r(c,["country","types","bbox","limit","language","reverseMode","routing","worldview","session_token"])));return this.client.createRequest({method:"GET",path:"/geocoding/v5/:mode/:query.json",params:r(c,["mode","query"]),query:i})},me=t(u),me}let $t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ht=p=>crypto.getRandomValues(new Uint8Array(p)),ft=(p,s,r)=>{let n=(2<<Math.log(p.length-1)/Math.LN2)-1,t=-~(1.6*n*s/p.length);return(u=s)=>{let o="";for(;;){let c=r(t),i=t|0;for(;i--;)if(o+=p[c[i]&n]||"",o.length===u)return o}}},Qt=(p,s=21)=>ft(p,s,ht),Zt=(p=21)=>crypto.getRandomValues(new Uint8Array(p)).reduce((s,r)=>(r&=63,r<36?s+=r.toString(36):r<62?s+=(r-26).toString(36).toUpperCase():r>62?s+="-":s+="_",s),"");const Wt=Object.freeze(Object.defineProperty({__proto__:null,customAlphabet:Qt,customRandom:ft,nanoid:Zt,random:ht,urlAlphabet:$t},Symbol.toStringTag,{value:"Module"})),Xt=yt(Wt);var ye,rt;function Jt(){if(rt)return ye;rt=1;var p=Xt.nanoid;function s(r){this.origin=r.origin||"https://api.mapbox.com",this.endpoint="events/v2",this.access_token=r.accessToken,this.version="0.3.0",this.pluginSessionID=this.generateSessionID(),this.sessionIncrementer=0,this.userAgent=this.getUserAgent(),this.options=r,this.send=this.send.bind(this),this.countries=r.countries?r.countries.split(","):null,this.types=r.types?r.types.split(","):null,this.bbox=r.bbox?r.bbox:null,this.language=r.language?r.language.split(","):null,this.limit=r.limit?+r.limit:null,this.locale=navigator.language||null,this.enableEventLogging=this.shouldEnableLogging(r),this.eventQueue=new Array,this.flushInterval=r.flushInterval||1e3,this.maxQueueSize=r.maxQueueSize||100,this.timer=this.flushInterval?setTimeout(this.flush.bind(this),this.flushInterval):null,this.lastSentInput="",this.lastSentIndex=0}return s.prototype={select:function(r,n){var t=this.getEventPayload("search.select",n,{selectedFeature:r});if(t&&!(t.resultIndex===this.lastSentIndex&&t.queryString===this.lastSentInput||t.resultIndex==-1))return this.lastSentIndex=t.resultIndex,this.lastSentInput=t.queryString,this.push(t)},start:function(r){var n=this.getEventPayload("search.start",r);if(n)return this.push(n)},keyevent:function(r,n){if(r.key&&!(r.metaKey||[9,27,37,39,13,38,40].indexOf(r.keyCode)!==-1)){var t=this.getEventPayload("search.keystroke",n,{key:r.key});if(t)return this.push(t)}},send:function(r,n){if(!this.enableEventLogging)return n?n():void 0;var t=this.getRequestOptions(r);this.request(t,(function(u){if(u)return this.handleError(u,n);if(n)return n()}).bind(this))},getRequestOptions:function(r){Array.isArray(r)||(r=[r]);var n={method:"POST",host:this.origin,path:this.endpoint+"?access_token="+this.access_token,headers:{"Content-Type":"application/json"},body:JSON.stringify(r)};return n},getEventPayload:function(r,n,t={}){if(r==="search.select"&&!t.selectedFeature||r==="search.keystroke"&&!t.key)return null;var u;if(!n.options.proximity)u=null;else if(typeof n.options.proximity=="object")u=[n.options.proximity.longitude,n.options.proximity.latitude];else if(n.options.proximity==="ip"){var o=n._headers?n._headers["ip-proximity"]:null;o&&typeof o=="string"?u=o.split(",").map(parseFloat):u=[999,999]}else u=n.options.proximity;var c=n._map?n._map.getZoom():void 0,i={event:r,version:this.getEventSchemaVersion(r),created:+new Date,sessionIdentifier:this.getSessionId(),country:this.countries,userAgent:this.userAgent,language:this.language,bbox:this.bbox,types:this.types,endpoint:"mapbox.places",autocomplete:n.options.autocomplete,fuzzyMatch:n.options.fuzzyMatch,proximity:u,limit:n.options.limit,routing:n.options.routing,worldview:n.options.worldview,mapZoom:c,keyboardLocale:this.locale};if(r==="search.select"?i.queryString=n.inputString:r!="search.select"&&n._inputEl?i.queryString=n._inputEl.value:i.queryString=n.inputString,["search.keystroke","search.select"].includes(r)&&(i.path="geocoding/v5/mapbox.places"),r==="search.keystroke"&&t.key)i.lastAction=t.key;else if(r==="search.select"&&t.selectedFeature){var l=t.selectedFeature,g=this.getSelectedIndex(l,n);
3if(i.resultIndex=g,i.resultPlaceName=l.place_name,i.resultId=l.id,l.properties&&(i.resultMapboxId=l.properties.mapbox_id),n._typeahead){var f=n._typeahead.data;f&&f.length>0&&(i.suggestionIds=this.getSuggestionIds(f),i.suggestionNames=this.getSuggestionNames(f),i.suggestionTypes=this.getSuggestionTypes(f),i.suggestionSources=this.getSuggestionSources(f))}}return this.validatePayload(i)?i:null},request:function(r,n){var t=new XMLHttpRequest;t.onreadystatechange=function(){if(this.readyState==4)return this.status==204?n(null):n(this.statusText)},t.open(r.method,r.host+"/"+r.path,!0);for(var u in r.headers){var o=r.headers[u];t.setRequestHeader(u,o)}t.send(r.body)},handleError:function(r,n){if(n)return n(r)},generateSessionID:function(){return p()},getSessionId:function(){return this.pluginSessionID+"."+this.sessionIncrementer},getUserAgent:function(){return"mapbox-gl-geocoder."+this.version+"."+navigator.userAgent},getSelectedIndex:function(r,n){if(n._typeahead){var t=n._typeahead.data,u=r.id,o=t.map(function(i){return i.id}),c=o.indexOf(u);return c}},getSuggestionIds:function(r){return r.map(function(n){return n.properties?n.properties.mapbox_id||"":n.id||""})},getSuggestionNames:function(r){return r.map(function(n){return n.place_name||""})},getSuggestionTypes:function(r){return r.map(function(n){return n.place_type&&Array.isArray(n.place_type)&&n.place_type[0]||""})},getSuggestionSources:function(r){return r.map(function(n){return n._source||""})},getEventSchemaVersion:function(r){return["search.keystroke","search.select"].includes(r)?"2.2":"2.0"},validatePayload:function(r){if(!r||!r.event)return!1;var n=["event","created","sessionIdentifier","queryString"],t=["event","created","sessionIdentifier","queryString","lastAction"],u=["event","created","sessionIdentifier","queryString","resultIndex","path","suggestionIds"],o=r.event;return o==="search.start"?this.objectHasRequiredProps(r,n):o==="search.keystroke"?this.objectHasRequiredProps(r,t):o==="search.select"?this.objectHasRequiredProps(r,u):!0},objectHasRequiredProps:function(r,n){return n.every(function(t){return t==="queryString"?typeof r[t]=="string"&&r[t].length>0:r[t]!==void 0})},shouldEnableLogging:function(r){return!(r.enableEventLogging===!1||r.origin&&r.origin!=="https://api.mapbox.com")},flush:function(){this.eventQueue.length>0&&(this.send(this.eventQueue),this.eventQueue=new Array),this.timer&&clearTimeout(this.timer),this.flushInterval&&(this.timer=setTimeout(this.flush.bind(this),this.flushInterval))},push:function(r,n){this.eventQueue.push(r),(this.eventQueue.length>=this.maxQueueSize||n)&&this.flush()},remove:function(){this.flush()}},ye=s,ye}var _e,nt;function Yt(){if(nt)return _e;nt=1;var p={de:"Suche",it:"Ricerca",en:"Search",nl:"Zoeken",fr:"Chercher",ca:"Cerca",he:"לחפש",ja:"サーチ",lv:"Meklēt",pt:"Procurar",sr:"Претрага",zh:"搜索",cs:"Vyhledávání",hu:"Keresés",ka:"ძიება",nb:"Søke",sk:"Vyhľadávanie",th:"ค้นหา",fi:"Hae",is:"Leita",ko:"수색",pl:"Szukaj",sl:"Iskanje",fa:"جستجو",ru:"Поиск"};return _e={placeholder:p},_e}var N={exports:{}},er=N.exports,it;function tr(){return it||(it=1,(function(p){(function(s,r,n){p.exports?p.exports=n():s[r]=n()})(er,"subtag",function(){var s="",r=/^([a-zA-Z]{2,3})(?:[_-]+([a-zA-Z]{3})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{4})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{2}|[0-9]{3})(?=$|[_-]+))?/;function n(i){return i.match(r)||[]}function t(i){return n(i).filter(function(l,g){return l&&g})}function u(i){return i=n(i),{language:i[1]||s,extlang:i[2]||s,script:i[3]||s,region:i[4]||s}}function o(i,l,g){Object.defineProperty(i,l,{value:g,enumerable:!0})}function c(i,l,g){function f(y){return n(y)[i]||s}o(f,"pattern",l),o(u,g,f)}return c(1,/^[a-zA-Z]{2,3}$/,"language"),c(2,/^[a-zA-Z]{3}$/,"extlang"),c(3,/^[a-zA-Z]{4}$/,"script"),c(4,/^[a-zA-Z]{2}$|^[0-9]{3}$/,"region"),o(u,"split",t),u})})(N)),N.exports}var be,st;function rr(){if(st)return be;st=1;function p(){}return p.prototype={isSupport:function(){return!!window.navigator.geolocation},getCurrentPosition:function(){const s={enableHighAccuracy:!0};return new Promise(function(r,n){window.navigator.geolocation.getCurrentPosition(r,n,s)})}},be=p,be}var Ee,ot;function nr(){if(ot)return Ee;ot=1;function p(n,t){const u=s(n),o=["address","street","place","country"];var c;if(typeof t=="function")return t(u);const i=o.indexOf(t);return i===-1?c=o:c=o.slice(i),c.reduce(function(l,g){return u[g]?(l!==""&&(l=l+", "),l+u[g]):l},"")}function s(n){const t=n.address||"",u=n.text||"",o=n.place_name||"",i={address:o.split(",")[0],houseNumber:t,street:u,placeName:o};return n.context.forEach(function(l){const g=l.id.split(".")[0];i[g]=l.text}),i}return Ee={transformFeatureToGeolocationText:p,getAddressInfo:s,REVERSE_GEOCODE_COORD_RGX:/^[ ]*(-?\d{1,3}(\.\d{0,256})?)[, ]+(-?\d{1,3}(\.\d{0,256})?)[ ]*$/},Ee}var xe,at;function ir(){if(at)return xe;at=1;var p=St(),s=Ot(),r=T(),n=bt().EventEmitter,t=qt(),u=Gt(),o=Kt(),c=Jt(),i=Yt(),l=tr(),g=rr(),f=nr();const y={FORWARD:0,LOCAL:1,REVERSE:2};function E(){var e=document.createElement("div");return e.className="mapboxgl-ctrl-geocoder--powered-by",e.innerHTML='<a href="https://www.mapbox.com/search-service" target="_blank">Powered by Mapbox</a>',e}function h(e){this._eventEmitter=new n,this.options=r({},this.options,e),this.inputString="",this.fresh=!0,this.lastSelected=null,this.geolocation=new g}function v(e){return e?String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"):""}return h.prototype={options:{zoom:16,flyTo:!0,trackProximity:!0,minLength:2,reverseGeocode:!1,flipCoordinates:!1,limit:5,origin:"https://api.mapbox.com",enableEventLogging:!0,marker:!0,mapboxgl:null,collapsed:!1,clearAndBlurOnEsc:!1,clearOnBlur:!1,enableGeolocation:!1,addressAccuracy:"street",useBrowserFocus:!1,getItemV
3alue:function(e){return e.place_name},render:function(e){var a=v(e.place_name).split(",");return'<div class="mapboxgl-ctrl-geocoder--suggestion"><div class="mapboxgl-ctrl-geocoder--suggestion-title">'+a[0]+'</div><div class="mapboxgl-ctrl-geocoder--suggestion-address">'+a.splice(1,a.length).join(",")+"</div></div>"}},_headers:{},addTo:function(e){function a(d,m){if(!document.body.contains(m))throw new Error("Element provided to #addTo() exists, but is not in the DOM");const b=d.onAdd();m.appendChild(b)}if(e._controlContainer)e.addControl(this);else if(e instanceof HTMLElement)a(this,e);else if(typeof e=="string"){const d=document.querySelectorAll(e);if(d.length===0)throw new Error("Element ",e,"not found.");if(d.length>1)throw new Error("Geocoder can only be added to a single html element");a(this,d[0])}else throw new Error("Error: addTo must be a mapbox-gl-js map, an html element, or a CSS selector query for a single html element")},onAdd:function(e){if(e&&typeof e!="string"&&(this._map=e),this.setLanguage(),this.options.localGeocoderOnly||(this.geocoderService=o(u({accessToken:this.options.accessToken,origin:this.options.origin}))),this.options.localGeocoderOnly&&!this.options.localGeocoder)throw new Error("A localGeocoder function must be specified to use localGeocoderOnly mode");this.eventManager=new c(this.options),this._onChange=this._onChange.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onPaste=this._onPaste.bind(this),this._onBlur=this._onBlur.bind(this),this._showButton=this._showButton.bind(this),this._hideButton=this._hideButton.bind(this),this._onQueryResult=this._onQueryResult.bind(this),this.clear=this.clear.bind(this),this._updateProximity=this._updateProximity.bind(this),this._collapse=this._collapse.bind(this),this._unCollapse=this._unCollapse.bind(this),this._clear=this._clear.bind(this),this._clearOnBlur=this._clearOnBlur.bind(this),this._geolocateUser=this._geolocateUser.bind(this),this._onSuggestionItemFocus=this._onSuggestionItemFocus.bind(this),this._onSuggestionItemKeyDown=this._onSuggestionItemKeydown.bind(this);var a=this.container=document.createElement("div");a.className="mapboxgl-ctrl-geocoder mapboxgl-ctrl";var d=this.createIcon("search",'<path 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"/>');this._inputEl=document.createElement("input"),this._inputEl.type="text",this._inputEl.className="mapboxgl-ctrl-geocoder--input",this.setPlaceholder(),this.options.collapsed&&(this._collapse(),this.container.addEventListener("mouseenter",this._unCollapse),this.container.addEventListener("mouseleave",this._collapse),this._inputEl.addEventListener("focus",this._unCollapse)),(this.options.collapsed||this.options.clearOnBlur)&&this._inputEl.addEventListener("blur",this._onBlur),this._inputEl.addEventListener("keydown",s(this._onKeyDown,200)),this._inputEl.addEventListener("paste",this._onPaste),this._inputEl.addEventListener("change",this._onChange),this.container.addEventListener("mouseenter",this._showButton),this.container.addEventListener("mouseleave",this._hideButton),this._inputEl.addEventListener("keyup",(function(S){this.eventManager.keyevent(S,this)}).bind(this));var m=document.createElement("div");m.classList.add("mapboxgl-ctrl-geocoder--pin-right"),this._clearEl=document.createElement("button"),this._clearEl.setAttribute("aria-label","Clear"),this._clearEl.addEventListener("click",this.clear),this._clearEl.className="mapboxgl-ctrl-geocoder--button";var b=this.createIcon("close",'<path 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"/>');if(this._clearEl.appendChild(b),this._loadingEl=this.createIcon("loading",'<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 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.
36 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"/>'),m.appendChild(this._clearEl),m.appendChild(this._loadingEl),a.appendChild(d),a.appendChild(this._inputEl),this.options.enableGeolocation&&this.geolocation.isSupport()){this._geolocateEl=document.createElement("button"),this._geolocateEl.setAttribute("aria-label","Geolocate"),this._geolocateEl.addEventListener("click",this._geolocateUser),this._geolocateEl.className="mapboxgl-ctrl-geocoder--button";var _=this.createIcon("geolocate",'<path d="M12.999 3.677L2.042 8.269c-.962.403-.747 1.823.29 1.912l5.032.431.431 5.033c.089 1.037 1.509 1.252 1.912.29l4.592-10.957c.345-.822-.477-1.644-1.299-1.299z" fill="#4264fb"/>');this._geolocateEl.appendChild(_),m.appendChild(this._geolocateEl),this._showGeolocateButton()}var R=this._typeahead=new p(this._inputEl,[],{hideOnBlur:!this.options.useBrowserFocus,filter:!1,minLength:this.options.minLength,limit:this.options.limit});a.insertBefore(m,R.list.wrapper),this.setRenderFunction(this.options.render),R.getItemValue=this.options.getItemValue;const x=this._typeahead.handleKeyDown.bind(this._typeahead),w=this._typeahead.handleKeyUp.bind(this._typeahead);this._typeahead.handleKeyUp,this.options.useBrowserFocus&&(this._typeahead.handleKeyDown=(function(S){if(!(S.keyCode===9&&!R.list.isEmpty())){if(S.keyCode===40){this._typeahead.list.active=0,this._typeahead.list.element.querySelectorAll("li").forEach(function(C){C.classList.remove("active")}),this._typeahead.list.element.querySelectorAll("li")[0].classList.add("active"),this._typeahead.list.element.querySelectorAll("li")[0].focus();return}else if(S.keyCode===38){this._typeahead.list.active=R.list.items.length-1,this._typeahead.list.element.querySelectorAll("li").forEach(function(C){C.classList.remove("active")}),this._typeahead.list.element.querySelectorAll("li")[this._typeahead.list.active].classList.add("active"),this._typeahead.list.element.querySelectorAll("li")[this._typeahead.list.active].focus();return}x(S)}}).bind(this),this._typeahead.handleKeyUp=function(S){if(S&&S.keyCode===16){S.preventDefault();return}w(S)});var q=R.list.draw,A=this._footerNode=E(),L=this;return R.list.draw=function(){L.options.useBrowserFocus&&R.list.element.querySelectorAll("li").forEach(function(S){S.removeEventListener("focus",L._onSuggestionItemFocus),S.removeEventListener("keydown",L._onSuggestionItemKeyDown)}),q.call(this),L.options.useBrowserFocus&&R.list.element.querySelectorAll("li").forEach((function(S,C){C===0&&S.focus(),S.setAttribute("data-index",C),S.tabIndex=0,S.addEventListener("focus",this._onSuggestionItemFocus),S.addEventListener("keydown",this._onSuggestionItemKeyDown)}).bind(L)),A.addEventListener("mousedown",(function(){this.selectingListItem=!0}).bind(this)),A.addEventListener("mouseup",(function(){this.selectingListItem=!1}).bind(this)),this.element.appendChild(A)},this.mapMarker=null,this._handleMarker=this._handleMarker.bind(this),this._map&&(this.options.trackProximity&&(this._updateProximity(),this._map.on("moveend",this._updateProximity)),this._mapboxgl=this.options.mapboxgl,!this._mapboxgl&&this.options.marker&&(console.error("No mapboxgl detected in options. Map markers are disabled. Please set options.mapboxgl."),this.options.marker=!1)),a},_onSuggestionItemKeydown(e){const a=e.keyCode;if(a!==9){if(a===13){e.preventDefault();const d=this._typeahead.list.element.querySelector(".active");if(d){const m=d.getAttribute("data-index"),b=this._typeahead.list.items[m];b&&(this._typeahead.value(b.original),this._typeahead.list.hide())}}else if(a===38||a===40){const d=this._typeahead.list.element.querySelectorAll("li");if(d.length>0){if(a===38)if(this._typeahead.list.active>0)e.preventDefault(),this._typeahead.list.active--;else{this._typeahead.el.focus();return}else if(a===40)if(e.preventDefault(),this._typeahead.list.active<d.length-1)this._typeahead.list.active++;else return;d.forEach(function(b){b.classList.remove("active")});const m=d[this._typeahead.list.active];m&&(m.classList.add("active"),m.focus())}}}},_onSuggestionItemFocus(e){this._typeahead.list.active=e.target.getAttribute("data-index"),this._typeahead.list.element.querySelectorAll("li").forEach(function(a){a.classList.remove("active")}),e.target.classList.add("active")},_geolocateUser:function(){this._hideGeolocateButton(),this._showLoadingIcon(),this.geolocation.getCurrentPosition().then((function(e){this._hideLoadingIcon();const a={geometry:{type:"Point",coordinates:[e.coords.longitude,e.coords.latitude]}};this._handleMarker(a),this._fly(a),this._typeahead.clear(),this._typeahead.selected=!0,this.lastSelected=JSON.stringify(a),this._showClearButton(),this.fresh=!1;const d={limit:1,language:[this.options.language],query:a.geometry.coordinates,types:["address"]};if(this.options.localGeocoderOnly){const m=a.geometry.coordinates[0]+","+a.geometry.coordinates[1];this._setInputValue(m),this._eventEmitter.emit("result",{result:a})}else this.geocoderService.reverseGeocode(d).send().then((function(m){const b=m.body.features[0];if(b){const _=f.transformFeatureToGeolocationText(b,this.options.addressAccuracy);this._setInputValue(_),b.user_coordinates=a.geometry.coordinates,this._eventEmitter.emit("result",{result:b})}else this._eventEmitter.emit("result",{result:{user_coordinates:a.geometry.coordinates}})}).bind(this))}).bind(this)).catch((function(e){e.code===1?this._renderUserDeniedGeolocationError():this._renderLocationError(),this._hideLoadingIcon(),this._showGeolocateButton(),this._hideAttribution()}).bind(this))},createIcon:function(e,a){var d=document.createElementNS("http://www.w3.org/2000/svg","svg");return d.setAttribute("class","mapboxgl-ctrl-geocoder--icon mapboxgl-ctrl-geocoder--icon-"+e),d.setAttribute("viewBox","0 0 18 18"),d.setAttribute("xml:space","preserve"),d.setAttribute("width",18),d.setAttribute("height",18),d.innerHTML=a,d},onRemove:function(){return this.container.parentNode.removeChild(this.container),this.options.trackProximity&&this._map&&this._map.off("moveend",this._updateProximity),this._removeMarker(),this._map=null,this},_setInputValue:function(e){this._inputEl.value=e,setTimeout((function(){this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0)}).bind(this),1)},_onPaste:function(e){var a=(e.clipboardData||window.clipboardData).getData("text");a.length>=this.options.minLength&&this._geocode(a)},_onKeyDown:function(e){var a=27,d=9;if(e.keyCode===a&&this.options.clearAndBlurOnEsc)return this._clear(e),this._inputEl.blur();var m=e.target&&e.target.shadowRoot?e.target.shadowRoot.activeElement:e.target,b=m?m.value:"";if(!b)return this.fresh=!0,e.keyCode!==d&&this.clear(e),this._showGeolocateButton(),this._hideClearButton();this._hideGeolocateButton(),!(e.metaKey||[d,a,37,39,13,38,40].indexOf(e.keyCode)!==-1)&&m.value.length>=this.options.minLength&&this._geocode(m.value)},_showButton:function(){this._typeahead.selected&&this._showClearButton()},_hideButton:function(){this._typeahead.selected&&this._hideClearButton()},_showClearButton:function(){this._clearEl.style.display="block"},_hideClearButton:function(){this._clearEl.style.display="none"},_showGeolocateButton:function(){this._geolocateEl&&this.geolocation.isSupport()&&(this._geolocateEl.style.display="block")},_hideGeolocateButton:function(){this._geolocateEl&&(this._geolocateEl.style.display="none")},_showLoadingIcon:function(){this._loadingEl.style.display="block"},_hideLoadingIcon:function(){this._loadingEl.style.display="none"},_showAttribution:function(){this._footerNode.style.display="block"},_hideAttribution:function(){this._footerNode.style.display="none"},_onBlur:function(e){this.options.clearOnBlur&&this._clearOnBlur(e),this.options.collapsed&&this._collapse()},_onChange:function(){var e=this._typeahead.selected;e&&JSON.stringify(e)!==this.lastSelected&&(this._hideClearButton(),this.options.flyTo&&this._fly(e),this.options.marker&&this._mapboxgl&&this._handleMarker(e),this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0),this.lastSelected=JSON.stringify(e),this._eventEmitter.emit("result",{result:e}),this.eventManager.select(e,this))},_fly:function(e){var a;if(e.properties&&t[e.properties.short_code])a=r({},this.options.flyTo),this._map&&this._map.fitBounds(t[e.properties.short_code].bbox,a);else if(e.bbox){var d=e.bbox;a=r({},this.options.flyTo),this._map&&this._map.fitBounds([[d[0],d[1]],[d[2],d[3]]],a)}else{var m={zoom:this.options.zoom};a=r({},m,this.options.flyTo),e.center?a.center=e.center:e.geometry&&e.geometry.type&&e.geometry.type==="Point"&&e.geometry.coordinates&&(a.center=e.geometry.coordinates),this._map&&this._map.flyTo(a)}},_requestType:function(e,a){var d;return e.localGeocoderOnly?d=y.LOCAL:e.reverseGeocode&&f.REVERSE_GEOCODE_COORD_RGX.test(a)?d=y.REVERSE:d=y.FORWARD,d},_setupConfig:function(e,a){const d=["bbox","limit","proximity","countries","types","language","reverseMode","mode","autocomplete","fuzzyMatch","routing","worldview"],m=/[\s,]+/;var b=this,_=d.reduce(function(x,w){if(b.options[w]===void 0||b.options[w]===null)return x;["countries","types","language"].indexOf(w)>-1?x[w]=b.options[w].split(m):x[w]=b.options[w];const q=typeof b.options[w].longitude=="number"&&typeof b.options[w].latitude=="number";if(w==="proximity"&&q){const A=b.options[w].longitude,L=b.options[w].latitude;
3x[w]=[A,L]}return x},{});switch(e){case y.REVERSE:{var R=a.split(m).map(function(x){return parseFloat(x,10)});b.options.flipCoordinates||R.reverse(),_.types&&_.types[0],_=r(_,{query:R,limit:1}),["proximity","autocomplete","fuzzyMatch","bbox"].forEach(function(x){x in _&&delete _[x]})}break;case y.FORWARD:{const x=a.trim();/^(-?\d{1,3}(\.\d{0,256})?)[, ]+(-?\d{1,3}(\.\d{0,256})?)?$/.test(x)&&(a=a.replace(/,/g," ")),_=r(_,{query:a})}break}return _.session_token=this.eventManager.getSessionId(),_},_geocode:function(e){this.inputString=e,this._showLoadingIcon(),this._eventEmitter.emit("loading",{query:e});const a=this._requestType(this.options,e),d=this._setupConfig(a,e);var m;switch(a){case y.LOCAL:m=Promise.resolve();break;case y.FORWARD:m=this.geocoderService.forwardGeocode(d).send();break;case y.REVERSE:m=this.geocoderService.reverseGeocode(d).send();break}var b=this.options.localGeocoder?this.options.localGeocoder(e)||[]:[],_=[],R=null;return m.catch((function(x){R=x}).bind(this)).then((function(x){this._hideLoadingIcon();var w={};return x?x.statusCode=="200"&&(w=x.body,w.request=x.request,w.headers=x.headers,this._headers=x.headers):w={type:"FeatureCollection",features:[]},w.config=d,this.fresh&&(this.eventManager.start(this),this.fresh=!1),w.features&&w.features.length&&w.features.map(function(q){q._source="mapbox"}),w.features=w.features?b.concat(w.features):b,this.options.externalGeocoder?(_=this.options.externalGeocoder(e,w.features)||Promise.resolve([]),_.then(function(q){return w.features=w.features?q.concat(w.features):q,w},function(){return w})):w}).bind(this)).then((function(x){if(R)throw R;this.options.filter&&x.features.length&&(x.features=x.features.filter(this.options.filter)),x.features.length?(this._showClearButton(),this._hideGeolocateButton(),this._showAttribution(),this._eventEmitter.emit("results",x),this._typeahead.update(x.features)):(this._hideClearButton(),this._hideAttribution(),this._typeahead.selected=null,this._renderNoResults(),this._eventEmitter.emit("results",x))}).bind(this)).catch((function(x){this._hideLoadingIcon(),this._hideAttribution(),b.length&&this.options.localGeocoder||_.length&&this.options.externalGeocoder?(this._showClearButton(),this._hideGeolocateButton(),this._typeahead.update(b)):(this._hideClearButton(),this._typeahead.selected=null,this._renderError()),this._eventEmitter.emit("results",{features:b}),this._eventEmitter.emit("error",{error:x})}).bind(this)),m},_clear:function(e){e&&e.preventDefault(),this._inputEl.value="",this._typeahead.selected=null,this._typeahead.clear(),this.eventManager.sessionIncrementer++,this._onChange(),this._hideClearButton(),this._showGeolocateButton(),this._removeMarker(),this.lastSelected=null,this._eventEmitter.emit("clear"),this.fresh=!0},clear:function(e){this._clear(e),this._inputEl.focus(),this.options.useBrowserFocus&&this._typeahead.list.hide()},_clearOnBlur:function(e){var a=this;e.relatedTarget&&a._clear(e)},_onQueryResult:function(e){var a=e.body;if(a.features.length){var d=a.features[0];this._typeahead.selected=d,this._inputEl.value=d.place_name,this._onChange()}},_updateProximity:function(){if(!(!this._map||!this.options.trackProximity))if(this._map.getZoom()>9){var e=this._map.getCenter().wrap();this.setProximity({longitude:e.lng,latitude:e.lat},!1)}else this.setProximity(null,!1)},_collapse:function(){!this._inputEl.value&&this._inputEl!==document.activeElement&&this.container.classList.add("mapboxgl-ctrl-geocoder--collapsed")},_unCollapse:function(){this.container.classList.remove("mapboxgl-ctrl-geocoder--collapsed")},query:function(e){return this._geocode(e).then(this._onQueryResult),this},_renderError:function(){var e="<div class='mapbox-gl-geocoder--error'>There was an error reaching the server</div>";this._renderMessage(e)},_renderLocationError:function(){var e="<div class='mapbox-gl-geocoder--error'>A location error has occurred</div>";this._renderMessage(e)},_renderNoResults:function(){var e="<div class='mapbox-gl-geocoder--error mapbox-gl-geocoder--no-results'>No results found</div>";this._renderMessage(e)},_renderUserDeniedGeolocationError:function(){var e="<div class='mapbox-gl-geocoder--error'>Geolocation permission denied</div>";this._renderMessage(e)},_renderMessage:function(e){this._typeahead.update([]),this._typeahead.selected=null,this._typeahead.clear(),this._typeahead.renderError(e)},_getPlaceholderText:function(){if(this.options.placeholder)return this.options.placeholder;if(this.options.language){var e=this.options.language.split(",")[0],a=l.language(e),d=i.placeholder[a];if(d)return d}return"Search"},setInput:function(e,a){return a===void 0&&(a=!1),this._inputEl.value=e,this._typeahead.selected=null,this._typeahead.clear(),e.length>=this.options.minLength&&(a?this._geocode(e):this._onChange()),this},setProximity:function(e,a=!0){return this.options.proximity=e,a&&(this.options.trackProximity=!1),this},getProximity:function(){return this.options.proximity},setRenderFunction:function(e){return e&&typeof e=="function"&&(this._typeahead.render=e),this},getRenderFunction:function(){return this._typeahead.render},setLanguage:function(e){var a=navigator.language||navigator.userLanguage||navigator.browserLanguage;return this.options.language=e||this.options.language||a,this},getLanguage:function(){return this.options.language},getZoom:function(){return this.options.zoom},setZoom:function(e){return this.options.zoom=e,this},getFlyTo:function(){return this.options.flyTo},setFlyTo:function(e){return this.options.flyTo=e,this},getPlaceholder:function(){return this.options.placeholder},setPlaceholder:function(e){return this.options.placeholder=e||this._getPlaceholderText(),this._inputEl.placeholder=this.options.placeholder,this._inputEl.setAttribute("aria-label",this.options.placeholder),this},getBbox:function(){return this.options.bbox},setBbox:function(e){return this.options.bbox=e,this},getCountries:function(){return this.options.countries},setCountries:function(e){return this.options.countries=e,this},getTypes:function(){return this.options.types},setTypes:function(e){return this.options.types=e,this},getMinLength:function(){return this.options.minLength},setMinLength:function(e){return this.options.minLength=e,this._typeahead&&(this._typeahead.options.minLength=e),this},getLimit:function(){return this.options.limit},setLimit:function(e){return this.options.limit=e,this._typeahead&&(this._typeahead.options.limit=e),this},getFilter:function(){return this.options.filter},setFilter:function(e){return this.options.filter=e,this},setOrigin:function(e){return this.options.origin=e,this.geocoderService=o(u({accessToken:this.options.accessToken,origin:this.options.origin})),this},getOrigin:function(){return this.options.origin},setAccessToken:function(e){return this.options.accessToken=e,this.geocoderService=o(u({accessToken:this.options.accessToken,origin:this.options.origin})),this},setAutocomplete:function(e){return this.options.autocomplete=e,this},getAutocomplete:function(){return this.options.autocomplete},setFuzzyMatch:function(e){return this.options.fuzzyMatch=e,this},getFuzzyMatch:function(){return this.options.fuzzyMatch},setRouting:function(e){return this.options.routing=e,this},getRouting:function(){return this.options.routing},setWorldview:function(e){return this.options.worldview=e,this},getWorldview:function(){return this.options.worldview},_handleMarker:function(e){if(this._map){this._removeMarker();var a={color:"#4668F2"},d=r({},a,this.options.marker);return this.mapMarker=new this._mapboxgl.Marker(d),e.center?this.mapMarker.setLngLat(e.center).addTo(this._map):e.geometry&&e.geometry.type&&e.geometry.type==="Point"&&e.geometry.coordinates&&this.mapMarker.setLngLat(e.geometry.coordinates).addTo(this._map),this}},_removeMarker:function(){this.mapMarker&&(this.mapMarker.remove(),this.mapMarker=null)},on:function(e,a){return this._eventEmitter.on(e,a),this},off:function(e,a){return this._eventEmitter.removeListener(e,a),this.eventManager.remove(),this}},xe=h,xe}var dt=ir();const sr=_t(dt),ur=Et({__proto__:null,default:sr},[dt]);export{ur as i};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.