/* Mapbox GL JS is licensed under the 3-Clause BSD License. Full text of license: github.com/mapbox/mapbox-gl-js/blob/v1.8.1/LICENSE.txt */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = global || self, global.mapboxgl = factory()); }(this, (function () { 'use strict';
/* eslint-disable */
var shared, worker, mapboxgl; // define gets called three times: one for each chunk. we rely on the order // they're imported to know which is which function define(_, chunk) { if (!shared) {
shared = chunk;
} else if (!worker) {
worker = chunk;
} else {
var workerBundleString = 'var sharedChunk = {}; (' + shared + ')(sharedChunk); (' + worker + ')(sharedChunk);' var sharedChunk = {}; shared(sharedChunk); mapboxgl = chunk(sharedChunk); mapboxgl.workerUrl = window.URL.createObjectURL(new Blob([workerBundleString], { type: 'text/javascript' }));
} }
define(,(function(t){“use strict”;function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r=n;function n(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=r,this.p2y=n;}n.prototype.sampleCurveX=function(t){return ((this.ax*t+this.bx)*t+this.cx)*t},n.prototype.sampleCurveY=function(t){return ((this.ay*t+this.by)*t+this.cy)*t},n.prototype.sampleCurveDerivativeX=function(t){return (3*this.ax*t+2*this.bx)*t+this.cx},n.prototype.solveCurveX=function(t,e){var r,n,i,a,o;for(void 0===e&&(e=1e-6),i=t,o=0;o<8;o++){if(a=this.sampleCurveX(i)-t,Math.abs(a) :void 0:t)||!t.equals(m)){g&&(v=g),h&&(d=h),h=t,g=m?m.sub(h)._unit()._perp():v;var b=(v=v||g).add(g);0===b.x&&0===b.y||b._unit();var _=v.x*g.x+v.y*g.y,w=b.x*g.x+b.y*g.y,A=0!==w?1/w:1/0,S=2*Math.sqrt(2-2*w),k=w<zs&&d&&m,I=v.x*g.y-v.y*g.x>0;if(k&&x>c){var z=h.dist(d);if(z>2*f){var C=h.sub(h.sub(d)._mult(f/z)._round());this.updateDistance(d,C),this.addCurrentVertex(C,v,0,0,y),d=C;}}var T=d&&m,E=T?r:l?“butt”:n;if(T&&“round”===E&&(A<a?E=“miter”:A<=2&&(E=“fakeround”)),“miter”===E&&A>i&&(E=“bevel”),“bevel”===E&&(A>2&&(E=“flipbevel”),A<i&&(E=“miter”)),d&&this.updateDistance(d,h),“miter”===E)b._mult(A),this.addCurrentVertex(h,b,0,0,y);else if(“flipbevel”===E){if(A>100)b=g.mult(-1);else{var M=A*v.add(g).mag()/v.sub(g).mag();b._perp()._mult(M*(I?-1:1));}this.addCurrentVertex(h,b,0,0,y),this.addCurrentVertex(h,b.mult(-1),0,0,y);}else if(“bevel”===E||“fakeround”===E){var B=-Math.sqrt(A*A-1),P=I?B:0,V=I?0:B;if(d&&this.addCurrentVertex(h,v,P,V,y),“fakeround”===E)for(var F=Math.round(180*S/Math.PI/20),L=1;L<F;L++){var D=L/F;if(.5!==D){var O=D-.5;D+=D*O*(D-1)*((1.0904+_*(_*(3.55645-1.43519*_)-3.2452))*O*O+(.848013+_*(.215638*_-1.06021)));}var R=g.sub(v)._mult(D)._add(v)._unit()._mult(I?-1:1);this.addHalfVertex(h,R.x,R.y,!1,I,0,y);}m&&this.addCurrentVertex(h,g,-P,-V,y);}else if(“butt”===E)this.addCurrentVertex(h,b,0,0,y);else if(“square”===E){var U=d?1:-1;this.addCurrentVertex(h,b,U,U,y);}else“round”===E&&(d&&(this.addCurrentVertex(h,v,0,0,y),this.addCurrentVertex(h,v,1,1,y,!0)),m&&(this.addCurrentVertex(h,g,-1,-1,y,!0),this.addCurrentVertex(h,g,0,0,y)));if(k&&x<p-1){var j=h.dist(m);if(j>2*f){var q=h.add(m.sub(h)._mult(f/j)._round());this.updateDistance(h,q),this.addCurrentVertex(q,g,0,0,y),h=q;}}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,o,s);}},Ts.prototype.addCurrentVertex=function(t,e,r,n,i,a){void 0===a&&(a=!1);var o=e.x+e.y*r,s=e.y-e.x*r,u=-e.x+e.y*n,l=-e.y-e.x*n;this.addHalfVertex(t,o,s,a,!1,r,i),this.addHalfVertex(t,u,l,a,!0,-n,i),this.distance>Cs/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,r,n,i,a));},Ts.prototype.addHalfVertex=function(t,e,r,n,i,a,o){var s=t.x,u=t.y,l=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(u<<1)+(i?1:0),Math.round(63*e)+128,Math.round(63*r)+128,1+(0===a?0:a<0?-1:1)|(63&l)<<2,l>>6);var p=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,p),o.primitiveLength++),i?this.e2=p:this.e1=p;},Ts.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)this.distance/this.totalDistance)(Cs-1):this.distance;},Ts.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance();},zn(“LineBucket”,Ts,{omit:});var Es=new yi({“line-cap”:new li(Bt.layout_line),“line-join”:new pi(Bt.layout_line),“line-miter-limit”:new li(Bt.layout_line),“line-round-limit”:new li(Bt.layout_line),“line-sort-key”:new pi(Bt.layout_line)}),Ms={paint:new yi({“line-opacity”:new pi(Bt.paint_line),“line-color”:new pi(Bt.paint_line),“line-translate”:new li(Bt.paint_line),“line-translate-anchor”:new li(Bt.paint_line),“line-width”:new pi(Bt.paint_line),“line-gap-width”:new pi(Bt.paint_line),“line-offset”:new pi(Bt.paint_line),“line-blur”:new pi(Bt.paint_line),“line-dasharray”:new hi(Bt.paint_line),“line-pattern”:new ci(Bt.paint_line),“line-gradient”:new fi(Bt.paint_line)}),layout:Es},Bs=new(function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(e,r){return r=new ti(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),t.prototype.possiblyEvaluate.call(this,e,r)},e.prototype.evaluate=function(e,r,n,i){return r=p({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,i)},e}(pi))(Ms.paint.properties.specification);Bs.useIntegerZoom=!0;var Ps=function(t){function e(e){t.call(this,e,Ms);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){“line-gradient”===t&&this._updateGradient();},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values.value.expression;this.gradient=yo(t,“lineProgress”),this.gradientTexture=null;},e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r),this.paint._values=Bs.possiblyEvaluate(this._transitioningPaint._values.value,e);},e.prototype.createBucket=function(t){return new Ts(t)},e.prototype.queryRadius=function(t){var e=t,r=Vs(Ja(“line-width”,this,e),Ja(“line-gap-width”,this,e)),n=Ja(“line-offset”,this,e);return r/2+Math.abs(n)+Ya(this.paint.get(“line-translate”))},e.prototype.queryIntersectsFeature=function(t,e,r,n,a,o,s){var u=Ha(t,this.paint.get(“line-translate”),this.paint.get(“line-translate-anchor”),o.angle,s),l=s/2*Vs(this.paint.get(“line-width”).evaluate(e,r),this.paint.get(“line-gap-width”).evaluate(e,r)),p=this.paint.get(“line-offset”).evaluate(e,r);return p&&(n=function(t,e){for(var r=[],n=new i(0,0),a=0;a<t.length;a++){for(var o=t,s=[],u=0;u<o.length;u++){var l=o,p=o,c=o,h=0===u?n:p.sub(l)._unit()._perp(),f=u===o.length-1?n:c.sub(p)._unit()._perp(),y=h._add(f)._unit(),d=y.x*f.x+y.y*f.y;y._mult(1/d),s.push(y._mult(e)._add(p));}r.push(s);}return r}(n,p*s)),function(t,e,r){for(var n=0;n<e.length;n++){var i=e;if(t.length>=3)for(var a=0;a define(,(function(e){“use strict”;function t(e){var r=typeof e;if(“number”===r||“boolean”===r||“string”===r||null==e)return JSON.stringify(e);if(Array.isArray(e)){for(var i=“[”,o=0,n=e;o define(,(function(t){“use strict”;var e=t.createCommonjsModule((function(t){function e(t){return !!(“undefined”!=typeof window&&“undefined”!=typeof document&&Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray&&Function.prototype&&Function.prototype.bind&&Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions&&“JSON”in window&&“parse”in JSON&&“stringify”in JSON&&function(){if(!(“Worker”in window&&“Blob”in window&&“URL”in window))return !1;var t,e,i=new Blob(,{type:“text/javascript”}),o=URL.createObjectURL(i);try{e=new Worker(o),t=!0;}catch(e){t=!1;}e&&e.terminate();return URL.revokeObjectURL(o),t}()&&“Uint8ClampedArray”in window&&ArrayBuffer.isView&&function(t){void 0===i&&(i=function(t){var i=document.createElement(“canvas”),o=Object.create(e.webGLContextAttributes);return o.failIfMajorPerformanceCaveat=t,i.probablySupportsContext?i.probablySupportsContext(“webgl”,o)||i.probablySupportsContext(“experimental-webgl”,o):i.supportsContext?i.supportsContext(“webgl”,o)||i.supportsContext(“experimental-webgl”,o):i.getContext(“webgl”,o)||i.getContext(“experimental-webgl”,o)}(t));return i}(t&&t.failIfMajorPerformanceCaveat))}t.exports?t.exports=e:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e);var i={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};})),i={create:function(e,i,o){var r=t.window.document.createElement(e);return void 0!==i&&(r.className=i),o&&o.appendChild®,r},createNS:function(e,i){return t.window.document.createElementNS(e,i)}},o=t.window.document.documentElement.style;function r(t){if(!o)return t;for(var e=0;e // return mapboxgl; }))); //# sourceMappingURL=mapbox-gl.js.map-[1e3]
-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function y(t){return !!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function d(t,e){t.forEach((function(t){e[t]&&(e[t]=e[t].bind(e));}));}function m(t,e){return -1!==t.indexOf(e,t.length-e.length)}function v(t,e,r){var n={};for(var i in t)n[i]=e.call(r||this,t[i],i,t);return n}function g(t,e,r){var n={};for(var i in t)e.call(r||this,t[i],i,t)&&(n[i]=t[i]);return n}function x(t){return Array.isArray(t)?t.map(x):“object”==typeof t&&t?v(t,x):t}var b={};function _(t){b[t]||(“undefined”!=typeof console&&console.warn(t),b[t]=!0);}function w(t,e,r){return (r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function A(t){for(var e=0,r=0,n=t.length,i=n-1,a=void 0,o=void 0;rr.authority
”.json“,r.params.push(”secure“),this._makeAPIURL(r,this._customAccessToken||e)},N.prototype.normalizeSpriteURL=function(t,e,r,n){var i=J(t);return K(t)?(i.path=”/styles/v1“i.path
”/sprite“+e+r,this._makeAPIURL(i,this._customAccessToken||n)):(i.path+=”“+e+r,Y(i))},N.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!K(t))return t;var r=J(t),n=L.devicePixelRatio>=2||512===e?”@2x“:”“,i=O.supported?”.webp“:”$1“;r.path=r.path.replace(/(.(png|jpg)d*)(?=$)/,”“+n+i),r.path=r.path.replace(/^.+/v4//,”/“),r.path=”/v4“+r.path;var a=this._customAccessToken||function(t){for(var e=0,r=t;ethis.message
” (“this.status
”): “+this.url},e}(Error),gt=S()?function(){return self.worker&&self.worker.referrer}:function(){return (”blob:“===self.location.protocol?self.parent:self).location.href};function xt(t,e){var r,n=new self.AbortController,i=new self.Request(t.url,{method:t.method||”GET“,body:t.body,credentials:t.credentials,headers:t.headers,referrer:gt(),signal:n.signal}),a=!1,o=!1,s=(r=i.url).indexOf(”sku=“)>0&&Z®;”json“===t.type&&i.headers.set(”Accept“,”application/json“);var u=function(r,n,a){if(!o){if(r&&”SecurityError“!==r.message&&_®,n&&a)return l(n);var u=Date.now();self.fetch(i).then((function®{if(r.ok){var n=s?r.clone():null;return l(r,n,u)}return e(new vt(r.statusText,r.status,t.url))})).catch((function(t){20!==t.code&&e(new Error(t.message));}));}},l=function(r,n,s){(”arrayBuffer“===t.type?r.arrayBuffer():”json“===t.type?r.json():r.text()).then((function(t){o||(n&&s&&pt(i,n,s),a=!0,e(null,t,r.headers.get(”Cache-Control“),r.headers.get(”Expires“)));})).catch((function(t){o||e(new Error(t.message));}));};return s?ht(i,u):u(null,null),{cancel:function(){o=!0,a||n.abort();}}}var bt=function(t,e){if(r=t.url,!(/^file:/.test®||/^file:/.test(gt())&&!/^w+:/.test®)){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty(”signal“))return xt(t,e);if(S()&&self.worker&&self.worker.actor){return self.worker.actor.send(”getResource“,t,e,void 0,!0)}}var r;return function(t,e){var r=new self.XMLHttpRequest;for(var n in r.open(t.method||”GET“,t.url,!0),”arrayBuffer“===t.type&&(r.responseType=”arraybuffer“),t.headers)r.setRequestHeader(n,t.headers[n]);return ”json“===t.type&&(r.responseType=”text“,r.setRequestHeader(”Accept“,”application/json“)),r.withCredentials=”include“===t.credentials,r.onerror=function(){e(new Error(r.statusText));},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if("json"===t.type)try{n=JSON.parse(r.response);}catch(t){return e(t)}e(null,n,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"));}else e(new vt(r.statusText,r.status,t.url));},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},_t=function(t,e){return bt(p(t,{type:"arrayBuffer"}),e)},wt=function(t,e){return bt(p(t,{method:"POST"}),e)};var At,St,kt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";At=[],St=0;var It=function(t,e){if(O.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,/”),St>=D.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0;}};return At.push®,r}St++;var n=!1,i=function(){if(!n)for(n=!0,St–;At.length&&Stt.N
”>“:”value“===t.itemType.kind?”array“:”array<"e
“>”}return t.kind}var Wt=[Ut,jt,qt,Nt,Kt,Jt,Xt,Ht(Zt),Yt];function Qt(t,e){if(“error”===e.kind)return null;if(“array”===t.kind){if(“array”===e.kind&&(0===e.N&&“value”===e.itemType.kind||!Qt(t.itemType,e.itemType))&&(“number”!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if(“value”===t.kind)for(var r=0,n=Wt;ri
“)”},ee.prototype.toArray=function(){var t=this.r,e=this.g,r=this.b,n=this.a;return 0===n?[0,0,0,0]:[255*t/n,255*e/n,255*r/n,n]},ee.black=new ee(0,0,0,1),ee.white=new ee(1,1,1,1),ee.transparent=new ee(0,0,0,0),ee.red=new ee(1,0,0,1);var re=function(t,e,r){this.sensitivity=t?e?“variant”:“case”:e?“accent”:“base”,this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:“search”});};re.prototype.compare=function(t,e){return this.collator.compare(t,e)},re.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var ne=function(t,e,r,n,i){this.text=t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i;},ie=function(t){this.sections=t;};ie.fromString=function(t){return new ie([new ne(t,null,null,null,null)])},ie.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},ie.factory=function(t){return t instanceof ie?t:ie.fromString(t)},ie.prototype.toString=function(){return 0===this.sections.length?“”:this.sections.map((function(t){return t.text})).join(“”)},ie.prototype.serialize=function(){for(var t=[“format”],e=0,r=this.sections;ey.length
” instead.“);else{for(var b=0;br
‘“. Make sure ”’r
‘“ has been bound in an enclosing ”let“ expression before using it.’,1)},Se.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},Se.prototype.eachChild=function(){},Se.prototype.possibleOutputs=function(){return [void 0]},Se.prototype.serialize=function(){return [”var“,this.name]};var ke=function(t,e,r,n,i){void 0===e&&(e=[]),void 0===n&&(n=new Rt),void 0===i&&(i=[]),this.registry=t,this.path=e,this.key=e.map((function(t){return ”[“t
”]“})).join(”“),this.scope=n,this.errors=i,this.expectedType=r;};function Ie(t,e){for(var r,n,i=t.length-1,a=0,o=i,s=0;a<=o;)if(r=t[s=Math.floor((a+o)/2)],n=t[s+1],r<=e){if(s===i||en
‘“. If you wanted a literal array, use [”literal“, […]].’,0)}return void 0===t?this.error(”‘undefined’ value invalid. Use null instead.“):”object“==typeof t?this.error(‘Bare objects invalid. Use [”literal“, {…}] instead.’):this.error(”Expected an array, but found “+typeof t+” instead.“)},ke.prototype.concat=function(t,e,r){var n=”number“==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat®:this.scope;return new ke(this.registry,n,e||null,i,this.errors)},ke.prototype.error=function(t){for(var e=[],r=arguments.length-1;r– >0;)e[r]=arguments[r+1];var n=”“+this.key+e.map((function(t){return ”[“t
”]“})).join(”“);this.errors.push(new Ot(n,t));},ke.prototype.checkSubtype=function(t,e){var r=Qt(t,e);return r&&this.error®,r};var ze=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;ne
“ > ”+(r.length-1)+“.”);if(e!==Math.floor(e))throw new pe(“Array index must be an integer, but found ”e
“ instead.”);return r[e]},Qe.prototype.eachChild=function(t){t(this.index),t(this.input);},Qe.prototype.possibleOutputs=function(){return [void 0]},Qe.prototype.serialize=function(){return [“at”,this.index.serialize(),this.input.serialize()]};var tr=function(t,e){this.type=Nt,this.needle=t,this.haystack=e;};tr.parse=function(t,e){if(3!==t.length)return e.error(“Expected 2 arguments, but found ”+(t.length-1)+“ instead.”);var r,n=e.parse(t[1],1,Zt),i=e.parse(t[2],2,Zt);return n&&i?“boolean”!==(r=n.type).kind&&“string”!==r.kind&&“number”!==r.kind&&“null”!==r.kind&&“value”!==r.kind?e.error(“Expected first argument to be of type boolean, string, number or null, but found ”+$t(n.type)+“ instead”):new tr(n,i):null},tr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!e||!r)return !1;if(!function(t){return “boolean”==typeof t||“string”==typeof t||“number”==typeof t}(e))throw new pe(“Expected first argument to be of type boolean, string or number, but found ”+$t(se(e))+“ instead.”);if(!function(t){return Array.isArray(t)||“string”==typeof t}®)throw new pe(“Expected second argument to be of type array or string, but found ”+$t(se®)+“ instead.”);return r.indexOf(e)>=0},tr.prototype.eachChild=function(t){t(this.needle),t(this.haystack);},tr.prototype.possibleOutputs=function(){return [!0,!1]},tr.prototype.serialize=function(){return [“in”,this.needle.serialize(),this.haystack.serialize()]};var er=function(t,e,r,n,i,a){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=a;};er.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var r,n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var i={},a=[],o=2;oNumber.MAX_SAFE_INTEGER
“.”);if(“number”==typeof h&&Math.floor(h)!==h)return l.error(“Numeric branch labels must be integer values.”);if®{if(l.checkSubtype(r,se(h)))return null}else r=se(h);if(void 0!==i[String(h)])return l.error(“Branch labels must be unique.”);i[String(h)]=a.length;}var f=e.parse(u,o,n);if(!f)return null;n=n||f.type,a.push(f);}var y=e.parse(t[1],1,Zt);if(!y)return null;var d=e.parse(t[t.length-1],t.length-1,n);return d?“value”!==y.type.kind&&e.concat(1).checkSubtype(r,y.type)?null:new er(r,n,y,i,a,d):null},er.prototype.evaluate=function(t){var e=this.input.evaluate(t);return (se(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},er.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise);},er.prototype.possibleOutputs=function(){var t;return (t=[]).concat.apply(t,this.outputs.map((function(t){return t.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},er.prototype.serialize=function(){for(var t=this,e=[“match”,this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();ir
”" comparisons are not supported for type ‘“+$t(o.type)+”’.“);if(a.type.kind!==o.type.kind&&”value“!==a.type.kind&&”value“!==o.type.kind)return e.error(”Cannot compare types ‘“+$t(a.type)+”’ and ‘“+$t(o.type)+”’.“);n&&(”value“===a.type.kind&&”value“!==o.type.kind?a=new he(o.type,[a]):”value“!==a.type.kind&&”value“===o.type.kind&&(o=new he(a.type,[o])));var s=null;if(4===t.length){if(”string“!==a.type.kind&&”string“!==o.type.kind&&”value“!==a.type.kind&&”value“!==o.type.kind)return e.error(”Cannot use collator to compare non-string types.“);if(!(s=e.parse(t[3],3,Gt)))return null}return new i(a,o,s)},i.prototype.evaluate=function(i){var a=this.lhs.evaluate(i),o=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){var s=se(a),u=se(o);if(s.kind!==u.kind||”string“!==s.kind&&”number“!==s.kind)throw new pe(‘Expected arguments for ”’t
‘“ to be (string, string) or (number, number), but found (’s.kind
”, “u.kind
”) instead.“)}if(this.collator&&!n&&this.hasUntypedArgument){var l=se(a),p=se(o);if(”string“!==l.kind||”string“!==p.kind)return e(i,a,o)}return this.collator?r(i,a,o,this.collator.evaluate(i)):e(i,a,o)},i.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator);},i.prototype.possibleOutputs=function(){return [!0,!1]},i.prototype.serialize=function(){var e=[t];return this.eachChild((function(t){e.push(t.serialize());})),e},i}()}rr.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!=0)return e.error("Expected an odd number of arguments.");var r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var n=[],i=1;il
’“‘));continue}h=cn;}s=s.concat(h({key:(e?e+”.“:e)+l,value:r[l],valueSpec:c,style:a,styleSpec:o,object:r,objectKey:l},r));}for(var f in n)i[f]||n[f].required&&void 0===n[f].default&&void 0===r[f]&&s.push(new Pt(e,r,’missing required property ”‘f
’“‘));return s}function Ur(t){var e=t.value,r=t.valueSpec,n=t.style,i=t.styleSpec,a=t.key,o=t.arrayElementValidator||cn;if(”array“!==Sr(e))return [new Pt(a,e,”array expected, “+Sr(e)+” found“)];if(r.length&&e.length!==r.length)return [new Pt(a,e,”array length “r.length
” expected, length “e.length
” found“)];if(r[”min-length“]&&e.lengthi
” found“)]:”minimum“in n&&ra.length
” found“)];if(l){if(”object“!==Sr(a[0]))return [new Pt(s,a,”object expected, “+Sr(a[0])+” found“)];if(void 0===a[0].zoom)return [new Pt(s,a,”object stop key must have zoom“)];if(void 0===a[0].value)return [new Pt(s,a,”object stop key must have value“)];if(n&&n>Lt(a[0].zoom))return [new Pt(s,a[0].zoom,”stop zoom values must appear in ascending order“)];Lt(a[0].zoom)!==n&&(n=Lt(a[0].zoom),r=void 0,o={}),e=e.concat(Rr({key:s+”[0]“,value:a[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:jr,value:h}}));}else e=e.concat(h({key:s+”[0]“,value:a[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},a));return Pr(Dt(a[1]))?e.concat([new Pt(s+”[1]“,a[1],”expressions are not allowed in function stops.“)]):e.concat(cn({key:s+”[1]“,value:a[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function h(t,n){var s=Sr(t.value),u=Lt(t.value),l=null!==t.value?t.value:n;if(e){if(s!==e)return [new Pt(t.key,l,s+” stop domain type must match previous stop domain type “+e)]}else e=s;if(”number“!==s&&”string“!==s&&”boolean“!==s)return [new Pt(t.key,l,”stop domain value must be a number, string, or boolean“)];if(”number“!==s&&”categorical“!==a){var p=”number expected, “s
” found“;return _r(i)&&void 0===a&&(p+=‘nIf you intended to use a categorical function, specify `”type“: ”categorical“`.’),[new Pt(t.key,l,p)]}return ”categorical“!==a||”number“!==s||isFinite(u)&&Math.floor(u)===u?”categorical“!==a&&”number“===s&&void 0!==r&&ur[0]
’“‘));case”==“:case”!=“:3!==r.length&&o.push(new Pt(n,r,’filter array for operator ”‘r[0]
’“ must have 3 elements’));case”in“:case”!in“:r.length>=2&&”string“!==(a=Sr(r[1]))&&o.push(new Pt(n+”[1]“,r[1],”string expected, “a
” found“));for(var s=2;ss
”]“,r[s],”string, number, or boolean expected, “a
” found“));break;case”any“:case”all“:case”none“:for(var u=1;ur[0]
‘“ operator must have 2 elements’)):”string“!==a&&o.push(new Pt(n+”[1]“,r[1],”string expected, “a
” found“));}return o}(t)}function en(t,e){var r=t.key,n=t.style,i=t.styleSpec,a=t.value,o=t.objectKey,s=i[e+”_“+t.layerType];if(!s)return [];var u=o.match(/^(.*)-transition$/);if(”paint“===e&&u&&s[u[1]]&&s[u[1]].transition)return cn({key:r,value:a,valueSpec:i.transition,style:n,styleSpec:i});var l,p=t.valueSpec||s[o];if(!p)return [new Pt(r,a,‘unknown property ”’o
‘“’)];if(”string“===Sr(a)&&_r(p)&&!p.tokens&&(l=/^{([^}]+)}$/.exec(a)))return [new Pt(r,a,‘”’o
‘“ does not support interpolation syntaxnUse an identity property function instead: `{ ”type“: ”identity“, ”property“: ’+JSON.stringify(l[1])+” }`.“)];var c=[];return ”symbol“===t.layerType&&(”text-field“===o&&n&&!n.glyphs&&c.push(new Pt(r,a,‘use of ”text-field“ requires a style ”glyphs“ property’)),”text-font“===o&&kr(Dt(a))&&”identity“===Lt(a.type)&&c.push(new Pt(r,a,‘”text-font“ does not support identity functions’))),c.concat(cn({key:t.key,value:a,valueSpec:p,style:n,styleSpec:i,expressionContext:”property“,propertyType:e,propertyKey:o}))}function rn(t){return en(t,”paint“)}function nn(t){return en(t,”layout“)}function an(t){var e=[],r=t.value,n=t.key,i=t.style,a=t.styleSpec;r.type||r.ref||e.push(new Pt(n,r,‘either ”type“ or ”ref“ is required’));var o,s=Lt(r.type),u=Lt(r.ref);if(r.id)for(var l=Lt(r.id),p=0;pt
’” is prohibited for ref layers’));})),i.layers.forEach((function(t){Lt(t.id)===u&&(o=t);})),o?o.ref?e.push(new Pt(n,r.ref,“ref cannot reference another ref layer”)):s=Lt(o.type):e.push(new Pt(n,r.ref,‘ref layer “’u
‘” not found’));else if(“background”!==s)if(r.source){var h=i.sources&&i.sources[r.source],f=h&&Lt(h.type);h?“vector”===f&&“raster”===s?e.push(new Pt(n,r.source,‘layer “’r.id
‘” requires a raster source’)):“raster”===f&&“raster”!==s?e.push(new Pt(n,r.source,‘layer “’r.id
‘” requires a vector source’)):“vector”!==f||r[“source-layer”]?“raster-dem”===f&&“hillshade”!==s?e.push(new Pt(n,r.source,“raster-dem source can only be used with layer type ‘hillshade’.”)):“line”!==s||!r.paint||!r.paint[“line-gradient”]||“geojson”===f&&h.lineMetrics||e.push(new Pt(n,r,‘layer “’r.id
‘” specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.’)):e.push(new Pt(n,r,‘layer “’r.id
‘” must specify a “source-layer”’)):e.push(new Pt(n,r.source,‘source “’r.source
‘” not found’));}else e.push(new Pt(n,r,‘missing required property “source”’));return e=e.concat(Rr({key:n,value:r,valueSpec:a.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{“*”:function(){return []},type:function(){return cn({key:n+“.type”,value:r.type,valueSpec:a.layer.type,style:t.style,styleSpec:t.styleSpec,object:r,objectKey:“type”})},filter:tn,layout:function(t){return Rr({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{“*”:function(t){return nn(Ft({layerType:s},t))}}})},paint:function(t){return Rr({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{“*”:function(t){return rn(Ft({layerType:s},t))}}})}}}))}function on(t){var e=t.value,r=t.key,n=Sr(e);return “string”!==n?[new Pt(r,e,“string expected, ”n
“ found”)]:[]}var sn={promoteId:function(t){var e=t.key,r=t.value;if(“string”===Sr®)return on({key:e,value:r});var n=[];for(var i in r)n.push.apply(n,on({key:e+“.”+i,value:r[i]}));return n}};function un(t){var e=t.value,r=t.key,n=t.styleSpec,i=t.style;if(!e.type)return [new Pt(r,e,‘“type” is required’)];var a,o=Lt(e.type);switch(o){case“vector”:case“raster”:case“raster-dem”:return a=Rr({key:r,value:e,valueSpec:n[“source_”+o.replace(“-”,“_”)],style:t.style,styleSpec:n,objectElementValidators:sn});case“geojson”:if(a=Rr({key:r,value:e,valueSpec:n.source_geojson,style:i,styleSpec:n,objectElementValidators:sn}),e.cluster)for(var s in e.clusterProperties){var u=e.clusterProperties[s],l=u[0],p=u[1],c=“string”==typeof l?[l,[“accumulated”],[“get”,s]]:l;a.push.apply(a,Nr({key:r+“.”s
“.map”,value:p,expressionContext:“cluster-map”})),a.push.apply(a,Nr({key:r+“.”s
“.reduce”,value:c,expressionContext:“cluster-reduce”}));}return a;case“video”:return Rr({key:r,value:e,valueSpec:n.source_video,style:i,styleSpec:n});case“image”:return Rr({key:r,value:e,valueSpec:n.source_image,style:i,styleSpec:n});case“canvas”:return [new Pt(r,null,“Please use runtime APIs to add canvas sources, rather than including them in stylesheets.”,“source.canvas”)];default:return Kr({key:r+“.type”,value:e.type,valueSpec:{values:[“vector”,“raster”,“raster-dem”,“geojson”,“video”,“image”]},style:i,styleSpec:n})}}function ln(t){var e=t.value,r=t.styleSpec,n=r.light,i=t.style,a=[],o=Sr(e);if(void 0===e)return a;if(“object”!==o)return a=a.concat([new Pt(“light”,e,“object expected, ”o
“ found”)]);for(var s in e){var u=s.match(/^(.*)-transition$/);a=u&&n[u[1]]&&n[u[1]].transition?a.concat(cn({key:s,value:e[s],valueSpec:r.transition,style:i,styleSpec:r})):n[s]?a.concat(cn({key:s,value:e[s],valueSpec:n[s],style:i,styleSpec:r})):a.concat([new Pt(s,e[s],‘unknown property “’s
‘”’)]);}return a}var pn={“*”:function(){return []},array:Ur,boolean:function(t){var e=t.value,r=t.key,n=Sr(e);return “boolean”!==n?[new Pt(r,e,“boolean expected, ”n
“ found”)]:[]},number:jr,color:function(t){var e=t.key,r=t.value,n=Sr®;return “string”!==n?[new Pt(e,r,“color expected, ”n
“ found”)]:null===te®?[new Pt(e,r,‘color expected, “’r
‘” found’)]:[]},constants:Vt,enum:Kr,filter:tn,function:qr,layer:an,object:Rr,source:un,light:ln,string:on,formatted:function(t){return 0===on(t).length?[]:Nr(t)},resolvedImage:function(t){return 0===on(t).length?[]:Nr(t)}};function cn(t){var e=t.value,r=t.valueSpec,n=t.styleSpec;return r.expression&&kr(Lt(e))?qr(t):r.expression&&Pr(Dt(e))?Nr(t):r.type&&pn[r.type]?pn[r.type](t):Rr(Ft({},t,{valueSpec:r.type?n[r.type]:r}))}function hn(t){var e=t.value,r=t.key,n=on(t);return n.length?n:(-1===e.indexOf(“{fontstack}”)&&n.push(new Pt(r,e,‘“glyphs” url must include a “{fontstack}” token’)),-1===e.indexOf(“{range}”)&&n.push(new Pt(r,e,‘“glyphs” url must include a “{range}” token’)),n)}function fn(t,e){void 0===e&&(e=Bt);var r=[];return r=r.concat(cn({key:“”,value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:hn,“*”:function(){return []}}})),t.constants&&(r=r.concat(Vt({key:“constants”,value:t.constants,style:t,styleSpec:e}))),yn®}function yn(t){return [].concat(t).sort((function(t,e){return t.line-e.line}))}function dn(t){return function(){for(var e=[],r=arguments.length;r–;)e[r]=arguments[r];return yn(t.apply(this,e))}}fn.source=dn(un),fn.light=dn(ln),fn.layer=dn(an),fn.filter=dn(tn),fn.paintProperty=dn(rn),fn.layoutProperty=dn(nn);var mn=fn,vn=mn.light,gn=mn.paintProperty,xn=mn.layoutProperty;function bn(t,e){var r=!1;if(e&&e.length)for(var n=0,i=e;nthis.id
“.layout.”+t;if(this._validate(xn,n,t,e,r))return}“visibility”!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e;},e.prototype.getPaintProperty=function(t){return m(t,“-transition”)?this._transitionablePaint.getTransition(t.slice(0,-“-transition”.length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n=“layers.”this.id
“.paint.”+t;if(this._validate(gn,n,t,e,r))return !1}if(m(t,“-transition”))return this._transitionablePaint.setTransition(t.slice(0,-“-transition”.length),e||void 0),!1;var i=this._transitionablePaint._values[t],a=“cross-faded-data-driven”===i.property.specification[“property-type”],o=i.value.isDataDriven(),s=i.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var u=this._transitionablePaint._values[t].value;return u.isDataDriven()||o||a||this._handleOverridablePaintPropertyUpdate(t,s,u)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype._handleOverridablePaintPropertyUpdate=function(t,e,r){return !1},e.prototype.isHidden=function(t){return !!(this.minzoom&&tea.MAX_VERTEX_ARRAY_LENGTH
“: bucket requested ”+t),(!i||i.vertexLength+t>ea.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},ea.prototype.get=function(){return this.segments},ea.prototype.destroy=function(){for(var t=0,e=this.segments;t>1,p=-7,c=r?i-1:0,h=r?-1:1,f=t;for(c+=h,a=f&(1<<-p)-1,f>>=-p,p+=s;p>0;a=256*a+t,c+=h,p-=8);for(o=a&(1<<-p)-1,a>>=-p,p+=n;p>0;o=256*o+t,c+=h,p-=8);if(0===a)a=1-l;else{if(a===u)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,n),a-=l;}return (f?-1:1)*o*Math.pow(2,a-n)},Ks=function(t,e,r,n,i,a){var o,s,u,l=8*a-i-1,p=(1<ul
'. Reduce your “text-size”.‘):“composite”===m.kind&&((v=[Fu*y.compositeTextSizes.evaluate(s,{}),Fu*y.compositeTextSizes.evaluate(s,{})])[0]>ll||v>ll)&&_(t.layerIds+': Value for “text-size” is >= 'ul
'. Reduce your “text-size”.'),t.addSymbols(t.text,d,v,u,o,s,p,e,l.lineStartIndex,l.lineLength,f);for(var g=0,x=c;g<x.length;g+=1){h[x]=t.text.placedSymbolArray.length-1;}return 4*d.length}function cl(t){for(var e in t)return t;return null}function hl(t,e,r,n){var i=t.compareText;if(e in i){for(var a=i,o=a.length-1;o>=0;o–)if(n.dist(a)<r)return !0}else i=[];return i.push(n),!1}var fl=ys.VectorTileFeature.types,yl=;function dl(t,e,r,n,i,a,o,s,u,l,p,c,h){var f=s?Math.min(ll,Math.round(s)):0,y=s?Math.min(ll,Math.round(s)):0;t.emplaceBack(e,r,Math.round(32*n),Math.round(32*i),a,o,(f<<1)+(u?1:0),y,16*l,16*p,256*c,256*h);}function ml(t,e,r){t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r);}function vl(t){for(var e=0,r=t.sections;e<r.length;e+=1){if(jn(r.text))return !0}return !1}var gl=function(t){this.layoutVertexArray=new Ii,this.indexArray=new Di,this.programConfigurations=t,this.segments=new ea,this.dynamicLayoutVertexArray=new zi,this.opacityVertexArray=new Ci,this.placedSymbolArray=new Xi;};gl.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length},gl.prototype.upload=function(t,e,r,n){this.isEmpty()||(r&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Fs.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,Ls.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,yl,!0),this.opacityVertexBuffer.itemSize=1),(r||n)&&this.programConfigurations.upload(t));},gl.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy());},zn(“SymbolBuffers”,gl);var xl=function(t,e,r){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new r,this.segments=new ea,this.collisionVertexArray=new Mi;};xl.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,Ds.members,!0);},xl.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy());},zn(“CollisionBuffers”,xl);var bl=function(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[];var e=this.layers._unevaluatedLayout._values;this.textSizeData=Lu(this.zoom,e),this.iconSizeData=Lu(this.zoom,e);var r=this.layers.layout,n=r.get(“symbol-sort-key”),i=r.get(“symbol-z-order”);this.sortFeaturesByKey=“viewport-y”!==i&&void 0!==n.constantOr(1);var a=“viewport-y”===i||“auto”===i&&!this.sortFeaturesByKey;this.sortFeaturesByY=a&&(r.get(“text-allow-overlap”)||r.get(“icon-allow-overlap”)||r.get(“text-ignore-placement”)||r.get(“icon-ignore-placement”)),“point”===r.get(“symbol-placement”)&&(this.writingModes=r.get(“text-writing-mode”).map((function(t){return xu}))),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id})),this.sourceID=t.sourceID;};bl.prototype.createArrays=function(){this.text=new gl(new Ca(Fs.members,this.layers,this.zoom,(function(t){return /^text/.test(t)}))),this.icon=new gl(new Ca(Fs.members,this.layers,this.zoom,(function(t){return /^icon/.test(t)}))),this.glyphOffsetArray=new Yi,this.lineVertexArray=new $i,this.symbolInstances=new Gi;},bl.prototype.calculateGlyphDependencies=function(t,e,r,n,i){for(var a=0;an.x
“:”+n.y}for(var l=0;l<t.length;l++){var p=t,c=p.geometry,h=p.text?p.text.toString():null;if(h){var f=u(h,c),y=u(h,c,!0);if(f in r&&y in e&&r!==e){var d=s(f,y,c),m=o(f,y,n.geometry);delete e,delete r,r[u(h,n.geometry,!0)]=m,n.geometry=null;}else f in r?o(f,y,c):y in e?s(f,y,c):(a(l),e=i-1,r=i-1);}else a(l);}return n.filter((function(t){return t.geometry}))}(this.features)),this.sortFeaturesByKey&&this.features.sort((function(t,e){return t.sortKey-e.sortKey}));}},bl.prototype.update=function(t,e,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,r),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,r));},bl.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},bl.prototype.uploadPending=function(){return !this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},bl.prototype.upload=function(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t),this.textCollisionCircle.upload(t),this.iconCollisionCircle.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0;},bl.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy(),this.textCollisionCircle.destroy(),this.iconCollisionCircle.destroy();},bl.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData();},bl.prototype.addToLineVertexArray=function(t,e){var r=this.lineVertexArray.length;if(void 0!==t.segment){for(var n=t.dist(e),i=t.dist(e),a={},o=t.segment+1;ot
“, ”e
“)”);if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error(“Invalid LngLat latitude value: must be between -90 and 90”)};jl.prototype.wrap=function(){return new jl(l(this.lng,-180,180),this.lat)},jl.prototype.toArray=function(){return [this.lng,this.lat]},jl.prototype.toString=function(){return “LngLat(”this.lng
“, ”this.lat
“)”},jl.prototype.distanceTo=function(t){var e=Math.PI/180,r=this.lat*e,n=t.lat*e,i=Math.sin®*Math.sin(n)+Math.cos®*Math.cos(n)*Math.cos((t.lng-this.lng)*e);return 6371008.8*Math.acos(Math.min(i,1))},jl.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new Ul(new jl(this.lng-r,this.lat-e),new jl(this.lng+r,this.lat+e))},jl.convert=function(t){if(t instanceof jl)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new jl(Number(t),Number(t));if(!Array.isArray(t)&&“object”==typeof t&&null!==t)return new jl(Number(“lng”in t?t.lng:t.lon),Number(t.lat));throw new Error(“`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]”)};var ql=2*Math.PI*6371008.8;function Nl(t){return ql*Math.cos(t*Math.PI/180)}function Kl(t){return (180+t)/360}function Xl(t){return (180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Zl(t,e){return t/Nl(e)}function Gl(t){var e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}var Jl=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r;};Jl.fromLngLat=function(t,e){void 0===e&&(e=0);var r=jl.convert(t);return new Jl(Kl(r.lng),Xl(r.lat),Zl(e,r.lat))},Jl.prototype.toLngLat=function(){return new jl(360*this.x-180,Gl(this.y))},Jl.prototype.toAltitude=function(){return t=this.z,e=this.y,t*Nl(Gl(e));var t,e;},Jl.prototype.meterInMercatorCoordinateUnits=function(){return 1/ql*(t=Gl(this.y),1/Math.cos(t*Math.PI/180));var t;};var Yl=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=Wl(0,t,t,e,r);};Yl.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Yl.prototype.url=function(t,e){var r,n,i,a,o,s=(r=this.x,n=this.y,i=this.z,a=Rl(256*r,256*(n=Math.pow(2,i)-n-1),i),o=Rl(256*(r+1),256*(n+1),i),a+“,”a[1]
“,”o[0]
“,”+o),u=function(t,e,r){for(var n,i=“”,a=t;a>0;a–)i+=(e&(n=1<<a-1)?1:0)+(r&n?2:0);return i}(this.z,this.x,this.y);return t.replace(“{prefix}”,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(“{z}”,String(this.z)).replace(“{x}”,String(this.x)).replace(“{y}”,String(“tms”===e?Math.pow(2,this.z)-this.y-1:this.y)).replace(“{quadkey}”,u).replace(“{bbox-epsg-3857}”,s)},Yl.prototype.getTilePoint=function(t){var e=Math.pow(2,this.z);return new i((t.x*e-this.x)*Ma,(t.y*e-this.y)*Ma)},Yl.prototype.toString=function(){return this.z+“/”this.x
“/”+this.y};var Hl=function(t,e){this.wrap=t,this.canonical=e,this.key=Wl(t,e.z,e.z,e.x,e.y);},$l=function(t,e,r,n,i){this.overscaledZ=t,this.wrap=e,this.canonical=new Yl(r,+n,+i),this.key=Wl(e,t,r,n,i);};function Wl(t,e,r,n,i){(t*=2)<0&&(t=-1*t-1);var a=1<<r;return (a*a*t+a*i+n).toString(36)+r.toString(36)+e.toString(36)}$l.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)},$l.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t>this.canonical.z?new $l(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new $l(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},$l.prototype.calculateScaledKey=function(t,e){var r=this.canonical.z-t;return t>this.canonical.z?Wl(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):Wl(this.wrap*+e,t,t,this.canonical.x>>r,this.canonical.y>>r)},$l.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return !1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e},$l.prototype.children=function(t){if(this.overscaledZ>=t)return [new $l(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return [new $l(e,this.wrap,e,r,n),new $l(e,this.wrap,e,r+1,n),new $l(e,this.wrap,e,r,n+1),new $l(e,this.wrap,e,r+1,n+1)]},$l.prototype.isLessThan=function(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))},$l.prototype.wrapped=function(){return new $l(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},$l.prototype.unwrapTo=function(t){return new $l(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},$l.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},$l.prototype.toUnwrapped=function(){return new Hl(this.wrap,this.canonical)},$l.prototype.toString=function(){return this.overscaledZ+“/”this.canonical.x
“/”+this.canonical.y},$l.prototype.getTilePoint=function(t){return this.canonical.getTilePoint(new Jl(t.x-this.wrap,t.y))},zn(“CanonicalTileID”,Yl),zn(“OverscaledTileID”,$l,{omit:});var Ql=function(t,e,r){if(this.uid=t,e.height!==e.width)throw new RangeError(“DEM tiles must be square”);if(r&&“mapbox”!==r&&“terrarium”!==r)return _('“'r
'” is not a valid encoding type. Valid types include “mapbox” and “terrarium”.');this.stride=e.height;var n=this.dim=e.height-2;this.data=new Uint32Array(e.data.buffer),this.encoding=r||“mapbox”;for(var i=0;iul
'. Reduce your “icon-size”.’):“composite”===Z.kind&&((G=[Fu*w.compositeIconSizes.evaluate(b,{}),Fu*w.compositeIconSizes.evaluate(b,{})])[0]>ll||G>ll)&&_(t.layerIds+': Value for “icon-size” is >= 'ul
'. Reduce your “icon-size”.'),t.addSymbols(t.icon,K,G,x,g,b,!1,e,T.lineStartIndex,T.lineLength,-1),V=t.icon.placedSymbolArray.length-1,X&&(M=4*X.length,t.addSymbols(t.icon,X,G,x,g,b,xu.vertical,e,T.lineStartIndex,T.lineLength,-1),F=t.icon.placedSymbolArray.length-1);}for(var J in n.horizontal){var Y=n.horizontal;if(!k){D=aa(Y.text);var H=s.layout.get(“text-rotate”).evaluate(b,{});k=new Wu(u,r,e,l,p,c,Y,h,f,y,t.overscaling,H);}var $=1===Y.positionedLines.length;if(B+=pl(t,e,Y,a,s,y,b,d,T,n.vertical?xu.horizontal:xu.horizontalOnly,$?Object.keys(n.horizontal):,L,V,w),$)break}n.vertical&&(P+=pl(t,e,n.vertical,a,s,y,b,d,T,xu.vertical,,L,F,w));var W=k?k.boxStartIndex:t.collisionBoxArray.length,Q=k?k.boxEndIndex:t.collisionBoxArray.length,tt=z?z.boxStartIndex:t.collisionBoxArray.length,et=z?z.boxEndIndex:t.collisionBoxArray.length,rt=I?I.boxStartIndex:t.collisionBoxArray.length,nt=I?I.boxEndIndex:t.collisionBoxArray.length,it=C?C.boxStartIndex:t.collisionBoxArray.length,at=C?C.boxEndIndex:t.collisionBoxArray.length;t.glyphOffsetArray.length>=bl.MAX_GLYPHS&&_(“Too many glyphs being rendered in a tile. See github.com/mapbox/mapbox-gl-js/issues/2907”);void 0!==b.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey);t.symbolInstances.emplaceBack(e.x,e.y,L.right>=0?L.right:-1,L.center>=0?L.center:-1,L.left>=0?L.left:-1,L.vertical||-1,V,F,D,W,Q,tt,et,rt,nt,it,at,l,B,P,E,M,0,h,O,R);}(t,s,i,r,n,a,h,t.layers,t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,v,w,k,l,x,A,I,y,e,o,p);};if(“line”===z)for(var M=0,B=function(t,e,r,n,a){for(var o=[],s=0;s<t.length;s++)for(var u=t,l=void 0,p=0;p<u.length-1;p++){var c=u,h=u;c.x<e&&h.x<e||(c.x<e?c=new i(e,c.y+(h.y-c.y)*((e-c.x)/(h.x-c.x)))._round():h.x<e&&(h=new i(e,c.y+(h.y-c.y)*((e-c.x)/(h.x-c.x)))._round()),c.y<r&&h.y<r||(c.y<r?c=new i(c.x+(h.x-c.x)*((r-c.y)/(h.y-c.y)),r)._round():h.y<r&&(h=new i(c.x+(h.x-c.x)*((r-c.y)/(h.y-c.y)),r)._round()),c.x>=n&&h.x>=n||(c.x>=n?c=new i(n,c.y+(h.y-c.y)*((n-c.x)/(h.x-c.x)))._round():h.x>=n&&(h=new i(n,c.y+(h.y-c.y)*((n-c.x)/(h.x-c.x)))._round()),c.y>=a&&h.y>=a||(c.y>=a?c=new i(c.x+(h.x-c.x)*((a-c.y)/(h.y-c.y)),a)._round():h.y>=a&&(h=new i(c.x+(h.x-c.x)*((a-c.y)/(h.y-c.y)),a)._round()),l&&c.equals(l)||(l=,o.push(l)),l.push(h)))));}return o}(e.geometry,0,0,Ma,Ma);M<B.length;M+=1)for(var P=B,V=Xu(P,b,S,r.vertical||d,n,24,g,t.overscaling,Ma),F=0,L=V;F<L.length;F+=1){var D=L,O=d;O&&hl(t,O.text,C,D)||E(P,D);}else if(“line-center”===z)for(var R=0,U=e.geometry;R<U.length;R+=1){var j=U;if(j.length>1){var q=Ku(j,S,r.vertical||d,n,24,g);q&&E(j,q);}}else if(“Polygon”===e.type)for(var N=0,K=$o(e.geometry,0);N<K.length;N+=1){var X=K,Z=el(X,16);E(X,new Vu(Z.x,Z.y,0));}else if(“LineString”===e.type)for(var G=0,J=e.geometry;G<J.length;G+=1){var Y=J;E(Y,new Vu(Y.x,Y.y,0));}else if(“Point”===e.type)for(var H=0,$=e.geometry;H<$.length;H+=1)for(var W=$,Q=0,tt=W;Q<tt.length;Q+=1){var et=tt;E(,new Vu(et.x,et.y,0));}}(t,o,f,R,n,p,c,h,d,U);},A=0,S=t.features;A<S.length;A+=1)w();o&&t.generateCollisionDebugBuffers();},t.perspective=function(t,e,r,n,i){var a,o=1/Math.tan(e/2);return t=o/r,t=0,t=0,t=0,t=0,t=o,t=0,t=0,t=0,t=0,t=-1,t=0,t=0,t=0,null!=i&&i!==1/0?(a=1/(n-i),t=(i+n)*a,t=2*i*n*a):(t=-1,t=-2*n),t},t.pick=function(t,e){for(var r={},n=0;n<e.length;n++){var i=e;i in t&&(r=t);}return r},t.plugin=Qn,t.polygonIntersectsPolygon=Da,t.postMapLoadEvent=it,t.postTurnstileEvent=rt,t.potpack=yu,t.refProperties=,t.register=zn,t.registerForPluginStateChange=function(t){return t({pluginStatus:Zn,pluginURL:Gn}),Hn.on(“pluginStateChange”,t),t},t.rotate=function(t,e,r){var n=e,i=e,a=e,o=e,s=Math.sin®,u=Math.cos®;return t=n*u+a*s,t=i*u+o*s,t=n*-s+a*u,t=i*-s+o*u,t},t.rotateX=function(t,e,r){var n=Math.sin®,i=Math.cos®,a=e,o=e,s=e,u=e,l=e,p=e,c=e,h=e;return e!==t&&(t=e,t=e,t=e,t=e,t=e,t=e,t=e,t=e),t=a*i+l*n,t=o*i+p*n,t=s*i+c*n,t=u*i+h*n,t=l*i-a*n,t=p*i-o*n,t=c*i-s*n,t=h*i-u*n,t},t.rotateZ=function(t,e,r){var n=Math.sin®,i=Math.cos®,a=e,o=e,s=e,u=e,l=e,p=e,c=e,h=e;return e!==t&&(t=e,t=e,t=e,t=e,t=e,t=e,t=e,t=e),t=a*i+l*n,t=o*i+p*n,t=s*i+c*n,t=u*i+h*n,t=l*i-a*n,t=p*i-o*n,t=c*i-s*n,t=h*i-u*n,t},t.scale=function(t,e,r){var n=r,i=r,a=r;return t=e*n,t=e*n,t=e*n,t=e*n,t=e*i,t=e*i,t=e*i,t=e*i,t=e*a,t=e*a,t=e*a,t=e*a,t=e,t=e,t=e,t=e,t},t.scale$1=function(t,e,r){return t=e*r,t=e*r,t=e*r,t=e*r,t},t.scale$2=function(t,e,r){return t=e*r,t=e*r,t=e*r,t},t.setCacheLimits=function(t,e){ot=t,st=e;},t.setRTLTextPlugin=function(t,e,r){if(void 0===r&&(r=!1),Zn===qn||Zn===Nn||Zn===Kn)throw new Error(“setRTLTextPlugin cannot be called multiple times.”);Gn=L.resolveURL(t),Zn=qn,Xn=e,Yn(),r||Wn();},t.sphericalToCartesian=function(t){var e=t,r=t,n=t;return r+=90,r*=Math.PI/180,n*=Math.PI/180,{x:e*Math.cos®*Math.sin(n),y:e*Math.sin®*Math.sin(n),z:e*Math.cos(n)}},t.sqrLen=io,t.styleSpec=Bt,t.sub=ro,t.symbolSize=Ru,t.transformMat3=function(t,e,r){var n=e,i=e,a=e;return t=n*r+i*r+a*r,t=n*r+i*r+a*r,t=n*r+i*r+a*r,t},t.transformMat4=no,t.translate=function(t,e,r){var n,i,a,o,s,u,l,p,c,h,f,y,d=r,m=r,v=r;return e===t?(t=e*d+e*m+e*v+e,t=e*d+e*m+e*v+e,t=e*d+e*m+e*v+e,t=e*d+e*m+e*v+e):(n=e,i=e,a=e,o=e,s=e,u=e,l=e,p=e,c=e,h=e,f=e,y=e,t=n,t=i,t=a,t=o,t=s,t=u,t=l,t=p,t=c,t=h,t=f,t=y,t=n*d+s*m+c*v+e,t=i*d+u*m+h*v+e,t=a*d+l*m+f*v+e,t=o*d+p*m+y*v+e),t},t.triggerPluginCompletionEvent=Jn,t.uniqueId=h,t.validateCustomStyleLayer=function(t){var e=[],r=t.id;return void 0===r&&e.push({message:“layers.”r
': missing required property “id”'}),void 0===t.render&&e.push({message:“layers.”r
': missing required method “render”'}),t.renderingMode&&“2d”!==t.renderingMode&&“3d”!==t.renderingMode&&e.push({message:“layers.”r
': property “renderingMode” must be either “2d” or “3d”'}),e},t.validateLight=vn,t.validateStyle=mn,t.values=function(t){var e=[];for(var r in t)e.push(t);return e},t.vectorTile=ys,t.version=“1.8.1”,t.warnOnce=_,t.webpSupported=O,t.window=self,t.wrap=l;}));this.source
'” layer “'y
'” does not use vector tile spec v2 and therefore may have some rendering errors.');for(var w=u.encode(y),S=[],M=0;M<x.length;M++){var I=x.feature(M),b=h.getId(I,y);S.push({feature:I,id:b,index:M,sourceLayerIndex:w});}for(var P=0,_=v;P<_.length;P+=1){var k=_,T=k;if(!(T.minzoom&&this.zoome.length
“ points”;r&&console.time(a),this.points=e;for(var s=[],l=0;li.source
“' is not a valid GeoJSON object.”));m(a,!0);try{t._geoJSONIndex=i.cluster?new W(function(t){var r=t.superclusterOptions,i=t.clusterProperties;if(!i||!r)return r;for(var o={},n={},a={accumulated:null,zoom:0},s={properties:null},l=Object.keys(i),u=0,h=l;u<h.length;u+=1){var c=h,p=i,f=p,d=p,g=e.createExpression(d),m=e.createExpression(“string”==typeof f?[f,,[“get”,c]]:f);o=g.value,n=m.value;}return r.map=function(e){s.properties=e;for(var t={},r=0,i=l;r<i.length;r+=1){var n=i;t=o.evaluate(a,s);}return t},r.reduce=function(e,t){s.properties=t;for(var r=0,i=l;r<i.length;r+=1){var o=i;a.accumulated=e,e=n.evaluate(a,s);}},r}(i)).load(a.features):function(e,t){return new ke(e,t)}(a,i.geojsonVtOptions);}catch(n){return r(n)}t.loaded={};var s={};if(o){var l=o.finish();l&&(s.resourceTiming={},s.resourceTiming=JSON.parse(JSON.stringify(l)));}r(null,s);}));}},r.prototype.coalesce=function(){“Coalescing”===this._state?this._state=“Idle”:“NeedsLoadData”===this._state&&(this._state=“Coalescing”,this._loadData());},r.prototype.reloadTile=function(e,r){var i=this.loaded,o=e.uid;return i&&i?t.prototype.reloadTile.call(this,e,r):this.loadTile(e,r)},r.prototype.loadGeoJSON=function(t,r){if(t.request)e.getJSON(t.request,r);else{if(“string”!=typeof t.data)return r(new Error(“Input data given to '”t.source
“' is not a valid GeoJSON object.”));try{return r(null,JSON.parse(t.data))}catch(e){return r(new Error(“Input data given to '”t.source
“' is not a valid GeoJSON object.”))}}},r.prototype.removeSource=function(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),t();},r.prototype.getClusterExpansionZoom=function(e,t){try{t(null,this._geoJSONIndex.getClusterExpansionZoom(e.clusterId));}catch(e){t(e);}},r.prototype.getClusterChildren=function(e,t){try{t(null,this._geoJSONIndex.getChildren(e.clusterId));}catch(e){t(e);}},r.prototype.getClusterLeaves=function(e,t){try{t(null,this._geoJSONIndex.getLeaves(e.clusterId,e.limit,e.offset));}catch(e){t(e);}},r}(l);var Le=function(t){var r=this;this.self=t,this.actor=new e.Actor(t,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:l,geojson:De},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(e,t){if(r.workerSourceTypes)throw new Error('Worker source with name “'e
'” already registered.‘);r.workerSourceTypes=t;},this.self.registerRTLTextPlugin=function(t){if(e.plugin.isParsed())throw new Error(“RTL text plugin already registered.”);e.plugin.applyArabicShaping=t.applyArabicShaping,e.plugin.processBidirectionalText=t.processBidirectionalText,e.plugin.processStyledBidirectionalText=t.processStyledBidirectionalText;};};return Le.prototype.setReferrer=function(e,t){this.referrer=t;},Le.prototype.setImages=function(e,t,r){this.availableImages=t,r();},Le.prototype.setLayers=function(e,t,r){this.getLayerIndex(e).replace(t),r();},Le.prototype.updateLayers=function(e,t,r){this.getLayerIndex(e).update(t.layers,t.removedIds),r();},Le.prototype.loadTile=function(e,t,r){this.getWorkerSource(e,t.type,t.source).loadTile(t,r);},Le.prototype.loadDEMTile=function(e,t,r){this.getDEMWorkerSource(e,t.source).loadTile(t,r);},Le.prototype.reloadTile=function(e,t,r){this.getWorkerSource(e,t.type,t.source).reloadTile(t,r);},Le.prototype.abortTile=function(e,t,r){this.getWorkerSource(e,t.type,t.source).abortTile(t,r);},Le.prototype.removeTile=function(e,t,r){this.getWorkerSource(e,t.type,t.source).removeTile(t,r);},Le.prototype.removeDEMTile=function(e,t){this.getDEMWorkerSource(e,t.source).removeTile(t);},Le.prototype.removeSource=function(e,t,r){if(this.workerSources&&this.workerSources[t.type]&&this.workerSources[t.type]){var i=this.workerSources[t.type];delete this.workerSources[t.type],void 0!==i.removeSource?i.removeSource(t,r):r();}},Le.prototype.loadWorkerSource=function(e,t,r){try{this.self.importScripts(t.url),r();}catch(e){r(e.toString());}},Le.prototype.syncRTLPluginState=function(t,r,i){try{e.plugin.setState®;var o=e.plugin.getPluginURL();if(e.plugin.isLoaded()&&!e.plugin.isParsed()&&null!=o){this.self.importScripts(o);var n=e.plugin.isParsed();i(n?void 0:new Error(“RTL Text Plugin failed to import scripts from ”+o),n);}}catch(e){i(e.toString());}},Le.prototype.getAvailableImages=function(e){var t=this.availableImages;return t||(t=[]),t},Le.prototype.getLayerIndex=function(e){var t=this.layerIndexes;return t||(t=this.layerIndexes=new i),t},Le.prototype.getWorkerSource=function(e,t,r){var i=this;if(this.workerSources||(this.workerSources={}),this.workerSources[t]||(this.workerSources[t]={}),!this.workerSources[t]){var o={send:function(t,r,o){i.actor.send(t,r,o,e);}};this.workerSources[t]=new this.workerSourceTypes(o,this.getLayerIndex(e),this.getAvailableImages(e));}return this.workerSources[t]},Le.prototype.getDEMWorkerSource=function(e,t){return this.demWorkerSources||(this.demWorkerSources={}),this.demWorkerSources[t]||(this.demWorkerSources[t]=new h),this.demWorkerSources[t]},Le.prototype.enforceCacheSizeLimit=function(t,r){e.enforceCacheSizeLimit®;},“undefined”!=typeof WorkerGlobalScope&&void 0!==e.window&&e.window instanceof WorkerGlobalScope&&(e.window.worker=new Le(e.window)),Le}));e
'” has invalid “stretchX” value'))),o=!1),this._validateStretch(i.stretchY,i.data&&i.data.height)||(this.fire(new t.ErrorEvent(new Error('Image “'e
'” has invalid “stretchY” value'))),o=!1),this._validateContent(i.content,i)||(this.fire(new t.ErrorEvent(new Error('Image “'e
'” has invalid “content” value'))),o=!1),o},i.prototype._validateStretch=function(t,e){if(!t)return !0;for(var i=0,o=0,r=t;o<r.length;o+=1){var a=r;if(a<i||a<a||e)return !1;i=a;}return !0},i.prototype._validateContent=function(t,e){return !t||4===t.length&&(!(t<0||e.data.widthn
'” could not be loaded. Please make sure you have added the image with map.addImage() or a “sprite” property in your style. You can provide missing images by listening for the “styleimagemissing” map event.');}i(null,o);},i.prototype.getPixelSize=function(){var t=this.atlasImage;return {width:t.width,height:t.height}},i.prototype.getPattern=function(e){var i=this.patterns,o=this.getImage(e);if(!o)return null;if(i&&i.position.version===o.version)return i.position;if(i)i.position.version=o.version;else{var r={w:o.data.width+2,h:o.data.height+2,x:0,y:0},a=new t.ImagePosition(r,o);this.patterns={bin:r,position:a};}return this._updatePatternAtlas(),this.patterns.position},i.prototype.bind=function(e){var i=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.Texture(e,this.atlasImage,i.RGBA),this.atlasTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE);},i.prototype._updatePatternAtlas=function(){var e=[];for(var i in this.patterns)e.push(this.patterns.bin);var o=t.potpack(e),r=o.w,a=o.h,n=this.atlasImage;for(var s in n.resize({width:r||1,height:a||1}),this.patterns){var l=this.patterns.bin,c=l.x+1,u=l.y+1,h=this.images.data,p=h.width,d=h.height;t.RGBAImage.copy(h,n,{x:0,y:0},{x:c,y:u},{width:p,height:d}),t.RGBAImage.copy(h,n,{x:0,y:d-1},{x:c,y:u-1},{width:p,height:1}),t.RGBAImage.copy(h,n,{x:0,y:0},{x:c,y:u+d},{width:p,height:1}),t.RGBAImage.copy(h,n,{x:p-1,y:0},{x:c-1,y:u},{width:1,height:d}),t.RGBAImage.copy(h,n,{x:0,y:0},{x:c+p,y:u},{width:1,height:d});}this.dirty=!0;},i.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={};},i.prototype.dispatchRenderCallbacks=function(t){for(var e=0,i=t;e<i.length;e+=1){var o=i;if(!this.callbackDispatchedThisFrame){this.callbackDispatchedThisFrame=!0;var r=this.images;h®&&this.updateImage(o,r);}}},i}(t.Evented);var d=m,_=m,f=1e20;function m(t,e,i,o,r,a){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=o||.25,this.fontFamily=r||“sans-serif”,this.fontWeight=a||“normal”,this.radius=i||8;var n=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement(“canvas”),this.canvas.width=this.canvas.height=n,this.ctx=this.canvas.getContext(“2d”),this.ctx.font=this.fontWeight+“ ”this.fontSize
“px ”+this.fontFamily,this.ctx.textBaseline=“middle”,this.ctx.fillStyle=“black”,this.gridOuter=new Float64Array(n*n),this.gridInner=new Float64Array(n*n),this.f=new Float64Array(n),this.d=new Float64Array(n),this.z=new Float64Array(n+1),this.v=new Int16Array(n),this.middle=Math.round(n/2*(navigator.userAgent.indexOf(“Gecko/”)>=0?1.2:1));}function g(t,e,i,o,r,a,n){for(var s=0;s<e;s++){for(var l=0;l=t;for(v(o,r,a,n,i),l=0;l=r;}for(l=0;l<i;l++){for(s=0;se
“ instead of ”+a.id);return t.bindAll(,a),a};function O(e,i){var o=t.identity([]);return t.translate(o,o,),t.scale(o,o,),t.multiply(o,o,e.calculatePosMatrix(i.toUnwrapped()))}function F(t,e,i,o,r){var a=function(t,e,i){if(t)for(var o=0,r=t;o<r.length;o+=1){var a=e[r];if(a&&a.source===i&&“fill-extrusion”===a.type)return !0}else for(var n in e){var s=e;if(s.source===i&&“fill-extrusion”===s.type)return !0}return !1}(o&&o.layers,e,t.id),n=r.maxPitchScaleFactor(),s=t.tilesIn(i,n,a);s.sort(U);for(var l=[],c=0,u=s;c<u.length;c+=1){var h=u;l.push({wrappedTileID:h.tileID.wrapped().key,queryResults:h.tile.queryRenderedFeatures(e,t._state,h.queryGeometry,h.cameraQueryGeometry,h.scale,o,r,n,O(t.transform,h.tileID))});}var p=function(t){for(var e={},i={},o=0,r=t;o<r.length;o+=1){var a=r,n=a.queryResults,s=a.wrappedTileID,l=i=i||{};for(var c in n)for(var u=n,h=l=l||{},p=e=e||[],d=0,_=u;d<_.length;d+=1){var f=_;h||(h=!0,p.push(f));}}return e}(l);for(var d in p)p.forEach((function(e){var i=e.feature,o=t.getFeatureState(i.layer,i.id);i.source=i.layer.source,i.layer&&(i.sourceLayer=i.layer),i.state=o;}));return p}function U(t,e){var i=t.tileID,o=e.tileID;return i.overscaledZ-o.overscaledZ||i.canonical.y-o.canonical.y||i.wrap-o.wrap||i.canonical.x-o.canonical.x}var N=function(t,e){this.max=t,this.onRemove=e,this.reset();};N.prototype.reset=function(){for(var t in this.data)for(var e=0,i=this.data;e<i.length;e+=1){var o=i;o.timeout&&clearTimeout(o.timeout),this.onRemove(o.value);}return this.data={},this.order=[],this},N.prototype.add=function(t,e,i){var o=this,r=t.wrapped().key;void 0===this.data&&(this.data=[]);var a={value:e,timeout:void 0};if(void 0!==i&&(a.timeout=setTimeout((function(){o.remove(t,a);}),i)),this.data.push(a),this.order.push®,this.order.length>this.max){var n=this._getAndRemoveByKey(this.order);n&&this.onRemove(n);}return this},N.prototype.has=function(t){return t.wrapped().key in this.data},N.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},N.prototype._getAndRemoveByKey=function(t){var e=this.data.shift();return e.timeout&&clearTimeout(e.timeout),0===this.data.length&&delete this.data,this.order.splice(this.order.indexOf(t),1),e.value},N.prototype.getByKey=function(t){var e=this.data;return e?e.value:null},N.prototype.get=function(t){return this.has(t)?this.data[0].value:null},N.prototype.remove=function(t,e){if(!this.has(t))return this;var i=t.wrapped().key,o=void 0===e?0:this.data.indexOf(e),r=this.data[o];return this.data.splice(o,1),r.timeout&&clearTimeout(r.timeout),0===this.data.length&&delete this.data,this.onRemove(r.value),this.order.splice(this.order.indexOf(i),1),this},N.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order);e&&this.onRemove(e);}return this},N.prototype.filter=function(t){var e=[];for(var i in this.data)for(var o=0,r=this.data;o<r.length;o+=1){var a=r;t(a.value)||e.push(a);}for(var n=0,s=e;n<s.length;n+=1){var l=s;this.remove(l.value.tileID,l);}};var Z=function(t,e,i){this.context=t;var o=t.gl;this.buffer=o.createBuffer(),this.dynamicDraw=Boolean(i),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),o.bufferData(o.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?o.DYNAMIC_DRAW:o.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer;};Z.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer);},Z.prototype.updateData=function(t){var e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer);},Z.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer);};var q={Int8:“BYTE”,Uint8:“UNSIGNED_BYTE”,Int16:“SHORT”,Uint16:“UNSIGNED_SHORT”,Int32:“INT”,Uint32:“UNSIGNED_INT”,Float32:“FLOAT”},j=function(t,e,i,o){this.length=e.length,this.attributes=i,this.itemSize=e.bytesPerElement,this.dynamicDraw=o,this.context=t;var r=t.gl;this.buffer=r.createBuffer(),t.bindVertexBuffer.set(this.buffer),r.bufferData(r.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer;};j.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer);},j.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer);},j.prototype.enableAttributes=function(t,e){for(var i=0;i<this.attributes.length;i++){var o=this.attributes,r=e.attributes;void 0!==r&&t.enableVertexAttribArray®;}},j.prototype.setVertexAttribPointers=function(t,e,i){for(var o=0;o<this.attributes.length;o++){var r=this.attributes,a=e.attributes;void 0!==a&&t.vertexAttribPointer(a,r.components,t[q],!1,this.itemSize,r.offset+this.itemSize*(i||0));}},j.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer);};var V=function(t){this.gl=t.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1;};V.prototype.get=function(){return this.current},V.prototype.set=function(t){},V.prototype.getDefault=function(){return this.default},V.prototype.setDefault=function(){this.set(this.default);};var G=function(e){function i(){e.apply(this,arguments);}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.getDefault=function(){return t.Color.transparent},i.prototype.set=function(t){var e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1);},i}(V),W=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 1},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.clearDepth(t),this.current=t,this.dirty=!1);},e}(V),X=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.clearStencil(t),this.current=t,this.dirty=!1);},e}(V),H=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return [!0,!0,!0,!0]},e.prototype.set=function(t){var e=this.current;(t!==e||t!==e||t!==e||t!==e||this.dirty)&&(this.gl.colorMask(t,t,t,t),this.current=t,this.dirty=!1);},e}(V),K=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return !0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.depthMask(t),this.current=t,this.dirty=!1);},e}(V),Y=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 255},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.stencilMask(t),this.current=t,this.dirty=!1);},e}(V),J=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return {func:this.gl.ALWAYS,ref:0,mask:255}},e.prototype.set=function(t){var e=this.current;(t.func!==e.func||t.ref!==e.ref||t.mask!==e.mask||this.dirty)&&(this.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t,this.dirty=!1);},e}(V),Q=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){var t=this.gl;return [t.KEEP,t.KEEP,t.KEEP]},e.prototype.set=function(t){var e=this.current;(t!==e||t!==e||t!==e||this.dirty)&&(this.gl.stencilOp(t,t,t),this.current=t,this.dirty=!1);},e}(V),$=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return !1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t,this.dirty=!1;}},e}(V),tt=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return [0,1]},e.prototype.set=function(t){var e=this.current;(t!==e||t!==e||this.dirty)&&(this.gl.depthRange(t,t),this.current=t,this.dirty=!1);},e}(V),et=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return !1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t,this.dirty=!1;}},e}(V),it=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.LESS},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.depthFunc(t),this.current=t,this.dirty=!1);},e}(V),ot=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return !1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t,this.dirty=!1;}},e}(V),rt=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){var t=this.gl;return [t.ONE,t.ZERO]},e.prototype.set=function(t){var e=this.current;(t!==e||t!==e||this.dirty)&&(this.gl.blendFunc(t,t),this.current=t,this.dirty=!1);},e}(V),at=function(e){function i(){e.apply(this,arguments);}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.getDefault=function(){return t.Color.transparent},i.prototype.set=function(t){var e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1);},i}(V),nt=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.FUNC_ADD},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.blendEquation(t),this.current=t,this.dirty=!1);},e}(V),st=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return !1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this.current=t,this.dirty=!1;}},e}(V),lt=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.BACK},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.cullFace(t),this.current=t,this.dirty=!1);},e}(V),ct=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.CCW},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.frontFace(t),this.current=t,this.dirty=!1);},e}(V),ut=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.useProgram(t),this.current=t,this.dirty=!1);},e}(V),ht=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.TEXTURE0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.activeTexture(t),this.current=t,this.dirty=!1);},e}(V),pt=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){var t=this.gl;return [0,0,t.drawingBufferWidth,t.drawingBufferHeight]},e.prototype.set=function(t){var e=this.current;(t!==e||t!==e||t!==e||t!==e||this.dirty)&&(this.gl.viewport(t,t,t,t),this.current=t,this.dirty=!1);},e}(V),dt=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t,this.dirty=!1;}},e}(V),_t=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t,this.dirty=!1;}},e}(V),ft=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t,this.dirty=!1;}},e}(V),mt=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t,this.dirty=!1;}},e}(V),gt=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){var e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t,this.dirty=!1;},e}(V),vt=function(t){function e(e){t.call(this,e),this.vao=e.extVertexArrayObject;}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){this.vao&&(t!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(t),this.current=t,this.dirty=!1);},e}(V),yt=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 4},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t,this.dirty=!1;}},e}(V),xt=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return !1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t,this.dirty=!1;}},e}(V),bt=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return !1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t),this.current=t,this.dirty=!1;}},e}(V),wt=function(t){function e(e,i){t.call(this,e),this.context=e,this.parent=i;}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e}(V),Et=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setDirty=function(){this.dirty=!0;},e.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1;}},e}(wt),Tt=function(t){function e(){t.apply(this,arguments);}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t,this.dirty=!1;}},e}(wt),It=function(t,e,i){this.context=t,this.width=e,this.height=i;var o=t.gl,r=this.framebuffer=o.createFramebuffer();this.colorAttachment=new Et(t,r),this.depthAttachment=new Tt(t,r);};It.prototype.destroy=function(){var t=this.context.gl,e=this.colorAttachment.get();e&&t.deleteTexture(e);var i=this.depthAttachment.get();i&&t.deleteRenderbuffer(i),t.deleteFramebuffer(this.framebuffer);};var St=function(t,e,i){this.func=t,this.mask=e,this.range=i;};St.ReadOnly=!1,St.ReadWrite=!0,St.disabled=new St(519,St.ReadOnly,);var Ct=function(t,e,i,o,r,a){this.test=t,this.ref=e,this.mask=i,this.fail=o,this.depthFail=r,this.pass=a;};Ct.disabled=new Ct({func:519,mask:0},0,0,7680,7680,7680);var Pt=function(t,e,i){this.blendFunction=t,this.blendColor=e,this.mask=i;};Pt.Replace=,Pt.disabled=new Pt(Pt.Replace,t.Color.transparent,),Pt.unblended=new Pt(Pt.Replace,t.Color.transparent,),Pt.alphaBlended=new Pt(,t.Color.transparent,);var zt=function(t,e,i){this.enable=t,this.mode=e,this.frontFace=i;};zt.disabled=new zt(!1,1029,2305),zt.backCCW=new zt(!0,1029,2305);var Lt=function(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension(“OES_vertex_array_object”),this.clearColor=new G(this),this.clearDepth=new W(this),this.clearStencil=new X(this),this.colorMask=new H(this),this.depthMask=new K(this),this.stencilMask=new Y(this),this.stencilFunc=new J(this),this.stencilOp=new Q(this),this.stencilTest=new $(this),this.depthRange=new tt(this),this.depthTest=new et(this),this.depthFunc=new it(this),this.blend=new ot(this),this.blendFunc=new rt(this),this.blendColor=new at(this),this.blendEquation=new nt(this),this.cullFace=new st(this),this.cullFaceSide=new lt(this),this.frontFace=new ct(this),this.program=new ut(this),this.activeTexture=new ht(this),this.viewport=new pt(this),this.bindFramebuffer=new dt(this),this.bindRenderbuffer=new _t(this),this.bindTexture=new ft(this),this.bindVertexBuffer=new mt(this),this.bindElementBuffer=new gt(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new vt(this),this.pixelStoreUnpack=new yt(this),this.pixelStoreUnpackPremultiplyAlpha=new xt(this),this.pixelStoreUnpackFlipY=new bt(this),this.extTextureFilterAnisotropic=t.getExtension(“EXT_texture_filter_anisotropic”)||t.getExtension(“MOZ_EXT_texture_filter_anisotropic”)||t.getExtension(“WEBKIT_EXT_texture_filter_anisotropic”),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=t.getExtension(“OES_texture_half_float”),this.extTextureHalfFloat&&t.getExtension(“OES_texture_half_float_linear”),this.extTimerQuery=t.getExtension(“EXT_disjoint_timer_query”);};Lt.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault();},Lt.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0;},Lt.prototype.createIndexBuffer=function(t,e){return new Z(this,t,e)},Lt.prototype.createVertexBuffer=function(t,e,i){return new j(this,t,e,i)},Lt.prototype.createRenderbuffer=function(t,e,i){var o=this.gl,r=o.createRenderbuffer();return this.bindRenderbuffer.set®,o.renderbufferStorage(o.RENDERBUFFER,t,e,i),this.bindRenderbuffer.set(null),r},Lt.prototype.createFramebuffer=function(t,e){return new It(this,t,e)},Lt.prototype.clear=function(t){var e=t.color,i=t.depth,o=this.gl,r=0;e&&(r|=o.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set()),void 0!==i&&(r|=o.DEPTH_BUFFER_BIT,this.depthRange.set(),this.clearDepth.set(i),this.depthMask.set(!0)),o.clear®;},Lt.prototype.setCullFace=function(t){!1===t.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(t.mode),this.frontFace.set(t.frontFace));},Lt.prototype.setDepthMode=function(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1);},Lt.prototype.setStencilMode=function(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set(),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1);},Lt.prototype.setColorMode=function(e){t.deepEqual(e.blendFunction,Pt.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask);},Lt.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null);};var Mt=function(e){function i(i,o,r){var a=this;e.call(this),this.id=i,this.dispatcher=r,this.on(“data”,(function(t){“source”===t.dataType&&“metadata”===t.sourceDataType&&(a._sourceLoaded=!0),a._sourceLoaded&&!a._paused&&“source”===t.dataType&&“content”===t.sourceDataType&&(a.reload(),a.transform&&a.update(a.transform));})),this.on(“error”,(function(){a._sourceErrored=!0;})),this._source=B(i,o,r,this),this._tiles={},this._cache=new N(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new t.SourceFeatureState;}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t);},i.prototype.onRemove=function(t){this._source&&this._source.onRemove&&this._source.onRemove(t);},i.prototype.loaded=function(){if(this._sourceErrored)return !0;if(!this._sourceLoaded)return !1;if(!this._source.loaded())return !1;for(var t in this._tiles){var e=this._tiles;if(“loaded”!==e.state&&“errored”!==e.state)return !1}return !0},i.prototype.getSource=function(){return this._source},i.prototype.pause=function(){this._paused=!0;},i.prototype.resume=function(){if(this._paused){var t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform);}},i.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},i.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t,(function(){}))},i.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t,(function(){}))},i.prototype.serialize=function(){return this._source.serialize()},i.prototype.prepare=function(t){for(var e in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){var i=this._tiles;i.upload(t),i.prepare(this.map.style.imageManager);}},i.prototype.getIds=function(){return t.values(this._tiles).map((function(t){return t.tileID})).sort(Dt).map((function(t){return t.key}))},i.prototype.getRenderableIds=function(e){var i=this,o=[];for(var r in this._tiles)this._isIdRenderable(r,e)&&o.push(this._tiles);return e?o.sort((function(e,o){var r=e.tileID,a=o.tileID,n=new t.Point(r.canonical.x,r.canonical.y)._rotate(i.transform.angle),s=new t.Point(a.canonical.x,a.canonical.y)._rotate(i.transform.angle);return r.overscaledZ-a.overscaledZ||s.y-n.y||s.x-n.x})).map((function(t){return t.tileID.key})):o.map((function(t){return t.tileID})).sort(Dt).map((function(t){return t.key}))},i.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0);return !!e&&this._isIdRenderable(e.tileID.key)},i.prototype._isIdRenderable=function(t,e){return this._tiles&&this._tiles.hasData()&&!this._coveredTiles&&(e||!this._tiles.holdingForFade())},i.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var t in this._cache.reset(),this._tiles)“errored”!==this._tiles.state&&this._reloadTile(t,“reloading”);},i.prototype._reloadTile=function(t,e){var i=this._tiles;i&&(“loading”!==i.state&&(i.state=e),this._loadTile(i,this._tileLoaded.bind(this,i,t,e)));},i.prototype._tileLoaded=function(e,i,o,r){if®return e.state=“errored”,void(404!==r.status?this._source.fire(new t.ErrorEvent(r,{tile:e})):this.update(this.transform));e.timeAdded=t.browser.now(),“expired”===o&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(i,e),“raster-dem”===this.getSource().type&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),this._source.fire(new t.Event(“data”,{dataType:“source”,tile:e,coord:e.tileID}));},i.prototype._backfillDEM=function(t){for(var e=this.getRenderableIds(),i=0;i<e.length;i++){var o=e;if(t.neighboringTiles&&t.neighboringTiles){var r=this.getTileByID(o);a(t,r),a(r,t);}}function a(t,e){t.needsHillshadePrepare=!0;var i=e.tileID.canonical.x-t.tileID.canonical.x,o=e.tileID.canonical.y-t.tileID.canonical.y,r=Math.pow(2,t.tileID.canonical.z),a=e.tileID.key;0===i&&0===o||Math.abs(o)>1||(Math.abs(i)>1&&(1===Math.abs(i+r)?i+=r:1===Math.abs(i-r)&&(i-=r)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,i,o),t.neighboringTiles&&t.neighboringTiles&&(t.neighboringTiles.backfilled=!0)));}},i.prototype.getTile=function(t){return this.getTileByID(t.key)},i.prototype.getTileByID=function(t){return this._tiles},i.prototype._retainLoadedChildren=function(t,e,i,o){for(var r in this._tiles){var a=this._tiles;if(!(o||!a.hasData()||a.tileID.overscaledZ<=e||a.tileID.overscaledZ>i)){for(var n=a.tileID;a&&a.tileID.overscaledZ>e+1;){var s=a.tileID.scaledTo(a.tileID.overscaledZ-1);(a=this._tiles)&&a.hasData()&&(n=s);}for(var l=n;l.overscaledZ>e;)if(t){o=n;break}}}},i.prototype.findLoadedParent=function(t,e){if(t.key in this._loadedParentTiles){var i=this._loadedParentTiles;return i&&i.tileID.overscaledZ>=e?i:null}for(var o=t.overscaledZ-1;o>=e;o–){var r=t.scaledTo(o),a=this._getLoadedTile®;if(a)return a}},i.prototype._getLoadedTile=function(t){var e=this._tiles;return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)},i.prototype.updateCacheSize=function(t){var e=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),i=Math.floor(5*e),o=“number”==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,i):i;this._cache.setMaxSize(o);},i.prototype.handleWrapJump=function(t){var e=(t-(void 0===this._prevLng?t:this._prevLng))/360,i=Math.round(e);if(this._prevLng=t,i){var o={};for(var r in this._tiles){var a=this._tiles;a.tileID=a.tileID.unwrapTo(a.tileID.wrap+i),o=a;}for(var n in this._tiles=o,this._timers)clearTimeout(this._timers),delete this._timers;for(var s in this._tiles){var l=this._tiles;this._setTileReloadTimer(s,l);}}},i.prototype.update=function(e){var o=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var r;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?r=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)})):(r=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(r=r.filter((function(t){return o._source.hasTile(t)})))):r=[];var a=e.coveringZoomLevel(this._source),n=Math.max(a-i.maxOverzooming,this._source.minzoom),s=Math.max(a+i.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(r,a);if(At(this._source.type)){for(var c={},u={},h=0,p=Object.keys(l);h<p.length;h+=1){var d=p,_=l,f=this._tiles;if(f&&!(f.fadeEndTime&&f.fadeEndTime<=t.browser.now())){var m=this.findLoadedParent(_,n);m&&(this._addTile(m.tileID),c=m.tileID),u=_;}}for(var g in this._retainLoadedChildren(u,a,s,l),c)l||(this._coveredTiles=!0,l=c);}for(var v in l)this._tiles.clearFadeHold();for(var y=0,x=t.keysDifference(this._tiles,l);y<x.length;y+=1){var b=x,w=this._tiles;w.hasSymbolBuckets&&!w.holdingForFade()?w.setHoldDuration(this.map._fadeDuration):w.hasSymbolBuckets&&!w.symbolFadeFinished()||this._removeTile(b);}this._updateLoadedParentTileCache();}},i.prototype.releaseSymbolFadeTiles=function(){for(var t in this._tiles)this._tiles.holdingForFade()&&this._removeTile(t);},i.prototype._updateRetainedTiles=function(t,e){for(var o={},r={},a=Math.max(e-i.maxOverzooming,this._source.minzoom),n=Math.max(e+i.maxUnderzooming,this._source.minzoom),s={},l=0,c=t;l<c.length;l+=1){var u=c,h=this._addTile(u);o=u,h.hasData()||eo
'” does not exist on source “'r.id
'” as specified by style layer “'e.id
'”')));}}},i.prototype.loaded=function(){if(!this._loaded)return !1;if(Object.keys(this._updatedSources).length)return !1;for(var t in this.sourceCaches)if(!this.sourceCaches.loaded())return !1;return !!this.imageManager.isLoaded()},i.prototype._serializeLayers=function(t){for(var e=[],i=0,o=t;i<o.length;i+=1){var r=o,a=this._layers;“custom”!==a.type&&e.push(a.serialize());}return e},i.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return !0;for(var t in this.sourceCaches)if(this.sourceCaches.hasTransition())return !0;for(var e in this._layers)if(this._layers.hasTransition())return !0;return !1},i.prototype._checkLoaded=function(){if(!this._loaded)throw new Error(“Style is not done loading”)},i.prototype.update=function(e){if(this._loaded){var i=this._changed;if(this._changed){var o=Object.keys(this._updatedLayers),r=Object.keys(this._removedLayers);for(var a in (o.length||r.length)&&this._updateWorkerLayers(o,r),this._updatedSources){var n=this._updatedSources;“reload”===n?this._reloadSource(a):“clear”===n&&this._clearSource(a);}for(var s in this._updateTilesForChangedImages(),this._updatedPaintProps)this._layers.updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates();}for(var l in this.sourceCaches)this.sourceCaches.used=!1;for(var c=this.imageManager.listImages(),u=0,h=this._order;u<h.length;u+=1){var p=h,d=this._layers;d.recalculate(e,c),!d.isHidden(e.zoom)&&d.source&&(this.sourceCaches.used=!0);}this.light.recalculate(e),this.z=e.zoom,i&&this.fire(new t.Event(“data”,{dataType:“style”}));}},i.prototype._updateTilesForChangedImages=function(){var t=Object.keys(this._changedImages);if(t.length){for(var e in this.sourceCaches)this.sourceCaches.reloadTilesForDependencies(,t);this._changedImages={};}},i.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast(“updateLayers”,{layers:this._serializeLayers(t),removedIds:e});},i.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={};},i.prototype.setState=function(e){var i=this;if(this._checkLoaded(),Oe(this,t.validateStyle(e)))return !1;(e=t.clone$1(e)).layers=Ut(e.layers);var o=Ht(this.serialize(),e).filter((function(t){return !(t.command in Ue)}));if(0===o.length)return !1;var r=o.filter((function(t){return !(t.command in Fe)}));if(r.length>0)throw new Error(“Unimplemented: ”+r.map((function(t){return t.command})).join(“, ”)+“.”);return o.forEach((function(t){“setTransition”!==t.command&&i.apply(i,t.args);})),this.stylesheet=e,!0},i.prototype.addImage=function(e,i){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error(“An image with this name already exists.”)));this.imageManager.addImage(e,i),this._changedImages=!0,this._changed=!0,this.fire(new t.Event(“data”,{dataType:“style”}));},i.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e);},i.prototype.getImage=function(t){return this.imageManager.getImage(t)},i.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error(“No image with this name exists.”)));this.imageManager.removeImage(e),this._changedImages=!0,this._changed=!0,this.fire(new t.Event(“data”,{dataType:“style”}));},i.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},i.prototype.addSource=function(e,i,o){var r=this;if(void 0===o&&(o={}),this._checkLoaded(),void 0!==this.sourceCaches)throw new Error(“There is already a source with this ID”);if(!i.type)throw new Error(“The type property must be defined, but the only the following properties were given: ”+Object.keys(i).join(“, ”)+“.”);if(!(.indexOf(i.type)>=0)||!this._validate(t.validateStyle.source,“sources.”+e,i,null,o)){this.map&&this.map._collectResourceTiming&&(i.collectResourceTiming=!0);var a=this.sourceCaches=new Mt(e,i,this.dispatcher);a.style=this,a.setEventedParent(this,(function(){return {isSourceLoaded:r.loaded(),source:a.serialize(),sourceId:e}})),a.onAdd(this.map),this._changed=!0;}},i.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches)throw new Error(“There is no source with this ID”);for(var i in this._layers)if(this._layers.source===e)return this.fire(new t.ErrorEvent(new Error('Source “'e
'” cannot be removed while layer “'i
'” is using it.')));var o=this.sourceCaches;delete this.sourceCaches,delete this._updatedSources,o.fire(new t.Event(“data”,{sourceDataType:“metadata”,dataType:“source”,sourceId:e})),o.setEventedParent(null),o.clearTiles(),o.onRemove&&o.onRemove(this.map),this._changed=!0;},i.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches.getSource().setData(e),this._changed=!0;},i.prototype.getSource=function(t){return this.sourceCaches&&this.sourceCaches.getSource()},i.prototype.addLayer=function(e,i,o){void 0===o&&(o={}),this._checkLoaded();var r=e.id;if(this.getLayer®)this.fire(new t.ErrorEvent(new Error('Layer with id “'r
'” already exists on this map')));else{var a;if(“custom”===e.type){if(Oe(this,t.validateCustomStyleLayer(e)))return;a=t.createStyleLayer(e);}else{if(“object”==typeof e.source&&(this.addSource(r,e.source),e=t.clone$1(e),e=t.extend(e,{source:r})),this._validate(t.validateStyle.layer,“layers.”+r,e,{arrayIndex:-1},o))return;a=t.createStyleLayer(e),this._validateLayer(a),a.setEventedParent(this,{layer:{id:r}});}var n=i?this._order.indexOf(i):this._order.length;if(i&&-1===n)this.fire(new t.ErrorEvent(new Error('Layer with id “'i
'” does not exist on this map.')));else{if(this._order.splice(n,0,r),this._layerOrderChanged=!0,this._layers=a,this._removedLayers&&a.source&&“custom”!==a.type){var s=this._removedLayers;delete this._removedLayers,s.type!==a.type?this._updatedSources=“clear”:(this._updatedSources=“reload”,this.sourceCaches.pause());}this._updateLayer(a),a.onAdd&&a.onAdd(this.map);}}},i.prototype.moveLayer=function(e,i){if(this._checkLoaded(),this._changed=!0,this._layers){if(e!==i){var o=this._order.indexOf(e);this._order.splice(o,1);var r=i?this._order.indexOf(i):this._order.length;i&&-1===r?this.fire(new t.ErrorEvent(new Error('Layer with id “'i
'” does not exist on this map.'))):(this._order.splice(r,0,e),this._layerOrderChanged=!0);}}else this.fire(new t.ErrorEvent(new Error(“The layer '”e
“' does not exist in the map's style and cannot be moved.”)));},i.prototype.removeLayer=function(e){this._checkLoaded();var i=this._layers;if(i){i.setEventedParent(null);var o=this._order.indexOf(e);this._order.splice(o,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers=i,delete this._layers,delete this._updatedLayers,delete this._updatedPaintProps,i.onRemove&&i.onRemove(this.map);}else this.fire(new t.ErrorEvent(new Error(“The layer '”e
“' does not exist in the map's style and cannot be removed.”)));},i.prototype.getLayer=function(t){return this._layers},i.prototype.setLayerZoomRange=function(e,i,o){this._checkLoaded();var r=this.getLayer(e);r?r.minzoom===i&&r.maxzoom===o||(null!=i&&(r.minzoom=i),null!=o&&(r.maxzoom=o),this._updateLayer®):this.fire(new t.ErrorEvent(new Error(“The layer '”e
“' does not exist in the map's style and cannot have zoom extent.”)));},i.prototype.setFilter=function(e,i,o){void 0===o&&(o={}),this._checkLoaded();var r=this.getLayer(e);if®{if(!t.deepEqual(r.filter,i))return null==i?(r.filter=void 0,void this._updateLayer®):void(this._validate(t.validateStyle.filter,“layers.”r.id
“.filter”,i,null,o)||(r.filter=t.clone$1(i),this._updateLayer®))}else this.fire(new t.ErrorEvent(new Error(“The layer '”e
“' does not exist in the map's style and cannot be filtered.”)));},i.prototype.getFilter=function(e){return t.clone$1(this.getLayer(e).filter)},i.prototype.setLayoutProperty=function(e,i,o,r){void 0===r&&(r={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getLayoutProperty(i),o)||(a.setLayoutProperty(i,o,r),this._updateLayer(a)):this.fire(new t.ErrorEvent(new Error(“The layer '”e
“' does not exist in the map's style and cannot be styled.”)));},i.prototype.getLayoutProperty=function(e,i){var o=this.getLayer(e);if(o)return o.getLayoutProperty(i);this.fire(new t.ErrorEvent(new Error(“The layer '”e
“' does not exist in the map's style.”)));},i.prototype.setPaintProperty=function(e,i,o,r){void 0===r&&(r={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getPaintProperty(i),o)||(a.setPaintProperty(i,o,r)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps=!0):this.fire(new t.ErrorEvent(new Error(“The layer '”e
“' does not exist in the map's style and cannot be styled.”)));},i.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},i.prototype.setFeatureState=function(e,i){this._checkLoaded();var o=e.source,r=e.sourceLayer,a=this.sourceCaches;if(void 0!==a){var n=a.getSource().type;“geojson”===n&&r?this.fire(new t.ErrorEvent(new Error(“GeoJSON sources cannot have a sourceLayer parameter.”))):“vector”!==n||r?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error(“The feature id parameter must be provided.”))),a.setFeatureState(r,e.id,i)):this.fire(new t.ErrorEvent(new Error(“The sourceLayer parameter must be provided for vector source types.”)));}else this.fire(new t.ErrorEvent(new Error(“The source '”o
“' does not exist in the map's style.”)));},i.prototype.removeFeatureState=function(e,i){this._checkLoaded();var o=e.source,r=this.sourceCaches;if(void 0!==r){var a=r.getSource().type,n=“vector”===a?e.sourceLayer:void 0;“vector”!==a||n?i&&“string”!=typeof e.id&&“number”!=typeof e.id?this.fire(new t.ErrorEvent(new Error(“A feature id is requred to remove its specific state property.”))):r.removeFeatureState(n,e.id,i):this.fire(new t.ErrorEvent(new Error(“The sourceLayer parameter must be provided for vector source types.”)));}else this.fire(new t.ErrorEvent(new Error(“The source '”o
“' does not exist in the map's style.”)));},i.prototype.getFeatureState=function(e){this._checkLoaded();var i=e.source,o=e.sourceLayer,r=this.sourceCaches;if(void 0!==r){if(“vector”!==r.getSource().type||o)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error(“The feature id parameter must be provided.”))),r.getFeatureState(o,e.id);this.fire(new t.ErrorEvent(new Error(“The sourceLayer parameter must be provided for vector source types.”)));}else this.fire(new t.ErrorEvent(new Error(“The source '”i
“' does not exist in the map's style.”)));},i.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},i.prototype.serialize=function(){return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,(function(t){return t.serialize()})),layers:this._serializeLayers(this._order)},(function(t){return void 0!==t}))},i.prototype._updateLayer=function(t){this._updatedLayers=!0,t.source&&!this._updatedSources&&“raster”!==this.sourceCaches.getSource().type&&(this._updatedSources=“reload”,this.sourceCaches.pause()),this._changed=!0;},i.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,i=function(t){return “fill-extrusion”===e._layers.type},o={},r=[],a=this._order.length-1;a>=0;a–){var n=this._order;if(i(n)){o=a;for(var s=0,l=t;s<l.length;s+=1){var c=l[n];if©for(var u=0,h=c;u<h.length;u+=1){var p=h;r.push(p);}}}}r.sort((function(t,e){return e.intersectionZ-t.intersectionZ}));for(var d=[],_=this.order.length-1;>=0;_–){var f=this.order[];if(i(f))for(var m=r.length-1;m>=0;m–){var g=r.feature;if(o<_)break;d.push(g),r.pop();}else for(var v=0,y=t;v<y.length;v+=1){var x=y[f];if(x)for(var b=0,w=x;b<w.length;b+=1){var E=w;d.push(E.feature);}}}return d},i.prototype.queryRenderedFeatures=function(e,i,o){i&&i.filter&&this._validate(t.validateStyle.filter,“queryRenderedFeatures.filter”,i.filter,null,i);var r={};if(i&&i.layers){if(!Array.isArray(i.layers))return this.fire(new t.ErrorEvent(new Error(“parameters.layers must be an Array.”))),[];for(var a=0,n=i.layers;a<n.length;a+=1){var s=n,l=this._layers;if(!l)return this.fire(new t.ErrorEvent(new Error(“The layer '”s
“' does not exist in the map's style and cannot be queried for features.”))),[];r=!0;}}var c=[];for(var u in this.sourceCaches)i.layers&&!r||c.push(F(this.sourceCaches,this._layers,e,i,o));return this.placement&&c.push(function(t,e,i,o,r,a){for(var n={},s=r.queryRenderedSymbols(i),l=[],c=0,u=Object.keys(s).map(Number);c<u.length;c+=1){var h=u;l.push(a);}l.sort(U);for(var p=function(){var e=_,i=e.featureIndex.lookupSymbolFeatures(s,e.bucketIndex,e.sourceLayerIndex,o.filter,o.layers,t);for(var r in i){var a=n=n||[],l=i;l.sort((function(t,i){var o=e.featureSortOrder;if(o){var r=o.indexOf(t.featureIndex);return o.indexOf(i.featureIndex)-r}return i.featureIndex-t.featureIndex}));for(var c=0,u=l;c<u.length;c+=1){var h=u;a.push(h);}}},d=0,_=l;d<_.length;d+=1)p();var f=function(i){n.forEach((function(o){var r=o.feature,a=t,n=e.getFeatureState(r.layer,r.id);r.source=r.layer.source,r.layer&&(r.sourceLayer=r.layer),r.state=n;}));};for(var m in n)f(m);return n}(this._layers,this.sourceCaches,e,i,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures©},i.prototype.querySourceFeatures=function(e,i){i&&i.filter&&this._validate(t.validateStyle.filter,“querySourceFeatures.filter”,i.filter,null,i);var o=this.sourceCaches;return o?function(t,e){for(var i=t.getRenderableIds().map((function(e){return t.getTileByID(e)})),o=[],r={},a=0;a<i.length;a++){var n=i,s=n.tileID.canonical.key;r||(r=!0,n.querySourceFeatures(o,e));}return o}(o,i):[]},i.prototype.addSourceType=function(t,e,o){return i.getSourceType(t)?o(new Error('A source type called “'t
'” already exists.')):(i.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast(“loadWorkerSource”,{name:t,url:e.workerSourceURL},o):o(null,null))},i.prototype.getLight=function(){return this.light.getLight()},i.prototype.setLight=function(e,i){void 0===i&&(i={}),this._checkLoaded();var o=this.light.getLight(),r=!1;for(var a in e)if(!t.deepEqual(e,o)){r=!0;break}if®{var n={now:t.browser.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,i),this.light.updateTransitions(n);}},i.prototype._validate=function(e,i,o,r,a){return void 0===a&&(a={}),(!a||!1!==a.validate)&&Oe(this,e.call(t.validateStyle,t.extend({key:i,style:this.serialize(),value:o,styleSpec:t.styleSpec},r)))},i.prototype._remove=function(){for(var e in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),t.evented.off(“pluginStateChange”,this._rtlTextPluginCallback),this._layers){this._layers.setEventedParent(null);}for(var i in this.sourceCaches)this.sourceCaches.clearTiles(),this.sourceCaches.setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove();},i.prototype._clearSource=function(t){this.sourceCaches.clearTiles();},i.prototype._reloadSource=function(t){this.sourceCaches.resume(),this.sourceCaches.reload();},i.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches.update(t);},i.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t);},i.prototype._updatePlacement=function(e,i,o,r,a){void 0===a&&(a=!1);for(var n=!1,s=!1,l={},c=0,u=this._order;c<u.length;c+=1){var h=u,p=this._layers;if(“symbol”===p.type){if(!l){var d=this.sourceCaches;l=d.getRenderableIds(!0).map((function(t){return d.getTileByID(t)})).sort((function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)}));}var _=this.crossTileSymbolIndex.addLayer(p,l,e.center.lng);n=n||_;}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((a=a||this._layerOrderChanged||0===o)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(t.browser.now(),e.zoom))&&(this.pauseablePlacement=new Me(e,this._order,a,i,o,r,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,l),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(t.browser.now()),s=!0),n&&this.pauseablePlacement.placement.setStale()),s||n)for(var f=0,m=this._order;f<m.length;f+=1){var g=m,v=this._layers;“symbol”===v.type&&this.placement.updateLayerOpacities(v,l);}return !this.pauseablePlacement.isDone()||this.placement.hasTransitions(t.browser.now())},i.prototype._releaseSymbolFadeTiles=function(){for(var t in this.sourceCaches)this.sourceCaches.releaseSymbolFadeTiles();},i.prototype.getImages=function(t,e,i){this.imageManager.getImages(e.icons,i),this._updateTilesForChangedImages();var o=this.sourceCaches;o&&o.setDependencies(e.tileID.key,e.type,e.icons);},i.prototype.getGlyphs=function(t,e,i){this.glyphManager.getGlyphs(e.stacks,i);},i.prototype.getResource=function(e,i,o){return t.makeRequest(i,o)},i}(t.Evented);Ze.getSourceType=function(t){return k},Ze.setSourceType=function(t,e){k=e;},Ze.registerForPluginStateChange=t.registerForPluginStateChange;var qe=t.createLayout(),je=fi(“#ifdef GL_ESnprecision mediump float;n#elsen#if !defined(lowp)n#define lowpn#endifn#if !defined(mediump)n#define mediumpn#endifn#if !defined(highp)n#define highpn#endifn#endif”,“#ifdef GL_ESnprecision highp float;n#elsen#if !defined(lowp)n#define lowpn#endifn#if !defined(mediump)n#define mediumpn#endifn#if !defined(highp)n#define highpn#endifn#endifnvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor)/255.0,unpack_float(encodedColor[1])/255.0n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue,packedValue,t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors,packedColors));vec4 maxColor=decode_color(vec2(packedColors,packedColors));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}”),Ve=fi(“uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifn}”,“attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}”),Ge=fi(“uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifn}”,“uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}”),We=fi(“varying vec3 v_data;n#pragma mapbox: define highp vec4 colorn#pragma mapbox: define mediump float radiusn#pragma mapbox: define lowp float blurn#pragma mapbox: define lowp float opacityn#pragma mapbox: define highp vec4 stroke_colorn#pragma mapbox: define mediump float stroke_widthn#pragma mapbox: define lowp float stroke_opacitynvoid main() {n#pragma mapbox: initialize highp vec4 colorn#pragma mapbox: initialize mediump float radiusn#pragma mapbox: initialize lowp float blurn#pragma mapbox: initialize lowp float opacityn#pragma mapbox: initialize highp vec4 stroke_colorn#pragma mapbox: initialize mediump float stroke_widthn#pragma mapbox: initialize lowp float stroke_opacitynvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifn}”,“uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;n#pragma mapbox: define highp vec4 colorn#pragma mapbox: define mediump float radiusn#pragma mapbox: define lowp float blurn#pragma mapbox: define lowp float opacityn#pragma mapbox: define highp vec4 stroke_colorn#pragma mapbox: define mediump float stroke_widthn#pragma mapbox: define lowp float stroke_opacitynvoid main(void) {n#pragma mapbox: initialize highp vec4 colorn#pragma mapbox: initialize mediump float radiusn#pragma mapbox: initialize lowp float blurn#pragma mapbox: initialize lowp float opacityn#pragma mapbox: initialize highp vec4 stroke_colorn#pragma mapbox: initialize mediump float stroke_widthn#pragma mapbox: initialize lowp float stroke_opacitynvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)u_extrude_scale(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}”),Xe=fi(“void main() {gl_FragColor=vec4(1.0);}”,“attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}”),He=fi(“uniform highp float u_intensity;varying vec2 v_extrude;n#pragma mapbox: define highp float weightn#define GAUSS_COEF 0.3989422804014327nvoid main() {n#pragma mapbox: initialize highp float weightnfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifn}”,“uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;n#pragma mapbox: define highp float weightn#pragma mapbox: define mediump float radiusnconst highp float ZERO=1.0/255.0/16.0;n#define GAUSS_COEF 0.3989422804014327nvoid main(void) {n#pragma mapbox: initialize highp float weightn#pragma mapbox: initialize mediump float radiusnvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}”),Ke=fi(“uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(0.0);n#endifn}”,“uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}”),Ye=fi(“varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}”,“attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}”),Je=fi(“uniform float u_overscale_factor;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;void main() {float alpha=0.5;vec4 color=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {color=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {color*=.2;}float extrude_scale_length=length(v_extrude_scale);float extrude_length=length(v_extrude)*extrude_scale_length;float stroke_width=15.0*extrude_scale_length/u_overscale_factor;float radius=v_radius*extrude_scale_length;float distance_to_edge=abs(extrude_length-radius);float opacity_t=smoothstep(-stroke_width,0.0,-distance_to_edge);gl_FragColor=opacity_t*color;}”,“attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);highp float padding_factor=1.2;gl_Position.xy+=a_extrude*u_extrude_scale*padding_factor*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;v_radius=abs(a_extrude.y);v_extrude=a_extrude*padding_factor;v_extrude_scale=u_extrude_scale*u_camera_to_center_distance*collision_perspective_ratio;}”),Qe=fi(“uniform highp vec4 u_color;void main() {gl_FragColor=u_color;}”,“attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}”),$e=fi(“#pragma mapbox: define highp vec4 colorn#pragma mapbox: define lowp float opacitynvoid main() {n#pragma mapbox: initialize highp vec4 colorn#pragma mapbox: initialize lowp float opacityngl_FragColor=color*opacity;n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifn}”,“attribute vec2 a_pos;uniform mat4 u_matrix;n#pragma mapbox: define highp vec4 colorn#pragma mapbox: define lowp float opacitynvoid main() {n#pragma mapbox: initialize highp vec4 colorn#pragma mapbox: initialize lowp float opacityngl_Position=u_matrix*vec4(a_pos,0,1);}”),ti=fi(“varying vec2 v_pos;n#pragma mapbox: define highp vec4 outline_colorn#pragma mapbox: define lowp float opacitynvoid main() {n#pragma mapbox: initialize highp vec4 outline_colorn#pragma mapbox: initialize lowp float opacitynfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifn}”,“attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;n#pragma mapbox: define highp vec4 outline_colorn#pragma mapbox: define lowp float opacitynvoid main() {n#pragma mapbox: initialize highp vec4 outline_colorn#pragma mapbox: initialize lowp float opacityngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}”),ei=fi(“uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;n#pragma mapbox: define lowp float opacityn#pragma mapbox: define lowp vec4 pattern_fromn#pragma mapbox: define lowp vec4 pattern_tonvoid main() {n#pragma mapbox: initialize lowp float opacityn#pragma mapbox: initialize mediump vec4 pattern_fromn#pragma mapbox: initialize mediump vec4 pattern_tonvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifn}”,“uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec4 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;n#pragma mapbox: define lowp float opacityn#pragma mapbox: define lowp vec4 pattern_fromn#pragma mapbox: define lowp vec4 pattern_tonvoid main() {n#pragma mapbox: initialize lowp float opacityn#pragma mapbox: initialize mediump vec4 pattern_fromn#pragma mapbox: initialize mediump vec4 pattern_tonvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}”),ii=fi(“uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;n#pragma mapbox: define lowp float opacityn#pragma mapbox: define lowp vec4 pattern_fromn#pragma mapbox: define lowp vec4 pattern_tonvoid main() {n#pragma mapbox: initialize lowp float opacityn#pragma mapbox: initialize mediump vec4 pattern_fromn#pragma mapbox: initialize mediump vec4 pattern_tonvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifn}”,“uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec4 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;n#pragma mapbox: define lowp float opacityn#pragma mapbox: define lowp vec4 pattern_fromn#pragma mapbox: define lowp vec4 pattern_tonvoid main() {n#pragma mapbox: initialize lowp float opacityn#pragma mapbox: initialize mediump vec4 pattern_fromn#pragma mapbox: initialize mediump vec4 pattern_tonvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}”),oi=fi(“varying vec4 v_color;void main() {gl_FragColor=v_color;n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifn}”,“uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;n#pragma mapbox: define highp float basen#pragma mapbox: define highp float heightn#pragma mapbox: define highp vec4 colornvoid main() {n#pragma mapbox: initialize highp float basen#pragma mapbox: initialize highp float heightn#pragma mapbox: initialize highp vec4 colornvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}”),ri=fi(“uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;n#pragma mapbox: define lowp float basen#pragma mapbox: define lowp float heightn#pragma mapbox: define lowp vec4 pattern_fromn#pragma mapbox: define lowp vec4 pattern_tonvoid main() {n#pragma mapbox: initialize lowp float basen#pragma mapbox: initialize lowp float heightn#pragma mapbox: initialize mediump vec4 pattern_fromn#pragma mapbox: initialize mediump vec4 pattern_tonvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifn}”,“uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec4 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;n#pragma mapbox: define lowp float basen#pragma mapbox: define lowp float heightn#pragma mapbox: define lowp vec4 pattern_fromn#pragma mapbox: define lowp vec4 pattern_tonvoid main() {n#pragma mapbox: initialize lowp float basen#pragma mapbox: initialize lowp float heightn#pragma mapbox: initialize mediump vec4 pattern_fromn#pragma mapbox: initialize mediump vec4 pattern_tonvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0n? a_posn: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}”),ai=fi(“#ifdef GL_ESnprecision highp float;n#endifnuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifn}”,“uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}”),ni=fi(“uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;n#define PI 3.141592653589793nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange-u_latrange)*(1.0-v_pos.y)+u_latrange));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifn}”,“uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}”),si=fi(“uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;n#pragma mapbox: define highp vec4 colorn#pragma mapbox: define lowp float blurn#pragma mapbox: define lowp float opacitynvoid main() {n#pragma mapbox: initialize highp vec4 colorn#pragma mapbox: initialize lowp float blurn#pragma mapbox: initialize lowp float opacitynfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifn}”,“n#define scale 0.015873016nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;n#pragma mapbox: define highp vec4 colorn#pragma mapbox: define lowp float blurn#pragma mapbox: define lowp float opacityn#pragma mapbox: define mediump float gapwidthn#pragma mapbox: define lowp float offsetn#pragma mapbox: define mediump float widthnvoid main() {n#pragma mapbox: initialize highp vec4 colorn#pragma mapbox: initialize lowp float blurn#pragma mapbox: initialize lowp float opacityn#pragma mapbox: initialize mediump float gapwidthn#pragma mapbox: initialize lowp float offsetn#pragma mapbox: initialize mediump float widthnfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}”),li=fi(“uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;n#pragma mapbox: define lowp float blurn#pragma mapbox: define lowp float opacitynvoid main() {n#pragma mapbox: initialize lowp float blurn#pragma mapbox: initialize lowp float opacitynfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifn}”,“n#define MAX_LINE_DISTANCE 32767.0n#define scale 0.015873016nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;n#pragma mapbox: define lowp float blurn#pragma mapbox: define lowp float opacityn#pragma mapbox: define mediump float gapwidthn#pragma mapbox: define lowp float offsetn#pragma mapbox: define mediump float widthnvoid main() {n#pragma mapbox: initialize lowp float blurn#pragma mapbox: initialize lowp float opacityn#pragma mapbox: initialize mediump float gapwidthn#pragma mapbox: initialize lowp float offsetn#pragma mapbox: initialize mediump float widthnfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}”),ci=fi(“uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec4 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;n#pragma mapbox: define lowp vec4 pattern_fromn#pragma mapbox: define lowp vec4 pattern_ton#pragma mapbox: define lowp float blurn#pragma mapbox: define lowp float opacitynvoid main() {n#pragma mapbox: initialize mediump vec4 pattern_fromn#pragma mapbox: initialize mediump vec4 pattern_ton#pragma mapbox: initialize lowp float blurn#pragma mapbox: initialize lowp float opacitynvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x,1.0);float x_b=mod(v_linesofar/pattern_size_b.x,1.0);float y_a=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_a.y+2.0)/2.0)/pattern_size_a.y);float y_b=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_b.y+2.0)/2.0)/pattern_size_b.y);vec2 pos_a=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,vec2(x_a,y_a));vec2 pos_b=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,vec2(x_b,y_b));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifn}”,“n#define scale 0.015873016n#define LINE_DISTANCE_SCALE 2.0nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;n#pragma mapbox: define lowp float blurn#pragma mapbox: define lowp float opacityn#pragma mapbox: define lowp float offsetn#pragma mapbox: define mediump float gapwidthn#pragma mapbox: define mediump float widthn#pragma mapbox: define lowp vec4 pattern_fromn#pragma mapbox: define lowp vec4 pattern_tonvoid main() {n#pragma mapbox: initialize lowp float blurn#pragma mapbox: initialize lowp float opacityn#pragma mapbox: initialize lowp float offsetn#pragma mapbox: initialize mediump float gapwidthn#pragma mapbox: initialize mediump float widthn#pragma mapbox: initialize mediump vec4 pattern_fromn#pragma mapbox: initialize mediump vec4 pattern_tonfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);}”),ui=fi(“uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;n#pragma mapbox: define highp vec4 colorn#pragma mapbox: define lowp float blurn#pragma mapbox: define lowp float opacityn#pragma mapbox: define mediump float widthn#pragma mapbox: define lowp float floorwidthnvoid main() {n#pragma mapbox: initialize highp vec4 colorn#pragma mapbox: initialize lowp float blurn#pragma mapbox: initialize lowp float opacityn#pragma mapbox: initialize mediump float widthn#pragma mapbox: initialize lowp float floorwidthnfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifn}”,“n#define scale 0.015873016n#define LINE_DISTANCE_SCALE 2.0nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;n#pragma mapbox: define highp vec4 colorn#pragma mapbox: define lowp float blurn#pragma mapbox: define lowp float opacityn#pragma mapbox: define mediump float gapwidthn#pragma mapbox: define lowp float offsetn#pragma mapbox: define mediump float widthn#pragma mapbox: define lowp float floorwidthnvoid main() {n#pragma mapbox: initialize highp vec4 colorn#pragma mapbox: initialize lowp float blurn#pragma mapbox: initialize lowp float opacityn#pragma mapbox: initialize mediump float gapwidthn#pragma mapbox: initialize lowp float offsetn#pragma mapbox: initialize mediump float widthn#pragma mapbox: initialize lowp float floorwidthnfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}”),hi=fi(“uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifn}”,“uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}”),pi=fi(“uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;n#pragma mapbox: define lowp float opacitynvoid main() {n#pragma mapbox: initialize lowp float opacitynlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifn}”,“const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;n#pragma mapbox: define lowp float opacitynvoid main() {n#pragma mapbox: initialize lowp float opacitynvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos;float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size,u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?ncamera_to_anchor_distance/u_camera_to_center_distance :nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity+fade_change));}”),di=fi(“#define SDF_PX 8.0nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;n#pragma mapbox: define highp vec4 fill_colorn#pragma mapbox: define highp vec4 halo_colorn#pragma mapbox: define lowp float opacityn#pragma mapbox: define lowp float halo_widthn#pragma mapbox: define lowp float halo_blurnvoid main() {n#pragma mapbox: initialize highp vec4 fill_colorn#pragma mapbox: initialize highp vec4 halo_colorn#pragma mapbox: initialize lowp float opacityn#pragma mapbox: initialize lowp float halo_widthn#pragma mapbox: initialize lowp float halo_blurnfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1;float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifn}”,“const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;n#pragma mapbox: define highp vec4 fill_colorn#pragma mapbox: define highp vec4 halo_colorn#pragma mapbox: define lowp float opacityn#pragma mapbox: define lowp float halo_widthn#pragma mapbox: define lowp float halo_blurnvoid main() {n#pragma mapbox: initialize highp vec4 fill_colorn#pragma mapbox: initialize highp vec4 halo_colorn#pragma mapbox: initialize lowp float opacityn#pragma mapbox: initialize lowp float halo_widthn#pragma mapbox: initialize lowp float halo_blurnvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos;float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size,u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?ncamera_to_anchor_distance/u_camera_to_center_distance :nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}”),_i=fi(“#define SDF_PX 8.0n#define SDF 1.0n#define ICON 0.0nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;n#pragma mapbox: define highp vec4 fill_colorn#pragma mapbox: define highp vec4 halo_colorn#pragma mapbox: define lowp float opacityn#pragma mapbox: define lowp float halo_widthn#pragma mapbox: define lowp float halo_blurnvoid main() {n#pragma mapbox: initialize highp vec4 fill_colorn#pragma mapbox: initialize highp vec4 halo_colorn#pragma mapbox: initialize lowp float opacityn#pragma mapbox: initialize lowp float halo_widthn#pragma mapbox: initialize lowp float halo_blurnfloat fade_opacity=v_data1;if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifnreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);n#ifdef OVERDRAW_INSPECTORngl_FragColor=vec4(1.0);n#endifn}”,“const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;n#pragma mapbox: define highp vec4 fill_colorn#pragma mapbox: define highp vec4 halo_colorn#pragma mapbox: define lowp float opacityn#pragma mapbox: define lowp float halo_widthn#pragma mapbox: define lowp float halo_blurnvoid main() {n#pragma mapbox: initialize highp vec4 fill_colorn#pragma mapbox: initialize highp vec4 halo_colorn#pragma mapbox: initialize lowp float opacityn#pragma mapbox: initialize lowp float halo_widthn#pragma mapbox: initialize lowp float halo_blurnvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size*0.5);float is_sdf=a_size-2.0*a_size_min;highp float segment_angle=-a_projected_pos;float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size,u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?ncamera_to_anchor_distance/u_camera_to_center_distance :nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}”);function fi(t,e){var i=/#pragma mapbox: ([w]+) ([w]+) ([w]+) ([w]+)/g,o={};return {fragmentSource:t=t.replace(i,(function(t,e,i,r,a){return o=!0,“define”===e?“n#ifndef HAS_UNIFORM_u_”a
“nvarying ”i
“ ”r
“ ”a
“;n#elsenuniform ”i
“ ”r
“ u_”a
“;n#endifn”:“n#ifdef HAS_UNIFORM_u_”a
“n ”i
“ ”r
“ ”a
“ = u_”a
“;n#endifn”})),vertexSource:e=e.replace(i,(function(t,e,i,r,a){var n=“float”===r?“vec2”:“vec4”,s=a.match(/color/)?“color”:n;return o?“define”===e?“n#ifndef HAS_UNIFORM_u_”a
“nuniform lowp float u_”a
“_t;nattribute ”i
“ ”n
“ a_”a
“;nvarying ”i
“ ”r
“ ”a
“;n#elsenuniform ”i
“ ”r
“ u_”a
“;n#endifn”:“vec4”===s?“n#ifndef HAS_UNIFORM_u_”a
“n ”a
“ = a_”a
“;n#elsen ”i
“ ”r
“ ”a
“ = u_”a
“;n#endifn”:“n#ifndef HAS_UNIFORM_u_”a
“n ”a
“ = unpack_mix_”s
“(a_”a
“, u_”a
“_t);n#elsen ”i
“ ”r
“ ”a
“ = u_”a
“;n#endifn”:“define”===e?“n#ifndef HAS_UNIFORM_u_”a
“nuniform lowp float u_”a
“_t;nattribute ”i
“ ”n
“ a_”a
“;n#elsenuniform ”i
“ ”r
“ u_”a
“;n#endifn”:“vec4”===s?“n#ifndef HAS_UNIFORM_u_”a
“n ”i
“ ”r
“ ”a
“ = a_”a
“;n#elsen ”i
“ ”r
“ ”a
“ = u_”a
“;n#endifn”:“n#ifndef HAS_UNIFORM_u_”a
“n ”i
“ ”r
“ ”a
“ = unpack_mix_”s
“(a_”a
“, u_”a
“_t);n#elsen ”i
“ ”r
“ ”a
“ = u_”a
“;n#endifn”}))}}var mi=Object.freeze({__proto__:null,prelude:je,background:Ve,backgroundPattern:Ge,circle:We,clippingMask:Xe,heatmap:He,heatmapTexture:Ke,collisionBox:Ye,collisionCircle:Je,debug:Qe,fill:$e,fillOutline:ti,fillOutlinePattern:ei,fillPattern:ii,fillExtrusion:oi,fillExtrusionPattern:ri,hillshadePrepare:ai,hillshade:ni,line:si,lineGradient:li,linePattern:ci,lineSDF:ui,raster:hi,symbolIcon:pi,symbolSDF:di,symbolTextAndIcon:_i}),gi=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null;};gi.prototype.bind=function(t,e,i,o,r,a,n,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==o.length,c=0;!l&&c[n]&&-1===l[n+1]?h=null:(c=e+l[n]*o,u=i-l[n+1]*o,h&&p.push(h.x,h.y,c,u),h={x:c,y:u});e+=l*o;}return p}(g+“ ”_
“kb”,50,200*m,5*m),y=new t.StructArrayLayout2i4,x=new t.StructArrayLayout2ui4,b=0;bt
(e?e.cacheKey:”“)+(this._showOverdrawInspector?”/overdraw“:”“);return this.cache||(this.cache=new vi(this.context,mi,e,Ki,this._showOverdrawInspector)),this.cache},po.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault();},po.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set(),this.context.blendEquation.set(t.FUNC_ADD);};var _o=function(t,e){this.points=t,this.planes=e;};_o.fromInvProjectionMatrix=function(e,i,o){var r=Math.pow(2,o),a=[,[1,1,-1,1],,[-1,-1,-1,1],,[1,1,1,1],,[-1,-1,1,1]].map((function(i){return t.transformMat4([],i,e)})).map((function(e){return t.scale$1([],e,1/e/i*r)})),n=[,[6,5,4],,[2,1,5],,[0,4,5]].map((function(e){var i=t.sub([],a[e],a[e]),o=t.sub([],a[e],a[e]),r=t.normalize([],t.cross(,i,o)),n=-t.dot(r,a[e]);return r.concat(n)}));return new _o(a,n)};var fo=function(e,i){this.min=e,this.max=i,this.center=t.scale$2([],t.add(,this.min,this.max),.5);};fo.prototype.quadrant=function(e){for(var i=,o=t.clone$2(this.min),r=t.clone$2(this.max),a=0;an
”/“s
”/“o:o
”/“s
”/“+n,(l||c)&&(u+=”/“+Math.round(10*l)/10),c&&(u+=”/“+Math.round©),this._hashName){var h=this._hashName,p=!1,d=t.window.location.hash.slice(1).split(”&“).map((function(t){var e=t.split(”=“);return e===h?(p=!0,e+”=“+u):t})).filter((function(t){return t}));return p||d.push(h+”=“+u),”#“+d.join(”&“)}return ”#“+u},vo.prototype._getCurrentHash=function(){var e,i=this,o=t.window.location.hash.replace(”#“,”“);return this._hashName?(o.split(”&“).map((function(t){return t.split(”=“)})).forEach((function(t){t===i._hashName&&(e=t);})),(e&&e||”“).split(”/“)):o.split(”/“)},vo.prototype._onHashChange=function(){var t=this._getCurrentHash();if(t.length>=3&&!t.some((function(t){return isNaN(t)}))){var e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t||0):this._map.getBearing();return this._map.jumpTo({center:[+t,+t],zoom:+t,bearing:e,pitch:+(t||0)}),!0}return !1},vo.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,”“,e);}catch(t){}};var yo=function(e){function o(o,r,a,n){void 0===n&&(n={});var s=i.mousePos(r.getCanvasContainer(),a),l=r.unproject(s);e.call(this,o,t.extend({point:s,lngLat:l,originalEvent:a},n)),this._defaultPrevented=!1,this.target=r;}e&&(o.__proto__=e),o.prototype=Object.create(e&&e.prototype),o.prototype.constructor=o;var r={defaultPrevented:{configurable:!0}};return o.prototype.preventDefault=function(){this._defaultPrevented=!0;},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(o.prototype,r),o}(t.Event),xo=function(e){function o(o,r,a){var n=i.touchPos(r.getCanvasContainer(),a),s=n.map((function(t){return r.unproject(t)})),l=n.reduce((function(t,e,i,o){return t.add(e.div(o.length))}),new t.Point(0,0)),c=r.unproject(l);e.call(this,o,{points:n,point:l,lngLats:s,lngLat:c,originalEvent:a}),this._defaultPrevented=!1;}e&&(o.__proto__=e),o.prototype=Object.create(e&&e.prototype),o.prototype.constructor=o;var r={defaultPrevented:{configurable:!0}};return o.prototype.preventDefault=function(){this._defaultPrevented=!0;},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(o.prototype,r),o}(t.Event),bo=function(t){function e(e,i,o){t.call(this,e,{originalEvent:o}),this._defaultPrevented=!1;}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0;},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,i),e}(t.Event),wo=function(e){this._map=e,this._el=e.getCanvasContainer(),this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,t.bindAll(,this);};wo.prototype.setZoomRate=function(t){this._defaultZoomRate=t;},wo.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t;},wo.prototype.isEnabled=function(){return !!this._enabled},wo.prototype.isActive=function(){return !!this._active},wo.prototype.isZooming=function(){return !!this._zooming},wo.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&”center“===t.around);},wo.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1);},wo.prototype.onWheel=function(e){if(this.isEnabled()){var i=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,o=t.browser.now(),r=o-(this._lastWheelEventTime||0);this._lastWheelEventTime=o,0!==i&&i%4.000244140625==0?this._type=”wheel“:0!==i&&Math.abs(i)<4?this._type=”trackpad“:r>400?(this._type=null,this._lastValue=i,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(r*i)<200?”trackpad“:”wheel“,this._timeout&&(clearTimeout(this._timeout),this._timeout=null,i+=this._lastValue)),e.shiftKey&&i&&(i/=4),this._type&&(this._lastWheelEvent=e,this._delta-=i,this.isActive()||this._start(e)),e.preventDefault();}},wo.prototype._onTimeout=function(t){this._type=”wheel“,this._delta-=this._lastValue,this.isActive()||this._start(t);},wo.prototype._start=function(e){if(this._delta){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0,this._map.fire(new t.Event(”movestart“,{originalEvent:e})),this._map.fire(new t.Event(”zoomstart“,{originalEvent:e}))),this._finishTimeout&&clearTimeout(this._finishTimeout);var o=i.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(o)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame));}},wo.prototype._onScrollFrame=function(){var e=this;if(this._frameId=null,this.isActive()){var i=this._map.transform;if(0!==this._delta){var o=”wheel“===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,r=2/(1+Math.exp(-Math.abs(this._delta*o)));this._delta<0&&0!==r&&(r=1/r);var a=”number“==typeof this._targetZoom?i.zoomScale(this._targetZoom):i.scale;this._targetZoom=Math.min(i.maxZoom,Math.max(i.minZoom,i.scaleZoom(a*r))),”wheel“===this._type&&(this._startZoom=i.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0;}var n=”number“==typeof this._targetZoom?this._targetZoom:i.zoom,s=this._startZoom,l=this._easing,c=!1;if(”wheel“===this._type&&s&&l){var u=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=l(u);i.zoom=t.number(s,n,h),u<1?this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame)):c=!0;}else i.zoom=n,c=!0;i.setLocationAtPoint(this._around,this._aroundPoint),this._map.fire(new t.Event(”move“,{originalEvent:this._lastWheelEvent})),this._map.fire(new t.Event(”zoom“,{originalEvent:this._lastWheelEvent})),c&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._zooming=!1,e._map.fire(new t.Event(”zoomend“,{originalEvent:e._lastWheelEvent})),e._map.fire(new t.Event(”moveend“,{originalEvent:e._lastWheelEvent})),delete e._targetZoom;}),200));}},wo.prototype._smoothOutEasing=function(e){var i=t.ease;if(this._prevEase){var o=this._prevEase,r=(t.browser.now()-o.start)/o.duration,a=o.easing(r+.01)-o.easing®,n=.27/Math.sqrt(a*a+1e-4)*.01,s=Math.sqrt(.0729-n*n);i=t.bezier(n,s,.25,1);}return this._prevEase={start:t.browser.now(),duration:e,easing:i},i};var Eo=function(e,i){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=i.clickTolerance||1,t.bindAll(,this);};Eo.prototype.isEnabled=function(){return !!this._enabled},Eo.prototype.isActive=function(){return !!this._active},Eo.prototype.enable=function(){this.isEnabled()||(this._enabled=!0);},Eo.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1);},Eo.prototype.onMouseDown=function(e){this.isEnabled()&&e.shiftKey&&0===e.button&&(t.window.document.addEventListener(”mousemove“,this._onMouseMove,!1),t.window.document.addEventListener(”keydown“,this._onKeyDown,!1),t.window.document.addEventListener(”mouseup“,this._onMouseUp,!1),i.disableDrag(),this._startPos=this._lastPos=i.mousePos(this._el,e),this._active=!0);},Eo.prototype._onMouseMove=function(t){var e=i.mousePos(this._el,t);if(!(this._lastPos.equals(e)||!this._box&&e.dist(this._startPos)<this._clickTolerance)){var o=this._startPos;this._lastPos=e,this._box||(this._box=i.create(”div“,”mapboxgl-boxzoom“,this._container),this._container.classList.add(”mapboxgl-crosshair“),this._fireEvent(”boxzoomstart“,t));var r=Math.min(o.x,e.x),a=Math.max(o.x,e.x),n=Math.min(o.y,e.y),s=Math.max(o.y,e.y);i.setTransform(this._box,”translate(“r
”px,“n
”px)“),this._box.style.width=a-r+”px“,this._box.style.height=s-n+”px“;}},Eo.prototype._onMouseUp=function(e){if(0===e.button){var o=this._startPos,r=i.mousePos(this._el,e);this._finish(),i.suppressClick(),o.x===r.x&&o.y===r.y?this._fireEvent(”boxzoomcancel“,e):this._map.fitScreenCoordinates(o,r,this._map.getBearing(),{linear:!0}).fire(new t.Event(”boxzoomend“,{originalEvent:e}));}},Eo.prototype._onKeyDown=function(t){27===t.keyCode&&(this._finish(),this._fireEvent(”boxzoomcancel“,t));},Eo.prototype._finish=function(){this._active=!1,t.window.document.removeEventListener(”mousemove“,this._onMouseMove,!1),t.window.document.removeEventListener(”keydown“,this._onKeyDown,!1),t.window.document.removeEventListener(”mouseup“,this._onMouseUp,!1),this._container.classList.remove(”mapboxgl-crosshair“),this._box&&(i.remove(this._box),this._box=null),i.enableDrag(),delete this._startPos,delete this._lastPos;},Eo.prototype._fireEvent=function(e,i){return this._map.fire(new t.Event(e,{originalEvent:i}))};var To=t.bezier(0,0,.25,1),Io=function(e,i){this._map=e,this._el=i.element||e.getCanvasContainer(),this._state=”disabled“,this._button=i.button||”right“,this._bearingSnap=i.bearingSnap||0,this._pitchWithRotate=!1!==i.pitchWithRotate,this._clickTolerance=i.clickTolerance||1,t.bindAll(,this);};Io.prototype.isEnabled=function(){return ”disabled“!==this._state},Io.prototype.isActive=function(){return ”active“===this._state},Io.prototype.enable=function(){this.isEnabled()||(this._state=”enabled“);},Io.prototype.disable=function(){if(this.isEnabled())switch(this._state){case”active“:this._state=”disabled“,this._unbind(),this._deactivate(),this._fireEvent(”rotateend“),this._pitchWithRotate&&this._fireEvent(”pitchend“),this._fireEvent(”moveend“);break;case”pending“:this._state=”disabled“,this._unbind();break;default:this._state=”disabled“;}},Io.prototype.onMouseDown=function(e){if(”enabled“===this._state){var o=”touchstart“===e.type;if(o)this._startTime=Date.now();else if(”right“===this._button){if(this._eventButton=i.mouseButton(e),e.altKey||e.metaKey)return;if(this._eventButton!==(e.ctrlKey?0:2))return}else{if(e.ctrlKey||0!==i.mouseButton(e))return;this._eventButton=0;}i.disableDrag(),o?(t.window.document.addEventListener(”touchmove“,this._onMouseMove,{capture:!0}),t.window.document.addEventListener(”touchend“,this._onMouseUp)):(t.window.document.addEventListener(”mousemove“,this._onMouseMove,{capture:!0}),t.window.document.addEventListener(”mouseup“,this._onMouseUp)),t.window.addEventListener(”blur“,this._onBlur),this._state=”pending“,this._inertia=[],this._startPos=this._prevPos=this._lastPos=i.mousePos(this._el,e),this._center=this._map.transform.centerPoint,e.preventDefault();}},Io.prototype._onMouseMove=function(t){var e=i.mousePos(this._el,t);this._lastPos.equals(e)||”pending“===this._state&&e.dist(this._startPos)<this._clickTolerance||(this._lastMoveEvent=t,this._lastPos=e,”pending“===this._state&&(this._state=”active“,this._fireEvent(”rotatestart“,t),this._fireEvent(”movestart“,t),this._pitchWithRotate&&this._fireEvent(”pitchstart“,t)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame)));},Io.prototype._onDragFrame=function(){this._frameId=null;var e=this._lastMoveEvent;if(e){var i=this._map.transform,o=this._prevPos,r=this._lastPos,a=.8*(o.x-r.x),n=-.5*(o.y-r.y),s=i.bearing-a,l=i.pitch-n,c=this._inertia,u=c;this._drainInertiaBuffer(),c.push([t.browser.now(),this._map._normalizeBearing(s,u)]);var h=i.bearing;if(i.bearing=s,this._pitchWithRotate){var p=i.pitch;i.pitch=l,i.pitch!==p&&this._fireEvent(”pitch“,e);}i.bearing!==h&&this._fireEvent(”rotate“,e),this._fireEvent(”move“,e),delete this._lastMoveEvent,this._prevPos=this._lastPos;}},Io.prototype._onMouseUp=function(t){var e=”touchend“===t.type;if(e&&this._startPos===this._lastPos&&Date.now()-this._startTime<300&&this._el.click(),e||i.mouseButton(t)===this._eventButton)switch(this._state){case”active“:this._state=”enabled“,i.suppressClick(),this._unbind(),this._deactivate(),this._inertialRotate(t);break;case”pending“:this._state=”enabled“,this._unbind();}},Io.prototype._onBlur=function(t){switch(this._state){case”active“:this._state=”enabled“,this._unbind(),this._deactivate(),this._fireEvent(”rotateend“,t),this._pitchWithRotate&&this._fireEvent(”pitchend“,t),this._fireEvent(”moveend“,t);break;case”pending“:this._state=”enabled“,this._unbind();}},Io.prototype._unbind=function(){t.window.document.removeEventListener(”mousemove“,this._onMouseMove,{capture:!0}),t.window.document.removeEventListener(”mouseup“,this._onMouseUp),t.window.document.removeEventListener(”touchmove“,this._onMouseMove,{capture:!0}),t.window.document.removeEventListener(”touchend“,this._onMouseUp),t.window.removeEventListener(”blur“,this._onBlur),i.enableDrag();},Io.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._startPos,delete this._prevPos,delete this._lastPos;},Io.prototype._inertialRotate=function(t){var e=this;this._fireEvent(”rotateend“,t),this._drainInertiaBuffer();var i=this._map,o=i.getBearing(),r=this._inertia,a=function(){Math.abs(o)<e._bearingSnap?i.resetNorth({noMoveStart:!0},{originalEvent:t}):e._fireEvent(”moveend“,t),e._pitchWithRotate&&e._fireEvent(”pitchend“,t);};if(r.length<2)a();else{var n=r,s=r,l=r,c=i._normalizeBearing(o,l),u=s-n,h=u<0?-1:1,p=(s-n)/1e3;if(0!==u&&0!==p){var d=Math.abs(u*(.25/p));d>180&&(d=180);var _=d/180;c+=h*d*(_/2),Math.abs(i._normalizeBearing(c,0))<this._bearingSnap&&(c=i._normalizeBearing(0,c)),i.rotateTo(c,{duration:1e3*_,easing:To,noMoveStart:!0},{originalEvent:t});}else a();}},Io.prototype._fireEvent=function(e,i){return this._map.fire(new t.Event(e,i?{originalEvent:i}:{}))},Io.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,i=t.browser.now();e.length>0&&i-e[0]>160;)e.shift();};var So={linearity:.3,easing:t.bezier(0,0,.3,1),maxSpeed:1400,deceleration:2500},Co=function(e,i){this._map=e,this._el=e.getCanvasContainer(),this._state=”disabled“,this._clickTolerance=i.clickTolerance||1,this._inertiaOptions=So,t.bindAll(,this);};Co.prototype.isEnabled=function(){return ”disabled“!==this._state},Co.prototype.isActive=function(){return ”active“===this._state},Co.prototype.enable=function(e){this.isEnabled()||(this._el.classList.add(”mapboxgl-touch-drag-pan“),this._state=”enabled“,this._inertiaOptions=t.extend(So,e));},Co.prototype.disable=function(){if(this.isEnabled())switch(this._el.classList.remove(”mapboxgl-touch-drag-pan“),this._state){case”active“:this._state=”disabled“,this._unbind(),this._deactivate(),this._fireEvent(”dragend“),this._fireEvent(”moveend“);break;case”pending“:this._state=”disabled“,this._unbind();break;default:this._state=”disabled“;}},Co.prototype.onMouseDown=function(e){”enabled“===this._state&&(e.ctrlKey||0!==i.mouseButton(e)||(i.addEventListener(t.window.document,”mousemove“,this._onMove,{capture:!0}),i.addEventListener(t.window.document,”mouseup“,this._onMouseUp),this._start(e)));},Co.prototype.onTouchStart=function(e){this.isEnabled()&&(e.touches&&e.touches.length>1&&(”pending“===this._state||”active“===this._state)||(i.addEventListener(t.window.document,”touchmove“,this._onMove,{capture:!0,passive:!1}),i.addEventListener(t.window.document,”touchend“,this._onTouchEnd),this._start(e)));},Co.prototype._start=function(e){t.window.addEventListener(”blur“,this._onBlur),this._state=”pending“,this._startPos=this._mouseDownPos=this._prevPos=this._lastPos=i.mousePos(this._el,e),this._startTouch=this._lastTouch=t.window.TouchEvent&&e instanceof t.window.TouchEvent?i.touchPos(this._el,e):null,this._inertia=[];},Co.prototype._touchesMatch=function(t,e){return !(!t||!e||t.length!==e.length)&&t.every((function(t,i){return e===t}))},Co.prototype._onMove=function(e){e.preventDefault();var o=t.window.TouchEvent&&e instanceof t.window.TouchEvent?i.touchPos(this._el,e):null,r=i.mousePos(this._el,e);(o?this._touchesMatch(this._lastTouch,o):this._lastPos.equals®)||”pending“===this._state&&r.dist(this._mouseDownPos)e.value
(o<i.length-1?”&“:”“)),t}),”?“);e.href=t.config.FEEDBACK_URL+”/“o
(this._map._hash?this._map._hash.getHashString(!0):”“),e.rel=”noopener nofollow“;}},ko.prototype._updateData=function(t){!t||”metadata“!==t.sourceDataType&&”style“!==t.dataType||(this._updateAttributions(),this._updateEditLink());},ko.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=t.concat(this.options.customAttribution.map((function(t){return ”string“!=typeof t?”“:t}))):”string“==typeof this.options.customAttribution&&t.push(this.options.customAttribution)),this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id;}var i=this._map.style.sourceCaches;for(var o in i){var r=i;if(r.used){var a=r.getSource();a.attribution&&t.indexOf(a.attribution)<0&&t.push(a.attribution);}}t.sort((function(t,e){return t.length-e.length}));var n=(t=t.filter((function(e,i){for(var o=i+1;oe.container
”' not found.“)}else{if(!(e.container instanceof No))throw new Error(”Invalid type: 'container' must be a String or HTMLElement.“);this._container=e.container;}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll(,this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error(”Failed to initialize WebGL.“);this.on(”move“,(function(){return r._update(!1)})),this.on(”moveend“,(function(){return r._update(!1)})),this.on(”zoom“,(function(){return r._update(!0)})),void 0!==t.window&&(t.window.addEventListener(”online“,this._onWindowOnline,!1),t.window.addEventListener(”resize“,this._onWindowResize,!1)),function(t,e){var o=t.getCanvasContainer(),r=null,a=!1,n=null;for(var s in Ao)t=new Ao(t,e),e.interactive&&e&&t.enable(e);i.addEventListener(o,”mouseout“,(function(e){t.fire(new yo(”mouseout“,t,e));})),i.addEventListener(o,”mousedown“,(function®{a=!0,n=i.mousePos(o,r);var s=new yo(”mousedown“,t,r);if(t.fire(s),s.defaultPrevented)return;e.interactive&&!t.doubleClickZoom.isActive()&&t.stop();t.boxZoom.onMouseDown®,t.boxZoom.isActive()||t.dragPan.isActive()||t.dragRotate.onMouseDown®;t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onMouseDown®;})),i.addEventListener(o,”mouseup“,(function(e){var i=t.dragRotate.isActive();r&&!i&&t.fire(new yo(”contextmenu“,t,r));r=null,a=!1,t.fire(new yo(”mouseup“,t,e));})),i.addEventListener(o,”mousemove“,(function(e){if(t.dragPan.isActive())return;if(t.dragRotate.isActive())return;var i=e.target;for(;i&&i!==o;)i=i.parentNode;if(i!==o)return;t.fire(new yo(”mousemove“,t,e));})),i.addEventListener(o,”mouseover“,(function(e){var i=e.target;for(;i&&i!==o;)i=i.parentNode;if(i!==o)return;t.fire(new yo(”mouseover“,t,e));})),i.addEventListener(o,”touchstart“,(function(i){var o=new xo(”touchstart“,t,i);if(t.fire(o),o.defaultPrevented)return;e.interactive&&t.stop();t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onTouchStart(i);t.touchZoomRotate.onStart(i),t.doubleClickZoom.onTouchStart(o);}),{passive:!1}),i.addEventListener(o,”touchmove“,(function(e){t.fire(new xo(”touchmove“,t,e));}),{passive:!1}),i.addEventListener(o,”touchend“,(function(e){t.fire(new xo(”touchend“,t,e));})),i.addEventListener(o,”touchcancel“,(function(e){t.fire(new xo(”touchcancel“,t,e));})),i.addEventListener(o,”click“,(function®{var a=i.mousePos(o,r);(!n||a.equals(n)||a.dist(n)<e.clickTolerance)&&t.fire(new yo(”click“,t,r));})),i.addEventListener(o,”dblclick“,(function(e){var i=new yo(”dblclick“,t,e);if(t.fire(i),i.defaultPrevented)return;t.doubleClickZoom.onDblClick(i);})),i.addEventListener(o,”contextmenu“,(function(e){var i=t.dragRotate.isActive();a||i?a&&(r=e):t.fire(new yo(”contextmenu“,t,e));(t.dragRotate.isEnabled()||t.listens(”contextmenu“))&&e.preventDefault();})),i.addEventListener(o,”wheel“,(function(i){e.interactive&&t.stop();var o=new bo(”wheel“,t,i);if(t.fire(o),o.defaultPrevented)return;t.scrollZoom.onWheel(i);}),{passive:!1});}(this,e);var n=”string“==typeof e.hash&&e.hash||void 0;this._hash=e.hash&&new vo(n).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new ko({customAttribution:e.customAttribution})),this.addControl(new Bo,e.logoPosition),this.on(”style.load“,(function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet);})),this.on(”data“,(function(e){r._update(”style“===e.dataType),r.fire(new t.Event(e.dataType+”data“,e));})),this.on(”dataloading“,(function(e){r.fire(new t.Event(e.dataType+”dataloading“,e));}));}o&&(r.__proto__=o),r.prototype=Object.create(o&&o.prototype),r.prototype.constructor=r;var a={showTileBoundaries:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return r.prototype._getMapId=function(){return this._mapId},r.prototype.addControl=function(e,i){if(void 0===i&&e.getDefaultPosition&&(i=e.getDefaultPosition()),void 0===i&&(i=”top-right“),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error(”Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.“)));var o=e.onAdd(this);this._controls.push(e);var r=this._controlPositions;return -1!==i.indexOf(”bottom“)?r.insertBefore(o,r.firstChild):r.appendChild(o),this},r.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error(”Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.“)));var i=this._controls.indexOf(e);return i>-1&&this._controls.splice(i,1),e.onRemove(this),this},r.prototype.resize=function(e){var i=this._containerDimensions(),o=i,r=i;return this._resizeCanvas(o,r),this.transform.resize(o,r),this.painter.resize(o,r),this.fire(new t.Event(”movestart“,e)).fire(new t.Event(”move“,e)).fire(new t.Event(”resize“,e)).fire(new t.Event(”moveend“,e)),this},r.prototype.getBounds=function(){return this.transform.getBounds()},r.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},r.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},r.prototype.setMinZoom=function(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()<t&&this.setZoom(t),this;throw new Error(”minZoom must be between -2 and the current maxZoom, inclusive“)},r.prototype.getMinZoom=function(){return this.transform.minZoom},r.prototype.setMaxZoom=function(t){if((t=null==t?22:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error(”maxZoom must be greater than the current minZoom“)},r.prototype.getMaxZoom=function(){return this.transform.maxZoom},r.prototype.setMinPitch=function(t){if((t=null==t?qo:t)<qo)throw new Error(”minPitch must be greater than or equal to “+qo);if(t>=qo&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()<t&&this.setPitch(t),this;throw new Error(”minPitch must be between “qo
” and the current maxPitch, inclusive“)},r.prototype.getMinPitch=function(){return this.transform.minPitch},r.prototype.setMaxPitch=function(t){if((t=null==t?jo:t)>jo)throw new Error(”maxPitch must be less than or equal to “+jo);if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t&&this.setPitch(t),this;throw new Error(”maxPitch must be greater than the current minPitch“)},r.prototype.getMaxPitch=function(){return this.transform.maxPitch},r.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},r.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},r.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},r.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},r.prototype.isMoving=function(){return this._moving||this.dragPan.isActive()||this.dragRotate.isActive()||this.scrollZoom.isActive()},r.prototype.isZooming=function(){return this._zooming||this.scrollZoom.isZooming()},r.prototype.isRotating=function(){return this._rotating||this.dragRotate.isActive()},r.prototype._createDelegatedListener=function(t,e,i){var o,r=this;if(”mouseenter“===t||”mouseover“===t){var a=!1;return {layer:e,listener:i,delegates:{mousemove:function(o){var n=r.getLayer(e)?r.queryRenderedFeatures(o.point,{layers:}):[];n.length?a||(a=!0,i.call(r,new yo(t,r,o.originalEvent,{features:n}))):a=!1;},mouseout:function(){a=!1;}}}}if(”mouseleave“===t||”mouseout“===t){var n=!1;return {layer:e,listener:i,delegates:{mousemove:function(o){(r.getLayer(e)?r.queryRenderedFeatures(o.point,{layers:}):[]).length?n=!0:n&&(n=!1,i.call(r,new yo(t,r,o.originalEvent)));},mouseout:function(e){n&&(n=!1,i.call(r,new yo(t,r,e.originalEvent)));}}}}return {layer:e,listener:i,delegates:(o={},o=function(t){var o=r.getLayer(e)?r.queryRenderedFeatures(t.point,{layers:}):[];o.length&&(t.features=o,i.call(r,t),delete t.features);},o)}},r.prototype.on=function(t,e,i){if(void 0===i)return o.prototype.on.call(this,t,e);var r=this._createDelegatedListener(t,e,i);for(var a in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners=this._delegatedListeners||[],this._delegatedListeners.push®,r.delegates)this.on(a,r.delegates);return this},r.prototype.once=function(t,e,i){if(void 0===i)return o.prototype.once.call(this,t,e);var r=this._createDelegatedListener(t,e,i);for(var a in r.delegates)this.once(a,r.delegates);return this},r.prototype.off=function(t,e,i){var r=this;if(void 0===i)return o.prototype.off.call(this,t,e);return this._delegatedListeners&&this._delegatedListeners&&function(o){for(var a=o,n=0;n<a.length;n++){var s=a;if(s.layer===e&&s.listener===i){for(var l in s.delegates)r.off(l,s.delegates);return a.splice(n,1),r}}}(this._delegatedListeners),this},r.prototype.queryRenderedFeatures=function(e,i){if(!this.style)return [];var o;if(void 0!==i||void 0===e||e instanceof t.Point||Array.isArray(e)||(i=e,e=void 0),i=i||{},(e=e||[,[this.transform.width,this.transform.height]])instanceof t.Point||”number“==typeof e)o=;else{var r=t.Point.convert(e),a=t.Point.convert(e);o=[r,new t.Point(a.x,r.y),a,new t.Point(r.x,a.y),r];}return this.style.queryRenderedFeatures(o,i,this.transform)},r.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},r.prototype.setStyle=function(e,i){return !1!==(i=t.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},i)).diff&&i.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,i),this):(this._localIdeographFontFamily=i.localIdeographFontFamily,this._updateStyle(e,i))},r.prototype._getUIString=function(t){var e=this._locale;if(null==e)throw new Error(”Missing UI string '“t
”'“);return e},r.prototype._updateStyle=function(t,e){return this.style&&(this.style.setEventedParent(null),this.style._remove()),t?(this.style=new Ze(this,e||{}),this.style.setEventedParent(this,{style:this.style}),”string“==typeof t?this.style.loadURL(t):this.style.loadJSON(t),this):(delete this.style,this)},r.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new Ze(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty());},r.prototype._diffStyle=function(e,i){var o=this;if(”string“==typeof e){var r=this._requestManager.normalizeStyleURL(e),a=this._requestManager.transformRequest(r,t.ResourceType.Style);t.getJSON(a,(function(e,r){e?o.fire(new t.ErrorEvent(e)):r&&o._updateDiff(r,i);}));}else”object“==typeof e&&this._updateDiff(e,i);},r.prototype._updateDiff=function(e,i){try{this.style.setState(e)&&this._update(!0);}catch(o){t.warnOnce(”Unable to perform style diff: “+(o.message||o.error||o)+”. Rebuilding the style from scratch.“),this._updateStyle(e,i);}},r.prototype.getStyle=function(){if(this.style)return this.style.serialize()},r.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce(”There is no style added to the map.“)},r.prototype.addSource=function(t,e){return this._lazyInitEmptyStyle(),this.style.addSource(t,e),this._update(!0)},r.prototype.isSourceLoaded=function(e){var i=this.style&&this.style.sourceCaches;if(void 0!==i)return i.loaded();this.fire(new t.ErrorEvent(new Error(”There is no source with ID '“e
”'“)));},r.prototype.areTilesLoaded=function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var i=t._tiles;for(var o in i){var r=i;if(”loaded“!==r.state&&”errored“!==r.state)return !1}}return !0},r.prototype.addSourceType=function(t,e,i){return this._lazyInitEmptyStyle(),this.style.addSourceType(t,e,i)},r.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0)},r.prototype.getSource=function(t){return this.style.getSource(t)},r.prototype.addImage=function(e,i,o){void 0===o&&(o={});var r=o.pixelRatio;void 0===r&&(r=1);var a=o.sdf;void 0===a&&(a=!1);var n=o.stretchX,s=o.stretchY,l=o.content;this._lazyInitEmptyStyle();if(i instanceof Uo||Zo&&i instanceof Zo){var c=t.browser.getImageData(i),u=c.width,h=c.height,p=c.data;this.style.addImage(e,{data:new t.RGBAImage({width:u,height:h},p),pixelRatio:r,stretchX:n,stretchY:s,content:l,sdf:a,version:0});}else{if(void 0===i.width||void 0===i.height)return this.fire(new t.ErrorEvent(new Error(”Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`“)));var d=i.width,_=i.height,f=i.data,m=i;this.style.addImage(e,{data:new t.RGBAImage({width:d,height:_},new Uint8Array(f)),pixelRatio:r,stretchX:n,stretchY:s,content:l,sdf:a,version:0,userImage:m}),m.onAdd&&m.onAdd(this,e);}},r.prototype.updateImage=function(e,i){var o=this.style.getImage(e);if(!o)return this.fire(new t.ErrorEvent(new Error(”The map has no image with that id. If you are adding a new image use `map.addImage(…)` instead.“)));var r=i instanceof Uo||Zo&&i instanceof Zo?t.browser.getImageData(i):i,a=r.width,n=r.height,s=r.data;if(void 0===a||void 0===n)return this.fire(new t.ErrorEvent(new Error(”Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`“)));if(a!==o.data.width||n!==o.data.height)return this.fire(new t.ErrorEvent(new Error(”The width and height of the updated image must be that same as the previous version of the image“)));var l=!(i instanceof Uo||Zo&&i instanceof Zo);o.data.replace(s,l),this.style.updateImage(e,o);},r.prototype.hasImage=function(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error(”Missing required image id“))),!1)},r.prototype.removeImage=function(t){this.style.removeImage(t);},r.prototype.loadImage=function(e,i){t.getImage(this._requestManager.transformRequest(e,t.ResourceType.Image),i);},r.prototype.listImages=function(){return this.style.listImages()},r.prototype.addLayer=function(t,e){return this._lazyInitEmptyStyle(),this.style.addLayer(t,e),this._update(!0)},r.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0)},r.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0)},r.prototype.getLayer=function(t){return this.style.getLayer(t)},r.prototype.setLayerZoomRange=function(t,e,i){return this.style.setLayerZoomRange(t,e,i),this._update(!0)},r.prototype.setFilter=function(t,e,i){return void 0===i&&(i={}),this.style.setFilter(t,e,i),this._update(!0)},r.prototype.getFilter=function(t){return this.style.getFilter(t)},r.prototype.setPaintProperty=function(t,e,i,o){return void 0===o&&(o={}),this.style.setPaintProperty(t,e,i,o),this._update(!0)},r.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},r.prototype.setLayoutProperty=function(t,e,i,o){return void 0===o&&(o={}),this.style.setLayoutProperty(t,e,i,o),this._update(!0)},r.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},r.prototype.setLight=function(t,e){return void 0===e&&(e={}),this._lazyInitEmptyStyle(),this.style.setLight(t,e),this._update(!0)},r.prototype.getLight=function(){return this.style.getLight()},r.prototype.setFeatureState=function(t,e){return this.style.setFeatureState(t,e),this._update()},r.prototype.removeFeatureState=function(t,e){return this.style.removeFeatureState(t,e),this._update()},r.prototype.getFeatureState=function(t){return this.style.getFeatureState(t)},r.prototype.getContainer=function(){return this._container},r.prototype.getCanvasContainer=function(){return this._canvasContainer},r.prototype.getCanvas=function(){return this._canvas},r.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.clientWidth||400,e=this._container.clientHeight||300),},r.prototype._detectMissingCSS=function(){”rgb(250, 128, 114)“!==t.window.getComputedStyle(this._missingCSSCanary).getPropertyValue(”background-color“)&&t.warnOnce(”This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in www.mapbox.com/mapbox-gl-js/api/.“);},r.prototype._setupContainer=function(){var t=this._container;t.classList.add(”mapboxgl-map“),(this._missingCSSCanary=i.create(”div“,”mapboxgl-canary“,t)).style.visibility=”hidden“,this._detectMissingCSS();var e=this._canvasContainer=i.create(”div“,”mapboxgl-canvas-container“,t);this._interactive&&e.classList.add(”mapboxgl-interactive“),this._canvas=i.create(”canvas“,”mapboxgl-canvas“,e),this._canvas.style.position=”absolute“,this._canvas.addEventListener(”webglcontextlost“,this._contextLost,!1),this._canvas.addEventListener(”webglcontextrestored“,this._contextRestored,!1),this._canvas.setAttribute(”tabindex“,”0“),this._canvas.setAttribute(”aria-label“,”Map“);var o=this._containerDimensions();this._resizeCanvas(o,o);var r=this._controlContainer=i.create(”div“,”mapboxgl-control-container“,t),a=this._controlPositions={};[”top-left“,”top-right“,”bottom-left“,”bottom-right“].forEach((function(t){a=i.create(”div“,”mapboxgl-ctrl-“+t,r);}));},r.prototype._resizeCanvas=function(e,i){var o=t.browser.devicePixelRatio||1;this._canvas.width=o*e,this._canvas.height=o*i,this._canvas.style.width=e+”px“,this._canvas.style.height=i+”px“;},r.prototype._setupPainter=function(){var i=t.extend({},e.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),o=this._canvas.getContext(”webgl“,i)||this._canvas.getContext(”experimental-webgl“,i);o?(this.painter=new po(o,this.transform),t.webpSupported.testSupport(o)):this.fire(new t.ErrorEvent(new Error(”Failed to initialize WebGL“)));},r.prototype._contextLost=function(e){e.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new t.Event(”webglcontextlost“,{originalEvent:e}));},r.prototype._contextRestored=function(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event(”webglcontextrestored“,{originalEvent:e}));},r.prototype.loaded=function(){return !this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},r.prototype._update=function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this.triggerRepaint(),this):this},r.prototype._requestRenderFrame=function(t){return this._update(),this._renderTaskQueue.add(t)},r.prototype._cancelRenderFrame=function(t){this._renderTaskQueue.remove(t);},r.prototype._render=function(){var e,i=this,o=0,r=this.painter.context.extTimerQuery;this.listens(”gpu-timing-frame“)&&(e=r.createQueryEXT(),r.beginQueryEXT(r.TIME_ELAPSED_EXT,e),o=t.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run();var a=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var n=this.transform.zoom,s=t.browser.now();this.style.zoomHistory.update(n,s);var l=new t.EvaluationParameters(n,{now:s,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),c=l.crossFadingFactor();1===c&&c===this._crossFadingFactor||(a=!0,this._crossFadingFactor=c),this.style.update(l);}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),gpuTiming:!!this.listens(”gpu-timing-layer“),fadeDuration:this._fadeDuration}),this.fire(new t.Event(”render“)),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.Event(”load“))),this.style&&(this.style.hasTransitions()||a)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens(”gpu-timing-frame“)){var u=t.browser.now()-o;r.endQueryEXT(r.TIME_ELAPSED_EXT,e),setTimeout((function(){var o=r.getQueryObjectEXT(e,r.QUERY_RESULT_EXT)/1e6;r.deleteQueryEXT(e),i.fire(new t.Event(”gpu-timing-frame“,{cpuTime:u,gpuTime:o}));}),50);}if(this.listens(”gpu-timing-layer“)){var h=this.painter.collectGpuTimers();setTimeout((function(){var e=i.painter.queryGpuTimers(h);i.fire(new t.Event(”gpu-timing-layer“,{layerTimes:e}));}),50);}return this._sourcesDirty||this._styleDirty||this._placementDirty||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&(this._fullyLoaded||(this._fullyLoaded=!0),this.fire(new t.Event(”idle“))),this},r.prototype.remove=function(){this._hash&&this._hash.remove();for(var e=0,i=this._controls;e<i.length;e+=1){i.onRemove(this);}this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.setStyle(null),void 0!==t.window&&(t.window.removeEventListener(”resize“,this._onWindowResize,!1),t.window.removeEventListener(”online“,this._onWindowOnline,!1));var o=this.painter.context.gl.getExtension(”WEBGL_lose_context“);o&&o.loseContext(),Wo(this._canvasContainer),Wo(this._controlContainer),Wo(this._missingCSSCanary),this._container.classList.remove(”mapboxgl-map“),this.fire(new t.Event(”remove“));},r.prototype.triggerRepaint=function(){var e=this;this.style&&!this._frame&&(this._frame=t.browser.frame((function(t){e._frame=null,e._render();})));},r.prototype._onWindowOnline=function(){this._update();},r.prototype._onWindowResize=function(t){this._trackResize&&this.resize({originalEvent:t})._update();},a.showTileBoundaries.get=function(){return !!this._showTileBoundaries},a.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update());},a.showCollisionBoxes.get=function(){return !!this._showCollisionBoxes},a.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update());},a.showOverdrawInspector.get=function(){return !!this._showOverdrawInspector},a.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update());},a.repaint.get=function(){return !!this._repaint},a.repaint.set=function(t){this._repaint!==t&&(this._repaint=t,this.triggerRepaint());},a.vertices.get=function(){return !!this._vertices},a.vertices.set=function(t){this._vertices=t,this._update();},r.prototype._setCacheLimits=function(e,i){t.setCacheLimits(e,i);},a.version.get=function(){return t.version},Object.defineProperties(r.prototype,a),r}(Ro);function Wo(t){t.parentNode&&t.parentNode.removeChild(t);}var Xo={showCompass:!0,showZoom:!0,visualizePitch:!1},Ho=function(e){var o=this;this.options=t.extend({},Xo,e),this._container=i.create(”div“,”mapboxgl-ctrl mapboxgl-ctrl-group“),this._container.addEventListener(”contextmenu“,(function(t){return t.preventDefault()})),this.options.showZoom&&(t.bindAll(,this),this._zoomInButton=this._createButton(”mapboxgl-ctrl-zoom-in“,(function(t){return o._map.zoomIn({},{originalEvent:t})})),i.create(”span“,”mapboxgl-ctrl-icon“,this._zoomInButton).setAttribute(”aria-hidden“,!0),this._zoomOutButton=this._createButton(”mapboxgl-ctrl-zoom-out“,(function(t){return o._map.zoomOut({},{originalEvent:t})})),i.create(”span“,”mapboxgl-ctrl-icon“,this._zoomOutButton).setAttribute(”aria-hidden“,!0)),this.options.showCompass&&(t.bindAll(,this),this._compass=this._createButton(”mapboxgl-ctrl-compass“,(function(t){o.options.visualizePitch?o._map.resetNorthPitch({},{originalEvent:t}):o._map.resetNorth({},{originalEvent:t});})),this._compassIcon=i.create(”span“,”mapboxgl-ctrl-icon“,this._compass),this._compassIcon.setAttribute(”aria-hidden“,!0));};function Ko(e,i,o){if(e=new t.LngLat(e.lng,e.lat),i){var r=new t.LngLat(e.lng-360,e.lat),a=new t.LngLat(e.lng+360,e.lat),n=o.locationPoint(e).distSqr(i);o.locationPoint®.distSqr(i)<n?e=r:o.locationPoint(a).distSqr(i)<n&&(e=a);}for(;Math.abs(e.lng-o.center.lng)>180;){var s=o.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=o.width&&s.y<=o.height)break;e.lng>o.center.lng?e.lng-=360:e.lng+=360;}return e}Ho.prototype._updateZoomButtons=function(){var t=this._map.getZoom();this._zoomInButton.disabled=t===this._map.getMaxZoom(),this._zoomOutButton.disabled=t===this._map.getMinZoom();},Ho.prototype._rotateCompassArrow=function(){var t=this.options.visualizePitch?”scale(“+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+”) rotateX(“this._map.transform.pitch
”deg) rotateZ(“+this._map.transform.angle*(180/Math.PI)+”deg)“:”rotate(“+this._map.transform.angle*(180/Math.PI)+”deg)“;this._compassIcon.style.transform=t;},Ho.prototype.onAdd=function(t){return this._map=t,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,”ZoomIn“),this._setButtonTitle(this._zoomOutButton,”ZoomOut“),this._map.on(”zoom“,this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,”ResetBearing“),this.options.visualizePitch&&this._map.on(”pitch“,this._rotateCompassArrow),this._map.on(”rotate“,this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Io(t,{button:”left“,element:this._compass,clickTolerance:t.dragRotate._clickTolerance}),i.addEventListener(this._compass,”mousedown“,this._handler.onMouseDown),i.addEventListener(this._compass,”touchstart“,this._handler.onMouseDown,{passive:!1}),this._handler.enable()),this._container},Ho.prototype.onRemove=function(){i.remove(this._container),this.options.showZoom&&this._map.off(”zoom“,this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off(”pitch“,this._rotateCompassArrow),this._map.off(”rotate“,this._rotateCompassArrow),i.removeEventListener(this._compass,”mousedown“,this._handler.onMouseDown),i.removeEventListener(this._compass,”touchstart“,this._handler.onMouseDown,{passive:!1}),this._handler.disable(),delete this._handler),delete this._map;},Ho.prototype._createButton=function(t,e){var o=i.create(”button“,t,this._container);return o.type=”button“,o.addEventListener(”click“,e),o},Ho.prototype._setButtonTitle=function(t,e){var i=this._map._getUIString(”NavigationControl.“+e);t.title=i,t.setAttribute(”aria-label“,i);};var Yo={center:”translate(-50%,-50%)“,top:”translate(-50%,0)“,”top-left“:”translate(0,0)“,”top-right“:”translate(-100%,0)“,bottom:”translate(-50%,-100%)“,”bottom-left“:”translate(0,-100%)“,”bottom-right“:”translate(-100%,-100%)“,left:”translate(0,-50%)“,right:”translate(-100%,-50%)“};function Jo(t,e,i){var o=t.classList;for(var r in Yo)o.remove(”mapboxgl-“i
”-anchor-“+r);o.add(”mapboxgl-“i
”-anchor-“+e);}var Qo,$o=function(e){function o(o,r){var a=this;if(e.call(this),(o instanceof t.window.HTMLElement||r)&&(o=t.extend({element:o},r)),t.bindAll(,this),this._anchor=o&&o.anchor||”center“,this._color=o&&o.color||”#3FB1CE“,this._draggable=o&&o.draggable||!1,this._state=”inactive“,this._rotation=o&&o.rotation||0,this._rotationAlignment=o&&o.rotationAlignment||”auto“,this._pitchAlignment=o&&o.pitchAlignment&&”auto“!==o.pitchAlignment?o.pitchAlignment:this._rotationAlignment,o&&o.element)this._element=o.element,this._offset=t.Point.convert(o&&o.offset||);else{this._defaultMarker=!0,this._element=i.create(”div“),this._element.setAttribute(”aria-label“,”Map marker“);var n=i.createNS(”www.w3.org/2000/svg“,”svg“);n.setAttributeNS(null,”display“,”block“),n.setAttributeNS(null,”height“,”41px“),n.setAttributeNS(null,”width“,”27px“),n.setAttributeNS(null,”viewBox“,”0 0 27 41“);var s=i.createNS(”www.w3.org/2000/svg“,”g“);s.setAttributeNS(null,”stroke“,”none“),s.setAttributeNS(null,”stroke-width“,”1“),s.setAttributeNS(null,”fill“,”none“),s.setAttributeNS(null,”fill-rule“,”evenodd“);var l=i.createNS(”www.w3.org/2000/svg“,”g“);l.setAttributeNS(null,”fill-rule“,”nonzero“);var c=i.createNS(”www.w3.org/2000/svg“,”g“);c.setAttributeNS(null,”transform“,”translate(3.0, 29.0)“),c.setAttributeNS(null,”fill“,”#000000“);for(var u=0,h=;u<h.length;u+=1){var p=h,d=i.createNS(”www.w3.org/2000/svg“,”ellipse“);d.setAttributeNS(null,”opacity“,”0.04“),d.setAttributeNS(null,”cx“,”10.5“),d.setAttributeNS(null,”cy“,”5.80029008“),d.setAttributeNS(null,”rx“,p.rx),d.setAttributeNS(null,”ry“,p.ry),c.appendChild(d);}var _=i.createNS(”www.w3.org/2000/svg“,”g“);_.setAttributeNS(null,”fill“,this._color);var f=i.createNS(”www.w3.org/2000/svg“,”path“);f.setAttributeNS(null,”d“,”M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z“),_.appendChild(f);var m=i.createNS(”www.w3.org/2000/svg“,”g“);m.setAttributeNS(null,”opacity“,”0.25“),m.setAttributeNS(null,”fill“,”#000000“);var g=i.createNS(”www.w3.org/2000/svg“,”path“);g.setAttributeNS(null,”d“,”M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z“),m.appendChild(g);var v=i.createNS(”www.w3.org/2000/svg“,”g“);v.setAttributeNS(null,”transform“,”translate(6.0, 7.0)“),v.setAttributeNS(null,”fill“,”#FFFFFF“);var y=i.createNS(”www.w3.org/2000/svg“,”g“);y.setAttributeNS(null,”transform“,”translate(8.0, 8.0)“);var x=i.createNS(”www.w3.org/2000/svg“,”circle“);x.setAttributeNS(null,”fill“,”#000000“),x.setAttributeNS(null,”opacity“,”0.25“),x.setAttributeNS(null,”cx“,”5.5“),x.setAttributeNS(null,”cy“,”5.5“),x.setAttributeNS(null,”r“,”5.4999962“);var b=i.createNS(”http://www.w3.org/2000/svg“,”circle“);b.setAttributeNS(null,”fill“,”#FFFFFF“),b.setAttributeNS(null,”cx“,”5.5“),b.setAttributeNS(null,”cy“,”5.5“),b.setAttributeNS(null,”r“,”5.4999962“),y.appendChild(x),y.appendChild(b),l.appendChild©,l.appendChild(_),l.appendChild(m),l.appendChild(v),l.appendChild(y),n.appendChild(l),this._element.appendChild(n),this._offset=t.Point.convert(o&&o.offset||[0,-14]);}this._element.classList.add(”mapboxgl-marker“),this._element.addEventListener(”dragstart“,(function(t){t.preventDefault();})),this._element.addEventListener(”mousedown“,(function(t){t.preventDefault();})),this._element.addEventListener(”focus“,(function(){var t=a._map.getContainer();t.scrollTop=0,t.scrollLeft=0;})),Jo(this._element,this._anchor,”marker“),this._popup=null;}return e&&(o.__proto__=e),o.prototype=Object.create(e&&e.prototype),o.prototype.constructor=o,o.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on(”move“,this._update),t.on(”moveend“,this._update),this.setDraggable(this._draggable),this._update(),this._map.on(”click“,this._onMapClick),this},o.prototype.remove=function(){return this._map&&(this._map.off(”click“,this._onMapClick),this._map.off(”move“,this._update),this._map.off(”moveend“,this._update),this._map.off(”mousedown“,this._addDragHandler),this._map.off(”touchstart“,this._addDragHandler),this._map.off(”mouseup“,this._onUp),this._map.off(”touchend“,this._onUp),this._map.off(”mousemove“,this._onMove),this._map.off(”touchmove“,this._onMove),delete this._map),i.remove(this._element),this._popup&&this._popup.remove(),this},o.prototype.getLngLat=function(){return this._lngLat},o.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},o.prototype.getElement=function(){return this._element},o.prototype.setPopup=function(t){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener(”keypress“,this._onKeyPress),this._originalTabIndex||this._element.removeAttribute(”tabindex“)),t){if(!(”offset“in t.options)){var e=Math.sqrt(Math.pow(13.5,2)/2);t.options.offset=this._defaultMarker?{top:,”top-left“:,”top-right“:,bottom:,”bottom-left“:,”bottom-right“:,left:,right:}:this._offset;}this._popup=t,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute(”tabindex“),this._originalTabIndex||this._element.setAttribute(”tabindex“,”0“),this._element.addEventListener(”keypress“,this._onKeyPress);}return this},o.prototype._onKeyPress=function(t){var e=t.code,i=t.charCode||t.keyCode;”Space“!==e&&”Enter“!==e&&32!==i&&13!==i||this.togglePopup();},o.prototype._onMapClick=function(t){var e=t.originalEvent.target,i=this._element;this._popup&&(e===i||i.contains(e))&&this.togglePopup();},o.prototype.getPopup=function(){return this._popup},o.prototype.togglePopup=function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this},o.prototype._update=function(t){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=Ko(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var e=”“;”viewport“===this._rotationAlignment||”auto“===this._rotationAlignment?e=”rotateZ(“this._rotation
”deg)“:”map“===this._rotationAlignment&&(e=”rotateZ(“+(this._rotation-this._map.getBearing())+”deg)“);var o=”“;”viewport“===this._pitchAlignment||”auto“===this._pitchAlignment?o=”rotateX(0deg)“:”map“===this._pitchAlignment&&(o=”rotateX(“+this._map.getPitch()+”deg)“),t&&”moveend“!==t.type||(this._pos=this._pos.round()),i.setTransform(this._element,Yo+” translate(“this._pos.x
”px, “this._pos.y
”px) “o
” “+e);}},o.prototype.getOffset=function(){return this._offset},o.prototype.setOffset=function(e){return this._offset=t.Point.convert(e),this._update(),this},o.prototype._onMove=function(e){this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents=”none“,”pending“===this._state&&(this._state=”active“,this.fire(new t.Event(”dragstart“))),this.fire(new t.Event(”drag“));},o.prototype._onUp=function(){this._element.style.pointerEvents=”auto“,this._positionDelta=null,this._map.off(”mousemove“,this._onMove),this._map.off(”touchmove“,this._onMove),”active“===this._state&&this.fire(new t.Event(”dragend“)),this._state=”inactive“;},o.prototype._addDragHandler=function(t){this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),this._state=”pending“,this._map.on(”mousemove“,this._onMove),this._map.on(”touchmove“,this._onMove),this._map.once(”mouseup“,this._onUp),this._map.once(”touchend“,this._onUp));},o.prototype.setDraggable=function(t){return this._draggable=!!t,this._map&&(t?(this._map.on(”mousedown“,this._addDragHandler),this._map.on(”touchstart“,this._addDragHandler)):(this._map.off(”mousedown“,this._addDragHandler),this._map.off(”touchstart“,this._addDragHandler))),this},o.prototype.isDraggable=function(){return this._draggable},o.prototype.setRotation=function(t){return this._rotation=t||0,this._update(),this},o.prototype.getRotation=function(){return this._rotation},o.prototype.setRotationAlignment=function(t){return this._rotationAlignment=t||”auto“,this._update(),this},o.prototype.getRotationAlignment=function(){return this._rotationAlignment},o.prototype.setPitchAlignment=function(t){return this._pitchAlignment=t&&”auto“!==t?t:this._rotationAlignment,this._update(),this},o.prototype.getPitchAlignment=function(){return this._pitchAlignment},o}(t.Evented),tr={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};var er=0,ir=!1,or=function(e){function o(i){e.call(this),this.options=t.extend({},tr,i),t.bindAll(,this);}return e&&(o.__proto__=e),o.prototype=Object.create(e&&e.prototype),o.prototype.constructor=o,o.prototype.onAdd=function(e){var o;return this._map=e,this._container=i.create(”div“,”mapboxgl-ctrl mapboxgl-ctrl-group“),o=this._setupUI,void 0!==Qo?o(Qo):void 0!==t.window.navigator.permissions?t.window.navigator.permissions.query({name:”geolocation“}).then((function(t){Qo=”denied“!==t.state,o(Qo);})):(Qo=!!t.window.navigator.geolocation,o(Qo)),this._container},o.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),i.remove(this._container),this._map.off(”zoom“,this._onZoom),this._map=void 0,er=0,ir=!1;},o.prototype._isOutOfMapMaxBounds=function(t){var e=this._map.getMaxBounds(),i=t.coords;return e&&(i.longitude<e.getWest()||i.longitude>e.getEast()||i.latitude<e.getSouth()||i.latitude>e.getNorth())},o.prototype._setErrorState=function(){switch(this._watchState){case”WAITING_ACTIVE“:this._watchState=”ACTIVE_ERROR“,this._geolocateButton.classList.remove(”mapboxgl-ctrl-geolocate-active“),this._geolocateButton.classList.add(”mapboxgl-ctrl-geolocate-active-error“);break;case”ACTIVE_LOCK“:this._watchState=”ACTIVE_ERROR“,this._geolocateButton.classList.remove(”mapboxgl-ctrl-geolocate-active“),this._geolocateButton.classList.add(”mapboxgl-ctrl-geolocate-active-error“),this._geolocateButton.classList.add(”mapboxgl-ctrl-geolocate-waiting“);break;case”BACKGROUND“:this._watchState=”BACKGROUND_ERROR“,this._geolocateButton.classList.remove(”mapboxgl-ctrl-geolocate-background“),this._geolocateButton.classList.add(”mapboxgl-ctrl-geolocate-background-error“),this._geolocateButton.classList.add(”mapboxgl-ctrl-geolocate-waiting“);}},o.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event(”outofmaxbounds“,e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case”WAITING_ACTIVE“:case”ACTIVE_LOCK“:case”ACTIVE_ERROR“:this._watchState=”ACTIVE_LOCK“,this._geolocateButton.classList.remove(”mapboxgl-ctrl-geolocate-waiting“),this._geolocateButton.classList.remove(”mapboxgl-ctrl-geolocate-active-error“),this._geolocateButton.classList.add(”mapboxgl-ctrl-geolocate-active“);break;case”BACKGROUND“:case”BACKGROUND_ERROR“:this._watchState=”BACKGROUND“,this._geolocateButton.classList.remove(”mapboxgl-ctrl-geolocate-waiting“),this._geolocateButton.classList.remove(”mapboxgl-ctrl-geolocate-background-error“),this._geolocateButton.classList.add(”mapboxgl-ctrl-geolocate-background“);}this.options.showUserLocation&&”OFF“!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&”ACTIVE_LOCK“!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove(”mapboxgl-user-location-dot-stale“),this.fire(new t.Event(”geolocate“,e)),this._finish();}},o.prototype._updateCamera=function(e){var i=new t.LngLat(e.coords.longitude,e.coords.latitude),o=e.coords.accuracy,r=this._map.getBearing(),a=t.extend({bearing:r},this.options.fitBoundsOptions);this._map.fitBounds(i.toBounds(o),a,{geolocateSource:!0});},o.prototype._updateMarker=function(e){if(e){var i=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(i).addTo(this._map),this._userLocationDotMarker.setLngLat(i).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius();}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove();},o.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject(),i=this._map.unproject(),o=e.distanceTo(i),r=Math.ceil(2*this._accuracy/o);this._circleElement.style.width=r+”px“,this._circleElement.style.height=r+”px“;},o.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius();},o.prototype._onError=function(e){if(this._map){if(this.options.trackUserLocation)if(1===e.code){this._watchState=”OFF“,this._geolocateButton.classList.remove(”mapboxgl-ctrl-geolocate-waiting“),this._geolocateButton.classList.remove(”mapboxgl-ctrl-geolocate-active“),this._geolocateButton.classList.remove(”mapboxgl-ctrl-geolocate-active-error“),this._geolocateButton.classList.remove(”mapboxgl-ctrl-geolocate-background“),this._geolocateButton.classList.remove(”mapboxgl-ctrl-geolocate-background-error“),this._geolocateButton.disabled=!0;var i=this._map._getUIString(”GeolocateControl.LocationNotAvailable“);this._geolocateButton.title=i,this._geolocateButton.setAttribute(”aria-label“,i),void 0!==this._geolocationWatchID&&this._clearWatch();}else{if(3===e.code&&ir)return;this._setErrorState();}”OFF“!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add(”mapboxgl-user-location-dot-stale“),this.fire(new t.Event(”error“,e)),this._finish();}},o.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0;},o.prototype._setupUI=function(e){var o=this;if(this._container.addEventListener(”contextmenu“,(function(t){return t.preventDefault()})),this._geolocateButton=i.create(”button“,”mapboxgl-ctrl-geolocate“,this._container),i.create(”span“,”mapboxgl-ctrl-icon“,this._geolocateButton).setAttribute(”aria-hidden“,!0),this._geolocateButton.type=”button“,!1===e){t.warnOnce(”Geolocation support is not available so the GeolocateControl will be disabled.“);var r=this._map._getUIString(”GeolocateControl.LocationNotAvailable“);this._geolocateButton.disabled=!0,this._geolocateButton.title=r,this._geolocateButton.setAttribute(”aria-label“,r);}else{var a=this._map._getUIString(”GeolocateControl.FindMyLocation“);this._geolocateButton.title=a,this._geolocateButton.setAttribute(”aria-label“,a);}this.options.trackUserLocation&&(this._geolocateButton.setAttribute(”aria-pressed“,”false“),this._watchState=”OFF“),this.options.showUserLocation&&(this._dotElement=i.create(”div“,”mapboxgl-user-location-dot“),this._userLocationDotMarker=new $o(this._dotElement),this._circleElement=i.create(”div“,”mapboxgl-user-location-accuracy-circle“),this._accuracyCircleMarker=new $o({element:this._circleElement,pitchAlignment:”map“}),this.options.trackUserLocation&&(this._watchState=”OFF“),this._map.on(”zoom“,this._onZoom)),this._geolocateButton.addEventListener(”click“,this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on(”movestart“,(function(e){var i=e.originalEvent&&”resize“===e.originalEvent.type;e.geolocateSource||”ACTIVE_LOCK“!==o._watchState||i||(o._watchState=”BACKGROUND“,o._geolocateButton.classList.add(”mapboxgl-ctrl-geolocate-background“),o._geolocateButton.classList.remove(”mapboxgl-ctrl-geolocate-active“),o.fire(new t.Event(”trackuserlocationend“)));}));},o.prototype.trigger=function(){if(!this._setup)return t.warnOnce(”Geolocate control triggered before added to a map“),!1;if(this.options.trackUserLocation){switch(this._watchState){case”OFF“:this._watchState=”WAITING_ACTIVE“,this.fire(new t.Event(”trackuserlocationstart“));break;case”WAITING_ACTIVE“:case”ACTIVE_LOCK“:case”ACTIVE_ERROR“:case”BACKGROUND_ERROR“:er–,ir=!1,this._watchState=”OFF“,this._geolocateButton.classList.remove(”mapboxgl-ctrl-geolocate-waiting“),this._geolocateButton.classList.remove(”mapboxgl-ctrl-geolocate-active“),this._geolocateButton.classList.remove(”mapboxgl-ctrl-geolocate-active-error“),this._geolocateButton.classList.remove(”mapboxgl-ctrl-geolocate-background“),this._geolocateButton.classList.remove(”mapboxgl-ctrl-geolocate-background-error“),this.fire(new t.Event(”trackuserlocationend“));break;case”BACKGROUND“:this._watchState=”ACTIVE_LOCK“,this._geolocateButton.classList.remove(”mapboxgl-ctrl-geolocate-background“),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event(”trackuserlocationstart“));}switch(this._watchState){case”WAITING_ACTIVE“:this._geolocateButton.classList.add(”mapboxgl-ctrl-geolocate-waiting“),this._geolocateButton.classList.add(”mapboxgl-ctrl-geolocate-active“);break;case”ACTIVE_LOCK“:this._geolocateButton.classList.add(”mapboxgl-ctrl-geolocate-active“);break;case”ACTIVE_ERROR“:this._geolocateButton.classList.add(”mapboxgl-ctrl-geolocate-waiting“),this._geolocateButton.classList.add(”mapboxgl-ctrl-geolocate-active-error“);break;case”BACKGROUND“:this._geolocateButton.classList.add(”mapboxgl-ctrl-geolocate-background“);break;case”BACKGROUND_ERROR“:this._geolocateButton.classList.add(”mapboxgl-ctrl-geolocate-waiting“),this._geolocateButton.classList.add(”mapboxgl-ctrl-geolocate-background-error“);}if(”OFF“===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add(”mapboxgl-ctrl-geolocate-waiting“),this._geolocateButton.setAttribute(”aria-pressed“,”true“),++er>1?(e={maximumAge:6e5,timeout:0},ir=!0):(e=this.options.positionOptions,ir=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e);}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return !0},o.prototype._clearWatch=function(){t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove(”mapboxgl-ctrl-geolocate-waiting“),this._geolocateButton.setAttribute(”aria-pressed“,”false“),this.options.showUserLocation&&this._updateMarker(null);},o}(t.Evented),rr={maxWidth:100,unit:”metric“},ar=function(e){this.options=t.extend({},rr,e),t.bindAll(,this);};function nr(t,e,i){var o=i&&i.maxWidth||100,r=t._container.clientHeight/2,a=t.unproject(),n=t.unproject(),s=a.distanceTo(n);if(i&&”imperial“===i.unit){var l=3.2808*s;if(l>5280)sr(e,o,l/5280,t._getUIString(”ScaleControl.Miles“));else sr(e,o,l,t._getUIString(”ScaleControl.Feet“));}else if(i&&”nautical“===i.unit){sr(e,o,s/1852,t._getUIString(”ScaleControl.NauticalMiles“));}else s>=1e3?sr(e,o,s/1e3,t._getUIString(”ScaleControl.Kilometers“)):sr(e,o,s,t._getUIString(”ScaleControl.Meters“));}function sr(t,e,i,o){var r,a,n,s=(r=i,a=Math.pow(10,(”“+Math.floor®).length-1),n=(n=r/a)>=10?10:n>=5?5:n>=3?3:n>=2?2:n>=1?1:function(t){var e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(n),a*n),l=s/i;t.style.width=e*l+”px“,t.innerHTML=s+” “+o;}ar.prototype.getDefaultPosition=function(){return ”bottom-left“},ar.prototype._onMove=function(){nr(this._map,this._container,this.options);},ar.prototype.onAdd=function(t){return this._map=t,this._container=i.create(”div“,”mapboxgl-ctrl mapboxgl-ctrl-scale“,t.getContainer()),this._map.on(”move“,this._onMove),this._onMove(),this._container},ar.prototype.onRemove=function(){i.remove(this._container),this._map.off(”move“,this._onMove),this._map=void 0;},ar.prototype.setUnit=function(t){this.options.unit=t,nr(this._map,this._container,this.options);};var lr=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce(”Full screen control 'container' must be a DOM element.“)),t.bindAll(,this),”onfullscreenchange“in t.window.document?this._fullscreenchange=”fullscreenchange“:”onmozfullscreenchange“in t.window.document?this._fullscreenchange=”mozfullscreenchange“:”onwebkitfullscreenchange“in t.window.document?this._fullscreenchange=”webkitfullscreenchange“:”onmsfullscreenchange“in t.window.document&&(this._fullscreenchange=”MSFullscreenChange“);};lr.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=i.create(”div“,”mapboxgl-ctrl mapboxgl-ctrl-group“),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display=”none“,t.warnOnce(”This device does not support fullscreen mode.“)),this._controlContainer},lr.prototype.onRemove=function(){i.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon);},lr.prototype._checkFullscreenSupport=function(){return !!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},lr.prototype._setupUI=function(){var e=this._fullscreenButton=i.create(”button“,”mapboxgl-ctrl-fullscreen“,this._controlContainer);i.create(”span“,”mapboxgl-ctrl-icon“,e).setAttribute(”aria-hidden“,!0),e.type=”button“,this._updateTitle(),this._fullscreenButton.addEventListener(”click“,this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon);},lr.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute(”aria-label“,t),this._fullscreenButton.title=t;},lr.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?”FullscreenControl.Exit“:”FullscreenControl.Enter“)},lr.prototype._isFullscreen=function(){return this._fullscreen},lr.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(”mapboxgl-ctrl-shrink“),this._fullscreenButton.classList.toggle(”mapboxgl-ctrl-fullscreen“),this._updateTitle());},lr.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen();};var cr={closeButton:!0,closeOnClick:!0,className:”“,maxWidth:”240px“},ur=function(e){function o(i){e.call(this),this.options=t.extend(Object.create(cr),i),t.bindAll(,this);}return e&&(o.__proto__=e),o.prototype=Object.create(e&&e.prototype),o.prototype.constructor=o,o.prototype.addTo=function(e){var i=this;return this._map=e,this.options.closeOnClick&&this._map.on(”click“,this._onClose),this.options.closeOnMove&&this._map.on(”move“,this._onClose),this._map.on(”remove“,this.remove),this._update(),this._trackPointer?(this._map.on(”mousemove“,(function(t){i._update(t.point);})),this._map.on(”mouseup“,(function(t){i._update(t.point);})),this._container&&this._container.classList.add(”mapboxgl-popup-track-pointer“),this._map._canvasContainer.classList.add(”mapboxgl-track-pointer“)):this._map.on(”move“,this._update),this.fire(new t.Event(”open“)),this},o.prototype.isOpen=function(){return !!this._map},o.prototype.remove=function(){return this._content&&i.remove(this._content),this._container&&(i.remove(this._container),delete this._container),this._map&&(this._map.off(”move“,this._update),this._map.off(”move“,this._onClose),this._map.off(”click“,this._onClose),this._map.off(”remove“,this.remove),this._map.off(”mousemove“),delete this._map),this.fire(new t.Event(”close“)),this},o.prototype.getLngLat=function(){return this._lngLat},o.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on(”move“,this._update),this._map.off(”mousemove“),this._container&&this._container.classList.remove(”mapboxgl-popup-track-pointer“),this._map._canvasContainer.classList.remove(”mapboxgl-track-pointer“)),this},o.prototype.trackPointer=function(){var t=this;return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off(”move“,this._update),this._map.on(”mousemove“,(function(e){t._update(e.point);})),this._map.on(”drag“,(function(e){t._update(e.point);})),this._container&&this._container.classList.add(”mapboxgl-popup-track-pointer“),this._map._canvasContainer.classList.add(”mapboxgl-track-pointer“)),this},o.prototype.getElement=function(){return this._container},o.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},o.prototype.setHTML=function(e){var i,o=t.window.document.createDocumentFragment(),r=t.window.document.createElement(”body“);for(r.innerHTML=e;i=r.firstChild;)o.appendChild(i);return this.setDOMContent(o)},o.prototype.getMaxWidth=function(){return this._container.style.maxWidth},o.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},o.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},o.prototype.addClassName=function(t){this._container.classList.add(t);},o.prototype.removeClassName=function(t){this._container.classList.remove(t);},o.prototype.toggleClassName=function(t){return this._container.classList.toggle(t)},o.prototype._createContent=function(){this._content&&i.remove(this._content),this._content=i.create(”div“,”mapboxgl-popup-content“,this._container),this.options.closeButton&&(this._closeButton=i.create(”button“,”mapboxgl-popup-close-button“,this._content),this._closeButton.type=”button“,this._closeButton.setAttribute(”aria-label“,”Close popup“),this._closeButton.innerHTML=”ד,this._closeButton.addEventListener(”click“,this._onClose));},o.prototype._update=function(e){var o=this,r=this._lngLat||this._trackPointer;if(this._map&&r&&this._content&&(this._container||(this._container=i.create(”div“,”mapboxgl-popup“,this._map.getContainer()),this._tip=i.create(”div“,”mapboxgl-popup-tip“,this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(” “).forEach((function(t){return o._container.classList.add(t)})),this._trackPointer&&this._container.classList.add(”mapboxgl-popup-track-pointer“)),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Ko(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var a=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),n=this.options.anchor,s=function e(i){if(i){if(”number“==typeof i){var o=Math.round(Math.sqrt(.5*Math.pow(i,2)));return {center:new t.Point(0,0),top:new t.Point(0,i),”top-left“:new t.Point(o,o),”top-right“:new t.Point(-o,o),bottom:new t.Point(0,-i),”bottom-left“:new t.Point(o,-o),”bottom-right“:new t.Point(-o,-o),left:new t.Point(i,0),right:new t.Point(-i,0)}}if(i instanceof t.Point||Array.isArray(i)){var r=t.Point.convert(i);return {center:r,top:r,”top-left“:r,”top-right“:r,bottom:r,”bottom-left“:r,”bottom-right“:r,left:r,right:r}}return {center:t.Point.convert(i.center||),top:t.Point.convert(i.top||),”top-left“:t.Point.convert(i||[0,0]),”top-right“:t.Point.convert(i||[0,0]),bottom:t.Point.convert(i.bottom||),”bottom-left“:t.Point.convert(i||[0,0]),”bottom-right“:t.Point.convert(i||[0,0]),left:t.Point.convert(i.left||),right:t.Point.convert(i.right||)}}return e(new t.Point(0,0))}(this.options.offset);if(!n){var l,c=this._container.offsetWidth,u=this._container.offsetHeight;l=a.y+s.bottom.y:a.y>this._map.transform.height-u?:[],a.x<c/2?l.push(”left“):a.x>this._map.transform.width-c/2&&l.push(”right“),n=0===l.length?”bottom“:l.join(”-“);}var h=a.add(s).round();i.setTransform(this._container,Yo+” translate(“h.x
”px,“h.y
”px)“),Jo(this._container,n,”popup“);}},o.prototype._onClose=function(){this.remove();},o}(t.Evented);var hr={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:Go,NavigationControl:Ho,GeolocateControl:or,AttributionControl:ko,ScaleControl:ar,FullscreenControl:lr,Popup:ur,Marker:$o,Style:Ze,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e;},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e;},get workerCount(){return kt.workerCount},set workerCount(t){kt.workerCount=t;},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e;},clearStorage:function(e){t.clearTileCache(e);},workerUrl:”“};return hr}));