(function webpackUniversalModuleDefinition(root, factory) { if (typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if (typeof define === 'function' && define.amd) define([], factory); else { var a = factory(); for (var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; }})(globalThis, function () { "use strict";var __exports__=(()=>{var sre=Object.create;var Nv=Object.defineProperty;var are=Object.getOwnPropertyDescriptor;var lre=Object.getOwnPropertyNames;var cre=Object.getPrototypeOf,ure=Object.prototype.hasOwnProperty;var fre=(t,e,r)=>e in t?Nv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var P6=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var It=(t,e)=>()=>(t&&(e=t(t=0)),e);var Qt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),As=(t,e)=>{for(var r in e)Nv(t,r,{get:e[r],enumerable:!0})},R6=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of lre(e))!ure.call(t,n)&&n!==r&&Nv(t,n,{get:()=>e[n],enumerable:!(i=are(e,n))||i.enumerable});return t};var ga=(t,e,r)=>(r=t!=null?sre(cre(t)):{},R6(e||!t||!t.__esModule?Nv(r,"default",{value:t,enumerable:!0}):r,t)),B6=t=>R6(Nv({},"__esModule",{value:!0}),t);var Yr=(t,e,r)=>(fre(t,typeof e!="symbol"?e+"":e,r),r);var c5=Qt((Y3,K3)=>{(function(t,e){typeof Y3=="object"&&typeof K3<"u"?K3.exports=e():typeof define=="function"&&define.amd?define(e):(t=t||self,t.mapboxgl=e())})(Y3,function(){"use strict";var t,e,r;function i(n,o){if(!t)t=o;else if(!e)e=o;else{var s="var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk);",l={};t(l),r=o(l),typeof window<"u"&&(r.workerUrl=window.URL.createObjectURL(new Blob([s],{type:"text/javascript"})))}}return i(["exports"],function(n){"use strict";function o(a,c){return a(c={exports:{}},c.exports),c.exports}var s=l;function l(a,c,f,x){this.cx=3*a,this.bx=3*(f-a)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*c,this.by=3*(x-c)-this.cy,this.ay=1-this.cy-this.by,this.p1x=a,this.p1y=x,this.p2x=f,this.p2y=x}l.prototype.sampleCurveX=function(a){return((this.ax*a+this.bx)*a+this.cx)*a},l.prototype.sampleCurveY=function(a){return((this.ay*a+this.by)*a+this.cy)*a},l.prototype.sampleCurveDerivativeX=function(a){return(3*this.ax*a+2*this.bx)*a+this.cx},l.prototype.solveCurveX=function(a,c){var f,x,S,I,D;for(c===void 0&&(c=1e-6),S=a,D=0;D<8;D++){if(I=this.sampleCurveX(S)-a,Math.abs(I)(x=1))return x;for(;fI?f=S:x=S,S=.5*(x-f)+f}return S},l.prototype.solve=function(a,c){return this.sampleCurveY(this.solveCurveX(a,c))};var u=h;function h(a,c){this.x=a,this.y=c}h.prototype={clone:function(){return new h(this.x,this.y)},add:function(a){return this.clone()._add(a)},sub:function(a){return this.clone()._sub(a)},multByPoint:function(a){return this.clone()._multByPoint(a)},divByPoint:function(a){return this.clone()._divByPoint(a)},mult:function(a){return this.clone()._mult(a)},div:function(a){return this.clone()._div(a)},rotate:function(a){return this.clone()._rotate(a)},rotateAround:function(a,c){return this.clone()._rotateAround(a,c)},matMult:function(a){return this.clone()._matMult(a)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(a){return this.x===a.x&&this.y===a.y},dist:function(a){return Math.sqrt(this.distSqr(a))},distSqr:function(a){var c=a.x-this.x,f=a.y-this.y;return c*c+f*f},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(a){return Math.atan2(this.y-a.y,this.x-a.x)},angleWith:function(a){return this.angleWithSep(a.x,a.y)},angleWithSep:function(a,c){return Math.atan2(this.x*c-this.y*a,this.x*a+this.y*c)},_matMult:function(a){var c=a[2]*this.x+a[3]*this.y;return this.x=a[0]*this.x+a[1]*this.y,this.y=c,this},_add:function(a){return this.x+=a.x,this.y+=a.y,this},_sub:function(a){return this.x-=a.x,this.y-=a.y,this},_mult:function(a){return this.x*=a,this.y*=a,this},_div:function(a){return this.x/=a,this.y/=a,this},_multByPoint:function(a){return this.x*=a.x,this.y*=a.y,this},_divByPoint:function(a){return this.x/=a.x,this.y/=a.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var a=this.y;return this.y=this.x,this.x=-a,this},_rotate:function(a){var c=Math.cos(a),f=Math.sin(a),x=f*this.x+c*this.y;return this.x=c*this.x-f*this.y,this.y=x,this},_rotateAround:function(a,c){var f=Math.cos(a),x=Math.sin(a),S=c.y+x*(this.x-c.x)+f*(this.y-c.y);return this.x=c.x+f*(this.x-c.x)-x*(this.y-c.y),this.y=S,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},h.convert=function(a){return a instanceof h?a:Array.isArray(a)?new h(a[0],a[1]):a};var v=typeof self<"u"?self:{},T=Math.pow(2,53)-1;function E(a,c,f,x){var S=new s(a,c,f,x);return function(I){return S.solve(I)}}var M=E(.25,.1,.25,1);function O(a,c,f){return Math.min(f,Math.max(c,a))}function F(a,c,f){var x=f-c,S=((a-c)%x+x)%x+c;return S===c?f:S}function z(a){for(var c=[],f=arguments.length-1;f-- >0;)c[f]=arguments[f+1];for(var x=0,S=c;x>c/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,a)}()}function ne(a){return!!a&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(a)}function ge(a,c){a.forEach(function(f){c[f]&&(c[f]=c[f].bind(c))})}function j(a,c){return a.indexOf(c,a.length-c.length)!==-1}function me(a,c,f){var x={};for(var S in a)x[S]=c.call(f||this,a[S],S,a);return x}function fe(a,c,f){var x={};for(var S in a)c.call(f||this,a[S],S,a)&&(x[S]=a[S]);return x}function $(a){return Array.isArray(a)?a.map($):typeof a=="object"&&a?me(a,$):a}var Z={};function we(a){Z[a]||(typeof console<"u"&&console.warn(a),Z[a]=!0)}function Oe(a,c,f){return(f.y-a.y)*(c.x-a.x)>(c.y-a.y)*(f.x-a.x)}function he(a){for(var c=0,f=0,x=a.length,S=x-1,I=void 0,D=void 0;f@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(x,S,I,D){var H=I||D;return c[S]=!H||H.toLowerCase(),""}),c["max-age"]){var f=parseInt(c["max-age"],10);isNaN(f)?delete c["max-age"]:c["max-age"]=f}return c}var Vt=null;function Yt(a){if(Vt==null){var c=a.navigator?a.navigator.userAgent:null;Vt=!!a.safari||!(!c||!(/\b(iPad|iPhone|iPod)\b/.test(c)||c.match("Safari")&&!c.match("Chrome")))}return Vt}function mr(a){try{var c=v[a];return c.setItem("_mapbox_test_",1),c.removeItem("_mapbox_test_"),!0}catch{return!1}}var Er,Jr,or,ai,Jt=v.performance&&v.performance.now?v.performance.now.bind(v.performance):Date.now.bind(Date),qt=v.requestAnimationFrame||v.mozRequestAnimationFrame||v.webkitRequestAnimationFrame||v.msRequestAnimationFrame,wi=v.cancelAnimationFrame||v.mozCancelAnimationFrame||v.webkitCancelAnimationFrame||v.msCancelAnimationFrame,ae={now:Jt,frame:function(a){var c=qt(a);return{cancel:function(){return wi(c)}}},getImageData:function(a,c){c===void 0&&(c=0);var f=v.document.createElement("canvas"),x=f.getContext("2d");if(!x)throw new Error("failed to create canvas 2d context");return f.width=a.width,f.height=a.height,x.drawImage(a,0,0,a.width,a.height),x.getImageData(-c,-c,a.width+2*c,a.height+2*c)},resolveURL:function(a){return Er||(Er=v.document.createElement("a")),Er.href=a,Er.href},hardwareConcurrency:v.navigator&&v.navigator.hardwareConcurrency||4,get devicePixelRatio(){return v.devicePixelRatio},get prefersReducedMotion(){return!!v.matchMedia&&(Jr==null&&(Jr=v.matchMedia("(prefers-reduced-motion: reduce)")),Jr.matches)}},be={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},je={supported:!1,testSupport:function(a){!lt&&ai&&(Ft?wt(a):or=a)}},lt=!1,Ft=!1;function wt(a){var c=a.createTexture();a.bindTexture(a.TEXTURE_2D,c);try{if(a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,ai),a.isContextLost())return;je.supported=!0}catch{}a.deleteTexture(c),lt=!0}v.document&&((ai=v.document.createElement("img")).onload=function(){or&&wt(or),or=null,Ft=!0},ai.onerror=function(){lt=!0,or=null},ai.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var $r="01",xi=function(a,c){this._transformRequestFn=a,this._customAccessToken=c,this._createSkuToken()};function Ki(a){return a.indexOf("mapbox:")===0}xi.prototype._createSkuToken=function(){var a=function(){for(var c="",f=0;f<10;f++)c+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",$r,c].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=a.token,this._skuTokenExpiresAt=a.tokenExpiresAt},xi.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},xi.prototype.transformRequest=function(a,c){return this._transformRequestFn&&this._transformRequestFn(a,c)||{url:a}},xi.prototype.normalizeStyleURL=function(a,c){if(!Ki(a))return a;var f=Un(a);return f.path="/styles/v1"+f.path,this._makeAPIURL(f,this._customAccessToken||c)},xi.prototype.normalizeGlyphsURL=function(a,c){if(!Ki(a))return a;var f=Un(a);return f.path="/fonts/v1"+f.path,this._makeAPIURL(f,this._customAccessToken||c)},xi.prototype.normalizeSourceURL=function(a,c){if(!Ki(a))return a;var f=Un(a);return f.path="/v4/"+f.authority+".json",f.params.push("secure"),this._makeAPIURL(f,this._customAccessToken||c)},xi.prototype.normalizeSpriteURL=function(a,c,f,x){var S=Un(a);return Ki(a)?(S.path="/styles/v1"+S.path+"/sprite"+c+f,this._makeAPIURL(S,this._customAccessToken||x)):(S.path+=""+c+f,No(S))},xi.prototype.normalizeTileURL=function(a,c){if(this._isSkuTokenExpired()&&this._createSkuToken(),a&&!Ki(a))return a;var f=Un(a);f.path=f.path.replace(/(\.(png|jpg)\d*)(?=$)/,(ae.devicePixelRatio>=2||c===512?"@2x":"")+(je.supported?".webp":"$1")),f.path=f.path.replace(/^.+\/v4\//,"/"),f.path="/v4"+f.path;var x=this._customAccessToken||function(S){for(var I=0,D=S;I=0&&a.params.splice(S,1)}if(x.path!=="/"&&(a.path=""+x.path+a.path),!be.REQUIRE_ACCESS_TOKEN)return No(a);if(!(c=c||be.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+f);if(c[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+f);return a.params=a.params.filter(function(I){return I.indexOf("access_token")===-1}),a.params.push("access_token="+c),No(a)};var kn=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Zi(a){return kn.test(a)}var Hi=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Un(a){var c=a.match(Hi);if(!c)throw new Error("Unable to parse URL object");return{protocol:c[1],authority:c[2],path:c[3]||"/",params:c[4]?c[4].split("&"):[]}}function No(a){var c=a.params.length?"?"+a.params.join("&"):"";return a.protocol+"://"+a.authority+a.path+c}function Ji(a){if(!a)return null;var c=a.split(".");if(!c||c.length!==3)return null;try{return JSON.parse(decodeURIComponent(v.atob(c[1]).split("").map(function(f){return"%"+("00"+f.charCodeAt(0).toString(16)).slice(-2)}).join("")))}catch{return null}}var Bi=function(a){this.type=a,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};Bi.prototype.getStorageKey=function(a){var c,f=Ji(be.ACCESS_TOKEN);return c=f&&f.u?v.btoa(encodeURIComponent(f.u).replace(/%([0-9A-F]{2})/g,function(x,S){return String.fromCharCode(Number("0x"+S))})):be.ACCESS_TOKEN||"",a?"mapbox.eventData."+a+":"+c:"mapbox.eventData:"+c},Bi.prototype.fetchEventData=function(){var a=mr("localStorage"),c=this.getStorageKey(),f=this.getStorageKey("uuid");if(a)try{var x=v.localStorage.getItem(c);x&&(this.eventData=JSON.parse(x));var S=v.localStorage.getItem(f);S&&(this.anonId=S)}catch{we("Unable to read from LocalStorage")}},Bi.prototype.saveEventData=function(){var a=mr("localStorage"),c=this.getStorageKey(),f=this.getStorageKey("uuid");if(a)try{v.localStorage.setItem(f,this.anonId),Object.keys(this.eventData).length>=1&&v.localStorage.setItem(c,JSON.stringify(this.eventData))}catch{we("Unable to write to LocalStorage")}},Bi.prototype.processRequests=function(a){},Bi.prototype.postEvent=function(a,c,f,x){var S=this;if(be.EVENTS_URL){var I=Un(be.EVENTS_URL);I.params.push("access_token="+(x||be.ACCESS_TOKEN||""));var D={event:this.type,created:new Date(a).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.13.3",skuId:$r,userId:this.anonId},H=c?z(D,c):D,Y={url:No(I),headers:{"Content-Type":"text/plain"},body:JSON.stringify([H])};this.pendingRequest=ao(Y,function(ee){S.pendingRequest=null,f(ee),S.saveEventData(),S.processRequests(x)})}},Bi.prototype.queueRequest=function(a,c){this.queue.push(a),this.processRequests(c)};var yn,po,kr=function(a){function c(){a.call(this,"map.load"),this.success={},this.skuToken=""}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype.postMapLoadEvent=function(f,x,S,I){this.skuToken=S;var D=!(!I&&!be.ACCESS_TOKEN),H=Array.isArray(f)&&f.some(function(Y){return Ki(Y)||Zi(Y)});be.EVENTS_URL&&D&&H&&this.queueRequest({id:x,timestamp:Date.now()},I)},c.prototype.processRequests=function(f){var x=this;if(!this.pendingRequest&&this.queue.length!==0){var S=this.queue.shift(),I=S.id,D=S.timestamp;I&&this.success[I]||(this.anonId||this.fetchEventData(),ne(this.anonId)||(this.anonId=K()),this.postEvent(D,{skuToken:this.skuToken},function(H){H||I&&(x.success[I]=!0)},f))}},c}(Bi),dr=new(function(a){function c(f){a.call(this,"appUserTurnstile"),this._customAccessToken=f}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype.postTurnstileEvent=function(f,x){be.EVENTS_URL&&be.ACCESS_TOKEN&&Array.isArray(f)&&f.some(function(S){return Ki(S)||Zi(S)})&&this.queueRequest(Date.now(),x)},c.prototype.processRequests=function(f){var x=this;if(!this.pendingRequest&&this.queue.length!==0){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var S=Ji(be.ACCESS_TOKEN),I=S?S.u:be.ACCESS_TOKEN,D=I!==this.eventData.tokenU;ne(this.anonId)||(this.anonId=K(),D=!0);var H=this.queue.shift();if(this.eventData.lastSuccess){var Y=new Date(this.eventData.lastSuccess),ee=new Date(H),ie=(H-this.eventData.lastSuccess)/864e5;D=D||ie>=1||ie<-1||Y.getDate()!==ee.getDate()}else D=!0;if(!D)return this.processRequests();this.postEvent(H,{"enabled.telemetry":!1},function(se){se||(x.eventData.lastSuccess=H,x.eventData.tokenU=I)},f)}},c}(Bi)),Ur=dr.postTurnstileEvent.bind(dr),ci=new kr,to=ci.postMapLoadEvent.bind(ci),Dn=500,To=50;function Eo(){v.caches&&!yn&&(yn=v.caches.open("mapbox-tiles"))}function Xo(a){var c=a.indexOf("?");return c<0?a:a.slice(0,c)}var So,Us=1/0;function Fc(){return So==null&&(So=v.OffscreenCanvas&&new v.OffscreenCanvas(1,1).getContext("2d")&&typeof v.createImageBitmap=="function"),So}var ql={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(ql);var sl=function(a){function c(f,x,S){x===401&&Zi(S)&&(f+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),a.call(this,f),this.status=x,this.url=S,this.name=this.constructor.name,this.message=f}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},c}(Error),Cl=Le()?function(){return self.worker&&self.worker.referrer}:function(){return(v.location.protocol==="blob:"?v.parent:v).location.href},al,Ms,ca=function(a,c){if(!(/^file:/.test(f=a.url)||/^file:/.test(Cl())&&!/^\w+:/.test(f))){if(v.fetch&&v.Request&&v.AbortController&&v.Request.prototype.hasOwnProperty("signal"))return function(x,S){var I,D=new v.AbortController,H=new v.Request(x.url,{method:x.method||"GET",body:x.body,credentials:x.credentials,headers:x.headers,referrer:Cl(),signal:D.signal}),Y=!1,ee=!1,ie=(I=H.url).indexOf("sku=")>0&&Zi(I);x.type==="json"&&H.headers.set("Accept","application/json");var se=function(Te,ke,Ve){if(!ee){if(Te&&Te.message!=="SecurityError"&&we(Te),ke&&Ve)return Ae(ke);var et=Date.now();v.fetch(H).then(function(Xe){if(Xe.ok){var at=ie?Xe.clone():null;return Ae(Xe,at,et)}return S(new sl(Xe.statusText,Xe.status,x.url))}).catch(function(Xe){Xe.code!==20&&S(new Error(Xe.message))})}},Ae=function(Te,ke,Ve){(x.type==="arrayBuffer"?Te.arrayBuffer():x.type==="json"?Te.json():Te.text()).then(function(et){ee||(ke&&Ve&&function(Xe,at,_t){if(Eo(),yn){var bt={status:at.status,statusText:at.statusText,headers:new v.Headers};at.headers.forEach(function(Ut,$t){return bt.headers.set($t,Ut)});var Mt=ft(at.headers.get("Cache-Control")||"");Mt["no-store"]||(Mt["max-age"]&&bt.headers.set("Expires",new Date(_t+1e3*Mt["max-age"]).toUTCString()),new Date(bt.headers.get("Expires")).getTime()-_t<42e4||function(Ut,$t){if(po===void 0)try{new Response(new ReadableStream),po=!0}catch{po=!1}po?$t(Ut.body):Ut.blob().then($t)}(at,function(Ut){var $t=new v.Response(Ut,bt);Eo(),yn&&yn.then(function(Ar){return Ar.put(Xo(Xe.url),$t)}).catch(function(Ar){return we(Ar.message)})}))}}(H,ke,Ve),Y=!0,S(null,et,Te.headers.get("Cache-Control"),Te.headers.get("Expires")))}).catch(function(et){ee||S(new Error(et.message))})};return ie?function(Te,ke){if(Eo(),!yn)return ke(null);var Ve=Xo(Te.url);yn.then(function(et){et.match(Ve).then(function(Xe){var at=function(_t){if(!_t)return!1;var bt=new Date(_t.headers.get("Expires")||0),Mt=ft(_t.headers.get("Cache-Control")||"");return bt>Date.now()&&!Mt["no-cache"]}(Xe);et.delete(Ve),at&&et.put(Ve,Xe.clone()),ke(null,Xe,at)}).catch(ke)}).catch(ke)}(H,se):se(null,null),{cancel:function(){ee=!0,Y||D.abort()}}}(a,c);if(Le()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",a,c,void 0,!0)}var f;return function(x,S){var I=new v.XMLHttpRequest;for(var D in I.open(x.method||"GET",x.url,!0),x.type==="arrayBuffer"&&(I.responseType="arraybuffer"),x.headers)I.setRequestHeader(D,x.headers[D]);return x.type==="json"&&(I.responseType="text",I.setRequestHeader("Accept","application/json")),I.withCredentials=x.credentials==="include",I.onerror=function(){S(new Error(I.statusText))},I.onload=function(){if((I.status>=200&&I.status<300||I.status===0)&&I.response!==null){var H=I.response;if(x.type==="json")try{H=JSON.parse(I.response)}catch(Y){return S(Y)}S(null,H,I.getResponseHeader("Cache-Control"),I.getResponseHeader("Expires"))}else S(new sl(I.statusText,I.status,x.url))},I.send(x.body),{cancel:function(){return I.abort()}}}(a,c)},Ml=function(a,c){return ca(z(a,{type:"arrayBuffer"}),c)},ao=function(a,c){return ca(z(a,{method:"POST"}),c)},oe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";al=[],Ms=0;var de=function(a,c){if(je.supported&&(a.headers||(a.headers={}),a.headers.accept="image/webp,*/*"),Ms>=be.MAX_PARALLEL_IMAGE_REQUESTS){var f={requestParameters:a,callback:c,cancelled:!1,cancel:function(){this.cancelled=!0}};return al.push(f),f}Ms++;var x=!1,S=function(){if(!x)for(x=!0,Ms--;al.length&&Ms0||this._oneTimeListeners&&this._oneTimeListeners[a]&&this._oneTimeListeners[a].length>0||this._eventedParent&&this._eventedParent.listens(a)},rt.prototype.setEventedParent=function(a,c){return this._eventedParent=a,this._eventedParentData=c,this};var Se={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}},Ge=function(a,c,f,x){this.message=(a?a+": ":"")+f,x&&(this.identifier=x),c!=null&&c.__line__&&(this.line=c.__line__)};function ht(a){var c=a.value;return c?[new Ge(a.key,c,"constants have been deprecated as of v8")]:[]}function Ht(a){for(var c=[],f=arguments.length-1;f-- >0;)c[f]=arguments[f+1];for(var x=0,S=c;x":a.itemType.kind==="value"?"array":"array<"+c+">"}return a.kind}var Xn=[Mr,Ot,br,sr,lr,vn,bi,Qi(pr),Di];function $i(a,c){if(c.kind==="error")return null;if(a.kind==="array"){if(c.kind==="array"&&(c.N===0&&c.itemType.kind==="value"||!$i(a.itemType,c.itemType))&&(typeof a.N!="number"||a.N===c.N))return null}else{if(a.kind===c.kind)return null;if(a.kind==="value"){for(var f=0,x=Xn;f255?255:H}function S(H){return x(H[H.length-1]==="%"?parseFloat(H)/100*255:parseInt(H))}function I(H){return(Y=H[H.length-1]==="%"?parseFloat(H)/100:parseFloat(H))<0?0:Y>1?1:Y;var Y}function D(H,Y,ee){return ee<0?ee+=1:ee>1&&(ee-=1),6*ee<1?H+(Y-H)*ee*6:2*ee<1?Y:3*ee<2?H+(Y-H)*(2/3-ee)*6:H}try{c.parseCSSColor=function(H){var Y,ee=H.replace(/ /g,"").toLowerCase();if(ee in f)return f[ee].slice();if(ee[0]==="#")return ee.length===4?(Y=parseInt(ee.substr(1),16))>=0&&Y<=4095?[(3840&Y)>>4|(3840&Y)>>8,240&Y|(240&Y)>>4,15&Y|(15&Y)<<4,1]:null:ee.length===7&&(Y=parseInt(ee.substr(1),16))>=0&&Y<=16777215?[(16711680&Y)>>16,(65280&Y)>>8,255&Y,1]:null;var ie=ee.indexOf("("),se=ee.indexOf(")");if(ie!==-1&&se+1===ee.length){var Ae=ee.substr(0,ie),Te=ee.substr(ie+1,se-(ie+1)).split(","),ke=1;switch(Ae){case"rgba":if(Te.length!==4)return null;ke=I(Te.pop());case"rgb":return Te.length!==3?null:[S(Te[0]),S(Te[1]),S(Te[2]),ke];case"hsla":if(Te.length!==4)return null;ke=I(Te.pop());case"hsl":if(Te.length!==3)return null;var Ve=(parseFloat(Te[0])%360+360)%360/360,et=I(Te[1]),Xe=I(Te[2]),at=Xe<=.5?Xe*(et+1):Xe+et-Xe*et,_t=2*Xe-at;return[x(255*D(_t,at,Ve+1/3)),x(255*D(_t,at,Ve)),x(255*D(_t,at,Ve-1/3)),ke];default:return null}}return null}}catch{}}).parseCSSColor,Oi=function(a,c,f,x){x===void 0&&(x=1),this.r=a,this.g=c,this.b=f,this.a=x};Oi.parse=function(a){if(a){if(a instanceof Oi)return a;if(typeof a=="string"){var c=Si(a);if(c)return new Oi(c[0]/255*c[3],c[1]/255*c[3],c[2]/255*c[3],c[3])}}},Oi.prototype.toString=function(){var a=this.toArray(),c=a[1],f=a[2],x=a[3];return"rgba("+Math.round(a[0])+","+Math.round(c)+","+Math.round(f)+","+x+")"},Oi.prototype.toArray=function(){var a=this.a;return a===0?[0,0,0,0]:[255*this.r/a,255*this.g/a,255*this.b/a,a]},Oi.black=new Oi(0,0,0,1),Oi.white=new Oi(1,1,1,1),Oi.transparent=new Oi(0,0,0,0),Oi.red=new Oi(1,0,0,1);var yo=function(a,c,f){this.sensitivity=a?c?"variant":"case":c?"accent":"base",this.locale=f,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};yo.prototype.compare=function(a,c){return this.collator.compare(a,c)},yo.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var fc=function(a,c,f,x,S){this.text=a,this.image=c,this.scale=f,this.fontStack=x,this.textColor=S},ko=function(a){this.sections=a};ko.fromString=function(a){return new ko([new fc(a,null,null,null,null)])},ko.prototype.isEmpty=function(){return this.sections.length===0||!this.sections.some(function(a){return a.text.length!==0||a.image&&a.image.name.length!==0})},ko.factory=function(a){return a instanceof ko?a:ko.fromString(a)},ko.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(a){return a.text}).join("")},ko.prototype.serialize=function(){for(var a=["format"],c=0,f=this.sections;c=0&&a<=255&&typeof c=="number"&&c>=0&&c<=255&&typeof f=="number"&&f>=0&&f<=255?x===void 0||typeof x=="number"&&x>=0&&x<=1?null:"Invalid rgba value ["+[a,c,f,x].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+(typeof x=="number"?[a,c,f,x]:[a,c,f]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Uo(a){if(a===null||typeof a=="string"||typeof a=="boolean"||typeof a=="number"||a instanceof Oi||a instanceof yo||a instanceof ko||a instanceof Yo)return!0;if(Array.isArray(a)){for(var c=0,f=a;c2){var H=a[1];if(typeof H!="string"||!(H in ys)||H==="object")return c.error('The item type argument of "array" must be one of string, number, boolean',1);I=ys[H],x++}else I=pr;if(a.length>3){if(a[2]!==null&&(typeof a[2]!="number"||a[2]<0||a[2]!==Math.floor(a[2])))return c.error('The length argument to "array" must be a positive integer literal',2);D=a[2],x++}f=Qi(I,D)}else f=ys[S];for(var Y=[];x1)&&c.push(x)}}return c.concat(this.args.map(function(S){return S.serialize()}))};var $s=function(a){this.type=vn,this.sections=a};$s.parse=function(a,c){if(a.length<2)return c.error("Expected at least one argument.");var f=a[1];if(!Array.isArray(f)&&typeof f=="object")return c.error("First argument must be an image or text section.");for(var x=[],S=!1,I=1;I<=a.length-1;++I){var D=a[I];if(S&&typeof D=="object"&&!Array.isArray(D)){S=!1;var H=null;if(D["font-scale"]&&!(H=c.parse(D["font-scale"],1,Ot)))return null;var Y=null;if(D["text-font"]&&!(Y=c.parse(D["text-font"],1,Qi(br))))return null;var ee=null;if(D["text-color"]&&!(ee=c.parse(D["text-color"],1,lr)))return null;var ie=x[x.length-1];ie.scale=H,ie.font=Y,ie.textColor=ee}else{var se=c.parse(a[I],1,pr);if(!se)return null;var Ae=se.type.kind;if(Ae!=="string"&&Ae!=="value"&&Ae!=="null"&&Ae!=="resolvedImage")return c.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");S=!0,x.push({content:se,scale:null,font:null,textColor:null})}}return new $s(x)},$s.prototype.evaluate=function(a){return new ko(this.sections.map(function(c){var f=c.content.evaluate(a);return zn(f)===Di?new fc("",f,null,null,null):new fc(ll(f),null,c.scale?c.scale.evaluate(a):null,c.font?c.font.evaluate(a).join(","):null,c.textColor?c.textColor.evaluate(a):null)}))},$s.prototype.eachChild=function(a){for(var c=0,f=this.sections;c-1),f},Vs.prototype.eachChild=function(a){a(this.input)},Vs.prototype.outputDefined=function(){return!1},Vs.prototype.serialize=function(){return["image",this.input.serialize()]};var Qu={"to-boolean":sr,"to-color":lr,"to-number":Ot,"to-string":br},ua=function(a,c){this.type=a,this.args=c};ua.parse=function(a,c){if(a.length<2)return c.error("Expected at least one argument.");var f=a[0];if((f==="to-boolean"||f==="to-string")&&a.length!==2)return c.error("Expected one argument.");for(var x=Qu[f],S=[],I=1;I4?"Invalid rbga value "+JSON.stringify(c)+": expected an array containing either three or four numeric values.":zs(c[0],c[1],c[2],c[3])))return new Oi(c[0]/255,c[1]/255,c[2]/255,c[3])}throw new zo(f||"Could not parse color from value '"+(typeof c=="string"?c:String(JSON.stringify(c)))+"'")}if(this.type.kind==="number"){for(var D=null,H=0,Y=this.args;H=c[2]||a[1]<=c[1]||a[3]>=c[3])}function tr(a,c){var f=(180+a[0])/360,x=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+a[1]*Math.PI/360)))/360,S=Math.pow(2,c.z);return[Math.round(f*S*8192),Math.round(x*S*8192)]}function qr(a,c,f){return c[1]>a[1]!=f[1]>a[1]&&a[0]<(f[0]-c[0])*(a[1]-c[1])/(f[1]-c[1])+c[0]}function sn(a,c){for(var f,x,S,I,D,H,Y,ee=!1,ie=0,se=c.length;ie0&&H<0||D<0&&H>0}function vs(a,c,f){for(var x=0,S=f;xf[2]){var S=.5*x,I=a[0]-f[0]>S?-x:f[0]-a[0]>S?x:0;I===0&&(I=a[0]-f[2]>S?-x:f[2]-a[0]>S?x:0),a[0]+=I}Je(c,a)}function RA(a,c,f,x){for(var S=8192*Math.pow(2,x.z),I=[8192*x.x,8192*x.y],D=[],H=0,Y=a;H=0)return!1;var f=!0;return a.eachChild(function(x){f&&!cu(x,c)&&(f=!1)}),f}ul.parse=function(a,c){if(a.length!==2)return c.error("'within' expression requires exactly one argument, but found "+(a.length-1)+" instead.");if(Uo(a[1])){var f=a[1];if(f.type==="FeatureCollection")for(var x=0;xc))throw new zo("Input is not a number.");I=D-1}return 0}zc.prototype.parse=function(a,c,f,x,S){return S===void 0&&(S={}),c?this.concat(c,f,x)._parse(a,S):this._parse(a,S)},zc.prototype._parse=function(a,c){function f(ee,ie,se){return se==="assert"?new pn(ie,[ee]):se==="coerce"?new ua(ie,[ee]):ee}if(a!==null&&typeof a!="string"&&typeof a!="boolean"&&typeof a!="number"||(a=["literal",a]),Array.isArray(a)){if(a.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var x=a[0];if(typeof x!="string")return this.error("Expression name must be a string, but found "+typeof x+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var S=this.registry[x];if(S){var I=S.parse(a,this);if(!I)return null;if(this.expectedType){var D=this.expectedType,H=I.type;if(D.kind!=="string"&&D.kind!=="number"&&D.kind!=="boolean"&&D.kind!=="object"&&D.kind!=="array"||H.kind!=="value")if(D.kind!=="color"&&D.kind!=="formatted"&&D.kind!=="resolvedImage"||H.kind!=="value"&&H.kind!=="string"){if(this.checkSubtype(D,H))return null}else I=f(I,D,c.typeAnnotation||"coerce");else I=f(I,D,c.typeAnnotation||"assert")}if(!(I instanceof cs)&&I.type.kind!=="resolvedImage"&&function ee(ie){if(ie instanceof Uc)return ee(ie.boundExpression);if(ie instanceof xe&&ie.name==="error"||ie instanceof Be||ie instanceof ul)return!1;var se=ie instanceof ua||ie instanceof pn,Ae=!0;return ie.eachChild(function(Te){Ae=se?Ae&&ee(Te):Ae&&Te instanceof cs}),!!Ae&&Nc(ie)&&cu(ie,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(I)){var Y=new cl;try{I=new cs(I.type,I.evaluate(Y))}catch(ee){return this.error(ee.message),null}}return I}return this.error('Unknown expression "'+x+'". If you wanted a literal array, use ["literal", [...]].',0)}return this.error(a===void 0?"'undefined' value invalid. Use null instead.":typeof a=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':"Expected an array, but found "+typeof a+" instead.")},zc.prototype.concat=function(a,c,f){var x=typeof a=="number"?this.path.concat(a):this.path,S=f?this.scope.concat(f):this.scope;return new zc(this.registry,x,c||null,S,this.errors)},zc.prototype.error=function(a){for(var c=[],f=arguments.length-1;f-- >0;)c[f]=arguments[f+1];var x=""+this.key+c.map(function(S){return"["+S+"]"}).join("");this.errors.push(new Xt(x,a))},zc.prototype.checkSubtype=function(a,c){var f=$i(a,c);return f&&this.error(f),f};var fa=function(a,c,f){this.type=a,this.input=c,this.labels=[],this.outputs=[];for(var x=0,S=f;x=D)return c.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Y);var ie=c.parse(H,ee,S);if(!ie)return null;S=S||ie.type,x.push([D,ie])}return new fa(S,f,x)},fa.prototype.evaluate=function(a){var c=this.labels,f=this.outputs;if(c.length===1)return f[0].evaluate(a);var x=this.input.evaluate(a);if(x<=c[0])return f[0].evaluate(a);var S=c.length;return x>=c[S-1]?f[S-1].evaluate(a):f[qh(c,x)].evaluate(a)},fa.prototype.eachChild=function(a){a(this.input);for(var c=0,f=this.outputs;c0&&a.push(this.labels[c]),a.push(this.outputs[c].serialize());return a};var uu=Object.freeze({__proto__:null,number:Mo,color:function(a,c,f){return new Oi(Mo(a.r,c.r,f),Mo(a.g,c.g,f),Mo(a.b,c.b,f),Mo(a.a,c.a,f))},array:function(a,c,f){return a.map(function(x,S){return Mo(x,c[S],f)})}}),Xh=6/29*3*(6/29),BA=Math.PI/180,OA=180/Math.PI;function qf(a){return a>.008856451679035631?Math.pow(a,1/3):a/Xh+4/29}function op(a){return a>6/29?a*a*a:Xh*(a-4/29)}function sp(a){return 255*(a<=.0031308?12.92*a:1.055*Math.pow(a,1/2.4)-.055)}function ap(a){return(a/=255)<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)}function tf(a){var c=ap(a.r),f=ap(a.g),x=ap(a.b),S=qf((.4124564*c+.3575761*f+.1804375*x)/.95047),I=qf((.2126729*c+.7151522*f+.072175*x)/1);return{l:116*I-16,a:500*(S-I),b:200*(I-qf((.0193339*c+.119192*f+.9503041*x)/1.08883)),alpha:a.a}}function lp(a){var c=(a.l+16)/116,f=isNaN(a.a)?c:c+a.a/500,x=isNaN(a.b)?c:c-a.b/200;return c=1*op(c),f=.95047*op(f),x=1.08883*op(x),new Oi(sp(3.2404542*f-1.5371385*c-.4985314*x),sp(-.969266*f+1.8760108*c+.041556*x),sp(.0556434*f-.2040259*c+1.0572252*x),a.alpha)}function cp(a,c,f){var x=c-a;return a+f*(x>180||x<-180?x-360*Math.round(x/360):x)}var Xf={forward:tf,reverse:lp,interpolate:function(a,c,f){return{l:Mo(a.l,c.l,f),a:Mo(a.a,c.a,f),b:Mo(a.b,c.b,f),alpha:Mo(a.alpha,c.alpha,f)}}},Yf={forward:function(a){var c=tf(a),f=c.l,x=c.a,S=c.b,I=Math.atan2(S,x)*OA;return{h:I<0?I+360:I,c:Math.sqrt(x*x+S*S),l:f,alpha:a.a}},reverse:function(a){var c=a.h*BA,f=a.c;return lp({l:a.l,a:Math.cos(c)*f,b:Math.sin(c)*f,alpha:a.alpha})},interpolate:function(a,c,f){return{h:cp(a.h,c.h,f),c:Mo(a.c,c.c,f),l:Mo(a.l,c.l,f),alpha:Mo(a.alpha,c.alpha,f)}}},DA=Object.freeze({__proto__:null,lab:Xf,hcl:Yf}),P=function(a,c,f,x,S){this.type=a,this.operator=c,this.interpolation=f,this.input=x,this.labels=[],this.outputs=[];for(var I=0,D=S;I1}))return c.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);x={name:"cubic-bezier",controlPoints:H}}if(a.length-1<4)return c.error("Expected at least 4 arguments, but found only "+(a.length-1)+".");if((a.length-1)%2!=0)return c.error("Expected an even number of arguments.");if(!(S=c.parse(S,2,Ot)))return null;var Y=[],ee=null;f==="interpolate-hcl"||f==="interpolate-lab"?ee=lr:c.expectedType&&c.expectedType.kind!=="value"&&(ee=c.expectedType);for(var ie=0;ie=se)return c.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Te);var Ve=c.parse(Ae,ke,ee);if(!Ve)return null;ee=ee||Ve.type,Y.push([se,Ve])}return ee.kind==="number"||ee.kind==="color"||ee.kind==="array"&&ee.itemType.kind==="number"&&typeof ee.N=="number"?new P(ee,f,x,S,Y):c.error("Type "+Li(ee)+" is not interpolatable.")},P.prototype.evaluate=function(a){var c=this.labels,f=this.outputs;if(c.length===1)return f[0].evaluate(a);var x=this.input.evaluate(a);if(x<=c[0])return f[0].evaluate(a);var S=c.length;if(x>=c[S-1])return f[S-1].evaluate(a);var I=qh(c,x),D=P.interpolationFactor(this.interpolation,x,c[I],c[I+1]),H=f[I].evaluate(a),Y=f[I+1].evaluate(a);return this.operator==="interpolate"?uu[this.type.kind.toLowerCase()](H,Y,D):this.operator==="interpolate-hcl"?Yf.reverse(Yf.interpolate(Yf.forward(H),Yf.forward(Y),D)):Xf.reverse(Xf.interpolate(Xf.forward(H),Xf.forward(Y),D))},P.prototype.eachChild=function(a){a(this.input);for(var c=0,f=this.outputs;c=f.length)throw new zo("Array index out of bounds: "+c+" > "+(f.length-1)+".");if(c!==Math.floor(c))throw new zo("Array index must be an integer, but found "+c+" instead.");return f[c]},le.prototype.eachChild=function(a){a(this.index),a(this.input)},le.prototype.outputDefined=function(){return!1},le.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var ce=function(a,c){this.type=sr,this.needle=a,this.haystack=c};ce.parse=function(a,c){if(a.length!==3)return c.error("Expected 2 arguments, but found "+(a.length-1)+" instead.");var f=c.parse(a[1],1,pr),x=c.parse(a[2],2,pr);return f&&x?Ln(f.type,[sr,br,Ot,Mr,pr])?new ce(f,x):c.error("Expected first argument to be of type boolean, string, number or null, but found "+Li(f.type)+" instead"):null},ce.prototype.evaluate=function(a){var c=this.needle.evaluate(a),f=this.haystack.evaluate(a);if(!f)return!1;if(!en(c,["boolean","string","number","null"]))throw new zo("Expected first argument to be of type boolean, string, number or null, but found "+Li(zn(c))+" instead.");if(!en(f,["string","array"]))throw new zo("Expected second argument to be of type array or string, but found "+Li(zn(f))+" instead.");return f.indexOf(c)>=0},ce.prototype.eachChild=function(a){a(this.needle),a(this.haystack)},ce.prototype.outputDefined=function(){return!0},ce.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var _e=function(a,c,f){this.type=Ot,this.needle=a,this.haystack=c,this.fromIndex=f};_e.parse=function(a,c){if(a.length<=2||a.length>=5)return c.error("Expected 3 or 4 arguments, but found "+(a.length-1)+" instead.");var f=c.parse(a[1],1,pr),x=c.parse(a[2],2,pr);if(!f||!x)return null;if(!Ln(f.type,[sr,br,Ot,Mr,pr]))return c.error("Expected first argument to be of type boolean, string, number or null, but found "+Li(f.type)+" instead");if(a.length===4){var S=c.parse(a[3],3,Ot);return S?new _e(f,x,S):null}return new _e(f,x)},_e.prototype.evaluate=function(a){var c=this.needle.evaluate(a),f=this.haystack.evaluate(a);if(!en(c,["boolean","string","number","null"]))throw new zo("Expected first argument to be of type boolean, string, number or null, but found "+Li(zn(c))+" instead.");if(!en(f,["string","array"]))throw new zo("Expected second argument to be of type array or string, but found "+Li(zn(f))+" instead.");if(this.fromIndex){var x=this.fromIndex.evaluate(a);return f.indexOf(c,x)}return f.indexOf(c)},_e.prototype.eachChild=function(a){a(this.needle),a(this.haystack),this.fromIndex&&a(this.fromIndex)},_e.prototype.outputDefined=function(){return!1},_e.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var a=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),a]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Qe=function(a,c,f,x,S,I){this.inputType=a,this.type=c,this.input=f,this.cases=x,this.outputs=S,this.otherwise=I};Qe.parse=function(a,c){if(a.length<5)return c.error("Expected at least 4 arguments, but found only "+(a.length-1)+".");if(a.length%2!=1)return c.error("Expected an even number of arguments.");var f,x;c.expectedType&&c.expectedType.kind!=="value"&&(x=c.expectedType);for(var S={},I=[],D=2;DNumber.MAX_SAFE_INTEGER)return ee.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof Ae=="number"&&Math.floor(Ae)!==Ae)return ee.error("Numeric branch labels must be integer values.");if(f){if(ee.checkSubtype(f,zn(Ae)))return null}else f=zn(Ae);if(S[String(Ae)]!==void 0)return ee.error("Branch labels must be unique.");S[String(Ae)]=I.length}var Te=c.parse(Y,D,x);if(!Te)return null;x=x||Te.type,I.push(Te)}var ke=c.parse(a[1],1,pr);if(!ke)return null;var Ve=c.parse(a[a.length-1],a.length-1,x);return Ve?ke.type.kind!=="value"&&c.concat(1).checkSubtype(f,ke.type)?null:new Qe(f,x,ke,S,I,Ve):null},Qe.prototype.evaluate=function(a){var c=this.input.evaluate(a);return(zn(c)===this.inputType&&this.outputs[this.cases[c]]||this.otherwise).evaluate(a)},Qe.prototype.eachChild=function(a){a(this.input),this.outputs.forEach(a),a(this.otherwise)},Qe.prototype.outputDefined=function(){return this.outputs.every(function(a){return a.outputDefined()})&&this.otherwise.outputDefined()},Qe.prototype.serialize=function(){for(var a=this,c=["match",this.input.serialize()],f=[],x={},S=0,I=Object.keys(this.cases).sort();S=5)return c.error("Expected 3 or 4 arguments, but found "+(a.length-1)+" instead.");var f=c.parse(a[1],1,pr),x=c.parse(a[2],2,Ot);if(!f||!x)return null;if(!Ln(f.type,[Qi(pr),br,pr]))return c.error("Expected first argument to be of type array or string, but found "+Li(f.type)+" instead");if(a.length===4){var S=c.parse(a[3],3,Ot);return S?new ct(f.type,f,x,S):null}return new ct(f.type,f,x)},ct.prototype.evaluate=function(a){var c=this.input.evaluate(a),f=this.beginIndex.evaluate(a);if(!en(c,["string","array"]))throw new zo("Expected first argument to be of type array or string, but found "+Li(zn(c))+" instead.");if(this.endIndex){var x=this.endIndex.evaluate(a);return c.slice(f,x)}return c.slice(f)},ct.prototype.eachChild=function(a){a(this.input),a(this.beginIndex),this.endIndex&&a(this.endIndex)},ct.prototype.outputDefined=function(){return!1},ct.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var a=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),a]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var fr=dt("==",function(a,c,f){return c===f},jt),mi=dt("!=",function(a,c,f){return c!==f},function(a,c,f,x){return!jt(0,c,f,x)}),ut=dt("<",function(a,c,f){return c",function(a,c,f){return c>f},function(a,c,f,x){return x.compare(c,f)>0}),cr=dt("<=",function(a,c,f){return c<=f},function(a,c,f,x){return x.compare(c,f)<=0}),Xr=dt(">=",function(a,c,f){return c>=f},function(a,c,f,x){return x.compare(c,f)>=0}),g=function(a,c,f,x,S){this.type=br,this.number=a,this.locale=c,this.currency=f,this.minFractionDigits=x,this.maxFractionDigits=S};g.parse=function(a,c){if(a.length!==3)return c.error("Expected two arguments.");var f=c.parse(a[1],1,Ot);if(!f)return null;var x=a[2];if(typeof x!="object"||Array.isArray(x))return c.error("NumberFormat options argument must be an object.");var S=null;if(x.locale&&!(S=c.parse(x.locale,1,br)))return null;var I=null;if(x.currency&&!(I=c.parse(x.currency,1,br)))return null;var D=null;if(x["min-fraction-digits"]&&!(D=c.parse(x["min-fraction-digits"],1,Ot)))return null;var H=null;return x["max-fraction-digits"]&&!(H=c.parse(x["max-fraction-digits"],1,Ot))?null:new g(f,S,I,D,H)},g.prototype.evaluate=function(a){return new Intl.NumberFormat(this.locale?this.locale.evaluate(a):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(a):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(a):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(a):void 0}).format(this.number.evaluate(a))},g.prototype.eachChild=function(a){a(this.number),this.locale&&a(this.locale),this.currency&&a(this.currency),this.minFractionDigits&&a(this.minFractionDigits),this.maxFractionDigits&&a(this.maxFractionDigits)},g.prototype.outputDefined=function(){return!1},g.prototype.serialize=function(){var a={};return this.locale&&(a.locale=this.locale.serialize()),this.currency&&(a.currency=this.currency.serialize()),this.minFractionDigits&&(a["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(a["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),a]};var ki=function(a){this.type=Ot,this.input=a};ki.parse=function(a,c){if(a.length!==2)return c.error("Expected 1 argument, but found "+(a.length-1)+" instead.");var f=c.parse(a[1],1);return f?f.type.kind!=="array"&&f.type.kind!=="string"&&f.type.kind!=="value"?c.error("Expected argument of type string or array, but found "+Li(f.type)+" instead."):new ki(f):null},ki.prototype.evaluate=function(a){var c=this.input.evaluate(a);if(typeof c=="string"||Array.isArray(c))return c.length;throw new zo("Expected value to be of type string or array, but found "+Li(zn(c))+" instead.")},ki.prototype.eachChild=function(a){a(this.input)},ki.prototype.outputDefined=function(){return!1},ki.prototype.serialize=function(){var a=["length"];return this.eachChild(function(c){a.push(c.serialize())}),a};var Wr={"==":fr,"!=":mi,">":St,"<":ut,">=":Xr,"<=":cr,array:pn,at:le,boolean:pn,case:qe,coalesce:G,collator:Be,format:$s,image:Vs,in:ce,"index-of":_e,interpolate:P,"interpolate-hcl":P,"interpolate-lab":P,length:ki,let:Q,literal:cs,match:Qe,number:pn,"number-format":g,object:pn,slice:ct,step:fa,string:pn,"to-boolean":ua,"to-color":ua,"to-number":ua,"to-string":ua,var:Uc,within:ul};function Re(a,c){var f=c[0],x=c[1],S=c[2],I=c[3];f=f.evaluate(a),x=x.evaluate(a),S=S.evaluate(a);var D=I?I.evaluate(a):1,H=zs(f,x,S,D);if(H)throw new zo(H);return new Oi(f/255*D,x/255*D,S/255*D,D)}function Ti(a,c){return a in c}function An(a,c){var f=c[a];return f===void 0?null:f}function Qn(a){return{type:a}}function En(a){return{result:"success",value:a}}function ln(a){return{result:"error",value:a}}function $n(a){return a["property-type"]==="data-driven"||a["property-type"]==="cross-faded-data-driven"}function ji(a){return!!a.expression&&a.expression.parameters.indexOf("zoom")>-1}function Gi(a){return!!a.expression&&a.expression.interpolated}function an(a){return a instanceof Number?"number":a instanceof String?"string":a instanceof Boolean?"boolean":Array.isArray(a)?"array":a===null?"null":typeof a}function ea(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)}function Yh(a){return a}function Hs(a,c,f){return a!==void 0?a:c!==void 0?c:f!==void 0?f:void 0}function Ko(a,c,f,x,S){return Hs(typeof f===S?x[f]:void 0,a.default,c.default)}function fu(a,c,f){if(an(f)!=="number")return Hs(a.default,c.default);var x=a.stops.length;if(x===1||f<=a.stops[0][0])return a.stops[0][1];if(f>=a.stops[x-1][0])return a.stops[x-1][1];var S=qh(a.stops.map(function(I){return I[0]}),f);return a.stops[S][1]}function fl(a,c,f){var x=a.base!==void 0?a.base:1;if(an(f)!=="number")return Hs(a.default,c.default);var S=a.stops.length;if(S===1||f<=a.stops[0][0])return a.stops[0][1];if(f>=a.stops[S-1][0])return a.stops[S-1][1];var I=qh(a.stops.map(function(se){return se[0]}),f),D=function(se,Ae,Te,ke){var Ve=ke-Te,et=se-Te;return Ve===0?0:Ae===1?et/Ve:(Math.pow(Ae,et)-1)/(Math.pow(Ae,Ve)-1)}(f,x,a.stops[I][0],a.stops[I+1][0]),H=a.stops[I][1],Y=a.stops[I+1][1],ee=uu[c.type]||Yh;if(a.colorSpace&&a.colorSpace!=="rgb"){var ie=DA[a.colorSpace];ee=function(se,Ae){return ie.reverse(ie.interpolate(ie.forward(se),ie.forward(Ae),D))}}return typeof H.evaluate=="function"?{evaluate:function(){for(var se=[],Ae=arguments.length;Ae--;)se[Ae]=arguments[Ae];var Te=H.evaluate.apply(void 0,se),ke=Y.evaluate.apply(void 0,se);if(Te!==void 0&&ke!==void 0)return ee(Te,ke,D)}}:ee(H,Y,D)}function hu(a,c,f){return c.type==="color"?f=Oi.parse(f):c.type==="formatted"?f=ko.fromString(f.toString()):c.type==="resolvedImage"?f=Yo.fromString(f.toString()):an(f)===c.type||c.type==="enum"&&c.values[f]||(f=void 0),Hs(f,a.default,c.default)}xe.register(Wr,{error:[{kind:"error"},[br],function(a,c){throw new zo(c[0].evaluate(a))}],typeof:[br,[pr],function(a,c){return Li(zn(c[0].evaluate(a)))}],"to-rgba":[Qi(Ot,4),[lr],function(a,c){return c[0].evaluate(a).toArray()}],rgb:[lr,[Ot,Ot,Ot],Re],rgba:[lr,[Ot,Ot,Ot,Ot],Re],has:{type:sr,overloads:[[[br],function(a,c){return Ti(c[0].evaluate(a),a.properties())}],[[br,bi],function(a,c){var f=c[1];return Ti(c[0].evaluate(a),f.evaluate(a))}]]},get:{type:pr,overloads:[[[br],function(a,c){return An(c[0].evaluate(a),a.properties())}],[[br,bi],function(a,c){var f=c[1];return An(c[0].evaluate(a),f.evaluate(a))}]]},"feature-state":[pr,[br],function(a,c){return An(c[0].evaluate(a),a.featureState||{})}],properties:[bi,[],function(a){return a.properties()}],"geometry-type":[br,[],function(a){return a.geometryType()}],id:[pr,[],function(a){return a.id()}],zoom:[Ot,[],function(a){return a.globals.zoom}],"heatmap-density":[Ot,[],function(a){return a.globals.heatmapDensity||0}],"line-progress":[Ot,[],function(a){return a.globals.lineProgress||0}],accumulated:[pr,[],function(a){return a.globals.accumulated===void 0?null:a.globals.accumulated}],"+":[Ot,Qn(Ot),function(a,c){for(var f=0,x=0,S=c;x":[sr,[br,pr],function(a,c){var f=c[0],x=c[1],S=a.properties()[f.value],I=x.value;return typeof S==typeof I&&S>I}],"filter-id->":[sr,[pr],function(a,c){var f=c[0],x=a.id(),S=f.value;return typeof x==typeof S&&x>S}],"filter-<=":[sr,[br,pr],function(a,c){var f=c[0],x=c[1],S=a.properties()[f.value],I=x.value;return typeof S==typeof I&&S<=I}],"filter-id-<=":[sr,[pr],function(a,c){var f=c[0],x=a.id(),S=f.value;return typeof x==typeof S&&x<=S}],"filter->=":[sr,[br,pr],function(a,c){var f=c[0],x=c[1],S=a.properties()[f.value],I=x.value;return typeof S==typeof I&&S>=I}],"filter-id->=":[sr,[pr],function(a,c){var f=c[0],x=a.id(),S=f.value;return typeof x==typeof S&&x>=S}],"filter-has":[sr,[pr],function(a,c){return c[0].value in a.properties()}],"filter-has-id":[sr,[],function(a){return a.id()!==null&&a.id()!==void 0}],"filter-type-in":[sr,[Qi(br)],function(a,c){return c[0].value.indexOf(a.geometryType())>=0}],"filter-id-in":[sr,[Qi(pr)],function(a,c){return c[0].value.indexOf(a.id())>=0}],"filter-in-small":[sr,[br,Qi(pr)],function(a,c){var f=c[0];return c[1].value.indexOf(a.properties()[f.value])>=0}],"filter-in-large":[sr,[br,Qi(pr)],function(a,c){var f=c[0],x=c[1];return function(S,I,D,H){for(;D<=H;){var Y=D+H>>1;if(I[Y]===S)return!0;I[Y]>S?H=Y-1:D=Y+1}return!1}(a.properties()[f.value],x.value,0,x.value.length-1)}],all:{type:sr,overloads:[[[sr,sr],function(a,c){var f=c[1];return c[0].evaluate(a)&&f.evaluate(a)}],[Qn(sr),function(a,c){for(var f=0,x=c;f0&&typeof a[0]=="string"&&a[0]in Wr}function gi(a,c){var f=new zc(Wr,[],c?function(S){var I={color:lr,string:br,number:Ot,enum:br,boolean:sr,formatted:vn,resolvedImage:Di};return S.type==="array"?Qi(I[S.value]||pr,S.length):I[S.type]}(c):void 0),x=f.parse(a,void 0,void 0,void 0,c&&c.type==="string"?{typeAnnotation:"coerce"}:void 0);return x?En(new Sn(x,c)):ln(f.errors)}Sn.prototype.evaluateWithoutErrorHandling=function(a,c,f,x,S,I){return this._evaluator.globals=a,this._evaluator.feature=c,this._evaluator.featureState=f,this._evaluator.canonical=x,this._evaluator.availableImages=S||null,this._evaluator.formattedSection=I,this.expression.evaluate(this._evaluator)},Sn.prototype.evaluate=function(a,c,f,x,S,I){this._evaluator.globals=a,this._evaluator.feature=c||null,this._evaluator.featureState=f||null,this._evaluator.canonical=x,this._evaluator.availableImages=S||null,this._evaluator.formattedSection=I||null;try{var D=this.expression.evaluate(this._evaluator);if(D==null||typeof D=="number"&&D!=D)return this._defaultValue;if(this._enumValues&&!(D in this._enumValues))throw new zo("Expected value to be one of "+Object.keys(this._enumValues).map(function(H){return JSON.stringify(H)}).join(", ")+", but found "+JSON.stringify(D)+" instead.");return D}catch(H){return this._warningHistory[H.message]||(this._warningHistory[H.message]=!0,typeof console<"u"&&console.warn(H.message)),this._defaultValue}};var Fe=function(a,c){this.kind=a,this._styleExpression=c,this.isStateDependent=a!=="constant"&&!kc(c.expression)};Fe.prototype.evaluateWithoutErrorHandling=function(a,c,f,x,S,I){return this._styleExpression.evaluateWithoutErrorHandling(a,c,f,x,S,I)},Fe.prototype.evaluate=function(a,c,f,x,S,I){return this._styleExpression.evaluate(a,c,f,x,S,I)};var _i=function(a,c,f,x){this.kind=a,this.zoomStops=f,this._styleExpression=c,this.isStateDependent=a!=="camera"&&!kc(c.expression),this.interpolationType=x};function Kh(a,c){if((a=gi(a,c)).result==="error")return a;var f=a.value.expression,x=Nc(f);if(!x&&!$n(c))return ln([new Xt("","data expressions not supported")]);var S=cu(f,["zoom"]);if(!S&&!ji(c))return ln([new Xt("","zoom expressions not supported")]);var I=function D(H){var Y=null;if(H instanceof Q)Y=D(H.result);else if(H instanceof G)for(var ee=0,ie=H.args;eex.maximum?[new Ge(c,f,f+" is greater than the maximum value "+x.maximum)]:[]}function Ie(a){var c,f,x,S=a.valueSpec,I=Zt(a.value.type),D={},H=I!=="categorical"&&a.value.property===void 0,Y=!H,ee=an(a.value.stops)==="array"&&an(a.value.stops[0])==="array"&&an(a.value.stops[0][0])==="object",ie=Is({key:a.key,value:a.value,valueSpec:a.styleSpec.function,style:a.style,styleSpec:a.styleSpec,objectElementValidators:{stops:function(Te){if(I==="identity")return[new Ge(Te.key,Te.value,'identity function may not have a "stops" property')];var ke=[],Ve=Te.value;return ke=ke.concat(Kf({key:Te.key,value:Ve,valueSpec:Te.valueSpec,style:Te.style,styleSpec:Te.styleSpec,arrayElementValidator:se})),an(Ve)==="array"&&Ve.length===0&&ke.push(new Ge(Te.key,Ve,"array must have at least one stop")),ke},default:function(Te){return vr({key:Te.key,value:Te.value,valueSpec:S,style:Te.style,styleSpec:Te.styleSpec})}}});return I==="identity"&&H&&ie.push(new Ge(a.key,a.value,'missing required property "property"')),I==="identity"||a.value.stops||ie.push(new Ge(a.key,a.value,'missing required property "stops"')),I==="exponential"&&a.valueSpec.expression&&!Gi(a.valueSpec)&&ie.push(new Ge(a.key,a.value,"exponential functions not supported")),a.styleSpec.$version>=8&&(Y&&!$n(a.valueSpec)?ie.push(new Ge(a.key,a.value,"property functions not supported")):H&&!ji(a.valueSpec)&&ie.push(new Ge(a.key,a.value,"zoom functions not supported"))),I!=="categorical"&&!ee||a.value.property!==void 0||ie.push(new Ge(a.key,a.value,'"property" property is required')),ie;function se(Te){var ke=[],Ve=Te.value,et=Te.key;if(an(Ve)!=="array")return[new Ge(et,Ve,"array expected, "+an(Ve)+" found")];if(Ve.length!==2)return[new Ge(et,Ve,"array length 2 expected, length "+Ve.length+" found")];if(ee){if(an(Ve[0])!=="object")return[new Ge(et,Ve,"object expected, "+an(Ve[0])+" found")];if(Ve[0].zoom===void 0)return[new Ge(et,Ve,"object stop key must have zoom")];if(Ve[0].value===void 0)return[new Ge(et,Ve,"object stop key must have value")];if(x&&x>Zt(Ve[0].zoom))return[new Ge(et,Ve[0].zoom,"stop zoom values must appear in ascending order")];Zt(Ve[0].zoom)!==x&&(x=Zt(Ve[0].zoom),f=void 0,D={}),ke=ke.concat(Is({key:et+"[0]",value:Ve[0],valueSpec:{zoom:{}},style:Te.style,styleSpec:Te.styleSpec,objectElementValidators:{zoom:Xl,value:Ae}}))}else ke=ke.concat(Ae({key:et+"[0]",value:Ve[0],valueSpec:{},style:Te.style,styleSpec:Te.styleSpec},Ve));return ha(Pt(Ve[1]))?ke.concat([new Ge(et+"[1]",Ve[1],"expressions are not allowed in function stops.")]):ke.concat(vr({key:et+"[1]",value:Ve[1],valueSpec:S,style:Te.style,styleSpec:Te.styleSpec}))}function Ae(Te,ke){var Ve=an(Te.value),et=Zt(Te.value),Xe=Te.value!==null?Te.value:ke;if(c){if(Ve!==c)return[new Ge(Te.key,Xe,Ve+" stop domain type must match previous stop domain type "+c)]}else c=Ve;if(Ve!=="number"&&Ve!=="string"&&Ve!=="boolean")return[new Ge(Te.key,Xe,"stop domain value must be a number, string, or boolean")];if(Ve!=="number"&&I!=="categorical"){var at="number expected, "+Ve+" found";return $n(S)&&I===void 0&&(at+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ge(Te.key,Xe,at)]}return I!=="categorical"||Ve!=="number"||isFinite(et)&&Math.floor(et)===et?I!=="categorical"&&Ve==="number"&&f!==void 0&&et=2&&a[1]!=="$id"&&a[1]!=="$type";case"in":return a.length>=3&&(typeof a[1]!="string"||Array.isArray(a[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return a.length!==3||Array.isArray(a[1])||Array.isArray(a[2]);case"any":case"all":for(var c=0,f=a.slice(1);cc?1:0}function jc(a){if(!a)return!0;var c,f=a[0];return a.length<=1?f!=="any":f==="=="?du(a[1],a[2],"=="):f==="!="?Vo(du(a[1],a[2],"==")):f==="<"||f===">"||f==="<="||f===">="?du(a[1],a[2],f):f==="any"?(c=a.slice(1),["any"].concat(c.map(jc))):f==="all"?["all"].concat(a.slice(1).map(jc)):f==="none"?["all"].concat(a.slice(1).map(jc).map(Vo)):f==="in"?Zh(a[1],a.slice(2)):f==="!in"?Vo(Zh(a[1],a.slice(2))):f==="has"?za(a[1]):f==="!has"?Vo(za(a[1])):f!=="within"||a}function du(a,c,f){switch(a){case"$type":return["filter-type-"+f,c];case"$id":return["filter-id-"+f,c];default:return["filter-"+f,a,c]}}function Zh(a,c){if(c.length===0)return!1;switch(a){case"$type":return["filter-type-in",["literal",c]];case"$id":return["filter-id-in",["literal",c]];default:return c.length>200&&!c.some(function(f){return typeof f!=typeof c[0]})?["filter-in-large",a,["literal",c.sort(Jf)]]:["filter-in-small",a,["literal",c]]}}function za(a){switch(a){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",a]}}function Vo(a){return["!",a]}function ze(a){return Hc(Pt(a.value))?hl(Ht({},a,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function c(f){var x=f.value,S=f.key;if(an(x)!=="array")return[new Ge(S,x,"array expected, "+an(x)+" found")];var I,D=f.styleSpec,H=[];if(x.length<1)return[new Ge(S,x,"filter array must have at least 1 element")];switch(H=H.concat(hc({key:S+"[0]",value:x[0],valueSpec:D.filter_operator,style:f.style,styleSpec:f.styleSpec})),Zt(x[0])){case"<":case"<=":case">":case">=":x.length>=2&&Zt(x[1])==="$type"&&H.push(new Ge(S,x,'"$type" cannot be use with operator "'+x[0]+'"'));case"==":case"!=":x.length!==3&&H.push(new Ge(S,x,'filter array for operator "'+x[0]+'" must have 3 elements'));case"in":case"!in":x.length>=2&&(I=an(x[1]))!=="string"&&H.push(new Ge(S+"[1]",x[1],"string expected, "+I+" found"));for(var Y=2;Y=ie[Te+0]&&x>=ie[Te+1])?(D[Ae]=!0,I.push(ee[Ae])):D[Ae]=!1}}},us.prototype._forEachCell=function(a,c,f,x,S,I,D,H){for(var Y=this._convertToCellCoord(a),ee=this._convertToCellCoord(c),ie=this._convertToCellCoord(f),se=this._convertToCellCoord(x),Ae=Y;Ae<=ie;Ae++)for(var Te=ee;Te<=se;Te++){var ke=this.d*Te+Ae;if((!H||H(this._convertFromCellCoord(Ae),this._convertFromCellCoord(Te),this._convertFromCellCoord(Ae+1),this._convertFromCellCoord(Te+1)))&&S.call(this,a,c,f,x,ke,I,D,H))return}},us.prototype._convertFromCellCoord=function(a){return(a-this.padding)/this.scale},us.prototype._convertToCellCoord=function(a){return Math.max(0,Math.min(this.d-1,Math.floor(a*this.scale)+this.padding))},us.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var a=this.cells,c=3+this.cells.length+1+1,f=0,x=0;x=0)){var ie=a[ee];Y[ee]=xn[H].shallow.indexOf(ee)>=0?ie:Ha(ie,c)}a instanceof Error&&(Y.message=a.message)}if(Y.$name)throw new Error("$name property is reserved for worker serialization logic.");return H!=="Object"&&(Y.$name=H),Y}throw new Error("can't serialize object of type "+typeof a)}function ja(a){if(a==null||typeof a=="boolean"||typeof a=="number"||typeof a=="string"||a instanceof Boolean||a instanceof Number||a instanceof String||a instanceof Date||a instanceof RegExp||Qf(a)||nf(a)||ArrayBuffer.isView(a)||a instanceof Jh)return a;if(Array.isArray(a))return a.map(ja);if(typeof a=="object"){var c=a.$name||"Object",f=xn[c].klass;if(!f)throw new Error("can't deserialize unregistered class "+c);if(f.deserialize)return f.deserialize(a);for(var x=Object.create(f.prototype),S=0,I=Object.keys(a);S=0?H:ja(H)}}return x}throw new Error("can't deserialize object of type "+typeof a)}var LA=function(){this.first=!0};LA.prototype.update=function(a,c){var f=Math.floor(a);return this.first?(this.first=!1,this.lastIntegerZoom=f,this.lastIntegerZoomTime=0,this.lastZoom=a,this.lastFloorZoom=f,!0):(this.lastFloorZoom>f?(this.lastIntegerZoom=f+1,this.lastIntegerZoomTime=c):this.lastFloorZoom=128&&a<=255},Arabic:function(a){return a>=1536&&a<=1791},"Arabic Supplement":function(a){return a>=1872&&a<=1919},"Arabic Extended-A":function(a){return a>=2208&&a<=2303},"Hangul Jamo":function(a){return a>=4352&&a<=4607},"Unified Canadian Aboriginal Syllabics":function(a){return a>=5120&&a<=5759},Khmer:function(a){return a>=6016&&a<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(a){return a>=6320&&a<=6399},"General Punctuation":function(a){return a>=8192&&a<=8303},"Letterlike Symbols":function(a){return a>=8448&&a<=8527},"Number Forms":function(a){return a>=8528&&a<=8591},"Miscellaneous Technical":function(a){return a>=8960&&a<=9215},"Control Pictures":function(a){return a>=9216&&a<=9279},"Optical Character Recognition":function(a){return a>=9280&&a<=9311},"Enclosed Alphanumerics":function(a){return a>=9312&&a<=9471},"Geometric Shapes":function(a){return a>=9632&&a<=9727},"Miscellaneous Symbols":function(a){return a>=9728&&a<=9983},"Miscellaneous Symbols and Arrows":function(a){return a>=11008&&a<=11263},"CJK Radicals Supplement":function(a){return a>=11904&&a<=12031},"Kangxi Radicals":function(a){return a>=12032&&a<=12255},"Ideographic Description Characters":function(a){return a>=12272&&a<=12287},"CJK Symbols and Punctuation":function(a){return a>=12288&&a<=12351},Hiragana:function(a){return a>=12352&&a<=12447},Katakana:function(a){return a>=12448&&a<=12543},Bopomofo:function(a){return a>=12544&&a<=12591},"Hangul Compatibility Jamo":function(a){return a>=12592&&a<=12687},Kanbun:function(a){return a>=12688&&a<=12703},"Bopomofo Extended":function(a){return a>=12704&&a<=12735},"CJK Strokes":function(a){return a>=12736&&a<=12783},"Katakana Phonetic Extensions":function(a){return a>=12784&&a<=12799},"Enclosed CJK Letters and Months":function(a){return a>=12800&&a<=13055},"CJK Compatibility":function(a){return a>=13056&&a<=13311},"CJK Unified Ideographs Extension A":function(a){return a>=13312&&a<=19903},"Yijing Hexagram Symbols":function(a){return a>=19904&&a<=19967},"CJK Unified Ideographs":function(a){return a>=19968&&a<=40959},"Yi Syllables":function(a){return a>=40960&&a<=42127},"Yi Radicals":function(a){return a>=42128&&a<=42191},"Hangul Jamo Extended-A":function(a){return a>=43360&&a<=43391},"Hangul Syllables":function(a){return a>=44032&&a<=55215},"Hangul Jamo Extended-B":function(a){return a>=55216&&a<=55295},"Private Use Area":function(a){return a>=57344&&a<=63743},"CJK Compatibility Ideographs":function(a){return a>=63744&&a<=64255},"Arabic Presentation Forms-A":function(a){return a>=64336&&a<=65023},"Vertical Forms":function(a){return a>=65040&&a<=65055},"CJK Compatibility Forms":function(a){return a>=65072&&a<=65103},"Small Form Variants":function(a){return a>=65104&&a<=65135},"Arabic Presentation Forms-B":function(a){return a>=65136&&a<=65279},"Halfwidth and Fullwidth Forms":function(a){return a>=65280&&a<=65519}};function up(a){for(var c=0,f=a;c=65097&&a<=65103)||gr["CJK Compatibility Ideographs"](a)||gr["CJK Compatibility"](a)||gr["CJK Radicals Supplement"](a)||gr["CJK Strokes"](a)||!(!gr["CJK Symbols and Punctuation"](a)||a>=12296&&a<=12305||a>=12308&&a<=12319||a===12336)||gr["CJK Unified Ideographs Extension A"](a)||gr["CJK Unified Ideographs"](a)||gr["Enclosed CJK Letters and Months"](a)||gr["Hangul Compatibility Jamo"](a)||gr["Hangul Jamo Extended-A"](a)||gr["Hangul Jamo Extended-B"](a)||gr["Hangul Jamo"](a)||gr["Hangul Syllables"](a)||gr.Hiragana(a)||gr["Ideographic Description Characters"](a)||gr.Kanbun(a)||gr["Kangxi Radicals"](a)||gr["Katakana Phonetic Extensions"](a)||gr.Katakana(a)&&a!==12540||!(!gr["Halfwidth and Fullwidth Forms"](a)||a===65288||a===65289||a===65293||a>=65306&&a<=65310||a===65339||a===65341||a===65343||a>=65371&&a<=65503||a===65507||a>=65512&&a<=65519)||!(!gr["Small Form Variants"](a)||a>=65112&&a<=65118||a>=65123&&a<=65126)||gr["Unified Canadian Aboriginal Syllabics"](a)||gr["Unified Canadian Aboriginal Syllabics Extended"](a)||gr["Vertical Forms"](a)||gr["Yijing Hexagram Symbols"](a)||gr["Yi Syllables"](a)||gr["Yi Radicals"](a))))}function Gc(a){return!(of(a)||function(c){return!!(gr["Latin-1 Supplement"](c)&&(c===167||c===169||c===174||c===177||c===188||c===189||c===190||c===215||c===247)||gr["General Punctuation"](c)&&(c===8214||c===8224||c===8225||c===8240||c===8241||c===8251||c===8252||c===8258||c===8263||c===8264||c===8265||c===8273)||gr["Letterlike Symbols"](c)||gr["Number Forms"](c)||gr["Miscellaneous Technical"](c)&&(c>=8960&&c<=8967||c>=8972&&c<=8991||c>=8996&&c<=9e3||c===9003||c>=9085&&c<=9114||c>=9150&&c<=9165||c===9167||c>=9169&&c<=9179||c>=9186&&c<=9215)||gr["Control Pictures"](c)&&c!==9251||gr["Optical Character Recognition"](c)||gr["Enclosed Alphanumerics"](c)||gr["Geometric Shapes"](c)||gr["Miscellaneous Symbols"](c)&&!(c>=9754&&c<=9759)||gr["Miscellaneous Symbols and Arrows"](c)&&(c>=11026&&c<=11055||c>=11088&&c<=11097||c>=11192&&c<=11243)||gr["CJK Symbols and Punctuation"](c)||gr.Katakana(c)||gr["Private Use Area"](c)||gr["CJK Compatibility Forms"](c)||gr["Small Form Variants"](c)||gr["Halfwidth and Fullwidth Forms"](c)||c===8734||c===8756||c===8757||c>=9984&&c<=10087||c>=10102&&c<=10131||c===65532||c===65533)}(a))}function pl(a){return a>=1424&&a<=2303||gr["Arabic Presentation Forms-A"](a)||gr["Arabic Presentation Forms-B"](a)}function Ca(a,c){return!(!c&&pl(a)||a>=2304&&a<=3583||a>=3840&&a<=4255||gr.Khmer(a))}function sf(a){for(var c=0,f=a;c-1&&(fs="error"),dc&&dc(a)};function af(){NA.fire(new ye("pluginStateChange",{pluginStatus:fs,pluginURL:pc}))}var NA=new rt,kA=function(){return fs},Il=function(){if(fs!=="deferred"||!pc)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");fs="loading",af(),pc&&Ml({url:pc},function(a){a?FA(a):(fs="loaded",af())})},Al={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return fs==="loaded"||Al.applyArabicShaping!=null},isLoading:function(){return fs==="loading"},setState:function(a){fs=a.pluginStatus,pc=a.pluginURL},isParsed:function(){return Al.applyArabicShaping!=null&&Al.processBidirectionalText!=null&&Al.processStyledBidirectionalText!=null},getPluginURL:function(){return pc}},qi=function(a,c){this.zoom=a,c?(this.now=c.now,this.fadeDuration=c.fadeDuration,this.zoomHistory=c.zoomHistory,this.transition=c.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new LA,this.transition={})};qi.prototype.isSupportedScript=function(a){return function(c,f){for(var x=0,S=c;xthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:c+(1-c)*f}:{fromScale:.5,toScale:1,t:1-(1-f)*c}};var Ac=function(a,c){this.property=a,this.value=c,this.expression=function(f,x){if(ea(f))return new Vc(f,x);if(ha(f)){var S=Kh(f,x);if(S.result==="error")throw new Error(S.value.map(function(D){return D.key+": "+D.message}).join(", "));return S.value}var I=f;return typeof f=="string"&&x.type==="color"&&(I=Oi.parse(f)),{kind:"constant",evaluate:function(){return I}}}(c===void 0?a.specification.default:c,a.specification)};Ac.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Ac.prototype.possiblyEvaluate=function(a,c,f){return this.property.possiblyEvaluate(this,a,c,f)};var Pl=function(a){this.property=a,this.value=new Ac(a,void 0)};Pl.prototype.transitioned=function(a,c){return new lf(this.property,this.value,c,z({},a.transition,this.transition),a.now)},Pl.prototype.untransitioned=function(){return new lf(this.property,this.value,null,{},0)};var Gs=function(a){this._properties=a,this._values=Object.create(a.defaultTransitionablePropertyValues)};Gs.prototype.getValue=function(a){return $(this._values[a].value.value)},Gs.prototype.setValue=function(a,c){this._values.hasOwnProperty(a)||(this._values[a]=new Pl(this._values[a].property)),this._values[a].value=new Ac(this._values[a].property,c===null?void 0:$(c))},Gs.prototype.getTransition=function(a){return $(this._values[a].transition)},Gs.prototype.setTransition=function(a,c){this._values.hasOwnProperty(a)||(this._values[a]=new Pl(this._values[a].property)),this._values[a].transition=$(c)||void 0},Gs.prototype.serialize=function(){for(var a={},c=0,f=Object.keys(this._values);cthis.end)return this.prior=null,S;if(this.value.isDataDriven())return this.prior=null,S;if(x=1)return 1;var Y=H*H,ee=Y*H;return 4*(H<.5?ee:3*(H-Y)+ee-.75)}(D))}return S};var pu=function(a){this._properties=a,this._values=Object.create(a.defaultTransitioningPropertyValues)};pu.prototype.possiblyEvaluate=function(a,c,f){for(var x=new Qh(this._properties),S=0,I=Object.keys(this._values);SI.zoomHistory.lastIntegerZoom?{from:f,to:x}:{from:S,to:x}},c.prototype.interpolate=function(f){return f},c}(zr),da=function(a){this.specification=a};da.prototype.possiblyEvaluate=function(a,c,f,x){if(a.value!==void 0){if(a.expression.kind==="constant"){var S=a.expression.evaluate(c,null,{},f,x);return this._calculate(S,S,S,c)}return this._calculate(a.expression.evaluate(new qi(Math.floor(c.zoom-1),c)),a.expression.evaluate(new qi(Math.floor(c.zoom),c)),a.expression.evaluate(new qi(Math.floor(c.zoom+1),c)),c)}},da.prototype._calculate=function(a,c,f,x){return x.zoom>x.zoomHistory.lastIntegerZoom?{from:a,to:c}:{from:f,to:c}},da.prototype.interpolate=function(a){return a};var ml=function(a){this.specification=a};ml.prototype.possiblyEvaluate=function(a,c,f,x){return!!a.expression.evaluate(c,null,{},f,x)},ml.prototype.interpolate=function(){return!1};var Rs=function(a){for(var c in this.properties=a,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],a){var f=a[c];f.specification.overridable&&this.overridableProperties.push(c);var x=this.defaultPropertyValues[c]=new Ac(f,void 0),S=this.defaultTransitionablePropertyValues[c]=new Pl(f);this.defaultTransitioningPropertyValues[c]=S.untransitioned(),this.defaultPossiblyEvaluatedValues[c]=x.possiblyEvaluate({})}};Tr("DataDrivenProperty",zr),Tr("DataConstantProperty",ei),Tr("CrossFadedDataDrivenProperty",Au),Tr("CrossFadedProperty",da),Tr("ColorRampProperty",ml);var Ma=function(a){function c(f,x){if(a.call(this),this.id=f.id,this.type=f.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},f.type!=="custom"&&(this.metadata=(f=f).metadata,this.minzoom=f.minzoom,this.maxzoom=f.maxzoom,f.type!=="background"&&(this.source=f.source,this.sourceLayer=f["source-layer"],this.filter=f.filter),x.layout&&(this._unevaluatedLayout=new Yl(x.layout)),x.paint)){for(var S in this._transitionablePaint=new Gs(x.paint),f.paint)this.setPaintProperty(S,f.paint[S],{validate:!1});for(var I in f.layout)this.setLayoutProperty(I,f.layout[I],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Qh(x.paint)}}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},c.prototype.getLayoutProperty=function(f){return f==="visibility"?this.visibility:this._unevaluatedLayout.getValue(f)},c.prototype.setLayoutProperty=function(f,x,S){S===void 0&&(S={}),x!=null&&this._validate(ta,"layers."+this.id+".layout."+f,f,x,S)||(f!=="visibility"?this._unevaluatedLayout.setValue(f,x):this.visibility=x)},c.prototype.getPaintProperty=function(f){return j(f,"-transition")?this._transitionablePaint.getTransition(f.slice(0,-11)):this._transitionablePaint.getValue(f)},c.prototype.setPaintProperty=function(f,x,S){if(S===void 0&&(S={}),x!=null&&this._validate(Va,"layers."+this.id+".paint."+f,f,x,S))return!1;if(j(f,"-transition"))return this._transitionablePaint.setTransition(f.slice(0,-11),x||void 0),!1;var I=this._transitionablePaint._values[f],D=I.property.specification["property-type"]==="cross-faded-data-driven",H=I.value.isDataDriven(),Y=I.value;this._transitionablePaint.setValue(f,x),this._handleSpecialPaintPropertyUpdate(f);var ee=this._transitionablePaint._values[f].value;return ee.isDataDriven()||H||D||this._handleOverridablePaintPropertyUpdate(f,Y,ee)},c.prototype._handleSpecialPaintPropertyUpdate=function(f){},c.prototype._handleOverridablePaintPropertyUpdate=function(f,x,S){return!1},c.prototype.isHidden=function(f){return!!(this.minzoom&&f=this.maxzoom)||this.visibility==="none"},c.prototype.updateTransitions=function(f){this._transitioningPaint=this._transitionablePaint.transitioned(f,this._transitioningPaint)},c.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},c.prototype.recalculate=function(f,x){f.getCrossfadeParameters&&(this._crossfadeParameters=f.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(f,void 0,x)),this.paint=this._transitioningPaint.possiblyEvaluate(f,void 0,x)},c.prototype.serialize=function(){var f={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(f.layout=f.layout||{},f.layout.visibility=this.visibility),fe(f,function(x,S){return!(x===void 0||S==="layout"&&!Object.keys(x).length||S==="paint"&&!Object.keys(x).length)})},c.prototype._validate=function(f,x,S,I,D){return D===void 0&&(D={}),(!D||D.validate!==!1)&&dl(this,f.call(rs,{key:x,layerType:this.type,objectKey:S,value:I,styleSpec:Se,style:{glyphs:!0,sprite:!0}}))},c.prototype.is3D=function(){return!1},c.prototype.isTileClipped=function(){return!1},c.prototype.hasOffscreenPass=function(){return!1},c.prototype.resize=function(){},c.prototype.isStateDependent=function(){for(var f in this.paint._values){var x=this.paint.get(f);if(x instanceof Ps&&$n(x.property.specification)&&(x.value.kind==="source"||x.value.kind==="composite")&&x.value.isStateDependent)return!0}return!1},c}(rt),UA={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},$f=function(a,c){this._structArray=a,this._pos1=c*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},In=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Bs(a,c){c===void 0&&(c=1);var f=0,x=0;return{members:a.map(function(S){var I=UA[S.type].BYTES_PER_ELEMENT,D=f=zA(f,Math.max(c,I)),H=S.components||1;return x=Math.max(x,I),f+=I*H,{name:S.name,type:S.type,components:H,offset:D}}),size:zA(f,Math.max(x,c)),alignment:c}}function zA(a,c){return Math.ceil(a/c)*c}In.serialize=function(a,c){return a._trim(),c&&(a.isTransferred=!0,c.push(a.arrayBuffer)),{length:a.length,arrayBuffer:a.arrayBuffer}},In.deserialize=function(a){var c=Object.create(this.prototype);return c.arrayBuffer=a.arrayBuffer,c.length=a.length,c.capacity=a.arrayBuffer.byteLength/c.bytesPerElement,c._refreshViews(),c},In.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},In.prototype.clear=function(){this.length=0},In.prototype.resize=function(a){this.reserve(a),this.length=a},In.prototype.reserve=function(a){if(a>this.capacity){this.capacity=Math.max(a,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var c=this.uint8;this._refreshViews(),c&&this.uint8.set(c)}},In.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Wc=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f,x){var S=this.length;return this.resize(S+1),this.emplace(S,f,x)},c.prototype.emplace=function(f,x,S){var I=2*f;return this.int16[I+0]=x,this.int16[I+1]=S,f},c}(In);Wc.prototype.bytesPerElement=4,Tr("StructArrayLayout2i4",Wc);var $h=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f,x,S,I){var D=this.length;return this.resize(D+1),this.emplace(D,f,x,S,I)},c.prototype.emplace=function(f,x,S,I,D){var H=4*f;return this.int16[H+0]=x,this.int16[H+1]=S,this.int16[H+2]=I,this.int16[H+3]=D,f},c}(In);$h.prototype.bytesPerElement=8,Tr("StructArrayLayout4i8",$h);var Rl=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f,x,S,I,D,H){var Y=this.length;return this.resize(Y+1),this.emplace(Y,f,x,S,I,D,H)},c.prototype.emplace=function(f,x,S,I,D,H,Y){var ee=6*f;return this.int16[ee+0]=x,this.int16[ee+1]=S,this.int16[ee+2]=I,this.int16[ee+3]=D,this.int16[ee+4]=H,this.int16[ee+5]=Y,f},c}(In);Rl.prototype.bytesPerElement=12,Tr("StructArrayLayout2i4i12",Rl);var mn=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f,x,S,I,D,H){var Y=this.length;return this.resize(Y+1),this.emplace(Y,f,x,S,I,D,H)},c.prototype.emplace=function(f,x,S,I,D,H,Y){var ee=4*f,ie=8*f;return this.int16[ee+0]=x,this.int16[ee+1]=S,this.uint8[ie+4]=I,this.uint8[ie+5]=D,this.uint8[ie+6]=H,this.uint8[ie+7]=Y,f},c}(In);mn.prototype.bytesPerElement=8,Tr("StructArrayLayout2i4ub8",mn);var eh=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f,x){var S=this.length;return this.resize(S+1),this.emplace(S,f,x)},c.prototype.emplace=function(f,x,S){var I=2*f;return this.float32[I+0]=x,this.float32[I+1]=S,f},c}(In);eh.prototype.bytesPerElement=8,Tr("StructArrayLayout2f8",eh);var mc=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f,x,S,I,D,H,Y,ee,ie,se){var Ae=this.length;return this.resize(Ae+1),this.emplace(Ae,f,x,S,I,D,H,Y,ee,ie,se)},c.prototype.emplace=function(f,x,S,I,D,H,Y,ee,ie,se,Ae){var Te=10*f;return this.uint16[Te+0]=x,this.uint16[Te+1]=S,this.uint16[Te+2]=I,this.uint16[Te+3]=D,this.uint16[Te+4]=H,this.uint16[Te+5]=Y,this.uint16[Te+6]=ee,this.uint16[Te+7]=ie,this.uint16[Te+8]=se,this.uint16[Te+9]=Ae,f},c}(In);mc.prototype.bytesPerElement=20,Tr("StructArrayLayout10ui20",mc);var fp=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f,x,S,I,D,H,Y,ee,ie,se,Ae,Te){var ke=this.length;return this.resize(ke+1),this.emplace(ke,f,x,S,I,D,H,Y,ee,ie,se,Ae,Te)},c.prototype.emplace=function(f,x,S,I,D,H,Y,ee,ie,se,Ae,Te,ke){var Ve=12*f;return this.int16[Ve+0]=x,this.int16[Ve+1]=S,this.int16[Ve+2]=I,this.int16[Ve+3]=D,this.uint16[Ve+4]=H,this.uint16[Ve+5]=Y,this.uint16[Ve+6]=ee,this.uint16[Ve+7]=ie,this.int16[Ve+8]=se,this.int16[Ve+9]=Ae,this.int16[Ve+10]=Te,this.int16[Ve+11]=ke,f},c}(In);fp.prototype.bytesPerElement=24,Tr("StructArrayLayout4i4ui4i24",fp);var th=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f,x,S){var I=this.length;return this.resize(I+1),this.emplace(I,f,x,S)},c.prototype.emplace=function(f,x,S,I){var D=3*f;return this.float32[D+0]=x,this.float32[D+1]=S,this.float32[D+2]=I,f},c}(In);th.prototype.bytesPerElement=12,Tr("StructArrayLayout3f12",th);var ed=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f){var x=this.length;return this.resize(x+1),this.emplace(x,f)},c.prototype.emplace=function(f,x){return this.uint32[1*f+0]=x,f},c}(In);ed.prototype.bytesPerElement=4,Tr("StructArrayLayout1ul4",ed);var VA=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f,x,S,I,D,H,Y,ee,ie){var se=this.length;return this.resize(se+1),this.emplace(se,f,x,S,I,D,H,Y,ee,ie)},c.prototype.emplace=function(f,x,S,I,D,H,Y,ee,ie,se){var Ae=10*f,Te=5*f;return this.int16[Ae+0]=x,this.int16[Ae+1]=S,this.int16[Ae+2]=I,this.int16[Ae+3]=D,this.int16[Ae+4]=H,this.int16[Ae+5]=Y,this.uint32[Te+3]=ee,this.uint16[Ae+8]=ie,this.uint16[Ae+9]=se,f},c}(In);VA.prototype.bytesPerElement=20,Tr("StructArrayLayout6i1ul2ui20",VA);var rh=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f,x,S,I,D,H){var Y=this.length;return this.resize(Y+1),this.emplace(Y,f,x,S,I,D,H)},c.prototype.emplace=function(f,x,S,I,D,H,Y){var ee=6*f;return this.int16[ee+0]=x,this.int16[ee+1]=S,this.int16[ee+2]=I,this.int16[ee+3]=D,this.int16[ee+4]=H,this.int16[ee+5]=Y,f},c}(In);rh.prototype.bytesPerElement=12,Tr("StructArrayLayout2i2i2i12",rh);var xs=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f,x,S,I,D){var H=this.length;return this.resize(H+1),this.emplace(H,f,x,S,I,D)},c.prototype.emplace=function(f,x,S,I,D,H){var Y=4*f,ee=8*f;return this.float32[Y+0]=x,this.float32[Y+1]=S,this.float32[Y+2]=I,this.int16[ee+6]=D,this.int16[ee+7]=H,f},c}(In);xs.prototype.bytesPerElement=16,Tr("StructArrayLayout2f1f2i16",xs);var td=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f,x,S,I){var D=this.length;return this.resize(D+1),this.emplace(D,f,x,S,I)},c.prototype.emplace=function(f,x,S,I,D){var H=12*f,Y=3*f;return this.uint8[H+0]=x,this.uint8[H+1]=S,this.float32[Y+1]=I,this.float32[Y+2]=D,f},c}(In);td.prototype.bytesPerElement=12,Tr("StructArrayLayout2ub2f12",td);var Ga=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f,x,S){var I=this.length;return this.resize(I+1),this.emplace(I,f,x,S)},c.prototype.emplace=function(f,x,S,I){var D=3*f;return this.uint16[D+0]=x,this.uint16[D+1]=S,this.uint16[D+2]=I,f},c}(In);Ga.prototype.bytesPerElement=6,Tr("StructArrayLayout3ui6",Ga);var mu=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f,x,S,I,D,H,Y,ee,ie,se,Ae,Te,ke,Ve,et,Xe,at){var _t=this.length;return this.resize(_t+1),this.emplace(_t,f,x,S,I,D,H,Y,ee,ie,se,Ae,Te,ke,Ve,et,Xe,at)},c.prototype.emplace=function(f,x,S,I,D,H,Y,ee,ie,se,Ae,Te,ke,Ve,et,Xe,at,_t){var bt=24*f,Mt=12*f,Ut=48*f;return this.int16[bt+0]=x,this.int16[bt+1]=S,this.uint16[bt+2]=I,this.uint16[bt+3]=D,this.uint32[Mt+2]=H,this.uint32[Mt+3]=Y,this.uint32[Mt+4]=ee,this.uint16[bt+10]=ie,this.uint16[bt+11]=se,this.uint16[bt+12]=Ae,this.float32[Mt+7]=Te,this.float32[Mt+8]=ke,this.uint8[Ut+36]=Ve,this.uint8[Ut+37]=et,this.uint8[Ut+38]=Xe,this.uint32[Mt+10]=at,this.int16[bt+22]=_t,f},c}(In);mu.prototype.bytesPerElement=48,Tr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",mu);var ih=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f,x,S,I,D,H,Y,ee,ie,se,Ae,Te,ke,Ve,et,Xe,at,_t,bt,Mt,Ut,$t,Ar,Qr,Cr,ni,Pr,Vi){var Ai=this.length;return this.resize(Ai+1),this.emplace(Ai,f,x,S,I,D,H,Y,ee,ie,se,Ae,Te,ke,Ve,et,Xe,at,_t,bt,Mt,Ut,$t,Ar,Qr,Cr,ni,Pr,Vi)},c.prototype.emplace=function(f,x,S,I,D,H,Y,ee,ie,se,Ae,Te,ke,Ve,et,Xe,at,_t,bt,Mt,Ut,$t,Ar,Qr,Cr,ni,Pr,Vi,Ai){var Gr=34*f,rn=17*f;return this.int16[Gr+0]=x,this.int16[Gr+1]=S,this.int16[Gr+2]=I,this.int16[Gr+3]=D,this.int16[Gr+4]=H,this.int16[Gr+5]=Y,this.int16[Gr+6]=ee,this.int16[Gr+7]=ie,this.uint16[Gr+8]=se,this.uint16[Gr+9]=Ae,this.uint16[Gr+10]=Te,this.uint16[Gr+11]=ke,this.uint16[Gr+12]=Ve,this.uint16[Gr+13]=et,this.uint16[Gr+14]=Xe,this.uint16[Gr+15]=at,this.uint16[Gr+16]=_t,this.uint16[Gr+17]=bt,this.uint16[Gr+18]=Mt,this.uint16[Gr+19]=Ut,this.uint16[Gr+20]=$t,this.uint16[Gr+21]=Ar,this.uint16[Gr+22]=Qr,this.uint32[rn+12]=Cr,this.float32[rn+13]=ni,this.float32[rn+14]=Pr,this.float32[rn+15]=Vi,this.float32[rn+16]=Ai,f},c}(In);ih.prototype.bytesPerElement=68,Tr("StructArrayLayout8i15ui1ul4f68",ih);var gu=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f){var x=this.length;return this.resize(x+1),this.emplace(x,f)},c.prototype.emplace=function(f,x){return this.float32[1*f+0]=x,f},c}(In);gu.prototype.bytesPerElement=4,Tr("StructArrayLayout1f4",gu);var Zo=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f,x,S){var I=this.length;return this.resize(I+1),this.emplace(I,f,x,S)},c.prototype.emplace=function(f,x,S,I){var D=3*f;return this.int16[D+0]=x,this.int16[D+1]=S,this.int16[D+2]=I,f},c}(In);Zo.prototype.bytesPerElement=6,Tr("StructArrayLayout3i6",Zo);var hp=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f,x,S){var I=this.length;return this.resize(I+1),this.emplace(I,f,x,S)},c.prototype.emplace=function(f,x,S,I){var D=4*f;return this.uint32[2*f+0]=x,this.uint16[D+2]=S,this.uint16[D+3]=I,f},c}(In);hp.prototype.bytesPerElement=8,Tr("StructArrayLayout1ul2ui8",hp);var cf=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f,x){var S=this.length;return this.resize(S+1),this.emplace(S,f,x)},c.prototype.emplace=function(f,x,S){var I=2*f;return this.uint16[I+0]=x,this.uint16[I+1]=S,f},c}(In);cf.prototype.bytesPerElement=4,Tr("StructArrayLayout2ui4",cf);var _u=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f){var x=this.length;return this.resize(x+1),this.emplace(x,f)},c.prototype.emplace=function(f,x){return this.uint16[1*f+0]=x,f},c}(In);_u.prototype.bytesPerElement=2,Tr("StructArrayLayout1ui2",_u);var yu=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},c.prototype.emplaceBack=function(f,x,S,I){var D=this.length;return this.resize(D+1),this.emplace(D,f,x,S,I)},c.prototype.emplace=function(f,x,S,I,D){var H=4*f;return this.float32[H+0]=x,this.float32[H+1]=S,this.float32[H+2]=I,this.float32[H+3]=D,f},c}(In);yu.prototype.bytesPerElement=16,Tr("StructArrayLayout4f16",yu);var d=function(a){function c(){a.apply(this,arguments)}a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c;var f={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return f.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},f.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},f.x1.get=function(){return this._structArray.int16[this._pos2+2]},f.y1.get=function(){return this._structArray.int16[this._pos2+3]},f.x2.get=function(){return this._structArray.int16[this._pos2+4]},f.y2.get=function(){return this._structArray.int16[this._pos2+5]},f.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},f.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},f.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},f.anchorPoint.get=function(){return new u(this.anchorPointX,this.anchorPointY)},Object.defineProperties(c.prototype,f),c}($f);d.prototype.size=20;var _=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype.get=function(f){return new d(this,f)},c}(VA);Tr("CollisionBoxArray",_);var p=function(a){function c(){a.apply(this,arguments)}a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c;var f={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return f.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},f.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},f.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},f.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},f.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},f.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},f.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},f.segment.get=function(){return this._structArray.uint16[this._pos2+10]},f.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},f.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},f.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},f.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},f.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},f.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},f.placedOrientation.set=function(x){this._structArray.uint8[this._pos1+37]=x},f.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},f.hidden.set=function(x){this._structArray.uint8[this._pos1+38]=x},f.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},f.crossTileID.set=function(x){this._structArray.uint32[this._pos4+10]=x},f.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(c.prototype,f),c}($f);p.prototype.size=48;var b=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype.get=function(f){return new p(this,f)},c}(mu);Tr("PlacedSymbolArray",b);var B=function(a){function c(){a.apply(this,arguments)}a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c;var f={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return f.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},f.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},f.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},f.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},f.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},f.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},f.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},f.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},f.key.get=function(){return this._structArray.uint16[this._pos2+8]},f.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},f.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},f.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},f.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},f.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},f.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},f.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},f.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},f.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},f.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},f.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},f.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},f.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},f.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},f.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},f.crossTileID.set=function(x){this._structArray.uint32[this._pos4+12]=x},f.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},f.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},f.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},f.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(c.prototype,f),c}($f);B.prototype.size=68;var k=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype.get=function(f){return new B(this,f)},c}(ih);Tr("SymbolInstanceArray",k);var V=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype.getoffsetX=function(f){return this.float32[1*f+0]},c}(gu);Tr("GlyphOffsetArray",V);var q=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype.getx=function(f){return this.int16[3*f+0]},c.prototype.gety=function(f){return this.int16[3*f+1]},c.prototype.gettileUnitDistanceFromAnchor=function(f){return this.int16[3*f+2]},c}(Zo);Tr("SymbolLineVertexArray",q);var re=function(a){function c(){a.apply(this,arguments)}a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c;var f={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return f.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},f.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},f.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(c.prototype,f),c}($f);re.prototype.size=8;var ue=function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype.get=function(f){return new re(this,f)},c}(hp);Tr("FeatureIndexArray",ue);var Ee=Bs([{name:"a_pos",components:2,type:"Int16"}],4).members,Ce=function(a){a===void 0&&(a=[]),this.segments=a};function Me(a,c){return 256*(a=O(Math.floor(a),0,255))+O(Math.floor(c),0,255)}Ce.prototype.prepareSegment=function(a,c,f,x){var S=this.segments[this.segments.length-1];return a>Ce.MAX_VERTEX_ARRAY_LENGTH&&we("Max vertices per segment is "+Ce.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+a),(!S||S.vertexLength+a>Ce.MAX_VERTEX_ARRAY_LENGTH||S.sortKey!==x)&&(S={vertexOffset:c.length,primitiveOffset:f.length,vertexLength:0,primitiveLength:0},x!==void 0&&(S.sortKey=x),this.segments.push(S)),S},Ce.prototype.get=function(){return this.segments},Ce.prototype.destroy=function(){for(var a=0,c=this.segments;a>>16)*H&65535)<<16)&4294967295)<<15|ee>>>17))*Y+(((ee>>>16)*Y&65535)<<16)&4294967295)<<13|I>>>19))+((5*(I>>>16)&65535)<<16)&4294967295))+((58964+(D>>>16)&65535)<<16);switch(ee=0,x){case 3:ee^=(255&c.charCodeAt(ie+2))<<16;case 2:ee^=(255&c.charCodeAt(ie+1))<<8;case 1:I^=ee=(65535&(ee=(ee=(65535&(ee^=255&c.charCodeAt(ie)))*H+(((ee>>>16)*H&65535)<<16)&4294967295)<<15|ee>>>17))*Y+(((ee>>>16)*Y&65535)<<16)&4294967295}return I^=c.length,I=2246822507*(65535&(I^=I>>>16))+((2246822507*(I>>>16)&65535)<<16)&4294967295,I=3266489909*(65535&(I^=I>>>13))+((3266489909*(I>>>16)&65535)<<16)&4294967295,(I^=I>>>16)>>>0}}),Ze=o(function(a){a.exports=function(c,f){for(var x,S=c.length,I=f^S,D=0;S>=4;)x=1540483477*(65535&(x=255&c.charCodeAt(D)|(255&c.charCodeAt(++D))<<8|(255&c.charCodeAt(++D))<<16|(255&c.charCodeAt(++D))<<24))+((1540483477*(x>>>16)&65535)<<16),I=1540483477*(65535&I)+((1540483477*(I>>>16)&65535)<<16)^(x=1540483477*(65535&(x^=x>>>24))+((1540483477*(x>>>16)&65535)<<16)),S-=4,++D;switch(S){case 3:I^=(255&c.charCodeAt(D+2))<<16;case 2:I^=(255&c.charCodeAt(D+1))<<8;case 1:I=1540483477*(65535&(I^=255&c.charCodeAt(D)))+((1540483477*(I>>>16)&65535)<<16)}return I=1540483477*(65535&(I^=I>>>13))+((1540483477*(I>>>16)&65535)<<16),(I^=I>>>15)>>>0}}),Ne=Ue,Ke=Ze;Ne.murmur3=Ue,Ne.murmur2=Ke;var it=function(){this.ids=[],this.positions=[],this.indexed=!1};it.prototype.add=function(a,c,f,x){this.ids.push(Ct(a)),this.positions.push(c,f,x)},it.prototype.getPositions=function(a){for(var c=Ct(a),f=0,x=this.ids.length-1;f>1;this.ids[S]>=c?x=S:f=S+1}for(var I=[];this.ids[f]===c;)I.push({index:this.positions[3*f],start:this.positions[3*f+1],end:this.positions[3*f+2]}),f++;return I},it.serialize=function(a,c){var f=new Float64Array(a.ids),x=new Uint32Array(a.positions);return function S(I,D,H,Y){for(;H>1],ie=H-1,se=Y+1;;){do ie++;while(I[ie]ee);if(ie>=se)break;xt(I,ie,se),xt(D,3*ie,3*se),xt(D,3*ie+1,3*se+1),xt(D,3*ie+2,3*se+2)}se-HD.x+1||YD.y+1)&&we("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return f}function Jo(a,c){return{type:a.type,id:a.id,properties:a.properties,geometry:c?Io(a):[]}}function Wa(a,c,f,x,S){a.emplaceBack(2*c+(x+1)/2,2*f+(S+1)/2)}var pa=function(a){this.zoom=a.zoom,this.overscaling=a.overscaling,this.layers=a.layers,this.layerIds=this.layers.map(function(c){return c.id}),this.index=a.index,this.hasPattern=!1,this.layoutVertexArray=new Wc,this.indexArray=new Ga,this.segments=new Ce,this.programConfigurations=new li(a.layers,a.zoom),this.stateDependentLayerIds=this.layers.filter(function(c){return c.isStateDependent()}).map(function(c){return c.id})};function vu(a,c){for(var f=0;f1){if(rd(a,c))return!0;for(var x=0;x1?f:f.sub(c)._mult(S)._add(c))}function oh(a,c){for(var f,x,S,I=!1,D=0;Dc.y!=(S=f[Y]).y>c.y&&c.x<(S.x-x.x)*(c.y-x.y)/(S.y-x.y)+x.x&&(I=!I);return I}function ro(a,c){for(var f=!1,x=0,S=a.length-1;xc.y!=D.y>c.y&&c.x<(D.x-I.x)*(c.y-I.y)/(D.y-I.y)+I.x&&(f=!f)}return f}function id(a,c,f){var x=f[0],S=f[2];if(a.xS.x&&c.x>S.x||a.yS.y&&c.y>S.y)return!1;var I=Oe(a,c,f[0]);return I!==Oe(a,c,f[1])||I!==Oe(a,c,f[2])||I!==Oe(a,c,f[3])}function gc(a,c,f){var x=c.paint.get(a).value;return x.kind==="constant"?x.value:f.programConfigurations.get(c.id).getMaxValue(a)}function Ho(a){return Math.sqrt(a[0]*a[0]+a[1]*a[1])}function Ts(a,c,f,x,S){if(!c[0]&&!c[1])return a;var I=u.convert(c)._mult(S);f==="viewport"&&I._rotate(-x);for(var D=[],H=0;H=8192||ie<0||ie>=8192)){var se=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,a.sortKey),Ae=se.vertexLength;Wa(this.layoutVertexArray,ee,ie,-1,-1),Wa(this.layoutVertexArray,ee,ie,1,-1),Wa(this.layoutVertexArray,ee,ie,1,1),Wa(this.layoutVertexArray,ee,ie,-1,1),this.indexArray.emplaceBack(Ae,Ae+1,Ae+2),this.indexArray.emplaceBack(Ae,Ae+3,Ae+2),se.vertexLength+=4,se.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,a,f,{},x)},Tr("CircleBucket",pa,{omit:["layers"]});var bu=new Rs({"circle-sort-key":new zr(Se.layout_circle["circle-sort-key"])}),ff={paint:new Rs({"circle-radius":new zr(Se.paint_circle["circle-radius"]),"circle-color":new zr(Se.paint_circle["circle-color"]),"circle-blur":new zr(Se.paint_circle["circle-blur"]),"circle-opacity":new zr(Se.paint_circle["circle-opacity"]),"circle-translate":new ei(Se.paint_circle["circle-translate"]),"circle-translate-anchor":new ei(Se.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new ei(Se.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new ei(Se.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new zr(Se.paint_circle["circle-stroke-width"]),"circle-stroke-color":new zr(Se.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new zr(Se.paint_circle["circle-stroke-opacity"])}),layout:bu},Cn=typeof Float32Array<"u"?Float32Array:Array;function qa(a){return a[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=1,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=1,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,a}function Aa(a,c,f){var x=c[0],S=c[1],I=c[2],D=c[3],H=c[4],Y=c[5],ee=c[6],ie=c[7],se=c[8],Ae=c[9],Te=c[10],ke=c[11],Ve=c[12],et=c[13],Xe=c[14],at=c[15],_t=f[0],bt=f[1],Mt=f[2],Ut=f[3];return a[0]=_t*x+bt*H+Mt*se+Ut*Ve,a[1]=_t*S+bt*Y+Mt*Ae+Ut*et,a[2]=_t*I+bt*ee+Mt*Te+Ut*Xe,a[3]=_t*D+bt*ie+Mt*ke+Ut*at,a[4]=(_t=f[4])*x+(bt=f[5])*H+(Mt=f[6])*se+(Ut=f[7])*Ve,a[5]=_t*S+bt*Y+Mt*Ae+Ut*et,a[6]=_t*I+bt*ee+Mt*Te+Ut*Xe,a[7]=_t*D+bt*ie+Mt*ke+Ut*at,a[8]=(_t=f[8])*x+(bt=f[9])*H+(Mt=f[10])*se+(Ut=f[11])*Ve,a[9]=_t*S+bt*Y+Mt*Ae+Ut*et,a[10]=_t*I+bt*ee+Mt*Te+Ut*Xe,a[11]=_t*D+bt*ie+Mt*ke+Ut*at,a[12]=(_t=f[12])*x+(bt=f[13])*H+(Mt=f[14])*se+(Ut=f[15])*Ve,a[13]=_t*S+bt*Y+Mt*Ae+Ut*et,a[14]=_t*I+bt*ee+Mt*Te+Ut*Xe,a[15]=_t*D+bt*ie+Mt*ke+Ut*at,a}Math.hypot||(Math.hypot=function(){for(var a=arguments,c=0,f=arguments.length;f--;)c+=a[f]*a[f];return Math.sqrt(c)});var wu,Kg=Aa;function dp(a,c,f){var x=c[0],S=c[1],I=c[2],D=c[3];return a[0]=f[0]*x+f[4]*S+f[8]*I+f[12]*D,a[1]=f[1]*x+f[5]*S+f[9]*I+f[13]*D,a[2]=f[2]*x+f[6]*S+f[10]*I+f[14]*D,a[3]=f[3]*x+f[7]*S+f[11]*I+f[15]*D,a}wu=new Cn(3),Cn!=Float32Array&&(wu[0]=0,wu[1]=0,wu[2]=0),function(){var a=new Cn(4);Cn!=Float32Array&&(a[0]=0,a[1]=0,a[2]=0,a[3]=0)}();var hv=(function(){var a=new Cn(2);Cn!=Float32Array&&(a[0]=0,a[1]=0)}(),function(a){function c(f){a.call(this,f,ff)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype.createBucket=function(f){return new pa(f)},c.prototype.queryRadius=function(f){var x=f;return gc("circle-radius",this,x)+gc("circle-stroke-width",this,x)+Ho(this.paint.get("circle-translate"))},c.prototype.queryIntersectsFeature=function(f,x,S,I,D,H,Y,ee){for(var ie=Ts(f,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),H.angle,Y),se=this.paint.get("circle-radius").evaluate(x,S)+this.paint.get("circle-stroke-width").evaluate(x,S),Ae=this.paint.get("circle-pitch-alignment")==="map",Te=Ae?ie:function($t,Ar){return $t.map(function(Qr){return nd(Qr,Ar)})}(ie,ee),ke=Ae?se*Y:se,Ve=0,et=I;Vea.width||S.height>a.height||f.x>a.width-S.width||f.y>a.height-S.height)throw new RangeError("out of range source coordinates for image copy");if(S.width>c.width||S.height>c.height||x.x>c.width-S.width||x.y>c.height-S.height)throw new RangeError("out of range destination coordinates for image copy");for(var D=a.data,H=c.data,Y=0;Y80*f){x=I=a[0],S=D=a[1];for(var ke=f;keI&&(I=H),Y>D&&(D=Y);ee=(ee=Math.max(I-x,D-S))!==0?1/ee:0}return Sr(Ae,Te,f,x,S,ee),Te}function pv(a,c,f,x,S){var I,D;if(S===Ye(a,c,f,x)>0)for(I=c;I=c;I-=x)D=De(I,a[I],a[I+1],D);return D&&R(D,D.next)&&($e(D),D=D.next),D}function nr(a,c){if(!a)return a;c||(c=a);var f,x=a;do if(f=!1,x.steiner||!R(x,x.next)&&C(x.prev,x,x.next)!==0)x=x.next;else{if($e(x),(x=c=x.prev)===x.next)break;f=!0}while(f||x!==c);return c}function Sr(a,c,f,x,S,I,D){if(a){!D&&I&&function(ie,se,Ae,Te){var ke=ie;do ke.z===null&&(ke.z=m(ke.x,ke.y,se,Ae,Te)),ke.prevZ=ke.prev,ke.nextZ=ke.next,ke=ke.next;while(ke!==ie);ke.prevZ.nextZ=null,ke.prevZ=null,function(Ve){var et,Xe,at,_t,bt,Mt,Ut,$t,Ar=1;do{for(Xe=Ve,Ve=null,bt=null,Mt=0;Xe;){for(Mt++,at=Xe,Ut=0,et=0;et0||$t>0&&at;)Ut!==0&&($t===0||!at||Xe.z<=at.z)?(_t=Xe,Xe=Xe.nextZ,Ut--):(_t=at,at=at.nextZ,$t--),bt?bt.nextZ=_t:Ve=_t,_t.prevZ=bt,bt=_t;Xe=at}bt.nextZ=null,Ar*=2}while(Mt>1)}(ke)}(a,x,S,I);for(var H,Y,ee=a;a.prev!==a.next;)if(H=a.prev,Y=a.next,I?Av(a,x,S,I):Yw(a))c.push(H.i/f),c.push(a.i/f),c.push(Y.i/f),$e(a),a=Y.next,ee=Y.next;else if((a=Y)===ee){D?D===1?Sr(a=Qg(nr(a),c,f),c,f,x,S,I,2):D===2&&$g(a,c,f,x,S,I):Sr(nr(a),c,f,x,S,I,1);break}}}function Yw(a){var c=a.prev,f=a,x=a.next;if(C(c,f,x)>=0)return!1;for(var S=a.next.next;S!==a.prev;){if(y(c.x,c.y,f.x,f.y,x.x,x.y,S.x,S.y)&&C(S.prev,S,S.next)>=0)return!1;S=S.next}return!0}function Av(a,c,f,x){var S=a.prev,I=a,D=a.next;if(C(S,I,D)>=0)return!1;for(var H=S.x>I.x?S.x>D.x?S.x:D.x:I.x>D.x?I.x:D.x,Y=S.y>I.y?S.y>D.y?S.y:D.y:I.y>D.y?I.y:D.y,ee=m(S.x=ee&&Ae&&Ae.z<=ie;){if(se!==a.prev&&se!==a.next&&y(S.x,S.y,I.x,I.y,D.x,D.y,se.x,se.y)&&C(se.prev,se,se.next)>=0||(se=se.prevZ,Ae!==a.prev&&Ae!==a.next&&y(S.x,S.y,I.x,I.y,D.x,D.y,Ae.x,Ae.y)&&C(Ae.prev,Ae,Ae.next)>=0))return!1;Ae=Ae.nextZ}for(;se&&se.z>=ee;){if(se!==a.prev&&se!==a.next&&y(S.x,S.y,I.x,I.y,D.x,D.y,se.x,se.y)&&C(se.prev,se,se.next)>=0)return!1;se=se.prevZ}for(;Ae&&Ae.z<=ie;){if(Ae!==a.prev&&Ae!==a.next&&y(S.x,S.y,I.x,I.y,D.x,D.y,Ae.x,Ae.y)&&C(Ae.prev,Ae,Ae.next)>=0)return!1;Ae=Ae.nextZ}return!0}function Qg(a,c,f){var x=a;do{var S=x.prev,I=x.next.next;!R(S,I)&&L(S,x,x.next,I)&&te(S,I)&&te(I,S)&&(c.push(S.i/f),c.push(x.i/f),c.push(I.i/f),$e(x),$e(x.next),x=a=I),x=x.next}while(x!==a);return nr(x)}function $g(a,c,f,x,S,I){var D=a;do{for(var H=D.next.next;H!==D.prev;){if(D.i!==H.i&&w(D,H)){var Y=pe(D,H);return D=nr(D,D.next),Y=nr(Y,Y.next),Sr(D,c,f,x,S,I),void Sr(Y,c,f,x,S,I)}H=H.next}D=D.next}while(D!==a)}function sd(a,c){return a.x-c.x}function Kw(a,c){if(c=function(x,S){var I,D=S,H=x.x,Y=x.y,ee=-1/0;do{if(Y<=D.y&&Y>=D.next.y&&D.next.y!==D.y){var ie=D.x+(Y-D.y)*(D.next.x-D.x)/(D.next.y-D.y);if(ie<=H&&ie>ee){if(ee=ie,ie===H){if(Y===D.y)return D;if(Y===D.next.y)return D.next}I=D.x=D.x&&D.x>=Te&&H!==D.x&&y(YI.x||D.x===I.x&&ah(I,D)))&&(I=D,Ve=se)),D=D.next;while(D!==Ae);return I}(a,c)){var f=pe(c,a);nr(c,c.next),nr(f,f.next)}}function ah(a,c){return C(a.prev,a,c.prev)<0&&C(c.next,a,a.next)<0}function m(a,c,f,x,S){return(a=1431655765&((a=858993459&((a=252645135&((a=16711935&((a=32767*(a-f)*S)|a<<8))|a<<4))|a<<2))|a<<1))|(c=1431655765&((c=858993459&((c=252645135&((c=16711935&((c=32767*(c-x)*S)|c<<8))|c<<4))|c<<2))|c<<1))<<1}function A(a){var c=a,f=a;do(c.x=0&&(a-D)*(x-H)-(f-D)*(c-H)>=0&&(f-D)*(I-H)-(S-D)*(x-H)>=0}function w(a,c){return a.next.i!==c.i&&a.prev.i!==c.i&&!function(f,x){var S=f;do{if(S.i!==f.i&&S.next.i!==f.i&&S.i!==x.i&&S.next.i!==x.i&&L(S,S.next,f,x))return!0;S=S.next}while(S!==f);return!1}(a,c)&&(te(a,c)&&te(c,a)&&function(f,x){var S=f,I=!1,D=(f.x+x.x)/2,H=(f.y+x.y)/2;do S.y>H!=S.next.y>H&&S.next.y!==S.y&&D<(S.next.x-S.x)*(H-S.y)/(S.next.y-S.y)+S.x&&(I=!I),S=S.next;while(S!==f);return I}(a,c)&&(C(a.prev,a,c.prev)||C(a,c.prev,c))||R(a,c)&&C(a.prev,a,a.next)>0&&C(c.prev,c,c.next)>0)}function C(a,c,f){return(c.y-a.y)*(f.x-c.x)-(c.x-a.x)*(f.y-c.y)}function R(a,c){return a.x===c.x&&a.y===c.y}function L(a,c,f,x){var S=X(C(a,c,f)),I=X(C(a,c,x)),D=X(C(f,x,a)),H=X(C(f,x,c));return S!==I&&D!==H||!(S!==0||!N(a,f,c))||!(I!==0||!N(a,x,c))||!(D!==0||!N(f,a,x))||!(H!==0||!N(f,c,x))}function N(a,c,f){return c.x<=Math.max(a.x,f.x)&&c.x>=Math.min(a.x,f.x)&&c.y<=Math.max(a.y,f.y)&&c.y>=Math.min(a.y,f.y)}function X(a){return a>0?1:a<0?-1:0}function te(a,c){return C(a.prev,a,a.next)<0?C(a,c,a.next)>=0&&C(a,a.prev,c)>=0:C(a,c,a.prev)<0||C(a,a.next,c)<0}function pe(a,c){var f=new nt(a.i,a.x,a.y),x=new nt(c.i,c.x,c.y),S=a.next,I=c.prev;return a.next=c,c.prev=a,f.next=S,S.prev=f,x.next=f,f.prev=x,I.next=x,x.prev=I,x}function De(a,c,f,x){var S=new nt(a,c,f);return x?(S.next=x.next,S.prev=x,x.next.prev=S,x.next=S):(S.prev=S,S.next=S),S}function $e(a){a.next.prev=a.prev,a.prev.next=a.next,a.prevZ&&(a.prevZ.nextZ=a.nextZ),a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function nt(a,c,f){this.i=a,this.x=c,this.y=f,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Ye(a,c,f,x){for(var S=0,I=c,D=f-x;IY;){if(ee-Y>600){var se=ee-Y+1,Ae=H-Y+1,Te=Math.log(se),ke=.5*Math.exp(2*Te/3),Ve=.5*Math.sqrt(Te*ke*(se-ke)/se)*(Ae-se/2<0?-1:1);I(D,H,Math.max(Y,Math.floor(H-Ae*ke/se+Ve)),Math.min(ee,Math.floor(H+(se-Ae)*ke/se+Ve)),ie)}var et=D[H],Xe=Y,at=ee;for(zt(D,Y,H),ie(D[ee],et)>0&&zt(D,Y,ee);Xe0;)at--}ie(D[Y],et)===0?zt(D,Y,at):zt(D,++at,ee),at<=H&&(Y=at+1),H<=at&&(ee=at-1)}})(a,c,f||0,x||a.length-1,S||kt)}function zt(a,c,f){var x=a[c];a[c]=a[f],a[f]=x}function kt(a,c){return ac?1:0}function Et(a,c){var f=a.length;if(f<=1)return[a];for(var x,S,I=[],D=0;D1)for(var Y=0;Y0&&f.holes.push(x+=a[S-1].length)}return f},ma.default=Jg;var Nr=function(a){this.zoom=a.zoom,this.overscaling=a.overscaling,this.layers=a.layers,this.layerIds=this.layers.map(function(c){return c.id}),this.index=a.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Wc,this.indexArray=new Ga,this.indexArray2=new cf,this.programConfigurations=new li(a.layers,a.zoom),this.segments=new Ce,this.segments2=new Ce,this.stateDependentLayerIds=this.layers.filter(function(c){return c.isStateDependent()}).map(function(c){return c.id})};Nr.prototype.populate=function(a,c,f){this.hasPattern=gt("fill",this.layers,c);for(var x=this.layers[0].layout.get("fill-sort-key"),S=[],I=0,D=a;I>3}if(S--,x===1||x===2)I+=a.readSVarint(),D+=a.readSVarint(),x===1&&(c&&H.push(c),c=[]),c.push(new u(I,D));else{if(x!==7)throw new Error("unknown command "+x);c&&c.push(c[0].clone())}}return c&&H.push(c),H},Ui.prototype.bbox=function(){var a=this._pbf;a.pos=this._geometry;for(var c=a.readVarint()+a.pos,f=1,x=0,S=0,I=0,D=1/0,H=-1/0,Y=1/0,ee=-1/0;a.pos>3}if(x--,f===1||f===2)(S+=a.readSVarint())H&&(H=S),(I+=a.readSVarint())ee&&(ee=I);else if(f!==7)throw new Error("unknown command "+f)}return[D,Y,H,ee]},Ui.prototype.toGeoJSON=function(a,c,f){var x,S,I=this.extent*Math.pow(2,f),D=this.extent*a,H=this.extent*c,Y=this.loadGeometry(),ee=Ui.types[this.type];function ie(Te){for(var ke=0;ke>3;S=D===1?x.readString():D===2?x.readFloat():D===3?x.readDouble():D===4?x.readVarint64():D===5?x.readVarint():D===6?x.readSVarint():D===7?x.readBoolean():null}return S}(f))}function gl(a,c,f){if(a===3){var x=new co(f,f.readVarint()+f.pos);x.length&&(c[x.name]=x)}}zi.prototype.feature=function(a){if(a<0||a>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[a];var c=this._pbf.readVarint()+this._pbf.pos;return new Hn(this._pbf,c,this.extent,this._keys,this._values)};var ad={VectorTile:function(a,c){this.layers=a.readFields(gl,{},c)},VectorTileFeature:Hn,VectorTileLayer:co},ete=ad.VectorTileFeature.types,tP=Math.pow(2,13);function mv(a,c,f,x,S,I,D,H){a.emplaceBack(c,f,2*Math.floor(x*tP)+D,S*tP*2,I*tP*2,Math.round(H))}var df=function(a){this.zoom=a.zoom,this.overscaling=a.overscaling,this.layers=a.layers,this.layerIds=this.layers.map(function(c){return c.id}),this.index=a.index,this.hasPattern=!1,this.layoutVertexArray=new Rl,this.indexArray=new Ga,this.programConfigurations=new li(a.layers,a.zoom),this.segments=new Ce,this.stateDependentLayerIds=this.layers.filter(function(c){return c.isStateDependent()}).map(function(c){return c.id})};function tte(a,c){return a.x===c.x&&(a.x<0||a.x>8192)||a.y===c.y&&(a.y<0||a.y>8192)}df.prototype.populate=function(a,c,f){this.features=[],this.hasPattern=gt("fill-extrusion",this.layers,c);for(var x=0,S=a;x8192})||rn.every(function(Ri){return Ri.y<0})||rn.every(function(Ri){return Ri.y>8192})))for(var Ve=0,et=0;et=1){var at=ke[et-1];if(!tte(Xe,at)){se.vertexLength+4>Ce.MAX_VERTEX_ARRAY_LENGTH&&(se=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var _t=Xe.sub(at)._perp()._unit(),bt=at.dist(Xe);Ve+bt>32768&&(Ve=0),mv(this.layoutVertexArray,Xe.x,Xe.y,_t.x,_t.y,0,0,Ve),mv(this.layoutVertexArray,Xe.x,Xe.y,_t.x,_t.y,0,1,Ve),mv(this.layoutVertexArray,at.x,at.y,_t.x,_t.y,0,0,Ve+=bt),mv(this.layoutVertexArray,at.x,at.y,_t.x,_t.y,0,1,Ve);var Mt=se.vertexLength;this.indexArray.emplaceBack(Mt,Mt+2,Mt+1),this.indexArray.emplaceBack(Mt+1,Mt+2,Mt+3),se.vertexLength+=4,se.primitiveLength+=2}}}}if(se.vertexLength+Y>Ce.MAX_VERTEX_ARRAY_LENGTH&&(se=this.segments.prepareSegment(Y,this.layoutVertexArray,this.indexArray)),ete[a.type]==="Polygon"){for(var Ut=[],$t=[],Ar=se.vertexLength,Qr=0,Cr=H;Qr=2&&a[Y-1].equals(a[Y-2]);)Y--;for(var ee=0;ee0;if($t&&Xe>ee){var Qr=ie.dist(Te);if(Qr>2*se){var Cr=ie.sub(ie.sub(Te)._mult(se/Qr)._round());this.updateDistance(Te,Cr),this.addCurrentVertex(Cr,Ve,0,0,Ae),Te=Cr}}var ni=Te&&ke,Pr=ni?f:H?"butt":x;if(ni&&Pr==="round"&&(MtS&&(Pr="bevel"),Pr==="bevel"&&(Mt>2&&(Pr="flipbevel"),Mt100)at=et.mult(-1);else{var Vi=Mt*Ve.add(et).mag()/Ve.sub(et).mag();at._perp()._mult(Vi*(Ar?-1:1))}this.addCurrentVertex(ie,at,0,0,Ae),this.addCurrentVertex(ie,at.mult(-1),0,0,Ae)}else if(Pr==="bevel"||Pr==="fakeround"){var Ai=-Math.sqrt(Mt*Mt-1),Gr=Ar?Ai:0,rn=Ar?0:Ai;if(Te&&this.addCurrentVertex(ie,Ve,Gr,rn,Ae),Pr==="fakeround")for(var Ri=Math.round(180*Ut/Math.PI/20),_n=1;_n2*se){var Oo=ie.add(ke.sub(ie)._mult(se/$o)._round());this.updateDistance(ie,Oo),this.addCurrentVertex(Oo,et,0,0,Ae),ie=Oo}}}}},_l.prototype.addCurrentVertex=function(a,c,f,x,S,I){I===void 0&&(I=!1);var D=c.y*x-c.x,H=-c.y-c.x*x;this.addHalfVertex(a,c.x+c.y*f,c.y-c.x*f,I,!1,f,S),this.addHalfVertex(a,D,H,I,!0,-x,S),this.distance>yk/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(a,c,f,x,S,I))},_l.prototype.addHalfVertex=function(a,c,f,x,S,I,D){var H=.5*(this.lineClips?this.scaledDistance*(yk-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((a.x<<1)+(x?1:0),(a.y<<1)+(S?1:0),Math.round(63*c)+128,Math.round(63*f)+128,1+(I===0?0:I<0?-1:1)|(63&H)<<2,H>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);var Y=D.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Y),D.primitiveLength++),S?this.e2=Y:this.e1=Y},_l.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},_l.prototype.updateDistance=function(a,c){this.distance+=a.dist(c),this.updateScaledDistance()},Tr("LineBucket",_l,{omit:["layers","patternFeatures"]});var lte=new Rs({"line-cap":new ei(Se.layout_line["line-cap"]),"line-join":new zr(Se.layout_line["line-join"]),"line-miter-limit":new ei(Se.layout_line["line-miter-limit"]),"line-round-limit":new ei(Se.layout_line["line-round-limit"]),"line-sort-key":new zr(Se.layout_line["line-sort-key"])}),vk={paint:new Rs({"line-opacity":new zr(Se.paint_line["line-opacity"]),"line-color":new zr(Se.paint_line["line-color"]),"line-translate":new ei(Se.paint_line["line-translate"]),"line-translate-anchor":new ei(Se.paint_line["line-translate-anchor"]),"line-width":new zr(Se.paint_line["line-width"]),"line-gap-width":new zr(Se.paint_line["line-gap-width"]),"line-offset":new zr(Se.paint_line["line-offset"]),"line-blur":new zr(Se.paint_line["line-blur"]),"line-dasharray":new da(Se.paint_line["line-dasharray"]),"line-pattern":new Au(Se.paint_line["line-pattern"]),"line-gradient":new ml(Se.paint_line["line-gradient"])}),layout:lte},xk=new(function(a){function c(){a.apply(this,arguments)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype.possiblyEvaluate=function(f,x){return x=new qi(Math.floor(x.zoom),{now:x.now,fadeDuration:x.fadeDuration,zoomHistory:x.zoomHistory,transition:x.transition}),a.prototype.possiblyEvaluate.call(this,f,x)},c.prototype.evaluate=function(f,x,S,I){return x=z({},x,{zoom:Math.floor(x.zoom)}),a.prototype.evaluate.call(this,f,x,S,I)},c}(zr))(vk.paint.properties["line-width"].specification);xk.useIntegerZoom=!0;var cte=function(a){function c(f){a.call(this,f,vk),this.gradientVersion=0}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype._handleSpecialPaintPropertyUpdate=function(f){f==="line-gradient"&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof fa,this.gradientVersion=(this.gradientVersion+1)%T)},c.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},c.prototype.recalculate=function(f,x){a.prototype.recalculate.call(this,f,x),this.paint._values["line-floorwidth"]=xk.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,f)},c.prototype.createBucket=function(f){return new _l(f)},c.prototype.queryRadius=function(f){var x=f,S=bk(gc("line-width",this,x),gc("line-gap-width",this,x)),I=gc("line-offset",this,x);return S/2+Math.abs(I)+Ho(this.paint.get("line-translate"))},c.prototype.queryIntersectsFeature=function(f,x,S,I,D,H,Y){var ee=Ts(f,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),H.angle,Y),ie=Y/2*bk(this.paint.get("line-width").evaluate(x,S),this.paint.get("line-gap-width").evaluate(x,S)),se=this.paint.get("line-offset").evaluate(x,S);return se&&(I=function(Ae,Te){for(var ke=[],Ve=new u(0,0),et=0;et=3){for(var Xe=0;Xe0?c+2*a:a}var ute=Bs([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),fte=Bs([{name:"a_projected_pos",components:3,type:"Float32"}],4),hte=(Bs([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Bs([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),wk=(Bs([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]),Bs([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),dte=Bs([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function pte(a,c,f){return a.sections.forEach(function(x){x.text=function(S,I,D){var H=I.layout.get("text-transform").evaluate(D,{});return H==="uppercase"?S=S.toLocaleUpperCase():H==="lowercase"&&(S=S.toLocaleLowerCase()),Al.applyArabicShaping&&(S=Al.applyArabicShaping(S)),S}(x.text,c,f)}),a}Bs([{name:"triangle",components:3,type:"Uint16"}]),Bs([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Bs([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Bs([{type:"Float32",name:"offsetX"}]),Bs([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var _v={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"},Tk=function(a,c,f,x,S){var I,D,H=8*S-x-1,Y=(1<>1,ie=-7,se=f?S-1:0,Ae=f?-1:1,Te=a[c+se];for(se+=Ae,I=Te&(1<<-ie)-1,Te>>=-ie,ie+=H;ie>0;I=256*I+a[c+se],se+=Ae,ie-=8);for(D=I&(1<<-ie)-1,I>>=-ie,ie+=x;ie>0;D=256*D+a[c+se],se+=Ae,ie-=8);if(I===0)I=1-ee;else{if(I===Y)return D?NaN:1/0*(Te?-1:1);D+=Math.pow(2,x),I-=ee}return(Te?-1:1)*D*Math.pow(2,I-x)},Ek=function(a,c,f,x,S,I){var D,H,Y,ee=8*I-S-1,ie=(1<>1,Ae=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,Te=x?0:I-1,ke=x?1:-1,Ve=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(H=isNaN(c)?1:0,D=ie):(D=Math.floor(Math.log(c)/Math.LN2),c*(Y=Math.pow(2,-D))<1&&(D--,Y*=2),(c+=D+se>=1?Ae/Y:Ae*Math.pow(2,1-se))*Y>=2&&(D++,Y/=2),D+se>=ie?(H=0,D=ie):D+se>=1?(H=(c*Y-1)*Math.pow(2,S),D+=se):(H=c*Math.pow(2,se-1)*Math.pow(2,S),D=0));S>=8;a[f+Te]=255&H,Te+=ke,H/=256,S-=8);for(D=D<0;a[f+Te]=255&D,Te+=ke,D/=256,ee-=8);a[f+Te-ke]|=128*Ve},Zw=Ao;function Ao(a){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(a)?a:new Uint8Array(a||0),this.pos=0,this.type=0,this.length=this.buf.length}Ao.Varint=0,Ao.Fixed64=1,Ao.Bytes=2,Ao.Fixed32=5;var Sk=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function ld(a){return a.type===Ao.Bytes?a.readVarint()+a.pos:a.pos+1}function e0(a,c,f){return f?4294967296*c+(a>>>0):4294967296*(c>>>0)+(a>>>0)}function Ck(a,c,f){var x=c<=16383?1:c<=2097151?2:c<=268435455?3:Math.floor(Math.log(c)/(7*Math.LN2));f.realloc(x);for(var S=f.pos-1;S>=a;S--)f.buf[S+x]=f.buf[S]}function Ate(a,c){for(var f=0;f>>8,a[f+2]=c>>>16,a[f+3]=c>>>24}function Mk(a,c){return(a[c]|a[c+1]<<8|a[c+2]<<16)+(a[c+3]<<24)}function Tte(a,c,f){a===1&&f.readMessage(Ete,c)}function Ete(a,c,f){if(a===3){var x=f.readMessage(Ste,{}),S=x.width,I=x.height,D=x.left,H=x.top,Y=x.advance;c.push({id:x.id,bitmap:new Mi({width:S+6,height:I+6},x.bitmap),metrics:{width:S,height:I,left:D,top:H,advance:Y}})}}function Ste(a,c,f){a===1?c.id=f.readVarint():a===2?c.bitmap=f.readBytes():a===3?c.width=f.readVarint():a===4?c.height=f.readVarint():a===5?c.left=f.readSVarint():a===6?c.top=f.readSVarint():a===7&&(c.advance=f.readVarint())}function Ik(a){for(var c=0,f=0,x=0,S=a;x=0;Ae--){var Te=D[Ae];if(!(se.w>Te.w||se.h>Te.h)){if(se.x=Te.x,se.y=Te.y,Y=Math.max(Y,se.y+se.h),H=Math.max(H,se.x+se.w),se.w===Te.w&&se.h===Te.h){var ke=D.pop();Ae>3,I=this.pos;this.type=7&x,a(S,c,this),this.pos===I&&this.skip(x)}return c},readMessage:function(a,c){return this.readFields(a,c,this.readVarint()+this.pos)},readFixed32:function(){var a=Jw(this.buf,this.pos);return this.pos+=4,a},readSFixed32:function(){var a=Mk(this.buf,this.pos);return this.pos+=4,a},readFixed64:function(){var a=Jw(this.buf,this.pos)+4294967296*Jw(this.buf,this.pos+4);return this.pos+=8,a},readSFixed64:function(){var a=Jw(this.buf,this.pos)+4294967296*Mk(this.buf,this.pos+4);return this.pos+=8,a},readFloat:function(){var a=Tk(this.buf,this.pos,!0,23,4);return this.pos+=4,a},readDouble:function(){var a=Tk(this.buf,this.pos,!0,52,8);return this.pos+=8,a},readVarint:function(a){var c,f,x=this.buf;return c=127&(f=x[this.pos++]),f<128?c:(c|=(127&(f=x[this.pos++]))<<7,f<128?c:(c|=(127&(f=x[this.pos++]))<<14,f<128?c:(c|=(127&(f=x[this.pos++]))<<21,f<128?c:function(S,I,D){var H,Y,ee=D.buf;if(H=(112&(Y=ee[D.pos++]))>>4,Y<128||(H|=(127&(Y=ee[D.pos++]))<<3,Y<128)||(H|=(127&(Y=ee[D.pos++]))<<10,Y<128)||(H|=(127&(Y=ee[D.pos++]))<<17,Y<128)||(H|=(127&(Y=ee[D.pos++]))<<24,Y<128)||(H|=(1&(Y=ee[D.pos++]))<<31,Y<128))return e0(S,H,I);throw new Error("Expected varint not more than 10 bytes")}(c|=(15&(f=x[this.pos]))<<28,a,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var a=this.readVarint();return a%2==1?(a+1)/-2:a/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var a=this.readVarint()+this.pos,c=this.pos;return this.pos=a,a-c>=12&&Sk?function(f,x,S){return Sk.decode(f.subarray(x,S))}(this.buf,c,a):function(f,x,S){for(var I="",D=x;D239?4:ie>223?3:ie>191?2:1;if(D+Ae>S)break;Ae===1?ie<128&&(se=ie):Ae===2?(192&(H=f[D+1]))==128&&(se=(31&ie)<<6|63&H)<=127&&(se=null):Ae===3?(Y=f[D+2],(192&(H=f[D+1]))==128&&(192&Y)==128&&((se=(15&ie)<<12|(63&H)<<6|63&Y)<=2047||se>=55296&&se<=57343)&&(se=null)):Ae===4&&(Y=f[D+2],ee=f[D+3],(192&(H=f[D+1]))==128&&(192&Y)==128&&(192&ee)==128&&((se=(15&ie)<<18|(63&H)<<12|(63&Y)<<6|63&ee)<=65535||se>=1114112)&&(se=null)),se===null?(se=65533,Ae=1):se>65535&&(se-=65536,I+=String.fromCharCode(se>>>10&1023|55296),se=56320|1023&se),I+=String.fromCharCode(se),D+=Ae}return I}(this.buf,c,a)},readBytes:function(){var a=this.readVarint()+this.pos,c=this.buf.subarray(this.pos,a);return this.pos=a,c},readPackedVarint:function(a,c){if(this.type!==Ao.Bytes)return a.push(this.readVarint(c));var f=ld(this);for(a=a||[];this.pos127;);else if(c===Ao.Bytes)this.pos=this.readVarint()+this.pos;else if(c===Ao.Fixed32)this.pos+=4;else{if(c!==Ao.Fixed64)throw new Error("Unimplemented type: "+c);this.pos+=8}},writeTag:function(a,c){this.writeVarint(a<<3|c)},realloc:function(a){for(var c=this.length||16;c268435455||a<0?function(c,f){var x,S;if(c>=0?(x=c%4294967296|0,S=c/4294967296|0):(S=~(-c/4294967296),4294967295^(x=~(-c%4294967296))?x=x+1|0:(x=0,S=S+1|0)),c>=18446744073709552e3||c<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");f.realloc(10),function(I,D,H){H.buf[H.pos++]=127&I|128,I>>>=7,H.buf[H.pos++]=127&I|128,I>>>=7,H.buf[H.pos++]=127&I|128,I>>>=7,H.buf[H.pos++]=127&I|128,H.buf[H.pos]=127&(I>>>=7)}(x,0,f),function(I,D){var H=(7&I)<<4;D.buf[D.pos++]|=H|((I>>>=3)?128:0),I&&(D.buf[D.pos++]=127&I|((I>>>=7)?128:0),I&&(D.buf[D.pos++]=127&I|((I>>>=7)?128:0),I&&(D.buf[D.pos++]=127&I|((I>>>=7)?128:0),I&&(D.buf[D.pos++]=127&I|((I>>>=7)?128:0),I&&(D.buf[D.pos++]=127&I)))))}(S,f)}(a,this):(this.realloc(4),this.buf[this.pos++]=127&a|(a>127?128:0),a<=127||(this.buf[this.pos++]=127&(a>>>=7)|(a>127?128:0),a<=127||(this.buf[this.pos++]=127&(a>>>=7)|(a>127?128:0),a<=127||(this.buf[this.pos++]=a>>>7&127))))},writeSVarint:function(a){this.writeVarint(a<0?2*-a-1:2*a)},writeBoolean:function(a){this.writeVarint(Boolean(a))},writeString:function(a){a=String(a),this.realloc(4*a.length),this.pos++;var c=this.pos;this.pos=function(x,S,I){for(var D,H,Y=0;Y55295&&D<57344){if(!H){D>56319||Y+1===S.length?(x[I++]=239,x[I++]=191,x[I++]=189):H=D;continue}if(D<56320){x[I++]=239,x[I++]=191,x[I++]=189,H=D;continue}D=H-55296<<10|D-56320|65536,H=null}else H&&(x[I++]=239,x[I++]=191,x[I++]=189,H=null);D<128?x[I++]=D:(D<2048?x[I++]=D>>6|192:(D<65536?x[I++]=D>>12|224:(x[I++]=D>>18|240,x[I++]=D>>12&63|128),x[I++]=D>>6&63|128),x[I++]=63&D|128)}return I}(this.buf,a,this.pos);var f=this.pos-c;f>=128&&Ck(c,f,this),this.pos=c-1,this.writeVarint(f),this.pos+=f},writeFloat:function(a){this.realloc(4),Ek(this.buf,a,this.pos,!0,23,4),this.pos+=4},writeDouble:function(a){this.realloc(8),Ek(this.buf,a,this.pos,!0,52,8),this.pos+=8},writeBytes:function(a){var c=a.length;this.writeVarint(c),this.realloc(c);for(var f=0;f=128&&Ck(f,x,this),this.pos=f-1,this.writeVarint(x),this.pos+=x},writeMessage:function(a,c,f){this.writeTag(a,Ao.Bytes),this.writeRawMessage(c,f)},writePackedVarint:function(a,c){c.length&&this.writeMessage(a,Ate,c)},writePackedSVarint:function(a,c){c.length&&this.writeMessage(a,mte,c)},writePackedBoolean:function(a,c){c.length&&this.writeMessage(a,yte,c)},writePackedFloat:function(a,c){c.length&&this.writeMessage(a,gte,c)},writePackedDouble:function(a,c){c.length&&this.writeMessage(a,_te,c)},writePackedFixed32:function(a,c){c.length&&this.writeMessage(a,vte,c)},writePackedSFixed32:function(a,c){c.length&&this.writeMessage(a,xte,c)},writePackedFixed64:function(a,c){c.length&&this.writeMessage(a,bte,c)},writePackedSFixed64:function(a,c){c.length&&this.writeMessage(a,wte,c)},writeBytesField:function(a,c){this.writeTag(a,Ao.Bytes),this.writeBytes(c)},writeFixed32Field:function(a,c){this.writeTag(a,Ao.Fixed32),this.writeFixed32(c)},writeSFixed32Field:function(a,c){this.writeTag(a,Ao.Fixed32),this.writeSFixed32(c)},writeFixed64Field:function(a,c){this.writeTag(a,Ao.Fixed64),this.writeFixed64(c)},writeSFixed64Field:function(a,c){this.writeTag(a,Ao.Fixed64),this.writeSFixed64(c)},writeVarintField:function(a,c){this.writeTag(a,Ao.Varint),this.writeVarint(c)},writeSVarintField:function(a,c){this.writeTag(a,Ao.Varint),this.writeSVarint(c)},writeStringField:function(a,c){this.writeTag(a,Ao.Bytes),this.writeString(c)},writeFloatField:function(a,c){this.writeTag(a,Ao.Fixed32),this.writeFloat(c)},writeDoubleField:function(a,c){this.writeTag(a,Ao.Fixed64),this.writeDouble(c)},writeBooleanField:function(a,c){this.writeVarintField(a,Boolean(c))}};var Qw=function(a,c){var f=c.pixelRatio,x=c.version,S=c.stretchX,I=c.stretchY,D=c.content;this.paddedRect=a,this.pixelRatio=f,this.stretchX=S,this.stretchY=I,this.content=D,this.version=x},yv={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};yv.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},yv.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},yv.tlbr.get=function(){return this.tl.concat(this.br)},yv.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Qw.prototype,yv);var vv=function(a,c){var f={},x={};this.haveRenderCallbacks=[];var S=[];this.addImages(a,f,S),this.addImages(c,x,S);var I=Ik(S),D=new Qo({width:I.w||1,height:I.h||1});for(var H in a){var Y=a[H],ee=f[H].paddedRect;Qo.copy(Y.data,D,{x:0,y:0},{x:ee.x+1,y:ee.y+1},Y.data)}for(var ie in c){var se=c[ie],Ae=x[ie].paddedRect,Te=Ae.x+1,ke=Ae.y+1,Ve=se.data.width,et=se.data.height;Qo.copy(se.data,D,{x:0,y:0},{x:Te,y:ke},se.data),Qo.copy(se.data,D,{x:0,y:et-1},{x:Te,y:ke-1},{width:Ve,height:1}),Qo.copy(se.data,D,{x:0,y:0},{x:Te,y:ke+et},{width:Ve,height:1}),Qo.copy(se.data,D,{x:Ve-1,y:0},{x:Te-1,y:ke},{width:1,height:et}),Qo.copy(se.data,D,{x:0,y:0},{x:Te+Ve,y:ke},{width:1,height:et})}this.image=D,this.iconPositions=f,this.patternPositions=x};vv.prototype.addImages=function(a,c,f){for(var x in a){var S=a[x],I={x:0,y:0,w:S.data.width+2,h:S.data.height+2};f.push(I),c[x]=new Qw(I,S),S.hasRenderCallback&&this.haveRenderCallbacks.push(x)}},vv.prototype.patchUpdatedImages=function(a,c){for(var f in a.dispatchRenderCallbacks(this.haveRenderCallbacks),a.updatedImages)this.patchUpdatedImage(this.iconPositions[f],a.getImage(f),c),this.patchUpdatedImage(this.patternPositions[f],a.getImage(f),c)},vv.prototype.patchUpdatedImage=function(a,c,f){if(a&&c&&a.version!==c.version){a.version=c.version;var x=a.tl;f.update(c.data,void 0,{x:x[0],y:x[1]})}},Tr("ImagePosition",Qw),Tr("ImageAtlas",vv);var yc={horizontal:1,vertical:2,horizontalOnly:3},r0=function(){this.scale=1,this.fontStack="",this.imageName=null};r0.forText=function(a,c){var f=new r0;return f.scale=a||1,f.fontStack=c,f},r0.forImage=function(a){var c=new r0;return c.imageName=a,c};var Xa=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function $w(a,c,f,x,S,I,D,H,Y,ee,ie,se,Ae,Te,ke,Ve){var et,Xe=Xa.fromFeature(a,S);se===yc.vertical&&Xe.verticalizePunctuation();var at=Al.processBidirectionalText,_t=Al.processStyledBidirectionalText;if(at&&Xe.sections.length===1){et=[];for(var bt=0,Mt=at(Xe.toString(),rP(Xe,ee,I,c,x,Te,ke));bt0&&h0>Es&&(Es=h0)}else{var c2=Ri[Rn.fontStack],d0=c2&&c2[vc];if(d0&&d0.rect)uh=d0.rect,ds=d0.metrics;else{var wv=rn[Rn.fontStack],u2=wv&&wv[vc];if(!u2)continue;ds=u2.metrics}ch=24*(wn-Rn.scale)}WA?(Gr.verticalizable=!0,xo.push({glyph:vc,imageName:Tu,x:Xs,y:Ya+ch,vertical:WA,scale:Rn.scale,fontStack:Rn.fontStack,sectionIndex:lh,metrics:ds,rect:uh}),Xs+=u0*Rn.scale+Oo):(xo.push({glyph:vc,imageName:Tu,x:Xs,y:Ya+ch,vertical:WA,scale:Rn.scale,fontStack:Rn.fontStack,sectionIndex:lh,metrics:ds,rect:uh}),Xs+=ds.advance*Rn.scale+Oo)}xo.length!==0&&(ia=Math.max(Xs-Oo,ia),Mte(xo,0,xo.length-1,hs,Es)),Xs=0;var f2=Pn*wn+Es;Ra.lineOffset=Math.max(Es,yl),Ya+=f2,Ka=Math.max(f2,Ka),++na}else Ya+=Pn,++na}var hd,Tv=Ya- -17,p0=iP(Bo),Ap=p0.horizontalAlign,A0=p0.verticalAlign;(function(h2,d2,Ev,Sv,p2,Cv,Mv,Iv,A2){var m0,m2=(d2-Ev)*p2;m0=Cv!==Mv?-Iv*Sv- -17:(-Sv*A2+.5)*Mv;for(var g0=0,Pv=h2;g0=0&&x>=a&&e2[this.text.charCodeAt(x)];x--)f--;this.text=this.text.substring(a,f),this.sectionIndex=this.sectionIndex.slice(a,f)},Xa.prototype.substring=function(a,c){var f=new Xa;return f.text=this.text.substring(a,c),f.sectionIndex=this.sectionIndex.slice(a,c),f.sections=this.sections,f},Xa.prototype.toString=function(){return this.text},Xa.prototype.getMaxScale=function(){var a=this;return this.sectionIndex.reduce(function(c,f){return Math.max(c,a.sections[f].scale)},0)},Xa.prototype.addTextSection=function(a,c){this.text+=a.text,this.sections.push(r0.forText(a.scale,a.fontStack||c));for(var f=this.sections.length-1,x=0;x=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var e2={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Jl={};function Pk(a,c,f,x,S,I){if(c.imageName){var D=x[c.imageName];return D?D.displaySize[0]*c.scale*24/I+S:0}var H=f[c.fontStack],Y=H&&H[a];return Y?Y.metrics.advance*c.scale+S:0}function Rk(a,c,f,x){var S=Math.pow(a-c,2);return x?a=0,se=0,Ae=0;Ae-f/2;){if(--D<0)return!1;H-=a[D].dist(I),I=a[D]}H+=a[D].dist(a[D+1]),D++;for(var Y=[],ee=0;Hx;)ee-=Y.shift().angleDelta;if(ee>S)return!1;D++,H+=ie.dist(se)}return!0}function Nk(a){for(var c=0,f=0;fee){var ke=(ee-Y)/Te,Ve=Mo(se.x,Ae.x,ke),et=Mo(se.y,Ae.y,ke),Xe=new i0(Ve,et,Ae.angleTo(se),ie);return Xe._round(),!D||Fk(a,Xe,H,D,c)?Xe:void 0}Y+=Te}}function Rte(a,c,f,x,S,I,D,H,Y){var ee=kk(x,I,D),ie=Uk(x,S),se=ie*D,Ae=a[0].x===0||a[0].x===Y||a[0].y===0||a[0].y===Y;return c-se=0&&_n=0&&si=0&&Cr+$t<=Ar){var Pn=new i0(_n,si,rn,Pr);Pn._round(),Xe&&!Fk(ke,Pn,_t,Xe,at)||ni.push(Pn)}}Qr+=Gr}return Mt||ni.length||bt||(ni=Te(ke,Qr/2,et,Xe,at,_t,bt,!0,Ut)),ni}(a,Ae?c/2*H%c:(ie/2+2*I)*D*H%c,c,ee,f,se,Ae,!1,Y)}function zk(a,c,f,x,S){for(var I=[],D=0;D=x&&se.x>=x||(ie.x>=x?ie=new u(x,ie.y+(x-ie.x)/(se.x-ie.x)*(se.y-ie.y))._round():se.x>=x&&(se=new u(x,ie.y+(x-ie.x)/(se.x-ie.x)*(se.y-ie.y))._round()),ie.y>=S&&se.y>=S||(ie.y>=S?ie=new u(ie.x+(S-ie.y)/(se.y-ie.y)*(se.x-ie.x),S)._round():se.y>=S&&(se=new u(ie.x+(S-ie.y)/(se.y-ie.y)*(se.x-ie.x),S)._round()),Y&&ie.equals(Y[Y.length-1])||I.push(Y=[ie]),Y.push(se)))))}return I}function Vk(a,c,f,x){var S=[],I=a.image,D=I.pixelRatio,H=I.paddedRect.w-2,Y=I.paddedRect.h-2,ee=a.right-a.left,ie=a.bottom-a.top,se=I.stretchX||[[0,H]],Ae=I.stretchY||[[0,Y]],Te=function(_n,si){return _n+si[1]-si[0]},ke=se.reduce(Te,0),Ve=Ae.reduce(Te,0),et=H-ke,Xe=Y-Ve,at=0,_t=ke,bt=0,Mt=Ve,Ut=0,$t=et,Ar=0,Qr=Xe;if(I.content&&x){var Cr=I.content;at=t2(se,0,Cr[0]),bt=t2(Ae,0,Cr[1]),_t=t2(se,Cr[0],Cr[2]),Mt=t2(Ae,Cr[1],Cr[3]),Ut=Cr[0]-at,Ar=Cr[1]-bt,$t=Cr[2]-Cr[0]-_t,Qr=Cr[3]-Cr[1]-Mt}var ni=function(_n,si,Pn,Bo){var is=r2(_n.stretch-at,_t,ee,a.left),$o=i2(_n.fixed-Ut,$t,_n.stretch,ke),Oo=r2(si.stretch-bt,Mt,ie,a.top),ns=i2(si.fixed-Ar,Qr,si.stretch,Ve),qs=r2(Pn.stretch-at,_t,ee,a.left),Xs=i2(Pn.fixed-Ut,$t,Pn.stretch,ke),Ya=r2(Bo.stretch-bt,Mt,ie,a.top),ia=i2(Bo.fixed-Ar,Qr,Bo.stretch,Ve),Ka=new u(is,Oo),hs=new u(qs,Oo),na=new u(qs,Ya),un=new u(is,Ya),no=new u($o/D,ns/D),Kn=new u(Xs/D,ia/D),wn=c*Math.PI/180;if(wn){var yl=Math.sin(wn),Ra=Math.cos(wn),xo=[Ra,-yl,yl,Ra];Ka._matMult(xo),hs._matMult(xo),un._matMult(xo),na._matMult(xo)}var Es=_n.stretch+_n.fixed,Ba=si.stretch+si.fixed;return{tl:Ka,tr:hs,bl:un,br:na,tex:{x:I.paddedRect.x+1+Es,y:I.paddedRect.y+1+Ba,w:Pn.stretch+Pn.fixed-Es,h:Bo.stretch+Bo.fixed-Ba},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:no,pixelOffsetBR:Kn,minFontScaleX:$t/D/ee,minFontScaleY:Qr/D/ie,isSDF:f}};if(x&&(I.stretchX||I.stretchY))for(var Pr=Hk(se,et,ke),Vi=Hk(Ae,Xe,Ve),Ai=0;Ai0&&(Te=Math.max(10,Te),this.circleDiameter=Te)}else{var ke=I.top*D-H,Ve=I.bottom*D+H,et=I.left*D-H,Xe=I.right*D+H,at=I.collisionPadding;if(at&&(et-=at[0]*D,ke-=at[1]*D,Xe+=at[2]*D,Ve+=at[3]*D),ee){var _t=new u(et,ke),bt=new u(Xe,ke),Mt=new u(et,Ve),Ut=new u(Xe,Ve),$t=ee*Math.PI/180;_t._rotate($t),bt._rotate($t),Mt._rotate($t),Ut._rotate($t),et=Math.min(_t.x,bt.x,Mt.x,Ut.x),Xe=Math.max(_t.x,bt.x,Mt.x,Ut.x),ke=Math.min(_t.y,bt.y,Mt.y,Ut.y),Ve=Math.max(_t.y,bt.y,Mt.y,Ut.y)}a.emplaceBack(c.x,c.y,et,ke,Xe,Ve,f,x,S)}this.boxEndIndex=a.length},n0=function(a,c){if(a===void 0&&(a=[]),c===void 0&&(c=Bte),this.data=a,this.length=this.data.length,this.compare=c,this.length>0)for(var f=(this.length>>1)-1;f>=0;f--)this._down(f)};function Bte(a,c){return ac?1:0}function Ote(a,c,f){c===void 0&&(c=1),f===void 0&&(f=!1);for(var x=1/0,S=1/0,I=-1/0,D=-1/0,H=a[0],Y=0;YI)&&(I=ee.x),(!Y||ee.y>D)&&(D=ee.y)}var ie=Math.min(I-x,D-S),se=ie/2,Ae=new n0([],Dte);if(ie===0)return new u(x,S);for(var Te=x;TeVe.d||!Ve.d)&&(Ve=Xe,f&&console.log("found best %d after %d probes",Math.round(1e4*Xe.d)/1e4,et)),Xe.max-Ve.d<=c||(Ae.push(new o0(Xe.p.x-(se=Xe.h/2),Xe.p.y-se,se,a)),Ae.push(new o0(Xe.p.x+se,Xe.p.y-se,se,a)),Ae.push(new o0(Xe.p.x-se,Xe.p.y+se,se,a)),Ae.push(new o0(Xe.p.x+se,Xe.p.y+se,se,a)),et+=4)}return f&&(console.log("num probes: "+et),console.log("best distance: "+Ve.d)),Ve.p}function Dte(a,c){return c.max-a.max}function o0(a,c,f,x){this.p=new u(a,c),this.h=f,this.d=function(S,I){for(var D=!1,H=1/0,Y=0;YS.y!=ke.y>S.y&&S.x<(ke.x-Te.x)*(S.y-Te.y)/(ke.y-Te.y)+Te.x&&(D=!D),H=Math.min(H,uf(S,Te,ke))}return(D?1:-1)*Math.sqrt(H)}(this.p,x),this.max=this.d+this.h*Math.SQRT2}n0.prototype.push=function(a){this.data.push(a),this.length++,this._up(this.length-1)},n0.prototype.pop=function(){if(this.length!==0){var a=this.data[0],c=this.data.pop();return this.length--,this.length>0&&(this.data[0]=c,this._down(0)),a}},n0.prototype.peek=function(){return this.data[0]},n0.prototype._up=function(a){for(var c=this.data,f=this.compare,x=c[a];a>0;){var S=a-1>>1,I=c[S];if(f(x,I)>=0)break;c[a]=I,a=S}c[a]=x},n0.prototype._down=function(a){for(var c=this.data,f=this.compare,x=this.length>>1,S=c[a];a=0)break;c[a]=D,a=I}c[a]=S};var oP=Number.POSITIVE_INFINITY;function jk(a,c){return c[1]!==oP?function(f,x,S){var I=0,D=0;switch(x=Math.abs(x),S=Math.abs(S),f){case"top-right":case"top-left":case"top":D=S-7;break;case"bottom-right":case"bottom-left":case"bottom":D=7-S}switch(f){case"top-right":case"bottom-right":case"right":I=-x;break;case"top-left":case"bottom-left":case"left":I=x}return[I,D]}(a,c[0],c[1]):function(f,x){var S=0,I=0;x<0&&(x=0);var D=x/Math.sqrt(2);switch(f){case"top-right":case"top-left":I=D-7;break;case"bottom-right":case"bottom-left":I=7-D;break;case"bottom":I=7-x;break;case"top":I=x-7}switch(f){case"top-right":case"bottom-right":S=-D;break;case"top-left":case"bottom-left":S=D;break;case"left":S=x;break;case"right":S=-x}return[S,I]}(a,c[0])}function sP(a){switch(a){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Gk(a,c,f,x,S,I,D,H,Y,ee,ie,se,Ae,Te,ke){var Ve=function(bt,Mt,Ut,$t,Ar,Qr,Cr,ni){for(var Pr=$t.layout.get("text-rotate").evaluate(Qr,{})*Math.PI/180,Vi=[],Ai=0,Gr=Mt.positionedLines;Ai32640&&we(a.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):et.kind==="composite"&&((Xe=[128*Te.compositeTextSizes[0].evaluate(D,{},ke),128*Te.compositeTextSizes[1].evaluate(D,{},ke)])[0]>32640||Xe[1]>32640)&&we(a.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),a.addSymbols(a.text,Ve,Xe,H,I,D,ee,c,Y.lineStartIndex,Y.lineLength,Ae,ke);for(var at=0,_t=ie;at<_t.length;at+=1)se[_t[at]]=a.text.placedSymbolArray.length-1;return 4*Ve.length}function Wk(a){for(var c in a)return a[c];return null}function Lte(a,c,f,x){var S=a.compareText;if(c in S){for(var I=S[c],D=I.length-1;D>=0;D--)if(x.dist(I[D])0)&&(I.value.kind!=="constant"||I.value.value.length>0),ee=H.value.kind!=="constant"||!!H.value.value||Object.keys(H.parameters).length>0,ie=S.get("symbol-sort-key");if(this.features=[],Y||ee){for(var se=c.iconDependencies,Ae=c.glyphDependencies,Te=c.availableImages,ke=new qi(this.zoom),Ve=0,et=a;Ve=0;for(var rn=0,Ri=Ar.sections;rn=0;H--)I[H]={x:c[H].x,y:c[H].y,tileUnitDistanceFromAnchor:S},H>0&&(S+=c[H-1].dist(c[H]));for(var Y=0;Y0},eo.prototype.hasIconData=function(){return this.icon.segments.get().length>0},eo.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},eo.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},eo.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},eo.prototype.addIndicesForPlacedSymbol=function(a,c){for(var f=a.placedSymbolArray.get(c),x=f.vertexStartIndex+4*f.numGlyphs,S=f.vertexStartIndex;S1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(a),this.sortedAngle=a,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var f=0,x=this.symbolInstanceIndexes;f=0&&H.indexOf(I)===D&&c.addIndicesForPlacedSymbol(c.text,I)}),S.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,S.verticalPlacedTextSymbolIndex),S.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,S.placedIconSymbolIndex),S.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,S.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Tr("SymbolBucket",eo,{omit:["layers","collisionBoxArray","features","compareText"]}),eo.MAX_GLYPHS=65535,eo.addDynamicAttributes=aP;var Ute=new Rs({"symbol-placement":new ei(Se.layout_symbol["symbol-placement"]),"symbol-spacing":new ei(Se.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ei(Se.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new zr(Se.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ei(Se.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ei(Se.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new ei(Se.layout_symbol["icon-ignore-placement"]),"icon-optional":new ei(Se.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ei(Se.layout_symbol["icon-rotation-alignment"]),"icon-size":new zr(Se.layout_symbol["icon-size"]),"icon-text-fit":new ei(Se.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ei(Se.layout_symbol["icon-text-fit-padding"]),"icon-image":new zr(Se.layout_symbol["icon-image"]),"icon-rotate":new zr(Se.layout_symbol["icon-rotate"]),"icon-padding":new ei(Se.layout_symbol["icon-padding"]),"icon-keep-upright":new ei(Se.layout_symbol["icon-keep-upright"]),"icon-offset":new zr(Se.layout_symbol["icon-offset"]),"icon-anchor":new zr(Se.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ei(Se.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ei(Se.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ei(Se.layout_symbol["text-rotation-alignment"]),"text-field":new zr(Se.layout_symbol["text-field"]),"text-font":new zr(Se.layout_symbol["text-font"]),"text-size":new zr(Se.layout_symbol["text-size"]),"text-max-width":new zr(Se.layout_symbol["text-max-width"]),"text-line-height":new ei(Se.layout_symbol["text-line-height"]),"text-letter-spacing":new zr(Se.layout_symbol["text-letter-spacing"]),"text-justify":new zr(Se.layout_symbol["text-justify"]),"text-radial-offset":new zr(Se.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ei(Se.layout_symbol["text-variable-anchor"]),"text-anchor":new zr(Se.layout_symbol["text-anchor"]),"text-max-angle":new ei(Se.layout_symbol["text-max-angle"]),"text-writing-mode":new ei(Se.layout_symbol["text-writing-mode"]),"text-rotate":new zr(Se.layout_symbol["text-rotate"]),"text-padding":new ei(Se.layout_symbol["text-padding"]),"text-keep-upright":new ei(Se.layout_symbol["text-keep-upright"]),"text-transform":new zr(Se.layout_symbol["text-transform"]),"text-offset":new zr(Se.layout_symbol["text-offset"]),"text-allow-overlap":new ei(Se.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new ei(Se.layout_symbol["text-ignore-placement"]),"text-optional":new ei(Se.layout_symbol["text-optional"])}),lP={paint:new Rs({"icon-opacity":new zr(Se.paint_symbol["icon-opacity"]),"icon-color":new zr(Se.paint_symbol["icon-color"]),"icon-halo-color":new zr(Se.paint_symbol["icon-halo-color"]),"icon-halo-width":new zr(Se.paint_symbol["icon-halo-width"]),"icon-halo-blur":new zr(Se.paint_symbol["icon-halo-blur"]),"icon-translate":new ei(Se.paint_symbol["icon-translate"]),"icon-translate-anchor":new ei(Se.paint_symbol["icon-translate-anchor"]),"text-opacity":new zr(Se.paint_symbol["text-opacity"]),"text-color":new zr(Se.paint_symbol["text-color"],{runtimeType:lr,getOverride:function(a){return a.textColor},hasOverride:function(a){return!!a.textColor}}),"text-halo-color":new zr(Se.paint_symbol["text-halo-color"]),"text-halo-width":new zr(Se.paint_symbol["text-halo-width"]),"text-halo-blur":new zr(Se.paint_symbol["text-halo-blur"]),"text-translate":new ei(Se.paint_symbol["text-translate"]),"text-translate-anchor":new ei(Se.paint_symbol["text-translate-anchor"])}),layout:Ute},a0=function(a){this.type=a.property.overrides?a.property.overrides.runtimeType:Mr,this.defaultValue=a};a0.prototype.evaluate=function(a){if(a.formattedSection){var c=this.defaultValue.property.overrides;if(c&&c.hasOverride(a.formattedSection))return c.getOverride(a.formattedSection)}return a.feature&&a.featureState?this.defaultValue.evaluate(a.feature,a.featureState):this.defaultValue.property.specification.default},a0.prototype.eachChild=function(a){this.defaultValue.isConstant()||a(this.defaultValue.value._styleExpression.expression)},a0.prototype.outputDefined=function(){return!1},a0.prototype.serialize=function(){return null},Tr("FormatSectionOverride",a0,{omit:["defaultValue"]});var zte=function(a){function c(f){a.call(this,f,lP)}return a&&(c.__proto__=a),(c.prototype=Object.create(a&&a.prototype)).constructor=c,c.prototype.recalculate=function(f,x){if(a.prototype.recalculate.call(this,f,x),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var S=this.layout.get("text-writing-mode");if(S){for(var I=[],D=0,H=S;D",targetMapId:x,sourceMapId:I.mapId})}}},l0.prototype.receive=function(a){var c=a.data,f=c.id;if(f&&(!c.targetMapId||this.mapId===c.targetMapId))if(c.type===""){delete this.tasks[f];var x=this.cancelCallbacks[f];delete this.cancelCallbacks[f],x&&x()}else Le()||c.mustQueue?(this.tasks[f]=c,this.taskQueue.push(f),this.invoker.trigger()):this.processTask(f,c)},l0.prototype.process=function(){if(this.taskQueue.length){var a=this.taskQueue.shift(),c=this.tasks[a];delete this.tasks[a],this.taskQueue.length&&this.invoker.trigger(),c&&this.processTask(a,c)}},l0.prototype.processTask=function(a,c){var f=this;if(c.type===""){var x=this.callbacks[a];delete this.callbacks[a],x&&(c.error?x(ja(c.error)):x(null,ja(c.data)))}else{var S=!1,I=Yt(this.globalScope)?void 0:[],D=c.hasCallback?function(ie,se){S=!0,delete f.cancelCallbacks[a],f.target.postMessage({id:a,type:"",sourceMapId:f.mapId,error:ie?Ha(ie):null,data:Ha(se,I)},I)}:function(ie){S=!0},H=null,Y=ja(c.data);if(this.parent[c.type])H=this.parent[c.type](c.sourceMapId,Y,D);else if(this.parent.getWorkerSource){var ee=c.type.split(".");H=this.parent.getWorkerSource(c.sourceMapId,ee[0],Y.source)[ee[1]](Y,D)}else D(new Error("Could not find function "+c.type));!S&&H&&H.cancel&&(this.cancelCallbacks[a]=H.cancel)}},l0.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var Os=function(a,c){a&&(c?this.setSouthWest(a).setNorthEast(c):a.length===4?this.setSouthWest([a[0],a[1]]).setNorthEast([a[2],a[3]]):this.setSouthWest(a[0]).setNorthEast(a[1]))};Os.prototype.setNorthEast=function(a){return this._ne=a instanceof Ro?new Ro(a.lng,a.lat):Ro.convert(a),this},Os.prototype.setSouthWest=function(a){return this._sw=a instanceof Ro?new Ro(a.lng,a.lat):Ro.convert(a),this},Os.prototype.extend=function(a){var c,f,x=this._sw,S=this._ne;if(a instanceof Ro)c=a,f=a;else{if(!(a instanceof Os))return Array.isArray(a)?a.length===4||a.every(Array.isArray)?this.extend(Os.convert(a)):this.extend(Ro.convert(a)):this;if(f=a._ne,!(c=a._sw)||!f)return this}return x||S?(x.lng=Math.min(c.lng,x.lng),x.lat=Math.min(c.lat,x.lat),S.lng=Math.max(f.lng,S.lng),S.lat=Math.max(f.lat,S.lat)):(this._sw=new Ro(c.lng,c.lat),this._ne=new Ro(f.lng,f.lat)),this},Os.prototype.getCenter=function(){return new Ro((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Os.prototype.getSouthWest=function(){return this._sw},Os.prototype.getNorthEast=function(){return this._ne},Os.prototype.getNorthWest=function(){return new Ro(this.getWest(),this.getNorth())},Os.prototype.getSouthEast=function(){return new Ro(this.getEast(),this.getSouth())},Os.prototype.getWest=function(){return this._sw.lng},Os.prototype.getSouth=function(){return this._sw.lat},Os.prototype.getEast=function(){return this._ne.lng},Os.prototype.getNorth=function(){return this._ne.lat},Os.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Os.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Os.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Os.prototype.contains=function(a){var c=Ro.convert(a),f=c.lng,x=c.lat,S=this._sw.lng<=f&&f<=this._ne.lng;return this._sw.lng>this._ne.lng&&(S=this._sw.lng>=f&&f>=this._ne.lng),this._sw.lat<=x&&x<=this._ne.lat&&S},Os.convert=function(a){return!a||a instanceof Os?a:new Os(a)};var Ro=function(a,c){if(isNaN(a)||isNaN(c))throw new Error("Invalid LngLat object: ("+a+", "+c+")");if(this.lng=+a,this.lat=+c,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Ro.prototype.wrap=function(){return new Ro(F(this.lng,-180,180),this.lat)},Ro.prototype.toArray=function(){return[this.lng,this.lat]},Ro.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Ro.prototype.distanceTo=function(a){var c=Math.PI/180,f=this.lat*c,x=a.lat*c,S=Math.sin(f)*Math.sin(x)+Math.cos(f)*Math.cos(x)*Math.cos((a.lng-this.lng)*c);return 63710088e-1*Math.acos(Math.min(S,1))},Ro.prototype.toBounds=function(a){a===void 0&&(a=0);var c=360*a/40075017,f=c/Math.cos(Math.PI/180*this.lat);return new Os(new Ro(this.lng-f,this.lat-c),new Ro(this.lng+f,this.lat+c))},Ro.convert=function(a){if(a instanceof Ro)return a;if(Array.isArray(a)&&(a.length===2||a.length===3))return new Ro(Number(a[0]),Number(a[1]));if(!Array.isArray(a)&&typeof a=="object"&&a!==null)return new Ro(Number("lng"in a?a.lng:a.lon),Number(a.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Jk=2*Math.PI*63710088e-1;function Qk(a){return Jk*Math.cos(a*Math.PI/180)}function $k(a){return(180+a)/360}function e6(a){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+a*Math.PI/360)))/360}function t6(a,c){return a/Qk(c)}function uP(a){return 360/Math.PI*Math.atan(Math.exp((180-360*a)*Math.PI/180))-90}var jA=function(a,c,f){f===void 0&&(f=0),this.x=+a,this.y=+c,this.z=+f};jA.fromLngLat=function(a,c){c===void 0&&(c=0);var f=Ro.convert(a);return new jA($k(f.lng),e6(f.lat),t6(c,f.lat))},jA.prototype.toLngLat=function(){return new Ro(360*this.x-180,uP(this.y))},jA.prototype.toAltitude=function(){return this.z*Qk(uP(this.y))},jA.prototype.meterInMercatorCoordinateUnits=function(){return 1/Jk*(a=uP(this.y),1/Math.cos(a*Math.PI/180));var a};var GA=function(a,c,f){this.z=a,this.x=c,this.y=f,this.key=bv(0,a,a,c,f)};GA.prototype.equals=function(a){return this.z===a.z&&this.x===a.x&&this.y===a.y},GA.prototype.url=function(a,c){var f,x,S,I,D,H=(x=this.y,S=this.z,I=Zk(256*(f=this.x),256*(x=Math.pow(2,S)-x-1),S),D=Zk(256*(f+1),256*(x+1),S),I[0]+","+I[1]+","+D[0]+","+D[1]),Y=function(ee,ie,se){for(var Ae,Te="",ke=ee;ke>0;ke--)Te+=(ie&(Ae=1<this.canonical.z?new Ds(a,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Ds(a,this.wrap,a,this.canonical.x>>c,this.canonical.y>>c)},Ds.prototype.calculateScaledKey=function(a,c){var f=this.canonical.z-a;return a>this.canonical.z?bv(this.wrap*+c,a,this.canonical.z,this.canonical.x,this.canonical.y):bv(this.wrap*+c,a,a,this.canonical.x>>f,this.canonical.y>>f)},Ds.prototype.isChildOf=function(a){if(a.wrap!==this.wrap)return!1;var c=this.canonical.z-a.canonical.z;return a.overscaledZ===0||a.overscaledZ>c&&a.canonical.y===this.canonical.y>>c},Ds.prototype.children=function(a){if(this.overscaledZ>=a)return[new Ds(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var c=this.canonical.z+1,f=2*this.canonical.x,x=2*this.canonical.y;return[new Ds(c,this.wrap,c,f,x),new Ds(c,this.wrap,c,f+1,x),new Ds(c,this.wrap,c,f,x+1),new Ds(c,this.wrap,c,f+1,x+1)]},Ds.prototype.isLessThan=function(a){return this.wrapa.wrap)&&(this.overscaledZa.overscaledZ)&&(this.canonical.xa.canonical.x)&&this.canonical.y=this.dim+1||c<-1||c>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(c+1)*this.stride+(a+1)},cd.prototype._unpackMapbox=function(a,c,f){return(256*a*256+256*c+f)/10-1e4},cd.prototype._unpackTerrarium=function(a,c,f){return 256*a+c+f/256-32768},cd.prototype.getPixels=function(){return new Qo({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},cd.prototype.backfillBorder=function(a,c,f){if(this.dim!==a.dim)throw new Error("dem dimension mismatch");var x=c*this.dim,S=c*this.dim+this.dim,I=f*this.dim,D=f*this.dim+this.dim;switch(c){case-1:x=S-1;break;case 1:S=x+1}switch(f){case-1:I=D-1;break;case 1:D=I+1}for(var H=-c*this.dim,Y=-f*this.dim,ee=I;ee=0&&ie[3]>=0&&H.insert(D,ie[0],ie[1],ie[2],ie[3])}},ud.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new ad.VectorTile(new Zw(this.rawTileData)).layers,this.sourceLayerCoder=new a2(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},ud.prototype.query=function(a,c,f,x){var S=this;this.loadVTLayers();for(var I=a.params||{},D=8192/a.tileSize/a.scale,H=Zf(I.filter),Y=a.queryGeometry,ee=a.queryPadding*D,ie=n6(Y),se=this.grid.query(ie.minX-ee,ie.minY-ee,ie.maxX+ee,ie.maxY+ee),Ae=n6(a.cameraQueryGeometry),Te=this.grid3D.query(Ae.minX-ee,Ae.minY-ee,Ae.maxX+ee,Ae.maxY+ee,function(bt,Mt,Ut,$t){return function(Ar,Qr,Cr,ni,Pr){for(var Vi=0,Ai=Ar;Vi=Gr.x&&Pr>=Gr.y)return!0}var rn=[new u(Qr,Cr),new u(Qr,Pr),new u(ni,Pr),new u(ni,Cr)];if(Ar.length>2){for(var Ri=0,_n=rn;Ri<_n.length;Ri+=1)if(ro(Ar,_n[Ri]))return!0}for(var si=0;si=0)return!0;return!1}(I,se)){var Ae=this.sourceLayerCoder.decode(f),Te=this.vtLayers[Ae].feature(x);if(S.needGeometry){var ke=Jo(Te,!0);if(!S.filter(new qi(this.tileID.overscaledZ),ke,this.tileID.canonical))return}else if(!S.filter(new qi(this.tileID.overscaledZ),Te))return;for(var Ve=this.getId(Te,Ae),et=0;etx)S=!1;else if(c)if(this.expirationTimeTo&&(a.getActor().send("enforceCacheSizeLimit",Dn),Us=0)},n.clamp=O,n.clearTileCache=function(a){var c=v.caches.delete("mapbox-tiles");a&&c.catch(a).then(function(){return a()})},n.clipLine=zk,n.clone=function(a){var c=new Cn(16);return c[0]=a[0],c[1]=a[1],c[2]=a[2],c[3]=a[3],c[4]=a[4],c[5]=a[5],c[6]=a[6],c[7]=a[7],c[8]=a[8],c[9]=a[9],c[10]=a[10],c[11]=a[11],c[12]=a[12],c[13]=a[13],c[14]=a[14],c[15]=a[15],c},n.clone$1=$,n.clone$2=function(a){var c=new Cn(3);return c[0]=a[0],c[1]=a[1],c[2]=a[2],c},n.collisionCircleLayout=dte,n.config=be,n.create=function(){var a=new Cn(16);return Cn!=Float32Array&&(a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[11]=0,a[12]=0,a[13]=0,a[14]=0),a[0]=1,a[5]=1,a[10]=1,a[15]=1,a},n.create$1=function(){var a=new Cn(9);return Cn!=Float32Array&&(a[1]=0,a[2]=0,a[3]=0,a[5]=0,a[6]=0,a[7]=0),a[0]=1,a[4]=1,a[8]=1,a},n.create$2=function(){var a=new Cn(4);return Cn!=Float32Array&&(a[1]=0,a[2]=0),a[0]=1,a[3]=1,a},n.createCommonjsModule=o,n.createExpression=gi,n.createLayout=Bs,n.createStyleLayer=function(a){return a.type==="custom"?new Wte(a):new qte[a.type](a)},n.cross=function(a,c,f){var x=c[0],S=c[1],I=c[2],D=f[0],H=f[1],Y=f[2];return a[0]=S*Y-I*H,a[1]=I*D-x*Y,a[2]=x*H-S*D,a},n.deepEqual=function a(c,f){if(Array.isArray(c)){if(!Array.isArray(f)||c.length!==f.length)return!1;for(var x=0;x0&&(I=1/Math.sqrt(I)),a[0]=c[0]*I,a[1]=c[1]*I,a[2]=c[2]*I,a},n.number=Mo,n.offscreenCanvasSupported=Fc,n.ortho=function(a,c,f,x,S,I,D){var H=1/(c-f),Y=1/(x-S),ee=1/(I-D);return a[0]=-2*H,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=-2*Y,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=2*ee,a[11]=0,a[12]=(c+f)*H,a[13]=(S+x)*Y,a[14]=(D+I)*ee,a[15]=1,a},n.parseGlyphPBF=function(a){return new Zw(a).readFields(Tte,[])},n.pbf=Zw,n.performSymbolLayout=function(a,c,f,x,S,I,D){a.createArrays(),a.tilePixelRatio=8192/(512*a.overscaling),a.compareText={},a.iconsNeedLinear=!1;var H=a.layers[0].layout,Y=a.layers[0]._unevaluatedLayout._values,ee={};if(a.textSizeData.kind==="composite"){var ie=a.textSizeData,se=ie.maxZoom;ee.compositeTextSizes=[Y["text-size"].possiblyEvaluate(new qi(ie.minZoom),D),Y["text-size"].possiblyEvaluate(new qi(se),D)]}if(a.iconSizeData.kind==="composite"){var Ae=a.iconSizeData,Te=Ae.maxZoom;ee.compositeIconSizes=[Y["icon-size"].possiblyEvaluate(new qi(Ae.minZoom),D),Y["icon-size"].possiblyEvaluate(new qi(Te),D)]}ee.layoutTextSize=Y["text-size"].possiblyEvaluate(new qi(a.zoom+1),D),ee.layoutIconSize=Y["icon-size"].possiblyEvaluate(new qi(a.zoom+1),D),ee.textMaxSize=Y["text-size"].possiblyEvaluate(new qi(18));for(var ke=24*H.get("text-line-height"),Ve=H.get("text-rotation-alignment")==="map"&&H.get("symbol-placement")!=="point",et=H.get("text-keep-upright"),Xe=H.get("text-size"),at=function(){var Mt=bt[_t],Ut=H.get("text-font").evaluate(Mt,{},D).join(","),$t=Xe.evaluate(Mt,{},D),Ar=ee.layoutTextSize.evaluate(Mt,{},D),Qr=ee.layoutIconSize.evaluate(Mt,{},D),Cr={horizontal:{},vertical:void 0},ni=Mt.text,Pr=[0,0];if(ni){var Vi=ni.toString(),Ai=24*H.get("text-letter-spacing").evaluate(Mt,{},D),Gr=function(un){for(var no=0,Kn=un;no=8192||Bv.y<0||Bv.y>=8192||function(ps,pf,Kte,mp,AP,l6,g2,fh,_2,Ov,y2,v2,mP,c6,Dv,u6,f6,h6,d6,p6,xc,x2,A6,hh,Zte){var m6,XA,y0,v0,x0,b0=ps.addToLineVertexArray(pf,Kte),g6=0,_6=0,y6=0,v6=0,gP=-1,_P=-1,dd={},x6=Ne(""),yP=0,vP=0;if(fh._unevaluatedLayout.getValue("text-radial-offset")===void 0?(yP=(m6=fh.layout.get("text-offset").evaluate(xc,{},hh).map(function(Fv){return 24*Fv}))[0],vP=m6[1]):(yP=24*fh.layout.get("text-radial-offset").evaluate(xc,{},hh),vP=oP),ps.allowVerticalPlacement&&mp.vertical){var b6=fh.layout.get("text-rotate").evaluate(xc,{},hh)+90;v0=new n2(_2,pf,Ov,y2,v2,mp.vertical,mP,c6,Dv,b6),g2&&(x0=new n2(_2,pf,Ov,y2,v2,g2,f6,h6,Dv,b6))}if(AP){var xP=fh.layout.get("icon-rotate").evaluate(xc,{}),w6=fh.layout.get("icon-text-fit")!=="none",T6=Vk(AP,xP,A6,w6),bP=g2?Vk(g2,xP,A6,w6):void 0;y0=new n2(_2,pf,Ov,y2,v2,AP,f6,h6,!1,xP),g6=4*T6.length;var E6=ps.iconSizeData,Lv=null;E6.kind==="source"?(Lv=[128*fh.layout.get("icon-size").evaluate(xc,{})])[0]>32640&&we(ps.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):E6.kind==="composite"&&((Lv=[128*x2.compositeIconSizes[0].evaluate(xc,{},hh),128*x2.compositeIconSizes[1].evaluate(xc,{},hh)])[0]>32640||Lv[1]>32640)&&we(ps.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),ps.addSymbols(ps.icon,T6,Lv,p6,d6,xc,!1,pf,b0.lineStartIndex,b0.lineLength,-1,hh),gP=ps.icon.placedSymbolArray.length-1,bP&&(_6=4*bP.length,ps.addSymbols(ps.icon,bP,Lv,p6,d6,xc,yc.vertical,pf,b0.lineStartIndex,b0.lineLength,-1,hh),_P=ps.icon.placedSymbolArray.length-1)}for(var S6 in mp.horizontal){var b2=mp.horizontal[S6];if(!XA){x6=Ne(b2.text);var Jte=fh.layout.get("text-rotate").evaluate(xc,{},hh);XA=new n2(_2,pf,Ov,y2,v2,b2,mP,c6,Dv,Jte)}var C6=b2.positionedLines.length===1;if(y6+=Gk(ps,pf,b2,l6,fh,Dv,xc,u6,b0,mp.vertical?yc.horizontal:yc.horizontalOnly,C6?Object.keys(mp.horizontal):[S6],dd,gP,x2,hh),C6)break}mp.vertical&&(v6+=Gk(ps,pf,mp.vertical,l6,fh,Dv,xc,u6,b0,yc.vertical,["vertical"],dd,_P,x2,hh));var Qte=XA?XA.boxStartIndex:ps.collisionBoxArray.length,$te=XA?XA.boxEndIndex:ps.collisionBoxArray.length,ere=v0?v0.boxStartIndex:ps.collisionBoxArray.length,tre=v0?v0.boxEndIndex:ps.collisionBoxArray.length,rre=y0?y0.boxStartIndex:ps.collisionBoxArray.length,ire=y0?y0.boxEndIndex:ps.collisionBoxArray.length,nre=x0?x0.boxStartIndex:ps.collisionBoxArray.length,ore=x0?x0.boxEndIndex:ps.collisionBoxArray.length,dh=-1,w2=function(Fv,I6){return Fv&&Fv.circleDiameter?Math.max(Fv.circleDiameter,I6):I6};dh=w2(XA,dh),dh=w2(v0,dh),dh=w2(y0,dh);var M6=(dh=w2(x0,dh))>-1?1:0;M6&&(dh*=Zte/24),ps.glyphOffsetArray.length>=eo.MAX_GLYPHS&&we("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),xc.sortKey!==void 0&&ps.addToSortKeyRanges(ps.symbolInstances.length,xc.sortKey),ps.symbolInstances.emplaceBack(pf.x,pf.y,dd.right>=0?dd.right:-1,dd.center>=0?dd.center:-1,dd.left>=0?dd.left:-1,dd.vertical||-1,gP,_P,x6,Qte,$te,ere,tre,rre,ire,nre,ore,Ov,y6,v6,g6,_6,M6,0,mP,yP,vP,dh)}(un,Bv,Yte,Kn,wn,yl,ch,un.layers[0],un.collisionBoxArray,no.index,no.sourceLayerIndex,un.index,WA,c2,u2,Ba,fd,d0,f2,uh,no,Ra,Rn,lh,xo)};if(hd==="line")for(var A0=0,h2=zk(no.geometry,0,0,8192,8192);A01){var A2=Pte(Iv,wv,Kn.vertical||Tu,wn,24,f0);A2&&Ap(Iv,A2)}}else if(no.type==="Polygon")for(var m0=0,m2=Et(no.geometry,0);m0=Qi.maxzoom||Qi.visibility!=="none"&&(v(Di,this.zoom,ve),(Pt[Qi.id]=Qi.createBucket({index:Se.bucketLayerIDs.length,layers:Di,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:br,sourceID:this.source})).populate(sr,Xt,this.tileID.canonical),Se.bucketLayerIDs.push(Di.map(function(en){return en.id})))}}}var Li=n.mapObject(Xt.glyphDependencies,function(en){return Object.keys(en).map(Number)});Object.keys(Li).length?Pe.send("getGlyphs",{uid:this.uid,stacks:Li},function(en,Si){Ge||(Ge=en,ht=Si,Ln.call(tt))}):ht={};var Xn=Object.keys(Xt.iconDependencies);Xn.length?Pe.send("getImages",{icons:Xn,source:this.source,tileID:this.tileID,type:"icons"},function(en,Si){Ge||(Ge=en,Ht=Si,Ln.call(tt))}):Ht={};var $i=Object.keys(Xt.patternDependencies);function Ln(){if(Ge)return ye(Ge);if(ht&&Ht&&Zt){var en=new u(ht),Si=new n.ImageAtlas(Ht,Zt);for(var Oi in Pt){var yo=Pt[Oi];yo instanceof n.SymbolBucket?(v(yo.layers,this.zoom,ve),n.performSymbolLayout(yo,ht,en.positions,Ht,Si.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):yo.hasPattern&&(yo instanceof n.LineBucket||yo instanceof n.FillBucket||yo instanceof n.FillExtrusionBucket)&&(v(yo.layers,this.zoom,ve),yo.addFeatures(Xt,this.tileID.canonical,Si.patternPositions))}this.status="done",ye(null,{buckets:n.values(Pt).filter(function(fc){return!fc.isEmpty()}),featureIndex:Se,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:en.image,imageAtlas:Si,glyphMap:this.returnDependencies?ht:null,iconMap:this.returnDependencies?Ht:null,glyphPositions:this.returnDependencies?en.positions:null})}}$i.length?Pe.send("getImages",{icons:$i,source:this.source,tileID:this.tileID,type:"patterns"},function(en,Si){Ge||(Ge=en,Zt=Si,Ln.call(tt))}):Zt={},Ln.call(this)};var E=function(oe,de,ve,Pe){this.actor=oe,this.layerIndex=de,this.availableImages=ve,this.loadVectorData=Pe||T,this.loading={},this.loaded={}};E.prototype.loadTile=function(oe,de){var ve=this,Pe=oe.uid;this.loading||(this.loading={});var ye=!!(oe&&oe.request&&oe.request.collectResourceTiming)&&new n.RequestPerformance(oe.request),tt=this.loading[Pe]=new h(oe);tt.abort=this.loadVectorData(oe,function(rt,Se){if(delete ve.loading[Pe],rt||!Se)return tt.status="done",ve.loaded[Pe]=tt,de(rt);var Ge=Se.rawData,ht={};Se.expires&&(ht.expires=Se.expires),Se.cacheControl&&(ht.cacheControl=Se.cacheControl);var Ht={};if(ye){var Zt=ye.finish();Zt&&(Ht.resourceTiming=JSON.parse(JSON.stringify(Zt)))}tt.vectorTile=Se.vectorTile,tt.parse(Se.vectorTile,ve.layerIndex,ve.availableImages,ve.actor,function(Pt,Xt){if(Pt||!Xt)return de(Pt);de(null,n.extend({rawTileData:Ge.slice(0)},Xt,ht,Ht))}),ve.loaded=ve.loaded||{},ve.loaded[Pe]=tt})},E.prototype.reloadTile=function(oe,de){var ve=this,Pe=this.loaded,ye=oe.uid,tt=this;if(Pe&&Pe[ye]){var rt=Pe[ye];rt.showCollisionBoxes=oe.showCollisionBoxes;var Se=function(Ge,ht){var Ht=rt.reloadCallback;Ht&&(delete rt.reloadCallback,rt.parse(rt.vectorTile,tt.layerIndex,ve.availableImages,tt.actor,Ht)),de(Ge,ht)};rt.status==="parsing"?rt.reloadCallback=Se:rt.status==="done"&&(rt.vectorTile?rt.parse(rt.vectorTile,this.layerIndex,this.availableImages,this.actor,Se):Se())}},E.prototype.abortTile=function(oe,de){var ve=this.loading,Pe=oe.uid;ve&&ve[Pe]&&ve[Pe].abort&&(ve[Pe].abort(),delete ve[Pe]),de()},E.prototype.removeTile=function(oe,de){var ve=this.loaded,Pe=oe.uid;ve&&ve[Pe]&&delete ve[Pe],de()};var M=n.window.ImageBitmap,O=function(){this.loaded={}};function F(oe,de){if(oe.length!==0){z(oe[0],de);for(var ve=1;ve=Math.abs(Se)?ve-Ge+Se:Se-Ge+ve,ve=Ge}ve+Pe>=0!=!!de&&oe.reverse()}O.prototype.loadTile=function(oe,de){var ve=oe.uid,Pe=oe.encoding,ye=oe.rawImageData,tt=M&&ye instanceof M?this.getImageData(ye):ye,rt=new n.DEMData(ve,tt,Pe);this.loaded=this.loaded||{},this.loaded[ve]=rt,de(null,rt)},O.prototype.getImageData=function(oe){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(oe.width,oe.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=oe.width,this.offscreenCanvas.height=oe.height,this.offscreenCanvasContext.drawImage(oe,0,0,oe.width,oe.height);var de=this.offscreenCanvasContext.getImageData(-1,-1,oe.width+2,oe.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new n.RGBAImage({width:de.width,height:de.height},de.data)},O.prototype.removeTile=function(oe){var de=this.loaded,ve=oe.uid;de&&de[ve]&&delete de[ve]};var W=n.vectorTile.VectorTileFeature.prototype.toGeoJSON,J=function(oe){this._feature=oe,this.extent=n.EXTENT,this.type=oe.type,this.properties=oe.tags,"id"in oe&&!isNaN(oe.id)&&(this.id=parseInt(oe.id,10))};J.prototype.loadGeometry=function(){if(this._feature.type===1){for(var oe=[],de=0,ve=this._feature.geometry;de>31}function Vt(oe,de){for(var ve=oe.loadGeometry(),Pe=oe.type,ye=0,tt=0,rt=ve.length,Se=0;Se>1;(function br(sr,lr,bi,pr,Ii,vn){for(;Ii>pr;){if(Ii-pr>600){var Di=Ii-pr+1,Qi=bi-pr+1,Li=Math.log(Di),Xn=.5*Math.exp(2*Li/3),$i=.5*Math.sqrt(Li*Xn*(Di-Xn)/Di)*(Qi-Di/2<0?-1:1);br(sr,lr,bi,Math.max(pr,Math.floor(bi-Qi*Xn/Di+$i)),Math.min(Ii,Math.floor(bi+(Di-Qi)*Xn/Di+$i)),vn)}var Ln=lr[2*bi+vn],en=pr,Si=Ii;for(mr(sr,lr,pr,bi),lr[2*Ii+vn]>Ln&&mr(sr,lr,pr,Ii);enLn;)Si--}lr[2*pr+vn]===Ln?mr(sr,lr,pr,Si):mr(sr,lr,++Si,Ii),Si<=bi&&(pr=Si+1),bi<=Si&&(Ii=Si-1)}})(Ht,Zt,Ot,Xt,Dr,Mr%2),ht(Ht,Zt,Pt,Xt,Ot-1,Mr+1),ht(Ht,Zt,Pt,Ot+1,Dr,Mr+1)}})(rt,Se,Pe,0,rt.length-1,0)};Jt.prototype.range=function(oe,de,ve,Pe){return function(ye,tt,rt,Se,Ge,ht,Ht){for(var Zt,Pt,Xt=[0,ye.length-1,0],Dr=[];Xt.length;){var Mr=Xt.pop(),Ot=Xt.pop(),br=Xt.pop();if(Ot-br<=Ht)for(var sr=br;sr<=Ot;sr++)Pt=tt[2*sr+1],(Zt=tt[2*sr])>=rt&&Zt<=Ge&&Pt>=Se&&Pt<=ht&&Dr.push(ye[sr]);else{var lr=Math.floor((br+Ot)/2);Pt=tt[2*lr+1],(Zt=tt[2*lr])>=rt&&Zt<=Ge&&Pt>=Se&&Pt<=ht&&Dr.push(ye[lr]);var bi=(Mr+1)%2;(Mr===0?rt<=Zt:Se<=Pt)&&(Xt.push(br),Xt.push(lr-1),Xt.push(bi)),(Mr===0?Ge>=Zt:ht>=Pt)&&(Xt.push(lr+1),Xt.push(Ot),Xt.push(bi))}}return Dr}(this.ids,this.coords,oe,de,ve,Pe,this.nodeSize)},Jt.prototype.within=function(oe,de,ve){return function(Pe,ye,tt,rt,Se,Ge){for(var ht=[0,Pe.length-1,0],Ht=[],Zt=Se*Se;ht.length;){var Pt=ht.pop(),Xt=ht.pop(),Dr=ht.pop();if(Xt-Dr<=Ge)for(var Mr=Dr;Mr<=Xt;Mr++)Jr(ye[2*Mr],ye[2*Mr+1],tt,rt)<=Zt&&Ht.push(Pe[Mr]);else{var Ot=Math.floor((Dr+Xt)/2),br=ye[2*Ot],sr=ye[2*Ot+1];Jr(br,sr,tt,rt)<=Zt&&Ht.push(Pe[Ot]);var lr=(Pt+1)%2;(Pt===0?tt-Se<=br:rt-Se<=sr)&&(ht.push(Dr),ht.push(Ot-1),ht.push(lr)),(Pt===0?tt+Se>=br:rt+Se>=sr)&&(ht.push(Ot+1),ht.push(Xt),ht.push(lr))}}return Ht}(this.ids,this.coords,oe,de,ve,this.nodeSize)};var qt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(oe){return oe}},wi=function(oe){this.options=$r(Object.create(qt),oe),this.trees=new Array(this.options.maxZoom+1)};function ae(oe,de,ve,Pe,ye){return{x:oe,y:de,zoom:1/0,id:ve,parentId:-1,numPoints:Pe,properties:ye}}function be(oe,de){var ve=oe.geometry.coordinates,Pe=ve[1];return{x:Ft(ve[0]),y:wt(Pe),zoom:1/0,index:de,parentId:-1}}function je(oe){return{type:"Feature",id:oe.id,properties:lt(oe),geometry:{type:"Point",coordinates:[(Pe=oe.x,360*(Pe-.5)),(de=oe.y,ve=(180-360*de)*Math.PI/180,360*Math.atan(Math.exp(ve))/Math.PI-90)]}};var de,ve,Pe}function lt(oe){var de=oe.numPoints,ve=de>=1e4?Math.round(de/1e3)+"k":de>=1e3?Math.round(de/100)/10+"k":de;return $r($r({},oe.properties),{cluster:!0,cluster_id:oe.id,point_count:de,point_count_abbreviated:ve})}function Ft(oe){return oe/360+.5}function wt(oe){var de=Math.sin(oe*Math.PI/180),ve=.5-.25*Math.log((1+de)/(1-de))/Math.PI;return ve<0?0:ve>1?1:ve}function $r(oe,de){for(var ve in de)oe[ve]=de[ve];return oe}function xi(oe){return oe.x}function Ki(oe){return oe.y}function kn(oe,de,ve,Pe,ye,tt){var rt=ye-ve,Se=tt-Pe;if(rt!==0||Se!==0){var Ge=((oe-ve)*rt+(de-Pe)*Se)/(rt*rt+Se*Se);Ge>1?(ve=ye,Pe=tt):Ge>0&&(ve+=rt*Ge,Pe+=Se*Ge)}return(rt=oe-ve)*rt+(Se=de-Pe)*Se}function Zi(oe,de,ve,Pe){var ye={id:oe===void 0?null:oe,type:de,geometry:ve,tags:Pe,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(tt){var rt=tt.geometry,Se=tt.type;if(Se==="Point"||Se==="MultiPoint"||Se==="LineString")Hi(tt,rt);else if(Se==="Polygon"||Se==="MultiLineString")for(var Ge=0;Ge0&&(rt+=Pe?(ye*ht-Ge*tt)/2:Math.sqrt(Math.pow(Ge-ye,2)+Math.pow(ht-tt,2))),ye=Ge,tt=ht}var Ht=de.length-3;de[2]=1,function Zt(Pt,Xt,Dr,Mr){for(var Ot,br=Mr,sr=Dr-Xt>>1,lr=Dr-Xt,bi=Pt[Xt],pr=Pt[Xt+1],Ii=Pt[Dr],vn=Pt[Dr+1],Di=Xt+3;Dibr)Ot=Di,br=Qi;else if(Qi===br){var Li=Math.abs(Di-sr);LiMr&&(Ot-Xt>3&&Zt(Pt,Xt,Ot,Mr),Pt[Ot+2]=br,Dr-Ot>3&&Zt(Pt,Ot,Dr,Mr))}(de,0,Ht,ve),de[Ht+2]=1,de.size=Math.abs(rt),de.start=0,de.end=de.size}function Bi(oe,de,ve,Pe){for(var ye=0;ye1?1:ve}function kr(oe,de,ve,Pe,ye,tt,rt,Se){if(Pe/=de,tt>=(ve/=de)&&rt=Pe)return null;for(var Ge=[],ht=0;ht=ve&&Dr=Pe)){var Mr=[];if(Pt==="Point"||Pt==="MultiPoint")dr(Zt,Mr,ve,Pe,ye);else if(Pt==="LineString")Ur(Zt,Mr,ve,Pe,ye,!1,Se.lineMetrics);else if(Pt==="MultiLineString")to(Zt,Mr,ve,Pe,ye,!1);else if(Pt==="Polygon")to(Zt,Mr,ve,Pe,ye,!0);else if(Pt==="MultiPolygon")for(var Ot=0;Ot=ve&&rt<=Pe&&(de.push(oe[tt]),de.push(oe[tt+1]),de.push(oe[tt+2]))}}function Ur(oe,de,ve,Pe,ye,tt,rt){for(var Se,Ge,ht=ci(oe),Ht=ye===0?To:Eo,Zt=oe.start,Pt=0;Ptve&&(Ge=Ht(ht,Xt,Dr,Ot,br,ve),rt&&(ht.start=Zt+Se*Ge)):sr>Pe?lr=ve&&(Ge=Ht(ht,Xt,Dr,Ot,br,ve),bi=!0),lr>Pe&&sr<=Pe&&(Ge=Ht(ht,Xt,Dr,Ot,br,Pe),bi=!0),!tt&&bi&&(rt&&(ht.end=Zt+Se*Ge),de.push(ht),ht=ci(oe)),rt&&(Zt+=Se)}var pr=oe.length-3;Xt=oe[pr],Dr=oe[pr+1],Mr=oe[pr+2],(sr=ye===0?Xt:Dr)>=ve&&sr<=Pe&&Dn(ht,Xt,Dr,Mr),pr=ht.length-3,tt&&pr>=3&&(ht[pr]!==ht[0]||ht[pr+1]!==ht[1])&&Dn(ht,ht[0],ht[1],ht[2]),ht.length&&de.push(ht)}function ci(oe){var de=[];return de.size=oe.size,de.start=oe.start,de.end=oe.end,de}function to(oe,de,ve,Pe,ye,tt){for(var rt=0;rtrt.maxX&&(rt.maxX=Ht),Zt>rt.maxY&&(rt.maxY=Zt)}return rt}function sl(oe,de,ve,Pe){var ye=de.geometry,tt=de.type,rt=[];if(tt==="Point"||tt==="MultiPoint")for(var Se=0;Se0&&de.size<(ye?rt:Pe))ve.numPoints+=de.length/3;else{for(var Se=[],Ge=0;Gert)&&(ve.numSimplified++,Se.push(de[Ge]),Se.push(de[Ge+1])),ve.numPoints++;ye&&function(ht,Ht){for(var Zt=0,Pt=0,Xt=ht.length,Dr=Xt-2;Pt0===Ht)for(Pt=0,Xt=ht.length;Pt24)throw new Error("maxZoom should be in the 0-24 range");if(de.promoteId&&de.generateId)throw new Error("promoteId and generateId cannot be used together.");var Pe=function(ye,tt){var rt=[];if(ye.type==="FeatureCollection")for(var Se=0;Se=Pe;ht--){var Ht=+Date.now();Se=this._cluster(Se,ht),this.trees[ht]=new Jt(Se,xi,Ki,tt,Float32Array),ve&&console.log("z%d: %d clusters in %dms",ht,Se.length,+Date.now()-Ht)}return ve&&console.timeEnd("total time"),this},wi.prototype.getClusters=function(oe,de){var ve=((oe[0]+180)%360+360)%360-180,Pe=Math.max(-90,Math.min(90,oe[1])),ye=oe[2]===180?180:((oe[2]+180)%360+360)%360-180,tt=Math.max(-90,Math.min(90,oe[3]));if(oe[2]-oe[0]>=360)ve=-180,ye=180;else if(ve>ye){var rt=this.getClusters([ve,Pe,180,tt],de),Se=this.getClusters([-180,Pe,ye,tt],de);return rt.concat(Se)}for(var Ge=this.trees[this._limitZoom(de)],ht=[],Ht=0,Zt=Ge.range(Ft(ve),wt(tt),Ft(ye),wt(Pe));Htde&&(Pt+=Mr.numPoints||1)}if(Pt>=tt){for(var Ot=Ge.x*Zt,br=Ge.y*Zt,sr=ye&&Zt>1?this._map(Ge,!0):null,lr=(Se<<5)+(de+1)+this.points.length,bi=0,pr=Ht;bi1)for(var Di=0,Qi=Ht;Di>5},wi.prototype._getOriginZoom=function(oe){return(oe-this.points.length)%32},wi.prototype._map=function(oe,de){if(oe.numPoints)return de?$r({},oe.properties):oe.properties;var ve=this.points[oe.index].properties,Pe=this.options.map(ve);return de&&Pe===ve?$r({},Pe):Pe},al.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},al.prototype.splitTile=function(oe,de,ve,Pe,ye,tt,rt){for(var Se=[oe,de,ve,Pe],Ge=this.options,ht=Ge.debug;Se.length;){Pe=Se.pop(),ve=Se.pop(),de=Se.pop(),oe=Se.pop();var Ht=1<1&&console.time("creation"),Pt=this.tiles[Zt]=ql(oe,de,ve,Pe,Ge),this.tileCoords.push({z:de,x:ve,y:Pe}),ht)){ht>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",de,ve,Pe,Pt.numFeatures,Pt.numPoints,Pt.numSimplified),console.timeEnd("creation"));var Xt="z"+de;this.stats[Xt]=(this.stats[Xt]||0)+1,this.total++}if(Pt.source=oe,ye){if(de===Ge.maxZoom||de===ye)continue;var Dr=1<1&&console.time("clipping");var Mr,Ot,br,sr,lr,bi,pr=.5*Ge.buffer/Ge.extent,Ii=.5-pr,vn=.5+pr,Di=1+pr;Mr=Ot=br=sr=null,lr=kr(oe,Ht,ve-pr,ve+vn,0,Pt.minX,Pt.maxX,Ge),bi=kr(oe,Ht,ve+Ii,ve+Di,0,Pt.minX,Pt.maxX,Ge),oe=null,lr&&(Mr=kr(lr,Ht,Pe-pr,Pe+vn,1,Pt.minY,Pt.maxY,Ge),Ot=kr(lr,Ht,Pe+Ii,Pe+Di,1,Pt.minY,Pt.maxY,Ge),lr=null),bi&&(br=kr(bi,Ht,Pe-pr,Pe+vn,1,Pt.minY,Pt.maxY,Ge),sr=kr(bi,Ht,Pe+Ii,Pe+Di,1,Pt.minY,Pt.maxY,Ge),bi=null),ht>1&&console.timeEnd("clipping"),Se.push(Mr||[],de+1,2*ve,2*Pe),Se.push(Ot||[],de+1,2*ve,2*Pe+1),Se.push(br||[],de+1,2*ve+1,2*Pe),Se.push(sr||[],de+1,2*ve+1,2*Pe+1)}}},al.prototype.getTile=function(oe,de,ve){var Pe=this.options,ye=Pe.extent,tt=Pe.debug;if(oe<0||oe>24)return null;var rt=1<1&&console.log("drilling down to z%d-%d-%d",oe,de,ve);for(var Ge,ht=oe,Ht=de,Zt=ve;!Ge&&ht>0;)ht--,Ht=Math.floor(Ht/2),Zt=Math.floor(Zt/2),Ge=this.tiles[Ms(ht,Ht,Zt)];return Ge&&Ge.source?(tt>1&&console.log("found parent tile z%d-%d-%d",ht,Ht,Zt),tt>1&&console.time("drilling down"),this.splitTile(Ge.source,ht,Ht,Zt,oe,de,ve),tt>1&&console.timeEnd("drilling down"),this.tiles[Se]?Us(this.tiles[Se],ye):null):null};var Ml=function(oe){function de(ve,Pe,ye,tt){oe.call(this,ve,Pe,ye,ca),tt&&(this.loadGeoJSON=tt)}return oe&&(de.__proto__=oe),(de.prototype=Object.create(oe&&oe.prototype)).constructor=de,de.prototype.loadData=function(ve,Pe){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=Pe,this._pendingLoadDataParams=ve,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},de.prototype._loadData=function(){var ve=this;if(this._pendingCallback&&this._pendingLoadDataParams){var Pe=this._pendingCallback,ye=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var tt=!!(ye&&ye.request&&ye.request.collectResourceTiming)&&new n.RequestPerformance(ye.request);this.loadGeoJSON(ye,function(rt,Se){if(rt||!Se)return Pe(rt);if(typeof Se!="object")return Pe(new Error("Input data given to '"+ye.source+"' is not a valid GeoJSON object."));(function Pt(Xt,Dr){var Mr,Ot=Xt&&Xt.type;if(Ot==="FeatureCollection")for(Mr=0;Mr"u"||typeof document>"u"?"not a browser":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 V,q,re=new Blob([""],{type:"text/javascript"}),ue=URL.createObjectURL(re);try{q=new Worker(ue),V=!0}catch{V=!1}return q&&q.terminate(),URL.revokeObjectURL(ue),V}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var V=document.createElement("canvas");V.width=V.height=1;var q=V.getContext("2d");if(!q)return!1;var re=q.getImageData(0,0,1,1);return re&&re.width===V.width}()?(b[k=B&&B.failIfMajorPerformanceCaveat]===void 0&&(b[k]=function(V){var q=function(ue){var Ee=document.createElement("canvas"),Ce=Object.create(_.webGLContextAttributes);return Ce.failIfMajorPerformanceCaveat=ue,Ee.probablySupportsContext?Ee.probablySupportsContext("webgl",Ce)||Ee.probablySupportsContext("experimental-webgl",Ce):Ee.supportsContext?Ee.supportsContext("webgl",Ce)||Ee.supportsContext("experimental-webgl",Ce):Ee.getContext("webgl",Ce)||Ee.getContext("experimental-webgl",Ce)}(V);if(!q)return!1;var re=q.createShader(q.VERTEX_SHADER);return!(!re||q.isContextLost())&&(q.shaderSource(re,"void main() {}"),q.compileShader(re),q.getShaderParameter(re,q.COMPILE_STATUS)===!0)}(k)),b[k]?void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var k}d.exports?d.exports=_:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=_,window.mapboxgl.notSupportedReason=p);var b={};_.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),s={create:function(d,_,p){var b=n.window.document.createElement(d);return _!==void 0&&(b.className=_),p&&p.appendChild(b),b},createNS:function(d,_){return n.window.document.createElementNS(d,_)}},l=n.window.document&&n.window.document.documentElement.style;function u(d){if(!l)return d[0];for(var _=0;_=0?0:d.button},s.remove=function(d){d.parentNode&&d.parentNode.removeChild(d)};var z=function(d){function _(){d.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new n.RGBAImage({width:1,height:1}),this.dirty=!0}return d&&(_.__proto__=d),(_.prototype=Object.create(d&&d.prototype)).constructor=_,_.prototype.isLoaded=function(){return this.loaded},_.prototype.setLoaded=function(p){if(this.loaded!==p&&(this.loaded=p,p)){for(var b=0,B=this.requestors;b=0?1.2:1))}function ge(d,_,p,b,B,k,V){for(var q=0;q<_;q++){for(var re=0;re65535)re(new Error("glyphs > 65535 not supported"));else if(Ce.ranges[He])re(null,{stack:ue,id:Ee,glyph:Me});else{var Ue=Ce.requests[He];Ue||(Ue=Ce.requests[He]=[],me.loadGlyphRange(ue,He,p.url,p.requestManager,function(Ze,Ne){if(Ne){for(var Ke in Ne)p._doesCharSupportLocalGlyph(+Ke)||(Ce.glyphs[+Ke]=Ne[+Ke]);Ce.ranges[He]=!0}for(var it=0,pt=Ue;it1&&(q=d[++V]);var ue=Math.abs(re-q.left),Ee=Math.abs(re-q.right),Ce=Math.min(ue,Ee),Me=void 0,He=B/p*(b+1);if(q.isDash){var Ue=b-Math.abs(He);Me=Math.sqrt(Ce*Ce+Ue*Ue)}else Me=b-Math.sqrt(Ce*Ce+He*He);this.data[k+re]=Math.max(0,Math.min(255,Me+128))}},we.prototype.addRegularDash=function(d){for(var _=d.length-1;_>=0;--_){var p=d[_],b=d[_+1];p.zeroLength?d.splice(_,1):b&&b.isDash===p.isDash&&(b.left=p.left,d.splice(_,1))}var B=d[0],k=d[d.length-1];B.isDash===k.isDash&&(B.left=k.left-this.width,k.right=B.right+this.width);for(var V=this.width*this.nextRow,q=0,re=d[q],ue=0;ue1&&(re=d[++q]);var Ee=Math.abs(ue-re.left),Ce=Math.abs(ue-re.right),Me=Math.min(Ee,Ce);this.data[V+ue]=Math.max(0,Math.min(255,(re.isDash?Me:-Me)+128))}},we.prototype.addDash=function(d,_){var p=_?7:0,b=2*p+1;if(this.nextRow+b>this.height)return n.warnOnce("LineAtlas out of space"),null;for(var B=0,k=0;k=p&&d.x=b&&d.y0&&(ue[new n.OverscaledTileID(p.overscaledZ,V,b.z,k,b.y-1).key]={backfilled:!1},ue[new n.OverscaledTileID(p.overscaledZ,p.wrap,b.z,b.x,b.y-1).key]={backfilled:!1},ue[new n.OverscaledTileID(p.overscaledZ,re,b.z,q,b.y-1).key]={backfilled:!1}),b.y+10&&(B.resourceTiming=p._resourceTiming,p._resourceTiming=[]),p.fire(new n.Event("data",B))}})},_.prototype.onAdd=function(p){this.map=p,this.load()},_.prototype.setData=function(p){var b=this;return this._data=p,this.fire(new n.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(B){if(B)b.fire(new n.ErrorEvent(B));else{var k={dataType:"source",sourceDataType:"content"};b._collectResourceTiming&&b._resourceTiming&&b._resourceTiming.length>0&&(k.resourceTiming=b._resourceTiming,b._resourceTiming=[]),b.fire(new n.Event("data",k))}}),this},_.prototype.getClusterExpansionZoom=function(p,b){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:p,source:this.id},b),this},_.prototype.getClusterChildren=function(p,b){return this.actor.send("geojson.getClusterChildren",{clusterId:p,source:this.id},b),this},_.prototype.getClusterLeaves=function(p,b,B,k){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:p,limit:b,offset:B},k),this},_.prototype._updateWorkerData=function(p){var b=this;this._loaded=!1;var B=n.extend({},this.workerOptions),k=this._data;typeof k=="string"?(B.request=this.map._requestManager.transformRequest(n.browser.resolveURL(k),n.ResourceType.Source),B.request.collectResourceTiming=this._collectResourceTiming):B.data=JSON.stringify(k),this.actor.send(this.type+".loadData",B,function(V,q){b._removed||q&&q.abandoned||(b._loaded=!0,q&&q.resourceTiming&&q.resourceTiming[b.id]&&(b._resourceTiming=q.resourceTiming[b.id].slice(0)),b.actor.send(b.type+".coalesce",{source:B.source},null),p(V))})},_.prototype.loaded=function(){return this._loaded},_.prototype.loadTile=function(p,b){var B=this,k=p.actor?"reloadTile":"loadTile";p.actor=this.actor,p.request=this.actor.send(k,{type:this.type,uid:p.uid,tileID:p.tileID,zoom:p.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:n.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},function(V,q){return delete p.request,p.unloadVectorData(),p.aborted?b(null):V?b(V):(p.loadVectorData(q,B.map.painter,k==="reloadTile"),b(null))})},_.prototype.abortTile=function(p){p.request&&(p.request.cancel(),delete p.request),p.aborted=!0},_.prototype.unloadTile=function(p){p.unloadVectorData(),this.actor.send("removeTile",{uid:p.uid,type:this.type,source:this.id})},_.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},_.prototype.serialize=function(){return n.extend({},this._options,{type:this.type,data:this._data})},_.prototype.hasTransition=function(){return!1},_}(n.Evented),Er=n.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),Jr=function(d){function _(p,b,B,k){d.call(this),this.id=p,this.dispatcher=B,this.coordinates=b.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(k),this.options=b}return d&&(_.__proto__=d),(_.prototype=Object.create(d&&d.prototype)).constructor=_,_.prototype.load=function(p,b){var B=this;this._loaded=!1,this.fire(new n.Event("dataloading",{dataType:"source"})),this.url=this.options.url,n.getImage(this.map._requestManager.transformRequest(this.url,n.ResourceType.Image),function(k,V){B._loaded=!0,k?B.fire(new n.ErrorEvent(k)):V&&(B.image=V,p&&(B.coordinates=p),b&&b(),B._finishLoading())})},_.prototype.loaded=function(){return this._loaded},_.prototype.updateImage=function(p){var b=this;return this.image&&p.url?(this.options.url=p.url,this.load(p.coordinates,function(){b.texture=null}),this):this},_.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new n.Event("data",{dataType:"source",sourceDataType:"metadata"})))},_.prototype.onAdd=function(p){this.map=p,this.load()},_.prototype.setCoordinates=function(p){var b=this;this.coordinates=p;var B=p.map(n.MercatorCoordinate.fromLngLat);this.tileID=function(V){for(var q=1/0,re=1/0,ue=-1/0,Ee=-1/0,Ce=0,Me=V;Ceb.end(0)?this.fire(new n.ErrorEvent(new n.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+b.start(0)+" and "+b.end(0)+"-second mark."))):this.video.currentTime=p}},_.prototype.getVideo=function(){return this.video},_.prototype.onAdd=function(p){this.map||(this.map=p,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},_.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var p=this.map.painter.context,b=p.gl;for(var B in this.boundsBuffer||(this.boundsBuffer=p.createVertexBuffer(this._boundsArray,Er.members)),this.boundsSegments||(this.boundsSegments=n.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(b.LINEAR,b.CLAMP_TO_EDGE),b.texSubImage2D(b.TEXTURE_2D,0,0,0,b.RGBA,b.UNSIGNED_BYTE,this.video)):(this.texture=new n.Texture(p,this.video,b.RGBA),this.texture.bind(b.LINEAR,b.CLAMP_TO_EDGE)),this.tiles){var k=this.tiles[B];k.state!=="loaded"&&(k.state="loaded",k.texture=this.texture)}}},_.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},_.prototype.hasTransition=function(){return this.video&&!this.video.paused},_}(Jr),ai=function(d){function _(p,b,B,k){d.call(this,p,b,B,k),b.coordinates?Array.isArray(b.coordinates)&&b.coordinates.length===4&&!b.coordinates.some(function(V){return!Array.isArray(V)||V.length!==2||V.some(function(q){return typeof q!="number"})})||this.fire(new n.ErrorEvent(new n.ValidationError("sources."+p,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new n.ErrorEvent(new n.ValidationError("sources."+p,null,'missing required property "coordinates"'))),b.animate&&typeof b.animate!="boolean"&&this.fire(new n.ErrorEvent(new n.ValidationError("sources."+p,null,'optional "animate" property must be a boolean value'))),b.canvas?typeof b.canvas=="string"||b.canvas instanceof n.window.HTMLCanvasElement||this.fire(new n.ErrorEvent(new n.ValidationError("sources."+p,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new n.ErrorEvent(new n.ValidationError("sources."+p,null,'missing required property "canvas"'))),this.options=b,this.animate=b.animate===void 0||b.animate}return d&&(_.__proto__=d),(_.prototype=Object.create(d&&d.prototype)).constructor=_,_.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof n.window.HTMLCanvasElement?this.options.canvas:n.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new n.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},_.prototype.getCanvas=function(){return this.canvas},_.prototype.onAdd=function(p){this.map=p,this.load(),this.canvas&&this.animate&&this.play()},_.prototype.onRemove=function(){this.pause()},_.prototype.prepare=function(){var p=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,p=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,p=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var b=this.map.painter.context,B=b.gl;for(var k in this.boundsBuffer||(this.boundsBuffer=b.createVertexBuffer(this._boundsArray,Er.members)),this.boundsSegments||(this.boundsSegments=n.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(p||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new n.Texture(b,this.canvas,B.RGBA,{premultiply:!0}),this.tiles){var V=this.tiles[k];V.state!=="loaded"&&(V.state="loaded",V.texture=this.texture)}}},_.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},_.prototype.hasTransition=function(){return this._playing},_.prototype._hasInvalidDimensions=function(){for(var p=0,b=[this.canvas.width,this.canvas.height];pthis.max){var V=this._getAndRemoveByKey(this.order[0]);V&&this.onRemove(V)}return this},be.prototype.has=function(d){return d.wrapped().key in this.data},be.prototype.getAndRemove=function(d){return this.has(d)?this._getAndRemoveByKey(d.wrapped().key):null},be.prototype._getAndRemoveByKey=function(d){var _=this.data[d].shift();return _.timeout&&clearTimeout(_.timeout),this.data[d].length===0&&delete this.data[d],this.order.splice(this.order.indexOf(d),1),_.value},be.prototype.getByKey=function(d){var _=this.data[d];return _?_[0].value:null},be.prototype.get=function(d){return this.has(d)?this.data[d.wrapped().key][0].value:null},be.prototype.remove=function(d,_){if(!this.has(d))return this;var p=d.wrapped().key,b=_===void 0?0:this.data[p].indexOf(_),B=this.data[p][b];return this.data[p].splice(b,1),B.timeout&&clearTimeout(B.timeout),this.data[p].length===0&&delete this.data[p],this.onRemove(B.value),this.order.splice(this.order.indexOf(p),1),this},be.prototype.setMaxSize=function(d){for(this.max=d;this.order.length>this.max;){var _=this._getAndRemoveByKey(this.order[0]);_&&this.onRemove(_)}return this},be.prototype.filter=function(d){var _=[];for(var p in this.data)for(var b=0,B=this.data[p];b1||(Math.abs(Ee)>1&&(Math.abs(Ee+Me)===1?Ee+=Me:Math.abs(Ee-Me)===1&&(Ee-=Me)),ue.dem&&re.dem&&(re.dem.backfillBorder(ue.dem,Ee,Ce),re.neighboringTiles&&re.neighboringTiles[He]&&(re.neighboringTiles[He].backfilled=!0)))}},_.prototype.getTile=function(p){return this.getTileByID(p.key)},_.prototype.getTileByID=function(p){return this._tiles[p]},_.prototype._retainLoadedChildren=function(p,b,B,k){for(var V in this._tiles){var q=this._tiles[V];if(!(k[V]||!q.hasData()||q.tileID.overscaledZ<=b||q.tileID.overscaledZ>B)){for(var re=q.tileID;q&&q.tileID.overscaledZ>b+1;){var ue=q.tileID.scaledTo(q.tileID.overscaledZ-1);(q=this._tiles[ue.key])&&q.hasData()&&(re=ue)}for(var Ee=re;Ee.overscaledZ>b;)if(p[(Ee=Ee.scaledTo(Ee.overscaledZ-1)).key]){k[re.key]=re;break}}}},_.prototype.findLoadedParent=function(p,b){if(p.key in this._loadedParentTiles){var B=this._loadedParentTiles[p.key];return B&&B.tileID.overscaledZ>=b?B:null}for(var k=p.overscaledZ-1;k>=b;k--){var V=p.scaledTo(k),q=this._getLoadedTile(V);if(q)return q}},_.prototype._getLoadedTile=function(p){var b=this._tiles[p.key];return b&&b.hasData()?b:this._cache.getByKey(p.wrapped().key)},_.prototype.updateCacheSize=function(p){var b=Math.ceil(p.width/this._source.tileSize)+1,B=Math.ceil(p.height/this._source.tileSize)+1,k=Math.floor(b*B*5),V=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,k):k;this._cache.setMaxSize(V)},_.prototype.handleWrapJump=function(p){var b=Math.round((p-(this._prevLng===void 0?p:this._prevLng))/360);if(this._prevLng=p,b){var B={};for(var k in this._tiles){var V=this._tiles[k];V.tileID=V.tileID.unwrapTo(V.tileID.wrap+b),B[V.tileID.key]=V}for(var q in this._tiles=B,this._timers)clearTimeout(this._timers[q]),delete this._timers[q];for(var re in this._tiles)this._setTileReloadTimer(re,this._tiles[re])}},_.prototype.update=function(p){var b=this;if(this.transform=p,this._sourceLoaded&&!this._paused){var B;this.updateCacheSize(p),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?B=p.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Wt){return new n.OverscaledTileID(Wt.canonical.z,Wt.wrap,Wt.canonical.z,Wt.canonical.x,Wt.canonical.y)}):(B=p.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(B=B.filter(function(Wt){return b._source.hasTile(Wt)}))):B=[];var k=p.coveringZoomLevel(this._source),V=Math.max(k-_.maxOverzooming,this._source.minzoom),q=Math.max(k+_.maxUnderzooming,this._source.minzoom),re=this._updateRetainedTiles(B,k);if(Ht(this._source.type)){for(var ue={},Ee={},Ce=0,Me=Object.keys(re);Cethis._source.maxzoom){var Ke=Ze.children(this._source.maxzoom)[0],it=this.getTile(Ke);if(it&&it.hasData()){B[Ke.key]=Ke;continue}}else{var pt=Ze.children(this._source.maxzoom);if(B[pt[0].key]&&B[pt[1].key]&&B[pt[2].key]&&B[pt[3].key])continue}for(var Ct=Ne.wasRequested(),xt=Ze.overscaledZ-1;xt>=V;--xt){var Rt=Ze.scaledTo(xt);if(k[Rt.key]||(k[Rt.key]=!0,!(Ne=this.getTile(Rt))&&Ct&&(Ne=this._addTile(Rt)),Ne&&(B[Rt.key]=Rt,Ct=Ne.wasRequested(),Ne.hasData())))break}}}return B},_.prototype._updateLoadedParentTileCache=function(){for(var p in this._loadedParentTiles={},this._tiles){for(var b=[],B=void 0,k=this._tiles[p].tileID;k.overscaledZ>0;){if(k.key in this._loadedParentTiles){B=this._loadedParentTiles[k.key];break}b.push(k.key);var V=k.scaledTo(k.overscaledZ-1);if(B=this._getLoadedTile(V))break;k=V}for(var q=0,re=b;q0||(b.hasData()&&b.state!=="reloading"?this._cache.add(b.tileID,b,b.getExpiryTimeout()):(b.aborted=!0,this._abortTile(b),this._unloadTile(b))))},_.prototype.clearTiles=function(){for(var p in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(p);this._cache.reset()},_.prototype.tilesIn=function(p,b,B){var k=this,V=[],q=this.transform;if(!q)return V;for(var re=B?q.getCameraQueryGeometry(p):p,ue=p.map(function(xt){return q.pointCoordinate(xt)}),Ee=re.map(function(xt){return q.pointCoordinate(xt)}),Ce=this.getIds(),Me=1/0,He=1/0,Ue=-1/0,Ze=-1/0,Ne=0,Ke=Ee;Ne=0&&Ir[1].y+ir>=0){var ti=ue.map(function(ii){return Wt.getTilePoint(ii)}),oi=Ee.map(function(ii){return Wt.getTilePoint(ii)});V.push({tile:Rt,tileID:Wt,queryGeometry:ti,cameraQueryGeometry:oi,scale:ar})}}},Ct=0;Ct=n.browser.now())return!0}return!1},_.prototype.setFeatureState=function(p,b,B){this._state.updateState(p=p||"_geojsonTileLayer",b,B)},_.prototype.removeFeatureState=function(p,b,B){this._state.removeFeatureState(p=p||"_geojsonTileLayer",b,B)},_.prototype.getFeatureState=function(p,b){return this._state.getState(p=p||"_geojsonTileLayer",b)},_.prototype.setDependencies=function(p,b,B){var k=this._tiles[p];k&&k.setDependencies(b,B)},_.prototype.reloadTilesForDependencies=function(p,b){for(var B in this._tiles)this._tiles[B].hasDependency(p,b)&&this._reloadTile(B,"reloading");this._cache.filter(function(k){return!k.hasDependency(p,b)})},_}(n.Evented);function ht(d,_){var p=Math.abs(2*d.wrap)-+(d.wrap<0),b=Math.abs(2*_.wrap)-+(_.wrap<0);return d.overscaledZ-_.overscaledZ||b-p||_.canonical.y-d.canonical.y||_.canonical.x-d.canonical.x}function Ht(d){return d==="raster"||d==="image"||d==="video"}function Zt(){return new n.window.Worker(yu.workerUrl)}Ge.maxOverzooming=10,Ge.maxUnderzooming=3;var Pt="mapboxgl_preloaded_worker_pool",Xt=function(){this.active={}};Xt.prototype.acquire=function(d){if(!this.workers)for(this.workers=[];this.workers.length0?(b-k)/V:0;return this.points[B].mult(1-q).add(this.points[_].mult(q))};var $i=function(d,_,p){var b=this.boxCells=[],B=this.circleCells=[];this.xCellCount=Math.ceil(d/p),this.yCellCount=Math.ceil(_/p);for(var k=0;k=-_[0]&&p<=_[0]&&b>=-_[1]&&b<=_[1]}function fc(d,_,p,b,B,k,V,q){var re=b?d.textSizeData:d.iconSizeData,ue=n.evaluateSizeForZoom(re,p.transform.zoom),Ee=[256/p.width*2+1,256/p.height*2+1],Ce=b?d.text.dynamicLayoutVertexArray:d.icon.dynamicLayoutVertexArray;Ce.clear();for(var Me=d.lineVertexArray,He=b?d.text.placedSymbolArray:d.icon.placedSymbolArray,Ue=p.transform.width/p.transform.height,Ze=!1,Ne=0;NeMath.abs(p.x-_.x)*b?{useVertical:!0}:(d===n.WritingMode.vertical?_.yp.x)?{needsFlipping:!0}:null}function zs(d,_,p,b,B,k,V,q,re,ue,Ee,Ce,Me,He){var Ue,Ze=_/24,Ne=d.lineOffsetX*Ze,Ke=d.lineOffsetY*Ze;if(d.numGlyphs>1){var it=d.glyphStartIndex+d.numGlyphs,pt=d.lineStartIndex,Ct=d.lineStartIndex+d.lineLength,xt=ko(Ze,q,Ne,Ke,p,Ee,Ce,d,re,k,Me);if(!xt)return{notEnoughRoom:!0};var Rt=Si(xt.first.point,V).point,Wt=Si(xt.last.point,V).point;if(b&&!p){var ar=Yo(d.writingMode,Rt,Wt,He);if(ar)return ar}Ue=[xt.first];for(var ir=d.glyphStartIndex+1;ir0?ii.point:Uo(Ce,oi,Ir,1,B),Or=Yo(d.writingMode,Ir,hn,He);if(Or)return Or}var yi=zn(Ze*q.getoffsetX(d.glyphStartIndex),Ne,Ke,p,Ee,Ce,d.segment,d.lineStartIndex,d.lineStartIndex+d.lineLength,re,k,Me);if(!yi)return{notEnoughRoom:!0};Ue=[yi]}for(var vi=0,di=Ue;vi0?1:-1,Ue=0;b&&(He*=-1,Ue=Math.PI),He<0&&(Ue+=Math.PI);for(var Ze=He>0?q+V:q+V+1,Ne=B,Ke=B,it=0,pt=0,Ct=Math.abs(Me),xt=[];it+pt<=Ct;){if((Ze+=He)=re)return null;if(Ke=Ne,xt.push(Ne),(Ne=Ce[Ze])===void 0){var Rt=new n.Point(ue.getx(Ze),ue.gety(Ze)),Wt=Si(Rt,Ee);if(Wt.signedDistanceFromCamera>0)Ne=Ce[Ze]=Wt.point;else{var ar=Ze-He;Ne=Uo(it===0?k:new n.Point(ue.getx(ar),ue.gety(ar)),Rt,Ke,Ct-it+1,Ee)}}it+=pt,pt=Ke.dist(Ne)}var ir=(Ct-it)/pt,Ir=Ne.sub(Ke),ti=Ir.mult(ir)._add(Ke);ti._add(Ir._unit()._perp()._mult(p*He));var oi=Ue+Math.atan2(Ne.y-Ke.y,Ne.x-Ke.x);return xt.push(ti),{point:ti,angle:oi,path:xt}}$i.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},$i.prototype.insert=function(d,_,p,b,B){this._forEachCell(_,p,b,B,this._insertBoxCell,this.boxUid++),this.boxKeys.push(d),this.bboxes.push(_),this.bboxes.push(p),this.bboxes.push(b),this.bboxes.push(B)},$i.prototype.insertCircle=function(d,_,p,b){this._forEachCell(_-b,p-b,_+b,p+b,this._insertCircleCell,this.circleUid++),this.circleKeys.push(d),this.circles.push(_),this.circles.push(p),this.circles.push(b)},$i.prototype._insertBoxCell=function(d,_,p,b,B,k){this.boxCells[B].push(k)},$i.prototype._insertCircleCell=function(d,_,p,b,B,k){this.circleCells[B].push(k)},$i.prototype._query=function(d,_,p,b,B,k){if(p<0||d>this.width||b<0||_>this.height)return!B&&[];var V=[];if(d<=0&&_<=0&&this.width<=p&&this.height<=b){if(B)return!0;for(var q=0;q0:V},$i.prototype._queryCircle=function(d,_,p,b,B){var k=d-p,V=d+p,q=_-p,re=_+p;if(V<0||k>this.width||re<0||q>this.height)return!b&&[];var ue=[];return this._forEachCell(k,q,V,re,this._queryCellCircle,ue,{hitTest:b,circle:{x:d,y:_,radius:p},seenUids:{box:{},circle:{}}},B),b?ue.length>0:ue},$i.prototype.query=function(d,_,p,b,B){return this._query(d,_,p,b,!1,B)},$i.prototype.hitTest=function(d,_,p,b,B){return this._query(d,_,p,b,!0,B)},$i.prototype.hitTestCircle=function(d,_,p,b){return this._queryCircle(d,_,p,!0,b)},$i.prototype._queryCell=function(d,_,p,b,B,k,V,q){var re=V.seenUids,ue=this.boxCells[B];if(ue!==null)for(var Ee=this.bboxes,Ce=0,Me=ue;Ce=Ee[Ue+0]&&b>=Ee[Ue+1]&&(!q||q(this.boxKeys[He]))){if(V.hitTest)return k.push(!0),!0;k.push({key:this.boxKeys[He],x1:Ee[Ue],y1:Ee[Ue+1],x2:Ee[Ue+2],y2:Ee[Ue+3]})}}}var Ze=this.circleCells[B];if(Ze!==null)for(var Ne=this.circles,Ke=0,it=Ze;KeV*V+q*q},$i.prototype._circleAndRectCollide=function(d,_,p,b,B,k,V){var q=(k-b)/2,re=Math.abs(d-(b+q));if(re>q+p)return!1;var ue=(V-B)/2,Ee=Math.abs(_-(B+ue));if(Ee>ue+p)return!1;if(re<=q||Ee<=ue)return!0;var Ce=re-q,Me=Ee-ue;return Ce*Ce+Me*Me<=p*p};var ll=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function cs(d,_){for(var p=0;p=1;hn--)ii.push(ti.path[hn]);for(var Or=1;Or0){for(var pi=ii[0].clone(),Pi=ii[0].clone(),hi=1;hi=ar.x&&Pi.x<=ir.x&&pi.y>=ar.y&&Pi.y<=ir.y?[ii]:Pi.xir.x||Pi.yir.y?[]:n.clipLine([ii],ar.x,ar.y,ir.x,ir.y)}for(var li=0,bs=di;li=this.screenRightBoundary||b<100||_>this.screenBottomBoundary},ys.prototype.isInsideGrid=function(d,_,p,b){return p>=0&&d=0&&_0?(this.prevPlacement&&this.prevPlacement.variableOffsets[Ce.crossTileID]&&this.prevPlacement.placements[Ce.crossTileID]&&this.prevPlacement.placements[Ce.crossTileID].text&&(Ze=this.prevPlacement.variableOffsets[Ce.crossTileID].anchor),this.variableOffsets[Ce.crossTileID]={textOffset:Ne,width:p,height:b,anchor:d,textBoxScale:B,prevAnchor:Ze},this.markUsedJustification(Me,d,Ce,He),Me.allowVerticalPlacement&&(this.markUsedOrientation(Me,He,Ce),this.placedOrientations[Ce.crossTileID]=He),{shift:Ke,placedGlyphBoxes:it}):void 0},Je.prototype.placeLayerBucketPart=function(d,_,p){var b=this,B=d.parameters,k=B.bucket,V=B.layout,q=B.posMatrix,re=B.textLabelPlaneMatrix,ue=B.labelToScreenMatrix,Ee=B.textPixelRatio,Ce=B.holdingForFade,Me=B.collisionBoxArray,He=B.partiallyEvaluatedTextSize,Ue=B.collisionGroup,Ze=V.get("text-optional"),Ne=V.get("icon-optional"),Ke=V.get("text-allow-overlap"),it=V.get("icon-allow-overlap"),pt=V.get("text-rotation-alignment")==="map",Ct=V.get("text-pitch-alignment")==="map",xt=V.get("icon-text-fit")!=="none",Rt=V.get("symbol-z-order")==="viewport-y",Wt=Ke&&(it||!k.hasIconData()||Ne),ar=it&&(Ke||!k.hasTextData()||Ze);!k.collisionArrays&&Me&&k.deserializeCollisionBoxes(Me);var ir=function(Or,yi){if(!_[Or.crossTileID])if(Ce)b.placements[Or.crossTileID]=new Qu(!1,!1,!1);else{var vi,di=!1,pi=!1,Pi=!0,hi=null,li={box:null,offscreen:null},bs={box:null,offscreen:null},Yn=null,Ws=null,ws=0,Io=0,Jo=0;yi.textFeatureIndex?ws=yi.textFeatureIndex:Or.useRuntimeCollisionCircles&&(ws=Or.featureIndex),yi.verticalTextFeatureIndex&&(Io=yi.verticalTextFeatureIndex);var Wa=yi.textBox;if(Wa){var pa=function(Cn){var qa=n.WritingMode.horizontal;if(k.allowVerticalPlacement&&!Cn&&b.prevPlacement){var Aa=b.prevPlacement.placedOrientations[Or.crossTileID];Aa&&(b.placedOrientations[Or.crossTileID]=Aa,b.markUsedOrientation(k,qa=Aa,Or))}return qa},vu=function(Cn,qa){if(k.allowVerticalPlacement&&Or.numVerticalGlyphVertices>0&&yi.verticalTextBox)for(var Aa=0,wu=k.writingModes;Aa0&&(Ia=Ia.filter(function(Cn){return Cn!==Kl.anchor})).unshift(Kl.anchor)}var Bl=function(Cn,qa,Aa){for(var wu=Cn.x2-Cn.x1,Kg=Cn.y2-Cn.y1,dp=Or.textBoxScale,hv=xt&&!it?qa:null,nd={box:[],offscreen:!1},Zg=Ke?2*Ia.length:Ia.length,sh=0;sh=Ia.length,Or,k,Aa,hv);if(Zl&&(nd=Zl.placedGlyphBoxes)&&nd.box&&nd.box.length){di=!0,hi=Zl.shift;break}}return nd};vu(function(){return Bl(Wa,yi.iconBox,n.WritingMode.horizontal)},function(){var Cn=yi.verticalTextBox;return k.allowVerticalPlacement&&!(li&&li.box&&li.box.length)&&Or.numVerticalGlyphVertices>0&&Cn?Bl(Cn,yi.verticalIconBox,n.WritingMode.vertical):{box:null,offscreen:null}}),li&&(di=li.box,Pi=li.offscreen);var rd=pa(li&&li.box);if(!di&&b.prevPlacement){var nh=b.prevPlacement.variableOffsets[Or.crossTileID];nh&&(b.variableOffsets[Or.crossTileID]=nh,b.markUsedJustification(k,nh.anchor,Or,rd))}}else{var xu=function(Cn,qa){var Aa=b.collisionIndex.placeCollisionBox(Cn,Ke,Ee,q,Ue.predicate);return Aa&&Aa.box&&Aa.box.length&&(b.markUsedOrientation(k,qa,Or),b.placedOrientations[Or.crossTileID]=qa),Aa};vu(function(){return xu(Wa,n.WritingMode.horizontal)},function(){var Cn=yi.verticalTextBox;return k.allowVerticalPlacement&&Or.numVerticalGlyphVertices>0&&Cn?xu(Cn,n.WritingMode.vertical):{box:null,offscreen:null}}),pa(li&&li.box&&li.box.length)}}if(di=(vi=li)&&vi.box&&vi.box.length>0,Pi=vi&&vi.offscreen,Or.useRuntimeCollisionCircles){var uf=k.text.placedSymbolArray.get(Or.centerJustifiedTextSymbolIndex),oh=n.evaluateSizeForFeature(k.textSizeData,He,uf),ro=V.get("text-padding");Yn=b.collisionIndex.placeCollisionCircles(Ke,uf,k.lineVertexArray,k.glyphOffsetArray,oh,q,re,ue,p,Ct,Ue.predicate,Or.collisionCircleDiameter,ro),di=Ke||Yn.circles.length>0&&!Yn.collisionDetected,Pi=Pi&&Yn.offscreen}if(yi.iconFeatureIndex&&(Jo=yi.iconFeatureIndex),yi.iconBox){var id=function(Cn){var qa=xt&&hi?Be(Cn,hi.x,hi.y,pt,Ct,b.transform.angle):Cn;return b.collisionIndex.placeCollisionBox(qa,it,Ee,q,Ue.predicate)};pi=bs&&bs.box&&bs.box.length&&yi.verticalIconBox?(Ws=id(yi.verticalIconBox)).box.length>0:(Ws=id(yi.iconBox)).box.length>0,Pi=Pi&&Ws.offscreen}var gc=Ze||Or.numHorizontalGlyphVertices===0&&Or.numVerticalGlyphVertices===0,Ho=Ne||Or.numIconVertices===0;if(gc||Ho?Ho?gc||(pi=pi&&di):di=pi&&di:pi=di=pi&&di,di&&vi&&vi.box&&b.collisionIndex.insertCollisionBox(vi.box,V.get("text-ignore-placement"),k.bucketInstanceId,bs&&bs.box&&Io?Io:ws,Ue.ID),pi&&Ws&&b.collisionIndex.insertCollisionBox(Ws.box,V.get("icon-ignore-placement"),k.bucketInstanceId,Jo,Ue.ID),Yn&&(di&&b.collisionIndex.insertCollisionCircles(Yn.circles,V.get("text-ignore-placement"),k.bucketInstanceId,ws,Ue.ID),p)){var Ts=k.bucketInstanceId,bu=b.collisionCircleArrays[Ts];bu===void 0&&(bu=b.collisionCircleArrays[Ts]=new ua);for(var ff=0;ff=0;--ti){var oi=Ir[ti];ir(k.symbolInstances.get(oi),k.collisionArrays[oi])}else for(var ii=d.symbolInstanceStart;ii=0&&(d.text.placedSymbolArray.get(q).crossTileID=B>=0&&q!==B?0:p.crossTileID)}},Je.prototype.markUsedOrientation=function(d,_,p){for(var b=_===n.WritingMode.horizontal||_===n.WritingMode.horizontalOnly?_:0,B=_===n.WritingMode.vertical?_:0,k=0,V=[p.leftJustifiedTextSymbolIndex,p.centerJustifiedTextSymbolIndex,p.rightJustifiedTextSymbolIndex];k0,ar=b.placedOrientations[it.crossTileID],ir=ar===n.WritingMode.vertical,Ir=ar===n.WritingMode.horizontal||ar===n.WritingMode.horizontalOnly;if(pt>0||Ct>0){var ti=np(Rt.text);He(d.text,pt,ir?$u:ti),He(d.text,Ct,Ir?$u:ti);var oi=Rt.text.isHidden();[it.rightJustifiedTextSymbolIndex,it.centerJustifiedTextSymbolIndex,it.leftJustifiedTextSymbolIndex].forEach(function(li){li>=0&&(d.text.placedSymbolArray.get(li).hidden=oi||ir?1:0)}),it.verticalPlacedTextSymbolIndex>=0&&(d.text.placedSymbolArray.get(it.verticalPlacedTextSymbolIndex).hidden=oi||Ir?1:0);var ii=b.variableOffsets[it.crossTileID];ii&&b.markUsedJustification(d,ii.anchor,it,ar);var hn=b.placedOrientations[it.crossTileID];hn&&(b.markUsedJustification(d,"left",it,hn),b.markUsedOrientation(d,hn,it))}if(Wt){var Or=np(Rt.icon),yi=!(Ce&&it.verticalPlacedIconSymbolIndex&&ir);it.placedIconSymbolIndex>=0&&(He(d.icon,it.numIconVertices,yi?Or:$u),d.icon.placedSymbolArray.get(it.placedIconSymbolIndex).hidden=Rt.icon.isHidden()),it.verticalPlacedIconSymbolIndex>=0&&(He(d.icon,it.numVerticalIconVertices,yi?$u:Or),d.icon.placedSymbolArray.get(it.verticalPlacedIconSymbolIndex).hidden=Rt.icon.isHidden())}if(d.hasIconCollisionBoxData()||d.hasTextCollisionBoxData()){var vi=d.collisionArrays[Ke];if(vi){var di=new n.Point(0,0);if(vi.textBox||vi.verticalTextBox){var pi=!0;if(re){var Pi=b.variableOffsets[xt];Pi?(di=xe(Pi.anchor,Pi.width,Pi.height,Pi.textOffset,Pi.textBoxScale),ue&&di._rotate(Ee?b.transform.angle:-b.transform.angle)):pi=!1}vi.textBox&&vt(d.textCollisionBox.collisionVertexArray,Rt.text.placed,!pi||ir,di.x,di.y),vi.verticalTextBox&&vt(d.textCollisionBox.collisionVertexArray,Rt.text.placed,!pi||Ir,di.x,di.y)}var hi=Boolean(!Ir&&vi.verticalIconBox);vi.iconBox&&vt(d.iconCollisionBox.collisionVertexArray,Rt.icon.placed,hi,Ce?di.x:0,Ce?di.y:0),vi.verticalIconBox&&vt(d.iconCollisionBox.collisionVertexArray,Rt.icon.placed,!hi,Ce?di.x:0,Ce?di.y:0)}}},Ze=0;Zed},Je.prototype.setStale=function(){this.stale=!0};var tr=Math.pow(2,25),qr=Math.pow(2,24),sn=Math.pow(2,17),Co=Math.pow(2,16),ts=Math.pow(2,9),vs=Math.pow(2,8),Sa=Math.pow(2,1);function np(d){if(d.opacity===0&&!d.placed)return 0;if(d.opacity===1&&d.placed)return 4294967295;var _=d.placed?1:0,p=Math.floor(127*d.opacity);return p*tr+_*qr+p*sn+_*Co+p*ts+_*vs+p*Sa+_}var $u=0,Wh=function(d){this._sortAcrossTiles=d.layout.get("symbol-z-order")!=="viewport-y"&&d.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Wh.prototype.continuePlacement=function(d,_,p,b,B){for(var k=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var V=_[d[this._currentPlacementIndex]],q=this.placement.collisionIndex.transform.zoom;if(V.type==="symbol"&&(!V.minzoom||V.minzoom<=q)&&(!V.maxzoom||V.maxzoom>q)){if(this._inProgressLayer||(this._inProgressLayer=new Wh(V)),this._inProgressLayer.continuePlacement(p[V.source],this.placement,this._showCollisionBoxes,V,k))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Wf.prototype.commit=function(d){return this.placement.commit(d),this.placement};var RA=512/n.EXTENT/2,ef=function(d,_,p){this.tileID=d,this.indexedSymbolInstances={},this.bucketInstanceId=p;for(var b=0;b<_.length;b++){var B=_.get(b),k=B.key;this.indexedSymbolInstances[k]||(this.indexedSymbolInstances[k]=[]),this.indexedSymbolInstances[k].push({crossTileID:B.crossTileID,coord:this.getScaledCoordinates(B,d)})}};ef.prototype.getScaledCoordinates=function(d,_){var p=RA/Math.pow(2,_.canonical.z-this.tileID.canonical.z);return{x:Math.floor((_.canonical.x*n.EXTENT+d.anchorX)*p),y:Math.floor((_.canonical.y*n.EXTENT+d.anchorY)*p)}},ef.prototype.findMatches=function(d,_,p){for(var b=this.tileID.canonical.z<_.canonical.z?1:Math.pow(2,this.tileID.canonical.z-_.canonical.z),B=0;Bd.overscaledZ)for(var q in V){var re=V[q];re.tileID.isChildOf(d)&&re.findMatches(_.symbolInstances,d,B)}else{var ue=V[d.scaledTo(Number(k)).key];ue&&ue.findMatches(_.symbolInstances,d,B)}}for(var Ee=0;Ee<_.symbolInstances.length;Ee++){var Ce=_.symbolInstances.get(Ee);Ce.crossTileID||(Ce.crossTileID=p.generate(),B[Ce.crossTileID]=!0)}return this.indexes[d.overscaledZ]===void 0&&(this.indexes[d.overscaledZ]={}),this.indexes[d.overscaledZ][d.key]=new ef(d,_.symbolInstances,_.bucketInstanceId),!0},Nc.prototype.removeBucketCrossTileIDs=function(d,_){for(var p in _.indexedSymbolInstances)for(var b=0,B=_.indexedSymbolInstances[p];b1?"@2x":"",Ce=n.getJSON(k.transformRequest(k.normalizeSpriteURL(B,Ee,".json"),n.ResourceType.SpriteJSON),function(Ue,Ze){Ce=null,ue||(ue=Ue,q=Ze,He())}),Me=n.getImage(k.transformRequest(k.normalizeSpriteURL(B,Ee,".png"),n.ResourceType.SpriteImage),function(Ue,Ze){Me=null,ue||(ue=Ue,re=Ze,He())});function He(){if(ue)V(ue);else if(q&&re){var Ue=n.browser.getImageData(re),Ze={};for(var Ne in q){var Ke=q[Ne],it=Ke.width,pt=Ke.height,Ct=Ke.x,xt=Ke.y,Rt=Ke.sdf,Wt=Ke.pixelRatio,ar=Ke.stretchX,ir=Ke.stretchY,Ir=Ke.content,ti=new n.RGBAImage({width:it,height:pt});n.RGBAImage.copy(Ue,ti,{x:Ct,y:xt},{x:0,y:0},{width:it,height:pt}),Ze[Ne]={data:ti,pixelRatio:Wt,sdf:Rt,stretchX:ar,stretchY:ir,content:Ir}}V(null,Ze)}}return{cancel:function(){Ce&&(Ce.cancel(),Ce=null),Me&&(Me.cancel(),Me=null)}}}(p,this.map._requestManager,function(B,k){if(b._spriteRequest=null,B)b.fire(new n.ErrorEvent(B));else if(k)for(var V in k)b.imageManager.addImage(V,k[V]);b.imageManager.setLoaded(!0),b._availableImages=b.imageManager.listImages(),b.dispatcher.broadcast("setImages",b._availableImages),b.fire(new n.Event("data",{dataType:"style"}))})},_.prototype._validateLayer=function(p){var b=this.sourceCaches[p.source];if(b){var B=p.sourceLayer;if(B){var k=b.getSource();(k.type==="geojson"||k.vectorLayerIds&&k.vectorLayerIds.indexOf(B)===-1)&&this.fire(new n.ErrorEvent(new Error('Source layer "'+B+'" does not exist on source "'+k.id+'" as specified by style layer "'+p.id+'"')))}}},_.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var p in this.sourceCaches)if(!this.sourceCaches[p].loaded())return!1;return!!this.imageManager.isLoaded()},_.prototype._serializeLayers=function(p){for(var b=[],B=0,k=p;B0)throw new Error("Unimplemented: "+k.map(function(V){return V.command}).join(", ")+".");return B.forEach(function(V){V.command!=="setTransition"&&b[V.command].apply(b,V.args)}),this.stylesheet=p,!0},_.prototype.addImage=function(p,b){if(this.getImage(p))return this.fire(new n.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(p,b),this._afterImageUpdated(p)},_.prototype.updateImage=function(p,b){this.imageManager.updateImage(p,b)},_.prototype.getImage=function(p){return this.imageManager.getImage(p)},_.prototype.removeImage=function(p){if(!this.getImage(p))return this.fire(new n.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(p),this._afterImageUpdated(p)},_.prototype._afterImageUpdated=function(p){this._availableImages=this.imageManager.listImages(),this._changedImages[p]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new n.Event("data",{dataType:"style"}))},_.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},_.prototype.addSource=function(p,b,B){var k=this;if(B===void 0&&(B={}),this._checkLoaded(),this.sourceCaches[p]!==void 0)throw new Error("There is already a source with this ID");if(!b.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(b).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(b.type)>=0&&this._validate(n.validateStyle.source,"sources."+p,b,null,B))){this.map&&this.map._collectResourceTiming&&(b.collectResourceTiming=!0);var V=this.sourceCaches[p]=new Ge(p,b,this.dispatcher);V.style=this,V.setEventedParent(this,function(){return{isSourceLoaded:k.loaded(),source:V.serialize(),sourceId:p}}),V.onAdd(this.map),this._changed=!0}},_.prototype.removeSource=function(p){if(this._checkLoaded(),this.sourceCaches[p]===void 0)throw new Error("There is no source with this ID");for(var b in this._layers)if(this._layers[b].source===p)return this.fire(new n.ErrorEvent(new Error('Source "'+p+'" cannot be removed while layer "'+b+'" is using it.')));var B=this.sourceCaches[p];delete this.sourceCaches[p],delete this._updatedSources[p],B.fire(new n.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:p})),B.setEventedParent(null),B.clearTiles(),B.onRemove&&B.onRemove(this.map),this._changed=!0},_.prototype.setGeoJSONSourceData=function(p,b){this._checkLoaded(),this.sourceCaches[p].getSource().setData(b),this._changed=!0},_.prototype.getSource=function(p){return this.sourceCaches[p]&&this.sourceCaches[p].getSource()},_.prototype.addLayer=function(p,b,B){B===void 0&&(B={}),this._checkLoaded();var k=p.id;if(this.getLayer(k))this.fire(new n.ErrorEvent(new Error('Layer with id "'+k+'" already exists on this map')));else{var V;if(p.type==="custom"){if(cu(this,n.validateCustomStyleLayer(p)))return;V=n.createStyleLayer(p)}else{if(typeof p.source=="object"&&(this.addSource(k,p.source),p=n.clone$1(p),p=n.extend(p,{source:k})),this._validate(n.validateStyle.layer,"layers."+k,p,{arrayIndex:-1},B))return;V=n.createStyleLayer(p),this._validateLayer(V),V.setEventedParent(this,{layer:{id:k}}),this._serializedLayers[V.id]=V.serialize()}var q=b?this._order.indexOf(b):this._order.length;if(b&&q===-1)this.fire(new n.ErrorEvent(new Error('Layer with id "'+b+'" does not exist on this map.')));else{if(this._order.splice(q,0,k),this._layerOrderChanged=!0,this._layers[k]=V,this._removedLayers[k]&&V.source&&V.type!=="custom"){var re=this._removedLayers[k];delete this._removedLayers[k],re.type!==V.type?this._updatedSources[V.source]="clear":(this._updatedSources[V.source]="reload",this.sourceCaches[V.source].pause())}this._updateLayer(V),V.onAdd&&V.onAdd(this.map)}}},_.prototype.moveLayer=function(p,b){if(this._checkLoaded(),this._changed=!0,this._layers[p]){if(p!==b){var B=this._order.indexOf(p);this._order.splice(B,1);var k=b?this._order.indexOf(b):this._order.length;b&&k===-1?this.fire(new n.ErrorEvent(new Error('Layer with id "'+b+'" does not exist on this map.'))):(this._order.splice(k,0,p),this._layerOrderChanged=!0)}}else this.fire(new n.ErrorEvent(new Error("The layer '"+p+"' does not exist in the map's style and cannot be moved.")))},_.prototype.removeLayer=function(p){this._checkLoaded();var b=this._layers[p];if(b){b.setEventedParent(null);var B=this._order.indexOf(p);this._order.splice(B,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[p]=b,delete this._layers[p],delete this._serializedLayers[p],delete this._updatedLayers[p],delete this._updatedPaintProps[p],b.onRemove&&b.onRemove(this.map)}else this.fire(new n.ErrorEvent(new Error("The layer '"+p+"' does not exist in the map's style and cannot be removed.")))},_.prototype.getLayer=function(p){return this._layers[p]},_.prototype.hasLayer=function(p){return p in this._layers},_.prototype.setLayerZoomRange=function(p,b,B){this._checkLoaded();var k=this.getLayer(p);k?k.minzoom===b&&k.maxzoom===B||(b!=null&&(k.minzoom=b),B!=null&&(k.maxzoom=B),this._updateLayer(k)):this.fire(new n.ErrorEvent(new Error("The layer '"+p+"' does not exist in the map's style and cannot have zoom extent.")))},_.prototype.setFilter=function(p,b,B){B===void 0&&(B={}),this._checkLoaded();var k=this.getLayer(p);if(k){if(!n.deepEqual(k.filter,b))return b==null?(k.filter=void 0,void this._updateLayer(k)):void(this._validate(n.validateStyle.filter,"layers."+k.id+".filter",b,null,B)||(k.filter=n.clone$1(b),this._updateLayer(k)))}else this.fire(new n.ErrorEvent(new Error("The layer '"+p+"' does not exist in the map's style and cannot be filtered.")))},_.prototype.getFilter=function(p){return n.clone$1(this.getLayer(p).filter)},_.prototype.setLayoutProperty=function(p,b,B,k){k===void 0&&(k={}),this._checkLoaded();var V=this.getLayer(p);V?n.deepEqual(V.getLayoutProperty(b),B)||(V.setLayoutProperty(b,B,k),this._updateLayer(V)):this.fire(new n.ErrorEvent(new Error("The layer '"+p+"' does not exist in the map's style and cannot be styled.")))},_.prototype.getLayoutProperty=function(p,b){var B=this.getLayer(p);if(B)return B.getLayoutProperty(b);this.fire(new n.ErrorEvent(new Error("The layer '"+p+"' does not exist in the map's style.")))},_.prototype.setPaintProperty=function(p,b,B,k){k===void 0&&(k={}),this._checkLoaded();var V=this.getLayer(p);V?n.deepEqual(V.getPaintProperty(b),B)||(V.setPaintProperty(b,B,k)&&this._updateLayer(V),this._changed=!0,this._updatedPaintProps[p]=!0):this.fire(new n.ErrorEvent(new Error("The layer '"+p+"' does not exist in the map's style and cannot be styled.")))},_.prototype.getPaintProperty=function(p,b){return this.getLayer(p).getPaintProperty(b)},_.prototype.setFeatureState=function(p,b){this._checkLoaded();var B=p.source,k=p.sourceLayer,V=this.sourceCaches[B];if(V!==void 0){var q=V.getSource().type;q==="geojson"&&k?this.fire(new n.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):q!=="vector"||k?(p.id===void 0&&this.fire(new n.ErrorEvent(new Error("The feature id parameter must be provided."))),V.setFeatureState(k,p.id,b)):this.fire(new n.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new n.ErrorEvent(new Error("The source '"+B+"' does not exist in the map's style.")))},_.prototype.removeFeatureState=function(p,b){this._checkLoaded();var B=p.source,k=this.sourceCaches[B];if(k!==void 0){var V=k.getSource().type,q=V==="vector"?p.sourceLayer:void 0;V!=="vector"||q?b&&typeof p.id!="string"&&typeof p.id!="number"?this.fire(new n.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):k.removeFeatureState(q,p.id,b):this.fire(new n.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new n.ErrorEvent(new Error("The source '"+B+"' does not exist in the map's style.")))},_.prototype.getFeatureState=function(p){this._checkLoaded();var b=p.source,B=p.sourceLayer,k=this.sourceCaches[b];if(k!==void 0){if(k.getSource().type!=="vector"||B)return p.id===void 0&&this.fire(new n.ErrorEvent(new Error("The feature id parameter must be provided."))),k.getFeatureState(B,p.id);this.fire(new n.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new n.ErrorEvent(new Error("The source '"+b+"' does not exist in the map's style.")))},_.prototype.getTransition=function(){return n.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},_.prototype.serialize=function(){return n.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:n.mapObject(this.sourceCaches,function(p){return p.serialize()}),layers:this._serializeLayers(this._order)},function(p){return p!==void 0})},_.prototype._updateLayer=function(p){this._updatedLayers[p.id]=!0,p.source&&!this._updatedSources[p.source]&&this.sourceCaches[p.source].getSource().type!=="raster"&&(this._updatedSources[p.source]="reload",this.sourceCaches[p.source].pause()),this._changed=!0},_.prototype._flattenAndSortRenderedFeatures=function(p){for(var b=this,B=function(ar){return b._layers[ar].type==="fill-extrusion"},k={},V=[],q=this._order.length-1;q>=0;q--){var re=this._order[q];if(B(re)){k[re]=q;for(var ue=0,Ee=p;ue=0;Ze--){var Ne=this._order[Ze];if(B(Ne))for(var Ke=V.length-1;Ke>=0;Ke--){var it=V[Ke].feature;if(k[it.layer.id] 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;}"),tf=dt("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),lp=dt("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),cp=dt(`#pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity gl_FragColor=color*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec2 a_pos;uniform mat4 u_matrix; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity gl_Position=u_matrix*vec4(a_pos,0,1);}`),Xf=dt(`varying vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),Yf=dt(`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; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to vec2 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; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 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 tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;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;}`),DA=dt(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to vec2 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; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 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 tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;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);}`),P=dt(`varying vec4 v_color;void main() {gl_FragColor=v_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`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; #pragma mapbox: define highp float base #pragma mapbox: define highp float height #pragma mapbox: define highp vec4 color void main() { #pragma mapbox: initialize highp float base #pragma mapbox: initialize highp float height #pragma mapbox: initialize highp vec4 color vec3 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;}`),U=dt(`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; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 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; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 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; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 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 tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;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.0 ? a_pos : 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;}`),G=dt(`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;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 exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,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); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"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;}"),Q=dt(`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; #define PI 3.141592653589793 void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));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; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"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;}"),le=dt(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity 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);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 attribute 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; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float 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);}`),ce=dt(`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 vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity 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);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float 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;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);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);}`),_e=dt(`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity vec2 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 tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;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 aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;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*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute 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;varying float v_width; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float gapwidth #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to float 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);v_width=floorwidth;}`),Qe=dt(`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; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth 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 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); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute 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; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth float 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);}`),qe=dt(`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); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"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;}"),ct=dt(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`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; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity vec2 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]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],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 ? camera_to_anchor_distance/u_camera_to_center_distance : u_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[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`),Nt=dt(`#define SDF_PX 8.0 uniform 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; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float 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[2];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); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`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; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 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]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],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 ? camera_to_anchor_distance/u_camera_to_center_distance : u_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[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),jt=dt(`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 uniform 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; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float fade_opacity=v_data1[2];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; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif return;}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); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`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; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 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]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],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 ? camera_to_anchor_distance/u_camera_to_center_distance : u_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[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+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 dt(d,_){var p=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,b=_.match(/attribute ([\w]+) ([\w]+)/g),B=d.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),k=_.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),V=k?k.concat(B):B,q={};return{fragmentSource:d=d.replace(p,function(re,ue,Ee,Ce,Me){return q[Me]=!0,ue==="define"?` #ifndef HAS_UNIFORM_u_`+Me+` varying `+Ee+" "+Ce+" "+Me+`; #else uniform `+Ee+" "+Ce+" u_"+Me+`; #endif `:` #ifdef HAS_UNIFORM_u_`+Me+` `+Ee+" "+Ce+" "+Me+" = u_"+Me+`; #endif `}),vertexSource:_=_.replace(p,function(re,ue,Ee,Ce,Me){var He=Ce==="float"?"vec2":"vec4",Ue=Me.match(/color/)?"color":He;return q[Me]?ue==="define"?` #ifndef HAS_UNIFORM_u_`+Me+` uniform lowp float u_`+Me+`_t; attribute `+Ee+" "+He+" a_"+Me+`; varying `+Ee+" "+Ce+" "+Me+`; #else uniform `+Ee+" "+Ce+" u_"+Me+`; #endif `:Ue==="vec4"?` #ifndef HAS_UNIFORM_u_`+Me+` `+Me+" = a_"+Me+`; #else `+Ee+" "+Ce+" "+Me+" = u_"+Me+`; #endif `:` #ifndef HAS_UNIFORM_u_`+Me+` `+Me+" = unpack_mix_"+Ue+"(a_"+Me+", u_"+Me+`_t); #else `+Ee+" "+Ce+" "+Me+" = u_"+Me+`; #endif `:ue==="define"?` #ifndef HAS_UNIFORM_u_`+Me+` uniform lowp float u_`+Me+`_t; attribute `+Ee+" "+He+" a_"+Me+`; #else uniform `+Ee+" "+Ce+" u_"+Me+`; #endif `:Ue==="vec4"?` #ifndef HAS_UNIFORM_u_`+Me+` `+Ee+" "+Ce+" "+Me+" = a_"+Me+`; #else `+Ee+" "+Ce+" "+Me+" = u_"+Me+`; #endif `:` #ifndef HAS_UNIFORM_u_`+Me+` `+Ee+" "+Ce+" "+Me+" = unpack_mix_"+Ue+"(a_"+Me+", u_"+Me+`_t); #else `+Ee+" "+Ce+" "+Me+" = u_"+Me+`; #endif `}),staticAttributes:b,staticUniforms:V}}var fr=Object.freeze({__proto__:null,prelude:uu,background:Xh,backgroundPattern:BA,circle:OA,clippingMask:qf,heatmap:op,heatmapTexture:sp,collisionBox:ap,collisionCircle:tf,debug:lp,fill:cp,fillOutline:Xf,fillOutlinePattern:Yf,fillPattern:DA,fillExtrusion:P,fillExtrusionPattern:U,hillshadePrepare:G,hillshade:Q,line:le,lineGradient:ce,linePattern:_e,lineSDF:Qe,raster:qe,symbolIcon:ct,symbolSDF:Nt,symbolTextAndIcon:jt}),mi=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function ut(d){for(var _=[],p=0;p>16,q>>16],u_pixel_coord_lower:[65535&V,65535&q]}}St.prototype.draw=function(d,_,p,b,B,k,V,q,re,ue,Ee,Ce,Me,He,Ue,Ze){var Ne,Ke=d.gl;if(!this.failedToCreate){for(var it in d.program.set(this.program),d.setDepthMode(p),d.setStencilMode(b),d.setColorMode(B),d.setCullFace(k),this.fixedUniforms)this.fixedUniforms[it].set(V[it]);He&&He.setUniforms(d,this.binderUniforms,Ce,{zoom:Me});for(var pt=(Ne={},Ne[Ke.LINES]=2,Ne[Ke.TRIANGLES]=3,Ne[Ke.LINE_STRIP]=1,Ne)[_],Ct=0,xt=Ee.get();Ct0?1-1/(1.001-V):-V),u_contrast_factor:(k=B.paint.get("raster-contrast"),k>0?1/(1-k):1+k),u_spin_weights:fl(B.paint.get("raster-hue-rotate"))};var k,V};function fl(d){d*=Math.PI/180;var _=Math.sin(d),p=Math.cos(d);return[(2*p+1)/3,(-Math.sqrt(3)*_-p+1)/3,(Math.sqrt(3)*_-p+1)/3]}var hu,Sn=function(d,_,p,b,B,k,V,q,re,ue){var Ee=B.transform;return{u_is_size_zoom_constant:+(d==="constant"||d==="source"),u_is_size_feature_constant:+(d==="constant"||d==="camera"),u_size_t:_?_.uSizeT:0,u_size:_?_.uSize:0,u_camera_to_center_distance:Ee.cameraToCenterDistance,u_pitch:Ee.pitch/360*2*Math.PI,u_rotate_symbol:+p,u_aspect_ratio:Ee.width/Ee.height,u_fade_change:B.options.fadeDuration?B.symbolFadeChange:1,u_matrix:k,u_label_plane_matrix:V,u_coord_matrix:q,u_is_text:+re,u_pitch_with_map:+b,u_texsize:ue,u_texture:0}},ha=function(d,_,p,b,B,k,V,q,re,ue,Ee){var Ce=B.transform;return n.extend(Sn(d,_,p,b,B,k,V,q,re,ue),{u_gamma_scale:b?Math.cos(Ce._pitch)*Ce.cameraToCenterDistance:1,u_device_pixel_ratio:n.browser.devicePixelRatio,u_is_halo:+Ee})},gi=function(d,_,p,b,B,k,V,q,re,ue){return n.extend(ha(d,_,p,b,B,k,V,q,!0,re,!0),{u_texsize_icon:ue,u_texture_icon:1})},Fe=function(d,_,p){return{u_matrix:d,u_opacity:_,u_color:p}},_i=function(d,_,p,b,B,k){return n.extend(function(V,q,re,ue){var Ee=re.imageManager.getPattern(V.from.toString()),Ce=re.imageManager.getPattern(V.to.toString()),Me=re.imageManager.getPixelSize(),He=Me.width,Ue=Me.height,Ze=Math.pow(2,ue.tileID.overscaledZ),Ne=ue.tileSize*Math.pow(2,re.transform.tileZoom)/Ze,Ke=Ne*(ue.tileID.canonical.x+ue.tileID.wrap*Ze),it=Ne*ue.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Ee.tl,u_pattern_br_a:Ee.br,u_pattern_tl_b:Ce.tl,u_pattern_br_b:Ce.br,u_texsize:[He,Ue],u_mix:q.t,u_pattern_size_a:Ee.displaySize,u_pattern_size_b:Ce.displaySize,u_scale_a:q.fromScale,u_scale_b:q.toScale,u_tile_units_to_pixels:1/pn(ue,1,re.transform.tileZoom),u_pixel_coord_upper:[Ke>>16,it>>16],u_pixel_coord_lower:[65535&Ke,65535&it]}}(b,k,p,B),{u_matrix:d,u_opacity:_})},Kh={fillExtrusion:function(d,_){return{u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_lightpos:new n.Uniform3f(d,_.u_lightpos),u_lightintensity:new n.Uniform1f(d,_.u_lightintensity),u_lightcolor:new n.Uniform3f(d,_.u_lightcolor),u_vertical_gradient:new n.Uniform1f(d,_.u_vertical_gradient),u_opacity:new n.Uniform1f(d,_.u_opacity)}},fillExtrusionPattern:function(d,_){return{u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_lightpos:new n.Uniform3f(d,_.u_lightpos),u_lightintensity:new n.Uniform1f(d,_.u_lightintensity),u_lightcolor:new n.Uniform3f(d,_.u_lightcolor),u_vertical_gradient:new n.Uniform1f(d,_.u_vertical_gradient),u_height_factor:new n.Uniform1f(d,_.u_height_factor),u_image:new n.Uniform1i(d,_.u_image),u_texsize:new n.Uniform2f(d,_.u_texsize),u_pixel_coord_upper:new n.Uniform2f(d,_.u_pixel_coord_upper),u_pixel_coord_lower:new n.Uniform2f(d,_.u_pixel_coord_lower),u_scale:new n.Uniform3f(d,_.u_scale),u_fade:new n.Uniform1f(d,_.u_fade),u_opacity:new n.Uniform1f(d,_.u_opacity)}},fill:function(d,_){return{u_matrix:new n.UniformMatrix4f(d,_.u_matrix)}},fillPattern:function(d,_){return{u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_image:new n.Uniform1i(d,_.u_image),u_texsize:new n.Uniform2f(d,_.u_texsize),u_pixel_coord_upper:new n.Uniform2f(d,_.u_pixel_coord_upper),u_pixel_coord_lower:new n.Uniform2f(d,_.u_pixel_coord_lower),u_scale:new n.Uniform3f(d,_.u_scale),u_fade:new n.Uniform1f(d,_.u_fade)}},fillOutline:function(d,_){return{u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_world:new n.Uniform2f(d,_.u_world)}},fillOutlinePattern:function(d,_){return{u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_world:new n.Uniform2f(d,_.u_world),u_image:new n.Uniform1i(d,_.u_image),u_texsize:new n.Uniform2f(d,_.u_texsize),u_pixel_coord_upper:new n.Uniform2f(d,_.u_pixel_coord_upper),u_pixel_coord_lower:new n.Uniform2f(d,_.u_pixel_coord_lower),u_scale:new n.Uniform3f(d,_.u_scale),u_fade:new n.Uniform1f(d,_.u_fade)}},circle:function(d,_){return{u_camera_to_center_distance:new n.Uniform1f(d,_.u_camera_to_center_distance),u_scale_with_map:new n.Uniform1i(d,_.u_scale_with_map),u_pitch_with_map:new n.Uniform1i(d,_.u_pitch_with_map),u_extrude_scale:new n.Uniform2f(d,_.u_extrude_scale),u_device_pixel_ratio:new n.Uniform1f(d,_.u_device_pixel_ratio),u_matrix:new n.UniformMatrix4f(d,_.u_matrix)}},collisionBox:function(d,_){return{u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_camera_to_center_distance:new n.Uniform1f(d,_.u_camera_to_center_distance),u_pixels_to_tile_units:new n.Uniform1f(d,_.u_pixels_to_tile_units),u_extrude_scale:new n.Uniform2f(d,_.u_extrude_scale),u_overscale_factor:new n.Uniform1f(d,_.u_overscale_factor)}},collisionCircle:function(d,_){return{u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_inv_matrix:new n.UniformMatrix4f(d,_.u_inv_matrix),u_camera_to_center_distance:new n.Uniform1f(d,_.u_camera_to_center_distance),u_viewport_size:new n.Uniform2f(d,_.u_viewport_size)}},debug:function(d,_){return{u_color:new n.UniformColor(d,_.u_color),u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_overlay:new n.Uniform1i(d,_.u_overlay),u_overlay_scale:new n.Uniform1f(d,_.u_overlay_scale)}},clippingMask:function(d,_){return{u_matrix:new n.UniformMatrix4f(d,_.u_matrix)}},heatmap:function(d,_){return{u_extrude_scale:new n.Uniform1f(d,_.u_extrude_scale),u_intensity:new n.Uniform1f(d,_.u_intensity),u_matrix:new n.UniformMatrix4f(d,_.u_matrix)}},heatmapTexture:function(d,_){return{u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_world:new n.Uniform2f(d,_.u_world),u_image:new n.Uniform1i(d,_.u_image),u_color_ramp:new n.Uniform1i(d,_.u_color_ramp),u_opacity:new n.Uniform1f(d,_.u_opacity)}},hillshade:function(d,_){return{u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_image:new n.Uniform1i(d,_.u_image),u_latrange:new n.Uniform2f(d,_.u_latrange),u_light:new n.Uniform2f(d,_.u_light),u_shadow:new n.UniformColor(d,_.u_shadow),u_highlight:new n.UniformColor(d,_.u_highlight),u_accent:new n.UniformColor(d,_.u_accent)}},hillshadePrepare:function(d,_){return{u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_image:new n.Uniform1i(d,_.u_image),u_dimension:new n.Uniform2f(d,_.u_dimension),u_zoom:new n.Uniform1f(d,_.u_zoom),u_unpack:new n.Uniform4f(d,_.u_unpack)}},line:function(d,_){return{u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_ratio:new n.Uniform1f(d,_.u_ratio),u_device_pixel_ratio:new n.Uniform1f(d,_.u_device_pixel_ratio),u_units_to_pixels:new n.Uniform2f(d,_.u_units_to_pixels)}},lineGradient:function(d,_){return{u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_ratio:new n.Uniform1f(d,_.u_ratio),u_device_pixel_ratio:new n.Uniform1f(d,_.u_device_pixel_ratio),u_units_to_pixels:new n.Uniform2f(d,_.u_units_to_pixels),u_image:new n.Uniform1i(d,_.u_image),u_image_height:new n.Uniform1f(d,_.u_image_height)}},linePattern:function(d,_){return{u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_texsize:new n.Uniform2f(d,_.u_texsize),u_ratio:new n.Uniform1f(d,_.u_ratio),u_device_pixel_ratio:new n.Uniform1f(d,_.u_device_pixel_ratio),u_image:new n.Uniform1i(d,_.u_image),u_units_to_pixels:new n.Uniform2f(d,_.u_units_to_pixels),u_scale:new n.Uniform3f(d,_.u_scale),u_fade:new n.Uniform1f(d,_.u_fade)}},lineSDF:function(d,_){return{u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_ratio:new n.Uniform1f(d,_.u_ratio),u_device_pixel_ratio:new n.Uniform1f(d,_.u_device_pixel_ratio),u_units_to_pixels:new n.Uniform2f(d,_.u_units_to_pixels),u_patternscale_a:new n.Uniform2f(d,_.u_patternscale_a),u_patternscale_b:new n.Uniform2f(d,_.u_patternscale_b),u_sdfgamma:new n.Uniform1f(d,_.u_sdfgamma),u_image:new n.Uniform1i(d,_.u_image),u_tex_y_a:new n.Uniform1f(d,_.u_tex_y_a),u_tex_y_b:new n.Uniform1f(d,_.u_tex_y_b),u_mix:new n.Uniform1f(d,_.u_mix)}},raster:function(d,_){return{u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_tl_parent:new n.Uniform2f(d,_.u_tl_parent),u_scale_parent:new n.Uniform1f(d,_.u_scale_parent),u_buffer_scale:new n.Uniform1f(d,_.u_buffer_scale),u_fade_t:new n.Uniform1f(d,_.u_fade_t),u_opacity:new n.Uniform1f(d,_.u_opacity),u_image0:new n.Uniform1i(d,_.u_image0),u_image1:new n.Uniform1i(d,_.u_image1),u_brightness_low:new n.Uniform1f(d,_.u_brightness_low),u_brightness_high:new n.Uniform1f(d,_.u_brightness_high),u_saturation_factor:new n.Uniform1f(d,_.u_saturation_factor),u_contrast_factor:new n.Uniform1f(d,_.u_contrast_factor),u_spin_weights:new n.Uniform3f(d,_.u_spin_weights)}},symbolIcon:function(d,_){return{u_is_size_zoom_constant:new n.Uniform1i(d,_.u_is_size_zoom_constant),u_is_size_feature_constant:new n.Uniform1i(d,_.u_is_size_feature_constant),u_size_t:new n.Uniform1f(d,_.u_size_t),u_size:new n.Uniform1f(d,_.u_size),u_camera_to_center_distance:new n.Uniform1f(d,_.u_camera_to_center_distance),u_pitch:new n.Uniform1f(d,_.u_pitch),u_rotate_symbol:new n.Uniform1i(d,_.u_rotate_symbol),u_aspect_ratio:new n.Uniform1f(d,_.u_aspect_ratio),u_fade_change:new n.Uniform1f(d,_.u_fade_change),u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_label_plane_matrix:new n.UniformMatrix4f(d,_.u_label_plane_matrix),u_coord_matrix:new n.UniformMatrix4f(d,_.u_coord_matrix),u_is_text:new n.Uniform1i(d,_.u_is_text),u_pitch_with_map:new n.Uniform1i(d,_.u_pitch_with_map),u_texsize:new n.Uniform2f(d,_.u_texsize),u_texture:new n.Uniform1i(d,_.u_texture)}},symbolSDF:function(d,_){return{u_is_size_zoom_constant:new n.Uniform1i(d,_.u_is_size_zoom_constant),u_is_size_feature_constant:new n.Uniform1i(d,_.u_is_size_feature_constant),u_size_t:new n.Uniform1f(d,_.u_size_t),u_size:new n.Uniform1f(d,_.u_size),u_camera_to_center_distance:new n.Uniform1f(d,_.u_camera_to_center_distance),u_pitch:new n.Uniform1f(d,_.u_pitch),u_rotate_symbol:new n.Uniform1i(d,_.u_rotate_symbol),u_aspect_ratio:new n.Uniform1f(d,_.u_aspect_ratio),u_fade_change:new n.Uniform1f(d,_.u_fade_change),u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_label_plane_matrix:new n.UniformMatrix4f(d,_.u_label_plane_matrix),u_coord_matrix:new n.UniformMatrix4f(d,_.u_coord_matrix),u_is_text:new n.Uniform1i(d,_.u_is_text),u_pitch_with_map:new n.Uniform1i(d,_.u_pitch_with_map),u_texsize:new n.Uniform2f(d,_.u_texsize),u_texture:new n.Uniform1i(d,_.u_texture),u_gamma_scale:new n.Uniform1f(d,_.u_gamma_scale),u_device_pixel_ratio:new n.Uniform1f(d,_.u_device_pixel_ratio),u_is_halo:new n.Uniform1i(d,_.u_is_halo)}},symbolTextAndIcon:function(d,_){return{u_is_size_zoom_constant:new n.Uniform1i(d,_.u_is_size_zoom_constant),u_is_size_feature_constant:new n.Uniform1i(d,_.u_is_size_feature_constant),u_size_t:new n.Uniform1f(d,_.u_size_t),u_size:new n.Uniform1f(d,_.u_size),u_camera_to_center_distance:new n.Uniform1f(d,_.u_camera_to_center_distance),u_pitch:new n.Uniform1f(d,_.u_pitch),u_rotate_symbol:new n.Uniform1i(d,_.u_rotate_symbol),u_aspect_ratio:new n.Uniform1f(d,_.u_aspect_ratio),u_fade_change:new n.Uniform1f(d,_.u_fade_change),u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_label_plane_matrix:new n.UniformMatrix4f(d,_.u_label_plane_matrix),u_coord_matrix:new n.UniformMatrix4f(d,_.u_coord_matrix),u_is_text:new n.Uniform1i(d,_.u_is_text),u_pitch_with_map:new n.Uniform1i(d,_.u_pitch_with_map),u_texsize:new n.Uniform2f(d,_.u_texsize),u_texsize_icon:new n.Uniform2f(d,_.u_texsize_icon),u_texture:new n.Uniform1i(d,_.u_texture),u_texture_icon:new n.Uniform1i(d,_.u_texture_icon),u_gamma_scale:new n.Uniform1f(d,_.u_gamma_scale),u_device_pixel_ratio:new n.Uniform1f(d,_.u_device_pixel_ratio),u_is_halo:new n.Uniform1i(d,_.u_is_halo)}},background:function(d,_){return{u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_opacity:new n.Uniform1f(d,_.u_opacity),u_color:new n.UniformColor(d,_.u_color)}},backgroundPattern:function(d,_){return{u_matrix:new n.UniformMatrix4f(d,_.u_matrix),u_opacity:new n.Uniform1f(d,_.u_opacity),u_image:new n.Uniform1i(d,_.u_image),u_pattern_tl_a:new n.Uniform2f(d,_.u_pattern_tl_a),u_pattern_br_a:new n.Uniform2f(d,_.u_pattern_br_a),u_pattern_tl_b:new n.Uniform2f(d,_.u_pattern_tl_b),u_pattern_br_b:new n.Uniform2f(d,_.u_pattern_br_b),u_texsize:new n.Uniform2f(d,_.u_texsize),u_mix:new n.Uniform1f(d,_.u_mix),u_pattern_size_a:new n.Uniform2f(d,_.u_pattern_size_a),u_pattern_size_b:new n.Uniform2f(d,_.u_pattern_size_b),u_scale_a:new n.Uniform1f(d,_.u_scale_a),u_scale_b:new n.Uniform1f(d,_.u_scale_b),u_pixel_coord_upper:new n.Uniform2f(d,_.u_pixel_coord_upper),u_pixel_coord_lower:new n.Uniform2f(d,_.u_pixel_coord_lower),u_tile_units_to_pixels:new n.Uniform1f(d,_.u_tile_units_to_pixels)}}};function Vc(d,_,p,b,B,k,V){for(var q=d.context,re=q.gl,ue=d.useProgram("collisionBox"),Ee=[],Ce=0,Me=0,He=0;He0){var Ct=n.create(),xt=Ke;n.mul(Ct,Ne.placementInvProjMatrix,d.transform.glCoordMatrix),n.mul(Ct,Ct,Ne.placementViewportMatrix),Ee.push({circleArray:pt,circleOffset:Me,transform:xt,invTransform:Ct}),Me=Ce+=pt.length/4}it&&ue.draw(q,re.LINES,Pe.disabled,ye.disabled,d.colorModeForRenderPass(),rt.disabled,Qn(Ke,d.transform,Ze),p.id,it.layoutVertexBuffer,it.indexBuffer,it.segments,null,d.transform.zoom,null,null,it.collisionVertexBuffer)}}if(V&&Ee.length){var Rt=d.useProgram("collisionCircle"),Wt=new n.StructArrayLayout2f1f2i16;Wt.resize(4*Ce),Wt._trim();for(var ar=0,ir=0,Ir=Ee;ir=0&&(Ue[Ne.associatedIconIndex]={shiftedAnchor:Wt,angle:ar})}else cs(Ne.numGlyphs,Me)}if(Ee){He.clear();for(var Ir=d.icon.placedSymbolArray,ti=0;ti0){var V=n.browser.now(),q=(V-d.timeAdded)/k,re=_?(V-_.timeAdded)/k:-1,ue=p.getSource(),Ee=B.coveringZoomLevel({tileSize:ue.tileSize,roundZoom:ue.roundZoom}),Ce=!_||Math.abs(_.tileID.overscaledZ-Ee)>Math.abs(d.tileID.overscaledZ-Ee),Me=Ce&&d.refreshedUponExpiration?1:n.clamp(Ce?q:1-re,0,1);return d.refreshedUponExpiration&&q>=1&&(d.refreshedUponExpiration=!1),_?{opacity:1,mix:1-Me}:{opacity:Me,mix:0}}return{opacity:1,mix:0}}var du=new n.Color(1,0,0,1),Zh=new n.Color(0,1,0,1),za=new n.Color(0,0,1,1),Vo=new n.Color(1,0,1,1),ze=new n.Color(0,1,1,1);function st(d,_,p,b){Lt(d,0,_+p/2,d.transform.width,p,b)}function Tt(d,_,p,b){Lt(d,_-p/2,0,p,d.transform.height,b)}function Lt(d,_,p,b,B,k){var V=d.context,q=V.gl;q.enable(q.SCISSOR_TEST),q.scissor(_*n.browser.devicePixelRatio,p*n.browser.devicePixelRatio,b*n.browser.devicePixelRatio,B*n.browser.devicePixelRatio),V.clear({color:k}),q.disable(q.SCISSOR_TEST)}function Gt(d,_,p){var b=d.context,B=b.gl,k=p.posMatrix,V=d.useProgram("debug"),q=Pe.disabled,re=ye.disabled,ue=d.colorModeForRenderPass();b.activeTexture.set(B.TEXTURE0),d.emptyTexture.bind(B.LINEAR,B.CLAMP_TO_EDGE),V.draw(b,B.LINE_STRIP,q,re,ue,rt.disabled,ln(k,n.Color.red),"$debug",d.debugBuffer,d.tileBorderIndexBuffer,d.debugSegments);var Ee=_.getTileByID(p.key).latestRawTileData,Ce=Math.floor((Ee&&Ee.byteLength||0)/1024),Me=_.getTile(p).tileSize,He=512/Math.min(Me,512)*(p.overscaledZ/d.transform.zoom)*.5,Ue=p.canonical.toString();p.overscaledZ!==p.canonical.z&&(Ue+=" => "+p.overscaledZ),function(Ze,Ne){Ze.initDebugOverlayCanvas();var Ke=Ze.debugOverlayCanvas,it=Ze.context.gl,pt=Ze.debugOverlayCanvas.getContext("2d");pt.clearRect(0,0,Ke.width,Ke.height),pt.shadowColor="white",pt.shadowBlur=2,pt.lineWidth=1.5,pt.strokeStyle="white",pt.textBaseline="top",pt.font="bold 36px Open Sans, sans-serif",pt.fillText(Ne,5,5),pt.strokeText(Ne,5,5),Ze.debugOverlayTexture.update(Ke),Ze.debugOverlayTexture.bind(it.LINEAR,it.CLAMP_TO_EDGE)}(d,Ue+" "+Ce+"kb"),V.draw(b,B.TRIANGLES,q,re,tt.alphaBlended,rt.disabled,ln(k,n.Color.transparent,He),"$debug",d.debugBuffer,d.quadTriangleIndexBuffer,d.debugSegments)}var _r={symbol:function(d,_,p,b,B){if(d.renderPass==="translucent"){var k=ye.disabled,V=d.colorModeForRenderPass();p.layout.get("text-variable-anchor")&&function(q,re,ue,Ee,Ce,Me,He){for(var Ue=re.transform,Ze=Ce==="map",Ne=Me==="map",Ke=0,it=q;Ke256&&this.clearStencil(),p.setColorMode(tt.disabled),p.setDepthMode(Pe.disabled);var B=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var k=0,V=_;k256&&this.clearStencil();var d=this.nextStencilID++,_=this.context.gl;return new ye({func:_.NOTEQUAL,mask:255},d,255,_.KEEP,_.KEEP,_.REPLACE)},hr.prototype.stencilModeForClipping=function(d){var _=this.context.gl;return new ye({func:_.EQUAL,mask:255},this._tileClippingMaskIDs[d.key],0,_.KEEP,_.KEEP,_.REPLACE)},hr.prototype.stencilConfigForOverlap=function(d){var _,p=this.context.gl,b=d.sort(function(re,ue){return ue.overscaledZ-re.overscaledZ}),B=b[b.length-1].overscaledZ,k=b[0].overscaledZ-B+1;if(k>1){this.currentStencilSource=void 0,this.nextStencilID+k>256&&this.clearStencil();for(var V={},q=0;q=0;this.currentLayer--){var pt=this.style._layers[b[this.currentLayer]],Ct=B[pt.source],xt=ue[pt.source];this._renderTileClippingMasks(pt,xt),this.renderLayer(this,Ct,pt,xt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?_.pop():null},hr.prototype.isPatternMissing=function(d){if(!d)return!1;if(!d.from||!d.to)return!0;var _=this.imageManager.getPattern(d.from.toString()),p=this.imageManager.getPattern(d.to.toString());return!_||!p},hr.prototype.useProgram=function(d,_){this.cache=this.cache||{};var p=""+d+(_?_.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[p]||(this.cache[p]=new St(this.context,d,fr[d],_,Kh[d],this._showOverdrawInspector)),this.cache[p]},hr.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()},hr.prototype.setBaseState=function(){var d=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(d.FUNC_ADD)},hr.prototype.initDebugOverlayCanvas=function(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=n.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new n.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},hr.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var yr=function(d,_){this.points=d,this.planes=_};yr.fromInvProjectionMatrix=function(d,_,p){var b=Math.pow(2,p),B=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(function(V){return n.transformMat4([],V,d)}).map(function(V){return n.scale$1([],V,1/V[3]/_*b)}),k=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(V){var q=n.sub([],B[V[0]],B[V[1]]),re=n.sub([],B[V[2]],B[V[1]]),ue=n.normalize([],n.cross([],q,re)),Ee=-n.dot(ue,B[V[1]]);return ue.concat(Ee)});return new yr(B,k)};var Lr=function(d,_){this.min=d,this.max=_,this.center=n.scale$2([],n.add([],this.min,this.max),.5)};Lr.prototype.quadrant=function(d){for(var _=[d%2==0,d<2],p=n.clone$2(this.min),b=n.clone$2(this.max),B=0;B<_.length;B++)p[B]=_[B]?this.min[B]:this.center[B],b[B]=_[B]?this.center[B]:this.max[B];return b[2]=this.max[2],new Lr(p,b)},Lr.prototype.distanceX=function(d){return Math.max(Math.min(this.max[0],d[0]),this.min[0])-d[0]},Lr.prototype.distanceY=function(d){return Math.max(Math.min(this.max[1],d[1]),this.min[1])-d[1]},Lr.prototype.intersects=function(d){for(var _=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],p=!0,b=0;b=0;if(k===0)return 0;k!==_.length&&(p=!1)}if(p)return 2;for(var q=0;q<3;q++){for(var re=Number.MAX_VALUE,ue=-Number.MAX_VALUE,Ee=0;Eethis.max[q]-this.min[q])return 0}return 1};var Fi=function(d,_,p,b){if(d===void 0&&(d=0),_===void 0&&(_=0),p===void 0&&(p=0),b===void 0&&(b=0),isNaN(d)||d<0||isNaN(_)||_<0||isNaN(p)||p<0||isNaN(b)||b<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=d,this.bottom=_,this.left=p,this.right=b};Fi.prototype.interpolate=function(d,_,p){return _.top!=null&&d.top!=null&&(this.top=n.number(d.top,_.top,p)),_.bottom!=null&&d.bottom!=null&&(this.bottom=n.number(d.bottom,_.bottom,p)),_.left!=null&&d.left!=null&&(this.left=n.number(d.left,_.left,p)),_.right!=null&&d.right!=null&&(this.right=n.number(d.right,_.right,p)),this},Fi.prototype.getCenter=function(d,_){var p=n.clamp((this.left+d-this.right)/2,0,d),b=n.clamp((this.top+_-this.bottom)/2,0,_);return new n.Point(p,b)},Fi.prototype.equals=function(d){return this.top===d.top&&this.bottom===d.bottom&&this.left===d.left&&this.right===d.right},Fi.prototype.clone=function(){return new Fi(this.top,this.bottom,this.left,this.right)},Fi.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var vr=function(d,_,p,b,B){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=B===void 0||B,this._minZoom=d||0,this._maxZoom=_||22,this._minPitch=p??0,this._maxPitch=b??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new n.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Fi,this._posMatrixCache={},this._alignedPosMatrixCache={}},jr={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};vr.prototype.clone=function(){var d=new vr(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return d.tileSize=this.tileSize,d.latRange=this.latRange,d.width=this.width,d.height=this.height,d._center=this._center,d.zoom=this.zoom,d.angle=this.angle,d._fov=this._fov,d._pitch=this._pitch,d._unmodified=this._unmodified,d._edgeInsets=this._edgeInsets.clone(),d._calcMatrices(),d},jr.minZoom.get=function(){return this._minZoom},jr.minZoom.set=function(d){this._minZoom!==d&&(this._minZoom=d,this.zoom=Math.max(this.zoom,d))},jr.maxZoom.get=function(){return this._maxZoom},jr.maxZoom.set=function(d){this._maxZoom!==d&&(this._maxZoom=d,this.zoom=Math.min(this.zoom,d))},jr.minPitch.get=function(){return this._minPitch},jr.minPitch.set=function(d){this._minPitch!==d&&(this._minPitch=d,this.pitch=Math.max(this.pitch,d))},jr.maxPitch.get=function(){return this._maxPitch},jr.maxPitch.set=function(d){this._maxPitch!==d&&(this._maxPitch=d,this.pitch=Math.min(this.pitch,d))},jr.renderWorldCopies.get=function(){return this._renderWorldCopies},jr.renderWorldCopies.set=function(d){d===void 0?d=!0:d===null&&(d=!1),this._renderWorldCopies=d},jr.worldSize.get=function(){return this.tileSize*this.scale},jr.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},jr.size.get=function(){return new n.Point(this.width,this.height)},jr.bearing.get=function(){return-this.angle/Math.PI*180},jr.bearing.set=function(d){var _=-n.wrap(d,-180,180)*Math.PI/180;this.angle!==_&&(this._unmodified=!1,this.angle=_,this._calcMatrices(),this.rotationMatrix=n.create$2(),n.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},jr.pitch.get=function(){return this._pitch/Math.PI*180},jr.pitch.set=function(d){var _=n.clamp(d,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==_&&(this._unmodified=!1,this._pitch=_,this._calcMatrices())},jr.fov.get=function(){return this._fov/Math.PI*180},jr.fov.set=function(d){d=Math.max(.01,Math.min(60,d)),this._fov!==d&&(this._unmodified=!1,this._fov=d/180*Math.PI,this._calcMatrices())},jr.zoom.get=function(){return this._zoom},jr.zoom.set=function(d){var _=Math.min(Math.max(d,this.minZoom),this.maxZoom);this._zoom!==_&&(this._unmodified=!1,this._zoom=_,this.scale=this.zoomScale(_),this.tileZoom=Math.floor(_),this.zoomFraction=_-this.tileZoom,this._constrain(),this._calcMatrices())},jr.center.get=function(){return this._center},jr.center.set=function(d){d.lat===this._center.lat&&d.lng===this._center.lng||(this._unmodified=!1,this._center=d,this._constrain(),this._calcMatrices())},jr.padding.get=function(){return this._edgeInsets.toJSON()},jr.padding.set=function(d){this._edgeInsets.equals(d)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,d,1),this._calcMatrices())},jr.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},vr.prototype.isPaddingEqual=function(d){return this._edgeInsets.equals(d)},vr.prototype.interpolatePadding=function(d,_,p){this._unmodified=!1,this._edgeInsets.interpolate(d,_,p),this._constrain(),this._calcMatrices()},vr.prototype.coveringZoomLevel=function(d){var _=(d.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/d.tileSize));return Math.max(0,_)},vr.prototype.getVisibleUnwrappedCoordinates=function(d){var _=[new n.UnwrappedTileID(0,d)];if(this._renderWorldCopies)for(var p=this.pointCoordinate(new n.Point(0,0)),b=this.pointCoordinate(new n.Point(this.width,0)),B=this.pointCoordinate(new n.Point(this.width,this.height)),k=this.pointCoordinate(new n.Point(0,this.height)),V=Math.floor(Math.min(p.x,b.x,B.x,k.x)),q=Math.floor(Math.max(p.x,b.x,B.x,k.x)),re=V-1;re<=q+1;re++)re!==0&&_.push(new n.UnwrappedTileID(re,d));return _},vr.prototype.coveringTiles=function(d){var _=this.coveringZoomLevel(d),p=_;if(d.minzoom!==void 0&&_d.maxzoom&&(_=d.maxzoom);var b=n.MercatorCoordinate.fromLngLat(this.center),B=Math.pow(2,_),k=[B*b.x,B*b.y,0],V=yr.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,_),q=d.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(q=_);var re=function(ir){return{aabb:new Lr([ir*B,0,0],[(ir+1)*B,B,0]),zoom:0,x:0,y:0,wrap:ir,fullyVisible:!1}},ue=[],Ee=[],Ce=_,Me=d.reparseOverscaled?p:_;if(this._renderWorldCopies)for(var He=1;He<=3;He++)ue.push(re(-He)),ue.push(re(He));for(ue.push(re(0));ue.length>0;){var Ue=ue.pop(),Ze=Ue.x,Ne=Ue.y,Ke=Ue.fullyVisible;if(!Ke){var it=Ue.aabb.intersects(V);if(it===0)continue;Ke=it===2}var pt=Ue.aabb.distanceX(k),Ct=Ue.aabb.distanceY(k),xt=Math.max(Math.abs(pt),Math.abs(Ct));if(Ue.zoom===Ce||xt>3+(1<=q)Ee.push({tileID:new n.OverscaledTileID(Ue.zoom===Ce?Me:Ue.zoom,Ue.wrap,Ue.zoom,Ze,Ne),distanceSq:n.sqrLen([k[0]-.5-Ze,k[1]-.5-Ne])});else for(var Rt=0;Rt<4;Rt++){var Wt=(Ze<<1)+Rt%2,ar=(Ne<<1)+(Rt>>1);ue.push({aabb:Ue.aabb.quadrant(Rt),zoom:Ue.zoom+1,x:Wt,y:ar,wrap:Ue.wrap,fullyVisible:Ke})}}return Ee.sort(function(ir,Ir){return ir.distanceSq-Ir.distanceSq}).map(function(ir){return ir.tileID})},vr.prototype.resize=function(d,_){this.width=d,this.height=_,this.pixelsToGLUnits=[2/d,-2/_],this._constrain(),this._calcMatrices()},jr.unmodified.get=function(){return this._unmodified},vr.prototype.zoomScale=function(d){return Math.pow(2,d)},vr.prototype.scaleZoom=function(d){return Math.log(d)/Math.LN2},vr.prototype.project=function(d){var _=n.clamp(d.lat,-this.maxValidLatitude,this.maxValidLatitude);return new n.Point(n.mercatorXfromLng(d.lng)*this.worldSize,n.mercatorYfromLat(_)*this.worldSize)},vr.prototype.unproject=function(d){return new n.MercatorCoordinate(d.x/this.worldSize,d.y/this.worldSize).toLngLat()},jr.point.get=function(){return this.project(this.center)},vr.prototype.setLocationAtPoint=function(d,_){var p=this.pointCoordinate(_),b=this.pointCoordinate(this.centerPoint),B=this.locationCoordinate(d),k=new n.MercatorCoordinate(B.x-(p.x-b.x),B.y-(p.y-b.y));this.center=this.coordinateLocation(k),this._renderWorldCopies&&(this.center=this.center.wrap())},vr.prototype.locationPoint=function(d){return this.coordinatePoint(this.locationCoordinate(d))},vr.prototype.pointLocation=function(d){return this.coordinateLocation(this.pointCoordinate(d))},vr.prototype.locationCoordinate=function(d){return n.MercatorCoordinate.fromLngLat(d)},vr.prototype.coordinateLocation=function(d){return d.toLngLat()},vr.prototype.pointCoordinate=function(d){var _=[d.x,d.y,0,1],p=[d.x,d.y,1,1];n.transformMat4(_,_,this.pixelMatrixInverse),n.transformMat4(p,p,this.pixelMatrixInverse);var b=_[3],B=p[3],k=_[1]/b,V=p[1]/B,q=_[2]/b,re=p[2]/B,ue=q===re?0:(0-q)/(re-q);return new n.MercatorCoordinate(n.number(_[0]/b,p[0]/B,ue)/this.worldSize,n.number(k,V,ue)/this.worldSize)},vr.prototype.coordinatePoint=function(d){var _=[d.x*this.worldSize,d.y*this.worldSize,0,1];return n.transformMat4(_,_,this.pixelMatrix),new n.Point(_[0]/_[3],_[1]/_[3])},vr.prototype.getBounds=function(){return new n.LngLatBounds().extend(this.pointLocation(new n.Point(0,0))).extend(this.pointLocation(new n.Point(this.width,0))).extend(this.pointLocation(new n.Point(this.width,this.height))).extend(this.pointLocation(new n.Point(0,this.height)))},vr.prototype.getMaxBounds=function(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new n.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},vr.prototype.setMaxBounds=function(d){d?(this.lngRange=[d.getWest(),d.getEast()],this.latRange=[d.getSouth(),d.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},vr.prototype.calculatePosMatrix=function(d,_){_===void 0&&(_=!1);var p=d.key,b=_?this._alignedPosMatrixCache:this._posMatrixCache;if(b[p])return b[p];var B=d.canonical,k=this.worldSize/this.zoomScale(B.z),V=B.x+Math.pow(2,B.z)*d.wrap,q=n.identity(new Float64Array(16));return n.translate(q,q,[V*k,B.y*k,0]),n.scale(q,q,[k/n.EXTENT,k/n.EXTENT,1]),n.multiply(q,_?this.alignedProjMatrix:this.projMatrix,q),b[p]=new Float32Array(q),b[p]},vr.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},vr.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var d,_,p,b,B=-90,k=90,V=-180,q=180,re=this.size,ue=this._unmodified;if(this.latRange){var Ee=this.latRange;B=n.mercatorYfromLat(Ee[1])*this.worldSize,d=(k=n.mercatorYfromLat(Ee[0])*this.worldSize)-Bk&&(b=k-Ze)}if(this.lngRange){var Ne=Me.x,Ke=re.x/2;Ne-Keq&&(p=q-Ke)}p===void 0&&b===void 0||(this.center=this.unproject(new n.Point(p!==void 0?p:Me.x,b!==void 0?b:Me.y))),this._unmodified=ue,this._constraining=!1}},vr.prototype._calcMatrices=function(){if(this.height){var d=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var _=Math.PI/2+this._pitch,p=this._fov*(.5+d.y/this.height),b=Math.sin(p)*this.cameraToCenterDistance/Math.sin(n.clamp(Math.PI-_-p,.01,Math.PI-.01)),B=this.point,k=B.x,V=B.y,q=1.01*(Math.cos(Math.PI/2-this._pitch)*b+this.cameraToCenterDistance),re=this.height/50,ue=new Float64Array(16);n.perspective(ue,this._fov,this.width/this.height,re,q),ue[8]=2*-d.x/this.width,ue[9]=2*d.y/this.height,n.scale(ue,ue,[1,-1,1]),n.translate(ue,ue,[0,0,-this.cameraToCenterDistance]),n.rotateX(ue,ue,this._pitch),n.rotateZ(ue,ue,this.angle),n.translate(ue,ue,[-k,-V,0]),this.mercatorMatrix=n.scale([],ue,[this.worldSize,this.worldSize,this.worldSize]),n.scale(ue,ue,[1,1,n.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=ue,this.invProjMatrix=n.invert([],this.projMatrix);var Ee=this.width%2/2,Ce=this.height%2/2,Me=Math.cos(this.angle),He=Math.sin(this.angle),Ue=k-Math.round(k)+Me*Ee+He*Ce,Ze=V-Math.round(V)+Me*Ce+He*Ee,Ne=new Float64Array(ue);if(n.translate(Ne,Ne,[Ue>.5?Ue-1:Ue,Ze>.5?Ze-1:Ze,0]),this.alignedProjMatrix=Ne,ue=n.create(),n.scale(ue,ue,[this.width/2,-this.height/2,1]),n.translate(ue,ue,[1,-1,0]),this.labelPlaneMatrix=ue,ue=n.create(),n.scale(ue,ue,[1,-1,1]),n.translate(ue,ue,[-1,-1,0]),n.scale(ue,ue,[2/this.width,2/this.height,1]),this.glCoordMatrix=ue,this.pixelMatrix=n.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(ue=n.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=ue,this._posMatrixCache={},this._alignedPosMatrixCache={}}},vr.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var d=this.pointCoordinate(new n.Point(0,0)),_=[d.x*this.worldSize,d.y*this.worldSize,0,1];return n.transformMat4(_,_,this.pixelMatrix)[3]/this.cameraToCenterDistance},vr.prototype.getCameraPoint=function(){var d=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new n.Point(0,d))},vr.prototype.getCameraQueryGeometry=function(d){var _=this.getCameraPoint();if(d.length===1)return[d[0],_];for(var p=_.x,b=_.y,B=_.x,k=_.y,V=0,q=d;V=3&&!d.some(function(p){return isNaN(p)})){var _=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(d[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+d[2],+d[1]],zoom:+d[0],bearing:_,pitch:+(d[4]||0)}),!0}return!1},Ci.prototype._updateHashUnthrottled=function(){var d=n.window.location.href.replace(/(#.+)?$/,this.getHashString());try{n.window.history.replaceState(n.window.history.state,null,d)}catch{}};var fi={linearity:.3,easing:n.bezier(0,0,.3,1)},Mn=n.extend({deceleration:2500,maxSpeed:1400},fi),rs=n.extend({deceleration:20,maxSpeed:1400},fi),js=n.extend({deceleration:1e3,maxSpeed:360},fi),Va=n.extend({deceleration:1e3,maxSpeed:90},fi),ta=function(d){this._map=d,this.clear()};function dl(d,_){(!d.duration||d.duration<_.duration)&&(d.duration=_.duration,d.easing=_.easing)}function vo(d,_,p){var b=p.maxSpeed,B=p.linearity,k=p.deceleration,V=n.clamp(d*B/(_/1e3),-b,b),q=Math.abs(V)/(k*B);return{easing:p.easing,duration:1e3*q,amount:V*(q/2)}}ta.prototype.clear=function(){this._inertiaBuffer=[]},ta.prototype.record=function(d){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:n.browser.now(),settings:d})},ta.prototype._drainInertiaBuffer=function(){for(var d=this._inertiaBuffer,_=n.browser.now();d.length>0&&_-d[0].time>160;)d.shift()},ta.prototype._onMoveEnd=function(d){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var _={zoom:0,bearing:0,pitch:0,pan:new n.Point(0,0),pinchAround:void 0,around:void 0},p=0,b=this._inertiaBuffer;p=this._clickTolerance||this._map.fire(new us(d.type,this._map,d))},xn.prototype.dblclick=function(d){return this._firePreventable(new us(d.type,this._map,d))},xn.prototype.mouseover=function(d){this._map.fire(new us(d.type,this._map,d))},xn.prototype.mouseout=function(d){this._map.fire(new us(d.type,this._map,d))},xn.prototype.touchstart=function(d){return this._firePreventable(new Jh(d.type,this._map,d))},xn.prototype.touchmove=function(d){this._map.fire(new Jh(d.type,this._map,d))},xn.prototype.touchend=function(d){this._map.fire(new Jh(d.type,this._map,d))},xn.prototype.touchcancel=function(d){this._map.fire(new Jh(d.type,this._map,d))},xn.prototype._firePreventable=function(d){if(this._map.fire(d),d.defaultPrevented)return{}},xn.prototype.isEnabled=function(){return!0},xn.prototype.isActive=function(){return!1},xn.prototype.enable=function(){},xn.prototype.disable=function(){};var Tr=function(d){this._map=d};Tr.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Tr.prototype.mousemove=function(d){this._map.fire(new us(d.type,this._map,d))},Tr.prototype.mousedown=function(){this._delayContextMenu=!0},Tr.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new us("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Tr.prototype.contextmenu=function(d){this._delayContextMenu?this._contextMenuEvent=d:this._map.fire(new us(d.type,this._map,d)),this._map.listens("contextmenu")&&d.preventDefault()},Tr.prototype.isEnabled=function(){return!0},Tr.prototype.isActive=function(){return!1},Tr.prototype.enable=function(){},Tr.prototype.disable=function(){};var lo=function(d,_){this._map=d,this._el=d.getCanvasContainer(),this._container=d.getContainer(),this._clickTolerance=_.clickTolerance||1};function Qf(d,_){for(var p={},b=0;bthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=d.timeStamp),p.length===this.numTouches&&(this.centroid=function(b){for(var B=new n.Point(0,0),k=0,V=b;k30)&&(this.aborted=!0)}}},nf.prototype.touchend=function(d,_,p){if((!this.centroid||d.timeStamp-this.startTime>500)&&(this.aborted=!0),p.length===0){var b=!this.aborted&&this.centroid;if(this.reset(),b)return b}};var Ha=function(d){this.singleTap=new nf(d),this.numTaps=d.numTaps,this.reset()};Ha.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Ha.prototype.touchstart=function(d,_,p){this.singleTap.touchstart(d,_,p)},Ha.prototype.touchmove=function(d,_,p){this.singleTap.touchmove(d,_,p)},Ha.prototype.touchend=function(d,_,p){var b=this.singleTap.touchend(d,_,p);if(b){var B=d.timeStamp-this.lastTime<500,k=!this.lastTap||this.lastTap.dist(b)<30;if(B&&k||this.reset(),this.count++,this.lastTime=d.timeStamp,this.lastTap=b,this.count===this.numTaps)return this.reset(),b}};var ja=function(){this._zoomIn=new Ha({numTouches:1,numTaps:2}),this._zoomOut=new Ha({numTouches:2,numTaps:1}),this.reset()};ja.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},ja.prototype.touchstart=function(d,_,p){this._zoomIn.touchstart(d,_,p),this._zoomOut.touchstart(d,_,p)},ja.prototype.touchmove=function(d,_,p){this._zoomIn.touchmove(d,_,p),this._zoomOut.touchmove(d,_,p)},ja.prototype.touchend=function(d,_,p){var b=this,B=this._zoomIn.touchend(d,_,p),k=this._zoomOut.touchend(d,_,p);return B?(this._active=!0,d.preventDefault(),setTimeout(function(){return b.reset()},0),{cameraAnimation:function(V){return V.easeTo({duration:300,zoom:V.getZoom()+1,around:V.unproject(B)},{originalEvent:d})}}):k?(this._active=!0,d.preventDefault(),setTimeout(function(){return b.reset()},0),{cameraAnimation:function(V){return V.easeTo({duration:300,zoom:V.getZoom()-1,around:V.unproject(k)},{originalEvent:d})}}):void 0},ja.prototype.touchcancel=function(){this.reset()},ja.prototype.enable=function(){this._enabled=!0},ja.prototype.disable=function(){this._enabled=!1,this.reset()},ja.prototype.isEnabled=function(){return this._enabled},ja.prototype.isActive=function(){return this._active};var LA={0:1,2:2},gr=function(d){this.reset(),this._clickTolerance=d.clickTolerance||1};gr.prototype.blur=function(){this.reset()},gr.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},gr.prototype._correctButton=function(d,_){return!1},gr.prototype._move=function(d,_){return{}},gr.prototype.mousedown=function(d,_){if(!this._lastPoint){var p=s.mouseButton(d);this._correctButton(d,p)&&(this._lastPoint=_,this._eventButton=p)}},gr.prototype.mousemoveWindow=function(d,_){var p=this._lastPoint;if(p){if(d.preventDefault(),function(b,B){var k=LA[B];return b.buttons===void 0||(b.buttons&k)!==k}(d,this._eventButton))this.reset();else if(this._moved||!(_.dist(p)0&&(this._active=!0);var b=Qf(p,_),B=new n.Point(0,0),k=new n.Point(0,0),V=0;for(var q in b){var re=b[q],ue=this._touches[q];ue&&(B._add(re),k._add(re.sub(ue)),V++,b[q]=re)}if(this._touches=b,!(VMath.abs(d.x)}var NA=function(d){function _(){d.apply(this,arguments)}return d&&(_.__proto__=d),(_.prototype=Object.create(d&&d.prototype)).constructor=_,_.prototype.reset=function(){d.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},_.prototype._start=function(p){this._lastPoints=p,af(p[0].sub(p[1]))&&(this._valid=!1)},_.prototype._move=function(p,b,B){var k=p[0].sub(this._lastPoints[0]),V=p[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(k,V,B.timeStamp),this._valid)return this._lastPoints=p,this._active=!0,{pitchDelta:(k.y+V.y)/2*-.5}},_.prototype.gestureBeginsVertically=function(p,b,B){if(this._valid!==void 0)return this._valid;var k=p.mag()>=2,V=b.mag()>=2;if(k||V){if(!k||!V)return this._firstMove===void 0&&(this._firstMove=B),B-this._firstMove<100&&void 0;var q=p.y>0==b.y>0;return af(p)&&af(b)&&q}},_}(Ca),kA={panStep:100,bearingStep:15,pitchStep:10},Il=function(){var d=kA;this._panStep=d.panStep,this._bearingStep=d.bearingStep,this._pitchStep=d.pitchStep,this._rotationDisabled=!1};function Al(d){return d*(2-d)}Il.prototype.blur=function(){this.reset()},Il.prototype.reset=function(){this._active=!1},Il.prototype.keydown=function(d){var _=this;if(!(d.altKey||d.ctrlKey||d.metaKey)){var p=0,b=0,B=0,k=0,V=0;switch(d.keyCode){case 61:case 107:case 171:case 187:p=1;break;case 189:case 109:case 173:p=-1;break;case 37:d.shiftKey?b=-1:(d.preventDefault(),k=-1);break;case 39:d.shiftKey?b=1:(d.preventDefault(),k=1);break;case 38:d.shiftKey?B=1:(d.preventDefault(),V=-1);break;case 40:d.shiftKey?B=-1:(d.preventDefault(),V=1);break;default:return}return this._rotationDisabled&&(b=0,B=0),{cameraAnimation:function(q){var re=q.getZoom();q.easeTo({duration:300,easeId:"keyboardHandler",easing:Al,zoom:p?Math.round(re)+p*(d.shiftKey?2:1):re,bearing:q.getBearing()+b*_._bearingStep,pitch:q.getPitch()+B*_._pitchStep,offset:[-k*_._panStep,-V*_._panStep],center:q.getCenter()},{originalEvent:d})}}}},Il.prototype.enable=function(){this._enabled=!0},Il.prototype.disable=function(){this._enabled=!1,this.reset()},Il.prototype.isEnabled=function(){return this._enabled},Il.prototype.isActive=function(){return this._active},Il.prototype.disableRotation=function(){this._rotationDisabled=!0},Il.prototype.enableRotation=function(){this._rotationDisabled=!1};var qi=function(d,_){this._map=d,this._el=d.getCanvasContainer(),this._handler=_,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,n.bindAll(["_onTimeout"],this)};qi.prototype.setZoomRate=function(d){this._defaultZoomRate=d},qi.prototype.setWheelZoomRate=function(d){this._wheelZoomRate=d},qi.prototype.isEnabled=function(){return!!this._enabled},qi.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},qi.prototype.isZooming=function(){return!!this._zooming},qi.prototype.enable=function(d){this.isEnabled()||(this._enabled=!0,this._aroundCenter=d&&d.around==="center")},qi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},qi.prototype.wheel=function(d){if(this.isEnabled()){var _=d.deltaMode===n.window.WheelEvent.DOM_DELTA_LINE?40*d.deltaY:d.deltaY,p=n.browser.now(),b=p-(this._lastWheelEventTime||0);this._lastWheelEventTime=p,_!==0&&_%4.000244140625==0?this._type="wheel":_!==0&&Math.abs(_)<4?this._type="trackpad":b>400?(this._type=null,this._lastValue=_,this._timeout=setTimeout(this._onTimeout,40,d)):this._type||(this._type=Math.abs(b*_)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,_+=this._lastValue)),d.shiftKey&&_&&(_/=4),this._type&&(this._lastWheelEvent=d,this._delta-=_,this._active||this._start(d)),d.preventDefault()}},qi.prototype._onTimeout=function(d){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(d)},qi.prototype._start=function(d){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var _=s.mousePos(this._el,d);this._around=n.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(_)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},qi.prototype.renderFrame=function(){var d=this;if(this._frameId&&(this._frameId=null,this.isActive())){var _=this._map.transform;if(this._delta!==0){var p=this._type==="wheel"&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,b=2/(1+Math.exp(-Math.abs(this._delta*p)));this._delta<0&&b!==0&&(b=1/b);var B=typeof this._targetZoom=="number"?_.zoomScale(this._targetZoom):_.scale;this._targetZoom=Math.min(_.maxZoom,Math.max(_.minZoom,_.scaleZoom(B*b))),this._type==="wheel"&&(this._startZoom=_.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var k,V=typeof this._targetZoom=="number"?this._targetZoom:_.zoom,q=this._startZoom,re=this._easing,ue=!1;if(this._type==="wheel"&&q&&re){var Ee=Math.min((n.browser.now()-this._lastWheelEventTime)/200,1),Ce=re(Ee);k=n.number(q,V,Ce),Ee<1?this._frameId||(this._frameId=!0):ue=!0}else k=V,ue=!0;return this._active=!0,ue&&(this._active=!1,this._finishTimeout=setTimeout(function(){d._zooming=!1,d._handler._triggerRenderFrame(),delete d._targetZoom,delete d._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ue,zoomDelta:k-_.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},qi.prototype._smoothOutEasing=function(d){var _=n.ease;if(this._prevEase){var p=this._prevEase,b=(n.browser.now()-p.start)/p.duration,B=p.easing(b+.01)-p.easing(b),k=.27/Math.sqrt(B*B+1e-4)*.01,V=Math.sqrt(.0729-k*k);_=n.bezier(k,V,.25,1)}return this._prevEase={start:n.browser.now(),duration:d,easing:_},_},qi.prototype.blur=function(){this.reset()},qi.prototype.reset=function(){this._active=!1};var Ac=function(d,_){this._clickZoom=d,this._tapZoom=_};Ac.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Ac.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Ac.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Ac.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Pl=function(){this.reset()};Pl.prototype.reset=function(){this._active=!1},Pl.prototype.blur=function(){this.reset()},Pl.prototype.dblclick=function(d,_){return d.preventDefault(),{cameraAnimation:function(p){p.easeTo({duration:300,zoom:p.getZoom()+(d.shiftKey?-1:1),around:p.unproject(_)},{originalEvent:d})}}},Pl.prototype.enable=function(){this._enabled=!0},Pl.prototype.disable=function(){this._enabled=!1,this.reset()},Pl.prototype.isEnabled=function(){return this._enabled},Pl.prototype.isActive=function(){return this._active};var Gs=function(){this._tap=new Ha({numTouches:1,numTaps:1}),this.reset()};Gs.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Gs.prototype.touchstart=function(d,_,p){this._swipePoint||(this._tapTime&&d.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?p.length>0&&(this._swipePoint=_[0],this._swipeTouch=p[0].identifier):this._tap.touchstart(d,_,p))},Gs.prototype.touchmove=function(d,_,p){if(this._tapTime){if(this._swipePoint){if(p[0].identifier!==this._swipeTouch)return;var b=_[0],B=b.y-this._swipePoint.y;return this._swipePoint=b,d.preventDefault(),this._active=!0,{zoomDelta:B/128}}}else this._tap.touchmove(d,_,p)},Gs.prototype.touchend=function(d,_,p){this._tapTime?this._swipePoint&&p.length===0&&this.reset():this._tap.touchend(d,_,p)&&(this._tapTime=d.timeStamp)},Gs.prototype.touchcancel=function(){this.reset()},Gs.prototype.enable=function(){this._enabled=!0},Gs.prototype.disable=function(){this._enabled=!1,this.reset()},Gs.prototype.isEnabled=function(){return this._enabled},Gs.prototype.isActive=function(){return this._active};var lf=function(d,_,p){this._el=d,this._mousePan=_,this._touchPan=p};lf.prototype.enable=function(d){this._inertiaOptions=d||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},lf.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},lf.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},lf.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var pu=function(d,_,p){this._pitchWithRotate=d.pitchWithRotate,this._mouseRotate=_,this._mousePitch=p};pu.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},pu.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},pu.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},pu.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Yl=function(d,_,p,b){this._el=d,this._touchZoom=_,this._touchRotate=p,this._tapDragZoom=b,this._rotationDisabled=!1,this._enabled=!0};Yl.prototype.enable=function(d){this._touchZoom.enable(d),this._rotationDisabled||this._touchRotate.enable(d),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Yl.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Yl.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Yl.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Yl.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Yl.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Ps=function(d){return d.zoom||d.drag||d.pitch||d.rotate},Qh=function(d){function _(){d.apply(this,arguments)}return d&&(_.__proto__=d),(_.prototype=Object.create(d&&d.prototype)).constructor=_,_}(n.Event);function ei(d){return d.panDelta&&d.panDelta.mag()||d.zoomDelta||d.bearingDelta||d.pitchDelta}var zr=function(d,_){this._map=d,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new ta(d),this._bearingSnap=_.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(_),n.bindAll(["handleEvent","handleWindowEvent"],this);var p=this._el;this._listeners=[[p,"touchstart",{passive:!0}],[p,"touchmove",{passive:!1}],[p,"touchend",void 0],[p,"touchcancel",void 0],[p,"mousedown",void 0],[p,"mousemove",void 0],[p,"mouseup",void 0],[n.window.document,"mousemove",{capture:!0}],[n.window.document,"mouseup",void 0],[p,"mouseover",void 0],[p,"mouseout",void 0],[p,"dblclick",void 0],[p,"click",void 0],[p,"keydown",{capture:!1}],[p,"keyup",void 0],[p,"wheel",{passive:!1}],[p,"contextmenu",void 0],[n.window,"blur",void 0]];for(var b=0,B=this._listeners;bV?Math.min(2,Rt):Math.max(.5,Rt),ti=Math.pow(Ir,1-ar),oi=k.unproject(Ct.add(xt.mult(ar*ti)).mult(ir));k.setLocationAtPoint(k.renderWorldCopies?oi.wrap():oi,Ze)}B._fireMoveEvents(b)},function(ar){B._afterEase(b,ar)},p),this},_.prototype._prepareEase=function(p,b,B){B===void 0&&(B={}),this._moving=!0,b||B.moving||this.fire(new n.Event("movestart",p)),this._zooming&&!B.zooming&&this.fire(new n.Event("zoomstart",p)),this._rotating&&!B.rotating&&this.fire(new n.Event("rotatestart",p)),this._pitching&&!B.pitching&&this.fire(new n.Event("pitchstart",p))},_.prototype._fireMoveEvents=function(p){this.fire(new n.Event("move",p)),this._zooming&&this.fire(new n.Event("zoom",p)),this._rotating&&this.fire(new n.Event("rotate",p)),this._pitching&&this.fire(new n.Event("pitch",p))},_.prototype._afterEase=function(p,b){if(!this._easeId||!b||this._easeId!==b){delete this._easeId;var B=this._zooming,k=this._rotating,V=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,B&&this.fire(new n.Event("zoomend",p)),k&&this.fire(new n.Event("rotateend",p)),V&&this.fire(new n.Event("pitchend",p)),this.fire(new n.Event("moveend",p))}},_.prototype.flyTo=function(p,b){var B=this;if(!p.essential&&n.browser.prefersReducedMotion){var k=n.pick(p,["center","zoom","bearing","pitch","around"]);return this.jumpTo(k,b)}this.stop(),p=n.extend({offset:[0,0],speed:1.2,curve:1.42,easing:n.ease},p);var V=this.transform,q=this.getZoom(),re=this.getBearing(),ue=this.getPitch(),Ee=this.getPadding(),Ce="zoom"in p?n.clamp(+p.zoom,V.minZoom,V.maxZoom):q,Me="bearing"in p?this._normalizeBearing(p.bearing,re):re,He="pitch"in p?+p.pitch:ue,Ue="padding"in p?p.padding:V.padding,Ze=V.zoomScale(Ce-q),Ne=n.Point.convert(p.offset),Ke=V.centerPoint.add(Ne),it=V.pointLocation(Ke),pt=n.LngLat.convert(p.center||it);this._normalizeCenter(pt);var Ct=V.project(it),xt=V.project(pt).sub(Ct),Rt=p.curve,Wt=Math.max(V.width,V.height),ar=Wt/Ze,ir=xt.mag();if("minZoom"in p){var Ir=n.clamp(Math.min(p.minZoom,q,Ce),V.minZoom,V.maxZoom),ti=Wt/V.zoomScale(Ir-q);Rt=Math.sqrt(ti/ir*2)}var oi=Rt*Rt;function ii(hi){var li=(ar*ar-Wt*Wt+(hi?-1:1)*oi*oi*ir*ir)/(2*(hi?ar:Wt)*oi*ir);return Math.log(Math.sqrt(li*li+1)-li)}function hn(hi){return(Math.exp(hi)-Math.exp(-hi))/2}function Or(hi){return(Math.exp(hi)+Math.exp(-hi))/2}var yi=ii(0),vi=function(hi){return Or(yi)/Or(yi+Rt*hi)},di=function(hi){return Wt*((Or(yi)*(hn(li=yi+Rt*hi)/Or(li))-hn(yi))/oi)/ir;var li},pi=(ii(1)-yi)/Rt;if(Math.abs(ir)<1e-6||!isFinite(pi)){if(Math.abs(Wt-ar)<1e-6)return this.easeTo(p,b);var Pi=arp.maxDuration&&(p.duration=0),this._zooming=!0,this._rotating=re!==Me,this._pitching=He!==ue,this._padding=!V.isPaddingEqual(Ue),this._prepareEase(b,!1),this._ease(function(hi){var li=hi*pi,bs=1/vi(li);V.zoom=hi===1?Ce:q+V.scaleZoom(bs),B._rotating&&(V.bearing=n.number(re,Me,hi)),B._pitching&&(V.pitch=n.number(ue,He,hi)),B._padding&&(V.interpolatePadding(Ee,Ue,hi),Ke=V.centerPoint.add(Ne));var Yn=hi===1?pt:V.unproject(Ct.add(xt.mult(di(li))).mult(bs));V.setLocationAtPoint(V.renderWorldCopies?Yn.wrap():Yn,Ke),B._fireMoveEvents(b)},function(){return B._afterEase(b)},p),this},_.prototype.isEasing=function(){return!!this._easeFrameId},_.prototype.stop=function(){return this._stop()},_.prototype._stop=function(p,b){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var B=this._onEaseEnd;delete this._onEaseEnd,B.call(this,b)}if(!p){var k=this.handlers;k&&k.stop(!1)}return this},_.prototype._ease=function(p,b,B){B.animate===!1||B.duration===0?(p(1),b()):(this._easeStart=n.browser.now(),this._easeOptions=B,this._onEaseFrame=p,this._onEaseEnd=b,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},_.prototype._renderFrameCallback=function(){var p=Math.min((n.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(p)),p<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},_.prototype._normalizeBearing=function(p,b){p=n.wrap(p,-180,180);var B=Math.abs(p-b);return Math.abs(p-360-b)180?-360:B<-180?360:0}},_}(n.Evented),da=function(d){d===void 0&&(d={}),this.options=d,n.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};da.prototype.getDefaultPosition=function(){return"bottom-right"},da.prototype.onAdd=function(d){var _=this.options&&this.options.compact;return this._map=d,this._container=s.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=s.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=s.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),_&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),_===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},da.prototype.onRemove=function(){s.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},da.prototype._setElementTitle=function(d,_){var p=this._map._getUIString("AttributionControl."+_);d.title=p,d.setAttribute("aria-label",p)},da.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},da.prototype._updateEditLink=function(){var d=this._editLink;d||(d=this._editLink=this._container.querySelector(".mapbox-improve-map"));var _=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||n.config.ACCESS_TOKEN}];if(d){var p=_.reduce(function(b,B,k){return B.value&&(b+=B.key+"="+B.value+(k<_.length-1?"&":"")),b},"?");d.href=n.config.FEEDBACK_URL+"/"+p+(this._map._hash?this._map._hash.getHashString(!0):""),d.rel="noopener nofollow",this._setElementTitle(d,"MapFeedback")}},da.prototype._updateData=function(d){!d||d.sourceDataType!=="metadata"&&d.sourceDataType!=="visibility"&&d.dataType!=="style"||(this._updateAttributions(),this._updateEditLink())},da.prototype._updateAttributions=function(){if(this._map.style){var d=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?d=d.concat(this.options.customAttribution.map(function(q){return typeof q!="string"?"":q})):typeof this.options.customAttribution=="string"&&d.push(this.options.customAttribution)),this._map.style.stylesheet){var _=this._map.style.stylesheet;this.styleOwner=_.owner,this.styleId=_.id}var p=this._map.style.sourceCaches;for(var b in p){var B=p[b];if(B.used){var k=B.getSource();k.attribution&&d.indexOf(k.attribution)<0&&d.push(k.attribution)}}d.sort(function(q,re){return q.length-re.length});var V=(d=d.filter(function(q,re){for(var ue=re+1;ue=0)return!1;return!0})).join(" | ");V!==this._attribHTML&&(this._attribHTML=V,d.length?(this._innerContainer.innerHTML=V,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},da.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var ml=function(){n.bindAll(["_updateLogo"],this),n.bindAll(["_updateCompact"],this)};ml.prototype.onAdd=function(d){this._map=d,this._container=s.create("div","mapboxgl-ctrl");var _=s.create("a","mapboxgl-ctrl-logo");return _.target="_blank",_.rel="noopener nofollow",_.href="https://www.mapbox.com/",_.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),_.setAttribute("rel","noopener nofollow"),this._container.appendChild(_),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ml.prototype.onRemove=function(){s.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ml.prototype.getDefaultPosition=function(){return"bottom-left"},ml.prototype._updateLogo=function(d){d&&d.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")},ml.prototype._logoRequired=function(){if(this._map.style){var d=this._map.style.sourceCaches;for(var _ in d)if(d[_].getSource().mapbox_logo)return!0;return!1}},ml.prototype._updateCompact=function(){var d=this._container.children;if(d.length){var _=d[0];this._map.getCanvasContainer().offsetWidth<250?_.classList.add("mapboxgl-compact"):_.classList.remove("mapboxgl-compact")}};var Rs=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Rs.prototype.add=function(d){var _=++this._id;return this._queue.push({callback:d,id:_,cancelled:!1}),_},Rs.prototype.remove=function(d){for(var _=this._currentlyRunning,p=0,b=_?this._queue.concat(_):this._queue;pb.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(b.minPitch!=null&&b.maxPitch!=null&&b.minPitch>b.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(b.minPitch!=null&&b.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(b.maxPitch!=null&&b.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var k=new vr(b.minZoom,b.maxZoom,b.minPitch,b.maxPitch,b.renderWorldCopies);if(d.call(this,k,b),this._interactive=b.interactive,this._maxTileCacheSize=b.maxTileCacheSize,this._failIfMajorPerformanceCaveat=b.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=b.preserveDrawingBuffer,this._antialias=b.antialias,this._trackResize=b.trackResize,this._bearingSnap=b.bearingSnap,this._refreshExpiredTiles=b.refreshExpiredTiles,this._fadeDuration=b.fadeDuration,this._crossSourceCollisions=b.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=b.collectResourceTiming,this._renderTaskQueue=new Rs,this._controls=[],this._mapId=n.uniqueId(),this._locale=n.extend({},Ma,b.locale),this._clickTolerance=b.clickTolerance,this._requestManager=new n.RequestManager(b.transformRequest,b.accessToken),typeof b.container=="string"){if(this._container=n.window.document.getElementById(b.container),!this._container)throw new Error("Container '"+b.container+"' not found.")}else{if(!(b.container instanceof $f))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=b.container}if(b.maxBounds&&this.setMaxBounds(b.maxBounds),n.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return B._update(!1)}),this.on("moveend",function(){return B._update(!1)}),this.on("zoom",function(){return B._update(!0)}),n.window!==void 0&&(n.window.addEventListener("online",this._onWindowOnline,!1),n.window.addEventListener("resize",this._onWindowResize,!1),n.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new zr(this,b),this._hash=b.hash&&new Ci(typeof b.hash=="string"&&b.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:b.center,zoom:b.zoom,bearing:b.bearing,pitch:b.pitch}),b.bounds&&(this.resize(),this.fitBounds(b.bounds,n.extend({},b.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=b.localIdeographFontFamily,b.style&&this.setStyle(b.style,{localIdeographFontFamily:b.localIdeographFontFamily}),b.attributionControl&&this.addControl(new da({customAttribution:b.customAttribution})),this.addControl(new ml,b.logoPosition),this.on("style.load",function(){B.transform.unmodified&&B.jumpTo(B.style.stylesheet)}),this.on("data",function(V){B._update(V.dataType==="style"),B.fire(new n.Event(V.dataType+"data",V))}),this.on("dataloading",function(V){B.fire(new n.Event(V.dataType+"dataloading",V))})}d&&(_.__proto__=d),(_.prototype=Object.create(d&&d.prototype)).constructor=_;var p={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return _.prototype._getMapId=function(){return this._mapId},_.prototype.addControl=function(b,B){if(B===void 0&&(B=b.getDefaultPosition?b.getDefaultPosition():"top-right"),!b||!b.onAdd)return this.fire(new n.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var k=b.onAdd(this);this._controls.push(b);var V=this._controlPositions[B];return B.indexOf("bottom")!==-1?V.insertBefore(k,V.firstChild):V.appendChild(k),this},_.prototype.removeControl=function(b){if(!b||!b.onRemove)return this.fire(new n.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var B=this._controls.indexOf(b);return B>-1&&this._controls.splice(B,1),b.onRemove(this),this},_.prototype.hasControl=function(b){return this._controls.indexOf(b)>-1},_.prototype.resize=function(b){var B=this._containerDimensions(),k=B[0],V=B[1];if(k===this.transform.width&&V===this.transform.height)return this;this._resizeCanvas(k,V),this.transform.resize(k,V),this.painter.resize(k,V);var q=!this._moving;return q&&this.fire(new n.Event("movestart",b)).fire(new n.Event("move",b)),this.fire(new n.Event("resize",b)),q&&this.fire(new n.Event("moveend",b)),this},_.prototype.getBounds=function(){return this.transform.getBounds()},_.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},_.prototype.setMaxBounds=function(b){return this.transform.setMaxBounds(n.LngLatBounds.convert(b)),this._update()},_.prototype.setMinZoom=function(b){if((b=b??-2)>=-2&&b<=this.transform.maxZoom)return this.transform.minZoom=b,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=b,this._update(),this.getZoom()>b&&this.setZoom(b),this;throw new Error("maxZoom must be greater than the current minZoom")},_.prototype.getMaxZoom=function(){return this.transform.maxZoom},_.prototype.setMinPitch=function(b){if((b=b??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(b>=0&&b<=this.transform.maxPitch)return this.transform.minPitch=b,this._update(),this.getPitch()60)throw new Error("maxPitch must be less than or equal to 60");if(b>=this.transform.minPitch)return this.transform.maxPitch=b,this._update(),this.getPitch()>b&&this.setPitch(b),this;throw new Error("maxPitch must be greater than the current minPitch")},_.prototype.getMaxPitch=function(){return this.transform.maxPitch},_.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},_.prototype.setRenderWorldCopies=function(b){return this.transform.renderWorldCopies=b,this._update()},_.prototype.project=function(b){return this.transform.locationPoint(n.LngLat.convert(b))},_.prototype.unproject=function(b){return this.transform.pointLocation(n.Point.convert(b))},_.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},_.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},_.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},_.prototype._createDelegatedListener=function(b,B,k){var V,q=this;if(b==="mouseenter"||b==="mouseover"){var re=!1;return{layer:B,listener:k,delegates:{mousemove:function(Ee){var Ce=q.getLayer(B)?q.queryRenderedFeatures(Ee.point,{layers:[B]}):[];Ce.length?re||(re=!0,k.call(q,new us(b,q,Ee.originalEvent,{features:Ce}))):re=!1},mouseout:function(){re=!1}}}}if(b==="mouseleave"||b==="mouseout"){var ue=!1;return{layer:B,listener:k,delegates:{mousemove:function(Ee){(q.getLayer(B)?q.queryRenderedFeatures(Ee.point,{layers:[B]}):[]).length?ue=!0:ue&&(ue=!1,k.call(q,new us(b,q,Ee.originalEvent)))},mouseout:function(Ee){ue&&(ue=!1,k.call(q,new us(b,q,Ee.originalEvent)))}}}}return{layer:B,listener:k,delegates:(V={},V[b]=function(Ee){var Ce=q.getLayer(B)?q.queryRenderedFeatures(Ee.point,{layers:[B]}):[];Ce.length&&(Ee.features=Ce,k.call(q,Ee),delete Ee.features)},V)}},_.prototype.on=function(b,B,k){if(k===void 0)return d.prototype.on.call(this,b,B);var V=this._createDelegatedListener(b,B,k);for(var q in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[b]=this._delegatedListeners[b]||[],this._delegatedListeners[b].push(V),V.delegates)this.on(q,V.delegates[q]);return this},_.prototype.once=function(b,B,k){if(k===void 0)return d.prototype.once.call(this,b,B);var V=this._createDelegatedListener(b,B,k);for(var q in V.delegates)this.once(q,V.delegates[q]);return this},_.prototype.off=function(b,B,k){var V=this;return k===void 0?d.prototype.off.call(this,b,B):(this._delegatedListeners&&this._delegatedListeners[b]&&function(q){for(var re=q[b],ue=0;ue180;){var V=p.locationPoint(d);if(V.x>=0&&V.y>=0&&V.x<=p.width&&V.y<=p.height)break;d.lng>p.center.lng?d.lng-=360:d.lng+=360}return d}mn.prototype.down=function(d,_){this.mouseRotate.mousedown(d,_),this.mousePitch&&this.mousePitch.mousedown(d,_),s.disableDrag()},mn.prototype.move=function(d,_){var p=this.map,b=this.mouseRotate.mousemoveWindow(d,_);if(b&&b.bearingDelta&&p.setBearing(p.getBearing()+b.bearingDelta),this.mousePitch){var B=this.mousePitch.mousemoveWindow(d,_);B&&B.pitchDelta&&p.setPitch(p.getPitch()+B.pitchDelta)}},mn.prototype.off=function(){var d=this.element;s.removeEventListener(d,"mousedown",this.mousedown),s.removeEventListener(d,"touchstart",this.touchstart,{passive:!1}),s.removeEventListener(d,"touchmove",this.touchmove),s.removeEventListener(d,"touchend",this.touchend),s.removeEventListener(d,"touchcancel",this.reset),this.offTemp()},mn.prototype.offTemp=function(){s.enableDrag(),s.removeEventListener(n.window,"mousemove",this.mousemove),s.removeEventListener(n.window,"mouseup",this.mouseup)},mn.prototype.mousedown=function(d){this.down(n.extend({},d,{ctrlKey:!0,preventDefault:function(){return d.preventDefault()}}),s.mousePos(this.element,d)),s.addEventListener(n.window,"mousemove",this.mousemove),s.addEventListener(n.window,"mouseup",this.mouseup)},mn.prototype.mousemove=function(d){this.move(d,s.mousePos(this.element,d))},mn.prototype.mouseup=function(d){this.mouseRotate.mouseupWindow(d),this.mousePitch&&this.mousePitch.mouseupWindow(d),this.offTemp()},mn.prototype.touchstart=function(d){d.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=s.touchPos(this.element,d.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return d.preventDefault()}},this._startPos))},mn.prototype.touchmove=function(d){d.targetTouches.length!==1?this.reset():(this._lastPos=s.touchPos(this.element,d.targetTouches)[0],this.move({preventDefault:function(){return d.preventDefault()}},this._lastPos))},mn.prototype.touchend=function(d){d.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)=b}this._isDragging&&(this._pos=p.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new n.Event("dragstart"))),this.fire(new n.Event("drag")))},_.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new n.Event("dragend")),this._state="inactive"},_.prototype._addDragHandler=function(p){this._element.contains(p.originalEvent.target)&&(p.preventDefault(),this._positionDelta=p.point.sub(this._pos).add(this._offset),this._pointerdownPos=p.point,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))},_.prototype.setDraggable=function(p){return this._draggable=!!p,this._map&&(p?(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},_.prototype.isDraggable=function(){return this._draggable},_.prototype.setRotation=function(p){return this._rotation=p||0,this._update(),this},_.prototype.getRotation=function(){return this._rotation},_.prototype.setRotationAlignment=function(p){return this._rotationAlignment=p||"auto",this._update(),this},_.prototype.getRotationAlignment=function(){return this._rotationAlignment},_.prototype.setPitchAlignment=function(p){return this._pitchAlignment=p&&p!=="auto"?p:this._rotationAlignment,this._update(),this},_.prototype.getPitchAlignment=function(){return this._pitchAlignment},_}(n.Evented),VA={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},rh=0,xs=!1,td=function(d){function _(p){d.call(this),this.options=n.extend({},VA,p),n.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return d&&(_.__proto__=d),(_.prototype=Object.create(d&&d.prototype)).constructor=_,_.prototype.onAdd=function(p){var b;return this._map=p,this._container=s.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),b=this._setupUI,th!==void 0?b(th):n.window.navigator.permissions!==void 0?n.window.navigator.permissions.query({name:"geolocation"}).then(function(B){b(th=B.state!=="denied")}):b(th=!!n.window.navigator.geolocation),this._container},_.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(n.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(),s.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,rh=0,xs=!1},_.prototype._isOutOfMapMaxBounds=function(p){var b=this._map.getMaxBounds(),B=p.coords;return b&&(B.longitudeb.getEast()||B.latitudeb.getNorth())},_.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")}},_.prototype._onSuccess=function(p){if(this._map){if(this._isOutOfMapMaxBounds(p))return this._setErrorState(),this.fire(new n.Event("outofmaxbounds",p)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=p,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&&this._watchState!=="OFF"&&this._updateMarker(p),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(p),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new n.Event("geolocate",p)),this._finish()}},_.prototype._updateCamera=function(p){var b=new n.LngLat(p.coords.longitude,p.coords.latitude),B=p.coords.accuracy,k=this._map.getBearing(),V=n.extend({bearing:k},this.options.fitBoundsOptions);this._map.fitBounds(b.toBounds(B),V,{geolocateSource:!0})},_.prototype._updateMarker=function(p){if(p){var b=new n.LngLat(p.coords.longitude,p.coords.latitude);this._accuracyCircleMarker.setLngLat(b).addTo(this._map),this._userLocationDotMarker.setLngLat(b).addTo(this._map),this._accuracy=p.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},_.prototype._updateCircleRadius=function(){var p=this._map._container.clientHeight/2,b=this._map.unproject([0,p]),B=this._map.unproject([1,p]),k=b.distanceTo(B),V=Math.ceil(2*this._accuracy/k);this._circleElement.style.width=V+"px",this._circleElement.style.height=V+"px"},_.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},_.prototype._onError=function(p){if(this._map){if(this.options.trackUserLocation)if(p.code===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._geolocateButton.disabled=!0;var b=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=b,this._geolocateButton.setAttribute("aria-label",b),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(p.code===3&&xs)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new n.Event("error",p)),this._finish()}},_.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},_.prototype._setupUI=function(p){var b=this;if(this._container.addEventListener("contextmenu",function(V){return V.preventDefault()}),this._geolocateButton=s.create("button","mapboxgl-ctrl-geolocate",this._container),s.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",p===!1){n.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var B=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=B,this._geolocateButton.setAttribute("aria-label",B)}else{var k=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=k,this._geolocateButton.setAttribute("aria-label",k)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=s.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new ed(this._dotElement),this._circleElement=s.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ed({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(V){V.geolocateSource||b._watchState!=="ACTIVE_LOCK"||V.originalEvent&&V.originalEvent.type==="resize"||(b._watchState="BACKGROUND",b._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),b._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),b.fire(new n.Event("trackuserlocationend")))})},_.prototype.trigger=function(){if(!this._setup)return n.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 n.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":rh--,xs=!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 n.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 n.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(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){var p;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++rh>1?(p={maximumAge:6e5,timeout:0},xs=!0):(p=this.options.positionOptions,xs=!1),this._geolocationWatchID=n.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,p)}}else n.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},_.prototype._clearWatch=function(){n.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)},_}(n.Evented),Ga={maxWidth:100,unit:"metric"},mu=function(d){this.options=n.extend({},Ga,d),n.bindAll(["_onMove","setUnit"],this)};function ih(d,_,p){var b=p&&p.maxWidth||100,B=d._container.clientHeight/2,k=d.unproject([0,B]),V=d.unproject([b,B]),q=k.distanceTo(V);if(p&&p.unit==="imperial"){var re=3.2808*q;re>5280?gu(_,b,re/5280,d._getUIString("ScaleControl.Miles")):gu(_,b,re,d._getUIString("ScaleControl.Feet"))}else p&&p.unit==="nautical"?gu(_,b,q/1852,d._getUIString("ScaleControl.NauticalMiles")):q>=1e3?gu(_,b,q/1e3,d._getUIString("ScaleControl.Kilometers")):gu(_,b,q,d._getUIString("ScaleControl.Meters"))}function gu(d,_,p,b){var B,k,V,q=(B=p,(k=Math.pow(10,(""+Math.floor(B)).length-1))*(V=(V=B/k)>=10?10:V>=5?5:V>=3?3:V>=2?2:V>=1?1:function(re){var ue=Math.pow(10,Math.ceil(-Math.log(re)/Math.LN10));return Math.round(re*ue)/ue}(V)));d.style.width=_*(q/p)+"px",d.innerHTML=q+" "+b}mu.prototype.getDefaultPosition=function(){return"bottom-left"},mu.prototype._onMove=function(){ih(this._map,this._container,this.options)},mu.prototype.onAdd=function(d){return this._map=d,this._container=s.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",d.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},mu.prototype.onRemove=function(){s.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},mu.prototype.setUnit=function(d){this.options.unit=d,ih(this._map,this._container,this.options)};var Zo=function(d){this._fullscreen=!1,d&&d.container&&(d.container instanceof n.window.HTMLElement?this._container=d.container:n.warnOnce("Full screen control 'container' must be a DOM element.")),n.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in n.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in n.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in n.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in n.window.document&&(this._fullscreenchange="MSFullscreenChange")};Zo.prototype.onAdd=function(d){return this._map=d,this._container||(this._container=this._map.getContainer()),this._controlContainer=s.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",n.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Zo.prototype.onRemove=function(){s.remove(this._controlContainer),this._map=null,n.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Zo.prototype._checkFullscreenSupport=function(){return!!(n.window.document.fullscreenEnabled||n.window.document.mozFullScreenEnabled||n.window.document.msFullscreenEnabled||n.window.document.webkitFullscreenEnabled)},Zo.prototype._setupUI=function(){var d=this._fullscreenButton=s.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);s.create("span","mapboxgl-ctrl-icon",d).setAttribute("aria-hidden",!0),d.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),n.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Zo.prototype._updateTitle=function(){var d=this._getTitle();this._fullscreenButton.setAttribute("aria-label",d),this._fullscreenButton.title=d},Zo.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Zo.prototype._isFullscreen=function(){return this._fullscreen},Zo.prototype._changeIcon=function(){(n.window.document.fullscreenElement||n.window.document.mozFullScreenElement||n.window.document.webkitFullscreenElement||n.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())},Zo.prototype._onClickFullscreen=function(){this._isFullscreen()?n.window.document.exitFullscreen?n.window.document.exitFullscreen():n.window.document.mozCancelFullScreen?n.window.document.mozCancelFullScreen():n.window.document.msExitFullscreen?n.window.document.msExitFullscreen():n.window.document.webkitCancelFullScreen&&n.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 hp={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},cf=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),_u=function(d){function _(p){d.call(this),this.options=n.extend(Object.create(hp),p),n.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return d&&(_.__proto__=d),(_.prototype=Object.create(d&&d.prototype)).constructor=_,_.prototype.addTo=function(p){return this._map&&this.remove(),this._map=p,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._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),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 n.Event("open")),this},_.prototype.isOpen=function(){return!!this._map},_.prototype.remove=function(){return this._content&&s.remove(this._content),this._container&&(s.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",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new n.Event("close")),this},_.prototype.getLngLat=function(){return this._lngLat},_.prototype.setLngLat=function(p){return this._lngLat=n.LngLat.convert(p),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},_.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},_.prototype.getElement=function(){return this._container},_.prototype.setText=function(p){return this.setDOMContent(n.window.document.createTextNode(p))},_.prototype.setHTML=function(p){var b,B=n.window.document.createDocumentFragment(),k=n.window.document.createElement("body");for(k.innerHTML=p;b=k.firstChild;)B.appendChild(b);return this.setDOMContent(B)},_.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},_.prototype.setMaxWidth=function(p){return this.options.maxWidth=p,this._update(),this},_.prototype.setDOMContent=function(p){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=s.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(p),this._createCloseButton(),this._update(),this._focusFirstElement(),this},_.prototype.addClassName=function(p){this._container&&this._container.classList.add(p)},_.prototype.removeClassName=function(p){this._container&&this._container.classList.remove(p)},_.prototype.setOffset=function(p){return this.options.offset=p,this._update(),this},_.prototype.toggleClassName=function(p){if(this._container)return this._container.classList.toggle(p)},_.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=s.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))},_.prototype._onMouseUp=function(p){this._update(p.point)},_.prototype._onMouseMove=function(p){this._update(p.point)},_.prototype._onDrag=function(p){this._update(p.point)},_.prototype._update=function(p){var b=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=s.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=s.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Ce){return b._container.classList.add(Ce)}),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=eh(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||p)){var B=this._pos=this._trackPointer&&p?p:this._map.project(this._lngLat),k=this.options.anchor,V=function Ce(Me){if(Me){if(typeof Me=="number"){var He=Math.round(Math.sqrt(.5*Math.pow(Me,2)));return{center:new n.Point(0,0),top:new n.Point(0,Me),"top-left":new n.Point(He,He),"top-right":new n.Point(-He,He),bottom:new n.Point(0,-Me),"bottom-left":new n.Point(He,-He),"bottom-right":new n.Point(-He,-He),left:new n.Point(Me,0),right:new n.Point(-Me,0)}}if(Me instanceof n.Point||Array.isArray(Me)){var Ue=n.Point.convert(Me);return{center:Ue,top:Ue,"top-left":Ue,"top-right":Ue,bottom:Ue,"bottom-left":Ue,"bottom-right":Ue,left:Ue,right:Ue}}return{center:n.Point.convert(Me.center||[0,0]),top:n.Point.convert(Me.top||[0,0]),"top-left":n.Point.convert(Me["top-left"]||[0,0]),"top-right":n.Point.convert(Me["top-right"]||[0,0]),bottom:n.Point.convert(Me.bottom||[0,0]),"bottom-left":n.Point.convert(Me["bottom-left"]||[0,0]),"bottom-right":n.Point.convert(Me["bottom-right"]||[0,0]),left:n.Point.convert(Me.left||[0,0]),right:n.Point.convert(Me.right||[0,0])}}return Ce(new n.Point(0,0))}(this.options.offset);if(!k){var q,re=this._container.offsetWidth,ue=this._container.offsetHeight;q=B.y+V.bottom.ythis._map.transform.height-ue?["bottom"]:[],B.xthis._map.transform.width-re/2&&q.push("right"),k=q.length===0?"bottom":q.join("-")}var Ee=B.add(V[k]).round();s.setTransform(this._container,mc[k]+" translate("+Ee.x+"px,"+Ee.y+"px)"),fp(this._container,k,"popup")}},_.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var p=this._container.querySelector(cf);p&&p.focus()}},_.prototype._onClose=function(){this.remove()},_}(n.Evented),yu={version:n.version,supported:o,setRTLTextPlugin:n.setRTLTextPlugin,getRTLTextPluginStatus:n.getRTLTextPluginStatus,Map:zA,NavigationControl:Rl,GeolocateControl:td,AttributionControl:da,ScaleControl:mu,FullscreenControl:Zo,Popup:_u,Marker:ed,Style:fa,LngLat:n.LngLat,LngLatBounds:n.LngLatBounds,Point:n.Point,MercatorCoordinate:n.MercatorCoordinate,Evented:n.Evented,config:n.config,prewarm:function(){Ot().acquire(Pt)},clearPrewarmedResources:function(){var d=Dr;d&&(d.isPreloaded()&&d.numActive()===1?(d.release(Pt),Dr=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return n.config.ACCESS_TOKEN},set accessToken(d){n.config.ACCESS_TOKEN=d},get baseApiUrl(){return n.config.API_URL},set baseApiUrl(d){n.config.API_URL=d},get workerCount(){return Xt.workerCount},set workerCount(d){Xt.workerCount=d},get maxParallelImageRequests(){return n.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(d){n.config.MAX_PARALLEL_IMAGE_REQUESTS=d},clearStorage:function(d){n.clearTileCache(d)},workerUrl:""};return yu}),r})});var jV=Qt((MHe,yE)=>{(function(t,e,r,i){"use strict";var n=["","webkit","Moz","MS","ms","o"],o=e.createElement("div"),s="function",l=Math.round,u=Math.abs,h=Date.now;function v(xe,Be,Je){return setTimeout(J(xe,Je),Be)}function T(xe,Be,Je){return Array.isArray(xe)?(E(xe,Je[Be],Je),!0):!1}function E(xe,Be,Je){var vt;if(xe)if(xe.forEach)xe.forEach(Be,Je);else if(xe.length!==i)for(vt=0;vt\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",sn=t.console&&(t.console.warn||t.console.log);return sn&&sn.call(t.console,vt,qr),xe.apply(this,arguments)}}var O;typeof Object.assign!="function"?O=function(Be){if(Be===i||Be===null)throw new TypeError("Cannot convert undefined or null to object");for(var Je=Object(Be),vt=1;vt-1}function $(xe){return xe.trim().split(/\s+/g)}function Z(xe,Be,Je){if(xe.indexOf&&!Je)return xe.indexOf(Be);for(var vt=0;vtvs[Be]}):vt=vt.sort()),vt}function he(xe,Be){for(var Je,vt,tr=Be[0].toUpperCase()+Be.slice(1),qr=0;qr1&&!Je.firstMultiple?Je.firstMultiple=Ur(Be):tr===1&&(Je.firstMultiple=!1);var qr=Je.firstInput,sn=Je.firstMultiple,Co=sn?sn.center:qr.center,ts=Be.center=ci(vt);Be.timeStamp=h(),Be.deltaTime=Be.timeStamp-qr.timeStamp,Be.angle=Eo(Co,ts),Be.distance=To(Co,ts),kr(Je,Be),Be.offsetDirection=Dn(Be.deltaX,Be.deltaY);var vs=to(Be.deltaTime,Be.deltaX,Be.deltaY);Be.overallVelocityX=vs.x,Be.overallVelocityY=vs.y,Be.overallVelocity=u(vs.x)>u(vs.y)?vs.x:vs.y,Be.scale=sn?So(sn.pointers,vt):1,Be.rotation=sn?Xo(sn.pointers,vt):0,Be.maxPointers=Je.prevInput?Be.pointers.length>Je.prevInput.maxPointers?Be.pointers.length:Je.prevInput.maxPointers:Be.pointers.length,dr(Je,Be);var Sa=xe.element;me(Be.srcEvent.target,Sa)&&(Sa=Be.srcEvent.target),Be.target=Sa}function kr(xe,Be){var Je=Be.center,vt=xe.offsetDelta||{},tr=xe.prevDelta||{},qr=xe.prevInput||{};(Be.eventType===ae||qr.eventType===je)&&(tr=xe.prevDelta={x:qr.deltaX||0,y:qr.deltaY||0},vt=xe.offsetDelta={x:Je.x,y:Je.y}),Be.deltaX=tr.x+(Je.x-vt.x),Be.deltaY=tr.y+(Je.y-vt.y)}function dr(xe,Be){var Je=xe.lastInterval||Be,vt=Be.timeStamp-Je.timeStamp,tr,qr,sn,Co;if(Be.eventType!=lt&&(vt>wi||Je.velocity===i)){var ts=Be.deltaX-Je.deltaX,vs=Be.deltaY-Je.deltaY,Sa=to(vt,ts,vs);qr=Sa.x,sn=Sa.y,tr=u(Sa.x)>u(Sa.y)?Sa.x:Sa.y,Co=Dn(ts,vs),xe.lastInterval=Be}else tr=Je.velocity,qr=Je.velocityX,sn=Je.velocityY,Co=Je.direction;Be.velocity=tr,Be.velocityX=qr,Be.velocityY=sn,Be.direction=Co}function Ur(xe){for(var Be=[],Je=0;Je=u(Be)?xe<0?wt:$r:Be<0?xi:Ki}function To(xe,Be,Je){Je||(Je=Un);var vt=Be[Je[0]]-xe[Je[0]],tr=Be[Je[1]]-xe[Je[1]];return Math.sqrt(vt*vt+tr*tr)}function Eo(xe,Be,Je){Je||(Je=Un);var vt=Be[Je[0]]-xe[Je[0]],tr=Be[Je[1]]-xe[Je[1]];return Math.atan2(tr,vt)*180/Math.PI}function Xo(xe,Be){return Eo(Be[1],Be[0],No)+Eo(xe[1],xe[0],No)}function So(xe,Be){return To(Be[0],Be[1],No)/To(xe[0],xe[1],No)}var Us={mousedown:ae,mousemove:be,mouseup:je},Fc="mousedown",ql="mousemove mouseup";function sl(){this.evEl=Fc,this.evWin=ql,this.pressed=!1,Ji.apply(this,arguments)}W(sl,Ji,{handler:function(Be){var Je=Us[Be.type];Je&ae&&Be.button===0&&(this.pressed=!0),Je&be&&Be.which!==1&&(Je=je),this.pressed&&(Je&je&&(this.pressed=!1),this.callback(this.manager,Je,{pointers:[Be],changedPointers:[Be],pointerType:Jt,srcEvent:Be}))}});var Cl={pointerdown:ae,pointermove:be,pointerup:je,pointercancel:lt,pointerout:lt},al={2:or,3:ai,4:Jt,5:qt},Ms="pointerdown",ca="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(Ms="MSPointerDown",ca="MSPointerMove MSPointerUp MSPointerCancel");function Ml(){this.evEl=Ms,this.evWin=ca,Ji.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}W(Ml,Ji,{handler:function(Be){var Je=this.store,vt=!1,tr=Be.type.toLowerCase().replace("ms",""),qr=Cl[tr],sn=al[Be.pointerType]||Be.pointerType,Co=sn==or,ts=Z(Je,Be.pointerId,"pointerId");qr&ae&&(Be.button===0||Co)?ts<0&&(Je.push(Be),ts=Je.length-1):qr&(je|lt)&&(vt=!0),!(ts<0)&&(Je[ts]=Be,this.callback(this.manager,qr,{pointers:Je,changedPointers:[Be],pointerType:sn,srcEvent:Be}),vt&&Je.splice(ts,1))}});var ao={touchstart:ae,touchmove:be,touchend:je,touchcancel:lt},oe="touchstart",de="touchstart touchmove touchend touchcancel";function ve(){this.evTarget=oe,this.evWin=de,this.started=!1,Ji.apply(this,arguments)}W(ve,Ji,{handler:function(Be){var Je=ao[Be.type];if(Je===ae&&(this.started=!0),!!this.started){var vt=Pe.call(this,Be,Je);Je&(je|lt)&&vt[0].length-vt[1].length===0&&(this.started=!1),this.callback(this.manager,Je,{pointers:vt[0],changedPointers:vt[1],pointerType:or,srcEvent:Be})}}});function Pe(xe,Be){var Je=we(xe.touches),vt=we(xe.changedTouches);return Be&(je|lt)&&(Je=Oe(Je.concat(vt),"identifier",!0)),[Je,vt]}var ye={touchstart:ae,touchmove:be,touchend:je,touchcancel:lt},tt="touchstart touchmove touchend touchcancel";function rt(){this.evTarget=tt,this.targetIds={},Ji.apply(this,arguments)}W(rt,Ji,{handler:function(Be){var Je=ye[Be.type],vt=Se.call(this,Be,Je);vt&&this.callback(this.manager,Je,{pointers:vt[0],changedPointers:vt[1],pointerType:or,srcEvent:Be})}});function Se(xe,Be){var Je=we(xe.touches),vt=this.targetIds;if(Be&(ae|be)&&Je.length===1)return vt[Je[0].identifier]=!0,[Je,Je];var tr,qr,sn=we(xe.changedTouches),Co=[],ts=this.target;if(qr=Je.filter(function(vs){return me(vs.target,ts)}),Be===ae)for(tr=0;tr-1&&vt.splice(qr,1)};setTimeout(tr,Ge)}}function Xt(xe){for(var Be=xe.srcEvent.clientX,Je=xe.srcEvent.clientY,vt=0;vt-1&&this.requireFail.splice(Be,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(xe){return!!this.simultaneous[xe.id]},emit:function(xe){var Be=this,Je=this.state;function vt(tr){Be.manager.emit(tr,xe)}Je=Ln&&vt(Be.options.event+fc(Je))},tryEmit:function(xe){if(this.canEmit())return this.emit(xe);this.state=Oi},canEmit:function(){for(var xe=0;xeBe.threshold&&tr&Be.direction},attrTest:function(xe){return zs.prototype.attrTest.call(this,xe)&&(this.state&Xn||!(this.state&Xn)&&this.directionTest(xe))},emit:function(xe){this.pX=xe.deltaX,this.pY=xe.deltaY;var Be=ko(xe.direction);Be&&(xe.additionalEvent=this.options.event+Be),this._super.emit.call(this,xe)}});function zn(){zs.apply(this,arguments)}W(zn,zs,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[lr]},attrTest:function(xe){return this._super.attrTest.call(this,xe)&&(Math.abs(xe.scale-1)>this.options.threshold||this.state&Xn)},emit:function(xe){if(xe.scale!==1){var Be=xe.scale<1?"in":"out";xe.additionalEvent=this.options.event+Be}this._super.emit.call(this,xe)}});function ll(){yo.apply(this,arguments),this._timer=null,this._input=null}W(ll,yo,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[br]},process:function(xe){var Be=this.options,Je=xe.pointers.length===Be.pointers,vt=xe.distanceBe.time;if(this._input=xe,!vt||!Je||xe.eventType&(je|lt)&&!tr)this.reset();else if(xe.eventType&ae)this.reset(),this._timer=v(function(){this.state=en,this.tryEmit()},Be.time,this);else if(xe.eventType&je)return en;return Oi},reset:function(){clearTimeout(this._timer)},emit:function(xe){this.state===en&&(xe&&xe.eventType&je?this.manager.emit(this.options.event+"up",xe):(this._input.timeStamp=h(),this.manager.emit(this.options.event,this._input)))}});function cs(){zs.apply(this,arguments)}W(cs,zs,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[lr]},attrTest:function(xe){return this._super.attrTest.call(this,xe)&&(Math.abs(xe.rotation)>this.options.threshold||this.state&Xn)}});function zo(){zs.apply(this,arguments)}W(zo,zs,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:kn|Zi,pointers:1},getTouchAction:function(){return Uo.prototype.getTouchAction.call(this)},attrTest:function(xe){var Be=this.options.direction,Je;return Be&(kn|Zi)?Je=xe.overallVelocity:Be&kn?Je=xe.overallVelocityX:Be&Zi&&(Je=xe.overallVelocityY),this._super.attrTest.call(this,xe)&&Be&xe.offsetDirection&&xe.distance>this.options.threshold&&xe.maxPointers==this.options.pointers&&u(Je)>this.options.velocity&&xe.eventType&je},emit:function(xe){var Be=ko(xe.offsetDirection);Be&&this.manager.emit(this.options.event+Be,xe),this.manager.emit(this.options.event,xe)}});function ys(){yo.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}W(ys,yo,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[sr]},process:function(xe){var Be=this.options,Je=xe.pointers.length===Be.pointers,vt=xe.distance{"use strict";HO.exports=rS;HO.exports.default=rS;function rS(t,e,r){r=r||2;var i=e&&e.length,n=i?e[0]*r:t.length,o=CH(t,0,n,r,!0),s=[];if(!o||o.next===o.prev)return s;var l,u,h,v,T,E,M;if(i&&(o=rpe(t,e,o,r)),t.length>80*r){l=h=t[0],u=v=t[1];for(var O=r;Oh&&(h=T),E>v&&(v=E);M=Math.max(h-l,v-u),M=M!==0?32767/M:0}return X1(o,s,r,l,u,M,0),s}function CH(t,e,r,i,n){var o,s;if(n===VO(t,e,r,i)>0)for(o=e;o=e;o-=i)s=SH(o,t[o],t[o+1],s);return s&&iS(s,s.next)&&(K1(s),s=s.next),s}function Xm(t,e){if(!t)return t;e||(e=t);var r=t,i;do if(i=!1,!r.steiner&&(iS(r,r.next)||Ns(r.prev,r,r.next)===0)){if(K1(r),r=e=r.prev,r===r.next)break;i=!0}else r=r.next;while(i||r!==e);return e}function X1(t,e,r,i,n,o,s){if(t){!s&&o&&ape(t,i,n,o);for(var l=t,u,h;t.prev!==t.next;){if(u=t.prev,h=t.next,o?$de(t,i,n,o):Qde(t)){e.push(u.i/r|0),e.push(t.i/r|0),e.push(h.i/r|0),K1(t),t=h.next,l=h.next;continue}if(t=h,t===l){s?s===1?(t=epe(Xm(t),e,r),X1(t,e,r,i,n,o,2)):s===2&&tpe(t,e,r,i,n,o):X1(Xm(t),e,r,i,n,o,1);break}}}}function Qde(t){var e=t.prev,r=t,i=t.next;if(Ns(e,r,i)>=0)return!1;for(var n=e.x,o=r.x,s=i.x,l=e.y,u=r.y,h=i.y,v=no?n>s?n:s:o>s?o:s,M=l>u?l>h?l:h:u>h?u:h,O=i.next;O!==e;){if(O.x>=v&&O.x<=E&&O.y>=T&&O.y<=M&&v_(n,l,o,u,s,h,O.x,O.y)&&Ns(O.prev,O,O.next)>=0)return!1;O=O.next}return!0}function $de(t,e,r,i){var n=t.prev,o=t,s=t.next;if(Ns(n,o,s)>=0)return!1;for(var l=n.x,u=o.x,h=s.x,v=n.y,T=o.y,E=s.y,M=lu?l>h?l:h:u>h?u:h,z=v>T?v>E?v:E:T>E?T:E,W=UO(M,O,e,r,i),J=UO(F,z,e,r,i),K=t.prevZ,ne=t.nextZ;K&&K.z>=W&&ne&&ne.z<=J;){if(K.x>=M&&K.x<=F&&K.y>=O&&K.y<=z&&K!==n&&K!==s&&v_(l,v,u,T,h,E,K.x,K.y)&&Ns(K.prev,K,K.next)>=0||(K=K.prevZ,ne.x>=M&&ne.x<=F&&ne.y>=O&&ne.y<=z&&ne!==n&&ne!==s&&v_(l,v,u,T,h,E,ne.x,ne.y)&&Ns(ne.prev,ne,ne.next)>=0))return!1;ne=ne.nextZ}for(;K&&K.z>=W;){if(K.x>=M&&K.x<=F&&K.y>=O&&K.y<=z&&K!==n&&K!==s&&v_(l,v,u,T,h,E,K.x,K.y)&&Ns(K.prev,K,K.next)>=0)return!1;K=K.prevZ}for(;ne&&ne.z<=J;){if(ne.x>=M&&ne.x<=F&&ne.y>=O&&ne.y<=z&&ne!==n&&ne!==s&&v_(l,v,u,T,h,E,ne.x,ne.y)&&Ns(ne.prev,ne,ne.next)>=0)return!1;ne=ne.nextZ}return!0}function epe(t,e,r){var i=t;do{var n=i.prev,o=i.next.next;!iS(n,o)&&MH(n,i,i.next,o)&&Y1(n,o)&&Y1(o,n)&&(e.push(n.i/r|0),e.push(i.i/r|0),e.push(o.i/r|0),K1(i),K1(i.next),i=t=o),i=i.next}while(i!==t);return Xm(i)}function tpe(t,e,r,i,n,o){var s=t;do{for(var l=s.next.next;l!==s.prev;){if(s.i!==l.i&&upe(s,l)){var u=IH(s,l);s=Xm(s,s.next),u=Xm(u,u.next),X1(s,e,r,i,n,o,0),X1(u,e,r,i,n,o,0);return}l=l.next}s=s.next}while(s!==t)}function rpe(t,e,r,i){var n=[],o,s,l,u,h;for(o=0,s=e.length;o=r.next.y&&r.next.y!==r.y){var l=r.x+(n-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(l<=i&&l>o&&(o=l,s=r.x=r.x&&r.x>=h&&i!==r.x&&v_(ns.x||r.x===s.x&&spe(s,r)))&&(s=r,T=E)),r=r.next;while(r!==u);return s}function spe(t,e){return Ns(t.prev,t,e.prev)<0&&Ns(e.next,t,t.next)<0}function ape(t,e,r,i){var n=t;do n.z===0&&(n.z=UO(n.x,n.y,e,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,lpe(n)}function lpe(t){var e,r,i,n,o,s,l,u,h=1;do{for(r=t,t=null,o=null,s=0;r;){for(s++,i=r,l=0,e=0;e0||u>0&&i;)l!==0&&(u===0||!i||r.z<=i.z)?(n=r,r=r.nextZ,l--):(n=i,i=i.nextZ,u--),o?o.nextZ=n:t=n,n.prevZ=o,o=n;r=i}o.nextZ=null,h*=2}while(s>1);return t}function UO(t,e,r,i,n){return t=(t-r)*n|0,e=(e-i)*n|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function cpe(t){var e=t,r=t;do(e.x=(t-s)*(o-l)&&(t-s)*(i-l)>=(r-s)*(e-l)&&(r-s)*(o-l)>=(n-s)*(i-l)}function upe(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!fpe(t,e)&&(Y1(t,e)&&Y1(e,t)&&hpe(t,e)&&(Ns(t.prev,t,e.prev)||Ns(t,e.prev,e))||iS(t,e)&&Ns(t.prev,t,t.next)>0&&Ns(e.prev,e,e.next)>0)}function Ns(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function iS(t,e){return t.x===e.x&&t.y===e.y}function MH(t,e,r,i){var n=tS(Ns(t,e,r)),o=tS(Ns(t,e,i)),s=tS(Ns(r,i,t)),l=tS(Ns(r,i,e));return!!(n!==o&&s!==l||n===0&&eS(t,r,e)||o===0&&eS(t,i,e)||s===0&&eS(r,t,i)||l===0&&eS(r,e,i))}function eS(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function tS(t){return t>0?1:t<0?-1:0}function fpe(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&MH(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function Y1(t,e){return Ns(t.prev,t,t.next)<0?Ns(t,e,t.next)>=0&&Ns(t,t.prev,e)>=0:Ns(t,e,t.prev)<0||Ns(t,t.next,e)<0}function hpe(t,e){var r=t,i=!1,n=(t.x+e.x)/2,o=(t.y+e.y)/2;do r.y>o!=r.next.y>o&&r.next.y!==r.y&&n<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next;while(r!==t);return i}function IH(t,e){var r=new zO(t.i,t.x,t.y),i=new zO(e.i,e.x,e.y),n=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,o.next=i,i.prev=o,i}function SH(t,e,r,i){var n=new zO(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function K1(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function zO(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}rS.deviation=function(t,e,r,i){var n=e&&e.length,o=n?e[0]*r:t.length,s=Math.abs(VO(t,0,o,r));if(n)for(var l=0,u=e.length;l0&&(i+=t[n-1].length,r.holes.push(i))}return r}});var kS=Qt(Nd=>{"use strict";var U7=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",ZAe=U7+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",z7="["+U7+"]["+ZAe+"]*",JAe=new RegExp("^"+z7+"$"),QAe=function(t,e){let r=[],i=e.exec(t);for(;i;){let n=[];n.startIndex=e.lastIndex-i[0].length;let o=i.length;for(let s=0;s"u")};Nd.isExist=function(t){return typeof t<"u"};Nd.isEmptyObject=function(t){return Object.keys(t).length===0};Nd.merge=function(t,e,r){if(e){let i=Object.keys(e),n=i.length;for(let o=0;o{"use strict";var lD=kS(),eme={allowBooleanAttributes:!1,unpairedTags:[]};W7.validate=function(t,e){e=Object.assign({},eme,e);let r=[],i=!1,n=!1;t[0]==="\uFEFF"&&(t=t.substr(1));for(let o=0;o"&&t[o]!==" "&&t[o]!==" "&&t[o]!==` `&&t[o]!=="\r";o++)u+=t[o];if(u=u.trim(),u[u.length-1]==="/"&&(u=u.substring(0,u.length-1),o--),!lme(u)){let T;return u.trim().length===0?T="Invalid space after '<'.":T="Tag '"+u+"' is an invalid name.",ba("InvalidTag",T,Sc(t,o))}let h=ime(t,o);if(h===!1)return ba("InvalidAttr","Attributes for '"+u+"' have open quote.",Sc(t,o));let v=h.value;if(o=h.index,v[v.length-1]==="/"){let T=o-v.length;v=v.substring(0,v.length-1);let E=G7(v,e);if(E===!0)i=!0;else return ba(E.err.code,E.err.msg,Sc(t,T+E.err.line))}else if(l)if(h.tagClosed){if(v.trim().length>0)return ba("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",Sc(t,s));{let T=r.pop();if(u!==T.tagName){let E=Sc(t,T.tagStartPos);return ba("InvalidTag","Expected closing tag '"+T.tagName+"' (opened in line "+E.line+", col "+E.col+") instead of closing tag '"+u+"'.",Sc(t,s))}r.length==0&&(n=!0)}}else return ba("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",Sc(t,o));else{let T=G7(v,e);if(T!==!0)return ba(T.err.code,T.err.msg,Sc(t,o-v.length+T.err.line));if(n===!0)return ba("InvalidXml","Multiple possible root nodes found.",Sc(t,o));e.unpairedTags.indexOf(u)!==-1||r.push({tagName:u,tagStartPos:s}),i=!0}for(o++;o0)return ba("InvalidXml","Invalid '"+JSON.stringify(r.map(o=>o.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return ba("InvalidXml","Start tag expected.",1);return!0};function V7(t){return t===" "||t===" "||t===` `||t==="\r"}function H7(t,e){let r=e;for(;e5&&i==="xml")return ba("InvalidXml","XML declaration allowed only at the start of the document.",Sc(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function j7(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e"){e+=2;break}}return e}var tme='"',rme="'";function ime(t,e){let r="",i="",n=!1;for(;e"&&i===""){n=!0;break}r+=t[e]}return i!==""?!1:{value:r,index:e,tagClosed:n}}var nme=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function G7(t,e){let r=lD.getAllMatches(t,nme),i={};for(let n=0;n{var q7={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t}},cme=function(t){return Object.assign({},q7,t)};uD.buildOptions=cme;uD.defaultOptions=q7});var K7=Qt((I$e,Y7)=>{"use strict";var fD=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,r){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:r})}addChild(e){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,[":@"]:e[":@"]}):this.child.push({[e.tagname]:e.child})}};Y7.exports=fD});var J7=Qt((P$e,Z7)=>{var ume=kS();function fme(t,e){let r={};if(t[e+3]==="O"&&t[e+4]==="C"&&t[e+5]==="T"&&t[e+6]==="Y"&&t[e+7]==="P"&&t[e+8]==="E"){e=e+9;let i=1,n=!1,o=!1,s="";for(;e"){if(o?t[e-1]==="-"&&t[e-2]==="-"&&(o=!1,i--):i--,i===0)break}else t[e]==="["?n=!0:s+=t[e];if(i!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:r,i:e}}function hme(t,e){let r="";for(;e{var yme=/^[-+]?0x[a-fA-F0-9]+$/,vme=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt);!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);var xme={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function bme(t,e={}){if(e=Object.assign({},xme,e),!t||typeof t!="string")return t;let r=t.trim();if(e.skipLike!==void 0&&e.skipLike.test(r))return t;if(e.hex&&yme.test(r))return Number.parseInt(r,16);{let i=vme.exec(r);if(i){let n=i[1],o=i[2],s=wme(i[3]),l=i[4]||i[6];if(!e.leadingZeros&&o.length>0&&n&&r[2]!==".")return t;if(!e.leadingZeros&&o.length>0&&!n&&r[1]!==".")return t;{let u=Number(r),h=""+u;return h.search(/[eE]/)!==-1||l?e.eNotation?u:t:r.indexOf(".")!==-1?h==="0"&&s===""||h===s||n&&h==="-"+s?u:t:o?s===h||n+s===h?u:t:r===h||r===n+h?u:t}}else return t}}function wme(t){return t&&t.indexOf(".")!==-1&&(t=t.replace(/0+$/,""),t==="."?t="0":t[0]==="."?t="0"+t:t[t.length-1]==="."&&(t=t.substr(0,t.length-1))),t}Q7.exports=bme});var rG=Qt((B$e,tG)=>{"use strict";var eG=kS(),hb=K7(),Tme=J7(),Eme=$7(),hD=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(r,i)=>String.fromCharCode(Number.parseInt(i,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(r,i)=>String.fromCharCode(Number.parseInt(i,16))}},this.addExternalEntities=Sme,this.parseXml=Rme,this.parseTextData=Cme,this.resolveNameSpace=Mme,this.buildAttributesMap=Pme,this.isItStopNode=Lme,this.replaceEntitiesValue=Ome,this.readStopNodeData=Nme,this.saveTextToParentTag=Dme,this.addChild=Bme}};function Sme(t){let e=Object.keys(t);for(let r=0;r0)){s||(t=this.replaceEntitiesValue(t));let l=this.options.tagValueProcessor(e,t,r,n,o);return l==null?t:typeof l!=typeof t||l!==t?l:this.options.trimValues?pD(t,this.options.parseTagValue,this.options.numberParseOptions):t.trim()===t?pD(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function Mme(t){if(this.options.removeNSPrefix){let e=t.split(":"),r=t.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(t=r+e[1])}return t}var Ime=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Pme(t,e,r){if(!this.options.ignoreAttributes&&typeof t=="string"){let i=eG.getAllMatches(t,Ime),n=i.length,o={};for(let s=0;s",o,"Closing Tag is not closed."),u=t.substring(o+2,l).trim();if(this.options.removeNSPrefix){let T=u.indexOf(":");T!==-1&&(u=u.substr(T+1))}this.options.transformTagName&&(u=this.options.transformTagName(u)),r&&(i=this.saveTextToParentTag(i,r,n));let h=n.substring(n.lastIndexOf(".")+1);if(u&&this.options.unpairedTags.indexOf(u)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let v=0;h&&this.options.unpairedTags.indexOf(h)!==-1?(v=n.lastIndexOf(".",n.lastIndexOf(".")-1),this.tagsNodeStack.pop()):v=n.lastIndexOf("."),n=n.substring(0,v),r=this.tagsNodeStack.pop(),i="",o=l}else if(t[o+1]==="?"){let l=dD(t,o,!1,"?>");if(!l)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,r,n),!(this.options.ignoreDeclaration&&l.tagName==="?xml"||this.options.ignorePiTags)){let u=new hb(l.tagName);u.add(this.options.textNodeName,""),l.tagName!==l.tagExp&&l.attrExpPresent&&(u[":@"]=this.buildAttributesMap(l.tagExp,n,l.tagName)),this.addChild(r,u,n)}o=l.closeIndex+1}else if(t.substr(o+1,3)==="!--"){let l=$m(t,"-->",o+4,"Comment is not closed.");if(this.options.commentPropName){let u=t.substring(o+4,l-2);i=this.saveTextToParentTag(i,r,n),r.add(this.options.commentPropName,[{[this.options.textNodeName]:u}])}o=l}else if(t.substr(o+1,2)==="!D"){let l=Tme(t,o);this.docTypeEntities=l.entities,o=l.i}else if(t.substr(o+1,2)==="!["){let l=$m(t,"]]>",o,"CDATA is not closed.")-2,u=t.substring(o+9,l);i=this.saveTextToParentTag(i,r,n);let h=this.parseTextData(u,r.tagname,n,!0,!1,!0,!0);h==null&&(h=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:u}]):r.add(this.options.textNodeName,h),o=l+2}else{let l=dD(t,o,this.options.removeNSPrefix),u=l.tagName,h=l.rawTagName,v=l.tagExp,T=l.attrExpPresent,E=l.closeIndex;this.options.transformTagName&&(u=this.options.transformTagName(u)),r&&i&&r.tagname!=="!xml"&&(i=this.saveTextToParentTag(i,r,n,!1));let M=r;if(M&&this.options.unpairedTags.indexOf(M.tagname)!==-1&&(r=this.tagsNodeStack.pop(),n=n.substring(0,n.lastIndexOf("."))),u!==e.tagname&&(n+=n?"."+u:u),this.isItStopNode(this.options.stopNodes,n,u)){let O="";if(v.length>0&&v.lastIndexOf("/")===v.length-1)o=l.closeIndex;else if(this.options.unpairedTags.indexOf(u)!==-1)o=l.closeIndex;else{let z=this.readStopNodeData(t,h,E+1);if(!z)throw new Error(`Unexpected end of ${h}`);o=z.i,O=z.tagContent}let F=new hb(u);u!==v&&T&&(F[":@"]=this.buildAttributesMap(v,n,u)),O&&(O=this.parseTextData(O,u,n,!0,T,!0,!0)),n=n.substr(0,n.lastIndexOf(".")),F.add(this.options.textNodeName,O),this.addChild(r,F,n)}else{if(v.length>0&&v.lastIndexOf("/")===v.length-1){u[u.length-1]==="/"?(u=u.substr(0,u.length-1),n=n.substr(0,n.length-1),v=u):v=v.substr(0,v.length-1),this.options.transformTagName&&(u=this.options.transformTagName(u));let O=new hb(u);u!==v&&T&&(O[":@"]=this.buildAttributesMap(v,n,u)),this.addChild(r,O,n),n=n.substr(0,n.lastIndexOf("."))}else{let O=new hb(u);this.tagsNodeStack.push(r),u!==v&&T&&(O[":@"]=this.buildAttributesMap(v,n,u)),this.addChild(r,O,n),r=O}i="",o=E}}else i+=t[o];return e.child};function Bme(t,e,r){let i=this.options.updateTag(e.tagname,r,e[":@"]);i===!1||(typeof i=="string"&&(e.tagname=i),t.addChild(e))}var Ome=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){let r=this.docTypeEntities[e];t=t.replace(r.regx,r.val)}for(let e in this.lastEntities){let r=this.lastEntities[e];t=t.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){let r=this.htmlEntities[e];t=t.replace(r.regex,r.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function Dme(t,e,r,i){return t&&(i===void 0&&(i=Object.keys(e.child).length===0),t=this.parseTextData(t,e.tagname,r,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,i),t!==void 0&&t!==""&&e.add(this.options.textNodeName,t),t=""),t}function Lme(t,e,r){let i="*."+r;for(let n in t){let o=t[n];if(i===o||e===o)return!0}return!1}function Fme(t,e,r=">"){let i,n="";for(let o=e;o",r,`${e} is not closed`);if(t.substring(r+2,o).trim()===e&&(n--,n===0))return{tagContent:t.substring(i,r),i:o};r=o}else if(t[r+1]==="?")r=$m(t,"?>",r+1,"StopNode is not closed.");else if(t.substr(r+1,3)==="!--")r=$m(t,"-->",r+3,"StopNode is not closed.");else if(t.substr(r+1,2)==="![")r=$m(t,"]]>",r,"StopNode is not closed.")-2;else{let o=dD(t,r,">");o&&((o&&o.tagName)===e&&o.tagExp[o.tagExp.length-1]!=="/"&&n++,r=o.closeIndex)}}function pD(t,e,r){if(e&&typeof t=="string"){let i=t.trim();return i==="true"?!0:i==="false"?!1:Eme(t,r)}else return eG.isExist(t)?t:""}tG.exports=hD});var oG=Qt(nG=>{"use strict";function kme(t,e){return iG(t,e)}function iG(t,e,r){let i,n={};for(let o=0;o0&&(n[e.textNodeName]=i):i!==void 0&&(n[e.textNodeName]=i),n}function Ume(t){let e=Object.keys(t);for(let r=0;r{var{buildOptions:Hme}=X7(),jme=rG(),{prettify:Gme}=oG(),Wme=cD(),AD=class{constructor(e){this.externalEntities={},this.options=Hme(e)}parse(e,r){if(typeof e!="string")if(e.toString)e=e.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(r){r===!0&&(r={});let o=Wme.validate(e,r);if(o!==!0)throw Error(`${o.err.msg}:${o.err.line}:${o.err.col}`)}let i=new jme(this.options);i.addExternalEntities(this.externalEntities);let n=i.parseXml(e);return this.options.preserveOrder||n===void 0?n:Gme(n,this.options)}addEntity(e,r){if(r.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(e.indexOf("&")!==-1||e.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if(r==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=r}};sG.exports=AD});var hG=Qt((L$e,fG)=>{var qme=` `;function Xme(t,e){let r="";return e.format&&e.indentBy.length>0&&(r=qme),cG(t,e,"",r)}function cG(t,e,r,i){let n="",o=!1;for(let s=0;s`,o=!1;continue}else if(u===e.commentPropName){n+=i+``,o=!0;continue}else if(u[0]==="?"){let O=lG(l[":@"],e),F=u==="?xml"?"":i,z=l[u][0][e.textNodeName];z=z.length!==0?" "+z:"",n+=F+`<${u}${z}${O}?>`,o=!0;continue}let v=i;v!==""&&(v+=e.indentBy);let T=lG(l[":@"],e),E=i+`<${u}${T}`,M=cG(l[u],e,h,v);e.unpairedTags.indexOf(u)!==-1?e.suppressUnpairedNode?n+=E+">":n+=E+"/>":(!M||M.length===0)&&e.suppressEmptyNode?n+=E+"/>":M&&M.endsWith(">")?n+=E+`>${M}${i}`:(n+=E+">",M&&i!==""&&(M.includes("/>")||M.includes("`),o=!0}return n}function Yme(t){let e=Object.keys(t);for(let r=0;r0&&e.processEntities)for(let r=0;r{"use strict";var Zme=hG(),Jme={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function $p(t){this.options=Object.assign({},Jme,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=ege),this.processTextOrObjNode=Qme,this.options.format?(this.indentate=$me,this.tagEndChar=`> `,this.newLine=` `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}$p.prototype.build=function(t){return this.options.preserveOrder?Zme(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)};$p.prototype.j2x=function(t,e){let r="",i="";for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n))if(typeof t[n]>"u")this.isAttribute(n)&&(i+="");else if(t[n]===null)this.isAttribute(n)?i+="":n[0]==="?"?i+=this.indentate(e)+"<"+n+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+n+"/"+this.tagEndChar;else if(t[n]instanceof Date)i+=this.buildTextValNode(t[n],n,"",e);else if(typeof t[n]!="object"){let o=this.isAttribute(n);if(o)r+=this.buildAttrPairStr(o,""+t[n]);else if(n===this.options.textNodeName){let s=this.options.tagValueProcessor(n,""+t[n]);i+=this.replaceEntitiesValue(s)}else i+=this.buildTextValNode(t[n],n,"",e)}else if(Array.isArray(t[n])){let o=t[n].length,s="";for(let l=0;l"u"||(u===null?n[0]==="?"?i+=this.indentate(e)+"<"+n+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+n+"/"+this.tagEndChar:typeof u=="object"?this.options.oneListGroup?s+=this.j2x(u,e+1).val:s+=this.processTextOrObjNode(u,n,e):s+=this.buildTextValNode(u,n,"",e))}this.options.oneListGroup&&(s=this.buildObjectNode(s,n,"",e)),i+=s}else if(this.options.attributesGroupName&&n===this.options.attributesGroupName){let o=Object.keys(t[n]),s=o.length;for(let l=0;l"+t+n:this.options.commentPropName!==!1&&e===this.options.commentPropName&&o.length===0?this.indentate(i)+``+this.newLine:this.indentate(i)+"<"+e+r+o+this.tagEndChar+t+this.indentate(i)+n}};$p.prototype.closeTag=function(t){let e="";return this.options.unpairedTags.indexOf(t)!==-1?this.options.suppressUnpairedNode||(e="/"):this.options.suppressEmptyNode?e="/":e=`>`+this.newLine;if(this.options.commentPropName!==!1&&e===this.options.commentPropName)return this.indentate(i)+``+this.newLine;if(e[0]==="?")return this.indentate(i)+"<"+e+r+"?"+this.tagEndChar;{let n=this.options.tagValueProcessor(e,t);return n=this.replaceEntitiesValue(n),n===""?this.indentate(i)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+r+">"+n+"0&&this.options.processEntities)for(let e=0;e{"use strict";var tge=cD(),rge=aG(),ige=pG();AG.exports={XMLParser:rge,XMLValidator:tge,XMLBuilder:ige}});var ED=Qt((CG,gb)=>{(function(t,e){typeof define=="function"&&define.amd?define([],e):typeof P6=="function"&&typeof gb=="object"&&gb&&gb.exports?gb.exports=e():(t.dcodeIO=t.dcodeIO||{}).Long=e()})(CG,function(){"use strict";function t($,Z,we){this.low=$|0,this.high=Z|0,this.unsigned=!!we}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1});function e($){return($&&$.__isLong__)===!0}t.isLong=e;var r={},i={};function n($,Z){var we,Oe,he;return Z?($>>>=0,(he=0<=$&&$<256)&&(Oe=i[$],Oe)?Oe:(we=s($,($|0)<0?-1:0,!0),he&&(i[$]=we),we)):($|=0,(he=-128<=$&&$<128)&&(Oe=r[$],Oe)?Oe:(we=s($,$<0?-1:0,!1),he&&(r[$]=we),we))}t.fromInt=n;function o($,Z){if(isNaN($)||!isFinite($))return Z?W:z;if(Z){if($<0)return W;if($>=M)return j}else{if($<=-O)return me;if($+1>=O)return ge}return $<0?o(-$,Z).neg():s($%E|0,$/E|0,Z)}t.fromNumber=o;function s($,Z,we){return new t($,Z,we)}t.fromBits=s;var l=Math.pow;function u($,Z,we){if($.length===0)throw Error("empty string");if($==="NaN"||$==="Infinity"||$==="+Infinity"||$==="-Infinity")return z;if(typeof Z=="number"?(we=Z,Z=!1):Z=!!Z,we=we||10,we<2||360)throw Error("interior hyphen");if(Oe===0)return u($.substring(1),Z,we).neg();for(var he=o(l(we,8)),Le=z,ft=0;ft<$.length;ft+=8){var Vt=Math.min(8,$.length-ft),Yt=parseInt($.substring(ft,ft+Vt),we);if(Vt<8){var mr=o(l(we,Vt));Le=Le.mul(mr).add(o(Yt))}else Le=Le.mul(he),Le=Le.add(o(Yt))}return Le.unsigned=Z,Le}t.fromString=u;function h($){return $ instanceof t?$:typeof $=="number"?o($):typeof $=="string"?u($):s($.low,$.high,$.unsigned)}t.fromValue=h;var v=1<<16,T=1<<24,E=v*v,M=E*E,O=M/2,F=n(T),z=n(0);t.ZERO=z;var W=n(0,!0);t.UZERO=W;var J=n(1);t.ONE=J;var K=n(1,!0);t.UONE=K;var ne=n(-1);t.NEG_ONE=ne;var ge=s(-1,2147483647,!1);t.MAX_VALUE=ge;var j=s(-1,-1,!0);t.MAX_UNSIGNED_VALUE=j;var me=s(0,-2147483648,!1);t.MIN_VALUE=me;var fe=t.prototype;return fe.toInt=function(){return this.unsigned?this.low>>>0:this.low},fe.toNumber=function(){return this.unsigned?(this.high>>>0)*E+(this.low>>>0):this.high*E+(this.low>>>0)},fe.toString=function(Z){if(Z=Z||10,Z<2||36>>0,Er=mr.toString(Z);if(ft=Yt,ft.isZero())return Er+Vt;for(;Er.length<6;)Er="0"+Er;Vt=""+Er+Vt}},fe.getHighBits=function(){return this.high},fe.getHighBitsUnsigned=function(){return this.high>>>0},fe.getLowBits=function(){return this.low},fe.getLowBitsUnsigned=function(){return this.low>>>0},fe.getNumBitsAbs=function(){if(this.isNegative())return this.eq(me)?64:this.neg().getNumBitsAbs();for(var Z=this.high!=0?this.high:this.low,we=31;we>0&&!(Z&1<=0},fe.isOdd=function(){return(this.low&1)===1},fe.isEven=function(){return(this.low&1)===0},fe.equals=function(Z){return e(Z)||(Z=h(Z)),this.unsigned!==Z.unsigned&&this.high>>>31===1&&Z.high>>>31===1?!1:this.high===Z.high&&this.low===Z.low},fe.eq=fe.equals,fe.notEquals=function(Z){return!this.eq(Z)},fe.neq=fe.notEquals,fe.lessThan=function(Z){return this.comp(Z)<0},fe.lt=fe.lessThan,fe.lessThanOrEqual=function(Z){return this.comp(Z)<=0},fe.lte=fe.lessThanOrEqual,fe.greaterThan=function(Z){return this.comp(Z)>0},fe.gt=fe.greaterThan,fe.greaterThanOrEqual=function(Z){return this.comp(Z)>=0},fe.gte=fe.greaterThanOrEqual,fe.compare=function(Z){if(e(Z)||(Z=h(Z)),this.eq(Z))return 0;var we=this.isNegative(),Oe=Z.isNegative();return we&&!Oe?-1:!we&&Oe?1:this.unsigned?Z.high>>>0>this.high>>>0||Z.high===this.high&&Z.low>>>0>this.low>>>0?-1:1:this.sub(Z).isNegative()?-1:1},fe.comp=fe.compare,fe.negate=function(){return!this.unsigned&&this.eq(me)?me:this.not().add(J)},fe.neg=fe.negate,fe.add=function(Z){e(Z)||(Z=h(Z));var we=this.high>>>16,Oe=this.high&65535,he=this.low>>>16,Le=this.low&65535,ft=Z.high>>>16,Vt=Z.high&65535,Yt=Z.low>>>16,mr=Z.low&65535,Er=0,Jr=0,or=0,ai=0;return ai+=Le+mr,or+=ai>>>16,ai&=65535,or+=he+Yt,Jr+=or>>>16,or&=65535,Jr+=Oe+Vt,Er+=Jr>>>16,Jr&=65535,Er+=we+ft,Er&=65535,s(or<<16|ai,Er<<16|Jr,this.unsigned)},fe.subtract=function(Z){return e(Z)||(Z=h(Z)),this.add(Z.neg())},fe.sub=fe.subtract,fe.multiply=function(Z){if(this.isZero()||(e(Z)||(Z=h(Z)),Z.isZero()))return z;if(this.eq(me))return Z.isOdd()?me:z;if(Z.eq(me))return this.isOdd()?me:z;if(this.isNegative())return Z.isNegative()?this.neg().mul(Z.neg()):this.neg().mul(Z).neg();if(Z.isNegative())return this.mul(Z.neg()).neg();if(this.lt(F)&&Z.lt(F))return o(this.toNumber()*Z.toNumber(),this.unsigned);var we=this.high>>>16,Oe=this.high&65535,he=this.low>>>16,Le=this.low&65535,ft=Z.high>>>16,Vt=Z.high&65535,Yt=Z.low>>>16,mr=Z.low&65535,Er=0,Jr=0,or=0,ai=0;return ai+=Le*mr,or+=ai>>>16,ai&=65535,or+=he*mr,Jr+=or>>>16,or&=65535,or+=Le*Yt,Jr+=or>>>16,or&=65535,Jr+=Oe*mr,Er+=Jr>>>16,Jr&=65535,Jr+=he*Yt,Er+=Jr>>>16,Jr&=65535,Jr+=Le*Vt,Er+=Jr>>>16,Jr&=65535,Er+=we*mr+Oe*Yt+he*Vt+Le*ft,Er&=65535,s(or<<16|ai,Er<<16|Jr,this.unsigned)},fe.mul=fe.multiply,fe.divide=function(Z){if(e(Z)||(Z=h(Z)),Z.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?W:z;var we,Oe,he;if(this.unsigned){if(Z.unsigned||(Z=Z.toUnsigned()),Z.gt(this))return W;if(Z.gt(this.shru(1)))return K;he=W}else{if(this.eq(me)){if(Z.eq(J)||Z.eq(ne))return me;if(Z.eq(me))return J;var Le=this.shr(1);return we=Le.div(Z).shl(1),we.eq(z)?Z.isNegative()?J:ne:(Oe=this.sub(Z.mul(we)),he=we.add(Oe.div(Z)),he)}else if(Z.eq(me))return this.unsigned?W:z;if(this.isNegative())return Z.isNegative()?this.neg().div(Z.neg()):this.neg().div(Z).neg();if(Z.isNegative())return this.div(Z.neg()).neg();he=z}for(Oe=this;Oe.gte(Z);){we=Math.max(1,Math.floor(Oe.toNumber()/Z.toNumber()));for(var ft=Math.ceil(Math.log(we)/Math.LN2),Vt=ft<=48?1:l(2,ft-48),Yt=o(we),mr=Yt.mul(Z);mr.isNegative()||mr.gt(Oe);)we-=Vt,Yt=o(we,this.unsigned),mr=Yt.mul(Z);Yt.isZero()&&(Yt=J),he=he.add(Yt),Oe=Oe.sub(mr)}return he},fe.div=fe.divide,fe.modulo=function(Z){return e(Z)||(Z=h(Z)),this.sub(this.div(Z).mul(Z))},fe.mod=fe.modulo,fe.not=function(){return s(~this.low,~this.high,this.unsigned)},fe.and=function(Z){return e(Z)||(Z=h(Z)),s(this.low&Z.low,this.high&Z.high,this.unsigned)},fe.or=function(Z){return e(Z)||(Z=h(Z)),s(this.low|Z.low,this.high|Z.high,this.unsigned)},fe.xor=function(Z){return e(Z)||(Z=h(Z)),s(this.low^Z.low,this.high^Z.high,this.unsigned)},fe.shiftLeft=function(Z){return e(Z)&&(Z=Z.toInt()),(Z&=63)===0?this:Z<32?s(this.low<>>32-Z,this.unsigned):s(0,this.low<>>Z|this.high<<32-Z,this.high>>Z,this.unsigned):s(this.high>>Z-32,this.high>=0?0:-1,this.unsigned)},fe.shr=fe.shiftRight,fe.shiftRightUnsigned=function(Z){if(e(Z)&&(Z=Z.toInt()),Z&=63,Z===0)return this;var we=this.high;if(Z<32){var Oe=this.low;return s(Oe>>>Z|we<<32-Z,we>>>Z,this.unsigned)}else return Z===32?s(we,0,this.unsigned):s(we>>>Z-32,0,this.unsigned)},fe.shru=fe.shiftRightUnsigned,fe.toSigned=function(){return this.unsigned?s(this.low,this.high,!1):this},fe.toUnsigned=function(){return this.unsigned?this:s(this.low,this.high,!0)},fe.toBytes=function($){return $?this.toBytesLE():this.toBytesBE()},fe.toBytesLE=function(){var $=this.high,Z=this.low;return[Z&255,Z>>>8&255,Z>>>16&255,Z>>>24&255,$&255,$>>>8&255,$>>>16&255,$>>>24&255]},fe.toBytesBE=function(){var $=this.high,Z=this.low;return[$>>>24&255,$>>>16&255,$>>>8&255,$&255,Z>>>24&255,Z>>>16&255,Z>>>8&255,Z&255]},t})});var cY=Qt(dF=>{dF.read=function(t,e,r,i,n){var o,s,l=n*8-i-1,u=(1<>1,v=-7,T=r?n-1:0,E=r?-1:1,M=t[e+T];for(T+=E,o=M&(1<<-v)-1,M>>=-v,v+=l;v>0;o=o*256+t[e+T],T+=E,v-=8);for(s=o&(1<<-v)-1,o>>=-v,v+=i;v>0;s=s*256+t[e+T],T+=E,v-=8);if(o===0)o=1-h;else{if(o===u)return s?NaN:(M?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-h}return(M?-1:1)*s*Math.pow(2,o-i)};dF.write=function(t,e,r,i,n,o){var s,l,u,h=o*8-n-1,v=(1<>1,E=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,M=i?0:o-1,O=i?1:-1,F=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,s=v):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+T>=1?e+=E/u:e+=E*Math.pow(2,1-T),e*u>=2&&(s++,u/=2),s+T>=v?(l=0,s=v):s+T>=1?(l=(e*u-1)*Math.pow(2,n),s=s+T):(l=e*Math.pow(2,T-1)*Math.pow(2,n),s=0));n>=8;t[r+M]=l&255,M+=O,l/=256,n-=8);for(s=s<0;t[r+M]=s&255,M+=O,s/=256,h-=8);t[r+M-O]|=F*128}});var AY=Qt((qft,pY)=>{"use strict";pY.exports=_o;var fM=cY();function _o(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}_o.Varint=0;_o.Fixed64=1;_o.Bytes=2;_o.Fixed32=5;var pF=(1<<16)*(1<<16),uY=1/pF,abe=12,dY=typeof TextDecoder>"u"?null:new TextDecoder("utf8");_o.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos>3,o=this.pos;this.type=i&7,t(n,e,this),this.pos===o&&this.skip(i)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=hM(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=hY(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=hM(this.buf,this.pos)+hM(this.buf,this.pos+4)*pF;return this.pos+=8,t},readSFixed64:function(){var t=hM(this.buf,this.pos)+hY(this.buf,this.pos+4)*pF;return this.pos+=8,t},readFloat:function(){var t=fM.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=fM.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e=this.buf,r,i;return i=e[this.pos++],r=i&127,i<128||(i=e[this.pos++],r|=(i&127)<<7,i<128)||(i=e[this.pos++],r|=(i&127)<<14,i<128)||(i=e[this.pos++],r|=(i&127)<<21,i<128)?r:(i=e[this.pos],r|=(i&15)<<28,lbe(r,t,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2===1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=abe&&dY?bbe(this.buf,e,t):xbe(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==_o.Bytes)return t.push(this.readVarint(e));var r=qd(this);for(t=t||[];this.pos127;);else if(e===_o.Bytes)this.pos=this.readVarint()+this.pos;else if(e===_o.Fixed32)this.pos+=4;else if(e===_o.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+e)},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455||t<0){cbe(t,this);return}this.realloc(4),this.buf[this.pos++]=t&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=(t>>>=7)&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=(t>>>=7)&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=t>>>7&127)))},writeSVarint:function(t){this.writeVarint(t<0?-t*2-1:t*2)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(t.length*4),this.pos++;var e=this.pos;this.pos=wbe(this.buf,t,this.pos);var r=this.pos-e;r>=128&&fY(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),fM.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),fM.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&fY(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i},writeMessage:function(t,e,r){this.writeTag(t,_o.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,hbe,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,dbe,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,mbe,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,pbe,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,Abe,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,gbe,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,_be,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,ybe,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,vbe,e)},writeBytesField:function(t,e){this.writeTag(t,_o.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,_o.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,_o.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,_o.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,_o.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,_o.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,_o.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,_o.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,_o.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,_o.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};function lbe(t,e,r){var i=r.buf,n,o;if(o=i[r.pos++],n=(o&112)>>4,o<128||(o=i[r.pos++],n|=(o&127)<<3,o<128)||(o=i[r.pos++],n|=(o&127)<<10,o<128)||(o=i[r.pos++],n|=(o&127)<<17,o<128)||(o=i[r.pos++],n|=(o&127)<<24,o<128)||(o=i[r.pos++],n|=(o&1)<<31,o<128))return ly(t,n,e);throw new Error("Expected varint not more than 10 bytes")}function qd(t){return t.type===_o.Bytes?t.readVarint()+t.pos:t.pos+1}function ly(t,e,r){return r?e*4294967296+(t>>>0):(e>>>0)*4294967296+(t>>>0)}function cbe(t,e){var r,i;if(t>=0?(r=t%4294967296|0,i=t/4294967296|0):(r=~(-t%4294967296),i=~(-t/4294967296),r^4294967295?r=r+1|0:(r=0,i=i+1|0)),t>=18446744073709552e3||t<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),ube(r,i,e),fbe(i,e)}function ube(t,e,r){r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos]=t&127}function fbe(t,e){var r=(t&7)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127)))))}function fY(t,e,r){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));r.realloc(i);for(var n=r.pos-1;n>=t;n--)r.buf[n+i]=r.buf[n]}function hbe(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function hY(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function xbe(t,e,r){for(var i="",n=e;n239?4:o>223?3:o>191?2:1;if(n+l>r)break;var u,h,v;l===1?o<128&&(s=o):l===2?(u=t[n+1],(u&192)===128&&(s=(o&31)<<6|u&63,s<=127&&(s=null))):l===3?(u=t[n+1],h=t[n+2],(u&192)===128&&(h&192)===128&&(s=(o&15)<<12|(u&63)<<6|h&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):l===4&&(u=t[n+1],h=t[n+2],v=t[n+3],(u&192)===128&&(h&192)===128&&(v&192)===128&&(s=(o&15)<<18|(u&63)<<12|(h&63)<<6|v&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,l=1):s>65535&&(s-=65536,i+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),i+=String.fromCharCode(s),n+=l}return i}function bbe(t,e,r){return dY.decode(t.subarray(e,r))}function wbe(t,e,r){for(var i=0,n,o;i55295&&n<57344)if(o)if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,o=n;continue}else n=o-55296<<10|n-56320|65536,o=null;else{n>56319||i+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):o=n;continue}else o&&(t[r++]=239,t[r++]=191,t[r++]=189,o=null);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=n&63|128)}return r}});var EF=Qt((Xb,bM)=>{(function(t){"use strict";var e="Compound",r="Identifier",i="MemberExpression",n="Literal",o="ThisExpression",s="CallExpression",l="UnaryExpression",u="BinaryExpression",h="LogicalExpression",v="ConditionalExpression",T="ArrayExpression",E=46,M=44,O=39,F=34,z=40,W=41,J=91,K=93,ne=63,ge=59,j=58,me=function(Jt,qt){var wi=new Error(Jt+" at character "+qt);throw wi.index=qt,wi.description=Jt,wi},fe=!0,$={"-":fe,"!":fe,"~":fe,"+":fe},Z={"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},we=function(Jt){var qt=0,wi;for(var ae in Jt)(wi=ae.length)>qt&&Jt.hasOwnProperty(ae)&&(qt=wi);return qt},Oe=we($),he=we(Z),Le={true:!0,false:!1,null:null},ft="this",Vt=function(Jt){return Z[Jt]||0},Yt=function(Jt,qt,wi){var ae=Jt==="||"||Jt==="&&"?h:u;return{type:ae,operator:Jt,left:qt,right:wi}},mr=function(Jt){return Jt>=48&&Jt<=57},Er=function(Jt){return Jt===36||Jt===95||Jt>=65&&Jt<=90||Jt>=97&&Jt<=122||Jt>=128&&!Z[String.fromCharCode(Jt)]},Jr=function(Jt){return Jt===36||Jt===95||Jt>=65&&Jt<=90||Jt>=97&&Jt<=122||Jt>=48&&Jt<=57||Jt>=128&&!Z[String.fromCharCode(Jt)]},or=function(Jt){for(var qt=0,wi=Jt.charAt,ae=Jt.charCodeAt,be=function(dr){return wi.call(Jt,dr)},je=function(dr){return ae.call(Jt,dr)},lt=Jt.length,Ft=function(){for(var dr=je(qt);dr===32||dr===9||dr===10||dr===13;)dr=je(++qt)},wt=function(){var dr=xi(),Ur,ci;if(Ft(),je(qt)===ne){if(qt++,Ur=wt(),Ur||me("Expected expression",qt),Ft(),je(qt)===j)return qt++,ci=wt(),ci||me("Expected expression",qt),{type:v,test:dr,consequent:Ur,alternate:ci};me("Expected :",qt)}else return dr},$r=function(){Ft();for(var dr,Ur=Jt.substr(qt,he),ci=Ur.length;ci>0;){if(Z.hasOwnProperty(Ur)&&(!Er(je(qt))||qt+Ur.length2&&to<=Dn[Dn.length-2].prec;)Xo=Dn.pop(),ci=Dn.pop().value,Eo=Dn.pop(),Ur=Yt(ci,Eo,Xo),Dn.push(Ur);Ur=Ki(),Ur||me("Expected expression after "+Us,qt),Dn.push(To,Ur)}for(So=Dn.length-1,Ur=Dn[So];So>1;)Ur=Yt(Dn[So-1].value,Dn[So-2],Ur),So-=2;return Ur},Ki=function(){var dr,Ur,ci;if(Ft(),dr=je(qt),mr(dr)||dr===E)return kn();if(dr===O||dr===F)return Zi();if(dr===J)return Bi();for(Ur=Jt.substr(qt,Oe),ci=Ur.length;ci>0;){if($.hasOwnProperty(Ur)&&(!Er(je(qt))||qt+Ur.length=ci.length&&me("Unexpected token "+String.fromCharCode(dr),qt);break}else if(Ur===M){if(qt++,To++,To!==ci.length){if(dr===W)me("Unexpected token ,",qt);else if(dr===K)for(var Eo=ci.length;Eo"u"){var ai=t.jsep;t.jsep=or,or.noConflict=function(){return t.jsep===or&&(t.jsep=ai),or}}else typeof bM<"u"&&bM.exports?Xb=bM.exports=or:Xb.parse=or})(Xb)});var QY=Qt(MM=>{"use strict";MM.byteLength=Bwe;MM.toByteArray=Dwe;MM.fromByteArray=Nwe;var Vh=[],Ku=[],Rwe=typeof Uint8Array<"u"?Uint8Array:Array,LF="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Tg=0,ZY=LF.length;Tg0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var i=r===e?0:4-r%4;return[r,i]}function Bwe(t){var e=JY(t),r=e[0],i=e[1];return(r+i)*3/4-i}function Owe(t,e,r){return(e+r)*3/4-r}function Dwe(t){var e,r=JY(t),i=r[0],n=r[1],o=new Rwe(Owe(t,i,n)),s=0,l=n>0?i-4:i,u;for(u=0;u>16&255,o[s++]=e>>8&255,o[s++]=e&255;return n===2&&(e=Ku[t.charCodeAt(u)]<<2|Ku[t.charCodeAt(u+1)]>>4,o[s++]=e&255),n===1&&(e=Ku[t.charCodeAt(u)]<<10|Ku[t.charCodeAt(u+1)]<<4|Ku[t.charCodeAt(u+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function Lwe(t){return Vh[t>>18&63]+Vh[t>>12&63]+Vh[t>>6&63]+Vh[t&63]}function Fwe(t,e,r){for(var i,n=[],o=e;ol?l:s+o));return i===1?(e=t[r-1],n.push(Vh[e>>2]+Vh[e<<4&63]+"==")):i===2&&(e=(t[r-2]<<8)+t[r-1],n.push(Vh[e>>10]+Vh[e>>4&63]+Vh[e<<2&63]+"=")),n.join("")}});var gy=Qt((IM,$Y)=>{(function(t,e){typeof IM=="object"&&typeof $Y<"u"?e(IM):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.lumino_coreutils={}))})(IM,function(t){"use strict";t.JSONExt=void 0,function(s){s.emptyObject=Object.freeze({}),s.emptyArray=Object.freeze([]);function l(z){return z===null||typeof z=="boolean"||typeof z=="number"||typeof z=="string"}s.isPrimitive=l;function u(z){return Array.isArray(z)}s.isArray=u;function h(z){return!l(z)&&!u(z)}s.isObject=h;function v(z,W){if(z===W)return!0;if(l(z)||l(W))return!1;var J=u(z),K=u(W);return J!==K?!1:J&&K?E(z,W):M(z,W)}s.deepEqual=v;function T(z){return l(z)?z:u(z)?O(z):F(z)}s.deepCopy=T;function E(z,W){if(z===W)return!0;if(z.length!==W.length)return!1;for(var J=0,K=z.length;J>>0),s[u]=l&255,l>>>=8}t.Random=void 0,function(s){s.getRandomValues=function(){var l=typeof window<"u"&&(window.crypto||window.msCrypto)||null;return l&&typeof l.getRandomValues=="function"?function(h){return l.getRandomValues(h)}:n}()}(t.Random||(t.Random={}));function o(s){for(var l=new Uint8Array(16),u=new Array(256),h=0;h<16;++h)u[h]="0"+h.toString(16);for(var h=16;h<256;++h)u[h]=h.toString(16);return function(){return s(l),l[6]=64|l[6]&15,l[8]=128|l[8]&63,u[l[0]]+u[l[1]]+u[l[2]]+u[l[3]]+"-"+u[l[4]]+u[l[5]]+"-"+u[l[6]]+u[l[7]]+"-"+u[l[8]]+u[l[9]]+"-"+u[l[10]]+u[l[11]]+u[l[12]]+u[l[13]]+u[l[14]]+u[l[15]]}}t.UUID=void 0,function(s){s.uuid4=o(t.Random.getRandomValues)}(t.UUID||(t.UUID={})),t.MimeData=e,t.PromiseDelegate=r,t.Token=i,Object.defineProperty(t,"__esModule",{value:!0})})});var tK=Qt((fpt,eK)=>{function kwe(){this.__data__=[],this.size=0}eK.exports=kwe});var FF=Qt((hpt,rK)=>{function Uwe(t,e){return t===e||t!==t&&e!==e}rK.exports=Uwe});var Zb=Qt((dpt,iK)=>{var zwe=FF();function Vwe(t,e){for(var r=t.length;r--;)if(zwe(t[r][0],e))return r;return-1}iK.exports=Vwe});var oK=Qt((ppt,nK)=>{var Hwe=Zb(),jwe=Array.prototype,Gwe=jwe.splice;function Wwe(t){var e=this.__data__,r=Hwe(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():Gwe.call(e,r,1),--this.size,!0}nK.exports=Wwe});var aK=Qt((Apt,sK)=>{var qwe=Zb();function Xwe(t){var e=this.__data__,r=qwe(e,t);return r<0?void 0:e[r][1]}sK.exports=Xwe});var cK=Qt((mpt,lK)=>{var Ywe=Zb();function Kwe(t){return Ywe(this.__data__,t)>-1}lK.exports=Kwe});var fK=Qt((gpt,uK)=>{var Zwe=Zb();function Jwe(t,e){var r=this.__data__,i=Zwe(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}uK.exports=Jwe});var Jb=Qt((_pt,hK)=>{var Qwe=tK(),$we=oK(),e2e=aK(),t2e=cK(),r2e=fK();function _y(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{var i2e=Jb();function n2e(){this.__data__=new i2e,this.size=0}dK.exports=n2e});var mK=Qt((vpt,AK)=>{function o2e(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}AK.exports=o2e});var _K=Qt((xpt,gK)=>{function s2e(t){return this.__data__.get(t)}gK.exports=s2e});var vK=Qt((bpt,yK)=>{function a2e(t){return this.__data__.has(t)}yK.exports=a2e});var NF=Qt((wpt,xK)=>{var l2e=typeof global=="object"&&global&&global.Object===Object&&global;xK.exports=l2e});var Hh=Qt((Tpt,bK)=>{var c2e=NF(),u2e=typeof self=="object"&&self&&self.Object===Object&&self,f2e=c2e||u2e||Function("return this")();bK.exports=f2e});var PM=Qt((Ept,wK)=>{var h2e=Hh(),d2e=h2e.Symbol;wK.exports=d2e});var CK=Qt((Spt,SK)=>{var TK=PM(),EK=Object.prototype,p2e=EK.hasOwnProperty,A2e=EK.toString,Qb=TK?TK.toStringTag:void 0;function m2e(t){var e=p2e.call(t,Qb),r=t[Qb];try{t[Qb]=void 0;var i=!0}catch{}var n=A2e.call(t);return i&&(e?t[Qb]=r:delete t[Qb]),n}SK.exports=m2e});var IK=Qt((Cpt,MK)=>{var g2e=Object.prototype,_2e=g2e.toString;function y2e(t){return _2e.call(t)}MK.exports=y2e});var yy=Qt((Mpt,BK)=>{var PK=PM(),v2e=CK(),x2e=IK(),b2e="[object Null]",w2e="[object Undefined]",RK=PK?PK.toStringTag:void 0;function T2e(t){return t==null?t===void 0?w2e:b2e:RK&&RK in Object(t)?v2e(t):x2e(t)}BK.exports=T2e});var kF=Qt((Ipt,OK)=>{function E2e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}OK.exports=E2e});var UF=Qt((Ppt,DK)=>{var S2e=yy(),C2e=kF(),M2e="[object AsyncFunction]",I2e="[object Function]",P2e="[object GeneratorFunction]",R2e="[object Proxy]";function B2e(t){if(!C2e(t))return!1;var e=S2e(t);return e==I2e||e==P2e||e==M2e||e==R2e}DK.exports=B2e});var FK=Qt((Rpt,LK)=>{var O2e=Hh(),D2e=O2e["__core-js_shared__"];LK.exports=D2e});var UK=Qt((Bpt,kK)=>{var zF=FK(),NK=function(){var t=/[^.]+$/.exec(zF&&zF.keys&&zF.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function L2e(t){return!!NK&&NK in t}kK.exports=L2e});var VF=Qt((Opt,zK)=>{var F2e=Function.prototype,N2e=F2e.toString;function k2e(t){if(t!=null){try{return N2e.call(t)}catch{}try{return t+""}catch{}}return""}zK.exports=k2e});var HK=Qt((Dpt,VK)=>{var U2e=UF(),z2e=UK(),V2e=kF(),H2e=VF(),j2e=/[\\^$.*+?()[\]{}|]/g,G2e=/^\[object .+?Constructor\]$/,W2e=Function.prototype,q2e=Object.prototype,X2e=W2e.toString,Y2e=q2e.hasOwnProperty,K2e=RegExp("^"+X2e.call(Y2e).replace(j2e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Z2e(t){if(!V2e(t)||z2e(t))return!1;var e=U2e(t)?K2e:G2e;return e.test(H2e(t))}VK.exports=Z2e});var GK=Qt((Lpt,jK)=>{function J2e(t,e){return t?.[e]}jK.exports=J2e});var Eg=Qt((Fpt,WK)=>{var Q2e=HK(),$2e=GK();function eTe(t,e){var r=$2e(t,e);return Q2e(r)?r:void 0}WK.exports=eTe});var RM=Qt((Npt,qK)=>{var tTe=Eg(),rTe=Hh(),iTe=tTe(rTe,"Map");qK.exports=iTe});var $b=Qt((kpt,XK)=>{var nTe=Eg(),oTe=nTe(Object,"create");XK.exports=oTe});var ZK=Qt((Upt,KK)=>{var YK=$b();function sTe(){this.__data__=YK?YK(null):{},this.size=0}KK.exports=sTe});var QK=Qt((zpt,JK)=>{function aTe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}JK.exports=aTe});var eZ=Qt((Vpt,$K)=>{var lTe=$b(),cTe="__lodash_hash_undefined__",uTe=Object.prototype,fTe=uTe.hasOwnProperty;function hTe(t){var e=this.__data__;if(lTe){var r=e[t];return r===cTe?void 0:r}return fTe.call(e,t)?e[t]:void 0}$K.exports=hTe});var rZ=Qt((Hpt,tZ)=>{var dTe=$b(),pTe=Object.prototype,ATe=pTe.hasOwnProperty;function mTe(t){var e=this.__data__;return dTe?e[t]!==void 0:ATe.call(e,t)}tZ.exports=mTe});var nZ=Qt((jpt,iZ)=>{var gTe=$b(),_Te="__lodash_hash_undefined__";function yTe(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=gTe&&e===void 0?_Te:e,this}iZ.exports=yTe});var sZ=Qt((Gpt,oZ)=>{var vTe=ZK(),xTe=QK(),bTe=eZ(),wTe=rZ(),TTe=nZ();function vy(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{var aZ=sZ(),ETe=Jb(),STe=RM();function CTe(){this.size=0,this.__data__={hash:new aZ,map:new(STe||ETe),string:new aZ}}lZ.exports=CTe});var fZ=Qt((qpt,uZ)=>{function MTe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}uZ.exports=MTe});var ew=Qt((Xpt,hZ)=>{var ITe=fZ();function PTe(t,e){var r=t.__data__;return ITe(e)?r[typeof e=="string"?"string":"hash"]:r.map}hZ.exports=PTe});var pZ=Qt((Ypt,dZ)=>{var RTe=ew();function BTe(t){var e=RTe(this,t).delete(t);return this.size-=e?1:0,e}dZ.exports=BTe});var mZ=Qt((Kpt,AZ)=>{var OTe=ew();function DTe(t){return OTe(this,t).get(t)}AZ.exports=DTe});var _Z=Qt((Zpt,gZ)=>{var LTe=ew();function FTe(t){return LTe(this,t).has(t)}gZ.exports=FTe});var vZ=Qt((Jpt,yZ)=>{var NTe=ew();function kTe(t,e){var r=NTe(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}yZ.exports=kTe});var HF=Qt((Qpt,xZ)=>{var UTe=cZ(),zTe=pZ(),VTe=mZ(),HTe=_Z(),jTe=vZ();function xy(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{var GTe=Jb(),WTe=RM(),qTe=HF(),XTe=200;function YTe(t,e){var r=this.__data__;if(r instanceof GTe){var i=r.__data__;if(!WTe||i.length{var KTe=Jb(),ZTe=pK(),JTe=mK(),QTe=_K(),$Te=vK(),eEe=wZ();function by(t){var e=this.__data__=new KTe(t);this.size=e.size}by.prototype.clear=ZTe;by.prototype.delete=JTe;by.prototype.get=QTe;by.prototype.has=$Te;by.prototype.set=eEe;TZ.exports=by});var CZ=Qt((tAt,SZ)=>{var tEe="__lodash_hash_undefined__";function rEe(t){return this.__data__.set(t,tEe),this}SZ.exports=rEe});var IZ=Qt((rAt,MZ)=>{function iEe(t){return this.__data__.has(t)}MZ.exports=iEe});var RZ=Qt((iAt,PZ)=>{var nEe=HF(),oEe=CZ(),sEe=IZ();function BM(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new nEe;++e{function aEe(t,e){for(var r=-1,i=t==null?0:t.length;++r{function lEe(t,e){return t.has(e)}DZ.exports=lEe});var jF=Qt((sAt,FZ)=>{var cEe=RZ(),uEe=OZ(),fEe=LZ(),hEe=1,dEe=2;function pEe(t,e,r,i,n,o){var s=r&hEe,l=t.length,u=e.length;if(l!=u&&!(s&&u>l))return!1;var h=o.get(t),v=o.get(e);if(h&&v)return h==e&&v==t;var T=-1,E=!0,M=r&dEe?new cEe:void 0;for(o.set(t,e),o.set(e,t);++T{var AEe=Hh(),mEe=AEe.Uint8Array;NZ.exports=mEe});var zZ=Qt((lAt,UZ)=>{function gEe(t){var e=-1,r=Array(t.size);return t.forEach(function(i,n){r[++e]=[n,i]}),r}UZ.exports=gEe});var HZ=Qt((cAt,VZ)=>{function _Ee(t){var e=-1,r=Array(t.size);return t.forEach(function(i){r[++e]=i}),r}VZ.exports=_Ee});var XZ=Qt((uAt,qZ)=>{var jZ=PM(),GZ=kZ(),yEe=FF(),vEe=jF(),xEe=zZ(),bEe=HZ(),wEe=1,TEe=2,EEe="[object Boolean]",SEe="[object Date]",CEe="[object Error]",MEe="[object Map]",IEe="[object Number]",PEe="[object RegExp]",REe="[object Set]",BEe="[object String]",OEe="[object Symbol]",DEe="[object ArrayBuffer]",LEe="[object DataView]",WZ=jZ?jZ.prototype:void 0,GF=WZ?WZ.valueOf:void 0;function FEe(t,e,r,i,n,o,s){switch(r){case LEe:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case DEe:return!(t.byteLength!=e.byteLength||!o(new GZ(t),new GZ(e)));case EEe:case SEe:case IEe:return yEe(+t,+e);case CEe:return t.name==e.name&&t.message==e.message;case PEe:case BEe:return t==e+"";case MEe:var l=xEe;case REe:var u=i&wEe;if(l||(l=bEe),t.size!=e.size&&!u)return!1;var h=s.get(t);if(h)return h==e;i|=TEe,s.set(t,e);var v=vEe(l(t),l(e),i,n,o,s);return s.delete(t),v;case OEe:if(GF)return GF.call(t)==GF.call(e)}return!1}qZ.exports=FEe});var KZ=Qt((fAt,YZ)=>{function NEe(t,e){for(var r=-1,i=e.length,n=t.length;++r{var kEe=Array.isArray;ZZ.exports=kEe});var QZ=Qt((dAt,JZ)=>{var UEe=KZ(),zEe=OM();function VEe(t,e,r){var i=e(t);return zEe(t)?i:UEe(i,r(t))}JZ.exports=VEe});var eJ=Qt((pAt,$Z)=>{function HEe(t,e){for(var r=-1,i=t==null?0:t.length,n=0,o=[];++r{function jEe(){return[]}tJ.exports=jEe});var oJ=Qt((mAt,nJ)=>{var GEe=eJ(),WEe=rJ(),qEe=Object.prototype,XEe=qEe.propertyIsEnumerable,iJ=Object.getOwnPropertySymbols,YEe=iJ?function(t){return t==null?[]:(t=Object(t),GEe(iJ(t),function(e){return XEe.call(t,e)}))}:WEe;nJ.exports=YEe});var aJ=Qt((gAt,sJ)=>{function KEe(t,e){for(var r=-1,i=Array(t);++r{function ZEe(t){return t!=null&&typeof t=="object"}lJ.exports=ZEe});var uJ=Qt((yAt,cJ)=>{var JEe=yy(),QEe=wy(),$Ee="[object Arguments]";function eSe(t){return QEe(t)&&JEe(t)==$Ee}cJ.exports=eSe});var pJ=Qt((vAt,dJ)=>{var fJ=uJ(),tSe=wy(),hJ=Object.prototype,rSe=hJ.hasOwnProperty,iSe=hJ.propertyIsEnumerable,nSe=fJ(function(){return arguments}())?fJ:function(t){return tSe(t)&&rSe.call(t,"callee")&&!iSe.call(t,"callee")};dJ.exports=nSe});var mJ=Qt((xAt,AJ)=>{function oSe(){return!1}AJ.exports=oSe});var WF=Qt((tw,Ty)=>{var sSe=Hh(),aSe=mJ(),yJ=typeof tw=="object"&&tw&&!tw.nodeType&&tw,gJ=yJ&&typeof Ty=="object"&&Ty&&!Ty.nodeType&&Ty,lSe=gJ&&gJ.exports===yJ,_J=lSe?sSe.Buffer:void 0,cSe=_J?_J.isBuffer:void 0,uSe=cSe||aSe;Ty.exports=uSe});var xJ=Qt((bAt,vJ)=>{var fSe=9007199254740991,hSe=/^(?:0|[1-9]\d*)$/;function dSe(t,e){var r=typeof t;return e=e??fSe,!!e&&(r=="number"||r!="symbol"&&hSe.test(t))&&t>-1&&t%1==0&&t{var pSe=9007199254740991;function ASe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=pSe}bJ.exports=ASe});var TJ=Qt((TAt,wJ)=>{var mSe=yy(),gSe=qF(),_Se=wy(),ySe="[object Arguments]",vSe="[object Array]",xSe="[object Boolean]",bSe="[object Date]",wSe="[object Error]",TSe="[object Function]",ESe="[object Map]",SSe="[object Number]",CSe="[object Object]",MSe="[object RegExp]",ISe="[object Set]",PSe="[object String]",RSe="[object WeakMap]",BSe="[object ArrayBuffer]",OSe="[object DataView]",DSe="[object Float32Array]",LSe="[object Float64Array]",FSe="[object Int8Array]",NSe="[object Int16Array]",kSe="[object Int32Array]",USe="[object Uint8Array]",zSe="[object Uint8ClampedArray]",VSe="[object Uint16Array]",HSe="[object Uint32Array]",gs={};gs[DSe]=gs[LSe]=gs[FSe]=gs[NSe]=gs[kSe]=gs[USe]=gs[zSe]=gs[VSe]=gs[HSe]=!0;gs[ySe]=gs[vSe]=gs[BSe]=gs[xSe]=gs[OSe]=gs[bSe]=gs[wSe]=gs[TSe]=gs[ESe]=gs[SSe]=gs[CSe]=gs[MSe]=gs[ISe]=gs[PSe]=gs[RSe]=!1;function jSe(t){return _Se(t)&&gSe(t.length)&&!!gs[mSe(t)]}wJ.exports=jSe});var SJ=Qt((EAt,EJ)=>{function GSe(t){return function(e){return t(e)}}EJ.exports=GSe});var MJ=Qt((rw,Ey)=>{var WSe=NF(),CJ=typeof rw=="object"&&rw&&!rw.nodeType&&rw,iw=CJ&&typeof Ey=="object"&&Ey&&!Ey.nodeType&&Ey,qSe=iw&&iw.exports===CJ,XF=qSe&&WSe.process,XSe=function(){try{var t=iw&&iw.require&&iw.require("util").types;return t||XF&&XF.binding&&XF.binding("util")}catch{}}();Ey.exports=XSe});var YF=Qt((SAt,RJ)=>{var YSe=TJ(),KSe=SJ(),IJ=MJ(),PJ=IJ&&IJ.isTypedArray,ZSe=PJ?KSe(PJ):YSe;RJ.exports=ZSe});var OJ=Qt((CAt,BJ)=>{var JSe=aJ(),QSe=pJ(),$Se=OM(),eCe=WF(),tCe=xJ(),rCe=YF(),iCe=Object.prototype,nCe=iCe.hasOwnProperty;function oCe(t,e){var r=$Se(t),i=!r&&QSe(t),n=!r&&!i&&eCe(t),o=!r&&!i&&!n&&rCe(t),s=r||i||n||o,l=s?JSe(t.length,String):[],u=l.length;for(var h in t)(e||nCe.call(t,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||tCe(h,u)))&&l.push(h);return l}BJ.exports=oCe});var LJ=Qt((MAt,DJ)=>{var sCe=Object.prototype;function aCe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||sCe;return t===r}DJ.exports=aCe});var KF=Qt((IAt,FJ)=>{function lCe(t,e){return function(r){return t(e(r))}}FJ.exports=lCe});var kJ=Qt((PAt,NJ)=>{var cCe=KF(),uCe=cCe(Object.keys,Object);NJ.exports=uCe});var zJ=Qt((RAt,UJ)=>{var fCe=LJ(),hCe=kJ(),dCe=Object.prototype,pCe=dCe.hasOwnProperty;function ACe(t){if(!fCe(t))return hCe(t);var e=[];for(var r in Object(t))pCe.call(t,r)&&r!="constructor"&&e.push(r);return e}UJ.exports=ACe});var HJ=Qt((BAt,VJ)=>{var mCe=UF(),gCe=qF();function _Ce(t){return t!=null&&gCe(t.length)&&!mCe(t)}VJ.exports=_Ce});var GJ=Qt((OAt,jJ)=>{var yCe=OJ(),vCe=zJ(),xCe=HJ();function bCe(t){return xCe(t)?yCe(t):vCe(t)}jJ.exports=bCe});var qJ=Qt((DAt,WJ)=>{var wCe=QZ(),TCe=oJ(),ECe=GJ();function SCe(t){return wCe(t,ECe,TCe)}WJ.exports=SCe});var KJ=Qt((LAt,YJ)=>{var XJ=qJ(),CCe=1,MCe=Object.prototype,ICe=MCe.hasOwnProperty;function PCe(t,e,r,i,n,o){var s=r&CCe,l=XJ(t),u=l.length,h=XJ(e),v=h.length;if(u!=v&&!s)return!1;for(var T=u;T--;){var E=l[T];if(!(s?E in e:ICe.call(e,E)))return!1}var M=o.get(t),O=o.get(e);if(M&&O)return M==e&&O==t;var F=!0;o.set(t,e),o.set(e,t);for(var z=s;++T{var RCe=Eg(),BCe=Hh(),OCe=RCe(BCe,"DataView");ZJ.exports=OCe});var $J=Qt((NAt,QJ)=>{var DCe=Eg(),LCe=Hh(),FCe=DCe(LCe,"Promise");QJ.exports=FCe});var tQ=Qt((kAt,eQ)=>{var NCe=Eg(),kCe=Hh(),UCe=NCe(kCe,"Set");eQ.exports=UCe});var iQ=Qt((UAt,rQ)=>{var zCe=Eg(),VCe=Hh(),HCe=zCe(VCe,"WeakMap");rQ.exports=HCe});var fQ=Qt((zAt,uQ)=>{var ZF=JJ(),JF=RM(),QF=$J(),$F=tQ(),eN=iQ(),cQ=yy(),Sy=VF(),nQ="[object Map]",jCe="[object Object]",oQ="[object Promise]",sQ="[object Set]",aQ="[object WeakMap]",lQ="[object DataView]",GCe=Sy(ZF),WCe=Sy(JF),qCe=Sy(QF),XCe=Sy($F),YCe=Sy(eN),Sg=cQ;(ZF&&Sg(new ZF(new ArrayBuffer(1)))!=lQ||JF&&Sg(new JF)!=nQ||QF&&Sg(QF.resolve())!=oQ||$F&&Sg(new $F)!=sQ||eN&&Sg(new eN)!=aQ)&&(Sg=function(t){var e=cQ(t),r=e==jCe?t.constructor:void 0,i=r?Sy(r):"";if(i)switch(i){case GCe:return lQ;case WCe:return nQ;case qCe:return oQ;case XCe:return sQ;case YCe:return aQ}return e});uQ.exports=Sg});var yQ=Qt((VAt,_Q)=>{var tN=EZ(),KCe=jF(),ZCe=XZ(),JCe=KJ(),hQ=fQ(),dQ=OM(),pQ=WF(),QCe=YF(),$Ce=1,AQ="[object Arguments]",mQ="[object Array]",DM="[object Object]",eMe=Object.prototype,gQ=eMe.hasOwnProperty;function tMe(t,e,r,i,n,o){var s=dQ(t),l=dQ(e),u=s?mQ:hQ(t),h=l?mQ:hQ(e);u=u==AQ?DM:u,h=h==AQ?DM:h;var v=u==DM,T=h==DM,E=u==h;if(E&&pQ(t)){if(!pQ(e))return!1;s=!0,v=!1}if(E&&!v)return o||(o=new tN),s||QCe(t)?KCe(t,e,r,i,n,o):ZCe(t,e,u,r,i,n,o);if(!(r&$Ce)){var M=v&&gQ.call(t,"__wrapped__"),O=T&&gQ.call(e,"__wrapped__");if(M||O){var F=M?t.value():t,z=O?e.value():e;return o||(o=new tN),n(F,z,r,i,o)}}return E?(o||(o=new tN),JCe(t,e,r,i,n,o)):!1}_Q.exports=tMe});var wQ=Qt((HAt,bQ)=>{var rMe=yQ(),vQ=wy();function xQ(t,e,r,i,n){return t===e?!0:t==null||e==null||!vQ(t)&&!vQ(e)?t!==t&&e!==e:rMe(t,e,r,i,xQ,n)}bQ.exports=xQ});var EQ=Qt((jAt,TQ)=>{var iMe=wQ();function nMe(t,e){return iMe(t,e)}TQ.exports=nMe});var CQ=Qt((GAt,SQ)=>{var oMe=KF(),sMe=oMe(Object.getPrototypeOf,Object);SQ.exports=sMe});var PQ=Qt((WAt,IQ)=>{var aMe=yy(),lMe=CQ(),cMe=wy(),uMe="[object Object]",fMe=Function.prototype,hMe=Object.prototype,MQ=fMe.toString,dMe=hMe.hasOwnProperty,pMe=MQ.call(Object);function AMe(t){if(!cMe(t)||aMe(t)!=uMe)return!1;var e=lMe(t);if(e===null)return!0;var r=dMe.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&MQ.call(r)==pMe}IQ.exports=AMe});var aw,aN,lw,zM,lN,VQ,Gh,Kd,HQ,cN,jQ,GQ,uN,fN,hN,WQ,qQ,VM,dN,XQ,_s=It(()=>{aw="1.13.6",aN=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},lw=Array.prototype,zM=Object.prototype,lN=typeof Symbol<"u"?Symbol.prototype:null,VQ=lw.push,Gh=lw.slice,Kd=zM.toString,HQ=zM.hasOwnProperty,cN=typeof ArrayBuffer<"u",jQ=typeof DataView<"u",GQ=Array.isArray,uN=Object.keys,fN=Object.create,hN=cN&&ArrayBuffer.isView,WQ=isNaN,qQ=isFinite,VM=!{toString:null}.propertyIsEnumerable("toString"),dN=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],XQ=Math.pow(2,53)-1});function Lo(t,e){return e=e==null?t.length-1:+e,function(){for(var r=Math.max(arguments.length-e,0),i=Array(r),n=0;n{});function jl(t){var e=typeof t;return e==="function"||e==="object"&&!!t}var hA=It(()=>{});function HM(t){return t===null}var YQ=It(()=>{});function Iy(t){return t===void 0}var pN=It(()=>{});function Py(t){return t===!0||t===!1||Kd.call(t)==="[object Boolean]"}var AN=It(()=>{_s()});function jM(t){return!!(t&&t.nodeType===1)}var KQ=It(()=>{});function oo(t){var e="[object "+t+"]";return function(r){return Kd.call(r)===e}}var El=It(()=>{_s()});var Cg,GM=It(()=>{El();Cg=oo("String")});var cw,mN=It(()=>{El();cw=oo("Number")});var gN,ZQ=It(()=>{El();gN=oo("Date")});var _N,JQ=It(()=>{El();_N=oo("RegExp")});var yN,QQ=It(()=>{El();yN=oo("Error")});var uw,vN=It(()=>{El();uw=oo("Symbol")});var fw,xN=It(()=>{El();fw=oo("ArrayBuffer")});var $Q,bMe,qo,ru=It(()=>{El();_s();$Q=oo("Function"),bMe=aN.document&&aN.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof bMe!="function"&&($Q=function(t){return typeof t=="function"||!1});qo=$Q});var bN,e$=It(()=>{El();bN=oo("Object")});var WM,Ry,By=It(()=>{_s();e$();WM=jQ&&bN(new DataView(new ArrayBuffer(8))),Ry=typeof Map<"u"&&bN(new Map)});function TMe(t){return t!=null&&qo(t.getInt8)&&fw(t.buffer)}var wMe,dA,qM=It(()=>{El();ru();xN();By();wMe=oo("DataView");dA=WM?TMe:wMe});var oc,pA=It(()=>{_s();El();oc=GQ||oo("Array")});function Sl(t,e){return t!=null&&HQ.call(t,e)}var Zd=It(()=>{_s()});var wN,Mg,XM=It(()=>{El();Zd();wN=oo("Arguments");(function(){wN(arguments)||(wN=function(t){return Sl(t,"callee")})})();Mg=wN});function YM(t){return!uw(t)&&qQ(t)&&!isNaN(parseFloat(t))}var t$=It(()=>{_s();vN()});function Oy(t){return cw(t)&&WQ(t)}var TN=It(()=>{_s();mN()});function Dy(t){return function(){return t}}var EN=It(()=>{});function hw(t){return function(e){var r=t(e);return typeof r=="number"&&r>=0&&r<=XQ}}var SN=It(()=>{_s()});function dw(t){return function(e){return e?.[t]}}var CN=It(()=>{});var Ig,KM=It(()=>{CN();Ig=dw("byteLength")});var r$,i$=It(()=>{SN();KM();r$=hw(Ig)});function SMe(t){return hN?hN(t)&&!dA(t):r$(t)&&EMe.test(Kd.call(t))}var EMe,pw,MN=It(()=>{_s();qM();EN();i$();EMe=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;pw=cN?SMe:Dy(!1)});var as,iu=It(()=>{CN();as=dw("length")});function CMe(t){for(var e={},r=t.length,i=0;i{_s();ru();Zd()});function Gn(t){if(!jl(t))return[];if(uN)return uN(t);var e=[];for(var r in t)Sl(t,r)&&e.push(r);return VM&&Aw(t,e),e}var rl=It(()=>{hA();_s();Zd();IN()});function ZM(t){if(t==null)return!0;var e=as(t);return typeof e=="number"&&(oc(t)||Cg(t)||Mg(t))?e===0:as(Gn(t))===0}var n$=It(()=>{iu();pA();GM();XM();rl()});function Ly(t,e){var r=Gn(e),i=r.length;if(t==null)return!i;for(var n=Object(t),o=0;o{rl()});function dn(t){if(t instanceof dn)return t;if(!(this instanceof dn))return new dn(t);this._wrapped=t}var Rc=It(()=>{_s();dn.VERSION=aw;dn.prototype.value=function(){return this._wrapped};dn.prototype.valueOf=dn.prototype.toJSON=dn.prototype.value;dn.prototype.toString=function(){return String(this._wrapped)}});function JM(t){return new Uint8Array(t.buffer||t,t.byteOffset||0,Ig(t))}var o$=It(()=>{KM()});function RN(t,e,r,i){if(t===e)return t!==0||1/t===1/e;if(t==null||e==null)return!1;if(t!==t)return e!==e;var n=typeof t;return n!=="function"&&n!=="object"&&typeof e!="object"?!1:a$(t,e,r,i)}function a$(t,e,r,i){t instanceof dn&&(t=t._wrapped),e instanceof dn&&(e=e._wrapped);var n=Kd.call(t);if(n!==Kd.call(e))return!1;if(WM&&n=="[object Object]"&&dA(t)){if(!dA(e))return!1;n=s$}switch(n){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:+t==0?1/+t===1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return lN.valueOf.call(t)===lN.valueOf.call(e);case"[object ArrayBuffer]":case s$:return a$(JM(t),JM(e),r,i)}var o=n==="[object Array]";if(!o&&pw(t)){var s=Ig(t);if(s!==Ig(e))return!1;if(t.buffer===e.buffer&&t.byteOffset===e.byteOffset)return!0;o=!0}if(!o){if(typeof t!="object"||typeof e!="object")return!1;var l=t.constructor,u=e.constructor;if(l!==u&&!(qo(l)&&l instanceof l&&qo(u)&&u instanceof u)&&"constructor"in t&&"constructor"in e)return!1}r=r||[],i=i||[];for(var h=r.length;h--;)if(r[h]===t)return i[h]===e;if(r.push(t),i.push(e),o){if(h=t.length,h!==e.length)return!1;for(;h--;)if(!RN(t[h],e[h],r,i))return!1}else{var v=Gn(t),T;if(h=v.length,Gn(e).length!==h)return!1;for(;h--;)if(T=v[h],!(Sl(e,T)&&RN(t[T],e[T],r,i)))return!1}return r.pop(),i.pop(),!0}function QM(t,e){return RN(t,e)}var s$,l$=It(()=>{Rc();_s();KM();MN();ru();By();qM();rl();Zd();o$();s$="[object DataView]"});function Zu(t){if(!jl(t))return[];var e=[];for(var r in t)e.push(r);return VM&&Aw(t,e),e}var Fy=It(()=>{hA();_s();IN()});function Ny(t){var e=as(t);return function(r){if(r==null)return!1;var i=Zu(r);if(as(i))return!1;for(var n=0;n{iu();ru();Fy();BN="forEach",c$="has",ON=["clear","delete"],u$=["get",c$,"set"],f$=ON.concat(BN,u$),DN=ON.concat(u$),h$=["add"].concat(ON,BN,c$)});var LN,d$=It(()=>{El();By();$M();LN=Ry?Ny(f$):oo("Map")});var FN,p$=It(()=>{El();By();$M();FN=Ry?Ny(DN):oo("WeakMap")});var NN,A$=It(()=>{El();By();$M();NN=Ry?Ny(h$):oo("Set")});var kN,m$=It(()=>{El();kN=oo("WeakSet")});function Bc(t){for(var e=Gn(t),r=e.length,i=Array(r),n=0;n{rl()});function eI(t){for(var e=Gn(t),r=e.length,i=Array(r),n=0;n{rl()});function ky(t){for(var e={},r=Gn(t),i=0,n=r.length;i{rl()});function Rg(t){var e=[];for(var r in t)qo(t[r])&&e.push(r);return e.sort()}var zN=It(()=>{ru()});function Bg(t,e){return function(r){var i=arguments.length;if(e&&(r=Object(r)),i<2||r==null)return r;for(var n=1;n{});var mw,VN=It(()=>{tI();Fy();mw=Bg(Zu)});var AA,rI=It(()=>{tI();rl();AA=Bg(Gn)});var gw,HN=It(()=>{tI();Fy();gw=Bg(Zu,!0)});function MMe(){return function(){}}function _w(t){if(!jl(t))return{};if(fN)return fN(t);var e=MMe();e.prototype=t;var r=new e;return e.prototype=null,r}var jN=It(()=>{hA();_s()});function iI(t,e){var r=_w(t);return e&&AA(r,e),r}var _$=It(()=>{jN();rI()});function nI(t){return jl(t)?oc(t)?t.slice():mw({},t):t}var y$=It(()=>{hA();pA();VN()});function oI(t,e){return e(t),t}var v$=It(()=>{});function yw(t){return oc(t)?t:[t]}var GN=It(()=>{Rc();pA();dn.toPath=yw});function Uf(t){return dn.toPath(t)}var Uy=It(()=>{Rc();GN()});function Og(t,e){for(var r=e.length,i=0;i{});function zy(t,e,r){var i=Og(t,Uf(e));return Iy(i)?r:i}var WN=It(()=>{Uy();sI();pN()});function aI(t,e){e=Uf(e);for(var r=e.length,i=0;i{Zd();Uy()});function mA(t){return t}var lI=It(()=>{});function zf(t){return t=AA({},t),function(e){return Ly(e,t)}}var vw=It(()=>{rI();PN()});function gA(t){return t=Uf(t),function(e){return Og(e,t)}}var cI=It(()=>{sI();Uy()});function Vf(t,e,r){if(e===void 0)return t;switch(r??3){case 1:return function(i){return t.call(e,i)};case 3:return function(i,n,o){return t.call(e,i,n,o)};case 4:return function(i,n,o,s){return t.call(e,i,n,o,s)}}return function(){return t.apply(e,arguments)}}var Vy=It(()=>{});function xw(t,e,r){return t==null?mA:qo(t)?Vf(t,e,r):jl(t)&&!oc(t)?zf(t):gA(t)}var qN=It(()=>{lI();ru();hA();pA();vw();cI();Vy()});function Dg(t,e){return xw(t,e,1/0)}var XN=It(()=>{Rc();qN();dn.iteratee=Dg});function Fo(t,e,r){return dn.iteratee!==Dg?dn.iteratee(t,e):xw(t,e,r)}var sc=It(()=>{Rc();qN();XN()});function uI(t,e,r){e=Fo(e,r);for(var i=Gn(t),n=i.length,o={},s=0;s{sc();rl()});function Hy(){}var YN=It(()=>{});function fI(t){return t==null?Hy:function(e){return zy(t,e)}}var w$=It(()=>{YN();WN()});function hI(t,e,r){var i=Array(Math.max(0,t));e=Vf(e,r,1);for(var n=0;n{Vy()});function Lg(t,e){return e==null&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))}var KN=It(()=>{});var Jd,dI=It(()=>{Jd=Date.now||function(){return new Date().getTime()}});function bw(t){var e=function(o){return t[o]},r="(?:"+Gn(t).join("|")+")",i=RegExp(r),n=RegExp(r,"g");return function(o){return o=o==null?"":""+o,i.test(o)?o.replace(n,e):o}}var ZN=It(()=>{rl()});var pI,JN=It(()=>{pI={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"}});var QN,E$=It(()=>{ZN();JN();QN=bw(pI)});var S$,C$=It(()=>{UN();JN();S$=ky(pI)});var $N,M$=It(()=>{ZN();C$();$N=bw(S$)});var e4,t4=It(()=>{Rc();e4=dn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g}});function RMe(t){return"\\"+IMe[t]}function AI(t,e,r){!e&&r&&(e=r),e=gw({},e,dn.templateSettings);var i=RegExp([(e.escape||r4).source,(e.interpolate||r4).source,(e.evaluate||r4).source].join("|")+"|$","g"),n=0,o="__p+='";t.replace(i,function(h,v,T,E,M){return o+=t.slice(n,M).replace(PMe,RMe),n=M+h.length,v?o+=`'+ ((__t=(`+v+`))==null?'':_.escape(__t))+ '`:T?o+=`'+ ((__t=(`+T+`))==null?'':__t)+ '`:E&&(o+=`'; `+E+` __p+='`),h}),o+=`'; `;var s=e.variable;if(s){if(!BMe.test(s))throw new Error("variable is not a bare identifier: "+s)}else o=`with(obj||{}){ `+o+`} `,s="obj";o=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');}; `+o+`return __p; `;var l;try{l=new Function(s,"_",o)}catch(h){throw h.source=o,h}var u=function(h){return l.call(this,h,dn)};return u.source="function("+s+`){ `+o+"}",u}var r4,IMe,PMe,BMe,I$=It(()=>{HN();Rc();t4();r4=/(.)^/,IMe={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},PMe=/\\|'|\r|\n|\u2028|\u2029/g;BMe=/^\s*(\w|\$)+\s*$/});function mI(t,e,r){e=Uf(e);var i=e.length;if(!i)return qo(r)?r.call(t):r;for(var n=0;n{ru();Uy()});function gI(t){var e=++OMe+"";return t?t+e:e}var OMe,R$=It(()=>{OMe=0});function _I(t){var e=dn(t);return e._chain=!0,e}var B$=It(()=>{Rc()});function ww(t,e,r,i,n){if(!(i instanceof e))return t.apply(r,n);var o=_w(t.prototype),s=t.apply(o,n);return jl(s)?s:o}var i4=It(()=>{jN();hA()});var n4,Qd,Tw=It(()=>{Pc();i4();Rc();n4=Lo(function(t,e){var r=n4.placeholder,i=function(){for(var n=0,o=e.length,s=Array(o),l=0;l{Pc();ru();i4();Ew=Lo(function(t,e,r){if(!qo(t))throw new TypeError("Bind must be called on a function");var i=Lo(function(n){return ww(t,i,e,this,r.concat(n))});return i})});var ls,Oc=It(()=>{SN();iu();ls=hw(as)});function Dc(t,e,r,i){if(i=i||[],!e&&e!==0)e=1/0;else if(e<=0)return i.concat(t);for(var n=i.length,o=0,s=as(t);o1)Dc(l,e-1,r,i),n=i.length;else for(var u=0,h=l.length;u{iu();Oc();pA();XM()});var s4,O$=It(()=>{Pc();Fg();o4();s4=Lo(function(t,e){e=Dc(e,!1,!1);var r=e.length;if(r<1)throw new Error("bindAll must be passed function names");for(;r--;){var i=e[r];t[i]=Ew(t[i],t)}return t})});function yI(t,e){var r=function(i){var n=r.cache,o=""+(e?e.apply(this,arguments):i);return Sl(n,o)||(n[o]=t.apply(this,arguments)),n[o]};return r.cache={},r}var D$=It(()=>{Zd()});var Sw,a4=It(()=>{Pc();Sw=Lo(function(t,e,r){return setTimeout(function(){return t.apply(null,r)},e)})});var l4,L$=It(()=>{Tw();a4();Rc();l4=Qd(Sw,dn,1)});function vI(t,e,r){var i,n,o,s,l=0;r||(r={});var u=function(){l=r.leading===!1?0:Jd(),i=null,s=t.apply(n,o),i||(n=o=null)},h=function(){var v=Jd();!l&&r.leading===!1&&(l=v);var T=e-(v-l);return n=this,o=arguments,T<=0||T>e?(i&&(clearTimeout(i),i=null),l=v,s=t.apply(n,o),i||(n=o=null)):!i&&r.trailing!==!1&&(i=setTimeout(u,T)),s};return h.cancel=function(){clearTimeout(i),l=0,i=n=o=null},h}var F$=It(()=>{dI()});function xI(t,e,r){var i,n,o,s,l,u=function(){var v=Jd()-n;e>v?i=setTimeout(u,e-v):(i=null,r||(s=t.apply(l,o)),i||(o=l=null))},h=Lo(function(v){return l=this,o=v,n=Jd(),i||(i=setTimeout(u,e),r&&(s=t.apply(l,o))),s});return h.cancel=function(){clearTimeout(i),i=o=l=null},h}var N$=It(()=>{Pc();dI()});function bI(t,e){return Qd(e,t)}var k$=It(()=>{Tw()});function _A(t){return function(){return!t.apply(this,arguments)}}var wI=It(()=>{});function TI(){var t=arguments,e=t.length-1;return function(){for(var r=e,i=t[e].apply(this,arguments);r--;)i=t[r].call(this,i);return i}}var U$=It(()=>{});function EI(t,e){return function(){if(--t<1)return e.apply(this,arguments)}}var z$=It(()=>{});function jy(t,e){var r;return function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=null),r}}var c4=It(()=>{});var u4,V$=It(()=>{Tw();c4();u4=Qd(jy,2)});function Gy(t,e,r){e=Fo(e,r);for(var i=Gn(t),n,o=0,s=i.length;o{sc();rl()});function Cw(t){return function(e,r,i){r=Fo(r,i);for(var n=as(e),o=t>0?0:n-1;o>=0&&o{sc();iu()});var Ng,SI=It(()=>{h4();Ng=Cw(1)});var Mw,d4=It(()=>{h4();Mw=Cw(-1)});function Wy(t,e,r,i){r=Fo(r,i,1);for(var n=r(e),o=0,s=as(t);o{sc();iu()});function Iw(t,e,r){return function(i,n,o){var s=0,l=as(i);if(typeof o=="number")t>0?s=o>=0?o:Math.max(o+l,s):l=o>=0?Math.min(o+1,l):o+l+1;else if(r&&o&&l)return o=r(i,n),i[o]===n?o:-1;if(n!==n)return o=e(Gh.call(i,s,l),Oy),o>=0?o+s:-1;for(o=t>0?s:l-1;o>=0&&o{iu();_s();TN()});var Pw,m4=It(()=>{p4();SI();A4();Pw=Iw(1,Ng,Wy)});var g4,H$=It(()=>{d4();A4();g4=Iw(-1,Mw)});function kg(t,e,r){var i=ls(t)?Ng:Gy,n=i(t,e,r);if(n!==void 0&&n!==-1)return t[n]}var _4=It(()=>{Oc();SI();f4()});function CI(t,e){return kg(t,zf(e))}var j$=It(()=>{_4();vw()});function il(t,e,r){e=Vf(e,r);var i,n;if(ls(t))for(i=0,n=t.length;i{Vy();Oc();rl()});function ac(t,e,r){e=Fo(e,r);for(var i=!ls(t)&&Gn(t),n=(i||t).length,o=Array(n),s=0;s{sc();Oc();rl()});function Rw(t){var e=function(r,i,n,o){var s=!ls(r)&&Gn(r),l=(s||r).length,u=t>0?0:l-1;for(o||(n=r[s?s[u]:u],u+=t);u>=0&&u=3;return e(r,Vf(i,o,4),n,s)}}var y4=It(()=>{Oc();rl();Vy()});var Bw,G$=It(()=>{y4();Bw=Rw(1)});var MI,W$=It(()=>{y4();MI=Rw(-1)});function nu(t,e,r){var i=[];return e=Fo(e,r),il(t,function(n,o,s){e(n,o,s)&&i.push(n)}),i}var qy=It(()=>{sc();yA()});function II(t,e,r){return nu(t,_A(Fo(e)),r)}var q$=It(()=>{qy();wI();sc()});function Ow(t,e,r){e=Fo(e,r);for(var i=!ls(t)&&Gn(t),n=(i||t).length,o=0;o{sc();Oc();rl()});function Dw(t,e,r){e=Fo(e,r);for(var i=!ls(t)&&Gn(t),n=(i||t).length,o=0;o{sc();Oc();rl()});function Gl(t,e,r,i){return ls(t)||(t=Bc(t)),(typeof r!="number"||i)&&(r=0),Pw(t,e,r)>=0}var Xy=It(()=>{Oc();Pg();m4()});var v4,K$=It(()=>{Pc();ru();Ug();sI();Uy();v4=Lo(function(t,e,r){var i,n;return qo(e)?n=e:(e=Uf(e),i=e.slice(0,-1),e=e[e.length-1]),ac(t,function(o){var s=n;if(!s){if(i&&i.length&&(o=Og(o,i)),o==null)return;s=o[e]}return s==null?s:s.apply(o,r)})})});function vA(t,e){return ac(t,gA(e))}var PI=It(()=>{Ug();cI()});function RI(t,e){return nu(t,zf(e))}var Z$=It(()=>{qy();vw()});function Yy(t,e,r){var i=-1/0,n=-1/0,o,s;if(e==null||typeof e=="number"&&typeof t[0]!="object"&&t!=null){t=ls(t)?t:Bc(t);for(var l=0,u=t.length;li&&(i=o)}else e=Fo(e,r),il(t,function(h,v,T){s=e(h,v,T),(s>n||s===-1/0&&i===-1/0)&&(i=h,n=s)});return i}var x4=It(()=>{Oc();Pg();sc();yA()});function BI(t,e,r){var i=1/0,n=1/0,o,s;if(e==null||typeof e=="number"&&typeof t[0]!="object"&&t!=null){t=ls(t)?t:Bc(t);for(var l=0,u=t.length;l{Oc();Pg();sc();yA()});function Ky(t){return t?oc(t)?Gh.call(t):Cg(t)?t.match(DMe):ls(t)?ac(t,mA):Bc(t):[]}var DMe,b4=It(()=>{pA();_s();GM();Oc();Ug();lI();Pg();DMe=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g});function Zy(t,e,r){if(e==null||r)return ls(t)||(t=Bc(t)),t[Lg(t.length-1)];var i=Ky(t),n=as(i);e=Math.max(Math.min(e,n),0);for(var o=n-1,s=0;s{Oc();Pg();iu();KN();b4()});function OI(t){return Zy(t,1/0)}var Q$=It(()=>{w4()});function DI(t,e,r){var i=0;return e=Fo(e,r),vA(ac(t,function(n,o,s){return{value:n,index:i++,criteria:e(n,o,s)}}).sort(function(n,o){var s=n.criteria,l=o.criteria;if(s!==l){if(s>l||s===void 0)return 1;if(s{sc();PI();Ug()});function $d(t,e){return function(r,i,n){var o=e?[[],[]]:{};return i=Fo(i,n),il(r,function(s,l){var u=i(s,l,r);t(o,s,u)}),o}}var Lw=It(()=>{sc();yA()});var T4,eee=It(()=>{Lw();Zd();T4=$d(function(t,e,r){Sl(t,r)?t[r].push(e):t[r]=[e]})});var E4,tee=It(()=>{Lw();E4=$d(function(t,e,r){t[r]=e})});var S4,ree=It(()=>{Lw();Zd();S4=$d(function(t,e,r){Sl(t,r)?t[r]++:t[r]=1})});var C4,iee=It(()=>{Lw();C4=$d(function(t,e,r){t[r?0:1].push(e)},!0)});function LI(t){return t==null?0:ls(t)?t.length:Gn(t).length}var nee=It(()=>{Oc();rl()});function M4(t,e,r){return e in r}var oee=It(()=>{});var Fw,I4=It(()=>{Pc();ru();Vy();Fy();oee();Fg();Fw=Lo(function(t,e){var r={},i=e[0];if(t==null)return r;qo(i)?(e.length>1&&(i=Vf(i,e[1])),e=Zu(t)):(i=M4,e=Dc(e,!1,!1),t=Object(t));for(var n=0,o=e.length;n{Pc();ru();wI();Ug();Fg();Xy();I4();P4=Lo(function(t,e){var r=e[0],i;return qo(r)?(r=_A(r),e.length>1&&(i=e[1])):(e=ac(Dc(e,!1,!1),String),r=function(n,o){return!Gl(e,o)}),Fw(t,r,i)})});function Jy(t,e,r){return Gh.call(t,0,Math.max(0,t.length-(e==null||r?1:e)))}var R4=It(()=>{_s()});function Qy(t,e,r){return t==null||t.length<1?e==null||r?void 0:[]:e==null||r?t[0]:Jy(t,t.length-e)}var aee=It(()=>{R4()});function xA(t,e,r){return Gh.call(t,e==null||r?1:e)}var B4=It(()=>{_s()});function FI(t,e,r){return t==null||t.length<1?e==null||r?void 0:[]:e==null||r?t[t.length-1]:xA(t,Math.max(0,t.length-e))}var lee=It(()=>{B4()});function NI(t){return nu(t,Boolean)}var cee=It(()=>{qy()});function kI(t,e){return Dc(t,e,!1)}var uee=It(()=>{Fg()});var Nw,O4=It(()=>{Pc();Fg();qy();Xy();Nw=Lo(function(t,e){return e=Dc(e,!0,!0),nu(t,function(r){return!Gl(e,r)})})});var D4,fee=It(()=>{Pc();O4();D4=Lo(function(t,e){return Nw(t,e)})});function zg(t,e,r,i){Py(e)||(i=r,r=e,e=!1),r!=null&&(r=Fo(r,i));for(var n=[],o=[],s=0,l=as(t);s{AN();sc();iu();Xy()});var F4,hee=It(()=>{Pc();L4();Fg();F4=Lo(function(t){return zg(Dc(t,!0,!0))})});function UI(t){for(var e=[],r=arguments.length,i=0,n=as(t);i{iu();Xy()});function Vg(t){for(var e=t&&Yy(t,as).length||0,r=Array(e),i=0;i{x4();iu();PI()});var k4,pee=It(()=>{Pc();N4();k4=Lo(Vg)});function zI(t,e){for(var r={},i=0,n=as(t);i{iu()});function VI(t,e,r){e==null&&(e=t||0,t=0),r||(r=e{});function HI(t,e){if(e==null||e<1)return[];for(var r=[],i=0,n=t.length;i{_s()});function $y(t,e){return t._chain?dn(e).chain():e}var U4=It(()=>{Rc()});function ev(t){return il(Rg(t),function(e){var r=dn[e]=t[e];dn.prototype[e]=function(){var i=[this._wrapped];return VQ.apply(i,arguments),$y(this,r.apply(dn,i))}}),dn}var _ee=It(()=>{Rc();yA();zN();_s();U4()});var yee,vee=It(()=>{Rc();yA();_s();U4();il(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=lw[t];dn.prototype[t]=function(){var r=this._wrapped;return r!=null&&(e.apply(r,arguments),(t==="shift"||t==="splice")&&r.length===0&&delete r[0]),$y(this,r)}});il(["concat","join","slice"],function(t){var e=lw[t];dn.prototype[t]=function(){var r=this._wrapped;return r!=null&&(r=e.apply(r,arguments)),$y(this,r)}});yee=dn});var z4={};As(z4,{VERSION:()=>aw,after:()=>EI,all:()=>Ow,allKeys:()=>Zu,any:()=>Dw,assign:()=>AA,before:()=>jy,bind:()=>Ew,bindAll:()=>s4,chain:()=>_I,chunk:()=>HI,clone:()=>nI,collect:()=>ac,compact:()=>NI,compose:()=>TI,constant:()=>Dy,contains:()=>Gl,countBy:()=>S4,create:()=>iI,debounce:()=>xI,default:()=>yee,defaults:()=>gw,defer:()=>l4,delay:()=>Sw,detect:()=>kg,difference:()=>Nw,drop:()=>xA,each:()=>il,escape:()=>QN,every:()=>Ow,extend:()=>mw,extendOwn:()=>AA,filter:()=>nu,find:()=>kg,findIndex:()=>Ng,findKey:()=>Gy,findLastIndex:()=>Mw,findWhere:()=>CI,first:()=>Qy,flatten:()=>kI,foldl:()=>Bw,foldr:()=>MI,forEach:()=>il,functions:()=>Rg,get:()=>zy,groupBy:()=>T4,has:()=>aI,head:()=>Qy,identity:()=>mA,include:()=>Gl,includes:()=>Gl,indexBy:()=>E4,indexOf:()=>Pw,initial:()=>Jy,inject:()=>Bw,intersection:()=>UI,invert:()=>ky,invoke:()=>v4,isArguments:()=>Mg,isArray:()=>oc,isArrayBuffer:()=>fw,isBoolean:()=>Py,isDataView:()=>dA,isDate:()=>gN,isElement:()=>jM,isEmpty:()=>ZM,isEqual:()=>QM,isError:()=>yN,isFinite:()=>YM,isFunction:()=>qo,isMap:()=>LN,isMatch:()=>Ly,isNaN:()=>Oy,isNull:()=>HM,isNumber:()=>cw,isObject:()=>jl,isRegExp:()=>_N,isSet:()=>NN,isString:()=>Cg,isSymbol:()=>uw,isTypedArray:()=>pw,isUndefined:()=>Iy,isWeakMap:()=>FN,isWeakSet:()=>kN,iteratee:()=>Dg,keys:()=>Gn,last:()=>FI,lastIndexOf:()=>g4,map:()=>ac,mapObject:()=>uI,matcher:()=>zf,matches:()=>zf,max:()=>Yy,memoize:()=>yI,methods:()=>Rg,min:()=>BI,mixin:()=>ev,negate:()=>_A,noop:()=>Hy,now:()=>Jd,object:()=>zI,omit:()=>P4,once:()=>u4,pairs:()=>eI,partial:()=>Qd,partition:()=>C4,pick:()=>Fw,pluck:()=>vA,property:()=>gA,propertyOf:()=>fI,random:()=>Lg,range:()=>VI,reduce:()=>Bw,reduceRight:()=>MI,reject:()=>II,rest:()=>xA,restArguments:()=>Lo,result:()=>mI,sample:()=>Zy,select:()=>nu,shuffle:()=>OI,size:()=>LI,some:()=>Dw,sortBy:()=>DI,sortedIndex:()=>Wy,tail:()=>xA,take:()=>Qy,tap:()=>oI,template:()=>AI,templateSettings:()=>e4,throttle:()=>vI,times:()=>hI,toArray:()=>Ky,toPath:()=>yw,transpose:()=>Vg,unescape:()=>$N,union:()=>F4,uniq:()=>zg,unique:()=>zg,uniqueId:()=>gI,unzip:()=>Vg,values:()=>Bc,where:()=>RI,without:()=>D4,wrap:()=>bI,zip:()=>k4});var jI=It(()=>{_s();Pc();hA();YQ();pN();AN();KQ();GM();mN();ZQ();JQ();QQ();vN();xN();qM();pA();ru();XM();t$();TN();MN();n$();PN();l$();d$();p$();A$();m$();rl();Fy();Pg();g$();UN();zN();VN();rI();HN();_$();y$();v$();WN();x$();b$();lI();EN();YN();GN();cI();w$();vw();T$();KN();dI();E$();M$();t4();I$();P$();R$();B$();XN();Tw();o4();O$();D$();a4();L$();F$();N$();k$();wI();U$();z$();c4();V$();f4();SI();d4();p4();m4();H$();_4();j$();yA();Ug();G$();W$();qy();q$();X$();Y$();Xy();K$();PI();Z$();x4();J$();Q$();w4();$$();eee();tee();ree();iee();b4();nee();I4();see();aee();R4();lee();B4();cee();uee();fee();L4();hee();dee();O4();N4();pee();Aee();mee();gee();_ee();vee()});var V4,xee,bee=It(()=>{jI();jI();V4=ev(z4);V4._=V4;xee=V4});var wee={};As(wee,{VERSION:()=>aw,after:()=>EI,all:()=>Ow,allKeys:()=>Zu,any:()=>Dw,assign:()=>AA,before:()=>jy,bind:()=>Ew,bindAll:()=>s4,chain:()=>_I,chunk:()=>HI,clone:()=>nI,collect:()=>ac,compact:()=>NI,compose:()=>TI,constant:()=>Dy,contains:()=>Gl,countBy:()=>S4,create:()=>iI,debounce:()=>xI,default:()=>xee,defaults:()=>gw,defer:()=>l4,delay:()=>Sw,detect:()=>kg,difference:()=>Nw,drop:()=>xA,each:()=>il,escape:()=>QN,every:()=>Ow,extend:()=>mw,extendOwn:()=>AA,filter:()=>nu,find:()=>kg,findIndex:()=>Ng,findKey:()=>Gy,findLastIndex:()=>Mw,findWhere:()=>CI,first:()=>Qy,flatten:()=>kI,foldl:()=>Bw,foldr:()=>MI,forEach:()=>il,functions:()=>Rg,get:()=>zy,groupBy:()=>T4,has:()=>aI,head:()=>Qy,identity:()=>mA,include:()=>Gl,includes:()=>Gl,indexBy:()=>E4,indexOf:()=>Pw,initial:()=>Jy,inject:()=>Bw,intersection:()=>UI,invert:()=>ky,invoke:()=>v4,isArguments:()=>Mg,isArray:()=>oc,isArrayBuffer:()=>fw,isBoolean:()=>Py,isDataView:()=>dA,isDate:()=>gN,isElement:()=>jM,isEmpty:()=>ZM,isEqual:()=>QM,isError:()=>yN,isFinite:()=>YM,isFunction:()=>qo,isMap:()=>LN,isMatch:()=>Ly,isNaN:()=>Oy,isNull:()=>HM,isNumber:()=>cw,isObject:()=>jl,isRegExp:()=>_N,isSet:()=>NN,isString:()=>Cg,isSymbol:()=>uw,isTypedArray:()=>pw,isUndefined:()=>Iy,isWeakMap:()=>FN,isWeakSet:()=>kN,iteratee:()=>Dg,keys:()=>Gn,last:()=>FI,lastIndexOf:()=>g4,map:()=>ac,mapObject:()=>uI,matcher:()=>zf,matches:()=>zf,max:()=>Yy,memoize:()=>yI,methods:()=>Rg,min:()=>BI,mixin:()=>ev,negate:()=>_A,noop:()=>Hy,now:()=>Jd,object:()=>zI,omit:()=>P4,once:()=>u4,pairs:()=>eI,partial:()=>Qd,partition:()=>C4,pick:()=>Fw,pluck:()=>vA,property:()=>gA,propertyOf:()=>fI,random:()=>Lg,range:()=>VI,reduce:()=>Bw,reduceRight:()=>MI,reject:()=>II,rest:()=>xA,restArguments:()=>Lo,result:()=>mI,sample:()=>Zy,select:()=>nu,shuffle:()=>OI,size:()=>LI,some:()=>Dw,sortBy:()=>DI,sortedIndex:()=>Wy,tail:()=>xA,take:()=>Qy,tap:()=>oI,template:()=>AI,templateSettings:()=>e4,throttle:()=>vI,times:()=>hI,toArray:()=>Ky,toPath:()=>yw,transpose:()=>Vg,unescape:()=>$N,union:()=>F4,uniq:()=>zg,unique:()=>zg,uniqueId:()=>gI,unzip:()=>Vg,values:()=>Bc,where:()=>RI,without:()=>D4,wrap:()=>bI,zip:()=>k4});var Tee=It(()=>{bee();jI()});var H4=Qt((Eee,GI)=>{(function(t,e){"use strict";typeof GI=="object"&&typeof GI.exports=="object"?GI.exports=t.document?e(t,!0):function(r){if(!r.document)throw new Error("jQuery requires a window with a document");return e(r)}:e(t)})(typeof window<"u"?window:Eee,function(t,e){"use strict";var r=[],i=Object.getPrototypeOf,n=r.slice,o=r.flat?function(P){return r.flat.call(P)}:function(P){return r.concat.apply([],P)},s=r.push,l=r.indexOf,u={},h=u.toString,v=u.hasOwnProperty,T=v.toString,E=T.call(Object),M={},O=function(U){return typeof U=="function"&&typeof U.nodeType!="number"&&typeof U.item!="function"},F=function(U){return U!=null&&U===U.window},z=t.document,W={type:!0,src:!0,nonce:!0,noModule:!0};function J(P,U,G){G=G||z;var Q,le,ce=G.createElement("script");if(ce.text=P,U)for(Q in W)le=U[Q]||U.getAttribute&&U.getAttribute(Q),le&&ce.setAttribute(Q,le);G.head.appendChild(ce).parentNode.removeChild(ce)}function K(P){return P==null?P+"":typeof P=="object"||typeof P=="function"?u[h.call(P)]||"object":typeof P}var ne="3.7.1",ge=/HTML$/i,j=function(P,U){return new j.fn.init(P,U)};j.fn=j.prototype={jquery:ne,constructor:j,length:0,toArray:function(){return n.call(this)},get:function(P){return P==null?n.call(this):P<0?this[P+this.length]:this[P]},pushStack:function(P){var U=j.merge(this.constructor(),P);return U.prevObject=this,U},each:function(P){return j.each(this,P)},map:function(P){return this.pushStack(j.map(this,function(U,G){return P.call(U,G,U)}))},slice:function(){return this.pushStack(n.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(j.grep(this,function(P,U){return(U+1)%2}))},odd:function(){return this.pushStack(j.grep(this,function(P,U){return U%2}))},eq:function(P){var U=this.length,G=+P+(P<0?U:0);return this.pushStack(G>=0&&G0&&U-1 in P}function fe(P,U){return P.nodeName&&P.nodeName.toLowerCase()===U.toLowerCase()}var $=r.pop,Z=r.sort,we=r.splice,Oe="[\\x20\\t\\r\\n\\f]",he=new RegExp("^"+Oe+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Oe+"+$","g");j.contains=function(P,U){var G=U&&U.parentNode;return P===G||!!(G&&G.nodeType===1&&(P.contains?P.contains(G):P.compareDocumentPosition&&P.compareDocumentPosition(G)&16))};var Le=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function ft(P,U){return U?P==="\0"?"\uFFFD":P.slice(0,-1)+"\\"+P.charCodeAt(P.length-1).toString(16)+" ":"\\"+P}j.escapeSelector=function(P){return(P+"").replace(Le,ft)};var Vt=z,Yt=s;(function(){var P,U,G,Q,le,ce=Yt,_e,Qe,qe,ct,Nt,jt=j.expando,dt=0,fr=0,mi=ha(),ut=ha(),St=ha(),cr=ha(),Xr=function(ze,st){return ze===st&&(le=!0),0},g="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ki="(?:\\\\[\\da-fA-F]{1,6}"+Oe+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",Wr="\\["+Oe+"*("+ki+")(?:"+Oe+"*([*^$|!~]?=)"+Oe+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+ki+"))|)"+Oe+"*\\]",Re=":("+ki+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+Wr+")*)|.*)\\)|)",Ti=new RegExp(Oe+"+","g"),An=new RegExp("^"+Oe+"*,"+Oe+"*"),Qn=new RegExp("^"+Oe+"*([>+~]|"+Oe+")"+Oe+"*"),En=new RegExp(Oe+"|>"),ln=new RegExp(Re),$n=new RegExp("^"+ki+"$"),ji={ID:new RegExp("^#("+ki+")"),CLASS:new RegExp("^\\.("+ki+")"),TAG:new RegExp("^("+ki+"|[*])"),ATTR:new RegExp("^"+Wr),PSEUDO:new RegExp("^"+Re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+Oe+"*(even|odd|(([+-]|)(\\d*)n|)"+Oe+"*(?:([+-]|)"+Oe+"*(\\d+)|))"+Oe+"*\\)|)","i"),bool:new RegExp("^(?:"+g+")$","i"),needsContext:new RegExp("^"+Oe+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+Oe+"*((?:-\\d)?\\d*)"+Oe+"*\\)|)(?=[^-]|$)","i")},Gi=/^(?:input|select|textarea|button)$/i,an=/^h\d$/i,ea=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Yh=/[+~]/,Hs=new RegExp("\\\\[\\da-fA-F]{1,6}"+Oe+"?|\\\\([^\\r\\n\\f])","g"),Ko=function(ze,st){var Tt="0x"+ze.slice(1)-65536;return st||(Tt<0?String.fromCharCode(Tt+65536):String.fromCharCode(Tt>>10|55296,Tt&1023|56320))},fu=function(){Xl()},fl=Hc(function(ze){return ze.disabled===!0&&fe(ze,"fieldset")},{dir:"parentNode",next:"legend"});function hu(){try{return _e.activeElement}catch{}}try{ce.apply(r=n.call(Vt.childNodes),Vt.childNodes),r[Vt.childNodes.length].nodeType}catch{ce={apply:function(st,Tt){Yt.apply(st,n.call(Tt))},call:function(st){Yt.apply(st,n.call(arguments,1))}}}function Sn(ze,st,Tt,Lt){var Gt,_r,hr,yr,Lr,Fi,vr,jr=st&&st.ownerDocument,Ci=st?st.nodeType:9;if(Tt=Tt||[],typeof ze!="string"||!ze||Ci!==1&&Ci!==9&&Ci!==11)return Tt;if(!Lt&&(Xl(st),st=st||_e,qe)){if(Ci!==11&&(Lr=ea.exec(ze)))if(Gt=Lr[1]){if(Ci===9)if(hr=st.getElementById(Gt)){if(hr.id===Gt)return ce.call(Tt,hr),Tt}else return Tt;else if(jr&&(hr=jr.getElementById(Gt))&&Sn.contains(st,hr)&&hr.id===Gt)return ce.call(Tt,hr),Tt}else{if(Lr[2])return ce.apply(Tt,st.getElementsByTagName(ze)),Tt;if((Gt=Lr[3])&&st.getElementsByClassName)return ce.apply(Tt,st.getElementsByClassName(Gt)),Tt}if(!cr[ze+" "]&&(!ct||!ct.test(ze))){if(vr=ze,jr=st,Ci===1&&(En.test(ze)||Qn.test(ze))){for(jr=Yh.test(ze)&&Kf(st.parentNode)||st,(jr!=st||!M.scope)&&((yr=st.getAttribute("id"))?yr=j.escapeSelector(yr):st.setAttribute("id",yr=jt)),Fi=hl(ze),_r=Fi.length;_r--;)Fi[_r]=(yr?"#"+yr:":scope")+" "+hc(Fi[_r]);vr=Fi.join(",")}try{return ce.apply(Tt,jr.querySelectorAll(vr)),Tt}catch{cr(ze,!0)}finally{yr===jt&&st.removeAttribute("id")}}}return Vo(ze.replace(he,"$1"),st,Tt,Lt)}function ha(){var ze=[];function st(Tt,Lt){return ze.push(Tt+" ")>U.cacheLength&&delete st[ze.shift()],st[Tt+" "]=Lt}return st}function gi(ze){return ze[jt]=!0,ze}function Fe(ze){var st=_e.createElement("fieldset");try{return!!ze(st)}catch{return!1}finally{st.parentNode&&st.parentNode.removeChild(st),st=null}}function _i(ze){return function(st){return fe(st,"input")&&st.type===ze}}function Kh(ze){return function(st){return(fe(st,"input")||fe(st,"button"))&&st.type===ze}}function Vc(ze){return function(st){return"form"in st?st.parentNode&&st.disabled===!1?"label"in st?"label"in st.parentNode?st.parentNode.disabled===ze:st.disabled===ze:st.isDisabled===ze||st.isDisabled!==!ze&&fl(st)===ze:st.disabled===ze:"label"in st?st.disabled===ze:!1}}function Is(ze){return gi(function(st){return st=+st,gi(function(Tt,Lt){for(var Gt,_r=ze([],Tt.length,st),hr=_r.length;hr--;)Tt[Gt=_r[hr]]&&(Tt[Gt]=!(Lt[Gt]=Tt[Gt]))})})}function Kf(ze){return ze&&typeof ze.getElementsByTagName<"u"&&ze}function Xl(ze){var st,Tt=ze?ze.ownerDocument||ze:Vt;return Tt==_e||Tt.nodeType!==9||!Tt.documentElement||(_e=Tt,Qe=_e.documentElement,qe=!j.isXMLDoc(_e),Nt=Qe.matches||Qe.webkitMatchesSelector||Qe.msMatchesSelector,Qe.msMatchesSelector&&Vt!=_e&&(st=_e.defaultView)&&st.top!==st&&st.addEventListener("unload",fu),M.getById=Fe(function(Lt){return Qe.appendChild(Lt).id=j.expando,!_e.getElementsByName||!_e.getElementsByName(j.expando).length}),M.disconnectedMatch=Fe(function(Lt){return Nt.call(Lt,"*")}),M.scope=Fe(function(){return _e.querySelectorAll(":scope")}),M.cssHas=Fe(function(){try{return _e.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),M.getById?(U.filter.ID=function(Lt){var Gt=Lt.replace(Hs,Ko);return function(_r){return _r.getAttribute("id")===Gt}},U.find.ID=function(Lt,Gt){if(typeof Gt.getElementById<"u"&&qe){var _r=Gt.getElementById(Lt);return _r?[_r]:[]}}):(U.filter.ID=function(Lt){var Gt=Lt.replace(Hs,Ko);return function(_r){var hr=typeof _r.getAttributeNode<"u"&&_r.getAttributeNode("id");return hr&&hr.value===Gt}},U.find.ID=function(Lt,Gt){if(typeof Gt.getElementById<"u"&&qe){var _r,hr,yr,Lr=Gt.getElementById(Lt);if(Lr){if(_r=Lr.getAttributeNode("id"),_r&&_r.value===Lt)return[Lr];for(yr=Gt.getElementsByName(Lt),hr=0;Lr=yr[hr++];)if(_r=Lr.getAttributeNode("id"),_r&&_r.value===Lt)return[Lr]}return[]}}),U.find.TAG=function(Lt,Gt){return typeof Gt.getElementsByTagName<"u"?Gt.getElementsByTagName(Lt):Gt.querySelectorAll(Lt)},U.find.CLASS=function(Lt,Gt){if(typeof Gt.getElementsByClassName<"u"&&qe)return Gt.getElementsByClassName(Lt)},ct=[],Fe(function(Lt){var Gt;Qe.appendChild(Lt).innerHTML="",Lt.querySelectorAll("[selected]").length||ct.push("\\["+Oe+"*(?:value|"+g+")"),Lt.querySelectorAll("[id~="+jt+"-]").length||ct.push("~="),Lt.querySelectorAll("a#"+jt+"+*").length||ct.push(".#.+[+~]"),Lt.querySelectorAll(":checked").length||ct.push(":checked"),Gt=_e.createElement("input"),Gt.setAttribute("type","hidden"),Lt.appendChild(Gt).setAttribute("name","D"),Qe.appendChild(Lt).disabled=!0,Lt.querySelectorAll(":disabled").length!==2&&ct.push(":enabled",":disabled"),Gt=_e.createElement("input"),Gt.setAttribute("name",""),Lt.appendChild(Gt),Lt.querySelectorAll("[name='']").length||ct.push("\\["+Oe+"*name"+Oe+"*="+Oe+`*(?:''|"")`)}),M.cssHas||ct.push(":has"),ct=ct.length&&new RegExp(ct.join("|")),Xr=function(Lt,Gt){if(Lt===Gt)return le=!0,0;var _r=!Lt.compareDocumentPosition-!Gt.compareDocumentPosition;return _r||(_r=(Lt.ownerDocument||Lt)==(Gt.ownerDocument||Gt)?Lt.compareDocumentPosition(Gt):1,_r&1||!M.sortDetached&&Gt.compareDocumentPosition(Lt)===_r?Lt===_e||Lt.ownerDocument==Vt&&Sn.contains(Vt,Lt)?-1:Gt===_e||Gt.ownerDocument==Vt&&Sn.contains(Vt,Gt)?1:Q?l.call(Q,Lt)-l.call(Q,Gt):0:_r&4?-1:1)}),_e}Sn.matches=function(ze,st){return Sn(ze,null,null,st)},Sn.matchesSelector=function(ze,st){if(Xl(ze),qe&&!cr[st+" "]&&(!ct||!ct.test(st)))try{var Tt=Nt.call(ze,st);if(Tt||M.disconnectedMatch||ze.document&&ze.document.nodeType!==11)return Tt}catch{cr(st,!0)}return Sn(st,_e,null,[ze]).length>0},Sn.contains=function(ze,st){return(ze.ownerDocument||ze)!=_e&&Xl(ze),j.contains(ze,st)},Sn.attr=function(ze,st){(ze.ownerDocument||ze)!=_e&&Xl(ze);var Tt=U.attrHandle[st.toLowerCase()],Lt=Tt&&v.call(U.attrHandle,st.toLowerCase())?Tt(ze,st,!qe):void 0;return Lt!==void 0?Lt:ze.getAttribute(st)},Sn.error=function(ze){throw new Error("Syntax error, unrecognized expression: "+ze)},j.uniqueSort=function(ze){var st,Tt=[],Lt=0,Gt=0;if(le=!M.sortStable,Q=!M.sortStable&&n.call(ze,0),Z.call(ze,Xr),le){for(;st=ze[Gt++];)st===ze[Gt]&&(Lt=Tt.push(Gt));for(;Lt--;)we.call(ze,Tt[Lt],1)}return Q=null,ze},j.fn.uniqueSort=function(){return this.pushStack(j.uniqueSort(n.apply(this)))},U=j.expr={cacheLength:50,createPseudo:gi,match:ji,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(ze){return ze[1]=ze[1].replace(Hs,Ko),ze[3]=(ze[3]||ze[4]||ze[5]||"").replace(Hs,Ko),ze[2]==="~="&&(ze[3]=" "+ze[3]+" "),ze.slice(0,4)},CHILD:function(ze){return ze[1]=ze[1].toLowerCase(),ze[1].slice(0,3)==="nth"?(ze[3]||Sn.error(ze[0]),ze[4]=+(ze[4]?ze[5]+(ze[6]||1):2*(ze[3]==="even"||ze[3]==="odd")),ze[5]=+(ze[7]+ze[8]||ze[3]==="odd")):ze[3]&&Sn.error(ze[0]),ze},PSEUDO:function(ze){var st,Tt=!ze[6]&&ze[2];return ji.CHILD.test(ze[0])?null:(ze[3]?ze[2]=ze[4]||ze[5]||"":Tt&&ln.test(Tt)&&(st=hl(Tt,!0))&&(st=Tt.indexOf(")",Tt.length-st)-Tt.length)&&(ze[0]=ze[0].slice(0,st),ze[2]=Tt.slice(0,st)),ze.slice(0,3))}},filter:{TAG:function(ze){var st=ze.replace(Hs,Ko).toLowerCase();return ze==="*"?function(){return!0}:function(Tt){return fe(Tt,st)}},CLASS:function(ze){var st=mi[ze+" "];return st||(st=new RegExp("(^|"+Oe+")"+ze+"("+Oe+"|$)"))&&mi(ze,function(Tt){return st.test(typeof Tt.className=="string"&&Tt.className||typeof Tt.getAttribute<"u"&&Tt.getAttribute("class")||"")})},ATTR:function(ze,st,Tt){return function(Lt){var Gt=Sn.attr(Lt,ze);return Gt==null?st==="!=":st?(Gt+="",st==="="?Gt===Tt:st==="!="?Gt!==Tt:st==="^="?Tt&&Gt.indexOf(Tt)===0:st==="*="?Tt&&Gt.indexOf(Tt)>-1:st==="$="?Tt&&Gt.slice(-Tt.length)===Tt:st==="~="?(" "+Gt.replace(Ti," ")+" ").indexOf(Tt)>-1:st==="|="?Gt===Tt||Gt.slice(0,Tt.length+1)===Tt+"-":!1):!0}},CHILD:function(ze,st,Tt,Lt,Gt){var _r=ze.slice(0,3)!=="nth",hr=ze.slice(-4)!=="last",yr=st==="of-type";return Lt===1&&Gt===0?function(Lr){return!!Lr.parentNode}:function(Lr,Fi,vr){var jr,Ci,fi,Mn,rs,js=_r!==hr?"nextSibling":"previousSibling",Va=Lr.parentNode,ta=yr&&Lr.nodeName.toLowerCase(),dl=!vr&&!yr,vo=!1;if(Va){if(_r){for(;js;){for(fi=Lr;fi=fi[js];)if(yr?fe(fi,ta):fi.nodeType===1)return!1;rs=js=ze==="only"&&!rs&&"nextSibling"}return!0}if(rs=[hr?Va.firstChild:Va.lastChild],hr&&dl){for(Ci=Va[jt]||(Va[jt]={}),jr=Ci[ze]||[],Mn=jr[0]===dt&&jr[1],vo=Mn&&jr[2],fi=Mn&&Va.childNodes[Mn];fi=++Mn&&fi&&fi[js]||(vo=Mn=0)||rs.pop();)if(fi.nodeType===1&&++vo&&fi===Lr){Ci[ze]=[dt,Mn,vo];break}}else if(dl&&(Ci=Lr[jt]||(Lr[jt]={}),jr=Ci[ze]||[],Mn=jr[0]===dt&&jr[1],vo=Mn),vo===!1)for(;(fi=++Mn&&fi&&fi[js]||(vo=Mn=0)||rs.pop())&&!((yr?fe(fi,ta):fi.nodeType===1)&&++vo&&(dl&&(Ci=fi[jt]||(fi[jt]={}),Ci[ze]=[dt,vo]),fi===Lr)););return vo-=Gt,vo===Lt||vo%Lt===0&&vo/Lt>=0}}},PSEUDO:function(ze,st){var Tt,Lt=U.pseudos[ze]||U.setFilters[ze.toLowerCase()]||Sn.error("unsupported pseudo: "+ze);return Lt[jt]?Lt(st):Lt.length>1?(Tt=[ze,ze,"",st],U.setFilters.hasOwnProperty(ze.toLowerCase())?gi(function(Gt,_r){for(var hr,yr=Lt(Gt,st),Lr=yr.length;Lr--;)hr=l.call(Gt,yr[Lr]),Gt[hr]=!(_r[hr]=yr[Lr])}):function(Gt){return Lt(Gt,0,Tt)}):Lt}},pseudos:{not:gi(function(ze){var st=[],Tt=[],Lt=za(ze.replace(he,"$1"));return Lt[jt]?gi(function(Gt,_r,hr,yr){for(var Lr,Fi=Lt(Gt,null,yr,[]),vr=Gt.length;vr--;)(Lr=Fi[vr])&&(Gt[vr]=!(_r[vr]=Lr))}):function(Gt,_r,hr){return st[0]=Gt,Lt(st,null,hr,Tt),st[0]=null,!Tt.pop()}}),has:gi(function(ze){return function(st){return Sn(ze,st).length>0}}),contains:gi(function(ze){return ze=ze.replace(Hs,Ko),function(st){return(st.textContent||j.text(st)).indexOf(ze)>-1}}),lang:gi(function(ze){return $n.test(ze||"")||Sn.error("unsupported lang: "+ze),ze=ze.replace(Hs,Ko).toLowerCase(),function(st){var Tt;do if(Tt=qe?st.lang:st.getAttribute("xml:lang")||st.getAttribute("lang"))return Tt=Tt.toLowerCase(),Tt===ze||Tt.indexOf(ze+"-")===0;while((st=st.parentNode)&&st.nodeType===1);return!1}}),target:function(ze){var st=t.location&&t.location.hash;return st&&st.slice(1)===ze.id},root:function(ze){return ze===Qe},focus:function(ze){return ze===hu()&&_e.hasFocus()&&!!(ze.type||ze.href||~ze.tabIndex)},enabled:Vc(!1),disabled:Vc(!0),checked:function(ze){return fe(ze,"input")&&!!ze.checked||fe(ze,"option")&&!!ze.selected},selected:function(ze){return ze.parentNode&&ze.parentNode.selectedIndex,ze.selected===!0},empty:function(ze){for(ze=ze.firstChild;ze;ze=ze.nextSibling)if(ze.nodeType<6)return!1;return!0},parent:function(ze){return!U.pseudos.empty(ze)},header:function(ze){return an.test(ze.nodeName)},input:function(ze){return Gi.test(ze.nodeName)},button:function(ze){return fe(ze,"input")&&ze.type==="button"||fe(ze,"button")},text:function(ze){var st;return fe(ze,"input")&&ze.type==="text"&&((st=ze.getAttribute("type"))==null||st.toLowerCase()==="text")},first:Is(function(){return[0]}),last:Is(function(ze,st){return[st-1]}),eq:Is(function(ze,st,Tt){return[Tt<0?Tt+st:Tt]}),even:Is(function(ze,st){for(var Tt=0;Ttst?Lt=st:Lt=Tt;--Lt>=0;)ze.push(Lt);return ze}),gt:Is(function(ze,st,Tt){for(var Lt=Tt<0?Tt+st:Tt;++Lt1?function(st,Tt,Lt){for(var Gt=ze.length;Gt--;)if(!ze[Gt](st,Tt,Lt))return!1;return!0}:ze[0]}function Zf(ze,st,Tt){for(var Lt=0,Gt=st.length;Lt-1&&(hr[vr]=!(yr[vr]=Ci))}}else fi=Jf(fi===yr?fi.splice(js,fi.length):fi),Gt?Gt(null,yr,fi,Fi):ce.apply(yr,fi)})}function du(ze){for(var st,Tt,Lt,Gt=ze.length,_r=U.relative[ze[0].type],hr=_r||U.relative[" "],yr=_r?1:0,Lr=Hc(function(jr){return jr===st},hr,!0),Fi=Hc(function(jr){return l.call(st,jr)>-1},hr,!0),vr=[function(jr,Ci,fi){var Mn=!_r&&(fi||Ci!=G)||((st=Ci).nodeType?Lr(jr,Ci,fi):Fi(jr,Ci,fi));return st=null,Mn}];yr1&&rf(vr),yr>1&&hc(ze.slice(0,yr-1).concat({value:ze[yr-2].type===" "?"*":""})).replace(he,"$1"),Tt,yr0,Lt=ze.length>0,Gt=function(_r,hr,yr,Lr,Fi){var vr,jr,Ci,fi=0,Mn="0",rs=_r&&[],js=[],Va=G,ta=_r||Lt&&U.find.TAG("*",Fi),dl=dt+=Va==null?1:Math.random()||.1,vo=ta.length;for(Fi&&(G=hr==_e||hr||Fi);Mn!==vo&&(vr=ta[Mn])!=null;Mn++){if(Lt&&vr){for(jr=0,!hr&&vr.ownerDocument!=_e&&(Xl(vr),yr=!qe);Ci=ze[jr++];)if(Ci(vr,hr||_e,yr)){ce.call(Lr,vr);break}Fi&&(dt=dl)}Tt&&((vr=!Ci&&vr)&&fi--,_r&&rs.push(vr))}if(fi+=Mn,Tt&&Mn!==fi){for(jr=0;Ci=st[jr++];)Ci(rs,js,hr,yr);if(_r){if(fi>0)for(;Mn--;)rs[Mn]||js[Mn]||(js[Mn]=$.call(Lr));js=Jf(js)}ce.apply(Lr,js),Fi&&!_r&&js.length>0&&fi+st.length>1&&j.uniqueSort(Lr)}return Fi&&(dt=dl,G=Va),rs};return Tt?gi(Gt):Gt}function za(ze,st){var Tt,Lt=[],Gt=[],_r=St[ze+" "];if(!_r){for(st||(st=hl(ze)),Tt=st.length;Tt--;)_r=du(st[Tt]),_r[jt]?Lt.push(_r):Gt.push(_r);_r=St(ze,Zh(Gt,Lt)),_r.selector=ze}return _r}function Vo(ze,st,Tt,Lt){var Gt,_r,hr,yr,Lr,Fi=typeof ze=="function"&&ze,vr=!Lt&&hl(ze=Fi.selector||ze);if(Tt=Tt||[],vr.length===1){if(_r=vr[0]=vr[0].slice(0),_r.length>2&&(hr=_r[0]).type==="ID"&&st.nodeType===9&&qe&&U.relative[_r[1].type]){if(st=(U.find.ID(hr.matches[0].replace(Hs,Ko),st)||[])[0],st)Fi&&(st=st.parentNode);else return Tt;ze=ze.slice(_r.shift().value.length)}for(Gt=ji.needsContext.test(ze)?0:_r.length;Gt--&&(hr=_r[Gt],!U.relative[yr=hr.type]);)if((Lr=U.find[yr])&&(Lt=Lr(hr.matches[0].replace(Hs,Ko),Yh.test(_r[0].type)&&Kf(st.parentNode)||st))){if(_r.splice(Gt,1),ze=Lt.length&&hc(_r),!ze)return ce.apply(Tt,Lt),Tt;break}}return(Fi||za(ze,vr))(Lt,st,!qe,Tt,!st||Yh.test(ze)&&Kf(st.parentNode)||st),Tt}M.sortStable=jt.split("").sort(Xr).join("")===jt,Xl(),M.sortDetached=Fe(function(ze){return ze.compareDocumentPosition(_e.createElement("fieldset"))&1}),j.find=Sn,j.expr[":"]=j.expr.pseudos,j.unique=j.uniqueSort,Sn.compile=za,Sn.select=Vo,Sn.setDocument=Xl,Sn.tokenize=hl,Sn.escape=j.escapeSelector,Sn.getText=j.text,Sn.isXML=j.isXMLDoc,Sn.selectors=j.expr,Sn.support=j.support,Sn.uniqueSort=j.uniqueSort})();var mr=function(P,U,G){for(var Q=[],le=G!==void 0;(P=P[U])&&P.nodeType!==9;)if(P.nodeType===1){if(le&&j(P).is(G))break;Q.push(P)}return Q},Er=function(P,U){for(var G=[];P;P=P.nextSibling)P.nodeType===1&&P!==U&&G.push(P);return G},Jr=j.expr.match.needsContext,or=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function ai(P,U,G){return O(U)?j.grep(P,function(Q,le){return!!U.call(Q,le,Q)!==G}):U.nodeType?j.grep(P,function(Q){return Q===U!==G}):typeof U!="string"?j.grep(P,function(Q){return l.call(U,Q)>-1!==G}):j.filter(U,P,G)}j.filter=function(P,U,G){var Q=U[0];return G&&(P=":not("+P+")"),U.length===1&&Q.nodeType===1?j.find.matchesSelector(Q,P)?[Q]:[]:j.find.matches(P,j.grep(U,function(le){return le.nodeType===1}))},j.fn.extend({find:function(P){var U,G,Q=this.length,le=this;if(typeof P!="string")return this.pushStack(j(P).filter(function(){for(U=0;U1?j.uniqueSort(G):G},filter:function(P){return this.pushStack(ai(this,P||[],!1))},not:function(P){return this.pushStack(ai(this,P||[],!0))},is:function(P){return!!ai(this,typeof P=="string"&&Jr.test(P)?j(P):P||[],!1).length}});var Jt,qt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,wi=j.fn.init=function(P,U,G){var Q,le;if(!P)return this;if(G=G||Jt,typeof P=="string")if(P[0]==="<"&&P[P.length-1]===">"&&P.length>=3?Q=[null,P,null]:Q=qt.exec(P),Q&&(Q[1]||!U))if(Q[1]){if(U=U instanceof j?U[0]:U,j.merge(this,j.parseHTML(Q[1],U&&U.nodeType?U.ownerDocument||U:z,!0)),or.test(Q[1])&&j.isPlainObject(U))for(Q in U)O(this[Q])?this[Q](U[Q]):this.attr(Q,U[Q]);return this}else return le=z.getElementById(Q[2]),le&&(this[0]=le,this.length=1),this;else return!U||U.jquery?(U||G).find(P):this.constructor(U).find(P);else{if(P.nodeType)return this[0]=P,this.length=1,this;if(O(P))return G.ready!==void 0?G.ready(P):P(j)}return j.makeArray(P,this)};wi.prototype=j.fn,Jt=j(z);var ae=/^(?:parents|prev(?:Until|All))/,be={children:!0,contents:!0,next:!0,prev:!0};j.fn.extend({has:function(P){var U=j(P,this),G=U.length;return this.filter(function(){for(var Q=0;Q-1:G.nodeType===1&&j.find.matchesSelector(G,P))){ce.push(G);break}}return this.pushStack(ce.length>1?j.uniqueSort(ce):ce)},index:function(P){return P?typeof P=="string"?l.call(j(P),this[0]):l.call(this,P.jquery?P[0]:P):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(P,U){return this.pushStack(j.uniqueSort(j.merge(this.get(),j(P,U))))},addBack:function(P){return this.add(P==null?this.prevObject:this.prevObject.filter(P))}});function je(P,U){for(;(P=P[U])&&P.nodeType!==1;);return P}j.each({parent:function(P){var U=P.parentNode;return U&&U.nodeType!==11?U:null},parents:function(P){return mr(P,"parentNode")},parentsUntil:function(P,U,G){return mr(P,"parentNode",G)},next:function(P){return je(P,"nextSibling")},prev:function(P){return je(P,"previousSibling")},nextAll:function(P){return mr(P,"nextSibling")},prevAll:function(P){return mr(P,"previousSibling")},nextUntil:function(P,U,G){return mr(P,"nextSibling",G)},prevUntil:function(P,U,G){return mr(P,"previousSibling",G)},siblings:function(P){return Er((P.parentNode||{}).firstChild,P)},children:function(P){return Er(P.firstChild)},contents:function(P){return P.contentDocument!=null&&i(P.contentDocument)?P.contentDocument:(fe(P,"template")&&(P=P.content||P),j.merge([],P.childNodes))}},function(P,U){j.fn[P]=function(G,Q){var le=j.map(this,U,G);return P.slice(-5)!=="Until"&&(Q=G),Q&&typeof Q=="string"&&(le=j.filter(Q,le)),this.length>1&&(be[P]||j.uniqueSort(le),ae.test(P)&&le.reverse()),this.pushStack(le)}});var lt=/[^\x20\t\r\n\f]+/g;function Ft(P){var U={};return j.each(P.match(lt)||[],function(G,Q){U[Q]=!0}),U}j.Callbacks=function(P){P=typeof P=="string"?Ft(P):j.extend({},P);var U,G,Q,le,ce=[],_e=[],Qe=-1,qe=function(){for(le=le||P.once,Q=U=!0;_e.length;Qe=-1)for(G=_e.shift();++Qe-1;)ce.splice(dt,1),dt<=Qe&&Qe--}),this},has:function(Nt){return Nt?j.inArray(Nt,ce)>-1:ce.length>0},empty:function(){return ce&&(ce=[]),this},disable:function(){return le=_e=[],ce=G="",this},disabled:function(){return!ce},lock:function(){return le=_e=[],!G&&!U&&(ce=G=""),this},locked:function(){return!!le},fireWith:function(Nt,jt){return le||(jt=jt||[],jt=[Nt,jt.slice?jt.slice():jt],_e.push(jt),U||qe()),this},fire:function(){return ct.fireWith(this,arguments),this},fired:function(){return!!Q}};return ct};function wt(P){return P}function $r(P){throw P}function xi(P,U,G,Q){var le;try{P&&O(le=P.promise)?le.call(P).done(U).fail(G):P&&O(le=P.then)?le.call(P,U,G):U.apply(void 0,[P].slice(Q))}catch(ce){G.apply(void 0,[ce])}}j.extend({Deferred:function(P){var U=[["notify","progress",j.Callbacks("memory"),j.Callbacks("memory"),2],["resolve","done",j.Callbacks("once memory"),j.Callbacks("once memory"),0,"resolved"],["reject","fail",j.Callbacks("once memory"),j.Callbacks("once memory"),1,"rejected"]],G="pending",Q={state:function(){return G},always:function(){return le.done(arguments).fail(arguments),this},catch:function(ce){return Q.then(null,ce)},pipe:function(){var ce=arguments;return j.Deferred(function(_e){j.each(U,function(Qe,qe){var ct=O(ce[qe[4]])&&ce[qe[4]];le[qe[1]](function(){var Nt=ct&&ct.apply(this,arguments);Nt&&O(Nt.promise)?Nt.promise().progress(_e.notify).done(_e.resolve).fail(_e.reject):_e[qe[0]+"With"](this,ct?[Nt]:arguments)})}),ce=null}).promise()},then:function(ce,_e,Qe){var qe=0;function ct(Nt,jt,dt,fr){return function(){var mi=this,ut=arguments,St=function(){var Xr,g;if(!(Nt=qe&&(dt!==$r&&(mi=void 0,ut=[Xr]),jt.rejectWith(mi,ut))}};Nt?cr():(j.Deferred.getErrorHook?cr.error=j.Deferred.getErrorHook():j.Deferred.getStackHook&&(cr.error=j.Deferred.getStackHook()),t.setTimeout(cr))}}return j.Deferred(function(Nt){U[0][3].add(ct(0,Nt,O(Qe)?Qe:wt,Nt.notifyWith)),U[1][3].add(ct(0,Nt,O(ce)?ce:wt)),U[2][3].add(ct(0,Nt,O(_e)?_e:$r))}).promise()},promise:function(ce){return ce!=null?j.extend(ce,Q):Q}},le={};return j.each(U,function(ce,_e){var Qe=_e[2],qe=_e[5];Q[_e[1]]=Qe.add,qe&&Qe.add(function(){G=qe},U[3-ce][2].disable,U[3-ce][3].disable,U[0][2].lock,U[0][3].lock),Qe.add(_e[3].fire),le[_e[0]]=function(){return le[_e[0]+"With"](this===le?void 0:this,arguments),this},le[_e[0]+"With"]=Qe.fireWith}),Q.promise(le),P&&P.call(le,le),le},when:function(P){var U=arguments.length,G=U,Q=Array(G),le=n.call(arguments),ce=j.Deferred(),_e=function(Qe){return function(qe){Q[Qe]=this,le[Qe]=arguments.length>1?n.call(arguments):qe,--U||ce.resolveWith(Q,le)}};if(U<=1&&(xi(P,ce.done(_e(G)).resolve,ce.reject,!U),ce.state()==="pending"||O(le[G]&&le[G].then)))return ce.then();for(;G--;)xi(le[G],_e(G),ce.reject);return ce.promise()}});var Ki=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;j.Deferred.exceptionHook=function(P,U){t.console&&t.console.warn&&P&&Ki.test(P.name)&&t.console.warn("jQuery.Deferred exception: "+P.message,P.stack,U)},j.readyException=function(P){t.setTimeout(function(){throw P})};var kn=j.Deferred();j.fn.ready=function(P){return kn.then(P).catch(function(U){j.readyException(U)}),this},j.extend({isReady:!1,readyWait:1,ready:function(P){(P===!0?--j.readyWait:j.isReady)||(j.isReady=!0,!(P!==!0&&--j.readyWait>0)&&kn.resolveWith(z,[j]))}}),j.ready.then=kn.then;function Zi(){z.removeEventListener("DOMContentLoaded",Zi),t.removeEventListener("load",Zi),j.ready()}z.readyState==="complete"||z.readyState!=="loading"&&!z.documentElement.doScroll?t.setTimeout(j.ready):(z.addEventListener("DOMContentLoaded",Zi),t.addEventListener("load",Zi));var Hi=function(P,U,G,Q,le,ce,_e){var Qe=0,qe=P.length,ct=G==null;if(K(G)==="object"){le=!0;for(Qe in G)Hi(P,U,Qe,G[Qe],!0,ce,_e)}else if(Q!==void 0&&(le=!0,O(Q)||(_e=!0),ct&&(_e?(U.call(P,Q),U=null):(ct=U,U=function(Nt,jt,dt){return ct.call(j(Nt),dt)})),U))for(;Qe1,null,!0)},removeData:function(P){return this.each(function(){dr.remove(this,P)})}}),j.extend({queue:function(P,U,G){var Q;if(P)return U=(U||"fx")+"queue",Q=kr.get(P,U),G&&(!Q||Array.isArray(G)?Q=kr.access(P,U,j.makeArray(G)):Q.push(G)),Q||[]},dequeue:function(P,U){U=U||"fx";var G=j.queue(P,U),Q=G.length,le=G.shift(),ce=j._queueHooks(P,U),_e=function(){j.dequeue(P,U)};le==="inprogress"&&(le=G.shift(),Q--),le&&(U==="fx"&&G.unshift("inprogress"),delete ce.stop,le.call(P,_e,ce)),!Q&&ce&&ce.empty.fire()},_queueHooks:function(P,U){var G=U+"queueHooks";return kr.get(P,G)||kr.access(P,G,{empty:j.Callbacks("once memory").add(function(){kr.remove(P,[U+"queue",G])})})}}),j.fn.extend({queue:function(P,U){var G=2;return typeof P!="string"&&(U=P,P="fx",G--),arguments.length\x20\t\r\n\f]*)/i,ao=/^$|^module$|\/(?:java|ecma)script/i;(function(){var P=z.createDocumentFragment(),U=P.appendChild(z.createElement("div")),G=z.createElement("input");G.setAttribute("type","radio"),G.setAttribute("checked","checked"),G.setAttribute("name","t"),U.appendChild(G),M.checkClone=U.cloneNode(!0).cloneNode(!0).lastChild.checked,U.innerHTML="",M.noCloneChecked=!!U.cloneNode(!0).lastChild.defaultValue,U.innerHTML="",M.option=!!U.lastChild})();var oe={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};oe.tbody=oe.tfoot=oe.colgroup=oe.caption=oe.thead,oe.th=oe.td,M.option||(oe.optgroup=oe.option=[1,""]);function de(P,U){var G;return typeof P.getElementsByTagName<"u"?G=P.getElementsByTagName(U||"*"):typeof P.querySelectorAll<"u"?G=P.querySelectorAll(U||"*"):G=[],U===void 0||U&&fe(P,U)?j.merge([P],G):G}function ve(P,U){for(var G=0,Q=P.length;G-1){le&&le.push(ce);continue}if(ct=Us(ce),_e=de(jt.appendChild(ce),"script"),ct&&ve(_e),G)for(Nt=0;ce=_e[Nt++];)ao.test(ce.type||"")&&G.push(ce)}return jt}var tt=/^([^.]*)(?:\.(.+)|)/;function rt(){return!0}function Se(){return!1}function Ge(P,U,G,Q,le,ce){var _e,Qe;if(typeof U=="object"){typeof G!="string"&&(Q=Q||G,G=void 0);for(Qe in U)Ge(P,Qe,G,Q,U[Qe],ce);return P}if(Q==null&&le==null?(le=G,Q=G=void 0):le==null&&(typeof G=="string"?(le=Q,Q=void 0):(le=Q,Q=G,G=void 0)),le===!1)le=Se;else if(!le)return P;return ce===1&&(_e=le,le=function(qe){return j().off(qe),_e.apply(this,arguments)},le.guid=_e.guid||(_e.guid=j.guid++)),P.each(function(){j.event.add(this,U,le,Q,G)})}j.event={global:{},add:function(P,U,G,Q,le){var ce,_e,Qe,qe,ct,Nt,jt,dt,fr,mi,ut,St=kr.get(P);if(yn(P))for(G.handler&&(ce=G,G=ce.handler,le=ce.selector),le&&j.find.matchesSelector(So,le),G.guid||(G.guid=j.guid++),(qe=St.events)||(qe=St.events=Object.create(null)),(_e=St.handle)||(_e=St.handle=function(cr){return typeof j<"u"&&j.event.triggered!==cr.type?j.event.dispatch.apply(P,arguments):void 0}),U=(U||"").match(lt)||[""],ct=U.length;ct--;)Qe=tt.exec(U[ct])||[],fr=ut=Qe[1],mi=(Qe[2]||"").split(".").sort(),fr&&(jt=j.event.special[fr]||{},fr=(le?jt.delegateType:jt.bindType)||fr,jt=j.event.special[fr]||{},Nt=j.extend({type:fr,origType:ut,data:Q,handler:G,guid:G.guid,selector:le,needsContext:le&&j.expr.match.needsContext.test(le),namespace:mi.join(".")},ce),(dt=qe[fr])||(dt=qe[fr]=[],dt.delegateCount=0,(!jt.setup||jt.setup.call(P,Q,mi,_e)===!1)&&P.addEventListener&&P.addEventListener(fr,_e)),jt.add&&(jt.add.call(P,Nt),Nt.handler.guid||(Nt.handler.guid=G.guid)),le?dt.splice(dt.delegateCount++,0,Nt):dt.push(Nt),j.event.global[fr]=!0)},remove:function(P,U,G,Q,le){var ce,_e,Qe,qe,ct,Nt,jt,dt,fr,mi,ut,St=kr.hasData(P)&&kr.get(P);if(!(!St||!(qe=St.events))){for(U=(U||"").match(lt)||[""],ct=U.length;ct--;){if(Qe=tt.exec(U[ct])||[],fr=ut=Qe[1],mi=(Qe[2]||"").split(".").sort(),!fr){for(fr in qe)j.event.remove(P,fr+U[ct],G,Q,!0);continue}for(jt=j.event.special[fr]||{},fr=(Q?jt.delegateType:jt.bindType)||fr,dt=qe[fr]||[],Qe=Qe[2]&&new RegExp("(^|\\.)"+mi.join("\\.(?:.*\\.|)")+"(\\.|$)"),_e=ce=dt.length;ce--;)Nt=dt[ce],(le||ut===Nt.origType)&&(!G||G.guid===Nt.guid)&&(!Qe||Qe.test(Nt.namespace))&&(!Q||Q===Nt.selector||Q==="**"&&Nt.selector)&&(dt.splice(ce,1),Nt.selector&&dt.delegateCount--,jt.remove&&jt.remove.call(P,Nt));_e&&!dt.length&&((!jt.teardown||jt.teardown.call(P,mi,St.handle)===!1)&&j.removeEvent(P,fr,St.handle),delete qe[fr])}j.isEmptyObject(qe)&&kr.remove(P,"handle events")}},dispatch:function(P){var U,G,Q,le,ce,_e,Qe=new Array(arguments.length),qe=j.event.fix(P),ct=(kr.get(this,"events")||Object.create(null))[qe.type]||[],Nt=j.event.special[qe.type]||{};for(Qe[0]=qe,U=1;U=1)){for(;ct!==this;ct=ct.parentNode||this)if(ct.nodeType===1&&!(P.type==="click"&&ct.disabled===!0)){for(ce=[],_e={},G=0;G-1:j.find(le,this,null,[ct]).length),_e[le]&&ce.push(Q);ce.length&&Qe.push({elem:ct,handlers:ce})}}return ct=this,qe\s*$/g;function Xt(P,U){return fe(P,"table")&&fe(U.nodeType!==11?U:U.firstChild,"tr")&&j(P).children("tbody")[0]||P}function Dr(P){return P.type=(P.getAttribute("type")!==null)+"/"+P.type,P}function Mr(P){return(P.type||"").slice(0,5)==="true/"?P.type=P.type.slice(5):P.removeAttribute("type"),P}function Ot(P,U){var G,Q,le,ce,_e,Qe,qe;if(U.nodeType===1){if(kr.hasData(P)&&(ce=kr.get(P),qe=ce.events,qe)){kr.remove(U,"handle events");for(le in qe)for(G=0,Q=qe[le].length;G1&&typeof fr=="string"&&!M.checkClone&&Zt.test(fr))return P.each(function(ut){var St=P.eq(ut);mi&&(U[0]=fr.call(this,ut,St.html())),sr(St,U,G,Q)});if(jt&&(le=ye(U,P[0].ownerDocument,!1,P,Q),ce=le.firstChild,le.childNodes.length===1&&(le=ce),ce||Q)){for(_e=j.map(de(le,"script"),Dr),Qe=_e.length;Nt0&&ve(_e,!qe&&de(P,"script")),Qe},cleanData:function(P){for(var U,G,Q,le=j.event.special,ce=0;(G=P[ce])!==void 0;ce++)if(yn(G)){if(U=G[kr.expando]){if(U.events)for(Q in U.events)le[Q]?j.event.remove(G,Q):j.removeEvent(G,Q,U.handle);G[kr.expando]=void 0}G[dr.expando]&&(G[dr.expando]=void 0)}}}),j.fn.extend({detach:function(P){return lr(this,P,!0)},remove:function(P){return lr(this,P)},text:function(P){return Hi(this,function(U){return U===void 0?j.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=U)})},null,P,arguments.length)},append:function(){return sr(this,arguments,function(P){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var U=Xt(this,P);U.appendChild(P)}})},prepend:function(){return sr(this,arguments,function(P){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var U=Xt(this,P);U.insertBefore(P,U.firstChild)}})},before:function(){return sr(this,arguments,function(P){this.parentNode&&this.parentNode.insertBefore(P,this)})},after:function(){return sr(this,arguments,function(P){this.parentNode&&this.parentNode.insertBefore(P,this.nextSibling)})},empty:function(){for(var P,U=0;(P=this[U])!=null;U++)P.nodeType===1&&(j.cleanData(de(P,!1)),P.textContent="");return this},clone:function(P,U){return P=P??!1,U=U??P,this.map(function(){return j.clone(this,P,U)})},html:function(P){return Hi(this,function(U){var G=this[0]||{},Q=0,le=this.length;if(U===void 0&&G.nodeType===1)return G.innerHTML;if(typeof U=="string"&&!Ht.test(U)&&!oe[(Ml.exec(U)||["",""])[1].toLowerCase()]){U=j.htmlPrefilter(U);try{for(;Q=0&&(qe+=Math.max(0,Math.ceil(P["offset"+U[0].toUpperCase()+U.slice(1)]-ce-qe-Qe-.5))||0),qe+ct}function zs(P,U,G){var Q=Ii(P),le=!M.boxSizingReliable()||G,ce=le&&j.css(P,"boxSizing",!1,Q)==="border-box",_e=ce,Qe=Qi(P,U,Q),qe="offset"+U[0].toUpperCase()+U.slice(1);if(bi.test(Qe)){if(!G)return Qe;Qe="auto"}return(!M.boxSizingReliable()&&ce||!M.reliableTrDimensions()&&fe(P,"tr")||Qe==="auto"||!parseFloat(Qe)&&j.css(P,"display",!1,Q)==="inline")&&P.getClientRects().length&&(ce=j.css(P,"boxSizing",!1,Q)==="border-box",_e=qe in P,_e&&(Qe=P[qe])),Qe=parseFloat(Qe)||0,Qe+Yo(P,U,G||(ce?"border":"content"),_e,Q,Qe)+"px"}j.extend({cssHooks:{opacity:{get:function(P,U){if(U){var G=Qi(P,"opacity");return G===""?"1":G}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(P,U,G,Q){if(!(!P||P.nodeType===3||P.nodeType===8||!P.style)){var le,ce,_e,Qe=Bi(U),qe=pr.test(U),ct=P.style;if(qe||(U=Si(Qe)),_e=j.cssHooks[U]||j.cssHooks[Qe],G!==void 0){if(ce=typeof G,ce==="string"&&(le=Eo.exec(G))&&le[1]&&(G=sl(P,U,le),ce="number"),G==null||G!==G)return;ce==="number"&&!qe&&(G+=le&&le[3]||(j.cssNumber[Qe]?"":"px")),!M.clearCloneStyle&&G===""&&U.indexOf("background")===0&&(ct[U]="inherit"),(!_e||!("set"in _e)||(G=_e.set(P,G,Q))!==void 0)&&(qe?ct.setProperty(U,G):ct[U]=G)}else return _e&&"get"in _e&&(le=_e.get(P,!1,Q))!==void 0?le:ct[U]}},css:function(P,U,G,Q){var le,ce,_e,Qe=Bi(U),qe=pr.test(U);return qe||(U=Si(Qe)),_e=j.cssHooks[U]||j.cssHooks[Qe],_e&&"get"in _e&&(le=_e.get(P,!0,G)),le===void 0&&(le=Qi(P,U,Q)),le==="normal"&&U in fc&&(le=fc[U]),G===""||G?(ce=parseFloat(le),G===!0||isFinite(ce)?ce||0:le):le}}),j.each(["height","width"],function(P,U){j.cssHooks[U]={get:function(G,Q,le){if(Q)return Oi.test(j.css(G,"display"))&&(!G.getClientRects().length||!G.getBoundingClientRect().width)?vn(G,yo,function(){return zs(G,U,le)}):zs(G,U,le)},set:function(G,Q,le){var ce,_e=Ii(G),Qe=!M.scrollboxSize()&&_e.position==="absolute",qe=Qe||le,ct=qe&&j.css(G,"boxSizing",!1,_e)==="border-box",Nt=le?Yo(G,U,le,ct,_e):0;return ct&&Qe&&(Nt-=Math.ceil(G["offset"+U[0].toUpperCase()+U.slice(1)]-parseFloat(_e[U])-Yo(G,U,"border",!1,_e)-.5)),Nt&&(ce=Eo.exec(Q))&&(ce[3]||"px")!=="px"&&(G.style[U]=Q,Q=j.css(G,U)),ko(G,Q,Nt)}}}),j.cssHooks.marginLeft=Li(M.reliableMarginLeft,function(P,U){if(U)return(parseFloat(Qi(P,"marginLeft"))||P.getBoundingClientRect().left-vn(P,{marginLeft:0},function(){return P.getBoundingClientRect().left}))+"px"}),j.each({margin:"",padding:"",border:"Width"},function(P,U){j.cssHooks[P+U]={expand:function(G){for(var Q=0,le={},ce=typeof G=="string"?G.split(" "):[G];Q<4;Q++)le[P+Xo[Q]+U]=ce[Q]||ce[Q-2]||ce[0];return le}},P!=="margin"&&(j.cssHooks[P+U].set=ko)}),j.fn.extend({css:function(P,U){return Hi(this,function(G,Q,le){var ce,_e,Qe={},qe=0;if(Array.isArray(Q)){for(ce=Ii(G),_e=Q.length;qe<_e;qe++)Qe[Q[qe]]=j.css(G,Q[qe],!1,ce);return Qe}return le!==void 0?j.style(G,Q,le):j.css(G,Q)},P,U,arguments.length>1)}});function Uo(P,U,G,Q,le){return new Uo.prototype.init(P,U,G,Q,le)}j.Tween=Uo,Uo.prototype={constructor:Uo,init:function(P,U,G,Q,le,ce){this.elem=P,this.prop=G,this.easing=le||j.easing._default,this.options=U,this.start=this.now=this.cur(),this.end=Q,this.unit=ce||(j.cssNumber[G]?"":"px")},cur:function(){var P=Uo.propHooks[this.prop];return P&&P.get?P.get(this):Uo.propHooks._default.get(this)},run:function(P){var U,G=Uo.propHooks[this.prop];return this.options.duration?this.pos=U=j.easing[this.easing](P,this.options.duration*P,0,1,this.options.duration):this.pos=U=P,this.now=(this.end-this.start)*U+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),G&&G.set?G.set(this):Uo.propHooks._default.set(this),this}},Uo.prototype.init.prototype=Uo.prototype,Uo.propHooks={_default:{get:function(P){var U;return P.elem.nodeType!==1||P.elem[P.prop]!=null&&P.elem.style[P.prop]==null?P.elem[P.prop]:(U=j.css(P.elem,P.prop,""),!U||U==="auto"?0:U)},set:function(P){j.fx.step[P.prop]?j.fx.step[P.prop](P):P.elem.nodeType===1&&(j.cssHooks[P.prop]||P.elem.style[Si(P.prop)]!=null)?j.style(P.elem,P.prop,P.now+P.unit):P.elem[P.prop]=P.now}}},Uo.propHooks.scrollTop=Uo.propHooks.scrollLeft={set:function(P){P.elem.nodeType&&P.elem.parentNode&&(P.elem[P.prop]=P.now)}},j.easing={linear:function(P){return P},swing:function(P){return .5-Math.cos(P*Math.PI)/2},_default:"swing"},j.fx=Uo.prototype.init,j.fx.step={};var zn,ll,cs=/^(?:toggle|show|hide)$/,zo=/queueHooks$/;function ys(){ll&&(z.hidden===!1&&t.requestAnimationFrame?t.requestAnimationFrame(ys):t.setTimeout(ys,j.fx.interval),j.fx.tick())}function pn(){return t.setTimeout(function(){zn=void 0}),zn=Date.now()}function $s(P,U){var G,Q=0,le={height:P};for(U=U?1:0;Q<4;Q+=2-U)G=Xo[Q],le["margin"+G]=le["padding"+G]=P;return U&&(le.opacity=le.width=P),le}function Vs(P,U,G){for(var Q,le=(Ua.tweeners[U]||[]).concat(Ua.tweeners["*"]),ce=0,_e=le.length;ce<_e;ce++)if(Q=le[ce].call(G,U,P))return Q}function Qu(P,U,G){var Q,le,ce,_e,Qe,qe,ct,Nt,jt="width"in U||"height"in U,dt=this,fr={},mi=P.style,ut=P.nodeType&&ql(P),St=kr.get(P,"fxshow");G.queue||(_e=j._queueHooks(P,"fx"),_e.unqueued==null&&(_e.unqueued=0,Qe=_e.empty.fire,_e.empty.fire=function(){_e.unqueued||Qe()}),_e.unqueued++,dt.always(function(){dt.always(function(){_e.unqueued--,j.queue(P,"fx").length||_e.empty.fire()})}));for(Q in U)if(le=U[Q],cs.test(le)){if(delete U[Q],ce=ce||le==="toggle",le===(ut?"hide":"show"))if(le==="show"&&St&&St[Q]!==void 0)ut=!0;else continue;fr[Q]=St&&St[Q]||j.style(P,Q)}if(qe=!j.isEmptyObject(U),!(!qe&&j.isEmptyObject(fr))){jt&&P.nodeType===1&&(G.overflow=[mi.overflow,mi.overflowX,mi.overflowY],ct=St&&St.display,ct==null&&(ct=kr.get(P,"display")),Nt=j.css(P,"display"),Nt==="none"&&(ct?Nt=ct:(Ms([P],!0),ct=P.style.display||ct,Nt=j.css(P,"display"),Ms([P]))),(Nt==="inline"||Nt==="inline-block"&&ct!=null)&&j.css(P,"float")==="none"&&(qe||(dt.done(function(){mi.display=ct}),ct==null&&(Nt=mi.display,ct=Nt==="none"?"":Nt)),mi.display="inline-block")),G.overflow&&(mi.overflow="hidden",dt.always(function(){mi.overflow=G.overflow[0],mi.overflowX=G.overflow[1],mi.overflowY=G.overflow[2]})),qe=!1;for(Q in fr)qe||(St?"hidden"in St&&(ut=St.hidden):St=kr.access(P,"fxshow",{display:ct}),ce&&(St.hidden=!ut),ut&&Ms([P],!0),dt.done(function(){ut||Ms([P]),kr.remove(P,"fxshow");for(Q in fr)j.style(P,Q,fr[Q])})),qe=Vs(ut?St[Q]:0,Q,dt),Q in St||(St[Q]=qe.start,ut&&(qe.end=qe.start,qe.start=0))}}function ua(P,U){var G,Q,le,ce,_e;for(G in P)if(Q=Bi(G),le=U[Q],ce=P[G],Array.isArray(ce)&&(le=ce[1],ce=P[G]=ce[0]),G!==Q&&(P[Q]=ce,delete P[G]),_e=j.cssHooks[Q],_e&&"expand"in _e){ce=_e.expand(ce),delete P[Q];for(G in ce)G in P||(P[G]=ce[G],U[G]=le)}else U[Q]=le}function Ua(P,U,G){var Q,le,ce=0,_e=Ua.prefilters.length,Qe=j.Deferred().always(function(){delete qe.elem}),qe=function(){if(le)return!1;for(var jt=zn||pn(),dt=Math.max(0,ct.startTime+ct.duration-jt),fr=dt/ct.duration||0,mi=1-fr,ut=0,St=ct.tweens.length;ut1)},removeAttr:function(P){return this.each(function(){j.removeAttr(this,P)})}}),j.extend({attr:function(P,U,G){var Q,le,ce=P.nodeType;if(!(ce===3||ce===8||ce===2)){if(typeof P.getAttribute>"u")return j.prop(P,U,G);if((ce!==1||!j.isXMLDoc(P))&&(le=j.attrHooks[U.toLowerCase()]||(j.expr.match.bool.test(U)?cl:void 0)),G!==void 0){if(G===null){j.removeAttr(P,U);return}return le&&"set"in le&&(Q=le.set(P,G,U))!==void 0?Q:(P.setAttribute(U,G+""),G)}return le&&"get"in le&&(Q=le.get(P,U))!==null?Q:(Q=j.find.attr(P,U),Q??void 0)}},attrHooks:{type:{set:function(P,U){if(!M.radioValue&&U==="radio"&&fe(P,"input")){var G=P.value;return P.setAttribute("type",U),G&&(P.value=G),U}}}},removeAttr:function(P,U){var G,Q=0,le=U&&U.match(lt);if(le&&P.nodeType===1)for(;G=le[Q++];)P.removeAttribute(G)}}),cl={set:function(P,U,G){return U===!1?j.removeAttr(P,G):P.setAttribute(G,G),G}},j.each(j.expr.match.bool.source.match(/\w+/g),function(P,U){var G=xe[U]||j.find.attr;xe[U]=function(Q,le,ce){var _e,Qe,qe=le.toLowerCase();return ce||(Qe=xe[qe],xe[qe]=_e,_e=G(Q,le,ce)!=null?qe:null,xe[qe]=Qe),_e}});var Be=/^(?:input|select|textarea|button)$/i,Je=/^(?:a|area)$/i;j.fn.extend({prop:function(P,U){return Hi(this,j.prop,P,U,arguments.length>1)},removeProp:function(P){return this.each(function(){delete this[j.propFix[P]||P]})}}),j.extend({prop:function(P,U,G){var Q,le,ce=P.nodeType;if(!(ce===3||ce===8||ce===2))return(ce!==1||!j.isXMLDoc(P))&&(U=j.propFix[U]||U,le=j.propHooks[U]),G!==void 0?le&&"set"in le&&(Q=le.set(P,G,U))!==void 0?Q:P[U]=G:le&&"get"in le&&(Q=le.get(P,U))!==null?Q:P[U]},propHooks:{tabIndex:{get:function(P){var U=j.find.attr(P,"tabindex");return U?parseInt(U,10):Be.test(P.nodeName)||Je.test(P.nodeName)&&P.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),M.optSelected||(j.propHooks.selected={get:function(P){var U=P.parentNode;return U&&U.parentNode&&U.parentNode.selectedIndex,null},set:function(P){var U=P.parentNode;U&&(U.selectedIndex,U.parentNode&&U.parentNode.selectedIndex)}}),j.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){j.propFix[this.toLowerCase()]=this});function vt(P){var U=P.match(lt)||[];return U.join(" ")}function tr(P){return P.getAttribute&&P.getAttribute("class")||""}function qr(P){return Array.isArray(P)?P:typeof P=="string"?P.match(lt)||[]:[]}j.fn.extend({addClass:function(P){var U,G,Q,le,ce,_e;return O(P)?this.each(function(Qe){j(this).addClass(P.call(this,Qe,tr(this)))}):(U=qr(P),U.length?this.each(function(){if(Q=tr(this),G=this.nodeType===1&&" "+vt(Q)+" ",G){for(ce=0;ce-1;)G=G.replace(" "+le+" "," ");_e=vt(G),Q!==_e&&this.setAttribute("class",_e)}}):this):this.attr("class","")},toggleClass:function(P,U){var G,Q,le,ce,_e=typeof P,Qe=_e==="string"||Array.isArray(P);return O(P)?this.each(function(qe){j(this).toggleClass(P.call(this,qe,tr(this),U),U)}):typeof U=="boolean"&&Qe?U?this.addClass(P):this.removeClass(P):(G=qr(P),this.each(function(){if(Qe)for(ce=j(this),le=0;le-1)return!0;return!1}});var sn=/\r/g;j.fn.extend({val:function(P){var U,G,Q,le=this[0];return arguments.length?(Q=O(P),this.each(function(ce){var _e;this.nodeType===1&&(Q?_e=P.call(this,ce,j(this).val()):_e=P,_e==null?_e="":typeof _e=="number"?_e+="":Array.isArray(_e)&&(_e=j.map(_e,function(Qe){return Qe==null?"":Qe+""})),U=j.valHooks[this.type]||j.valHooks[this.nodeName.toLowerCase()],(!U||!("set"in U)||U.set(this,_e,"value")===void 0)&&(this.value=_e))})):le?(U=j.valHooks[le.type]||j.valHooks[le.nodeName.toLowerCase()],U&&"get"in U&&(G=U.get(le,"value"))!==void 0?G:(G=le.value,typeof G=="string"?G.replace(sn,""):G??"")):void 0}}),j.extend({valHooks:{option:{get:function(P){var U=j.find.attr(P,"value");return U??vt(j.text(P))}},select:{get:function(P){var U,G,Q,le=P.options,ce=P.selectedIndex,_e=P.type==="select-one",Qe=_e?null:[],qe=_e?ce+1:le.length;for(ce<0?Q=qe:Q=_e?ce:0;Q-1)&&(G=!0);return G||(P.selectedIndex=-1),ce}}}}),j.each(["radio","checkbox"],function(){j.valHooks[this]={set:function(P,U){if(Array.isArray(U))return P.checked=j.inArray(j(P).val(),U)>-1}},M.checkOn||(j.valHooks[this].get=function(P){return P.getAttribute("value")===null?"on":P.value})});var Co=t.location,ts={guid:Date.now()},vs=/\?/;j.parseXML=function(P){var U,G;if(!P||typeof P!="string")return null;try{U=new t.DOMParser().parseFromString(P,"text/xml")}catch{}return G=U&&U.getElementsByTagName("parsererror")[0],(!U||G)&&j.error("Invalid XML: "+(G?j.map(G.childNodes,function(Q){return Q.textContent}).join(` `):P)),U};var Sa=/^(?:focusinfocus|focusoutblur)$/,np=function(P){P.stopPropagation()};j.extend(j.event,{trigger:function(P,U,G,Q){var le,ce,_e,Qe,qe,ct,Nt,jt,dt=[G||z],fr=v.call(P,"type")?P.type:P,mi=v.call(P,"namespace")?P.namespace.split("."):[];if(ce=jt=_e=G=G||z,!(G.nodeType===3||G.nodeType===8)&&!Sa.test(fr+j.event.triggered)&&(fr.indexOf(".")>-1&&(mi=fr.split("."),fr=mi.shift(),mi.sort()),qe=fr.indexOf(":")<0&&"on"+fr,P=P[j.expando]?P:new j.Event(fr,typeof P=="object"&&P),P.isTrigger=Q?2:3,P.namespace=mi.join("."),P.rnamespace=P.namespace?new RegExp("(^|\\.)"+mi.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,P.result=void 0,P.target||(P.target=G),U=U==null?[P]:j.makeArray(U,[P]),Nt=j.event.special[fr]||{},!(!Q&&Nt.trigger&&Nt.trigger.apply(G,U)===!1))){if(!Q&&!Nt.noBubble&&!F(G)){for(Qe=Nt.delegateType||fr,Sa.test(Qe+fr)||(ce=ce.parentNode);ce;ce=ce.parentNode)dt.push(ce),_e=ce;_e===(G.ownerDocument||z)&&dt.push(_e.defaultView||_e.parentWindow||t)}for(le=0;(ce=dt[le++])&&!P.isPropagationStopped();)jt=ce,P.type=le>1?Qe:Nt.bindType||fr,ct=(kr.get(ce,"events")||Object.create(null))[P.type]&&kr.get(ce,"handle"),ct&&ct.apply(ce,U),ct=qe&&ce[qe],ct&&ct.apply&&yn(ce)&&(P.result=ct.apply(ce,U),P.result===!1&&P.preventDefault());return P.type=fr,!Q&&!P.isDefaultPrevented()&&(!Nt._default||Nt._default.apply(dt.pop(),U)===!1)&&yn(G)&&qe&&O(G[fr])&&!F(G)&&(_e=G[qe],_e&&(G[qe]=null),j.event.triggered=fr,P.isPropagationStopped()&&jt.addEventListener(fr,np),G[fr](),P.isPropagationStopped()&&jt.removeEventListener(fr,np),j.event.triggered=void 0,_e&&(G[qe]=_e)),P.result}},simulate:function(P,U,G){var Q=j.extend(new j.Event,G,{type:P,isSimulated:!0});j.event.trigger(Q,null,U)}}),j.fn.extend({trigger:function(P,U){return this.each(function(){j.event.trigger(P,U,this)})},triggerHandler:function(P,U){var G=this[0];if(G)return j.event.trigger(P,U,G,!0)}});var $u=/\[\]$/,Wh=/\r?\n/g,Wf=/^(?:submit|button|image|reset|file)$/i,RA=/^(?:input|select|textarea|keygen)/i;function ef(P,U,G,Q){var le;if(Array.isArray(U))j.each(U,function(ce,_e){G||$u.test(P)?Q(P,_e):ef(P+"["+(typeof _e=="object"&&_e!=null?ce:"")+"]",_e,G,Q)});else if(!G&&K(U)==="object")for(le in U)ef(P+"["+le+"]",U[le],G,Q);else Q(P,U)}j.param=function(P,U){var G,Q=[],le=function(ce,_e){var Qe=O(_e)?_e():_e;Q[Q.length]=encodeURIComponent(ce)+"="+encodeURIComponent(Qe??"")};if(P==null)return"";if(Array.isArray(P)||P.jquery&&!j.isPlainObject(P))j.each(P,function(){le(this.name,this.value)});else for(G in P)ef(G,P[G],U,le);return Q.join("&")},j.fn.extend({serialize:function(){return j.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var P=j.prop(this,"elements");return P?j.makeArray(P):this}).filter(function(){var P=this.type;return this.name&&!j(this).is(":disabled")&&RA.test(this.nodeName)&&!Wf.test(P)&&(this.checked||!ca.test(P))}).map(function(P,U){var G=j(this).val();return G==null?null:Array.isArray(G)?j.map(G,function(Q){return{name:U.name,value:Q.replace(Wh,`\r `)}}):{name:U.name,value:G.replace(Wh,`\r `)}}).get()}});var ul=/%20/g,Nc=/#.*$/,kc=/([?&])_=[^&]*/,cu=/^(.*?):[ \t]*([^\r\n]*)$/mg,Uc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,zc=/^(?:GET|HEAD)$/,qh=/^\/\//,fa={},Mo={},uu="*/".concat("*"),Xh=z.createElement("a");Xh.href=Co.href;function BA(P){return function(U,G){typeof U!="string"&&(G=U,U="*");var Q,le=0,ce=U.toLowerCase().match(lt)||[];if(O(G))for(;Q=ce[le++];)Q[0]==="+"?(Q=Q.slice(1)||"*",(P[Q]=P[Q]||[]).unshift(G)):(P[Q]=P[Q]||[]).push(G)}}function OA(P,U,G,Q){var le={},ce=P===Mo;function _e(Qe){var qe;return le[Qe]=!0,j.each(P[Qe]||[],function(ct,Nt){var jt=Nt(U,G,Q);if(typeof jt=="string"&&!ce&&!le[jt])return U.dataTypes.unshift(jt),_e(jt),!1;if(ce)return!(qe=jt)}),qe}return _e(U.dataTypes[0])||!le["*"]&&_e("*")}function qf(P,U){var G,Q,le=j.ajaxSettings.flatOptions||{};for(G in U)U[G]!==void 0&&((le[G]?P:Q||(Q={}))[G]=U[G]);return Q&&j.extend(!0,P,Q),P}function op(P,U,G){for(var Q,le,ce,_e,Qe=P.contents,qe=P.dataTypes;qe[0]==="*";)qe.shift(),Q===void 0&&(Q=P.mimeType||U.getResponseHeader("Content-Type"));if(Q){for(le in Qe)if(Qe[le]&&Qe[le].test(Q)){qe.unshift(le);break}}if(qe[0]in G)ce=qe[0];else{for(le in G){if(!qe[0]||P.converters[le+" "+qe[0]]){ce=le;break}_e||(_e=le)}ce=ce||_e}if(ce)return ce!==qe[0]&&qe.unshift(ce),G[ce]}function sp(P,U,G,Q){var le,ce,_e,Qe,qe,ct={},Nt=P.dataTypes.slice();if(Nt[1])for(_e in P.converters)ct[_e.toLowerCase()]=P.converters[_e];for(ce=Nt.shift();ce;)if(P.responseFields[ce]&&(G[P.responseFields[ce]]=U),!qe&&Q&&P.dataFilter&&(U=P.dataFilter(U,P.dataType)),qe=ce,ce=Nt.shift(),ce){if(ce==="*")ce=qe;else if(qe!=="*"&&qe!==ce){if(_e=ct[qe+" "+ce]||ct["* "+ce],!_e){for(le in ct)if(Qe=le.split(" "),Qe[1]===ce&&(_e=ct[qe+" "+Qe[0]]||ct["* "+Qe[0]],_e)){_e===!0?_e=ct[le]:ct[le]!==!0&&(ce=Qe[0],Nt.unshift(Qe[1]));break}}if(_e!==!0)if(_e&&P.throws)U=_e(U);else try{U=_e(U)}catch(jt){return{state:"parsererror",error:_e?jt:"No conversion from "+qe+" to "+ce}}}}return{state:"success",data:U}}j.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Co.href,type:"GET",isLocal:Uc.test(Co.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":uu,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":j.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(P,U){return U?qf(qf(P,j.ajaxSettings),U):qf(j.ajaxSettings,P)},ajaxPrefilter:BA(fa),ajaxTransport:BA(Mo),ajax:function(P,U){typeof P=="object"&&(U=P,P=void 0),U=U||{};var G,Q,le,ce,_e,Qe,qe,ct,Nt,jt,dt=j.ajaxSetup({},U),fr=dt.context||dt,mi=dt.context&&(fr.nodeType||fr.jquery)?j(fr):j.event,ut=j.Deferred(),St=j.Callbacks("once memory"),cr=dt.statusCode||{},Xr={},g={},ki="canceled",Wr={readyState:0,getResponseHeader:function(Ti){var An;if(qe){if(!ce)for(ce={};An=cu.exec(le);)ce[An[1].toLowerCase()+" "]=(ce[An[1].toLowerCase()+" "]||[]).concat(An[2]);An=ce[Ti.toLowerCase()+" "]}return An==null?null:An.join(", ")},getAllResponseHeaders:function(){return qe?le:null},setRequestHeader:function(Ti,An){return qe==null&&(Ti=g[Ti.toLowerCase()]=g[Ti.toLowerCase()]||Ti,Xr[Ti]=An),this},overrideMimeType:function(Ti){return qe==null&&(dt.mimeType=Ti),this},statusCode:function(Ti){var An;if(Ti)if(qe)Wr.always(Ti[Wr.status]);else for(An in Ti)cr[An]=[cr[An],Ti[An]];return this},abort:function(Ti){var An=Ti||ki;return G&&G.abort(An),Re(0,An),this}};if(ut.promise(Wr),dt.url=((P||dt.url||Co.href)+"").replace(qh,Co.protocol+"//"),dt.type=U.method||U.type||dt.method||dt.type,dt.dataTypes=(dt.dataType||"*").toLowerCase().match(lt)||[""],dt.crossDomain==null){Qe=z.createElement("a");try{Qe.href=dt.url,Qe.href=Qe.href,dt.crossDomain=Xh.protocol+"//"+Xh.host!=Qe.protocol+"//"+Qe.host}catch{dt.crossDomain=!0}}if(dt.data&&dt.processData&&typeof dt.data!="string"&&(dt.data=j.param(dt.data,dt.traditional)),OA(fa,dt,U,Wr),qe)return Wr;ct=j.event&&dt.global,ct&&j.active++===0&&j.event.trigger("ajaxStart"),dt.type=dt.type.toUpperCase(),dt.hasContent=!zc.test(dt.type),Q=dt.url.replace(Nc,""),dt.hasContent?dt.data&&dt.processData&&(dt.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(dt.data=dt.data.replace(ul,"+")):(jt=dt.url.slice(Q.length),dt.data&&(dt.processData||typeof dt.data=="string")&&(Q+=(vs.test(Q)?"&":"?")+dt.data,delete dt.data),dt.cache===!1&&(Q=Q.replace(kc,"$1"),jt=(vs.test(Q)?"&":"?")+"_="+ts.guid+++jt),dt.url=Q+jt),dt.ifModified&&(j.lastModified[Q]&&Wr.setRequestHeader("If-Modified-Since",j.lastModified[Q]),j.etag[Q]&&Wr.setRequestHeader("If-None-Match",j.etag[Q])),(dt.data&&dt.hasContent&&dt.contentType!==!1||U.contentType)&&Wr.setRequestHeader("Content-Type",dt.contentType),Wr.setRequestHeader("Accept",dt.dataTypes[0]&&dt.accepts[dt.dataTypes[0]]?dt.accepts[dt.dataTypes[0]]+(dt.dataTypes[0]!=="*"?", "+uu+"; q=0.01":""):dt.accepts["*"]);for(Nt in dt.headers)Wr.setRequestHeader(Nt,dt.headers[Nt]);if(dt.beforeSend&&(dt.beforeSend.call(fr,Wr,dt)===!1||qe))return Wr.abort();if(ki="abort",St.add(dt.complete),Wr.done(dt.success),Wr.fail(dt.error),G=OA(Mo,dt,U,Wr),!G)Re(-1,"No Transport");else{if(Wr.readyState=1,ct&&mi.trigger("ajaxSend",[Wr,dt]),qe)return Wr;dt.async&&dt.timeout>0&&(_e=t.setTimeout(function(){Wr.abort("timeout")},dt.timeout));try{qe=!1,G.send(Xr,Re)}catch(Ti){if(qe)throw Ti;Re(-1,Ti)}}function Re(Ti,An,Qn,En){var ln,$n,ji,Gi,an,ea=An;qe||(qe=!0,_e&&t.clearTimeout(_e),G=void 0,le=En||"",Wr.readyState=Ti>0?4:0,ln=Ti>=200&&Ti<300||Ti===304,Qn&&(Gi=op(dt,Wr,Qn)),!ln&&j.inArray("script",dt.dataTypes)>-1&&j.inArray("json",dt.dataTypes)<0&&(dt.converters["text script"]=function(){}),Gi=sp(dt,Gi,Wr,ln),ln?(dt.ifModified&&(an=Wr.getResponseHeader("Last-Modified"),an&&(j.lastModified[Q]=an),an=Wr.getResponseHeader("etag"),an&&(j.etag[Q]=an)),Ti===204||dt.type==="HEAD"?ea="nocontent":Ti===304?ea="notmodified":(ea=Gi.state,$n=Gi.data,ji=Gi.error,ln=!ji)):(ji=ea,(Ti||!ea)&&(ea="error",Ti<0&&(Ti=0))),Wr.status=Ti,Wr.statusText=(An||ea)+"",ln?ut.resolveWith(fr,[$n,ea,Wr]):ut.rejectWith(fr,[Wr,ea,ji]),Wr.statusCode(cr),cr=void 0,ct&&mi.trigger(ln?"ajaxSuccess":"ajaxError",[Wr,dt,ln?$n:ji]),St.fireWith(fr,[Wr,ea]),ct&&(mi.trigger("ajaxComplete",[Wr,dt]),--j.active||j.event.trigger("ajaxStop")))}return Wr},getJSON:function(P,U,G){return j.get(P,U,G,"json")},getScript:function(P,U){return j.get(P,void 0,U,"script")}}),j.each(["get","post"],function(P,U){j[U]=function(G,Q,le,ce){return O(Q)&&(ce=ce||le,le=Q,Q=void 0),j.ajax(j.extend({url:G,type:U,dataType:ce,data:Q,success:le},j.isPlainObject(G)&&G))}}),j.ajaxPrefilter(function(P){var U;for(U in P.headers)U.toLowerCase()==="content-type"&&(P.contentType=P.headers[U]||"")}),j._evalUrl=function(P,U,G){return j.ajax({url:P,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(Q){j.globalEval(Q,U,G)}})},j.fn.extend({wrapAll:function(P){var U;return this[0]&&(O(P)&&(P=P.call(this[0])),U=j(P,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&U.insertBefore(this[0]),U.map(function(){for(var G=this;G.firstElementChild;)G=G.firstElementChild;return G}).append(this)),this},wrapInner:function(P){return O(P)?this.each(function(U){j(this).wrapInner(P.call(this,U))}):this.each(function(){var U=j(this),G=U.contents();G.length?G.wrapAll(P):U.append(P)})},wrap:function(P){var U=O(P);return this.each(function(G){j(this).wrapAll(U?P.call(this,G):P)})},unwrap:function(P){return this.parent(P).not("body").each(function(){j(this).replaceWith(this.childNodes)}),this}}),j.expr.pseudos.hidden=function(P){return!j.expr.pseudos.visible(P)},j.expr.pseudos.visible=function(P){return!!(P.offsetWidth||P.offsetHeight||P.getClientRects().length)},j.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch{}};var ap={0:200,1223:204},tf=j.ajaxSettings.xhr();M.cors=!!tf&&"withCredentials"in tf,M.ajax=tf=!!tf,j.ajaxTransport(function(P){var U,G;if(M.cors||tf&&!P.crossDomain)return{send:function(Q,le){var ce,_e=P.xhr();if(_e.open(P.type,P.url,P.async,P.username,P.password),P.xhrFields)for(ce in P.xhrFields)_e[ce]=P.xhrFields[ce];P.mimeType&&_e.overrideMimeType&&_e.overrideMimeType(P.mimeType),!P.crossDomain&&!Q["X-Requested-With"]&&(Q["X-Requested-With"]="XMLHttpRequest");for(ce in Q)_e.setRequestHeader(ce,Q[ce]);U=function(Qe){return function(){U&&(U=G=_e.onload=_e.onerror=_e.onabort=_e.ontimeout=_e.onreadystatechange=null,Qe==="abort"?_e.abort():Qe==="error"?typeof _e.status!="number"?le(0,"error"):le(_e.status,_e.statusText):le(ap[_e.status]||_e.status,_e.statusText,(_e.responseType||"text")!=="text"||typeof _e.responseText!="string"?{binary:_e.response}:{text:_e.responseText},_e.getAllResponseHeaders()))}},_e.onload=U(),G=_e.onerror=_e.ontimeout=U("error"),_e.onabort!==void 0?_e.onabort=G:_e.onreadystatechange=function(){_e.readyState===4&&t.setTimeout(function(){U&&G()})},U=U("abort");try{_e.send(P.hasContent&&P.data||null)}catch(Qe){if(U)throw Qe}},abort:function(){U&&U()}}}),j.ajaxPrefilter(function(P){P.crossDomain&&(P.contents.script=!1)}),j.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(P){return j.globalEval(P),P}}}),j.ajaxPrefilter("script",function(P){P.cache===void 0&&(P.cache=!1),P.crossDomain&&(P.type="GET")}),j.ajaxTransport("script",function(P){if(P.crossDomain||P.scriptAttrs){var U,G;return{send:function(Q,le){U=j("