diff options
| author | Yuval Adam <_@yuv.al> | 2017-10-18 22:55:10 +0300 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2017-10-18 22:55:10 +0300 |
| commit | b183d0cab92e2c439ffdbf4039d64ccdc9845d5e (patch) | |
| tree | 6020d4395cab96a16fc9f4120ce46885800dafd6 /static/js/build.js | |
| parent | 41574a9115e0deb906eeb4aa6cc2383f9c36796c (diff) | |
Add workaround for production build
Diffstat (limited to 'static/js/build.js')
| -rw-r--r-- | static/js/build.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/static/js/build.js b/static/js/build.js index 1a58eec..e6ae630 100644 --- a/static/js/build.js +++ b/static/js/build.js @@ -1,7 +1,7 @@ -!function(t){function e(i){if(r[i])return r[i].exports;var n=r[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var r={};e.m=t,e.c=r,e.d=function(t,r,i){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/static/js/",e(e.s=2)}([function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){(function(e){var r,r;!function(e){t.exports=e()}(function(){var t;return function t(e,i,n){function o(s,l){if(!i[s]){if(!e[s]){var u="function"==typeof r&&r;if(!l&&u)return r(s,!0);if(a)return a(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var p=i[s]={exports:{}};e[s][0].call(p.exports,function(t){var r=e[s][1][t];return o(r||t)},p,p.exports,t,e,i,n)}return i[s].exports}for(var a="function"==typeof r&&r,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,r,i){!function(e,n){"object"==typeof i&&void 0!==r?r.exports=n():"function"==typeof t&&t.amd?t(n):e.glMatrix=n()}(this,function(){"use strict";function t(t,e,r){var i=e[0],n=e[1],o=e[2];return t[0]=i*r[0]+n*r[3]+o*r[6],t[1]=i*r[1]+n*r[4]+o*r[7],t[2]=i*r[2]+n*r[5]+o*r[8],t}function e(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3];return t[0]=r[0]*i+r[4]*n+r[8]*o+r[12]*a,t[1]=r[1]*i+r[5]*n+r[9]*o+r[13]*a,t[2]=r[2]*i+r[6]*n+r[10]*o+r[14]*a,t[3]=r[3]*i+r[7]*n+r[11]*o+r[15]*a,t}function r(){var t=new Float32Array(4);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t}function i(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=i*l+o*s,t[1]=n*l+a*s,t[2]=i*-s+o*l,t[3]=n*-s+a*l,t}function n(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3],s=r[0],l=r[1];return t[0]=i*s,t[1]=n*s,t[2]=o*l,t[3]=a*l,t}function o(){var t=new Float32Array(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function a(t,e){var r=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=r,t[2]=0,t[3]=-r,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function s(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function l(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function u(t,e){var r=e[0],i=e[1],n=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],p=e[9],h=e[10],f=e[11],d=e[12],m=e[13],v=e[14],y=e[15],g=r*s-i*a,_=r*l-n*a,x=r*u-o*a,b=i*l-n*s,w=i*u-o*s,T=n*u-o*l,S=c*m-p*d,z=c*v-h*d,A=c*y-f*d,C=p*v-h*m,E=p*y-f*m,k=h*y-f*v,M=g*k-_*E+x*C+b*A-w*z+T*S;return M?(M=1/M,t[0]=(s*k-l*E+u*C)*M,t[1]=(n*E-i*k-o*C)*M,t[2]=(m*T-v*w+y*b)*M,t[3]=(h*w-p*T-f*b)*M,t[4]=(l*A-a*k-u*z)*M,t[5]=(r*k-n*A+o*z)*M,t[6]=(v*x-d*T-y*_)*M,t[7]=(c*T-h*x+f*_)*M,t[8]=(a*E-s*A+u*S)*M,t[9]=(i*A-r*E-o*S)*M,t[10]=(d*w-m*x+y*g)*M,t[11]=(p*x-c*w-f*g)*M,t[12]=(s*z-a*C-l*S)*M,t[13]=(r*C-i*z+n*S)*M,t[14]=(m*_-d*b-v*g)*M,t[15]=(c*b-p*_+h*g)*M,t):null}function c(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],m=e[12],v=e[13],y=e[14],g=e[15],_=r[0],x=r[1],b=r[2],w=r[3];return t[0]=_*i+x*s+b*p+w*m,t[1]=_*n+x*l+b*h+w*v,t[2]=_*o+x*u+b*f+w*y,t[3]=_*a+x*c+b*d+w*g,_=r[4],x=r[5],b=r[6],w=r[7],t[4]=_*i+x*s+b*p+w*m,t[5]=_*n+x*l+b*h+w*v,t[6]=_*o+x*u+b*f+w*y,t[7]=_*a+x*c+b*d+w*g,_=r[8],x=r[9],b=r[10],w=r[11],t[8]=_*i+x*s+b*p+w*m,t[9]=_*n+x*l+b*h+w*v,t[10]=_*o+x*u+b*f+w*y,t[11]=_*a+x*c+b*d+w*g,_=r[12],x=r[13],b=r[14],w=r[15],t[12]=_*i+x*s+b*p+w*m,t[13]=_*n+x*l+b*h+w*v,t[14]=_*o+x*u+b*f+w*y,t[15]=_*a+x*c+b*d+w*g,t}function p(t,e,r){var i,n,o,a,s,l,u,c,p,h,f,d,m=r[0],v=r[1],y=r[2];return e===t?(t[12]=e[0]*m+e[4]*v+e[8]*y+e[12],t[13]=e[1]*m+e[5]*v+e[9]*y+e[13],t[14]=e[2]*m+e[6]*v+e[10]*y+e[14],t[15]=e[3]*m+e[7]*v+e[11]*y+e[15]):(i=e[0],n=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],t[0]=i,t[1]=n,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=p,t[9]=h,t[10]=f,t[11]=d,t[12]=i*m+s*v+p*y+e[12],t[13]=n*m+l*v+h*y+e[13],t[14]=o*m+u*v+f*y+e[14],t[15]=a*m+c*v+d*y+e[15]),t}function h(t,e,r){var i=r[0],n=r[1],o=r[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function f(t,e,r){var i=Math.sin(r),n=Math.cos(r),o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],p=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*n+u*i,t[5]=a*n+c*i,t[6]=s*n+p*i,t[7]=l*n+h*i,t[8]=u*n-o*i,t[9]=c*n-a*i,t[10]=p*n-s*i,t[11]=h*n-l*i,t}function d(t,e,r){var i=Math.sin(r),n=Math.cos(r),o=e[0],a=e[1],s=e[2],l=e[3],u=e[4],c=e[5],p=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*n+u*i,t[1]=a*n+c*i,t[2]=s*n+p*i,t[3]=l*n+h*i,t[4]=u*n-o*i,t[5]=c*n-a*i,t[6]=p*n-s*i,t[7]=h*n-l*i,t}function m(t,e,r,i,n){var o=1/Math.tan(e/2),a=1/(i-n);return t[0]=o/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(n+i)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*n*i*a,t[15]=0,t}function v(t,e,r,i,n,o,a){var s=1/(e-r),l=1/(i-n),u=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(n+i)*l,t[14]=(a+o)*u,t[15]=1,t}return function(){var t=new Float32Array(3);t[0]=0,t[1]=0,t[2]=0}(),function(){var t=new Float32Array(4);t[0]=0,t[1]=0,t[2]=0,t[3]=0}(),{vec3:{transformMat3:t},vec4:{transformMat4:e},mat2:{create:r,rotate:i,scale:n},mat3:{create:o,fromRotation:a},mat4:{create:s,identity:l,translate:p,scale:h,multiply:c,perspective:m,rotateX:f,rotateZ:d,invert:u,ortho:v}}})},{}],2:[function(t,e,r){"use strict";function i(t,e){this.x=t,this.y=e}e.exports=i,i.prototype={clone:function(){return new i(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},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(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),i=e*this.x-r*this.y,n=r*this.x+e*this.y;return this.x=i,this.y=n,this},_rotateAround:function(t,e){var r=Math.cos(t),i=Math.sin(t),n=e.x+r*(this.x-e.x)-i*(this.y-e.y),o=e.y+i*(this.x-e.x)+r*(this.y-e.y);return this.x=n,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},i.convert=function(t){return t instanceof i?t:Array.isArray(t)?new i(t[0],t[1]):t}},{}],3:[function(e,r,i){!function(e,n){"object"==typeof i&&void 0!==r?r.exports=n():"function"==typeof t&&t.amd?t(n):e.ShelfPack=n()}(this,function(){function t(t,e,r){r=r||{},this.w=t||64,this.h=e||64,this.autoResize=!!r.autoResize,this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0}function e(t,e,r){this.x=0,this.y=t,this.w=this.free=e,this.h=r}function r(t,e,r,i,n,o,a){this.id=t,this.x=e,this.y=r,this.w=i,this.h=n,this.maxw=o||i,this.maxh=a||n,this.refcount=0}return t.prototype.pack=function(t,e){t=[].concat(t),e=e||{};for(var r,i,n,o,a=[],s=0;s<t.length;s++)if(r=t[s].w||t[s].width,i=t[s].h||t[s].height,n=t[s].id,r&&i){if(!(o=this.packOne(r,i,n)))continue;e.inPlace&&(t[s].x=o.x,t[s].y=o.y,t[s].id=o.id),a.push(o)}return this.shrink(),a},t.prototype.packOne=function(t,r,i){var n,o,a,s,l={freebin:-1,shelf:-1,waste:1/0},u=0;if("string"==typeof i||"number"==typeof i){if(n=this.getBin(i))return this.ref(n),n;"number"==typeof i&&(this.maxId=Math.max(i,this.maxId))}else i=++this.maxId;for(s=0;s<this.freebins.length;s++){if(n=this.freebins[s],r===n.maxh&&t===n.maxw)return this.allocFreebin(s,t,r,i);r>n.maxh||t>n.maxw||r<=n.maxh&&t<=n.maxw&&(a=n.maxw*n.maxh-t*r)<l.waste&&(l.waste=a,l.freebin=s)}for(s=0;s<this.shelves.length;s++)if(o=this.shelves[s],u+=o.h,!(t>o.free)){if(r===o.h)return this.allocShelf(s,t,r,i);r>o.h||r<o.h&&(a=(o.h-r)*t)<l.waste&&(l.freebin=-1,l.waste=a,l.shelf=s)}if(-1!==l.freebin)return this.allocFreebin(l.freebin,t,r,i);if(-1!==l.shelf)return this.allocShelf(l.shelf,t,r,i);if(r<=this.h-u&&t<=this.w)return o=new e(u,this.w,r),this.allocShelf(this.shelves.push(o)-1,t,r,i);if(this.autoResize){var c,p,h,f;return c=p=this.h,h=f=this.w,(h<=c||t>h)&&(f=2*Math.max(t,h)),(c<h||r>c)&&(p=2*Math.max(r,c)),this.resize(f,p),this.packOne(t,r,i)}return null},t.prototype.allocFreebin=function(t,e,r,i){var n=this.freebins.splice(t,1)[0];return n.id=i,n.w=e,n.h=r,n.refcount=0,this.bins[i]=n,this.ref(n),n},t.prototype.allocShelf=function(t,e,r,i){var n=this.shelves[t],o=n.alloc(e,r,i);return this.bins[i]=o,this.ref(o),o},t.prototype.shrink=function(){if(this.shelves.length>0){for(var t=0,e=0,r=0;r<this.shelves.length;r++){var i=this.shelves[r];e+=i.h,t=Math.max(i.w-i.free,t)}this.resize(t,e)}},t.prototype.getBin=function(t){return this.bins[t]},t.prototype.ref=function(t){if(1==++t.refcount){var e=t.h;this.stats[e]=1+(0|this.stats[e])}return t.refcount},t.prototype.unref=function(t){return 0===t.refcount?0:(0==--t.refcount&&(this.stats[t.h]--,delete this.bins[t.id],this.freebins.push(t)),t.refcount)},t.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0},t.prototype.resize=function(t,e){this.w=t,this.h=e;for(var r=0;r<this.shelves.length;r++)this.shelves[r].resize(t);return!0},e.prototype.alloc=function(t,e,i){if(t>this.free||e>this.h)return null;var n=this.x;return this.x+=t,this.free-=t,new r(i,n,this.y,t,e,t,this.h)},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t})},{}],4:[function(t,e,r){"use strict";function i(t,e,r,i,n,o){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=i||.25,this.fontFamily=n||"sans-serif",this.fontWeight=o||"normal",this.radius=r||8;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function n(t,e,r,i,n,a,s){for(var l=0;l<e;l++){for(var u=0;u<r;u++)i[u]=t[u*e+l];for(o(i,n,a,s,r),u=0;u<r;u++)t[u*e+l]=n[u]}for(u=0;u<r;u++){for(l=0;l<e;l++)i[l]=t[u*e+l];for(o(i,n,a,s,e),l=0;l<e;l++)t[u*e+l]=Math.sqrt(n[l])}}function o(t,e,r,i,n){r[0]=0,i[0]=-a,i[1]=+a;for(var o=1,s=0;o<n;o++){for(var l=(t[o]+o*o-(t[r[s]]+r[s]*r[s]))/(2*o-2*r[s]);l<=i[s];)s--,l=(t[o]+o*o-(t[r[s]]+r[s]*r[s]))/(2*o-2*r[s]);s++,r[s]=o,i[s]=l,i[s+1]=+a}for(o=0,s=0;o<n;o++){for(;i[s+1]<o;)s++;e[o]=(o-r[s])*(o-r[s])+t[r[s]]}}e.exports=i;var a=1e20;i.prototype.draw=function(t){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(t,this.buffer,this.middle);for(var e=this.ctx.getImageData(0,0,this.size,this.size),r=new Uint8ClampedArray(this.size*this.size),i=0;i<this.size*this.size;i++){var o=e.data[4*i+3]/255;this.gridOuter[i]=1===o?0:0===o?a:Math.pow(Math.max(0,.5-o),2),this.gridInner[i]=1===o?a:0===o?0:Math.pow(Math.max(0,o-.5),2)}for(n(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),n(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),i=0;i<this.size*this.size;i++){var s=this.gridOuter[i]-this.gridInner[i];r[i]=Math.max(0,Math.min(255,Math.round(255-255*(s/this.radius+this.cutoff))))}return r}},{}],5:[function(t,e,r){function i(t,e,r,i){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(i-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=r,this.p2y=i}e.exports=i,i.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},i.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},i.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},i.prototype.solveCurveX=function(t,e){void 0===e&&(e=1e-6);var r,i,n,o,a;for(n=t,a=0;a<8;a++){if(o=this.sampleCurveX(n)-t,Math.abs(o)<e)return n;var s=this.sampleCurveDerivativeX(n);if(Math.abs(s)<1e-6)break;n-=o/s}if(r=0,i=1,(n=t)<r)return r;if(n>i)return i;for(;r<i;){if(o=this.sampleCurveX(n),Math.abs(o-t)<e)return n;t>o?r=n:i=n,n=.5*(i-r)+r}return n},i.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},{}],6:[function(t,e,r){e.exports.VectorTile=t("./lib/vectortile.js"),e.exports.VectorTileFeature=t("./lib/vectortilefeature.js"),e.exports.VectorTileLayer=t("./lib/vectortilelayer.js")},{"./lib/vectortile.js":7,"./lib/vectortilefeature.js":8,"./lib/vectortilelayer.js":9}],7:[function(t,e,r){"use strict";function i(t,e){this.layers=t.readFields(n,{},e)}function n(t,e,r){if(3===t){var i=new o(r,r.readVarint()+r.pos);i.length&&(e[i.name]=i)}}var o=t("./vectortilelayer");e.exports=i},{"./vectortilelayer":9}],8:[function(t,e,r){"use strict";function i(t,e,r,i,o){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=i,this._values=o,t.readFields(n,this,e)}function n(t,e,r){1==t?e.id=r.readVarint():2==t?o(r,e):3==t?e.type=r.readVarint():4==t&&(e._geometry=r.pos)}function o(t,e){for(var r=t.readVarint()+t.pos;t.pos<r;){var i=e._keys[t.readVarint()],n=e._values[t.readVarint()];e.properties[i]=n}}function a(t){var e=t.length;if(e<=1)return[t];for(var r,i,n=[],o=0;o<e;o++){var a=s(t[o]);0!==a&&(void 0===i&&(i=a<0),i===a<0?(r&&n.push(r),r=[t[o]]):r.push(t[o]))}return r&&n.push(r),n}function s(t){for(var e,r,i=0,n=0,o=t.length,a=o-1;n<o;a=n++)e=t[n],r=t[a],i+=(r.x-e.x)*(e.y+r.y);return i}var l=t("@mapbox/point-geometry");e.exports=i,i.types=["Unknown","Point","LineString","Polygon"],i.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,i=1,n=0,o=0,a=0,s=[];t.pos<r;){if(!n){var u=t.readVarint();i=7&u,n=u>>3}if(n--,1===i||2===i)o+=t.readSVarint(),a+=t.readSVarint(),1===i&&(e&&s.push(e),e=[]),e.push(new l(o,a));else{if(7!==i)throw new Error("unknown command "+i);e&&e.push(e[0].clone())}}return e&&s.push(e),s},i.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,i=0,n=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;t.pos<e;){if(!i){var c=t.readVarint();r=7&c,i=c>>3}if(i--,1===r||2===r)n+=t.readSVarint(),o+=t.readSVarint(),n<a&&(a=n),n>s&&(s=n),o<l&&(l=o),o>u&&(u=o);else if(7!==r)throw new Error("unknown command "+r)}return[a,l,s,u]},i.prototype.toGeoJSON=function(t,e,r){function n(t){for(var e=0;e<t.length;e++){var r=t[e],i=180-360*(r.y+c)/l;t[e]=[360*(r.x+u)/l-180,360/Math.PI*Math.atan(Math.exp(i*Math.PI/180))-90]}}var o,s,l=this.extent*Math.pow(2,r),u=this.extent*t,c=this.extent*e,p=this.loadGeometry(),h=i.types[this.type];switch(this.type){case 1:var f=[];for(o=0;o<p.length;o++)f[o]=p[o][0];p=f,n(p);break;case 2:for(o=0;o<p.length;o++)n(p[o]);break;case 3:for(p=a(p),o=0;o<p.length;o++)for(s=0;s<p[o].length;s++)n(p[o][s])}1===p.length?p=p[0]:h="Multi"+h;var d={type:"Feature",geometry:{type:h,coordinates:p},properties:this.properties};return"id"in this&&(d.id=this.id),d}},{"@mapbox/point-geometry":2}],9:[function(t,e,r){"use strict";function i(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(n,this,e),this.length=this._features.length}function n(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push(o(r))}function o(t){for(var e=null,r=t.readVarint()+t.pos;t.pos<r;){var i=t.readVarint()>>3;e=1===i?t.readString():2===i?t.readFloat():3===i?t.readDouble():4===i?t.readVarint64():5===i?t.readVarint():6===i?t.readSVarint():7===i?t.readBoolean():null}return e}var a=t("./vectortilefeature.js");e.exports=i,i.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new a(this._pbf,e,this.extent,this._keys,this._values)}},{"./vectortilefeature.js":8}],10:[function(e,r,i){!function(e,n){"object"==typeof i&&void 0!==r?n(i):"function"==typeof t&&t.amd?t(["exports"],n):n(e.WhooTS=e.WhooTS||{})}(this,function(t){function e(t,e,i,n,o,a){return a=a||{},t+"?"+["bbox="+r(i,n,o),"format="+(a.format||"image/png"),"service="+(a.service||"WMS"),"version="+(a.version||"1.1.1"),"request="+(a.request||"GetMap"),"srs="+(a.srs||"EPSG:3857"),"width="+(a.width||256),"height="+(a.height||256),"layers="+e].join("&")}function r(t,e,r){e=Math.pow(2,r)-e-1;var n=i(256*t,256*e,r),o=i(256*(t+1),256*(e+1),r);return n[0]+","+n[1]+","+o[0]+","+o[1]}function i(t,e,r){var i=2*Math.PI*6378137/256/Math.pow(2,r);return[t*i-2*Math.PI*6378137/2,e*i-2*Math.PI*6378137/2]}t.getURL=e,t.getTileBBox=r,t.getMercCoords=i,Object.defineProperty(t,"__esModule",{value:!0})})},{}],11:[function(t,e,r){"use strict";function i(t,e,r){r=r||2;var i=e&&e.length,o=i?e[0]*r:t.length,s=n(t,0,o,r,!0),l=[];if(!s)return l;var u,c,h,f,d,m,v;if(i&&(s=p(t,e,s,r)),t.length>80*r){u=h=t[0],c=f=t[1];for(var y=r;y<o;y+=r)d=t[y],m=t[y+1],d<u&&(u=d),m<c&&(c=m),d>h&&(h=d),m>f&&(f=m);v=Math.max(h-u,f-c)}return a(s,l,r,u,c,v),l}function n(t,e,r,i,n){var o,a;if(n===L(t,e,r,i)>0)for(o=e;o<r;o+=i)a=E(o,t[o],t[o+1],a);else for(o=r-i;o>=e;o-=i)a=E(o,t[o],t[o+1],a);return a&&w(a,a.next)&&(k(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var r,i=t;do{if(r=!1,i.steiner||!w(i,i.next)&&0!==b(i.prev,i,i.next))i=i.next;else{if(k(i),(i=e=i.prev)===i.next)return null;r=!0}}while(r||i!==e);return e}function a(t,e,r,i,n,p,h){if(t){!h&&p&&m(t,i,n,p);for(var f,d,v=t;t.prev!==t.next;)if(f=t.prev,d=t.next,p?l(t,i,n,p):s(t))e.push(f.i/r),e.push(t.i/r),e.push(d.i/r),k(t),t=d.next,v=d.next;else if((t=d)===v){h?1===h?(t=u(t,e,r),a(t,e,r,i,n,p,2)):2===h&&c(t,e,r,i,n,p):a(o(t),e,r,i,n,p,1);break}}}function s(t){var e=t.prev,r=t,i=t.next;if(b(e,r,i)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(_(e.x,e.y,r.x,r.y,i.x,i.y,n.x,n.y)&&b(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function l(t,e,r,i){var n=t.prev,o=t,a=t.next;if(b(n,o,a)>=0)return!1;for(var s=n.x<o.x?n.x<a.x?n.x:a.x:o.x<a.x?o.x:a.x,l=n.y<o.y?n.y<a.y?n.y:a.y:o.y<a.y?o.y:a.y,u=n.x>o.x?n.x>a.x?n.x:a.x:o.x>a.x?o.x:a.x,c=n.y>o.y?n.y>a.y?n.y:a.y:o.y>a.y?o.y:a.y,p=y(s,l,e,r,i),h=y(u,c,e,r,i),f=t.nextZ;f&&f.z<=h;){if(f!==t.prev&&f!==t.next&&_(n.x,n.y,o.x,o.y,a.x,a.y,f.x,f.y)&&b(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(f=t.prevZ;f&&f.z>=p;){if(f!==t.prev&&f!==t.next&&_(n.x,n.y,o.x,o.y,a.x,a.y,f.x,f.y)&&b(f.prev,f,f.next)>=0)return!1;f=f.prevZ}return!0}function u(t,e,r){var i=t;do{var n=i.prev,o=i.next.next;!w(n,o)&&T(n,i,i.next,o)&&z(n,o)&&z(o,n)&&(e.push(n.i/r),e.push(i.i/r),e.push(o.i/r),k(i),k(i.next),i=t=o),i=i.next}while(i!==t);return i}function c(t,e,r,i,n,s){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&x(l,u)){var c=C(l,u);return l=o(l,l.next),c=o(c,c.next),a(l,e,r,i,n,s),void a(c,e,r,i,n,s)}u=u.next}l=l.next}while(l!==t)}function p(t,e,r,i){var a,s,l,u,c,p=[];for(a=0,s=e.length;a<s;a++)l=e[a]*i,u=a<s-1?e[a+1]*i:t.length,c=n(t,l,u,i,!1),c===c.next&&(c.steiner=!0),p.push(g(c));for(p.sort(h),a=0;a<p.length;a++)f(p[a],r),r=o(r,r.next);return r}function h(t,e){return t.x-e.x}function f(t,e){if(e=d(t,e)){var r=C(e,t);o(r,r.next)}}function d(t,e){var r,i=e,n=t.x,o=t.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=n&&s>a){if(a=s,s===n){if(o===i.y)return i;if(o===i.next.y)return i.next}r=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!r)return null;if(n===a)return r.prev;var l,u=r,c=r.x,p=r.y,h=1/0;for(i=r.next;i!==u;)n>=i.x&&i.x>=c&&_(o<p?n:a,o,c,p,o<p?a:n,o,i.x,i.y)&&((l=Math.abs(o-i.y)/(n-i.x))<h||l===h&&i.x>r.x)&&z(i,t)&&(r=i,h=l),i=i.next;return r}function m(t,e,r,i){var n=t;do{null===n.z&&(n.z=y(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,v(n)}function v(t){var e,r,i,n,o,a,s,l,u=1;do{for(r=t,t=null,o=null,a=0;r;){for(a++,i=r,s=0,e=0;e<u&&(s++,i=i.nextZ);e++);for(l=u;s>0||l>0&&i;)0===s?(n=i,i=i.nextZ,l--):0!==l&&i?r.z<=i.z?(n=r,r=r.nextZ,s--):(n=i,i=i.nextZ,l--):(n=r,r=r.nextZ,s--),o?o.nextZ=n:t=n,n.prevZ=o,o=n;r=i}o.nextZ=null,u*=2}while(a>1);return t}function y(t,e,r,i,n){return t=32767*(t-r)/n,e=32767*(e-i)/n,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function g(t){var e=t,r=t;do{e.x<r.x&&(r=e),e=e.next}while(e!==t);return r}function _(t,e,r,i,n,o,a,s){return(n-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(i-s)-(r-a)*(e-s)>=0&&(r-a)*(o-s)-(n-a)*(i-s)>=0}function x(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!S(t,e)&&z(t,e)&&z(e,t)&&A(t,e)}function b(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function w(t,e){return t.x===e.x&&t.y===e.y}function T(t,e,r,i){return!!(w(t,e)&&w(r,i)||w(t,i)&&w(r,e))||b(t,e,r)>0!=b(t,e,i)>0&&b(r,i,t)>0!=b(r,i,e)>0}function S(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&&T(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function z(t,e){return b(t.prev,t,t.next)<0?b(t,e,t.next)>=0&&b(t,t.prev,e)>=0:b(t,e,t.prev)<0||b(t,t.next,e)<0}function A(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&&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 C(t,e){var r=new M(t.i,t.x,t.y),i=new M(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 E(t,e,r,i){var n=new M(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 k(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 M(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function L(t,e,r,i){for(var n=0,o=e,a=r-i;o<r;o+=i)n+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return n}e.exports=i,i.deviation=function(t,e,r,i){var n=e&&e.length,o=n?e[0]*r:t.length,a=Math.abs(L(t,0,o,r));if(n)for(var s=0,l=e.length;s<l;s++){var u=e[s]*r,c=s<l-1?e[s+1]*r:t.length;a-=Math.abs(L(t,u,c,r))}var p=0;for(s=0;s<i.length;s+=3){var h=i[s]*r,f=i[s+1]*r,d=i[s+2]*r;p+=Math.abs((t[h]-t[d])*(t[f+1]-t[h+1])-(t[h]-t[f])*(t[d+1]-t[h+1]))}return 0===a&&0===p?0:Math.abs((p-a)/a)},i.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},i=0,n=0;n<t.length;n++){for(var o=0;o<t[n].length;o++)for(var a=0;a<e;a++)r.vertices.push(t[n][o][a]);n>0&&(i+=t[n-1].length,r.holes.push(i))}return r}},{}],12:[function(t,e,r){function i(t){if("Polygon"===t.type)return n(t.coordinates);if("MultiPolygon"===t.type){for(var e=0,r=0;r<t.coordinates.length;r++)e+=n(t.coordinates[r]);return e}return null}function n(t){var e=0;if(t&&t.length>0){e+=Math.abs(o(t[0]));for(var r=1;r<t.length;r++)e-=Math.abs(o(t[r]))}return e}function o(t){var e=0;if(t.length>2){for(var r,i,n=0;n<t.length-1;n++)r=t[n],i=t[n+1],e+=a(i[0]-r[0])*(2+Math.sin(a(r[1]))+Math.sin(a(i[1])));e=e*s.RADIUS*s.RADIUS/2}return e}function a(t){return t*Math.PI/180}var s=t("wgs84");e.exports.geometry=i,e.exports.ring=o},{wgs84:40}],13:[function(t,e,r){function i(t,e){switch(t&&t.type||null){case"FeatureCollection":return t.features=t.features.map(n(i,e)),t;case"Feature":return t.geometry=i(t.geometry,e),t;case"Polygon":case"MultiPolygon":return o(t,e);default:return t}}function n(t,e){return function(r){return t(r,e)}}function o(t,e){return"Polygon"===t.type?t.coordinates=a(t.coordinates,e):"MultiPolygon"===t.type&&(t.coordinates=t.coordinates.map(n(a,e))),t}function a(t,e){e=!!e,t[0]=s(t[0],e);for(var r=1;r<t.length;r++)t[r]=s(t[r],!e);return t}function s(t,e){return l(t)===e?t:t.reverse()}function l(t){return u.ring(t)>=0}var u=t("geojson-area");e.exports=i},{"geojson-area":12}],14:[function(t,e,r){"use strict";function i(t,e,r,i,a,l,u,c){if(r/=e,i/=e,u>=r&&c<=i)return t;if(u>i||c<r)return null;for(var p=[],h=0;h<t.length;h++){var f,d,m=t[h],v=m.geometry,y=m.type;if(f=m.min[a],d=m.max[a],f>=r&&d<=i)p.push(m);else if(!(f>i||d<r)){var g=1===y?n(v,r,i,a):o(v,r,i,a,l,3===y);g.length&&p.push(s(m.tags,y,g,m.id))}}return p.length?p:null}function n(t,e,r,i){for(var n=[],o=0;o<t.length;o++){var a=t[o],s=a[i];s>=e&&s<=r&&n.push(a)}return n}function o(t,e,r,i,n,o){for(var s=[],l=0;l<t.length;l++){var u,c,p,h=0,f=0,d=null,m=t[l],v=m.area,y=m.dist,g=m.outer,_=m.length,x=[];for(c=0;c<_-1;c++)u=d||m[c],d=m[c+1],h=f||u[i],f=d[i],h<e?f>r?(x.push(n(u,d,e),n(u,d,r)),o||(x=a(s,x,v,y,g))):f>=e&&x.push(n(u,d,e)):h>r?f<e?(x.push(n(u,d,r),n(u,d,e)),o||(x=a(s,x,v,y,g))):f<=r&&x.push(n(u,d,r)):(x.push(u),f<e?(x.push(n(u,d,e)),o||(x=a(s,x,v,y,g))):f>r&&(x.push(n(u,d,r)),o||(x=a(s,x,v,y,g))));u=m[_-1],h=u[i],h>=e&&h<=r&&x.push(u),p=x[x.length-1],o&&p&&(x[0][0]!==p[0]||x[0][1]!==p[1])&&x.push(x[0]),a(s,x,v,y,g)}return s}function a(t,e,r,i,n){return e.length&&(e.area=r,e.dist=i,void 0!==n&&(e.outer=n),t.push(e)),[]}e.exports=i;var s=t("./feature")},{"./feature":16}],15:[function(t,e,r){"use strict";function i(t,e){var r=[];if("FeatureCollection"===t.type)for(var i=0;i<t.features.length;i++)n(r,t.features[i],e);else"Feature"===t.type?n(r,t,e):n(r,{geometry:t},e);return r}function n(t,e,r){if(null!==e.geometry){var i,s,l,c,p=e.geometry,h=p.type,f=p.coordinates,d=e.properties,m=e.id;if("Point"===h)t.push(u(d,1,[a(f)],m));else if("MultiPoint"===h)t.push(u(d,1,o(f),m));else if("LineString"===h)t.push(u(d,2,[o(f,r)],m));else if("MultiLineString"===h||"Polygon"===h){for(l=[],i=0;i<f.length;i++)c=o(f[i],r),"Polygon"===h&&(c.outer=0===i),l.push(c);t.push(u(d,"Polygon"===h?3:2,l,m))}else if("MultiPolygon"===h){for(l=[],i=0;i<f.length;i++)for(s=0;s<f[i].length;s++)c=o(f[i][s],r),c.outer=0===s,l.push(c);t.push(u(d,3,l,m))}else{if("GeometryCollection"!==h)throw new Error("Input data is not a valid GeoJSON object.");for(i=0;i<p.geometries.length;i++)n(t,{geometry:p.geometries[i],properties:d},r)}}}function o(t,e){for(var r=[],i=0;i<t.length;i++)r.push(a(t[i]));return e&&(l(r,e),s(r)),r}function a(t){var e=Math.sin(t[1]*Math.PI/180),r=t[0]/360+.5,i=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return i=i<0?0:i>1?1:i,[r,i,0]}function s(t){for(var e,r,i=0,n=0,o=0;o<t.length-1;o++)e=r||t[o],r=t[o+1],i+=e[0]*r[1]-r[0]*e[1],n+=Math.abs(r[0]-e[0])+Math.abs(r[1]-e[1]);t.area=Math.abs(i/2),t.dist=n}e.exports=i;var l=t("./simplify"),u=t("./feature")},{"./feature":16,"./simplify":18}],16:[function(t,e,r){"use strict";function i(t,e,r,i){var o={id:i||null,type:e,geometry:r,tags:t||null,min:[1/0,1/0],max:[-1/0,-1/0]};return n(o),o}function n(t){var e=t.geometry,r=t.min,i=t.max;if(1===t.type)o(r,i,e);else for(var n=0;n<e.length;n++)o(r,i,e[n]);return t}function o(t,e,r){for(var i,n=0;n<r.length;n++)i=r[n],t[0]=Math.min(i[0],t[0]),e[0]=Math.max(i[0],e[0]),t[1]=Math.min(i[1],t[1]),e[1]=Math.max(i[1],e[1])}e.exports=i},{}],17:[function(t,e,r){"use strict";function i(t,e){return new n(t,e)}function n(t,e){e=this.options=l(Object.create(this.options),e);var r=e.debug;r&&console.time("preprocess data");var i=1<<e.maxZoom,n=c(t,e.tolerance/(i*e.extent));this.tiles={},this.tileCoords=[],r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),n=f(n,e.buffer/e.extent,a),n.length&&this.splitTile(n,0,0,0),r&&(n.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function o(t,e,r){return 32*((1<<t)*r+e)+t}function a(t,e,r){return[r,(r-t[0])*(e[1]-t[1])/(e[0]-t[0])+t[1],1]}function s(t,e,r){return[(r-t[1])*(e[0]-t[0])/(e[1]-t[1])+t[0],r,1]}function l(t,e){for(var r in e)t[r]=e[r];return t}function u(t,e,r){var i=t.source;if(1!==i.length)return!1;var n=i[0];if(3!==n.type||n.geometry.length>1)return!1;var o=n.geometry[0].length;if(5!==o)return!1;for(var a=0;a<o;a++){var s=p.point(n.geometry[0][a],e,t.z2,t.x,t.y);if(s[0]!==-r&&s[0]!==e+r||s[1]!==-r&&s[1]!==e+r)return!1}return!0}e.exports=i;var c=t("./convert"),p=t("./transform"),h=t("./clip"),f=t("./wrap"),d=t("./tile");n.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,solidChildren:!1,tolerance:3,extent:4096,buffer:64,debug:0},n.prototype.splitTile=function(t,e,r,i,n,l,c){for(var p=[t,e,r,i],f=this.options,m=f.debug,v=null;p.length;){i=p.pop(),r=p.pop(),e=p.pop(),t=p.pop();var y=1<<e,g=o(e,r,i),_=this.tiles[g],x=e===f.maxZoom?0:f.tolerance/(y*f.extent);if(!_&&(m>1&&console.time("creation"),_=this.tiles[g]=d(t,y,r,i,x,e===f.maxZoom),this.tileCoords.push({z:e,x:r,y:i}),m)){m>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,i,_.numFeatures,_.numPoints,_.numSimplified),console.timeEnd("creation"));var b="z"+e;this.stats[b]=(this.stats[b]||0)+1,this.total++}if(_.source=t,n){if(e===f.maxZoom||e===n)continue;var w=1<<n-e;if(r!==Math.floor(l/w)||i!==Math.floor(c/w))continue}else if(e===f.indexMaxZoom||_.numPoints<=f.indexMaxPoints)continue;if(f.solidChildren||!u(_,f.extent,f.buffer)){_.source=null,m>1&&console.time("clipping");var T,S,z,A,C,E,k=.5*f.buffer/f.extent,M=.5-k,L=.5+k,I=1+k;T=S=z=A=null,C=h(t,y,r-k,r+L,0,a,_.min[0],_.max[0]),E=h(t,y,r+M,r+I,0,a,_.min[0],_.max[0]),C&&(T=h(C,y,i-k,i+L,1,s,_.min[1],_.max[1]),S=h(C,y,i+M,i+I,1,s,_.min[1],_.max[1])),E&&(z=h(E,y,i-k,i+L,1,s,_.min[1],_.max[1]),A=h(E,y,i+M,i+I,1,s,_.min[1],_.max[1])),m>1&&console.timeEnd("clipping"),t.length&&(p.push(T||[],e+1,2*r,2*i),p.push(S||[],e+1,2*r,2*i+1),p.push(z||[],e+1,2*r+1,2*i),p.push(A||[],e+1,2*r+1,2*i+1))}else n&&(v=e)}return v},n.prototype.getTile=function(t,e,r){var i=this.options,n=i.extent,a=i.debug,s=1<<t;e=(e%s+s)%s;var l=o(t,e,r);if(this.tiles[l])return p.tile(this.tiles[l],n);a>1&&console.log("drilling down to z%d-%d-%d",t,e,r);for(var c,h=t,f=e,d=r;!c&&h>0;)h--,f=Math.floor(f/2),d=Math.floor(d/2),c=this.tiles[o(h,f,d)];if(!c||!c.source)return null;if(a>1&&console.log("found parent tile z%d-%d-%d",h,f,d),u(c,n,i.buffer))return p.tile(c,n);a>1&&console.time("drilling down");var m=this.splitTile(c.source,h,f,d,t,e,r);if(a>1&&console.timeEnd("drilling down"),null!==m){var v=1<<t-m;l=o(m,Math.floor(e/v),Math.floor(r/v))}return this.tiles[l]?p.tile(this.tiles[l],n):null}},{"./clip":14,"./convert":15,"./tile":19,"./transform":20,"./wrap":21}],18:[function(t,e,r){"use strict";function i(t,e){var r,i,o,a,s=e*e,l=t.length,u=0,c=l-1,p=[];for(t[u][2]=1,t[c][2]=1;c;){for(i=0,r=u+1;r<c;r++)(o=n(t[r],t[u],t[c]))>i&&(a=r,i=o);i>s?(t[a][2]=i,p.push(u),p.push(a),u=a):(c=p.pop(),u=p.pop())}}function n(t,e,r){var i=e[0],n=e[1],o=r[0],a=r[1],s=t[0],l=t[1],u=o-i,c=a-n;if(0!==u||0!==c){var p=((s-i)*u+(l-n)*c)/(u*u+c*c);p>1?(i=o,n=a):p>0&&(i+=u*p,n+=c*p)}return u=s-i,c=l-n,u*u+c*c}e.exports=i},{}],19:[function(t,e,r){"use strict";function i(t,e,r,i,o,a){for(var s={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:i,z2:e,transformed:!1,min:[2,1],max:[-1,0]},l=0;l<t.length;l++){s.numFeatures++,n(s,t[l],o,a);var u=t[l].min,c=t[l].max;u[0]<s.min[0]&&(s.min[0]=u[0]),u[1]<s.min[1]&&(s.min[1]=u[1]),c[0]>s.max[0]&&(s.max[0]=c[0]),c[1]>s.max[1]&&(s.max[1]=c[1])}return s}function n(t,e,r,i){var n,a,s,l,u=e.geometry,c=e.type,p=[],h=r*r;if(1===c)for(n=0;n<u.length;n++)p.push(u[n]),t.numPoints++,t.numSimplified++;else for(n=0;n<u.length;n++)if(s=u[n],i||!(2===c&&s.dist<r||3===c&&s.area<h)){var f=[];for(a=0;a<s.length;a++)l=s[a],(i||l[2]>h)&&(f.push(l),t.numSimplified++),t.numPoints++;3===c&&o(f,s.outer),p.push(f)}else t.numPoints+=s.length;if(p.length){var d={geometry:p,type:c,tags:e.tags||null};null!==e.id&&(d.id=e.id),t.features.push(d)}}function o(t,e){a(t)<0===e&&t.reverse()}function a(t){for(var e,r,i=0,n=0,o=t.length,a=o-1;n<o;a=n++)e=t[n],r=t[a],i+=(r[0]-e[0])*(e[1]+r[1]);return i}e.exports=i},{}],20:[function(t,e,r){"use strict";function i(t,e){if(t.transformed)return t;var r,i,o,a=t.z2,s=t.x,l=t.y;for(r=0;r<t.features.length;r++){var u=t.features[r],c=u.geometry;if(1===u.type)for(i=0;i<c.length;i++)c[i]=n(c[i],e,a,s,l);else for(i=0;i<c.length;i++){var p=c[i];for(o=0;o<p.length;o++)p[o]=n(p[o],e,a,s,l)}}return t.transformed=!0,t}function n(t,e,r,i,n){return[Math.round(e*(t[0]*r-i)),Math.round(e*(t[1]*r-n))]}r.tile=i,r.point=n},{}],21:[function(t,e,r){"use strict";function i(t,e,r){var i=t,o=a(t,1,-1-e,e,0,r,-1,2),s=a(t,1,1-e,2+e,0,r,-1,2);return(o||s)&&(i=a(t,1,-e,1+e,0,r,-1,2)||[],o&&(i=n(o,1).concat(i)),s&&(i=i.concat(n(s,-1)))),i}function n(t,e){for(var r=[],i=0;i<t.length;i++){var n,a=t[i],l=a.type;if(1===l)n=o(a.geometry,e);else{n=[];for(var u=0;u<a.geometry.length;u++)n.push(o(a.geometry[u],e))}r.push(s(a.tags,l,n,a.id))}return r}function o(t,e){var r=[];r.area=t.area,r.dist=t.dist;for(var i=0;i<t.length;i++)r.push([t[i][0]+e,t[i][1],t[i][2]]);return r}var a=t("./clip"),s=t("./feature");e.exports=i},{"./clip":14,"./feature":16}],22:[function(t,e,r){"use strict";function i(t,e,r){var i=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var o=new Int32Array(this.arrayBuffer);t=o[0],e=o[1],r=o[2],this.d=e+2*r;for(var a=0;a<this.d*this.d;a++){var s=o[n+a],l=o[n+a+1];i.push(s===l?null:o.subarray(s,l))}var u=o[n+i.length],c=o[n+i.length+1];this.keys=o.subarray(u,c),this.bboxes=o.subarray(c),this.insert=this._insertReadonly}else{this.d=e+2*r;for(var p=0;p<this.d*this.d;p++)i.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var h=r/e*t;this.min=-h,this.max=t+h}e.exports=i;var n=3;i.prototype.insert=function(t,e,r,i,n){this._forEachCell(e,r,i,n,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(i),this.bboxes.push(n)},i.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},i.prototype._insertCell=function(t,e,r,i,n,o){this.cells[n].push(o)},i.prototype.query=function(t,e,r,i){var n=this.min,o=this.max;if(t<=n&&e<=n&&o<=r&&o<=i)return Array.prototype.slice.call(this.keys);var a=[],s={};return this._forEachCell(t,e,r,i,this._queryCell,a,s),a},i.prototype._queryCell=function(t,e,r,i,n,o,a){var s=this.cells[n];if(null!==s)for(var l=this.keys,u=this.bboxes,c=0;c<s.length;c++){var p=s[c];if(void 0===a[p]){var h=4*p;t<=u[h+2]&&e<=u[h+3]&&r>=u[h+0]&&i>=u[h+1]?(a[p]=!0,o.push(l[p])):a[p]=!1}}},i.prototype._forEachCell=function(t,e,r,i,n,o,a){for(var s=this._convertToCellCoord(t),l=this._convertToCellCoord(e),u=this._convertToCellCoord(r),c=this._convertToCellCoord(i),p=s;p<=u;p++)for(var h=l;h<=c;h++){var f=this.d*h+p;if(n.call(this,t,e,r,i,f,o,a))return}},i.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},i.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=n+this.cells.length+1+1,r=0,i=0;i<this.cells.length;i++)r+=this.cells[i].length;var o=new Int32Array(e+r+this.keys.length+this.bboxes.length);o[0]=this.extent,o[1]=this.n,o[2]=this.padding;for(var a=e,s=0;s<t.length;s++){var l=t[s];o[n+s]=a,o.set(l,a),a+=l.length}return o[n+t.length]=a,o.set(this.keys,a),a+=this.keys.length,o[n+t.length+1]=a,o.set(this.bboxes,a),a+=this.bboxes.length,o.buffer}},{}],23:[function(t,e,r){r.read=function(t,e,r,i,n){var o,a,s=8*n-i-1,l=(1<<s)-1,u=l>>1,c=-7,p=r?n-1:0,h=r?-1:1,f=t[e+p];for(p+=h,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+t[e+p],p+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=i;c>0;a=256*a+t[e+p],p+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,i),o-=u}return(f?-1:1)*a*Math.pow(2,o-i)},r.write=function(t,e,r,i,n,o){var a,s,l,u=8*o-n-1,c=(1<<u)-1,p=c>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,d=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),e+=a+p>=1?h/l:h*Math.pow(2,1-p),e*l>=2&&(a++,l/=2),a+p>=c?(s=0,a=c):a+p>=1?(s=(e*l-1)*Math.pow(2,n),a+=p):(s=e*Math.pow(2,p-1)*Math.pow(2,n),a=0));n>=8;t[r+f]=255&s,f+=d,s/=256,n-=8);for(a=a<<n|s,u+=n;u>0;t[r+f]=255&a,f+=d,a/=256,u-=8);t[r+f-d]|=128*m}},{}],24:[function(t,e,r){"use strict";function i(t,e,r,i,o){return new n(t,e,r,i,o)}function n(t,e,r,i,n){e=e||o,r=r||a,n=n||Array,this.nodeSize=i||64,this.points=t,this.ids=new n(t.length),this.coords=new n(2*t.length);for(var l=0;l<t.length;l++)this.ids[l]=l,this.coords[2*l]=e(t[l]),this.coords[2*l+1]=r(t[l]);s(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function o(t){return t[0]}function a(t){return t[1]}var s=t("./sort"),l=t("./range"),u=t("./within");e.exports=i,n.prototype={range:function(t,e,r,i){return l(this.ids,this.coords,t,e,r,i,this.nodeSize)},within:function(t,e,r){return u(this.ids,this.coords,t,e,r,this.nodeSize)}}},{"./range":25,"./sort":26,"./within":27}],25:[function(t,e,r){"use strict";function i(t,e,r,i,n,o,a){for(var s,l,u=[0,t.length-1,0],c=[];u.length;){var p=u.pop(),h=u.pop(),f=u.pop();if(h-f<=a)for(var d=f;d<=h;d++)s=e[2*d],l=e[2*d+1],s>=r&&s<=n&&l>=i&&l<=o&&c.push(t[d]);else{var m=Math.floor((f+h)/2);s=e[2*m],l=e[2*m+1],s>=r&&s<=n&&l>=i&&l<=o&&c.push(t[m]);var v=(p+1)%2;(0===p?r<=s:i<=l)&&(u.push(f),u.push(m-1),u.push(v)),(0===p?n>=s:o>=l)&&(u.push(m+1),u.push(h),u.push(v))}}return c}e.exports=i},{}],26:[function(t,e,r){"use strict";function i(t,e,r,o,a,s){if(!(a-o<=r)){var l=Math.floor((o+a)/2);n(t,e,l,o,a,s%2),i(t,e,r,o,l-1,s+1),i(t,e,r,l+1,a,s+1)}}function n(t,e,r,i,a,s){for(;a>i;){if(a-i>600){var l=a-i+1,u=r-i+1,c=Math.log(l),p=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*p*(l-p)/l)*(u-l/2<0?-1:1);n(t,e,r,Math.max(i,Math.floor(r-u*p/l+h)),Math.min(a,Math.floor(r+(l-u)*p/l+h)),s)}var f=e[2*r+s],d=i,m=a;for(o(t,e,i,r),e[2*a+s]>f&&o(t,e,i,a);d<m;){for(o(t,e,d,m),d++,m--;e[2*d+s]<f;)d++;for(;e[2*m+s]>f;)m--}e[2*i+s]===f?o(t,e,i,m):(m++,o(t,e,m,a)),m<=r&&(i=m+1),r<=m&&(a=m-1)}}function o(t,e,r,i){a(t,r,i),a(e,2*r,2*i),a(e,2*r+1,2*i+1)}function a(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}e.exports=i},{}],27:[function(t,e,r){"use strict";function i(t,e,r,i,o,a){for(var s=[0,t.length-1,0],l=[],u=o*o;s.length;){var c=s.pop(),p=s.pop(),h=s.pop();if(p-h<=a)for(var f=h;f<=p;f++)n(e[2*f],e[2*f+1],r,i)<=u&&l.push(t[f]);else{var d=Math.floor((h+p)/2),m=e[2*d],v=e[2*d+1];n(m,v,r,i)<=u&&l.push(t[d]);var y=(c+1)%2;(0===c?r-o<=m:i-o<=v)&&(s.push(h),s.push(d-1),s.push(y)),(0===c?r+o>=m:i+o>=v)&&(s.push(d+1),s.push(p),s.push(y))}}return l}function n(t,e,r,i){var n=t-r,o=e-i;return n*n+o*o}e.exports=i},{}],28:[function(t,e,r){"use strict";function i(t){return!!(n()&&o()&&a()&&s()&&l()&&u()&&c()&&p(t&&t.failIfMajorPerformanceCaveat))}function n(){return"undefined"!=typeof window&&"undefined"!=typeof document}function o(){return 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 a(){return Function.prototype&&Function.prototype.bind}function s(){return 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}function l(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function u(){return"Worker"in window}function c(){return"Uint8ClampedArray"in window}function p(t){return void 0===f[t]&&(f[t]=h(t)),f[t]}function h(t){var e=document.createElement("canvas"),r=Object.create(i.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=t,e.probablySupportsContext?e.probablySupportsContext("webgl",r)||e.probablySupportsContext("experimental-webgl",r):e.supportsContext?e.supportsContext("webgl",r)||e.supportsContext("experimental-webgl",r):e.getContext("webgl",r)||e.getContext("experimental-webgl",r)}void 0!==e&&e.exports?e.exports=i:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=i);var f={};i.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}},{}],29:[function(t,e,r){"use strict";function i(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}function n(t,e,r){var i,n,o=r.buf;if(n=o[r.pos++],i=(112&n)>>4,n<128)return a(t,i,e);if(n=o[r.pos++],i|=(127&n)<<3,n<128)return a(t,i,e);if(n=o[r.pos++],i|=(127&n)<<10,n<128)return a(t,i,e);if(n=o[r.pos++],i|=(127&n)<<17,n<128)return a(t,i,e);if(n=o[r.pos++],i|=(127&n)<<24,n<128)return a(t,i,e);if(n=o[r.pos++],i|=(1&n)<<31,n<128)return a(t,i,e);throw new Error("Expected varint not more than 10 bytes")}function o(t){return t.type===i.Bytes?t.readVarint()+t.pos:t.pos+1}function a(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function s(t,e){var r,i;if(t>=0?(r=t%4294967296|0,i=t/4294967296|0):(r=~(-t%4294967296),i=~(-t/4294967296),4294967295^r?r=r+1|0:(r=0,i=i+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),l(r,i,e),u(i,e)}function l(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}function u(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}function c(t,e,r){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.realloc(i);for(var n=r.pos-1;n>=t;n--)r.buf[n+i]=r.buf[n]}function p(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function h(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function f(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function d(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function m(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function v(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function y(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function g(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r])}function _(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}function x(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function b(t,e,r){t[r]=e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function w(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function T(t,e,r){for(var i="",n=e;n<r;){var o=t[n],a=null,s=o>239?4:o>223?3:o>191?2:1;if(n+s>r)break;var l,u,c;1===s?o<128&&(a=o):2===s?128==(192&(l=t[n+1]))&&(a=(31&o)<<6|63&l)<=127&&(a=null):3===s?(l=t[n+1],u=t[n+2],128==(192&l)&&128==(192&u)&&((a=(15&o)<<12|(63&l)<<6|63&u)<=2047||a>=55296&&a<=57343)&&(a=null)):4===s&&(l=t[n+1],u=t[n+2],c=t[n+3],128==(192&l)&&128==(192&u)&&128==(192&c)&&((a=(15&o)<<18|(63&l)<<12|(63&u)<<6|63&c)<=65535||a>=1114112)&&(a=null)),null===a?(a=65533,s=1):a>65535&&(a-=65536,i+=String.fromCharCode(a>>>10&1023|55296),a=56320|1023&a),i+=String.fromCharCode(a),n+=s}return i}function S(t,e,r){for(var i,n,o=0;o<e.length;o++){if((i=e.charCodeAt(o))>55295&&i<57344){if(!n){i>56319||o+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):n=i;continue}if(i<56320){t[r++]=239,t[r++]=191,t[r++]=189,n=i;continue}i=n-55296<<10|i-56320|65536,n=null}else n&&(t[r++]=239,t[r++]=191,t[r++]=189,n=null);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:(i<65536?t[r++]=i>>12|224:(t[r++]=i>>18|240,t[r++]=i>>12&63|128),t[r++]=i>>6&63|128),t[r++]=63&i|128)}return r}e.exports=i;var z=t("ieee754");i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;i.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var i=this.readVarint(),n=i>>3,o=this.pos;this.type=7&i,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=x(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=w(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=x(this.buf,this.pos)+4294967296*x(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=x(this.buf,this.pos)+4294967296*w(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=z.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=z.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,i=this.buf;return r=i[this.pos++],e=127&r,r<128?e:(r=i[this.pos++],e|=(127&r)<<7,r<128?e:(r=i[this.pos++],e|=(127&r)<<14,r<128?e:(r=i[this.pos++],e|=(127&r)<<21,r<128?e:(r=i[this.pos],e|=(15&r)<<28,n(e,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=T(this.buf,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){var r=o(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===i.Varint)for(;this.buf[this.pos++]>127;);else if(e===i.Bytes)this.pos=this.readVarint()+this.pos;else if(e===i.Fixed32)this.pos+=4;else{if(e!==i.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),b(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),b(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),b(this.buf,-1&t,this.pos),b(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),b(this.buf,-1&t,this.pos),b(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){if((t=+t||0)>268435455||t<0)return void s(t,this);this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127)))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=S(this.buf,t,this.pos);var r=this.pos-e;r>=128&&c(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),z.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),z.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<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var i=this.pos-r;i>=128&&c(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i},writeMessage:function(t,e,r){this.writeTag(t,i.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){this.writeMessage(t,p,e)},writePackedSVarint:function(t,e){this.writeMessage(t,h,e)},writePackedBoolean:function(t,e){this.writeMessage(t,m,e)},writePackedFloat:function(t,e){this.writeMessage(t,f,e)},writePackedDouble:function(t,e){this.writeMessage(t,d,e)},writePackedFixed32:function(t,e){this.writeMessage(t,v,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,y,e)},writePackedFixed64:function(t,e){this.writeMessage(t,g,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,_,e)},writeBytesField:function(t,e){this.writeTag(t,i.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,i.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,i.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,i.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},{ieee754:23}],30:[function(t,e,r){function i(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(t){if(p===setTimeout)return setTimeout(t,0);if((p===i||!p)&&setTimeout)return p=setTimeout,setTimeout(t,0);try{return p(t,0)}catch(e){try{return p.call(null,t,0)}catch(e){return p.call(this,t,0)}}}function a(t){if(h===clearTimeout)return clearTimeout(t);if((h===n||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function s(){v&&d&&(v=!1,d.length?m=d.concat(m):y=-1,m.length&&l())}function l(){if(!v){var t=o(s);v=!0;for(var e=m.length;e;){for(d=m,m=[];++y<e;)d&&d[y].run();y=-1,e=m.length}d=null,v=!1,a(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var p,h,f=e.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:i}catch(t){p=i}try{h="function"==typeof clearTimeout?clearTimeout:n}catch(t){h=n}}();var d,m=[],v=!1,y=-1;f.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];m.push(new u(t,e)),1!==m.length||v||o(l)},u.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.prependListener=c,f.prependOnceListener=c,f.listeners=function(t){return[]},f.binding=function(t){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(t){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],31:[function(t,e,r){"use strict";function i(t,e,r,a,s){for(r=r||0,a=a||t.length-1,s=s||o;a>r;){if(a-r>600){var l=a-r+1,u=e-r+1,c=Math.log(l),p=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*p*(l-p)/l)*(u-l/2<0?-1:1);i(t,e,Math.max(r,Math.floor(e-u*p/l+h)),Math.min(a,Math.floor(e+(l-u)*p/l+h)),s)}var f=t[e],d=r,m=a;for(n(t,r,e),s(t[a],f)>0&&n(t,r,a);d<m;){for(n(t,d,m),d++,m--;s(t[d],f)<0;)d++;for(;s(t[m],f)>0;)m--}0===s(t[r],f)?n(t,r,m):(m++,n(t,m,a)),m<=e&&(r=m+1),e<=m&&(a=m-1)}}function n(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function o(t,e){return t<e?-1:t>e?1:0}e.exports=i},{}],32:[function(t,e,r){"use strict";function i(t){return new n(t)}function n(t){this.options=f(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function o(t,e,r,i,n){return{x:t,y:e,zoom:1/0,id:i,properties:n,parentId:-1,numPoints:r}}function a(t,e){var r=t.geometry.coordinates;return{x:u(r[0]),y:c(r[1]),zoom:1/0,id:e,parentId:-1}}function s(t){return{type:"Feature",properties:l(t),geometry:{type:"Point",coordinates:[p(t.x),h(t.y)]}}}function l(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return f(f({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function u(t){return t/360+.5}function c(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function p(t){return 360*(t-.5)}function h(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function f(t,e){for(var r in e)t[r]=e[r];return t}function d(t){return t.x}function m(t){return t.y}var v=t("kdbush");e.exports=i,n.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,initial:function(){return{}},map:function(t){return t}},load:function(t){var e=this.options.log;e&&console.time("total time");var r="prepare "+t.length+" points";e&&console.time(r),this.points=t;var i=t.map(a);e&&console.timeEnd(r);for(var n=this.options.maxZoom;n>=this.options.minZoom;n--){var o=+Date.now();this.trees[n+1]=v(i,d,m,this.options.nodeSize,Float32Array),i=this._cluster(i,n),e&&console.log("z%d: %d clusters in %dms",n,i.length,+Date.now()-o)}return this.trees[this.options.minZoom]=v(i,d,m,this.options.nodeSize,Float32Array),e&&console.timeEnd("total time"),this},getClusters:function(t,e){for(var r=this.trees[this._limitZoom(e)],i=r.range(u(t[0]),c(t[3]),u(t[2]),c(t[1])),n=[],o=0;o<i.length;o++){var a=r.points[i[o]];n.push(a.numPoints?s(a):this.points[a.id])}return n},getChildren:function(t,e){for(var r=this.trees[e+1].points[t],i=this.options.radius/(this.options.extent*Math.pow(2,e)),n=this.trees[e+1].within(r.x,r.y,i),o=[],a=0;a<n.length;a++){var l=this.trees[e+1].points[n[a]];l.parentId===t&&o.push(l.numPoints?s(l):this.points[l.id])}return o},getLeaves:function(t,e,r,i){r=r||10,i=i||0;var n=[];return this._appendLeaves(n,t,e,r,i,0),n},getTile:function(t,e,r){var i=this.trees[this._limitZoom(t)],n=Math.pow(2,t),o=this.options.extent,a=this.options.radius,s=a/o,l=(r-s)/n,u=(r+1+s)/n,c={features:[]};return this._addTileFeatures(i.range((e-s)/n,l,(e+1+s)/n,u),i.points,e,r,n,c),0===e&&this._addTileFeatures(i.range(1-s/n,l,1,u),i.points,n,r,n,c),e===n-1&&this._addTileFeatures(i.range(0,l,s/n,u),i.points,-1,r,n,c),c.features.length?c:null},getClusterExpansionZoom:function(t,e){for(;e<this.options.maxZoom;){var r=this.getChildren(t,e);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e},_appendLeaves:function(t,e,r,i,n,o){for(var a=this.getChildren(e,r),s=0;s<a.length;s++){var l=a[s].properties;if(l.cluster?o+l.point_count<=n?o+=l.point_count:o=this._appendLeaves(t,l.cluster_id,r+1,i,n,o):o<n?o++:t.push(a[s]),t.length===i)break}return o},_addTileFeatures:function(t,e,r,i,n,o){for(var a=0;a<t.length;a++){var s=e[t[a]];o.features.push({type:1,geometry:[[Math.round(this.options.extent*(s.x*n-r)),Math.round(this.options.extent*(s.y*n-i))]],tags:s.numPoints?l(s):this.points[s.id].properties})}},_limitZoom:function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},_cluster:function(t,e){for(var r=[],i=this.options.radius/(this.options.extent*Math.pow(2,e)),n=0;n<t.length;n++){var a=t[n];if(!(a.zoom<=e)){a.zoom=e;var s=this.trees[e+1],l=s.within(a.x,a.y,i),u=a.numPoints||1,c=a.x*u,p=a.y*u,h=null;this.options.reduce&&(h=this.options.initial(),this._accumulate(h,a));for(var f=0;f<l.length;f++){var d=s.points[l[f]];if(e<d.zoom){var m=d.numPoints||1;d.zoom=e,c+=d.x*m,p+=d.y*m,u+=m,d.parentId=n,this.options.reduce&&this._accumulate(h,d)}}1===u?r.push(a):(a.parentId=n,r.push(o(c/u,p/u,u,n,h)))}}return r},_accumulate:function(t,e){var r=e.numPoints?e.properties:this.options.map(this.points[e.id].properties);this.options.reduce(t,r)}}},{kdbush:24}],33:[function(t,e,r){"use strict";function i(t,e){if(!(this instanceof i))return new i(t,e);if(this.data=t||[],this.length=this.data.length,this.compare=e||n,this.length>0)for(var r=this.length>>1;r>=0;r--)this._down(r)}function n(t,e){return t<e?-1:t>e?1:0}e.exports=i,i.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var t=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},peek:function(){return this.data[0]},_up:function(t){for(var e=this.data,r=this.compare,i=e[t];t>0;){var n=t-1>>1,o=e[n];if(r(i,o)>=0)break;e[t]=o,t=n}e[t]=i},_down:function(t){for(var e=this.data,r=this.compare,i=this.length,n=i>>1,o=e[t];t<n;){var a=1+(t<<1),s=a+1,l=e[a];if(s<i&&r(e[s],l)<0&&(a=s,l=e[s]),r(l,o)>=0)break;e[t]=l,t=a}e[t]=o}}},{}],34:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],35:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],36:[function(t,r,i){(function(e,r){function n(t,e){var r={seen:[],stylize:a};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(e)?r.showHidden=e:e&&i._extend(r,e),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),l(r,t,r.depth)}function o(t,e){var r=n.styles[e];return r?"["+n.colors[r][0]+"m"+t+"["+n.colors[r][1]+"m":t}function a(t,e){return t}function s(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function l(t,e,r){if(t.customInspect&&e&&A(e.inspect)&&e.inspect!==i.inspect&&(!e.constructor||e.constructor.prototype!==e)){var n=e.inspect(r,t);return _(n)||(n=l(t,n,r)),n}var o=u(t,e);if(o)return o;var a=Object.keys(e),m=s(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(e)),z(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(e);if(0===a.length){if(A(e)){var v=e.name?": "+e.name:"";return t.stylize("[Function"+v+"]","special")}if(w(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(S(e))return t.stylize(Date.prototype.toString.call(e),"date");if(z(e))return c(e)}var y="",g=!1,x=["{","}"];if(d(e)&&(g=!0,x=["[","]"]),A(e)&&(y=" [Function"+(e.name?": "+e.name:"")+"]"),w(e)&&(y=" "+RegExp.prototype.toString.call(e)),S(e)&&(y=" "+Date.prototype.toUTCString.call(e)),z(e)&&(y=" "+c(e)),0===a.length&&(!g||0==e.length))return x[0]+y+x[1];if(r<0)return w(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var b;return b=g?p(t,e,r,m,a):a.map(function(i){return h(t,e,r,m,i,g)}),t.seen.pop(),f(b,y,x)}function u(t,e){if(b(e))return t.stylize("undefined","undefined");if(_(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return g(e)?t.stylize(""+e,"number"):m(e)?t.stylize(""+e,"boolean"):v(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,i,n){for(var o=[],a=0,s=e.length;a<s;++a)L(e,String(a))?o.push(h(t,e,r,i,String(a),!0)):o.push("");return n.forEach(function(n){n.match(/^\d+$/)||o.push(h(t,e,r,i,n,!0))}),o}function h(t,e,r,i,n,o){var a,s,u;if(u=Object.getOwnPropertyDescriptor(e,n)||{value:e[n]},u.get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),L(i,n)||(a="["+n+"]"),s||(t.seen.indexOf(u.value)<0?(s=v(r)?l(t,u.value,null):l(t,u.value,r-1),s.indexOf("\n")>-1&&(s=o?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n"))):s=t.stylize("[Circular]","special")),b(a)){if(o&&n.match(/^\d+$/))return s;a=JSON.stringify(""+n),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function f(t,e,r){var i=0;return t.reduce(function(t,e){return i++,e.indexOf("\n")>=0&&i++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function d(t){return Array.isArray(t)}function m(t){return"boolean"==typeof t}function v(t){return null===t}function y(t){return null==t}function g(t){return"number"==typeof t}function _(t){return"string"==typeof t}function x(t){return"symbol"==typeof t}function b(t){return void 0===t}function w(t){return T(t)&&"[object RegExp]"===E(t)}function T(t){return"object"==typeof t&&null!==t}function S(t){return T(t)&&"[object Date]"===E(t)}function z(t){return T(t)&&("[object Error]"===E(t)||t instanceof Error)}function A(t){return"function"==typeof t}function C(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function E(t){return Object.prototype.toString.call(t)}function k(t){return t<10?"0"+t.toString(10):t.toString(10)}function M(){var t=new Date,e=[k(t.getHours()),k(t.getMinutes()),k(t.getSeconds())].join(":");return[t.getDate(),D[t.getMonth()],e].join(" ")}function L(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var I=/%[sdj%]/g;i.format=function(t){if(!_(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(n(arguments[r]));return e.join(" ")}for(var r=1,i=arguments,o=i.length,a=String(t).replace(I,function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(t){return"[Circular]"}default:return t}}),s=i[r];r<o;s=i[++r])v(s)||!T(s)?a+=" "+s:a+=" "+n(s);return a},i.deprecate=function(t,n){function o(){if(!a){if(e.throwDeprecation)throw new Error(n);e.traceDeprecation?console.trace(n):console.error(n),a=!0}return t.apply(this,arguments)}if(b(r.process))return function(){return i.deprecate(t,n).apply(this,arguments)};if(!0===e.noDeprecation)return t;var a=!1;return o};var P,R={};i.debuglog=function(t){if(b(P)&&(P=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!R[t])if(new RegExp("\\b"+t+"\\b","i").test(P)){var r=e.pid;R[t]=function(){var e=i.format.apply(i,arguments);console.error("%s %d: %s",t,r,e)}}else R[t]=function(){};return R[t]},i.inspect=n,n.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},n.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},i.isArray=d,i.isBoolean=m,i.isNull=v,i.isNullOrUndefined=y,i.isNumber=g,i.isString=_,i.isSymbol=x,i.isUndefined=b,i.isRegExp=w,i.isObject=T,i.isDate=S,i.isError=z,i.isFunction=A,i.isPrimitive=C,i.isBuffer=t("./support/isBuffer");var D=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];i.log=function(){console.log("%s - %s",M(),i.format.apply(i,arguments))},i.inherits=t("inherits"),i._extend=function(t,e){if(!e||!T(e))return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t}}).call(this,t("_process"),void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":35,_process:30,inherits:34}],37:[function(t,e,r){function i(t){var e=new f;return o(t,e),e.finish()}function n(t){var e={};for(var r in t)e[r]=new d(t[r].features),e[r].name=r;return i({layers:e})}function o(t,e){for(var r in t.layers)e.writeMessage(3,a,t.layers[r])}function a(t,e){e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);var r,i={keys:[],values:[],keycache:{},valuecache:{}};for(r=0;r<t.length;r++)i.feature=t.feature(r),e.writeMessage(2,s,i);var n=i.keys;for(r=0;r<n.length;r++)e.writeStringField(3,n[r]);var o=i.values;for(r=0;r<o.length;r++)e.writeMessage(4,h,o[r])}function s(t,e){var r=t.feature;void 0!==r.id&&e.writeVarintField(1,r.id),e.writeMessage(2,l,t),e.writeVarintField(3,r.type),e.writeMessage(4,p,r)}function l(t,e){var r=t.feature,i=t.keys,n=t.values,o=t.keycache,a=t.valuecache;for(var s in r.properties){var l=o[s];void 0===l&&(i.push(s),l=i.length-1,o[s]=l),e.writeVarint(l);var u=r.properties[s],c=typeof u;"string"!==c&&"boolean"!==c&&"number"!==c&&(u=JSON.stringify(u));var p=c+":"+u,h=a[p];void 0===h&&(n.push(u),h=n.length-1,a[p]=h),e.writeVarint(h)}}function u(t,e){return(e<<3)+(7&t)}function c(t){return t<<1^t>>31}function p(t,e){for(var r=t.loadGeometry(),i=t.type,n=0,o=0,a=r.length,s=0;s<a;s++){var l=r[s],p=1;1===i&&(p=l.length),e.writeVarint(u(1,p));for(var h=0;h<l.length;h++){1===h&&1!==i&&e.writeVarint(u(2,l.length-1));var f=l[h].x-n,d=l[h].y-o;e.writeVarint(c(f)),e.writeVarint(c(d)),n+=f,o+=d}}}function h(t,e){var r=typeof t;"string"===r?e.writeStringField(1,t):"boolean"===r?e.writeBooleanField(7,t):"number"===r&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}var f=t("pbf"),d=t("./lib/geojson_wrapper");e.exports=i,e.exports.fromVectorTileJs=i,e.exports.fromGeojsonVt=n,e.exports.GeoJSONWrapper=d},{"./lib/geojson_wrapper":38,pbf:29}],38:[function(t,e,r){"use strict";function i(t){this.features=t,this.length=t.length}function n(t){this.id="number"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=4096}var o=t("@mapbox/point-geometry"),a=t("@mapbox/vector-tile").VectorTileFeature;e.exports=i,i.prototype.feature=function(t){return new n(this.features[t])},n.prototype.loadGeometry=function(){var t=this.rawGeometry;this.geometry=[];for(var e=0;e<t.length;e++){for(var r=t[e],i=[],n=0;n<r.length;n++)i.push(new o(r[n][0],r[n][1]));this.geometry.push(i)}return this.geometry},n.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,r=-1/0,i=1/0,n=-1/0,o=0;o<t.length;o++)for(var a=t[o],s=0;s<a.length;s++){var l=a[s];e=Math.min(e,l.x),r=Math.max(r,l.x),i=Math.min(i,l.y),n=Math.max(n,l.y)}return[e,i,r,n]},n.prototype.toGeoJSON=a.prototype.toGeoJSON},{"@mapbox/point-geometry":2,"@mapbox/vector-tile":6}],39:[function(t,e,r){var i=arguments[3],n=arguments[4],o=arguments[5],a=JSON.stringify;e.exports=function(t,e){function r(t){v[t]=!0;for(var e in n[t][1]){var i=n[t][1][e];v[i]||r(i)}}for(var s,l=Object.keys(o),u=0,c=l.length;u<c;u++){var p=l[u],h=o[p].exports;if(h===t||h&&h.default===t){s=p;break}}if(!s){s=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var f={},u=0,c=l.length;u<c;u++){var p=l[u];f[p]=p}n[s]=[Function(["require","module","exports"],"("+t+")(self)"),f]}var d=Math.floor(Math.pow(16,8)*Math.random()).toString(16),m={};m[s]=s,n[d]=[Function(["require"],"var f = require("+a(s)+");(f.default ? f.default : f)(self);"),m];var v={};r(d);var y="("+i+")({"+Object.keys(v).map(function(t){return a(t)+":["+n[t][0]+","+a(n[t][1])+"]"}).join(",")+"},{},["+a(d)+"])",g=window.URL||window.webkitURL||window.mozURL||window.msURL,_=new Blob([y],{type:"text/javascript"});if(e&&e.bare)return _;var x=g.createObjectURL(_),b=new Worker(x);return b.objectURL=x,b}},{}],40:[function(t,e,r){e.exports.RADIUS=6378137,e.exports.FLATTENING=1/298.257223563,e.exports.POLAR_RADIUS=6356752.3142},{}],41:[function(t,e,r){e.exports={version:"0.40.1"}},{}],42:[function(t,e,r){"use strict";var i=t("../util/util");e.exports={deserialize:function(t,e){var r={};if(!e)return r;for(var n=0,o=t;n<o.length;n+=1){var a=o[n],s=a.layerIds.map(function(t){return e.getLayer(t)}).filter(Boolean);if(0!==s.length)for(var l=s[0].createBucket(i.extend({layers:s},a)),u=0,c=s;u<c.length;u+=1){var p=c[u];r[p.id]=l}}return r}}},{"../util/util":223}],43:[function(t,e,r){"use strict";function i(t,e,r,i,n){t.emplaceBack(2*e+(i+1)/2,2*r+(n+1)/2)}var n=t("../segment"),o=n.SegmentVector,a=t("../../gl/vertex_buffer"),s=t("../../gl/index_buffer"),l=t("../program_configuration"),u=l.ProgramConfigurationSet,c=t("../vertex_array_type"),p=t("../index_array_type"),h=p.TriangleIndexArray,f=t("../load_geometry"),d=t("../extent"),m={layoutAttributes:[{name:"a_pos",components:2,type:"Int16"}],indexArrayType:h,paintAttributes:[{property:"circle-color"},{property:"circle-radius"},{property:"circle-blur"},{property:"circle-opacity"},{property:"circle-stroke-color"},{property:"circle-stroke-width"},{property:"circle-stroke-opacity"}]},v=c(m.layoutAttributes),y=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.index=t.index,this.layoutVertexArray=new v(t.layoutVertexArray),this.indexArray=new h(t.indexArray),this.programConfigurations=new u(m,t.layers,t.zoom,t.programConfigurations),this.segments=new o(t.segments)};y.prototype.populate=function(t,e){for(var r=this,i=0,n=t;i<n.length;i+=1){var o=n[i],a=o.feature,s=o.index,l=o.sourceLayerIndex;if(r.layers[0].filter(a)){var u=f(a);r.addFeature(a,u),e.featureIndex.insert(a,u,s,l,r.index)}}},y.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},y.prototype.serialize=function(t){return{zoom:this.zoom,layerIds:this.layers.map(function(t){return t.id}),layoutVertexArray:this.layoutVertexArray.serialize(t),indexArray:this.indexArray.serialize(t),programConfigurations:this.programConfigurations.serialize(t),segments:this.segments.get()}},y.prototype.upload=function(t){this.layoutVertexBuffer=new a(t,this.layoutVertexArray),this.indexBuffer=new s(t,this.indexArray),this.programConfigurations.upload(t)},y.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},y.prototype.addFeature=function(t,e){for(var r=this,n=0,o=e;n<o.length;n+=1)for(var a=o[n],s=0,l=a;s<l.length;s+=1){var u=l[s],c=u.x,p=u.y;if(!(c<0||c>=d||p<0||p>=d)){var h=r.segments.prepareSegment(4,r.layoutVertexArray,r.indexArray),f=h.vertexLength;i(r.layoutVertexArray,c,p,-1,-1),i(r.layoutVertexArray,c,p,1,-1),i(r.layoutVertexArray,c,p,1,1),i(r.layoutVertexArray,c,p,-1,1),r.indexArray.emplaceBack(f,f+1,f+2),r.indexArray.emplaceBack(f,f+3,f+2),h.vertexLength+=4,h.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t.properties)},y.programInterface=m,e.exports=y},{"../../gl/index_buffer":61,"../../gl/vertex_buffer":62,"../extent":48,"../index_array_type":50,"../load_geometry":51,"../program_configuration":53,"../segment":55,"../vertex_array_type":56}],44:[function(t,e,r){"use strict";var i=t("../segment"),n=i.SegmentVector,o=t("../../gl/vertex_buffer"),a=t("../../gl/index_buffer"),s=t("../program_configuration"),l=s.ProgramConfigurationSet,u=t("../vertex_array_type"),c=t("../index_array_type"),p=c.LineIndexArray,h=c.TriangleIndexArray,f=t("../load_geometry"),d=t("earcut"),m=t("../../util/classify_rings"),v={layoutAttributes:[{name:"a_pos",components:2,type:"Int16"}],indexArrayType:h,indexArrayType2:p,paintAttributes:[{property:"fill-color"},{property:"fill-outline-color"},{property:"fill-opacity"}]},y=u(v.layoutAttributes),g=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.index=t.index,this.layoutVertexArray=new y(t.layoutVertexArray),this.indexArray=new h(t.indexArray),this.indexArray2=new p(t.indexArray2),this.programConfigurations=new l(v,t.layers,t.zoom,t.programConfigurations),this.segments=new n(t.segments),this.segments2=new n(t.segments2)};g.prototype.populate=function(t,e){for(var r=this,i=0,n=t;i<n.length;i+=1){var o=n[i],a=o.feature,s=o.index,l=o.sourceLayerIndex;if(r.layers[0].filter(a)){var u=f(a);r.addFeature(a,u),e.featureIndex.insert(a,u,s,l,r.index)}}},g.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},g.prototype.serialize=function(t){return{zoom:this.zoom,layerIds:this.layers.map(function(t){return t.id}),layoutVertexArray:this.layoutVertexArray.serialize(t),indexArray:this.indexArray.serialize(t),indexArray2:this.indexArray2.serialize(t),programConfigurations:this.programConfigurations.serialize(t),segments:this.segments.get(),segments2:this.segments2.get()}},g.prototype.upload=function(t){this.layoutVertexBuffer=new o(t,this.layoutVertexArray),this.indexBuffer=new a(t,this.indexArray),this.indexBuffer2=new a(t,this.indexArray2),this.programConfigurations.upload(t)},g.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},g.prototype.addFeature=function(t,e){for(var r=this,i=0,n=m(e,500);i<n.length;i+=1){for(var o=n[i],a=0,s=0,l=o;s<l.length;s+=1)a+=l[s].length;for(var u=r.segments.prepareSegment(a,r.layoutVertexArray,r.indexArray),c=u.vertexLength,p=[],h=[],f=0,v=o;f<v.length;f+=1){var y=v[f];if(0!==y.length){y!==o[0]&&h.push(p.length/2);var g=r.segments2.prepareSegment(y.length,r.layoutVertexArray,r.indexArray2),_=g.vertexLength;r.layoutVertexArray.emplaceBack(y[0].x,y[0].y),r.indexArray2.emplaceBack(_+y.length-1,_),p.push(y[0].x),p.push(y[0].y);for(var x=1;x<y.length;x++)r.layoutVertexArray.emplaceBack(y[x].x,y[x].y),r.indexArray2.emplaceBack(_+x-1,_+x),p.push(y[x].x),p.push(y[x].y);g.vertexLength+=y.length,g.primitiveLength+=y.length}}for(var b=d(p,h),w=0;w<b.length;w+=3)r.indexArray.emplaceBack(c+b[w],c+b[w+1],c+b[w+2]);u.vertexLength+=a,u.primitiveLength+=b.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t.properties)},g.programInterface=v,e.exports=g},{"../../gl/index_buffer":61,"../../gl/vertex_buffer":62,"../../util/classify_rings":205,"../index_array_type":50,"../load_geometry":51,"../program_configuration":53,"../segment":55,"../vertex_array_type":56,earcut:11}],45:[function(t,e,r){"use strict";function i(t,e,r,i,n,o,a,s){t.emplaceBack(e,r,2*Math.floor(i*x)+a,n*x*2,o*x*2,Math.round(s))}function n(t,e){return t.x===e.x&&(t.x<0||t.x>v)||t.y===e.y&&(t.y<0||t.y>v)}var o=t("../segment"),a=o.SegmentVector,s=o.MAX_VERTEX_ARRAY_LENGTH,l=t("../../gl/vertex_buffer"),u=t("../../gl/index_buffer"),c=t("../program_configuration"),p=c.ProgramConfigurationSet,h=t("../vertex_array_type"),f=t("../index_array_type"),d=f.TriangleIndexArray,m=t("../load_geometry"),v=t("../extent"),y=t("earcut"),g=t("../../util/classify_rings"),_={layoutAttributes:[{name:"a_pos",components:2,type:"Int16"},{name:"a_normal",components:3,type:"Int16"},{name:"a_edgedistance",components:1,type:"Int16"}],indexArrayType:d,paintAttributes:[{property:"fill-extrusion-base"},{property:"fill-extrusion-height"},{property:"fill-extrusion-color"}]},x=Math.pow(2,13),b=h(_.layoutAttributes),w=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.index=t.index,this.layoutVertexArray=new b(t.layoutVertexArray),this.indexArray=new d(t.indexArray),this.programConfigurations=new p(_,t.layers,t.zoom,t.programConfigurations),this.segments=new a(t.segments)};w.prototype.populate=function(t,e){for(var r=this,i=0,n=t;i<n.length;i+=1){var o=n[i],a=o.feature,s=o.index,l=o.sourceLayerIndex;if(r.layers[0].filter(a)){var u=m(a);r.addFeature(a,u),e.featureIndex.insert(a,u,s,l,r.index)}}},w.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},w.prototype.serialize=function(t){return{zoom:this.zoom,layerIds:this.layers.map(function(t){return t.id}),layoutVertexArray:this.layoutVertexArray.serialize(t),indexArray:this.indexArray.serialize(t),programConfigurations:this.programConfigurations.serialize(t),segments:this.segments.get()}},w.prototype.upload=function(t){this.layoutVertexBuffer=new l(t,this.layoutVertexArray),this.indexBuffer=new u(t,this.indexArray),this.programConfigurations.upload(t)},w.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},w.prototype.addFeature=function(t,e){for(var r=this,o=0,a=g(e,500);o<a.length;o+=1){for(var l=a[o],u=0,c=0,p=l;c<p.length;c+=1)u+=p[c].length;for(var h=r.segments.prepareSegment(4,r.layoutVertexArray,r.indexArray),f=0,d=l;f<d.length;f+=1){var m=d[f];if(0!==m.length)for(var v=0,_=0;_<m.length;_++){var x=m[_];if(_>=1){var b=m[_-1];if(!n(x,b)){h.vertexLength+4>s&&(h=r.segments.prepareSegment(4,r.layoutVertexArray,r.indexArray));var w=x.sub(b)._perp()._unit();i(r.layoutVertexArray,x.x,x.y,w.x,w.y,0,0,v),i(r.layoutVertexArray,x.x,x.y,w.x,w.y,0,1,v),v+=b.dist(x),i(r.layoutVertexArray,b.x,b.y,w.x,w.y,0,0,v),i(r.layoutVertexArray,b.x,b.y,w.x,w.y,0,1,v);var T=h.vertexLength;r.indexArray.emplaceBack(T,T+1,T+2),r.indexArray.emplaceBack(T+1,T+2,T+3),h.vertexLength+=4,h.primitiveLength+=2}}}}h.vertexLength+u>s&&(h=r.segments.prepareSegment(u,r.layoutVertexArray,r.indexArray));for(var S=[],z=[],A=h.vertexLength,C=0,E=l;C<E.length;C+=1){var k=E[C];if(0!==k.length){k!==l[0]&&z.push(S.length/2);for(var M=0;M<k.length;M++){var L=k[M];i(r.layoutVertexArray,L.x,L.y,0,0,1,1,0),S.push(L.x),S.push(L.y)}}}for(var I=y(S,z),P=0;P<I.length;P+=3)r.indexArray.emplaceBack(A+I[P],A+I[P+1],A+I[P+2]);h.primitiveLength+=I.length/3,h.vertexLength+=u}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t.properties)},w.programInterface=_,e.exports=w},{"../../gl/index_buffer":61,"../../gl/vertex_buffer":62,"../../util/classify_rings":205,"../extent":48,"../index_array_type":50,"../load_geometry":51,"../program_configuration":53,"../segment":55,"../vertex_array_type":56,earcut:11}],46:[function(t,e,r){"use strict";function i(t,e,r,i,n,o,a){t.emplaceBack(e.x,e.y,i?1:0,n?1:-1,Math.round(v*r.x)+128,Math.round(v*r.y)+128,1+(0===o?0:o<0?-1:1)|(a*g&63)<<2,a*g>>6)}var n=t("../segment"),o=n.SegmentVector,a=t("../../gl/vertex_buffer"),s=t("../../gl/index_buffer"),l=t("../program_configuration"),u=l.ProgramConfigurationSet,c=t("../vertex_array_type"),p=t("../index_array_type"),h=p.TriangleIndexArray,f=t("../load_geometry"),d=t("../extent"),m=t("@mapbox/vector-tile").VectorTileFeature.types,v=63,y=Math.cos(Math.PI/180*37.5),g=.5,_=Math.pow(2,14)/g,x={layoutAttributes:[{name:"a_pos_normal",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],paintAttributes:[{property:"line-color"},{property:"line-blur"},{property:"line-opacity"},{property:"line-gap-width",name:"gapwidth"},{property:"line-offset"},{property:"line-width"},{property:"line-width",name:"floorwidth",useIntegerZoom:!0}],indexArrayType:h},b=c(x.layoutAttributes),w=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.index=t.index,this.layoutVertexArray=new b(t.layoutVertexArray),this.indexArray=new h(t.indexArray),this.programConfigurations=new u(x,t.layers,t.zoom,t.programConfigurations),this.segments=new o(t.segments)};w.prototype.populate=function(t,e){for(var r=this,i=0,n=t;i<n.length;i+=1){var o=n[i],a=o.feature,s=o.index,l=o.sourceLayerIndex;if(r.layers[0].filter(a)){var u=f(a);r.addFeature(a,u),e.featureIndex.insert(a,u,s,l,r.index)}}},w.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},w.prototype.serialize=function(t){return{zoom:this.zoom,layerIds:this.layers.map(function(t){return t.id}),layoutVertexArray:this.layoutVertexArray.serialize(t),indexArray:this.indexArray.serialize(t),programConfigurations:this.programConfigurations.serialize(t),segments:this.segments.get()}},w.prototype.upload=function(t){this.layoutVertexBuffer=new a(t,this.layoutVertexArray),this.indexBuffer=new s(t,this.indexArray),this.programConfigurations.upload(t)},w.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},w.prototype.addFeature=function(t,e){for(var r=this,i=this.layers[0].layout,n=this.layers[0].getLayoutValue("line-join",{zoom:this.zoom},t.properties),o=i["line-cap"],a=i["line-miter-limit"],s=i["line-round-limit"],l=0,u=e;l<u.length;l+=1){var c=u[l];r.addLine(c,t,n,o,a,s)}},w.prototype.addLine=function(t,e,r,i,n,o){for(var a=this,s=e.properties,l="Polygon"===m[e.type],u=t.length;u>=2&&t[u-1].equals(t[u-2]);)u--;for(var c=0;c<u-1&&t[c].equals(t[c+1]);)c++;if(!(u<(l?3:2))){"bevel"===r&&(n=1.05);var p=d/(512*this.overscaling)*15,h=t[c],f=this.segments.prepareSegment(10*u,this.layoutVertexArray,this.indexArray);this.distance=0;var v,g,_,x=i,b=l?"butt":i,w=!0,T=void 0,S=void 0,z=void 0,A=void 0;this.e1=this.e2=this.e3=-1,l&&(v=t[u-2],A=h.sub(v)._unit()._perp());for(var C=c;C<u;C++)if(!(S=l&&C===u-1?t[c+1]:t[C+1])||!t[C].equals(S)){A&&(z=A),v&&(T=v),v=t[C],A=S?S.sub(v)._unit()._perp():z,z=z||A;var E=z.add(A);0===E.x&&0===E.y||E._unit();var k=E.x*A.x+E.y*A.y,M=0!==k?1/k:1/0,L=k<y&&T&&S;if(L&&C>c){var I=v.dist(T);if(I>2*p){var P=v.sub(v.sub(T)._mult(p/I)._round());a.distance+=P.dist(T),a.addCurrentVertex(P,a.distance,z.mult(1),0,0,!1,f),T=P}}var R=T&&S,D=R?r:S?x:b;if(R&&"round"===D&&(M<o?D="miter":M<=2&&(D="fakeround")),"miter"===D&&M>n&&(D="bevel"),"bevel"===D&&(M>2&&(D="flipbevel"),M<n&&(D="miter")),T&&(a.distance+=v.dist(T)),"miter"===D)E._mult(M),a.addCurrentVertex(v,a.distance,E,0,0,!1,f);else if("flipbevel"===D){if(M>100)E=A.clone().mult(-1);else{var O=z.x*A.y-z.y*A.x>0?-1:1,B=M*z.add(A).mag()/z.sub(A).mag();E._perp()._mult(B*O)}a.addCurrentVertex(v,a.distance,E,0,0,!1,f),a.addCurrentVertex(v,a.distance,E.mult(-1),0,0,!1,f)}else if("bevel"===D||"fakeround"===D){var F=z.x*A.y-z.y*A.x>0,j=-Math.sqrt(M*M-1);if(F?(_=0,g=j):(g=0,_=j),w||a.addCurrentVertex(v,a.distance,z,g,_,!1,f),"fakeround"===D){for(var V=Math.floor(8*(.5-(k-.5))),N=void 0,U=0;U<V;U++)N=A.mult((U+1)/(V+1))._add(z)._unit(),a.addPieSliceVertex(v,a.distance,N,F,f);a.addPieSliceVertex(v,a.distance,E,F,f);for(var $=V-1;$>=0;$--)N=z.mult(($+1)/(V+1))._add(A)._unit(),a.addPieSliceVertex(v,a.distance,N,F,f)}S&&a.addCurrentVertex(v,a.distance,A,-g,-_,!1,f)}else"butt"===D?(w||a.addCurrentVertex(v,a.distance,z,0,0,!1,f),S&&a.addCurrentVertex(v,a.distance,A,0,0,!1,f)):"square"===D?(w||(a.addCurrentVertex(v,a.distance,z,1,1,!1,f),a.e1=a.e2=-1),S&&a.addCurrentVertex(v,a.distance,A,-1,-1,!1,f)):"round"===D&&(w||(a.addCurrentVertex(v,a.distance,z,0,0,!1,f),a.addCurrentVertex(v,a.distance,z,1,1,!0,f),a.e1=a.e2=-1),S&&(a.addCurrentVertex(v,a.distance,A,-1,-1,!0,f),a.addCurrentVertex(v,a.distance,A,0,0,!1,f)));if(L&&C<u-1){var q=v.dist(S);if(q>2*p){var Z=v.add(S.sub(v)._mult(p/q)._round());a.distance+=Z.dist(v),a.addCurrentVertex(Z,a.distance,A.mult(1),0,0,!1,f),v=Z}}w=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s)}},w.prototype.addCurrentVertex=function(t,e,r,n,o,a,s){var l,u=this.layoutVertexArray,c=this.indexArray;l=r.clone(),n&&l._sub(r.perp()._mult(n)),i(u,t,l,a,!1,n,e),this.e3=s.vertexLength++,this.e1>=0&&this.e2>=0&&(c.emplaceBack(this.e1,this.e2,this.e3),s.primitiveLength++),this.e1=this.e2,this.e2=this.e3,l=r.mult(-1),o&&l._sub(r.perp()._mult(o)),i(u,t,l,a,!0,-o,e),this.e3=s.vertexLength++,this.e1>=0&&this.e2>=0&&(c.emplaceBack(this.e1,this.e2,this.e3),s.primitiveLength++),this.e1=this.e2,this.e2=this.e3,e>_/2&&(this.distance=0,this.addCurrentVertex(t,this.distance,r,n,o,a,s))},w.prototype.addPieSliceVertex=function(t,e,r,n,o){r=r.mult(n?-1:1);var a=this.layoutVertexArray,s=this.indexArray;i(a,t,r,!1,n,0,e),this.e3=o.vertexLength++,this.e1>=0&&this.e2>=0&&(s.emplaceBack(this.e1,this.e2,this.e3),o.primitiveLength++),n?this.e2=this.e3:this.e1=this.e3},w.programInterface=x,e.exports=w},{"../../gl/index_buffer":61,"../../gl/vertex_buffer":62,"../extent":48,"../index_array_type":50,"../load_geometry":51,"../program_configuration":53,"../segment":55,"../vertex_array_type":56,"@mapbox/vector-tile":6}],47:[function(t,e,r){"use strict";function i(t,e,r,i,n,o,a,s){t.emplaceBack(e,r,Math.round(64*i),Math.round(64*n),o,a,s?s[0]:void 0,s?s[1]:void 0)}function n(t,e,r,i){var n=2*Math.PI,o=b((r+n)%n/n*255,10*i);t.emplaceBack(e.x,e.y,o),t.emplaceBack(e.x,e.y,o),t.emplaceBack(e.x,e.y,o),t.emplaceBack(e.x,e.y,o)}function o(t,e,r,i,n,o){return t.emplaceBack(e.x,e.y,r.x,r.y,Math.round(i.x),Math.round(i.y),10*n,10*o)}function a(t,e,r){var i={};if(i.isFeatureConstant=e.isLayoutValueFeatureConstant(r),i.isZoomConstant=e.isLayoutValueZoomConstant(r),i.isFeatureConstant&&(i.layoutSize=e.getLayoutValue(r,{zoom:t+1})),!i.isZoomConstant){for(var n=e.getLayoutValueStopZoomLevels(r),o=0;o<n.length&&n[o]<=t;)o++;o=Math.max(0,o-1);for(var a=o;a<n.length&&n[a]<t+1;)a++;a=Math.min(n.length-1,a),i.coveringZoomRange=[n[o],n[a]],e.isLayoutValueFeatureConstant(r)&&(i.coveringStopValues=[e.getLayoutValue(r,{zoom:n[o]}),e.getLayoutValue(r,{zoom:n[a]})]),i.functionBase=e.getLayoutProperty(r).base,void 0===i.functionBase&&(i.functionBase=1),i.functionType=e.getLayoutProperty(r).type||"exponential"}return i}function s(t,e,r,i,n){return t.isLayoutValueZoomConstant(i)&&!t.isLayoutValueFeatureConstant(i)?[10*t.getLayoutValue(i,{},n)]:t.isLayoutValueZoomConstant(i)||t.isLayoutValueFeatureConstant(i)?null:[10*t.getLayoutValue(i,{zoom:r[0]},n),10*t.getLayoutValue(i,{zoom:r[1]},n)]}var l=t("@mapbox/point-geometry"),u=t("../segment"),c=u.SegmentVector,p=t("../../gl/vertex_buffer"),h=t("../../gl/index_buffer"),f=t("../program_configuration"),d=f.ProgramConfigurationSet,m=t("../vertex_array_type"),v=t("../index_array_type"),y=v.TriangleIndexArray,g=v.LineIndexArray,_=t("../extent"),x=t("../../shaders/encode_attribute"),b=x.packUint8ToFloat,w=t("../../symbol/anchor"),T=t("../../symbol/get_anchors"),S=t("../../util/token"),z=t("../../symbol/quads"),A=z.getGlyphQuads,C=z.getIconQuads,E=t("../../symbol/shaping"),k=E.shapeText,M=E.shapeIcon,L=E.WritingMode,I=t("../../symbol/transform_text"),P=t("../../symbol/mergelines"),R=t("../../symbol/clip_line"),D=t("../../util/util"),O=t("../../util/script_detection"),B=t("../load_geometry"),F=t("../../symbol/collision_feature"),j=t("../../util/find_pole_of_inaccessibility"),V=t("../../util/classify_rings"),N=t("@mapbox/vector-tile").VectorTileFeature.types,U=t("../../util/struct_array"),$=t("../../util/verticalize_punctuation"),q=U({members:[{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{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:"Float32",name:"placementZoom"},{type:"Uint8",name:"vertical"}]}),Z=U({members:[{type:"Float32",name:"offsetX"}]}),G=U({members:[{type:"Int16",name:"x"},{type:"Int16",name:"y"}]}),W=[{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}],H=[{name:"a_projected_pos",components:3,type:"Float32"}],X={text:{layoutAttributes:W,dynamicLayoutAttributes:H,indexArrayType:y,paintAttributes:[{property:"text-color",name:"fill_color"},{property:"text-halo-color",name:"halo_color"},{property:"text-halo-width",name:"halo_width"},{property:"text-halo-blur",name:"halo_blur"},{property:"text-opacity",name:"opacity"}]},icon:{layoutAttributes:W,dynamicLayoutAttributes:H,indexArrayType:y,paintAttributes:[{property:"icon-color",name:"fill_color"},{property:"icon-halo-color",name:"halo_color"},{property:"icon-halo-width",name:"halo_width"},{property:"icon-halo-blur",name:"halo_blur"},{property:"icon-opacity",name:"opacity"}]},collisionBox:{layoutAttributes:[{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"},{name:"a_data",components:2,type:"Uint8"}],indexArrayType:g}},K=function(t,e,r,i){this.programInterface=t;var n=m(t.layoutAttributes),o=t.indexArrayType;if(this.layoutVertexArray=new n(i&&i.layoutVertexArray),this.indexArray=new o(i&&i.indexArray),this.programConfigurations=new d(t,e,r,i&&i.programConfigurations),this.segments=new c(i&&i.segments),t.dynamicLayoutAttributes){var a=m(t.dynamicLayoutAttributes);this.dynamicLayoutVertexArray=new a(i&&i.dynamicLayoutVertexArray)}};K.prototype.serialize=function(t){return{layoutVertexArray:this.layoutVertexArray.serialize(t),indexArray:this.indexArray.serialize(t),programConfigurations:this.programConfigurations.serialize(t),segments:this.segments.get(),dynamicLayoutVertexArray:this.dynamicLayoutVertexArray&&this.dynamicLayoutVertexArray.serialize(t)}},K.prototype.upload=function(t){this.layoutVertexBuffer=new p(t,this.layoutVertexArray),this.indexBuffer=new h(t,this.indexArray),this.programConfigurations.upload(t),this.programInterface.dynamicLayoutAttributes&&(this.dynamicLayoutVertexBuffer=new p(t,this.dynamicLayoutVertexArray,!0))},K.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer&&this.dynamicLayoutVertexBuffer.destroy())};var J=function(t){if(this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.index=t.index,this.sdfIcons=t.sdfIcons,this.iconsNeedLinear=t.iconsNeedLinear,this.pixelRatio=t.pixelRatio,t.text)this.text=new K(X.text,t.layers,t.zoom,t.text),this.icon=new K(X.icon,t.layers,t.zoom,t.icon),this.collisionBox=new K(X.collisionBox,t.layers,t.zoom,t.collisionBox),this.textSizeData=t.textSizeData,this.iconSizeData=t.iconSizeData,this.placedGlyphArray=new q(t.placedGlyphArray),this.placedIconArray=new q(t.placedIconArray),this.glyphOffsetArray=new Z(t.glyphOffsetArray),this.lineVertexArray=new G(t.lineVertexArray);else{var e=this.layers[0];this.textSizeData=a(this.zoom,e,"text-size"),this.iconSizeData=a(this.zoom,e,"icon-size")}};J.prototype.populate=function(t,e){var r=this,i=this.layers[0],n=i.layout,o=n["text-font"],a=(!i.isLayoutValueFeatureConstant("text-field")||n["text-field"])&&o,s=!i.isLayoutValueFeatureConstant("icon-image")||n["icon-image"];if(this.features=[],a||s){for(var l=e.iconDependencies,u=e.glyphDependencies,c=u[o]=u[o]||{},p={zoom:this.zoom},h=0,f=t;h<f.length;h+=1){var d=f[h],m=d.feature,v=d.index,y=d.sourceLayerIndex;if(i.filter(m)){var g=void 0;a&&(g=i.getLayoutValue("text-field",p,m.properties),i.isLayoutValueFeatureConstant("text-field")&&(g=S(m.properties,g)),g=I(g,i,p,m.properties));var _=void 0;if(s&&(_=i.getLayoutValue("icon-image",p,m.properties),i.isLayoutValueFeatureConstant("icon-image")&&(_=S(m.properties,_))),(g||_)&&(r.features.push({text:g,icon:_,index:v,sourceLayerIndex:y,geometry:B(m),properties:m.properties,type:N[m.type]}),_&&(l[_]=!0),g))for(var x="map"===n["text-rotation-alignment"]&&"line"===n["symbol-placement"],b=O.allowsVerticalWritingMode(g),w=0;w<g.length;w++)if(c[g.charCodeAt(w)]=!0,x&&b){var T=$.lookup[g.charAt(w)];T&&(c[T.charCodeAt(0)]=!0)}}}"line"===n["symbol-placement"]&&(this.features=P(this.features))}},J.prototype.isEmpty=function(){return 0===this.icon.layoutVertexArray.length&&0===this.text.layoutVertexArray.length&&0===this.collisionBox.layoutVertexArray.length},J.prototype.serialize=function(t){return{zoom:this.zoom,layerIds:this.layers.map(function(t){return t.id}),sdfIcons:this.sdfIcons,iconsNeedLinear:this.iconsNeedLinear,textSizeData:this.textSizeData,iconSizeData:this.iconSizeData,placedGlyphArray:this.placedGlyphArray.serialize(t),placedIconArray:this.placedIconArray.serialize(t),glyphOffsetArray:this.glyphOffsetArray.serialize(t),lineVertexArray:this.lineVertexArray.serialize(t),text:this.text.serialize(t),icon:this.icon.serialize(t),collisionBox:this.collisionBox.serialize(t)}},J.prototype.upload=function(t){this.text.upload(t),this.icon.upload(t),this.collisionBox.upload(t)},J.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.collisionBox.destroy()},J.prototype.prepare=function(t,e,r,i){var n=this;this.symbolInstances=[];var o=512*this.overscaling;this.tilePixelRatio=_/o,this.compareText={},this.iconsNeedLinear=!1;for(var a=this.layers[0].layout,s=24*a["text-line-height"],l=a["text-font"].join(","),u="map"===a["text-rotation-alignment"]&&"line"===a["symbol-placement"],c=t[l]||{},p=e[l]||{},h=0,f=n.features;h<f.length;h+=1){var d=f[h],m={},v=d.text;if(v){var y=n.layers[0].getLayoutValue("text-offset",{zoom:n.zoom},d.properties).map(function(t){return 24*t}),g=24*n.layers[0].getLayoutValue("text-letter-spacing",{zoom:n.zoom},d.properties),x=O.allowsLetterSpacing(v)?g:0,b=n.layers[0].getLayoutValue("text-anchor",{zoom:n.zoom},d.properties),w=n.layers[0].getLayoutValue("text-justify",{zoom:n.zoom},d.properties),T="line"!==a["symbol-placement"]?24*n.layers[0].getLayoutValue("text-max-width",{zoom:n.zoom},d.properties):0,S=function(t,e){return k(t,c,T,s,b,w,x,y,24,e)};m[L.horizontal]=S(v,L.horizontal),O.allowsVerticalWritingMode(v)&&u&&(m[L.vertical]=S(v,L.vertical))}var z=void 0;if(d.icon){var A=r[d.icon];A&&(z=M(i[d.icon],n.layers[0].getLayoutValue("icon-offset",{zoom:n.zoom},d.properties),n.layers[0].getLayoutValue("icon-anchor",{zoom:n.zoom},d.properties)),void 0===n.sdfIcons?n.sdfIcons=A.sdf:n.sdfIcons!==A.sdf&&D.warnOnce("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),A.pixelRatio!==n.pixelRatio?n.iconsNeedLinear=!0:0===a["icon-rotate"]&&n.layers[0].isLayoutValueFeatureConstant("icon-rotate")||(n.iconsNeedLinear=!0))}(m[L.horizontal]||z)&&n.addFeature(d,m,z,p)}},J.prototype.addFeature=function(t,e,r,i){var n=this,o=this.layers[0].getLayoutValue("text-size",{zoom:this.zoom+1},t.properties),a=this.layers[0].getLayoutValue("icon-size",{zoom:this.zoom+1},t.properties),s=this.layers[0].getLayoutValue("text-offset",{zoom:this.zoom},t.properties),l=this.layers[0].getLayoutValue("icon-offset",{zoom:this.zoom},t.properties),u=this.layers[0].getLayoutValue("text-size",{zoom:18},t.properties);void 0===u&&(u=o);var c=this.layers[0].layout,p=o/24,h=this.tilePixelRatio*p,f=this.tilePixelRatio*u/24,d=this.tilePixelRatio*a,m=this.tilePixelRatio*c["symbol-spacing"],v=c["symbol-avoid-edges"],y=c["text-padding"]*this.tilePixelRatio,g=c["icon-padding"]*this.tilePixelRatio,x=c["text-max-angle"]/180*Math.PI,b="map"===c["text-rotation-alignment"]&&"line"===c["symbol-placement"],S="map"===c["icon-rotation-alignment"]&&"line"===c["symbol-placement"],z=c["text-allow-overlap"]||c["icon-allow-overlap"]||c["text-ignore-placement"]||c["icon-ignore-placement"],A=c["symbol-placement"],C=m/2,E=function(o,a){var u=!(a.x<0||a.x>_||a.y<0||a.y>_);if(!v||u){var c=u||z;n.addSymbolInstance(a,o,e,r,n.layers[0],c,n.collisionBoxArray,t.index,t.sourceLayerIndex,n.index,h,y,b,s,d,g,S,l,{zoom:n.zoom},t.properties,i)}};if("line"===A)for(var k=0,M=R(t.geometry,0,0,_,_);k<M.length;k+=1)for(var I=M[k],P=T(I,m,x,e[L.vertical]||e[L.horizontal],r,24,f,n.overscaling,_),D=0,O=P;D<O.length;D+=1){var B=O[D],F=e[L.horizontal];F&&n.anchorIsTooClose(F.text,C,B)||E(I,B)}else if("Polygon"===t.type)for(var N=0,U=V(t.geometry,0);N<U.length;N+=1){var $=U[N],q=j($,16);E($[0],new w(q.x,q.y,0))}else if("LineString"===t.type)for(var Z=0,G=t.geometry;Z<G.length;Z+=1){var W=G[Z];E(W,new w(W[0].x,W[0].y,0))}else if("Point"===t.type)for(var H=0,X=t.geometry;H<X.length;H+=1)for(var K=X[H],J=0,Y=K;J<Y.length;J+=1){var Q=Y[J];E([Q],new w(Q.x,Q.y,0))}},J.prototype.anchorIsTooClose=function(t,e,r){var i=this.compareText;if(t in i){for(var n=i[t],o=n.length-1;o>=0;o--)if(r.dist(n[o])<e)return!0}else i[t]=[];return i[t].push(r),!1},J.prototype.place=function(t,e){var r=this;this.text=new K(X.text,this.layers,this.zoom),this.icon=new K(X.icon,this.layers,this.zoom),this.collisionBox=new K(X.collisionBox,this.layers,this.zoom),this.placedGlyphArray=new q,this.placedIconArray=new q,this.glyphOffsetArray=new Z,this.lineVertexArray=new G;var i=this.layers[0],n=i.layout,o=t.maxScale,a="map"===n["text-rotation-alignment"]&&"line"===n["symbol-placement"],l="map"===n["icon-rotation-alignment"]&&"line"===n["symbol-placement"];if(n["text-allow-overlap"]||n["icon-allow-overlap"]||n["text-ignore-placement"]||n["icon-ignore-placement"]){var u=t.angle,c=Math.sin(u),p=Math.cos(u);this.symbolInstances.sort(function(t,e){return(c*t.anchor.x+p*t.anchor.y|0)-(c*e.anchor.x+p*e.anchor.y|0)||e.featureIndex-t.featureIndex})}for(var h=0,f=r.symbolInstances;h<f.length;h+=1){var d=f[h],m={boxStartIndex:d.textBoxStartIndex,boxEndIndex:d.textBoxEndIndex},v={boxStartIndex:d.iconBoxStartIndex,boxEndIndex:d.iconBoxEndIndex},y=!(d.textBoxStartIndex===d.textBoxEndIndex),g=!(d.iconBoxStartIndex===d.iconBoxEndIndex),_=n["text-optional"]||!y,x=n["icon-optional"]||!g,b=y?t.placeCollisionFeature(m,n["text-allow-overlap"],n["symbol-avoid-edges"]):t.minScale,w=g?t.placeCollisionFeature(v,n["icon-allow-overlap"],n["symbol-avoid-edges"]):t.minScale;if(_||x?!x&&b?b=Math.max(w,b):!_&&w&&(w=Math.max(w,b)):w=b=Math.max(w,b),y||g){for(var T=d.line,S=r.lineVertexArray.length,z=0;z<T.length;z++)r.lineVertexArray.emplaceBack(T[z].x,T[z].y);var A=r.lineVertexArray.length-S;if(y&&(t.insertCollisionFeature(m,b,n["text-ignore-placement"]),b<=o)){var C=s(i,r.zoom,r.textSizeData.coveringZoomRange,"text-size",d.featureProperties);r.addSymbols(r.text,d.glyphQuads,b,C,n["text-keep-upright"],d.textOffset,a,t.angle,d.featureProperties,d.writingModes,d.anchor,S,A,r.placedGlyphArray)}if(g&&(t.insertCollisionFeature(v,w,n["icon-ignore-placement"]),w<=o)){var E=s(i,r.zoom,r.iconSizeData.coveringZoomRange,"icon-size",d.featureProperties);r.addSymbols(r.icon,d.iconQuads,w,E,n["icon-keep-upright"],d.iconOffset,l,t.angle,d.featureProperties,0,d.anchor,S,A,r.placedIconArray)}}}e&&this.addToDebugBuffers(t)},J.prototype.addSymbols=function(t,e,r,o,a,s,l,u,c,p,h,f,d,m){for(var v=this,y=t.indexArray,g=t.layoutVertexArray,_=t.dynamicLayoutVertexArray,x=this.zoom,b=Math.max(Math.log(r)/Math.LN2+x,0),w=this.glyphOffsetArray.length,T=(h.angle+u+2*Math.PI)%(2*Math.PI),S=T>1*Math.PI/4&&T<=3*Math.PI/4||T>5*Math.PI/4&&T<=7*Math.PI/4,z=Boolean(p&L.vertical)&&S,A=0,C=e;A<C.length;A+=1){var E=C[A];if(!l||!a||E.writingMode===L.vertical===z){var k=E.tl,M=E.tr,I=E.bl,P=E.br,R=E.tex,D=t.segments.prepareSegment(4,t.layoutVertexArray,t.indexArray),O=D.vertexLength,B=E.glyphOffset[1];i(g,h.x,h.y,k.x,B+k.y,R.x,R.y,o),i(g,h.x,h.y,M.x,B+M.y,R.x+R.w,R.y,o),i(g,h.x,h.y,I.x,B+I.y,R.x,R.y+R.h,o),i(g,h.x,h.y,P.x,B+P.y,R.x+R.w,R.y+R.h,o),n(_,h,0,b),y.emplaceBack(O,O+1,O+2),y.emplaceBack(O+1,O+2,O+3),D.vertexLength+=4,D.primitiveLength+=2,v.glyphOffsetArray.emplaceBack(E.glyphOffset[0])}}m.emplaceBack(h.x,h.y,w,this.glyphOffsetArray.length-w,f,d,h.segment,o?o[0]:0,o?o[1]:0,s[0],s[1],b,z),t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,c)},J.prototype.addToDebugBuffers=function(t){for(var e=this,r=this.collisionBox,i=r.layoutVertexArray,n=r.indexArray,a=-t.angle,s=t.yStretch,u=0,c=e.symbolInstances;u<c.length;u+=1){var p=c[u];p.textCollisionFeature={boxStartIndex:p.textBoxStartIndex,boxEndIndex:p.textBoxEndIndex},p.iconCollisionFeature={boxStartIndex:p.iconBoxStartIndex,boxEndIndex:p.iconBoxEndIndex};for(var h=0;h<2;h++){var f=p[0===h?"textCollisionFeature":"iconCollisionFeature"];if(f)for(var d=f.boxStartIndex;d<f.boxEndIndex;d++){var m=e.collisionBoxArray.get(d);if(!(1===t.perspectiveRatio&&m.maxScale<1)){var v=m.anchorPoint,y=new l(m.x1,m.y1*s)._rotate(a),g=new l(m.x2,m.y1*s)._rotate(a),_=new l(m.x1,m.y2*s)._rotate(a),x=new l(m.x2,m.y2*s)._rotate(a),b=Math.max(0,Math.min(25,e.zoom+Math.log(m.maxScale)/Math.LN2)),w=Math.max(0,Math.min(25,e.zoom+Math.log(m.placementScale)/Math.LN2)),T=r.segments.prepareSegment(4,r.layoutVertexArray,r.indexArray),S=T.vertexLength;o(i,v,p.anchor,y,b,w),o(i,v,p.anchor,g,b,w),o(i,v,p.anchor,x,b,w),o(i,v,p.anchor,_,b,w),n.emplaceBack(S,S+1),n.emplaceBack(S+1,S+2),n.emplaceBack(S+2,S+3),n.emplaceBack(S+3,S),T.vertexLength+=4,T.primitiveLength+=4}}}}},J.prototype.addSymbolInstance=function(t,e,r,i,n,o,a,s,l,u,c,p,h,f,d,m,v,y,g,_,x){var b,w,T=[],S=[];for(var z in r){var E=parseInt(z,10);r[E]&&(S=S.concat(o?A(t,r[E],n,h,g,_,x):[]),b=new F(a,e,t,s,l,u,r[E],c,p,h,!1))}var k=b?b.boxStartIndex:this.collisionBoxArray.length,M=b?b.boxEndIndex:this.collisionBoxArray.length;i&&(T=o?C(t,i,n,v,r[L.horizontal],g,_):[],w=new F(a,e,t,s,l,u,i,d,m,v,!0));var I=w?w.boxStartIndex:this.collisionBoxArray.length,P=w?w.boxEndIndex:this.collisionBoxArray.length;M>J.MAX_INSTANCES&&D.warnOnce("Too many symbols being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),P>J.MAX_INSTANCES&&D.warnOnce("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907");var R=(r[L.vertical]?L.vertical:0)|(r[L.horizontal]?L.horizontal:0);this.symbolInstances.push({textBoxStartIndex:k,textBoxEndIndex:M,iconBoxStartIndex:I,iconBoxEndIndex:P,glyphQuads:S,iconQuads:T,textOffset:f,iconOffset:y,anchor:t,line:e,featureIndex:s,featureProperties:_,writingModes:R})},J.programInterfaces=X,J.MAX_INSTANCES=65535,J.addDynamicAttributes=n,e.exports=J},{"../../gl/index_buffer":61,"../../gl/vertex_buffer":62,"../../shaders/encode_attribute":85,"../../symbol/anchor":167,"../../symbol/clip_line":169,"../../symbol/collision_feature":171,"../../symbol/get_anchors":173,"../../symbol/mergelines":174,"../../symbol/quads":176,"../../symbol/shaping":177,"../../symbol/transform_text":179,"../../util/classify_rings":205,"../../util/find_pole_of_inaccessibility":211,"../../util/script_detection":218,"../../util/struct_array":220,"../../util/token":222,"../../util/util":223,"../../util/verticalize_punctuation":225,"../extent":48,"../index_array_type":50,"../load_geometry":51,"../program_configuration":53,"../segment":55,"../vertex_array_type":56,"@mapbox/point-geometry":2,"@mapbox/vector-tile":6}],48:[function(t,e,r){"use strict";e.exports=8192},{}],49:[function(t,e,r){"use strict";function i(t,e){return e-t}var n=(t("@mapbox/point-geometry"),t("./load_geometry")),o=t("./extent"),a=t("../style-spec/feature_filter"),s=t("../util/struct_array"),l=t("grid-index"),u=t("../util/dictionary_coder"),c=t("@mapbox/vector-tile"),p=t("pbf"),h=t("../util/vectortile_to_geojson"),f=t("../util/util").arraysIntersect,d=s({members:[{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]}),m=function(t,e,r,i){this.coord=t,this.overscaling=e,this.x=t.x,this.y=t.y,this.z=t.z-Math.log(e)/Math.LN2,this.grid=r||new l(o,16,0),this.featureIndexArray=i||new d};m.deserialize=function(t,e,r){var i=new m(t.coord,t.overscaling,new l(t.grid),new d(t.featureIndexArray));return i.rawTileData=e,i.bucketLayerIDs=t.bucketLayerIDs,i.setCollisionTile(r),i},m.prototype.insert=function(t,e,r,i,n){var o=this,a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,i,n);for(var s=0;s<e.length;s++){for(var l=e[s],u=[1/0,1/0,-1/0,-1/0],c=0;c<l.length;c++){var p=l[c];u[0]=Math.min(u[0],p.x),u[1]=Math.min(u[1],p.y),u[2]=Math.max(u[2],p.x),u[3]=Math.max(u[3],p.y)}o.grid.insert(a,u[0],u[1],u[2],u[3])}},m.prototype.setCollisionTile=function(t){this.collisionTile=t},m.prototype.serialize=function(t){var e=this.grid.toArrayBuffer();return t&&t.push(e),{coord:this.coord,overscaling:this.overscaling,grid:e,featureIndexArray:this.featureIndexArray.serialize(t),bucketLayerIDs:this.bucketLayerIDs}},m.prototype.query=function(t,e){this.vtLayers||(this.vtLayers=new c.VectorTile(new p(this.rawTileData)).layers,this.sourceLayerCoder=new u(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"]));for(var r={},n=t.params||{},s=o/t.tileSize/t.scale,l=a(n.filter),h=t.queryGeometry,f=t.additionalRadius*s,d=1/0,m=1/0,v=-1/0,y=-1/0,g=0;g<h.length;g++)for(var _=h[g],x=0;x<_.length;x++){var b=_[x];d=Math.min(d,b.x),m=Math.min(m,b.y),v=Math.max(v,b.x),y=Math.max(y,b.y)}var w=this.grid.query(d-f,m-f,v+f,y+f);w.sort(i),this.filterMatching(r,w,this.featureIndexArray,h,l,n.layers,e,t.bearing,s);var T=this.collisionTile.queryRenderedSymbols(h,t.scale);return T.sort(),this.filterMatching(r,T,this.collisionTile.collisionBoxArray,h,l,n.layers,e,t.bearing,s),r},m.prototype.filterMatching=function(t,e,r,i,o,a,s,l,u){for(var c,p=this,d=0;d<e.length;d++){var m=e[d];if(m!==c){c=m;var v=r.get(m),y=p.bucketLayerIDs[v.bucketIndex];if(!a||f(a,y)){var g=p.sourceLayerCoder.decode(v.sourceLayerIndex),_=p.vtLayers[g],x=_.feature(v.featureIndex);if(o(x))for(var b=null,w=0;w<y.length;w++){var T=y[w];if(!(a&&a.indexOf(T)<0)){var S=s[T];if(S&&("symbol"===S.type||(b||(b=n(x)),S.queryIntersectsFeature(i,x,b,p.z,l,u)))){var z=new h(x,p.z,p.x,p.y);z.layer=S.serialize();var A=t[T];void 0===A&&(A=t[T]=[]),A.push({featureIndex:m,feature:z})}}}}}}},m.prototype.hasLayer=function(t){for(var e=this,r=0,i=e.bucketLayerIDs;r<i.length;r+=1)for(var n=i[r],o=0,a=n;o<a.length;o+=1){var s=a[o];if(t===s)return!0}return!1},e.exports=m},{"../style-spec/feature_filter":110,"../util/dictionary_coder":207,"../util/struct_array":220,"../util/util":223,"../util/vectortile_to_geojson":224,"./extent":48,"./load_geometry":51,"@mapbox/point-geometry":2,"@mapbox/vector-tile":6,"grid-index":22,pbf:29}],50:[function(t,e,r){"use strict";function i(t){return n({members:[{type:"Uint16",name:"vertices",components:t}]})}var n=t("../util/struct_array");e.exports={LineIndexArray:i(2),TriangleIndexArray:i(3)}},{"../util/struct_array":220}],51:[function(t,e,r){"use strict";var i=t("../util/util"),n=t("./extent"),o=function(t){return{min:-1*Math.pow(2,t-1),max:Math.pow(2,t-1)-1}}(16);e.exports=function(t){for(var e=n/t.extent,r=t.loadGeometry(),a=0;a<r.length;a++)for(var s=r[a],l=0;l<s.length;l++){var u=s[l];u.x=Math.round(u.x*e),u.y=Math.round(u.y*e),(u.x<o.min||u.x>o.max||u.y<o.min||u.y>o.max)&&i.warnOnce("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}},{"../util/util":223,"./extent":48}],52:[function(t,e,r){"use strict";var i=t("../util/struct_array"),n=i({members:[{name:"a_pos",type:"Int16",components:2}]});e.exports=n},{"../util/struct_array":220}],53:[function(t,e,r){"use strict";function i(t){return[a(255*t[0],255*t[1]),a(255*t[2],255*t[3])]}var n=t("./vertex_array_type"),o=t("../style-spec/function").interpolationFactor,a=t("../shaders/encode_attribute").packUint8ToFloat,s=t("../gl/vertex_buffer"),l=function(t,e,r,i){this.name=t,this.type=e,this.property=r,this.useIntegerZoom=i};l.prototype.defines=function(){return["#define HAS_UNIFORM_u_"+this.name]},l.prototype.populatePaintArray=function(){},l.prototype.setUniforms=function(t,e,r,i){var n=i.zoom,o=r.getPaintValue(this.property,{zoom:this.useIntegerZoom?Math.floor(n):n});"color"===this.type?t.uniform4fv(e.uniforms["u_"+this.name],o):t.uniform1f(e.uniforms["u_"+this.name],o)};var u=function(t,e,r){this.name=t,this.type=e,this.property=r};u.prototype.defines=function(){return[]},u.prototype.populatePaintArray=function(t,e,r,n,o,a){var s=this,l=t.getPaintValue(this.property,void 0,a);if("color"===this.type)for(var u=i(l),c=n;c<o;c++){var p=e.get(c);p["a_"+s.name+"0"]=u[0],p["a_"+s.name+"1"]=u[1]}else{for(var h=n;h<o;h++)e.get(h)["a_"+s.name]=l;var f=r[this.property];f.max=Math.max(f.max,l)}},u.prototype.setUniforms=function(t,e){t.uniform1f(e.uniforms["a_"+this.name+"_t"],0)};var c=function(t,e,r,i,n){this.name=t,this.type=e,this.property=r,this.useIntegerZoom=i,this.zoom=n};c.prototype.defines=function(){return[]},c.prototype.populatePaintArray=function(t,e,r,n,o,a){var s=this,l=t.getPaintValue(this.property,{zoom:this.zoom},a),u=t.getPaintValue(this.property,{zoom:this.zoom+1},a);if("color"===this.type)for(var c=i(l),p=i(u),h=n;h<o;h++){var f=e.get(h);f["a_"+s.name+"0"]=c[0],f["a_"+s.name+"1"]=c[1],f["a_"+s.name+"2"]=p[0],f["a_"+s.name+"3"]=p[1]}else{for(var d=n;d<o;d++){var m=e.get(d);m["a_"+s.name+"0"]=l,m["a_"+s.name+"1"]=u}var v=r[this.property];v.max=Math.max(v.max,l,u)}},c.prototype.setUniforms=function(t,e,r,i){var n=i.zoom,a=o(this.useIntegerZoom?Math.floor(n):n,1,this.zoom,this.zoom+1);t.uniform1f(e.uniforms["a_"+this.name+"_t"],a)};var p=function(){this.binders={},this.cacheKey=""};p.createDynamic=function(t,e,r){for(var i=new p,o=[],a=0,s=t.paintAttributes||[];a<s.length;a+=1){var h=s[a],f=h.property,d=h.useIntegerZoom||!1,m=h.name||f.replace(e.type+"-","").replace(/-/g,"_"),v=e._paintSpecifications[f].type;e.isPaintValueFeatureConstant(f)?(i.binders[m]=new l(m,v,f,d),i.cacheKey+="/u_"+m):e.isPaintValueZoomConstant(f)?(i.binders[m]=new u(m,v,f),i.cacheKey+="/a_"+m,o.push({name:"a_"+m,type:"Float32",components:"color"===v?2:1})):(i.binders[m]=new c(m,v,f,d,r),i.cacheKey+="/z_"+m,o.push({name:"a_"+m,type:"Float32",components:"color"===v?4:2}))}return i.PaintVertexArray=n(o),i.interface=t,i.layer=e,i},p.createBasicFill=function(){var t=new p;return t.binders.color=new l("color","color","fill-color",!1),t.cacheKey+="/u_color",t.binders.opacity=new l("opacity","number","fill-opacity",!1),t.cacheKey+="/u_opacity",t},p.prototype.createPaintPropertyStatistics=function(){var t=this,e={};for(var r in t.binders)e[t.binders[r].property]={max:-1/0};return e},p.prototype.populatePaintArray=function(t,e){var r=this,i=this.paintVertexArray;if(0!==i.bytesPerElement){var n=i.length;i.resize(t);for(var o in r.binders)r.binders[o].populatePaintArray(r.layer,i,r.paintPropertyStatistics,n,t,e)}},p.prototype.defines=function(){var t=this,e=[];for(var r in t.binders)e.push.apply(e,t.binders[r].defines());return e},p.prototype.setUniforms=function(t,e,r,i){var n=this;for(var o in n.binders)n.binders[o].setUniforms(t,e,r,i)},p.prototype.serialize=function(t){return 0===this.paintVertexArray.length?null:{array:this.paintVertexArray.serialize(t),type:this.paintVertexArray.constructor.serialize(),statistics:this.paintPropertyStatistics}},p.deserialize=function(t,e,r,i){var o=p.createDynamic(t,e,r);return i&&(o.PaintVertexArray=n(i.type.members),o.paintVertexArray=new o.PaintVertexArray(i.array),o.paintPropertyStatistics=i.statistics),o},p.prototype.upload=function(t){this.paintVertexArray&&(this.paintVertexBuffer=new s(t,this.paintVertexArray))},p.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var h=function(t,e,r,i){var n=this;if(this.programConfigurations={},i)for(var o=0,a=e;o<a.length;o+=1){var s=a[o];n.programConfigurations[s.id]=p.deserialize(t,s,r,i[s.id])}else for(var l=0,u=e;l<u.length;l+=1){var c=u[l],h=p.createDynamic(t,c,r);h.paintVertexArray=new h.PaintVertexArray,h.paintPropertyStatistics=h.createPaintPropertyStatistics(),n.programConfigurations[c.id]=h}};h.prototype.populatePaintArrays=function(t,e){var r=this;for(var i in r.programConfigurations)r.programConfigurations[i].populatePaintArray(t,e)},h.prototype.serialize=function(t){var e=this,r={};for(var i in e.programConfigurations){var n=e.programConfigurations[i].serialize(t);n&&(r[i]=n)}return r},h.prototype.get=function(t){return this.programConfigurations[t]},h.prototype.upload=function(t){var e=this;for(var r in e.programConfigurations)e.programConfigurations[r].upload(t)},h.prototype.destroy=function(){var t=this;for(var e in t.programConfigurations)t.programConfigurations[e].destroy()},e.exports={ProgramConfiguration:p,ProgramConfigurationSet:h}},{"../gl/vertex_buffer":62,"../shaders/encode_attribute":85,"../style-spec/function":112,"./vertex_array_type":56}],54:[function(t,e,r){"use strict";var i=t("../util/struct_array"),n=i({members:[{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]});e.exports=n},{"../util/struct_array":220}],55:[function(t,e,r){"use strict";var i=t("../util/util"),n=i.warnOnce,o=Math.pow(2,16)-1,a=function(t){void 0===t&&(t=[]),this.segments=t};a.prototype.prepareSegment=function(t,r,i){var a=this.segments[this.segments.length-1];return t>o&&n("Max vertices per segment is "+o+": bucket requested "+t),(!a||a.vertexLength+t>e.exports.MAX_VERTEX_ARRAY_LENGTH)&&(a={vertexOffset:r.length,primitiveOffset:i.length,vertexLength:0,primitiveLength:0},this.segments.push(a)),a},a.prototype.get=function(){return this.segments},a.prototype.destroy=function(){for(var t=this,e=0,r=t.segments;e<r.length;e+=1){var i=r[e];for(var n in i.vaos)i.vaos[n].destroy()}},e.exports={SegmentVector:a,MAX_VERTEX_ARRAY_LENGTH:o}},{"../util/util":223}],56:[function(t,e,r){"use strict";function i(t){return n({members:t,alignment:4})}var n=t("../util/struct_array");e.exports=i},{"../util/struct_array":220}],57:[function(t,e,r){"use strict";var i=function(t,e,r){this.column=t,this.row=e,this.zoom=r};i.prototype.clone=function(){return new i(this.column,this.row,this.zoom)},i.prototype.zoomTo=function(t){return this.clone()._zoomTo(t)},i.prototype.sub=function(t){return this.clone()._sub(t)},i.prototype._zoomTo=function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this},i.prototype._sub=function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this},e.exports=i},{}],58:[function(t,e,r){"use strict";var i=t("../util/util").wrap,n=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};n.prototype.wrap=function(){return new n(i(this.lng,-180,180),this.lat)},n.prototype.toArray=function(){return[this.lng,this.lat]},n.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},n.prototype.toBounds=function(e){var r=360*e/40075017,i=r/Math.cos(Math.PI/180*this.lat);return new(t("./lng_lat_bounds"))(new n(this.lng-i,this.lat-r),new n(this.lng+i,this.lat+r))},n.convert=function(t){if(t instanceof n)return t;if(Array.isArray(t)&&2===t.length)return new n(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new n(Number(t.lng),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")},e.exports=n},{"../util/util":223,"./lng_lat_bounds":59}],59:[function(t,e,r){"use strict";var i=t("./lng_lat"),n=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};n.prototype.setNorthEast=function(t){return this._ne=t instanceof i?new i(t.lng,t.lat):i.convert(t),this},n.prototype.setSouthWest=function(t){return this._sw=t instanceof i?new i(t.lng,t.lat):i.convert(t),this},n.prototype.extend=function(t){var e,r,o=this._sw,a=this._ne;if(t instanceof i)e=t,r=t;else{if(!(t instanceof n))return Array.isArray(t)?t.every(Array.isArray)?this.extend(n.convert(t)):this.extend(i.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return o||a?(o.lng=Math.min(e.lng,o.lng),o.lat=Math.min(e.lat,o.lat),a.lng=Math.max(r.lng,a.lng),a.lat=Math.max(r.lat,a.lat)):(this._sw=new i(e.lng,e.lat),this._ne=new i(r.lng,r.lat)),this},n.prototype.getCenter=function(){return new i((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},n.prototype.getSouthWest=function(){return this._sw},n.prototype.getNorthEast=function(){return this._ne},n.prototype.getNorthWest=function(){return new i(this.getWest(),this.getNorth())},n.prototype.getSouthEast=function(){return new i(this.getEast(),this.getSouth())},n.prototype.getWest=function(){return this._sw.lng},n.prototype.getSouth=function(){return this._sw.lat},n.prototype.getEast=function(){return this._ne.lng},n.prototype.getNorth=function(){return this._ne.lat},n.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},n.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},n.convert=function(t){return!t||t instanceof n?t:new n(t)},e.exports=n},{"./lng_lat":58}],60:[function(t,e,r){"use strict";var i=t("./lng_lat"),n=t("@mapbox/point-geometry"),o=t("./coordinate"),a=t("../util/util"),s=t("../style-spec/util/interpolate"),l=t("../source/tile_coord"),u=t("../data/extent"),c=t("@mapbox/gl-matrix"),p=c.vec4,h=c.mat4,f=c.mat2,d=function(t,e,r){this.tileSize=512,this._renderWorldCopies=void 0===r||r,this._minZoom=t||0,this._maxZoom=e||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new i(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0},m={minZoom:{},maxZoom:{},renderWorldCopies:{},worldSize:{},centerPoint:{},size:{},bearing:{},pitch:{},fov:{},zoom:{},center:{},unmodified:{},x:{},y:{},point:{}};m.minZoom.get=function(){return this._minZoom},m.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},m.maxZoom.get=function(){return this._maxZoom},m.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},m.renderWorldCopies.get=function(){return this._renderWorldCopies},m.worldSize.get=function(){return this.tileSize*this.scale},m.centerPoint.get=function(){return this.size._div(2)},m.size.get=function(){return new n(this.width,this.height)},m.bearing.get=function(){return-this.angle/Math.PI*180},m.bearing.set=function(t){var e=-a.wrap(t,-180,180)*Math.PI/180;this.angle!==e&&(this._unmodified=!1,this.angle=e,this._calcMatrices(),this.rotationMatrix=f.create(),f.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},m.pitch.get=function(){return this._pitch/Math.PI*180},m.pitch.set=function(t){var e=a.clamp(t,0,60)/180*Math.PI;this._pitch!==e&&(this._unmodified=!1,this._pitch=e,this._calcMatrices())},m.fov.get=function(){return this._fov/Math.PI*180},m.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},m.zoom.get=function(){return this._zoom},m.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},m.center.get=function(){return this._center},m.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},d.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},d.prototype.getVisibleWrappedCoordinates=function(t){for(var e=this.pointCoordinate(new n(0,0),0),r=this.pointCoordinate(new n(this.width,0),0),i=Math.floor(e.column),o=Math.floor(r.column),a=[t],s=i;s<=o;s++)0!==s&&a.push(new l(t.z,t.x,t.y,s));return a},d.prototype.coveringTiles=function(t){var e=this.coveringZoomLevel(t),r=e;if(void 0!==t.minzoom&&e<t.minzoom)return[];void 0!==t.maxzoom&&e>t.maxzoom&&(e=t.maxzoom);var i=this.pointCoordinate(this.centerPoint,e),o=new n(i.column-.5,i.row-.5),a=[this.pointCoordinate(new n(0,0),e),this.pointCoordinate(new n(this.width,0),e),this.pointCoordinate(new n(this.width,this.height),e),this.pointCoordinate(new n(0,this.height),e)];return l.cover(e,a,t.reparseOverscaled?r:e,this._renderWorldCopies).sort(function(t,e){return o.dist(t)-o.dist(e)})},d.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},m.unmodified.get=function(){return this._unmodified},d.prototype.zoomScale=function(t){return Math.pow(2,t)},d.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},d.prototype.project=function(t){return new n(this.lngX(t.lng),this.latY(t.lat))},d.prototype.unproject=function(t){return new i(this.xLng(t.x),this.yLat(t.y))},m.x.get=function(){return this.lngX(this.center.lng)},m.y.get=function(){return this.latY(this.center.lat)},m.point.get=function(){return new n(this.x,this.y)},d.prototype.lngX=function(t){return(180+t)*this.worldSize/360},d.prototype.latY=function(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))*this.worldSize/360},d.prototype.xLng=function(t){return 360*t/this.worldSize-180},d.prototype.yLat=function(t){var e=180-360*t/this.worldSize;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90},d.prototype.setLocationAtPoint=function(t,e){var r=this.pointCoordinate(e)._sub(this.pointCoordinate(this.centerPoint));this.center=this.coordinateLocation(this.locationCoordinate(t)._sub(r)),this._renderWorldCopies&&(this.center=this.center.wrap())},d.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},d.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},d.prototype.locationCoordinate=function(t){return new o(this.lngX(t.lng)/this.tileSize,this.latY(t.lat)/this.tileSize,this.zoom).zoomTo(this.tileZoom)},d.prototype.coordinateLocation=function(t){var e=t.zoomTo(this.zoom);return new i(this.xLng(e.column*this.tileSize),this.yLat(e.row*this.tileSize))},d.prototype.pointCoordinate=function(t,e){void 0===e&&(e=this.tileZoom);var r=[t.x,t.y,0,1],i=[t.x,t.y,1,1];p.transformMat4(r,r,this.pixelMatrixInverse),p.transformMat4(i,i,this.pixelMatrixInverse);var n=r[3],a=i[3],l=r[0]/n,u=i[0]/a,c=r[1]/n,h=i[1]/a,f=r[2]/n,d=i[2]/a,m=f===d?0:(0-f)/(d-f);return new o(s(l,u,m)/this.tileSize,s(c,h,m)/this.tileSize,this.zoom)._zoomTo(e)},d.prototype.coordinatePoint=function(t){var e=t.zoomTo(this.zoom),r=[e.column*this.tileSize,e.row*this.tileSize,0,1];return p.transformMat4(r,r,this.pixelMatrix),new n(r[0]/r[3],r[1]/r[3])},d.prototype.calculatePosMatrix=function(t,e){var r=t.toCoordinate(e),i=this.worldSize/this.zoomScale(r.zoom),n=h.identity(new Float64Array(16));return h.translate(n,n,[r.column*i,r.row*i,0]),h.scale(n,n,[i/u,i/u,1]),h.multiply(n,this.projMatrix,n),new Float32Array(n)},d.prototype.cameraToTileDistance=function(t){var e=this.calculatePosMatrix(t.coord,t.sourceMaxZoom),r=[t.tileSize/2,t.tileSize/2,0,1];return p.transformMat4(r,r,e),r[3]},d.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,e,r,i,o=-90,a=90,s=-180,l=180,u=this.size,c=this._unmodified;if(this.latRange){var p=this.latRange;o=this.latY(p[1]),a=this.latY(p[0]),t=a-o<u.y?u.y/(a-o):0}if(this.lngRange){var h=this.lngRange;s=this.lngX(h[0]),l=this.lngX(h[1]),e=l-s<u.x?u.x/(l-s):0}var f=Math.max(e||0,t||0);if(f)return this.center=this.unproject(new n(e?(l+s)/2:this.x,t?(a+o)/2:this.y)),this.zoom+=this.scaleZoom(f),this._unmodified=c,void(this._constraining=!1);if(this.latRange){var d=this.y,m=u.y/2;d-m<o&&(i=o+m),d+m>a&&(i=a-m)}if(this.lngRange){var v=this.x,y=u.x/2;v-y<s&&(r=s+y),v+y>l&&(r=l-y)}void 0===r&&void 0===i||(this.center=this.unproject(new n(void 0!==r?r:this.x,void 0!==i?i:this.y))),this._unmodified=c,this._constraining=!1}},d.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var t=this._fov/2,e=Math.PI/2+this._pitch,r=Math.sin(t)*this.cameraToCenterDistance/Math.sin(Math.PI-e-t),i=Math.cos(Math.PI/2-this._pitch)*r+this.cameraToCenterDistance,n=1.01*i,o=new Float64Array(16);h.perspective(o,this._fov,this.width/this.height,1,n),h.scale(o,o,[1,-1,1]),h.translate(o,o,[0,0,-this.cameraToCenterDistance]),h.rotateX(o,o,this._pitch),h.rotateZ(o,o,this.angle),h.translate(o,o,[-this.x,-this.y,0]);var a=this.worldSize/(2*Math.PI*6378137*Math.abs(Math.cos(this.center.lat*(Math.PI/180))));if(h.scale(o,o,[1,1,a,1]),this.projMatrix=o,o=h.create(),h.scale(o,o,[this.width/2,-this.height/2,1]),h.translate(o,o,[1,-1,0]),this.pixelMatrix=h.multiply(new Float64Array(16),o,this.projMatrix),!(o=h.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=o}},Object.defineProperties(d.prototype,m),e.exports=d},{"../data/extent":48,"../source/tile_coord":101,"../style-spec/util/interpolate":127,"../util/util":223,"./coordinate":57,"./lng_lat":58,"@mapbox/gl-matrix":1,"@mapbox/point-geometry":2}],61:[function(t,e,r){"use strict";var i=function(t,e){this.gl=t,this.buffer=t.createBuffer(),void 0===t.extVertexArrayObject&&(t.extVertexArrayObject=t.getExtension("OES_vertex_array_object")),t.extVertexArrayObject&&t.extVertexArrayObject.bindVertexArrayOES(null),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.buffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,t.STATIC_DRAW),delete e.arrayBuffer};i.prototype.bind=function(){this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.buffer)},i.prototype.destroy=function(){this.buffer&&(this.gl.deleteBuffer(this.buffer),delete this.buffer)},e.exports=i},{}],62:[function(t,e,r){"use strict";var i={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},n=function(t,e,r){this.length=e.length,this.attributes=e.members,this.itemSize=e.bytesPerElement,this.dynamicDraw=r,this.gl=t,this.buffer=t.createBuffer(),this.gl.bindBuffer(t.ARRAY_BUFFER,this.buffer),this.gl.bufferData(t.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?t.DYNAMIC_DRAW:t.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};n.prototype.bind=function(){this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.buffer)},n.prototype.updateData=function(t){this.bind(),this.gl.bufferSubData(this.gl.ARRAY_BUFFER,0,t.arrayBuffer)},n.prototype.enableAttributes=function(t,e){for(var r=this,i=0;i<this.attributes.length;i++){var n=r.attributes[i],o=e.attributes[n.name];void 0!==o&&t.enableVertexAttribArray(o)}},n.prototype.setVertexAttribPointers=function(t,e,r){for(var n=this,o=0;o<this.attributes.length;o++){var a=n.attributes[o],s=e.attributes[a.name];void 0!==s&&t.vertexAttribPointer(s,a.components,t[i[a.type]],!1,n.itemSize,a.offset+n.itemSize*(r||0))}},n.prototype.destroy=function(){this.buffer&&(this.gl.deleteBuffer(this.buffer),delete this.buffer)},e.exports=n},{}],63:[function(t,e,r){"use strict";var i=t("mapbox-gl-supported"),n=t("./util/browser"),o=t("../package.json").version,a=t("./ui/map"),s=t("./ui/control/navigation_control"),l=t("./ui/control/geolocate_control"),u=t("./ui/control/attribution_control"),c=t("./ui/control/scale_control"),p=t("./ui/control/fullscreen_control"),h=t("./ui/popup"),f=t("./ui/marker"),d=t("./style/style"),m=t("./geo/lng_lat"),v=t("./geo/lng_lat_bounds"),y=t("@mapbox/point-geometry"),g=t("./util/evented"),_=t("./util/config"),x=t("./source/rtl_text_plugin");e.exports={version:o,supported:i,workerCount:Math.max(Math.floor(n.hardwareConcurrency/2),1),setRTLTextPlugin:x.setRTLTextPlugin,Map:a,NavigationControl:s,GeolocateControl:l,AttributionControl:u,ScaleControl:c,FullscreenControl:p,Popup:h,Marker:f,Style:d,LngLat:m,LngLatBounds:v,Point:y,Evented:g,config:_,get accessToken(){return _.ACCESS_TOKEN},set accessToken(t){_.ACCESS_TOKEN=t}}},{"../package.json":41,"./geo/lng_lat":58,"./geo/lng_lat_bounds":59,"./source/rtl_text_plugin":96,"./style/style":156,"./ui/control/attribution_control":182,"./ui/control/fullscreen_control":183,"./ui/control/geolocate_control":184,"./ui/control/navigation_control":186,"./ui/control/scale_control":187,"./ui/map":197,"./ui/marker":198,"./ui/popup":199,"./util/browser":202,"./util/config":206,"./util/evented":210,"@mapbox/point-geometry":2,"mapbox-gl-supported":28}],64:[function(t,e,r){"use strict";function i(t,e,r){var i=t.gl,o=t.transform,a=o.tileSize,s=r.paint["background-color"],l=r.paint["background-pattern"],u=r.paint["background-opacity"],c=l||1!==s[3]||1!==u?"translucent":"opaque";if(t.renderPass===c){i.disable(i.STENCIL_TEST),t.setDepthSublayer(0);var p;if(l){if(n.isPatternMissing(l,t))return;p=t.useProgram("fillPattern",t.basicFillProgramConfiguration),n.prepare(l,t,p),t.tileExtentPatternVAO.bind(i,p,t.tileExtentBuffer)}else p=t.useProgram("fill",t.basicFillProgramConfiguration),i.uniform4fv(p.uniforms.u_color,s),t.tileExtentVAO.bind(i,p,t.tileExtentBuffer);i.uniform1f(p.uniforms.u_opacity,u);for(var h=o.coveringTiles({tileSize:a}),f=0,d=h;f<d.length;f+=1){var m=d[f];l&&n.setTile({coord:m,tileSize:a},t,p),i.uniformMatrix4fv(p.uniforms.u_matrix,!1,t.transform.calculatePosMatrix(m)),i.drawArrays(i.TRIANGLE_STRIP,0,t.tileExtentBuffer.length)}}}var n=t("./pattern");e.exports=i},{"./pattern":80}],65:[function(t,e,r){"use strict";function i(t,e,r,i){if("translucent"===t.renderPass){var a=t.gl;t.setDepthSublayer(0),t.depthMask(!1),a.disable(a.STENCIL_TEST);for(var s=0;s<i.length;s++){var l=i[s],u=e.getTile(l),c=u.getBucket(r);if(c){var p=c.programConfigurations.get(r.id),h=t.useProgram("circle",p);if(p.setUniforms(a,h,r,{zoom:t.transform.zoom}),a.uniform1f(h.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance),a.uniform1i(h.uniforms.u_scale_with_map,"map"===r.paint["circle-pitch-scale"]?1:0),"map"===r.paint["circle-pitch-alignment"]){a.uniform1i(h.uniforms.u_pitch_with_map,1);var f=o(u,1,t.transform.zoom);a.uniform2f(h.uniforms.u_extrude_scale,f,f)}else a.uniform1i(h.uniforms.u_pitch_with_map,0),a.uniform2fv(h.uniforms.u_extrude_scale,t.transform.pixelsToGLUnits);a.uniform1f(h.uniforms.u_devicepixelratio,n.devicePixelRatio),a.uniformMatrix4fv(h.uniforms.u_matrix,!1,t.translatePosMatrix(l.posMatrix,u,r.paint["circle-translate"],r.paint["circle-translate-anchor"])),h.draw(a,a.TRIANGLES,r.id,c.layoutVertexBuffer,c.indexBuffer,c.segments,p)}}}}var n=t("../util/browser"),o=t("../source/pixels_to_tile_units");e.exports=i},{"../source/pixels_to_tile_units":93,"../util/browser":202}],66:[function(t,e,r){"use strict";function i(t,e,r,i){var n=t.gl;n.enable(n.STENCIL_TEST);var o=t.useProgram("collisionBox");n.activeTexture(n.TEXTURE1),t.frameHistory.bind(n),n.uniform1i(o.uniforms.u_fadetexture,1);for(var a=0;a<i.length;a++){var s=i[a],l=e.getTile(s),u=l.getBucket(r);if(u){n.uniformMatrix4fv(o.uniforms.u_matrix,!1,s.posMatrix),t.enableTileClippingMask(s),t.lineWidth(1),n.uniform1f(o.uniforms.u_scale,Math.pow(2,t.transform.zoom-l.coord.z)),n.uniform1f(o.uniforms.u_zoom,10*t.transform.zoom);var c=Math.max(0,Math.min(25,l.coord.z+Math.log(l.collisionTile.maxScale)/Math.LN2));n.uniform1f(o.uniforms.u_maxzoom,10*c),n.uniform1f(o.uniforms.u_collision_y_stretch,l.collisionTile.yStretch),n.uniform1f(o.uniforms.u_pitch,t.transform.pitch/360*2*Math.PI),n.uniform1f(o.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance),o.draw(n,n.LINES,r.id,u.collisionBox.layoutVertexBuffer,u.collisionBox.indexBuffer,u.collisionBox.segments)}}}e.exports=i},{}],67:[function(t,e,r){"use strict";function i(t,e,r){for(var i=0;i<r.length;i++)n(t,e,r[i])}function n(t,e,r){var i=t.gl;i.disable(i.STENCIL_TEST),t.lineWidth(1*a.devicePixelRatio);var n=r.posMatrix,h=t.useProgram("debug");i.uniformMatrix4fv(h.uniforms.u_matrix,!1,n),i.uniform4f(h.uniforms.u_color,1,0,0,1),t.debugVAO.bind(i,h,t.debugBuffer),i.drawArrays(i.LINE_STRIP,0,t.debugBuffer.length);for(var f=o(r.toString(),50,200,5),d=new p,m=0;m<f.length;m+=2)d.emplaceBack(f[m],f[m+1]);var v=new u(i,d);(new c).bind(i,h,v),i.uniform4f(h.uniforms.u_color,1,1,1,1);for(var y=e.getTile(r).tileSize,g=l/(Math.pow(2,t.transform.zoom-r.z)*y),_=[[-1,-1],[-1,1],[1,-1],[1,1]],x=0;x<_.length;x++){var b=_[x];i.uniformMatrix4fv(h.uniforms.u_matrix,!1,s.translate([],n,[g*b[0],g*b[1],0])),i.drawArrays(i.LINES,0,v.length)}i.uniform4f(h.uniforms.u_color,0,0,0,1),i.uniformMatrix4fv(h.uniforms.u_matrix,!1,n),i.drawArrays(i.LINES,0,v.length)}function o(t,e,r,i){i=i||1;var n,o,a,s,l,u,c,p,f=[];for(n=0,o=t.length;n<o;n++)if(l=h[t[n]]){for(p=null,a=0,s=l[1].length;a<s;a+=2)-1===l[1][a]&&-1===l[1][a+1]?p=null:(u=e+l[1][a]*i,c=r-l[1][a+1]*i,p&&f.push(p.x,p.y,u,c),p={x:u,y:c});e+=l[0]*i}return f}var a=t("../util/browser"),s=t("@mapbox/gl-matrix").mat4,l=t("../data/extent"),u=t("../gl/vertex_buffer"),c=t("./vertex_array_object"),p=t("../data/pos_array");e.exports=i;var h={" ":[16,[]],"!":[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'"':[16,[4,21,4,14,-1,-1,12,21,12,14]],"#":[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],"%":[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],"&":[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],"'":[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],"(":[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],")":[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],"*":[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],"+":[26,[13,18,13,0,-1,-1,4,9,22,9]],",":[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"-":[26,[4,9,22,9]],".":[10,[5,2,4,1,5,0,6,1,5,2]],"/":[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],":":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],";":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"<":[24,[20,18,4,9,20,0]],"=":[26,[4,12,22,12,-1,-1,4,6,22,6]],">":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]}},{"../data/extent":48,"../data/pos_array":52,"../gl/vertex_buffer":62,"../util/browser":202,"./vertex_array_object":84,"@mapbox/gl-matrix":1}],68:[function(t,e,r){"use strict";function i(t,e,r,i){var s=t.gl;s.enable(s.STENCIL_TEST);var l=!r.paint["fill-pattern"]&&r.isPaintValueFeatureConstant("fill-color")&&r.isPaintValueFeatureConstant("fill-opacity")&&1===r.paint["fill-color"][3]&&1===r.paint["fill-opacity"]?"opaque":"translucent";t.renderPass===l&&(t.setDepthSublayer(1),t.depthMask("opaque"===t.renderPass),n(t,e,r,i,o)),"translucent"===t.renderPass&&r.paint["fill-antialias"]&&(t.lineWidth(2),t.depthMask(!1),t.setDepthSublayer(r.getPaintProperty("fill-outline-color")?2:0),n(t,e,r,i,a))}function n(t,e,r,i,n){if(!l.isPatternMissing(r.paint["fill-pattern"],t))for(var o=!0,a=0,s=i;a<s.length;a+=1){var u=s[a],c=e.getTile(u),p=c.getBucket(r);p&&(t.enableTileClippingMask(u),n(t,e,r,c,u,p,o),o=!1)}}function o(t,e,r,i,n,o,a){var l=t.gl,u=o.programConfigurations.get(r.id);s("fill",r.paint["fill-pattern"],t,u,r,i,n,a).draw(l,l.TRIANGLES,r.id,o.layoutVertexBuffer,o.indexBuffer,o.segments,u)}function a(t,e,r,i,n,o,a){var l=t.gl,u=o.programConfigurations.get(r.id),c=r.paint["fill-pattern"]&&!r.getPaintProperty("fill-outline-color"),p=s("fillOutline",c,t,u,r,i,n,a);l.uniform2f(p.uniforms.u_world,l.drawingBufferWidth,l.drawingBufferHeight),p.draw(l,l.LINES,r.id,o.layoutVertexBuffer,o.indexBuffer2,o.segments2,u)}function s(t,e,r,i,n,o,a,s){var u,c=r.currentProgram;return e?(u=r.useProgram(t+"Pattern",i),(s||u!==c)&&(i.setUniforms(r.gl,u,n,{zoom:r.transform.zoom}),l.prepare(n.paint["fill-pattern"],r,u)),l.setTile(o,r,u)):(u=r.useProgram(t,i),(s||u!==c)&&i.setUniforms(r.gl,u,n,{zoom:r.transform.zoom})),r.gl.uniformMatrix4fv(u.uniforms.u_matrix,!1,r.translatePosMatrix(a.posMatrix,o,n.paint["fill-translate"],n.paint["fill-translate-anchor"])),u}var l=t("./pattern");e.exports=i},{"./pattern":80}],69:[function(t,e,r){"use strict";function i(t,e,r,i){if("3d"===t.renderPass){var a=t.gl;a.disable(a.STENCIL_TEST),a.enable(a.DEPTH_TEST),t.clearColor(),t.depthMask(!0);for(var s=0;s<i.length;s++)o(t,e,r,i[s])}else"translucent"===t.renderPass&&n(t,r)}function n(t,e){var r=t.prerenderedFrames[e.id];if(r){var i=t.gl,n=t.useProgram("extrusionTexture");i.disable(i.STENCIL_TEST),i.disable(i.DEPTH_TEST),i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,r.texture),i.uniform1f(n.uniforms.u_opacity,e.paint["fill-extrusion-opacity"]),i.uniform1i(n.uniforms.u_image,0);var o=c.create();c.ortho(o,0,t.width,t.height,0,0,1),i.uniformMatrix4fv(n.uniforms.u_matrix,!1,o),i.uniform2f(n.uniforms.u_world,i.drawingBufferWidth,i.drawingBufferHeight),r.vao.bind(i,n,r.buffer),i.drawArrays(i.TRIANGLE_STRIP,0,4),t.viewportFrames.push(r),delete t.prerenderedFrames[e.id]}}function o(t,e,r,i){var n=e.getTile(i),o=n.getBucket(r);if(o){var s=t.gl,u=r.paint["fill-extrusion-pattern"],c=o.programConfigurations.get(r.id),p=t.useProgram(u?"fillExtrusionPattern":"fillExtrusion",c);if(c.setUniforms(s,p,r,{zoom:t.transform.zoom}),u){if(l.isPatternMissing(u,t))return;l.prepare(u,t,p),l.setTile(n,t,p),s.uniform1f(p.uniforms.u_height_factor,-Math.pow(2,i.z)/n.tileSize/8)}t.gl.uniformMatrix4fv(p.uniforms.u_matrix,!1,t.translatePosMatrix(i.posMatrix,n,r.paint["fill-extrusion-translate"],r.paint["fill-extrusion-translate-anchor"])),a(p,t),p.draw(s,s.TRIANGLES,r.id,o.layoutVertexBuffer,o.indexBuffer,o.segments,c)}}function a(t,e){var r=e.gl,i=e.style.light,n=i.calculated.position,o=[n.x,n.y,n.z],a=u.create();"viewport"===i.calculated.anchor&&u.fromRotation(a,-e.transform.angle),p.transformMat3(o,o,a),r.uniform3fv(t.uniforms.u_lightpos,o),r.uniform1f(t.uniforms.u_lightintensity,i.calculated.intensity),r.uniform3fv(t.uniforms.u_lightcolor,i.calculated.color.slice(0,3))}var s=t("@mapbox/gl-matrix"),l=t("./pattern"),u=s.mat3,c=s.mat4,p=s.vec3;e.exports=i},{"./pattern":80,"@mapbox/gl-matrix":1}],70:[function(t,e,r){"use strict";function i(t,e,r,i,a,s,l,u,c){var p,h,f,d,m=e.gl,v=a.paint["line-dasharray"],y=a.paint["line-pattern"];if(u||c){var g=1/o(r,1,e.transform.tileZoom);if(v){p=e.lineAtlas.getDash(v.from,"round"===a.layout["line-cap"]),h=e.lineAtlas.getDash(v.to,"round"===a.layout["line-cap"]);var _=p.width*v.fromScale,x=h.width*v.toScale;m.uniform2f(t.uniforms.u_patternscale_a,g/_,-p.height/2),m.uniform2f(t.uniforms.u_patternscale_b,g/x,-h.height/2),m.uniform1f(t.uniforms.u_sdfgamma,e.lineAtlas.width/(256*Math.min(_,x)*n.devicePixelRatio)/2)}else if(y){if(f=e.imageManager.getPattern(y.from),d=e.imageManager.getPattern(y.to),!f||!d)return;m.uniform2f(t.uniforms.u_pattern_size_a,f.displaySize[0]*y.fromScale/g,d.displaySize[1]),m.uniform2f(t.uniforms.u_pattern_size_b,d.displaySize[0]*y.toScale/g,d.displaySize[1]);var b=e.imageManager.getPixelSize(),w=b.width,T=b.height;m.uniform2fv(t.uniforms.u_texsize,[w,T])}m.uniform2f(t.uniforms.u_gl_units_to_pixels,1/e.transform.pixelsToGLUnits[0],1/e.transform.pixelsToGLUnits[1])}u&&(v?(m.uniform1i(t.uniforms.u_image,0),m.activeTexture(m.TEXTURE0),e.lineAtlas.bind(m),m.uniform1f(t.uniforms.u_tex_y_a,p.y),m.uniform1f(t.uniforms.u_tex_y_b,h.y),m.uniform1f(t.uniforms.u_mix,v.t)):y&&(m.uniform1i(t.uniforms.u_image,0),m.activeTexture(m.TEXTURE0),e.imageManager.bind(m),m.uniform2fv(t.uniforms.u_pattern_tl_a,f.tl),m.uniform2fv(t.uniforms.u_pattern_br_a,f.br),m.uniform2fv(t.uniforms.u_pattern_tl_b,d.tl),m.uniform2fv(t.uniforms.u_pattern_br_b,d.br),m.uniform1f(t.uniforms.u_fade,y.t))),e.enableTileClippingMask(s);var S=e.translatePosMatrix(s.posMatrix,r,a.paint["line-translate"],a.paint["line-translate-anchor"]);m.uniformMatrix4fv(t.uniforms.u_matrix,!1,S),m.uniform1f(t.uniforms.u_ratio,1/o(r,1,e.transform.zoom)),t.draw(m,m.TRIANGLES,a.id,i.layoutVertexBuffer,i.indexBuffer,i.segments,l)}var n=t("../util/browser"),o=t("../source/pixels_to_tile_units");e.exports=function(t,e,r,n){if("translucent"===t.renderPass){t.setDepthSublayer(0),t.depthMask(!1);var o=t.gl;if(o.enable(o.STENCIL_TEST),!(r.paint["line-width"]<=0))for(var a,s=r.paint["line-dasharray"]?"lineSDF":r.paint["line-pattern"]?"linePattern":"line",l=!0,u=0,c=n;u<c.length;u+=1){var p=c[u],h=e.getTile(p),f=h.getBucket(r);if(f){var d=f.programConfigurations.get(r.id),m=t.currentProgram,v=t.useProgram(s,d),y=l||v!==m,g=a!==h.coord.z;y&&d.setUniforms(t.gl,v,r,{zoom:t.transform.zoom}),i(v,t,h,f,r,p,d,y,g),a=h.coord.z,l=!1}}}}},{"../source/pixels_to_tile_units":93,"../util/browser":202}],71:[function(t,e,r){"use strict";function i(t,e,r,i){if("translucent"===t.renderPass){var l=t.gl,c=e.getSource(),p=t.useProgram("raster");l.enable(l.DEPTH_TEST),t.depthMask(!0),l.depthFunc(l.LESS),l.disable(l.STENCIL_TEST),l.uniform1f(p.uniforms.u_brightness_low,r.paint["raster-brightness-min"]),l.uniform1f(p.uniforms.u_brightness_high,r.paint["raster-brightness-max"]),l.uniform1f(p.uniforms.u_saturation_factor,a(r.paint["raster-saturation"])),l.uniform1f(p.uniforms.u_contrast_factor,o(r.paint["raster-contrast"])),l.uniform3fv(p.uniforms.u_spin_weights,n(r.paint["raster-hue-rotate"])),l.uniform1f(p.uniforms.u_buffer_scale,1),l.uniform1i(p.uniforms.u_image0,0),l.uniform1i(p.uniforms.u_image1,1);for(var h=i.length&&i[0].z,f=0,d=i;f<d.length;f+=1){var m=d[f];t.setDepthSublayer(m.z-h);var v=e.getTile(m),y=t.transform.calculatePosMatrix(m,e.getSource().maxzoom);v.registerFadeDuration(t.style.animationLoop,r.paint["raster-fade-duration"]),l.uniformMatrix4fv(p.uniforms.u_matrix,!1,y);var g=e.findLoadedParent(m,0,{}),_=s(v,g,e,r,t.transform),x=void 0,b=void 0;if(l.activeTexture(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,v.texture),l.activeTexture(l.TEXTURE1),g?(l.bindTexture(l.TEXTURE_2D,g.texture),x=Math.pow(2,g.coord.z-v.coord.z),b=[v.coord.x*x%1,v.coord.y*x%1]):l.bindTexture(l.TEXTURE_2D,v.texture),l.uniform2fv(p.uniforms.u_tl_parent,b||[0,0]),l.uniform1f(p.uniforms.u_scale_parent,x||1),l.uniform1f(p.uniforms.u_fade_t,_.mix),l.uniform1f(p.uniforms.u_opacity,_.opacity*r.paint["raster-opacity"]),c instanceof u){var w=c.boundsBuffer;c.boundsVAO.bind(l,p,w),l.drawArrays(l.TRIANGLE_STRIP,0,w.length)}else{var T=t.rasterBoundsBuffer;t.rasterBoundsVAO.bind(l,p,T),l.drawArrays(l.TRIANGLE_STRIP,0,T.length)}}l.depthFunc(l.LEQUAL)}}function n(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}function o(t){return t>0?1/(1-t):1+t}function a(t){return t>0?1-1/(1.001-t):-t}function s(t,e,r,i,n){var o=i.paint["raster-fade-duration"];if(o>0){var a=Date.now(),s=(a-t.timeAdded)/o,u=e?(a-e.timeAdded)/o:-1,c=r.getSource(),p=n.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),h=!e||Math.abs(e.coord.z-p)>Math.abs(t.coord.z-p),f=h&&t.refreshedUponExpiration?1:l.clamp(h?s:1-u,0,1);return t.refreshedUponExpiration&&s>=1&&(t.refreshedUponExpiration=!1),e?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}var l=t("../util/util"),u=t("../source/image_source");e.exports=i},{"../source/image_source":91,"../util/util":223}],72:[function(t,e,r){"use strict";function i(t,e,r,i){if("translucent"===t.renderPass){var o=!(r.layout["text-allow-overlap"]||r.layout["icon-allow-overlap"]||r.layout["text-ignore-placement"]||r.layout["icon-ignore-placement"]),a=t.gl;o?a.disable(a.STENCIL_TEST):a.enable(a.STENCIL_TEST),t.setDepthSublayer(0),t.depthMask(!1),n(t,e,r,i,!1,r.paint["icon-translate"],r.paint["icon-translate-anchor"],r.layout["icon-rotation-alignment"],r.layout["icon-pitch-alignment"],r.layout["icon-keep-upright"]),n(t,e,r,i,!0,r.paint["text-translate"],r.paint["text-translate-anchor"],r.layout["text-rotation-alignment"],r.layout["text-pitch-alignment"],r.layout["text-keep-upright"]),e.map.showCollisionBoxes&&l(t,e,r,i)}}function n(t,e,r,i,n,s,l,p,h,d){var m=t.gl,v=t.transform,y="map"===p,g="map"===h,_=y&&"line"===r.layout["symbol-placement"],x=y&&!g&&!_,b=g;b?m.enable(m.DEPTH_TEST):m.disable(m.DEPTH_TEST);for(var w,T=0,S=i;T<S.length;T+=1){var z=S[T],A=e.getTile(z),C=A.getBucket(r);if(C){var E=n?C.text:C.icon;if(E&&E.segments.get().length){var k=E.programConfigurations.get(r.id),M=n||C.sdfIcons,L=n?C.textSizeData:C.iconSizeData;if(w||(w=t.useProgram(M?"symbolSDF":"symbolIcon",k),k.setUniforms(m,w,r,{zoom:t.transform.zoom}),o(w,t,r,n,x,g,L)),m.activeTexture(m.TEXTURE0),m.uniform1i(w.uniforms.u_texture,0),n)A.glyphAtlasTexture.bind(m.LINEAR,m.CLAMP_TO_EDGE),m.uniform2fv(w.uniforms.u_texsize,A.glyphAtlasTexture.size);else{var I=!r.isLayoutValueFeatureConstant("icon-size")||!r.isLayoutValueZoomConstant("icon-size")||1!==r.getLayoutValue("icon-size",{zoom:v.zoom})||C.iconsNeedLinear,P=g||0!==v.pitch;A.iconAtlasTexture.bind(M||t.options.rotating||t.options.zooming||I||P?m.LINEAR:m.NEAREST,m.CLAMP_TO_EDGE),m.uniform2fv(w.uniforms.u_texsize,A.iconAtlasTexture.size)}t.enableTileClippingMask(z),m.uniformMatrix4fv(w.uniforms.u_matrix,!1,t.translatePosMatrix(z.posMatrix,A,s,l));var R=u(A,1,t.transform.zoom),D=c.getLabelPlaneMatrix(z.posMatrix,g,y,t.transform,R),O=c.getGlCoordMatrix(z.posMatrix,g,y,t.transform,R);m.uniformMatrix4fv(w.uniforms.u_gl_coord_matrix,!1,t.translatePosMatrix(O,A,s,l,!0)),_?(m.uniformMatrix4fv(w.uniforms.u_label_plane_matrix,!1,f),c.updateLineLabels(C,z.posMatrix,t,n,D,O,g,d,R,r)):m.uniformMatrix4fv(w.uniforms.u_label_plane_matrix,!1,D),m.uniform1f(w.uniforms.u_collision_y_stretch,A.collisionTile.yStretch),a(w,k,t,r,A,E,n,M,g)}}}b||m.enable(m.DEPTH_TEST)}function o(t,e,r,i,n,o,a){var s=e.gl,l=e.transform;s.uniform1i(t.uniforms.u_pitch_with_map,o?1:0),s.uniform1f(t.uniforms.u_is_text,i?1:0),s.activeTexture(s.TEXTURE1),e.frameHistory.bind(s),s.uniform1i(t.uniforms.u_fadetexture,1),s.uniform1f(t.uniforms.u_pitch,l.pitch/360*2*Math.PI),s.uniform1i(t.uniforms.u_is_size_zoom_constant,a.isZoomConstant?1:0),s.uniform1i(t.uniforms.u_is_size_feature_constant,a.isFeatureConstant?1:0),s.uniform1f(t.uniforms.u_camera_to_center_distance,l.cameraToCenterDistance);var u=p.evaluateSizeForZoom(a,l,r,i);void 0!==u.uSizeT&&s.uniform1f(t.uniforms.u_size_t,u.uSizeT),void 0!==u.uSize&&s.uniform1f(t.uniforms.u_size,u.uSize),s.uniform1f(t.uniforms.u_aspect_ratio,l.width/l.height),s.uniform1i(t.uniforms.u_rotate_symbol,n?1:0)}function a(t,e,r,i,n,o,a,l,u){var c=r.gl,p=r.transform;if(l){var h=(a?"text":"icon")+"-halo-width",f=!i.isPaintValueFeatureConstant(h)||i.paint[h],d=u?Math.cos(p._pitch)*p.cameraToCenterDistance:1;c.uniform1f(t.uniforms.u_gamma_scale,d),f&&(c.uniform1f(t.uniforms.u_is_halo,1),s(o,i,c,t)),c.uniform1f(t.uniforms.u_is_halo,0)}s(o,i,c,t)}function s(t,e,r,i){i.draw(r,r.TRIANGLES,e.id,t.layoutVertexBuffer,t.indexBuffer,t.segments,t.programConfigurations.get(e.id),t.dynamicLayoutVertexBuffer)}var l=t("./draw_collision_debug"),u=t("../source/pixels_to_tile_units"),c=t("../symbol/projection"),p=t("../symbol/symbol_size"),h=t("@mapbox/gl-matrix").mat4,f=h.identity(new Float32Array(16));e.exports=i},{"../source/pixels_to_tile_units":93,"../symbol/projection":175,"../symbol/symbol_size":178,"./draw_collision_debug":66,"@mapbox/gl-matrix":1}],73:[function(t,e,r){"use strict";var i=function(){this.changeTimes=new Float64Array(256),this.changeOpacities=new Uint8Array(256),this.opacities=new Uint8ClampedArray(256),this.array=new Uint8Array(this.opacities.buffer),this.previousZoom=0,this.firstFrame=!0};i.prototype.record=function(t,e,r){var i=this;this.firstFrame&&(t=0,this.firstFrame=!1),e=Math.floor(10*e);var n;if(e<this.previousZoom)for(n=e+1;n<=this.previousZoom;n++)i.changeTimes[n]=t,i.changeOpacities[n]=i.opacities[n];else for(n=e;n>this.previousZoom;n--)i.changeTimes[n]=t,i.changeOpacities[n]=i.opacities[n];for(n=0;n<256;n++){var o=t-i.changeTimes[n],a=255*(r?o/r:1);i.opacities[n]=n<=e?i.changeOpacities[n]+a:i.changeOpacities[n]-a}this.changed=!0,this.previousZoom=e},i.prototype.isVisible=function(t){return 0!==this.opacities[Math.floor(10*t)]},i.prototype.bind=function(t){this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.changed&&(t.texSubImage2D(t.TEXTURE_2D,0,0,0,256,1,t.ALPHA,t.UNSIGNED_BYTE,this.array),this.changed=!1)):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,256,1,0,t.ALPHA,t.UNSIGNED_BYTE,this.array))},e.exports=i},{}],74:[function(t,e,r){"use strict";function i(t){var e=a.create({width:0,height:0}),r={},i=new n(0,0,{autoResize:!0});for(var o in t){var l=t[o],u=r[o]={};for(var c in l){var p=l[+c];if(p&&0!==p.bitmap.width&&0!==p.bitmap.height){var h=i.packOne(p.bitmap.width+2*s,p.bitmap.height+2*s);a.resize(e,{width:i.w,height:i.h}),a.copy(p.bitmap,e,{x:0,y:0},{x:h.x+s,y:h.y+s},p.bitmap),u[c]={rect:h,metrics:p.metrics}}}}return i.shrink(),a.resize(e,{width:i.w,height:i.h}),{image:e,positions:r}}var n=t("@mapbox/shelf-pack"),o=t("../util/image"),a=o.AlphaImage,s=1;e.exports={makeGlyphAtlas:i}},{"../util/image":213,"@mapbox/shelf-pack":3}],75:[function(t,e,r){"use strict";var i=t("../style/load_glyph_range"),n=t("@mapbox/tiny-sdf"),o=t("../util/is_char_in_unicode_block"),a=t("../util/util"),s=a.asyncAll,l=t("../util/image"),u=l.AlphaImage,c=function(t,e){this.requestTransform=t,this.localIdeographFontFamily=e,this.entries={}};c.prototype.setURL=function(t){this.url=t},c.prototype.getGlyphs=function(t,e){var r=this,n=[];for(var o in t)for(var a=0,l=t[o];a<l.length;a+=1){var u=l[a];n.push({stack:o,id:u})}s(n,function(t,e){var n=t.stack,o=t.id,a=r.entries[n];a||(a=r.entries[n]={glyphs:{},requests:{}});var s=a.glyphs[o];if(void 0!==s)return void e(null,{stack:n,id:o,glyph:s});if(s=r._tinySDF(a,n,o))return void e(null,{stack:n,id:o,glyph:s});var l=Math.floor(o/256);if(256*l>65535)return void e(new Error("glyphs > 65535 not supported"));var u=a.requests[l];u||(u=a.requests[l]=[],i(n,l,r.url,r.requestTransform,function(t,e){if(e)for(var r in e)a.glyphs[+r]=e[+r];for(var i=0,n=u;i<n.length;i+=1)(0,n[i])(t,e);delete a.requests[l]})),u.push(function(t,r){t?e(t):r&&e(null,{stack:n,id:o,glyph:r[o]||null})})},function(t,r){if(t)e(t);else if(r){for(var i={},n=0,o=r;n<o.length;n+=1){var a=o[n],s=a.stack,l=a.id,u=a.glyph;(i[s]||(i[s]={}))[l]=u}e(null,i)}})},c.prototype._tinySDF=function(t,e,r){var i=this.localIdeographFontFamily;if(i&&(o["CJK Unified Ideographs"](r)||o["Hangul Syllables"](r))){var a=t.tinySDF;if(!a){var s="400";/bold/i.test(e)?s="900":/medium/i.test(e)?s="500":/light/i.test(e)&&(s="200"),a=t.tinySDF=new n(24,3,8,.25,i,s)}return{id:r,bitmap:u.create({width:30,height:30},a.draw(String.fromCharCode(r))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},e.exports=c},{"../style/load_glyph_range":152,"../util/image":213,"../util/is_char_in_unicode_block":215,"../util/util":223,"@mapbox/tiny-sdf":4}],76:[function(t,e,r){"use strict";function i(t,e){var r=e.pixelRatio,i={x:t.x+l,y:t.y+l,w:t.w-2*l,h:t.h-2*l};return{pixelRatio:r,textureRect:i,tl:[i.x,i.y],br:[i.x+i.w,i.y+i.h],displaySize:[i.w/r,i.h/r]}}function n(t){var e=s.create({width:0,height:0}),r={},n=new o(0,0,{autoResize:!0});for(var a in t){var u=t[a],c=n.packOne(u.data.width+2*l,u.data.height+2*l);s.resize(e,{width:n.w,height:n.h}),s.copy(u.data,e,{x:0,y:0},{x:c.x+l,y:c.y+l},u.data),r[a]=i(c,u)}return n.shrink(),s.resize(e,{width:n.w,height:n.h}),{image:e,positions:r}}var o=t("@mapbox/shelf-pack"),a=t("../util/image"),s=a.RGBAImage,l=1;e.exports={imagePosition:i,makeImageAtlas:n}},{"../util/image":213,"@mapbox/shelf-pack":3}],77:[function(t,e,r){"use strict";var i=t("@mapbox/shelf-pack"),n=t("../util/image"),o=n.RGBAImage,a=t("./image_atlas"),s=a.imagePosition,l=t("./texture"),u=function(){this.images={},this.loaded=!1,this.requestors=[],this.shelfPack=new i(64,64,{autoResize:!0}),this.patterns={},this.atlasImage=o.create({width:64,height:64}),this.dirty=!0};u.prototype.isLoaded=function(){return this.loaded},u.prototype.setLoaded=function(t){var e=this;if(this.loaded!==t&&(this.loaded=t,t)){for(var r=0,i=e.requestors;r<i.length;r+=1){var n=i[r],o=n.ids,a=n.callback;e._notify(o,a)}this.requestors=[]}},u.prototype.getImage=function(t){return this.images[t]},u.prototype.addImage=function(t,e){this.images[t]=e},u.prototype.removeImage=function(t){delete this.images[t];var e=this.patterns[t];e&&(this.shelfPack.unref(e.bin),delete this.patterns[t])},u.prototype.getImages=function(t,e){var r=this,i=!0;if(!this.isLoaded())for(var n=0,o=t;n<o.length;n+=1){var a=o[n];r.images[a]||(i=!1)}this.isLoaded()||i?this._notify(t,e):this.requestors.push({ids:t,callback:e})},u.prototype._notify=function(t,e){for(var r=this,i={},n=0,o=t;n<o.length;n+=1){var a=o[n],s=r.images[a];s&&(i[a]=s)}e(null,i)},u.prototype.getPixelSize=function(){return{width:this.shelfPack.w,height:this.shelfPack.h}},u.prototype.getPattern=function(t){var e=this.patterns[t];if(e)return e.position;var r=this.getImage(t);if(!r)return null;var i=r.data.width+2,n=r.data.height+2,a=this.shelfPack.packOne(i,n);if(!a)return null;o.resize(this.atlasImage,this.getPixelSize());var l=r.data,u=this.atlasImage,c=a.x+1,p=a.y+1,h=l.width,f=l.height;o.copy(l,u,{x:0,y:0},{x:c,y:p},{width:h,height:f}),o.copy(l,u,{x:0,y:f-1},{x:c,y:p-1},{width:h,height:1}),o.copy(l,u,{x:0,y:0},{x:c,y:p+f},{width:h,height:1}),o.copy(l,u,{x:h-1,y:0},{x:c-1,y:p},{width:1,height:f}),o.copy(l,u,{x:0,y:0},{x:c+h,y:p},{width:1,height:f}),this.dirty=!0;var d=s(a,r);return this.patterns[t]={bin:a,position:d},d},u.prototype.bind=function(t){this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new l(t,this.atlasImage,t.RGBA),this.atlasTexture.bind(t.LINEAR,t.CLAMP_TO_EDGE)},e.exports=u},{"../util/image":213,"./image_atlas":76,"./texture":83,"@mapbox/shelf-pack":3}],78:[function(t,e,r){"use strict";var i=t("../util/util"),n=function(t,e){this.width=t,this.height=e,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};n.prototype.getDash=function(t,e){var r=t.join(",")+String(e);return this.positions[r]||(this.positions[r]=this.addDash(t,e)),this.positions[r]},n.prototype.addDash=function(t,e){var r=this,n=e?7:0,o=2*n+1;if(this.nextRow+o>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var a=0,s=0;s<t.length;s++)a+=t[s];for(var l=this.width/a,u=l/2,c=t.length%2==1,p=-n;p<=n;p++)for(var h=r.nextRow+n+p,f=r.width*h,d=c?-t[t.length-1]:0,m=t[0],v=1,y=0;y<this.width;y++){for(;m<y/l;)d=m,m+=t[v],c&&v===t.length-1&&(m+=t[0]),v++;var g=Math.abs(y-d*l),_=Math.abs(y-m*l),x=Math.min(g,_),b=v%2==1,w=void 0;if(e){var T=n?p/n*(u+1):0;if(b){var S=u-Math.abs(T);w=Math.sqrt(x*x+S*S)}else w=u-Math.sqrt(x*x+T*T)}else w=(b?1:-1)*x;r.data[3+4*(f+y)]=Math.max(0,Math.min(255,w+128))}var z={y:(this.nextRow+n+.5)/this.height,height:2*n/this.height,width:a};return this.nextRow+=o,this.dirty=!0,z},n.prototype.bind=function(t){this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.RGBA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,this.data))},e.exports=n},{"../util/util":223}],79:[function(t,e,r){"use strict";var i=t("../util/browser"),n=t("@mapbox/gl-matrix").mat4,o=t("./frame_history"),a=t("../source/source_cache"),s=t("../data/extent"),l=t("../source/pixels_to_tile_units"),u=t("../util/util"),c=t("../gl/vertex_buffer"),p=t("./vertex_array_object"),h=t("../data/raster_bounds_array"),f=t("../data/pos_array"),d=t("../data/program_configuration"),m=d.ProgramConfiguration,v=t("../shaders"),y=t("./program"),g=t("./render_texture"),_={symbol:t("./draw_symbol"),circle:t("./draw_circle"),line:t("./draw_line"),fill:t("./draw_fill"),"fill-extrusion":t("./draw_fill_extrusion"),raster:t("./draw_raster"),background:t("./draw_background"),debug:t("./draw_debug")},x=function(t,e){this.gl=t,this.transform=e,this._tileTextures={},this.prerenderedFrames={},this.viewportFrames=[],this.frameHistory=new o,this.setup(),this.numSublayers=a.maxUnderzooming+a.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.lineWidthRange=t.getParameter(t.ALIASED_LINE_WIDTH_RANGE),this.basicFillProgramConfiguration=m.createBasicFill(),this.emptyProgramConfiguration=new m};x.prototype.resize=function(t,e){var r=this,n=this.gl;this.width=t*i.devicePixelRatio,this.height=e*i.devicePixelRatio,n.viewport(0,0,this.width,this.height);for(var o=0,a=r.viewportFrames;o<a.length;o+=1){var s=a[o];r.gl.deleteTexture(s.texture),r.gl.deleteFramebuffer(s.fbo)}this.viewportFrames=[],this.depthRbo&&(this.gl.deleteRenderbuffer(this.depthRbo),this.depthRbo=null)},x.prototype.setup=function(){var t=this.gl;t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),t.enable(t.STENCIL_TEST),t.enable(t.DEPTH_TEST),t.depthFunc(t.LEQUAL),this._depthMask=!1,t.depthMask(!1);var e=new f;e.emplaceBack(0,0),e.emplaceBack(s,0),e.emplaceBack(0,s),e.emplaceBack(s,s),this.tileExtentBuffer=new c(t,e),this.tileExtentVAO=new p,this.tileExtentPatternVAO=new p;var r=new f;r.emplaceBack(0,0),r.emplaceBack(s,0),r.emplaceBack(s,s),r.emplaceBack(0,s),r.emplaceBack(0,0),this.debugBuffer=new c(t,r),this.debugVAO=new p;var i=new h;i.emplaceBack(0,0,0,0),i.emplaceBack(s,0,s,0),i.emplaceBack(0,s,0,s),i.emplaceBack(s,s,s,s),this.rasterBoundsBuffer=new c(t,i),this.rasterBoundsVAO=new p,this.extTextureFilterAnisotropic=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT))},x.prototype.clearColor=function(){var t=this.gl;t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT)},x.prototype.clearStencil=function(){var t=this.gl;t.clearStencil(0),t.stencilMask(255),t.clear(t.STENCIL_BUFFER_BIT)},x.prototype.clearDepth=function(){var t=this.gl;t.clearDepth(1),this.depthMask(!0),t.clear(t.DEPTH_BUFFER_BIT)},x.prototype._renderTileClippingMasks=function(t){var e=this,r=this.gl;r.colorMask(!1,!1,!1,!1),this.depthMask(!1),r.disable(r.DEPTH_TEST),r.enable(r.STENCIL_TEST),r.stencilMask(255),r.stencilOp(r.KEEP,r.KEEP,r.REPLACE);var i=1;this._tileClippingMaskIDs={};for(var n=0,o=t;n<o.length;n+=1){var a=o[n],s=e._tileClippingMaskIDs[a.id]=i++;r.stencilFunc(r.ALWAYS,s,255);var l=e.useProgram("fill",e.basicFillProgramConfiguration);r.uniformMatrix4fv(l.uniforms.u_matrix,!1,a.posMatrix),e.tileExtentVAO.bind(r,l,e.tileExtentBuffer),r.drawArrays(r.TRIANGLE_STRIP,0,e.tileExtentBuffer.length)}r.stencilMask(0),r.colorMask(!0,!0,!0,!0),this.depthMask(!0),r.enable(r.DEPTH_TEST)},x.prototype.enableTileClippingMask=function(t){var e=this.gl;e.stencilFunc(e.EQUAL,this._tileClippingMaskIDs[t.id],255)},x.prototype.render=function(t,e){var r=this;this.style=t,this.options=e,this.lineAtlas=t.lineAtlas,this.imageManager=t.imageManager,this.glyphManager=t.glyphManager,this.frameHistory.record(Date.now(),this.transform.zoom,t.getTransition().duration);for(var i in r.style.sourceCaches){var n=r.style.sourceCaches[i];n.used&&n.prepare(r.gl)}var o=this.style._order;this.renderPass="3d";for(var a,s=!0,l=[],u=0;u<o.length;u++){var c=r.style._layers[o[u]];if(c.has3DPass()&&!c.isHidden(r.transform.zoom)&&(c.source!==(a&&a.id)&&(a=r.style.sourceCaches[c.source],l=[],a&&(r.clearStencil(),l=a.getVisibleCoordinates()),l.reverse()),l.length)){r._setup3DRenderbuffer();var p=r.viewportFrames.pop()||new g(r);p.bindWithDepth(r.depthRbo),s&&(r.clearDepth(),s=!1),r.renderLayer(r,a,c,l),p.unbind(),r.prerenderedFrames[c.id]=p}}this.clearColor(),this.clearDepth(),this.showOverdrawInspector(e.showOverdrawInspector),this.depthRange=(t._order.length+2)*this.numSublayers*this.depthEpsilon,this.renderPass="opaque";var h,f=[];for(this.currentLayer=o.length-1,this._showOverdrawInspector||this.gl.disable(this.gl.BLEND),this.currentLayer;this.currentLayer>=0;this.currentLayer--){var d=r.style._layers[o[r.currentLayer]];d.source!==(h&&h.id)&&(h=r.style.sourceCaches[d.source],f=[],h&&(r.clearStencil(),f=h.getVisibleCoordinates(),h.getSource().isTileClipped&&r._renderTileClippingMasks(f))),r.renderLayer(r,h,d,f)}this.renderPass="translucent";var m,v=[];for(this.gl.enable(this.gl.BLEND),this.currentLayer=0,this.currentLayer;this.currentLayer<o.length;this.currentLayer++){var y=r.style._layers[o[r.currentLayer]];y.source!==(m&&m.id)&&(m=r.style.sourceCaches[y.source],v=[],m&&(r.clearStencil(),v=m.getVisibleCoordinates(),m.getSource().isTileClipped&&r._renderTileClippingMasks(v)),v.reverse()),r.renderLayer(r,m,y,v)}if(this.options.showTileBoundaries){var x=this.style.sourceCaches[Object.keys(this.style.sourceCaches)[0]];x&&_.debug(this,x,x.getVisibleCoordinates())}},x.prototype._setup3DRenderbuffer=function(){if(!this.depthRbo){var t=this.gl;this.depthRbo=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this.depthRbo),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,this.width,this.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}this.depthRboAttached=!0},x.prototype.depthMask=function(t){t!==this._depthMask&&(this._depthMask=t,this.gl.depthMask(t))},x.prototype.renderLayer=function(t,e,r,i){r.isHidden(this.transform.zoom)||("background"===r.type||i.length)&&(this.id=r.id,_[r.type](t,e,r,i))},x.prototype.setDepthSublayer=function(t){var e=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon,r=e-1+this.depthRange;this.gl.depthRange(r,e)},x.prototype.translatePosMatrix=function(t,e,r,i,o){if(!r[0]&&!r[1])return t;var a=o?"map"===i?this.transform.angle:0:"viewport"===i?-this.transform.angle:0;if(a){var s=Math.sin(a),u=Math.cos(a);r=[r[0]*u-r[1]*s,r[0]*s+r[1]*u]}var c=[o?r[0]:l(e,r[0],this.transform.zoom),o?r[1]:l(e,r[1],this.transform.zoom),0],p=new Float32Array(16);return n.translate(p,t,c),p},x.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size];e?e.push(t):this._tileTextures[t.size]=[t]},x.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&&e.length>0?e.pop():null},x.prototype.lineWidth=function(t){this.gl.lineWidth(u.clamp(t,this.lineWidthRange[0],this.lineWidthRange[1]))},x.prototype.showOverdrawInspector=function(t){if(t||this._showOverdrawInspector){this._showOverdrawInspector=t;var e=this.gl;t?(e.blendFunc(e.CONSTANT_COLOR,e.ONE),e.blendColor(1/8,1/8,1/8,0),e.clearColor(0,0,0,1),e.clear(e.COLOR_BUFFER_BIT)):e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA)}},x.prototype._createProgramCached=function(t,e){this.cache=this.cache||{};var r=""+t+(e.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new y(this.gl,v[t],e,this._showOverdrawInspector)),this.cache[r]},x.prototype.useProgram=function(t,e){var r=this.gl,i=this._createProgramCached(t,e||this.emptyProgramConfiguration);return this.currentProgram!==i&&(r.useProgram(i.program),this.currentProgram=i),i},e.exports=x},{"../data/extent":48,"../data/pos_array":52,"../data/program_configuration":53,"../data/raster_bounds_array":54,"../gl/vertex_buffer":62,"../shaders":86,"../source/pixels_to_tile_units":93,"../source/source_cache":98,"../util/browser":202,"../util/util":223,"./draw_background":64,"./draw_circle":65,"./draw_debug":67,"./draw_fill":68,"./draw_fill_extrusion":69,"./draw_line":70,"./draw_raster":71,"./draw_symbol":72,"./frame_history":73,"./program":81,"./render_texture":82,"./vertex_array_object":84,"@mapbox/gl-matrix":1}],80:[function(t,e,r){"use strict";var i=t("../source/pixels_to_tile_units");r.isPatternMissing=function(t,e){if(!t)return!1;var r=e.imageManager.getPattern(t.from),i=e.imageManager.getPattern(t.to);return!r||!i},r.prepare=function(t,e,r){var i=e.gl,n=e.imageManager.getPattern(t.from),o=e.imageManager.getPattern(t.to);i.uniform1i(r.uniforms.u_image,0),i.uniform2fv(r.uniforms.u_pattern_tl_a,n.tl),i.uniform2fv(r.uniforms.u_pattern_br_a,n.br),i.uniform2fv(r.uniforms.u_pattern_tl_b,o.tl),i.uniform2fv(r.uniforms.u_pattern_br_b,o.br);var a=e.imageManager.getPixelSize(),s=a.width,l=a.height;i.uniform2fv(r.uniforms.u_texsize,[s,l]),i.uniform1f(r.uniforms.u_mix,t.t),i.uniform2fv(r.uniforms.u_pattern_size_a,n.displaySize),i.uniform2fv(r.uniforms.u_pattern_size_b,o.displaySize),i.uniform1f(r.uniforms.u_scale_a,t.fromScale),i.uniform1f(r.uniforms.u_scale_b,t.toScale),i.activeTexture(i.TEXTURE0),e.imageManager.bind(i)},r.setTile=function(t,e,r){var n=e.gl;n.uniform1f(r.uniforms.u_tile_units_to_pixels,1/i(t,1,e.transform.tileZoom));var o=Math.pow(2,t.coord.z),a=t.tileSize*Math.pow(2,e.transform.tileZoom)/o,s=a*(t.coord.x+t.coord.w*o),l=a*t.coord.y;n.uniform2f(r.uniforms.u_pixel_coord_upper,s>>16,l>>16),n.uniform2f(r.uniforms.u_pixel_coord_lower,65535&s,65535&l)}},{"../source/pixels_to_tile_units":93}],81:[function(t,e,r){"use strict";var i=t("../util/browser"),n=t("../shaders"),o=t("../data/program_configuration"),a=(o.ProgramConfiguration,t("./vertex_array_object")),s=function(t,e,r,o){var a=this;this.gl=t,this.program=t.createProgram();var s=r.defines().concat("#define DEVICE_PIXEL_RATIO "+i.devicePixelRatio.toFixed(1));o&&s.push("#define OVERDRAW_INSPECTOR;");var l=s.concat(n.prelude.fragmentSource,e.fragmentSource).join("\n"),u=s.concat(n.prelude.vertexSource,e.vertexSource).join("\n"),c=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(c,l),t.compileShader(c),t.attachShader(this.program,c);var p=t.createShader(t.VERTEX_SHADER);t.shaderSource(p,u),t.compileShader(p),t.attachShader(this.program,p);for(var h=r.interface?r.interface.layoutAttributes:[],f=0;f<h.length;f++)t.bindAttribLocation(a.program,f,h[f].name);t.linkProgram(this.program),this.numAttributes=t.getProgramParameter(this.program,t.ACTIVE_ATTRIBUTES),this.attributes={},this.uniforms={};for(var d=0;d<this.numAttributes;d++){var m=t.getActiveAttrib(a.program,d);m&&(a.attributes[m.name]=t.getAttribLocation(a.program,m.name))}for(var v=t.getProgramParameter(this.program,t.ACTIVE_UNIFORMS),y=0;y<v;y++){var g=t.getActiveUniform(a.program,y);g&&(a.uniforms[g.name]=t.getUniformLocation(a.program,g.name))}};s.prototype.draw=function(t,e,r,i,n,o,s,l){for(var u,c=this,p=(u={},u[t.LINES]=2,u[t.TRIANGLES]=3,u)[e],h=0,f=o.get();h<f.length;h+=1){var d=f[h],m=d.vaos||(d.vaos={});(m[r]||(m[r]=new a)).bind(t,c,i,n,s&&s.paintVertexBuffer,d.vertexOffset,l),t.drawElements(e,d.primitiveLength*p,t.UNSIGNED_SHORT,d.primitiveOffset*p*2)}},e.exports=s},{"../data/program_configuration":53,"../shaders":86,"../util/browser":202,"./vertex_array_object":84}],82:[function(t,e,r){"use strict";var i=t("../gl/vertex_buffer"),n=t("./vertex_array_object"),o=t("../data/pos_array"),a=function(t){var e=this.gl=t.gl,r=this.texture=e.createTexture();e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,t.width,t.height,0,e.RGBA,e.UNSIGNED_BYTE,null),e.bindTexture(e.TEXTURE_2D,null);var a=this.fbo=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,a),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,r,0);var s=new o;s.emplaceBack(0,0),s.emplaceBack(1,0),s.emplaceBack(0,1),s.emplaceBack(1,1),this.buffer=new i(e,s),this.vao=new n};a.prototype.bindWithDepth=function(t){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,this.fbo),this.attachedRbo!==t&&(e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.attachedRbo=t)},a.prototype.unbind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null)},e.exports=a},{"../data/pos_array":52,"../gl/vertex_buffer":62,"./vertex_array_object":84}],83:[function(t,e,r){"use strict";var i=function(t,e,r){this.gl=t;var i=e.width,n=e.height;this.size=[i,n],this.format=r,this.texture=t.createTexture(),this.update(e)};i.prototype.update=function(t){var e=t.width,r=t.height,i=t.data;this.size=[e,r];var n=this,o=n.gl;o.bindTexture(o.TEXTURE_2D,this.texture),o.pixelStorei(o.UNPACK_ALIGNMENT,1),this.format===o.RGBA&&o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),o.texImage2D(o.TEXTURE_2D,0,this.format,e,r,0,this.format,o.UNSIGNED_BYTE,i)},i.prototype.bind=function(t,e){var r=this,i=r.gl;i.bindTexture(i.TEXTURE_2D,this.texture),t!==this.filter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,t),this.filter=t),e!==this.wrap&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,e),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,e),this.wrap=e)},i.prototype.destroy=function(){this.gl.deleteTexture(this.texture),this.texture=null},e.exports=i},{}],84:[function(t,e,r){"use strict";var i=function(){this.boundProgram=null,this.boundVertexBuffer=null,this.boundVertexBuffer2=null,this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};i.prototype.bind=function(t,e,r,i,n,o,a){void 0===t.extVertexArrayObject&&(t.extVertexArrayObject=t.getExtension("OES_vertex_array_object"));var s=!this.vao||this.boundProgram!==e||this.boundVertexBuffer!==r||this.boundVertexBuffer2!==n||this.boundIndexBuffer!==i||this.boundVertexOffset!==o||this.boundDynamicVertexBuffer!==a;!t.extVertexArrayObject||s?(this.freshBind(t,e,r,i,n,o,a),this.gl=t):(t.extVertexArrayObject.bindVertexArrayOES(this.vao),a&&a.bind())},i.prototype.freshBind=function(t,e,r,i,n,o,a){var s,l=e.numAttributes;if(t.extVertexArrayObject)this.vao&&this.destroy(),this.vao=t.extVertexArrayObject.createVertexArrayOES(),t.extVertexArrayObject.bindVertexArrayOES(this.vao),s=0,this.boundProgram=e,this.boundVertexBuffer=r,this.boundVertexBuffer2=n,this.boundIndexBuffer=i,this.boundVertexOffset=o,this.boundDynamicVertexBuffer=a;else{s=t.currentNumAttributes||0;for(var u=l;u<s;u++)t.disableVertexAttribArray(u)}r.enableAttributes(t,e),n&&n.enableAttributes(t,e),a&&a.enableAttributes(t,e),r.bind(),r.setVertexAttribPointers(t,e,o),n&&(n.bind(),n.setVertexAttribPointers(t,e,o)),a&&(a.bind(),a.setVertexAttribPointers(t,e,o)),i&&i.bind(),t.currentNumAttributes=l},i.prototype.destroy=function(){this.vao&&(this.gl.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)},e.exports=i},{}],85:[function(t,e,r){"use strict";var i=t("../util/util");r.packUint8ToFloat=function(t,e){return t=i.clamp(Math.floor(t),0,255),e=i.clamp(Math.floor(e),0,255),256*t+e}},{"../util/util":223}],86:[function(t,e,r){"use strict";var i={prelude:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n\n// Unpack a pair of values that have been packed into a single float.\n// The packed values are assumed to be 8-bit unsigned integers, and are\n// packed like so:\n// packedValue = floor(input[0]) * 256 + input[1],\nvec2 unpack_float(const float packedValue) {\n int packedIntValue = int(packedValue);\n int v0 = packedIntValue / 256;\n return vec2(v0, packedIntValue - v0 * 256);\n}\n\n\n// To minimize the number of attributes needed, we encode a 4-component\n// color into a pair of floats (i.e. a vec2) as follows:\n// [ floor(color.r * 255) * 256 + color.g * 255,\n// floor(color.b * 255) * 256 + color.g * 255 ]\nvec4 decode_color(const vec2 encodedColor) {\n return vec4(\n unpack_float(encodedColor[0]) / 255.0,\n unpack_float(encodedColor[1]) / 255.0\n );\n}\n\n// Unpack a pair of paint values and interpolate between them.\nfloat unpack_mix_vec2(const vec2 packedValue, const float t) {\n return mix(packedValue[0], packedValue[1], t);\n}\n\n// Unpack a pair of paint values and interpolate between them.\nvec4 unpack_mix_vec4(const vec4 packedColors, const float t) {\n vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));\n vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));\n return mix(minColor, maxColor, t);\n}\n\n// The offset depends on how many pixels are between the world origin and the edge of the tile:\n// vec2 offset = mod(pixel_coord, size)\n//\n// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile.\n// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that.\n//\n// The pixel_coord is passed in as two 16 bit values:\n// pixel_coord_upper = floor(pixel_coord / 2^16)\n// pixel_coord_lower = mod(pixel_coord, 2^16)\n//\n// The offset is calculated in a series of steps that should preserve this precision:\nvec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,\n const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {\n\n vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);\n return (tile_units_to_pixels * pos + offset) / pattern_size;\n}\n"},circle:{fragmentSource:"#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\nvarying vec3 v_data;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize mediump float radius\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize highp vec4 stroke_color\n #pragma mapbox: initialize mediump float stroke_width\n #pragma mapbox: initialize lowp float stroke_opacity\n\n vec2 extrude = v_data.xy;\n float extrude_length = length(extrude);\n\n lowp float antialiasblur = v_data.z;\n float antialiased_blur = -max(blur, antialiasblur);\n\n float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0);\n\n float color_t = stroke_width < 0.01 ? 0.0 : smoothstep(\n antialiased_blur,\n 0.0,\n extrude_length - radius / (radius + stroke_width)\n );\n\n gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform bool u_scale_with_map;\nuniform bool u_pitch_with_map;\nuniform vec2 u_extrude_scale;\nuniform highp float u_camera_to_center_distance;\n\nattribute vec2 a_pos;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\nvarying vec3 v_data;\n\nvoid main(void) {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize mediump float radius\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize highp vec4 stroke_color\n #pragma mapbox: initialize mediump float stroke_width\n #pragma mapbox: initialize lowp float stroke_opacity\n\n // unencode the extrusion vector that we snuck into the a_pos vector\n vec2 extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n // in extrusion data\n vec2 circle_center = floor(a_pos * 0.5);\n if (u_pitch_with_map) {\n vec2 corner_position = circle_center;\n if (u_scale_with_map) {\n corner_position += extrude * (radius + stroke_width) * u_extrude_scale;\n } else {\n // Pitching the circle with the map effectively scales it with the map\n // To counteract the effect for pitch-scale: viewport, we rescale the\n // whole circle based on the pitch scaling effect at its central point\n vec4 projected_center = u_matrix * vec4(circle_center, 0, 1);\n corner_position += extrude * (radius + stroke_width) * u_extrude_scale * (projected_center.w / u_camera_to_center_distance);\n }\n\n gl_Position = u_matrix * vec4(corner_position, 0, 1);\n } else {\n gl_Position = u_matrix * vec4(circle_center, 0, 1);\n\n if (u_scale_with_map) {\n gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * u_camera_to_center_distance;\n } else {\n gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * gl_Position.w;\n }\n }\n\n // This is a minimum blur distance that serves as a faux-antialiasing for\n // the circle. since blur is a ratio of the circle's size and the intent is\n // to keep the blur at roughly 1px, the two are inversely related.\n lowp float antialiasblur = 1.0 / DEVICE_PIXEL_RATIO / (radius + stroke_width);\n\n v_data = vec3(extrude.x, extrude.y, antialiasblur);\n}\n"},collisionBox:{fragmentSource:"uniform float u_zoom;\n// u_maxzoom is derived from the maximum scale considered by the CollisionTile\n// Labels with placement zoom greater than this value will not be placed,\n// regardless of perspective effects.\nuniform float u_maxzoom;\nuniform sampler2D u_fadetexture;\n\n// v_max_zoom is a collision-box-specific value that controls when line-following\n// collision boxes are used.\nvarying float v_max_zoom;\nvarying float v_placement_zoom;\nvarying float v_perspective_zoom_adjust;\nvarying vec2 v_fade_tex;\n\nvoid main() {\n\n float alpha = 0.5;\n\n // Green = no collisions, label is showing\n gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0) * alpha;\n\n // Red = collision, label hidden\n if (texture2D(u_fadetexture, v_fade_tex).a < 1.0) {\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n }\n\n // Faded black = this collision box is not used at this zoom (for curved labels)\n if (u_zoom >= v_max_zoom + v_perspective_zoom_adjust) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0) * alpha * 0.25;\n }\n\n // Faded blue = the placement scale for this label is beyond the CollisionTile\n // max scale, so it's impossible for this label to show without collision detection\n // being run again (the label's glyphs haven't even been added to the symbol bucket)\n if (v_placement_zoom >= u_maxzoom) {\n gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0) * alpha * 0.2;\n }\n}\n",vertexSource:"attribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_data;\n\nuniform mat4 u_matrix;\nuniform float u_scale;\nuniform float u_pitch;\nuniform float u_collision_y_stretch;\nuniform float u_camera_to_center_distance;\n\nvarying float v_max_zoom;\nvarying float v_placement_zoom;\nvarying float v_perspective_zoom_adjust;\nvarying vec2 v_fade_tex;\n\nvoid main() {\n vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n highp float collision_perspective_ratio = 1.0 + 0.5 * ((camera_to_anchor_distance / u_camera_to_center_distance) - 1.0);\n\n highp float incidence_stretch = camera_to_anchor_distance / (u_camera_to_center_distance * cos(u_pitch));\n highp float collision_adjustment = max(1.0, incidence_stretch / u_collision_y_stretch);\n\n gl_Position = u_matrix * vec4(a_pos + a_extrude * collision_perspective_ratio * collision_adjustment / u_scale, 0.0, 1.0);\n\n v_max_zoom = a_data.x;\n v_placement_zoom = a_data.y;\n\n v_perspective_zoom_adjust = floor(log2(collision_perspective_ratio * collision_adjustment) * 10.0);\n v_fade_tex = vec2((v_placement_zoom + v_perspective_zoom_adjust) / 255.0, 0.0);\n}\n"},debug:{fragmentSource:"uniform highp vec4 u_color;\n\nvoid main() {\n gl_FragColor = u_color;\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n // We are using Int16 for texture position coordinates to give us enough precision for\n // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer\n // as an arbitrarily high number to preserve adequate precision when rendering.\n // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates,\n // so math for modifying either is consistent.\n gl_Position = u_matrix * vec4(a_pos, step(8192.0, a_pos.x), 1);\n}\n"},fill:{fragmentSource:"#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float opacity\n\n gl_FragColor = color * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},fillOutline:{fragmentSource:"#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_pos;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n gl_FragColor = outline_color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos;\n\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},fillOutlinePattern:{fragmentSource:"uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n // find distance to outline for alpha interpolation\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n\n\n gl_FragColor = mix(color1, color2, u_mix) * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_world;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},fillPattern:{fragmentSource:"uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n gl_FragColor = mix(color1, color2, u_mix) * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n}\n"},fillExtrusion:{fragmentSource:"varying vec4 v_color;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define highp vec4 color\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n #pragma mapbox: initialize highp vec4 color\n\n gl_FragColor = v_color;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\n\nattribute vec2 a_pos;\nattribute vec3 a_normal;\nattribute float a_edgedistance;\n\nvarying vec4 v_color;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\n#pragma mapbox: define highp vec4 color\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n #pragma mapbox: initialize highp vec4 color\n\n base = max(0.0, base);\n height = max(0.0, height);\n\n float ed = a_edgedistance; // use each attrib in order to not trip a VAO assert\n float t = mod(a_normal.x, 2.0);\n\n gl_Position = u_matrix * vec4(a_pos, t > 0.0 ? height : base, 1);\n\n // Relative luminance (how dark/bright is the surface color?)\n float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722;\n\n v_color = vec4(0.0, 0.0, 0.0, 1.0);\n\n // Add slight ambient lighting so no extrusions are totally black\n vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0);\n color += ambientlight;\n\n // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray\n float directional = clamp(dot(a_normal / 16384.0, u_lightpos), 0.0, 1.0);\n\n // Adjust directional so that\n // the range of values for highlight/shading is narrower\n // with lower light intensity\n // and with lighter/brighter surface colors\n directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional);\n\n // Add gradient along z axis of side surfaces\n if (a_normal.y != 0.0) {\n directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\n }\n\n // Assign final color based on surface + ambient light color, diffuse light directional, and light color\n // with lower bounds adjusted to hue of light\n // so that shading is tinted with the complementary (opposite) color to the light color\n v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);\n v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);\n v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);\n}\n"},fillExtrusionPattern:{fragmentSource:"uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n vec4 mixedColor = mix(color1, color2, u_mix);\n\n gl_FragColor = mixedColor * v_lighting;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\nuniform float u_height_factor;\n\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\n\nattribute vec2 a_pos;\nattribute vec3 a_normal;\nattribute float a_edgedistance;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\nvarying float v_directional;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n\n base = max(0.0, base);\n height = max(0.0, height);\n\n float t = mod(a_normal.x, 2.0);\n float z = t > 0.0 ? height : base;\n\n gl_Position = u_matrix * vec4(a_pos, z, 1);\n\n vec2 pos = a_normal.x == 1.0 && a_normal.y == 0.0 && a_normal.z == 16384.0\n ? a_pos // extrusion top\n : vec2(a_edgedistance, z * u_height_factor); // extrusion side\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, pos);\n\n v_lighting = vec4(0.0, 0.0, 0.0, 1.0);\n float directional = clamp(dot(a_normal / 16383.0, u_lightpos), 0.0, 1.0);\n directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional);\n\n if (a_normal.y != 0.0) {\n directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\n }\n\n v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));\n}\n"},extrusionTexture:{fragmentSource:"uniform sampler2D u_image;\nuniform float u_opacity;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_FragColor = texture2D(u_image, v_pos) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(0.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_world;\nattribute vec2 a_pos;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\n\n v_pos.x = a_pos.x;\n v_pos.y = 1.0 - a_pos.y;\n}\n"},line:{fragmentSource:"#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_width2;\nvarying vec2 v_normal;\nvarying float v_gamma_scale;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float width\n\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n\n vec2 pos = a_pos_normal.xy;\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = a_pos_normal.zw;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_width2 = vec2(outset, inset);\n}\n"},linePattern:{fragmentSource:"uniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_fade;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n float x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);\n float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);\n float y_a = 0.5 + (v_normal.y * v_width2.s / u_pattern_size_a.y);\n float y_b = 0.5 + (v_normal.y * v_width2.s / u_pattern_size_b.y);\n vec2 pos_a = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, vec2(x_a, y_a));\n vec2 pos_b = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, vec2(x_b, y_b));\n\n vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\n\n gl_FragColor = color * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize mediump float width\n\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n vec2 pos = a_pos_normal.xy;\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = a_pos_normal.zw;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_linesofar = a_linesofar;\n v_width2 = vec2(outset, inset);\n}\n"},lineSDF:{fragmentSource:"\nuniform sampler2D u_image;\nuniform float u_sdfgamma;\nuniform float u_mix;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize lowp float floorwidth\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n float sdfdist_a = texture2D(u_image, v_tex_a).a;\n float sdfdist_b = texture2D(u_image, v_tex_b).a;\n float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\n alpha *= smoothstep(0.5 - u_sdfgamma / floorwidth, 0.5 + u_sdfgamma / floorwidth, sdfdist);\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_patternscale_a;\nuniform float u_tex_y_a;\nuniform vec2 u_patternscale_b;\nuniform float u_tex_y_b;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize lowp float floorwidth\n\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n vec2 pos = a_pos_normal.xy;\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = a_pos_normal.zw;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist =outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x / floorwidth, normal.y * u_patternscale_a.y + u_tex_y_a);\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x / floorwidth, normal.y * u_patternscale_b.y + u_tex_y_b);\n\n v_width2 = vec2(outset, inset);\n}\n"},raster:{fragmentSource:"uniform float u_fade_t;\nuniform float u_opacity;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nuniform float u_brightness_low;\nuniform float u_brightness_high;\n\nuniform float u_saturation_factor;\nuniform float u_contrast_factor;\nuniform vec3 u_spin_weights;\n\nvoid main() {\n\n // read and cross-fade colors from the main and parent tiles\n vec4 color0 = texture2D(u_image0, v_pos0);\n vec4 color1 = texture2D(u_image1, v_pos1);\n if (color0.a > 0.0) {\n color0.rgb = color0.rgb / color0.a;\n }\n if (color1.a > 0.0) {\n color1.rgb = color1.rgb / color1.a;\n }\n vec4 color = mix(color0, color1, u_fade_t);\n color.a *= u_opacity;\n vec3 rgb = color.rgb;\n\n // spin\n rgb = vec3(\n dot(rgb, u_spin_weights.xyz),\n dot(rgb, u_spin_weights.zxy),\n dot(rgb, u_spin_weights.yzx));\n\n // saturation\n float average = (color.r + color.g + color.b) / 3.0;\n rgb += (average - rgb) * u_saturation_factor;\n\n // contrast\n rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\n\n // brightness\n vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\n vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\n\n gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_tl_parent;\nuniform float u_scale_parent;\nuniform float u_buffer_scale;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n // We are using Int16 for texture position coordinates to give us enough precision for\n // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer\n // as an arbitrarily high number to preserve adequate precision when rendering.\n // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates,\n // so math for modifying either is consistent.\n v_pos0 = (((a_texture_pos / 8192.0) - 0.5) / u_buffer_scale ) + 0.5;\n v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\n}\n"},symbolIcon:{fragmentSource:"uniform sampler2D u_texture;\nuniform sampler2D u_fadetexture;\n\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n lowp float alpha = texture2D(u_fadetexture, v_fade_tex).a * opacity;\n gl_FragColor = texture2D(u_texture, v_tex) * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"const float PI = 3.141592653589793;\n\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec3 a_projected_pos;\n\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform highp float u_camera_to_center_distance;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_collision_y_stretch;\n\n#pragma mapbox: define lowp float opacity\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_gl_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n vec2 a_pos = a_pos_offset.xy;\n vec2 a_offset = a_pos_offset.zw;\n\n vec2 a_tex = a_data.xy;\n vec2 a_size = a_data.zw;\n\n highp vec2 angle_labelminzoom = unpack_float(a_projected_pos[2]);\n highp float segment_angle = -angle_labelminzoom[0] / 255.0 * 2.0 * PI;\n mediump float a_labelminzoom = angle_labelminzoom[1];\n\n float size;\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size[0], a_size[1], u_size_t) / 10.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size[0] / 10.0;\n } else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {\n size = u_size;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // See comments in symbol_sdf.vertex\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = 0.5 + 0.5 * distance_ratio;\n\n size *= perspective_ratio;\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // See comments in symbol_sdf.vertex\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 64.0 * fontScale), 0.0, 1.0);\n\n v_tex = a_tex / u_texsize;\n // See comments in symbol_sdf.vertex\n highp float incidence_stretch = camera_to_anchor_distance / (u_camera_to_center_distance * cos(u_pitch));\n highp float collision_adjustment = max(1.0, incidence_stretch / u_collision_y_stretch);\n\n highp float collision_perspective_ratio = 1.0 + 0.5*((camera_to_anchor_distance / u_camera_to_center_distance) - 1.0);\n highp float perspective_zoom_adjust = floor(log2(collision_perspective_ratio * collision_adjustment) * 10.0);\n v_fade_tex = vec2((a_labelminzoom + perspective_zoom_adjust) / 255.0, 0.0);\n}\n"},symbolSDF:{fragmentSource:"#define SDF_PX 8.0\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\n\nuniform bool u_is_halo;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nuniform sampler2D u_texture;\nuniform sampler2D u_fadetexture;\nuniform highp float u_gamma_scale;\nuniform bool u_is_text;\n\nvarying vec4 v_data0;\nvarying vec2 v_data1;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n vec2 tex = v_data0.xy;\n vec2 fade_tex = v_data0.zw;\n float gamma_scale = v_data1.x;\n float size = v_data1.y;\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n lowp vec4 color = fill_color;\n highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\n lowp float buff = (256.0 - 64.0) / 256.0;\n if (u_is_halo) {\n color = halo_color;\n gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\n buff = (6.0 - halo_width / fontScale) / SDF_PX;\n }\n\n lowp float dist = texture2D(u_texture, tex).a;\n lowp float fade_alpha = texture2D(u_fadetexture, fade_tex).a;\n highp float gamma_scaled = gamma * gamma_scale;\n highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist) * fade_alpha;\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"const float PI = 3.141592653589793;\n\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec3 a_projected_pos;\n\n// contents of a_size vary based on the type of property value\n// used for {text,icon}-size.\n// For constants, a_size is disabled.\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\n// For composite functions:\n// [ text-size(lowerZoomStop, feature),\n// text-size(upperZoomStop, feature) ]\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_gl_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_camera_to_center_distance;\nuniform highp float u_collision_y_stretch;\n\nuniform vec2 u_texsize;\n\nvarying vec4 v_data0;\nvarying vec2 v_data1;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n vec2 a_pos = a_pos_offset.xy;\n vec2 a_offset = a_pos_offset.zw;\n\n vec2 a_tex = a_data.xy;\n vec2 a_size = a_data.zw;\n\n highp vec2 angle_labelminzoom = unpack_float(a_projected_pos[2]);\n highp float segment_angle = -angle_labelminzoom[0] / 255.0 * 2.0 * PI;\n mediump float a_labelminzoom = angle_labelminzoom[1];\n float size;\n\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size[0], a_size[1], u_size_t) / 10.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size[0] / 10.0;\n } else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {\n size = u_size;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // If the label is pitched with the map, layout is done in pitched space,\n // which makes labels in the distance smaller relative to viewport space.\n // We counteract part of that effect by multiplying by the perspective ratio.\n // If the label isn't pitched with the map, we do layout in viewport space,\n // which makes labels in the distance larger relative to the features around\n // them. We counteract part of that effect by dividing by the perspective ratio.\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = 0.5 + 0.5 * distance_ratio;\n\n size *= perspective_ratio;\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\n // To figure out that angle in projected space, we draw a short horizontal line in tile\n // space, project it, and measure its angle in projected space.\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 64.0 * fontScale), 0.0, 1.0);\n float gamma_scale = gl_Position.w;\n\n vec2 tex = a_tex / u_texsize;\n // incidence_stretch is the ratio of how much y space a label takes up on a tile while drawn perpendicular to the viewport vs\n // how much space it would take up if it were drawn flat on the tile\n // Using law of sines, camera_to_anchor/sin(ground_angle) = camera_to_center/sin(incidence_angle)\n // sin(incidence_angle) = 1/incidence_stretch\n // Incidence angle 90 -> head on, sin(incidence_angle) = 1, no incidence stretch\n // Incidence angle 1 -> very oblique, sin(incidence_angle) =~ 0, lots of incidence stretch\n // ground_angle = u_pitch + PI/2 -> sin(ground_angle) = cos(u_pitch)\n // This 2D calculation is only exactly correct when gl_Position.x is in the center of the viewport,\n // but it's a close enough approximation for our purposes\n highp float incidence_stretch = camera_to_anchor_distance / (u_camera_to_center_distance * cos(u_pitch));\n // incidence_stretch only applies to the y-axis, but without re-calculating the collision tile, we can't\n // adjust the size of only one axis. So, we do a crude approximation at placement time to get the aspect ratio\n // about right, and then do the rest of the adjustment here: there will be some extra padding on the x-axis,\n // but hopefully not too much.\n // Never make the adjustment less than 1.0: instead of allowing collisions on the x-axis, be conservative on\n // the y-axis.\n highp float collision_adjustment = max(1.0, incidence_stretch / u_collision_y_stretch);\n\n // Floor to 1/10th zoom to dodge precision issues that can cause partially hidden labels\n highp float collision_perspective_ratio = 1.0 + 0.5*((camera_to_anchor_distance / u_camera_to_center_distance) - 1.0);\n highp float perspective_zoom_adjust = floor(log2(collision_perspective_ratio * collision_adjustment) * 10.0);\n vec2 fade_tex = vec2((a_labelminzoom + perspective_zoom_adjust) / 255.0, 0.0);\n\n v_data0 = vec4(tex.x, tex.y, fade_tex.x, fade_tex.y);\n v_data1 = vec2(gamma_scale, size);\n}\n"}},n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g;for(var o in i)!function(t){var e=i[t],r={};e.fragmentSource=e.fragmentSource.replace(n,function(t,e,i,n,o){return r[o]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+i+" "+n+" "+o+";\n#else\nuniform "+i+" "+n+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n "+i+" "+n+" "+o+" = u_"+o+";\n#endif\n"}),e.vertexSource=e.vertexSource.replace(n,function(t,e,i,n,o){var a="float"===n?"vec2":"vec4";return r[o]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float a_"+o+"_t;\nattribute "+i+" "+a+" a_"+o+";\nvarying "+i+" "+n+" "+o+";\n#else\nuniform "+i+" "+n+" u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = unpack_mix_"+a+"(a_"+o+", a_"+o+"_t);\n#else\n "+i+" "+n+" "+o+" = u_"+o+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float a_"+o+"_t;\nattribute "+i+" "+a+" a_"+o+";\n#else\nuniform "+i+" "+n+" u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+i+" "+n+" "+o+" = unpack_mix_"+a+"(a_"+o+", a_"+o+"_t);\n#else\n "+i+" "+n+" "+o+" = u_"+o+";\n#endif\n"})}(o);e.exports=i},{}],87:[function(t,e,r){"use strict";var i=t("./image_source"),n=t("../util/window"),o=function(t){function e(e,r,i,n){t.call(this,e,r,i,n),this.options=r,this.animate=void 0===r.animate||r.animate}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){this.canvas=this.canvas||n.document.getElementById(this.options.canvas);var t=this.canvas.getContext(this.options.contextType);if(!t)return this.fire("error",new Error("Canvas context not found."));if(this.context=t,this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions())return this.fire("error",new Error("Canvas dimensions cannot be less than or equal to zero."));var e;this.play=function(){void 0===e&&(e=this.map.style.animationLoop.set(1/0),this.map._rerender())},this.pause=function(){void 0!==e&&(e=this.map.style.animationLoop.cancel(e))},this._finishLoading()},e.prototype.getCanvas=function(){return this.canvas},e.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},e.prototype.onRemove=function(){this.pause()},e.prototype.readCanvas=function(t){var e=this;if(this.context instanceof CanvasRenderingContext2D)this.canvasData=this.context.getImageData(0,0,this.width,this.height);else if(this.context instanceof WebGLRenderingContext){var r=this.context,i=new Uint8Array(this.width*this.height*4);r.readPixels(0,0,this.width,this.height,r.RGBA,r.UNSIGNED_BYTE,i),this.secondaryContext||(this.secondaryContext=n.document.createElement("canvas").getContext("2d")),this.canvasData&&!t||(this.canvasData=this.secondaryContext.createImageData(this.width,this.height));for(var o=this.height-1,a=0;o>=0;o--,a++)e.canvasData.data.set(i.subarray(o*e.width*4,(o+1)*e.width*4),a*e.width*4)}},e.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){if((this.animate||!this.canvasData||t)&&this.readCanvas(t),!this.canvasData)return void this.fire("error",new Error("Could not read canvas data."));this._prepareImage(this.map.painter.gl,this.canvasData,t)}},e.prototype.serialize=function(){return{type:"canvas",canvas:this.canvas,coordinates:this.coordinates}},e.prototype._hasInvalidDimensions=function(){for(var t=this,e=0,r=[t.canvas.width,t.canvas.height];e<r.length;e+=1){var i=r[e];if(isNaN(i)||i<=0)return!0}return!1},e}(i);e.exports=o},{"../util/window":204,"./image_source":91}],88:[function(t,e,r){"use strict";function i(t){var e=a.document.createElement("a");return e.href=t,e.href}var n=t("../util/evented"),o=t("../util/util"),a=t("../util/window"),s=t("../data/extent"),l=t("../util/ajax").ResourceType,u=t("../util/browser"),c=function(t){function e(e,r,i,n){t.call(this),this.id=e,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this.dispatcher=i,this.setEventedParent(n),this._data=r.data,this._options=o.extend({},r),void 0!==r.maxzoom&&(this.maxzoom=r.maxzoom),r.type&&(this.type=r.type);var a=s/this.tileSize;this.workerOptions=o.extend({source:this.id,cluster:r.cluster||!1,geojsonVtOptions:{buffer:(void 0!==r.buffer?r.buffer:128)*a,tolerance:(void 0!==r.tolerance?r.tolerance:.375)*a,extent:s,maxZoom:this.maxzoom},superclusterOptions:{maxZoom:void 0!==r.clusterMaxZoom?Math.min(r.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:s,radius:(r.clusterRadius||50)*a,log:!1}},r.workerOptions)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this;this.fire("dataloading",{dataType:"source"}),this._updateWorkerData(function(e){if(e)return void t.fire("error",{error:e});t.fire("data",{dataType:"source",sourceDataType:"metadata"})})},e.prototype.onAdd=function(t){this.map=t,this.load()},e.prototype.setData=function(t){var e=this;return this._data=t,this.fire("dataloading",{dataType:"source"}),this._updateWorkerData(function(t){if(t)return e.fire("error",{error:t});e.fire("data",{dataType:"source",sourceDataType:"content"})}),this},e.prototype._updateWorkerData=function(t){var e=this,r=o.extend({},this.workerOptions),n=this._data;"string"==typeof n?r.request=this.map._transformRequest(i(n),l.Source):r.data=JSON.stringify(n),this.workerID=this.dispatcher.send(this.type+".loadData",r,function(r){e._loaded=!0,t(r)},this.workerID)},e.prototype.loadTile=function(t,e){var r=this,i=t.workerID&&"expired"!==t.state?"reloadTile":"loadTile",n={type:this.type,uid:t.uid,coord:t.coord,zoom:t.coord.z,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:u.devicePixelRatio,overscaling:t.coord.z>this.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,angle:this.map.transform.angle,pitch:this.map.transform.pitch,cameraToCenterDistance:this.map.transform.cameraToCenterDistance,cameraToTileDistance:this.map.transform.cameraToTileDistance(t),showCollisionBoxes:this.map.showCollisionBoxes};t.workerID=this.dispatcher.send(i,n,function(i,n){if(t.unloadVectorData(),!t.aborted)return i?e(i):(t.loadVectorData(n,r.map.painter),t.redoWhenDone&&(t.redoWhenDone=!1,t.redoPlacement(r)),e(null))},this.workerID)},e.prototype.abortTile=function(t){t.aborted=!0},e.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},function(){},t.workerID)},e.prototype.onRemove=function(){this.dispatcher.broadcast("removeSource",{type:this.type,source:this.id},function(){})},e.prototype.serialize=function(){return o.extend({},this._options,{type:this.type,data:this._data})},e}(n);e.exports=c},{"../data/extent":48,"../util/ajax":201,"../util/browser":202,"../util/evented":210,"../util/util":223,"../util/window":204}],89:[function(t,e,r){"use strict";function i(t,e){var r=t.source,i=t.coord;if(!this._geoJSONIndexes[r])return e(null,null);var n=this._geoJSONIndexes[r].getTile(Math.min(i.z,t.maxZoom),i.x,i.y);if(!n)return e(null,null);var o=new a(n.features),l=s(o);0===l.byteOffset&&l.byteLength===l.buffer.byteLength||(l=new Uint8Array(l)),e(null,{vectorTile:o,rawData:l.buffer})}var n=t("../util/ajax"),o=t("geojson-rewind"),a=t("./geojson_wrapper"),s=t("vt-pbf"),l=t("supercluster"),u=t("geojson-vt"),c=t("./vector_tile_worker_source"),p=function(t){function e(e,r,n){t.call(this,e,r,i),n&&(this.loadGeoJSON=n),this._geoJSONIndexes={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.loadData=function(t,e){var r=this;this.loadGeoJSON(t,function(i,n){if(i||!n)return e(i);if("object"!=typeof n)return e(new Error("Input data is not a valid GeoJSON object."));o(n,!0);try{r._geoJSONIndexes[t.source]=t.cluster?l(t.superclusterOptions).load(n.features):u(n,t.geojsonVtOptions)}catch(i){return e(i)}r.loaded[t.source]={},e(null)})},e.prototype.reloadTile=function(e,r){var i=this.loaded[e.source],n=e.uid;return i&&i[n]?t.prototype.reloadTile.call(this,e,r):this.loadTile(e,r)},e.prototype.loadGeoJSON=function(t,e){if(t.request)n.getJSON(t.request,e);else{if("string"!=typeof t.data)return e(new Error("Input data is not a valid GeoJSON object."));try{return e(null,JSON.parse(t.data))}catch(t){return e(new Error("Input data is not a valid GeoJSON object."))}}},e.prototype.removeSource=function(t){this._geoJSONIndexes[t.source]&&delete this._geoJSONIndexes[t.source]},e}(c);e.exports=p},{"../util/ajax":201,"./geojson_wrapper":90,"./vector_tile_worker_source":103,"geojson-rewind":13,"geojson-vt":17,supercluster:32,"vt-pbf":37}],90:[function(t,e,r){"use strict";var i=t("@mapbox/point-geometry"),n=t("@mapbox/vector-tile").VectorTileFeature.prototype.toGeoJSON,o=t("../data/extent"),a=function(t){this._feature=t,this.extent=o,this.type=t.type,this.properties=t.tags,"id"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10))};a.prototype.loadGeometry=function(){var t=this;if(1===this._feature.type){for(var e=[],r=0,n=t._feature.geometry;r<n.length;r+=1){var o=n[r];e.push([new i(o[0],o[1])])}return e}for(var a=[],s=0,l=t._feature.geometry;s<l.length;s+=1){for(var u=l[s],c=[],p=0,h=u;p<h.length;p+=1){var f=h[p];c.push(new i(f[0],f[1]))}a.push(c)}return a},a.prototype.toGeoJSON=function(t,e,r){return n.call(this,t,e,r)};var s=function(t){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=o,this.length=t.length,this._features=t};s.prototype.feature=function(t){return new a(this._features[t])},e.exports=s},{"../data/extent":48,"@mapbox/point-geometry":2,"@mapbox/vector-tile":6}],91:[function(t,e,r){"use strict";var i=t("../util/util"),n=t("../util/window"),o=t("./tile_coord"),a=t("../geo/lng_lat"),s=t("@mapbox/point-geometry"),l=t("../util/evented"),u=t("../util/ajax"),c=t("../util/browser"),p=t("../data/extent"),h=t("../data/raster_bounds_array"),f=t("../gl/vertex_buffer"),d=t("../render/vertex_array_object"),m=function(t){function e(e,r,i,n){t.call(this),this.id=e,this.dispatcher=i,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this.setEventedParent(n),this.options=r,this.textureLoaded=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this;this.fire("dataloading",{dataType:"source"}),this.url=this.options.url,u.getImage(this.map._transformRequest(this.url,u.ResourceType.Image),function(e,r){e?t.fire("error",{error:e}):r&&(t.image=c.getImageData(r),t._finishLoading())})},e.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire("data",{dataType:"source",sourceDataType:"metadata"}))},e.prototype.onAdd=function(t){this.map=t,this.load()},e.prototype.setCoordinates=function(t){this.coordinates=t;var e=this.map,r=t.map(function(t){return e.transform.locationCoordinate(a.convert(t)).zoomTo(0)}),n=this.centerCoord=i.getCoordinatesCenter(r);n.column=Math.floor(n.column),n.row=Math.floor(n.row),this.coord=new o(n.zoom,n.column,n.row),this.minzoom=this.maxzoom=n.zoom;var l=r.map(function(t){var e=t.zoomTo(n.zoom);return new s(Math.round((e.column-n.column)*p),Math.round((e.row-n.row)*p))});return this._boundsArray=new h,this._boundsArray.emplaceBack(l[0].x,l[0].y,0,0),this._boundsArray.emplaceBack(l[1].x,l[1].y,p,0),this._boundsArray.emplaceBack(l[3].x,l[3].y,0,p),this._boundsArray.emplaceBack(l[2].x,l[2].y,p,p),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire("data",{dataType:"source",sourceDataType:"content"}),this},e.prototype.prepare=function(){0!==Object.keys(this.tiles).length&&this.image&&this._prepareImage(this.map.painter.gl,this.image)},e.prototype._prepareImage=function(t,e,r){var i=this;this.boundsBuffer||(this.boundsBuffer=new f(t,this._boundsArray)),this.boundsVAO||(this.boundsVAO=new d),this.textureLoaded?r?t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e):(e instanceof n.HTMLVideoElement||e instanceof n.ImageData)&&(t.bindTexture(t.TEXTURE_2D,this.texture),t.texSubImage2D(t.TEXTURE_2D,0,0,0,t.RGBA,t.UNSIGNED_BYTE,e)):(this.textureLoaded=!0,this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e));for(var o in i.tiles){var a=i.tiles[o];"loaded"!==a.state&&(a.state="loaded",a.texture=i.texture)}},e.prototype.loadTile=function(t,e){this.coord&&this.coord.toString()===t.coord.toString()?(this.tiles[String(t.coord.w)]=t,t.buckets={},e(null)):(t.state="errored",e(null))},e.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},e}(l);e.exports=m},{"../data/extent":48,"../data/raster_bounds_array":54,"../geo/lng_lat":58,"../gl/vertex_buffer":62,"../render/vertex_array_object":84,"../util/ajax":201,"../util/browser":202,"../util/evented":210,"../util/util":223,"../util/window":204,"./tile_coord":101,"@mapbox/point-geometry":2}],92:[function(t,e,r){"use strict";var i=t("../util/util"),n=t("../util/ajax"),o=t("../util/browser"),a=t("../util/mapbox").normalizeSourceURL;e.exports=function(t,e,r){var s=function(t,e){if(t)return r(t);if(e){var n=i.pick(e,["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds"]);e.vector_layers&&(n.vectorLayers=e.vector_layers,n.vectorLayerIds=n.vectorLayers.map(function(t){return t.id})),r(null,n)}};t.url?n.getJSON(e(a(t.url),n.ResourceType.Source),s):o.frame(function(){return s(null,t)})}},{"../util/ajax":201,"../util/browser":202,"../util/mapbox":217,"../util/util":223}],93:[function(t,e,r){"use strict";var i=t("../data/extent");e.exports=function(t,e,r){return e*(i/(t.tileSize*Math.pow(2,r-t.coord.z)))}},{"../data/extent":48}],94:[function(t,e,r){"use strict";function i(t,e){var r=t.coord,i=e.coord;return r.z-i.z||r.y-i.y||r.w-i.w||r.x-i.x}function n(t){for(var e={},r={},i=0,n=t;i<n.length;i+=1){var o=n[i],a=o.queryResults,s=o.wrappedTileID,l=r[s]=r[s]||{};for(var u in a)for(var c=a[u],p=l[u]=l[u]||{},h=e[u]=e[u]||[],f=0,d=c;f<d.length;f+=1){var m=d[f];p[m.featureIndex]||(p[m.featureIndex]=!0,h.push(m.feature))}}return e}var o=t("./tile_coord");r.rendered=function(t,e,r,o,a,s){var l=t.tilesIn(r);l.sort(i);for(var u=[],c=0,p=l;c<p.length;c+=1){var h=p[c];u.push({wrappedTileID:h.coord.wrapped().id,queryResults:h.tile.queryRenderedFeatures(e,h.queryGeometry,h.scale,o,s)})}return n(u)},r.source=function(t,e){for(var r=t.getRenderableIds().map(function(e){return t.getTileByID(e)}),i=[],n={},a=0;a<r.length;a++){var s=r[a],l=new o(Math.min(s.sourceMaxZoom,s.coord.z),s.coord.x,s.coord.y,0).id;n[l]||(n[l]=!0,s.querySourceFeatures(i,e))}return i}},{"./tile_coord":101}],95:[function(t,e,r){"use strict";var i=t("../util/util"),n=t("../util/ajax"),o=t("../util/evented"),a=t("./load_tilejson"),s=t("../util/mapbox").normalizeTileURL,l=t("./tile_bounds"),u=function(t){function e(e,r,n,o){t.call(this),this.id=e,this.dispatcher=n,this.setEventedParent(o),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=i.extend({},r),i.extend(this,i.pick(r,["url","scheme","tileSize"]))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this;this.fire("dataloading",{dataType:"source"}),a(this._options,this.map._transformRequest,function(e,r){e?t.fire("error",e):r&&(i.extend(t,r),r.bounds&&(t.tileBounds=new l(r.bounds,t.minzoom,t.maxzoom)),t.fire("data",{dataType:"source",sourceDataType:"metadata"}),t.fire("data",{dataType:"source",sourceDataType:"content"}))})},e.prototype.onAdd=function(t){this.map=t,this.load()},e.prototype.serialize=function(){return i.extend({},this._options)},e.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t,this.maxzoom)},e.prototype.loadTile=function(t,e){var r=this,i=s(t.coord.url(this.tiles,null,this.scheme),this.url,this.tileSize);t.request=n.getImage(this.map._transformRequest(i,n.ResourceType.Tile),function(i,n){if(delete t.request,t.aborted)r.state="unloaded",e(null);else if(i)r.state="errored",e(i);else if(n){r.map._refreshExpiredTiles&&t.setExpiryData(n),delete n.cacheControl,delete n.expires;var o=r.map.painter.gl;t.texture=r.map.painter.getTileTexture(n.width),t.texture?(o.bindTexture(o.TEXTURE_2D,t.texture),o.texSubImage2D(o.TEXTURE_2D,0,0,0,o.RGBA,o.UNSIGNED_BYTE,n)):(t.texture=o.createTexture(),o.bindTexture(o.TEXTURE_2D,t.texture),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR_MIPMAP_NEAREST),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),r.map.painter.extTextureFilterAnisotropic&&o.texParameterf(o.TEXTURE_2D,r.map.painter.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,r.map.painter.extTextureFilterAnisotropicMax),o.texImage2D(o.TEXTURE_2D,0,o.RGBA,o.RGBA,o.UNSIGNED_BYTE,n),t.texture.size=n.width),o.generateMipmap(o.TEXTURE_2D),t.state="loaded",e(null)}})},e.prototype.abortTile=function(t){t.request&&(t.request.abort(),delete t.request)},e.prototype.unloadTile=function(t){t.texture&&this.map.painter.saveTileTexture(t.texture)},e}(o);e.exports=u},{"../util/ajax":201,"../util/evented":210,"../util/mapbox":217,"../util/util":223,"./load_tilejson":92,"./tile_bounds":100}],96:[function(t,e,r){"use strict";var i=t("../util/ajax"),n=t("../util/evented"),o=t("../util/window"),a=!1,s=null;e.exports.evented=new n,e.exports.registerForPluginAvailability=function(t){return s?t({pluginBlobURL:s,errorCallback:e.exports.errorCallback}):e.exports.evented.once("pluginAvailable",t),t},e.exports.createBlobURL=function(t){return o.URL.createObjectURL(new o.Blob([t.data],{type:"text/javascript"}))},e.exports.clearRTLTextPlugin=function(){a=!1,s=null},e.exports.setRTLTextPlugin=function(t,r){if(a)throw new Error("setRTLTextPlugin cannot be called multiple times.");a=!0,e.exports.errorCallback=r,i.getArrayBuffer({url:t},function(t,i){t?r(t):i&&(s=e.exports.createBlobURL(i),e.exports.evented.fire("pluginAvailable",{pluginBlobURL:s,errorCallback:r}))})},e.exports.applyArabicShaping=null,e.exports.processBidirectionalText=null},{"../util/ajax":201,"../util/evented":210,"../util/window":204}],97:[function(t,e,r){"use strict";var i=t("../util/util"),n={vector:t("../source/vector_tile_source"),raster:t("../source/raster_tile_source"),geojson:t("../source/geojson_source"),video:t("../source/video_source"),image:t("../source/image_source"),canvas:t("../source/canvas_source")};r.create=function(t,e,r,o){var a=new n[e.type](t,e,r,o);if(a.id!==t)throw new Error("Expected Source id to be "+t+" instead of "+a.id);return i.bindAll(["load","abort","unload","serialize","prepare"],a),a},r.getType=function(t){return n[t]},r.setType=function(t,e){n[t]=e}},{"../source/canvas_source":87,"../source/geojson_source":88,"../source/image_source":91,"../source/raster_tile_source":95,"../source/vector_tile_source":102,"../source/video_source":104,"../util/util":223}],98:[function(t,e,r){"use strict";function i(t,e,r){var i=r.zoomTo(Math.min(t.z,e));return new d((i.column-(t.x+t.w*Math.pow(2,t.z)))*f,(i.row-t.y)*f)}function n(t,e){return t%32-e%32}function o(t){return"raster"===t||"image"===t||"video"===t}var a=t("./source").create,s=t("./tile"),l=t("../util/evented"),u=t("./tile_coord"),c=t("../util/lru_cache"),p=t("../geo/coordinate"),h=t("../util/util"),f=t("../data/extent"),d=t("@mapbox/point-geometry"),m=function(t){function e(e,r,i){var n=this;t.call(this),this.id=e,this.dispatcher=i,this.on("data",function(t){"source"===t.dataType&&"metadata"===t.sourceDataType&&(n._sourceLoaded=!0),n._sourceLoaded&&!n._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(n.reload(),n.transform&&n.update(n.transform))}),this.on("error",function(){n._sourceErrored=!0}),this._source=a(e,r,i,this),this._tiles={},this._cache=new c(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._isIdRenderable=this._isIdRenderable.bind(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t)},e.prototype.onRemove=function(t){this._source&&this._source.onRemove&&this._source.onRemove(t)},e.prototype.loaded=function(){var t=this;if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;for(var e in t._tiles){var r=t._tiles[e];if("loaded"!==r.state&&"errored"!==r.state)return!1}return!0},e.prototype.getSource=function(){return this._source},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){if(this._paused){var t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform)}},e.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},e.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t)},e.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t)},e.prototype.serialize=function(){return this._source.serialize()},e.prototype.prepare=function(t){var e=this;this._source.prepare&&this._source.prepare();for(var r in e._tiles)e._tiles[r].upload(t)},e.prototype.getIds=function(){return Object.keys(this._tiles).map(Number).sort(n)},e.prototype.getRenderableIds=function(){return this.getIds().filter(this._isIdRenderable)},e.prototype._isIdRenderable=function(t){return this._tiles[t].hasData()&&!this._coveredTiles[t]},e.prototype.reload=function(){var t=this;if(this._paused)return void(this._shouldReloadOnResume=!0);this._cache.reset();for(var e in t._tiles)t._reloadTile(e,"reloading")},e.prototype._reloadTile=function(t,e){var r=this._tiles[t];r&&("loading"!==r.state&&(r.state=e),this._loadTile(r,this._tileLoaded.bind(this,r,t,e)))},e.prototype._tileLoaded=function(t,e,r,i){if(i)return t.state="errored",void(404!==i.status?this._source.fire("error",{tile:t,error:i}):this.update(this.transform));t.timeAdded=(new Date).getTime(),"expired"===r&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(e,t),this._source.fire("data",{dataType:"source",tile:t,coord:t.coord}),this.map&&(this.map.painter.tileExtentVAO.vao=null)},e.prototype.getTile=function(t){return this.getTileByID(t.id)},e.prototype.getTileByID=function(t){return this._tiles[t]},e.prototype.getZoom=function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)},e.prototype._findLoadedChildren=function(t,e,r){var i=this,n=!1;for(var o in i._tiles){var a=i._tiles[o];if(!(r[o]||!a.hasData()||a.coord.z<=t.z||a.coord.z>e)){var s=Math.pow(2,Math.min(a.coord.z,i._source.maxzoom)-Math.min(t.z,i._source.maxzoom));if(Math.floor(a.coord.x/s)===t.x&&Math.floor(a.coord.y/s)===t.y)for(r[o]=!0,n=!0;a&&a.coord.z-1>t.z;){var l=a.coord.parent(i._source.maxzoom);if(!l)break;(a=i._tiles[l.id])&&a.hasData()&&(delete r[o],r[l.id]=!0)}}}return n},e.prototype.findLoadedParent=function(t,e,r){for(var i=this,n=t.z-1;n>=e;n--){var o=t.parent(i._source.maxzoom);if(!o)return;t=o;var a=String(t.id),s=i._tiles[a];if(s&&s.hasData())return r[a]=!0,s;if(i._cache.has(a))return r[a]=!0,i._cache.getWithoutRemoving(a)}},e.prototype.updateCacheSize=function(t){var e=Math.ceil(t.width/t.tileSize)+1,r=Math.ceil(t.height/t.tileSize)+1,i=e*r,n=Math.floor(5*i),o="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,n):n;this._cache.setMaxSize(o)},e.prototype.update=function(t){var r=this;if(this.transform=t,this._sourceLoaded&&!this._paused){this.updateCacheSize(t),this._coveredTiles={};var i;this.used?this._source.coord?i=t.getVisibleWrappedCoordinates(this._source.coord):(i=t.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(i=i.filter(function(t){return r._source.hasTile(t)}))):i=[];var n=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(t)),a=Math.max(n-e.maxOverzooming,this._source.minzoom),s=Math.max(n+e.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,n),c={};if(o(this._source.type))for(var p=Object.keys(l),f=0;f<p.length;f++){var d=p[f],m=u.fromID(+d),v=r._tiles[d];if(v&&(void 0===v.fadeEndTime||v.fadeEndTime>=Date.now())){r._findLoadedChildren(m,s,l)&&(l[d]=!0);var y=r.findLoadedParent(m,a,c);y&&r._addTile(y.coord)}}var g;for(g in c)l[g]||(r._coveredTiles[g]=!0);for(g in c)l[g]=!0;for(var _=h.keysDifference(this._tiles,l),x=0;x<_.length;x++)r._removeTile(_[x])}},e.prototype._updateRetainedTiles=function(t,r){var i,n,o,a,s=this,l={},u={},c=Math.max(r-e.maxOverzooming,this._source.minzoom);for(i=0;i<t.length;i++){n=t[i],o=s._addTile(n);var p=!1;if(o.hasData())l[n.id]=!0;else{if(p=o.wasRequested(),l[n.id]=!0,a=!0,r+1>s._source.maxzoom){var h=n.children(s._source.maxzoom)[0],f=s.getTile(h);f&&f.hasData()?l[h.id]=!0:a=!1}else for(var d=n.children(s._source.maxzoom),m=0;m<d.length;m++){var v=d[m],y=v?s.getTile(v):null;y&&y.hasData()?l[v.id]=!0:a=!1}if(!a)for(var g=r-1;g>=c;--g){var _=n.scaledTo(g,s._source.maxzoom);if(u[_.id])break;if(u[_.id]=!0,o=s.getTile(_),!o&&p&&(o=s._addTile(_)),o&&(l[_.id]=!0,p=o.wasRequested(),o.hasData()))break}}}return l},e.prototype._addTile=function(t){var e=this._tiles[t.id];if(e)return e;(e=this._cache.get(t.id))&&(e.redoPlacement(this._source),this._cacheTimers[t.id]&&(clearTimeout(this._cacheTimers[t.id]),delete this._cacheTimers[t.id],this._setTileReloadTimer(t.id,e)));var r=Boolean(e);if(!r){var i=t.z,n=i>this._source.maxzoom?Math.pow(2,i-this._source.maxzoom):1;e=new s(t,this._source.tileSize*n,this._source.maxzoom),this._loadTile(e,this._tileLoaded.bind(this,e,t.id,e.state))}return e?(e.uses++,this._tiles[t.id]=e,r||this._source.fire("dataloading",{tile:e,coord:e.coord,dataType:"source"}),e):null},e.prototype._setTileReloadTimer=function(t,e){var r=this,i=e.getExpiryTimeout();i&&(this._timers[t]=setTimeout(function(){r._reloadTile(t,"expired"),delete r._timers[t]},i))},e.prototype._setCacheInvalidationTimer=function(t,e){var r=this,i=e.getExpiryTimeout();i&&(this._cacheTimers[t]=setTimeout(function(){r._cache.remove(t),delete r._cacheTimers[t]},i))},e.prototype._removeTile=function(t){var e=this._tiles[t];if(e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),!(e.uses>0)))if(e.stopPlacementThrottler(),e.hasData()){var r=e.coord.wrapped().id;this._cache.add(r,e),this._setCacheInvalidationTimer(r,e)}else e.aborted=!0,this._abortTile(e),this._unloadTile(e)},e.prototype.clearTiles=function(){var t=this;this._shouldReloadOnResume=!1,this._paused=!1;for(var e in t._tiles)t._removeTile(e);this._cache.reset()},e.prototype.tilesIn=function(t){for(var e=this,r=[],n=this.getIds(),o=1/0,a=1/0,s=-1/0,l=-1/0,c=t[0].zoom,h=0;h<t.length;h++){var d=t[h];o=Math.min(o,d.column),a=Math.min(a,d.row),s=Math.max(s,d.column),l=Math.max(l,d.row)}for(var m=0;m<n.length;m++){var v=e._tiles[n[m]],y=u.fromID(n[m]),g=[i(y,v.sourceMaxZoom,new p(o,a,c)),i(y,v.sourceMaxZoom,new p(s,l,c))];if(g[0].x<f&&g[0].y<f&&g[1].x>=0&&g[1].y>=0){for(var _=[],x=0;x<t.length;x++)_.push(i(y,v.sourceMaxZoom,t[x]));r.push({tile:v,coord:y,queryGeometry:[_],scale:Math.pow(2,e.transform.zoom-v.coord.z)})}}return r},e.prototype.redoPlacement=function(){for(var t=this,e=this.getIds(),r=0;r<e.length;r++)t.getTileByID(e[r]).redoPlacement(t._source)},e.prototype.getVisibleCoordinates=function(){for(var t=this,e=this.getRenderableIds().map(u.fromID),r=0,i=e;r<i.length;r+=1){var n=i[r];n.posMatrix=t.transform.calculatePosMatrix(n,t._source.maxzoom)}return e},e}(l);m.maxOverzooming=10,m.maxUnderzooming=3,e.exports=m},{"../data/extent":48,"../geo/coordinate":57,"../util/evented":210,"../util/lru_cache":216,"../util/util":223,"./source":97,"./tile":99,"./tile_coord":101,"@mapbox/point-geometry":2}],99:[function(t,e,r){"use strict";var i=t("../util/util"),n=t("../data/bucket").deserialize,o=t("../data/bucket/symbol_bucket"),a=t("../data/feature_index"),s=t("@mapbox/vector-tile"),l=t("pbf"),u=t("../util/vectortile_to_geojson"),c=t("../style-spec/feature_filter"),p=t("../symbol/collision_tile"),h=t("../symbol/collision_box"),f=t("../util/throttler"),d=t("../render/texture"),m=function(t,e,r){this.coord=t,this.uid=i.uniqueId(),this.uses=0,this.tileSize=e,this.sourceMaxZoom=r,this.buckets={},this.expirationTime=null,this.expiredRequestCount=0,this.state="loading",this.placementThrottler=new f(300,this._immediateRedoPlacement.bind(this))};m.prototype.registerFadeDuration=function(t,e){var r=e+this.timeAdded;r<Date.now()||this.fadeEndTime&&r<this.fadeEndTime||(this.fadeEndTime=r,t.set(this.fadeEndTime-Date.now()))},m.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},m.prototype.loadVectorData=function(t,e){this.hasData()&&this.unloadVectorData(),this.state="loaded",t&&(t.rawTileData&&(this.rawTileData=t.rawTileData),this.collisionBoxArray=new h(t.collisionBoxArray),this.collisionTile=p.deserialize(t.collisionTile,this.collisionBoxArray),this.featureIndex=a.deserialize(t.featureIndex,this.rawTileData,this.collisionTile),this.buckets=n(t.buckets,e.style),t.iconAtlasImage&&(this.iconAtlasImage=t.iconAtlasImage),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage))},m.prototype.reloadSymbolData=function(t,e){var r=this;if("unloaded"!==this.state){this.collisionTile=p.deserialize(t.collisionTile,this.collisionBoxArray),this.featureIndex&&this.featureIndex.setCollisionTile(this.collisionTile);for(var a in r.buckets){var s=r.buckets[a];s instanceof o&&(s.destroy(),delete r.buckets[a])}i.extend(this.buckets,n(t.buckets,e)),t.iconAtlasImage&&(this.iconAtlasImage=t.iconAtlasImage),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}},m.prototype.unloadVectorData=function(){var t=this;for(var e in t.buckets)t.buckets[e].destroy();this.buckets={},this.iconAtlasTexture&&this.iconAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.collisionBoxArray=null,this.collisionTile=null,this.featureIndex=null,this.state="unloaded"},m.prototype.redoPlacement=function(t){if("vector"===t.type||"geojson"===t.type){if("loaded"!==this.state)return void(this.redoWhenDone=!0);if(this.collisionTile){var e=t.map.transform.cameraToTileDistance(this);if(this.angle===t.map.transform.angle&&this.pitch===t.map.transform.pitch&&this.showCollisionBoxes===t.map.showCollisionBoxes){if(this.cameraToTileDistance===e&&this.cameraToCenterDistance===t.map.transform.cameraToCenterDistance)return;if(this.pitch<25)return this.cameraToTileDistance=e,void(this.cameraToCenterDistance=t.map.transform.cameraToCenterDistance)}this.angle=t.map.transform.angle,this.pitch=t.map.transform.pitch,this.cameraToCenterDistance=t.map.transform.cameraToCenterDistance,this.cameraToTileDistance=e,this.showCollisionBoxes=t.map.showCollisionBoxes,this.placementSource=t,this.state="reloading",this.placementThrottler.invoke()}}},m.prototype._immediateRedoPlacement=function(){var t=this;this.placementSource.dispatcher.send("redoPlacement",{type:this.placementSource.type,uid:this.uid,source:this.placementSource.id,angle:this.angle,pitch:this.pitch,cameraToCenterDistance:this.cameraToCenterDistance,cameraToTileDistance:this.cameraToTileDistance,showCollisionBoxes:this.showCollisionBoxes},function(e,r){"reloading"===t.state&&(t.state="loaded",t.reloadSymbolData(r,t.placementSource.map.style),t.placementSource.fire("data",{tile:t,coord:t.coord,dataType:"source"}),t.placementSource.map&&(t.placementSource.map.painter.tileExtentVAO.vao=null),t.redoWhenDone&&(t.state="reloading",t.redoWhenDone=!1,t._immediateRedoPlacement()))},this.workerID)},m.prototype.getBucket=function(t){return this.buckets[t.id]},m.prototype.upload=function(t){var e=this;for(var r in e.buckets){var i=e.buckets[r];i.uploaded||(i.upload(t),i.uploaded=!0)}this.iconAtlasImage&&(this.iconAtlasTexture=new d(t,this.iconAtlasImage,t.RGBA),this.iconAtlasImage=null),this.glyphAtlasImage&&(this.glyphAtlasTexture=new d(t,this.glyphAtlasImage,t.ALPHA),this.glyphAtlasImage=null)},m.prototype.queryRenderedFeatures=function(t,e,r,i,n){var o=this;if(!this.featureIndex)return{};var a=0;for(var s in t){var l=o.getBucket(t[s]);l&&(a=Math.max(a,t[s].queryRadius(l)))}return this.featureIndex.query({queryGeometry:e,bearing:n,params:i,scale:r,additionalRadius:a,tileSize:this.tileSize},t)},m.prototype.querySourceFeatures=function(t,e){var r=this;if(this.rawTileData){this.vtLayers||(this.vtLayers=new s.VectorTile(new l(this.rawTileData)).layers);var i=e?e.sourceLayer:"",n=this.vtLayers._geojsonTileLayer||this.vtLayers[i];if(n)for(var o=c(e&&e.filter),a={z:this.coord.z,x:this.coord.x,y:this.coord.y},p=0;p<n.length;p++){var h=n.feature(p);if(o(h)){var f=new u(h,r.coord.z,r.coord.x,r.coord.y);f.tile=a,t.push(f)}}}},m.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},m.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var r=i.parseCacheControl(t.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+1e3*r["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){var n=Date.now(),o=!1;if(this.expirationTime>n)o=!1;else if(e)if(this.expirationTime<e)o=!0;else{var a=this.expirationTime-e;a?this.expirationTime=n+Math.max(a,3e4):o=!0}else o=!0;o?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},m.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)},m.prototype.stopPlacementThrottler=function(){this.placementThrottler.stop(),"reloading"===this.state&&(this.state="loaded")},e.exports=m},{"../data/bucket":42,"../data/bucket/symbol_bucket":47,"../data/feature_index":49,"../render/texture":83,"../style-spec/feature_filter":110,"../symbol/collision_box":170,"../symbol/collision_tile":172,"../util/throttler":221,"../util/util":223,"../util/vectortile_to_geojson":224,"@mapbox/vector-tile":6,pbf:29}],100:[function(t,e,r){"use strict";var i=t("../geo/lng_lat_bounds"),n=t("../util/util").clamp,o=function(t,e,r){this.bounds=i.convert(this.validateBounds(t)),this.minzoom=e||0,this.maxzoom=r||24};o.prototype.validateBounds=function(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]},o.prototype.contains=function(t,e){var r=e?Math.min(t.z,e):t.z,i={minX:Math.floor(this.lngX(this.bounds.getWest(),r)),minY:Math.floor(this.latY(this.bounds.getNorth(),r)),maxX:Math.ceil(this.lngX(this.bounds.getEast(),r)),maxY:Math.ceil(this.latY(this.bounds.getSouth(),r))};return t.x>=i.minX&&t.x<i.maxX&&t.y>=i.minY&&t.y<i.maxY},o.prototype.lngX=function(t,e){return(t+180)*(Math.pow(2,e)/360)},o.prototype.latY=function(t,e){var r=n(Math.sin(Math.PI/180*t),-.9999,.9999),i=Math.pow(2,e)/(2*Math.PI);return Math.pow(2,e-1)+.5*Math.log((1+r)/(1-r))*-i},e.exports=o},{"../geo/lng_lat_bounds":59,"../util/util":223}],101:[function(t,e,r){"use strict";function i(t,e){if(t.row>e.row){var r=t;t=e,e=r}return{x0:t.column,y0:t.row,x1:e.column,y1:e.row,dx:e.column-t.column,dy:e.row-t.row}}function n(t,e,r,i,n){var o=Math.max(r,Math.floor(e.y0)),a=Math.min(i,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx<e.x1:t.x1-e.dy/t.dy*t.dx<e.x0){var s=t;t=e,e=s}for(var l=t.dx/t.dy,u=e.dx/e.dy,c=t.dx>0,p=e.dx<0,h=o;h<a;h++){var f=l*Math.max(0,Math.min(t.dy,h+c-t.y0))+t.x0,d=u*Math.max(0,Math.min(e.dy,h+p-e.y0))+e.x0;n(Math.floor(d),Math.ceil(f),h)}}function o(t,e,r,o,a,s){var l,u=i(t,e),c=i(e,r),p=i(r,t);u.dy>c.dy&&(l=u,u=c,c=l),u.dy>p.dy&&(l=u,u=p,p=l),c.dy>p.dy&&(l=c,c=p,p=l),u.dy&&n(p,u,o,a,s),c.dy&&n(p,c,o,a,s)}function a(t,e,r){for(var i,n="",o=t;o>0;o--)i=1<<o-1,n+=(e&i?1:0)+(r&i?2:0);return n}var s=t("@mapbox/whoots-js"),l=t("../geo/coordinate"),u=function(t,e,r,i){(void 0===i||isNaN(i))&&(i=0),this.z=+t,this.x=+e,this.y=+r,this.w=+i,(i*=2)<0&&(i=-1*i-1);var n=1<<this.z;this.id=32*(n*n*i+n*this.y+this.x)+this.z,this.posMatrix=null};u.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y},u.prototype.toCoordinate=function(t){var e=Math.min(this.z,void 0===t?this.z:t),r=Math.pow(2,e),i=this.y,n=this.x+r*this.w;return new l(n,i,e)},u.prototype.url=function(t,e,r){var i=s.getTileBBox(this.x,this.y,this.z),n=a(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(Math.min(this.z,e||this.z))).replace("{x}",String(this.x)).replace("{y}",String("tms"===r?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",n).replace("{bbox-epsg-3857}",i)},u.prototype.parent=function(t){return 0===this.z?null:this.z>t?new u(this.z-1,this.x,this.y,this.w):new u(this.z-1,Math.floor(this.x/2),Math.floor(this.y/2),this.w)},u.prototype.wrapped=function(){return new u(this.z,this.x,this.y,0)},u.prototype.children=function(t){if(this.z>=t)return[new u(this.z+1,this.x,this.y,this.w)];var e=this.z+1,r=2*this.x,i=2*this.y;return[new u(e,r,i,this.w),new u(e,r+1,i,this.w),new u(e,r,i+1,this.w),new u(e,r+1,i+1,this.w)]},u.prototype.scaledTo=function(t,e){return this.z>e?new u(t,this.x,this.y,this.w):t<=this.z?new u(t,this.x>>this.z-t,this.y>>this.z-t,this.w):new u(t,this.x<<t-this.z,this.y<<t-this.z,this.w)},u.cover=function(t,e,r,i){function n(t,e,n){var o,l,c,p;if(n>=0&&n<=a)for(o=t;o<e;o++)l=Math.floor(o/a),c=(o%a+a)%a,0!==l&&!0!==i||(p=new u(r,c,n,l),s[p.id]=p)}void 0===i&&(i=!0);var a=1<<t,s={};return o(e[0],e[1],e[2],0,a,n),o(e[2],e[3],e[0],0,a,n),Object.keys(s).map(function(t){return s[t]})},u.fromID=function(t){var e=t%32,r=1<<e,i=(t-e)/32,n=i%r,o=(i-n)/r%r,a=Math.floor(i/(r*r));return a%2!=0&&(a=-1*a-1),a/=2,new u(e,n,o,a)},e.exports=u},{"../geo/coordinate":57,"@mapbox/whoots-js":10}],102:[function(t,e,r){"use strict";var i=t("../util/evented"),n=t("../util/util"),o=t("./load_tilejson"),a=t("../util/mapbox").normalizeTileURL,s=t("./tile_bounds"),l=t("../util/ajax").ResourceType,u=t("../util/browser"),c=function(t){function e(e,r,i,o){if(t.call(this),this.id=e,this.dispatcher=i,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,n.extend(this,n.pick(r,["url","scheme","tileSize"])),this._options=n.extend({type:"vector"},r),512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this;this.fire("dataloading",{dataType:"source"}),o(this._options,this.map._transformRequest,function(e,r){e?t.fire("error",e):r&&(n.extend(t,r),r.bounds&&(t.tileBounds=new s(r.bounds,t.minzoom,t.maxzoom)),t.fire("data",{dataType:"source",sourceDataType:"metadata"}),t.fire("data",{dataType:"source",sourceDataType:"content"}))})},e.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t,this.maxzoom)},e.prototype.onAdd=function(t){this.map=t,this.load()},e.prototype.serialize=function(){return n.extend({},this._options)},e.prototype.loadTile=function(t,e){function r(r,i){if(!t.aborted){if(r)return e(r);this.map._refreshExpiredTiles&&t.setExpiryData(i),t.loadVectorData(i,this.map.painter),t.redoWhenDone&&(t.redoWhenDone=!1,t.redoPlacement(this)),e(null),t.reloadCallback&&(this.loadTile(t,t.reloadCallback),t.reloadCallback=null)}}var i=t.coord.z>this.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,n=a(t.coord.url(this.tiles,this.maxzoom,this.scheme),this.url),o={request:this.map._transformRequest(n,l.Tile),uid:t.uid,coord:t.coord,zoom:t.coord.z,tileSize:this.tileSize*i,type:this.type,source:this.id,pixelRatio:u.devicePixelRatio,overscaling:i,angle:this.map.transform.angle,pitch:this.map.transform.pitch,cameraToCenterDistance:this.map.transform.cameraToCenterDistance,cameraToTileDistance:this.map.transform.cameraToTileDistance(t),showCollisionBoxes:this.map.showCollisionBoxes};t.workerID&&"expired"!==t.state?"loading"===t.state?t.reloadCallback=e:this.dispatcher.send("reloadTile",o,r.bind(this),t.workerID):t.workerID=this.dispatcher.send("loadTile",o,r.bind(this))},e.prototype.abortTile=function(t){this.dispatcher.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},e.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},e}(i);e.exports=c},{"../util/ajax":201,"../util/browser":202,"../util/evented":210,"../util/mapbox":217,"../util/util":223,"./load_tilejson":92,"./tile_bounds":100}],103:[function(t,e,r){"use strict";function i(t,e){var r=n.getArrayBuffer(t.request,function(t,r){t?e(t):r&&e(null,{vectorTile:new o.VectorTile(new a(r.data)),rawData:r.data,cacheControl:r.cacheControl,expires:r.expires})});return function(){r.abort()}}var n=t("../util/ajax"),o=t("@mapbox/vector-tile"),a=t("pbf"),s=t("./worker_tile"),l=t("../util/util"),u=function(t,e,r){this.actor=t,this.layerIndex=e,this.loadVectorData=r||i,this.loading={},this.loaded={}};u.prototype.loadTile=function(t,e){var r=this,i=t.source,n=t.uid;this.loading[i]||(this.loading[i]={});var o=this.loading[i][n]=new s(t);o.abort=this.loadVectorData(t,function(t,a){if(delete r.loading[i][n],t||!a)return e(t);var s=a.rawData,u={};a.expires&&(u.expires=a.expires),a.cacheControl&&(u.cacheControl=a.cacheControl),o.vectorTile=a.vectorTile,o.parse(a.vectorTile,r.layerIndex,r.actor,function(t,r,i){if(t||!r)return e(t);e(null,l.extend({rawTileData:s},r,u),i)}),r.loaded[i]=r.loaded[i]||{},r.loaded[i][n]=o})},u.prototype.reloadTile=function(t,e){function r(t,r){if(this.reloadCallback){var i=this.reloadCallback;delete this.reloadCallback,this.parse(this.vectorTile,o.layerIndex,o.actor,i)}e(t,r)}var i=this.loaded[t.source],n=t.uid,o=this;if(i&&i[n]){var a=i[n];"parsing"===a.status?a.reloadCallback=e:"done"===a.status&&a.parse(a.vectorTile,this.layerIndex,this.actor,r.bind(a))}},u.prototype.abortTile=function(t){var e=this.loading[t.source],r=t.uid;e&&e[r]&&e[r].abort&&(e[r].abort(),delete e[r])},u.prototype.removeTile=function(t){var e=this.loaded[t.source],r=t.uid;e&&e[r]&&delete e[r]},u.prototype.redoPlacement=function(t,e){var r=this.loaded[t.source],i=this.loading[t.source],n=t.uid;if(r&&r[n]){var o=r[n],a=o.redoPlacement(t.angle,t.pitch,t.cameraToCenterDistance,t.cameraToTileDistance,t.showCollisionBoxes);a.result&&e(null,a.result,a.transferables)}else i&&i[n]&&(i[n].angle=t.angle)},e.exports=u},{"../util/ajax":201,"../util/util":223,"./worker_tile":106,"@mapbox/vector-tile":6,pbf:29}],104:[function(t,e,r){"use strict";var i=t("../util/ajax"),n=t("./image_source"),o=function(t){function e(e,r,i,n){t.call(this,e,r,i,n),this.roundZoom=!0,this.type="video",this.options=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this,e=this.options;this.urls=e.urls,i.getVideo(e.urls,function(e,r){if(e)t.fire("error",{error:e});else if(r){t.video=r,t.video.loop=!0;var i;t.video.addEventListener("playing",function(){i=t.map.style.animationLoop.set(1/0),t.map._rerender()}),t.video.addEventListener("pause",function(){t.map.style.animationLoop.cancel(i)}),t.map&&t.video.play(),t._finishLoading()}})},e.prototype.getVideo=function(){return this.video},e.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},e.prototype.prepare=function(){0===Object.keys(this.tiles).length||this.video.readyState<2||this._prepareImage(this.map.painter.gl,this.video)},e.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},e}(n);e.exports=o},{"../util/ajax":201,"./image_source":91}],105:[function(t,e,r){"use strict";var i=t("../util/actor"),n=t("../style/style_layer_index"),o=t("./vector_tile_worker_source"),a=t("./geojson_worker_source"),s=t("./rtl_text_plugin"),l=function(t){var e=this;this.self=t,this.actor=new i(t,this),this.layerIndexes={},this.workerSourceTypes={vector:o,geojson:a},this.workerSources={},this.self.registerWorkerSource=function(t,r){if(e.workerSourceTypes[t])throw new Error('Worker source with name "'+t+'" already registered.');e.workerSourceTypes[t]=r},this.self.registerRTLTextPlugin=function(t){if(s.applyArabicShaping||s.processBidirectionalText)throw new Error("RTL text plugin already registered.");s.applyArabicShaping=t.applyArabicShaping,s.processBidirectionalText=t.processBidirectionalText}};l.prototype.setLayers=function(t,e){this.getLayerIndex(t).replace(e)},l.prototype.updateLayers=function(t,e){this.getLayerIndex(t).update(e.layers,e.removedIds,e.symbolOrder)},l.prototype.loadTile=function(t,e,r){this.getWorkerSource(t,e.type).loadTile(e,r)},l.prototype.reloadTile=function(t,e,r){this.getWorkerSource(t,e.type).reloadTile(e,r)},l.prototype.abortTile=function(t,e){this.getWorkerSource(t,e.type).abortTile(e)},l.prototype.removeTile=function(t,e){this.getWorkerSource(t,e.type).removeTile(e)},l.prototype.removeSource=function(t,e){var r=this.getWorkerSource(t,e.type);void 0!==r.removeSource&&r.removeSource(e)},l.prototype.redoPlacement=function(t,e,r){this.getWorkerSource(t,e.type).redoPlacement(e,r)},l.prototype.loadWorkerSource=function(t,e,r){try{this.self.importScripts(e.url),r()}catch(t){r(t)}},l.prototype.loadRTLTextPlugin=function(t,e,r){try{s.applyArabicShaping||s.processBidirectionalText||(this.self.importScripts(e),s.applyArabicShaping&&s.processBidirectionalText||r(new Error("RTL Text Plugin failed to import scripts from "+e)))}catch(t){r(t)}},l.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new n),e},l.prototype.getWorkerSource=function(t,e){var r=this;if(this.workerSources[t]||(this.workerSources[t]={}),!this.workerSources[t][e]){var i={send:function(e,i,n,o){r.actor.send(e,i,n,o,t)}};this.workerSources[t][e]=new this.workerSourceTypes[e](i,this.getLayerIndex(t))}return this.workerSources[t][e]},e.exports=function(t){return new l(t)}},{"../style/style_layer_index":164,"../util/actor":200,"./geojson_worker_source":89,"./rtl_text_plugin":96,"./vector_tile_worker_source":103}],106:[function(t,e,r){"use strict";function i(t,e){for(var r=0,i=t.layers;r<i.length;r+=1)i[r].recalculate(e)}function n(t,e){return t.filter(function(t){return!t.isEmpty()}).map(function(t){return t.serialize(e)})}var o=t("../data/feature_index"),a=t("../symbol/collision_tile"),s=t("../symbol/collision_box"),l=t("../util/dictionary_coder"),u=(t("../data/bucket/symbol_bucket"),t("../util/util")),c=t("../render/image_atlas"),p=c.makeImageAtlas,h=t("../render/glyph_atlas"),f=h.makeGlyphAtlas,d=function(t){this.coord=t.coord,this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=t.overscaling,this.angle=t.angle,this.pitch=t.pitch,this.cameraToCenterDistance=t.cameraToCenterDistance,this.cameraToTileDistance=t.cameraToTileDistance,this.showCollisionBoxes=t.showCollisionBoxes};d.prototype.parse=function(t,e,r,c){function h(){var t=this;if(R)return c(R);if(D&&O){for(var e=new a(this.angle,this.pitch,this.cameraToCenterDistance,this.cameraToTileDistance,this.collisionBoxArray),r=f(D),o=p(O),s=0,l=t.symbolBuckets;s<l.length;s+=1){var h=l[s];i(h,t.zoom),h.prepare(D,r.positions,O,o.positions),h.place(e,t.showCollisionBoxes)}this.status="done";var d=[r.image.data.buffer,o.image.data.buffer];c(null,{buckets:n(u.values(y),d),featureIndex:v.serialize(d),collisionTile:e.serialize(d),collisionBoxArray:this.collisionBoxArray.serialize(),glyphAtlasImage:r.image,iconAtlasImage:o.image},d)}}var d=this;this.status="parsing",this.data=t,this.collisionBoxArray=new s;var m=new l(Object.keys(t.layers).sort()),v=new o(this.coord,this.overscaling);v.bucketLayerIDs=[];var y={},g={featureIndex:v,iconDependencies:{},glyphDependencies:{}},_=e.familiesBySource[this.source];for(var x in _){var b=t.layers[x];if(b){1===b.version&&u.warnOnce('Vector tile source "'+d.source+'" layer "'+x+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var w=m.encode(x),T=[],S=0;S<b.length;S++){var z=b.feature(S);T.push({feature:z,index:S,sourceLayerIndex:w})}for(var A=0,C=_[x];A<C.length;A+=1){var E=C[A],k=E[0];if(!(k.minzoom&&d.zoom<Math.floor(k.minzoom)||k.maxzoom&&d.zoom>=k.maxzoom||k.layout&&"none"===k.layout.visibility)){for(var M=0,L=E;M<L.length;M+=1)L[M].recalculate(d.zoom);(y[k.id]=k.createBucket({index:v.bucketLayerIDs.length,layers:E,zoom:d.zoom,pixelRatio:d.pixelRatio,overscaling:d.overscaling,collisionBoxArray:d.collisionBoxArray})).populate(T,g),v.bucketLayerIDs.push(E.map(function(t){return t.id}))}}}}this.symbolBuckets=[];for(var I=e.symbolOrder.length-1;I>=0;I--){var P=y[e.symbolOrder[I]];P&&d.symbolBuckets.push(P)}var R,D,O,B=u.mapObject(g.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(B).length?r.send("getGlyphs",{uid:this.uid,stacks:B},function(t,e){R||(R=t,D=e,h.call(d))}):D={};var F=Object.keys(g.iconDependencies);F.length?r.send("getImages",{icons:F},function(t,e){R||(R=t,O=e,h.call(d))}):O={},h.call(this)},d.prototype.redoPlacement=function(t,e,r,o,s){var l=this;if(this.angle=t,this.pitch=e,this.cameraToCenterDistance=r,this.cameraToTileDistance=o,"done"!==this.status)return{};for(var u=new a(this.angle,this.pitch,this.cameraToCenterDistance,this.cameraToTileDistance,this.collisionBoxArray),c=0,p=l.symbolBuckets;c<p.length;c+=1){var h=p[c];i(h,l.zoom),h.place(u,s)}var f=[];return{result:{buckets:n(this.symbolBuckets,f),collisionTile:u.serialize(f)},transferables:f}},e.exports=d},{"../data/bucket/symbol_bucket":47,"../data/feature_index":49,"../render/glyph_atlas":74,"../render/image_atlas":76,"../symbol/collision_box":170,"../symbol/collision_tile":172,"../util/dictionary_coder":207,"../util/util":223}],107:[function(t,e,r){"use strict";function i(t,e){var r={};for(var i in t)"ref"!==i&&(r[i]=t[i]);return o.forEach(function(t){t in e&&(r[t]=e[t])}),r}function n(t){t=t.slice();for(var e=Object.create(null),r=0;r<t.length;r++)e[t[r].id]=t[r];for(var n=0;n<t.length;n++)"ref"in t[n]&&(t[n]=i(t[n],e[t[n].ref]));return t}var o=t("./util/ref_properties");e.exports=n},{"./util/ref_properties":129}],108:[function(t,e,r){"use strict";function i(t,e,r,i){t=t||{},e=e||{};var n;for(n in t)t.hasOwnProperty(n)&&(e.hasOwnProperty(n)||(r.push({command:c.removeSource,args:[n]}),i[n]=!0));for(n in e)e.hasOwnProperty(n)&&(t.hasOwnProperty(n)?u(t[n],e[n])||(r.push({command:c.removeSource,args:[n]}),r.push({command:c.addSource,args:[n,e[n]]}),i[n]=!0):r.push({command:c.addSource,args:[n,e[n]]}))}function n(t,e,r,i,n,o){t=t||{},e=e||{};var a;for(a in t)t.hasOwnProperty(a)&&(u(t[a],e[a])||r.push({command:o,args:[i,a,e[a],n]}));for(a in e)e.hasOwnProperty(a)&&!t.hasOwnProperty(a)&&(u(t[a],e[a])||r.push({command:o,args:[i,a,e[a],n]}))}function o(t){return t.id}function a(t,e){return t[e.id]=e,t}function s(t,e,r){t=t||[],e=e||[];var i,s,l,p,h,f,d,m=t.map(o),v=e.map(o),y=t.reduce(a,{}),g=e.reduce(a,{}),_=m.slice(),x=Object.create(null);for(i=0,s=0;i<m.length;i++)l=m[i],g.hasOwnProperty(l)?s++:(r.push({command:c.removeLayer,args:[l]}),_.splice(_.indexOf(l,s),1));for(i=0,s=0;i<v.length;i++)l=v[v.length-1-i],_[_.length-1-i]!==l&&(y.hasOwnProperty(l)?(r.push({command:c.removeLayer,args:[l]}),_.splice(_.lastIndexOf(l,_.length-s),1)):s++,f=_[_.length-i],r.push({command:c.addLayer,args:[g[l],f]}),_.splice(_.length-i,0,l),x[l]=!0);for(i=0;i<v.length;i++)if(l=v[i],p=y[l],h=g[l],!x[l]&&!u(p,h))if(u(p.source,h.source)&&u(p["source-layer"],h["source-layer"])&&u(p.type,h.type)){n(p.layout,h.layout,r,l,null,c.setLayoutProperty),n(p.paint,h.paint,r,l,null,c.setPaintProperty),u(p.filter,h.filter)||r.push({command:c.setFilter,args:[l,h.filter]}),u(p.minzoom,h.minzoom)&&u(p.maxzoom,h.maxzoom)||r.push({command:c.setLayerZoomRange,args:[l,h.minzoom,h.maxzoom]});for(d in p)p.hasOwnProperty(d)&&"layout"!==d&&"paint"!==d&&"filter"!==d&&"metadata"!==d&&"minzoom"!==d&&"maxzoom"!==d&&(0===d.indexOf("paint.")?n(p[d],h[d],r,l,d.slice(6),c.setPaintProperty):u(p[d],h[d])||r.push({command:c.setLayerProperty,args:[l,d,h[d]]}));for(d in h)h.hasOwnProperty(d)&&!p.hasOwnProperty(d)&&"layout"!==d&&"paint"!==d&&"filter"!==d&&"metadata"!==d&&"minzoom"!==d&&"maxzoom"!==d&&(0===d.indexOf("paint.")?n(p[d],h[d],r,l,d.slice(6),c.setPaintProperty):u(p[d],h[d])||r.push({command:c.setLayerProperty,args:[l,d,h[d]]}))}else r.push({command:c.removeLayer,args:[l]}),f=_[_.lastIndexOf(l)+1],r.push({command:c.addLayer,args:[h,f]})}function l(t,e){if(!t)return[{command:c.setStyle,args:[e]}];var r=[];try{if(!u(t.version,e.version))return[{command:c.setStyle,args:[e]}];u(t.center,e.center)||r.push({command:c.setCenter,args:[e.center]}),u(t.zoom,e.zoom)||r.push({command:c.setZoom,args:[e.zoom]}),u(t.bearing,e.bearing)||r.push({command:c.setBearing,args:[e.bearing]}),u(t.pitch,e.pitch)||r.push({command:c.setPitch,args:[e.pitch]}),u(t.sprite,e.sprite)||r.push({command:c.setSprite,args:[e.sprite]}),u(t.glyphs,e.glyphs)||r.push({command:c.setGlyphs,args:[e.glyphs]}),u(t.transition,e.transition)||r.push({command:c.setTransition,args:[e.transition]}),u(t.light,e.light)||r.push({command:c.setLight,args:[e.light]});var n={},o=[];i(t.sources,e.sources,o,n);var a=[];t.layers&&t.layers.forEach(function(t){n[t.source]?r.push({command:c.removeLayer,args:[t.id]}):a.push(t)}),r=r.concat(o),s(a,e.layers,r)}catch(t){console.warn("Unable to compute style diff:",t),r=[{command:c.setStyle,args:[e]}]}return r}var u=t("lodash.isequal"),c={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};e.exports=l,e.exports.operations=c},{"lodash.isequal":120}],109:[function(t,e,r){"use strict";function i(t,e){for(var r=[],i=arguments.length-2;i-- >0;)r[i]=arguments[i+2];this.message=(t?t+": ":"")+n.apply(n,r),null!==e&&void 0!==e&&e.__line__&&(this.line=e.__line__)}var n=t("util").format;e.exports=i},{util:36}],110:[function(t,e,r){"use strict";function i(t){return new Function("f","var p = (f && f.properties || {}); return "+n(t))}function n(t){if(!t)return"true";var e=t[0];return t.length<=1?"any"===e?"false":"true":"("+("=="===e?a(t[1],t[2],"===",!1):"!="===e?a(t[1],t[2],"!==",!1):"<"===e||">"===e||"<="===e||">="===e?a(t[1],t[2],e,!0):"any"===e?s(t.slice(1),"||"):"all"===e?s(t.slice(1),"&&"):"none"===e?c(s(t.slice(1),"||")):"in"===e?l(t[1],t.slice(2)):"!in"===e?c(l(t[1],t.slice(2))):"has"===e?u(t[1]):"!has"===e?c(u(t[1])):"true")+")"}function o(t){return"$type"===t?"f.type":"$id"===t?"f.id":"p["+JSON.stringify(t)+"]"}function a(t,e,r,i){var n=o(t),a="$type"===t?h.indexOf(e):JSON.stringify(e);return(i?"typeof "+n+"=== typeof "+a+"&&":"")+n+r+a}function s(t,e){return t.map(n).join(e)}function l(t,e){"$type"===t&&(e=e.map(function(t){return h.indexOf(t)}));var r=JSON.stringify(e.sort(p)),i=o(t);return e.length<=200?r+".indexOf("+i+") !== -1":"function(v, a, i, j) {while (i <= j) { var m = (i + j) >> 1; if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;}return false; }("+i+", "+r+",0,"+(e.length-1)+")"}function u(t){return"$id"===t?'"id" in f':JSON.stringify(t)+" in p"}function c(t){return"!("+t+")"}function p(t,e){return t<e?-1:t>e?1:0}e.exports=i;var h=["Unknown","Point","LineString","Polygon"]},{}],111:[function(t,e,r){"use strict";function i(t){return t>y?Math.pow(t,1/3):t/v+d}function n(t){return t>m?t*t*t:v*(t-d)}function o(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function a(t){return t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function s(t){var e=a(t[0]),r=a(t[1]),n=a(t[2]),o=i((.4124564*e+.3575761*r+.1804375*n)/p),s=i((.2126729*e+.7151522*r+.072175*n)/h);return[116*s-16,500*(o-s),200*(s-i((.0193339*e+.119192*r+.9503041*n)/f)),t[3]]}function l(t){var e=(t[0]+16)/116,r=isNaN(t[1])?e:e+t[1]/500,i=isNaN(t[2])?e:e-t[2]/200;return e=h*n(e),r=p*n(r),i=f*n(i),[o(3.2404542*r-1.5371385*e-.4985314*i),o(-.969266*r+1.8760108*e+.041556*i),o(.0556434*r-.2040259*e+1.0572252*i),t[3]]}function u(t){var e=s(t),r=e[0],i=e[1],n=e[2],o=Math.atan2(n,i)*_;return[o<0?o+360:o,Math.sqrt(i*i+n*n),r,t[3]]}function c(t){var e=t[0]*g,r=t[1];return l([t[2],Math.cos(e)*r,Math.sin(e)*r,t[3]])}var p=.95047,h=1,f=1.08883,d=4/29,m=6/29,v=3*m*m,y=m*m*m,g=Math.PI/180,_=180/Math.PI;e.exports={lab:{forward:s,reverse:l},hcl:{forward:u,reverse:c}}},{}],112:[function(t,e,r){"use strict";function i(t){return t}function n(t,e){var r,c="color"===e.type;if(p(t)){var h=t.stops&&"object"==typeof t.stops[0][0],v=h||void 0!==t.property,y=h||!v,g=t.type||("interpolated"===e.function?"exponential":"interval");c&&(t=m({},t),t.stops&&(t.stops=t.stops.map(function(t){return[t[0],d(t[1])]})),t.default?t.default=d(t.default):t.default=d(e.default));var _,x,b;if("exponential"===g)_=l;else if("interval"===g)_=s;else if("categorical"===g){_=a,x=Object.create(null);for(var w=0,T=t.stops;w<T.length;w+=1){var S=T[w];x[S[0]]=S[1]}b=typeof t.stops[0][0]}else{if("identity"!==g)throw new Error('Unknown function type "'+g+'"');_=u}var z;if(t.colorSpace&&"rgb"!==t.colorSpace){if(!f[t.colorSpace])throw new Error("Unknown color space: "+t.colorSpace);var A=f[t.colorSpace];t=JSON.parse(JSON.stringify(t));for(var C=0;C<t.stops.length;C++)t.stops[C]=[t.stops[C][0],A.forward(t.stops[C][1])];z=A.reverse}else z=i;if(h){for(var E={},k=[],M=0;M<t.stops.length;M++){var L=t.stops[M],I=L[0].zoom;void 0===E[I]&&(E[I]={zoom:I,type:t.type,property:t.property,default:t.default,stops:[]},k.push(I)),E[I].stops.push([L[0].value,L[1]])}for(var P=[],R=0,D=k;R<D.length;R+=1){var O=D[R];P.push([E[O].zoom,n(E[O],e)])}r=function(r,i){return z(l({stops:P,base:t.base},e,r)(r,i))},r.isFeatureConstant=!1,r.isZoomConstant=!1}else y?(r=function(r){return z(_(t,e,r,x,b))},r.isFeatureConstant=!0,r.isZoomConstant=!1):(r=function(r,i){var n=i[t.property];return void 0===n?o(t.default,e.default):z(_(t,e,n,x,b))},r.isFeatureConstant=!1,r.isZoomConstant=!0)}else c&&t&&(t=d(t)),r=function(){return t},r.isFeatureConstant=!0,r.isZoomConstant=!0;return r}function o(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function a(t,e,r,i,n){return o(typeof r===n?i[r]:void 0,t.default,e.default)}function s(t,e,r){if("number"!==v(r))return o(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var n=c(t.stops,r);return t.stops[n][1]}function l(t,e,r){var n=void 0!==t.base?t.base:1;if("number"!==v(r))return o(t.default,e.default);var a=t.stops.length;if(1===a)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[a-1][0])return t.stops[a-1][1];var s=c(t.stops,r),l=h(r,n,t.stops[s][0],t.stops[s+1][0]),u=t.stops[s][1],p=t.stops[s+1][1],f=y[e.type]||i;return"function"==typeof u?function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=u.apply(void 0,t),i=p.apply(void 0,t);if(void 0!==r&&void 0!==i)return f(r,i,l)}:f(u,p,l)}function u(t,e,r){return"color"===e.type?r=d(r):v(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),o(r,t.default,e.default)}function c(t,e){for(var r,i,n=t.length,o=0,a=n-1,s=0;o<=a;){if(s=Math.floor((o+a)/2),r=t[s][0],i=t[s+1][0],e===r||e>r&&e<i)return s;r<e?o=s+1:r>e&&(a=s-1)}return Math.max(s-1,0)}function p(t){return"object"==typeof t&&(t.stops||"identity"===t.type)}function h(t,e,r,i){var n=i-r,o=t-r;return 0===n?0:1===e?o/n:(Math.pow(e,o)-1)/(Math.pow(e,n)-1)}var f=t("./color_spaces"),d=t("../util/parse_color"),m=t("../util/extend"),v=t("../util/get_type"),y=t("../util/interpolate");e.exports=n,e.exports.isFunctionDefinition=p,e.exports.interpolationFactor=h,e.exports.findStopLessThanOrEqualTo=c},{"../util/extend":125,"../util/get_type":126,"../util/interpolate":127,"../util/parse_color":128,"./color_spaces":111}],113:[function(t,e,r){"use strict";function i(t){var e=typeof t;if("number"===e||"boolean"===e||"string"===e||void 0===t||null===t)return JSON.stringify(t);if(Array.isArray(t)){for(var r="[",n=0,o=t;n<o.length;n+=1)r+=i(o[n])+",";return r+"]"}for(var a=Object.keys(t).sort(),s="{",l=0;l<a.length;l++)s+=JSON.stringify(a[l])+":"+i(t[a[l]])+",";return s+"}"}function n(t){for(var e="",r=0,n=a;r<n.length;r+=1)e+="/"+i(t[n[r]]);return e}function o(t){for(var e={},r=0;r<t.length;r++){var i=n(t[r]),o=e[i];o||(o=e[i]=[]),o.push(t[r])}var a=[];for(var s in e)a.push(e[s]);return a}var a=t("./util/ref_properties");e.exports=o},{"./util/ref_properties":129}],114:[function(t,e,r){function i(t){return t=Math.round(t),t<0?0:t>255?255:t}function n(t){return t<0?0:t>1?1:t}function o(t){return i("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function a(t){return n("%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function l(t){var e=t.replace(/ /g,"").toLowerCase();if(e in u)return u[e].slice();if("#"===e[0]){if(4===e.length){var r=parseInt(e.substr(1),16);return r>=0&&r<=4095?[(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,1]:null}if(7===e.length){var r=parseInt(e.substr(1),16);return r>=0&&r<=16777215?[(16711680&r)>>16,(65280&r)>>8,255&r,1]:null}return null}var n=e.indexOf("("),l=e.indexOf(")");if(-1!==n&&l+1===e.length){var c=e.substr(0,n),p=e.substr(n+1,l-(n+1)).split(","),h=1;switch(c){case"rgba":if(4!==p.length)return null;h=a(p.pop());case"rgb":return 3!==p.length?null:[o(p[0]),o(p[1]),o(p[2]),h];case"hsla":if(4!==p.length)return null;h=a(p.pop());case"hsl":if(3!==p.length)return null;var f=(parseFloat(p[0])%360+360)%360/360,d=a(p[1]),m=a(p[2]),v=m<=.5?m*(d+1):m+d-m*d,y=2*m-v;return[i(255*s(y,v,f+1/3)),i(255*s(y,v,f)),i(255*s(y,v,f-1/3)),h];default:return null}}return null}var u={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};try{r.parseCSSColor=l}catch(t){}},{}],115:[function(t,e,r){function i(t){return!!t&&"object"==typeof t}function n(t,e){for(var r=-1,i=t.length;++r<i;)if(e(t[r],r,t))return!0;return!1}function o(t,e,r,n,s,l){return t===e||(null==t||null==e||!c(t)&&!i(e)?t!==t&&e!==e:a(t,e,o,r,n,s,l))}function a(t,e,r,i,n,o,a){var c=p(t),f=p(e),v=m,y=m;c||(v=z.call(t),v==d?v=x:v!=x&&(c=h(t))),f||(y=z.call(e),y==d?y=x:y!=x&&(f=h(e)));var g=v==x,_=y==x,b=v==y;if(b&&!c&&!g)return l(t,e,v);if(!n){var w=g&&S.call(t,"__wrapped__"),T=_&&S.call(e,"__wrapped__");if(w||T)return r(w?t.value():t,T?e.value():e,i,n,o,a)}if(!b)return!1;o||(o=[]),a||(a=[]);for(var A=o.length;A--;)if(o[A]==t)return a[A]==e;o.push(t),a.push(e);var C=(c?s:u)(t,e,r,i,n,o,a);return o.pop(),a.pop(),C}function s(t,e,r,i,o,a,s){var l=-1,u=t.length,c=e.length;if(u!=c&&!(o&&c>u))return!1;for(;++l<u;){var p=t[l],h=e[l],f=i?i(o?h:p,o?p:h,l):void 0;if(void 0!==f){if(f)continue;return!1}if(o){if(!n(e,function(t){return p===t||r(p,t,i,o,a,s)}))return!1}else if(p!==h&&!r(p,h,i,o,a,s))return!1}return!0}function l(t,e,r){switch(r){case v:case y:return+t==+e;case g:return t.name==e.name&&t.message==e.message;case _:return t!=+t?e!=+e:t==+e;case b:case w:return t==e+""}return!1}function u(t,e,r,i,n,o,a){var s=f(t),l=s.length;if(l!=f(e).length&&!n)return!1;for(var u=l;u--;){var c=s[u];if(!(n?c in e:S.call(e,c)))return!1}for(var p=n;++u<l;){c=s[u];var h=t[c],d=e[c],m=i?i(n?d:h,n?h:d,c):void 0;if(!(void 0===m?r(h,d,i,n,o,a):m))return!1;p||(p="constructor"==c)}if(!p){var v=t.constructor,y=e.constructor;if(v!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y))return!1}return!0}function c(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var p=t("lodash.isarray"),h=t("lodash.istypedarray"),f=t("lodash.keys"),d="[object Arguments]",m="[object Array]",v="[object Boolean]",y="[object Date]",g="[object Error]",_="[object Number]",x="[object Object]",b="[object RegExp]",w="[object String]",T=Object.prototype,S=T.hasOwnProperty,z=T.toString;e.exports=o},{"lodash.isarray":119,"lodash.istypedarray":121,"lodash.keys":122}],116:[function(t,e,r){function i(t,e,r){if("function"!=typeof t)return n;if(void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 3:return function(r,i,n){return t.call(e,r,i,n)};case 4:return function(r,i,n,o){return t.call(e,r,i,n,o)};case 5:return function(r,i,n,o,a){return t.call(e,r,i,n,o,a)}}return function(){return t.apply(e,arguments)}}function n(t){return t}e.exports=i},{}],117:[function(t,e,r){function i(t){return!!t&&"object"==typeof t}function n(t,e){var r=null==t?void 0:t[e];return s(r)?r:void 0}function o(t){return a(t)&&f.call(t)==l}function a(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function s(t){return null!=t&&(o(t)?d.test(p.call(t)):i(t)&&u.test(t))}var l="[object Function]",u=/^\[object .+?Constructor\]$/,c=Object.prototype,p=Function.prototype.toString,h=c.hasOwnProperty,f=c.toString,d=RegExp("^"+p.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=n},{}],118:[function(t,e,r){function i(t){return o(t)&&m.call(t,"callee")&&(!y.call(t,"callee")||v.call(t)==p)}function n(t){return null!=t&&s(t.length)&&!a(t)}function o(t){return u(t)&&n(t)}function a(t){var e=l(t)?v.call(t):"";return e==h||e==f}function s(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=c}function l(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function u(t){return!!t&&"object"==typeof t}var c=9007199254740991,p="[object Arguments]",h="[object Function]",f="[object GeneratorFunction]",d=Object.prototype,m=d.hasOwnProperty,v=d.toString,y=d.propertyIsEnumerable;e.exports=i},{}],119:[function(t,e,r){function i(t){return!!t&&"object"==typeof t}function n(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=v}function o(t){return a(t)&&f.call(t)==l}function a(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function s(t){return null!=t&&(o(t)?d.test(p.call(t)):i(t)&&u.test(t))}var l="[object Function]",u=/^\[object .+?Constructor\]$/,c=Object.prototype,p=Function.prototype.toString,h=c.hasOwnProperty,f=c.toString,d=RegExp("^"+p.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),m=function(t,e){var r=null==t?void 0:t[e];return s(r)?r:void 0}(Array,"isArray"),v=9007199254740991,y=m||function(t){return i(t)&&n(t.length)&&"[object Array]"==f.call(t)};e.exports=y},{}],120:[function(t,e,r){function i(t,e,r,i){r="function"==typeof r?o(r,i,3):void 0;var a=r?r(t,e):void 0;return void 0===a?n(t,e,r):!!a}var n=t("lodash._baseisequal"),o=t("lodash._bindcallback");e.exports=i},{"lodash._baseisequal":115,"lodash._bindcallback":116}],121:[function(t,e,r){function i(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=a}function n(t){return!!t&&"object"==typeof t}function o(t){return n(t)&&i(t.length)&&!!s[u.call(t)]}var a=9007199254740991,s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;var l=Object.prototype,u=l.toString;e.exports=o},{}],122:[function(t,e,r){function i(t){return null!=t&&o(y(t))}function n(t,e){return t="number"==typeof t||h.test(t)?+t:-1,e=null==e?v:e,t>-1&&t%1==0&&t<e}function o(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=v}function a(t){for(var e=l(t),r=e.length,i=r&&t.length,a=!!i&&o(i)&&(p(t)||c(t)),s=-1,u=[];++s<r;){var h=e[s];(a&&n(h,i)||d.call(t,h))&&u.push(h)}return u}function s(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function l(t){if(null==t)return[];s(t)||(t=Object(t));var e=t.length;e=e&&o(e)&&(p(t)||c(t))&&e||0;for(var r=t.constructor,i=-1,a="function"==typeof r&&r.prototype===t,l=Array(e),u=e>0;++i<e;)l[i]=i+"";for(var h in t)u&&n(h,e)||"constructor"==h&&(a||!d.call(t,h))||l.push(h);return l}var u=t("lodash._getnative"),c=t("lodash.isarguments"),p=t("lodash.isarray"),h=/^\d+$/,f=Object.prototype,d=f.hasOwnProperty,m=u(Object,"keys"),v=9007199254740991,y=function(t){return function(e){return null==e?void 0:e[t]}}("length"),g=m?function(t){var e=null==t?void 0:t.constructor;return"function"==typeof e&&e.prototype===t||"function"!=typeof t&&i(t)?a(t):s(t)?m(t):[]}:a;e.exports=g},{"lodash._getnative":117,"lodash.isarguments":118,"lodash.isarray":119}],123:[function(t,e,r){"use strict";e.exports=t("./v8.json")},{"./v8.json":124}],124:[function(t,e,r){e.exports={$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_tile","source_geojson","source_video","source_image","source_canvas"],source_tile:{type:{required:!0,type:"enum",values:{vector:{},raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"}},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"}}},source_canvas:{type:{required:!0,type:"enum",values:{canvas:{}}},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}},animate:{type:"boolean",default:"true"},canvas:{type:"string",required:!0},contextType:{required:!0,type:"enum",values:{"2d":{},webgl:{},"experimental-webgl":{},webgl2:{}}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},"fill-extrusion":{},raster:{},background:{}}},metadata:{type:"*"},ref:{type:"string"},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"},"paint.*":{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_fill-extrusion","layout_symbol","layout_raster","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_fill:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_circle:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_line:{"line-cap":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{butt:{},round:{},square:{}},default:"butt"},"line-join":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{bevel:{},round:{},miter:{}},default:"miter"},"line-miter-limit":{type:"number",default:2,function:"interpolated","zoom-function":!0,requires:[{"line-join":"miter"}]},"line-round-limit":{type:"number",default:1.05,function:"interpolated","zoom-function":!0,requires:[{"line-join":"round"}]},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_symbol:{"symbol-placement":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{point:{},line:{}},default:"point"},"symbol-spacing":{type:"number",default:250,minimum:1,function:"interpolated","zoom-function":!0,units:"pixels",requires:[{"symbol-placement":"line"}]},"symbol-avoid-edges":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1},"icon-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["icon-image"]},"icon-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["icon-image"]},"icon-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["icon-image","text-field"]},"icon-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"]},"icon-size":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,units:"factor of the original icon size",requires:["icon-image"]},"icon-text-fit":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"]},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",function:"interpolated","zoom-function":!0,requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}]},"icon-image":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,tokens:!0},"icon-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,"property-function":!0,units:"degrees",requires:["icon-image"]},"icon-padding":{type:"number",default:2,minimum:0,function:"interpolated","zoom-function":!0,units:"pixels",requires:["icon-image"]},"icon-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}]},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image"]},"icon-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"]},"icon-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"]},"text-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"]},"text-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"]},"text-field":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:"",tokens:!0},"text-font":{type:"array",value:"string",function:"piecewise-constant","zoom-function":!0,default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"]},"text-size":{type:"number",default:16,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-line-height":{type:"number",default:1.2,units:"ems",function:"interpolated","zoom-function":!0,requires:["text-field"]},"text-letter-spacing":{type:"number",default:0,units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-justify":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{left:{},center:{},right:{}},default:"center",requires:["text-field"]},"text-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field"]},"text-max-angle":{type:"number",default:45,units:"degrees",function:"interpolated","zoom-function":!0,requires:["text-field",{"symbol-placement":"line"}]},"text-rotate":{type:"number",default:0,period:360,units:"degrees",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,requires:["text-field"]},"text-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}]},"text-transform":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"]},"text-offset":{type:"array",value:"number",units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,length:2,default:[0,0],requires:["text-field"]},"text-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["text-field"]},"text-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["text-field"]},"text-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["text-field","icon-image"]},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{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:22,value:["number","color"],length:2},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},transition:!1,"zoom-function":!0,"property-function":!1,function:"piecewise-constant"},position:{type:"array",default:[1.15,210,30],length:3,value:"number",transition:!0,function:"interpolated","zoom-function":!0,"property-function":!1},color:{type:"color",default:"#ffffff",function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0},intensity:{type:"number",default:.5,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_fill-extrusion","paint_symbol","paint_raster","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!0},"fill-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0},"fill-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"}]},"fill-outline-color":{type:"color",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}]},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels"},"fill-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["fill-translate"]},"fill-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!1,default:1,minimum:0,maximum:1,transition:!0},"fill-extrusion-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-extrusion-pattern"}]},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels"},"fill-extrusion-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"]},"fill-extrusion-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0},"fill-extrusion-height":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:0,minimum:0,units:"meters",transition:!0},"fill-extrusion-base":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:0,minimum:0,maximum:65535,units:"meters",transition:!0,requires:["fill-extrusion-height"]}},paint_line:{"line-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0},"line-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"line-pattern"}]},"line-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels"},"line-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["line-translate"]},"line-width":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-gap-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-offset":{type:"number",default:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-dasharray":{type:"array",value:"number",function:"piecewise-constant","zoom-function":!0,minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}]},"line-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"circle-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-blur":{type:"number",default:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels"},"circle-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["circle-translate"]},"circle-pitch-scale":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map"},"circle-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"viewport"},"circle-stroke-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"circle-stroke-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"]},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"]}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-hue-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,transition:!0,units:"degrees"},"raster-brightness-min":{type:"number",function:"interpolated","zoom-function":!0,default:0,minimum:0,maximum:1,transition:!0},"raster-brightness-max":{type:"number",function:"interpolated","zoom-function":!0,default:1,minimum:0,maximum:1,transition:!0},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-fade-duration":{type:"number",default:300,minimum:0,function:"interpolated","zoom-function":!0,transition:!0,units:"milliseconds"}},paint_background:{"background-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,transition:!0,requires:[{"!":"background-pattern"}]},"background-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}}}},{}],125:[function(t,e,r){"use strict";e.exports=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var i=0,n=e;i<n.length;i+=1){var o=n[i];for(var a in o)t[a]=o[a]}return t}},{}],126:[function(t,e,r){"use strict";e.exports=function(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}},{}],127:[function(t,e,r){"use strict";function i(t,e,r){return t*(1-r)+e*r}e.exports=i,i.number=i,i.vec2=function(t,e,r){return[i(t[0],e[0],r),i(t[1],e[1],r)]},i.color=function(t,e,r){return[i(t[0],e[0],r),i(t[1],e[1],r),i(t[2],e[2],r),i(t[3],e[3],r)]},i.array=function(t,e,r){return t.map(function(t,n){return i(t,e[n],r)})}},{}],128:[function(t,e,r){"use strict";var i=t("csscolorparser").parseCSSColor;e.exports=function(t){if("string"==typeof t){var e=i(t);if(!e)return;return[e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3]]}return Array.isArray(t)?t:void 0}},{csscolorparser:114}],129:[function(t,e,r){"use strict";e.exports=["type","source","source-layer","minzoom","maxzoom","filter","layout"]},{}],130:[function(t,e,r){"use strict";e.exports=function(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}},{}],131:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("../util/get_type"),o=t("../util/extend");e.exports=function(e){var r=t("./validate_function"),a=t("./validate_object"),s={"*":function(){return[]},array:t("./validate_array"),boolean:t("./validate_boolean"),number:t("./validate_number"),color:t("./validate_color"),constants:t("./validate_constants"),enum:t("./validate_enum"),filter:t("./validate_filter"),function:t("./validate_function"),layer:t("./validate_layer"),object:t("./validate_object"),source:t("./validate_source"),light:t("./validate_light"),string:t("./validate_string")},l=e.value,u=e.valueSpec,c=e.key,p=e.styleSpec,h=e.style;if("string"===n(l)&&"@"===l[0]){if(p.$version>7)return[new i(c,l,"constants have been deprecated as of v8")];if(!(l in h.constants))return[new i(c,l,'constant "%s" not found',l)];e=o({},e,{value:h.constants[l]})}return u.function&&"object"===n(l)?r(e):u.type&&s[u.type]?s[u.type](e):a(o({},e,{valueSpec:u.type?p[u.type]:u}))}},{"../error/validation_error":109,"../util/extend":125,"../util/get_type":126,"./validate_array":132,"./validate_boolean":133,"./validate_color":134,"./validate_constants":135,"./validate_enum":136,"./validate_filter":137,"./validate_function":138,"./validate_layer":140,"./validate_light":142,"./validate_number":143,"./validate_object":144,"./validate_source":147,"./validate_string":148}],132:[function(t,e,r){"use strict";var i=t("../util/get_type"),n=t("./validate"),o=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.valueSpec,a=t.style,s=t.styleSpec,l=t.key,u=t.arrayElementValidator||n;if("array"!==i(e))return[new o(l,e,"array expected, %s found",i(e))];if(r.length&&e.length!==r.length)return[new o(l,e,"array length %d expected, length %d found",r.length,e.length)];if(r["min-length"]&&e.length<r["min-length"])return[new o(l,e,"array length at least %d expected, length %d found",r["min-length"],e.length)];var c={type:r.value};s.$version<7&&(c.function=r.function),"object"===i(r.value)&&(c=r.value);for(var p=[],h=0;h<e.length;h++)p=p.concat(u({array:e,arrayIndex:h,value:e[h],valueSpec:c,style:a,styleSpec:s,key:l+"["+h+"]"}));return p}},{"../error/validation_error":109,"../util/get_type":126,"./validate":131}],133:[function(t,e,r){"use strict";var i=t("../util/get_type"),n=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.key,o=i(e);return"boolean"!==o?[new n(r,e,"boolean expected, %s found",o)]:[]}},{"../error/validation_error":109,"../util/get_type":126}],134:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("../util/get_type"),o=t("csscolorparser").parseCSSColor;e.exports=function(t){var e=t.key,r=t.value,a=n(r);return"string"!==a?[new i(e,r,"color expected, %s found",a)]:null===o(r)?[new i(e,r,'color expected, "%s" found',r)]:[]}},{"../error/validation_error":109,"../util/get_type":126,csscolorparser:114}],135:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("../util/get_type");e.exports=function(t){var e=t.key,r=t.value;if(t.styleSpec.$version>7)return r?[new i(e,r,"constants have been deprecated as of v8")]:[];var o=n(r);if("object"!==o)return[new i(e,r,"object expected, %s found",o)];var a=[];for(var s in r)"@"!==s[0]&&a.push(new i(e+"."+s,r[s],'constants must start with "@"'));return a}},{"../error/validation_error":109,"../util/get_type":126}],136:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("../util/unbundle_jsonlint");e.exports=function(t){var e=t.key,r=t.value,o=t.valueSpec,a=[];return Array.isArray(o.values)?-1===o.values.indexOf(n(r))&&a.push(new i(e,r,"expected one of [%s], %s found",o.values.join(", "),r)):-1===Object.keys(o.values).indexOf(n(r))&&a.push(new i(e,r,"expected one of [%s], %s found",Object.keys(o.values).join(", "),r)),a}},{"../error/validation_error":109,"../util/unbundle_jsonlint":130}],137:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("./validate_enum"),o=t("../util/get_type"),a=t("../util/unbundle_jsonlint");e.exports=function t(e){var r,s=e.value,l=e.key,u=e.styleSpec,c=[];if("array"!==o(s))return[new i(l,s,"array expected, %s found",o(s))];if(s.length<1)return[new i(l,s,"filter array must have at least 1 element")];switch(c=c.concat(n({key:l+"[0]",value:s[0],valueSpec:u.filter_operator,style:e.style,styleSpec:e.styleSpec})),a(s[0])){case"<":case"<=":case">":case">=":s.length>=2&&"$type"===a(s[1])&&c.push(new i(l,s,'"$type" cannot be use with operator "%s"',s[0]));case"==":case"!=":3!==s.length&&c.push(new i(l,s,'filter array for operator "%s" must have 3 elements',s[0]));case"in":case"!in":s.length>=2&&"string"!==(r=o(s[1]))&&c.push(new i(l+"[1]",s[1],"string expected, %s found",r));for(var p=2;p<s.length;p++)r=o(s[p]),"$type"===a(s[1])?c=c.concat(n({key:l+"["+p+"]",value:s[p],valueSpec:u.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==r&&"number"!==r&&"boolean"!==r&&c.push(new i(l+"["+p+"]",s[p],"string, number, or boolean expected, %s found",r));break;case"any":case"all":case"none":for(var h=1;h<s.length;h++)c=c.concat(t({key:l+"["+h+"]",value:s[h],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":r=o(s[1]),2!==s.length?c.push(new i(l,s,'filter array for "%s" operator must have 2 elements',s[0])):"string"!==r&&c.push(new i(l+"[1]",s[1],"string expected, %s found",r))}return c}},{"../error/validation_error":109,"../util/get_type":126,"../util/unbundle_jsonlint":130,"./validate_enum":136}],138:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("../util/get_type"),o=t("./validate"),a=t("./validate_object"),s=t("./validate_array"),l=t("./validate_number"),u=t("../util/unbundle_jsonlint");e.exports=function(t){function e(t){if("identity"===v)return[new i(t.key,t.value,'identity function may not have a "stops" property')];var e=[],o=t.value;return e=e.concat(s({key:t.key,value:o,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:r})),"array"===n(o)&&0===o.length&&e.push(new i(t.key,o,"array must have at least one stop")),e}function r(t){var e=[],r=t.value,s=t.key;if("array"!==n(r))return[new i(s,r,"array expected, %s found",n(r))];if(2!==r.length)return[new i(s,r,"array length %d expected, length %d found",2,r.length)];if(x){if("object"!==n(r[0]))return[new i(s,r,"object expected, %s found",n(r[0]))];if(void 0===r[0].zoom)return[new i(s,r,"object stop key must have zoom")];if(void 0===r[0].value)return[new i(s,r,"object stop key must have value")];if(d&&d>u(r[0].zoom))return[new i(s,r[0].zoom,"stop zoom values must appear in ascending order")];u(r[0].zoom)!==d&&(d=u(r[0].zoom),f=void 0,y={}),e=e.concat(a({key:s+"[0]",value:r[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:l,value:c}}))}else e=e.concat(c({key:s+"[0]",value:r[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec}));return e.concat(o({key:s+"[1]",value:r[1],valueSpec:m,style:t.style,styleSpec:t.styleSpec}))}function c(t){var e=n(t.value),r=u(t.value);if(h){if(e!==h)return[new i(t.key,t.value,"%s stop domain type must match previous stop domain type %s",e,h)]}else h=e;if("number"!==e&&"string"!==e&&"boolean"!==e)return[new i(t.key,t.value,"stop domain value must be a number, string, or boolean")];if("number"!==e&&"categorical"!==v){var o="number expected, %s found";return m["property-function"]&&void 0===v&&(o+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new i(t.key,t.value,o,e)]}return"categorical"!==v||"number"!==e||isFinite(r)&&Math.floor(r)===r?"categorical"!==v&&"number"===e&&void 0!==f&&r<f?[new i(t.key,t.value,"stop domain values must appear in ascending order")]:(f=r,"categorical"===v&&r in y?[new i(t.key,t.value,"stop domain values must be unique")]:(y[r]=!0,[])):[new i(t.key,t.value,"integer expected, found %s",r)]}function p(t){return o({key:t.key,value:t.value,valueSpec:m,style:t.style,styleSpec:t.styleSpec})}var h,f,d,m=t.valueSpec,v=u(t.value.type),y={},g="categorical"!==v&&void 0===t.value.property,_=!g,x="array"===n(t.value.stops)&&"array"===n(t.value.stops[0])&&"object"===n(t.value.stops[0][0]),b=a({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:e,default:p}});return"identity"===v&&g&&b.push(new i(t.key,t.value,'missing required property "property"')),"identity"===v||t.value.stops||b.push(new i(t.key,t.value,'missing required property "stops"')),"exponential"===v&&"piecewise-constant"===t.valueSpec.function&&b.push(new i(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(_&&!t.valueSpec["property-function"]?b.push(new i(t.key,t.value,"property functions not supported")):g&&!t.valueSpec["zoom-function"]&&b.push(new i(t.key,t.value,"zoom functions not supported"))),"categorical"!==v&&!x||void 0!==t.value.property||b.push(new i(t.key,t.value,'"property" property is required')),b}},{"../error/validation_error":109,"../util/get_type":126,"../util/unbundle_jsonlint":130,"./validate":131,"./validate_array":132,"./validate_number":143,"./validate_object":144}],139:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("./validate_string");e.exports=function(t){var e=t.value,r=t.key,o=n(t);return o.length?o:(-1===e.indexOf("{fontstack}")&&o.push(new i(r,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&o.push(new i(r,e,'"glyphs" url must include a "{range}" token')),o)}},{"../error/validation_error":109,"./validate_string":148}],140:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("../util/unbundle_jsonlint"),o=t("./validate_object"),a=t("./validate_filter"),s=t("./validate_paint_property"),l=t("./validate_layout_property"),u=t("../util/extend");e.exports=function(t){var e=[],r=t.value,c=t.key,p=t.style,h=t.styleSpec;r.type||r.ref||e.push(new i(c,r,'either "type" or "ref" is required'));var f=n(r.type),d=n(r.ref);if(r.id)for(var m=n(r.id),v=0;v<t.arrayIndex;v++){var y=p.layers[v];n(y.id)===m&&e.push(new i(c,r.id,'duplicate layer id "%s", previously used at line %d',r.id,y.id.__line__))}if("ref"in r){["type","source","source-layer","filter","layout"].forEach(function(t){t in r&&e.push(new i(c,r[t],'"%s" is prohibited for ref layers',t))});var g;p.layers.forEach(function(t){n(t.id)===d&&(g=t)}),g?g.ref?e.push(new i(c,r.ref,"ref cannot reference another ref layer")):f=n(g.type):e.push(new i(c,r.ref,'ref layer "%s" not found',d))}else if("background"!==f)if(r.source){var _=p.sources&&p.sources[r.source],x=_&&n(_.type);_?"vector"===x&&"raster"===f?e.push(new i(c,r.source,'layer "%s" requires a raster source',r.id)):"raster"===x&&"raster"!==f?e.push(new i(c,r.source,'layer "%s" requires a vector source',r.id)):"vector"!==x||r["source-layer"]||e.push(new i(c,r,'layer "%s" must specify a "source-layer"',r.id)):e.push(new i(c,r.source,'source "%s" not found',r.source))}else e.push(new i(c,r,'missing required property "source"'));return e=e.concat(o({key:c,value:r,valueSpec:h.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},filter:a,layout:function(t){return o({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return l(u({layerType:f},t))}}})},paint:function(t){return o({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return s(u({layerType:f},t))}}})}}}))}},{"../error/validation_error":109,"../util/extend":125,"../util/unbundle_jsonlint":130,"./validate_filter":137,"./validate_layout_property":141,"./validate_object":144,"./validate_paint_property":145}],141:[function(t,e,r){"use strict";var i=t("./validate_property");e.exports=function(t){return i(t,"layout")}},{"./validate_property":146}],142:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("../util/get_type"),o=t("./validate");e.exports=function(t){var e=t.value,r=t.styleSpec,a=r.light,s=t.style,l=[],u=n(e);if(void 0===e)return l;if("object"!==u)return l=l.concat([new i("light",e,"object expected, %s found",u)]);for(var c in e){var p=c.match(/^(.*)-transition$/);l=p&&a[p[1]]&&a[p[1]].transition?l.concat(o({key:c,value:e[c],valueSpec:r.transition,style:s,styleSpec:r})):a[c]?l.concat(o({key:c,value:e[c],valueSpec:a[c],style:s,styleSpec:r})):l.concat([new i(c,e[c],'unknown property "%s"',c)])}return l}},{"../error/validation_error":109,"../util/get_type":126,"./validate":131}],143:[function(t,e,r){"use strict";var i=t("../util/get_type"),n=t("../error/validation_error");e.exports=function(t){var e=t.key,r=t.value,o=t.valueSpec,a=i(r);return"number"!==a?[new n(e,r,"number expected, %s found",a)]:"minimum"in o&&r<o.minimum?[new n(e,r,"%s is less than the minimum value %s",r,o.minimum)]:"maximum"in o&&r>o.maximum?[new n(e,r,"%s is greater than the maximum value %s",r,o.maximum)]:[]}},{"../error/validation_error":109,"../util/get_type":126}],144:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("../util/get_type"),o=t("./validate");e.exports=function(t){var e=t.key,r=t.value,a=t.valueSpec||{},s=t.objectElementValidators||{},l=t.style,u=t.styleSpec,c=[],p=n(r);if("object"!==p)return[new i(e,r,"object expected, %s found",p)];for(var h in r){var f=h.split(".")[0],d=a[f]||a["*"],m=void 0;if(s[f])m=s[f];else if(a[f])m=o;else if(s["*"])m=s["*"];else{if(!a["*"]){c.push(new i(e,r[h],'unknown property "%s"',h));continue}m=o}c=c.concat(m({key:(e?e+".":e)+h,value:r[h],valueSpec:d,style:l,styleSpec:u,object:r,objectKey:h}))}for(var v in a)a[v].required&&void 0===a[v].default&&void 0===r[v]&&c.push(new i(e,r,'missing required property "%s"',v));return c}},{"../error/validation_error":109,"../util/get_type":126,"./validate":131}],145:[function(t,e,r){"use strict";var i=t("./validate_property");e.exports=function(t){return i(t,"paint")}},{"./validate_property":146}],146:[function(t,e,r){"use strict";var i=t("./validate"),n=t("../error/validation_error"),o=t("../util/get_type");e.exports=function(t,e){var r=t.key,a=t.style,s=t.styleSpec,l=t.value,u=t.objectKey,c=s[e+"_"+t.layerType];if(!c)return[];var p=u.match(/^(.*)-transition$/);if("paint"===e&&p&&c[p[1]]&&c[p[1]].transition)return i({key:r,value:l,valueSpec:s.transition,style:a,styleSpec:s});var h=t.valueSpec||c[u];if(!h)return[new n(r,l,'unknown property "%s"',u)];var f;if("string"===o(l)&&h["property-function"]&&!h.tokens&&(f=/^{([^}]+)}$/.exec(l)))return[new n(r,l,'"%s" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": %s` }`.',u,JSON.stringify(f[1]))];var d=[];return"symbol"===t.layerType&&"text-field"===u&&a&&!a.glyphs&&d.push(new n(r,l,'use of "text-field" requires a style "glyphs" property')),d.concat(i({key:t.key,value:l,valueSpec:h,style:a,styleSpec:s}))}},{"../error/validation_error":109,"../util/get_type":126,"./validate":131}],147:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("../util/unbundle_jsonlint"),o=t("./validate_object"),a=t("./validate_enum");e.exports=function(t){var e=t.value,r=t.key,s=t.styleSpec,l=t.style;if(!e.type)return[new i(r,e,'"type" is required')];var u=n(e.type),c=[];switch(u){case"vector":case"raster":if(c=c.concat(o({key:r,value:e,valueSpec:s.source_tile,style:t.style,styleSpec:s})),"url"in e)for(var p in e)["type","url","tileSize"].indexOf(p)<0&&c.push(new i(r+"."+p,e[p],'a source with a "url" property may not include a "%s" property',p));return c;case"geojson":return o({key:r,value:e,valueSpec:s.source_geojson,style:l,styleSpec:s});case"video":return o({key:r,value:e,valueSpec:s.source_video,style:l,styleSpec:s});case"image":return o({key:r,value:e,valueSpec:s.source_image,style:l,styleSpec:s});case"canvas":return o({key:r,value:e,valueSpec:s.source_canvas,style:l,styleSpec:s});default:return a({key:r+".type",value:e.type,valueSpec:{values:["vector","raster","geojson","video","image","canvas"]},style:l,styleSpec:s})}}},{"../error/validation_error":109,"../util/unbundle_jsonlint":130,"./validate_enum":136,"./validate_object":144}],148:[function(t,e,r){"use strict";var i=t("../util/get_type"),n=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.key,o=i(e);return"string"!==o?[new n(r,e,"string expected, %s found",o)]:[]}},{"../error/validation_error":109,"../util/get_type":126}],149:[function(t,e,r){"use strict";function i(t,e){e=e||l;var r=[];return r=r.concat(s({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:u,"*":function(){return[]}}})),e.$version>7&&t.constants&&(r=r.concat(a({key:"constants",value:t.constants,style:t,styleSpec:e}))),n(r)}function n(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function o(t){return function(){return n(t.apply(this,arguments))}}var a=t("./validate/validate_constants"),s=t("./validate/validate"),l=t("./reference/latest"),u=t("./validate/validate_glyphs_url");i.source=o(t("./validate/validate_source")),i.light=o(t("./validate/validate_light")),i.layer=o(t("./validate/validate_layer")),i.filter=o(t("./validate/validate_filter")),i.paintProperty=o(t("./validate/validate_paint_property")),i.layoutProperty=o(t("./validate/validate_layout_property")),e.exports=i},{"./reference/latest":123,"./validate/validate":131,"./validate/validate_constants":135,"./validate/validate_filter":137,"./validate/validate_glyphs_url":139,"./validate/validate_layer":140,"./validate/validate_layout_property":141,"./validate/validate_light":142,"./validate/validate_paint_property":145,"./validate/validate_source":147}],150:[function(t,e,r){"use strict";var i=function(){this.n=0,this.times=[]};i.prototype.stopped=function(){return this.times=this.times.filter(function(t){return t.time>=(new Date).getTime()}),!this.times.length},i.prototype.set=function(t){return this.times.push({id:this.n,time:t+(new Date).getTime()}),this.n++},i.prototype.cancel=function(t){this.times=this.times.filter(function(e){return e.id!==t})},e.exports=i},{}],151:[function(t,e,r){"use strict";var i=t("../style-spec/reference/latest"),n=t("../util/util"),o=t("../util/evented"),a=t("./validate_style"),s=t("./style_declaration"),l=t("./style_transition"),u=["anchor","color","position","intensity"],c=i.light,p=function(t){function e(e){t.call(this),this.set(e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){var e=this;if(!this._validate(a.light,t)){this._declarations={},this._transitions={},this._transitionOptions={},this.calculated={},t=n.extend({anchor:c.anchor.default,color:c.color.default,position:c.position.default,intensity:c.intensity.default},t);for(var r=0,i=u;r<i.length;r+=1){var o=i[r];e._declarations[o]=new s(c[o],t[o])}return this}},e.prototype.getLight=function(){return{anchor:this.getLightProperty("anchor"),color:this.getLightProperty("color"),position:this.getLightProperty("position"),intensity:this.getLightProperty("intensity")}},e.prototype.getLightProperty=function(t){return n.endsWith(t,"-transition")?this._transitionOptions[t]:this._declarations[t]&&this._declarations[t].value},e.prototype.getLightValue=function(t,e){if("position"===t){var r=this._transitions[t].calculate(e),i=n.sphericalToCartesian(r);return{x:i[0],y:i[1],z:i[2]}}return this._transitions[t].calculate(e)},e.prototype.setLight=function(t){var e=this;if(!this._validate(a.light,t))for(var r in t){var i=t[r];n.endsWith(r,"-transition")?e._transitionOptions[r]=i:null===i||void 0===i?delete e._declarations[r]:e._declarations[r]=new s(c[r],i)}},e.prototype.recalculate=function(t){var e=this;for(var r in e._declarations)e.calculated[r]=e.getLightValue(r,{zoom:t})},e.prototype._applyLightDeclaration=function(t,e,r,i,o){var a=r.transition?this._transitions[t]:void 0,u=c[t];if(null!==e&&void 0!==e||(e=new s(u,u.default)),!a||a.declaration.json!==e.json){var p=n.extend({duration:300,delay:0},i,this.getLightProperty(t+"-transition")),h=this._transitions[t]=new l(u,e,a,p);h.instant()||(h.loopID=o.set(h.endTime-Date.now())),a&&o.cancel(a.loopID)}},e.prototype.updateLightTransitions=function(t,e,r){var i,n=this;for(i in n._declarations)n._applyLightDeclaration(i,n._declarations[i],t,e,r)},e.prototype._validate=function(t,e){return a.emitErrors(this,t.call(a,n.extend({value:e,style:{glyphs:!0,sprite:!0},styleSpec:i})))},e}(o);e.exports=p},{"../style-spec/reference/latest":123,"../util/evented":210,"../util/util":223,"./style_declaration":157,"./style_transition":165,"./validate_style":166}],152:[function(t,e,r){"use strict";var i=t("../util/mapbox"),n=i.normalizeGlyphsURL,o=t("../util/ajax"),a=t("./parse_glyph_pbf");e.exports=function(t,e,r,i,s){var l=256*e,u=l+255,c=i(n(r).replace("{fontstack}",t).replace("{range}",l+"-"+u),o.ResourceType.Glyphs);o.getArrayBuffer(c,function(t,e){if(t)s(t);else if(e){for(var r={},i=0,n=a(e.data);i<n.length;i+=1){var o=n[i];r[o.id]=o}s(null,r)}})}},{"../util/ajax":201,"../util/mapbox":217,"./parse_glyph_pbf":154}],153:[function(t,e,r){"use strict";var i=t("../util/ajax"),n=t("../util/browser"),o=t("../util/mapbox"),a=o.normalizeSpriteURL,s=t("../util/image"),l=s.RGBAImage;e.exports=function(t,e,r){function o(){if(c)r(c);else if(s&&u){var t=n.getImageData(u),e={};for(var i in s){var o=s[i],a=o.width,p=o.height,h=o.x,f=o.y,d=o.sdf,m=o.pixelRatio,v=l.create({width:a,height:p});l.copy(t,v,{x:h,y:f},{x:0,y:0},{width:a,height:p}),e[i]={data:v,pixelRatio:m,sdf:d}}r(null,e)}}if(!t)return void r(null,{});var s,u,c,p=n.devicePixelRatio>1?"@2x":"";i.getJSON(e(a(t,p,".json"),i.ResourceType.SpriteJSON),function(t,e){c||(c=t,s=e,o())}),i.getImage(e(a(t,p,".png"),i.ResourceType.SpriteImage),function(t,e){c||(c=t,u=e,o())})}},{"../util/ajax":201,"../util/browser":202,"../util/image":213,"../util/mapbox":217}],154:[function(t,e,r){"use strict";function i(t,e,r){1===t&&r.readMessage(n,e)}function n(t,e,r){if(3===t){var i=r.readMessage(o,{}),n=i.id,a=i.bitmap,l=i.width,c=i.height,p=i.left,h=i.top,f=i.advance;e.push({id:n,bitmap:s.create({width:l+2*u,height:c+2*u},a),metrics:{width:l,height:c,left:p,top:h,advance:f}})}}function o(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}var a=t("../util/image"),s=a.AlphaImage,l=t("pbf"),u=3;e.exports=function(t){return new l(t).readFields(i,[])},e.exports.GLYPH_PBF_BORDER=u},{"../util/image":213,pbf:29}],155:[function(t,e,r){"use strict";function i(t,e,r){return e.isPaintValueFeatureConstant(t)?e.paint[t]:r.programConfigurations.get(e.id).paintPropertyStatistics[t].max}function n(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function o(t,e,r,i,n){if(!e[0]&&!e[1])return t;var o=a.convert(e);"viewport"===r&&o._rotate(-i);for(var s=[],l=0;l<t.length;l++){for(var u=t[l],c=[],p=0;p<u.length;p++)c.push(u[p].sub(o._mult(n)));s.push(c)}return s}var a=t("@mapbox/point-geometry");e.exports={getMaximumPaintValue:i,translateDistance:n,translate:o}},{"@mapbox/point-geometry":2}],156:[function(t,e,r){"use strict";var i=t("../util/evented"),n=t("./style_layer"),o=t("./load_sprite"),a=t("../render/image_manager"),s=t("../render/glyph_manager"),l=t("./light"),u=t("../render/line_atlas"),c=t("../util/util"),p=t("../util/ajax"),h=t("../util/mapbox"),f=t("../util/browser"),d=t("../util/dispatcher"),m=t("./animation_loop"),v=t("./validate_style"),y=t("../source/source").getType,g=t("../source/source").setType,_=t("../source/query_features"),x=t("../source/source_cache"),b=t("../style-spec/reference/latest"),w=t("../style-spec/function"),T=t("../util/global_worker_pool"),S=t("../style-spec/deref"),z=t("../style-spec/diff"),A=t("../source/rtl_text_plugin"),C=c.pick(z.operations,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition"]),E=c.pick(z.operations,["setCenter","setZoom","setBearing","setPitch"]),k=function(t){function e(e,r,i){var n=this;t.call(this),i=c.extend({validate:"string"!=typeof e||!h.isMapboxURL(e)},i);var l=function(t,e){return n.map?n.map._transformRequest(t,e):{url:t}};this.map=r,this.animationLoop=r&&r.animationLoop||new m,this.dispatcher=new d(T(),this),this.imageManager=new a,this.glyphManager=new s(l,i.localIdeographFontFamily),this.lineAtlas=new u(256,512),this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory={},this._loaded=!1,c.bindAll(["_redoPlacement"],this),this._resetUpdates(),this.setEventedParent(r),this.fire("dataloading",{dataType:"style"});var y=this;this._rtlTextPluginCallback=A.registerForPluginAvailability(function(t){y.dispatcher.broadcast("loadRTLTextPlugin",t.pluginBlobURL,t.errorCallback);for(var e in y.sourceCaches)y.sourceCaches[e].reload()});var g=function(t,e){if(t)n.fire("error",{error:t});else if(e){if(i.validate&&v.emitErrors(n,v(e)))return;n._loaded=!0,n.stylesheet=e,n.updateClasses();for(var r in e.sources)n.addSource(r,e.sources[r],i);o(e.sprite,l,function(t,e){if(t)n.fire("error",t);else if(e)for(var r in e)n.imageManager.addImage(r,e[r]);n.imageManager.setLoaded(!0)}),n.glyphManager.setURL(e.glyphs),n._resolve(),n.fire("data",{dataType:"style"}),n.fire("style.load")}};"string"==typeof e?p.getJSON(l(h.normalizeStyleURL(e),p.ResourceType.Style),g):f.frame(function(){return g(null,e)}),this.on("data",function(t){if("source"===t.dataType&&"metadata"===t.sourceDataType){var e=n.sourceCaches[t.sourceId];if(e){var r=e.getSource();if(r&&r.vectorLayerIds)for(var i in n._layers){var o=n._layers[i];o.source===r.id&&n._validateLayer(o)}}}})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._validateLayer=function(t){var e=this.sourceCaches[t.source];if(e){var r=t.sourceLayer;if(r){var i=e.getSource();("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(r))&&this.fire("error",{error:new Error('Source layer "'+r+'" does not exist on source "'+i.id+'" as specified by style layer "'+t.id+'"')})}}},e.prototype.loaded=function(){var t=this;if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var e in t.sourceCaches)if(!t.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()},e.prototype._resolve=function(){var t=this,e=S(this.stylesheet.layers);this._order=e.map(function(t){return t.id}),this._layers={};for(var r=0,i=e;r<i.length;r+=1){var o=i[r];o=n.create(o),o.setEventedParent(t,{layer:{id:o.id}}),t._layers[o.id]=o}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new l(this.stylesheet.light)},e.prototype._serializeLayers=function(t){var e=this;return t.map(function(t){return e._layers[t].serialize()})},e.prototype._applyClasses=function(t,e){var r=this;if(this._loaded){t=t||[],e=e||{transition:!0};var i=this.stylesheet.transition||{},n=this._updatedAllPaintProps?this._layers:this._updatedPaintProps;for(var o in n){var a=r._layers[o],s=r._updatedPaintProps[o];if(r._updatedAllPaintProps||s.all)a.updatePaintTransitions(t,e,i,r.animationLoop,r.zoomHistory);else for(var l in s)r._layers[o].updatePaintTransition(l,t,e,i,r.animationLoop,r.zoomHistory)}this.light.updateLightTransitions(e,i,this.animationLoop)}},e.prototype._recalculate=function(t){var e=this;if(this._loaded){for(var r in e.sourceCaches)e.sourceCaches[r].used=!1;this._updateZoomHistory(t);for(var i=0,n=e._order;i<n.length;i+=1){var o=n[i],a=e._layers[o];a.recalculate(t),!a.isHidden(t)&&a.source&&(e.sourceCaches[a.source].used=!0)}this.light.recalculate(t),Math.floor(this.z)!==Math.floor(t)&&this.animationLoop.set(300),this.z=t}},e.prototype._updateZoomHistory=function(t){var e=this.zoomHistory;void 0===e.lastIntegerZoom&&(e.lastIntegerZoom=Math.floor(t),e.lastIntegerZoomTime=0,e.lastZoom=t),Math.floor(e.lastZoom)<Math.floor(t)?(e.lastIntegerZoom=Math.floor(t),e.lastIntegerZoomTime=Date.now()):Math.floor(e.lastZoom)>Math.floor(t)&&(e.lastIntegerZoom=Math.floor(t+1),e.lastIntegerZoomTime=Date.now()),e.lastZoom=t},e.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},e.prototype.update=function(t,e){var r=this;if(this._changed){var i=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);(i.length||n.length||this._updatedSymbolOrder)&&this._updateWorkerLayers(i,n);for(var o in r._updatedSources){var a=r._updatedSources[o];"reload"===a?r._reloadSource(o):"clear"===a&&r._clearSource(o)}this._applyClasses(t,e),this._resetUpdates(),this.fire("data",{dataType:"style"})}},e.prototype._updateWorkerLayers=function(t,e){var r=this,i=this._updatedSymbolOrder?this._order.filter(function(t){return"symbol"===r._layers[t].type}):null;this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:e,symbolOrder:i})},e.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSymbolOrder=!1,this._updatedSources={},this._updatedPaintProps={},this._updatedAllPaintProps=!1},e.prototype.setState=function(t){var e=this;if(this._checkLoaded(),v.emitErrors(this,v(t)))return!1;t=c.clone(t),t.layers=S(t.layers);var r=z(this.serialize(),t).filter(function(t){return!(t.command in E)});if(0===r.length)return!1;var i=r.filter(function(t){return!(t.command in C)});if(i.length>0)throw new Error("Unimplemented: "+i.map(function(t){return t.command}).join(", ")+".");return r.forEach(function(t){"setTransition"!==t.command&&e[t.command].apply(e,t.args)}),this.stylesheet=t,!0},e.prototype.addImage=function(t,e){if(this.imageManager.getImage(t))return this.fire("error",{error:new Error("An image with this name already exists.")});this.imageManager.addImage(t,e),this.fire("data",{dataType:"style"})},e.prototype.removeImage=function(t){if(!this.imageManager.getImage(t))return this.fire("error",{error:new Error("No image with this name exists.")});this.imageManager.removeImage(t),this.fire("data",{dataType:"style"})},e.prototype.addSource=function(t,e,r){var i=this;if(this._checkLoaded(),void 0!==this.sourceCaches[t])throw new Error("There is already a source with this ID");if(!e.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(e).join(", ")+".");if(!(["vector","raster","geojson","video","image","canvas"].indexOf(e.type)>=0&&this._validate(v.source,"sources."+t,e,null,r))){var n=this.sourceCaches[t]=new x(t,e,this.dispatcher);n.style=this,n.setEventedParent(this,function(){return{isSourceLoaded:i.loaded(),source:n.serialize(),sourceId:t}}),n.onAdd(this.map),this._changed=!0}},e.prototype.removeSource=function(t){if(this._checkLoaded(),void 0===this.sourceCaches[t])throw new Error("There is no source with this ID");var e=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],e.fire("data",{sourceDataType:"metadata",dataType:"source",sourceId:t}),e.setEventedParent(null),e.clearTiles(),e.onRemove&&e.onRemove(this.map),this._changed=!0},e.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},e.prototype.addLayer=function(t,e,r){this._checkLoaded();var i=t.id;if("object"==typeof t.source&&(this.addSource(i,t.source),t=c.clone(t),t=c.extend(t,{source:i})),!this._validate(v.layer,"layers."+i,t,{arrayIndex:-1},r)){var o=n.create(t);this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}});var a=e?this._order.indexOf(e):this._order.length;if(this._order.splice(a,0,i),this._layers[i]=o,this._removedLayers[i]&&o.source){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o),"symbol"===o.type&&(this._updatedSymbolOrder=!0),this.updateClasses(i)}},e.prototype.moveLayer=function(t,e){this._checkLoaded(),this._changed=!0;var r=this._layers[t];if(!r)return void this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot be moved.")});var i=this._order.indexOf(t);this._order.splice(i,1);var n=e?this._order.indexOf(e):this._order.length;this._order.splice(n,0,t),"symbol"===r.type&&(this._updatedSymbolOrder=!0,r.source&&!this._updatedSources[r.source]&&(this._updatedSources[r.source]="reload",this.sourceCaches[r.source].pause()))},e.prototype.removeLayer=function(t){this._checkLoaded();var e=this._layers[t];if(!e)return void this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot be removed.")});e.setEventedParent(null);var r=this._order.indexOf(t);this._order.splice(r,1),"symbol"===e.type&&(this._updatedSymbolOrder=!0),this._changed=!0,this._removedLayers[t]=e,delete this._layers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t]},e.prototype.getLayer=function(t){return this._layers[t]},e.prototype.setLayerZoomRange=function(t,e,r){this._checkLoaded();var i=this.getLayer(t);if(!i)return void this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot have zoom extent.")});i.minzoom===e&&i.maxzoom===r||(null!=e&&(i.minzoom=e),null!=r&&(i.maxzoom=r),this._updateLayer(i))},e.prototype.setFilter=function(t,e){this._checkLoaded();var r=this.getLayer(t);if(!r)return void this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot be filtered.")});null!==e&&void 0!==e&&this._validate(v.filter,"layers."+r.id+".filter",e)||c.deepEqual(r.filter,e)||(r.filter=c.clone(e),this._updateLayer(r))},e.prototype.getFilter=function(t){return c.clone(this.getLayer(t).filter)},e.prototype.setLayoutProperty=function(t,e,r){this._checkLoaded();var i=this.getLayer(t);if(!i)return void this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")});c.deepEqual(i.getLayoutProperty(e),r)||(i.setLayoutProperty(e,r),this._updateLayer(i))},e.prototype.getLayoutProperty=function(t,e){return this.getLayer(t).getLayoutProperty(e)},e.prototype.setPaintProperty=function(t,e,r,i){this._checkLoaded();var n=this.getLayer(t);if(!n)return void this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")});if(!c.deepEqual(n.getPaintProperty(e,i),r)){var o=n.isPaintValueFeatureConstant(e);n.setPaintProperty(e,r,i),!(r&&w.isFunctionDefinition(r)&&"$zoom"!==r.property&&void 0!==r.property)&&o||this._updateLayer(n),this.updateClasses(t,e)}},e.prototype.getPaintProperty=function(t,e,r){return this.getLayer(t).getPaintProperty(e,r)},e.prototype.getTransition=function(){return c.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},e.prototype.updateClasses=function(t,e){if(this._changed=!0,t){var r=this._updatedPaintProps;r[t]||(r[t]={}),r[t][e||"all"]=!0}else this._updatedAllPaintProps=!0},e.prototype.serialize=function(){var t=this;return c.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:c.mapObject(this.sourceCaches,function(t){return t.serialize()}),layers:this._order.map(function(e){return t._layers[e].serialize()})},function(t){return void 0!==t})},e.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},e.prototype._flattenRenderedFeatures=function(t){for(var e=this,r=[],i=this._order.length-1;i>=0;i--)for(var n=e._order[i],o=0,a=t;o<a.length;o+=1){var s=a[o],l=s[n];if(l)for(var u=0,c=l;u<c.length;u+=1){var p=c[u];r.push(p)}}return r},e.prototype.queryRenderedFeatures=function(t,e,r,i){var n=this;e&&e.filter&&this._validate(v.filter,"queryRenderedFeatures.filter",e.filter);var o={};if(e&&e.layers){if(!Array.isArray(e.layers))return this.fire("error",{error:"parameters.layers must be an Array."}),[];for(var a=0,s=e.layers;a<s.length;a+=1){var l=s[a],u=n._layers[l];if(!u)return n.fire("error",{error:"The layer '"+l+"' does not exist in the map's style and cannot be queried for features."}),[];o[u.source]=!0}}var c=[];for(var p in n.sourceCaches)if(!e.layers||o[p]){var h=_.rendered(n.sourceCaches[p],n._layers,t,e,r,i);c.push(h)}return this._flattenRenderedFeatures(c)},e.prototype.querySourceFeatures=function(t,e){e&&e.filter&&this._validate(v.filter,"querySourceFeatures.filter",e.filter);var r=this.sourceCaches[t];return r?_.source(r,e):[]},e.prototype.addSourceType=function(t,e,r){return y(t)?r(new Error('A source type called "'+t+'" already exists.')):(g(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},r):r(null,null))},e.prototype.getLight=function(){return this.light.getLight()},e.prototype.setLight=function(t,e){this._checkLoaded();var r=this.light.getLight(),i=!1;for(var n in t)if(!c.deepEqual(t[n],r[n])){i=!0;break}if(i){var o=this.stylesheet.transition||{};this.light.setLight(t),this.light.updateLightTransitions(e||{transition:!0},o,this.animationLoop)}},e.prototype._validate=function(t,e,r,i,n){return(!n||!1!==n.validate)&&v.emitErrors(this,t.call(v,c.extend({key:e,style:this.serialize(),value:r,styleSpec:b},i)))},e.prototype._remove=function(){var t=this;A.evented.off("pluginAvailable",this._rtlTextPluginCallback);for(var e in t.sourceCaches)t.sourceCaches[e].clearTiles();this.dispatcher.remove()},e.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},e.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},e.prototype._updateSources=function(t){var e=this;for(var r in e.sourceCaches)e.sourceCaches[r].update(t)},e.prototype._redoPlacement=function(){var t=this;for(var e in t.sourceCaches)t.sourceCaches[e].redoPlacement()},e.prototype.getImages=function(t,e,r){this.imageManager.getImages(e.icons,r)},e.prototype.getGlyphs=function(t,e,r){this.glyphManager.getGlyphs(e.stacks,r)},e}(i);e.exports=k},{"../render/glyph_manager":75,"../render/image_manager":77,"../render/line_atlas":78,"../source/query_features":94,"../source/rtl_text_plugin":96,"../source/source":97,"../source/source_cache":98,"../style-spec/deref":107,"../style-spec/diff":108,"../style-spec/function":112,"../style-spec/reference/latest":123,"../util/ajax":201,"../util/browser":202,"../util/dispatcher":208,"../util/evented":210,"../util/global_worker_pool":212,"../util/mapbox":217,"../util/util":223,"./animation_loop":150,"./light":151,"./load_sprite":153,"./style_layer":158,"./validate_style":166}],157:[function(t,e,r){"use strict";var i=t("../style-spec/function"),n=t("../util/util"),o=function(t,e){var r=this;if(this.value=n.clone(e),this.isFunction=i.isFunctionDefinition(e),this.json=JSON.stringify(this.value),this.minimum=t.minimum,this.function=i(this.value,t),this.isFeatureConstant=this.function.isFeatureConstant,this.isZoomConstant=this.function.isZoomConstant,this.isFeatureConstant||this.isZoomConstant){if(!this.isZoomConstant){this.stopZoomLevels=[];for(var o=0,a=r.value.stops;o<a.length;o+=1){var s=a[o];r.stopZoomLevels.indexOf(s[0])<0&&r.stopZoomLevels.push(s[0])}}}else{this.stopZoomLevels=[];for(var l=[],u=0,c=r.value.stops;u<c.length;u+=1){var p=c[u],h=p[0].zoom;r.stopZoomLevels.indexOf(h)<0&&(r.stopZoomLevels.push(h),l.push([h,l.length]))}this._functionInterpolationT=i({type:"exponential",stops:l,base:e.base},{type:"number"})}};o.prototype.calculate=function(t,e){var r=this.function(t&&t.zoom,e||{});return void 0!==this.minimum&&r<this.minimum?this.minimum:r},o.prototype.calculateInterpolationT=function(t){return this.isFeatureConstant||this.isZoomConstant?0:this._functionInterpolationT(t&&t.zoom,{})},e.exports=o},{"../style-spec/function":112,"../util/util":223}],158:[function(t,e,r){"use strict";function i(t){return t.value}var n=t("../util/util"),o=t("./style_transition"),a=t("./style_declaration"),s=t("../style-spec/reference/latest"),l=t("./validate_style"),u=t("./../style-spec/util/parse_color"),c=t("../util/evented"),p=function(t){function e(e){var r=this;t.call(this),this.id=e.id,this.metadata=e.metadata,this.type=e.type,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),this.paint={},this.layout={},this._paintSpecifications=s["paint_"+this.type],this._layoutSpecifications=s["layout_"+this.type],this._paintTransitions={},this._paintTransitionOptions={},this._paintDeclarations={},this._layoutDeclarations={},this._layoutFunctions={};var i,n,o={validate:!1};for(var a in e){var l=a.match(/^paint(?:\.(.*))?$/);if(l){var u=l[1]||"";for(i in e[a])r.setPaintProperty(i,e[a][i],u,o)}}for(n in e.layout)r.setLayoutProperty(n,e.layout[n],o);for(i in r._paintSpecifications)r.paint[i]=r.getPaintValue(i);for(n in r._layoutSpecifications)r._updateLayoutValue(n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setLayoutProperty=function(t,e,r){if(null==e)delete this._layoutDeclarations[t];else{var i="layers."+this.id+".layout."+t;if(this._validate(l.layoutProperty,i,t,e,r))return;this._layoutDeclarations[t]=new a(this._layoutSpecifications[t],e)}this._updateLayoutValue(t)},e.prototype.getLayoutProperty=function(t){return this._layoutDeclarations[t]&&this._layoutDeclarations[t].value},e.prototype.getLayoutValue=function(t,e,r){var i=this._layoutSpecifications[t],n=this._layoutDeclarations[t];return n?n.calculate(e,r):i.default},e.prototype.setPaintProperty=function(t,e,r,i){var o="layers."+this.id+(r?'["paint.'+r+'"].':".paint.")+t;if(n.endsWith(t,"-transition"))if(this._paintTransitionOptions[r||""]||(this._paintTransitionOptions[r||""]={}),null===e||void 0===e)delete this._paintTransitionOptions[r||""][t];else{if(this._validate(l.paintProperty,o,t,e,i))return;this._paintTransitionOptions[r||""][t]=e}else if(this._paintDeclarations[r||""]||(this._paintDeclarations[r||""]={}),null===e||void 0===e)delete this._paintDeclarations[r||""][t];else{if(this._validate(l.paintProperty,o,t,e,i))return;this._paintDeclarations[r||""][t]=new a(this._paintSpecifications[t],e)}},e.prototype.getPaintProperty=function(t,e){return e=e||"",n.endsWith(t,"-transition")?this._paintTransitionOptions[e]&&this._paintTransitionOptions[e][t]:this._paintDeclarations[e]&&this._paintDeclarations[e][t]&&this._paintDeclarations[e][t].value},e.prototype.getPaintValue=function(t,e,r){var i=this._paintSpecifications[t],n=this._paintTransitions[t];return n?n.calculate(e,r):"color"===i.type&&i.default?u(i.default):i.default},e.prototype.getPaintValueStopZoomLevels=function(t){var e=this._paintTransitions[t];return e?e.declaration.stopZoomLevels:[]},e.prototype.getLayoutValueStopZoomLevels=function(t){var e=this._layoutDeclarations[t];return e?e.stopZoomLevels:[]},e.prototype.getPaintInterpolationT=function(t,e){return this._paintTransitions[t].declaration.calculateInterpolationT(e)},e.prototype.getLayoutInterpolationT=function(t,e){return this._layoutDeclarations[t].calculateInterpolationT(e)},e.prototype.isPaintValueFeatureConstant=function(t){var e=this._paintTransitions[t];return!e||e.declaration.isFeatureConstant},e.prototype.isLayoutValueFeatureConstant=function(t){var e=this._layoutDeclarations[t];return!e||e.isFeatureConstant},e.prototype.isPaintValueZoomConstant=function(t){var e=this._paintTransitions[t];return!e||e.declaration.isZoomConstant},e.prototype.isLayoutValueZoomConstant=function(t){var e=this._layoutDeclarations[t];return!e||e.isZoomConstant},e.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.layout.visibility},e.prototype.updatePaintTransitions=function(t,e,r,i,o){for(var a=this,s=n.extend({},this._paintDeclarations[""]),l=0;l<t.length;l++)n.extend(s,a._paintDeclarations[t[l]]);var u;for(u in s)a._applyPaintDeclaration(u,s[u],e,r,i,o);for(u in a._paintTransitions)u in s||a._applyPaintDeclaration(u,null,e,r,i,o)},e.prototype.updatePaintTransition=function(t,e,r,i,n,o){for(var a=this,s=this._paintDeclarations[""][t],l=0;l<e.length;l++){var u=a._paintDeclarations[e[l]];u&&u[t]&&(s=u[t])}this._applyPaintDeclaration(t,s,r,i,n,o)},e.prototype.recalculate=function(t){var e=this;for(var r in e._paintTransitions)e.paint[r]=e.getPaintValue(r,{zoom:t});for(var i in e._layoutFunctions)e.layout[i]=e.getLayoutValue(i,{zoom:t})},e.prototype.serialize=function(){var t=this,e={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:n.mapObject(this._layoutDeclarations,i)};for(var r in t._paintDeclarations)e[""===r?"paint":"paint."+r]=n.mapObject(t._paintDeclarations[r],i);return n.filterObject(e,function(t,e){return void 0!==t&&!("layout"===e&&!Object.keys(t).length)})},e.prototype._applyPaintDeclaration=function(t,e,r,i,s,l){var u=r.transition?this._paintTransitions[t]:void 0,c=this._paintSpecifications[t];if(null!==e&&void 0!==e||(e=new a(c,c.default)),!u||u.declaration.json!==e.json){var p=n.extend({duration:300,delay:0},i,this.getPaintProperty(t+"-transition")),h=this._paintTransitions[t]=new o(c,e,u,p,l);h.instant()||(h.loopID=s.set(h.endTime-Date.now())),u&&s.cancel(u.loopID)}},e.prototype._updateLayoutValue=function(t){var e=this._layoutDeclarations[t];e&&e.isFunction?this._layoutFunctions[t]=!0:(delete this._layoutFunctions[t],this.layout[t]=this.getLayoutValue(t))},e.prototype._validate=function(t,e,r,i,n){return(!n||!1!==n.validate)&&l.emitErrors(this,t.call(l,{key:e,layerType:this.type,objectKey:r,value:i,styleSpec:s,style:{glyphs:!0,sprite:!0}}))},e.prototype.has3DPass=function(){return!1},e}(c);e.exports=p;var h={circle:t("./style_layer/circle_style_layer"),fill:t("./style_layer/fill_style_layer"),"fill-extrusion":t("./style_layer/fill_extrusion_style_layer"),line:t("./style_layer/line_style_layer"),symbol:t("./style_layer/symbol_style_layer"),background:p,raster:p};p.create=function(t){return new h[t.type](t)}},{"../style-spec/reference/latest":123,"../util/evented":210,"../util/util":223,"./../style-spec/util/parse_color":128,"./style_declaration":157,"./style_layer/circle_style_layer":159,"./style_layer/fill_extrusion_style_layer":160,"./style_layer/fill_style_layer":161,"./style_layer/line_style_layer":162,"./style_layer/symbol_style_layer":163,"./style_transition":165,"./validate_style":166}],159:[function(t,e,r){"use strict";var i=t("../style_layer"),n=t("../../data/bucket/circle_bucket"),o=t("../../util/intersection_tests"),a=o.multiPolygonIntersectsBufferedMultiPoint,s=t("../query_utils"),l=s.getMaximumPaintValue,u=s.translateDistance,c=s.translate,p=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new n(t)},e.prototype.queryRadius=function(t){return l("circle-radius",this,t)+u(this.paint["circle-translate"])},e.prototype.queryIntersectsFeature=function(t,e,r,i,n,o){var s=c(t,this.getPaintValue("circle-translate",{zoom:i},e.properties),this.getPaintValue("circle-translate-anchor",{zoom:i},e.properties),n,o),l=this.getPaintValue("circle-radius",{zoom:i},e.properties)*o;return a(s,r,l)},e}(i);e.exports=p},{"../../data/bucket/circle_bucket":43,"../../util/intersection_tests":214,"../query_utils":155,"../style_layer":158}],160:[function(t,e,r){"use strict";var i=t("../style_layer"),n=t("../../data/bucket/fill_extrusion_bucket"),o=t("../../util/intersection_tests"),a=o.multiPolygonIntersectsMultiPolygon,s=t("../query_utils"),l=s.translateDistance,u=s.translate,c=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getPaintValue=function(e,r,i){var n=t.prototype.getPaintValue.call(this,e,r,i);return"fill-extrusion-color"===e&&n&&(n[3]=1),n},e.prototype.createBucket=function(t){return new n(t)},e.prototype.queryRadius=function(){return l(this.paint["fill-extrusion-translate"])},e.prototype.queryIntersectsFeature=function(t,e,r,i,n,o){var s=u(t,this.getPaintValue("fill-extrusion-translate",{zoom:i},e.properties),this.getPaintValue("fill-extrusion-translate-anchor",{zoom:i},e.properties),n,o);return a(s,r)},e.prototype.has3DPass=function(){return 0!==this.paint["fill-extrusion-opacity"]&&"none"!==this.layout.visibility},e}(i);e.exports=c},{"../../data/bucket/fill_extrusion_bucket":45,"../../util/intersection_tests":214,"../query_utils":155,"../style_layer":158}],161:[function(t,e,r){"use strict";var i=t("../style_layer"),n=t("../../data/bucket/fill_bucket"),o=t("../../util/intersection_tests"),a=o.multiPolygonIntersectsMultiPolygon,s=t("../query_utils"),l=s.translateDistance,u=s.translate,c=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getPaintValue=function(e,r,i){var n=this;if("fill-outline-color"===e){if(void 0===this.getPaintProperty("fill-outline-color"))return t.prototype.getPaintValue.call(this,"fill-color",r,i);for(var o=this._paintTransitions["fill-outline-color"];o;){if(!(o&&o.declaration&&o.declaration.value))return t.prototype.getPaintValue.call(n,"fill-color",r,i);o=o.oldTransition}}return t.prototype.getPaintValue.call(this,e,r,i)},e.prototype.getPaintValueStopZoomLevels=function(e){return"fill-outline-color"===e&&void 0===this.getPaintProperty("fill-outline-color")?t.prototype.getPaintValueStopZoomLevels.call(this,"fill-color"):t.prototype.getPaintValueStopZoomLevels.call(this,e)},e.prototype.getPaintInterpolationT=function(e,r){return"fill-outline-color"===e&&void 0===this.getPaintProperty("fill-outline-color")?t.prototype.getPaintInterpolationT.call(this,"fill-color",r):t.prototype.getPaintInterpolationT.call(this,e,r)},e.prototype.isPaintValueFeatureConstant=function(e){return"fill-outline-color"===e&&void 0===this.getPaintProperty("fill-outline-color")?t.prototype.isPaintValueFeatureConstant.call(this,"fill-color"):t.prototype.isPaintValueFeatureConstant.call(this,e)},e.prototype.isPaintValueZoomConstant=function(e){return"fill-outline-color"===e&&void 0===this.getPaintProperty("fill-outline-color")?t.prototype.isPaintValueZoomConstant.call(this,"fill-color"):t.prototype.isPaintValueZoomConstant.call(this,e)},e.prototype.createBucket=function(t){return new n(t)},e.prototype.queryRadius=function(){return l(this.paint["fill-translate"])},e.prototype.queryIntersectsFeature=function(t,e,r,i,n,o){var s=u(t,this.getPaintValue("fill-translate",{zoom:i},e.properties),this.getPaintValue("fill-translate-anchor",{zoom:i},e.properties),n,o);return a(s,r)},e}(i);e.exports=c},{"../../data/bucket/fill_bucket":44,"../../util/intersection_tests":214,"../query_utils":155,"../style_layer":158}],162:[function(t,e,r){"use strict";function i(t,e){return e>0?e+2*t:t}function n(t,e){for(var r=[],i=new o(0,0),n=0;n<t.length;n++){for(var a=t[n],s=[],l=0;l<a.length;l++){var u=a[l-1],c=a[l],p=a[l+1],h=0===l?i:c.sub(u)._unit()._perp(),f=l===a.length-1?i:p.sub(c)._unit()._perp(),d=h._add(f)._unit(),m=d.x*f.x+d.y*f.y;d._mult(1/m),s.push(d._mult(e)._add(c))}r.push(s)}return r}var o=t("@mapbox/point-geometry"),a=t("../style_layer"),s=t("../../data/bucket/line_bucket"),l=t("../../util/intersection_tests"),u=l.multiPolygonIntersectsBufferedMultiLine,c=t("../query_utils"),p=c.getMaximumPaintValue,h=c.translateDistance,f=c.translate,d=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new s(t)},e.prototype.queryRadius=function(t){var e=t,r=i(p("line-width",this,e),p("line-gap-width",this,e)),n=p("line-offset",this,e);return r/2+Math.abs(n)+h(this.paint["line-translate"])},e.prototype.queryIntersectsFeature=function(t,e,r,o,a,s){var l=f(t,this.getPaintValue("line-translate",{zoom:o},e.properties),this.getPaintValue("line-translate-anchor",{zoom:o},e.properties),a,s),c=s/2*i(this.getPaintValue("line-width",{zoom:o},e.properties),this.getPaintValue("line-gap-width",{zoom:o},e.properties)),p=this.getPaintValue("line-offset",{zoom:o},e.properties);return p&&(r=n(r,p*s)),u(l,r,c)},e}(a);e.exports=d},{"../../data/bucket/line_bucket":46,"../../util/intersection_tests":214,"../query_utils":155,"../style_layer":158,"@mapbox/point-geometry":2}],163:[function(t,e,r){"use strict";var i=t("../style_layer"),n=t("../../data/bucket/symbol_bucket"),o=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLayoutValue=function(e,r,i){var n=t.prototype.getLayoutValue.call(this,e,r,i);if("auto"!==n)return n;switch(e){case"text-rotation-alignment":case"icon-rotation-alignment":return"line"===this.getLayoutValue("symbol-placement",r,i)?"map":"viewport";case"text-pitch-alignment":return this.getLayoutValue("text-rotation-alignment",r,i);case"icon-pitch-alignment":return this.getLayoutValue("icon-rotation-alignment",r,i);default:return n}},e.prototype.createBucket=function(t){return new n(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e}(i);e.exports=o},{"../../data/bucket/symbol_bucket":47,"../style_layer":158}],164:[function(t,e,r){"use strict";var i=t("./style_layer"),n=t("../util/util"),o=t("../style-spec/feature_filter"),a=t("../style-spec/group_by_layout"),s=function(t){t&&this.replace(t)};s.prototype.replace=function(t){var e=this;this.symbolOrder=[];for(var r=0,i=t;r<i.length;r+=1){var n=i[r];"symbol"===n.type&&e.symbolOrder.push(n.id)}this._layerConfigs={},this._layers={},this.update(t,[])},s.prototype.update=function(t,e,r){for(var s=this,l=0,u=t;l<u.length;l+=1){var c=u[l];s._layerConfigs[c.id]=c;var p=s._layers[c.id]=i.create(c);p.updatePaintTransitions({},{transition:!1}),p.filter=o(p.filter)}for(var h=0,f=e;h<f.length;h+=1){var d=f[h];delete s._layerConfigs[d],delete s._layers[d]}r&&(this.symbolOrder=r),this.familiesBySource={};for(var m=a(n.values(this._layerConfigs)),v=0,y=m;v<y.length;v+=1){var g=y[v],_=g.map(function(t){return s._layers[t.id]}),x=_[0];if(!x.layout||"none"!==x.layout.visibility){var b=x.source||"",w=s.familiesBySource[b];w||(w=s.familiesBySource[b]={});var T=x.sourceLayer||"_geojsonTileLayer",S=w[T];S||(S=w[T]=[]),S.push(_)}}},e.exports=s},{"../style-spec/feature_filter":110,"../style-spec/group_by_layout":113,"../util/util":223,"./style_layer":158}],165:[function(t,e,r){"use strict";function i(t,e,r){if(void 0!==t&&void 0!==e)return{from:t.to,fromScale:t.toScale,to:e.to,toScale:e.toScale,t:r}}var n=t("../util/util"),o=t("../style-spec/util/interpolate"),a={lastIntegerZoom:0,lastIntegerZoomTime:0,lastZoom:0},s=function(t,e,r,n,s){this.declaration=e,this.startTime=this.endTime=(new Date).getTime(),this.oldTransition=r,this.duration=n.duration||0,this.delay=n.delay||0,this.zoomTransitioned="piecewise-constant"===t.function&&t.transition,this.interp=this.zoomTransitioned?i:o[t.type],this.zoomHistory=s||a,this.instant()||(this.endTime=this.startTime+this.duration+this.delay),r&&r.endTime<=this.startTime&&delete r.oldTransition};s.prototype.instant=function(){return!this.oldTransition||!this.interp||0===this.duration&&0===this.delay},s.prototype.calculate=function(t,e,r){var i=this._calculateTargetValue(t,e);if(this.instant())return i;if((r=r||Date.now())>=this.endTime)return i;var o=this.oldTransition.calculate(t,e,this.startTime),a=n.easeCubicInOut((r-this.startTime-this.delay)/this.duration);return this.interp(o,i,a)},s.prototype._calculateTargetValue=function(t,e){if(!this.zoomTransitioned)return this.declaration.calculate(t,e);var r=t.zoom,i=this.zoomHistory.lastIntegerZoom,n=r>i?2:.5,a=this.declaration.calculate({zoom:r>i?r-1:r+1},e),s=this.declaration.calculate({zoom:r},e),l=Math.min((Date.now()-this.zoomHistory.lastIntegerZoomTime)/this.duration,1),u=Math.abs(r-i),c=o(l,1,u);return void 0!==a&&void 0!==s?{from:a,fromScale:n,to:s,toScale:1,t:c}:void 0},e.exports=s},{"../style-spec/util/interpolate":127,"../util/util":223}],166:[function(t,e,r){"use strict";e.exports=t("../style-spec/validate_style.min"),e.exports.emitErrors=function(t,e){if(e&&e.length){for(var r=0,i=e;r<i.length;r+=1){var n=i[r],o=n.message;t.fire("error",{error:new Error(o)})}return!0}return!1}},{"../style-spec/validate_style.min":149}],167:[function(t,e,r){"use strict";var i=t("@mapbox/point-geometry"),n=function(t){function e(e,r,i,n){t.call(this,e,r),this.angle=i,void 0!==n&&(this.segment=n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(i);e.exports=n},{"@mapbox/point-geometry":2}],168:[function(t,e,r){"use strict";function i(t,e,r,i,n){if(void 0===e.segment)return!0;for(var o=e,a=e.segment+1,s=0;s>-r/2;){if(--a<0)return!1;s-=t[a].dist(o),o=t[a]}s+=t[a].dist(t[a+1]),a++;for(var l=[],u=0;s<r/2;){var c=t[a-1],p=t[a],h=t[a+1];if(!h)return!1;var f=c.angleTo(p)-p.angleTo(h);for(f=Math.abs((f+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:f}),u+=f;s-l[0].distance>i;)u-=l.shift().angleDelta;if(u>n)return!1;a++,s+=p.dist(h)}return!0}e.exports=i},{}],169:[function(t,e,r){"use strict";function i(t,e,r,i,o){for(var a=[],s=0;s<t.length;s++)for(var l=t[s],u=void 0,c=0;c<l.length-1;c++){var p=l[c],h=l[c+1];p.x<e&&h.x<e||(p.x<e?p=new n(e,p.y+(h.y-p.y)*((e-p.x)/(h.x-p.x)))._round():h.x<e&&(h=new n(e,p.y+(h.y-p.y)*((e-p.x)/(h.x-p.x)))._round()),p.y<r&&h.y<r||(p.y<r?p=new n(p.x+(h.x-p.x)*((r-p.y)/(h.y-p.y)),r)._round():h.y<r&&(h=new n(p.x+(h.x-p.x)*((r-p.y)/(h.y-p.y)),r)._round()),p.x>=i&&h.x>=i||(p.x>=i?p=new n(i,p.y+(h.y-p.y)*((i-p.x)/(h.x-p.x)))._round():h.x>=i&&(h=new n(i,p.y+(h.y-p.y)*((i-p.x)/(h.x-p.x)))._round()),p.y>=o&&h.y>=o||(p.y>=o?p=new n(p.x+(h.x-p.x)*((o-p.y)/(h.y-p.y)),o)._round():h.y>=o&&(h=new n(p.x+(h.x-p.x)*((o-p.y)/(h.y-p.y)),o)._round()),u&&p.equals(u[u.length-1])||(u=[p],a.push(u)),u.push(h)))))}return a}var n=t("@mapbox/point-geometry");e.exports=i},{"@mapbox/point-geometry":2}],170:[function(t,e,r){"use strict";var i=t("../util/struct_array"),n=t("@mapbox/point-geometry"),o=i({members:[{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"offsetX"},{type:"Int16",name:"offsetY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Float32",name:"unadjustedMaxScale"},{type:"Float32",name:"maxScale"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"bbox0"},{type:"Int16",name:"bbox1"},{type:"Int16",name:"bbox2"},{type:"Int16",name:"bbox3"},{type:"Float32",name:"placementScale"}]});Object.defineProperty(o.prototype.StructType.prototype,"anchorPoint",{get:function(){return new n(this.anchorPointX,this.anchorPointY)}}),e.exports=o},{"../util/struct_array":220,"@mapbox/point-geometry":2}],171:[function(t,e,r){"use strict";var i=function(t,e,r,i,n,o,a,s,l,u,c){var p=a.top*s-l,h=a.bottom*s+l,f=a.left*s-l,d=a.right*s+l;if(this.boxStartIndex=t.length,u){var m=h-p,v=d-f;if(m>0)if(m=Math.max(10*s,m),c){var y=e[r.segment+1].sub(e[r.segment])._unit()._mult(v),g=[r.sub(y),r.add(y)];this._addLineCollisionBoxes(t,g,r,0,v,m,i,n,o)}else this._addLineCollisionBoxes(t,e,r,r.segment,v,m,i,n,o)}else t.emplaceBack(r.x,r.y,0,0,f,p,d,h,1/0,1/0,i,n,o,0,0,0,0,0);this.boxEndIndex=t.length};i.prototype._addLineCollisionBoxes=function(t,e,r,i,n,o,a,s,l){var u=o/2,c=Math.floor(n/u),p=Math.floor(c/2),h=-o/2,f=r,d=i+1,m=h,v=-n/2,y=v-n/8;do{if(--d<0){if(m>v)return;d=0;break}m-=e[d].dist(f),f=e[d]}while(m>y);for(var g=e[d].dist(e[d+1]),_=-p;_<c+p;_++){var x=_*u,b=v+x;if(x<0&&(b+=x),x>n&&(b+=x-n),!(b<m)){for(;m+g<b;){if(m+=g,++d+1>=e.length)return;g=e[d].dist(e[d+1])}var w=b-m,T=e[d],S=e[d+1],z=S.sub(T)._unit()._mult(w)._add(T)._round(),A=Math.max(Math.abs(b-h)-u/2,0),C=n/2/A;(_<0||_>=c)&&(C=Math.min(C,.99)),t.emplaceBack(z.x,z.y,z.x-r.x,z.y-r.y,-o/2,-o/2,o/2,o/2,C,C,a,s,l,0,0,0,0,0)}}},e.exports=i},{}],172:[function(t,e,r){"use strict";var i=t("@mapbox/point-geometry"),n=t("../data/extent"),o=t("grid-index"),a=t("../util/intersection_tests"),s=function(t,e,r,i,a,s,l){void 0===s&&(s=new o(n,12,6)),void 0===l&&(l=new o(n,12,0)),this.angle=t,this.pitch=e,this.cameraToCenterDistance=r,this.cameraToTileDistance=i,this.grid=s,this.ignoredGrid=l,this.perspectiveRatio=1+.5*(i/r-1),this.minScale=.5/this.perspectiveRatio,this.maxScale=2/this.perspectiveRatio;var u=Math.sin(this.angle),c=Math.cos(this.angle);this.rotationMatrix=[c,-u,u,c],this.reverseRotationMatrix=[c,u,-u,c],this.yStretch=Math.max(1,i/(r*Math.cos(e/180*Math.PI))),this.collisionBoxArray=a,0===a.length&&(a.emplaceBack(),a.emplaceBack(0,0,0,0,0,-n,0,n,1/0,1/0,0,0,0,0,0,0,0,0,0),a.emplaceBack(n,0,0,0,0,-n,0,n,1/0,1/0,0,0,0,0,0,0,0,0,0),a.emplaceBack(0,0,0,0,-n,0,n,0,1/0,1/0,0,0,0,0,0,0,0,0,0),a.emplaceBack(0,n,0,0,-n,0,n,0,1/0,1/0,0,0,0,0,0,0,0,0,0)),this.tempCollisionBox=a.get(0),this.edges=[a.get(1),a.get(2),a.get(3),a.get(4)]};s.deserialize=function(t,e){return new s(t.angle,t.pitch,t.cameraToCenterDistance,t.cameraToTileDistance,e,new o(t.grid),new o(t.ignoredGrid))},s.prototype.serialize=function(t){var e=this.grid.toArrayBuffer(),r=this.ignoredGrid.toArrayBuffer();return t&&(t.push(e),t.push(r)),{angle:this.angle,pitch:this.pitch,cameraToCenterDistance:this.cameraToCenterDistance,cameraToTileDistance:this.cameraToTileDistance,grid:e,ignoredGrid:r}},s.prototype.placeCollisionFeature=function(t,e,r){for(var n=this,o=this.collisionBoxArray,a=this.minScale,s=this.rotationMatrix,l=this.yStretch,u=t.boxStartIndex;u<t.boxEndIndex;u++){var c=o.get(u),p=c.anchorPoint._matMult(s),h=p.x,f=p.y,d=h+c.x1*n.perspectiveRatio,m=f+c.y1*l*n.perspectiveRatio,v=h+c.x2*n.perspectiveRatio,y=f+c.y2*l*n.perspectiveRatio;c.bbox0=d,c.bbox1=m,c.bbox2=v,c.bbox3=y;var g=new i(c.offsetX,c.offsetY)._matMult(s),_=g.x*g.x,x=g.y*g.y,b=x*l*l,w=Math.sqrt((_+b)/(_+x))||1;if(c.maxScale=c.unadjustedMaxScale*w,!e)for(var T=n.grid.query(d,m,v,y),S=0;S<T.length;S++){var z=o.get(T[S]),A=z.anchorPoint._matMult(s);if((a=n.getPlacementScale(a,p,c,A,z))>=n.maxScale)return a}if(r){var C=void 0;if(n.angle){var E=n.reverseRotationMatrix,k=new i(c.x1,c.y1).matMult(E),M=new i(c.x2,c.y1).matMult(E),L=new i(c.x1,c.y2).matMult(E),I=new i(c.x2,c.y2).matMult(E);C=n.tempCollisionBox,C.anchorPointX=c.anchorPoint.x,C.anchorPointY=c.anchorPoint.y,C.x1=Math.min(k.x,M.x,L.x,I.x),C.y1=Math.min(k.y,M.x,L.x,I.x),C.x2=Math.max(k.x,M.x,L.x,I.x),C.y2=Math.max(k.y,M.x,L.x,I.x),C.maxScale=c.maxScale}else C=c;for(var P=0;P<this.edges.length;P++){var R=n.edges[P];if((a=n.getPlacementScale(a,c.anchorPoint,C,R.anchorPoint,R))>=n.maxScale)return a}}}return a},s.prototype.queryRenderedSymbols=function(t,e){var r={},n=[];if(0===t.length||0===this.grid.keys.length&&0===this.ignoredGrid.keys.length)return n;for(var o=this.collisionBoxArray,s=this.rotationMatrix,l=this.yStretch,u=[],c=1/0,p=1/0,h=-1/0,f=-1/0,d=0;d<t.length;d++)for(var m=t[d],v=0;v<m.length;v++){var y=m[v].matMult(s);c=Math.min(c,y.x),p=Math.min(p,y.y),h=Math.max(h,y.x),f=Math.max(f,y.y),u.push(y)}for(var g=this.grid.query(c,p,h,f),_=this.ignoredGrid.query(c,p,h,f),x=0;x<_.length;x++)g.push(_[x]);for(var b=e/this.perspectiveRatio,w=Math.pow(2,Math.ceil(Math.log(b)/Math.LN2*10)/10),T=0;T<g.length;T++){var S=o.get(g[T]),z=S.sourceLayerIndex,A=S.featureIndex;if(void 0===r[z]&&(r[z]={}),!r[z][A]&&!(w<S.placementScale||w>S.maxScale)){var C=S.anchorPoint.matMult(s),E=C.x+S.x1/b,k=C.y+S.y1/b*l,M=C.x+S.x2/b,L=C.y+S.y2/b*l,I=[new i(E,k),new i(M,k),new i(M,L),new i(E,L)];a.polygonIntersectsPolygon(u,I)&&(r[z][A]=!0,n.push(g[T]))}}return n},s.prototype.getPlacementScale=function(t,e,r,i,n){var o=e.x-i.x,a=e.y-i.y,s=(n.x1-r.x2)/o,l=(n.x2-r.x1)/o,u=(n.y1-r.y2)*this.yStretch/a,c=(n.y2-r.y1)*this.yStretch/a;(isNaN(s)||isNaN(l))&&(s=l=1),(isNaN(u)||isNaN(c))&&(u=c=1);var p=Math.min(Math.max(s,l),Math.max(u,c)),h=n.maxScale,f=r.maxScale;return p>h&&(p=h),p>f&&(p=f),p>t&&p>=n.placementScale&&(t=p),t},s.prototype.insertCollisionFeature=function(t,e,r){for(var i=this,n=r?this.ignoredGrid:this.grid,o=this.collisionBoxArray,a=t.boxStartIndex;a<t.boxEndIndex;a++){var s=o.get(a);s.placementScale=e,e<i.maxScale&&(1===i.perspectiveRatio||s.maxScale>=1)&&n.insert(a,s.bbox0,s.bbox1,s.bbox2,s.bbox3)}},e.exports=s},{"../data/extent":48,"../util/intersection_tests":214,"@mapbox/point-geometry":2,"grid-index":22}],173:[function(t,e,r){"use strict";function i(t,e,r,i,o,a,s,l,u){var c=i?.6*a*s:0,p=Math.max(i?i.right-i.left:0,o?o.right-o.left:0),h=0===t[0].x||t[0].x===u||0===t[0].y||t[0].y===u;e-p*s<e/4&&(e=p*s+e/4);var f=2*a;return n(t,h?e/2*l%e:(p/2+f)*s*l%e,e,c,r,p*s,h,!1,u)}function n(t,e,r,i,l,u,c,p,h){for(var f=u/2,d=0,m=0;m<t.length-1;m++)d+=t[m].dist(t[m+1]);for(var v=0,y=e-r,g=[],_=0;_<t.length-1;_++){for(var x=t[_],b=t[_+1],w=x.dist(b),T=b.angleTo(x);y+r<v+w;){y+=r;var S=(y-v)/w,z=o(x.x,b.x,S),A=o(x.y,b.y,S);if(z>=0&&z<h&&A>=0&&A<h&&y-f>=0&&y+f<=d){var C=new a(z,A,T,_);C._round(),i&&!s(t,C,u,i,l)||g.push(C)}}v+=w}return p||g.length||c||(g=n(t,v/2,r,i,l,u,c,!0,h)),g}var o=t("../style-spec/util/interpolate"),a=t("../symbol/anchor"),s=t("./check_max_angle");e.exports=i},{"../style-spec/util/interpolate":127,"../symbol/anchor":167,"./check_max_angle":168}],174:[function(t,e,r){"use strict";e.exports=function(t){function e(e){s.push(t[e]),l++}function r(t,e,r){var i=a[t];return delete a[t],a[e]=i,s[i].geometry[0].pop(),s[i].geometry[0]=s[i].geometry[0].concat(r[0]),i}function i(t,e,r){var i=o[e];return delete o[e],o[t]=i,s[i].geometry[0].shift(),s[i].geometry[0]=r[0].concat(s[i].geometry[0]),i}function n(t,e,r){var i=r?e[0][e[0].length-1]:e[0][0];return t+":"+i.x+":"+i.y}for(var o={},a={},s=[],l=0,u=0;u<t.length;u++){var c=t[u],p=c.geometry,h=c.text;if(h){var f=n(h,p),d=n(h,p,!0);if(f in a&&d in o&&a[f]!==o[d]){var m=i(f,d,p),v=r(f,d,s[m].geometry);delete o[f],delete a[d],a[n(h,s[v].geometry,!0)]=v,s[m].geometry=null}else f in a?r(f,d,p):d in o?i(f,d,p):(e(u),o[f]=l-1,a[d]=l-1)}else e(u)}return s.filter(function(t){return t.geometry})}},{}],175:[function(t,e,r){"use strict";function i(t,e,r,i,n){var o=d.identity(new Float32Array(16));return e?(d.identity(o),d.scale(o,o,[1/n,1/n,1]),r||d.rotateZ(o,o,i.angle)):(d.scale(o,o,[i.width/2,-i.height/2,1]),d.translate(o,o,[1,-1,0]),d.multiply(o,o,t)),o}function n(t,e,r,i,n){var o=d.identity(new Float32Array(16));return e?(d.multiply(o,o,t),d.scale(o,o,[n,n,1]),r||d.rotateZ(o,o,-i.angle)):(d.scale(o,o,[1,-1,1]),d.translate(o,o,[-1,-1,0]),d.scale(o,o,[2/i.width,2/i.height,1])),o}function o(t,e){var r=[t.x,t.y,0,1];m.transformMat4(r,r,e);var i=r[3];return{point:new h(r[0]/i,r[1]/i),signedDistanceFromCamera:i}}function a(t,e,r,i){var n=t[0]/t[3],o=t[1]/t[3];return n>=-r[0]&&n<=r[0]&&o>=-r[1]&&o<=r[1]&&i.frameHistory.isVisible(e)}function s(t,e,r,i,n,s,u,c,f,d){var y=i?t.textSizeData:t.iconSizeData,g=v.evaluateSizeForZoom(y,r.transform,d,i),_=[256/r.width*2+1,256/r.height*2+1],x=i?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;x.clear();for(var b=t.lineVertexArray,w=i?t.placedGlyphArray:t.placedIconArray,T=0;T<w.length;T++){var S=w.get(T),z=[S.anchorX,S.anchorY,0,1];if(m.transformMat4(z,z,e),a(z,S.placementZoom,_,r)){var A=z[3],C=1+.5*(A/r.transform.cameraToCenterDistance-1),E=v.evaluateSizeForFeature(y,g,S),k=u?E*C:E/C,M=new h(S.anchorX,S.anchorY),L=o(M,n).point,I={},P=l(S,k,!1,c,e,n,s,t.glyphOffsetArray,b,x,L,M,I);(P.notEnoughRoom||P.needsFlipping&&l(S,k,!0,c,e,n,s,t.glyphOffsetArray,b,x,L,M,I).notEnoughRoom)&&p(S.numGlyphs,x)}else p(S.numGlyphs,x)}i?t.text.dynamicLayoutVertexBuffer.updateData(x.serialize()):t.icon.dynamicLayoutVertexBuffer.updateData(x.serialize())}function l(t,e,r,i,n,a,s,l,p,f,d,m,v){var y,_=e/24,x=t.lineOffsetX*e,b=t.lineOffsetY*e;if(t.numGlyphs>1){var w=t.glyphStartIndex+t.numGlyphs,T=l.get(t.glyphStartIndex).offsetX,S=l.get(w-1).offsetX,z=t.lineStartIndex,A=t.lineStartIndex+t.lineLength,C=c(_*T,x,b,r,d,m,t.segment,z,A,p,a,v);if(!C)return{notEnoughRoom:!0};var E=c(_*S,x,b,r,d,m,t.segment,z,A,p,a,v);if(!E)return{notEnoughRoom:!0};var k=o(C.point,s).point,M=o(E.point,s).point;if(i&&!r&&(t.vertical?k.y<M.y:k.x>M.x))return{needsFlipping:!0};y=[C];for(var L=t.glyphStartIndex+1;L<w-1;L++){var I=l.get(L);y.push(c(_*I.offsetX,x,b,r,d,m,t.segment,z,A,p,a,v))}y.push(E)}else{if(i&&!r){var P=o(m,n).point,R=p.get(t.lineStartIndex+t.segment+1),D=o(R,n),O=D.signedDistanceFromCamera>0?D.point:u(m,new h(R.x,R.y),P,1,n);if(t.vertical?O.y>P.y:O.x<P.x)return{needsFlipping:!0}}var B=l.get(t.glyphStartIndex),F=c(_*B.offsetX,x,b,r,d,m,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,p,a,v);if(!F)return{notEnoughRoom:!0};y=[F]}for(var j=t.placementZoom,V=0,N=y;V<N.length;V+=1){var U=N[V];g(f,U.point,U.angle,j)}return{}}function u(t,e,r,i,n){var a=o(t.add(t.sub(e)._unit()),n).point,s=r.sub(a);return r.add(s._mult(i/s.mag()))}function c(t,e,r,i,n,a,s,l,c,p,f,d){var m=i?t-e:t+e,v=m>0?1:-1,y=0;i&&(v*=-1,y=Math.PI),v<0&&(y+=Math.PI);for(var g=v>0?l+s:l+s+1,_=n,x=n,b=0,w=0,T=Math.abs(m);b+w<=T;){if((g+=v)<l||g>=c)return null;if(x=_,void 0===(_=d[g])){var S=o(p.get(g),f);_=S.signedDistanceFromCamera>0?d[g]=S.point:u(0===b?a:new h(p.get(g-v).x,p.get(g-v).y),new h(p.get(g).x,p.get(g).y),x,T-b+1,f)}b+=w,w=x.dist(_)}var z=(T-b)/w,A=_.sub(x),C=A.mult(z)._add(x);return C._add(A._unit()._perp()._mult(r*v)),{point:C,angle:y+Math.atan2(_.y-x.y,_.x-x.x)}}function p(t,e){for(var r=0;r<t;r++)g(e,_,0,25)}var h=t("@mapbox/point-geometry"),f=t("@mapbox/gl-matrix"),d=f.mat4,m=f.vec4,v=t("./symbol_size"),y=t("../data/bucket/symbol_bucket"),g=y.addDynamicAttributes;e.exports={updateLineLabels:s,getLabelPlaneMatrix:i,getGlCoordMatrix:n};var _=new h(-1/0,-1/0)},{"../data/bucket/symbol_bucket":47,"./symbol_size":178,"@mapbox/gl-matrix":1,"@mapbox/point-geometry":2}],176:[function(t,e,r){"use strict";function i(t,e,r,i,n,a,s){var l,u,c,p,h=e.image,f=r.layout,d=e.top-1/h.pixelRatio,m=e.left-1/h.pixelRatio,v=e.bottom+1/h.pixelRatio,y=e.right+1/h.pixelRatio;if("none"!==f["icon-text-fit"]&&n){var g=y-m,_=v-d,x=f["text-size"]/24,b=n.left*x,w=n.right*x,T=n.top*x,S=n.bottom*x,z=w-b,A=S-T,C=f["icon-text-fit-padding"][0],E=f["icon-text-fit-padding"][1],k=f["icon-text-fit-padding"][2],M=f["icon-text-fit-padding"][3],L="width"===f["icon-text-fit"]?.5*(A-_):0,I="height"===f["icon-text-fit"]?.5*(z-g):0,P="width"===f["icon-text-fit"]||"both"===f["icon-text-fit"]?z:g,R="height"===f["icon-text-fit"]||"both"===f["icon-text-fit"]?A:_;l=new o(b+I-M,T+L-C),u=new o(b+I+E+P,T+L-C),c=new o(b+I+E+P,T+L+k+R),p=new o(b+I-M,T+L+k+R)}else l=new o(m,d),u=new o(y,d),c=new o(y,v),p=new o(m,v);var D=r.getLayoutValue("icon-rotate",a,s)*Math.PI/180;if(D){var O=Math.sin(D),B=Math.cos(D),F=[B,-O,O,B];l._matMult(F),u._matMult(F),p._matMult(F),c._matMult(F)}return[{tl:l,tr:u,bl:p,br:c,tex:{x:h.textureRect.x-1,y:h.textureRect.y-1,w:h.textureRect.w+2,h:h.textureRect.h+2},writingMode:void 0,glyphOffset:[0,0]}]}function n(t,e,r,i,n,a,l){for(var u=r.getLayoutValue("text-rotate",n,a)*Math.PI/180,c=r.getLayoutValue("text-offset",n,a).map(function(t){return 24*t}),p=e.positionedGlyphs,h=[],f=0;f<p.length;f++){var d=p[f],m=l[d.glyph];if(m){var v=m.rect;if(v){var y=s+1,g=m.metrics.advance/2,_=i?[d.x+g,d.y]:[0,0],x=i?[0,0]:[d.x+g+c[0],d.y+c[1]],b=m.metrics.left-y-g+x[0],w=-m.metrics.top-y+x[1],T=b+v.w,S=w+v.h,z=new o(b,w),A=new o(T,w),C=new o(b,S),E=new o(T,S);if(i&&d.vertical){var k=new o(-g,g),M=-Math.PI/2,L=new o(5,0);z._rotateAround(M,k)._add(L),A._rotateAround(M,k)._add(L),C._rotateAround(M,k)._add(L),E._rotateAround(M,k)._add(L)}if(u){var I=Math.sin(u),P=Math.cos(u),R=[P,-I,I,P];z._matMult(R),A._matMult(R),C._matMult(R),E._matMult(R)}h.push({tl:z,tr:A,bl:C,br:E,tex:v,writingMode:e.writingMode,glyphOffset:_})}}}return h}var o=t("@mapbox/point-geometry"),a=t("../style/parse_glyph_pbf"),s=a.GLYPH_PBF_BORDER;e.exports={getIconQuads:i,getGlyphQuads:n}},{"../style/parse_glyph_pbf":154,"@mapbox/point-geometry":2}],177:[function(t,e,r){"use strict";function i(t,e){for(var r=[],i=0,n=0,o=e;n<o.length;n+=1){var a=o[n];r.push(t.substring(i,a)),i=a}return i<t.length&&r.push(t.substring(i,t.length)),r}function n(t,e,r,n,o,a,s,l,u,p){var f=t.trim();p===_.vertical&&(f=y(f));var d,m=[],v={positionedGlyphs:m,text:f,top:l[1],bottom:l[1],left:l[0],right:l[0],writingMode:p},x=g.processBidirectionalText;return d=x?x(f,c(f,s,r,e)):i(f,c(f,s,r,e)),h(v,e,d,n,o,a,p,s,u),!!m.length&&v}function o(t,e,r,i){for(var n=0,o=0;o<t.length;o++){var a=i[t.charCodeAt(o)];a&&(n+=a.metrics.advance+e)}return n/Math.max(1,Math.ceil(n/r))}function a(t,e,r,i){var n=Math.pow(t-e,2);return i?t<e?n/2:2*n:n+Math.abs(r)*r}function s(t,e){var r=0;return 10===t&&(r-=1e4),40!==t&&65288!==t||(r+=50),41!==e&&65289!==e||(r+=50),r}function l(t,e,r,i,n,o){for(var s=null,l=a(e,r,n,o),u=0,c=i;u<c.length;u+=1){var p=c[u],h=e-p.x,f=a(h,r,n,o)+p.badness;f<=l&&(s=p,l=f)}return{index:t,x:e,priorBreak:s,badness:l}}function u(t){return t?u(t.priorBreak).concat(t.index):[]}function c(t,e,r,i){if(!r)return[];if(!t)return[];for(var n=[],a=o(t,e,r,i),c=0,p=0;p<t.length;p++){var h=t.charCodeAt(p),f=i[h];f&&!x[h]&&(c+=f.metrics.advance+e),p<t.length-1&&(b[h]||v.charAllowsIdeographicBreaking(h))&&n.push(l(p+1,c,a,n,s(h,t.charCodeAt(p+1)),!1))}return u(l(t.length,c,a,n,0,!0))}function p(t){var e=.5,r=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:e,verticalAlign:r}}function h(t,e,r,i,n,o,a,s,l){for(var u=0,c=-17,h=0,m=t.positionedGlyphs,y="right"===o?1:"left"===o?0:.5,g=0,x=r;g<x.length;g+=1){var b=x[g];if(b=b.trim(),b.length){for(var w=m.length,T=0;T<b.length;T++){var S=b.charCodeAt(T),z=e[S];z&&(v.charHasUprightVerticalOrientation(S)&&a!==_.horizontal?(m.push({glyph:S,x:u,y:0,vertical:!0}),u+=l+s):(m.push({glyph:S,x:u,y:c,vertical:!1}),u+=z.metrics.advance+s))}if(m.length!==w){var A=u-s;h=Math.max(A,h),f(m,e,w,m.length-1,y)}u=0,c+=i}else c+=i}var C=p(n),E=C.horizontalAlign,k=C.verticalAlign;d(m,y,E,k,h,i,r.length);var M=r.length*i;t.top+=-k*M,t.bottom=t.top+M,t.left+=-E*h,t.right=t.left+h}function f(t,e,r,i,n){if(n){var o=e[t[i].glyph];if(o)for(var a=o.metrics.advance,s=(t[i].x+a)*n,l=r;l<=i;l++)t[l].x-=s}}function d(t,e,r,i,n,o,a){for(var s=(e-r)*n,l=(-i*a+.5)*o,u=0;u<t.length;u++)t[u].x+=s,t[u].y+=l}function m(t,e,r){var i=p(r),n=i.horizontalAlign,o=i.verticalAlign,a=e[0],s=e[1],l=a-t.displaySize[0]*n,u=l+t.displaySize[0],c=s-t.displaySize[1]*o;return{image:t,top:c,bottom:c+t.displaySize[1],left:l,right:u}}var v=t("../util/script_detection"),y=t("../util/verticalize_punctuation"),g=t("../source/rtl_text_plugin"),_={horizontal:1,vertical:2};e.exports={shapeText:n,shapeIcon:m,WritingMode:_};var x={};x[9]=!0,x[10]=!0,x[11]=!0,x[12]=!0,x[13]=!0,x[32]=!0;var b={};b[10]=!0,b[32]=!0,b[38]=!0,b[40]=!0,b[41]=!0,b[43]=!0,b[45]=!0,b[47]=!0,b[173]=!0,b[183]=!0,b[8203]=!0,b[8208]=!0,b[8211]=!0,b[8231]=!0},{"../source/rtl_text_plugin":96,"../util/script_detection":218,"../util/verticalize_punctuation":225}],178:[function(t,e,r){"use strict";function i(t,e,r){var i=e;return t.isFeatureConstant?i.uSize:t.isZoomConstant?r.lowerSize/10:o.number(r.lowerSize/10,r.upperSize/10,i.uSizeT)}function n(t,e,r,i){var n={};if(t.isZoomConstant||t.isFeatureConstant)if(t.isFeatureConstant&&!t.isZoomConstant){var o;if("interval"===t.functionType)o=r.getLayoutValue(i?"text-size":"icon-size",{zoom:e.zoom});else{var a="interval"===t.functionType?0:s(e.zoom,t.functionBase,t.coveringZoomRange[0],t.coveringZoomRange[1]),u=t.coveringStopValues[0],c=t.coveringStopValues[1];o=u+(c-u)*l.clamp(a,0,1)}n.uSize=o}else t.isFeatureConstant&&t.isZoomConstant&&(n.uSize=t.layoutSize);else{var p=s(e.zoom,t.functionBase,t.coveringZoomRange[0],t.coveringZoomRange[1]);n.uSizeT=l.clamp(p,0,1)}return n}var o=t("../style-spec/util/interpolate"),a=t("../style-spec/function"),s=a.interpolationFactor,l=t("../util/util");e.exports={evaluateSizeForFeature:i,evaluateSizeForZoom:n}},{"../style-spec/function":112,"../style-spec/util/interpolate":127,"../util/util":223}],179:[function(t,e,r){"use strict";var i=t("../source/rtl_text_plugin");e.exports=function(t,e,r,n){var o=e.getLayoutValue("text-transform",r,n);return"uppercase"===o?t=t.toLocaleUpperCase():"lowercase"===o&&(t=t.toLocaleLowerCase()),i.applyArabicShaping&&(t=i.applyArabicShaping(t)),t}},{"../source/rtl_text_plugin":96}],180:[function(t,e,r){"use strict";var i=t("../util/dom"),n=t("@mapbox/point-geometry"),o={scrollZoom:t("./handler/scroll_zoom"),boxZoom:t("./handler/box_zoom"),dragRotate:t("./handler/drag_rotate"),dragPan:t("./handler/drag_pan"),keyboard:t("./handler/keyboard"),doubleClickZoom:t("./handler/dblclick_zoom"),touchZoomRotate:t("./handler/touch_zoom_rotate")};e.exports=function(t,e){function r(t){y("mouseout",t)}function a(e){t.stop(),w=i.mousePos(_,e),y("mousedown",e),b=!0}function s(e){var r=t.dragRotate&&t.dragRotate.isActive();x&&!r&&y("contextmenu",x),x=null,b=!1,y("mouseup",e)}function l(e){if(!(t.dragPan&&t.dragPan.isActive()||t.dragRotate&&t.dragRotate.isActive())){for(var r=e.toElement||e.target;r&&r!==_;)r=r.parentNode;r===_&&y("mousemove",e)}}function u(e){t.stop(),g("touchstart",e),!e.touches||e.touches.length>1||(T?(clearTimeout(T),T=null,y("dblclick",e)):T=setTimeout(f,300))}function c(t){g("touchmove",t)}function p(t){g("touchend",t)}function h(t){g("touchcancel",t)}function f(){T=null}function d(t){i.mousePos(_,t).equals(w)&&y("click",t)}function m(t){y("dblclick",t),t.preventDefault()}function v(e){var r=t.dragRotate&&t.dragRotate.isActive();b||r?b&&(x=e):y("contextmenu",e),e.preventDefault()}function y(e,r){var n=i.mousePos(_,r);return t.fire(e,{lngLat:t.unproject(n),point:n,originalEvent:r})}function g(e,r){var o=i.touchPos(_,r),a=o.reduce(function(t,e,r,i){return t.add(e.div(i.length))},new n(0,0));return t.fire(e,{lngLat:t.unproject(a),point:a,lngLats:o.map(function(e){return t.unproject(e)},this),points:o,originalEvent:r})}var _=t.getCanvasContainer(),x=null,b=!1,w=null,T=null;for(var S in o)t[S]=new o[S](t,e),e.interactive&&e[S]&&t[S].enable(e[S]);_.addEventListener("mouseout",r,!1),_.addEventListener("mousedown",a,!1),_.addEventListener("mouseup",s,!1),_.addEventListener("mousemove",l,!1),_.addEventListener("touchstart",u,!1),_.addEventListener("touchend",p,!1),_.addEventListener("touchmove",c,!1),_.addEventListener("touchcancel",h,!1),_.addEventListener("click",d,!1),_.addEventListener("dblclick",m,!1),_.addEventListener("contextmenu",v,!1)}},{"../util/dom":209,"./handler/box_zoom":189,"./handler/dblclick_zoom":190,"./handler/drag_pan":191,"./handler/drag_rotate":192,"./handler/keyboard":193,"./handler/scroll_zoom":194,"./handler/touch_zoom_rotate":195,"@mapbox/point-geometry":2}],181:[function(t,e,r){"use strict";var i=t("../util/util"),n=t("../style-spec/util/interpolate"),o=t("../util/browser"),a=t("../geo/lng_lat"),s=t("../geo/lng_lat_bounds"),l=t("@mapbox/point-geometry"),u=t("../util/evented"),c=function(t){function e(e,r){t.call(this),this.moving=!1,this.transform=e,this._bearingSnap=r.bearingSnap}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCenter=function(){return this.transform.center},e.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},e.prototype.panBy=function(t,e,r){return t=l.convert(t).mult(-1),this.panTo(this.transform.center,i.extend({offset:t},e),r)},e.prototype.panTo=function(t,e,r){return this.easeTo(i.extend({center:t},e),r)},e.prototype.getZoom=function(){return this.transform.zoom},e.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},e.prototype.zoomTo=function(t,e,r){return this.easeTo(i.extend({zoom:t},e),r)},e.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},e.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},e.prototype.getBearing=function(){return this.transform.bearing},e.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},e.prototype.rotateTo=function(t,e,r){return this.easeTo(i.extend({bearing:t},e),r)},e.prototype.resetNorth=function(t,e){return this.rotateTo(0,i.extend({duration:1e3},t),e),this},e.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this},e.prototype.getPitch=function(){return this.transform.pitch},e.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},e.prototype.fitBounds=function(t,e,r){if(e=i.extend({padding:{top:0,bottom:0,right:0,left:0},offset:[0,0],maxZoom:this.transform.maxZoom},e),"number"==typeof e.padding){var n=e.padding;e.padding={top:n,bottom:n,right:n,left:n}}if(!i.deepEqual(Object.keys(e.padding).sort(function(t,e){return t<e?-1:t>e?1:0}),["bottom","left","right","top"]))return i.warnOnce("options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'"),this;t=s.convert(t);var o=[e.padding.left-e.padding.right,e.padding.top-e.padding.bottom],a=Math.min(e.padding.right,e.padding.left),u=Math.min(e.padding.top,e.padding.bottom);e.offset=[e.offset[0]+o[0],e.offset[1]+o[1]];var c=l.convert(e.offset),p=this.transform,h=p.project(t.getNorthWest()),f=p.project(t.getSouthEast()),d=f.sub(h),m=(p.width-2*a-2*Math.abs(c.x))/d.x,v=(p.height-2*u-2*Math.abs(c.y))/d.y;return v<0||m<0?(i.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset."),this):(e.center=p.unproject(h.add(f).div(2)),e.zoom=Math.min(p.scaleZoom(p.scale*Math.min(m,v)),e.maxZoom),e.bearing=0,e.linear?this.easeTo(e,r):this.flyTo(e,r))},e.prototype.jumpTo=function(t,e){this.stop();var r=this.transform,i=!1,n=!1,o=!1;return"zoom"in t&&r.zoom!==+t.zoom&&(i=!0,r.zoom=+t.zoom),void 0!==t.center&&(r.center=a.convert(t.center)),"bearing"in t&&r.bearing!==+t.bearing&&(n=!0,r.bearing=+t.bearing),"pitch"in t&&r.pitch!==+t.pitch&&(o=!0,r.pitch=+t.pitch),this.fire("movestart",e).fire("move",e),i&&this.fire("zoomstart",e).fire("zoom",e).fire("zoomend",e),n&&this.fire("rotate",e),o&&this.fire("pitchstart",e).fire("pitch",e).fire("pitchend",e),this.fire("moveend",e)},e.prototype.easeTo=function(t,e){var r=this;this.stop(),t=i.extend({offset:[0,0],duration:500,easing:i.ease},t),!1===t.animate&&(t.duration=0),t.smoothEasing&&0!==t.duration&&(t.easing=this._smoothOutEasing(t.duration));var o=this.transform,s=this.getZoom(),u=this.getBearing(),c=this.getPitch(),p="zoom"in t?+t.zoom:s,h="bearing"in t?this._normalizeBearing(t.bearing,u):u,f="pitch"in t?+t.pitch:c,d=o.centerPoint.add(l.convert(t.offset)),m=o.pointLocation(d),v=a.convert(t.center||m);this._normalizeCenter(v);var y,g,_=o.project(m),x=o.project(v).sub(_),b=o.zoomScale(p-s);return t.around&&(y=a.convert(t.around),g=o.locationPoint(y)),this.zooming=p!==s,this.rotating=u!==h,this.pitching=f!==c,this._prepareEase(e,t.noMoveStart),clearTimeout(this._onEaseEnd),this._ease(function(t){if(this.zooming&&(o.zoom=n(s,p,t)),this.rotating&&(o.bearing=n(u,h,t)),this.pitching&&(o.pitch=n(c,f,t)),y)o.setLocationAtPoint(y,g);else{var r=o.zoomScale(o.zoom-s),i=p>s?Math.min(2,b):Math.max(.5,b),a=Math.pow(i,1-t),l=o.unproject(_.add(x.mult(t*a)).mult(r));o.setLocationAtPoint(o.renderWorldCopies?l.wrap():l,d)}this._fireMoveEvents(e)},function(){t.delayEndEvents?r._onEaseEnd=setTimeout(function(){return r._easeToEnd(e)},t.delayEndEvents):r._easeToEnd(e)},t),this},e.prototype._prepareEase=function(t,e){this.moving=!0,e||this.fire("movestart",t),this.zooming&&this.fire("zoomstart",t),this.pitching&&this.fire("pitchstart",t)},e.prototype._fireMoveEvents=function(t){this.fire("move",t),this.zooming&&this.fire("zoom",t),this.rotating&&this.fire("rotate",t),this.pitching&&this.fire("pitch",t)},e.prototype._easeToEnd=function(t){var e=this.zooming,r=this.pitching;this.moving=!1,this.zooming=!1,this.rotating=!1,this.pitching=!1,e&&this.fire("zoomend",t),r&&this.fire("pitchend",t),this.fire("moveend",t)},e.prototype.flyTo=function(t,e){function r(t){var e=(A*A-z*z+(t?-1:1)*M*M*C*C)/(2*(t?A:z)*M*C);return Math.log(Math.sqrt(e*e+1)-e)}function o(t){return(Math.exp(t)-Math.exp(-t))/2}function s(t){return(Math.exp(t)+Math.exp(-t))/2}function u(t){return o(t)/s(t)}var c=this;this.stop(),t=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},t);var p=this.transform,h=this.getZoom(),f=this.getBearing(),d=this.getPitch(),m="zoom"in t?i.clamp(+t.zoom,p.minZoom,p.maxZoom):h,v="bearing"in t?this._normalizeBearing(t.bearing,f):f,y="pitch"in t?+t.pitch:d,g=p.zoomScale(m-h),_=p.centerPoint.add(l.convert(t.offset)),x=p.pointLocation(_),b=a.convert(t.center||x);this._normalizeCenter(b);var w=p.project(x),T=p.project(b).sub(w),S=t.curve,z=Math.max(p.width,p.height),A=z/g,C=T.mag();if("minZoom"in t){var E=i.clamp(Math.min(t.minZoom,h,m),p.minZoom,p.maxZoom),k=z/p.zoomScale(E-h);S=Math.sqrt(k/C*2)}var M=S*S,L=r(0),I=function(t){return s(L)/s(L+S*t)},P=function(t){return z*((s(L)*u(L+S*t)-o(L))/M)/C},R=(r(1)-L)/S;if(Math.abs(C)<1e-6||isNaN(R)){if(Math.abs(z-A)<1e-6)return this.easeTo(t,e);var D=A<z?-1:1;R=Math.abs(Math.log(A/z))/S,P=function(){return 0},I=function(t){return Math.exp(D*S*t)}}if("duration"in t)t.duration=+t.duration;else{var O="screenSpeed"in t?+t.screenSpeed/S:+t.speed;t.duration=1e3*R/O}return this.zooming=!0,this.rotating=f!==v,this.pitching=y!==d,this._prepareEase(e,!1),this._ease(function(t){var r=t*R,i=1/I(r);p.zoom=h+p.scaleZoom(i),this.rotating&&(p.bearing=n(f,v,t)),this.pitching&&(p.pitch=n(d,y,t));var o=p.unproject(w.add(T.mult(P(r))).mult(i));p.setLocationAtPoint(p.renderWorldCopies?o.wrap():o,_),this._fireMoveEvents(e)},function(){return c._easeToEnd(e)},t),this},e.prototype.isEasing=function(){return!!this._abortFn},e.prototype.isMoving=function(){return this.moving},e.prototype.stop=function(){return this._abortFn&&(this._abortFn(),this._finishEase()),this},e.prototype._ease=function(t,e,r){this._finishFn=e,this._abortFn=o.timed(function(e){t.call(this,r.easing(e)),1===e&&this._finishEase()},!1===r.animate?0:r.duration,this)},e.prototype._finishEase=function(){delete this._abortFn;var t=this._finishFn;delete this._finishFn,t.call(this)},e.prototype._normalizeBearing=function(t,e){t=i.wrap(t,-180,180);var r=Math.abs(t-e);return Math.abs(t-360-e)<r&&(t-=360),Math.abs(t+360-e)<r&&(t+=360),t},e.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&&!e.lngRange){var r=t.lng-e.center.lng;t.lng+=r>180?-360:r<-180?360:0}},e.prototype._smoothOutEasing=function(t){var e=i.ease;if(this._prevEase){var r=this._prevEase,n=(Date.now()-r.start)/r.duration,o=r.easing(n+.01)-r.easing(n),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);e=i.bezier(a,s,.25,1)}return this._prevEase={start:(new Date).getTime(),duration:t,easing:e},e},e}(u);e.exports=c},{"../geo/lng_lat":58,"../geo/lng_lat_bounds":59,"../style-spec/util/interpolate":127,"../util/browser":202,"../util/evented":210,"../util/util":223,"@mapbox/point-geometry":2}],182:[function(t,e,r){"use strict";var i=t("../../util/dom"),n=t("../../util/util"),o=t("../../util/config"),a=function(t){this.options=t,n.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};a.prototype.getDefaultPosition=function(){return"bottom-right"},a.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=i.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),e&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},a.prototype.onRemove=function(){i.remove(this._container),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0},a.prototype._updateEditLink=function(){var t=this._editLink;t||(t=this._editLink=this._container.querySelector(".mapbox-improve-map"));var e=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:o.ACCESS_TOKEN}];if(t){var r=e.reduce(function(t,r,i){return r.value&&(t+=r.key+"="+r.value+(i<e.length-1?"&":"")),t},"?");t.href="https://www.mapbox.com/feedback/"+r+(this._map._hash?this._map._hash.getHashString(!0):"")}},a.prototype._updateData=function(t){t&&"metadata"===t.sourceDataType&&(this._updateAttributions(),this._updateEditLink())},a.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}var r=this._map.style.sourceCaches;for(var i in r){var n=r[i].getSource();n.attribution&&t.indexOf(n.attribution)<0&&t.push(n.attribution)}t.sort(function(t,e){return t.length-e.length}),t=t.filter(function(e,r){for(var i=r+1;i<t.length;i++)if(t[i].indexOf(e)>=0)return!1;return!0}),this._container.innerHTML=t.join(" | "),this._editLink=null}},a.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")},e.exports=a},{"../../util/config":206,"../../util/dom":209,"../../util/util":223}],183:[function(t,e,r){"use strict";var i=t("../../util/dom"),n=t("../../util/util"),o=t("../../util/window"),a=function(){this._fullscreen=!1,n.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in o.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in o.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in o.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in o.document&&(this._fullscreenchange="MSFullscreenChange"),this._className="mapboxgl-ctrl"};a.prototype.onAdd=function(t){return this._map=t,this._mapContainer=this._map.getContainer(),this._container=i.create("div",this._className+" mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._container.style.display="none",n.warnOnce("This device does not support fullscreen mode.")),this._container},a.prototype.onRemove=function(){i.remove(this._container),this._map=null,o.document.removeEventListener(this._fullscreenchange,this._changeIcon)},a.prototype._checkFullscreenSupport=function(){return!!(o.document.fullscreenEnabled||o.document.mozFullScreenEnabled||o.document.msFullscreenEnabled||o.document.webkitFullscreenEnabled)},a.prototype._setupUI=function(){var t=this._fullscreenButton=i.create("button",this._className+"-icon "+this._className+"-fullscreen",this._container);t.setAttribute("aria-label","Toggle fullscreen"),t.type="button",this._fullscreenButton.addEventListener("click",this._onClickFullscreen),o.document.addEventListener(this._fullscreenchange,this._changeIcon)},a.prototype._isFullscreen=function(){return this._fullscreen},a.prototype._changeIcon=function(){(o.document.fullscreenElement||o.document.mozFullScreenElement||o.document.webkitFullscreenElement||o.document.msFullscreenElement)===this._mapContainer!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(this._className+"-shrink"),this._fullscreenButton.classList.toggle(this._className+"-fullscreen"))},a.prototype._onClickFullscreen=function(){this._isFullscreen()?o.document.exitFullscreen?o.document.exitFullscreen():o.document.mozCancelFullScreen?o.document.mozCancelFullScreen():o.document.msExitFullscreen?o.document.msExitFullscreen():o.document.webkitCancelFullScreen&&o.document.webkitCancelFullScreen():this._mapContainer.requestFullscreen?this._mapContainer.requestFullscreen():this._mapContainer.mozRequestFullScreen?this._mapContainer.mozRequestFullScreen():this._mapContainer.msRequestFullscreen?this._mapContainer.msRequestFullscreen():this._mapContainer.webkitRequestFullscreen&&this._mapContainer.webkitRequestFullscreen()},e.exports=a},{"../../util/dom":209,"../../util/util":223,"../../util/window":204}],184:[function(t,e,r){"use strict";function i(t){void 0!==n?t(n):void 0!==s.navigator.permissions?s.navigator.permissions.query({name:"geolocation"}).then(function(e){n="denied"!==e.state,t(n)}):(n=!!s.navigator.geolocation,t(n))}var n,o=t("../../util/evented"),a=t("../../util/dom"),s=t("../../util/window"),l=t("../../util/util"),u=t("../../geo/lng_lat"),c=t("../marker"),p={positionOptions:{enableHighAccuracy:!1,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0},h=function(t){function e(e){t.call(this),this.options=l.extend({},p,e),l.bindAll(["_onSuccess","_onError","_finish","_setupUI","_updateCamera","_updateMarker","_onClickGeolocate"],this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onAdd=function(t){return this._map=t,this._container=a.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),i(this._setupUI),this._container},e.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(s.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker.remove(),a.remove(this._container),this._map=void 0},e.prototype._onSuccess=function(t){if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(t),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire("geolocate",t),this._finish()},e.prototype._updateCamera=function(t){var e=new u(t.coords.longitude,t.coords.latitude),r=t.coords.accuracy;this._map.fitBounds(e.toBounds(r),this.options.fitBoundsOptions,{geolocateSource:!0})},e.prototype._updateMarker=function(t){t?this._userLocationDotMarker.setLngLat([t.coords.longitude,t.coords.latitude]).addTo(this._map):this._userLocationDotMarker.remove()},e.prototype._onError=function(t){if(this.options.trackUserLocation)if(1===t.code)this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),void 0!==this._geolocationWatchID&&this._clearWatch();else 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")}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire("error",t),this._finish()},e.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},e.prototype._setupUI=function(t){var e=this;!1!==t&&(this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this._geolocateButton=a.create("button","mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",this._container),this._geolocateButton.type="button",this._geolocateButton.setAttribute("aria-label","Geolocate"),this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=a.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new c(this._dotElement),this.options.trackUserLocation&&(this._watchState="OFF")),this._geolocateButton.addEventListener("click",this._onClickGeolocate.bind(this)),this.options.trackUserLocation&&this._map.on("movestart",function(t){t.geolocateSource||"ACTIVE_LOCK"!==e._watchState||(e._watchState="BACKGROUND",e._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),e._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),e.fire("trackuserlocationend"))}))},e.prototype._onClickGeolocate=function(){if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire("trackuserlocationstart");break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":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("trackuserlocationend");break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire("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")}"OFF"===this._watchState&&void 0!==this._geolocationWatchID?this._clearWatch():void 0===this._geolocationWatchID&&(this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._geolocationWatchID=s.navigator.geolocation.watchPosition(this._onSuccess,this._onError,this.options.positionOptions))}else s.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4)},e.prototype._clearWatch=function(){s.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)},e}(o);e.exports=h},{"../../geo/lng_lat":58,"../../util/dom":209,"../../util/evented":210,"../../util/util":223,"../../util/window":204,"../marker":198}],185:[function(t,e,r){"use strict";var i=t("../../util/dom"),n=t("../../util/util"),o=function(){n.bindAll(["_updateLogo"],this)};o.prototype.onAdd=function(t){this._map=t,this._container=i.create("div","mapboxgl-ctrl");var e=i.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.href="https://www.mapbox.com/",e.setAttribute("aria-label","Mapbox logo"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._container},o.prototype.onRemove=function(){i.remove(this._container),this._map.off("sourcedata",this._updateLogo)},o.prototype.getDefaultPosition=function(){return"bottom-left"},o.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},o.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}},e.exports=o},{"../../util/dom":209,"../../util/util":223}],186:[function(t,e,r){"use strict";var i=t("../../util/dom"),n=t("../../util/util"),o=t("../handler/drag_rotate"),a=function(){var t=this;n.bindAll(["_rotateCompassArrow"],this),this._container=i.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this._zoomInButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-in","Zoom In",function(){return t._map.zoomIn()}),this._zoomOutButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-out","Zoom Out",function(){return t._map.zoomOut()}),this._compass=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-compass","Reset North",function(){return t._map.resetNorth()}),this._compassArrow=i.create("span","mapboxgl-ctrl-compass-arrow",this._compass)};a.prototype._rotateCompassArrow=function(){var t="rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=t},a.prototype.onAdd=function(t){return this._map=t,this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new o(t,{button:"left",element:this._compass,pitchWithRotate:!1}),this._handler.enable(),this._container},a.prototype.onRemove=function(){i.remove(this._container),this._map.off("rotate",this._rotateCompassArrow),delete this._map,this._handler.disable(),delete this._handler},a.prototype._createButton=function(t,e,r){var n=i.create("button",t,this._container);return n.type="button",n.setAttribute("aria-label",e),n.addEventListener("click",r),n},e.exports=a},{"../../util/dom":209,"../../util/util":223,"../handler/drag_rotate":192}],187:[function(t,e,r){"use strict";function i(t,e,r){var i=r&&r.maxWidth||100,a=t._container.clientHeight/2,s=o(t.unproject([0,a]),t.unproject([i,a]));if(r&&"imperial"===r.unit){var l=3.2808*s;l>5280?n(e,i,l/5280,"mi"):n(e,i,l,"ft")}else if(r&&"nautical"===r.unit){var u=s/1852;n(e,i,u,"nm")}else n(e,i,s,"m")}function n(t,e,r,i){var n=a(r),o=n/r;"m"===i&&n>=1e3&&(n/=1e3,i="km"),t.style.width=e*o+"px",t.innerHTML=n+i}function o(t,e){var r=Math.PI/180,i=t.lat*r,n=e.lat*r,o=Math.sin(i)*Math.sin(n)+Math.cos(i)*Math.cos(n)*Math.cos((e.lng-t.lng)*r);return 6371e3*Math.acos(Math.min(o,1))}function a(t){var e=Math.pow(10,(""+Math.floor(t)).length-1),r=t/e;return r=r>=10?10:r>=5?5:r>=3?3:r>=2?2:1,e*r}var s=t("../../util/dom"),l=t("../../util/util"),u=function(t){this.options=t,l.bindAll(["_onMove"],this)};u.prototype.getDefaultPosition=function(){return"bottom-left"},u.prototype._onMove=function(){i(this._map,this._container,this.options)},u.prototype.onAdd=function(t){return this._map=t,this._container=s.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},u.prototype.onRemove=function(){s.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},e.exports=u},{"../../util/dom":209,"../../util/util":223}],188:[function(t,e,r){"use strict"},{}],189:[function(t,e,r){"use strict";var i=t("../../util/dom"),n=t("../../geo/lng_lat_bounds"),o=t("../../util/util"),a=t("../../util/window"),s=function(t){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),o.bindAll(["_onMouseDown","_onMouseMove","_onMouseUp","_onKeyDown"],this)};s.prototype.isEnabled=function(){return!!this._enabled},s.prototype.isActive=function(){return!!this._active},s.prototype.enable=function(){this.isEnabled()||(this._map.dragPan&&this._map.dragPan.disable(),this._el.addEventListener("mousedown",this._onMouseDown,!1),this._map.dragPan&&this._map.dragPan.enable(),this._enabled=!0)},s.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onMouseDown),this._enabled=!1)},s.prototype._onMouseDown=function(t){t.shiftKey&&0===t.button&&(a.document.addEventListener("mousemove",this._onMouseMove,!1),a.document.addEventListener("keydown",this._onKeyDown,!1),a.document.addEventListener("mouseup",this._onMouseUp,!1),i.disableDrag(),this._startPos=i.mousePos(this._el,t),this._active=!0)},s.prototype._onMouseMove=function(t){var e=this._startPos,r=i.mousePos(this._el,t);this._box||(this._box=i.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var n=Math.min(e.x,r.x),o=Math.max(e.x,r.x),a=Math.min(e.y,r.y),s=Math.max(e.y,r.y);i.setTransform(this._box,"translate("+n+"px,"+a+"px)"),this._box.style.width=o-n+"px",this._box.style.height=s-a+"px"},s.prototype._onMouseUp=function(t){if(0===t.button){var e=this._startPos,r=i.mousePos(this._el,t),o=(new n).extend(this._map.unproject(e)).extend(this._map.unproject(r));this._finish(),e.x===r.x&&e.y===r.y?this._fireEvent("boxzoomcancel",t):this._map.fitBounds(o,{linear:!0}).fire("boxzoomend",{originalEvent:t,boxZoomBounds:o})}},s.prototype._onKeyDown=function(t){27===t.keyCode&&(this._finish(),this._fireEvent("boxzoomcancel",t))},s.prototype._finish=function(){this._active=!1,a.document.removeEventListener("mousemove",this._onMouseMove,!1),a.document.removeEventListener("keydown",this._onKeyDown,!1),a.document.removeEventListener("mouseup",this._onMouseUp,!1),this._container.classList.remove("mapboxgl-crosshair"),this._box&&(i.remove(this._box),this._box=null),i.enableDrag()},s.prototype._fireEvent=function(t,e){return this._map.fire(t,{originalEvent:e})},e.exports=s},{"../../geo/lng_lat_bounds":59,"../../util/dom":209,"../../util/util":223,"../../util/window":204}],190:[function(t,e,r){"use strict";var i=t("../../util/util"),n=function(t){this._map=t,i.bindAll(["_onDblClick"],this)};n.prototype.isEnabled=function(){return!!this._enabled},n.prototype.enable=function(){this.isEnabled()||(this._map.on("dblclick",this._onDblClick),this._enabled=!0)},n.prototype.disable=function(){this.isEnabled()&&(this._map.off("dblclick",this._onDblClick),this._enabled=!1)},n.prototype._onDblClick=function(t){this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)},e.exports=n},{"../../util/util":223}],191:[function(t,e,r){"use strict";var i=t("../../util/dom"),n=t("../../util/util"),o=t("../../util/window"),a=n.bezier(0,0,.3,1),s=function(t){this._map=t,this._el=t.getCanvasContainer(),n.bindAll(["_onDown","_onMove","_onUp","_onTouchEnd","_onMouseUp"],this)};s.prototype.isEnabled=function(){return!!this._enabled},s.prototype.isActive=function(){return!!this._active},s.prototype.enable=function(){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-drag-pan"),this._el.addEventListener("mousedown",this._onDown),this._el.addEventListener("touchstart",this._onDown),this._enabled=!0)},s.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-drag-pan"),this._el.removeEventListener("mousedown",this._onDown),this._el.removeEventListener("touchstart",this._onDown),this._enabled=!1)},s.prototype._onDown=function(t){this._ignoreEvent(t)||this.isActive()||(t.touches?(o.document.addEventListener("touchmove",this._onMove),o.document.addEventListener("touchend",this._onTouchEnd)):(o.document.addEventListener("mousemove",this._onMove),o.document.addEventListener("mouseup",this._onMouseUp)),o.addEventListener("blur",this._onMouseUp),this._active=!1,this._startPos=this._pos=i.mousePos(this._el,t),this._inertia=[[Date.now(),this._pos]])},s.prototype._onMove=function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._map.moving=!0,this._fireEvent("dragstart",t),this._fireEvent("movestart",t));var e=i.mousePos(this._el,t),r=this._map;r.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),e]),r.transform.setLocationAtPoint(r.transform.pointLocation(this._pos),e),this._fireEvent("drag",t),this._fireEvent("move",t),this._pos=e,t.preventDefault()}},s.prototype._onUp=function(t){var e=this;if(this.isActive()){this._active=!1,this._fireEvent("dragend",t),this._drainInertiaBuffer();var r=function(){e._map.moving=!1,e._fireEvent("moveend",t)},i=this._inertia;if(i.length<2)return void r();var n=i[i.length-1],o=i[0],s=n[1].sub(o[1]),l=(n[0]-o[0])/1e3;if(0===l||n[1].equals(o[1]))return void r();var u=s.mult(.3/l),c=u.mag();c>1400&&(c=1400,u._unit()._mult(c));var p=c/750,h=u.mult(-p/2);this._map.panBy(h,{duration:1e3*p,easing:a,noMoveStart:!0},{originalEvent:t})}},s.prototype._onMouseUp=function(t){this._ignoreEvent(t)||(this._onUp(t),o.document.removeEventListener("mousemove",this._onMove),o.document.removeEventListener("mouseup",this._onMouseUp),o.removeEventListener("blur",this._onMouseUp))},s.prototype._onTouchEnd=function(t){this._ignoreEvent(t)||(this._onUp(t),o.document.removeEventListener("touchmove",this._onMove),o.document.removeEventListener("touchend",this._onTouchEnd))},s.prototype._fireEvent=function(t,e){return this._map.fire(t,{originalEvent:e})},s.prototype._ignoreEvent=function(t){var e=this._map;return!(!e.boxZoom||!e.boxZoom.isActive())||!(!e.dragRotate||!e.dragRotate.isActive())||(t.touches?t.touches.length>1:!!t.ctrlKey||"mousemove"!==t.type&&t.button&&0!==t.button)},s.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now();t.length>0&&e-t[0][0]>160;)t.shift()},e.exports=s},{"../../util/dom":209,"../../util/util":223,"../../util/window":204}],192:[function(t,e,r){"use strict";var i=t("../../util/dom"),n=t("../../util/util"),o=t("../../util/window"),a=n.bezier(0,0,.25,1),s=function(t,e){this._map=t,this._el=e.element||t.getCanvasContainer(),this._button=e.button||"right",this._bearingSnap=e.bearingSnap||0,this._pitchWithRotate=!1!==e.pitchWithRotate,n.bindAll(["_onDown","_onMove","_onUp"],this)};s.prototype.isEnabled=function(){return!!this._enabled},s.prototype.isActive=function(){return!!this._active},s.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onDown),this._enabled=!0)},s.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onDown),this._enabled=!1)},s.prototype._onDown=function(t){if(!(this._map.boxZoom&&this._map.boxZoom.isActive()||this._map.dragPan&&this._map.dragPan.isActive()||this.isActive())){if("right"===this._button){var e=t.ctrlKey?0:2,r=t.button;if(void 0!==o.InstallTrigger&&2===t.button&&t.ctrlKey&&o.navigator.platform.toUpperCase().indexOf("MAC")>=0&&(r=0),r!==e)return}else if(t.ctrlKey||0!==t.button)return;i.disableDrag(),o.document.addEventListener("mousemove",this._onMove,{capture:!0}),o.document.addEventListener("mouseup",this._onUp),o.addEventListener("blur",this._onUp),this._active=!1,this._inertia=[[Date.now(),this._map.getBearing()]],this._startPos=this._pos=i.mousePos(this._el,t),this._center=this._map.transform.centerPoint,t.preventDefault()}},s.prototype._onMove=function(t){this.isActive()||(this._active=!0,this._map.moving=!0,this._fireEvent("rotatestart",t),this._fireEvent("movestart",t),this._pitchWithRotate&&this._fireEvent("pitchstart",t));var e=this._map;e.stop();var r=this._pos,n=i.mousePos(this._el,t),o=.8*(r.x-n.x),a=-.5*(r.y-n.y),s=e.getBearing()-o,l=e.getPitch()-a,u=this._inertia,c=u[u.length-1];this._drainInertiaBuffer(),u.push([Date.now(),e._normalizeBearing(s,c[1])]),e.transform.bearing=s,this._pitchWithRotate&&(this._fireEvent("pitch",t),e.transform.pitch=l),this._fireEvent("rotate",t),this._fireEvent("move",t),this._pos=n},s.prototype._onUp=function(t){var e=this;if(o.document.removeEventListener("mousemove",this._onMove,{capture:!0}),o.document.removeEventListener("mouseup",this._onUp),o.removeEventListener("blur",this._onUp),i.enableDrag(),this.isActive()){this._active=!1,this._fireEvent("rotateend",t),this._drainInertiaBuffer();var r=this._map,n=r.getBearing(),s=this._inertia,l=function(){Math.abs(n)<e._bearingSnap?r.resetNorth({noMoveStart:!0},{originalEvent:t}):(e._map.moving=!1,e._fireEvent("moveend",t)),e._pitchWithRotate&&e._fireEvent("pitchend",t)};if(s.length<2)return void l();var u=s[0],c=s[s.length-1],p=s[s.length-2],h=r._normalizeBearing(n,p[1]),f=c[1]-u[1],d=f<0?-1:1,m=(c[0]-u[0])/1e3;if(0===f||0===m)return void l();var v=Math.abs(f*(.25/m));v>180&&(v=180);var y=v/180;h+=d*v*(y/2),Math.abs(r._normalizeBearing(h,0))<this._bearingSnap&&(h=r._normalizeBearing(0,h)),r.rotateTo(h,{duration:1e3*y,easing:a,noMoveStart:!0},{originalEvent:t})}},s.prototype._fireEvent=function(t,e){return this._map.fire(t,{originalEvent:e})},s.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now();t.length>0&&e-t[0][0]>160;)t.shift()},e.exports=s},{"../../util/dom":209,"../../util/util":223,"../../util/window":204}],193:[function(t,e,r){"use strict";function i(t){return t*(2-t)}var n=t("../../util/util"),o=function(t){this._map=t,this._el=t.getCanvasContainer(),n.bindAll(["_onKeyDown"],this)};o.prototype.isEnabled=function(){return!!this._enabled},o.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},o.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},o.prototype._onKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=0,r=0,n=0,o=0,a=0;switch(t.keyCode){case 61:case 107:case 171:case 187:e=1;break;case 189:case 109:case 173:e=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),o=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),o=1);break;case 38:t.shiftKey?n=1:(t.preventDefault(),a=-1);break;case 40:t.shiftKey?n=-1:(a=1,t.preventDefault());break;default:return}var s=this._map,l=s.getZoom(),u={duration:300,delayEndEvents:500,easing:i,zoom:e?Math.round(l)+e*(t.shiftKey?2:1):l,bearing:s.getBearing()+15*r,pitch:s.getPitch()+10*n,offset:[100*-o,100*-a],center:s.getCenter()};s.easeTo(u,{originalEvent:t})}},e.exports=o},{"../../util/util":223}],194:[function(t,e,r){"use strict";var i=t("../../util/dom"),n=t("../../util/util"),o=t("../../util/browser"),a=t("../../util/window"),s=a.navigator.userAgent.toLowerCase(),l=-1!==s.indexOf("firefox"),u=-1!==s.indexOf("safari")&&-1===s.indexOf("chrom"),c=function(t){this._map=t,this._el=t.getCanvasContainer(),n.bindAll(["_onWheel","_onTimeout"],this)};c.prototype.isEnabled=function(){return!!this._enabled},c.prototype.enable=function(t){this.isEnabled()||(this._el.addEventListener("wheel",this._onWheel,!1),this._el.addEventListener("mousewheel",this._onWheel,!1),this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},c.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("wheel",this._onWheel),this._el.removeEventListener("mousewheel",this._onWheel),this._enabled=!1)},c.prototype._onWheel=function(t){var e=0;"wheel"===t.type?(e=t.deltaY,l&&t.deltaMode===a.WheelEvent.DOM_DELTA_PIXEL&&(e/=o.devicePixelRatio),t.deltaMode===a.WheelEvent.DOM_DELTA_LINE&&(e*=40)):"mousewheel"===t.type&&(e=-t.wheelDeltaY,u&&(e/=3));var r=o.now(),n=r-(this._time||0);this._pos=i.mousePos(this._el,t),this._time=r,0!==e&&e%4.000244140625==0?this._type="wheel":0!==e&&Math.abs(e)<4?this._type="trackpad":n>400?(this._type=null,this._lastValue=e,this._timeout=setTimeout(this._onTimeout,40)):this._type||(this._type=Math.abs(n*e)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,e+=this._lastValue)),t.shiftKey&&e&&(e/=4),this._type&&this._zoom(-e,t),t.preventDefault()},c.prototype._onTimeout=function(){this._type="wheel",this._zoom(-this._lastValue)},c.prototype._zoom=function(t,e){if(0!==t){var r=this._map,i=2/(1+Math.exp(-Math.abs(t/100)));t<0&&0!==i&&(i=1/i);var n=r.ease?r.ease.to:r.transform.scale,o=r.transform.scaleZoom(n*i);r.zoomTo(o,{duration:"wheel"===this._type?200:0,around:this._aroundCenter?r.getCenter():r.unproject(this._pos),delayEndEvents:200,smoothEasing:!0},{originalEvent:e})}},e.exports=c},{"../../util/browser":202,"../../util/dom":209,"../../util/util":223,"../../util/window":204}],195:[function(t,e,r){"use strict";var i=t("../../util/dom"),n=t("../../util/util"),o=t("../../util/window"),a=n.bezier(0,0,.15,1),s=function(t){this._map=t,this._el=t.getCanvasContainer(),n.bindAll(["_onStart","_onMove","_onEnd"],this)};s.prototype.isEnabled=function(){return!!this._enabled},s.prototype.enable=function(t){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-zoom-rotate"),this._el.addEventListener("touchstart",this._onStart,!1),this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},s.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-zoom-rotate"),this._el.removeEventListener("touchstart",this._onStart),this._enabled=!1)},s.prototype.disableRotation=function(){this._rotationDisabled=!0},s.prototype.enableRotation=function(){this._rotationDisabled=!1},s.prototype._onStart=function(t){if(2===t.touches.length){var e=i.mousePos(this._el,t.touches[0]),r=i.mousePos(this._el,t.touches[1]);this._startVec=e.sub(r),this._startScale=this._map.transform.scale,this._startBearing=this._map.transform.bearing,this._gestureIntent=void 0,this._inertia=[],o.document.addEventListener("touchmove",this._onMove,!1),o.document.addEventListener("touchend",this._onEnd,!1)}},s.prototype._onMove=function(t){if(2===t.touches.length){var e=i.mousePos(this._el,t.touches[0]),r=i.mousePos(this._el,t.touches[1]),n=e.add(r).div(2),o=e.sub(r),a=o.mag()/this._startVec.mag(),s=this._rotationDisabled?0:180*o.angleWith(this._startVec)/Math.PI,l=this._map;if(this._gestureIntent){var u={duration:0,around:l.unproject(n)};"rotate"===this._gestureIntent&&(u.bearing=this._startBearing+s),"zoom"!==this._gestureIntent&&"rotate"!==this._gestureIntent||(u.zoom=l.transform.scaleZoom(this._startScale*a)),l.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),a,n]),l.easeTo(u,{originalEvent:t})}else{var c=Math.abs(1-a)>.15;Math.abs(s)>10?this._gestureIntent="rotate":c&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._startVec=o,this._startScale=l.transform.scale,this._startBearing=l.transform.bearing)}t.preventDefault()}},s.prototype._onEnd=function(t){o.document.removeEventListener("touchmove",this._onMove),o.document.removeEventListener("touchend",this._onEnd),this._drainInertiaBuffer();var e=this._inertia,r=this._map;if(e.length<2)return void r.snapToNorth({},{originalEvent:t});var i=e[e.length-1],n=e[0],s=r.transform.scaleZoom(this._startScale*i[1]),l=r.transform.scaleZoom(this._startScale*n[1]),u=s-l,c=(i[0]-n[0])/1e3,p=i[2];if(0===c||s===l)return void r.snapToNorth({},{originalEvent:t});var h=.15*u/c;Math.abs(h)>2.5&&(h=h>0?2.5:-2.5);var f=1e3*Math.abs(h/(12*.15)),d=s+h*f/2e3;d<0&&(d=0),r.easeTo({zoom:d,duration:f,easing:a,around:this._aroundCenter?r.getCenter():r.unproject(p)},{originalEvent:t})},s.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now();t.length>2&&e-t[0][0]>160;)t.shift()},e.exports=s},{"../../util/dom":209,"../../util/util":223,"../../util/window":204}],196:[function(t,e,r){"use strict";var i=t("../util/util"),n=t("../util/window"),o=function(){i.bindAll(["_onHashChange","_updateHash"],this)};o.prototype.addTo=function(t){return this._map=t,n.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},o.prototype.remove=function(){return n.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),delete this._map,this},o.prototype.getHashString=function(t){var e=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,i=Math.max(0,Math.ceil(Math.log(r)/Math.LN2)),n=Math.round(e.lng*Math.pow(10,i))/Math.pow(10,i),o=Math.round(e.lat*Math.pow(10,i))/Math.pow(10,i),a=this._map.getBearing(),s=this._map.getPitch(),l="";return l+=t?"#/"+n+"/"+o+"/"+r:"#"+r+"/"+o+"/"+n,(a||s)&&(l+="/"+Math.round(10*a)/10),s&&(l+="/"+Math.round(s)),l},o.prototype._onHashChange=function(){var t=n.location.hash.replace("#","").split("/");return t.length>=3&&(this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:+(t[3]||0),pitch:+(t[4]||0)}),!0)},o.prototype._updateHash=function(){var t=this.getHashString();n.history.replaceState("","",t)},e.exports=o},{"../util/util":223,"../util/window":204}],197:[function(t,e,r){"use strict";function i(t){t.parentNode&&t.parentNode.removeChild(t)}var n=t("../util/util"),o=t("../util/browser"),a=t("../util/window"),s=t("../util/window"),l=s.HTMLImageElement,u=t("../util/dom"),c=t("../util/ajax"),p=t("../style/style"),h=t("../style/animation_loop"),f=t("../render/painter"),d=t("../geo/transform"),m=t("./hash"),v=t("./bind_handlers"),y=t("./camera"),g=t("../geo/lng_lat"),_=t("../geo/lng_lat_bounds"),x=t("@mapbox/point-geometry"),b=t("./control/attribution_control"),w=t("./control/logo_control"),T=t("mapbox-gl-supported");t("./events");var S={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:22,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,transformRequest:null},z=function(t){function e(e){var r=this;if(e=n.extend({},S,e),null!=e.minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error("maxZoom must be greater than minZoom");var i=new d(e.minZoom,e.maxZoom,e.renderWorldCopies);t.call(this,i,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles;var o=e.transformRequest;if(this._transformRequest=o?function(t,e){return o(t,e)||{url:t}}:function(t){return{url:t}},"string"==typeof e.container){var s=a.document.getElementById(e.container);if(!s)throw new Error("Container '"+e.container+"' not found.");this._container=s}else this._container=e.container;this.animationLoop=new h,e.maxBounds&&this.setMaxBounds(e.maxBounds),n.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored","_update","_render","_onData","_onDataLoading"],this),this._setupContainer(),this._setupPainter(),this.on("move",this._update.bind(this,!1)),this.on("zoom",this._update.bind(this,!0)),this.on("moveend",function(){r.animationLoop.set(300),r._rerender()}),void 0!==a&&(a.addEventListener("online",this._onWindowOnline,!1),a.addEventListener("resize",this._onWindowResize,!1)),v(this,e),this._hash=e.hash&&(new m).addTo(this),this._hash&&this._hash._onHashChange()||this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),this._classes=[],this.resize(),e.classes&&this.setClasses(e.classes),e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new b),this.addControl(new w,e.logoPosition),this.on("style.load",function(){this.transform.unmodified&&this.jumpTo(this.style.stylesheet),this.style.update(this._classes,{transition:!1})}),this.on("data",this._onData),this.on("dataloading",this._onDataLoading)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={showTileBoundaries:{},showCollisionBoxes:{},showOverdrawInspector:{},repaint:{},vertices:{}};return e.prototype.addControl=function(t,e){void 0===e&&t.getDefaultPosition&&(e=t.getDefaultPosition()),void 0===e&&(e="top-right");var r=t.onAdd(this),i=this._controlPositions[e];return-1!==e.indexOf("bottom")?i.insertBefore(r,i.firstChild):i.appendChild(r),this},e.prototype.removeControl=function(t){return t.onRemove(this),this},e.prototype.addClass=function(t,e){return n.warnOnce("Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS."),this._classes.indexOf(t)>=0||""===t?this:(this._classes.push(t),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},e.prototype.removeClass=function(t,e){n.warnOnce("Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.");var r=this._classes.indexOf(t);return r<0||""===t?this:(this._classes.splice(r,1),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},e.prototype.setClasses=function(t,e){n.warnOnce("Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.");for(var r={},i=0;i<t.length;i++)""!==t[i]&&(r[t[i]]=!0);return this._classes=Object.keys(r),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0)},e.prototype.hasClass=function(t){return n.warnOnce("Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS."),this._classes.indexOf(t)>=0},e.prototype.getClasses=function(){return n.warnOnce("Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS."),this._classes},e.prototype.resize=function(){var t=this._containerDimensions(),e=t[0],r=t[1];return this._resizeCanvas(e,r),this.transform.resize(e,r),this.painter.resize(e,r),this.fire("movestart").fire("move").fire("resize").fire("moveend")},e.prototype.getBounds=function(){var t=new _(this.transform.pointLocation(new x(0,this.transform.height)),this.transform.pointLocation(new x(this.transform.width,0)));return(this.transform.angle||this.transform.pitch)&&(t.extend(this.transform.pointLocation(new x(this.transform.size.x,0))),t.extend(this.transform.pointLocation(new x(0,this.transform.size.y)))),t},e.prototype.getMaxBounds=function(){return this.transform.latRange&&2===this.transform.latRange.length&&this.transform.lngRange&&2===this.transform.lngRange.length?new _([this.transform.lngRange[0],this.transform.latRange[0]],[this.transform.lngRange[1],this.transform.latRange[1]]):null},e.prototype.setMaxBounds=function(t){if(t){var e=_.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update()}else null!==t&&void 0!==t||(this.transform.lngRange=null,this.transform.latRange=null,this._update());return this},e.prototype.setMinZoom=function(t){if((t=null===t||void 0===t?0:t)>=0&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()<t&&this.setZoom(t),this;throw new Error("minZoom must be between 0 and the current maxZoom, inclusive")},e.prototype.getMinZoom=function(){return this.transform.minZoom},e.prototype.setMaxZoom=function(t){if((t=null===t||void 0===t?22:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")},e.prototype.getMaxZoom=function(){return this.transform.maxZoom},e.prototype.project=function(t){return this.transform.locationPoint(g.convert(t))},e.prototype.unproject=function(t){return this.transform.pointLocation(x.convert(t))},e.prototype.on=function(e,r,i){var o=this;if(void 0===i)return t.prototype.on.call(this,e,r);var a=function(){if("mouseenter"===e||"mouseover"===e){var t=!1;return{layer:r,listener:i,delegates:{mousemove:function(a){var s=o.getLayer(r)?o.queryRenderedFeatures(a.point,{layers:[r]}):[];s.length?t||(t=!0,i.call(o,n.extend({features:s},a,{type:e}))):t=!1},mouseout:function(){t=!1}}}}if("mouseleave"===e||"mouseout"===e){var a=!1;return{layer:r,listener:i,delegates:{mousemove:function(t){(o.getLayer(r)?o.queryRenderedFeatures(t.point,{layers:[r]}):[]).length?a=!0:a&&(a=!1,i.call(o,n.extend({},t,{type:e})))},mouseout:function(t){a&&(a=!1,i.call(o,n.extend({},t,{type:e})))}}}}var s=function(t){var e=o.getLayer(r)?o.queryRenderedFeatures(t.point,{layers:[r]}):[];e.length&&i.call(o,n.extend({features:e},t))};return{layer:r,listener:i,delegates:(l={},l[e]=s,l)};var l}();this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(a);for(var s in a.delegates)o.on(s,a.delegates[s]);return this},e.prototype.off=function(e,r,i){var n=this;if(void 0===i)return t.prototype.off.call(this,e,r);if(this._delegatedListeners&&this._delegatedListeners[e])for(var o=this._delegatedListeners[e],a=0;a<o.length;a++){var s=o[a];if(s.layer===r&&s.listener===i){for(var l in s.delegates)n.off(l,s.delegates[l]);return o.splice(a,1),n}}return this},e.prototype.queryRenderedFeatures=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r,i={};return 2===t.length?(r=arguments[0],i=arguments[1]):1===t.length&&function(t){return t instanceof x||Array.isArray(t)}(t[0])?r=t[0]:1===t.length&&(i=t[0]),this.style?this.style.queryRenderedFeatures(this._makeQueryGeometry(r),i,this.transform.zoom,this.transform.angle):[]},e.prototype._makeQueryGeometry=function(t){var e=this;void 0===t&&(t=[x.convert([0,0]),x.convert([this.transform.width,this.transform.height])]);var r;if(t instanceof x||"number"==typeof t[0])r=[x.convert(t)];else{var i=[x.convert(t[0]),x.convert(t[1])];r=[i[0],new x(i[1].x,i[0].y),i[1],new x(i[0].x,i[1].y),i[0]]}return r=r.map(function(t){return e.transform.pointCoordinate(t)})},e.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},e.prototype.setStyle=function(t,e){if((!e||!1!==e.diff&&!e.localIdeographFontFamily)&&this.style&&t&&!(t instanceof p)&&"string"!=typeof t)try{return this.style.setState(t)&&this._update(!0),this}catch(t){n.warnOnce("Unable to perform style diff: "+(t.message||t.error||t)+". Rebuilding the style from scratch.")}return this.style&&(this.style.setEventedParent(null),this.style._remove(),this.off("rotate",this.style._redoPlacement),this.off("pitch",this.style._redoPlacement),this.off("move",this.style._redoPlacement)),t?(this.style=t instanceof p?t:new p(t,this,e||{}),this.style.setEventedParent(this,{style:this.style}),this.on("rotate",this.style._redoPlacement),this.on("pitch",this.style._redoPlacement),this.on("move",this.style._redoPlacement),this):(this.style=null,this)},e.prototype.getStyle=function(){if(this.style)return this.style.serialize()},e.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():n.warnOnce("There is no style added to the map.")},e.prototype.addSource=function(t,e){return this.style.addSource(t,e),this._update(!0),this},e.prototype.isSourceLoaded=function(t){var e=this.style&&this.style.sourceCaches[t];return void 0===e?void this.fire("error",{error:new Error("There is no source with ID '"+t+"'")}):e.loaded()},e.prototype.areTilesLoaded=function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var r=t[e],i=r._tiles;for(var n in i){var o=i[n];if("loaded"!==o.state&&"errored"!==o.state)return!1}}return!0},e.prototype.addSourceType=function(t,e,r){return this.style.addSourceType(t,e,r)},e.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0),this},e.prototype.getSource=function(t){return this.style.getSource(t)},e.prototype.addImage=function(t,e,r){void 0===r&&(r={});var i=r.pixelRatio;void 0===i&&(i=1);var n=r.sdf;if(void 0===n&&(n=!1),e instanceof l)e=o.getImageData(e);else if(void 0===e.width||void 0===e.height)return this.fire("error",{error:new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")});this.style.addImage(t,{data:e,pixelRatio:i,sdf:n})},e.prototype.removeImage=function(t){this.style.removeImage(t)},e.prototype.loadImage=function(t,e){c.getImage(this._transformRequest(t,c.ResourceType.Image),e)},e.prototype.addLayer=function(t,e){return this.style.addLayer(t,e),this._update(!0),this},e.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0),this},e.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0),this},e.prototype.getLayer=function(t){return this.style.getLayer(t)},e.prototype.setFilter=function(t,e){return this.style.setFilter(t,e),this._update(!0),this},e.prototype.setLayerZoomRange=function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0),this},e.prototype.getFilter=function(t){return this.style.getFilter(t)},e.prototype.setPaintProperty=function(t,e,r,i){return this.style.setPaintProperty(t,e,r,i),this._update(!0),this},e.prototype.getPaintProperty=function(t,e,r){return this.style.getPaintProperty(t,e,r)},e.prototype.setLayoutProperty=function(t,e,r){return this.style.setLayoutProperty(t,e,r),this._update(!0),this},e.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},e.prototype.setLight=function(t){return this.style.setLight(t),this._update(!0),this},e.prototype.getLight=function(){return this.style.getLight()},e.prototype.getContainer=function(){return this._container},e.prototype.getCanvasContainer=function(){return this._canvasContainer},e.prototype.getCanvas=function(){return this._canvas},e.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),[t,e]},e.prototype._setupContainer=function(){var t=this._container;t.classList.add("mapboxgl-map");var e=this._canvasContainer=u.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=u.create("canvas","mapboxgl-canvas",e),this._canvas.style.position="absolute",this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map");var r=this._containerDimensions();this._resizeCanvas(r[0],r[1]);var i=this._controlContainer=u.create("div","mapboxgl-control-container",t),n=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(t){n[t]=u.create("div","mapboxgl-ctrl-"+t,i)})},e.prototype._resizeCanvas=function(t,e){var r=a.devicePixelRatio||1;this._canvas.width=r*t,this._canvas.height=r*e,this._canvas.style.width=t+"px",this._canvas.style.height=e+"px"},e.prototype._setupPainter=function(){var t=n.extend({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer},T.webGLContextAttributes),e=this._canvas.getContext("webgl",t)||this._canvas.getContext("experimental-webgl",t);if(!e)return void this.fire("error",{error:new Error("Failed to initialize WebGL")});this.painter=new f(e,this.transform)},e.prototype._contextLost=function(t){t.preventDefault(),this._frameId&&(o.cancelFrame(this._frameId),this._frameId=null),this.fire("webglcontextlost",{originalEvent:t})},e.prototype._contextRestored=function(t){this._setupPainter(),this.resize(),this._update(),this.fire("webglcontextrestored",{originalEvent:t})},e.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!(!this.style||!this.style.loaded())},e.prototype._update=function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender(),this):this},e.prototype._render=function(){return this.style&&this._styleDirty&&(this._styleDirty=!1,this.style.update(this._classes,this._classOptions),this._classOptions=null,this.style._recalculate(this.transform.zoom)),this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.rotating,zooming:this.zooming}),this.fire("render"),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire("load")),this._frameId=null,this.animationLoop.stopped()||(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty)&&this._rerender(),this},e.prototype.remove=function(){this._hash&&this._hash.remove(),o.cancelFrame(this._frameId),this._frameId=null,this.setStyle(null),void 0!==a&&(a.removeEventListener("resize",this._onWindowResize,!1),a.removeEventListener("online",this._onWindowOnline,!1));var t=this.painter.gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),i(this._canvasContainer),i(this._controlContainer),this._container.classList.remove("mapboxgl-map"),this.fire("remove")},e.prototype._rerender=function(){this.style&&!this._frameId&&(this._frameId=o.frame(this._render))},e.prototype._onWindowOnline=function(){this._update()},e.prototype._onWindowResize=function(){this._trackResize&&this.stop().resize()._update()},r.showTileBoundaries.get=function(){return!!this._showTileBoundaries},r.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},r.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},r.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,this.style._redoPlacement())},r.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},r.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},r.repaint.get=function(){return!!this._repaint},r.repaint.set=function(t){this._repaint=t,this._update()},r.vertices.get=function(){return!!this._vertices},r.vertices.set=function(t){this._vertices=t,this._update()},e.prototype._onData=function(t){this._update("style"===t.dataType),this.fire(t.dataType+"data",t)},e.prototype._onDataLoading=function(t){this.fire(t.dataType+"dataloading",t)},Object.defineProperties(e.prototype,r),e}(y);e.exports=z},{"../geo/lng_lat":58,"../geo/lng_lat_bounds":59,"../geo/transform":60,"../render/painter":79,"../style/animation_loop":150,"../style/style":156,"../util/ajax":201,"../util/browser":202,"../util/dom":209,"../util/util":223,"../util/window":204,"./bind_handlers":180,"./camera":181,"./control/attribution_control":182,"./control/logo_control":185,"./events":188,"./hash":196,"@mapbox/point-geometry":2,"mapbox-gl-supported":28}],198:[function(t,e,r){"use strict";var i=t("../util/dom"),n=t("../geo/lng_lat"),o=t("@mapbox/point-geometry"),a=t("../util/smart_wrap"),s=t("../util/util"),l=s.bindAll,u=function(t,e){this._offset=o.convert(e&&e.offset||[0,0]),l(["_update","_onMapClick"],this),t||(t=i.create("div")),t.classList.add("mapboxgl-marker"),this._element=t,this._popup=null};u.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),this._update(),this._map.on("click",this._onMapClick),this},u.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),delete this._map),i.remove(this._element),this._popup&&this._popup.remove(),this},u.prototype.getLngLat=function(){return this._lngLat},u.prototype.setLngLat=function(t){return this._lngLat=n.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},u.prototype.getElement=function(){return this._element},u.prototype.setPopup=function(t){return this._popup&&(this._popup.remove(),this._popup=null),t&&("offset"in t.options||(t.options.offset=this._offset),this._popup=t,this._popup.setLngLat(this._lngLat)),this},u.prototype._onMapClick=function(t){var e=t.originalEvent.target,r=this._element;this._popup&&(e===r||r.contains(e))&&this.togglePopup()},u.prototype.getPopup=function(){return this._popup},u.prototype.togglePopup=function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this},u.prototype._update=function(t){this._map&&(this._map.transform.renderWorldCopies&&(this._lngLat=a(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset),t&&"moveend"!==t.type||(this._pos=this._pos.round()),i.setTransform(this._element,"translate(-50%, -50%) translate("+this._pos.x+"px, "+this._pos.y+"px)"))},e.exports=u},{"../geo/lng_lat":58,"../util/dom":209,"../util/smart_wrap":219,"../util/util":223,"@mapbox/point-geometry":2}],199:[function(t,e,r){"use strict";function i(t){if(t){if("number"==typeof t){var e=Math.round(Math.sqrt(.5*Math.pow(t,2)));return{top:new l(0,t),"top-left":new l(e,e),"top-right":new l(-e,e),bottom:new l(0,-t),"bottom-left":new l(e,-e),"bottom-right":new l(-e,-e),left:new l(t,0),right:new l(-t,0)}}if(t instanceof l||Array.isArray(t)){var r=l.convert(t);return{top:r,"top-left":r,"top-right":r,bottom:r,"bottom-left":r,"bottom-right":r,left:r,right:r}}return{top:l.convert(t.top||[0,0]),"top-left":l.convert(t["top-left"]||[0,0]),"top-right":l.convert(t["top-right"]||[0,0]),bottom:l.convert(t.bottom||[0,0]),"bottom-left":l.convert(t["bottom-left"]||[0,0]),"bottom-right":l.convert(t["bottom-right"]||[0,0]),left:l.convert(t.left||[0,0]),right:l.convert(t.right||[0,0])}}return i(new l(0,0))}var n=t("../util/util"),o=t("../util/evented"),a=t("../util/dom"),s=t("../geo/lng_lat"),l=t("@mapbox/point-geometry"),u=t("../util/window"),c=t("../util/smart_wrap"),p={closeButton:!0,closeOnClick:!0},h=function(t){function e(e){t.call(this),this.options=n.extend(Object.create(p),e),n.bindAll(["_update","_onClickClose"],this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addTo=function(t){return this._map=t,this._map.on("move",this._update),this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._update(),this},e.prototype.isOpen=function(){return!!this._map},e.prototype.remove=function(){return this._content&&a.remove(this._content),this._container&&(a.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),delete this._map),this.fire("close"),this},e.prototype.getLngLat=function(){return this._lngLat},e.prototype.setLngLat=function(t){return this._lngLat=s.convert(t),this._pos=null,this._update(),this},e.prototype.setText=function(t){return this.setDOMContent(u.document.createTextNode(t))},e.prototype.setHTML=function(t){var e,r=u.document.createDocumentFragment(),i=u.document.createElement("body");for(i.innerHTML=t;e=i.firstChild;)r.appendChild(e);return this.setDOMContent(r)},e.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},e.prototype._createContent=function(){this._content&&a.remove(this._content),this._content=a.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=a.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._onClickClose))},e.prototype._update=function(){if(this._map&&this._lngLat&&this._content){this._container||(this._container=a.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=a.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content)),this._map.transform.renderWorldCopies&&(this._lngLat=c(this._lngLat,this._pos,this._map.transform));var t=this._pos=this._map.project(this._lngLat),e=this.options.anchor,r=i(this.options.offset);if(!e){var n=this._container.offsetWidth,o=this._container.offsetHeight;e=t.y+r.bottom.y<o?["top"]:t.y>this._map.transform.height-o?["bottom"]:[],t.x<n/2?e.push("left"):t.x>this._map.transform.width-n/2&&e.push("right"),e=0===e.length?"bottom":e.join("-")}var s=t.add(r[e]).round(),l={top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"},u=this._container.classList;for(var p in l)u.remove("mapboxgl-popup-anchor-"+p);u.add("mapboxgl-popup-anchor-"+e),a.setTransform(this._container,l[e]+" translate("+s.x+"px,"+s.y+"px)")}},e.prototype._onClickClose=function(){this.remove()},e}(o);e.exports=h},{"../geo/lng_lat":58,"../util/dom":209,"../util/evented":210,"../util/smart_wrap":219,"../util/util":223,"../util/window":204,"@mapbox/point-geometry":2}],200:[function(t,e,r){"use strict";var i=t("./util"),n=function(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.callbackID=0,i.bindAll(["receive"],this),this.target.addEventListener("message",this.receive,!1)};n.prototype.send=function(t,e,r,i,n){var o=r?this.mapId+":"+this.callbackID++:null;r&&(this.callbacks[o]=r),this.target.postMessage({targetMapId:n,sourceMapId:this.mapId,type:t,id:String(o),data:e},i)},n.prototype.receive=function(t){var e,r=this,i=t.data,n=i.id;if(!i.targetMapId||this.mapId===i.targetMapId){var o=function(t,e,i){r.target.postMessage({sourceMapId:r.mapId,type:"<response>",id:String(n),error:t?String(t):null,data:e},i)};if("<response>"===i.type)e=this.callbacks[i.id],delete this.callbacks[i.id],e&&i.error?e(new Error(i.error)):e&&e(null,i.data);else if(void 0!==i.id&&this.parent[i.type])this.parent[i.type](i.sourceMapId,i.data,o);else if(void 0!==i.id&&this.parent.getWorkerSource){var a=i.type.split("."),s=this.parent.getWorkerSource(i.sourceMapId,a[0]);s[a[1]](i.data,o)}else this.parent[i.type](i.data)}},n.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)},e.exports=n},{"./util":223}],201:[function(t,e,r){"use strict";function i(t){var e=new o.XMLHttpRequest;e.open("GET",t.url,!0);for(var r in t.headers)e.setRequestHeader(r,t.headers[r]);return e.withCredentials="include"===t.credentials,e}function n(t){var e=o.document.createElement("a");return e.href=t,e.protocol===o.document.location.protocol&&e.host===o.document.location.host}var o=t("./window"),a={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};r.ResourceType=a,"function"==typeof Object.freeze&&Object.freeze(a);var s=function(t){function e(e,r){t.call(this,e),this.status=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error);r.getJSON=function(t,e){var r=i(t);return r.setRequestHeader("Accept","application/json"),r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if(r.status>=200&&r.status<300&&r.response){var t;try{t=JSON.parse(r.response)}catch(t){return e(t)}e(null,t)}else e(new s(r.statusText,r.status))},r.send(),r},r.getArrayBuffer=function(t,e){var r=i(t);return r.responseType="arraybuffer",r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){var t=r.response;if(0===t.byteLength&&200===r.status)return e(new Error("http status 200 returned without content."));r.status>=200&&r.status<300&&r.response?e(null,{data:t,cacheControl:r.getResponseHeader("Cache-Control"),expires:r.getResponseHeader("Expires")}):e(new s(r.statusText,r.status))},r.send(),r};r.getImage=function(t,e){return r.getArrayBuffer(t,function(t,r){if(t)e(t);else if(r){var i=new o.Image,n=o.URL||o.webkitURL;i.onload=function(){e(null,i),n.revokeObjectURL(i.src)};var a=new o.Blob([new Uint8Array(r.data)],{type:"image/png"});i.cacheControl=r.cacheControl,i.expires=r.expires,i.src=r.data.byteLength?n.createObjectURL(a):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}})},r.getVideo=function(t,e){var r=o.document.createElement("video");r.onloadstart=function(){e(null,r)};for(var i=0;i<t.length;i++){var a=o.document.createElement("source");n(t[i])||(r.crossOrigin="Anonymous"),a.src=t[i],r.appendChild(a)}return r}},{"./window":204}],202:[function(t,e,r){"use strict";var i=t("./window"),n=i.performance&&i.performance.now?i.performance.now.bind(i.performance):Date.now.bind(Date),o=i.requestAnimationFrame||i.mozRequestAnimationFrame||i.webkitRequestAnimationFrame||i.msRequestAnimationFrame,a=i.cancelAnimationFrame||i.mozCancelAnimationFrame||i.webkitCancelAnimationFrame||i.msCancelAnimationFrame;e.exports={now:n,frame:function(t){return o(t)},cancelFrame:function(t){return a(t)},timed:function(t,e,r){function i(){if(!a){var l=n();l>=s+e?t.call(r,1):(t.call(r,(l-s)/e),o(i))}}if(!e)return t.call(r,1),null;var a=!1,s=n();return o(i),function(){a=!0}},getImageData:function(t){var e=i.document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0,t.width,t.height),r.getImageData(0,0,t.width,t.height)},hardwareConcurrency:i.navigator.hardwareConcurrency||4,get devicePixelRatio(){return i.devicePixelRatio},supportsWebp:!1};var s=i.document.createElement("img");s.onload=function(){e.exports.supportsWebp=!0},s.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="},{"./window":204}],203:[function(t,e,r){"use strict";var i=t("webworkify"),n=t("../window"),o=n.URL.createObjectURL(new i(t("../../source/worker"),{bare:!0}));e.exports=function(){return new n.Worker(o)}},{"../../source/worker":105,"../window":204,webworkify:39}],204:[function(t,e,r){"use strict";e.exports=self},{}],205:[function(t,e,r){"use strict";function i(t,e){return e.area-t.area}var n=t("quickselect"),o=t("./util").calculateSignedArea;e.exports=function(t,e){var r=t.length;if(r<=1)return[t];for(var a,s,l=[],u=0;u<r;u++){var c=o(t[u]);0!==c&&(t[u].area=Math.abs(c),void 0===s&&(s=c<0),s===c<0?(a&&l.push(a),a=[t[u]]):a.push(t[u]))}if(a&&l.push(a),e>1)for(var p=0;p<l.length;p++)l[p].length<=e||(n(l[p],e,1,l[p].length-1,i),l[p]=l[p].slice(0,e));return l}},{"./util":223,quickselect:31}],206:[function(t,e,r){"use strict";var i={API_URL:"https://api.mapbox.com",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null};e.exports=i},{}],207:[function(t,e,r){"use strict";var i=function(t){var e=this;this._stringToNumber={},this._numberToString=[];for(var r=0;r<t.length;r++){var i=t[r];e._stringToNumber[i]=r,e._numberToString[r]=i}};i.prototype.encode=function(t){return this._stringToNumber[t]},i.prototype.decode=function(t){return this._numberToString[t]},e.exports=i},{}],208:[function(t,e,r){"use strict";var i=t("./util"),n=t("./actor"),o=function(t,e){var r=this;this.workerPool=t,this.actors=[],this.currentActor=0,this.id=i.uniqueId();for(var o=this.workerPool.acquire(this.id),a=0;a<o.length;a++){var s=o[a],l=new n(s,e,r.id);l.name="Worker "+a,r.actors.push(l)}};o.prototype.broadcast=function(t,e,r){r=r||function(){},i.asyncAll(this.actors,function(r,i){r.send(t,e,i)},r)},o.prototype.send=function(t,e,r,i,n){return("number"!=typeof i||isNaN(i))&&(i=this.currentActor=(this.currentActor+1)%this.actors.length),this.actors[i].send(t,e,r,n),i},o.prototype.remove=function(){this.actors.forEach(function(t){t.remove()}),this.actors=[],this.workerPool.release(this.id)},e.exports=o},{"./actor":200,"./util":223}],209:[function(t,e,r){"use strict";function i(t){for(var e=0;e<t.length;e++)if(t[e]in s)return t[e];return t[0]}var n=t("@mapbox/point-geometry"),o=t("./window");r.create=function(t,e,r){var i=o.document.createElement(t);return e&&(i.className=e),r&&r.appendChild(i),i};var a,s=o.document.documentElement.style,l=i(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);r.disableDrag=function(){l&&(a=s[l],s[l]="none")},r.enableDrag=function(){l&&(s[l]=a)};var u=i(["transform","WebkitTransform"]);r.setTransform=function(t,e){t.style[u]=e};var c=function(t){t.preventDefault(),t.stopPropagation(),o.removeEventListener("click",c,!0)};r.suppressClick=function(){o.addEventListener("click",c,!0),o.setTimeout(function(){o.removeEventListener("click",c,!0)},0)},r.mousePos=function(t,e){var r=t.getBoundingClientRect();return e=e.touches?e.touches[0]:e,new n(e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop)},r.touchPos=function(t,e){for(var r=t.getBoundingClientRect(),i=[],o="touchend"===e.type?e.changedTouches:e.touches,a=0;a<o.length;a++)i.push(new n(o[a].clientX-r.left-t.clientLeft,o[a].clientY-r.top-t.clientTop));return i},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)}},{"./window":204,"@mapbox/point-geometry":2}],210:[function(t,e,r){"use strict";function i(t,e,r){r[t]=r[t]||[],r[t].push(e)}function n(t,e,r){if(r&&r[t]){var i=r[t].indexOf(e);-1!==i&&r[t].splice(i,1)}}var o=t("./util"),a=function(){};a.prototype.on=function(t,e){return this._listeners=this._listeners||{},i(t,e,this._listeners),this},a.prototype.off=function(t,e){return n(t,e,this._listeners),n(t,e,this._oneTimeListeners),this},a.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},i(t,e,this._oneTimeListeners),this},a.prototype.fire=function(t,e){var r=this;if(this.listens(t)){e=o.extend({},e,{type:t,target:this});for(var i=this._listeners&&this._listeners[t]?this._listeners[t].slice():[],a=0;a<i.length;a++)i[a].call(r,e);for(var s=this._oneTimeListeners&&this._oneTimeListeners[t]?this._oneTimeListeners[t].slice():[],l=0;l<s.length;l++)s[l].call(r,e),n(t,s[l],r._oneTimeListeners);this._eventedParent&&this._eventedParent.fire(t,o.extend({},e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData))}else o.endsWith(t,"error")&&console.error(e&&e.error||e||"Empty error event");return this},a.prototype.listens=function(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},a.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this},e.exports=a},{"./util":223}],211:[function(t,e,r){"use strict";function i(t,e){return e.max-t.max}function n(t,e,r,i){this.p=new l(t,e),this.h=r,this.d=o(this.p,i),this.max=this.d+this.h*Math.SQRT2}function o(t,e){for(var r=!1,i=1/0,n=0;n<e.length;n++)for(var o=e[n],a=0,s=o.length,l=s-1;a<s;l=a++){var c=o[a],p=o[l];c.y>t.y!=p.y>t.y&&t.x<(p.x-c.x)*(t.y-c.y)/(p.y-c.y)+c.x&&(r=!r),i=Math.min(i,u(t,c,p))}return(r?1:-1)*Math.sqrt(i)}function a(t){for(var e=0,r=0,i=0,o=t[0],a=0,s=o.length,l=s-1;a<s;l=a++){var u=o[a],c=o[l],p=u.x*c.y-c.x*u.y;r+=(u.x+c.x)*p,i+=(u.y+c.y)*p,e+=3*p}return new n(r/e,i/e,0,t)}var s=t("tinyqueue"),l=t("@mapbox/point-geometry"),u=t("./intersection_tests").distToSegmentSquared;e.exports=function(t,e,r){void 0===e&&(e=1),void 0===r&&(r=!1);for(var o=1/0,u=1/0,c=-1/0,p=-1/0,h=t[0],f=0;f<h.length;f++){var d=h[f];(!f||d.x<o)&&(o=d.x),(!f||d.y<u)&&(u=d.y),(!f||d.x>c)&&(c=d.x),(!f||d.y>p)&&(p=d.y)}var m=c-o,v=p-u,y=Math.min(m,v),g=y/2,_=new s(null,i);if(0===y)return new l(o,u);for(var x=o;x<c;x+=y)for(var b=u;b<p;b+=y)_.push(new n(x+g,b+g,g,t));for(var w=a(t),T=_.length;_.length;){var S=_.pop();(S.d>w.d||!w.d)&&(w=S,r&&console.log("found best %d after %d probes",Math.round(1e4*S.d)/1e4,T)),S.max-w.d<=e||(g=S.h/2,_.push(new n(S.p.x-g,S.p.y-g,g,t)),_.push(new n(S.p.x+g,S.p.y-g,g,t)),_.push(new n(S.p.x-g,S.p.y+g,g,t)),_.push(new n(S.p.x+g,S.p.y+g,g,t)),T+=4)}return r&&(console.log("num probes: "+T),console.log("best distance: "+w.d)),w.p}},{"./intersection_tests":214,"@mapbox/point-geometry":2,tinyqueue:33}],212:[function(t,e,r){"use strict";var i,n=t("./worker_pool");e.exports=function(){return i||(i=new n),i}},{"./worker_pool":226}],213:[function(t,e,r){"use strict";function i(t,e,r){var i=t.width,n=t.height;if(r){if(r.length!==i*n*e)throw new RangeError("mismatched image size")}else r=new Uint8Array(i*n*e);return{width:i,height:n,data:r}}function n(t,e,r){var n=e.width,a=e.height;if(n===t.width&&a===t.height)return t;var s=i({width:n,height:a},r);o(t,s,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,n),height:Math.min(t.height,a)},r),t.width=n,t.height=a,t.data=s.data}function o(t,e,r,i,n,o){if(0===n.width||0===n.height)return e;if(n.width>t.width||n.height>t.height||r.x>t.width-n.width||r.y>t.height-n.height)throw new RangeError("out of range source coordinates for image copy");if(n.width>e.width||n.height>e.height||i.x>e.width-n.width||i.y>e.height-n.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=t.data,s=e.data,l=0;l<n.height;l++)for(var u=((r.y+l)*t.width+r.x)*o,c=((i.y+l)*e.width+i.x)*o,p=0;p<n.width*o;p++)s[c+p]=a[u+p];return e}var a=function(){};a.create=function(t,e){return i(t,1,e)},a.resize=function(t,e){n(t,e,1)},a.copy=function(t,e,r,i,n){o(t,e,r,i,n,1)};var s=function(){};s.create=function(t,e){return i(t,4,e)},s.resize=function(t,e){n(t,e,4)},s.copy=function(t,e,r,i,n){o(t,e,r,i,n,4)},e.exports={AlphaImage:a,RGBAImage:s}},{}],214:[function(t,e,r){"use strict";function i(t,e){for(var r=0;r<t.length;r++)if(f(e,t[r]))return!0;for(var i=0;i<e.length;i++)if(f(t,e[i]))return!0;return!!l(t,e)}function n(t,e,r){for(var i=0;i<t.length;i++)for(var n=t[i],o=0;o<e.length;o++)for(var a=e[o],s=0;s<a.length;s++){var l=a[s];if(f(n,l))return!0;if(c(l,n,r))return!0}return!1}function o(t,e){if(1===t.length&&1===t[0].length)return h(e,t[0][0]);for(var r=0;r<e.length;r++)for(var i=e[r],n=0;n<i.length;n++)if(h(t,i[n]))return!0;for(var o=0;o<t.length;o++){for(var a=t[o],s=0;s<a.length;s++)if(h(e,a[s]))return!0;for(var u=0;u<e.length;u++)if(l(a,e[u]))return!0}return!1}function a(t,e,r){for(var i=0;i<e.length;i++)for(var n=e[i],o=0;o<t.length;o++){var a=t[o];if(a.length>=3)for(var l=0;l<n.length;l++)if(f(a,n[l]))return!0;if(s(a,n,r))return!0}return!1}function s(t,e,r){if(t.length>1){if(l(t,e))return!0;for(var i=0;i<e.length;i++)if(c(e[i],t,r))return!0}for(var n=0;n<t.length;n++)if(c(t[n],e,r))return!0;return!1}function l(t,e){if(0===t.length||0===e.length)return!1;for(var r=0;r<t.length-1;r++)for(var i=t[r],n=t[r+1],o=0;o<e.length-1;o++){var a=e[o],s=e[o+1];if(u(i,n,a,s))return!0}return!1}function u(t,e,r,i){return m(t,r,i)!==m(e,r,i)&&m(t,e,r)!==m(t,e,i)}function c(t,e,r){var i=r*r;if(1===e.length)return t.distSqr(e[0])<i;for(var n=1;n<e.length;n++)if(p(t,e[n-1],e[n])<i)return!0;return!1}function p(t,e,r){var i=e.distSqr(r);if(0===i)return t.distSqr(e);var n=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/i;return n<0?t.distSqr(e):n>1?t.distSqr(r):t.distSqr(r.sub(e)._mult(n)._add(e))}function h(t,e){for(var r,i,n,o=!1,a=0;a<t.length;a++){r=t[a];for(var s=0,l=r.length-1;s<r.length;l=s++)i=r[s],n=r[l],i.y>e.y!=n.y>e.y&&e.x<(n.x-i.x)*(e.y-i.y)/(n.y-i.y)+i.x&&(o=!o)}return o}function f(t,e){for(var r=!1,i=0,n=t.length-1;i<t.length;n=i++){var o=t[i],a=t[n];o.y>e.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(r=!r)}return r}var d=t("./util"),m=d.isCounterClockwise;e.exports={multiPolygonIntersectsBufferedMultiPoint:n,multiPolygonIntersectsMultiPolygon:o,multiPolygonIntersectsBufferedMultiLine:a,polygonIntersectsPolygon:i,distToSegmentSquared:p}},{"./util":223}],215:[function(t,e,r){"use strict";var i={"Latin-1 Supplement":function(t){return t>=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},"Arabic Supplement":function(t){return t>=1872&&t<=1919},"Arabic Extended-A":function(t){return t>=2208&&t<=2303},"Hangul Jamo":function(t){return t>=4352&&t<=4607},"Unified Canadian Aboriginal Syllabics":function(t){return t>=5120&&t<=5759},"Unified Canadian Aboriginal Syllabics Extended":function(t){return t>=6320&&t<=6399},"General Punctuation":function(t){return t>=8192&&t<=8303},"Letterlike Symbols":function(t){return t>=8448&&t<=8527},"Number Forms":function(t){return t>=8528&&t<=8591},"Miscellaneous Technical":function(t){return t>=8960&&t<=9215},"Control Pictures":function(t){return t>=9216&&t<=9279},"Optical Character Recognition":function(t){return t>=9280&&t<=9311},"Enclosed Alphanumerics":function(t){return t>=9312&&t<=9471},"Geometric Shapes":function(t){return t>=9632&&t<=9727},"Miscellaneous Symbols":function(t){return t>=9728&&t<=9983},"Miscellaneous Symbols and Arrows":function(t){return t>=11008&&t<=11263},"CJK Radicals Supplement":function(t){return t>=11904&&t<=12031},"Kangxi Radicals":function(t){return t>=12032&&t<=12255},"Ideographic Description Characters":function(t){return t>=12272&&t<=12287},"CJK Symbols and Punctuation":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},"Hangul Compatibility Jamo":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},"Bopomofo Extended":function(t){return t>=12704&&t<=12735},"CJK Strokes":function(t){return t>=12736&&t<=12783},"Katakana Phonetic Extensions":function(t){return t>=12784&&t<=12799},"Enclosed CJK Letters and Months":function(t){return t>=12800&&t<=13055},"CJK Compatibility":function(t){return t>=13056&&t<=13311},"CJK Unified Ideographs Extension A":function(t){return t>=13312&&t<=19903},"Yijing Hexagram Symbols":function(t){return t>=19904&&t<=19967},"CJK Unified Ideographs":function(t){return t>=19968&&t<=40959},"Yi Syllables":function(t){return t>=40960&&t<=42127},"Yi Radicals":function(t){return t>=42128&&t<=42191},"Hangul Jamo Extended-A":function(t){return t>=43360&&t<=43391},"Hangul Syllables":function(t){return t>=44032&&t<=55215},"Hangul Jamo Extended-B":function(t){return t>=55216&&t<=55295},"Private Use Area":function(t){return t>=57344&&t<=63743},"CJK Compatibility Ideographs":function(t){return t>=63744&&t<=64255},"Arabic Presentation Forms-A":function(t){return t>=64336&&t<=65023},"Vertical Forms":function(t){return t>=65040&&t<=65055},"CJK Compatibility Forms":function(t){return t>=65072&&t<=65103},"Small Form Variants":function(t){return t>=65104&&t<=65135},"Arabic Presentation Forms-B":function(t){return t>=65136&&t<=65279},"Halfwidth and Fullwidth Forms":function(t){return t>=65280&&t<=65519}};e.exports=i},{}],216:[function(t,e,r){"use strict";var i=function(t,e){this.max=t,this.onRemove=e,this.reset()};i.prototype.reset=function(){var t=this;for(var e in t.data)t.onRemove(t.data[e]);return this.data={},this.order=[],this},i.prototype.add=function(t,e){if(this.has(t))this.order.splice(this.order.indexOf(t),1),this.data[t]=e,this.order.push(t);else if(this.data[t]=e,this.order.push(t),this.order.length>this.max){var r=this.get(this.order[0]);r&&this.onRemove(r)}return this},i.prototype.has=function(t){return t in this.data},i.prototype.keys=function(){return this.order},i.prototype.get=function(t){if(!this.has(t))return null;var e=this.data[t];return delete this.data[t],this.order.splice(this.order.indexOf(t),1),e},i.prototype.getWithoutRemoving=function(t){return this.has(t)?this.data[t]:null},i.prototype.remove=function(t){if(!this.has(t))return this;var e=this.data[t];return delete this.data[t],this.onRemove(e),this.order.splice(this.order.indexOf(t),1),this},i.prototype.setMaxSize=function(t){var e=this;for(this.max=t;this.order.length>this.max;){var r=e.get(e.order[0]);r&&e.onRemove(r)}return this},e.exports=i},{}],217:[function(t,e,r){"use strict";function i(t,e){var r=a(l.API_URL);if(t.protocol=r.protocol,t.authority=r.authority,"/"!==r.path&&(t.path=""+r.path+t.path),!l.REQUIRE_ACCESS_TOKEN)return s(t);if(!(e=e||l.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+c);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+c);return t.params.push("access_token="+e),s(t)}function n(t){return 0===t.indexOf("mapbox:")}function o(t){for(var e=0;e<t.length;e++)0===t[e].indexOf("access_token=tk.")&&(t[e]="access_token="+(l.ACCESS_TOKEN||""))}function a(t){var e=t.match(h);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function s(t){var e=t.params.length?"?"+t.params.join("&"):"";return t.protocol+"://"+t.authority+t.path+e}var l=t("./config"),u=t("./browser"),c="See https://www.mapbox.com/api-documentation/#access-tokens";r.isMapboxURL=n,r.normalizeStyleURL=function(t,e){if(!n(t))return t;var r=a(t);return r.path="/styles/v1"+r.path,i(r,e)},r.normalizeGlyphsURL=function(t,e){if(!n(t))return t;var r=a(t);return r.path="/fonts/v1"+r.path,i(r,e)},r.normalizeSourceURL=function(t,e){if(!n(t))return t;var r=a(t);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),i(r,e)},r.normalizeSpriteURL=function(t,e,r,o){var l=a(t);return n(t)?(l.path="/styles/v1"+l.path+"/sprite"+e+r,i(l,o)):(l.path+=""+e+r,s(l))};var p=/(\.(png|jpg)\d*)(?=$)/;r.normalizeTileURL=function(t,e,r){if(!e||!n(e))return t;var i=a(t),l=u.devicePixelRatio>=2||512===r?"@2x":"",c=u.supportsWebp?".webp":"$1";return i.path=i.path.replace(p,""+l+c),o(i.params),s(i)};var h=/^(\w+):\/\/([^\/?]*)(\/[^?]+)?\??(.+)?/},{"./browser":202,"./config":206}],218:[function(t,e,r){"use strict";var i=t("./is_char_in_unicode_block");e.exports.allowsIdeographicBreaking=function(t){for(var e=0,i=t;e<i.length;e+=1){var n=i[e];if(!r.charAllowsIdeographicBreaking(n.charCodeAt(0)))return!1}return!0},e.exports.allowsVerticalWritingMode=function(t){for(var e=0,i=t;e<i.length;e+=1){var n=i[e];if(r.charHasUprightVerticalOrientation(n.charCodeAt(0)))return!0}return!1},e.exports.allowsLetterSpacing=function(t){for(var e=0,i=t;e<i.length;e+=1){var n=i[e];if(!r.charAllowsLetterSpacing(n.charCodeAt(0)))return!1}return!0},e.exports.charAllowsLetterSpacing=function(t){return!(i.Arabic(t)||i["Arabic Supplement"](t)||i["Arabic Extended-A"](t)||i["Arabic Presentation Forms-A"](t)||i["Arabic Presentation Forms-B"](t))},e.exports.charAllowsIdeographicBreaking=function(t){return!!(!(t<11904)&&(i["Bopomofo Extended"](t)||i.Bopomofo(t)||i["CJK Compatibility Forms"](t)||i["CJK Compatibility Ideographs"](t)||i["CJK Compatibility"](t)||i["CJK Radicals Supplement"](t)||i["CJK Strokes"](t)||i["CJK Symbols and Punctuation"](t)||i["CJK Unified Ideographs Extension A"](t)||i["CJK Unified Ideographs"](t)||i["Enclosed CJK Letters and Months"](t)||i["Halfwidth and Fullwidth Forms"](t)||i.Hiragana(t)||i["Ideographic Description Characters"](t)||i["Kangxi Radicals"](t)||i["Katakana Phonetic Extensions"](t)||i.Katakana(t)||i["Vertical Forms"](t)||i["Yi Radicals"](t)||i["Yi Syllables"](t)))},r.charHasUprightVerticalOrientation=function(t){return!!(746===t||747===t||!(t<4352)&&(i["Bopomofo Extended"](t)||i.Bopomofo(t)||i["CJK Compatibility Forms"](t)&&!(t>=65097&&t<=65103)||i["CJK Compatibility Ideographs"](t)||i["CJK Compatibility"](t)||i["CJK Radicals Supplement"](t)||i["CJK Strokes"](t)||!(!i["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||i["CJK Unified Ideographs Extension A"](t)||i["CJK Unified Ideographs"](t)||i["Enclosed CJK Letters and Months"](t)||i["Hangul Compatibility Jamo"](t)||i["Hangul Jamo Extended-A"](t)||i["Hangul Jamo Extended-B"](t)||i["Hangul Jamo"](t)||i["Hangul Syllables"](t)||i.Hiragana(t)||i["Ideographic Description Characters"](t)||i.Kanbun(t)||i["Kangxi Radicals"](t)||i["Katakana Phonetic Extensions"](t)||i.Katakana(t)&&12540!==t||!(!i["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||!(!i["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||i["Unified Canadian Aboriginal Syllabics"](t)||i["Unified Canadian Aboriginal Syllabics Extended"](t)||i["Vertical Forms"](t)||i["Yijing Hexagram Symbols"](t)||i["Yi Syllables"](t)||i["Yi Radicals"](t)))},r.charHasNeutralVerticalOrientation=function(t){return!!(i["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||i["General Punctuation"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||i["Letterlike Symbols"](t)||i["Number Forms"](t)||i["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||i["Control Pictures"](t)&&9251!==t||i["Optical Character Recognition"](t)||i["Enclosed Alphanumerics"](t)||i["Geometric Shapes"](t)||i["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||i["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||i["CJK Symbols and Punctuation"](t)||i.Katakana(t)||i["Private Use Area"](t)||i["CJK Compatibility Forms"](t)||i["Small Form Variants"](t)||i["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)},r.charHasRotatedVerticalOrientation=function(t){return!(r.charHasUprightVerticalOrientation(t)||r.charHasNeutralVerticalOrientation(t))}},{"./is_char_in_unicode_block":215}],219:[function(t,e,r){"use strict";var i=t("../geo/lng_lat");e.exports=function(t,e,r){if(t=new i(t.lng,t.lat),e){var n=new i(t.lng-360,t.lat),o=new i(t.lng+360,t.lat),a=r.locationPoint(t).distSqr(e);r.locationPoint(n).distSqr(e)<a?t=n:r.locationPoint(o).distSqr(e)<a&&(t=o)}for(;Math.abs(t.lng-r.center.lng)>180;){var s=r.locationPoint(t);if(s.x>=0&&s.y>=0&&s.x<=r.width&&s.y<=r.height)break;t.lng>r.center.lng?t.lng-=360:t.lng+=360}return t}},{"../geo/lng_lat":58}],220:[function(t,e,r){"use strict";function i(t){var e=JSON.stringify(t);if(f[e])return f[e];var r=void 0===t.alignment?1:t.alignment,i=0,a=0,l=["Uint8"],c=t.members.map(function(t){l.indexOf(t.type)<0&&l.push(t.type);var e=o(t.type),s=i=n(i,Math.max(r,e)),u=t.components||1;return a=Math.max(a,e),i+=e*u,{name:t.name,type:t.type,components:u,offset:s}}),d=n(i,Math.max(a,r)),m=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(p);m.prototype.alignment=r,m.prototype.size=d;for(var v=0,y=c;v<y.length;v+=1)for(var g=y[v],_=0;_<g.components;_++){var x=g.name;if(g.components>1&&(x+=_),x in m.prototype)throw new Error(x+" is a reserved name and cannot be used as a member name.");Object.defineProperty(m.prototype,x,u(g,_))}var b=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(h);return b.prototype.members=c,b.prototype.StructType=m,b.prototype.bytesPerElement=d,b.prototype.emplaceBack=s(c,d),b.prototype._usedTypes=l,f[e]=b,b}function n(t,e){return Math.ceil(t/e)*e}function o(t){return c[t].BYTES_PER_ELEMENT}function a(t){return t.toLowerCase()}function s(t,e){for(var r=[],i=[],n="var i = this.length;\nthis.resize(this.length + 1);\n",s=0,l=t;s<l.length;s+=1){var u=l[s],c=o(u.type);r.indexOf(c)<0&&(r.push(c),n+="var o"+c.toFixed(0)+" = i * "+(e/c).toFixed(0)+";\n");for(var p=0;p<u.components;p++){var h="v"+i.length,f="o"+c.toFixed(0)+" + "+(u.offset/c+p).toFixed(0);n+="this."+a(u.type)+"["+f+"] = "+h+";\n",i.push(h)}}return n+="return i;",new Function(i.toString(),n)}function l(t,e){var r="this._pos"+o(t.type).toFixed(0),i=(t.offset/o(t.type)+e).toFixed(0),n=r+" + "+i;return"this._structArray."+a(t.type)+"["+n+"]"}function u(t,e){var r=l(t,e);return{get:new Function("return "+r+";"),set:new Function("x",r+" = x;")}}e.exports=i;var c={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},p=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},h=function(t){this.isTransferred=!1,void 0!==t?(this.arrayBuffer=t.arrayBuffer,this.length=t.length,this.capacity=this.arrayBuffer.byteLength/this.bytesPerElement,this._refreshViews()):(this.capacity=-1,this.resize(0))};h.serialize=function(){return{members:this.prototype.members,alignment:this.prototype.StructType.prototype.alignment}},h.prototype.serialize=function(t){return this._trim(),t&&(this.isTransferred=!0,t.push(this.arrayBuffer)),{length:this.length,arrayBuffer:this.arrayBuffer}},h.prototype.get=function(t){return new this.StructType(this,t)},h.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},h.prototype.clear=function(){this.length=0},h.prototype.resize=function(t){if(this.length=t,t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},h.prototype._refreshViews=function(){for(var t=this,e=0,r=t._usedTypes;e<r.length;e+=1){var i=r[e];t[a(i)]=new c[i](t.arrayBuffer)}},h.prototype.toArray=function(t,e){for(var r=this,i=[],n=t;n<e;n++){var o=r.get(n);i.push(o)}return i};var f={}},{}],221:[function(t,e,r){"use strict";var i=t("./browser"),n=function(t,e){this.frequency=t,this.throttledFunction=e,this.lastInvocation=0};n.prototype.invoke=function(){var t=this;if(!this.pendingInvocation){var e=0===this.lastInvocation?0:this.lastInvocation+this.frequency-i.now();e<=0?(this.lastInvocation=i.now(),this.throttledFunction()):this.pendingInvocation=setTimeout(function(){t.pendingInvocation=void 0,t.lastInvocation=i.now(),t.throttledFunction()},e)}},n.prototype.stop=function(){this.pendingInvocation&&(clearTimeout(this.pendingInvocation),this.pendingInvocation=void 0)},e.exports=n},{"./browser":202}],222:[function(t,e,r){"use strict";function i(t,e){return e.replace(/{([^{}]+)}/g,function(e,r){return r in t?String(t[r]):""})}e.exports=i},{}],223:[function(t,e,r){"use strict";var i=t("@mapbox/unitbezier"),n=t("../geo/coordinate");t("@mapbox/point-geometry");r.easeCubicInOut=function(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)},r.bezier=function(t,e,r,n){var o=new i(t,e,r,n);return function(t){return o.solve(t)}},r.ease=r.bezier(.25,.1,.25,1),r.clamp=function(t,e,r){return Math.min(r,Math.max(e,t))},r.wrap=function(t,e,r){var i=r-e,n=((t-e)%i+i)%i+e;return n===e?r:n},r.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var i=t.length,n=new Array(t.length),o=null;t.forEach(function(t,a){e(t,function(t,e){t&&(o=t),n[a]=e,0==--i&&r(o,n)})})},r.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},r.keysDifference=function(t,e){var r=[];for(var i in t)i in e||r.push(i);return r},r.extend=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var i=0,n=e;i<n.length;i+=1){var o=n[i];for(var a in o)t[a]=o[a]}return t},r.pick=function(t,e){for(var r={},i=0;i<e.length;i++){var n=e[i];n in t&&(r[n]=t[n])}return r};var o=1;r.uniqueId=function(){return o++},r.bindAll=function(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})},r.getCoordinatesCenter=function(t){for(var e=1/0,r=1/0,i=-1/0,o=-1/0,a=0;a<t.length;a++)e=Math.min(e,t[a].column),r=Math.min(r,t[a].row),i=Math.max(i,t[a].column),o=Math.max(o,t[a].row);var s=i-e,l=o-r,u=Math.max(s,l),c=Math.max(0,Math.floor(-Math.log(u)/Math.LN2));return new n((e+i)/2,(r+o)/2,0).zoomTo(c)},r.endsWith=function(t,e){return-1!==t.indexOf(e,t.length-e.length)},r.mapObject=function(t,e,r){var i=this,n={};for(var o in t)n[o]=e.call(r||i,t[o],o,t);return n},r.filterObject=function(t,e,r){var i=this,n={};for(var o in t)e.call(r||i,t[o],o,t)&&(n[o]=t[o]);return n},r.deepEqual=function(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var i=0;i<t.length;i++)if(!r.deepEqual(t[i],e[i]))return!1;return!0}if("object"==typeof t&&null!==t&&null!==e){if("object"!=typeof e)return!1;if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(!r.deepEqual(t[n],e[n]))return!1;return!0}return t===e},r.clone=function(t){return Array.isArray(t)?t.map(r.clone):"object"==typeof t&&t?r.mapObject(t,r.clone):t},r.arraysIntersect=function(t,e){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>=0)return!0;return!1};var a={};r.warnOnce=function(t){a[t]||("undefined"!=typeof console&&console.warn(t),a[t]=!0)},r.isCounterClockwise=function(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)},r.calculateSignedArea=function(t){for(var e=0,r=0,i=t.length,n=i-1,o=void 0,a=void 0;r<i;n=r++)o=t[r],a=t[n],e+=(a.x-o.x)*(o.y+a.y);return e},r.isClosedPolygon=function(t){if(t.length<4)return!1;var e=t[0],i=t[t.length-1];return!(Math.abs(e.x-i.x)>0||Math.abs(e.y-i.y)>0)&&Math.abs(r.calculateSignedArea(t))>.01},r.sphericalToCartesian=function(t){var e=t[0],r=t[1],i=t[2];return r+=90,r*=Math.PI/180,i*=Math.PI/180,[e*Math.cos(r)*Math.sin(i),e*Math.sin(r)*Math.sin(i),e*Math.cos(i)]},r.parseCacheControl=function(t){var e=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,r={};if(t.replace(e,function(t,e,i,n){var o=i||n;return r[e]=!o||o.toLowerCase(),""}),r["max-age"]){var i=parseInt(r["max-age"],10);isNaN(i)?delete r["max-age"]:r["max-age"]=i}return r}},{"../geo/coordinate":57,"@mapbox/point-geometry":2,"@mapbox/unitbezier":5}],224:[function(t,e,r){"use strict";var i=function(t,e,r,i){this.type="Feature",this._vectorTileFeature=t,t._z=e,t._x=r,t._y=i,this.properties=t.properties,null!=t.id&&(this.id=t.id)},n={geometry:{}};n.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},n.geometry.set=function(t){this._geometry=t},i.prototype.toJSON=function(){var t=this,e={geometry:this.geometry};for(var r in t)"_geometry"!==r&&"_vectorTileFeature"!==r&&(e[r]=t[r]);return e},Object.defineProperties(i.prototype,n),e.exports=i},{}],225:[function(t,e,r){"use strict";var i=t("./script_detection");e.exports=function(t){for(var r="",n=0;n<t.length;n++){var o=t.charCodeAt(n+1)||null,a=t.charCodeAt(n-1)||null;o&&i.charHasRotatedVerticalOrientation(o)&&!e.exports.lookup[t[n+1]]||a&&i.charHasRotatedVerticalOrientation(a)&&!e.exports.lookup[t[n-1]]||!e.exports.lookup[t[n]]?r+=t[n]:r+=e.exports.lookup[t[n]]}return r},e.exports.lookup={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"}},{"./script_detection":218}],226:[function(t,e,r){"use strict";var i=t("./web_worker"),n=function(){this.active={}};n.prototype.acquire=function(e){var r=this;if(!this.workers){var n=t("../").workerCount;for(this.workers=[];this.workers.length<n;)r.workers.push(new i)}return this.active[e]=!0,this.workers.slice()},n.prototype.release=function(t){delete this.active[t],0===Object.keys(this.active).length&&(this.workers.forEach(function(t){t.terminate()}),this.workers=null)},e.exports=n},{"../":63,"./web_worker":203}]},{},[63])(63)})}).call(e,r(0))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(1),n=r.n(i),o=r(3),a=r(7);n.a.accessToken="pk.eyJ1IjoieXV2YWRtIiwiYSI6ImNpcnMxbzBuaTAwZWdoa25oczlzZmkwbHcifQ.UHtLngbKm9O8945pJm23Nw";new o.a({el:"#app",render:function(t){return t(a.a)}})},function(t,e,r){"use strict";(function(t,r){/*! +!function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/static/js/",e(e.s=2)}([function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"===typeof window&&(r=window)}t.exports=r},function(t,e,r){(function(e){var r,r;!function(e){t.exports=e()}(function(){var t;return function t(e,n,i){function o(s,l){if(!n[s]){if(!e[s]){var u="function"==typeof r&&r;if(!l&&u)return r(s,!0);if(a)return a(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var p=n[s]={exports:{}};e[s][0].call(p.exports,function(t){var r=e[s][1][t];return o(r||t)},p,p.exports,t,e,n,i)}return n[s].exports}for(var a="function"==typeof r&&r,s=0;s<i.length;s++)o(i[s]);return o}({1:[function(e,r,n){!function(e,i){"object"==typeof n&&"undefined"!=typeof r?r.exports=i():"function"==typeof t&&t.amd?t(i):e.glMatrix=i()}(this,function(){"use strict";function t(t,e,r){var n=e[0],i=e[1],o=e[2];return t[0]=n*r[0]+i*r[3]+o*r[6],t[1]=n*r[1]+i*r[4]+o*r[7],t[2]=n*r[2]+i*r[5]+o*r[8],t}function e(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*a,t[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*a,t[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*a,t[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*a,t}function r(){var t=new Float32Array(4);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t}function n(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l+o*s,t[1]=i*l+a*s,t[2]=n*-s+o*l,t[3]=i*-s+a*l,t}function i(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3],s=r[0],l=r[1];return t[0]=n*s,t[1]=i*s,t[2]=o*l,t[3]=a*l,t}function o(){var t=new Float32Array(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function a(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=-r,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function s(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function l(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function u(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],p=e[9],h=e[10],f=e[11],d=e[12],m=e[13],v=e[14],y=e[15],g=r*s-n*a,_=r*l-i*a,x=r*u-o*a,b=n*l-i*s,w=n*u-o*s,T=i*u-o*l,S=c*m-p*d,z=c*v-h*d,A=c*y-f*d,C=p*v-h*m,E=p*y-f*m,k=h*y-f*v,M=g*k-_*E+x*C+b*A-w*z+T*S;return M?(M=1/M,t[0]=(s*k-l*E+u*C)*M,t[1]=(i*E-n*k-o*C)*M,t[2]=(m*T-v*w+y*b)*M,t[3]=(h*w-p*T-f*b)*M,t[4]=(l*A-a*k-u*z)*M,t[5]=(r*k-i*A+o*z)*M,t[6]=(v*x-d*T-y*_)*M,t[7]=(c*T-h*x+f*_)*M,t[8]=(a*E-s*A+u*S)*M,t[9]=(n*A-r*E-o*S)*M,t[10]=(d*w-m*x+y*g)*M,t[11]=(p*x-c*w-f*g)*M,t[12]=(s*z-a*C-l*S)*M,t[13]=(r*C-n*z+i*S)*M,t[14]=(m*_-d*b-v*g)*M,t[15]=(c*b-p*_+h*g)*M,t):null}function c(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],m=e[12],v=e[13],y=e[14],g=e[15],_=r[0],x=r[1],b=r[2],w=r[3];return t[0]=_*n+x*s+b*p+w*m,t[1]=_*i+x*l+b*h+w*v,t[2]=_*o+x*u+b*f+w*y,t[3]=_*a+x*c+b*d+w*g,_=r[4],x=r[5],b=r[6],w=r[7],t[4]=_*n+x*s+b*p+w*m,t[5]=_*i+x*l+b*h+w*v,t[6]=_*o+x*u+b*f+w*y,t[7]=_*a+x*c+b*d+w*g,_=r[8],x=r[9],b=r[10],w=r[11],t[8]=_*n+x*s+b*p+w*m,t[9]=_*i+x*l+b*h+w*v,t[10]=_*o+x*u+b*f+w*y,t[11]=_*a+x*c+b*d+w*g,_=r[12],x=r[13],b=r[14],w=r[15],t[12]=_*n+x*s+b*p+w*m,t[13]=_*i+x*l+b*h+w*v,t[14]=_*o+x*u+b*f+w*y,t[15]=_*a+x*c+b*d+w*g,t}function p(t,e,r){var n,i,o,a,s,l,u,c,p,h,f,d,m=r[0],v=r[1],y=r[2];return e===t?(t[12]=e[0]*m+e[4]*v+e[8]*y+e[12],t[13]=e[1]*m+e[5]*v+e[9]*y+e[13],t[14]=e[2]*m+e[6]*v+e[10]*y+e[14],t[15]=e[3]*m+e[7]*v+e[11]*y+e[15]):(n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],t[0]=n,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=p,t[9]=h,t[10]=f,t[11]=d,t[12]=n*m+s*v+p*y+e[12],t[13]=i*m+l*v+h*y+e[13],t[14]=o*m+u*v+f*y+e[14],t[15]=a*m+c*v+d*y+e[15]),t}function h(t,e,r){var n=r[0],i=r[1],o=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function f(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],p=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+u*n,t[5]=a*i+c*n,t[6]=s*i+p*n,t[7]=l*i+h*n,t[8]=u*i-o*n,t[9]=c*i-a*n,t[10]=p*i-s*n,t[11]=h*i-l*n,t}function d(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],a=e[1],s=e[2],l=e[3],u=e[4],c=e[5],p=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+u*n,t[1]=a*i+c*n,t[2]=s*i+p*n,t[3]=l*i+h*n,t[4]=u*i-o*n,t[5]=c*i-a*n,t[6]=p*i-s*n,t[7]=h*i-l*n,t}function m(t,e,r,n,i){var o=1/Math.tan(e/2),a=1/(n-i);return t[0]=o/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*a,t[15]=0,t}function v(t,e,r,n,i,o,a){var s=1/(e-r),l=1/(n-i),u=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(a+o)*u,t[15]=1,t}return function(){var t=new Float32Array(3);t[0]=0,t[1]=0,t[2]=0}(),function(){var t=new Float32Array(4);t[0]=0,t[1]=0,t[2]=0,t[3]=0}(),{vec3:{transformMat3:t},vec4:{transformMat4:e},mat2:{create:r,rotate:n,scale:i},mat3:{create:o,fromRotation:a},mat4:{create:s,identity:l,translate:p,scale:h,multiply:c,perspective:m,rotateX:f,rotateZ:d,invert:u,ortho:v}}})},{}],2:[function(t,e,r){"use strict";function n(t,e){this.x=t,this.y=e}e.exports=n,n.prototype={clone:function(){return new n(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},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(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_rotateAround:function(t,e){var r=Math.cos(t),n=Math.sin(t),i=e.x+r*(this.x-e.x)-n*(this.y-e.y),o=e.y+n*(this.x-e.x)+r*(this.y-e.y);return this.x=i,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t}},{}],3:[function(e,r,n){!function(e,i){"object"==typeof n&&"undefined"!=typeof r?r.exports=i():"function"==typeof t&&t.amd?t(i):e.ShelfPack=i()}(this,function(){function t(t,e,r){r=r||{},this.w=t||64,this.h=e||64,this.autoResize=!!r.autoResize,this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0}function e(t,e,r){this.x=0,this.y=t,this.w=this.free=e,this.h=r}function r(t,e,r,n,i,o,a){this.id=t,this.x=e,this.y=r,this.w=n,this.h=i,this.maxw=o||n,this.maxh=a||i,this.refcount=0}return t.prototype.pack=function(t,e){t=[].concat(t),e=e||{};for(var r,n,i,o,a=[],s=0;s<t.length;s++)if(r=t[s].w||t[s].width,n=t[s].h||t[s].height,i=t[s].id,r&&n){if(!(o=this.packOne(r,n,i)))continue;e.inPlace&&(t[s].x=o.x,t[s].y=o.y,t[s].id=o.id),a.push(o)}return this.shrink(),a},t.prototype.packOne=function(t,r,n){var i,o,a,s,l={freebin:-1,shelf:-1,waste:1/0},u=0;if("string"==typeof n||"number"==typeof n){if(i=this.getBin(n))return this.ref(i),i;"number"==typeof n&&(this.maxId=Math.max(n,this.maxId))}else n=++this.maxId;for(s=0;s<this.freebins.length;s++){if(i=this.freebins[s],r===i.maxh&&t===i.maxw)return this.allocFreebin(s,t,r,n);r>i.maxh||t>i.maxw||r<=i.maxh&&t<=i.maxw&&(a=i.maxw*i.maxh-t*r)<l.waste&&(l.waste=a,l.freebin=s)}for(s=0;s<this.shelves.length;s++)if(o=this.shelves[s],u+=o.h,!(t>o.free)){if(r===o.h)return this.allocShelf(s,t,r,n);r>o.h||r<o.h&&(a=(o.h-r)*t)<l.waste&&(l.freebin=-1,l.waste=a,l.shelf=s)}if(-1!==l.freebin)return this.allocFreebin(l.freebin,t,r,n);if(-1!==l.shelf)return this.allocShelf(l.shelf,t,r,n);if(r<=this.h-u&&t<=this.w)return o=new e(u,this.w,r),this.allocShelf(this.shelves.push(o)-1,t,r,n);if(this.autoResize){var c,p,h,f;return c=p=this.h,h=f=this.w,(h<=c||t>h)&&(f=2*Math.max(t,h)),(c<h||r>c)&&(p=2*Math.max(r,c)),this.resize(f,p),this.packOne(t,r,n)}return null},t.prototype.allocFreebin=function(t,e,r,n){var i=this.freebins.splice(t,1)[0];return i.id=n,i.w=e,i.h=r,i.refcount=0,this.bins[n]=i,this.ref(i),i},t.prototype.allocShelf=function(t,e,r,n){var i=this.shelves[t],o=i.alloc(e,r,n);return this.bins[n]=o,this.ref(o),o},t.prototype.shrink=function(){if(this.shelves.length>0){for(var t=0,e=0,r=0;r<this.shelves.length;r++){var n=this.shelves[r];e+=n.h,t=Math.max(n.w-n.free,t)}this.resize(t,e)}},t.prototype.getBin=function(t){return this.bins[t]},t.prototype.ref=function(t){if(1==++t.refcount){var e=t.h;this.stats[e]=1+(0|this.stats[e])}return t.refcount},t.prototype.unref=function(t){return 0===t.refcount?0:(0==--t.refcount&&(this.stats[t.h]--,delete this.bins[t.id],this.freebins.push(t)),t.refcount)},t.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0},t.prototype.resize=function(t,e){this.w=t,this.h=e;for(var r=0;r<this.shelves.length;r++)this.shelves[r].resize(t);return!0},e.prototype.alloc=function(t,e,n){if(t>this.free||e>this.h)return null;var i=this.x;return this.x+=t,this.free-=t,new r(n,i,this.y,t,e,t,this.h)},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t})},{}],4:[function(t,e,r){"use strict";function n(t,e,r,n,i,o){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=n||.25,this.fontFamily=i||"sans-serif",this.fontWeight=o||"normal",this.radius=r||8;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function i(t,e,r,n,i,a,s){for(var l=0;l<e;l++){for(var u=0;u<r;u++)n[u]=t[u*e+l];for(o(n,i,a,s,r),u=0;u<r;u++)t[u*e+l]=i[u]}for(u=0;u<r;u++){for(l=0;l<e;l++)n[l]=t[u*e+l];for(o(n,i,a,s,e),l=0;l<e;l++)t[u*e+l]=Math.sqrt(i[l])}}function o(t,e,r,n,i){r[0]=0,n[0]=-a,n[1]=+a;for(var o=1,s=0;o<i;o++){for(var l=(t[o]+o*o-(t[r[s]]+r[s]*r[s]))/(2*o-2*r[s]);l<=n[s];)s--,l=(t[o]+o*o-(t[r[s]]+r[s]*r[s]))/(2*o-2*r[s]);s++,r[s]=o,n[s]=l,n[s+1]=+a}for(o=0,s=0;o<i;o++){for(;n[s+1]<o;)s++;e[o]=(o-r[s])*(o-r[s])+t[r[s]]}}e.exports=n;var a=1e20;n.prototype.draw=function(t){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(t,this.buffer,this.middle);for(var e=this.ctx.getImageData(0,0,this.size,this.size),r=new Uint8ClampedArray(this.size*this.size),n=0;n<this.size*this.size;n++){var o=e.data[4*n+3]/255;this.gridOuter[n]=1===o?0:0===o?a:Math.pow(Math.max(0,.5-o),2),this.gridInner[n]=1===o?a:0===o?0:Math.pow(Math.max(0,o-.5),2)}for(i(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),i(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),n=0;n<this.size*this.size;n++){var s=this.gridOuter[n]-this.gridInner[n];r[n]=Math.max(0,Math.min(255,Math.round(255-255*(s/this.radius+this.cutoff))))}return r}},{}],5:[function(t,e,r){function n(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=r,this.p2y=n}e.exports=n,n.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},n.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},n.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},n.prototype.solveCurveX=function(t,e){void 0===e&&(e=1e-6);var r,n,i,o,a;for(i=t,a=0;a<8;a++){if(o=this.sampleCurveX(i)-t,Math.abs(o)<e)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)<1e-6)break;i-=o/s}if(r=0,n=1,(i=t)<r)return r;if(i>n)return n;for(;r<n;){if(o=this.sampleCurveX(i),Math.abs(o-t)<e)return i;t>o?r=i:n=i,i=.5*(n-r)+r}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},{}],6:[function(t,e,r){e.exports.VectorTile=t("./lib/vectortile.js"),e.exports.VectorTileFeature=t("./lib/vectortilefeature.js"),e.exports.VectorTileLayer=t("./lib/vectortilelayer.js")},{"./lib/vectortile.js":7,"./lib/vectortilefeature.js":8,"./lib/vectortilelayer.js":9}],7:[function(t,e,r){"use strict";function n(t,e){this.layers=t.readFields(i,{},e)}function i(t,e,r){if(3===t){var n=new o(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}var o=t("./vectortilelayer");e.exports=n},{"./vectortilelayer":9}],8:[function(t,e,r){"use strict";function n(t,e,r,n,o){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=n,this._values=o,t.readFields(i,this,e)}function i(t,e,r){1==t?e.id=r.readVarint():2==t?o(r,e):3==t?e.type=r.readVarint():4==t&&(e._geometry=r.pos)}function o(t,e){for(var r=t.readVarint()+t.pos;t.pos<r;){var n=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[n]=i}}function a(t){var e=t.length;if(e<=1)return[t];for(var r,n,i=[],o=0;o<e;o++){var a=s(t[o]);0!==a&&(void 0===n&&(n=a<0),n===a<0?(r&&i.push(r),r=[t[o]]):r.push(t[o]))}return r&&i.push(r),i}function s(t){for(var e,r,n=0,i=0,o=t.length,a=o-1;i<o;a=i++)e=t[i],r=t[a],n+=(r.x-e.x)*(e.y+r.y);return n}var l=t("@mapbox/point-geometry");e.exports=n,n.types=["Unknown","Point","LineString","Polygon"],n.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,n=1,i=0,o=0,a=0,s=[];t.pos<r;){if(!i){var u=t.readVarint();n=7&u,i=u>>3}if(i--,1===n||2===n)o+=t.readSVarint(),a+=t.readSVarint(),1===n&&(e&&s.push(e),e=[]),e.push(new l(o,a));else{if(7!==n)throw new Error("unknown command "+n);e&&e.push(e[0].clone())}}return e&&s.push(e),s},n.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;t.pos<e;){if(!n){var c=t.readVarint();r=7&c,n=c>>3}if(n--,1===r||2===r)i+=t.readSVarint(),o+=t.readSVarint(),i<a&&(a=i),i>s&&(s=i),o<l&&(l=o),o>u&&(u=o);else if(7!==r)throw new Error("unknown command "+r)}return[a,l,s,u]},n.prototype.toGeoJSON=function(t,e,r){function i(t){for(var e=0;e<t.length;e++){var r=t[e],n=180-360*(r.y+c)/l;t[e]=[360*(r.x+u)/l-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}var o,s,l=this.extent*Math.pow(2,r),u=this.extent*t,c=this.extent*e,p=this.loadGeometry(),h=n.types[this.type];switch(this.type){case 1:var f=[];for(o=0;o<p.length;o++)f[o]=p[o][0];p=f,i(p);break;case 2:for(o=0;o<p.length;o++)i(p[o]);break;case 3:for(p=a(p),o=0;o<p.length;o++)for(s=0;s<p[o].length;s++)i(p[o][s])}1===p.length?p=p[0]:h="Multi"+h;var d={type:"Feature",geometry:{type:h,coordinates:p},properties:this.properties};return"id"in this&&(d.id=this.id),d}},{"@mapbox/point-geometry":2}],9:[function(t,e,r){"use strict";function n(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(i,this,e),this.length=this._features.length}function i(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push(o(r))}function o(t){for(var e=null,r=t.readVarint()+t.pos;t.pos<r;){var n=t.readVarint()>>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}var a=t("./vectortilefeature.js");e.exports=n,n.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new a(this._pbf,e,this.extent,this._keys,this._values)}},{"./vectortilefeature.js":8}],10:[function(e,r,n){!function(e,i){"object"==typeof n&&"undefined"!=typeof r?i(n):"function"==typeof t&&t.amd?t(["exports"],i):i(e.WhooTS=e.WhooTS||{})}(this,function(t){function e(t,e,n,i,o,a){return a=a||{},t+"?"+["bbox="+r(n,i,o),"format="+(a.format||"image/png"),"service="+(a.service||"WMS"),"version="+(a.version||"1.1.1"),"request="+(a.request||"GetMap"),"srs="+(a.srs||"EPSG:3857"),"width="+(a.width||256),"height="+(a.height||256),"layers="+e].join("&")}function r(t,e,r){e=Math.pow(2,r)-e-1;var i=n(256*t,256*e,r),o=n(256*(t+1),256*(e+1),r);return i[0]+","+i[1]+","+o[0]+","+o[1]}function n(t,e,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[t*n-2*Math.PI*6378137/2,e*n-2*Math.PI*6378137/2]}t.getURL=e,t.getTileBBox=r,t.getMercCoords=n,Object.defineProperty(t,"__esModule",{value:!0})})},{}],11:[function(t,e,r){"use strict";function n(t,e,r){r=r||2;var n=e&&e.length,o=n?e[0]*r:t.length,s=i(t,0,o,r,!0),l=[];if(!s)return l;var u,c,h,f,d,m,v;if(n&&(s=p(t,e,s,r)),t.length>80*r){u=h=t[0],c=f=t[1];for(var y=r;y<o;y+=r)d=t[y],m=t[y+1],d<u&&(u=d),m<c&&(c=m),d>h&&(h=d),m>f&&(f=m);v=Math.max(h-u,f-c)}return a(s,l,r,u,c,v),l}function i(t,e,r,n,i){var o,a;if(i===L(t,e,r,n)>0)for(o=e;o<r;o+=n)a=E(o,t[o],t[o+1],a);else for(o=r-n;o>=e;o-=n)a=E(o,t[o],t[o+1],a);return a&&w(a,a.next)&&(k(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!w(n,n.next)&&0!==b(n.prev,n,n.next))n=n.next;else{if(k(n),(n=e=n.prev)===n.next)return null;r=!0}}while(r||n!==e);return e}function a(t,e,r,n,i,p,h){if(t){!h&&p&&m(t,n,i,p);for(var f,d,v=t;t.prev!==t.next;)if(f=t.prev,d=t.next,p?l(t,n,i,p):s(t))e.push(f.i/r),e.push(t.i/r),e.push(d.i/r),k(t),t=d.next,v=d.next;else if((t=d)===v){h?1===h?(t=u(t,e,r),a(t,e,r,n,i,p,2)):2===h&&c(t,e,r,n,i,p):a(o(t),e,r,n,i,p,1);break}}}function s(t){var e=t.prev,r=t,n=t.next;if(b(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(_(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&b(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function l(t,e,r,n){var i=t.prev,o=t,a=t.next;if(b(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,l=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,p=y(s,l,e,r,n),h=y(u,c,e,r,n),f=t.nextZ;f&&f.z<=h;){if(f!==t.prev&&f!==t.next&&_(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&b(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(f=t.prevZ;f&&f.z>=p;){if(f!==t.prev&&f!==t.next&&_(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&b(f.prev,f,f.next)>=0)return!1;f=f.prevZ}return!0}function u(t,e,r){var n=t;do{var i=n.prev,o=n.next.next;!w(i,o)&&T(i,n,n.next,o)&&z(i,o)&&z(o,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(o.i/r),k(n),k(n.next),n=t=o),n=n.next}while(n!==t);return n}function c(t,e,r,n,i,s){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&x(l,u)){var c=C(l,u);return l=o(l,l.next),c=o(c,c.next),a(l,e,r,n,i,s),void a(c,e,r,n,i,s)}u=u.next}l=l.next}while(l!==t)}function p(t,e,r,n){var a,s,l,u,c,p=[];for(a=0,s=e.length;a<s;a++)l=e[a]*n,u=a<s-1?e[a+1]*n:t.length,c=i(t,l,u,n,!1),c===c.next&&(c.steiner=!0),p.push(g(c));for(p.sort(h),a=0;a<p.length;a++)f(p[a],r),r=o(r,r.next);return r}function h(t,e){return t.x-e.x}function f(t,e){if(e=d(t,e)){var r=C(e,t);o(r,r.next)}}function d(t,e){var r,n=e,i=t.x,o=t.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>a){if(a=s,s===i){if(o===n.y)return n;if(o===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===a)return r.prev;var l,u=r,c=r.x,p=r.y,h=1/0;for(n=r.next;n!==u;)i>=n.x&&n.x>=c&&_(o<p?i:a,o,c,p,o<p?a:i,o,n.x,n.y)&&((l=Math.abs(o-n.y)/(i-n.x))<h||l===h&&n.x>r.x)&&z(n,t)&&(r=n,h=l),n=n.next;return r}function m(t,e,r,n){var i=t;do{null===i.z&&(i.z=y(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,v(i)}function v(t){var e,r,n,i,o,a,s,l,u=1;do{for(r=t,t=null,o=null,a=0;r;){for(a++,n=r,s=0,e=0;e<u&&(s++,n=n.nextZ);e++);for(l=u;s>0||l>0&&n;)0===s?(i=n,n=n.nextZ,l--):0!==l&&n?r.z<=n.z?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--):(i=r,r=r.nextZ,s--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;r=n}o.nextZ=null,u*=2}while(a>1);return t}function y(t,e,r,n,i){return t=32767*(t-r)/i,e=32767*(e-n)/i,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function g(t){var e=t,r=t;do{e.x<r.x&&(r=e),e=e.next}while(e!==t);return r}function _(t,e,r,n,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(n-s)-(r-a)*(e-s)>=0&&(r-a)*(o-s)-(i-a)*(n-s)>=0}function x(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!S(t,e)&&z(t,e)&&z(e,t)&&A(t,e)}function b(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function w(t,e){return t.x===e.x&&t.y===e.y}function T(t,e,r,n){return!!(w(t,e)&&w(r,n)||w(t,n)&&w(r,e))||b(t,e,r)>0!=b(t,e,n)>0&&b(r,n,t)>0!=b(r,n,e)>0}function S(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&&T(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function z(t,e){return b(t.prev,t,t.next)<0?b(t,e,t.next)>=0&&b(t,t.prev,e)>=0:b(t,e,t.prev)<0||b(t,t.next,e)<0}function A(t,e){var r=t,n=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}function C(t,e){var r=new M(t.i,t.x,t.y),n=new M(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function E(t,e,r,n){var i=new M(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function k(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 M(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function L(t,e,r,n){for(var i=0,o=e,a=r-n;o<r;o+=n)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}e.exports=n,n.deviation=function(t,e,r,n){var i=e&&e.length,o=i?e[0]*r:t.length,a=Math.abs(L(t,0,o,r));if(i)for(var s=0,l=e.length;s<l;s++){var u=e[s]*r,c=s<l-1?e[s+1]*r:t.length;a-=Math.abs(L(t,u,c,r))}var p=0;for(s=0;s<n.length;s+=3){var h=n[s]*r,f=n[s+1]*r,d=n[s+2]*r;p+=Math.abs((t[h]-t[d])*(t[f+1]-t[h+1])-(t[h]-t[f])*(t[d+1]-t[h+1]))}return 0===a&&0===p?0:Math.abs((p-a)/a)},n.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)r.vertices.push(t[i][o][a]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],12:[function(t,e,r){function n(t){if("Polygon"===t.type)return i(t.coordinates);if("MultiPolygon"===t.type){for(var e=0,r=0;r<t.coordinates.length;r++)e+=i(t.coordinates[r]);return e}return null}function i(t){var e=0;if(t&&t.length>0){e+=Math.abs(o(t[0]));for(var r=1;r<t.length;r++)e-=Math.abs(o(t[r]))}return e}function o(t){var e=0;if(t.length>2){for(var r,n,i=0;i<t.length-1;i++)r=t[i],n=t[i+1],e+=a(n[0]-r[0])*(2+Math.sin(a(r[1]))+Math.sin(a(n[1])));e=e*s.RADIUS*s.RADIUS/2}return e}function a(t){return t*Math.PI/180}var s=t("wgs84");e.exports.geometry=n,e.exports.ring=o},{wgs84:40}],13:[function(t,e,r){function n(t,e){switch(t&&t.type||null){case"FeatureCollection":return t.features=t.features.map(i(n,e)),t;case"Feature":return t.geometry=n(t.geometry,e),t;case"Polygon":case"MultiPolygon":return o(t,e);default:return t}}function i(t,e){return function(r){return t(r,e)}}function o(t,e){return"Polygon"===t.type?t.coordinates=a(t.coordinates,e):"MultiPolygon"===t.type&&(t.coordinates=t.coordinates.map(i(a,e))),t}function a(t,e){e=!!e,t[0]=s(t[0],e);for(var r=1;r<t.length;r++)t[r]=s(t[r],!e);return t}function s(t,e){return l(t)===e?t:t.reverse()}function l(t){return u.ring(t)>=0}var u=t("geojson-area");e.exports=n},{"geojson-area":12}],14:[function(t,e,r){"use strict";function n(t,e,r,n,a,l,u,c){if(r/=e,n/=e,u>=r&&c<=n)return t;if(u>n||c<r)return null;for(var p=[],h=0;h<t.length;h++){var f,d,m=t[h],v=m.geometry,y=m.type;if(f=m.min[a],d=m.max[a],f>=r&&d<=n)p.push(m);else if(!(f>n||d<r)){var g=1===y?i(v,r,n,a):o(v,r,n,a,l,3===y);g.length&&p.push(s(m.tags,y,g,m.id))}}return p.length?p:null}function i(t,e,r,n){for(var i=[],o=0;o<t.length;o++){var a=t[o],s=a[n];s>=e&&s<=r&&i.push(a)}return i}function o(t,e,r,n,i,o){for(var s=[],l=0;l<t.length;l++){var u,c,p,h=0,f=0,d=null,m=t[l],v=m.area,y=m.dist,g=m.outer,_=m.length,x=[];for(c=0;c<_-1;c++)u=d||m[c],d=m[c+1],h=f||u[n],f=d[n],h<e?f>r?(x.push(i(u,d,e),i(u,d,r)),o||(x=a(s,x,v,y,g))):f>=e&&x.push(i(u,d,e)):h>r?f<e?(x.push(i(u,d,r),i(u,d,e)),o||(x=a(s,x,v,y,g))):f<=r&&x.push(i(u,d,r)):(x.push(u),f<e?(x.push(i(u,d,e)),o||(x=a(s,x,v,y,g))):f>r&&(x.push(i(u,d,r)),o||(x=a(s,x,v,y,g))));u=m[_-1],h=u[n],h>=e&&h<=r&&x.push(u),p=x[x.length-1],o&&p&&(x[0][0]!==p[0]||x[0][1]!==p[1])&&x.push(x[0]),a(s,x,v,y,g)}return s}function a(t,e,r,n,i){return e.length&&(e.area=r,e.dist=n,void 0!==i&&(e.outer=i),t.push(e)),[]}e.exports=n;var s=t("./feature")},{"./feature":16}],15:[function(t,e,r){"use strict";function n(t,e){var r=[];if("FeatureCollection"===t.type)for(var n=0;n<t.features.length;n++)i(r,t.features[n],e);else"Feature"===t.type?i(r,t,e):i(r,{geometry:t},e);return r}function i(t,e,r){if(null!==e.geometry){var n,s,l,c,p=e.geometry,h=p.type,f=p.coordinates,d=e.properties,m=e.id;if("Point"===h)t.push(u(d,1,[a(f)],m));else if("MultiPoint"===h)t.push(u(d,1,o(f),m));else if("LineString"===h)t.push(u(d,2,[o(f,r)],m));else if("MultiLineString"===h||"Polygon"===h){for(l=[],n=0;n<f.length;n++)c=o(f[n],r),"Polygon"===h&&(c.outer=0===n),l.push(c);t.push(u(d,"Polygon"===h?3:2,l,m))}else if("MultiPolygon"===h){for(l=[],n=0;n<f.length;n++)for(s=0;s<f[n].length;s++)c=o(f[n][s],r),c.outer=0===s,l.push(c);t.push(u(d,3,l,m))}else{if("GeometryCollection"!==h)throw new Error("Input data is not a valid GeoJSON object.");for(n=0;n<p.geometries.length;n++)i(t,{geometry:p.geometries[n],properties:d},r)}}}function o(t,e){for(var r=[],n=0;n<t.length;n++)r.push(a(t[n]));return e&&(l(r,e),s(r)),r}function a(t){var e=Math.sin(t[1]*Math.PI/180),r=t[0]/360+.5,n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n=n<0?0:n>1?1:n,[r,n,0]}function s(t){for(var e,r,n=0,i=0,o=0;o<t.length-1;o++)e=r||t[o],r=t[o+1],n+=e[0]*r[1]-r[0]*e[1],i+=Math.abs(r[0]-e[0])+Math.abs(r[1]-e[1]);t.area=Math.abs(n/2),t.dist=i}e.exports=n;var l=t("./simplify"),u=t("./feature")},{"./feature":16,"./simplify":18}],16:[function(t,e,r){"use strict";function n(t,e,r,n){var o={id:n||null,type:e,geometry:r,tags:t||null,min:[1/0,1/0],max:[-1/0,-1/0]};return i(o),o}function i(t){var e=t.geometry,r=t.min,n=t.max;if(1===t.type)o(r,n,e);else for(var i=0;i<e.length;i++)o(r,n,e[i]);return t}function o(t,e,r){for(var n,i=0;i<r.length;i++)n=r[i],t[0]=Math.min(n[0],t[0]),e[0]=Math.max(n[0],e[0]),t[1]=Math.min(n[1],t[1]),e[1]=Math.max(n[1],e[1])}e.exports=n},{}],17:[function(t,e,r){"use strict";function n(t,e){return new i(t,e)}function i(t,e){e=this.options=l(Object.create(this.options),e);var r=e.debug;r&&console.time("preprocess data");var n=1<<e.maxZoom,i=c(t,e.tolerance/(n*e.extent));this.tiles={},this.tileCoords=[],r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),i=f(i,e.buffer/e.extent,a),i.length&&this.splitTile(i,0,0,0),r&&(i.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function o(t,e,r){return 32*((1<<t)*r+e)+t}function a(t,e,r){return[r,(r-t[0])*(e[1]-t[1])/(e[0]-t[0])+t[1],1]}function s(t,e,r){return[(r-t[1])*(e[0]-t[0])/(e[1]-t[1])+t[0],r,1]}function l(t,e){for(var r in e)t[r]=e[r];return t}function u(t,e,r){var n=t.source;if(1!==n.length)return!1;var i=n[0];if(3!==i.type||i.geometry.length>1)return!1;var o=i.geometry[0].length;if(5!==o)return!1;for(var a=0;a<o;a++){var s=p.point(i.geometry[0][a],e,t.z2,t.x,t.y);if(s[0]!==-r&&s[0]!==e+r||s[1]!==-r&&s[1]!==e+r)return!1}return!0}e.exports=n;var c=t("./convert"),p=t("./transform"),h=t("./clip"),f=t("./wrap"),d=t("./tile");i.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,solidChildren:!1,tolerance:3,extent:4096,buffer:64,debug:0},i.prototype.splitTile=function(t,e,r,n,i,l,c){for(var p=[t,e,r,n],f=this.options,m=f.debug,v=null;p.length;){n=p.pop(),r=p.pop(),e=p.pop(),t=p.pop();var y=1<<e,g=o(e,r,n),_=this.tiles[g],x=e===f.maxZoom?0:f.tolerance/(y*f.extent);if(!_&&(m>1&&console.time("creation"),_=this.tiles[g]=d(t,y,r,n,x,e===f.maxZoom),this.tileCoords.push({z:e,x:r,y:n}),m)){m>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,n,_.numFeatures,_.numPoints,_.numSimplified),console.timeEnd("creation"));var b="z"+e;this.stats[b]=(this.stats[b]||0)+1,this.total++}if(_.source=t,i){if(e===f.maxZoom||e===i)continue;var w=1<<i-e;if(r!==Math.floor(l/w)||n!==Math.floor(c/w))continue}else if(e===f.indexMaxZoom||_.numPoints<=f.indexMaxPoints)continue;if(f.solidChildren||!u(_,f.extent,f.buffer)){_.source=null,m>1&&console.time("clipping");var T,S,z,A,C,E,k=.5*f.buffer/f.extent,M=.5-k,L=.5+k,I=1+k;T=S=z=A=null,C=h(t,y,r-k,r+L,0,a,_.min[0],_.max[0]),E=h(t,y,r+M,r+I,0,a,_.min[0],_.max[0]),C&&(T=h(C,y,n-k,n+L,1,s,_.min[1],_.max[1]),S=h(C,y,n+M,n+I,1,s,_.min[1],_.max[1])),E&&(z=h(E,y,n-k,n+L,1,s,_.min[1],_.max[1]),A=h(E,y,n+M,n+I,1,s,_.min[1],_.max[1])),m>1&&console.timeEnd("clipping"),t.length&&(p.push(T||[],e+1,2*r,2*n),p.push(S||[],e+1,2*r,2*n+1),p.push(z||[],e+1,2*r+1,2*n),p.push(A||[],e+1,2*r+1,2*n+1))}else i&&(v=e)}return v},i.prototype.getTile=function(t,e,r){var n=this.options,i=n.extent,a=n.debug,s=1<<t;e=(e%s+s)%s;var l=o(t,e,r);if(this.tiles[l])return p.tile(this.tiles[l],i);a>1&&console.log("drilling down to z%d-%d-%d",t,e,r);for(var c,h=t,f=e,d=r;!c&&h>0;)h--,f=Math.floor(f/2),d=Math.floor(d/2),c=this.tiles[o(h,f,d)];if(!c||!c.source)return null;if(a>1&&console.log("found parent tile z%d-%d-%d",h,f,d),u(c,i,n.buffer))return p.tile(c,i);a>1&&console.time("drilling down");var m=this.splitTile(c.source,h,f,d,t,e,r);if(a>1&&console.timeEnd("drilling down"),null!==m){var v=1<<t-m;l=o(m,Math.floor(e/v),Math.floor(r/v))}return this.tiles[l]?p.tile(this.tiles[l],i):null}},{"./clip":14,"./convert":15,"./tile":19,"./transform":20,"./wrap":21}],18:[function(t,e,r){"use strict";function n(t,e){var r,n,o,a,s=e*e,l=t.length,u=0,c=l-1,p=[];for(t[u][2]=1,t[c][2]=1;c;){for(n=0,r=u+1;r<c;r++)(o=i(t[r],t[u],t[c]))>n&&(a=r,n=o);n>s?(t[a][2]=n,p.push(u),p.push(a),u=a):(c=p.pop(),u=p.pop())}}function i(t,e,r){var n=e[0],i=e[1],o=r[0],a=r[1],s=t[0],l=t[1],u=o-n,c=a-i;if(0!==u||0!==c){var p=((s-n)*u+(l-i)*c)/(u*u+c*c);p>1?(n=o,i=a):p>0&&(n+=u*p,i+=c*p)}return u=s-n,c=l-i,u*u+c*c}e.exports=n},{}],19:[function(t,e,r){"use strict";function n(t,e,r,n,o,a){for(var s={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z2:e,transformed:!1,min:[2,1],max:[-1,0]},l=0;l<t.length;l++){s.numFeatures++,i(s,t[l],o,a);var u=t[l].min,c=t[l].max;u[0]<s.min[0]&&(s.min[0]=u[0]),u[1]<s.min[1]&&(s.min[1]=u[1]),c[0]>s.max[0]&&(s.max[0]=c[0]),c[1]>s.max[1]&&(s.max[1]=c[1])}return s}function i(t,e,r,n){var i,a,s,l,u=e.geometry,c=e.type,p=[],h=r*r;if(1===c)for(i=0;i<u.length;i++)p.push(u[i]),t.numPoints++,t.numSimplified++;else for(i=0;i<u.length;i++)if(s=u[i],n||!(2===c&&s.dist<r||3===c&&s.area<h)){var f=[];for(a=0;a<s.length;a++)l=s[a],(n||l[2]>h)&&(f.push(l),t.numSimplified++),t.numPoints++;3===c&&o(f,s.outer),p.push(f)}else t.numPoints+=s.length;if(p.length){var d={geometry:p,type:c,tags:e.tags||null};null!==e.id&&(d.id=e.id),t.features.push(d)}}function o(t,e){a(t)<0===e&&t.reverse()}function a(t){for(var e,r,n=0,i=0,o=t.length,a=o-1;i<o;a=i++)e=t[i],r=t[a],n+=(r[0]-e[0])*(e[1]+r[1]);return n}e.exports=n},{}],20:[function(t,e,r){"use strict";function n(t,e){if(t.transformed)return t;var r,n,o,a=t.z2,s=t.x,l=t.y;for(r=0;r<t.features.length;r++){var u=t.features[r],c=u.geometry;if(1===u.type)for(n=0;n<c.length;n++)c[n]=i(c[n],e,a,s,l);else for(n=0;n<c.length;n++){var p=c[n];for(o=0;o<p.length;o++)p[o]=i(p[o],e,a,s,l)}}return t.transformed=!0,t}function i(t,e,r,n,i){return[Math.round(e*(t[0]*r-n)),Math.round(e*(t[1]*r-i))]}r.tile=n,r.point=i},{}],21:[function(t,e,r){"use strict";function n(t,e,r){var n=t,o=a(t,1,-1-e,e,0,r,-1,2),s=a(t,1,1-e,2+e,0,r,-1,2);return(o||s)&&(n=a(t,1,-e,1+e,0,r,-1,2)||[],o&&(n=i(o,1).concat(n)),s&&(n=n.concat(i(s,-1)))),n}function i(t,e){for(var r=[],n=0;n<t.length;n++){var i,a=t[n],l=a.type;if(1===l)i=o(a.geometry,e);else{i=[];for(var u=0;u<a.geometry.length;u++)i.push(o(a.geometry[u],e))}r.push(s(a.tags,l,i,a.id))}return r}function o(t,e){var r=[];r.area=t.area,r.dist=t.dist;for(var n=0;n<t.length;n++)r.push([t[n][0]+e,t[n][1],t[n][2]]);return r}var a=t("./clip"),s=t("./feature");e.exports=n},{"./clip":14,"./feature":16}],22:[function(t,e,r){"use strict";function n(t,e,r){var n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var o=new Int32Array(this.arrayBuffer);t=o[0],e=o[1],r=o[2],this.d=e+2*r;for(var a=0;a<this.d*this.d;a++){var s=o[i+a],l=o[i+a+1];n.push(s===l?null:o.subarray(s,l))}var u=o[i+n.length],c=o[i+n.length+1];this.keys=o.subarray(u,c),this.bboxes=o.subarray(c),this.insert=this._insertReadonly}else{this.d=e+2*r;for(var p=0;p<this.d*this.d;p++)n.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var h=r/e*t;this.min=-h,this.max=t+h}e.exports=n;var i=3;n.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},n.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},n.prototype._insertCell=function(t,e,r,n,i,o){this.cells[i].push(o)},n.prototype.query=function(t,e,r,n){var i=this.min,o=this.max;if(t<=i&&e<=i&&o<=r&&o<=n)return Array.prototype.slice.call(this.keys);var a=[],s={};return this._forEachCell(t,e,r,n,this._queryCell,a,s),a},n.prototype._queryCell=function(t,e,r,n,i,o,a){var s=this.cells[i];if(null!==s)for(var l=this.keys,u=this.bboxes,c=0;c<s.length;c++){var p=s[c];if(void 0===a[p]){var h=4*p;t<=u[h+2]&&e<=u[h+3]&&r>=u[h+0]&&n>=u[h+1]?(a[p]=!0,o.push(l[p])):a[p]=!1}}},n.prototype._forEachCell=function(t,e,r,n,i,o,a){for(var s=this._convertToCellCoord(t),l=this._convertToCellCoord(e),u=this._convertToCellCoord(r),c=this._convertToCellCoord(n),p=s;p<=u;p++)for(var h=l;h<=c;h++){var f=this.d*h+p;if(i.call(this,t,e,r,n,f,o,a))return}},n.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},n.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=i+this.cells.length+1+1,r=0,n=0;n<this.cells.length;n++)r+=this.cells[n].length;var o=new Int32Array(e+r+this.keys.length+this.bboxes.length);o[0]=this.extent,o[1]=this.n,o[2]=this.padding;for(var a=e,s=0;s<t.length;s++){var l=t[s];o[i+s]=a,o.set(l,a),a+=l.length}return o[i+t.length]=a,o.set(this.keys,a),a+=this.keys.length,o[i+t.length+1]=a,o.set(this.bboxes,a),a+=this.bboxes.length,o.buffer}},{}],23:[function(t,e,r){r.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,l=(1<<s)-1,u=l>>1,c=-7,p=r?i-1:0,h=r?-1:1,f=t[e+p];for(p+=h,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+t[e+p],p+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+t[e+p],p+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},r.write=function(t,e,r,n,i,o){var a,s,l,u=8*o-i-1,c=(1<<u)-1,p=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,d=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),e+=a+p>=1?h/l:h*Math.pow(2,1-p),e*l>=2&&(a++,l/=2),a+p>=c?(s=0,a=c):a+p>=1?(s=(e*l-1)*Math.pow(2,i),a+=p):(s=e*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;t[r+f]=255&s,f+=d,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;t[r+f]=255&a,f+=d,a/=256,u-=8);t[r+f-d]|=128*m}},{}],24:[function(t,e,r){"use strict";function n(t,e,r,n,o){return new i(t,e,r,n,o)}function i(t,e,r,n,i){e=e||o,r=r||a,i=i||Array,this.nodeSize=n||64,this.points=t,this.ids=new i(t.length),this.coords=new i(2*t.length);for(var l=0;l<t.length;l++)this.ids[l]=l,this.coords[2*l]=e(t[l]),this.coords[2*l+1]=r(t[l]);s(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function o(t){return t[0]}function a(t){return t[1]}var s=t("./sort"),l=t("./range"),u=t("./within");e.exports=n,i.prototype={range:function(t,e,r,n){return l(this.ids,this.coords,t,e,r,n,this.nodeSize)},within:function(t,e,r){return u(this.ids,this.coords,t,e,r,this.nodeSize)}}},{"./range":25,"./sort":26,"./within":27}],25:[function(t,e,r){"use strict";function n(t,e,r,n,i,o,a){for(var s,l,u=[0,t.length-1,0],c=[];u.length;){var p=u.pop(),h=u.pop(),f=u.pop();if(h-f<=a)for(var d=f;d<=h;d++)s=e[2*d],l=e[2*d+1],s>=r&&s<=i&&l>=n&&l<=o&&c.push(t[d]);else{var m=Math.floor((f+h)/2);s=e[2*m],l=e[2*m+1],s>=r&&s<=i&&l>=n&&l<=o&&c.push(t[m]);var v=(p+1)%2;(0===p?r<=s:n<=l)&&(u.push(f),u.push(m-1),u.push(v)),(0===p?i>=s:o>=l)&&(u.push(m+1),u.push(h),u.push(v))}}return c}e.exports=n},{}],26:[function(t,e,r){"use strict";function n(t,e,r,o,a,s){if(!(a-o<=r)){var l=Math.floor((o+a)/2);i(t,e,l,o,a,s%2),n(t,e,r,o,l-1,s+1),n(t,e,r,l+1,a,s+1)}}function i(t,e,r,n,a,s){for(;a>n;){if(a-n>600){var l=a-n+1,u=r-n+1,c=Math.log(l),p=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*p*(l-p)/l)*(u-l/2<0?-1:1);i(t,e,r,Math.max(n,Math.floor(r-u*p/l+h)),Math.min(a,Math.floor(r+(l-u)*p/l+h)),s)}var f=e[2*r+s],d=n,m=a;for(o(t,e,n,r),e[2*a+s]>f&&o(t,e,n,a);d<m;){for(o(t,e,d,m),d++,m--;e[2*d+s]<f;)d++;for(;e[2*m+s]>f;)m--}e[2*n+s]===f?o(t,e,n,m):(m++,o(t,e,m,a)),m<=r&&(n=m+1),r<=m&&(a=m-1)}}function o(t,e,r,n){a(t,r,n),a(e,2*r,2*n),a(e,2*r+1,2*n+1)}function a(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}e.exports=n},{}],27:[function(t,e,r){"use strict";function n(t,e,r,n,o,a){for(var s=[0,t.length-1,0],l=[],u=o*o;s.length;){var c=s.pop(),p=s.pop(),h=s.pop();if(p-h<=a)for(var f=h;f<=p;f++)i(e[2*f],e[2*f+1],r,n)<=u&&l.push(t[f]);else{var d=Math.floor((h+p)/2),m=e[2*d],v=e[2*d+1];i(m,v,r,n)<=u&&l.push(t[d]);var y=(c+1)%2;(0===c?r-o<=m:n-o<=v)&&(s.push(h),s.push(d-1),s.push(y)),(0===c?r+o>=m:n+o>=v)&&(s.push(d+1),s.push(p),s.push(y))}}return l}function i(t,e,r,n){var i=t-r,o=e-n;return i*i+o*o}e.exports=n},{}],28:[function(t,e,r){"use strict";function n(t){return!!(i()&&o()&&a()&&s()&&l()&&u()&&c()&&p(t&&t.failIfMajorPerformanceCaveat))}function i(){return"undefined"!=typeof window&&"undefined"!=typeof document}function o(){return 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 a(){return Function.prototype&&Function.prototype.bind}function s(){return 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}function l(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function u(){return"Worker"in window}function c(){return"Uint8ClampedArray"in window}function p(t){return void 0===f[t]&&(f[t]=h(t)),f[t]}function h(t){var e=document.createElement("canvas"),r=Object.create(n.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=t,e.probablySupportsContext?e.probablySupportsContext("webgl",r)||e.probablySupportsContext("experimental-webgl",r):e.supportsContext?e.supportsContext("webgl",r)||e.supportsContext("experimental-webgl",r):e.getContext("webgl",r)||e.getContext("experimental-webgl",r)}"undefined"!=typeof e&&e.exports?e.exports=n:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=n);var f={};n.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}},{}],29:[function(t,e,r){"use strict";function n(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}function i(t,e,r){var n,i,o=r.buf;if(i=o[r.pos++],n=(112&i)>>4,i<128)return a(t,n,e);if(i=o[r.pos++],n|=(127&i)<<3,i<128)return a(t,n,e);if(i=o[r.pos++],n|=(127&i)<<10,i<128)return a(t,n,e);if(i=o[r.pos++],n|=(127&i)<<17,i<128)return a(t,n,e);if(i=o[r.pos++],n|=(127&i)<<24,i<128)return a(t,n,e);if(i=o[r.pos++],n|=(1&i)<<31,i<128)return a(t,n,e);throw new Error("Expected varint not more than 10 bytes")}function o(t){return t.type===n.Bytes?t.readVarint()+t.pos:t.pos+1}function a(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function s(t,e){var r,n;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(r=~(-t%4294967296),n=~(-t/4294967296),4294967295^r?r=r+1|0:(r=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),l(r,n,e),u(n,e)}function l(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}function u(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}function c(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function p(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function h(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function f(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function d(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function m(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function v(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function y(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function g(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r])}function _(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}function x(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function b(t,e,r){t[r]=e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function w(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function T(t,e,r){for(var n="",i=e;i<r;){var o=t[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s>r)break;var l,u,c;1===s?o<128&&(a=o):2===s?128==(192&(l=t[i+1]))&&(a=(31&o)<<6|63&l)<=127&&(a=null):3===s?(l=t[i+1],u=t[i+2],128==(192&l)&&128==(192&u)&&((a=(15&o)<<12|(63&l)<<6|63&u)<=2047||a>=55296&&a<=57343)&&(a=null)):4===s&&(l=t[i+1],u=t[i+2],c=t[i+3],128==(192&l)&&128==(192&u)&&128==(192&c)&&((a=(15&o)<<18|(63&l)<<12|(63&u)<<6|63&c)<=65535||a>=1114112)&&(a=null)),null===a?(a=65533,s=1):a>65535&&(a-=65536,n+=String.fromCharCode(a>>>10&1023|55296),a=56320|1023&a),n+=String.fromCharCode(a),i+=s}return n}function S(t,e,r){for(var n,i,o=0;o<e.length;o++){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){n>56319||o+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(t[r++]=239,t[r++]=191,t[r++]=189,i=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++]=63&n|128)}return r}e.exports=n;var z=t("ieee754");n.Varint=0,n.Fixed64=1,n.Bytes=2,n.Fixed32=5;n.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var n=this.readVarint(),i=n>>3,o=this.pos;this.type=7&n,t(i,e,this),this.pos===o&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=x(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=w(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=x(this.buf,this.pos)+4294967296*x(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=x(this.buf,this.pos)+4294967296*w(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=z.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=z.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return r=n[this.pos++],e=127&r,r<128?e:(r=n[this.pos++],e|=(127&r)<<7,r<128?e:(r=n[this.pos++],e|=(127&r)<<14,r<128?e:(r=n[this.pos++],e|=(127&r)<<21,r<128?e:(r=n[this.pos],e|=(15&r)<<28,i(e,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=T(this.buf,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){var r=o(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===n.Varint)for(;this.buf[this.pos++]>127;);else if(e===n.Bytes)this.pos=this.readVarint()+this.pos;else if(e===n.Fixed32)this.pos+=4;else{if(e!==n.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),b(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),b(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),b(this.buf,-1&t,this.pos),b(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),b(this.buf,-1&t,this.pos),b(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){if((t=+t||0)>268435455||t<0)return void s(t,this);this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127)))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=S(this.buf,t,this.pos);var r=this.pos-e;r>=128&&c(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),z.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),z.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<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var n=this.pos-r;n>=128&&c(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,n.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){this.writeMessage(t,p,e)},writePackedSVarint:function(t,e){this.writeMessage(t,h,e)},writePackedBoolean:function(t,e){this.writeMessage(t,m,e)},writePackedFloat:function(t,e){this.writeMessage(t,f,e)},writePackedDouble:function(t,e){this.writeMessage(t,d,e)},writePackedFixed32:function(t,e){this.writeMessage(t,v,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,y,e)},writePackedFixed64:function(t,e){this.writeMessage(t,g,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,_,e)},writeBytesField:function(t,e){this.writeTag(t,n.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,n.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,n.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,n.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},{ieee754:23}],30:[function(t,e,r){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(t){if(p===setTimeout)return setTimeout(t,0);if((p===n||!p)&&setTimeout)return p=setTimeout,setTimeout(t,0);try{return p(t,0)}catch(e){try{return p.call(null,t,0)}catch(e){return p.call(this,t,0)}}}function a(t){if(h===clearTimeout)return clearTimeout(t);if((h===i||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function s(){v&&d&&(v=!1,d.length?m=d.concat(m):y=-1,m.length&&l())}function l(){if(!v){var t=o(s);v=!0;for(var e=m.length;e;){for(d=m,m=[];++y<e;)d&&d[y].run();y=-1,e=m.length}d=null,v=!1,a(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var p,h,f=e.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:n}catch(t){p=n}try{h="function"==typeof clearTimeout?clearTimeout:i}catch(t){h=i}}();var d,m=[],v=!1,y=-1;f.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];m.push(new u(t,e)),1!==m.length||v||o(l)},u.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.prependListener=c,f.prependOnceListener=c,f.listeners=function(t){return[]},f.binding=function(t){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(t){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],31:[function(t,e,r){"use strict";function n(t,e,r,a,s){for(r=r||0,a=a||t.length-1,s=s||o;a>r;){if(a-r>600){var l=a-r+1,u=e-r+1,c=Math.log(l),p=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*p*(l-p)/l)*(u-l/2<0?-1:1);n(t,e,Math.max(r,Math.floor(e-u*p/l+h)),Math.min(a,Math.floor(e+(l-u)*p/l+h)),s)}var f=t[e],d=r,m=a;for(i(t,r,e),s(t[a],f)>0&&i(t,r,a);d<m;){for(i(t,d,m),d++,m--;s(t[d],f)<0;)d++;for(;s(t[m],f)>0;)m--}0===s(t[r],f)?i(t,r,m):(m++,i(t,m,a)),m<=e&&(r=m+1),e<=m&&(a=m-1)}}function i(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function o(t,e){return t<e?-1:t>e?1:0}e.exports=n},{}],32:[function(t,e,r){"use strict";function n(t){return new i(t)}function i(t){this.options=f(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function o(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:n,properties:i,parentId:-1,numPoints:r}}function a(t,e){var r=t.geometry.coordinates;return{x:u(r[0]),y:c(r[1]),zoom:1/0,id:e,parentId:-1}}function s(t){return{type:"Feature",properties:l(t),geometry:{type:"Point",coordinates:[p(t.x),h(t.y)]}}}function l(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return f(f({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function u(t){return t/360+.5}function c(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function p(t){return 360*(t-.5)}function h(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function f(t,e){for(var r in e)t[r]=e[r];return t}function d(t){return t.x}function m(t){return t.y}var v=t("kdbush");e.exports=n,i.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,initial:function(){return{}},map:function(t){return t}},load:function(t){var e=this.options.log;e&&console.time("total time");var r="prepare "+t.length+" points";e&&console.time(r),this.points=t;var n=t.map(a);e&&console.timeEnd(r);for(var i=this.options.maxZoom;i>=this.options.minZoom;i--){var o=+Date.now();this.trees[i+1]=v(n,d,m,this.options.nodeSize,Float32Array),n=this._cluster(n,i),e&&console.log("z%d: %d clusters in %dms",i,n.length,+Date.now()-o)}return this.trees[this.options.minZoom]=v(n,d,m,this.options.nodeSize,Float32Array),e&&console.timeEnd("total time"),this},getClusters:function(t,e){for(var r=this.trees[this._limitZoom(e)],n=r.range(u(t[0]),c(t[3]),u(t[2]),c(t[1])),i=[],o=0;o<n.length;o++){var a=r.points[n[o]];i.push(a.numPoints?s(a):this.points[a.id])}return i},getChildren:function(t,e){for(var r=this.trees[e+1].points[t],n=this.options.radius/(this.options.extent*Math.pow(2,e)),i=this.trees[e+1].within(r.x,r.y,n),o=[],a=0;a<i.length;a++){var l=this.trees[e+1].points[i[a]];l.parentId===t&&o.push(l.numPoints?s(l):this.points[l.id])}return o},getLeaves:function(t,e,r,n){r=r||10,n=n||0;var i=[];return this._appendLeaves(i,t,e,r,n,0),i},getTile:function(t,e,r){var n=this.trees[this._limitZoom(t)],i=Math.pow(2,t),o=this.options.extent,a=this.options.radius,s=a/o,l=(r-s)/i,u=(r+1+s)/i,c={features:[]};return this._addTileFeatures(n.range((e-s)/i,l,(e+1+s)/i,u),n.points,e,r,i,c),0===e&&this._addTileFeatures(n.range(1-s/i,l,1,u),n.points,i,r,i,c),e===i-1&&this._addTileFeatures(n.range(0,l,s/i,u),n.points,-1,r,i,c),c.features.length?c:null},getClusterExpansionZoom:function(t,e){for(;e<this.options.maxZoom;){var r=this.getChildren(t,e);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e},_appendLeaves:function(t,e,r,n,i,o){for(var a=this.getChildren(e,r),s=0;s<a.length;s++){var l=a[s].properties;if(l.cluster?o+l.point_count<=i?o+=l.point_count:o=this._appendLeaves(t,l.cluster_id,r+1,n,i,o):o<i?o++:t.push(a[s]),t.length===n)break}return o},_addTileFeatures:function(t,e,r,n,i,o){for(var a=0;a<t.length;a++){var s=e[t[a]];o.features.push({type:1,geometry:[[Math.round(this.options.extent*(s.x*i-r)),Math.round(this.options.extent*(s.y*i-n))]],tags:s.numPoints?l(s):this.points[s.id].properties})}},_limitZoom:function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},_cluster:function(t,e){for(var r=[],n=this.options.radius/(this.options.extent*Math.pow(2,e)),i=0;i<t.length;i++){var a=t[i];if(!(a.zoom<=e)){a.zoom=e;var s=this.trees[e+1],l=s.within(a.x,a.y,n),u=a.numPoints||1,c=a.x*u,p=a.y*u,h=null;this.options.reduce&&(h=this.options.initial(),this._accumulate(h,a));for(var f=0;f<l.length;f++){var d=s.points[l[f]];if(e<d.zoom){var m=d.numPoints||1;d.zoom=e,c+=d.x*m,p+=d.y*m,u+=m,d.parentId=i,this.options.reduce&&this._accumulate(h,d)}}1===u?r.push(a):(a.parentId=i,r.push(o(c/u,p/u,u,i,h)))}}return r},_accumulate:function(t,e){var r=e.numPoints?e.properties:this.options.map(this.points[e.id].properties);this.options.reduce(t,r)}}},{kdbush:24}],33:[function(t,e,r){"use strict";function n(t,e){if(!(this instanceof n))return new n(t,e);if(this.data=t||[],this.length=this.data.length,this.compare=e||i,this.length>0)for(var r=this.length>>1;r>=0;r--)this._down(r)}function i(t,e){return t<e?-1:t>e?1:0}e.exports=n,n.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var t=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},peek:function(){return this.data[0]},_up:function(t){for(var e=this.data,r=this.compare,n=e[t];t>0;){var i=t-1>>1,o=e[i];if(r(n,o)>=0)break;e[t]=o,t=i}e[t]=n},_down:function(t){for(var e=this.data,r=this.compare,n=this.length,i=n>>1,o=e[t];t<i;){var a=1+(t<<1),s=a+1,l=e[a];if(s<n&&r(e[s],l)<0&&(a=s,l=e[s]),r(l,o)>=0)break;e[t]=l,t=a}e[t]=o}}},{}],34:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],35:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],36:[function(t,r,n){(function(e,r){function i(t,e){var r={seen:[],stylize:a};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(e)?r.showHidden=e:e&&n._extend(r,e),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),l(r,t,r.depth)}function o(t,e){var r=i.styles[e];return r?"["+i.colors[r][0]+"m"+t+"["+i.colors[r][1]+"m":t}function a(t,e){return t}function s(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function l(t,e,r){if(t.customInspect&&e&&A(e.inspect)&&e.inspect!==n.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(r,t);return _(i)||(i=l(t,i,r)),i}var o=u(t,e);if(o)return o;var a=Object.keys(e),m=s(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(e)),z(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(e);if(0===a.length){if(A(e)){var v=e.name?": "+e.name:"";return t.stylize("[Function"+v+"]","special")}if(w(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(S(e))return t.stylize(Date.prototype.toString.call(e),"date");if(z(e))return c(e)}var y="",g=!1,x=["{","}"];if(d(e)&&(g=!0,x=["[","]"]),A(e)&&(y=" [Function"+(e.name?": "+e.name:"")+"]"),w(e)&&(y=" "+RegExp.prototype.toString.call(e)),S(e)&&(y=" "+Date.prototype.toUTCString.call(e)),z(e)&&(y=" "+c(e)),0===a.length&&(!g||0==e.length))return x[0]+y+x[1];if(r<0)return w(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var b;return b=g?p(t,e,r,m,a):a.map(function(n){return h(t,e,r,m,n,g)}),t.seen.pop(),f(b,y,x)}function u(t,e){if(b(e))return t.stylize("undefined","undefined");if(_(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return g(e)?t.stylize(""+e,"number"):m(e)?t.stylize(""+e,"boolean"):v(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,n,i){for(var o=[],a=0,s=e.length;a<s;++a)L(e,String(a))?o.push(h(t,e,r,n,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(h(t,e,r,n,i,!0))}),o}function h(t,e,r,n,i,o){var a,s,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),L(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=v(r)?l(t,u.value,null):l(t,u.value,r-1),s.indexOf("\n")>-1&&(s=o?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n"))):s=t.stylize("[Circular]","special")),b(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function f(t,e,r){var n=0;return t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function d(t){return Array.isArray(t)}function m(t){return"boolean"==typeof t}function v(t){return null===t}function y(t){return null==t}function g(t){return"number"==typeof t}function _(t){return"string"==typeof t}function x(t){return"symbol"==typeof t}function b(t){return void 0===t}function w(t){return T(t)&&"[object RegExp]"===E(t)}function T(t){return"object"==typeof t&&null!==t}function S(t){return T(t)&&"[object Date]"===E(t)}function z(t){return T(t)&&("[object Error]"===E(t)||t instanceof Error)}function A(t){return"function"==typeof t}function C(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function E(t){return Object.prototype.toString.call(t)}function k(t){return t<10?"0"+t.toString(10):t.toString(10)}function M(){var t=new Date,e=[k(t.getHours()),k(t.getMinutes()),k(t.getSeconds())].join(":");return[t.getDate(),D[t.getMonth()],e].join(" ")}function L(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var I=/%[sdj%]/g;n.format=function(t){if(!_(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,a=String(t).replace(I,function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),s=n[r];r<o;s=n[++r])v(s)||!T(s)?a+=" "+s:a+=" "+i(s);return a},n.deprecate=function(t,i){function o(){if(!a){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),a=!0}return t.apply(this,arguments)}if(b(r.process))return function(){return n.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var a=!1;return o};var P,R={};n.debuglog=function(t){if(b(P)&&(P=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!R[t])if(new RegExp("\\b"+t+"\\b","i").test(P)){var r=e.pid;R[t]=function(){var e=n.format.apply(n,arguments);console.error("%s %d: %s",t,r,e)}}else R[t]=function(){};return R[t]},n.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=d,n.isBoolean=m,n.isNull=v,n.isNullOrUndefined=y,n.isNumber=g,n.isString=_,n.isSymbol=x,n.isUndefined=b,n.isRegExp=w,n.isObject=T,n.isDate=S,n.isError=z,n.isFunction=A,n.isPrimitive=C,n.isBuffer=t("./support/isBuffer");var D=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];n.log=function(){console.log("%s - %s",M(),n.format.apply(n,arguments))},n.inherits=t("inherits"),n._extend=function(t,e){if(!e||!T(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,t("_process"),"undefined"!==typeof e?e:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./support/isBuffer":35,_process:30,inherits:34}],37:[function(t,e,r){function n(t){var e=new f;return o(t,e),e.finish()}function i(t){var e={};for(var r in t)e[r]=new d(t[r].features),e[r].name=r;return n({layers:e})}function o(t,e){for(var r in t.layers)e.writeMessage(3,a,t.layers[r])}function a(t,e){e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);var r,n={keys:[],values:[],keycache:{},valuecache:{}};for(r=0;r<t.length;r++)n.feature=t.feature(r),e.writeMessage(2,s,n);var i=n.keys;for(r=0;r<i.length;r++)e.writeStringField(3,i[r]);var o=n.values;for(r=0;r<o.length;r++)e.writeMessage(4,h,o[r])}function s(t,e){var r=t.feature;void 0!==r.id&&e.writeVarintField(1,r.id),e.writeMessage(2,l,t),e.writeVarintField(3,r.type),e.writeMessage(4,p,r)}function l(t,e){var r=t.feature,n=t.keys,i=t.values,o=t.keycache,a=t.valuecache;for(var s in r.properties){var l=o[s];void 0===l&&(n.push(s),l=n.length-1,o[s]=l),e.writeVarint(l);var u=r.properties[s],c=typeof u;"string"!==c&&"boolean"!==c&&"number"!==c&&(u=JSON.stringify(u));var p=c+":"+u,h=a[p];void 0===h&&(i.push(u),h=i.length-1,a[p]=h),e.writeVarint(h)}}function u(t,e){return(e<<3)+(7&t)}function c(t){return t<<1^t>>31}function p(t,e){for(var r=t.loadGeometry(),n=t.type,i=0,o=0,a=r.length,s=0;s<a;s++){var l=r[s],p=1;1===n&&(p=l.length),e.writeVarint(u(1,p));for(var h=0;h<l.length;h++){1===h&&1!==n&&e.writeVarint(u(2,l.length-1));var f=l[h].x-i,d=l[h].y-o;e.writeVarint(c(f)),e.writeVarint(c(d)),i+=f,o+=d}}}function h(t,e){var r=typeof t;"string"===r?e.writeStringField(1,t):"boolean"===r?e.writeBooleanField(7,t):"number"===r&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}var f=t("pbf"),d=t("./lib/geojson_wrapper");e.exports=n,e.exports.fromVectorTileJs=n,e.exports.fromGeojsonVt=i,e.exports.GeoJSONWrapper=d},{"./lib/geojson_wrapper":38,pbf:29}],38:[function(t,e,r){"use strict";function n(t){this.features=t,this.length=t.length}function i(t){this.id="number"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=4096}var o=t("@mapbox/point-geometry"),a=t("@mapbox/vector-tile").VectorTileFeature;e.exports=n,n.prototype.feature=function(t){return new i(this.features[t])},i.prototype.loadGeometry=function(){var t=this.rawGeometry;this.geometry=[];for(var e=0;e<t.length;e++){for(var r=t[e],n=[],i=0;i<r.length;i++)n.push(new o(r[i][0],r[i][1]));this.geometry.push(n)}return this.geometry},i.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,r=-1/0,n=1/0,i=-1/0,o=0;o<t.length;o++)for(var a=t[o],s=0;s<a.length;s++){var l=a[s];e=Math.min(e,l.x),r=Math.max(r,l.x),n=Math.min(n,l.y),i=Math.max(i,l.y)}return[e,n,r,i]},i.prototype.toGeoJSON=a.prototype.toGeoJSON},{"@mapbox/point-geometry":2,"@mapbox/vector-tile":6}],39:[function(t,e,r){var n=arguments[3],i=arguments[4],o=arguments[5],a=JSON.stringify;e.exports=function(t,e){function r(t){v[t]=!0;for(var e in i[t][1]){var n=i[t][1][e];v[n]||r(n)}}for(var s,l=Object.keys(o),u=0,c=l.length;u<c;u++){var p=l[u],h=o[p].exports;if(h===t||h&&h.default===t){s=p;break}}if(!s){s=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var f={},u=0,c=l.length;u<c;u++){var p=l[u];f[p]=p}i[s]=[Function(["require","module","exports"],"("+t+")(self)"),f]}var d=Math.floor(Math.pow(16,8)*Math.random()).toString(16),m={};m[s]=s,i[d]=[Function(["require"],"var f = require("+a(s)+");(f.default ? f.default : f)(self);"),m];var v={};r(d);var y="("+n+")({"+Object.keys(v).map(function(t){return a(t)+":["+i[t][0]+","+a(i[t][1])+"]"}).join(",")+"},{},["+a(d)+"])",g=window.URL||window.webkitURL||window.mozURL||window.msURL,_=new Blob([y],{type:"text/javascript"});if(e&&e.bare)return _;var x=g.createObjectURL(_),b=new Worker(x);return b.objectURL=x,b}},{}],40:[function(t,e,r){e.exports.RADIUS=6378137,e.exports.FLATTENING=1/298.257223563,e.exports.POLAR_RADIUS=6356752.3142},{}],41:[function(t,e,r){e.exports={version:"0.40.1"}},{}],42:[function(t,e,r){"use strict";var n=t("../util/util");e.exports={deserialize:function(t,e){var r={};if(!e)return r;for(var i=0,o=t;i<o.length;i+=1){var a=o[i],s=a.layerIds.map(function(t){return e.getLayer(t)}).filter(Boolean);if(0!==s.length)for(var l=s[0].createBucket(n.extend({layers:s},a)),u=0,c=s;u<c.length;u+=1){var p=c[u];r[p.id]=l}}return r}}},{"../util/util":223}],43:[function(t,e,r){"use strict";function n(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var i=t("../segment"),o=i.SegmentVector,a=t("../../gl/vertex_buffer"),s=t("../../gl/index_buffer"),l=t("../program_configuration"),u=l.ProgramConfigurationSet,c=t("../vertex_array_type"),p=t("../index_array_type"),h=p.TriangleIndexArray,f=t("../load_geometry"),d=t("../extent"),m={layoutAttributes:[{name:"a_pos",components:2,type:"Int16"}],indexArrayType:h,paintAttributes:[{property:"circle-color"},{property:"circle-radius"},{property:"circle-blur"},{property:"circle-opacity"},{property:"circle-stroke-color"},{property:"circle-stroke-width"},{property:"circle-stroke-opacity"}]},v=c(m.layoutAttributes),y=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.index=t.index,this.layoutVertexArray=new v(t.layoutVertexArray),this.indexArray=new h(t.indexArray),this.programConfigurations=new u(m,t.layers,t.zoom,t.programConfigurations),this.segments=new o(t.segments)};y.prototype.populate=function(t,e){for(var r=this,n=0,i=t;n<i.length;n+=1){var o=i[n],a=o.feature,s=o.index,l=o.sourceLayerIndex;if(r.layers[0].filter(a)){var u=f(a);r.addFeature(a,u),e.featureIndex.insert(a,u,s,l,r.index)}}},y.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},y.prototype.serialize=function(t){return{zoom:this.zoom,layerIds:this.layers.map(function(t){return t.id}),layoutVertexArray:this.layoutVertexArray.serialize(t),indexArray:this.indexArray.serialize(t),programConfigurations:this.programConfigurations.serialize(t),segments:this.segments.get()}},y.prototype.upload=function(t){this.layoutVertexBuffer=new a(t,this.layoutVertexArray),this.indexBuffer=new s(t,this.indexArray),this.programConfigurations.upload(t)},y.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},y.prototype.addFeature=function(t,e){for(var r=this,i=0,o=e;i<o.length;i+=1)for(var a=o[i],s=0,l=a;s<l.length;s+=1){var u=l[s],c=u.x,p=u.y;if(!(c<0||c>=d||p<0||p>=d)){var h=r.segments.prepareSegment(4,r.layoutVertexArray,r.indexArray),f=h.vertexLength;n(r.layoutVertexArray,c,p,-1,-1),n(r.layoutVertexArray,c,p,1,-1),n(r.layoutVertexArray,c,p,1,1),n(r.layoutVertexArray,c,p,-1,1),r.indexArray.emplaceBack(f,f+1,f+2),r.indexArray.emplaceBack(f,f+3,f+2),h.vertexLength+=4,h.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t.properties)},y.programInterface=m,e.exports=y},{"../../gl/index_buffer":61,"../../gl/vertex_buffer":62,"../extent":48,"../index_array_type":50,"../load_geometry":51,"../program_configuration":53,"../segment":55,"../vertex_array_type":56}],44:[function(t,e,r){"use strict";var n=t("../segment"),i=n.SegmentVector,o=t("../../gl/vertex_buffer"),a=t("../../gl/index_buffer"),s=t("../program_configuration"),l=s.ProgramConfigurationSet,u=t("../vertex_array_type"),c=t("../index_array_type"),p=c.LineIndexArray,h=c.TriangleIndexArray,f=t("../load_geometry"),d=t("earcut"),m=t("../../util/classify_rings"),v={layoutAttributes:[{name:"a_pos",components:2,type:"Int16"}],indexArrayType:h,indexArrayType2:p,paintAttributes:[{property:"fill-color"},{property:"fill-outline-color"},{property:"fill-opacity"}]},y=u(v.layoutAttributes),g=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.index=t.index,this.layoutVertexArray=new y(t.layoutVertexArray),this.indexArray=new h(t.indexArray),this.indexArray2=new p(t.indexArray2),this.programConfigurations=new l(v,t.layers,t.zoom,t.programConfigurations),this.segments=new i(t.segments),this.segments2=new i(t.segments2)};g.prototype.populate=function(t,e){for(var r=this,n=0,i=t;n<i.length;n+=1){var o=i[n],a=o.feature,s=o.index,l=o.sourceLayerIndex;if(r.layers[0].filter(a)){var u=f(a);r.addFeature(a,u),e.featureIndex.insert(a,u,s,l,r.index)}}},g.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},g.prototype.serialize=function(t){return{zoom:this.zoom,layerIds:this.layers.map(function(t){return t.id}),layoutVertexArray:this.layoutVertexArray.serialize(t),indexArray:this.indexArray.serialize(t),indexArray2:this.indexArray2.serialize(t),programConfigurations:this.programConfigurations.serialize(t),segments:this.segments.get(),segments2:this.segments2.get()}},g.prototype.upload=function(t){this.layoutVertexBuffer=new o(t,this.layoutVertexArray),this.indexBuffer=new a(t,this.indexArray),this.indexBuffer2=new a(t,this.indexArray2),this.programConfigurations.upload(t)},g.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},g.prototype.addFeature=function(t,e){for(var r=this,n=0,i=m(e,500);n<i.length;n+=1){for(var o=i[n],a=0,s=0,l=o;s<l.length;s+=1)a+=l[s].length;for(var u=r.segments.prepareSegment(a,r.layoutVertexArray,r.indexArray),c=u.vertexLength,p=[],h=[],f=0,v=o;f<v.length;f+=1){var y=v[f];if(0!==y.length){y!==o[0]&&h.push(p.length/2);var g=r.segments2.prepareSegment(y.length,r.layoutVertexArray,r.indexArray2),_=g.vertexLength;r.layoutVertexArray.emplaceBack(y[0].x,y[0].y),r.indexArray2.emplaceBack(_+y.length-1,_),p.push(y[0].x),p.push(y[0].y);for(var x=1;x<y.length;x++)r.layoutVertexArray.emplaceBack(y[x].x,y[x].y),r.indexArray2.emplaceBack(_+x-1,_+x),p.push(y[x].x),p.push(y[x].y);g.vertexLength+=y.length,g.primitiveLength+=y.length}}for(var b=d(p,h),w=0;w<b.length;w+=3)r.indexArray.emplaceBack(c+b[w],c+b[w+1],c+b[w+2]);u.vertexLength+=a,u.primitiveLength+=b.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t.properties)},g.programInterface=v,e.exports=g},{"../../gl/index_buffer":61,"../../gl/vertex_buffer":62,"../../util/classify_rings":205,"../index_array_type":50,"../load_geometry":51,"../program_configuration":53,"../segment":55,"../vertex_array_type":56,earcut:11}],45:[function(t,e,r){"use strict";function n(t,e,r,n,i,o,a,s){t.emplaceBack(e,r,2*Math.floor(n*x)+a,i*x*2,o*x*2,Math.round(s))}function i(t,e){return t.x===e.x&&(t.x<0||t.x>v)||t.y===e.y&&(t.y<0||t.y>v)}var o=t("../segment"),a=o.SegmentVector,s=o.MAX_VERTEX_ARRAY_LENGTH,l=t("../../gl/vertex_buffer"),u=t("../../gl/index_buffer"),c=t("../program_configuration"),p=c.ProgramConfigurationSet,h=t("../vertex_array_type"),f=t("../index_array_type"),d=f.TriangleIndexArray,m=t("../load_geometry"),v=t("../extent"),y=t("earcut"),g=t("../../util/classify_rings"),_={layoutAttributes:[{name:"a_pos",components:2,type:"Int16"},{name:"a_normal",components:3,type:"Int16"},{name:"a_edgedistance",components:1,type:"Int16"}],indexArrayType:d,paintAttributes:[{property:"fill-extrusion-base"},{property:"fill-extrusion-height"},{property:"fill-extrusion-color"}]},x=Math.pow(2,13),b=h(_.layoutAttributes),w=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.index=t.index,this.layoutVertexArray=new b(t.layoutVertexArray),this.indexArray=new d(t.indexArray),this.programConfigurations=new p(_,t.layers,t.zoom,t.programConfigurations),this.segments=new a(t.segments)};w.prototype.populate=function(t,e){for(var r=this,n=0,i=t;n<i.length;n+=1){var o=i[n],a=o.feature,s=o.index,l=o.sourceLayerIndex;if(r.layers[0].filter(a)){var u=m(a);r.addFeature(a,u),e.featureIndex.insert(a,u,s,l,r.index)}}},w.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},w.prototype.serialize=function(t){return{zoom:this.zoom,layerIds:this.layers.map(function(t){return t.id}),layoutVertexArray:this.layoutVertexArray.serialize(t),indexArray:this.indexArray.serialize(t),programConfigurations:this.programConfigurations.serialize(t),segments:this.segments.get()}},w.prototype.upload=function(t){this.layoutVertexBuffer=new l(t,this.layoutVertexArray),this.indexBuffer=new u(t,this.indexArray),this.programConfigurations.upload(t)},w.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},w.prototype.addFeature=function(t,e){for(var r=this,o=0,a=g(e,500);o<a.length;o+=1){for(var l=a[o],u=0,c=0,p=l;c<p.length;c+=1)u+=p[c].length;for(var h=r.segments.prepareSegment(4,r.layoutVertexArray,r.indexArray),f=0,d=l;f<d.length;f+=1){var m=d[f];if(0!==m.length)for(var v=0,_=0;_<m.length;_++){var x=m[_];if(_>=1){var b=m[_-1];if(!i(x,b)){h.vertexLength+4>s&&(h=r.segments.prepareSegment(4,r.layoutVertexArray,r.indexArray));var w=x.sub(b)._perp()._unit();n(r.layoutVertexArray,x.x,x.y,w.x,w.y,0,0,v),n(r.layoutVertexArray,x.x,x.y,w.x,w.y,0,1,v),v+=b.dist(x),n(r.layoutVertexArray,b.x,b.y,w.x,w.y,0,0,v),n(r.layoutVertexArray,b.x,b.y,w.x,w.y,0,1,v);var T=h.vertexLength;r.indexArray.emplaceBack(T,T+1,T+2),r.indexArray.emplaceBack(T+1,T+2,T+3),h.vertexLength+=4,h.primitiveLength+=2}}}}h.vertexLength+u>s&&(h=r.segments.prepareSegment(u,r.layoutVertexArray,r.indexArray));for(var S=[],z=[],A=h.vertexLength,C=0,E=l;C<E.length;C+=1){var k=E[C];if(0!==k.length){k!==l[0]&&z.push(S.length/2);for(var M=0;M<k.length;M++){var L=k[M];n(r.layoutVertexArray,L.x,L.y,0,0,1,1,0),S.push(L.x),S.push(L.y)}}}for(var I=y(S,z),P=0;P<I.length;P+=3)r.indexArray.emplaceBack(A+I[P],A+I[P+1],A+I[P+2]);h.primitiveLength+=I.length/3,h.vertexLength+=u}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t.properties)},w.programInterface=_,e.exports=w},{"../../gl/index_buffer":61,"../../gl/vertex_buffer":62,"../../util/classify_rings":205,"../extent":48,"../index_array_type":50,"../load_geometry":51,"../program_configuration":53,"../segment":55,"../vertex_array_type":56,earcut:11}],46:[function(t,e,r){"use strict";function n(t,e,r,n,i,o,a){t.emplaceBack(e.x,e.y,n?1:0,i?1:-1,Math.round(v*r.x)+128,Math.round(v*r.y)+128,1+(0===o?0:o<0?-1:1)|(a*g&63)<<2,a*g>>6)}var i=t("../segment"),o=i.SegmentVector,a=t("../../gl/vertex_buffer"),s=t("../../gl/index_buffer"),l=t("../program_configuration"),u=l.ProgramConfigurationSet,c=t("../vertex_array_type"),p=t("../index_array_type"),h=p.TriangleIndexArray,f=t("../load_geometry"),d=t("../extent"),m=t("@mapbox/vector-tile").VectorTileFeature.types,v=63,y=Math.cos(Math.PI/180*37.5),g=.5,_=Math.pow(2,14)/g,x={layoutAttributes:[{name:"a_pos_normal",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],paintAttributes:[{property:"line-color"},{property:"line-blur"},{property:"line-opacity"},{property:"line-gap-width",name:"gapwidth"},{property:"line-offset"},{property:"line-width"},{property:"line-width",name:"floorwidth",useIntegerZoom:!0}],indexArrayType:h},b=c(x.layoutAttributes),w=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.index=t.index,this.layoutVertexArray=new b(t.layoutVertexArray),this.indexArray=new h(t.indexArray),this.programConfigurations=new u(x,t.layers,t.zoom,t.programConfigurations),this.segments=new o(t.segments)};w.prototype.populate=function(t,e){for(var r=this,n=0,i=t;n<i.length;n+=1){var o=i[n],a=o.feature,s=o.index,l=o.sourceLayerIndex;if(r.layers[0].filter(a)){var u=f(a);r.addFeature(a,u),e.featureIndex.insert(a,u,s,l,r.index)}}},w.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},w.prototype.serialize=function(t){return{zoom:this.zoom,layerIds:this.layers.map(function(t){return t.id}),layoutVertexArray:this.layoutVertexArray.serialize(t),indexArray:this.indexArray.serialize(t),programConfigurations:this.programConfigurations.serialize(t),segments:this.segments.get()}},w.prototype.upload=function(t){this.layoutVertexBuffer=new a(t,this.layoutVertexArray),this.indexBuffer=new s(t,this.indexArray),this.programConfigurations.upload(t)},w.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},w.prototype.addFeature=function(t,e){for(var r=this,n=this.layers[0].layout,i=this.layers[0].getLayoutValue("line-join",{zoom:this.zoom},t.properties),o=n["line-cap"],a=n["line-miter-limit"],s=n["line-round-limit"],l=0,u=e;l<u.length;l+=1){var c=u[l];r.addLine(c,t,i,o,a,s)}},w.prototype.addLine=function(t,e,r,n,i,o){for(var a=this,s=e.properties,l="Polygon"===m[e.type],u=t.length;u>=2&&t[u-1].equals(t[u-2]);)u--;for(var c=0;c<u-1&&t[c].equals(t[c+1]);)c++;if(!(u<(l?3:2))){"bevel"===r&&(i=1.05);var p=d/(512*this.overscaling)*15,h=t[c],f=this.segments.prepareSegment(10*u,this.layoutVertexArray,this.indexArray);this.distance=0;var v,g,_,x=n,b=l?"butt":n,w=!0,T=void 0,S=void 0,z=void 0,A=void 0;this.e1=this.e2=this.e3=-1,l&&(v=t[u-2],A=h.sub(v)._unit()._perp());for(var C=c;C<u;C++)if(!(S=l&&C===u-1?t[c+1]:t[C+1])||!t[C].equals(S)){A&&(z=A),v&&(T=v),v=t[C],A=S?S.sub(v)._unit()._perp():z,z=z||A;var E=z.add(A);0===E.x&&0===E.y||E._unit();var k=E.x*A.x+E.y*A.y,M=0!==k?1/k:1/0,L=k<y&&T&&S;if(L&&C>c){var I=v.dist(T);if(I>2*p){var P=v.sub(v.sub(T)._mult(p/I)._round());a.distance+=P.dist(T),a.addCurrentVertex(P,a.distance,z.mult(1),0,0,!1,f),T=P}}var R=T&&S,D=R?r:S?x:b;if(R&&"round"===D&&(M<o?D="miter":M<=2&&(D="fakeround")),"miter"===D&&M>i&&(D="bevel"),"bevel"===D&&(M>2&&(D="flipbevel"),M<i&&(D="miter")),T&&(a.distance+=v.dist(T)),"miter"===D)E._mult(M),a.addCurrentVertex(v,a.distance,E,0,0,!1,f);else if("flipbevel"===D){if(M>100)E=A.clone().mult(-1);else{var O=z.x*A.y-z.y*A.x>0?-1:1,B=M*z.add(A).mag()/z.sub(A).mag();E._perp()._mult(B*O)}a.addCurrentVertex(v,a.distance,E,0,0,!1,f),a.addCurrentVertex(v,a.distance,E.mult(-1),0,0,!1,f)}else if("bevel"===D||"fakeround"===D){var F=z.x*A.y-z.y*A.x>0,j=-Math.sqrt(M*M-1);if(F?(_=0,g=j):(g=0,_=j),w||a.addCurrentVertex(v,a.distance,z,g,_,!1,f),"fakeround"===D){for(var V=Math.floor(8*(.5-(k-.5))),N=void 0,U=0;U<V;U++)N=A.mult((U+1)/(V+1))._add(z)._unit(),a.addPieSliceVertex(v,a.distance,N,F,f);a.addPieSliceVertex(v,a.distance,E,F,f);for(var $=V-1;$>=0;$--)N=z.mult(($+1)/(V+1))._add(A)._unit(),a.addPieSliceVertex(v,a.distance,N,F,f)}S&&a.addCurrentVertex(v,a.distance,A,-g,-_,!1,f)}else"butt"===D?(w||a.addCurrentVertex(v,a.distance,z,0,0,!1,f),S&&a.addCurrentVertex(v,a.distance,A,0,0,!1,f)):"square"===D?(w||(a.addCurrentVertex(v,a.distance,z,1,1,!1,f),a.e1=a.e2=-1),S&&a.addCurrentVertex(v,a.distance,A,-1,-1,!1,f)):"round"===D&&(w||(a.addCurrentVertex(v,a.distance,z,0,0,!1,f),a.addCurrentVertex(v,a.distance,z,1,1,!0,f),a.e1=a.e2=-1),S&&(a.addCurrentVertex(v,a.distance,A,-1,-1,!0,f),a.addCurrentVertex(v,a.distance,A,0,0,!1,f)));if(L&&C<u-1){var q=v.dist(S);if(q>2*p){var Z=v.add(S.sub(v)._mult(p/q)._round());a.distance+=Z.dist(v),a.addCurrentVertex(Z,a.distance,A.mult(1),0,0,!1,f),v=Z}}w=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s)}},w.prototype.addCurrentVertex=function(t,e,r,i,o,a,s){var l,u=this.layoutVertexArray,c=this.indexArray;l=r.clone(),i&&l._sub(r.perp()._mult(i)),n(u,t,l,a,!1,i,e),this.e3=s.vertexLength++,this.e1>=0&&this.e2>=0&&(c.emplaceBack(this.e1,this.e2,this.e3),s.primitiveLength++),this.e1=this.e2,this.e2=this.e3,l=r.mult(-1),o&&l._sub(r.perp()._mult(o)),n(u,t,l,a,!0,-o,e),this.e3=s.vertexLength++,this.e1>=0&&this.e2>=0&&(c.emplaceBack(this.e1,this.e2,this.e3),s.primitiveLength++),this.e1=this.e2,this.e2=this.e3,e>_/2&&(this.distance=0,this.addCurrentVertex(t,this.distance,r,i,o,a,s))},w.prototype.addPieSliceVertex=function(t,e,r,i,o){r=r.mult(i?-1:1);var a=this.layoutVertexArray,s=this.indexArray;n(a,t,r,!1,i,0,e),this.e3=o.vertexLength++,this.e1>=0&&this.e2>=0&&(s.emplaceBack(this.e1,this.e2,this.e3),o.primitiveLength++),i?this.e2=this.e3:this.e1=this.e3},w.programInterface=x,e.exports=w},{"../../gl/index_buffer":61,"../../gl/vertex_buffer":62,"../extent":48,"../index_array_type":50,"../load_geometry":51,"../program_configuration":53,"../segment":55,"../vertex_array_type":56,"@mapbox/vector-tile":6}],47:[function(t,e,r){"use strict";function n(t,e,r,n,i,o,a,s){t.emplaceBack(e,r,Math.round(64*n),Math.round(64*i),o,a,s?s[0]:void 0,s?s[1]:void 0)}function i(t,e,r,n){var i=2*Math.PI,o=b((r+i)%i/i*255,10*n);t.emplaceBack(e.x,e.y,o),t.emplaceBack(e.x,e.y,o),t.emplaceBack(e.x,e.y,o),t.emplaceBack(e.x,e.y,o)}function o(t,e,r,n,i,o){return t.emplaceBack(e.x,e.y,r.x,r.y,Math.round(n.x),Math.round(n.y),10*i,10*o)}function a(t,e,r){var n={};if(n.isFeatureConstant=e.isLayoutValueFeatureConstant(r),n.isZoomConstant=e.isLayoutValueZoomConstant(r),n.isFeatureConstant&&(n.layoutSize=e.getLayoutValue(r,{zoom:t+1})),!n.isZoomConstant){for(var i=e.getLayoutValueStopZoomLevels(r),o=0;o<i.length&&i[o]<=t;)o++;o=Math.max(0,o-1);for(var a=o;a<i.length&&i[a]<t+1;)a++;a=Math.min(i.length-1,a),n.coveringZoomRange=[i[o],i[a]],e.isLayoutValueFeatureConstant(r)&&(n.coveringStopValues=[e.getLayoutValue(r,{zoom:i[o]}),e.getLayoutValue(r,{zoom:i[a]})]),n.functionBase=e.getLayoutProperty(r).base,void 0===n.functionBase&&(n.functionBase=1),n.functionType=e.getLayoutProperty(r).type||"exponential"}return n}function s(t,e,r,n,i){return t.isLayoutValueZoomConstant(n)&&!t.isLayoutValueFeatureConstant(n)?[10*t.getLayoutValue(n,{},i)]:t.isLayoutValueZoomConstant(n)||t.isLayoutValueFeatureConstant(n)?null:[10*t.getLayoutValue(n,{zoom:r[0]},i),10*t.getLayoutValue(n,{zoom:r[1]},i)]}var l=t("@mapbox/point-geometry"),u=t("../segment"),c=u.SegmentVector,p=t("../../gl/vertex_buffer"),h=t("../../gl/index_buffer"),f=t("../program_configuration"),d=f.ProgramConfigurationSet,m=t("../vertex_array_type"),v=t("../index_array_type"),y=v.TriangleIndexArray,g=v.LineIndexArray,_=t("../extent"),x=t("../../shaders/encode_attribute"),b=x.packUint8ToFloat,w=t("../../symbol/anchor"),T=t("../../symbol/get_anchors"),S=t("../../util/token"),z=t("../../symbol/quads"),A=z.getGlyphQuads,C=z.getIconQuads,E=t("../../symbol/shaping"),k=E.shapeText,M=E.shapeIcon,L=E.WritingMode,I=t("../../symbol/transform_text"),P=t("../../symbol/mergelines"),R=t("../../symbol/clip_line"),D=t("../../util/util"),O=t("../../util/script_detection"),B=t("../load_geometry"),F=t("../../symbol/collision_feature"),j=t("../../util/find_pole_of_inaccessibility"),V=t("../../util/classify_rings"),N=t("@mapbox/vector-tile").VectorTileFeature.types,U=t("../../util/struct_array"),$=t("../../util/verticalize_punctuation"),q=U({members:[{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{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:"Float32",name:"placementZoom"},{type:"Uint8",name:"vertical"}]}),Z=U({members:[{type:"Float32",name:"offsetX"}]}),G=U({members:[{type:"Int16",name:"x"},{type:"Int16",name:"y"}]}),W=[{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}],H=[{name:"a_projected_pos",components:3,type:"Float32"}],X={text:{layoutAttributes:W,dynamicLayoutAttributes:H,indexArrayType:y,paintAttributes:[{property:"text-color",name:"fill_color"},{property:"text-halo-color",name:"halo_color"},{property:"text-halo-width",name:"halo_width"},{property:"text-halo-blur",name:"halo_blur"},{property:"text-opacity",name:"opacity"}]},icon:{layoutAttributes:W,dynamicLayoutAttributes:H,indexArrayType:y,paintAttributes:[{property:"icon-color",name:"fill_color"},{property:"icon-halo-color",name:"halo_color"},{property:"icon-halo-width",name:"halo_width"},{property:"icon-halo-blur",name:"halo_blur"},{property:"icon-opacity",name:"opacity"}]},collisionBox:{layoutAttributes:[{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"},{name:"a_data",components:2,type:"Uint8"}],indexArrayType:g}},K=function(t,e,r,n){this.programInterface=t;var i=m(t.layoutAttributes),o=t.indexArrayType;if(this.layoutVertexArray=new i(n&&n.layoutVertexArray),this.indexArray=new o(n&&n.indexArray),this.programConfigurations=new d(t,e,r,n&&n.programConfigurations),this.segments=new c(n&&n.segments),t.dynamicLayoutAttributes){var a=m(t.dynamicLayoutAttributes);this.dynamicLayoutVertexArray=new a(n&&n.dynamicLayoutVertexArray)}};K.prototype.serialize=function(t){return{layoutVertexArray:this.layoutVertexArray.serialize(t),indexArray:this.indexArray.serialize(t),programConfigurations:this.programConfigurations.serialize(t),segments:this.segments.get(),dynamicLayoutVertexArray:this.dynamicLayoutVertexArray&&this.dynamicLayoutVertexArray.serialize(t)}},K.prototype.upload=function(t){this.layoutVertexBuffer=new p(t,this.layoutVertexArray),this.indexBuffer=new h(t,this.indexArray),this.programConfigurations.upload(t),this.programInterface.dynamicLayoutAttributes&&(this.dynamicLayoutVertexBuffer=new p(t,this.dynamicLayoutVertexArray,!0))},K.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer&&this.dynamicLayoutVertexBuffer.destroy())};var J=function(t){if(this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.index=t.index,this.sdfIcons=t.sdfIcons,this.iconsNeedLinear=t.iconsNeedLinear,this.pixelRatio=t.pixelRatio,t.text)this.text=new K(X.text,t.layers,t.zoom,t.text),this.icon=new K(X.icon,t.layers,t.zoom,t.icon),this.collisionBox=new K(X.collisionBox,t.layers,t.zoom,t.collisionBox),this.textSizeData=t.textSizeData,this.iconSizeData=t.iconSizeData,this.placedGlyphArray=new q(t.placedGlyphArray),this.placedIconArray=new q(t.placedIconArray),this.glyphOffsetArray=new Z(t.glyphOffsetArray),this.lineVertexArray=new G(t.lineVertexArray);else{var e=this.layers[0];this.textSizeData=a(this.zoom,e,"text-size"),this.iconSizeData=a(this.zoom,e,"icon-size")}};J.prototype.populate=function(t,e){var r=this,n=this.layers[0],i=n.layout,o=i["text-font"],a=(!n.isLayoutValueFeatureConstant("text-field")||i["text-field"])&&o,s=!n.isLayoutValueFeatureConstant("icon-image")||i["icon-image"];if(this.features=[],a||s){for(var l=e.iconDependencies,u=e.glyphDependencies,c=u[o]=u[o]||{},p={zoom:this.zoom},h=0,f=t;h<f.length;h+=1){var d=f[h],m=d.feature,v=d.index,y=d.sourceLayerIndex;if(n.filter(m)){var g=void 0;a&&(g=n.getLayoutValue("text-field",p,m.properties),n.isLayoutValueFeatureConstant("text-field")&&(g=S(m.properties,g)),g=I(g,n,p,m.properties));var _=void 0;if(s&&(_=n.getLayoutValue("icon-image",p,m.properties),n.isLayoutValueFeatureConstant("icon-image")&&(_=S(m.properties,_))),(g||_)&&(r.features.push({text:g,icon:_,index:v,sourceLayerIndex:y,geometry:B(m),properties:m.properties,type:N[m.type]}),_&&(l[_]=!0),g))for(var x="map"===i["text-rotation-alignment"]&&"line"===i["symbol-placement"],b=O.allowsVerticalWritingMode(g),w=0;w<g.length;w++)if(c[g.charCodeAt(w)]=!0,x&&b){var T=$.lookup[g.charAt(w)];T&&(c[T.charCodeAt(0)]=!0)}}}"line"===i["symbol-placement"]&&(this.features=P(this.features))}},J.prototype.isEmpty=function(){return 0===this.icon.layoutVertexArray.length&&0===this.text.layoutVertexArray.length&&0===this.collisionBox.layoutVertexArray.length},J.prototype.serialize=function(t){return{zoom:this.zoom,layerIds:this.layers.map(function(t){return t.id}),sdfIcons:this.sdfIcons,iconsNeedLinear:this.iconsNeedLinear,textSizeData:this.textSizeData,iconSizeData:this.iconSizeData,placedGlyphArray:this.placedGlyphArray.serialize(t),placedIconArray:this.placedIconArray.serialize(t),glyphOffsetArray:this.glyphOffsetArray.serialize(t),lineVertexArray:this.lineVertexArray.serialize(t),text:this.text.serialize(t),icon:this.icon.serialize(t),collisionBox:this.collisionBox.serialize(t)}},J.prototype.upload=function(t){this.text.upload(t),this.icon.upload(t),this.collisionBox.upload(t)},J.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.collisionBox.destroy()},J.prototype.prepare=function(t,e,r,n){var i=this;this.symbolInstances=[];var o=512*this.overscaling;this.tilePixelRatio=_/o,this.compareText={},this.iconsNeedLinear=!1;for(var a=this.layers[0].layout,s=24*a["text-line-height"],l=a["text-font"].join(","),u="map"===a["text-rotation-alignment"]&&"line"===a["symbol-placement"],c=t[l]||{},p=e[l]||{},h=0,f=i.features;h<f.length;h+=1){var d=f[h],m={},v=d.text;if(v){var y=i.layers[0].getLayoutValue("text-offset",{zoom:i.zoom},d.properties).map(function(t){return 24*t}),g=24*i.layers[0].getLayoutValue("text-letter-spacing",{zoom:i.zoom},d.properties),x=O.allowsLetterSpacing(v)?g:0,b=i.layers[0].getLayoutValue("text-anchor",{zoom:i.zoom},d.properties),w=i.layers[0].getLayoutValue("text-justify",{zoom:i.zoom},d.properties),T="line"!==a["symbol-placement"]?24*i.layers[0].getLayoutValue("text-max-width",{zoom:i.zoom},d.properties):0,S=function(t,e){return k(t,c,T,s,b,w,x,y,24,e)};m[L.horizontal]=S(v,L.horizontal),O.allowsVerticalWritingMode(v)&&u&&(m[L.vertical]=S(v,L.vertical))}var z=void 0;if(d.icon){var A=r[d.icon];A&&(z=M(n[d.icon],i.layers[0].getLayoutValue("icon-offset",{zoom:i.zoom},d.properties),i.layers[0].getLayoutValue("icon-anchor",{zoom:i.zoom},d.properties)),void 0===i.sdfIcons?i.sdfIcons=A.sdf:i.sdfIcons!==A.sdf&&D.warnOnce("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),A.pixelRatio!==i.pixelRatio?i.iconsNeedLinear=!0:0===a["icon-rotate"]&&i.layers[0].isLayoutValueFeatureConstant("icon-rotate")||(i.iconsNeedLinear=!0))}(m[L.horizontal]||z)&&i.addFeature(d,m,z,p)}},J.prototype.addFeature=function(t,e,r,n){var i=this,o=this.layers[0].getLayoutValue("text-size",{zoom:this.zoom+1},t.properties),a=this.layers[0].getLayoutValue("icon-size",{zoom:this.zoom+1},t.properties),s=this.layers[0].getLayoutValue("text-offset",{zoom:this.zoom},t.properties),l=this.layers[0].getLayoutValue("icon-offset",{zoom:this.zoom},t.properties),u=this.layers[0].getLayoutValue("text-size",{zoom:18},t.properties);void 0===u&&(u=o);var c=this.layers[0].layout,p=o/24,h=this.tilePixelRatio*p,f=this.tilePixelRatio*u/24,d=this.tilePixelRatio*a,m=this.tilePixelRatio*c["symbol-spacing"],v=c["symbol-avoid-edges"],y=c["text-padding"]*this.tilePixelRatio,g=c["icon-padding"]*this.tilePixelRatio,x=c["text-max-angle"]/180*Math.PI,b="map"===c["text-rotation-alignment"]&&"line"===c["symbol-placement"],S="map"===c["icon-rotation-alignment"]&&"line"===c["symbol-placement"],z=c["text-allow-overlap"]||c["icon-allow-overlap"]||c["text-ignore-placement"]||c["icon-ignore-placement"],A=c["symbol-placement"],C=m/2,E=function(o,a){var u=!(a.x<0||a.x>_||a.y<0||a.y>_);if(!v||u){var c=u||z;i.addSymbolInstance(a,o,e,r,i.layers[0],c,i.collisionBoxArray,t.index,t.sourceLayerIndex,i.index,h,y,b,s,d,g,S,l,{zoom:i.zoom},t.properties,n)}};if("line"===A)for(var k=0,M=R(t.geometry,0,0,_,_);k<M.length;k+=1)for(var I=M[k],P=T(I,m,x,e[L.vertical]||e[L.horizontal],r,24,f,i.overscaling,_),D=0,O=P;D<O.length;D+=1){var B=O[D],F=e[L.horizontal];F&&i.anchorIsTooClose(F.text,C,B)||E(I,B)}else if("Polygon"===t.type)for(var N=0,U=V(t.geometry,0);N<U.length;N+=1){var $=U[N],q=j($,16);E($[0],new w(q.x,q.y,0))}else if("LineString"===t.type)for(var Z=0,G=t.geometry;Z<G.length;Z+=1){var W=G[Z];E(W,new w(W[0].x,W[0].y,0))}else if("Point"===t.type)for(var H=0,X=t.geometry;H<X.length;H+=1)for(var K=X[H],J=0,Y=K;J<Y.length;J+=1){var Q=Y[J];E([Q],new w(Q.x,Q.y,0))}},J.prototype.anchorIsTooClose=function(t,e,r){var n=this.compareText;if(t in n){for(var i=n[t],o=i.length-1;o>=0;o--)if(r.dist(i[o])<e)return!0}else n[t]=[];return n[t].push(r),!1},J.prototype.place=function(t,e){var r=this;this.text=new K(X.text,this.layers,this.zoom),this.icon=new K(X.icon,this.layers,this.zoom),this.collisionBox=new K(X.collisionBox,this.layers,this.zoom),this.placedGlyphArray=new q,this.placedIconArray=new q,this.glyphOffsetArray=new Z,this.lineVertexArray=new G;var n=this.layers[0],i=n.layout,o=t.maxScale,a="map"===i["text-rotation-alignment"]&&"line"===i["symbol-placement"],l="map"===i["icon-rotation-alignment"]&&"line"===i["symbol-placement"];if(i["text-allow-overlap"]||i["icon-allow-overlap"]||i["text-ignore-placement"]||i["icon-ignore-placement"]){var u=t.angle,c=Math.sin(u),p=Math.cos(u);this.symbolInstances.sort(function(t,e){return(c*t.anchor.x+p*t.anchor.y|0)-(c*e.anchor.x+p*e.anchor.y|0)||e.featureIndex-t.featureIndex})}for(var h=0,f=r.symbolInstances;h<f.length;h+=1){var d=f[h],m={boxStartIndex:d.textBoxStartIndex,boxEndIndex:d.textBoxEndIndex},v={boxStartIndex:d.iconBoxStartIndex,boxEndIndex:d.iconBoxEndIndex},y=!(d.textBoxStartIndex===d.textBoxEndIndex),g=!(d.iconBoxStartIndex===d.iconBoxEndIndex),_=i["text-optional"]||!y,x=i["icon-optional"]||!g,b=y?t.placeCollisionFeature(m,i["text-allow-overlap"],i["symbol-avoid-edges"]):t.minScale,w=g?t.placeCollisionFeature(v,i["icon-allow-overlap"],i["symbol-avoid-edges"]):t.minScale;if(_||x?!x&&b?b=Math.max(w,b):!_&&w&&(w=Math.max(w,b)):w=b=Math.max(w,b),y||g){for(var T=d.line,S=r.lineVertexArray.length,z=0;z<T.length;z++)r.lineVertexArray.emplaceBack(T[z].x,T[z].y);var A=r.lineVertexArray.length-S;if(y&&(t.insertCollisionFeature(m,b,i["text-ignore-placement"]),b<=o)){var C=s(n,r.zoom,r.textSizeData.coveringZoomRange,"text-size",d.featureProperties);r.addSymbols(r.text,d.glyphQuads,b,C,i["text-keep-upright"],d.textOffset,a,t.angle,d.featureProperties,d.writingModes,d.anchor,S,A,r.placedGlyphArray)}if(g&&(t.insertCollisionFeature(v,w,i["icon-ignore-placement"]),w<=o)){var E=s(n,r.zoom,r.iconSizeData.coveringZoomRange,"icon-size",d.featureProperties);r.addSymbols(r.icon,d.iconQuads,w,E,i["icon-keep-upright"],d.iconOffset,l,t.angle,d.featureProperties,0,d.anchor,S,A,r.placedIconArray)}}}e&&this.addToDebugBuffers(t)},J.prototype.addSymbols=function(t,e,r,o,a,s,l,u,c,p,h,f,d,m){for(var v=this,y=t.indexArray,g=t.layoutVertexArray,_=t.dynamicLayoutVertexArray,x=this.zoom,b=Math.max(Math.log(r)/Math.LN2+x,0),w=this.glyphOffsetArray.length,T=(h.angle+u+2*Math.PI)%(2*Math.PI),S=T>1*Math.PI/4&&T<=3*Math.PI/4||T>5*Math.PI/4&&T<=7*Math.PI/4,z=Boolean(p&L.vertical)&&S,A=0,C=e;A<C.length;A+=1){var E=C[A];if(!l||!a||E.writingMode===L.vertical===z){var k=E.tl,M=E.tr,I=E.bl,P=E.br,R=E.tex,D=t.segments.prepareSegment(4,t.layoutVertexArray,t.indexArray),O=D.vertexLength,B=E.glyphOffset[1];n(g,h.x,h.y,k.x,B+k.y,R.x,R.y,o),n(g,h.x,h.y,M.x,B+M.y,R.x+R.w,R.y,o),n(g,h.x,h.y,I.x,B+I.y,R.x,R.y+R.h,o),n(g,h.x,h.y,P.x,B+P.y,R.x+R.w,R.y+R.h,o),i(_,h,0,b),y.emplaceBack(O,O+1,O+2),y.emplaceBack(O+1,O+2,O+3),D.vertexLength+=4,D.primitiveLength+=2,v.glyphOffsetArray.emplaceBack(E.glyphOffset[0])}}m.emplaceBack(h.x,h.y,w,this.glyphOffsetArray.length-w,f,d,h.segment,o?o[0]:0,o?o[1]:0,s[0],s[1],b,z),t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,c)},J.prototype.addToDebugBuffers=function(t){for(var e=this,r=this.collisionBox,n=r.layoutVertexArray,i=r.indexArray,a=-t.angle,s=t.yStretch,u=0,c=e.symbolInstances;u<c.length;u+=1){var p=c[u];p.textCollisionFeature={boxStartIndex:p.textBoxStartIndex,boxEndIndex:p.textBoxEndIndex},p.iconCollisionFeature={boxStartIndex:p.iconBoxStartIndex,boxEndIndex:p.iconBoxEndIndex};for(var h=0;h<2;h++){var f=p[0===h?"textCollisionFeature":"iconCollisionFeature"];if(f)for(var d=f.boxStartIndex;d<f.boxEndIndex;d++){var m=e.collisionBoxArray.get(d);if(!(1===t.perspectiveRatio&&m.maxScale<1)){var v=m.anchorPoint,y=new l(m.x1,m.y1*s)._rotate(a),g=new l(m.x2,m.y1*s)._rotate(a),_=new l(m.x1,m.y2*s)._rotate(a),x=new l(m.x2,m.y2*s)._rotate(a),b=Math.max(0,Math.min(25,e.zoom+Math.log(m.maxScale)/Math.LN2)),w=Math.max(0,Math.min(25,e.zoom+Math.log(m.placementScale)/Math.LN2)),T=r.segments.prepareSegment(4,r.layoutVertexArray,r.indexArray),S=T.vertexLength;o(n,v,p.anchor,y,b,w),o(n,v,p.anchor,g,b,w),o(n,v,p.anchor,x,b,w),o(n,v,p.anchor,_,b,w),i.emplaceBack(S,S+1),i.emplaceBack(S+1,S+2),i.emplaceBack(S+2,S+3),i.emplaceBack(S+3,S),T.vertexLength+=4,T.primitiveLength+=4}}}}},J.prototype.addSymbolInstance=function(t,e,r,n,i,o,a,s,l,u,c,p,h,f,d,m,v,y,g,_,x){var b,w,T=[],S=[];for(var z in r){var E=parseInt(z,10);r[E]&&(S=S.concat(o?A(t,r[E],i,h,g,_,x):[]),b=new F(a,e,t,s,l,u,r[E],c,p,h,!1))}var k=b?b.boxStartIndex:this.collisionBoxArray.length,M=b?b.boxEndIndex:this.collisionBoxArray.length;n&&(T=o?C(t,n,i,v,r[L.horizontal],g,_):[],w=new F(a,e,t,s,l,u,n,d,m,v,!0));var I=w?w.boxStartIndex:this.collisionBoxArray.length,P=w?w.boxEndIndex:this.collisionBoxArray.length;M>J.MAX_INSTANCES&&D.warnOnce("Too many symbols being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),P>J.MAX_INSTANCES&&D.warnOnce("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907");var R=(r[L.vertical]?L.vertical:0)|(r[L.horizontal]?L.horizontal:0);this.symbolInstances.push({textBoxStartIndex:k,textBoxEndIndex:M,iconBoxStartIndex:I,iconBoxEndIndex:P,glyphQuads:S,iconQuads:T,textOffset:f,iconOffset:y,anchor:t,line:e,featureIndex:s,featureProperties:_,writingModes:R})},J.programInterfaces=X,J.MAX_INSTANCES=65535,J.addDynamicAttributes=i,e.exports=J},{"../../gl/index_buffer":61,"../../gl/vertex_buffer":62,"../../shaders/encode_attribute":85,"../../symbol/anchor":167,"../../symbol/clip_line":169,"../../symbol/collision_feature":171,"../../symbol/get_anchors":173,"../../symbol/mergelines":174,"../../symbol/quads":176,"../../symbol/shaping":177,"../../symbol/transform_text":179,"../../util/classify_rings":205,"../../util/find_pole_of_inaccessibility":211,"../../util/script_detection":218,"../../util/struct_array":220,"../../util/token":222,"../../util/util":223,"../../util/verticalize_punctuation":225,"../extent":48,"../index_array_type":50,"../load_geometry":51,"../program_configuration":53,"../segment":55,"../vertex_array_type":56,"@mapbox/point-geometry":2,"@mapbox/vector-tile":6}],48:[function(t,e,r){"use strict";e.exports=8192},{}],49:[function(t,e,r){"use strict";function n(t,e){return e-t}var i=(t("@mapbox/point-geometry"),t("./load_geometry")),o=t("./extent"),a=t("../style-spec/feature_filter"),s=t("../util/struct_array"),l=t("grid-index"),u=t("../util/dictionary_coder"),c=t("@mapbox/vector-tile"),p=t("pbf"),h=t("../util/vectortile_to_geojson"),f=t("../util/util").arraysIntersect,d=s({members:[{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]}),m=function(t,e,r,n){this.coord=t,this.overscaling=e,this.x=t.x,this.y=t.y,this.z=t.z-Math.log(e)/Math.LN2,this.grid=r||new l(o,16,0),this.featureIndexArray=n||new d};m.deserialize=function(t,e,r){var n=new m(t.coord,t.overscaling,new l(t.grid),new d(t.featureIndexArray));return n.rawTileData=e,n.bucketLayerIDs=t.bucketLayerIDs,n.setCollisionTile(r),n},m.prototype.insert=function(t,e,r,n,i){var o=this,a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,n,i);for(var s=0;s<e.length;s++){for(var l=e[s],u=[1/0,1/0,-1/0,-1/0],c=0;c<l.length;c++){var p=l[c];u[0]=Math.min(u[0],p.x),u[1]=Math.min(u[1],p.y),u[2]=Math.max(u[2],p.x),u[3]=Math.max(u[3],p.y)}o.grid.insert(a,u[0],u[1],u[2],u[3])}},m.prototype.setCollisionTile=function(t){this.collisionTile=t},m.prototype.serialize=function(t){var e=this.grid.toArrayBuffer();return t&&t.push(e),{coord:this.coord,overscaling:this.overscaling,grid:e,featureIndexArray:this.featureIndexArray.serialize(t),bucketLayerIDs:this.bucketLayerIDs}},m.prototype.query=function(t,e){this.vtLayers||(this.vtLayers=new c.VectorTile(new p(this.rawTileData)).layers,this.sourceLayerCoder=new u(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"]));for(var r={},i=t.params||{},s=o/t.tileSize/t.scale,l=a(i.filter),h=t.queryGeometry,f=t.additionalRadius*s,d=1/0,m=1/0,v=-1/0,y=-1/0,g=0;g<h.length;g++)for(var _=h[g],x=0;x<_.length;x++){var b=_[x];d=Math.min(d,b.x),m=Math.min(m,b.y),v=Math.max(v,b.x),y=Math.max(y,b.y)}var w=this.grid.query(d-f,m-f,v+f,y+f);w.sort(n),this.filterMatching(r,w,this.featureIndexArray,h,l,i.layers,e,t.bearing,s);var T=this.collisionTile.queryRenderedSymbols(h,t.scale);return T.sort(),this.filterMatching(r,T,this.collisionTile.collisionBoxArray,h,l,i.layers,e,t.bearing,s),r},m.prototype.filterMatching=function(t,e,r,n,o,a,s,l,u){for(var c,p=this,d=0;d<e.length;d++){var m=e[d];if(m!==c){c=m;var v=r.get(m),y=p.bucketLayerIDs[v.bucketIndex];if(!a||f(a,y)){var g=p.sourceLayerCoder.decode(v.sourceLayerIndex),_=p.vtLayers[g],x=_.feature(v.featureIndex);if(o(x))for(var b=null,w=0;w<y.length;w++){var T=y[w];if(!(a&&a.indexOf(T)<0)){var S=s[T];if(S&&("symbol"===S.type||(b||(b=i(x)),S.queryIntersectsFeature(n,x,b,p.z,l,u)))){var z=new h(x,p.z,p.x,p.y);z.layer=S.serialize();var A=t[T];void 0===A&&(A=t[T]=[]),A.push({featureIndex:m,feature:z})}}}}}}},m.prototype.hasLayer=function(t){for(var e=this,r=0,n=e.bucketLayerIDs;r<n.length;r+=1)for(var i=n[r],o=0,a=i;o<a.length;o+=1){var s=a[o];if(t===s)return!0}return!1},e.exports=m},{"../style-spec/feature_filter":110,"../util/dictionary_coder":207,"../util/struct_array":220,"../util/util":223,"../util/vectortile_to_geojson":224,"./extent":48,"./load_geometry":51,"@mapbox/point-geometry":2,"@mapbox/vector-tile":6,"grid-index":22,pbf:29}],50:[function(t,e,r){"use strict";function n(t){return i({members:[{type:"Uint16",name:"vertices",components:t}]})}var i=t("../util/struct_array");e.exports={LineIndexArray:n(2),TriangleIndexArray:n(3)}},{"../util/struct_array":220}],51:[function(t,e,r){"use strict";var n=t("../util/util"),i=t("./extent"),o=function(t){return{min:-1*Math.pow(2,t-1),max:Math.pow(2,t-1)-1}}(16);e.exports=function(t){for(var e=i/t.extent,r=t.loadGeometry(),a=0;a<r.length;a++)for(var s=r[a],l=0;l<s.length;l++){var u=s[l];u.x=Math.round(u.x*e),u.y=Math.round(u.y*e),(u.x<o.min||u.x>o.max||u.y<o.min||u.y>o.max)&&n.warnOnce("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}},{"../util/util":223,"./extent":48}],52:[function(t,e,r){"use strict";var n=t("../util/struct_array"),i=n({members:[{name:"a_pos",type:"Int16",components:2}]});e.exports=i},{"../util/struct_array":220}],53:[function(t,e,r){"use strict";function n(t){return[a(255*t[0],255*t[1]),a(255*t[2],255*t[3])]}var i=t("./vertex_array_type"),o=t("../style-spec/function").interpolationFactor,a=t("../shaders/encode_attribute").packUint8ToFloat,s=t("../gl/vertex_buffer"),l=function(t,e,r,n){this.name=t,this.type=e,this.property=r,this.useIntegerZoom=n};l.prototype.defines=function(){return["#define HAS_UNIFORM_u_"+this.name]},l.prototype.populatePaintArray=function(){},l.prototype.setUniforms=function(t,e,r,n){var i=n.zoom,o=r.getPaintValue(this.property,{zoom:this.useIntegerZoom?Math.floor(i):i});"color"===this.type?t.uniform4fv(e.uniforms["u_"+this.name],o):t.uniform1f(e.uniforms["u_"+this.name],o)};var u=function(t,e,r){this.name=t,this.type=e,this.property=r};u.prototype.defines=function(){return[]},u.prototype.populatePaintArray=function(t,e,r,i,o,a){var s=this,l=t.getPaintValue(this.property,void 0,a);if("color"===this.type)for(var u=n(l),c=i;c<o;c++){var p=e.get(c);p["a_"+s.name+"0"]=u[0],p["a_"+s.name+"1"]=u[1]}else{for(var h=i;h<o;h++)e.get(h)["a_"+s.name]=l;var f=r[this.property];f.max=Math.max(f.max,l)}},u.prototype.setUniforms=function(t,e){t.uniform1f(e.uniforms["a_"+this.name+"_t"],0)};var c=function(t,e,r,n,i){this.name=t,this.type=e,this.property=r,this.useIntegerZoom=n,this.zoom=i};c.prototype.defines=function(){return[]},c.prototype.populatePaintArray=function(t,e,r,i,o,a){var s=this,l=t.getPaintValue(this.property,{zoom:this.zoom},a),u=t.getPaintValue(this.property,{zoom:this.zoom+1},a);if("color"===this.type)for(var c=n(l),p=n(u),h=i;h<o;h++){var f=e.get(h);f["a_"+s.name+"0"]=c[0],f["a_"+s.name+"1"]=c[1],f["a_"+s.name+"2"]=p[0],f["a_"+s.name+"3"]=p[1]}else{for(var d=i;d<o;d++){var m=e.get(d);m["a_"+s.name+"0"]=l,m["a_"+s.name+"1"]=u}var v=r[this.property];v.max=Math.max(v.max,l,u)}},c.prototype.setUniforms=function(t,e,r,n){var i=n.zoom,a=o(this.useIntegerZoom?Math.floor(i):i,1,this.zoom,this.zoom+1);t.uniform1f(e.uniforms["a_"+this.name+"_t"],a)};var p=function(){this.binders={},this.cacheKey=""};p.createDynamic=function(t,e,r){for(var n=new p,o=[],a=0,s=t.paintAttributes||[];a<s.length;a+=1){var h=s[a],f=h.property,d=h.useIntegerZoom||!1,m=h.name||f.replace(e.type+"-","").replace(/-/g,"_"),v=e._paintSpecifications[f].type;e.isPaintValueFeatureConstant(f)?(n.binders[m]=new l(m,v,f,d),n.cacheKey+="/u_"+m):e.isPaintValueZoomConstant(f)?(n.binders[m]=new u(m,v,f),n.cacheKey+="/a_"+m,o.push({name:"a_"+m,type:"Float32",components:"color"===v?2:1})):(n.binders[m]=new c(m,v,f,d,r),n.cacheKey+="/z_"+m,o.push({name:"a_"+m,type:"Float32",components:"color"===v?4:2}))}return n.PaintVertexArray=i(o),n.interface=t,n.layer=e,n},p.createBasicFill=function(){var t=new p;return t.binders.color=new l("color","color","fill-color",!1),t.cacheKey+="/u_color",t.binders.opacity=new l("opacity","number","fill-opacity",!1),t.cacheKey+="/u_opacity",t},p.prototype.createPaintPropertyStatistics=function(){var t=this,e={};for(var r in t.binders)e[t.binders[r].property]={max:-1/0};return e},p.prototype.populatePaintArray=function(t,e){var r=this,n=this.paintVertexArray;if(0!==n.bytesPerElement){var i=n.length;n.resize(t);for(var o in r.binders)r.binders[o].populatePaintArray(r.layer,n,r.paintPropertyStatistics,i,t,e)}},p.prototype.defines=function(){var t=this,e=[];for(var r in t.binders)e.push.apply(e,t.binders[r].defines());return e},p.prototype.setUniforms=function(t,e,r,n){var i=this;for(var o in i.binders)i.binders[o].setUniforms(t,e,r,n)},p.prototype.serialize=function(t){return 0===this.paintVertexArray.length?null:{array:this.paintVertexArray.serialize(t),type:this.paintVertexArray.constructor.serialize(),statistics:this.paintPropertyStatistics}},p.deserialize=function(t,e,r,n){var o=p.createDynamic(t,e,r);return n&&(o.PaintVertexArray=i(n.type.members),o.paintVertexArray=new o.PaintVertexArray(n.array),o.paintPropertyStatistics=n.statistics),o},p.prototype.upload=function(t){this.paintVertexArray&&(this.paintVertexBuffer=new s(t,this.paintVertexArray))},p.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var h=function(t,e,r,n){var i=this;if(this.programConfigurations={},n)for(var o=0,a=e;o<a.length;o+=1){var s=a[o];i.programConfigurations[s.id]=p.deserialize(t,s,r,n[s.id])}else for(var l=0,u=e;l<u.length;l+=1){var c=u[l],h=p.createDynamic(t,c,r);h.paintVertexArray=new h.PaintVertexArray,h.paintPropertyStatistics=h.createPaintPropertyStatistics(),i.programConfigurations[c.id]=h}};h.prototype.populatePaintArrays=function(t,e){var r=this;for(var n in r.programConfigurations)r.programConfigurations[n].populatePaintArray(t,e)},h.prototype.serialize=function(t){var e=this,r={};for(var n in e.programConfigurations){var i=e.programConfigurations[n].serialize(t);i&&(r[n]=i)}return r},h.prototype.get=function(t){return this.programConfigurations[t]},h.prototype.upload=function(t){var e=this;for(var r in e.programConfigurations)e.programConfigurations[r].upload(t)},h.prototype.destroy=function(){var t=this;for(var e in t.programConfigurations)t.programConfigurations[e].destroy()},e.exports={ProgramConfiguration:p,ProgramConfigurationSet:h}},{"../gl/vertex_buffer":62,"../shaders/encode_attribute":85,"../style-spec/function":112,"./vertex_array_type":56}],54:[function(t,e,r){"use strict";var n=t("../util/struct_array"),i=n({members:[{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]});e.exports=i},{"../util/struct_array":220}],55:[function(t,e,r){"use strict";var n=t("../util/util"),i=n.warnOnce,o=Math.pow(2,16)-1,a=function(t){void 0===t&&(t=[]),this.segments=t};a.prototype.prepareSegment=function(t,r,n){var a=this.segments[this.segments.length-1];return t>o&&i("Max vertices per segment is "+o+": bucket requested "+t),(!a||a.vertexLength+t>e.exports.MAX_VERTEX_ARRAY_LENGTH)&&(a={vertexOffset:r.length,primitiveOffset:n.length,vertexLength:0,primitiveLength:0},this.segments.push(a)),a},a.prototype.get=function(){return this.segments},a.prototype.destroy=function(){for(var t=this,e=0,r=t.segments;e<r.length;e+=1){var n=r[e];for(var i in n.vaos)n.vaos[i].destroy()}},e.exports={SegmentVector:a,MAX_VERTEX_ARRAY_LENGTH:o}},{"../util/util":223}],56:[function(t,e,r){"use strict";function n(t){return i({members:t,alignment:4})}var i=t("../util/struct_array");e.exports=n},{"../util/struct_array":220}],57:[function(t,e,r){"use strict";var n=function(t,e,r){this.column=t,this.row=e,this.zoom=r};n.prototype.clone=function(){return new n(this.column,this.row,this.zoom)},n.prototype.zoomTo=function(t){return this.clone()._zoomTo(t)},n.prototype.sub=function(t){return this.clone()._sub(t)},n.prototype._zoomTo=function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this},n.prototype._sub=function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this},e.exports=n},{}],58:[function(t,e,r){"use strict";var n=t("../util/util").wrap,i=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};i.prototype.wrap=function(){return new i(n(this.lng,-180,180),this.lat)},i.prototype.toArray=function(){return[this.lng,this.lat]},i.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},i.prototype.toBounds=function(e){var r=360*e/40075017,n=r/Math.cos(Math.PI/180*this.lat);return new(t("./lng_lat_bounds"))(new i(this.lng-n,this.lat-r),new i(this.lng+n,this.lat+r))},i.convert=function(t){if(t instanceof i)return t;if(Array.isArray(t)&&2===t.length)return new i(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new i(Number(t.lng),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")},e.exports=i},{"../util/util":223,"./lng_lat_bounds":59}],59:[function(t,e,r){"use strict";var n=t("./lng_lat"),i=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};i.prototype.setNorthEast=function(t){return this._ne=t instanceof n?new n(t.lng,t.lat):n.convert(t),this},i.prototype.setSouthWest=function(t){return this._sw=t instanceof n?new n(t.lng,t.lat):n.convert(t),this},i.prototype.extend=function(t){var e,r,o=this._sw,a=this._ne;if(t instanceof n)e=t,r=t;else{if(!(t instanceof i))return Array.isArray(t)?t.every(Array.isArray)?this.extend(i.convert(t)):this.extend(n.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return o||a?(o.lng=Math.min(e.lng,o.lng),o.lat=Math.min(e.lat,o.lat),a.lng=Math.max(r.lng,a.lng),a.lat=Math.max(r.lat,a.lat)):(this._sw=new n(e.lng,e.lat),this._ne=new n(r.lng,r.lat)),this},i.prototype.getCenter=function(){return new n((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},i.prototype.getSouthWest=function(){return this._sw},i.prototype.getNorthEast=function(){return this._ne},i.prototype.getNorthWest=function(){return new n(this.getWest(),this.getNorth())},i.prototype.getSouthEast=function(){return new n(this.getEast(),this.getSouth())},i.prototype.getWest=function(){return this._sw.lng},i.prototype.getSouth=function(){return this._sw.lat},i.prototype.getEast=function(){return this._ne.lng},i.prototype.getNorth=function(){return this._ne.lat},i.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},i.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},i.convert=function(t){return!t||t instanceof i?t:new i(t)},e.exports=i},{"./lng_lat":58}],60:[function(t,e,r){"use strict";var n=t("./lng_lat"),i=t("@mapbox/point-geometry"),o=t("./coordinate"),a=t("../util/util"),s=t("../style-spec/util/interpolate"),l=t("../source/tile_coord"),u=t("../data/extent"),c=t("@mapbox/gl-matrix"),p=c.vec4,h=c.mat4,f=c.mat2,d=function(t,e,r){this.tileSize=512,this._renderWorldCopies=void 0===r||r,this._minZoom=t||0,this._maxZoom=e||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new n(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0},m={minZoom:{},maxZoom:{},renderWorldCopies:{},worldSize:{},centerPoint:{},size:{},bearing:{},pitch:{},fov:{},zoom:{},center:{},unmodified:{},x:{},y:{},point:{}};m.minZoom.get=function(){return this._minZoom},m.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},m.maxZoom.get=function(){return this._maxZoom},m.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},m.renderWorldCopies.get=function(){return this._renderWorldCopies},m.worldSize.get=function(){return this.tileSize*this.scale},m.centerPoint.get=function(){return this.size._div(2)},m.size.get=function(){return new i(this.width,this.height)},m.bearing.get=function(){return-this.angle/Math.PI*180},m.bearing.set=function(t){var e=-a.wrap(t,-180,180)*Math.PI/180;this.angle!==e&&(this._unmodified=!1,this.angle=e,this._calcMatrices(),this.rotationMatrix=f.create(),f.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},m.pitch.get=function(){return this._pitch/Math.PI*180},m.pitch.set=function(t){var e=a.clamp(t,0,60)/180*Math.PI;this._pitch!==e&&(this._unmodified=!1,this._pitch=e,this._calcMatrices())},m.fov.get=function(){return this._fov/Math.PI*180},m.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},m.zoom.get=function(){return this._zoom},m.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},m.center.get=function(){return this._center},m.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},d.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},d.prototype.getVisibleWrappedCoordinates=function(t){for(var e=this.pointCoordinate(new i(0,0),0),r=this.pointCoordinate(new i(this.width,0),0),n=Math.floor(e.column),o=Math.floor(r.column),a=[t],s=n;s<=o;s++)0!==s&&a.push(new l(t.z,t.x,t.y,s));return a},d.prototype.coveringTiles=function(t){var e=this.coveringZoomLevel(t),r=e;if(void 0!==t.minzoom&&e<t.minzoom)return[];void 0!==t.maxzoom&&e>t.maxzoom&&(e=t.maxzoom);var n=this.pointCoordinate(this.centerPoint,e),o=new i(n.column-.5,n.row-.5),a=[this.pointCoordinate(new i(0,0),e),this.pointCoordinate(new i(this.width,0),e),this.pointCoordinate(new i(this.width,this.height),e),this.pointCoordinate(new i(0,this.height),e)];return l.cover(e,a,t.reparseOverscaled?r:e,this._renderWorldCopies).sort(function(t,e){return o.dist(t)-o.dist(e)})},d.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},m.unmodified.get=function(){return this._unmodified},d.prototype.zoomScale=function(t){return Math.pow(2,t)},d.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},d.prototype.project=function(t){return new i(this.lngX(t.lng),this.latY(t.lat))},d.prototype.unproject=function(t){return new n(this.xLng(t.x),this.yLat(t.y))},m.x.get=function(){return this.lngX(this.center.lng)},m.y.get=function(){return this.latY(this.center.lat)},m.point.get=function(){return new i(this.x,this.y)},d.prototype.lngX=function(t){return(180+t)*this.worldSize/360},d.prototype.latY=function(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))*this.worldSize/360},d.prototype.xLng=function(t){return 360*t/this.worldSize-180},d.prototype.yLat=function(t){var e=180-360*t/this.worldSize;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90},d.prototype.setLocationAtPoint=function(t,e){var r=this.pointCoordinate(e)._sub(this.pointCoordinate(this.centerPoint));this.center=this.coordinateLocation(this.locationCoordinate(t)._sub(r)),this._renderWorldCopies&&(this.center=this.center.wrap())},d.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},d.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},d.prototype.locationCoordinate=function(t){return new o(this.lngX(t.lng)/this.tileSize,this.latY(t.lat)/this.tileSize,this.zoom).zoomTo(this.tileZoom)},d.prototype.coordinateLocation=function(t){var e=t.zoomTo(this.zoom);return new n(this.xLng(e.column*this.tileSize),this.yLat(e.row*this.tileSize))},d.prototype.pointCoordinate=function(t,e){void 0===e&&(e=this.tileZoom);var r=[t.x,t.y,0,1],n=[t.x,t.y,1,1];p.transformMat4(r,r,this.pixelMatrixInverse),p.transformMat4(n,n,this.pixelMatrixInverse);var i=r[3],a=n[3],l=r[0]/i,u=n[0]/a,c=r[1]/i,h=n[1]/a,f=r[2]/i,d=n[2]/a,m=f===d?0:(0-f)/(d-f);return new o(s(l,u,m)/this.tileSize,s(c,h,m)/this.tileSize,this.zoom)._zoomTo(e)},d.prototype.coordinatePoint=function(t){var e=t.zoomTo(this.zoom),r=[e.column*this.tileSize,e.row*this.tileSize,0,1];return p.transformMat4(r,r,this.pixelMatrix),new i(r[0]/r[3],r[1]/r[3])},d.prototype.calculatePosMatrix=function(t,e){var r=t.toCoordinate(e),n=this.worldSize/this.zoomScale(r.zoom),i=h.identity(new Float64Array(16));return h.translate(i,i,[r.column*n,r.row*n,0]),h.scale(i,i,[n/u,n/u,1]),h.multiply(i,this.projMatrix,i),new Float32Array(i)},d.prototype.cameraToTileDistance=function(t){var e=this.calculatePosMatrix(t.coord,t.sourceMaxZoom),r=[t.tileSize/2,t.tileSize/2,0,1];return p.transformMat4(r,r,e),r[3]},d.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,e,r,n,o=-90,a=90,s=-180,l=180,u=this.size,c=this._unmodified;if(this.latRange){var p=this.latRange;o=this.latY(p[1]),a=this.latY(p[0]),t=a-o<u.y?u.y/(a-o):0}if(this.lngRange){var h=this.lngRange;s=this.lngX(h[0]),l=this.lngX(h[1]),e=l-s<u.x?u.x/(l-s):0}var f=Math.max(e||0,t||0);if(f)return this.center=this.unproject(new i(e?(l+s)/2:this.x,t?(a+o)/2:this.y)),this.zoom+=this.scaleZoom(f),this._unmodified=c,void(this._constraining=!1);if(this.latRange){var d=this.y,m=u.y/2;d-m<o&&(n=o+m),d+m>a&&(n=a-m)}if(this.lngRange){var v=this.x,y=u.x/2;v-y<s&&(r=s+y),v+y>l&&(r=l-y)}void 0===r&&void 0===n||(this.center=this.unproject(new i(void 0!==r?r:this.x,void 0!==n?n:this.y))),this._unmodified=c,this._constraining=!1}},d.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var t=this._fov/2,e=Math.PI/2+this._pitch,r=Math.sin(t)*this.cameraToCenterDistance/Math.sin(Math.PI-e-t),n=Math.cos(Math.PI/2-this._pitch)*r+this.cameraToCenterDistance,i=1.01*n,o=new Float64Array(16);h.perspective(o,this._fov,this.width/this.height,1,i),h.scale(o,o,[1,-1,1]),h.translate(o,o,[0,0,-this.cameraToCenterDistance]),h.rotateX(o,o,this._pitch),h.rotateZ(o,o,this.angle),h.translate(o,o,[-this.x,-this.y,0]);var a=this.worldSize/(2*Math.PI*6378137*Math.abs(Math.cos(this.center.lat*(Math.PI/180))));if(h.scale(o,o,[1,1,a,1]),this.projMatrix=o,o=h.create(),h.scale(o,o,[this.width/2,-this.height/2,1]),h.translate(o,o,[1,-1,0]),this.pixelMatrix=h.multiply(new Float64Array(16),o,this.projMatrix),!(o=h.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=o}},Object.defineProperties(d.prototype,m),e.exports=d},{"../data/extent":48,"../source/tile_coord":101,"../style-spec/util/interpolate":127,"../util/util":223,"./coordinate":57,"./lng_lat":58,"@mapbox/gl-matrix":1,"@mapbox/point-geometry":2}],61:[function(t,e,r){"use strict";var n=function(t,e){this.gl=t,this.buffer=t.createBuffer(),void 0===t.extVertexArrayObject&&(t.extVertexArrayObject=t.getExtension("OES_vertex_array_object")),t.extVertexArrayObject&&t.extVertexArrayObject.bindVertexArrayOES(null),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.buffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,t.STATIC_DRAW),delete e.arrayBuffer};n.prototype.bind=function(){this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.buffer)},n.prototype.destroy=function(){this.buffer&&(this.gl.deleteBuffer(this.buffer),delete this.buffer)},e.exports=n},{}],62:[function(t,e,r){"use strict";var n={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},i=function(t,e,r){this.length=e.length,this.attributes=e.members,this.itemSize=e.bytesPerElement,this.dynamicDraw=r,this.gl=t,this.buffer=t.createBuffer(),this.gl.bindBuffer(t.ARRAY_BUFFER,this.buffer),this.gl.bufferData(t.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?t.DYNAMIC_DRAW:t.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};i.prototype.bind=function(){this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.buffer)},i.prototype.updateData=function(t){this.bind(),this.gl.bufferSubData(this.gl.ARRAY_BUFFER,0,t.arrayBuffer)},i.prototype.enableAttributes=function(t,e){for(var r=this,n=0;n<this.attributes.length;n++){var i=r.attributes[n],o=e.attributes[i.name];void 0!==o&&t.enableVertexAttribArray(o)}},i.prototype.setVertexAttribPointers=function(t,e,r){for(var i=this,o=0;o<this.attributes.length;o++){var a=i.attributes[o],s=e.attributes[a.name];void 0!==s&&t.vertexAttribPointer(s,a.components,t[n[a.type]],!1,i.itemSize,a.offset+i.itemSize*(r||0))}},i.prototype.destroy=function(){this.buffer&&(this.gl.deleteBuffer(this.buffer),delete this.buffer)},e.exports=i},{}],63:[function(t,e,r){"use strict";var n=t("mapbox-gl-supported"),i=t("./util/browser"),o=t("../package.json").version,a=t("./ui/map"),s=t("./ui/control/navigation_control"),l=t("./ui/control/geolocate_control"),u=t("./ui/control/attribution_control"),c=t("./ui/control/scale_control"),p=t("./ui/control/fullscreen_control"),h=t("./ui/popup"),f=t("./ui/marker"),d=t("./style/style"),m=t("./geo/lng_lat"),v=t("./geo/lng_lat_bounds"),y=t("@mapbox/point-geometry"),g=t("./util/evented"),_=t("./util/config"),x=t("./source/rtl_text_plugin");e.exports={version:o,supported:n,workerCount:Math.max(Math.floor(i.hardwareConcurrency/2),1),setRTLTextPlugin:x.setRTLTextPlugin,Map:a,NavigationControl:s,GeolocateControl:l,AttributionControl:u,ScaleControl:c,FullscreenControl:p,Popup:h,Marker:f,Style:d,LngLat:m,LngLatBounds:v,Point:y,Evented:g,config:_,get accessToken(){return _.ACCESS_TOKEN},set accessToken(t){_.ACCESS_TOKEN=t}}},{"../package.json":41,"./geo/lng_lat":58,"./geo/lng_lat_bounds":59,"./source/rtl_text_plugin":96,"./style/style":156,"./ui/control/attribution_control":182,"./ui/control/fullscreen_control":183,"./ui/control/geolocate_control":184,"./ui/control/navigation_control":186,"./ui/control/scale_control":187,"./ui/map":197,"./ui/marker":198,"./ui/popup":199,"./util/browser":202,"./util/config":206,"./util/evented":210,"@mapbox/point-geometry":2,"mapbox-gl-supported":28}],64:[function(t,e,r){"use strict";function n(t,e,r){var n=t.gl,o=t.transform,a=o.tileSize,s=r.paint["background-color"],l=r.paint["background-pattern"],u=r.paint["background-opacity"],c=l||1!==s[3]||1!==u?"translucent":"opaque";if(t.renderPass===c){n.disable(n.STENCIL_TEST),t.setDepthSublayer(0);var p;if(l){if(i.isPatternMissing(l,t))return;p=t.useProgram("fillPattern",t.basicFillProgramConfiguration),i.prepare(l,t,p),t.tileExtentPatternVAO.bind(n,p,t.tileExtentBuffer)}else p=t.useProgram("fill",t.basicFillProgramConfiguration),n.uniform4fv(p.uniforms.u_color,s),t.tileExtentVAO.bind(n,p,t.tileExtentBuffer);n.uniform1f(p.uniforms.u_opacity,u);for(var h=o.coveringTiles({tileSize:a}),f=0,d=h;f<d.length;f+=1){var m=d[f];l&&i.setTile({coord:m,tileSize:a},t,p),n.uniformMatrix4fv(p.uniforms.u_matrix,!1,t.transform.calculatePosMatrix(m)),n.drawArrays(n.TRIANGLE_STRIP,0,t.tileExtentBuffer.length)}}}var i=t("./pattern");e.exports=n},{"./pattern":80}],65:[function(t,e,r){"use strict";function n(t,e,r,n){if("translucent"===t.renderPass){var a=t.gl;t.setDepthSublayer(0),t.depthMask(!1),a.disable(a.STENCIL_TEST);for(var s=0;s<n.length;s++){var l=n[s],u=e.getTile(l),c=u.getBucket(r);if(c){var p=c.programConfigurations.get(r.id),h=t.useProgram("circle",p);if(p.setUniforms(a,h,r,{zoom:t.transform.zoom}),a.uniform1f(h.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance),a.uniform1i(h.uniforms.u_scale_with_map,"map"===r.paint["circle-pitch-scale"]?1:0),"map"===r.paint["circle-pitch-alignment"]){a.uniform1i(h.uniforms.u_pitch_with_map,1);var f=o(u,1,t.transform.zoom);a.uniform2f(h.uniforms.u_extrude_scale,f,f)}else a.uniform1i(h.uniforms.u_pitch_with_map,0),a.uniform2fv(h.uniforms.u_extrude_scale,t.transform.pixelsToGLUnits);a.uniform1f(h.uniforms.u_devicepixelratio,i.devicePixelRatio),a.uniformMatrix4fv(h.uniforms.u_matrix,!1,t.translatePosMatrix(l.posMatrix,u,r.paint["circle-translate"],r.paint["circle-translate-anchor"])),h.draw(a,a.TRIANGLES,r.id,c.layoutVertexBuffer,c.indexBuffer,c.segments,p)}}}}var i=t("../util/browser"),o=t("../source/pixels_to_tile_units");e.exports=n},{"../source/pixels_to_tile_units":93,"../util/browser":202}],66:[function(t,e,r){"use strict";function n(t,e,r,n){var i=t.gl;i.enable(i.STENCIL_TEST);var o=t.useProgram("collisionBox");i.activeTexture(i.TEXTURE1),t.frameHistory.bind(i),i.uniform1i(o.uniforms.u_fadetexture,1);for(var a=0;a<n.length;a++){var s=n[a],l=e.getTile(s),u=l.getBucket(r);if(u){i.uniformMatrix4fv(o.uniforms.u_matrix,!1,s.posMatrix),t.enableTileClippingMask(s),t.lineWidth(1),i.uniform1f(o.uniforms.u_scale,Math.pow(2,t.transform.zoom-l.coord.z)),i.uniform1f(o.uniforms.u_zoom,10*t.transform.zoom);var c=Math.max(0,Math.min(25,l.coord.z+Math.log(l.collisionTile.maxScale)/Math.LN2));i.uniform1f(o.uniforms.u_maxzoom,10*c),i.uniform1f(o.uniforms.u_collision_y_stretch,l.collisionTile.yStretch),i.uniform1f(o.uniforms.u_pitch,t.transform.pitch/360*2*Math.PI),i.uniform1f(o.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance),o.draw(i,i.LINES,r.id,u.collisionBox.layoutVertexBuffer,u.collisionBox.indexBuffer,u.collisionBox.segments)}}}e.exports=n},{}],67:[function(t,e,r){"use strict";function n(t,e,r){for(var n=0;n<r.length;n++)i(t,e,r[n])}function i(t,e,r){var n=t.gl;n.disable(n.STENCIL_TEST),t.lineWidth(1*a.devicePixelRatio);var i=r.posMatrix,h=t.useProgram("debug");n.uniformMatrix4fv(h.uniforms.u_matrix,!1,i),n.uniform4f(h.uniforms.u_color,1,0,0,1),t.debugVAO.bind(n,h,t.debugBuffer),n.drawArrays(n.LINE_STRIP,0,t.debugBuffer.length);for(var f=o(r.toString(),50,200,5),d=new p,m=0;m<f.length;m+=2)d.emplaceBack(f[m],f[m+1]);var v=new u(n,d);(new c).bind(n,h,v),n.uniform4f(h.uniforms.u_color,1,1,1,1);for(var y=e.getTile(r).tileSize,g=l/(Math.pow(2,t.transform.zoom-r.z)*y),_=[[-1,-1],[-1,1],[1,-1],[1,1]],x=0;x<_.length;x++){var b=_[x];n.uniformMatrix4fv(h.uniforms.u_matrix,!1,s.translate([],i,[g*b[0],g*b[1],0])),n.drawArrays(n.LINES,0,v.length)}n.uniform4f(h.uniforms.u_color,0,0,0,1),n.uniformMatrix4fv(h.uniforms.u_matrix,!1,i),n.drawArrays(n.LINES,0,v.length)}function o(t,e,r,n){n=n||1;var i,o,a,s,l,u,c,p,f=[];for(i=0,o=t.length;i<o;i++)if(l=h[t[i]]){for(p=null,a=0,s=l[1].length;a<s;a+=2)-1===l[1][a]&&-1===l[1][a+1]?p=null:(u=e+l[1][a]*n,c=r-l[1][a+1]*n,p&&f.push(p.x,p.y,u,c),p={x:u,y:c});e+=l[0]*n}return f}var a=t("../util/browser"),s=t("@mapbox/gl-matrix").mat4,l=t("../data/extent"),u=t("../gl/vertex_buffer"),c=t("./vertex_array_object"),p=t("../data/pos_array");e.exports=n;var h={" ":[16,[]],"!":[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'"':[16,[4,21,4,14,-1,-1,12,21,12,14]],"#":[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],"%":[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],"&":[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],"'":[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],"(":[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],")":[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],"*":[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],"+":[26,[13,18,13,0,-1,-1,4,9,22,9]],",":[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"-":[26,[4,9,22,9]],".":[10,[5,2,4,1,5,0,6,1,5,2]],"/":[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],":":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],";":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"<":[24,[20,18,4,9,20,0]],"=":[26,[4,12,22,12,-1,-1,4,6,22,6]],">":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]}},{"../data/extent":48,"../data/pos_array":52,"../gl/vertex_buffer":62,"../util/browser":202,"./vertex_array_object":84,"@mapbox/gl-matrix":1}],68:[function(t,e,r){"use strict";function n(t,e,r,n){var s=t.gl;s.enable(s.STENCIL_TEST);var l=!r.paint["fill-pattern"]&&r.isPaintValueFeatureConstant("fill-color")&&r.isPaintValueFeatureConstant("fill-opacity")&&1===r.paint["fill-color"][3]&&1===r.paint["fill-opacity"]?"opaque":"translucent";t.renderPass===l&&(t.setDepthSublayer(1),t.depthMask("opaque"===t.renderPass),i(t,e,r,n,o)),"translucent"===t.renderPass&&r.paint["fill-antialias"]&&(t.lineWidth(2),t.depthMask(!1),t.setDepthSublayer(r.getPaintProperty("fill-outline-color")?2:0),i(t,e,r,n,a))}function i(t,e,r,n,i){if(!l.isPatternMissing(r.paint["fill-pattern"],t))for(var o=!0,a=0,s=n;a<s.length;a+=1){var u=s[a],c=e.getTile(u),p=c.getBucket(r);p&&(t.enableTileClippingMask(u),i(t,e,r,c,u,p,o),o=!1)}}function o(t,e,r,n,i,o,a){var l=t.gl,u=o.programConfigurations.get(r.id);s("fill",r.paint["fill-pattern"],t,u,r,n,i,a).draw(l,l.TRIANGLES,r.id,o.layoutVertexBuffer,o.indexBuffer,o.segments,u)}function a(t,e,r,n,i,o,a){var l=t.gl,u=o.programConfigurations.get(r.id),c=r.paint["fill-pattern"]&&!r.getPaintProperty("fill-outline-color"),p=s("fillOutline",c,t,u,r,n,i,a);l.uniform2f(p.uniforms.u_world,l.drawingBufferWidth,l.drawingBufferHeight),p.draw(l,l.LINES,r.id,o.layoutVertexBuffer,o.indexBuffer2,o.segments2,u)}function s(t,e,r,n,i,o,a,s){var u,c=r.currentProgram;return e?(u=r.useProgram(t+"Pattern",n),(s||u!==c)&&(n.setUniforms(r.gl,u,i,{zoom:r.transform.zoom}),l.prepare(i.paint["fill-pattern"],r,u)),l.setTile(o,r,u)):(u=r.useProgram(t,n),(s||u!==c)&&n.setUniforms(r.gl,u,i,{zoom:r.transform.zoom})),r.gl.uniformMatrix4fv(u.uniforms.u_matrix,!1,r.translatePosMatrix(a.posMatrix,o,i.paint["fill-translate"],i.paint["fill-translate-anchor"])),u}var l=t("./pattern");e.exports=n},{"./pattern":80}],69:[function(t,e,r){"use strict";function n(t,e,r,n){if("3d"===t.renderPass){var a=t.gl;a.disable(a.STENCIL_TEST),a.enable(a.DEPTH_TEST),t.clearColor(),t.depthMask(!0);for(var s=0;s<n.length;s++)o(t,e,r,n[s])}else"translucent"===t.renderPass&&i(t,r)}function i(t,e){var r=t.prerenderedFrames[e.id];if(r){var n=t.gl,i=t.useProgram("extrusionTexture");n.disable(n.STENCIL_TEST),n.disable(n.DEPTH_TEST),n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,r.texture),n.uniform1f(i.uniforms.u_opacity,e.paint["fill-extrusion-opacity"]),n.uniform1i(i.uniforms.u_image,0);var o=c.create();c.ortho(o,0,t.width,t.height,0,0,1),n.uniformMatrix4fv(i.uniforms.u_matrix,!1,o),n.uniform2f(i.uniforms.u_world,n.drawingBufferWidth,n.drawingBufferHeight),r.vao.bind(n,i,r.buffer),n.drawArrays(n.TRIANGLE_STRIP,0,4),t.viewportFrames.push(r),delete t.prerenderedFrames[e.id]}}function o(t,e,r,n){var i=e.getTile(n),o=i.getBucket(r);if(o){var s=t.gl,u=r.paint["fill-extrusion-pattern"],c=o.programConfigurations.get(r.id),p=t.useProgram(u?"fillExtrusionPattern":"fillExtrusion",c);if(c.setUniforms(s,p,r,{zoom:t.transform.zoom}),u){if(l.isPatternMissing(u,t))return;l.prepare(u,t,p),l.setTile(i,t,p),s.uniform1f(p.uniforms.u_height_factor,-Math.pow(2,n.z)/i.tileSize/8)}t.gl.uniformMatrix4fv(p.uniforms.u_matrix,!1,t.translatePosMatrix(n.posMatrix,i,r.paint["fill-extrusion-translate"],r.paint["fill-extrusion-translate-anchor"])),a(p,t),p.draw(s,s.TRIANGLES,r.id,o.layoutVertexBuffer,o.indexBuffer,o.segments,c)}}function a(t,e){var r=e.gl,n=e.style.light,i=n.calculated.position,o=[i.x,i.y,i.z],a=u.create();"viewport"===n.calculated.anchor&&u.fromRotation(a,-e.transform.angle),p.transformMat3(o,o,a),r.uniform3fv(t.uniforms.u_lightpos,o),r.uniform1f(t.uniforms.u_lightintensity,n.calculated.intensity),r.uniform3fv(t.uniforms.u_lightcolor,n.calculated.color.slice(0,3))}var s=t("@mapbox/gl-matrix"),l=t("./pattern"),u=s.mat3,c=s.mat4,p=s.vec3;e.exports=n},{"./pattern":80,"@mapbox/gl-matrix":1}],70:[function(t,e,r){"use strict";function n(t,e,r,n,a,s,l,u,c){var p,h,f,d,m=e.gl,v=a.paint["line-dasharray"],y=a.paint["line-pattern"];if(u||c){var g=1/o(r,1,e.transform.tileZoom);if(v){p=e.lineAtlas.getDash(v.from,"round"===a.layout["line-cap"]),h=e.lineAtlas.getDash(v.to,"round"===a.layout["line-cap"]);var _=p.width*v.fromScale,x=h.width*v.toScale;m.uniform2f(t.uniforms.u_patternscale_a,g/_,-p.height/2),m.uniform2f(t.uniforms.u_patternscale_b,g/x,-h.height/2),m.uniform1f(t.uniforms.u_sdfgamma,e.lineAtlas.width/(256*Math.min(_,x)*i.devicePixelRatio)/2)}else if(y){if(f=e.imageManager.getPattern(y.from),d=e.imageManager.getPattern(y.to),!f||!d)return;m.uniform2f(t.uniforms.u_pattern_size_a,f.displaySize[0]*y.fromScale/g,d.displaySize[1]),m.uniform2f(t.uniforms.u_pattern_size_b,d.displaySize[0]*y.toScale/g,d.displaySize[1]);var b=e.imageManager.getPixelSize(),w=b.width,T=b.height;m.uniform2fv(t.uniforms.u_texsize,[w,T])}m.uniform2f(t.uniforms.u_gl_units_to_pixels,1/e.transform.pixelsToGLUnits[0],1/e.transform.pixelsToGLUnits[1])}u&&(v?(m.uniform1i(t.uniforms.u_image,0),m.activeTexture(m.TEXTURE0),e.lineAtlas.bind(m),m.uniform1f(t.uniforms.u_tex_y_a,p.y),m.uniform1f(t.uniforms.u_tex_y_b,h.y),m.uniform1f(t.uniforms.u_mix,v.t)):y&&(m.uniform1i(t.uniforms.u_image,0),m.activeTexture(m.TEXTURE0),e.imageManager.bind(m),m.uniform2fv(t.uniforms.u_pattern_tl_a,f.tl),m.uniform2fv(t.uniforms.u_pattern_br_a,f.br),m.uniform2fv(t.uniforms.u_pattern_tl_b,d.tl),m.uniform2fv(t.uniforms.u_pattern_br_b,d.br),m.uniform1f(t.uniforms.u_fade,y.t))),e.enableTileClippingMask(s);var S=e.translatePosMatrix(s.posMatrix,r,a.paint["line-translate"],a.paint["line-translate-anchor"]);m.uniformMatrix4fv(t.uniforms.u_matrix,!1,S),m.uniform1f(t.uniforms.u_ratio,1/o(r,1,e.transform.zoom)),t.draw(m,m.TRIANGLES,a.id,n.layoutVertexBuffer,n.indexBuffer,n.segments,l)}var i=t("../util/browser"),o=t("../source/pixels_to_tile_units");e.exports=function(t,e,r,i){if("translucent"===t.renderPass){t.setDepthSublayer(0),t.depthMask(!1);var o=t.gl;if(o.enable(o.STENCIL_TEST),!(r.paint["line-width"]<=0))for(var a,s=r.paint["line-dasharray"]?"lineSDF":r.paint["line-pattern"]?"linePattern":"line",l=!0,u=0,c=i;u<c.length;u+=1){var p=c[u],h=e.getTile(p),f=h.getBucket(r);if(f){var d=f.programConfigurations.get(r.id),m=t.currentProgram,v=t.useProgram(s,d),y=l||v!==m,g=a!==h.coord.z;y&&d.setUniforms(t.gl,v,r,{zoom:t.transform.zoom}),n(v,t,h,f,r,p,d,y,g),a=h.coord.z,l=!1}}}}},{"../source/pixels_to_tile_units":93,"../util/browser":202}],71:[function(t,e,r){"use strict";function n(t,e,r,n){if("translucent"===t.renderPass){var l=t.gl,c=e.getSource(),p=t.useProgram("raster");l.enable(l.DEPTH_TEST),t.depthMask(!0),l.depthFunc(l.LESS),l.disable(l.STENCIL_TEST),l.uniform1f(p.uniforms.u_brightness_low,r.paint["raster-brightness-min"]),l.uniform1f(p.uniforms.u_brightness_high,r.paint["raster-brightness-max"]),l.uniform1f(p.uniforms.u_saturation_factor,a(r.paint["raster-saturation"])),l.uniform1f(p.uniforms.u_contrast_factor,o(r.paint["raster-contrast"])),l.uniform3fv(p.uniforms.u_spin_weights,i(r.paint["raster-hue-rotate"])),l.uniform1f(p.uniforms.u_buffer_scale,1),l.uniform1i(p.uniforms.u_image0,0),l.uniform1i(p.uniforms.u_image1,1);for(var h=n.length&&n[0].z,f=0,d=n;f<d.length;f+=1){var m=d[f];t.setDepthSublayer(m.z-h);var v=e.getTile(m),y=t.transform.calculatePosMatrix(m,e.getSource().maxzoom);v.registerFadeDuration(t.style.animationLoop,r.paint["raster-fade-duration"]),l.uniformMatrix4fv(p.uniforms.u_matrix,!1,y);var g=e.findLoadedParent(m,0,{}),_=s(v,g,e,r,t.transform),x=void 0,b=void 0;if(l.activeTexture(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,v.texture),l.activeTexture(l.TEXTURE1),g?(l.bindTexture(l.TEXTURE_2D,g.texture),x=Math.pow(2,g.coord.z-v.coord.z),b=[v.coord.x*x%1,v.coord.y*x%1]):l.bindTexture(l.TEXTURE_2D,v.texture),l.uniform2fv(p.uniforms.u_tl_parent,b||[0,0]),l.uniform1f(p.uniforms.u_scale_parent,x||1),l.uniform1f(p.uniforms.u_fade_t,_.mix),l.uniform1f(p.uniforms.u_opacity,_.opacity*r.paint["raster-opacity"]),c instanceof u){var w=c.boundsBuffer;c.boundsVAO.bind(l,p,w),l.drawArrays(l.TRIANGLE_STRIP,0,w.length)}else{var T=t.rasterBoundsBuffer;t.rasterBoundsVAO.bind(l,p,T),l.drawArrays(l.TRIANGLE_STRIP,0,T.length)}}l.depthFunc(l.LEQUAL)}}function i(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}function o(t){return t>0?1/(1-t):1+t}function a(t){return t>0?1-1/(1.001-t):-t}function s(t,e,r,n,i){var o=n.paint["raster-fade-duration"];if(o>0){var a=Date.now(),s=(a-t.timeAdded)/o,u=e?(a-e.timeAdded)/o:-1,c=r.getSource(),p=i.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),h=!e||Math.abs(e.coord.z-p)>Math.abs(t.coord.z-p),f=h&&t.refreshedUponExpiration?1:l.clamp(h?s:1-u,0,1);return t.refreshedUponExpiration&&s>=1&&(t.refreshedUponExpiration=!1),e?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}var l=t("../util/util"),u=t("../source/image_source");e.exports=n},{"../source/image_source":91,"../util/util":223}],72:[function(t,e,r){"use strict";function n(t,e,r,n){if("translucent"===t.renderPass){var o=!(r.layout["text-allow-overlap"]||r.layout["icon-allow-overlap"]||r.layout["text-ignore-placement"]||r.layout["icon-ignore-placement"]),a=t.gl;o?a.disable(a.STENCIL_TEST):a.enable(a.STENCIL_TEST),t.setDepthSublayer(0),t.depthMask(!1),i(t,e,r,n,!1,r.paint["icon-translate"],r.paint["icon-translate-anchor"],r.layout["icon-rotation-alignment"],r.layout["icon-pitch-alignment"],r.layout["icon-keep-upright"]),i(t,e,r,n,!0,r.paint["text-translate"],r.paint["text-translate-anchor"],r.layout["text-rotation-alignment"],r.layout["text-pitch-alignment"],r.layout["text-keep-upright"]),e.map.showCollisionBoxes&&l(t,e,r,n)}}function i(t,e,r,n,i,s,l,p,h,d){var m=t.gl,v=t.transform,y="map"===p,g="map"===h,_=y&&"line"===r.layout["symbol-placement"],x=y&&!g&&!_,b=g;b?m.enable(m.DEPTH_TEST):m.disable(m.DEPTH_TEST);for(var w,T=0,S=n;T<S.length;T+=1){var z=S[T],A=e.getTile(z),C=A.getBucket(r);if(C){var E=i?C.text:C.icon;if(E&&E.segments.get().length){var k=E.programConfigurations.get(r.id),M=i||C.sdfIcons,L=i?C.textSizeData:C.iconSizeData;if(w||(w=t.useProgram(M?"symbolSDF":"symbolIcon",k),k.setUniforms(m,w,r,{zoom:t.transform.zoom}),o(w,t,r,i,x,g,L)),m.activeTexture(m.TEXTURE0),m.uniform1i(w.uniforms.u_texture,0),i)A.glyphAtlasTexture.bind(m.LINEAR,m.CLAMP_TO_EDGE),m.uniform2fv(w.uniforms.u_texsize,A.glyphAtlasTexture.size);else{var I=!r.isLayoutValueFeatureConstant("icon-size")||!r.isLayoutValueZoomConstant("icon-size")||1!==r.getLayoutValue("icon-size",{zoom:v.zoom})||C.iconsNeedLinear,P=g||0!==v.pitch;A.iconAtlasTexture.bind(M||t.options.rotating||t.options.zooming||I||P?m.LINEAR:m.NEAREST,m.CLAMP_TO_EDGE),m.uniform2fv(w.uniforms.u_texsize,A.iconAtlasTexture.size)}t.enableTileClippingMask(z),m.uniformMatrix4fv(w.uniforms.u_matrix,!1,t.translatePosMatrix(z.posMatrix,A,s,l));var R=u(A,1,t.transform.zoom),D=c.getLabelPlaneMatrix(z.posMatrix,g,y,t.transform,R),O=c.getGlCoordMatrix(z.posMatrix,g,y,t.transform,R);m.uniformMatrix4fv(w.uniforms.u_gl_coord_matrix,!1,t.translatePosMatrix(O,A,s,l,!0)),_?(m.uniformMatrix4fv(w.uniforms.u_label_plane_matrix,!1,f),c.updateLineLabels(C,z.posMatrix,t,i,D,O,g,d,R,r)):m.uniformMatrix4fv(w.uniforms.u_label_plane_matrix,!1,D),m.uniform1f(w.uniforms.u_collision_y_stretch,A.collisionTile.yStretch),a(w,k,t,r,A,E,i,M,g)}}}b||m.enable(m.DEPTH_TEST)}function o(t,e,r,n,i,o,a){var s=e.gl,l=e.transform;s.uniform1i(t.uniforms.u_pitch_with_map,o?1:0),s.uniform1f(t.uniforms.u_is_text,n?1:0),s.activeTexture(s.TEXTURE1),e.frameHistory.bind(s),s.uniform1i(t.uniforms.u_fadetexture,1),s.uniform1f(t.uniforms.u_pitch,l.pitch/360*2*Math.PI),s.uniform1i(t.uniforms.u_is_size_zoom_constant,a.isZoomConstant?1:0),s.uniform1i(t.uniforms.u_is_size_feature_constant,a.isFeatureConstant?1:0),s.uniform1f(t.uniforms.u_camera_to_center_distance,l.cameraToCenterDistance);var u=p.evaluateSizeForZoom(a,l,r,n);void 0!==u.uSizeT&&s.uniform1f(t.uniforms.u_size_t,u.uSizeT),void 0!==u.uSize&&s.uniform1f(t.uniforms.u_size,u.uSize),s.uniform1f(t.uniforms.u_aspect_ratio,l.width/l.height),s.uniform1i(t.uniforms.u_rotate_symbol,i?1:0)}function a(t,e,r,n,i,o,a,l,u){var c=r.gl,p=r.transform;if(l){var h=(a?"text":"icon")+"-halo-width",f=!n.isPaintValueFeatureConstant(h)||n.paint[h],d=u?Math.cos(p._pitch)*p.cameraToCenterDistance:1;c.uniform1f(t.uniforms.u_gamma_scale,d),f&&(c.uniform1f(t.uniforms.u_is_halo,1),s(o,n,c,t)),c.uniform1f(t.uniforms.u_is_halo,0)}s(o,n,c,t)}function s(t,e,r,n){n.draw(r,r.TRIANGLES,e.id,t.layoutVertexBuffer,t.indexBuffer,t.segments,t.programConfigurations.get(e.id),t.dynamicLayoutVertexBuffer)}var l=t("./draw_collision_debug"),u=t("../source/pixels_to_tile_units"),c=t("../symbol/projection"),p=t("../symbol/symbol_size"),h=t("@mapbox/gl-matrix").mat4,f=h.identity(new Float32Array(16));e.exports=n},{"../source/pixels_to_tile_units":93,"../symbol/projection":175,"../symbol/symbol_size":178,"./draw_collision_debug":66,"@mapbox/gl-matrix":1}],73:[function(t,e,r){"use strict";var n=function(){this.changeTimes=new Float64Array(256),this.changeOpacities=new Uint8Array(256),this.opacities=new Uint8ClampedArray(256),this.array=new Uint8Array(this.opacities.buffer),this.previousZoom=0,this.firstFrame=!0};n.prototype.record=function(t,e,r){var n=this;this.firstFrame&&(t=0,this.firstFrame=!1),e=Math.floor(10*e);var i;if(e<this.previousZoom)for(i=e+1;i<=this.previousZoom;i++)n.changeTimes[i]=t,n.changeOpacities[i]=n.opacities[i];else for(i=e;i>this.previousZoom;i--)n.changeTimes[i]=t,n.changeOpacities[i]=n.opacities[i];for(i=0;i<256;i++){var o=t-n.changeTimes[i],a=255*(r?o/r:1);n.opacities[i]=i<=e?n.changeOpacities[i]+a:n.changeOpacities[i]-a}this.changed=!0,this.previousZoom=e},n.prototype.isVisible=function(t){return 0!==this.opacities[Math.floor(10*t)]},n.prototype.bind=function(t){this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.changed&&(t.texSubImage2D(t.TEXTURE_2D,0,0,0,256,1,t.ALPHA,t.UNSIGNED_BYTE,this.array),this.changed=!1)):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,256,1,0,t.ALPHA,t.UNSIGNED_BYTE,this.array))},e.exports=n},{}],74:[function(t,e,r){"use strict";function n(t){var e=a.create({width:0,height:0}),r={},n=new i(0,0,{autoResize:!0});for(var o in t){var l=t[o],u=r[o]={};for(var c in l){var p=l[+c];if(p&&0!==p.bitmap.width&&0!==p.bitmap.height){var h=n.packOne(p.bitmap.width+2*s,p.bitmap.height+2*s);a.resize(e,{width:n.w,height:n.h}),a.copy(p.bitmap,e,{x:0,y:0},{x:h.x+s,y:h.y+s},p.bitmap),u[c]={rect:h,metrics:p.metrics}}}}return n.shrink(),a.resize(e,{width:n.w,height:n.h}),{image:e,positions:r}}var i=t("@mapbox/shelf-pack"),o=t("../util/image"),a=o.AlphaImage,s=1;e.exports={makeGlyphAtlas:n}},{"../util/image":213,"@mapbox/shelf-pack":3}],75:[function(t,e,r){"use strict";var n=t("../style/load_glyph_range"),i=t("@mapbox/tiny-sdf"),o=t("../util/is_char_in_unicode_block"),a=t("../util/util"),s=a.asyncAll,l=t("../util/image"),u=l.AlphaImage,c=function(t,e){this.requestTransform=t,this.localIdeographFontFamily=e,this.entries={}};c.prototype.setURL=function(t){this.url=t},c.prototype.getGlyphs=function(t,e){var r=this,i=[];for(var o in t)for(var a=0,l=t[o];a<l.length;a+=1){var u=l[a];i.push({stack:o,id:u})}s(i,function(t,e){var i=t.stack,o=t.id,a=r.entries[i];a||(a=r.entries[i]={glyphs:{},requests:{}});var s=a.glyphs[o];if(void 0!==s)return void e(null,{stack:i,id:o,glyph:s});if(s=r._tinySDF(a,i,o))return void e(null,{stack:i,id:o,glyph:s});var l=Math.floor(o/256);if(256*l>65535)return void e(new Error("glyphs > 65535 not supported"));var u=a.requests[l];u||(u=a.requests[l]=[],n(i,l,r.url,r.requestTransform,function(t,e){if(e)for(var r in e)a.glyphs[+r]=e[+r];for(var n=0,i=u;n<i.length;n+=1)(0,i[n])(t,e);delete a.requests[l]})),u.push(function(t,r){t?e(t):r&&e(null,{stack:i,id:o,glyph:r[o]||null})})},function(t,r){if(t)e(t);else if(r){for(var n={},i=0,o=r;i<o.length;i+=1){var a=o[i],s=a.stack,l=a.id,u=a.glyph;(n[s]||(n[s]={}))[l]=u}e(null,n)}})},c.prototype._tinySDF=function(t,e,r){var n=this.localIdeographFontFamily;if(n&&(o["CJK Unified Ideographs"](r)||o["Hangul Syllables"](r))){var a=t.tinySDF;if(!a){var s="400";/bold/i.test(e)?s="900":/medium/i.test(e)?s="500":/light/i.test(e)&&(s="200"),a=t.tinySDF=new i(24,3,8,.25,n,s)}return{id:r,bitmap:u.create({width:30,height:30},a.draw(String.fromCharCode(r))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},e.exports=c},{"../style/load_glyph_range":152,"../util/image":213,"../util/is_char_in_unicode_block":215,"../util/util":223,"@mapbox/tiny-sdf":4}],76:[function(t,e,r){"use strict";function n(t,e){var r=e.pixelRatio,n={x:t.x+l,y:t.y+l,w:t.w-2*l,h:t.h-2*l};return{pixelRatio:r,textureRect:n,tl:[n.x,n.y],br:[n.x+n.w,n.y+n.h],displaySize:[n.w/r,n.h/r]}}function i(t){var e=s.create({width:0,height:0}),r={},i=new o(0,0,{autoResize:!0});for(var a in t){var u=t[a],c=i.packOne(u.data.width+2*l,u.data.height+2*l);s.resize(e,{width:i.w,height:i.h}),s.copy(u.data,e,{x:0,y:0},{x:c.x+l,y:c.y+l},u.data),r[a]=n(c,u)}return i.shrink(),s.resize(e,{width:i.w,height:i.h}),{image:e,positions:r}}var o=t("@mapbox/shelf-pack"),a=t("../util/image"),s=a.RGBAImage,l=1;e.exports={imagePosition:n,makeImageAtlas:i}},{"../util/image":213,"@mapbox/shelf-pack":3}],77:[function(t,e,r){"use strict";var n=t("@mapbox/shelf-pack"),i=t("../util/image"),o=i.RGBAImage,a=t("./image_atlas"),s=a.imagePosition,l=t("./texture"),u=function(){this.images={},this.loaded=!1,this.requestors=[],this.shelfPack=new n(64,64,{autoResize:!0}),this.patterns={},this.atlasImage=o.create({width:64,height:64}),this.dirty=!0};u.prototype.isLoaded=function(){return this.loaded},u.prototype.setLoaded=function(t){var e=this;if(this.loaded!==t&&(this.loaded=t,t)){for(var r=0,n=e.requestors;r<n.length;r+=1){var i=n[r],o=i.ids,a=i.callback;e._notify(o,a)}this.requestors=[]}},u.prototype.getImage=function(t){return this.images[t]},u.prototype.addImage=function(t,e){this.images[t]=e},u.prototype.removeImage=function(t){delete this.images[t];var e=this.patterns[t];e&&(this.shelfPack.unref(e.bin),delete this.patterns[t])},u.prototype.getImages=function(t,e){var r=this,n=!0;if(!this.isLoaded())for(var i=0,o=t;i<o.length;i+=1){var a=o[i];r.images[a]||(n=!1)}this.isLoaded()||n?this._notify(t,e):this.requestors.push({ids:t,callback:e})},u.prototype._notify=function(t,e){for(var r=this,n={},i=0,o=t;i<o.length;i+=1){var a=o[i],s=r.images[a];s&&(n[a]=s)}e(null,n)},u.prototype.getPixelSize=function(){return{width:this.shelfPack.w,height:this.shelfPack.h}},u.prototype.getPattern=function(t){var e=this.patterns[t];if(e)return e.position;var r=this.getImage(t);if(!r)return null;var n=r.data.width+2,i=r.data.height+2,a=this.shelfPack.packOne(n,i);if(!a)return null;o.resize(this.atlasImage,this.getPixelSize());var l=r.data,u=this.atlasImage,c=a.x+1,p=a.y+1,h=l.width,f=l.height;o.copy(l,u,{x:0,y:0},{x:c,y:p},{width:h,height:f}),o.copy(l,u,{x:0,y:f-1},{x:c,y:p-1},{width:h,height:1}),o.copy(l,u,{x:0,y:0},{x:c,y:p+f},{width:h,height:1}),o.copy(l,u,{x:h-1,y:0},{x:c-1,y:p},{width:1,height:f}),o.copy(l,u,{x:0,y:0},{x:c+h,y:p},{width:1,height:f}),this.dirty=!0;var d=s(a,r);return this.patterns[t]={bin:a,position:d},d},u.prototype.bind=function(t){this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new l(t,this.atlasImage,t.RGBA),this.atlasTexture.bind(t.LINEAR,t.CLAMP_TO_EDGE)},e.exports=u},{"../util/image":213,"./image_atlas":76,"./texture":83,"@mapbox/shelf-pack":3}],78:[function(t,e,r){"use strict";var n=t("../util/util"),i=function(t,e){this.width=t,this.height=e,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};i.prototype.getDash=function(t,e){var r=t.join(",")+String(e);return this.positions[r]||(this.positions[r]=this.addDash(t,e)),this.positions[r]},i.prototype.addDash=function(t,e){var r=this,i=e?7:0,o=2*i+1;if(this.nextRow+o>this.height)return n.warnOnce("LineAtlas out of space"),null;for(var a=0,s=0;s<t.length;s++)a+=t[s];for(var l=this.width/a,u=l/2,c=t.length%2==1,p=-i;p<=i;p++)for(var h=r.nextRow+i+p,f=r.width*h,d=c?-t[t.length-1]:0,m=t[0],v=1,y=0;y<this.width;y++){for(;m<y/l;)d=m,m+=t[v],c&&v===t.length-1&&(m+=t[0]),v++;var g=Math.abs(y-d*l),_=Math.abs(y-m*l),x=Math.min(g,_),b=v%2==1,w=void 0;if(e){var T=i?p/i*(u+1):0;if(b){var S=u-Math.abs(T);w=Math.sqrt(x*x+S*S)}else w=u-Math.sqrt(x*x+T*T)}else w=(b?1:-1)*x;r.data[3+4*(f+y)]=Math.max(0,Math.min(255,w+128))}var z={y:(this.nextRow+i+.5)/this.height,height:2*i/this.height,width:a};return this.nextRow+=o,this.dirty=!0,z},i.prototype.bind=function(t){this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.RGBA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,this.data))},e.exports=i},{"../util/util":223}],79:[function(t,e,r){"use strict";var n=t("../util/browser"),i=t("@mapbox/gl-matrix").mat4,o=t("./frame_history"),a=t("../source/source_cache"),s=t("../data/extent"),l=t("../source/pixels_to_tile_units"),u=t("../util/util"),c=t("../gl/vertex_buffer"),p=t("./vertex_array_object"),h=t("../data/raster_bounds_array"),f=t("../data/pos_array"),d=t("../data/program_configuration"),m=d.ProgramConfiguration,v=t("../shaders"),y=t("./program"),g=t("./render_texture"),_={symbol:t("./draw_symbol"),circle:t("./draw_circle"),line:t("./draw_line"),fill:t("./draw_fill"),"fill-extrusion":t("./draw_fill_extrusion"),raster:t("./draw_raster"),background:t("./draw_background"),debug:t("./draw_debug")},x=function(t,e){this.gl=t,this.transform=e,this._tileTextures={},this.prerenderedFrames={},this.viewportFrames=[],this.frameHistory=new o,this.setup(),this.numSublayers=a.maxUnderzooming+a.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.lineWidthRange=t.getParameter(t.ALIASED_LINE_WIDTH_RANGE),this.basicFillProgramConfiguration=m.createBasicFill(),this.emptyProgramConfiguration=new m};x.prototype.resize=function(t,e){var r=this,i=this.gl;this.width=t*n.devicePixelRatio,this.height=e*n.devicePixelRatio,i.viewport(0,0,this.width,this.height);for(var o=0,a=r.viewportFrames;o<a.length;o+=1){var s=a[o];r.gl.deleteTexture(s.texture),r.gl.deleteFramebuffer(s.fbo)}this.viewportFrames=[],this.depthRbo&&(this.gl.deleteRenderbuffer(this.depthRbo),this.depthRbo=null)},x.prototype.setup=function(){var t=this.gl;t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),t.enable(t.STENCIL_TEST),t.enable(t.DEPTH_TEST),t.depthFunc(t.LEQUAL),this._depthMask=!1,t.depthMask(!1);var e=new f;e.emplaceBack(0,0),e.emplaceBack(s,0),e.emplaceBack(0,s),e.emplaceBack(s,s),this.tileExtentBuffer=new c(t,e),this.tileExtentVAO=new p,this.tileExtentPatternVAO=new p;var r=new f;r.emplaceBack(0,0),r.emplaceBack(s,0),r.emplaceBack(s,s),r.emplaceBack(0,s),r.emplaceBack(0,0),this.debugBuffer=new c(t,r),this.debugVAO=new p;var n=new h;n.emplaceBack(0,0,0,0),n.emplaceBack(s,0,s,0),n.emplaceBack(0,s,0,s),n.emplaceBack(s,s,s,s),this.rasterBoundsBuffer=new c(t,n),this.rasterBoundsVAO=new p,this.extTextureFilterAnisotropic=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT))},x.prototype.clearColor=function(){var t=this.gl;t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT)},x.prototype.clearStencil=function(){var t=this.gl;t.clearStencil(0),t.stencilMask(255),t.clear(t.STENCIL_BUFFER_BIT)},x.prototype.clearDepth=function(){var t=this.gl;t.clearDepth(1),this.depthMask(!0),t.clear(t.DEPTH_BUFFER_BIT)},x.prototype._renderTileClippingMasks=function(t){var e=this,r=this.gl;r.colorMask(!1,!1,!1,!1),this.depthMask(!1),r.disable(r.DEPTH_TEST),r.enable(r.STENCIL_TEST),r.stencilMask(255),r.stencilOp(r.KEEP,r.KEEP,r.REPLACE);var n=1;this._tileClippingMaskIDs={};for(var i=0,o=t;i<o.length;i+=1){var a=o[i],s=e._tileClippingMaskIDs[a.id]=n++;r.stencilFunc(r.ALWAYS,s,255);var l=e.useProgram("fill",e.basicFillProgramConfiguration);r.uniformMatrix4fv(l.uniforms.u_matrix,!1,a.posMatrix),e.tileExtentVAO.bind(r,l,e.tileExtentBuffer),r.drawArrays(r.TRIANGLE_STRIP,0,e.tileExtentBuffer.length)}r.stencilMask(0),r.colorMask(!0,!0,!0,!0),this.depthMask(!0),r.enable(r.DEPTH_TEST)},x.prototype.enableTileClippingMask=function(t){var e=this.gl;e.stencilFunc(e.EQUAL,this._tileClippingMaskIDs[t.id],255)},x.prototype.render=function(t,e){var r=this;this.style=t,this.options=e,this.lineAtlas=t.lineAtlas,this.imageManager=t.imageManager,this.glyphManager=t.glyphManager,this.frameHistory.record(Date.now(),this.transform.zoom,t.getTransition().duration);for(var n in r.style.sourceCaches){var i=r.style.sourceCaches[n];i.used&&i.prepare(r.gl)}var o=this.style._order;this.renderPass="3d";for(var a,s=!0,l=[],u=0;u<o.length;u++){var c=r.style._layers[o[u]];if(c.has3DPass()&&!c.isHidden(r.transform.zoom)&&(c.source!==(a&&a.id)&&(a=r.style.sourceCaches[c.source],l=[],a&&(r.clearStencil(),l=a.getVisibleCoordinates()),l.reverse()),l.length)){r._setup3DRenderbuffer();var p=r.viewportFrames.pop()||new g(r);p.bindWithDepth(r.depthRbo),s&&(r.clearDepth(),s=!1),r.renderLayer(r,a,c,l),p.unbind(),r.prerenderedFrames[c.id]=p}}this.clearColor(),this.clearDepth(),this.showOverdrawInspector(e.showOverdrawInspector),this.depthRange=(t._order.length+2)*this.numSublayers*this.depthEpsilon,this.renderPass="opaque";var h,f=[];for(this.currentLayer=o.length-1,this._showOverdrawInspector||this.gl.disable(this.gl.BLEND),this.currentLayer;this.currentLayer>=0;this.currentLayer--){var d=r.style._layers[o[r.currentLayer]];d.source!==(h&&h.id)&&(h=r.style.sourceCaches[d.source],f=[],h&&(r.clearStencil(),f=h.getVisibleCoordinates(),h.getSource().isTileClipped&&r._renderTileClippingMasks(f))),r.renderLayer(r,h,d,f)}this.renderPass="translucent";var m,v=[];for(this.gl.enable(this.gl.BLEND),this.currentLayer=0,this.currentLayer;this.currentLayer<o.length;this.currentLayer++){var y=r.style._layers[o[r.currentLayer]];y.source!==(m&&m.id)&&(m=r.style.sourceCaches[y.source],v=[],m&&(r.clearStencil(),v=m.getVisibleCoordinates(),m.getSource().isTileClipped&&r._renderTileClippingMasks(v)),v.reverse()),r.renderLayer(r,m,y,v)}if(this.options.showTileBoundaries){var x=this.style.sourceCaches[Object.keys(this.style.sourceCaches)[0]];x&&_.debug(this,x,x.getVisibleCoordinates())}},x.prototype._setup3DRenderbuffer=function(){if(!this.depthRbo){var t=this.gl;this.depthRbo=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this.depthRbo),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,this.width,this.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}this.depthRboAttached=!0},x.prototype.depthMask=function(t){t!==this._depthMask&&(this._depthMask=t,this.gl.depthMask(t))},x.prototype.renderLayer=function(t,e,r,n){r.isHidden(this.transform.zoom)||("background"===r.type||n.length)&&(this.id=r.id,_[r.type](t,e,r,n))},x.prototype.setDepthSublayer=function(t){var e=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon,r=e-1+this.depthRange;this.gl.depthRange(r,e)},x.prototype.translatePosMatrix=function(t,e,r,n,o){if(!r[0]&&!r[1])return t;var a=o?"map"===n?this.transform.angle:0:"viewport"===n?-this.transform.angle:0;if(a){var s=Math.sin(a),u=Math.cos(a);r=[r[0]*u-r[1]*s,r[0]*s+r[1]*u]}var c=[o?r[0]:l(e,r[0],this.transform.zoom),o?r[1]:l(e,r[1],this.transform.zoom),0],p=new Float32Array(16);return i.translate(p,t,c),p},x.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size];e?e.push(t):this._tileTextures[t.size]=[t]},x.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&&e.length>0?e.pop():null},x.prototype.lineWidth=function(t){this.gl.lineWidth(u.clamp(t,this.lineWidthRange[0],this.lineWidthRange[1]))},x.prototype.showOverdrawInspector=function(t){if(t||this._showOverdrawInspector){this._showOverdrawInspector=t;var e=this.gl;t?(e.blendFunc(e.CONSTANT_COLOR,e.ONE),e.blendColor(1/8,1/8,1/8,0),e.clearColor(0,0,0,1),e.clear(e.COLOR_BUFFER_BIT)):e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA)}},x.prototype._createProgramCached=function(t,e){this.cache=this.cache||{};var r=""+t+(e.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new y(this.gl,v[t],e,this._showOverdrawInspector)),this.cache[r]},x.prototype.useProgram=function(t,e){var r=this.gl,n=this._createProgramCached(t,e||this.emptyProgramConfiguration);return this.currentProgram!==n&&(r.useProgram(n.program),this.currentProgram=n),n},e.exports=x},{"../data/extent":48,"../data/pos_array":52,"../data/program_configuration":53,"../data/raster_bounds_array":54,"../gl/vertex_buffer":62,"../shaders":86,"../source/pixels_to_tile_units":93,"../source/source_cache":98,"../util/browser":202,"../util/util":223,"./draw_background":64,"./draw_circle":65,"./draw_debug":67,"./draw_fill":68,"./draw_fill_extrusion":69,"./draw_line":70,"./draw_raster":71,"./draw_symbol":72,"./frame_history":73,"./program":81,"./render_texture":82,"./vertex_array_object":84,"@mapbox/gl-matrix":1}],80:[function(t,e,r){"use strict";var n=t("../source/pixels_to_tile_units");r.isPatternMissing=function(t,e){if(!t)return!1;var r=e.imageManager.getPattern(t.from),n=e.imageManager.getPattern(t.to);return!r||!n},r.prepare=function(t,e,r){var n=e.gl,i=e.imageManager.getPattern(t.from),o=e.imageManager.getPattern(t.to);n.uniform1i(r.uniforms.u_image,0),n.uniform2fv(r.uniforms.u_pattern_tl_a,i.tl),n.uniform2fv(r.uniforms.u_pattern_br_a,i.br),n.uniform2fv(r.uniforms.u_pattern_tl_b,o.tl),n.uniform2fv(r.uniforms.u_pattern_br_b,o.br);var a=e.imageManager.getPixelSize(),s=a.width,l=a.height;n.uniform2fv(r.uniforms.u_texsize,[s,l]),n.uniform1f(r.uniforms.u_mix,t.t),n.uniform2fv(r.uniforms.u_pattern_size_a,i.displaySize),n.uniform2fv(r.uniforms.u_pattern_size_b,o.displaySize),n.uniform1f(r.uniforms.u_scale_a,t.fromScale),n.uniform1f(r.uniforms.u_scale_b,t.toScale),n.activeTexture(n.TEXTURE0),e.imageManager.bind(n)},r.setTile=function(t,e,r){var i=e.gl;i.uniform1f(r.uniforms.u_tile_units_to_pixels,1/n(t,1,e.transform.tileZoom));var o=Math.pow(2,t.coord.z),a=t.tileSize*Math.pow(2,e.transform.tileZoom)/o,s=a*(t.coord.x+t.coord.w*o),l=a*t.coord.y;i.uniform2f(r.uniforms.u_pixel_coord_upper,s>>16,l>>16),i.uniform2f(r.uniforms.u_pixel_coord_lower,65535&s,65535&l)}},{"../source/pixels_to_tile_units":93}],81:[function(t,e,r){"use strict";var n=t("../util/browser"),i=t("../shaders"),o=t("../data/program_configuration"),a=(o.ProgramConfiguration,t("./vertex_array_object")),s=function(t,e,r,o){var a=this;this.gl=t,this.program=t.createProgram();var s=r.defines().concat("#define DEVICE_PIXEL_RATIO "+n.devicePixelRatio.toFixed(1));o&&s.push("#define OVERDRAW_INSPECTOR;");var l=s.concat(i.prelude.fragmentSource,e.fragmentSource).join("\n"),u=s.concat(i.prelude.vertexSource,e.vertexSource).join("\n"),c=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(c,l),t.compileShader(c),t.attachShader(this.program,c);var p=t.createShader(t.VERTEX_SHADER);t.shaderSource(p,u),t.compileShader(p),t.attachShader(this.program,p);for(var h=r.interface?r.interface.layoutAttributes:[],f=0;f<h.length;f++)t.bindAttribLocation(a.program,f,h[f].name);t.linkProgram(this.program),this.numAttributes=t.getProgramParameter(this.program,t.ACTIVE_ATTRIBUTES),this.attributes={},this.uniforms={};for(var d=0;d<this.numAttributes;d++){var m=t.getActiveAttrib(a.program,d);m&&(a.attributes[m.name]=t.getAttribLocation(a.program,m.name))}for(var v=t.getProgramParameter(this.program,t.ACTIVE_UNIFORMS),y=0;y<v;y++){var g=t.getActiveUniform(a.program,y);g&&(a.uniforms[g.name]=t.getUniformLocation(a.program,g.name))}};s.prototype.draw=function(t,e,r,n,i,o,s,l){for(var u,c=this,p=(u={},u[t.LINES]=2,u[t.TRIANGLES]=3,u)[e],h=0,f=o.get();h<f.length;h+=1){var d=f[h],m=d.vaos||(d.vaos={});(m[r]||(m[r]=new a)).bind(t,c,n,i,s&&s.paintVertexBuffer,d.vertexOffset,l),t.drawElements(e,d.primitiveLength*p,t.UNSIGNED_SHORT,d.primitiveOffset*p*2)}},e.exports=s},{"../data/program_configuration":53,"../shaders":86,"../util/browser":202,"./vertex_array_object":84}],82:[function(t,e,r){"use strict";var n=t("../gl/vertex_buffer"),i=t("./vertex_array_object"),o=t("../data/pos_array"),a=function(t){var e=this.gl=t.gl,r=this.texture=e.createTexture();e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,t.width,t.height,0,e.RGBA,e.UNSIGNED_BYTE,null),e.bindTexture(e.TEXTURE_2D,null);var a=this.fbo=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,a),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,r,0);var s=new o;s.emplaceBack(0,0),s.emplaceBack(1,0),s.emplaceBack(0,1),s.emplaceBack(1,1),this.buffer=new n(e,s),this.vao=new i};a.prototype.bindWithDepth=function(t){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,this.fbo),this.attachedRbo!==t&&(e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.attachedRbo=t)},a.prototype.unbind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null)},e.exports=a},{"../data/pos_array":52,"../gl/vertex_buffer":62,"./vertex_array_object":84}],83:[function(t,e,r){"use strict";var n=function(t,e,r){this.gl=t;var n=e.width,i=e.height;this.size=[n,i],this.format=r,this.texture=t.createTexture(),this.update(e)};n.prototype.update=function(t){var e=t.width,r=t.height,n=t.data;this.size=[e,r];var i=this,o=i.gl;o.bindTexture(o.TEXTURE_2D,this.texture),o.pixelStorei(o.UNPACK_ALIGNMENT,1),this.format===o.RGBA&&o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),o.texImage2D(o.TEXTURE_2D,0,this.format,e,r,0,this.format,o.UNSIGNED_BYTE,n)},n.prototype.bind=function(t,e){var r=this,n=r.gl;n.bindTexture(n.TEXTURE_2D,this.texture),t!==this.filter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,t),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,t),this.filter=t),e!==this.wrap&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,e),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,e),this.wrap=e)},n.prototype.destroy=function(){this.gl.deleteTexture(this.texture),this.texture=null},e.exports=n},{}],84:[function(t,e,r){"use strict";var n=function(){this.boundProgram=null,this.boundVertexBuffer=null,this.boundVertexBuffer2=null,this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};n.prototype.bind=function(t,e,r,n,i,o,a){void 0===t.extVertexArrayObject&&(t.extVertexArrayObject=t.getExtension("OES_vertex_array_object"));var s=!this.vao||this.boundProgram!==e||this.boundVertexBuffer!==r||this.boundVertexBuffer2!==i||this.boundIndexBuffer!==n||this.boundVertexOffset!==o||this.boundDynamicVertexBuffer!==a;!t.extVertexArrayObject||s?(this.freshBind(t,e,r,n,i,o,a),this.gl=t):(t.extVertexArrayObject.bindVertexArrayOES(this.vao),a&&a.bind())},n.prototype.freshBind=function(t,e,r,n,i,o,a){var s,l=e.numAttributes;if(t.extVertexArrayObject)this.vao&&this.destroy(),this.vao=t.extVertexArrayObject.createVertexArrayOES(),t.extVertexArrayObject.bindVertexArrayOES(this.vao),s=0,this.boundProgram=e,this.boundVertexBuffer=r,this.boundVertexBuffer2=i,this.boundIndexBuffer=n,this.boundVertexOffset=o,this.boundDynamicVertexBuffer=a;else{s=t.currentNumAttributes||0;for(var u=l;u<s;u++)t.disableVertexAttribArray(u)}r.enableAttributes(t,e),i&&i.enableAttributes(t,e),a&&a.enableAttributes(t,e),r.bind(),r.setVertexAttribPointers(t,e,o),i&&(i.bind(),i.setVertexAttribPointers(t,e,o)),a&&(a.bind(),a.setVertexAttribPointers(t,e,o)),n&&n.bind(),t.currentNumAttributes=l},n.prototype.destroy=function(){this.vao&&(this.gl.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)},e.exports=n},{}],85:[function(t,e,r){"use strict";var n=t("../util/util");r.packUint8ToFloat=function(t,e){return t=n.clamp(Math.floor(t),0,255),e=n.clamp(Math.floor(e),0,255),256*t+e}},{"../util/util":223}],86:[function(t,e,r){"use strict";var n={prelude:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n\n// Unpack a pair of values that have been packed into a single float.\n// The packed values are assumed to be 8-bit unsigned integers, and are\n// packed like so:\n// packedValue = floor(input[0]) * 256 + input[1],\nvec2 unpack_float(const float packedValue) {\n int packedIntValue = int(packedValue);\n int v0 = packedIntValue / 256;\n return vec2(v0, packedIntValue - v0 * 256);\n}\n\n\n// To minimize the number of attributes needed, we encode a 4-component\n// color into a pair of floats (i.e. a vec2) as follows:\n// [ floor(color.r * 255) * 256 + color.g * 255,\n// floor(color.b * 255) * 256 + color.g * 255 ]\nvec4 decode_color(const vec2 encodedColor) {\n return vec4(\n unpack_float(encodedColor[0]) / 255.0,\n unpack_float(encodedColor[1]) / 255.0\n );\n}\n\n// Unpack a pair of paint values and interpolate between them.\nfloat unpack_mix_vec2(const vec2 packedValue, const float t) {\n return mix(packedValue[0], packedValue[1], t);\n}\n\n// Unpack a pair of paint values and interpolate between them.\nvec4 unpack_mix_vec4(const vec4 packedColors, const float t) {\n vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));\n vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));\n return mix(minColor, maxColor, t);\n}\n\n// The offset depends on how many pixels are between the world origin and the edge of the tile:\n// vec2 offset = mod(pixel_coord, size)\n//\n// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile.\n// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that.\n//\n// The pixel_coord is passed in as two 16 bit values:\n// pixel_coord_upper = floor(pixel_coord / 2^16)\n// pixel_coord_lower = mod(pixel_coord, 2^16)\n//\n// The offset is calculated in a series of steps that should preserve this precision:\nvec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,\n const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {\n\n vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);\n return (tile_units_to_pixels * pos + offset) / pattern_size;\n}\n"},circle:{fragmentSource:"#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\nvarying vec3 v_data;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize mediump float radius\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize highp vec4 stroke_color\n #pragma mapbox: initialize mediump float stroke_width\n #pragma mapbox: initialize lowp float stroke_opacity\n\n vec2 extrude = v_data.xy;\n float extrude_length = length(extrude);\n\n lowp float antialiasblur = v_data.z;\n float antialiased_blur = -max(blur, antialiasblur);\n\n float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0);\n\n float color_t = stroke_width < 0.01 ? 0.0 : smoothstep(\n antialiased_blur,\n 0.0,\n extrude_length - radius / (radius + stroke_width)\n );\n\n gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform bool u_scale_with_map;\nuniform bool u_pitch_with_map;\nuniform vec2 u_extrude_scale;\nuniform highp float u_camera_to_center_distance;\n\nattribute vec2 a_pos;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\nvarying vec3 v_data;\n\nvoid main(void) {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize mediump float radius\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize highp vec4 stroke_color\n #pragma mapbox: initialize mediump float stroke_width\n #pragma mapbox: initialize lowp float stroke_opacity\n\n // unencode the extrusion vector that we snuck into the a_pos vector\n vec2 extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n // in extrusion data\n vec2 circle_center = floor(a_pos * 0.5);\n if (u_pitch_with_map) {\n vec2 corner_position = circle_center;\n if (u_scale_with_map) {\n corner_position += extrude * (radius + stroke_width) * u_extrude_scale;\n } else {\n // Pitching the circle with the map effectively scales it with the map\n // To counteract the effect for pitch-scale: viewport, we rescale the\n // whole circle based on the pitch scaling effect at its central point\n vec4 projected_center = u_matrix * vec4(circle_center, 0, 1);\n corner_position += extrude * (radius + stroke_width) * u_extrude_scale * (projected_center.w / u_camera_to_center_distance);\n }\n\n gl_Position = u_matrix * vec4(corner_position, 0, 1);\n } else {\n gl_Position = u_matrix * vec4(circle_center, 0, 1);\n\n if (u_scale_with_map) {\n gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * u_camera_to_center_distance;\n } else {\n gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * gl_Position.w;\n }\n }\n\n // This is a minimum blur distance that serves as a faux-antialiasing for\n // the circle. since blur is a ratio of the circle's size and the intent is\n // to keep the blur at roughly 1px, the two are inversely related.\n lowp float antialiasblur = 1.0 / DEVICE_PIXEL_RATIO / (radius + stroke_width);\n\n v_data = vec3(extrude.x, extrude.y, antialiasblur);\n}\n"},collisionBox:{fragmentSource:"uniform float u_zoom;\n// u_maxzoom is derived from the maximum scale considered by the CollisionTile\n// Labels with placement zoom greater than this value will not be placed,\n// regardless of perspective effects.\nuniform float u_maxzoom;\nuniform sampler2D u_fadetexture;\n\n// v_max_zoom is a collision-box-specific value that controls when line-following\n// collision boxes are used.\nvarying float v_max_zoom;\nvarying float v_placement_zoom;\nvarying float v_perspective_zoom_adjust;\nvarying vec2 v_fade_tex;\n\nvoid main() {\n\n float alpha = 0.5;\n\n // Green = no collisions, label is showing\n gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0) * alpha;\n\n // Red = collision, label hidden\n if (texture2D(u_fadetexture, v_fade_tex).a < 1.0) {\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n }\n\n // Faded black = this collision box is not used at this zoom (for curved labels)\n if (u_zoom >= v_max_zoom + v_perspective_zoom_adjust) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0) * alpha * 0.25;\n }\n\n // Faded blue = the placement scale for this label is beyond the CollisionTile\n // max scale, so it's impossible for this label to show without collision detection\n // being run again (the label's glyphs haven't even been added to the symbol bucket)\n if (v_placement_zoom >= u_maxzoom) {\n gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0) * alpha * 0.2;\n }\n}\n",vertexSource:"attribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_data;\n\nuniform mat4 u_matrix;\nuniform float u_scale;\nuniform float u_pitch;\nuniform float u_collision_y_stretch;\nuniform float u_camera_to_center_distance;\n\nvarying float v_max_zoom;\nvarying float v_placement_zoom;\nvarying float v_perspective_zoom_adjust;\nvarying vec2 v_fade_tex;\n\nvoid main() {\n vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n highp float collision_perspective_ratio = 1.0 + 0.5 * ((camera_to_anchor_distance / u_camera_to_center_distance) - 1.0);\n\n highp float incidence_stretch = camera_to_anchor_distance / (u_camera_to_center_distance * cos(u_pitch));\n highp float collision_adjustment = max(1.0, incidence_stretch / u_collision_y_stretch);\n\n gl_Position = u_matrix * vec4(a_pos + a_extrude * collision_perspective_ratio * collision_adjustment / u_scale, 0.0, 1.0);\n\n v_max_zoom = a_data.x;\n v_placement_zoom = a_data.y;\n\n v_perspective_zoom_adjust = floor(log2(collision_perspective_ratio * collision_adjustment) * 10.0);\n v_fade_tex = vec2((v_placement_zoom + v_perspective_zoom_adjust) / 255.0, 0.0);\n}\n"},debug:{fragmentSource:"uniform highp vec4 u_color;\n\nvoid main() {\n gl_FragColor = u_color;\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n // We are using Int16 for texture position coordinates to give us enough precision for\n // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer\n // as an arbitrarily high number to preserve adequate precision when rendering.\n // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates,\n // so math for modifying either is consistent.\n gl_Position = u_matrix * vec4(a_pos, step(8192.0, a_pos.x), 1);\n}\n"},fill:{fragmentSource:"#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float opacity\n\n gl_FragColor = color * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},fillOutline:{fragmentSource:"#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_pos;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n gl_FragColor = outline_color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos;\n\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},fillOutlinePattern:{fragmentSource:"uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n // find distance to outline for alpha interpolation\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n\n\n gl_FragColor = mix(color1, color2, u_mix) * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_world;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},fillPattern:{fragmentSource:"uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n gl_FragColor = mix(color1, color2, u_mix) * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n}\n"},fillExtrusion:{fragmentSource:"varying vec4 v_color;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define highp vec4 color\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n #pragma mapbox: initialize highp vec4 color\n\n gl_FragColor = v_color;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\n\nattribute vec2 a_pos;\nattribute vec3 a_normal;\nattribute float a_edgedistance;\n\nvarying vec4 v_color;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\n#pragma mapbox: define highp vec4 color\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n #pragma mapbox: initialize highp vec4 color\n\n base = max(0.0, base);\n height = max(0.0, height);\n\n float ed = a_edgedistance; // use each attrib in order to not trip a VAO assert\n float t = mod(a_normal.x, 2.0);\n\n gl_Position = u_matrix * vec4(a_pos, t > 0.0 ? height : base, 1);\n\n // Relative luminance (how dark/bright is the surface color?)\n float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722;\n\n v_color = vec4(0.0, 0.0, 0.0, 1.0);\n\n // Add slight ambient lighting so no extrusions are totally black\n vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0);\n color += ambientlight;\n\n // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray\n float directional = clamp(dot(a_normal / 16384.0, u_lightpos), 0.0, 1.0);\n\n // Adjust directional so that\n // the range of values for highlight/shading is narrower\n // with lower light intensity\n // and with lighter/brighter surface colors\n directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional);\n\n // Add gradient along z axis of side surfaces\n if (a_normal.y != 0.0) {\n directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\n }\n\n // Assign final color based on surface + ambient light color, diffuse light directional, and light color\n // with lower bounds adjusted to hue of light\n // so that shading is tinted with the complementary (opposite) color to the light color\n v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);\n v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);\n v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);\n}\n"},fillExtrusionPattern:{fragmentSource:"uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n vec4 mixedColor = mix(color1, color2, u_mix);\n\n gl_FragColor = mixedColor * v_lighting;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\nuniform float u_height_factor;\n\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\n\nattribute vec2 a_pos;\nattribute vec3 a_normal;\nattribute float a_edgedistance;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\nvarying float v_directional;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n\n base = max(0.0, base);\n height = max(0.0, height);\n\n float t = mod(a_normal.x, 2.0);\n float z = t > 0.0 ? height : base;\n\n gl_Position = u_matrix * vec4(a_pos, z, 1);\n\n vec2 pos = a_normal.x == 1.0 && a_normal.y == 0.0 && a_normal.z == 16384.0\n ? a_pos // extrusion top\n : vec2(a_edgedistance, z * u_height_factor); // extrusion side\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, pos);\n\n v_lighting = vec4(0.0, 0.0, 0.0, 1.0);\n float directional = clamp(dot(a_normal / 16383.0, u_lightpos), 0.0, 1.0);\n directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional);\n\n if (a_normal.y != 0.0) {\n directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\n }\n\n v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));\n}\n"},extrusionTexture:{fragmentSource:"uniform sampler2D u_image;\nuniform float u_opacity;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_FragColor = texture2D(u_image, v_pos) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(0.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_world;\nattribute vec2 a_pos;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\n\n v_pos.x = a_pos.x;\n v_pos.y = 1.0 - a_pos.y;\n}\n"},line:{fragmentSource:"#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_width2;\nvarying vec2 v_normal;\nvarying float v_gamma_scale;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float width\n\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n\n vec2 pos = a_pos_normal.xy;\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = a_pos_normal.zw;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_width2 = vec2(outset, inset);\n}\n"},linePattern:{fragmentSource:"uniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_fade;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n float x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);\n float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);\n float y_a = 0.5 + (v_normal.y * v_width2.s / u_pattern_size_a.y);\n float y_b = 0.5 + (v_normal.y * v_width2.s / u_pattern_size_b.y);\n vec2 pos_a = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, vec2(x_a, y_a));\n vec2 pos_b = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, vec2(x_b, y_b));\n\n vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\n\n gl_FragColor = color * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize mediump float width\n\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n vec2 pos = a_pos_normal.xy;\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = a_pos_normal.zw;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_linesofar = a_linesofar;\n v_width2 = vec2(outset, inset);\n}\n"},lineSDF:{fragmentSource:"\nuniform sampler2D u_image;\nuniform float u_sdfgamma;\nuniform float u_mix;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize lowp float floorwidth\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n float sdfdist_a = texture2D(u_image, v_tex_a).a;\n float sdfdist_b = texture2D(u_image, v_tex_b).a;\n float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\n alpha *= smoothstep(0.5 - u_sdfgamma / floorwidth, 0.5 + u_sdfgamma / floorwidth, sdfdist);\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_patternscale_a;\nuniform float u_tex_y_a;\nuniform vec2 u_patternscale_b;\nuniform float u_tex_y_b;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize lowp float floorwidth\n\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n vec2 pos = a_pos_normal.xy;\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = a_pos_normal.zw;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist =outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x / floorwidth, normal.y * u_patternscale_a.y + u_tex_y_a);\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x / floorwidth, normal.y * u_patternscale_b.y + u_tex_y_b);\n\n v_width2 = vec2(outset, inset);\n}\n"},raster:{fragmentSource:"uniform float u_fade_t;\nuniform float u_opacity;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nuniform float u_brightness_low;\nuniform float u_brightness_high;\n\nuniform float u_saturation_factor;\nuniform float u_contrast_factor;\nuniform vec3 u_spin_weights;\n\nvoid main() {\n\n // read and cross-fade colors from the main and parent tiles\n vec4 color0 = texture2D(u_image0, v_pos0);\n vec4 color1 = texture2D(u_image1, v_pos1);\n if (color0.a > 0.0) {\n color0.rgb = color0.rgb / color0.a;\n }\n if (color1.a > 0.0) {\n color1.rgb = color1.rgb / color1.a;\n }\n vec4 color = mix(color0, color1, u_fade_t);\n color.a *= u_opacity;\n vec3 rgb = color.rgb;\n\n // spin\n rgb = vec3(\n dot(rgb, u_spin_weights.xyz),\n dot(rgb, u_spin_weights.zxy),\n dot(rgb, u_spin_weights.yzx));\n\n // saturation\n float average = (color.r + color.g + color.b) / 3.0;\n rgb += (average - rgb) * u_saturation_factor;\n\n // contrast\n rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\n\n // brightness\n vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\n vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\n\n gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_tl_parent;\nuniform float u_scale_parent;\nuniform float u_buffer_scale;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n // We are using Int16 for texture position coordinates to give us enough precision for\n // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer\n // as an arbitrarily high number to preserve adequate precision when rendering.\n // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates,\n // so math for modifying either is consistent.\n v_pos0 = (((a_texture_pos / 8192.0) - 0.5) / u_buffer_scale ) + 0.5;\n v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\n}\n"},symbolIcon:{fragmentSource:"uniform sampler2D u_texture;\nuniform sampler2D u_fadetexture;\n\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n lowp float alpha = texture2D(u_fadetexture, v_fade_tex).a * opacity;\n gl_FragColor = texture2D(u_texture, v_tex) * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"const float PI = 3.141592653589793;\n\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec3 a_projected_pos;\n\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform highp float u_camera_to_center_distance;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_collision_y_stretch;\n\n#pragma mapbox: define lowp float opacity\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_gl_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying vec2 v_fade_tex;\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n vec2 a_pos = a_pos_offset.xy;\n vec2 a_offset = a_pos_offset.zw;\n\n vec2 a_tex = a_data.xy;\n vec2 a_size = a_data.zw;\n\n highp vec2 angle_labelminzoom = unpack_float(a_projected_pos[2]);\n highp float segment_angle = -angle_labelminzoom[0] / 255.0 * 2.0 * PI;\n mediump float a_labelminzoom = angle_labelminzoom[1];\n\n float size;\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size[0], a_size[1], u_size_t) / 10.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size[0] / 10.0;\n } else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {\n size = u_size;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // See comments in symbol_sdf.vertex\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = 0.5 + 0.5 * distance_ratio;\n\n size *= perspective_ratio;\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // See comments in symbol_sdf.vertex\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 64.0 * fontScale), 0.0, 1.0);\n\n v_tex = a_tex / u_texsize;\n // See comments in symbol_sdf.vertex\n highp float incidence_stretch = camera_to_anchor_distance / (u_camera_to_center_distance * cos(u_pitch));\n highp float collision_adjustment = max(1.0, incidence_stretch / u_collision_y_stretch);\n\n highp float collision_perspective_ratio = 1.0 + 0.5*((camera_to_anchor_distance / u_camera_to_center_distance) - 1.0);\n highp float perspective_zoom_adjust = floor(log2(collision_perspective_ratio * collision_adjustment) * 10.0);\n v_fade_tex = vec2((a_labelminzoom + perspective_zoom_adjust) / 255.0, 0.0);\n}\n"},symbolSDF:{fragmentSource:"#define SDF_PX 8.0\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\n\nuniform bool u_is_halo;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nuniform sampler2D u_texture;\nuniform sampler2D u_fadetexture;\nuniform highp float u_gamma_scale;\nuniform bool u_is_text;\n\nvarying vec4 v_data0;\nvarying vec2 v_data1;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n vec2 tex = v_data0.xy;\n vec2 fade_tex = v_data0.zw;\n float gamma_scale = v_data1.x;\n float size = v_data1.y;\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n lowp vec4 color = fill_color;\n highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\n lowp float buff = (256.0 - 64.0) / 256.0;\n if (u_is_halo) {\n color = halo_color;\n gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\n buff = (6.0 - halo_width / fontScale) / SDF_PX;\n }\n\n lowp float dist = texture2D(u_texture, tex).a;\n lowp float fade_alpha = texture2D(u_fadetexture, fade_tex).a;\n highp float gamma_scaled = gamma * gamma_scale;\n highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist) * fade_alpha;\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"const float PI = 3.141592653589793;\n\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec3 a_projected_pos;\n\n// contents of a_size vary based on the type of property value\n// used for {text,icon}-size.\n// For constants, a_size is disabled.\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\n// For composite functions:\n// [ text-size(lowerZoomStop, feature),\n// text-size(upperZoomStop, feature) ]\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_gl_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_camera_to_center_distance;\nuniform highp float u_collision_y_stretch;\n\nuniform vec2 u_texsize;\n\nvarying vec4 v_data0;\nvarying vec2 v_data1;\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n vec2 a_pos = a_pos_offset.xy;\n vec2 a_offset = a_pos_offset.zw;\n\n vec2 a_tex = a_data.xy;\n vec2 a_size = a_data.zw;\n\n highp vec2 angle_labelminzoom = unpack_float(a_projected_pos[2]);\n highp float segment_angle = -angle_labelminzoom[0] / 255.0 * 2.0 * PI;\n mediump float a_labelminzoom = angle_labelminzoom[1];\n float size;\n\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size[0], a_size[1], u_size_t) / 10.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size[0] / 10.0;\n } else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {\n size = u_size;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // If the label is pitched with the map, layout is done in pitched space,\n // which makes labels in the distance smaller relative to viewport space.\n // We counteract part of that effect by multiplying by the perspective ratio.\n // If the label isn't pitched with the map, we do layout in viewport space,\n // which makes labels in the distance larger relative to the features around\n // them. We counteract part of that effect by dividing by the perspective ratio.\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = 0.5 + 0.5 * distance_ratio;\n\n size *= perspective_ratio;\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\n // To figure out that angle in projected space, we draw a short horizontal line in tile\n // space, project it, and measure its angle in projected space.\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 64.0 * fontScale), 0.0, 1.0);\n float gamma_scale = gl_Position.w;\n\n vec2 tex = a_tex / u_texsize;\n // incidence_stretch is the ratio of how much y space a label takes up on a tile while drawn perpendicular to the viewport vs\n // how much space it would take up if it were drawn flat on the tile\n // Using law of sines, camera_to_anchor/sin(ground_angle) = camera_to_center/sin(incidence_angle)\n // sin(incidence_angle) = 1/incidence_stretch\n // Incidence angle 90 -> head on, sin(incidence_angle) = 1, no incidence stretch\n // Incidence angle 1 -> very oblique, sin(incidence_angle) =~ 0, lots of incidence stretch\n // ground_angle = u_pitch + PI/2 -> sin(ground_angle) = cos(u_pitch)\n // This 2D calculation is only exactly correct when gl_Position.x is in the center of the viewport,\n // but it's a close enough approximation for our purposes\n highp float incidence_stretch = camera_to_anchor_distance / (u_camera_to_center_distance * cos(u_pitch));\n // incidence_stretch only applies to the y-axis, but without re-calculating the collision tile, we can't\n // adjust the size of only one axis. So, we do a crude approximation at placement time to get the aspect ratio\n // about right, and then do the rest of the adjustment here: there will be some extra padding on the x-axis,\n // but hopefully not too much.\n // Never make the adjustment less than 1.0: instead of allowing collisions on the x-axis, be conservative on\n // the y-axis.\n highp float collision_adjustment = max(1.0, incidence_stretch / u_collision_y_stretch);\n\n // Floor to 1/10th zoom to dodge precision issues that can cause partially hidden labels\n highp float collision_perspective_ratio = 1.0 + 0.5*((camera_to_anchor_distance / u_camera_to_center_distance) - 1.0);\n highp float perspective_zoom_adjust = floor(log2(collision_perspective_ratio * collision_adjustment) * 10.0);\n vec2 fade_tex = vec2((a_labelminzoom + perspective_zoom_adjust) / 255.0, 0.0);\n\n v_data0 = vec4(tex.x, tex.y, fade_tex.x, fade_tex.y);\n v_data1 = vec2(gamma_scale, size);\n}\n"}},i=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g;for(var o in n)!function(t){var e=n[t],r={};e.fragmentSource=e.fragmentSource.replace(i,function(t,e,n,i,o){return r[o]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+n+" "+i+" "+o+";\n#else\nuniform "+n+" "+i+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n "+n+" "+i+" "+o+" = u_"+o+";\n#endif\n"}),e.vertexSource=e.vertexSource.replace(i,function(t,e,n,i,o){var a="float"===i?"vec2":"vec4";return r[o]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float a_"+o+"_t;\nattribute "+n+" "+a+" a_"+o+";\nvarying "+n+" "+i+" "+o+";\n#else\nuniform "+n+" "+i+" u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = unpack_mix_"+a+"(a_"+o+", a_"+o+"_t);\n#else\n "+n+" "+i+" "+o+" = u_"+o+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float a_"+o+"_t;\nattribute "+n+" "+a+" a_"+o+";\n#else\nuniform "+n+" "+i+" u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+n+" "+i+" "+o+" = unpack_mix_"+a+"(a_"+o+", a_"+o+"_t);\n#else\n "+n+" "+i+" "+o+" = u_"+o+";\n#endif\n"})}(o);e.exports=n},{}],87:[function(t,e,r){"use strict";var n=t("./image_source"),i=t("../util/window"),o=function(t){function e(e,r,n,i){t.call(this,e,r,n,i),this.options=r,this.animate=void 0===r.animate||r.animate}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){this.canvas=this.canvas||i.document.getElementById(this.options.canvas);var t=this.canvas.getContext(this.options.contextType);if(!t)return this.fire("error",new Error("Canvas context not found."));if(this.context=t,this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions())return this.fire("error",new Error("Canvas dimensions cannot be less than or equal to zero."));var e;this.play=function(){void 0===e&&(e=this.map.style.animationLoop.set(1/0),this.map._rerender())},this.pause=function(){void 0!==e&&(e=this.map.style.animationLoop.cancel(e))},this._finishLoading()},e.prototype.getCanvas=function(){return this.canvas},e.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},e.prototype.onRemove=function(){this.pause()},e.prototype.readCanvas=function(t){var e=this;if(this.context instanceof CanvasRenderingContext2D)this.canvasData=this.context.getImageData(0,0,this.width,this.height);else if(this.context instanceof WebGLRenderingContext){var r=this.context,n=new Uint8Array(this.width*this.height*4);r.readPixels(0,0,this.width,this.height,r.RGBA,r.UNSIGNED_BYTE,n),this.secondaryContext||(this.secondaryContext=i.document.createElement("canvas").getContext("2d")),this.canvasData&&!t||(this.canvasData=this.secondaryContext.createImageData(this.width,this.height));for(var o=this.height-1,a=0;o>=0;o--,a++)e.canvasData.data.set(n.subarray(o*e.width*4,(o+1)*e.width*4),a*e.width*4)}},e.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){if((this.animate||!this.canvasData||t)&&this.readCanvas(t),!this.canvasData)return void this.fire("error",new Error("Could not read canvas data."));this._prepareImage(this.map.painter.gl,this.canvasData,t)}},e.prototype.serialize=function(){return{type:"canvas",canvas:this.canvas,coordinates:this.coordinates}},e.prototype._hasInvalidDimensions=function(){for(var t=this,e=0,r=[t.canvas.width,t.canvas.height];e<r.length;e+=1){var n=r[e];if(isNaN(n)||n<=0)return!0}return!1},e}(n);e.exports=o},{"../util/window":204,"./image_source":91}],88:[function(t,e,r){"use strict";function n(t){var e=a.document.createElement("a");return e.href=t,e.href}var i=t("../util/evented"),o=t("../util/util"),a=t("../util/window"),s=t("../data/extent"),l=t("../util/ajax").ResourceType,u=t("../util/browser"),c=function(t){function e(e,r,n,i){t.call(this),this.id=e,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this.dispatcher=n,this.setEventedParent(i),this._data=r.data,this._options=o.extend({},r),void 0!==r.maxzoom&&(this.maxzoom=r.maxzoom),r.type&&(this.type=r.type);var a=s/this.tileSize;this.workerOptions=o.extend({source:this.id,cluster:r.cluster||!1,geojsonVtOptions:{buffer:(void 0!==r.buffer?r.buffer:128)*a,tolerance:(void 0!==r.tolerance?r.tolerance:.375)*a,extent:s,maxZoom:this.maxzoom},superclusterOptions:{maxZoom:void 0!==r.clusterMaxZoom?Math.min(r.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:s,radius:(r.clusterRadius||50)*a,log:!1}},r.workerOptions)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this;this.fire("dataloading",{dataType:"source"}),this._updateWorkerData(function(e){if(e)return void t.fire("error",{error:e});t.fire("data",{dataType:"source",sourceDataType:"metadata"})})},e.prototype.onAdd=function(t){this.map=t,this.load()},e.prototype.setData=function(t){var e=this;return this._data=t,this.fire("dataloading",{dataType:"source"}),this._updateWorkerData(function(t){if(t)return e.fire("error",{error:t});e.fire("data",{dataType:"source",sourceDataType:"content"})}),this},e.prototype._updateWorkerData=function(t){var e=this,r=o.extend({},this.workerOptions),i=this._data;"string"==typeof i?r.request=this.map._transformRequest(n(i),l.Source):r.data=JSON.stringify(i),this.workerID=this.dispatcher.send(this.type+".loadData",r,function(r){e._loaded=!0,t(r)},this.workerID)},e.prototype.loadTile=function(t,e){var r=this,n=t.workerID&&"expired"!==t.state?"reloadTile":"loadTile",i={type:this.type,uid:t.uid,coord:t.coord,zoom:t.coord.z,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:u.devicePixelRatio,overscaling:t.coord.z>this.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,angle:this.map.transform.angle,pitch:this.map.transform.pitch,cameraToCenterDistance:this.map.transform.cameraToCenterDistance,cameraToTileDistance:this.map.transform.cameraToTileDistance(t),showCollisionBoxes:this.map.showCollisionBoxes};t.workerID=this.dispatcher.send(n,i,function(n,i){if(t.unloadVectorData(),!t.aborted)return n?e(n):(t.loadVectorData(i,r.map.painter),t.redoWhenDone&&(t.redoWhenDone=!1,t.redoPlacement(r)),e(null))},this.workerID)},e.prototype.abortTile=function(t){t.aborted=!0},e.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},function(){},t.workerID)},e.prototype.onRemove=function(){this.dispatcher.broadcast("removeSource",{type:this.type,source:this.id},function(){})},e.prototype.serialize=function(){return o.extend({},this._options,{type:this.type,data:this._data})},e}(i);e.exports=c},{"../data/extent":48,"../util/ajax":201,"../util/browser":202,"../util/evented":210,"../util/util":223,"../util/window":204}],89:[function(t,e,r){"use strict";function n(t,e){var r=t.source,n=t.coord;if(!this._geoJSONIndexes[r])return e(null,null);var i=this._geoJSONIndexes[r].getTile(Math.min(n.z,t.maxZoom),n.x,n.y);if(!i)return e(null,null);var o=new a(i.features),l=s(o);0===l.byteOffset&&l.byteLength===l.buffer.byteLength||(l=new Uint8Array(l)),e(null,{vectorTile:o,rawData:l.buffer})}var i=t("../util/ajax"),o=t("geojson-rewind"),a=t("./geojson_wrapper"),s=t("vt-pbf"),l=t("supercluster"),u=t("geojson-vt"),c=t("./vector_tile_worker_source"),p=function(t){function e(e,r,i){t.call(this,e,r,n),i&&(this.loadGeoJSON=i),this._geoJSONIndexes={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.loadData=function(t,e){var r=this;this.loadGeoJSON(t,function(n,i){if(n||!i)return e(n);if("object"!=typeof i)return e(new Error("Input data is not a valid GeoJSON object."));o(i,!0);try{r._geoJSONIndexes[t.source]=t.cluster?l(t.superclusterOptions).load(i.features):u(i,t.geojsonVtOptions)}catch(n){return e(n)}r.loaded[t.source]={},e(null)})},e.prototype.reloadTile=function(e,r){var n=this.loaded[e.source],i=e.uid;return n&&n[i]?t.prototype.reloadTile.call(this,e,r):this.loadTile(e,r)},e.prototype.loadGeoJSON=function(t,e){if(t.request)i.getJSON(t.request,e);else{if("string"!=typeof t.data)return e(new Error("Input data is not a valid GeoJSON object."));try{return e(null,JSON.parse(t.data))}catch(t){return e(new Error("Input data is not a valid GeoJSON object."))}}},e.prototype.removeSource=function(t){this._geoJSONIndexes[t.source]&&delete this._geoJSONIndexes[t.source]},e}(c);e.exports=p},{"../util/ajax":201,"./geojson_wrapper":90,"./vector_tile_worker_source":103,"geojson-rewind":13,"geojson-vt":17,supercluster:32,"vt-pbf":37}],90:[function(t,e,r){"use strict";var n=t("@mapbox/point-geometry"),i=t("@mapbox/vector-tile").VectorTileFeature.prototype.toGeoJSON,o=t("../data/extent"),a=function(t){this._feature=t,this.extent=o,this.type=t.type,this.properties=t.tags,"id"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10))};a.prototype.loadGeometry=function(){var t=this;if(1===this._feature.type){for(var e=[],r=0,i=t._feature.geometry;r<i.length;r+=1){var o=i[r];e.push([new n(o[0],o[1])])}return e}for(var a=[],s=0,l=t._feature.geometry;s<l.length;s+=1){for(var u=l[s],c=[],p=0,h=u;p<h.length;p+=1){var f=h[p];c.push(new n(f[0],f[1]))}a.push(c)}return a},a.prototype.toGeoJSON=function(t,e,r){return i.call(this,t,e,r)};var s=function(t){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=o,this.length=t.length,this._features=t};s.prototype.feature=function(t){return new a(this._features[t])},e.exports=s},{"../data/extent":48,"@mapbox/point-geometry":2,"@mapbox/vector-tile":6}],91:[function(t,e,r){"use strict";var n=t("../util/util"),i=t("../util/window"),o=t("./tile_coord"),a=t("../geo/lng_lat"),s=t("@mapbox/point-geometry"),l=t("../util/evented"),u=t("../util/ajax"),c=t("../util/browser"),p=t("../data/extent"),h=t("../data/raster_bounds_array"),f=t("../gl/vertex_buffer"),d=t("../render/vertex_array_object"),m=function(t){function e(e,r,n,i){t.call(this),this.id=e,this.dispatcher=n,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this.setEventedParent(i),this.options=r,this.textureLoaded=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this;this.fire("dataloading",{dataType:"source"}),this.url=this.options.url,u.getImage(this.map._transformRequest(this.url,u.ResourceType.Image),function(e,r){e?t.fire("error",{error:e}):r&&(t.image=c.getImageData(r),t._finishLoading())})},e.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire("data",{dataType:"source",sourceDataType:"metadata"}))},e.prototype.onAdd=function(t){this.map=t,this.load()},e.prototype.setCoordinates=function(t){this.coordinates=t;var e=this.map,r=t.map(function(t){return e.transform.locationCoordinate(a.convert(t)).zoomTo(0)}),i=this.centerCoord=n.getCoordinatesCenter(r);i.column=Math.floor(i.column),i.row=Math.floor(i.row),this.coord=new o(i.zoom,i.column,i.row),this.minzoom=this.maxzoom=i.zoom;var l=r.map(function(t){var e=t.zoomTo(i.zoom);return new s(Math.round((e.column-i.column)*p),Math.round((e.row-i.row)*p))});return this._boundsArray=new h,this._boundsArray.emplaceBack(l[0].x,l[0].y,0,0),this._boundsArray.emplaceBack(l[1].x,l[1].y,p,0),this._boundsArray.emplaceBack(l[3].x,l[3].y,0,p),this._boundsArray.emplaceBack(l[2].x,l[2].y,p,p),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire("data",{dataType:"source",sourceDataType:"content"}),this},e.prototype.prepare=function(){0!==Object.keys(this.tiles).length&&this.image&&this._prepareImage(this.map.painter.gl,this.image)},e.prototype._prepareImage=function(t,e,r){var n=this;this.boundsBuffer||(this.boundsBuffer=new f(t,this._boundsArray)),this.boundsVAO||(this.boundsVAO=new d),this.textureLoaded?r?t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e):(e instanceof i.HTMLVideoElement||e instanceof i.ImageData)&&(t.bindTexture(t.TEXTURE_2D,this.texture),t.texSubImage2D(t.TEXTURE_2D,0,0,0,t.RGBA,t.UNSIGNED_BYTE,e)):(this.textureLoaded=!0,this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e));for(var o in n.tiles){var a=n.tiles[o];"loaded"!==a.state&&(a.state="loaded",a.texture=n.texture)}},e.prototype.loadTile=function(t,e){this.coord&&this.coord.toString()===t.coord.toString()?(this.tiles[String(t.coord.w)]=t,t.buckets={},e(null)):(t.state="errored",e(null))},e.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},e}(l);e.exports=m},{"../data/extent":48,"../data/raster_bounds_array":54,"../geo/lng_lat":58,"../gl/vertex_buffer":62,"../render/vertex_array_object":84,"../util/ajax":201,"../util/browser":202,"../util/evented":210,"../util/util":223,"../util/window":204,"./tile_coord":101,"@mapbox/point-geometry":2}],92:[function(t,e,r){"use strict";var n=t("../util/util"),i=t("../util/ajax"),o=t("../util/browser"),a=t("../util/mapbox").normalizeSourceURL;e.exports=function(t,e,r){var s=function(t,e){if(t)return r(t);if(e){var i=n.pick(e,["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds"]);e.vector_layers&&(i.vectorLayers=e.vector_layers,i.vectorLayerIds=i.vectorLayers.map(function(t){return t.id})),r(null,i)}};t.url?i.getJSON(e(a(t.url),i.ResourceType.Source),s):o.frame(function(){return s(null,t)})}},{"../util/ajax":201,"../util/browser":202,"../util/mapbox":217,"../util/util":223}],93:[function(t,e,r){"use strict";var n=t("../data/extent");e.exports=function(t,e,r){return e*(n/(t.tileSize*Math.pow(2,r-t.coord.z)))}},{"../data/extent":48}],94:[function(t,e,r){"use strict";function n(t,e){var r=t.coord,n=e.coord;return r.z-n.z||r.y-n.y||r.w-n.w||r.x-n.x}function i(t){for(var e={},r={},n=0,i=t;n<i.length;n+=1){var o=i[n],a=o.queryResults,s=o.wrappedTileID,l=r[s]=r[s]||{};for(var u in a)for(var c=a[u],p=l[u]=l[u]||{},h=e[u]=e[u]||[],f=0,d=c;f<d.length;f+=1){var m=d[f];p[m.featureIndex]||(p[m.featureIndex]=!0,h.push(m.feature))}}return e}var o=t("./tile_coord");r.rendered=function(t,e,r,o,a,s){var l=t.tilesIn(r);l.sort(n);for(var u=[],c=0,p=l;c<p.length;c+=1){var h=p[c];u.push({wrappedTileID:h.coord.wrapped().id,queryResults:h.tile.queryRenderedFeatures(e,h.queryGeometry,h.scale,o,s)})}return i(u)},r.source=function(t,e){for(var r=t.getRenderableIds().map(function(e){return t.getTileByID(e)}),n=[],i={},a=0;a<r.length;a++){var s=r[a],l=new o(Math.min(s.sourceMaxZoom,s.coord.z),s.coord.x,s.coord.y,0).id;i[l]||(i[l]=!0,s.querySourceFeatures(n,e))}return n}},{"./tile_coord":101}],95:[function(t,e,r){"use strict";var n=t("../util/util"),i=t("../util/ajax"),o=t("../util/evented"),a=t("./load_tilejson"),s=t("../util/mapbox").normalizeTileURL,l=t("./tile_bounds"),u=function(t){function e(e,r,i,o){t.call(this),this.id=e,this.dispatcher=i,this.setEventedParent(o),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=n.extend({},r),n.extend(this,n.pick(r,["url","scheme","tileSize"]))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this;this.fire("dataloading",{dataType:"source"}),a(this._options,this.map._transformRequest,function(e,r){e?t.fire("error",e):r&&(n.extend(t,r),r.bounds&&(t.tileBounds=new l(r.bounds,t.minzoom,t.maxzoom)),t.fire("data",{dataType:"source",sourceDataType:"metadata"}),t.fire("data",{dataType:"source",sourceDataType:"content"}))})},e.prototype.onAdd=function(t){this.map=t,this.load()},e.prototype.serialize=function(){return n.extend({},this._options)},e.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t,this.maxzoom)},e.prototype.loadTile=function(t,e){var r=this,n=s(t.coord.url(this.tiles,null,this.scheme),this.url,this.tileSize);t.request=i.getImage(this.map._transformRequest(n,i.ResourceType.Tile),function(n,i){if(delete t.request,t.aborted)r.state="unloaded",e(null);else if(n)r.state="errored",e(n);else if(i){r.map._refreshExpiredTiles&&t.setExpiryData(i),delete i.cacheControl,delete i.expires;var o=r.map.painter.gl;t.texture=r.map.painter.getTileTexture(i.width),t.texture?(o.bindTexture(o.TEXTURE_2D,t.texture),o.texSubImage2D(o.TEXTURE_2D,0,0,0,o.RGBA,o.UNSIGNED_BYTE,i)):(t.texture=o.createTexture(),o.bindTexture(o.TEXTURE_2D,t.texture),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR_MIPMAP_NEAREST),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),r.map.painter.extTextureFilterAnisotropic&&o.texParameterf(o.TEXTURE_2D,r.map.painter.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,r.map.painter.extTextureFilterAnisotropicMax),o.texImage2D(o.TEXTURE_2D,0,o.RGBA,o.RGBA,o.UNSIGNED_BYTE,i),t.texture.size=i.width),o.generateMipmap(o.TEXTURE_2D),t.state="loaded",e(null)}})},e.prototype.abortTile=function(t){t.request&&(t.request.abort(),delete t.request)},e.prototype.unloadTile=function(t){t.texture&&this.map.painter.saveTileTexture(t.texture)},e}(o);e.exports=u},{"../util/ajax":201,"../util/evented":210,"../util/mapbox":217,"../util/util":223,"./load_tilejson":92,"./tile_bounds":100}],96:[function(t,e,r){"use strict";var n=t("../util/ajax"),i=t("../util/evented"),o=t("../util/window"),a=!1,s=null;e.exports.evented=new i,e.exports.registerForPluginAvailability=function(t){return s?t({pluginBlobURL:s,errorCallback:e.exports.errorCallback}):e.exports.evented.once("pluginAvailable",t),t},e.exports.createBlobURL=function(t){return o.URL.createObjectURL(new o.Blob([t.data],{type:"text/javascript"}))},e.exports.clearRTLTextPlugin=function(){a=!1,s=null},e.exports.setRTLTextPlugin=function(t,r){if(a)throw new Error("setRTLTextPlugin cannot be called multiple times.");a=!0,e.exports.errorCallback=r,n.getArrayBuffer({url:t},function(t,n){t?r(t):n&&(s=e.exports.createBlobURL(n),e.exports.evented.fire("pluginAvailable",{pluginBlobURL:s,errorCallback:r}))})},e.exports.applyArabicShaping=null,e.exports.processBidirectionalText=null},{"../util/ajax":201,"../util/evented":210,"../util/window":204}],97:[function(t,e,r){"use strict";var n=t("../util/util"),i={vector:t("../source/vector_tile_source"),raster:t("../source/raster_tile_source"),geojson:t("../source/geojson_source"),video:t("../source/video_source"),image:t("../source/image_source"),canvas:t("../source/canvas_source")};r.create=function(t,e,r,o){var a=new i[e.type](t,e,r,o);if(a.id!==t)throw new Error("Expected Source id to be "+t+" instead of "+a.id);return n.bindAll(["load","abort","unload","serialize","prepare"],a),a},r.getType=function(t){return i[t]},r.setType=function(t,e){i[t]=e}},{"../source/canvas_source":87,"../source/geojson_source":88,"../source/image_source":91,"../source/raster_tile_source":95,"../source/vector_tile_source":102,"../source/video_source":104,"../util/util":223}],98:[function(t,e,r){"use strict";function n(t,e,r){var n=r.zoomTo(Math.min(t.z,e));return new d((n.column-(t.x+t.w*Math.pow(2,t.z)))*f,(n.row-t.y)*f)}function i(t,e){return t%32-e%32}function o(t){return"raster"===t||"image"===t||"video"===t}var a=t("./source").create,s=t("./tile"),l=t("../util/evented"),u=t("./tile_coord"),c=t("../util/lru_cache"),p=t("../geo/coordinate"),h=t("../util/util"),f=t("../data/extent"),d=t("@mapbox/point-geometry"),m=function(t){function e(e,r,n){var i=this;t.call(this),this.id=e,this.dispatcher=n,this.on("data",function(t){"source"===t.dataType&&"metadata"===t.sourceDataType&&(i._sourceLoaded=!0),i._sourceLoaded&&!i._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(i.reload(),i.transform&&i.update(i.transform))}),this.on("error",function(){i._sourceErrored=!0}),this._source=a(e,r,n,this),this._tiles={},this._cache=new c(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._isIdRenderable=this._isIdRenderable.bind(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t)},e.prototype.onRemove=function(t){this._source&&this._source.onRemove&&this._source.onRemove(t)},e.prototype.loaded=function(){var t=this;if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;for(var e in t._tiles){var r=t._tiles[e];if("loaded"!==r.state&&"errored"!==r.state)return!1}return!0},e.prototype.getSource=function(){return this._source},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){if(this._paused){var t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform)}},e.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},e.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t)},e.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t)},e.prototype.serialize=function(){return this._source.serialize()},e.prototype.prepare=function(t){var e=this;this._source.prepare&&this._source.prepare();for(var r in e._tiles)e._tiles[r].upload(t)},e.prototype.getIds=function(){return Object.keys(this._tiles).map(Number).sort(i)},e.prototype.getRenderableIds=function(){return this.getIds().filter(this._isIdRenderable)},e.prototype._isIdRenderable=function(t){return this._tiles[t].hasData()&&!this._coveredTiles[t]},e.prototype.reload=function(){var t=this;if(this._paused)return void(this._shouldReloadOnResume=!0);this._cache.reset();for(var e in t._tiles)t._reloadTile(e,"reloading")},e.prototype._reloadTile=function(t,e){var r=this._tiles[t];r&&("loading"!==r.state&&(r.state=e),this._loadTile(r,this._tileLoaded.bind(this,r,t,e)))},e.prototype._tileLoaded=function(t,e,r,n){if(n)return t.state="errored",void(404!==n.status?this._source.fire("error",{tile:t,error:n}):this.update(this.transform));t.timeAdded=(new Date).getTime(),"expired"===r&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(e,t),this._source.fire("data",{dataType:"source",tile:t,coord:t.coord}),this.map&&(this.map.painter.tileExtentVAO.vao=null)},e.prototype.getTile=function(t){return this.getTileByID(t.id)},e.prototype.getTileByID=function(t){return this._tiles[t]},e.prototype.getZoom=function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)},e.prototype._findLoadedChildren=function(t,e,r){var n=this,i=!1;for(var o in n._tiles){var a=n._tiles[o];if(!(r[o]||!a.hasData()||a.coord.z<=t.z||a.coord.z>e)){var s=Math.pow(2,Math.min(a.coord.z,n._source.maxzoom)-Math.min(t.z,n._source.maxzoom));if(Math.floor(a.coord.x/s)===t.x&&Math.floor(a.coord.y/s)===t.y)for(r[o]=!0,i=!0;a&&a.coord.z-1>t.z;){var l=a.coord.parent(n._source.maxzoom);if(!l)break;(a=n._tiles[l.id])&&a.hasData()&&(delete r[o],r[l.id]=!0)}}}return i},e.prototype.findLoadedParent=function(t,e,r){for(var n=this,i=t.z-1;i>=e;i--){var o=t.parent(n._source.maxzoom);if(!o)return;t=o;var a=String(t.id),s=n._tiles[a];if(s&&s.hasData())return r[a]=!0,s;if(n._cache.has(a))return r[a]=!0,n._cache.getWithoutRemoving(a)}},e.prototype.updateCacheSize=function(t){var e=Math.ceil(t.width/t.tileSize)+1,r=Math.ceil(t.height/t.tileSize)+1,n=e*r,i=Math.floor(5*n),o="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,i):i;this._cache.setMaxSize(o)},e.prototype.update=function(t){var r=this;if(this.transform=t,this._sourceLoaded&&!this._paused){this.updateCacheSize(t),this._coveredTiles={};var n;this.used?this._source.coord?n=t.getVisibleWrappedCoordinates(this._source.coord):(n=t.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(n=n.filter(function(t){return r._source.hasTile(t)}))):n=[];var i=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(t)),a=Math.max(i-e.maxOverzooming,this._source.minzoom),s=Math.max(i+e.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(n,i),c={};if(o(this._source.type))for(var p=Object.keys(l),f=0;f<p.length;f++){var d=p[f],m=u.fromID(+d),v=r._tiles[d];if(v&&(void 0===v.fadeEndTime||v.fadeEndTime>=Date.now())){r._findLoadedChildren(m,s,l)&&(l[d]=!0);var y=r.findLoadedParent(m,a,c);y&&r._addTile(y.coord)}}var g;for(g in c)l[g]||(r._coveredTiles[g]=!0);for(g in c)l[g]=!0;for(var _=h.keysDifference(this._tiles,l),x=0;x<_.length;x++)r._removeTile(_[x])}},e.prototype._updateRetainedTiles=function(t,r){var n,i,o,a,s=this,l={},u={},c=Math.max(r-e.maxOverzooming,this._source.minzoom);for(n=0;n<t.length;n++){i=t[n],o=s._addTile(i);var p=!1;if(o.hasData())l[i.id]=!0;else{if(p=o.wasRequested(),l[i.id]=!0,a=!0,r+1>s._source.maxzoom){var h=i.children(s._source.maxzoom)[0],f=s.getTile(h);f&&f.hasData()?l[h.id]=!0:a=!1}else for(var d=i.children(s._source.maxzoom),m=0;m<d.length;m++){var v=d[m],y=v?s.getTile(v):null;y&&y.hasData()?l[v.id]=!0:a=!1}if(!a)for(var g=r-1;g>=c;--g){var _=i.scaledTo(g,s._source.maxzoom);if(u[_.id])break;if(u[_.id]=!0,o=s.getTile(_),!o&&p&&(o=s._addTile(_)),o&&(l[_.id]=!0,p=o.wasRequested(),o.hasData()))break}}}return l},e.prototype._addTile=function(t){var e=this._tiles[t.id];if(e)return e;(e=this._cache.get(t.id))&&(e.redoPlacement(this._source),this._cacheTimers[t.id]&&(clearTimeout(this._cacheTimers[t.id]),delete this._cacheTimers[t.id],this._setTileReloadTimer(t.id,e)));var r=Boolean(e);if(!r){var n=t.z,i=n>this._source.maxzoom?Math.pow(2,n-this._source.maxzoom):1;e=new s(t,this._source.tileSize*i,this._source.maxzoom),this._loadTile(e,this._tileLoaded.bind(this,e,t.id,e.state))}return e?(e.uses++,this._tiles[t.id]=e,r||this._source.fire("dataloading",{tile:e,coord:e.coord,dataType:"source"}),e):null},e.prototype._setTileReloadTimer=function(t,e){var r=this,n=e.getExpiryTimeout();n&&(this._timers[t]=setTimeout(function(){r._reloadTile(t,"expired"),delete r._timers[t]},n))},e.prototype._setCacheInvalidationTimer=function(t,e){var r=this,n=e.getExpiryTimeout();n&&(this._cacheTimers[t]=setTimeout(function(){r._cache.remove(t),delete r._cacheTimers[t]},n))},e.prototype._removeTile=function(t){var e=this._tiles[t];if(e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),!(e.uses>0)))if(e.stopPlacementThrottler(),e.hasData()){var r=e.coord.wrapped().id;this._cache.add(r,e),this._setCacheInvalidationTimer(r,e)}else e.aborted=!0,this._abortTile(e),this._unloadTile(e)},e.prototype.clearTiles=function(){var t=this;this._shouldReloadOnResume=!1,this._paused=!1;for(var e in t._tiles)t._removeTile(e);this._cache.reset()},e.prototype.tilesIn=function(t){for(var e=this,r=[],i=this.getIds(),o=1/0,a=1/0,s=-1/0,l=-1/0,c=t[0].zoom,h=0;h<t.length;h++){var d=t[h];o=Math.min(o,d.column),a=Math.min(a,d.row),s=Math.max(s,d.column),l=Math.max(l,d.row)}for(var m=0;m<i.length;m++){var v=e._tiles[i[m]],y=u.fromID(i[m]),g=[n(y,v.sourceMaxZoom,new p(o,a,c)),n(y,v.sourceMaxZoom,new p(s,l,c))];if(g[0].x<f&&g[0].y<f&&g[1].x>=0&&g[1].y>=0){for(var _=[],x=0;x<t.length;x++)_.push(n(y,v.sourceMaxZoom,t[x]));r.push({tile:v,coord:y,queryGeometry:[_],scale:Math.pow(2,e.transform.zoom-v.coord.z)})}}return r},e.prototype.redoPlacement=function(){for(var t=this,e=this.getIds(),r=0;r<e.length;r++)t.getTileByID(e[r]).redoPlacement(t._source)},e.prototype.getVisibleCoordinates=function(){for(var t=this,e=this.getRenderableIds().map(u.fromID),r=0,n=e;r<n.length;r+=1){var i=n[r];i.posMatrix=t.transform.calculatePosMatrix(i,t._source.maxzoom)}return e},e}(l);m.maxOverzooming=10,m.maxUnderzooming=3,e.exports=m},{"../data/extent":48,"../geo/coordinate":57,"../util/evented":210,"../util/lru_cache":216,"../util/util":223,"./source":97,"./tile":99,"./tile_coord":101,"@mapbox/point-geometry":2}],99:[function(t,e,r){"use strict";var n=t("../util/util"),i=t("../data/bucket").deserialize,o=t("../data/bucket/symbol_bucket"),a=t("../data/feature_index"),s=t("@mapbox/vector-tile"),l=t("pbf"),u=t("../util/vectortile_to_geojson"),c=t("../style-spec/feature_filter"),p=t("../symbol/collision_tile"),h=t("../symbol/collision_box"),f=t("../util/throttler"),d=t("../render/texture"),m=function(t,e,r){this.coord=t,this.uid=n.uniqueId(),this.uses=0,this.tileSize=e,this.sourceMaxZoom=r,this.buckets={},this.expirationTime=null,this.expiredRequestCount=0,this.state="loading",this.placementThrottler=new f(300,this._immediateRedoPlacement.bind(this))};m.prototype.registerFadeDuration=function(t,e){var r=e+this.timeAdded;r<Date.now()||this.fadeEndTime&&r<this.fadeEndTime||(this.fadeEndTime=r,t.set(this.fadeEndTime-Date.now()))},m.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},m.prototype.loadVectorData=function(t,e){this.hasData()&&this.unloadVectorData(),this.state="loaded",t&&(t.rawTileData&&(this.rawTileData=t.rawTileData),this.collisionBoxArray=new h(t.collisionBoxArray),this.collisionTile=p.deserialize(t.collisionTile,this.collisionBoxArray),this.featureIndex=a.deserialize(t.featureIndex,this.rawTileData,this.collisionTile),this.buckets=i(t.buckets,e.style),t.iconAtlasImage&&(this.iconAtlasImage=t.iconAtlasImage),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage))},m.prototype.reloadSymbolData=function(t,e){var r=this;if("unloaded"!==this.state){this.collisionTile=p.deserialize(t.collisionTile,this.collisionBoxArray),this.featureIndex&&this.featureIndex.setCollisionTile(this.collisionTile);for(var a in r.buckets){var s=r.buckets[a];s instanceof o&&(s.destroy(),delete r.buckets[a])}n.extend(this.buckets,i(t.buckets,e)),t.iconAtlasImage&&(this.iconAtlasImage=t.iconAtlasImage),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}},m.prototype.unloadVectorData=function(){var t=this;for(var e in t.buckets)t.buckets[e].destroy();this.buckets={},this.iconAtlasTexture&&this.iconAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.collisionBoxArray=null,this.collisionTile=null,this.featureIndex=null,this.state="unloaded"},m.prototype.redoPlacement=function(t){if("vector"===t.type||"geojson"===t.type){if("loaded"!==this.state)return void(this.redoWhenDone=!0);if(this.collisionTile){var e=t.map.transform.cameraToTileDistance(this);if(this.angle===t.map.transform.angle&&this.pitch===t.map.transform.pitch&&this.showCollisionBoxes===t.map.showCollisionBoxes){if(this.cameraToTileDistance===e&&this.cameraToCenterDistance===t.map.transform.cameraToCenterDistance)return;if(this.pitch<25)return this.cameraToTileDistance=e,void(this.cameraToCenterDistance=t.map.transform.cameraToCenterDistance)}this.angle=t.map.transform.angle,this.pitch=t.map.transform.pitch,this.cameraToCenterDistance=t.map.transform.cameraToCenterDistance,this.cameraToTileDistance=e,this.showCollisionBoxes=t.map.showCollisionBoxes,this.placementSource=t,this.state="reloading",this.placementThrottler.invoke()}}},m.prototype._immediateRedoPlacement=function(){var t=this;this.placementSource.dispatcher.send("redoPlacement",{type:this.placementSource.type,uid:this.uid,source:this.placementSource.id,angle:this.angle,pitch:this.pitch,cameraToCenterDistance:this.cameraToCenterDistance,cameraToTileDistance:this.cameraToTileDistance,showCollisionBoxes:this.showCollisionBoxes},function(e,r){"reloading"===t.state&&(t.state="loaded",t.reloadSymbolData(r,t.placementSource.map.style),t.placementSource.fire("data",{tile:t,coord:t.coord,dataType:"source"}),t.placementSource.map&&(t.placementSource.map.painter.tileExtentVAO.vao=null),t.redoWhenDone&&(t.state="reloading",t.redoWhenDone=!1,t._immediateRedoPlacement()))},this.workerID)},m.prototype.getBucket=function(t){return this.buckets[t.id]},m.prototype.upload=function(t){var e=this;for(var r in e.buckets){var n=e.buckets[r];n.uploaded||(n.upload(t),n.uploaded=!0)}this.iconAtlasImage&&(this.iconAtlasTexture=new d(t,this.iconAtlasImage,t.RGBA),this.iconAtlasImage=null),this.glyphAtlasImage&&(this.glyphAtlasTexture=new d(t,this.glyphAtlasImage,t.ALPHA),this.glyphAtlasImage=null)},m.prototype.queryRenderedFeatures=function(t,e,r,n,i){var o=this;if(!this.featureIndex)return{};var a=0;for(var s in t){var l=o.getBucket(t[s]);l&&(a=Math.max(a,t[s].queryRadius(l)))}return this.featureIndex.query({queryGeometry:e,bearing:i,params:n,scale:r,additionalRadius:a,tileSize:this.tileSize},t)},m.prototype.querySourceFeatures=function(t,e){var r=this;if(this.rawTileData){this.vtLayers||(this.vtLayers=new s.VectorTile(new l(this.rawTileData)).layers);var n=e?e.sourceLayer:"",i=this.vtLayers._geojsonTileLayer||this.vtLayers[n];if(i)for(var o=c(e&&e.filter),a={z:this.coord.z,x:this.coord.x,y:this.coord.y},p=0;p<i.length;p++){var h=i.feature(p);if(o(h)){var f=new u(h,r.coord.z,r.coord.x,r.coord.y);f.tile=a,t.push(f)}}}},m.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},m.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var r=n.parseCacheControl(t.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+1e3*r["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){var i=Date.now(),o=!1;if(this.expirationTime>i)o=!1;else if(e)if(this.expirationTime<e)o=!0;else{var a=this.expirationTime-e;a?this.expirationTime=i+Math.max(a,3e4):o=!0}else o=!0;o?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},m.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)},m.prototype.stopPlacementThrottler=function(){this.placementThrottler.stop(),"reloading"===this.state&&(this.state="loaded")},e.exports=m},{"../data/bucket":42,"../data/bucket/symbol_bucket":47,"../data/feature_index":49,"../render/texture":83,"../style-spec/feature_filter":110,"../symbol/collision_box":170,"../symbol/collision_tile":172,"../util/throttler":221,"../util/util":223,"../util/vectortile_to_geojson":224,"@mapbox/vector-tile":6,pbf:29}],100:[function(t,e,r){"use strict";var n=t("../geo/lng_lat_bounds"),i=t("../util/util").clamp,o=function(t,e,r){this.bounds=n.convert(this.validateBounds(t)),this.minzoom=e||0,this.maxzoom=r||24};o.prototype.validateBounds=function(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]},o.prototype.contains=function(t,e){var r=e?Math.min(t.z,e):t.z,n={minX:Math.floor(this.lngX(this.bounds.getWest(),r)),minY:Math.floor(this.latY(this.bounds.getNorth(),r)),maxX:Math.ceil(this.lngX(this.bounds.getEast(),r)),maxY:Math.ceil(this.latY(this.bounds.getSouth(),r))};return t.x>=n.minX&&t.x<n.maxX&&t.y>=n.minY&&t.y<n.maxY},o.prototype.lngX=function(t,e){return(t+180)*(Math.pow(2,e)/360)},o.prototype.latY=function(t,e){var r=i(Math.sin(Math.PI/180*t),-.9999,.9999),n=Math.pow(2,e)/(2*Math.PI);return Math.pow(2,e-1)+.5*Math.log((1+r)/(1-r))*-n},e.exports=o},{"../geo/lng_lat_bounds":59,"../util/util":223}],101:[function(t,e,r){"use strict";function n(t,e){if(t.row>e.row){var r=t;t=e,e=r}return{x0:t.column,y0:t.row,x1:e.column,y1:e.row,dx:e.column-t.column,dy:e.row-t.row}}function i(t,e,r,n,i){var o=Math.max(r,Math.floor(e.y0)),a=Math.min(n,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx<e.x1:t.x1-e.dy/t.dy*t.dx<e.x0){var s=t;t=e,e=s}for(var l=t.dx/t.dy,u=e.dx/e.dy,c=t.dx>0,p=e.dx<0,h=o;h<a;h++){var f=l*Math.max(0,Math.min(t.dy,h+c-t.y0))+t.x0,d=u*Math.max(0,Math.min(e.dy,h+p-e.y0))+e.x0;i(Math.floor(d),Math.ceil(f),h)}}function o(t,e,r,o,a,s){var l,u=n(t,e),c=n(e,r),p=n(r,t);u.dy>c.dy&&(l=u,u=c,c=l),u.dy>p.dy&&(l=u,u=p,p=l),c.dy>p.dy&&(l=c,c=p,p=l),u.dy&&i(p,u,o,a,s),c.dy&&i(p,c,o,a,s)}function a(t,e,r){for(var n,i="",o=t;o>0;o--)n=1<<o-1,i+=(e&n?1:0)+(r&n?2:0);return i}var s=t("@mapbox/whoots-js"),l=t("../geo/coordinate"),u=function(t,e,r,n){(void 0===n||isNaN(n))&&(n=0),this.z=+t,this.x=+e,this.y=+r,this.w=+n,(n*=2)<0&&(n=-1*n-1);var i=1<<this.z;this.id=32*(i*i*n+i*this.y+this.x)+this.z,this.posMatrix=null};u.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y},u.prototype.toCoordinate=function(t){var e=Math.min(this.z,void 0===t?this.z:t),r=Math.pow(2,e),n=this.y,i=this.x+r*this.w;return new l(i,n,e)},u.prototype.url=function(t,e,r){var n=s.getTileBBox(this.x,this.y,this.z),i=a(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(Math.min(this.z,e||this.z))).replace("{x}",String(this.x)).replace("{y}",String("tms"===r?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",i).replace("{bbox-epsg-3857}",n)},u.prototype.parent=function(t){return 0===this.z?null:this.z>t?new u(this.z-1,this.x,this.y,this.w):new u(this.z-1,Math.floor(this.x/2),Math.floor(this.y/2),this.w)},u.prototype.wrapped=function(){return new u(this.z,this.x,this.y,0)},u.prototype.children=function(t){if(this.z>=t)return[new u(this.z+1,this.x,this.y,this.w)];var e=this.z+1,r=2*this.x,n=2*this.y;return[new u(e,r,n,this.w),new u(e,r+1,n,this.w),new u(e,r,n+1,this.w),new u(e,r+1,n+1,this.w)]},u.prototype.scaledTo=function(t,e){return this.z>e?new u(t,this.x,this.y,this.w):t<=this.z?new u(t,this.x>>this.z-t,this.y>>this.z-t,this.w):new u(t,this.x<<t-this.z,this.y<<t-this.z,this.w)},u.cover=function(t,e,r,n){function i(t,e,i){var o,l,c,p;if(i>=0&&i<=a)for(o=t;o<e;o++)l=Math.floor(o/a),c=(o%a+a)%a,0!==l&&!0!==n||(p=new u(r,c,i,l),s[p.id]=p)}void 0===n&&(n=!0);var a=1<<t,s={};return o(e[0],e[1],e[2],0,a,i),o(e[2],e[3],e[0],0,a,i),Object.keys(s).map(function(t){return s[t]})},u.fromID=function(t){var e=t%32,r=1<<e,n=(t-e)/32,i=n%r,o=(n-i)/r%r,a=Math.floor(n/(r*r));return a%2!=0&&(a=-1*a-1),a/=2,new u(e,i,o,a)},e.exports=u},{"../geo/coordinate":57,"@mapbox/whoots-js":10}],102:[function(t,e,r){"use strict";var n=t("../util/evented"),i=t("../util/util"),o=t("./load_tilejson"),a=t("../util/mapbox").normalizeTileURL,s=t("./tile_bounds"),l=t("../util/ajax").ResourceType,u=t("../util/browser"),c=function(t){function e(e,r,n,o){if(t.call(this),this.id=e,this.dispatcher=n,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,i.extend(this,i.pick(r,["url","scheme","tileSize"])),this._options=i.extend({type:"vector"},r),512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this;this.fire("dataloading",{dataType:"source"}),o(this._options,this.map._transformRequest,function(e,r){e?t.fire("error",e):r&&(i.extend(t,r),r.bounds&&(t.tileBounds=new s(r.bounds,t.minzoom,t.maxzoom)),t.fire("data",{dataType:"source",sourceDataType:"metadata"}),t.fire("data",{dataType:"source",sourceDataType:"content"}))})},e.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t,this.maxzoom)},e.prototype.onAdd=function(t){this.map=t,this.load()},e.prototype.serialize=function(){return i.extend({},this._options)},e.prototype.loadTile=function(t,e){function r(r,n){if(!t.aborted){if(r)return e(r);this.map._refreshExpiredTiles&&t.setExpiryData(n),t.loadVectorData(n,this.map.painter),t.redoWhenDone&&(t.redoWhenDone=!1,t.redoPlacement(this)),e(null),t.reloadCallback&&(this.loadTile(t,t.reloadCallback),t.reloadCallback=null)}}var n=t.coord.z>this.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,i=a(t.coord.url(this.tiles,this.maxzoom,this.scheme),this.url),o={request:this.map._transformRequest(i,l.Tile),uid:t.uid,coord:t.coord,zoom:t.coord.z,tileSize:this.tileSize*n,type:this.type,source:this.id,pixelRatio:u.devicePixelRatio,overscaling:n,angle:this.map.transform.angle,pitch:this.map.transform.pitch,cameraToCenterDistance:this.map.transform.cameraToCenterDistance,cameraToTileDistance:this.map.transform.cameraToTileDistance(t),showCollisionBoxes:this.map.showCollisionBoxes};t.workerID&&"expired"!==t.state?"loading"===t.state?t.reloadCallback=e:this.dispatcher.send("reloadTile",o,r.bind(this),t.workerID):t.workerID=this.dispatcher.send("loadTile",o,r.bind(this))},e.prototype.abortTile=function(t){this.dispatcher.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},e.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},e}(n);e.exports=c},{"../util/ajax":201,"../util/browser":202,"../util/evented":210,"../util/mapbox":217,"../util/util":223,"./load_tilejson":92,"./tile_bounds":100}],103:[function(t,e,r){"use strict";function n(t,e){var r=i.getArrayBuffer(t.request,function(t,r){t?e(t):r&&e(null,{vectorTile:new o.VectorTile(new a(r.data)),rawData:r.data,cacheControl:r.cacheControl,expires:r.expires})});return function(){r.abort()}}var i=t("../util/ajax"),o=t("@mapbox/vector-tile"),a=t("pbf"),s=t("./worker_tile"),l=t("../util/util"),u=function(t,e,r){this.actor=t,this.layerIndex=e,this.loadVectorData=r||n,this.loading={},this.loaded={}};u.prototype.loadTile=function(t,e){var r=this,n=t.source,i=t.uid;this.loading[n]||(this.loading[n]={});var o=this.loading[n][i]=new s(t);o.abort=this.loadVectorData(t,function(t,a){if(delete r.loading[n][i],t||!a)return e(t);var s=a.rawData,u={};a.expires&&(u.expires=a.expires),a.cacheControl&&(u.cacheControl=a.cacheControl),o.vectorTile=a.vectorTile,o.parse(a.vectorTile,r.layerIndex,r.actor,function(t,r,n){if(t||!r)return e(t);e(null,l.extend({rawTileData:s},r,u),n)}),r.loaded[n]=r.loaded[n]||{},r.loaded[n][i]=o})},u.prototype.reloadTile=function(t,e){function r(t,r){if(this.reloadCallback){var n=this.reloadCallback;delete this.reloadCallback,this.parse(this.vectorTile,o.layerIndex,o.actor,n)}e(t,r)}var n=this.loaded[t.source],i=t.uid,o=this;if(n&&n[i]){var a=n[i];"parsing"===a.status?a.reloadCallback=e:"done"===a.status&&a.parse(a.vectorTile,this.layerIndex,this.actor,r.bind(a))}},u.prototype.abortTile=function(t){var e=this.loading[t.source],r=t.uid;e&&e[r]&&e[r].abort&&(e[r].abort(),delete e[r])},u.prototype.removeTile=function(t){var e=this.loaded[t.source],r=t.uid;e&&e[r]&&delete e[r]},u.prototype.redoPlacement=function(t,e){var r=this.loaded[t.source],n=this.loading[t.source],i=t.uid;if(r&&r[i]){var o=r[i],a=o.redoPlacement(t.angle,t.pitch,t.cameraToCenterDistance,t.cameraToTileDistance,t.showCollisionBoxes);a.result&&e(null,a.result,a.transferables)}else n&&n[i]&&(n[i].angle=t.angle)},e.exports=u},{"../util/ajax":201,"../util/util":223,"./worker_tile":106,"@mapbox/vector-tile":6,pbf:29}],104:[function(t,e,r){"use strict";var n=t("../util/ajax"),i=t("./image_source"),o=function(t){function e(e,r,n,i){t.call(this,e,r,n,i),this.roundZoom=!0,this.type="video",this.options=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this,e=this.options;this.urls=e.urls,n.getVideo(e.urls,function(e,r){if(e)t.fire("error",{error:e});else if(r){t.video=r,t.video.loop=!0;var n;t.video.addEventListener("playing",function(){n=t.map.style.animationLoop.set(1/0),t.map._rerender()}),t.video.addEventListener("pause",function(){t.map.style.animationLoop.cancel(n)}),t.map&&t.video.play(),t._finishLoading()}})},e.prototype.getVideo=function(){return this.video},e.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},e.prototype.prepare=function(){0===Object.keys(this.tiles).length||this.video.readyState<2||this._prepareImage(this.map.painter.gl,this.video)},e.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},e}(i);e.exports=o},{"../util/ajax":201,"./image_source":91}],105:[function(t,e,r){"use strict";var n=t("../util/actor"),i=t("../style/style_layer_index"),o=t("./vector_tile_worker_source"),a=t("./geojson_worker_source"),s=t("./rtl_text_plugin"),l=function(t){var e=this;this.self=t,this.actor=new n(t,this),this.layerIndexes={},this.workerSourceTypes={vector:o,geojson:a},this.workerSources={},this.self.registerWorkerSource=function(t,r){if(e.workerSourceTypes[t])throw new Error('Worker source with name "'+t+'" already registered.');e.workerSourceTypes[t]=r},this.self.registerRTLTextPlugin=function(t){if(s.applyArabicShaping||s.processBidirectionalText)throw new Error("RTL text plugin already registered.");s.applyArabicShaping=t.applyArabicShaping,s.processBidirectionalText=t.processBidirectionalText}};l.prototype.setLayers=function(t,e){this.getLayerIndex(t).replace(e)},l.prototype.updateLayers=function(t,e){this.getLayerIndex(t).update(e.layers,e.removedIds,e.symbolOrder)},l.prototype.loadTile=function(t,e,r){this.getWorkerSource(t,e.type).loadTile(e,r)},l.prototype.reloadTile=function(t,e,r){this.getWorkerSource(t,e.type).reloadTile(e,r)},l.prototype.abortTile=function(t,e){this.getWorkerSource(t,e.type).abortTile(e)},l.prototype.removeTile=function(t,e){this.getWorkerSource(t,e.type).removeTile(e)},l.prototype.removeSource=function(t,e){var r=this.getWorkerSource(t,e.type);void 0!==r.removeSource&&r.removeSource(e)},l.prototype.redoPlacement=function(t,e,r){this.getWorkerSource(t,e.type).redoPlacement(e,r)},l.prototype.loadWorkerSource=function(t,e,r){try{this.self.importScripts(e.url),r()}catch(t){r(t)}},l.prototype.loadRTLTextPlugin=function(t,e,r){try{s.applyArabicShaping||s.processBidirectionalText||(this.self.importScripts(e),s.applyArabicShaping&&s.processBidirectionalText||r(new Error("RTL Text Plugin failed to import scripts from "+e)))}catch(t){r(t)}},l.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new i),e},l.prototype.getWorkerSource=function(t,e){var r=this;if(this.workerSources[t]||(this.workerSources[t]={}),!this.workerSources[t][e]){var n={send:function(e,n,i,o){r.actor.send(e,n,i,o,t)}};this.workerSources[t][e]=new this.workerSourceTypes[e](n,this.getLayerIndex(t))}return this.workerSources[t][e]},e.exports=function(t){return new l(t)}},{"../style/style_layer_index":164,"../util/actor":200,"./geojson_worker_source":89,"./rtl_text_plugin":96,"./vector_tile_worker_source":103}],106:[function(t,e,r){"use strict";function n(t,e){for(var r=0,n=t.layers;r<n.length;r+=1)n[r].recalculate(e)}function i(t,e){return t.filter(function(t){return!t.isEmpty()}).map(function(t){return t.serialize(e)})}var o=t("../data/feature_index"),a=t("../symbol/collision_tile"),s=t("../symbol/collision_box"),l=t("../util/dictionary_coder"),u=(t("../data/bucket/symbol_bucket"),t("../util/util")),c=t("../render/image_atlas"),p=c.makeImageAtlas,h=t("../render/glyph_atlas"),f=h.makeGlyphAtlas,d=function(t){this.coord=t.coord,this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=t.overscaling,this.angle=t.angle,this.pitch=t.pitch,this.cameraToCenterDistance=t.cameraToCenterDistance,this.cameraToTileDistance=t.cameraToTileDistance,this.showCollisionBoxes=t.showCollisionBoxes};d.prototype.parse=function(t,e,r,c){function h(){var t=this;if(R)return c(R);if(D&&O){for(var e=new a(this.angle,this.pitch,this.cameraToCenterDistance,this.cameraToTileDistance,this.collisionBoxArray),r=f(D),o=p(O),s=0,l=t.symbolBuckets;s<l.length;s+=1){var h=l[s];n(h,t.zoom),h.prepare(D,r.positions,O,o.positions),h.place(e,t.showCollisionBoxes)}this.status="done";var d=[r.image.data.buffer,o.image.data.buffer];c(null,{buckets:i(u.values(y),d),featureIndex:v.serialize(d),collisionTile:e.serialize(d),collisionBoxArray:this.collisionBoxArray.serialize(),glyphAtlasImage:r.image,iconAtlasImage:o.image},d)}}var d=this;this.status="parsing",this.data=t,this.collisionBoxArray=new s;var m=new l(Object.keys(t.layers).sort()),v=new o(this.coord,this.overscaling);v.bucketLayerIDs=[];var y={},g={featureIndex:v,iconDependencies:{},glyphDependencies:{}},_=e.familiesBySource[this.source];for(var x in _){var b=t.layers[x];if(b){1===b.version&&u.warnOnce('Vector tile source "'+d.source+'" layer "'+x+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var w=m.encode(x),T=[],S=0;S<b.length;S++){var z=b.feature(S);T.push({feature:z,index:S,sourceLayerIndex:w})}for(var A=0,C=_[x];A<C.length;A+=1){var E=C[A],k=E[0];if(!(k.minzoom&&d.zoom<Math.floor(k.minzoom))&&!(k.maxzoom&&d.zoom>=k.maxzoom||k.layout&&"none"===k.layout.visibility)){for(var M=0,L=E;M<L.length;M+=1)L[M].recalculate(d.zoom);(y[k.id]=k.createBucket({index:v.bucketLayerIDs.length,layers:E,zoom:d.zoom,pixelRatio:d.pixelRatio,overscaling:d.overscaling,collisionBoxArray:d.collisionBoxArray})).populate(T,g),v.bucketLayerIDs.push(E.map(function(t){return t.id}))}}}}this.symbolBuckets=[];for(var I=e.symbolOrder.length-1;I>=0;I--){var P=y[e.symbolOrder[I]];P&&d.symbolBuckets.push(P)}var R,D,O,B=u.mapObject(g.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(B).length?r.send("getGlyphs",{uid:this.uid,stacks:B},function(t,e){R||(R=t,D=e,h.call(d))}):D={};var F=Object.keys(g.iconDependencies);F.length?r.send("getImages",{icons:F},function(t,e){R||(R=t,O=e,h.call(d))}):O={},h.call(this)},d.prototype.redoPlacement=function(t,e,r,o,s){var l=this;if(this.angle=t,this.pitch=e,this.cameraToCenterDistance=r,this.cameraToTileDistance=o,"done"!==this.status)return{};for(var u=new a(this.angle,this.pitch,this.cameraToCenterDistance,this.cameraToTileDistance,this.collisionBoxArray),c=0,p=l.symbolBuckets;c<p.length;c+=1){var h=p[c];n(h,l.zoom),h.place(u,s)}var f=[];return{result:{buckets:i(this.symbolBuckets,f),collisionTile:u.serialize(f)},transferables:f}},e.exports=d},{"../data/bucket/symbol_bucket":47,"../data/feature_index":49,"../render/glyph_atlas":74,"../render/image_atlas":76,"../symbol/collision_box":170,"../symbol/collision_tile":172,"../util/dictionary_coder":207,"../util/util":223}],107:[function(t,e,r){"use strict";function n(t,e){var r={};for(var n in t)"ref"!==n&&(r[n]=t[n]);return o.forEach(function(t){t in e&&(r[t]=e[t])}),r}function i(t){t=t.slice();for(var e=Object.create(null),r=0;r<t.length;r++)e[t[r].id]=t[r];for(var i=0;i<t.length;i++)"ref"in t[i]&&(t[i]=n(t[i],e[t[i].ref]));return t}var o=t("./util/ref_properties");e.exports=i},{"./util/ref_properties":129}],108:[function(t,e,r){"use strict";function n(t,e,r,n){t=t||{},e=e||{};var i;for(i in t)t.hasOwnProperty(i)&&(e.hasOwnProperty(i)||(r.push({command:c.removeSource,args:[i]}),n[i]=!0));for(i in e)e.hasOwnProperty(i)&&(t.hasOwnProperty(i)?u(t[i],e[i])||(r.push({command:c.removeSource,args:[i]}),r.push({command:c.addSource,args:[i,e[i]]}),n[i]=!0):r.push({command:c.addSource,args:[i,e[i]]}))}function i(t,e,r,n,i,o){t=t||{},e=e||{};var a;for(a in t)t.hasOwnProperty(a)&&(u(t[a],e[a])||r.push({command:o,args:[n,a,e[a],i]}));for(a in e)e.hasOwnProperty(a)&&!t.hasOwnProperty(a)&&(u(t[a],e[a])||r.push({command:o,args:[n,a,e[a],i]}))}function o(t){return t.id}function a(t,e){return t[e.id]=e,t}function s(t,e,r){t=t||[],e=e||[];var n,s,l,p,h,f,d,m=t.map(o),v=e.map(o),y=t.reduce(a,{}),g=e.reduce(a,{}),_=m.slice(),x=Object.create(null);for(n=0,s=0;n<m.length;n++)l=m[n],g.hasOwnProperty(l)?s++:(r.push({command:c.removeLayer,args:[l]}),_.splice(_.indexOf(l,s),1));for(n=0,s=0;n<v.length;n++)l=v[v.length-1-n],_[_.length-1-n]!==l&&(y.hasOwnProperty(l)?(r.push({command:c.removeLayer,args:[l]}),_.splice(_.lastIndexOf(l,_.length-s),1)):s++,f=_[_.length-n],r.push({command:c.addLayer,args:[g[l],f]}),_.splice(_.length-n,0,l),x[l]=!0);for(n=0;n<v.length;n++)if(l=v[n],p=y[l],h=g[l],!x[l]&&!u(p,h))if(u(p.source,h.source)&&u(p["source-layer"],h["source-layer"])&&u(p.type,h.type)){i(p.layout,h.layout,r,l,null,c.setLayoutProperty),i(p.paint,h.paint,r,l,null,c.setPaintProperty),u(p.filter,h.filter)||r.push({command:c.setFilter,args:[l,h.filter]}),u(p.minzoom,h.minzoom)&&u(p.maxzoom,h.maxzoom)||r.push({command:c.setLayerZoomRange,args:[l,h.minzoom,h.maxzoom]});for(d in p)p.hasOwnProperty(d)&&"layout"!==d&&"paint"!==d&&"filter"!==d&&"metadata"!==d&&"minzoom"!==d&&"maxzoom"!==d&&(0===d.indexOf("paint.")?i(p[d],h[d],r,l,d.slice(6),c.setPaintProperty):u(p[d],h[d])||r.push({command:c.setLayerProperty,args:[l,d,h[d]]}));for(d in h)h.hasOwnProperty(d)&&!p.hasOwnProperty(d)&&"layout"!==d&&"paint"!==d&&"filter"!==d&&"metadata"!==d&&"minzoom"!==d&&"maxzoom"!==d&&(0===d.indexOf("paint.")?i(p[d],h[d],r,l,d.slice(6),c.setPaintProperty):u(p[d],h[d])||r.push({command:c.setLayerProperty,args:[l,d,h[d]]}))}else r.push({command:c.removeLayer,args:[l]}),f=_[_.lastIndexOf(l)+1],r.push({command:c.addLayer,args:[h,f]})}function l(t,e){if(!t)return[{command:c.setStyle,args:[e]}];var r=[];try{if(!u(t.version,e.version))return[{command:c.setStyle,args:[e]}];u(t.center,e.center)||r.push({command:c.setCenter,args:[e.center]}),u(t.zoom,e.zoom)||r.push({command:c.setZoom,args:[e.zoom]}),u(t.bearing,e.bearing)||r.push({command:c.setBearing,args:[e.bearing]}),u(t.pitch,e.pitch)||r.push({command:c.setPitch,args:[e.pitch]}),u(t.sprite,e.sprite)||r.push({command:c.setSprite,args:[e.sprite]}),u(t.glyphs,e.glyphs)||r.push({command:c.setGlyphs,args:[e.glyphs]}),u(t.transition,e.transition)||r.push({command:c.setTransition,args:[e.transition]}),u(t.light,e.light)||r.push({command:c.setLight,args:[e.light]});var i={},o=[];n(t.sources,e.sources,o,i);var a=[];t.layers&&t.layers.forEach(function(t){i[t.source]?r.push({command:c.removeLayer,args:[t.id]}):a.push(t)}),r=r.concat(o),s(a,e.layers,r)}catch(t){console.warn("Unable to compute style diff:",t),r=[{command:c.setStyle,args:[e]}]}return r}var u=t("lodash.isequal"),c={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};e.exports=l,e.exports.operations=c},{"lodash.isequal":120}],109:[function(t,e,r){"use strict";function n(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];this.message=(t?t+": ":"")+i.apply(i,r),null!==e&&void 0!==e&&e.__line__&&(this.line=e.__line__)}var i=t("util").format;e.exports=n},{util:36}],110:[function(t,e,r){"use strict";function n(t){return new Function("f","var p = (f && f.properties || {}); return "+i(t))}function i(t){if(!t)return"true";var e=t[0];return t.length<=1?"any"===e?"false":"true":"("+("=="===e?a(t[1],t[2],"===",!1):"!="===e?a(t[1],t[2],"!==",!1):"<"===e||">"===e||"<="===e||">="===e?a(t[1],t[2],e,!0):"any"===e?s(t.slice(1),"||"):"all"===e?s(t.slice(1),"&&"):"none"===e?c(s(t.slice(1),"||")):"in"===e?l(t[1],t.slice(2)):"!in"===e?c(l(t[1],t.slice(2))):"has"===e?u(t[1]):"!has"===e?c(u(t[1])):"true")+")"}function o(t){return"$type"===t?"f.type":"$id"===t?"f.id":"p["+JSON.stringify(t)+"]"}function a(t,e,r,n){var i=o(t),a="$type"===t?h.indexOf(e):JSON.stringify(e);return(n?"typeof "+i+"=== typeof "+a+"&&":"")+i+r+a}function s(t,e){return t.map(i).join(e)}function l(t,e){"$type"===t&&(e=e.map(function(t){return h.indexOf(t)}));var r=JSON.stringify(e.sort(p)),n=o(t);return e.length<=200?r+".indexOf("+n+") !== -1":"function(v, a, i, j) {while (i <= j) { var m = (i + j) >> 1; if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;}return false; }("+n+", "+r+",0,"+(e.length-1)+")"}function u(t){return"$id"===t?'"id" in f':JSON.stringify(t)+" in p"}function c(t){return"!("+t+")"}function p(t,e){return t<e?-1:t>e?1:0}e.exports=n;var h=["Unknown","Point","LineString","Polygon"]},{}],111:[function(t,e,r){"use strict";function n(t){return t>y?Math.pow(t,1/3):t/v+d}function i(t){return t>m?t*t*t:v*(t-d)}function o(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function a(t){return t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function s(t){var e=a(t[0]),r=a(t[1]),i=a(t[2]),o=n((.4124564*e+.3575761*r+.1804375*i)/p),s=n((.2126729*e+.7151522*r+.072175*i)/h);return[116*s-16,500*(o-s),200*(s-n((.0193339*e+.119192*r+.9503041*i)/f)),t[3]]}function l(t){var e=(t[0]+16)/116,r=isNaN(t[1])?e:e+t[1]/500,n=isNaN(t[2])?e:e-t[2]/200;return e=h*i(e),r=p*i(r),n=f*i(n),[o(3.2404542*r-1.5371385*e-.4985314*n),o(-.969266*r+1.8760108*e+.041556*n),o(.0556434*r-.2040259*e+1.0572252*n),t[3]]}function u(t){var e=s(t),r=e[0],n=e[1],i=e[2],o=Math.atan2(i,n)*_;return[o<0?o+360:o,Math.sqrt(n*n+i*i),r,t[3]]}function c(t){var e=t[0]*g,r=t[1];return l([t[2],Math.cos(e)*r,Math.sin(e)*r,t[3]])}var p=.95047,h=1,f=1.08883,d=4/29,m=6/29,v=3*m*m,y=m*m*m,g=Math.PI/180,_=180/Math.PI;e.exports={lab:{forward:s,reverse:l},hcl:{forward:u,reverse:c}}},{}],112:[function(t,e,r){"use strict";function n(t){return t}function i(t,e){var r,c="color"===e.type;if(p(t)){var h=t.stops&&"object"==typeof t.stops[0][0],v=h||void 0!==t.property,y=h||!v,g=t.type||("interpolated"===e.function?"exponential":"interval");c&&(t=m({},t),t.stops&&(t.stops=t.stops.map(function(t){return[t[0],d(t[1])]})),t.default?t.default=d(t.default):t.default=d(e.default));var _,x,b;if("exponential"===g)_=l;else if("interval"===g)_=s;else if("categorical"===g){_=a,x=Object.create(null);for(var w=0,T=t.stops;w<T.length;w+=1){var S=T[w];x[S[0]]=S[1]}b=typeof t.stops[0][0]}else{if("identity"!==g)throw new Error('Unknown function type "'+g+'"');_=u}var z;if(t.colorSpace&&"rgb"!==t.colorSpace){if(!f[t.colorSpace])throw new Error("Unknown color space: "+t.colorSpace);var A=f[t.colorSpace];t=JSON.parse(JSON.stringify(t));for(var C=0;C<t.stops.length;C++)t.stops[C]=[t.stops[C][0],A.forward(t.stops[C][1])];z=A.reverse}else z=n;if(h){for(var E={},k=[],M=0;M<t.stops.length;M++){var L=t.stops[M],I=L[0].zoom;void 0===E[I]&&(E[I]={zoom:I,type:t.type,property:t.property,default:t.default,stops:[]},k.push(I)),E[I].stops.push([L[0].value,L[1]])}for(var P=[],R=0,D=k;R<D.length;R+=1){var O=D[R];P.push([E[O].zoom,i(E[O],e)])}r=function(r,n){return z(l({stops:P,base:t.base},e,r)(r,n))},r.isFeatureConstant=!1,r.isZoomConstant=!1}else y?(r=function(r){return z(_(t,e,r,x,b))},r.isFeatureConstant=!0,r.isZoomConstant=!1):(r=function(r,n){var i=n[t.property];return void 0===i?o(t.default,e.default):z(_(t,e,i,x,b))},r.isFeatureConstant=!1,r.isZoomConstant=!0)}else c&&t&&(t=d(t)),r=function(){return t},r.isFeatureConstant=!0,r.isZoomConstant=!0;return r}function o(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function a(t,e,r,n,i){return o(typeof r===i?n[r]:void 0,t.default,e.default)}function s(t,e,r){if("number"!==v(r))return o(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];var i=c(t.stops,r);return t.stops[i][1]}function l(t,e,r){var i=void 0!==t.base?t.base:1;if("number"!==v(r))return o(t.default,e.default);var a=t.stops.length;if(1===a)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[a-1][0])return t.stops[a-1][1];var s=c(t.stops,r),l=h(r,i,t.stops[s][0],t.stops[s+1][0]),u=t.stops[s][1],p=t.stops[s+1][1],f=y[e.type]||n;return"function"==typeof u?function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=u.apply(void 0,t),n=p.apply(void 0,t);if(void 0!==r&&void 0!==n)return f(r,n,l)}:f(u,p,l)}function u(t,e,r){return"color"===e.type?r=d(r):v(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),o(r,t.default,e.default)}function c(t,e){for(var r,n,i=t.length,o=0,a=i-1,s=0;o<=a;){if(s=Math.floor((o+a)/2),r=t[s][0],n=t[s+1][0],e===r||e>r&&e<n)return s;r<e?o=s+1:r>e&&(a=s-1)}return Math.max(s-1,0)}function p(t){return"object"==typeof t&&(t.stops||"identity"===t.type)}function h(t,e,r,n){var i=n-r,o=t-r;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}var f=t("./color_spaces"),d=t("../util/parse_color"),m=t("../util/extend"),v=t("../util/get_type"),y=t("../util/interpolate");e.exports=i,e.exports.isFunctionDefinition=p,e.exports.interpolationFactor=h,e.exports.findStopLessThanOrEqualTo=c},{"../util/extend":125,"../util/get_type":126,"../util/interpolate":127,"../util/parse_color":128,"./color_spaces":111}],113:[function(t,e,r){"use strict";function n(t){var e=typeof t;if("number"===e||"boolean"===e||"string"===e||void 0===t||null===t)return JSON.stringify(t);if(Array.isArray(t)){for(var r="[",i=0,o=t;i<o.length;i+=1)r+=n(o[i])+",";return r+"]"}for(var a=Object.keys(t).sort(),s="{",l=0;l<a.length;l++)s+=JSON.stringify(a[l])+":"+n(t[a[l]])+",";return s+"}"}function i(t){for(var e="",r=0,i=a;r<i.length;r+=1)e+="/"+n(t[i[r]]);return e}function o(t){for(var e={},r=0;r<t.length;r++){var n=i(t[r]),o=e[n];o||(o=e[n]=[]),o.push(t[r])}var a=[];for(var s in e)a.push(e[s]);return a}var a=t("./util/ref_properties");e.exports=o},{"./util/ref_properties":129}],114:[function(t,e,r){function n(t){return t=Math.round(t),t<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function o(t){return n("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function a(t){return i("%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function l(t){var e=t.replace(/ /g,"").toLowerCase();if(e in u)return u[e].slice();if("#"===e[0]){if(4===e.length){var r=parseInt(e.substr(1),16);return r>=0&&r<=4095?[(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,1]:null}if(7===e.length){var r=parseInt(e.substr(1),16);return r>=0&&r<=16777215?[(16711680&r)>>16,(65280&r)>>8,255&r,1]:null}return null}var i=e.indexOf("("),l=e.indexOf(")");if(-1!==i&&l+1===e.length){var c=e.substr(0,i),p=e.substr(i+1,l-(i+1)).split(","),h=1;switch(c){case"rgba":if(4!==p.length)return null;h=a(p.pop());case"rgb":return 3!==p.length?null:[o(p[0]),o(p[1]),o(p[2]),h];case"hsla":if(4!==p.length)return null;h=a(p.pop());case"hsl":if(3!==p.length)return null;var f=(parseFloat(p[0])%360+360)%360/360,d=a(p[1]),m=a(p[2]),v=m<=.5?m*(d+1):m+d-m*d,y=2*m-v;return[n(255*s(y,v,f+1/3)),n(255*s(y,v,f)),n(255*s(y,v,f-1/3)),h];default:return null}}return null}var u={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};try{r.parseCSSColor=l}catch(t){}},{}],115:[function(t,e,r){function n(t){return!!t&&"object"==typeof t}function i(t,e){for(var r=-1,n=t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function o(t,e,r,i,s,l){return t===e||(null==t||null==e||!c(t)&&!n(e)?t!==t&&e!==e:a(t,e,o,r,i,s,l))}function a(t,e,r,n,i,o,a){var c=p(t),f=p(e),v=m,y=m;c||(v=z.call(t),v==d?v=x:v!=x&&(c=h(t))),f||(y=z.call(e),y==d?y=x:y!=x&&(f=h(e)));var g=v==x,_=y==x,b=v==y;if(b&&!c&&!g)return l(t,e,v);if(!i){var w=g&&S.call(t,"__wrapped__"),T=_&&S.call(e,"__wrapped__");if(w||T)return r(w?t.value():t,T?e.value():e,n,i,o,a)}if(!b)return!1;o||(o=[]),a||(a=[]);for(var A=o.length;A--;)if(o[A]==t)return a[A]==e;o.push(t),a.push(e);var C=(c?s:u)(t,e,r,n,i,o,a);return o.pop(),a.pop(),C}function s(t,e,r,n,o,a,s){var l=-1,u=t.length,c=e.length;if(u!=c&&!(o&&c>u))return!1;for(;++l<u;){var p=t[l],h=e[l],f=n?n(o?h:p,o?p:h,l):void 0;if(void 0!==f){if(f)continue;return!1}if(o){if(!i(e,function(t){return p===t||r(p,t,n,o,a,s)}))return!1}else if(p!==h&&!r(p,h,n,o,a,s))return!1}return!0}function l(t,e,r){switch(r){case v:case y:return+t==+e;case g:return t.name==e.name&&t.message==e.message;case _:return t!=+t?e!=+e:t==+e;case b:case w:return t==e+""}return!1}function u(t,e,r,n,i,o,a){var s=f(t),l=s.length;if(l!=f(e).length&&!i)return!1;for(var u=l;u--;){var c=s[u];if(!(i?c in e:S.call(e,c)))return!1}for(var p=i;++u<l;){c=s[u];var h=t[c],d=e[c],m=n?n(i?d:h,i?h:d,c):void 0;if(!(void 0===m?r(h,d,n,i,o,a):m))return!1;p||(p="constructor"==c)}if(!p){var v=t.constructor,y=e.constructor;if(v!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y))return!1}return!0}function c(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var p=t("lodash.isarray"),h=t("lodash.istypedarray"),f=t("lodash.keys"),d="[object Arguments]",m="[object Array]",v="[object Boolean]",y="[object Date]",g="[object Error]",_="[object Number]",x="[object Object]",b="[object RegExp]",w="[object String]",T=Object.prototype,S=T.hasOwnProperty,z=T.toString;e.exports=o},{"lodash.isarray":119,"lodash.istypedarray":121,"lodash.keys":122}],116:[function(t,e,r){function n(t,e,r){if("function"!=typeof t)return i;if(void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 3:return function(r,n,i){return t.call(e,r,n,i)};case 4:return function(r,n,i,o){return t.call(e,r,n,i,o)};case 5:return function(r,n,i,o,a){return t.call(e,r,n,i,o,a)}}return function(){return t.apply(e,arguments)}}function i(t){return t}e.exports=n},{}],117:[function(t,e,r){function n(t){return!!t&&"object"==typeof t}function i(t,e){var r=null==t?void 0:t[e];return s(r)?r:void 0}function o(t){return a(t)&&f.call(t)==l}function a(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function s(t){return null!=t&&(o(t)?d.test(p.call(t)):n(t)&&u.test(t))}var l="[object Function]",u=/^\[object .+?Constructor\]$/,c=Object.prototype,p=Function.prototype.toString,h=c.hasOwnProperty,f=c.toString,d=RegExp("^"+p.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=i},{}],118:[function(t,e,r){function n(t){return o(t)&&m.call(t,"callee")&&(!y.call(t,"callee")||v.call(t)==p)}function i(t){return null!=t&&s(t.length)&&!a(t)}function o(t){return u(t)&&i(t)}function a(t){var e=l(t)?v.call(t):"";return e==h||e==f}function s(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=c}function l(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function u(t){return!!t&&"object"==typeof t}var c=9007199254740991,p="[object Arguments]",h="[object Function]",f="[object GeneratorFunction]",d=Object.prototype,m=d.hasOwnProperty,v=d.toString,y=d.propertyIsEnumerable;e.exports=n},{}],119:[function(t,e,r){function n(t){return!!t&&"object"==typeof t}function i(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=v}function o(t){return a(t)&&f.call(t)==l}function a(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function s(t){return null!=t&&(o(t)?d.test(p.call(t)):n(t)&&u.test(t))}var l="[object Function]",u=/^\[object .+?Constructor\]$/,c=Object.prototype,p=Function.prototype.toString,h=c.hasOwnProperty,f=c.toString,d=RegExp("^"+p.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),m=function(t,e){var r=null==t?void 0:t[e];return s(r)?r:void 0}(Array,"isArray"),v=9007199254740991,y=m||function(t){return n(t)&&i(t.length)&&"[object Array]"==f.call(t)};e.exports=y},{}],120:[function(t,e,r){function n(t,e,r,n){r="function"==typeof r?o(r,n,3):void 0;var a=r?r(t,e):void 0;return void 0===a?i(t,e,r):!!a}var i=t("lodash._baseisequal"),o=t("lodash._bindcallback");e.exports=n},{"lodash._baseisequal":115,"lodash._bindcallback":116}],121:[function(t,e,r){function n(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=a}function i(t){return!!t&&"object"==typeof t}function o(t){return i(t)&&n(t.length)&&!!s[u.call(t)]}var a=9007199254740991,s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;var l=Object.prototype,u=l.toString;e.exports=o},{}],122:[function(t,e,r){function n(t){return null!=t&&o(y(t))}function i(t,e){return t="number"==typeof t||h.test(t)?+t:-1,e=null==e?v:e,t>-1&&t%1==0&&t<e}function o(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=v}function a(t){for(var e=l(t),r=e.length,n=r&&t.length,a=!!n&&o(n)&&(p(t)||c(t)),s=-1,u=[];++s<r;){var h=e[s];(a&&i(h,n)||d.call(t,h))&&u.push(h)}return u}function s(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function l(t){if(null==t)return[];s(t)||(t=Object(t));var e=t.length;e=e&&o(e)&&(p(t)||c(t))&&e||0;for(var r=t.constructor,n=-1,a="function"==typeof r&&r.prototype===t,l=Array(e),u=e>0;++n<e;)l[n]=n+"";for(var h in t)u&&i(h,e)||"constructor"==h&&(a||!d.call(t,h))||l.push(h);return l}var u=t("lodash._getnative"),c=t("lodash.isarguments"),p=t("lodash.isarray"),h=/^\d+$/,f=Object.prototype,d=f.hasOwnProperty,m=u(Object,"keys"),v=9007199254740991,y=function(t){return function(e){return null==e?void 0:e[t]}}("length"),g=m?function(t){var e=null==t?void 0:t.constructor;return"function"==typeof e&&e.prototype===t||"function"!=typeof t&&n(t)?a(t):s(t)?m(t):[]}:a;e.exports=g},{"lodash._getnative":117,"lodash.isarguments":118,"lodash.isarray":119}],123:[function(t,e,r){"use strict";e.exports=t("./v8.json")},{"./v8.json":124}],124:[function(t,e,r){e.exports={$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_tile","source_geojson","source_video","source_image","source_canvas"],source_tile:{type:{required:!0,type:"enum",values:{vector:{},raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.0511,180,85.0511]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"}},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"}}},source_canvas:{type:{required:!0,type:"enum",values:{canvas:{}}},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}},animate:{type:"boolean",default:"true"},canvas:{type:"string",required:!0},contextType:{required:!0,type:"enum",values:{"2d":{},webgl:{},"experimental-webgl":{},webgl2:{}}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},"fill-extrusion":{},raster:{},background:{}}},metadata:{type:"*"},ref:{type:"string"},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"},"paint.*":{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_fill-extrusion","layout_symbol","layout_raster","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_fill:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_circle:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_line:{"line-cap":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{butt:{},round:{},square:{}},default:"butt"},"line-join":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{bevel:{},round:{},miter:{}},default:"miter"},"line-miter-limit":{type:"number",default:2,function:"interpolated","zoom-function":!0,requires:[{"line-join":"miter"}]},"line-round-limit":{type:"number",default:1.05,function:"interpolated","zoom-function":!0,requires:[{"line-join":"round"}]},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_symbol:{"symbol-placement":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{point:{},line:{}},default:"point"},"symbol-spacing":{type:"number",default:250,minimum:1,function:"interpolated","zoom-function":!0,units:"pixels",requires:[{"symbol-placement":"line"}]},"symbol-avoid-edges":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1},"icon-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["icon-image"]},"icon-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["icon-image"]},"icon-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["icon-image","text-field"]},"icon-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"]},"icon-size":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,units:"factor of the original icon size",requires:["icon-image"]},"icon-text-fit":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"]},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",function:"interpolated","zoom-function":!0,requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}]},"icon-image":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,tokens:!0},"icon-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,"property-function":!0,units:"degrees",requires:["icon-image"]},"icon-padding":{type:"number",default:2,minimum:0,function:"interpolated","zoom-function":!0,units:"pixels",requires:["icon-image"]},"icon-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}]},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,"property-function":!0,requires:["icon-image"]},"icon-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"]},"icon-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"]},"text-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"]},"text-rotation-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"]},"text-field":{type:"string",function:"piecewise-constant","zoom-function":!0,"property-function":!0,default:"",tokens:!0},"text-font":{type:"array",value:"string",function:"piecewise-constant","zoom-function":!0,default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"]},"text-size":{type:"number",default:16,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-line-height":{type:"number",default:1.2,units:"ems",function:"interpolated","zoom-function":!0,requires:["text-field"]},"text-letter-spacing":{type:"number",default:0,units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-justify":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{left:{},center:{},right:{}},default:"center",requires:["text-field"]},"text-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field"]},"text-max-angle":{type:"number",default:45,units:"degrees",function:"interpolated","zoom-function":!0,requires:["text-field",{"symbol-placement":"line"}]},"text-rotate":{type:"number",default:0,period:360,units:"degrees",function:"interpolated","zoom-function":!0,"property-function":!0,requires:["text-field"]},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",function:"interpolated","zoom-function":!0,requires:["text-field"]},"text-keep-upright":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}]},"text-transform":{type:"enum",function:"piecewise-constant","zoom-function":!0,"property-function":!0,values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"]},"text-offset":{type:"array",value:"number",units:"ems",function:"interpolated","zoom-function":!0,"property-function":!0,length:2,default:[0,0],requires:["text-field"]},"text-allow-overlap":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["text-field"]},"text-ignore-placement":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["text-field"]},"text-optional":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!1,requires:["text-field","icon-image"]},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{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:22,value:["number","color"],length:2},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},transition:!1,"zoom-function":!0,"property-function":!1,function:"piecewise-constant"},position:{type:"array",default:[1.15,210,30],length:3,value:"number",transition:!0,function:"interpolated","zoom-function":!0,"property-function":!1},color:{type:"color",default:"#ffffff",function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0},intensity:{type:"number",default:.5,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!1,transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_fill-extrusion","paint_symbol","paint_raster","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",function:"piecewise-constant","zoom-function":!0,default:!0},"fill-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0},"fill-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"}]},"fill-outline-color":{type:"color",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}]},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels"},"fill-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["fill-translate"]},"fill-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!1,default:1,minimum:0,maximum:1,transition:!0},"fill-extrusion-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"fill-extrusion-pattern"}]},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels"},"fill-extrusion-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"]},"fill-extrusion-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0},"fill-extrusion-height":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:0,minimum:0,units:"meters",transition:!0},"fill-extrusion-base":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:0,minimum:0,maximum:65535,units:"meters",transition:!0,requires:["fill-extrusion-height"]}},paint_line:{"line-opacity":{type:"number",function:"interpolated","zoom-function":!0,"property-function":!0,default:1,minimum:0,maximum:1,transition:!0},"line-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:[{"!":"line-pattern"}]},"line-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels"},"line-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["line-translate"]},"line-width":{type:"number",default:1,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-gap-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-offset":{type:"number",default:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"line-dasharray":{type:"array",value:"number",function:"piecewise-constant","zoom-function":!0,minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}]},"line-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"circle-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-blur":{type:"number",default:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels"},"circle-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["circle-translate"]},"circle-pitch-scale":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map"},"circle-pitch-alignment":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"viewport"},"circle-stroke-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels"},"circle-stroke-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["icon-image"]},"icon-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",requires:["icon-image"]},"icon-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"]},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,requires:["text-field"]},"text-halo-width":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-halo-blur":{type:"number",default:0,minimum:0,function:"interpolated","zoom-function":!0,"property-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-translate":{type:"array",value:"number",length:2,default:[0,0],function:"interpolated","zoom-function":!0,transition:!0,units:"pixels",requires:["text-field"]},"text-translate-anchor":{type:"enum",function:"piecewise-constant","zoom-function":!0,values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"]}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-hue-rotate":{type:"number",default:0,period:360,function:"interpolated","zoom-function":!0,transition:!0,units:"degrees"},"raster-brightness-min":{type:"number",function:"interpolated","zoom-function":!0,default:0,minimum:0,maximum:1,transition:!0},"raster-brightness-max":{type:"number",function:"interpolated","zoom-function":!0,default:1,minimum:0,maximum:1,transition:!0},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,function:"interpolated","zoom-function":!0,transition:!0},"raster-fade-duration":{type:"number",default:300,minimum:0,function:"interpolated","zoom-function":!0,transition:!0,units:"milliseconds"}},paint_background:{"background-color":{type:"color",default:"#000000",function:"interpolated","zoom-function":!0,transition:!0,requires:[{"!":"background-pattern"}]},"background-pattern":{type:"string",function:"piecewise-constant","zoom-function":!0,transition:!0},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,function:"interpolated","zoom-function":!0,transition:!0}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}}}},{}],125:[function(t,e,r){"use strict";e.exports=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n<i.length;n+=1){var o=i[n];for(var a in o)t[a]=o[a]}return t}},{}],126:[function(t,e,r){"use strict";e.exports=function(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}},{}],127:[function(t,e,r){"use strict";function n(t,e,r){return t*(1-r)+e*r}e.exports=n,n.number=n,n.vec2=function(t,e,r){return[n(t[0],e[0],r),n(t[1],e[1],r)]},n.color=function(t,e,r){return[n(t[0],e[0],r),n(t[1],e[1],r),n(t[2],e[2],r),n(t[3],e[3],r)]},n.array=function(t,e,r){return t.map(function(t,i){return n(t,e[i],r)})}},{}],128:[function(t,e,r){"use strict";var n=t("csscolorparser").parseCSSColor;e.exports=function(t){if("string"==typeof t){var e=n(t);if(!e)return;return[e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3]]}return Array.isArray(t)?t:void 0}},{csscolorparser:114}],129:[function(t,e,r){"use strict";e.exports=["type","source","source-layer","minzoom","maxzoom","filter","layout"]},{}],130:[function(t,e,r){"use strict";e.exports=function(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}},{}],131:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/get_type"),o=t("../util/extend");e.exports=function(e){var r=t("./validate_function"),a=t("./validate_object"),s={"*":function(){return[]},array:t("./validate_array"),boolean:t("./validate_boolean"),number:t("./validate_number"),color:t("./validate_color"),constants:t("./validate_constants"),enum:t("./validate_enum"),filter:t("./validate_filter"),function:t("./validate_function"),layer:t("./validate_layer"),object:t("./validate_object"),source:t("./validate_source"),light:t("./validate_light"),string:t("./validate_string")},l=e.value,u=e.valueSpec,c=e.key,p=e.styleSpec,h=e.style;if("string"===i(l)&&"@"===l[0]){if(p.$version>7)return[new n(c,l,"constants have been deprecated as of v8")];if(!(l in h.constants))return[new n(c,l,'constant "%s" not found',l)];e=o({},e,{value:h.constants[l]})}return u.function&&"object"===i(l)?r(e):u.type&&s[u.type]?s[u.type](e):a(o({},e,{valueSpec:u.type?p[u.type]:u}))}},{"../error/validation_error":109,"../util/extend":125,"../util/get_type":126,"./validate_array":132,"./validate_boolean":133,"./validate_color":134,"./validate_constants":135,"./validate_enum":136,"./validate_filter":137,"./validate_function":138,"./validate_layer":140,"./validate_light":142,"./validate_number":143,"./validate_object":144,"./validate_source":147,"./validate_string":148}],132:[function(t,e,r){"use strict";var n=t("../util/get_type"),i=t("./validate"),o=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.valueSpec,a=t.style,s=t.styleSpec,l=t.key,u=t.arrayElementValidator||i;if("array"!==n(e))return[new o(l,e,"array expected, %s found",n(e))];if(r.length&&e.length!==r.length)return[new o(l,e,"array length %d expected, length %d found",r.length,e.length)];if(r["min-length"]&&e.length<r["min-length"])return[new o(l,e,"array length at least %d expected, length %d found",r["min-length"],e.length)];var c={type:r.value};s.$version<7&&(c.function=r.function),"object"===n(r.value)&&(c=r.value);for(var p=[],h=0;h<e.length;h++)p=p.concat(u({array:e,arrayIndex:h,value:e[h],valueSpec:c,style:a,styleSpec:s,key:l+"["+h+"]"}));return p}},{"../error/validation_error":109,"../util/get_type":126,"./validate":131}],133:[function(t,e,r){"use strict";var n=t("../util/get_type"),i=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.key,o=n(e);return"boolean"!==o?[new i(r,e,"boolean expected, %s found",o)]:[]}},{"../error/validation_error":109,"../util/get_type":126}],134:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/get_type"),o=t("csscolorparser").parseCSSColor;e.exports=function(t){var e=t.key,r=t.value,a=i(r);return"string"!==a?[new n(e,r,"color expected, %s found",a)]:null===o(r)?[new n(e,r,'color expected, "%s" found',r)]:[]}},{"../error/validation_error":109,"../util/get_type":126,csscolorparser:114}],135:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/get_type");e.exports=function(t){var e=t.key,r=t.value;if(t.styleSpec.$version>7)return r?[new n(e,r,"constants have been deprecated as of v8")]:[];var o=i(r);if("object"!==o)return[new n(e,r,"object expected, %s found",o)];var a=[];for(var s in r)"@"!==s[0]&&a.push(new n(e+"."+s,r[s],'constants must start with "@"'));return a}},{"../error/validation_error":109,"../util/get_type":126}],136:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint");e.exports=function(t){var e=t.key,r=t.value,o=t.valueSpec,a=[];return Array.isArray(o.values)?-1===o.values.indexOf(i(r))&&a.push(new n(e,r,"expected one of [%s], %s found",o.values.join(", "),r)):-1===Object.keys(o.values).indexOf(i(r))&&a.push(new n(e,r,"expected one of [%s], %s found",Object.keys(o.values).join(", "),r)),a}},{"../error/validation_error":109,"../util/unbundle_jsonlint":130}],137:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("./validate_enum"),o=t("../util/get_type"),a=t("../util/unbundle_jsonlint");e.exports=function t(e){var r,s=e.value,l=e.key,u=e.styleSpec,c=[];if("array"!==o(s))return[new n(l,s,"array expected, %s found",o(s))];if(s.length<1)return[new n(l,s,"filter array must have at least 1 element")];switch(c=c.concat(i({key:l+"[0]",value:s[0],valueSpec:u.filter_operator,style:e.style,styleSpec:e.styleSpec})),a(s[0])){case"<":case"<=":case">":case">=":s.length>=2&&"$type"===a(s[1])&&c.push(new n(l,s,'"$type" cannot be use with operator "%s"',s[0]));case"==":case"!=":3!==s.length&&c.push(new n(l,s,'filter array for operator "%s" must have 3 elements',s[0]));case"in":case"!in":s.length>=2&&"string"!==(r=o(s[1]))&&c.push(new n(l+"[1]",s[1],"string expected, %s found",r));for(var p=2;p<s.length;p++)r=o(s[p]),"$type"===a(s[1])?c=c.concat(i({key:l+"["+p+"]",value:s[p],valueSpec:u.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==r&&"number"!==r&&"boolean"!==r&&c.push(new n(l+"["+p+"]",s[p],"string, number, or boolean expected, %s found",r));break;case"any":case"all":case"none":for(var h=1;h<s.length;h++)c=c.concat(t({key:l+"["+h+"]",value:s[h],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":r=o(s[1]),2!==s.length?c.push(new n(l,s,'filter array for "%s" operator must have 2 elements',s[0])):"string"!==r&&c.push(new n(l+"[1]",s[1],"string expected, %s found",r))}return c}},{"../error/validation_error":109,"../util/get_type":126,"../util/unbundle_jsonlint":130,"./validate_enum":136}],138:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/get_type"),o=t("./validate"),a=t("./validate_object"),s=t("./validate_array"),l=t("./validate_number"),u=t("../util/unbundle_jsonlint");e.exports=function(t){function e(t){if("identity"===v)return[new n(t.key,t.value,'identity function may not have a "stops" property')];var e=[],o=t.value;return e=e.concat(s({key:t.key,value:o,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:r})),"array"===i(o)&&0===o.length&&e.push(new n(t.key,o,"array must have at least one stop")),e}function r(t){var e=[],r=t.value,s=t.key;if("array"!==i(r))return[new n(s,r,"array expected, %s found",i(r))];if(2!==r.length)return[new n(s,r,"array length %d expected, length %d found",2,r.length)];if(x){if("object"!==i(r[0]))return[new n(s,r,"object expected, %s found",i(r[0]))];if(void 0===r[0].zoom)return[new n(s,r,"object stop key must have zoom")];if(void 0===r[0].value)return[new n(s,r,"object stop key must have value")];if(d&&d>u(r[0].zoom))return[new n(s,r[0].zoom,"stop zoom values must appear in ascending order")];u(r[0].zoom)!==d&&(d=u(r[0].zoom),f=void 0,y={}),e=e.concat(a({key:s+"[0]",value:r[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:l,value:c}}))}else e=e.concat(c({key:s+"[0]",value:r[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec}));return e.concat(o({key:s+"[1]",value:r[1],valueSpec:m,style:t.style,styleSpec:t.styleSpec}))}function c(t){var e=i(t.value),r=u(t.value);if(h){if(e!==h)return[new n(t.key,t.value,"%s stop domain type must match previous stop domain type %s",e,h)]}else h=e;if("number"!==e&&"string"!==e&&"boolean"!==e)return[new n(t.key,t.value,"stop domain value must be a number, string, or boolean")];if("number"!==e&&"categorical"!==v){var o="number expected, %s found";return m["property-function"]&&void 0===v&&(o+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new n(t.key,t.value,o,e)]}return"categorical"!==v||"number"!==e||isFinite(r)&&Math.floor(r)===r?"categorical"!==v&&"number"===e&&void 0!==f&&r<f?[new n(t.key,t.value,"stop domain values must appear in ascending order")]:(f=r,"categorical"===v&&r in y?[new n(t.key,t.value,"stop domain values must be unique")]:(y[r]=!0,[])):[new n(t.key,t.value,"integer expected, found %s",r)]}function p(t){return o({key:t.key,value:t.value,valueSpec:m,style:t.style,styleSpec:t.styleSpec})}var h,f,d,m=t.valueSpec,v=u(t.value.type),y={},g="categorical"!==v&&void 0===t.value.property,_=!g,x="array"===i(t.value.stops)&&"array"===i(t.value.stops[0])&&"object"===i(t.value.stops[0][0]),b=a({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:e,default:p}});return"identity"===v&&g&&b.push(new n(t.key,t.value,'missing required property "property"')),"identity"===v||t.value.stops||b.push(new n(t.key,t.value,'missing required property "stops"')),"exponential"===v&&"piecewise-constant"===t.valueSpec.function&&b.push(new n(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(_&&!t.valueSpec["property-function"]?b.push(new n(t.key,t.value,"property functions not supported")):g&&!t.valueSpec["zoom-function"]&&b.push(new n(t.key,t.value,"zoom functions not supported"))),"categorical"!==v&&!x||void 0!==t.value.property||b.push(new n(t.key,t.value,'"property" property is required')),b}},{"../error/validation_error":109,"../util/get_type":126,"../util/unbundle_jsonlint":130,"./validate":131,"./validate_array":132,"./validate_number":143,"./validate_object":144}],139:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("./validate_string");e.exports=function(t){var e=t.value,r=t.key,o=i(t);return o.length?o:(-1===e.indexOf("{fontstack}")&&o.push(new n(r,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&o.push(new n(r,e,'"glyphs" url must include a "{range}" token')),o)}},{"../error/validation_error":109,"./validate_string":148}],140:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint"),o=t("./validate_object"),a=t("./validate_filter"),s=t("./validate_paint_property"),l=t("./validate_layout_property"),u=t("../util/extend");e.exports=function(t){var e=[],r=t.value,c=t.key,p=t.style,h=t.styleSpec;r.type||r.ref||e.push(new n(c,r,'either "type" or "ref" is required'));var f=i(r.type),d=i(r.ref);if(r.id)for(var m=i(r.id),v=0;v<t.arrayIndex;v++){var y=p.layers[v];i(y.id)===m&&e.push(new n(c,r.id,'duplicate layer id "%s", previously used at line %d',r.id,y.id.__line__))}if("ref"in r){["type","source","source-layer","filter","layout"].forEach(function(t){t in r&&e.push(new n(c,r[t],'"%s" is prohibited for ref layers',t))});var g;p.layers.forEach(function(t){i(t.id)===d&&(g=t)}),g?g.ref?e.push(new n(c,r.ref,"ref cannot reference another ref layer")):f=i(g.type):e.push(new n(c,r.ref,'ref layer "%s" not found',d))}else if("background"!==f)if(r.source){var _=p.sources&&p.sources[r.source],x=_&&i(_.type);_?"vector"===x&&"raster"===f?e.push(new n(c,r.source,'layer "%s" requires a raster source',r.id)):"raster"===x&&"raster"!==f?e.push(new n(c,r.source,'layer "%s" requires a vector source',r.id)):"vector"!==x||r["source-layer"]||e.push(new n(c,r,'layer "%s" must specify a "source-layer"',r.id)):e.push(new n(c,r.source,'source "%s" not found',r.source))}else e.push(new n(c,r,'missing required property "source"'));return e=e.concat(o({key:c,value:r,valueSpec:h.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},filter:a,layout:function(t){return o({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return l(u({layerType:f},t))}}})},paint:function(t){return o({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return s(u({layerType:f},t))}}})}}}))}},{"../error/validation_error":109,"../util/extend":125,"../util/unbundle_jsonlint":130,"./validate_filter":137,"./validate_layout_property":141,"./validate_object":144,"./validate_paint_property":145}],141:[function(t,e,r){"use strict";var n=t("./validate_property");e.exports=function(t){return n(t,"layout")}},{"./validate_property":146}],142:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/get_type"),o=t("./validate");e.exports=function(t){var e=t.value,r=t.styleSpec,a=r.light,s=t.style,l=[],u=i(e);if(void 0===e)return l;if("object"!==u)return l=l.concat([new n("light",e,"object expected, %s found",u)]);for(var c in e){var p=c.match(/^(.*)-transition$/);l=p&&a[p[1]]&&a[p[1]].transition?l.concat(o({key:c,value:e[c],valueSpec:r.transition,style:s,styleSpec:r})):a[c]?l.concat(o({key:c,value:e[c],valueSpec:a[c],style:s,styleSpec:r})):l.concat([new n(c,e[c],'unknown property "%s"',c)])}return l}},{"../error/validation_error":109,"../util/get_type":126,"./validate":131}],143:[function(t,e,r){"use strict";var n=t("../util/get_type"),i=t("../error/validation_error");e.exports=function(t){var e=t.key,r=t.value,o=t.valueSpec,a=n(r);return"number"!==a?[new i(e,r,"number expected, %s found",a)]:"minimum"in o&&r<o.minimum?[new i(e,r,"%s is less than the minimum value %s",r,o.minimum)]:"maximum"in o&&r>o.maximum?[new i(e,r,"%s is greater than the maximum value %s",r,o.maximum)]:[]}},{"../error/validation_error":109,"../util/get_type":126}],144:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/get_type"),o=t("./validate");e.exports=function(t){var e=t.key,r=t.value,a=t.valueSpec||{},s=t.objectElementValidators||{},l=t.style,u=t.styleSpec,c=[],p=i(r);if("object"!==p)return[new n(e,r,"object expected, %s found",p)];for(var h in r){var f=h.split(".")[0],d=a[f]||a["*"],m=void 0;if(s[f])m=s[f];else if(a[f])m=o;else if(s["*"])m=s["*"];else{if(!a["*"]){c.push(new n(e,r[h],'unknown property "%s"',h));continue}m=o}c=c.concat(m({key:(e?e+".":e)+h,value:r[h],valueSpec:d,style:l,styleSpec:u,object:r,objectKey:h}))}for(var v in a)a[v].required&&void 0===a[v].default&&void 0===r[v]&&c.push(new n(e,r,'missing required property "%s"',v));return c}},{"../error/validation_error":109,"../util/get_type":126,"./validate":131}],145:[function(t,e,r){"use strict";var n=t("./validate_property");e.exports=function(t){return n(t,"paint")}},{"./validate_property":146}],146:[function(t,e,r){"use strict";var n=t("./validate"),i=t("../error/validation_error"),o=t("../util/get_type");e.exports=function(t,e){var r=t.key,a=t.style,s=t.styleSpec,l=t.value,u=t.objectKey,c=s[e+"_"+t.layerType];if(!c)return[];var p=u.match(/^(.*)-transition$/);if("paint"===e&&p&&c[p[1]]&&c[p[1]].transition)return n({key:r,value:l,valueSpec:s.transition,style:a,styleSpec:s});var h=t.valueSpec||c[u];if(!h)return[new i(r,l,'unknown property "%s"',u)];var f;if("string"===o(l)&&h["property-function"]&&!h.tokens&&(f=/^{([^}]+)}$/.exec(l)))return[new i(r,l,'"%s" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": %s` }`.',u,JSON.stringify(f[1]))];var d=[];return"symbol"===t.layerType&&"text-field"===u&&a&&!a.glyphs&&d.push(new i(r,l,'use of "text-field" requires a style "glyphs" property')),d.concat(n({key:t.key,value:l,valueSpec:h,style:a,styleSpec:s}))}},{"../error/validation_error":109,"../util/get_type":126,"./validate":131}],147:[function(t,e,r){"use strict";var n=t("../error/validation_error"),i=t("../util/unbundle_jsonlint"),o=t("./validate_object"),a=t("./validate_enum");e.exports=function(t){var e=t.value,r=t.key,s=t.styleSpec,l=t.style;if(!e.type)return[new n(r,e,'"type" is required')];var u=i(e.type),c=[];switch(u){case"vector":case"raster":if(c=c.concat(o({key:r,value:e,valueSpec:s.source_tile,style:t.style,styleSpec:s})),"url"in e)for(var p in e)["type","url","tileSize"].indexOf(p)<0&&c.push(new n(r+"."+p,e[p],'a source with a "url" property may not include a "%s" property',p));return c;case"geojson":return o({key:r,value:e,valueSpec:s.source_geojson,style:l,styleSpec:s});case"video":return o({key:r,value:e,valueSpec:s.source_video,style:l,styleSpec:s});case"image":return o({key:r,value:e,valueSpec:s.source_image,style:l,styleSpec:s});case"canvas":return o({key:r,value:e,valueSpec:s.source_canvas,style:l,styleSpec:s});default:return a({key:r+".type",value:e.type,valueSpec:{values:["vector","raster","geojson","video","image","canvas"]},style:l,styleSpec:s})}}},{"../error/validation_error":109,"../util/unbundle_jsonlint":130,"./validate_enum":136,"./validate_object":144}],148:[function(t,e,r){"use strict";var n=t("../util/get_type"),i=t("../error/validation_error");e.exports=function(t){var e=t.value,r=t.key,o=n(e);return"string"!==o?[new i(r,e,"string expected, %s found",o)]:[]}},{"../error/validation_error":109,"../util/get_type":126}],149:[function(t,e,r){"use strict";function n(t,e){e=e||l;var r=[];return r=r.concat(s({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:u,"*":function(){return[]}}})),e.$version>7&&t.constants&&(r=r.concat(a({key:"constants",value:t.constants,style:t,styleSpec:e}))),i(r)}function i(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function o(t){return function(){return i(t.apply(this,arguments))}}var a=t("./validate/validate_constants"),s=t("./validate/validate"),l=t("./reference/latest"),u=t("./validate/validate_glyphs_url");n.source=o(t("./validate/validate_source")),n.light=o(t("./validate/validate_light")),n.layer=o(t("./validate/validate_layer")),n.filter=o(t("./validate/validate_filter")),n.paintProperty=o(t("./validate/validate_paint_property")),n.layoutProperty=o(t("./validate/validate_layout_property")),e.exports=n},{"./reference/latest":123,"./validate/validate":131,"./validate/validate_constants":135,"./validate/validate_filter":137,"./validate/validate_glyphs_url":139,"./validate/validate_layer":140,"./validate/validate_layout_property":141,"./validate/validate_light":142,"./validate/validate_paint_property":145,"./validate/validate_source":147}],150:[function(t,e,r){"use strict";var n=function(){this.n=0,this.times=[]};n.prototype.stopped=function(){return this.times=this.times.filter(function(t){return t.time>=(new Date).getTime()}),!this.times.length},n.prototype.set=function(t){return this.times.push({id:this.n,time:t+(new Date).getTime()}),this.n++},n.prototype.cancel=function(t){this.times=this.times.filter(function(e){return e.id!==t})},e.exports=n},{}],151:[function(t,e,r){"use strict";var n=t("../style-spec/reference/latest"),i=t("../util/util"),o=t("../util/evented"),a=t("./validate_style"),s=t("./style_declaration"),l=t("./style_transition"),u=["anchor","color","position","intensity"],c=n.light,p=function(t){function e(e){t.call(this),this.set(e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){var e=this;if(!this._validate(a.light,t)){this._declarations={},this._transitions={},this._transitionOptions={},this.calculated={},t=i.extend({anchor:c.anchor.default,color:c.color.default,position:c.position.default,intensity:c.intensity.default},t);for(var r=0,n=u;r<n.length;r+=1){var o=n[r];e._declarations[o]=new s(c[o],t[o])}return this}},e.prototype.getLight=function(){return{anchor:this.getLightProperty("anchor"),color:this.getLightProperty("color"),position:this.getLightProperty("position"),intensity:this.getLightProperty("intensity")}},e.prototype.getLightProperty=function(t){return i.endsWith(t,"-transition")?this._transitionOptions[t]:this._declarations[t]&&this._declarations[t].value},e.prototype.getLightValue=function(t,e){if("position"===t){var r=this._transitions[t].calculate(e),n=i.sphericalToCartesian(r);return{x:n[0],y:n[1],z:n[2]}}return this._transitions[t].calculate(e)},e.prototype.setLight=function(t){var e=this;if(!this._validate(a.light,t))for(var r in t){var n=t[r];i.endsWith(r,"-transition")?e._transitionOptions[r]=n:null===n||void 0===n?delete e._declarations[r]:e._declarations[r]=new s(c[r],n)}},e.prototype.recalculate=function(t){var e=this;for(var r in e._declarations)e.calculated[r]=e.getLightValue(r,{zoom:t})},e.prototype._applyLightDeclaration=function(t,e,r,n,o){var a=r.transition?this._transitions[t]:void 0,u=c[t];if(null!==e&&void 0!==e||(e=new s(u,u.default)),!a||a.declaration.json!==e.json){var p=i.extend({duration:300,delay:0},n,this.getLightProperty(t+"-transition")),h=this._transitions[t]=new l(u,e,a,p);h.instant()||(h.loopID=o.set(h.endTime-Date.now())),a&&o.cancel(a.loopID)}},e.prototype.updateLightTransitions=function(t,e,r){var n,i=this;for(n in i._declarations)i._applyLightDeclaration(n,i._declarations[n],t,e,r)},e.prototype._validate=function(t,e){return a.emitErrors(this,t.call(a,i.extend({value:e,style:{glyphs:!0,sprite:!0},styleSpec:n})))},e}(o);e.exports=p},{"../style-spec/reference/latest":123,"../util/evented":210,"../util/util":223,"./style_declaration":157,"./style_transition":165,"./validate_style":166}],152:[function(t,e,r){"use strict";var n=t("../util/mapbox"),i=n.normalizeGlyphsURL,o=t("../util/ajax"),a=t("./parse_glyph_pbf");e.exports=function(t,e,r,n,s){var l=256*e,u=l+255,c=n(i(r).replace("{fontstack}",t).replace("{range}",l+"-"+u),o.ResourceType.Glyphs);o.getArrayBuffer(c,function(t,e){if(t)s(t);else if(e){for(var r={},n=0,i=a(e.data);n<i.length;n+=1){var o=i[n];r[o.id]=o}s(null,r)}})}},{"../util/ajax":201,"../util/mapbox":217,"./parse_glyph_pbf":154}],153:[function(t,e,r){"use strict";var n=t("../util/ajax"),i=t("../util/browser"),o=t("../util/mapbox"),a=o.normalizeSpriteURL,s=t("../util/image"),l=s.RGBAImage;e.exports=function(t,e,r){function o(){if(c)r(c);else if(s&&u){var t=i.getImageData(u),e={};for(var n in s){var o=s[n],a=o.width,p=o.height,h=o.x,f=o.y,d=o.sdf,m=o.pixelRatio,v=l.create({width:a,height:p});l.copy(t,v,{x:h,y:f},{x:0,y:0},{width:a,height:p}),e[n]={data:v,pixelRatio:m,sdf:d}}r(null,e)}}if(!t)return void r(null,{});var s,u,c,p=i.devicePixelRatio>1?"@2x":"";n.getJSON(e(a(t,p,".json"),n.ResourceType.SpriteJSON),function(t,e){c||(c=t,s=e,o())}),n.getImage(e(a(t,p,".png"),n.ResourceType.SpriteImage),function(t,e){c||(c=t,u=e,o())})}},{"../util/ajax":201,"../util/browser":202,"../util/image":213,"../util/mapbox":217}],154:[function(t,e,r){"use strict";function n(t,e,r){1===t&&r.readMessage(i,e)}function i(t,e,r){if(3===t){var n=r.readMessage(o,{}),i=n.id,a=n.bitmap,l=n.width,c=n.height,p=n.left,h=n.top,f=n.advance;e.push({id:i,bitmap:s.create({width:l+2*u,height:c+2*u},a),metrics:{width:l,height:c,left:p,top:h,advance:f}})}}function o(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}var a=t("../util/image"),s=a.AlphaImage,l=t("pbf"),u=3;e.exports=function(t){return new l(t).readFields(n,[])},e.exports.GLYPH_PBF_BORDER=u},{"../util/image":213,pbf:29}],155:[function(t,e,r){"use strict";function n(t,e,r){return e.isPaintValueFeatureConstant(t)?e.paint[t]:r.programConfigurations.get(e.id).paintPropertyStatistics[t].max}function i(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function o(t,e,r,n,i){if(!e[0]&&!e[1])return t;var o=a.convert(e);"viewport"===r&&o._rotate(-n);for(var s=[],l=0;l<t.length;l++){for(var u=t[l],c=[],p=0;p<u.length;p++)c.push(u[p].sub(o._mult(i)));s.push(c)}return s}var a=t("@mapbox/point-geometry");e.exports={getMaximumPaintValue:n,translateDistance:i,translate:o}},{"@mapbox/point-geometry":2}],156:[function(t,e,r){"use strict";var n=t("../util/evented"),i=t("./style_layer"),o=t("./load_sprite"),a=t("../render/image_manager"),s=t("../render/glyph_manager"),l=t("./light"),u=t("../render/line_atlas"),c=t("../util/util"),p=t("../util/ajax"),h=t("../util/mapbox"),f=t("../util/browser"),d=t("../util/dispatcher"),m=t("./animation_loop"),v=t("./validate_style"),y=t("../source/source").getType,g=t("../source/source").setType,_=t("../source/query_features"),x=t("../source/source_cache"),b=t("../style-spec/reference/latest"),w=t("../style-spec/function"),T=t("../util/global_worker_pool"),S=t("../style-spec/deref"),z=t("../style-spec/diff"),A=t("../source/rtl_text_plugin"),C=c.pick(z.operations,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition"]),E=c.pick(z.operations,["setCenter","setZoom","setBearing","setPitch"]),k=function(t){function e(e,r,n){var i=this;t.call(this),n=c.extend({validate:"string"!=typeof e||!h.isMapboxURL(e)},n);var l=function(t,e){return i.map?i.map._transformRequest(t,e):{url:t}};this.map=r,this.animationLoop=r&&r.animationLoop||new m,this.dispatcher=new d(T(),this),this.imageManager=new a,this.glyphManager=new s(l,n.localIdeographFontFamily),this.lineAtlas=new u(256,512),this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory={},this._loaded=!1,c.bindAll(["_redoPlacement"],this),this._resetUpdates(),this.setEventedParent(r),this.fire("dataloading",{dataType:"style"});var y=this;this._rtlTextPluginCallback=A.registerForPluginAvailability(function(t){y.dispatcher.broadcast("loadRTLTextPlugin",t.pluginBlobURL,t.errorCallback);for(var e in y.sourceCaches)y.sourceCaches[e].reload()});var g=function(t,e){if(t)i.fire("error",{error:t});else if(e){if(n.validate&&v.emitErrors(i,v(e)))return;i._loaded=!0,i.stylesheet=e,i.updateClasses();for(var r in e.sources)i.addSource(r,e.sources[r],n);o(e.sprite,l,function(t,e){if(t)i.fire("error",t);else if(e)for(var r in e)i.imageManager.addImage(r,e[r]);i.imageManager.setLoaded(!0)}),i.glyphManager.setURL(e.glyphs),i._resolve(),i.fire("data",{dataType:"style"}),i.fire("style.load")}};"string"==typeof e?p.getJSON(l(h.normalizeStyleURL(e),p.ResourceType.Style),g):f.frame(function(){return g(null,e)}),this.on("data",function(t){if("source"===t.dataType&&"metadata"===t.sourceDataType){var e=i.sourceCaches[t.sourceId];if(e){var r=e.getSource();if(r&&r.vectorLayerIds)for(var n in i._layers){var o=i._layers[n];o.source===r.id&&i._validateLayer(o)}}}})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._validateLayer=function(t){var e=this.sourceCaches[t.source];if(e){var r=t.sourceLayer;if(r){var n=e.getSource();("geojson"===n.type||n.vectorLayerIds&&-1===n.vectorLayerIds.indexOf(r))&&this.fire("error",{error:new Error('Source layer "'+r+'" does not exist on source "'+n.id+'" as specified by style layer "'+t.id+'"')})}}},e.prototype.loaded=function(){var t=this;if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var e in t.sourceCaches)if(!t.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()},e.prototype._resolve=function(){var t=this,e=S(this.stylesheet.layers);this._order=e.map(function(t){return t.id}),this._layers={};for(var r=0,n=e;r<n.length;r+=1){var o=n[r];o=i.create(o),o.setEventedParent(t,{layer:{id:o.id}}),t._layers[o.id]=o}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new l(this.stylesheet.light)},e.prototype._serializeLayers=function(t){var e=this;return t.map(function(t){return e._layers[t].serialize()})},e.prototype._applyClasses=function(t,e){var r=this;if(this._loaded){t=t||[],e=e||{transition:!0};var n=this.stylesheet.transition||{},i=this._updatedAllPaintProps?this._layers:this._updatedPaintProps;for(var o in i){var a=r._layers[o],s=r._updatedPaintProps[o];if(r._updatedAllPaintProps||s.all)a.updatePaintTransitions(t,e,n,r.animationLoop,r.zoomHistory);else for(var l in s)r._layers[o].updatePaintTransition(l,t,e,n,r.animationLoop,r.zoomHistory)}this.light.updateLightTransitions(e,n,this.animationLoop)}},e.prototype._recalculate=function(t){var e=this;if(this._loaded){for(var r in e.sourceCaches)e.sourceCaches[r].used=!1;this._updateZoomHistory(t);for(var n=0,i=e._order;n<i.length;n+=1){var o=i[n],a=e._layers[o];a.recalculate(t),!a.isHidden(t)&&a.source&&(e.sourceCaches[a.source].used=!0)}this.light.recalculate(t),Math.floor(this.z)!==Math.floor(t)&&this.animationLoop.set(300),this.z=t}},e.prototype._updateZoomHistory=function(t){var e=this.zoomHistory;void 0===e.lastIntegerZoom&&(e.lastIntegerZoom=Math.floor(t),e.lastIntegerZoomTime=0,e.lastZoom=t),Math.floor(e.lastZoom)<Math.floor(t)?(e.lastIntegerZoom=Math.floor(t),e.lastIntegerZoomTime=Date.now()):Math.floor(e.lastZoom)>Math.floor(t)&&(e.lastIntegerZoom=Math.floor(t+1),e.lastIntegerZoomTime=Date.now()),e.lastZoom=t},e.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},e.prototype.update=function(t,e){var r=this;if(this._changed){var n=Object.keys(this._updatedLayers),i=Object.keys(this._removedLayers);(n.length||i.length||this._updatedSymbolOrder)&&this._updateWorkerLayers(n,i);for(var o in r._updatedSources){var a=r._updatedSources[o];"reload"===a?r._reloadSource(o):"clear"===a&&r._clearSource(o)}this._applyClasses(t,e),this._resetUpdates(),this.fire("data",{dataType:"style"})}},e.prototype._updateWorkerLayers=function(t,e){var r=this,n=this._updatedSymbolOrder?this._order.filter(function(t){return"symbol"===r._layers[t].type}):null;this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:e,symbolOrder:n})},e.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSymbolOrder=!1,this._updatedSources={},this._updatedPaintProps={},this._updatedAllPaintProps=!1},e.prototype.setState=function(t){var e=this;if(this._checkLoaded(),v.emitErrors(this,v(t)))return!1;t=c.clone(t),t.layers=S(t.layers);var r=z(this.serialize(),t).filter(function(t){return!(t.command in E)});if(0===r.length)return!1;var n=r.filter(function(t){return!(t.command in C)});if(n.length>0)throw new Error("Unimplemented: "+n.map(function(t){return t.command}).join(", ")+".");return r.forEach(function(t){"setTransition"!==t.command&&e[t.command].apply(e,t.args)}),this.stylesheet=t,!0},e.prototype.addImage=function(t,e){if(this.imageManager.getImage(t))return this.fire("error",{error:new Error("An image with this name already exists.")});this.imageManager.addImage(t,e),this.fire("data",{dataType:"style"})},e.prototype.removeImage=function(t){if(!this.imageManager.getImage(t))return this.fire("error",{error:new Error("No image with this name exists.")});this.imageManager.removeImage(t),this.fire("data",{dataType:"style"})},e.prototype.addSource=function(t,e,r){var n=this;if(this._checkLoaded(),void 0!==this.sourceCaches[t])throw new Error("There is already a source with this ID");if(!e.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(e).join(", ")+".");if(!(["vector","raster","geojson","video","image","canvas"].indexOf(e.type)>=0&&this._validate(v.source,"sources."+t,e,null,r))){var i=this.sourceCaches[t]=new x(t,e,this.dispatcher);i.style=this,i.setEventedParent(this,function(){return{isSourceLoaded:n.loaded(),source:i.serialize(),sourceId:t}}),i.onAdd(this.map),this._changed=!0}},e.prototype.removeSource=function(t){if(this._checkLoaded(),void 0===this.sourceCaches[t])throw new Error("There is no source with this ID");var e=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],e.fire("data",{sourceDataType:"metadata",dataType:"source",sourceId:t}),e.setEventedParent(null),e.clearTiles(),e.onRemove&&e.onRemove(this.map),this._changed=!0},e.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},e.prototype.addLayer=function(t,e,r){this._checkLoaded();var n=t.id;if("object"==typeof t.source&&(this.addSource(n,t.source),t=c.clone(t),t=c.extend(t,{source:n})),!this._validate(v.layer,"layers."+n,t,{arrayIndex:-1},r)){var o=i.create(t);this._validateLayer(o),o.setEventedParent(this,{layer:{id:n}});var a=e?this._order.indexOf(e):this._order.length;if(this._order.splice(a,0,n),this._layers[n]=o,this._removedLayers[n]&&o.source){var s=this._removedLayers[n];delete this._removedLayers[n],s.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o),"symbol"===o.type&&(this._updatedSymbolOrder=!0),this.updateClasses(n)}},e.prototype.moveLayer=function(t,e){this._checkLoaded(),this._changed=!0;var r=this._layers[t];if(!r)return void this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot be moved.")});var n=this._order.indexOf(t);this._order.splice(n,1);var i=e?this._order.indexOf(e):this._order.length;this._order.splice(i,0,t),"symbol"===r.type&&(this._updatedSymbolOrder=!0,r.source&&!this._updatedSources[r.source]&&(this._updatedSources[r.source]="reload",this.sourceCaches[r.source].pause()))},e.prototype.removeLayer=function(t){this._checkLoaded();var e=this._layers[t];if(!e)return void this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot be removed.")});e.setEventedParent(null);var r=this._order.indexOf(t);this._order.splice(r,1),"symbol"===e.type&&(this._updatedSymbolOrder=!0),this._changed=!0,this._removedLayers[t]=e,delete this._layers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t]},e.prototype.getLayer=function(t){return this._layers[t]},e.prototype.setLayerZoomRange=function(t,e,r){this._checkLoaded();var n=this.getLayer(t);if(!n)return void this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot have zoom extent.")});n.minzoom===e&&n.maxzoom===r||(null!=e&&(n.minzoom=e),null!=r&&(n.maxzoom=r),this._updateLayer(n))},e.prototype.setFilter=function(t,e){this._checkLoaded();var r=this.getLayer(t);if(!r)return void this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot be filtered.")});null!==e&&void 0!==e&&this._validate(v.filter,"layers."+r.id+".filter",e)||c.deepEqual(r.filter,e)||(r.filter=c.clone(e),this._updateLayer(r))},e.prototype.getFilter=function(t){return c.clone(this.getLayer(t).filter)},e.prototype.setLayoutProperty=function(t,e,r){this._checkLoaded();var n=this.getLayer(t);if(!n)return void this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")});c.deepEqual(n.getLayoutProperty(e),r)||(n.setLayoutProperty(e,r),this._updateLayer(n))},e.prototype.getLayoutProperty=function(t,e){return this.getLayer(t).getLayoutProperty(e)},e.prototype.setPaintProperty=function(t,e,r,n){this._checkLoaded();var i=this.getLayer(t);if(!i)return void this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")});if(!c.deepEqual(i.getPaintProperty(e,n),r)){var o=i.isPaintValueFeatureConstant(e);i.setPaintProperty(e,r,n),!(r&&w.isFunctionDefinition(r)&&"$zoom"!==r.property&&void 0!==r.property)&&o||this._updateLayer(i),this.updateClasses(t,e)}},e.prototype.getPaintProperty=function(t,e,r){return this.getLayer(t).getPaintProperty(e,r)},e.prototype.getTransition=function(){return c.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},e.prototype.updateClasses=function(t,e){if(this._changed=!0,t){var r=this._updatedPaintProps;r[t]||(r[t]={}),r[t][e||"all"]=!0}else this._updatedAllPaintProps=!0},e.prototype.serialize=function(){var t=this;return c.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:c.mapObject(this.sourceCaches,function(t){return t.serialize()}),layers:this._order.map(function(e){return t._layers[e].serialize()})},function(t){return void 0!==t})},e.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},e.prototype._flattenRenderedFeatures=function(t){for(var e=this,r=[],n=this._order.length-1;n>=0;n--)for(var i=e._order[n],o=0,a=t;o<a.length;o+=1){var s=a[o],l=s[i];if(l)for(var u=0,c=l;u<c.length;u+=1){var p=c[u];r.push(p)}}return r},e.prototype.queryRenderedFeatures=function(t,e,r,n){var i=this;e&&e.filter&&this._validate(v.filter,"queryRenderedFeatures.filter",e.filter);var o={};if(e&&e.layers){if(!Array.isArray(e.layers))return this.fire("error",{error:"parameters.layers must be an Array."}),[];for(var a=0,s=e.layers;a<s.length;a+=1){var l=s[a],u=i._layers[l];if(!u)return i.fire("error",{error:"The layer '"+l+"' does not exist in the map's style and cannot be queried for features."}),[];o[u.source]=!0}}var c=[];for(var p in i.sourceCaches)if(!e.layers||o[p]){var h=_.rendered(i.sourceCaches[p],i._layers,t,e,r,n);c.push(h)}return this._flattenRenderedFeatures(c)},e.prototype.querySourceFeatures=function(t,e){e&&e.filter&&this._validate(v.filter,"querySourceFeatures.filter",e.filter);var r=this.sourceCaches[t];return r?_.source(r,e):[]},e.prototype.addSourceType=function(t,e,r){return y(t)?r(new Error('A source type called "'+t+'" already exists.')):(g(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},r):r(null,null))},e.prototype.getLight=function(){return this.light.getLight()},e.prototype.setLight=function(t,e){this._checkLoaded();var r=this.light.getLight(),n=!1;for(var i in t)if(!c.deepEqual(t[i],r[i])){n=!0;break}if(n){var o=this.stylesheet.transition||{};this.light.setLight(t),this.light.updateLightTransitions(e||{transition:!0},o,this.animationLoop)}},e.prototype._validate=function(t,e,r,n,i){return(!i||!1!==i.validate)&&v.emitErrors(this,t.call(v,c.extend({key:e,style:this.serialize(),value:r,styleSpec:b},n)))},e.prototype._remove=function(){var t=this;A.evented.off("pluginAvailable",this._rtlTextPluginCallback);for(var e in t.sourceCaches)t.sourceCaches[e].clearTiles();this.dispatcher.remove()},e.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},e.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},e.prototype._updateSources=function(t){var e=this;for(var r in e.sourceCaches)e.sourceCaches[r].update(t)},e.prototype._redoPlacement=function(){var t=this;for(var e in t.sourceCaches)t.sourceCaches[e].redoPlacement()},e.prototype.getImages=function(t,e,r){this.imageManager.getImages(e.icons,r)},e.prototype.getGlyphs=function(t,e,r){this.glyphManager.getGlyphs(e.stacks,r)},e}(n);e.exports=k},{"../render/glyph_manager":75,"../render/image_manager":77,"../render/line_atlas":78,"../source/query_features":94,"../source/rtl_text_plugin":96,"../source/source":97,"../source/source_cache":98,"../style-spec/deref":107,"../style-spec/diff":108,"../style-spec/function":112,"../style-spec/reference/latest":123,"../util/ajax":201,"../util/browser":202,"../util/dispatcher":208,"../util/evented":210,"../util/global_worker_pool":212,"../util/mapbox":217,"../util/util":223,"./animation_loop":150,"./light":151,"./load_sprite":153,"./style_layer":158,"./validate_style":166}],157:[function(t,e,r){"use strict";var n=t("../style-spec/function"),i=t("../util/util"),o=function(t,e){var r=this;if(this.value=i.clone(e),this.isFunction=n.isFunctionDefinition(e),this.json=JSON.stringify(this.value),this.minimum=t.minimum,this.function=n(this.value,t),this.isFeatureConstant=this.function.isFeatureConstant,this.isZoomConstant=this.function.isZoomConstant,this.isFeatureConstant||this.isZoomConstant){if(!this.isZoomConstant){this.stopZoomLevels=[];for(var o=0,a=r.value.stops;o<a.length;o+=1){var s=a[o];r.stopZoomLevels.indexOf(s[0])<0&&r.stopZoomLevels.push(s[0])}}}else{this.stopZoomLevels=[];for(var l=[],u=0,c=r.value.stops;u<c.length;u+=1){var p=c[u],h=p[0].zoom;r.stopZoomLevels.indexOf(h)<0&&(r.stopZoomLevels.push(h),l.push([h,l.length]))}this._functionInterpolationT=n({type:"exponential",stops:l,base:e.base},{type:"number"})}};o.prototype.calculate=function(t,e){var r=this.function(t&&t.zoom,e||{});return void 0!==this.minimum&&r<this.minimum?this.minimum:r},o.prototype.calculateInterpolationT=function(t){return this.isFeatureConstant||this.isZoomConstant?0:this._functionInterpolationT(t&&t.zoom,{})},e.exports=o},{"../style-spec/function":112,"../util/util":223}],158:[function(t,e,r){"use strict";function n(t){return t.value}var i=t("../util/util"),o=t("./style_transition"),a=t("./style_declaration"),s=t("../style-spec/reference/latest"),l=t("./validate_style"),u=t("./../style-spec/util/parse_color"),c=t("../util/evented"),p=function(t){function e(e){var r=this;t.call(this),this.id=e.id,this.metadata=e.metadata,this.type=e.type,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),this.paint={},this.layout={},this._paintSpecifications=s["paint_"+this.type],this._layoutSpecifications=s["layout_"+this.type],this._paintTransitions={},this._paintTransitionOptions={},this._paintDeclarations={},this._layoutDeclarations={},this._layoutFunctions={};var n,i,o={validate:!1};for(var a in e){var l=a.match(/^paint(?:\.(.*))?$/);if(l){var u=l[1]||"";for(n in e[a])r.setPaintProperty(n,e[a][n],u,o)}}for(i in e.layout)r.setLayoutProperty(i,e.layout[i],o);for(n in r._paintSpecifications)r.paint[n]=r.getPaintValue(n);for(i in r._layoutSpecifications)r._updateLayoutValue(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setLayoutProperty=function(t,e,r){if(null==e)delete this._layoutDeclarations[t];else{var n="layers."+this.id+".layout."+t;if(this._validate(l.layoutProperty,n,t,e,r))return;this._layoutDeclarations[t]=new a(this._layoutSpecifications[t],e)}this._updateLayoutValue(t)},e.prototype.getLayoutProperty=function(t){return this._layoutDeclarations[t]&&this._layoutDeclarations[t].value},e.prototype.getLayoutValue=function(t,e,r){var n=this._layoutSpecifications[t],i=this._layoutDeclarations[t];return i?i.calculate(e,r):n.default},e.prototype.setPaintProperty=function(t,e,r,n){var o="layers."+this.id+(r?'["paint.'+r+'"].':".paint.")+t;if(i.endsWith(t,"-transition"))if(this._paintTransitionOptions[r||""]||(this._paintTransitionOptions[r||""]={}),null===e||void 0===e)delete this._paintTransitionOptions[r||""][t];else{if(this._validate(l.paintProperty,o,t,e,n))return;this._paintTransitionOptions[r||""][t]=e}else if(this._paintDeclarations[r||""]||(this._paintDeclarations[r||""]={}),null===e||void 0===e)delete this._paintDeclarations[r||""][t];else{if(this._validate(l.paintProperty,o,t,e,n))return;this._paintDeclarations[r||""][t]=new a(this._paintSpecifications[t],e)}},e.prototype.getPaintProperty=function(t,e){return e=e||"",i.endsWith(t,"-transition")?this._paintTransitionOptions[e]&&this._paintTransitionOptions[e][t]:this._paintDeclarations[e]&&this._paintDeclarations[e][t]&&this._paintDeclarations[e][t].value},e.prototype.getPaintValue=function(t,e,r){var n=this._paintSpecifications[t],i=this._paintTransitions[t];return i?i.calculate(e,r):"color"===n.type&&n.default?u(n.default):n.default},e.prototype.getPaintValueStopZoomLevels=function(t){var e=this._paintTransitions[t];return e?e.declaration.stopZoomLevels:[]},e.prototype.getLayoutValueStopZoomLevels=function(t){var e=this._layoutDeclarations[t];return e?e.stopZoomLevels:[]},e.prototype.getPaintInterpolationT=function(t,e){return this._paintTransitions[t].declaration.calculateInterpolationT(e)},e.prototype.getLayoutInterpolationT=function(t,e){return this._layoutDeclarations[t].calculateInterpolationT(e)},e.prototype.isPaintValueFeatureConstant=function(t){var e=this._paintTransitions[t];return!e||e.declaration.isFeatureConstant},e.prototype.isLayoutValueFeatureConstant=function(t){var e=this._layoutDeclarations[t];return!e||e.isFeatureConstant},e.prototype.isPaintValueZoomConstant=function(t){var e=this._paintTransitions[t];return!e||e.declaration.isZoomConstant},e.prototype.isLayoutValueZoomConstant=function(t){var e=this._layoutDeclarations[t];return!e||e.isZoomConstant},e.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.layout.visibility},e.prototype.updatePaintTransitions=function(t,e,r,n,o){for(var a=this,s=i.extend({},this._paintDeclarations[""]),l=0;l<t.length;l++)i.extend(s,a._paintDeclarations[t[l]]);var u;for(u in s)a._applyPaintDeclaration(u,s[u],e,r,n,o);for(u in a._paintTransitions)u in s||a._applyPaintDeclaration(u,null,e,r,n,o)},e.prototype.updatePaintTransition=function(t,e,r,n,i,o){for(var a=this,s=this._paintDeclarations[""][t],l=0;l<e.length;l++){var u=a._paintDeclarations[e[l]];u&&u[t]&&(s=u[t])}this._applyPaintDeclaration(t,s,r,n,i,o)},e.prototype.recalculate=function(t){var e=this;for(var r in e._paintTransitions)e.paint[r]=e.getPaintValue(r,{zoom:t});for(var n in e._layoutFunctions)e.layout[n]=e.getLayoutValue(n,{zoom:t})},e.prototype.serialize=function(){var t=this,e={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:i.mapObject(this._layoutDeclarations,n)};for(var r in t._paintDeclarations)e[""===r?"paint":"paint."+r]=i.mapObject(t._paintDeclarations[r],n);return i.filterObject(e,function(t,e){return void 0!==t&&!("layout"===e&&!Object.keys(t).length)})},e.prototype._applyPaintDeclaration=function(t,e,r,n,s,l){var u=r.transition?this._paintTransitions[t]:void 0,c=this._paintSpecifications[t];if(null!==e&&void 0!==e||(e=new a(c,c.default)),!u||u.declaration.json!==e.json){var p=i.extend({duration:300,delay:0},n,this.getPaintProperty(t+"-transition")),h=this._paintTransitions[t]=new o(c,e,u,p,l);h.instant()||(h.loopID=s.set(h.endTime-Date.now())),u&&s.cancel(u.loopID)}},e.prototype._updateLayoutValue=function(t){var e=this._layoutDeclarations[t];e&&e.isFunction?this._layoutFunctions[t]=!0:(delete this._layoutFunctions[t],this.layout[t]=this.getLayoutValue(t))},e.prototype._validate=function(t,e,r,n,i){return(!i||!1!==i.validate)&&l.emitErrors(this,t.call(l,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:s,style:{glyphs:!0,sprite:!0}}))},e.prototype.has3DPass=function(){return!1},e}(c);e.exports=p;var h={circle:t("./style_layer/circle_style_layer"),fill:t("./style_layer/fill_style_layer"),"fill-extrusion":t("./style_layer/fill_extrusion_style_layer"),line:t("./style_layer/line_style_layer"),symbol:t("./style_layer/symbol_style_layer"),background:p,raster:p};p.create=function(t){return new h[t.type](t)}},{"../style-spec/reference/latest":123,"../util/evented":210,"../util/util":223,"./../style-spec/util/parse_color":128,"./style_declaration":157,"./style_layer/circle_style_layer":159,"./style_layer/fill_extrusion_style_layer":160,"./style_layer/fill_style_layer":161,"./style_layer/line_style_layer":162,"./style_layer/symbol_style_layer":163,"./style_transition":165,"./validate_style":166}],159:[function(t,e,r){"use strict";var n=t("../style_layer"),i=t("../../data/bucket/circle_bucket"),o=t("../../util/intersection_tests"),a=o.multiPolygonIntersectsBufferedMultiPoint,s=t("../query_utils"),l=s.getMaximumPaintValue,u=s.translateDistance,c=s.translate,p=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new i(t)},e.prototype.queryRadius=function(t){return l("circle-radius",this,t)+u(this.paint["circle-translate"])},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,o){var s=c(t,this.getPaintValue("circle-translate",{zoom:n},e.properties),this.getPaintValue("circle-translate-anchor",{zoom:n},e.properties),i,o),l=this.getPaintValue("circle-radius",{zoom:n},e.properties)*o;return a(s,r,l)},e}(n);e.exports=p},{"../../data/bucket/circle_bucket":43,"../../util/intersection_tests":214,"../query_utils":155,"../style_layer":158}],160:[function(t,e,r){"use strict";var n=t("../style_layer"),i=t("../../data/bucket/fill_extrusion_bucket"),o=t("../../util/intersection_tests"),a=o.multiPolygonIntersectsMultiPolygon,s=t("../query_utils"),l=s.translateDistance,u=s.translate,c=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getPaintValue=function(e,r,n){var i=t.prototype.getPaintValue.call(this,e,r,n);return"fill-extrusion-color"===e&&i&&(i[3]=1),i},e.prototype.createBucket=function(t){return new i(t)},e.prototype.queryRadius=function(){return l(this.paint["fill-extrusion-translate"])},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,o){var s=u(t,this.getPaintValue("fill-extrusion-translate",{zoom:n},e.properties),this.getPaintValue("fill-extrusion-translate-anchor",{zoom:n},e.properties),i,o);return a(s,r)},e.prototype.has3DPass=function(){return 0!==this.paint["fill-extrusion-opacity"]&&"none"!==this.layout.visibility},e}(n);e.exports=c},{"../../data/bucket/fill_extrusion_bucket":45,"../../util/intersection_tests":214,"../query_utils":155,"../style_layer":158}],161:[function(t,e,r){"use strict";var n=t("../style_layer"),i=t("../../data/bucket/fill_bucket"),o=t("../../util/intersection_tests"),a=o.multiPolygonIntersectsMultiPolygon,s=t("../query_utils"),l=s.translateDistance,u=s.translate,c=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getPaintValue=function(e,r,n){var i=this;if("fill-outline-color"===e){if(void 0===this.getPaintProperty("fill-outline-color"))return t.prototype.getPaintValue.call(this,"fill-color",r,n);for(var o=this._paintTransitions["fill-outline-color"];o;){if(!(o&&o.declaration&&o.declaration.value))return t.prototype.getPaintValue.call(i,"fill-color",r,n);o=o.oldTransition}}return t.prototype.getPaintValue.call(this,e,r,n)},e.prototype.getPaintValueStopZoomLevels=function(e){return"fill-outline-color"===e&&void 0===this.getPaintProperty("fill-outline-color")?t.prototype.getPaintValueStopZoomLevels.call(this,"fill-color"):t.prototype.getPaintValueStopZoomLevels.call(this,e)},e.prototype.getPaintInterpolationT=function(e,r){return"fill-outline-color"===e&&void 0===this.getPaintProperty("fill-outline-color")?t.prototype.getPaintInterpolationT.call(this,"fill-color",r):t.prototype.getPaintInterpolationT.call(this,e,r)},e.prototype.isPaintValueFeatureConstant=function(e){return"fill-outline-color"===e&&void 0===this.getPaintProperty("fill-outline-color")?t.prototype.isPaintValueFeatureConstant.call(this,"fill-color"):t.prototype.isPaintValueFeatureConstant.call(this,e)},e.prototype.isPaintValueZoomConstant=function(e){return"fill-outline-color"===e&&void 0===this.getPaintProperty("fill-outline-color")?t.prototype.isPaintValueZoomConstant.call(this,"fill-color"):t.prototype.isPaintValueZoomConstant.call(this,e)},e.prototype.createBucket=function(t){return new i(t)},e.prototype.queryRadius=function(){return l(this.paint["fill-translate"])},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,o){var s=u(t,this.getPaintValue("fill-translate",{zoom:n},e.properties),this.getPaintValue("fill-translate-anchor",{zoom:n},e.properties),i,o);return a(s,r)},e}(n);e.exports=c},{"../../data/bucket/fill_bucket":44,"../../util/intersection_tests":214,"../query_utils":155,"../style_layer":158}],162:[function(t,e,r){"use strict";function n(t,e){return e>0?e+2*t:t}function i(t,e){for(var r=[],n=new o(0,0),i=0;i<t.length;i++){for(var a=t[i],s=[],l=0;l<a.length;l++){var u=a[l-1],c=a[l],p=a[l+1],h=0===l?n:c.sub(u)._unit()._perp(),f=l===a.length-1?n:p.sub(c)._unit()._perp(),d=h._add(f)._unit(),m=d.x*f.x+d.y*f.y;d._mult(1/m),s.push(d._mult(e)._add(c))}r.push(s)}return r}var o=t("@mapbox/point-geometry"),a=t("../style_layer"),s=t("../../data/bucket/line_bucket"),l=t("../../util/intersection_tests"),u=l.multiPolygonIntersectsBufferedMultiLine,c=t("../query_utils"),p=c.getMaximumPaintValue,h=c.translateDistance,f=c.translate,d=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new s(t)},e.prototype.queryRadius=function(t){var e=t,r=n(p("line-width",this,e),p("line-gap-width",this,e)),i=p("line-offset",this,e);return r/2+Math.abs(i)+h(this.paint["line-translate"])},e.prototype.queryIntersectsFeature=function(t,e,r,o,a,s){var l=f(t,this.getPaintValue("line-translate",{zoom:o},e.properties),this.getPaintValue("line-translate-anchor",{zoom:o},e.properties),a,s),c=s/2*n(this.getPaintValue("line-width",{zoom:o},e.properties),this.getPaintValue("line-gap-width",{zoom:o},e.properties)),p=this.getPaintValue("line-offset",{zoom:o},e.properties);return p&&(r=i(r,p*s)),u(l,r,c)},e}(a);e.exports=d},{"../../data/bucket/line_bucket":46,"../../util/intersection_tests":214,"../query_utils":155,"../style_layer":158,"@mapbox/point-geometry":2}],163:[function(t,e,r){"use strict";var n=t("../style_layer"),i=t("../../data/bucket/symbol_bucket"),o=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLayoutValue=function(e,r,n){var i=t.prototype.getLayoutValue.call(this,e,r,n);if("auto"!==i)return i;switch(e){case"text-rotation-alignment":case"icon-rotation-alignment":return"line"===this.getLayoutValue("symbol-placement",r,n)?"map":"viewport";case"text-pitch-alignment":return this.getLayoutValue("text-rotation-alignment",r,n);case"icon-pitch-alignment":return this.getLayoutValue("icon-rotation-alignment",r,n);default:return i}},e.prototype.createBucket=function(t){return new i(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e}(n);e.exports=o},{"../../data/bucket/symbol_bucket":47,"../style_layer":158}],164:[function(t,e,r){"use strict";var n=t("./style_layer"),i=t("../util/util"),o=t("../style-spec/feature_filter"),a=t("../style-spec/group_by_layout"),s=function(t){t&&this.replace(t)};s.prototype.replace=function(t){var e=this;this.symbolOrder=[];for(var r=0,n=t;r<n.length;r+=1){var i=n[r];"symbol"===i.type&&e.symbolOrder.push(i.id)}this._layerConfigs={},this._layers={},this.update(t,[])},s.prototype.update=function(t,e,r){for(var s=this,l=0,u=t;l<u.length;l+=1){var c=u[l];s._layerConfigs[c.id]=c;var p=s._layers[c.id]=n.create(c);p.updatePaintTransitions({},{transition:!1}),p.filter=o(p.filter)}for(var h=0,f=e;h<f.length;h+=1){var d=f[h];delete s._layerConfigs[d],delete s._layers[d]}r&&(this.symbolOrder=r),this.familiesBySource={};for(var m=a(i.values(this._layerConfigs)),v=0,y=m;v<y.length;v+=1){var g=y[v],_=g.map(function(t){return s._layers[t.id]}),x=_[0];if(!x.layout||"none"!==x.layout.visibility){var b=x.source||"",w=s.familiesBySource[b];w||(w=s.familiesBySource[b]={});var T=x.sourceLayer||"_geojsonTileLayer",S=w[T];S||(S=w[T]=[]),S.push(_)}}},e.exports=s},{"../style-spec/feature_filter":110,"../style-spec/group_by_layout":113,"../util/util":223,"./style_layer":158}],165:[function(t,e,r){"use strict";function n(t,e,r){if(void 0!==t&&void 0!==e)return{from:t.to,fromScale:t.toScale,to:e.to,toScale:e.toScale,t:r}}var i=t("../util/util"),o=t("../style-spec/util/interpolate"),a={lastIntegerZoom:0,lastIntegerZoomTime:0,lastZoom:0},s=function(t,e,r,i,s){this.declaration=e,this.startTime=this.endTime=(new Date).getTime(),this.oldTransition=r,this.duration=i.duration||0,this.delay=i.delay||0,this.zoomTransitioned="piecewise-constant"===t.function&&t.transition,this.interp=this.zoomTransitioned?n:o[t.type],this.zoomHistory=s||a,this.instant()||(this.endTime=this.startTime+this.duration+this.delay),r&&r.endTime<=this.startTime&&delete r.oldTransition};s.prototype.instant=function(){return!this.oldTransition||!this.interp||0===this.duration&&0===this.delay},s.prototype.calculate=function(t,e,r){var n=this._calculateTargetValue(t,e);if(this.instant())return n;if((r=r||Date.now())>=this.endTime)return n;var o=this.oldTransition.calculate(t,e,this.startTime),a=i.easeCubicInOut((r-this.startTime-this.delay)/this.duration);return this.interp(o,n,a)},s.prototype._calculateTargetValue=function(t,e){if(!this.zoomTransitioned)return this.declaration.calculate(t,e);var r=t.zoom,n=this.zoomHistory.lastIntegerZoom,i=r>n?2:.5,a=this.declaration.calculate({zoom:r>n?r-1:r+1},e),s=this.declaration.calculate({zoom:r},e),l=Math.min((Date.now()-this.zoomHistory.lastIntegerZoomTime)/this.duration,1),u=Math.abs(r-n),c=o(l,1,u);return void 0!==a&&void 0!==s?{from:a,fromScale:i,to:s,toScale:1,t:c}:void 0},e.exports=s},{"../style-spec/util/interpolate":127,"../util/util":223}],166:[function(t,e,r){"use strict";e.exports=t("../style-spec/validate_style.min"),e.exports.emitErrors=function(t,e){if(e&&e.length){for(var r=0,n=e;r<n.length;r+=1){var i=n[r],o=i.message;t.fire("error",{error:new Error(o)})}return!0}return!1}},{"../style-spec/validate_style.min":149}],167:[function(t,e,r){"use strict";var n=t("@mapbox/point-geometry"),i=function(t){function e(e,r,n,i){t.call(this,e,r),this.angle=n,void 0!==i&&(this.segment=i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(n);e.exports=i},{"@mapbox/point-geometry":2}],168:[function(t,e,r){"use strict";function n(t,e,r,n,i){if(void 0===e.segment)return!0;for(var o=e,a=e.segment+1,s=0;s>-r/2;){if(--a<0)return!1;s-=t[a].dist(o),o=t[a]}s+=t[a].dist(t[a+1]),a++;for(var l=[],u=0;s<r/2;){var c=t[a-1],p=t[a],h=t[a+1];if(!h)return!1;var f=c.angleTo(p)-p.angleTo(h);for(f=Math.abs((f+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:f}),u+=f;s-l[0].distance>n;)u-=l.shift().angleDelta;if(u>i)return!1;a++,s+=p.dist(h)}return!0}e.exports=n},{}],169:[function(t,e,r){"use strict";function n(t,e,r,n,o){for(var a=[],s=0;s<t.length;s++)for(var l=t[s],u=void 0,c=0;c<l.length-1;c++){var p=l[c],h=l[c+1];p.x<e&&h.x<e||(p.x<e?p=new i(e,p.y+(h.y-p.y)*((e-p.x)/(h.x-p.x)))._round():h.x<e&&(h=new i(e,p.y+(h.y-p.y)*((e-p.x)/(h.x-p.x)))._round()),p.y<r&&h.y<r||(p.y<r?p=new i(p.x+(h.x-p.x)*((r-p.y)/(h.y-p.y)),r)._round():h.y<r&&(h=new i(p.x+(h.x-p.x)*((r-p.y)/(h.y-p.y)),r)._round()),p.x>=n&&h.x>=n||(p.x>=n?p=new i(n,p.y+(h.y-p.y)*((n-p.x)/(h.x-p.x)))._round():h.x>=n&&(h=new i(n,p.y+(h.y-p.y)*((n-p.x)/(h.x-p.x)))._round()),p.y>=o&&h.y>=o||(p.y>=o?p=new i(p.x+(h.x-p.x)*((o-p.y)/(h.y-p.y)),o)._round():h.y>=o&&(h=new i(p.x+(h.x-p.x)*((o-p.y)/(h.y-p.y)),o)._round()),u&&p.equals(u[u.length-1])||(u=[p],a.push(u)),u.push(h)))))}return a}var i=t("@mapbox/point-geometry");e.exports=n},{"@mapbox/point-geometry":2}],170:[function(t,e,r){"use strict";var n=t("../util/struct_array"),i=t("@mapbox/point-geometry"),o=n({members:[{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"offsetX"},{type:"Int16",name:"offsetY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Float32",name:"unadjustedMaxScale"},{type:"Float32",name:"maxScale"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"bbox0"},{type:"Int16",name:"bbox1"},{type:"Int16",name:"bbox2"},{type:"Int16",name:"bbox3"},{type:"Float32",name:"placementScale"}]});Object.defineProperty(o.prototype.StructType.prototype,"anchorPoint",{get:function(){return new i(this.anchorPointX,this.anchorPointY)}}),e.exports=o},{"../util/struct_array":220,"@mapbox/point-geometry":2}],171:[function(t,e,r){"use strict";var n=function(t,e,r,n,i,o,a,s,l,u,c){var p=a.top*s-l,h=a.bottom*s+l,f=a.left*s-l,d=a.right*s+l;if(this.boxStartIndex=t.length,u){var m=h-p,v=d-f;if(m>0)if(m=Math.max(10*s,m),c){var y=e[r.segment+1].sub(e[r.segment])._unit()._mult(v),g=[r.sub(y),r.add(y)];this._addLineCollisionBoxes(t,g,r,0,v,m,n,i,o)}else this._addLineCollisionBoxes(t,e,r,r.segment,v,m,n,i,o)}else t.emplaceBack(r.x,r.y,0,0,f,p,d,h,1/0,1/0,n,i,o,0,0,0,0,0);this.boxEndIndex=t.length};n.prototype._addLineCollisionBoxes=function(t,e,r,n,i,o,a,s,l){var u=o/2,c=Math.floor(i/u),p=Math.floor(c/2),h=-o/2,f=r,d=n+1,m=h,v=-i/2,y=v-i/8;do{if(--d<0){if(m>v)return;d=0;break}m-=e[d].dist(f),f=e[d]}while(m>y);for(var g=e[d].dist(e[d+1]),_=-p;_<c+p;_++){var x=_*u,b=v+x;if(x<0&&(b+=x),x>i&&(b+=x-i),!(b<m)){for(;m+g<b;){if(m+=g,++d+1>=e.length)return;g=e[d].dist(e[d+1])}var w=b-m,T=e[d],S=e[d+1],z=S.sub(T)._unit()._mult(w)._add(T)._round(),A=Math.max(Math.abs(b-h)-u/2,0),C=i/2/A;(_<0||_>=c)&&(C=Math.min(C,.99)),t.emplaceBack(z.x,z.y,z.x-r.x,z.y-r.y,-o/2,-o/2,o/2,o/2,C,C,a,s,l,0,0,0,0,0)}}},e.exports=n},{}],172:[function(t,e,r){"use strict";var n=t("@mapbox/point-geometry"),i=t("../data/extent"),o=t("grid-index"),a=t("../util/intersection_tests"),s=function(t,e,r,n,a,s,l){void 0===s&&(s=new o(i,12,6)),void 0===l&&(l=new o(i,12,0)),this.angle=t,this.pitch=e,this.cameraToCenterDistance=r,this.cameraToTileDistance=n,this.grid=s,this.ignoredGrid=l,this.perspectiveRatio=1+.5*(n/r-1),this.minScale=.5/this.perspectiveRatio,this.maxScale=2/this.perspectiveRatio;var u=Math.sin(this.angle),c=Math.cos(this.angle);this.rotationMatrix=[c,-u,u,c],this.reverseRotationMatrix=[c,u,-u,c],this.yStretch=Math.max(1,n/(r*Math.cos(e/180*Math.PI))),this.collisionBoxArray=a,0===a.length&&(a.emplaceBack(),a.emplaceBack(0,0,0,0,0,-i,0,i,1/0,1/0,0,0,0,0,0,0,0,0,0),a.emplaceBack(i,0,0,0,0,-i,0,i,1/0,1/0,0,0,0,0,0,0,0,0,0),a.emplaceBack(0,0,0,0,-i,0,i,0,1/0,1/0,0,0,0,0,0,0,0,0,0),a.emplaceBack(0,i,0,0,-i,0,i,0,1/0,1/0,0,0,0,0,0,0,0,0,0)),this.tempCollisionBox=a.get(0),this.edges=[a.get(1),a.get(2),a.get(3),a.get(4)]};s.deserialize=function(t,e){return new s(t.angle,t.pitch,t.cameraToCenterDistance,t.cameraToTileDistance,e,new o(t.grid),new o(t.ignoredGrid))},s.prototype.serialize=function(t){var e=this.grid.toArrayBuffer(),r=this.ignoredGrid.toArrayBuffer();return t&&(t.push(e),t.push(r)),{angle:this.angle,pitch:this.pitch,cameraToCenterDistance:this.cameraToCenterDistance,cameraToTileDistance:this.cameraToTileDistance,grid:e,ignoredGrid:r}},s.prototype.placeCollisionFeature=function(t,e,r){for(var i=this,o=this.collisionBoxArray,a=this.minScale,s=this.rotationMatrix,l=this.yStretch,u=t.boxStartIndex;u<t.boxEndIndex;u++){var c=o.get(u),p=c.anchorPoint._matMult(s),h=p.x,f=p.y,d=h+c.x1*i.perspectiveRatio,m=f+c.y1*l*i.perspectiveRatio,v=h+c.x2*i.perspectiveRatio,y=f+c.y2*l*i.perspectiveRatio;c.bbox0=d,c.bbox1=m,c.bbox2=v,c.bbox3=y;var g=new n(c.offsetX,c.offsetY)._matMult(s),_=g.x*g.x,x=g.y*g.y,b=x*l*l,w=Math.sqrt((_+b)/(_+x))||1;if(c.maxScale=c.unadjustedMaxScale*w,!e)for(var T=i.grid.query(d,m,v,y),S=0;S<T.length;S++){var z=o.get(T[S]),A=z.anchorPoint._matMult(s);if((a=i.getPlacementScale(a,p,c,A,z))>=i.maxScale)return a}if(r){var C=void 0;if(i.angle){var E=i.reverseRotationMatrix,k=new n(c.x1,c.y1).matMult(E),M=new n(c.x2,c.y1).matMult(E),L=new n(c.x1,c.y2).matMult(E),I=new n(c.x2,c.y2).matMult(E);C=i.tempCollisionBox,C.anchorPointX=c.anchorPoint.x,C.anchorPointY=c.anchorPoint.y,C.x1=Math.min(k.x,M.x,L.x,I.x),C.y1=Math.min(k.y,M.x,L.x,I.x),C.x2=Math.max(k.x,M.x,L.x,I.x),C.y2=Math.max(k.y,M.x,L.x,I.x),C.maxScale=c.maxScale}else C=c;for(var P=0;P<this.edges.length;P++){var R=i.edges[P];if((a=i.getPlacementScale(a,c.anchorPoint,C,R.anchorPoint,R))>=i.maxScale)return a}}}return a},s.prototype.queryRenderedSymbols=function(t,e){var r={},i=[];if(0===t.length||0===this.grid.keys.length&&0===this.ignoredGrid.keys.length)return i;for(var o=this.collisionBoxArray,s=this.rotationMatrix,l=this.yStretch,u=[],c=1/0,p=1/0,h=-1/0,f=-1/0,d=0;d<t.length;d++)for(var m=t[d],v=0;v<m.length;v++){var y=m[v].matMult(s);c=Math.min(c,y.x),p=Math.min(p,y.y),h=Math.max(h,y.x),f=Math.max(f,y.y),u.push(y)}for(var g=this.grid.query(c,p,h,f),_=this.ignoredGrid.query(c,p,h,f),x=0;x<_.length;x++)g.push(_[x]);for(var b=e/this.perspectiveRatio,w=Math.pow(2,Math.ceil(Math.log(b)/Math.LN2*10)/10),T=0;T<g.length;T++){var S=o.get(g[T]),z=S.sourceLayerIndex,A=S.featureIndex;if(void 0===r[z]&&(r[z]={}),!r[z][A]&&!(w<S.placementScale||w>S.maxScale)){var C=S.anchorPoint.matMult(s),E=C.x+S.x1/b,k=C.y+S.y1/b*l,M=C.x+S.x2/b,L=C.y+S.y2/b*l,I=[new n(E,k),new n(M,k),new n(M,L),new n(E,L)];a.polygonIntersectsPolygon(u,I)&&(r[z][A]=!0,i.push(g[T]))}}return i},s.prototype.getPlacementScale=function(t,e,r,n,i){var o=e.x-n.x,a=e.y-n.y,s=(i.x1-r.x2)/o,l=(i.x2-r.x1)/o,u=(i.y1-r.y2)*this.yStretch/a,c=(i.y2-r.y1)*this.yStretch/a;(isNaN(s)||isNaN(l))&&(s=l=1),(isNaN(u)||isNaN(c))&&(u=c=1);var p=Math.min(Math.max(s,l),Math.max(u,c)),h=i.maxScale,f=r.maxScale;return p>h&&(p=h),p>f&&(p=f),p>t&&p>=i.placementScale&&(t=p),t},s.prototype.insertCollisionFeature=function(t,e,r){for(var n=this,i=r?this.ignoredGrid:this.grid,o=this.collisionBoxArray,a=t.boxStartIndex;a<t.boxEndIndex;a++){var s=o.get(a);s.placementScale=e,e<n.maxScale&&(1===n.perspectiveRatio||s.maxScale>=1)&&i.insert(a,s.bbox0,s.bbox1,s.bbox2,s.bbox3)}},e.exports=s},{"../data/extent":48,"../util/intersection_tests":214,"@mapbox/point-geometry":2,"grid-index":22}],173:[function(t,e,r){"use strict";function n(t,e,r,n,o,a,s,l,u){var c=n?.6*a*s:0,p=Math.max(n?n.right-n.left:0,o?o.right-o.left:0),h=0===t[0].x||t[0].x===u||0===t[0].y||t[0].y===u;e-p*s<e/4&&(e=p*s+e/4);var f=2*a;return i(t,h?e/2*l%e:(p/2+f)*s*l%e,e,c,r,p*s,h,!1,u)}function i(t,e,r,n,l,u,c,p,h){for(var f=u/2,d=0,m=0;m<t.length-1;m++)d+=t[m].dist(t[m+1]);for(var v=0,y=e-r,g=[],_=0;_<t.length-1;_++){for(var x=t[_],b=t[_+1],w=x.dist(b),T=b.angleTo(x);y+r<v+w;){y+=r;var S=(y-v)/w,z=o(x.x,b.x,S),A=o(x.y,b.y,S);if(z>=0&&z<h&&A>=0&&A<h&&y-f>=0&&y+f<=d){var C=new a(z,A,T,_);C._round(),n&&!s(t,C,u,n,l)||g.push(C)}}v+=w}return p||g.length||c||(g=i(t,v/2,r,n,l,u,c,!0,h)),g}var o=t("../style-spec/util/interpolate"),a=t("../symbol/anchor"),s=t("./check_max_angle");e.exports=n},{"../style-spec/util/interpolate":127,"../symbol/anchor":167,"./check_max_angle":168}],174:[function(t,e,r){"use strict";e.exports=function(t){function e(e){s.push(t[e]),l++}function r(t,e,r){var n=a[t];return delete a[t],a[e]=n,s[n].geometry[0].pop(),s[n].geometry[0]=s[n].geometry[0].concat(r[0]),n}function n(t,e,r){var n=o[e];return delete o[e],o[t]=n,s[n].geometry[0].shift(),s[n].geometry[0]=r[0].concat(s[n].geometry[0]),n}function i(t,e,r){var n=r?e[0][e[0].length-1]:e[0][0];return t+":"+n.x+":"+n.y}for(var o={},a={},s=[],l=0,u=0;u<t.length;u++){var c=t[u],p=c.geometry,h=c.text;if(h){var f=i(h,p),d=i(h,p,!0);if(f in a&&d in o&&a[f]!==o[d]){var m=n(f,d,p),v=r(f,d,s[m].geometry);delete o[f],delete a[d],a[i(h,s[v].geometry,!0)]=v,s[m].geometry=null}else f in a?r(f,d,p):d in o?n(f,d,p):(e(u),o[f]=l-1,a[d]=l-1)}else e(u)}return s.filter(function(t){return t.geometry})}},{}],175:[function(t,e,r){"use strict";function n(t,e,r,n,i){var o=d.identity(new Float32Array(16));return e?(d.identity(o),d.scale(o,o,[1/i,1/i,1]),r||d.rotateZ(o,o,n.angle)):(d.scale(o,o,[n.width/2,-n.height/2,1]),d.translate(o,o,[1,-1,0]),d.multiply(o,o,t)),o}function i(t,e,r,n,i){var o=d.identity(new Float32Array(16));return e?(d.multiply(o,o,t),d.scale(o,o,[i,i,1]),r||d.rotateZ(o,o,-n.angle)):(d.scale(o,o,[1,-1,1]),d.translate(o,o,[-1,-1,0]),d.scale(o,o,[2/n.width,2/n.height,1])),o}function o(t,e){var r=[t.x,t.y,0,1];m.transformMat4(r,r,e);var n=r[3];return{point:new h(r[0]/n,r[1]/n),signedDistanceFromCamera:n}}function a(t,e,r,n){var i=t[0]/t[3],o=t[1]/t[3];return i>=-r[0]&&i<=r[0]&&o>=-r[1]&&o<=r[1]&&n.frameHistory.isVisible(e)}function s(t,e,r,n,i,s,u,c,f,d){var y=n?t.textSizeData:t.iconSizeData,g=v.evaluateSizeForZoom(y,r.transform,d,n),_=[256/r.width*2+1,256/r.height*2+1],x=n?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;x.clear();for(var b=t.lineVertexArray,w=n?t.placedGlyphArray:t.placedIconArray,T=0;T<w.length;T++){var S=w.get(T),z=[S.anchorX,S.anchorY,0,1];if(m.transformMat4(z,z,e),a(z,S.placementZoom,_,r)){var A=z[3],C=1+.5*(A/r.transform.cameraToCenterDistance-1),E=v.evaluateSizeForFeature(y,g,S),k=u?E*C:E/C,M=new h(S.anchorX,S.anchorY),L=o(M,i).point,I={},P=l(S,k,!1,c,e,i,s,t.glyphOffsetArray,b,x,L,M,I);(P.notEnoughRoom||P.needsFlipping&&l(S,k,!0,c,e,i,s,t.glyphOffsetArray,b,x,L,M,I).notEnoughRoom)&&p(S.numGlyphs,x)}else p(S.numGlyphs,x)}n?t.text.dynamicLayoutVertexBuffer.updateData(x.serialize()):t.icon.dynamicLayoutVertexBuffer.updateData(x.serialize())}function l(t,e,r,n,i,a,s,l,p,f,d,m,v){var y,_=e/24,x=t.lineOffsetX*e,b=t.lineOffsetY*e;if(t.numGlyphs>1){var w=t.glyphStartIndex+t.numGlyphs,T=l.get(t.glyphStartIndex).offsetX,S=l.get(w-1).offsetX,z=t.lineStartIndex,A=t.lineStartIndex+t.lineLength,C=c(_*T,x,b,r,d,m,t.segment,z,A,p,a,v);if(!C)return{notEnoughRoom:!0};var E=c(_*S,x,b,r,d,m,t.segment,z,A,p,a,v);if(!E)return{notEnoughRoom:!0};var k=o(C.point,s).point,M=o(E.point,s).point;if(n&&!r&&(t.vertical?k.y<M.y:k.x>M.x))return{needsFlipping:!0};y=[C];for(var L=t.glyphStartIndex+1;L<w-1;L++){var I=l.get(L);y.push(c(_*I.offsetX,x,b,r,d,m,t.segment,z,A,p,a,v))}y.push(E)}else{if(n&&!r){var P=o(m,i).point,R=p.get(t.lineStartIndex+t.segment+1),D=o(R,i),O=D.signedDistanceFromCamera>0?D.point:u(m,new h(R.x,R.y),P,1,i);if(t.vertical?O.y>P.y:O.x<P.x)return{needsFlipping:!0}}var B=l.get(t.glyphStartIndex),F=c(_*B.offsetX,x,b,r,d,m,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,p,a,v);if(!F)return{notEnoughRoom:!0};y=[F]}for(var j=t.placementZoom,V=0,N=y;V<N.length;V+=1){var U=N[V];g(f,U.point,U.angle,j)}return{}}function u(t,e,r,n,i){var a=o(t.add(t.sub(e)._unit()),i).point,s=r.sub(a);return r.add(s._mult(n/s.mag()))}function c(t,e,r,n,i,a,s,l,c,p,f,d){var m=n?t-e:t+e,v=m>0?1:-1,y=0;n&&(v*=-1,y=Math.PI),v<0&&(y+=Math.PI);for(var g=v>0?l+s:l+s+1,_=i,x=i,b=0,w=0,T=Math.abs(m);b+w<=T;){if((g+=v)<l||g>=c)return null;if(x=_,void 0===(_=d[g])){var S=o(p.get(g),f);_=S.signedDistanceFromCamera>0?d[g]=S.point:u(0===b?a:new h(p.get(g-v).x,p.get(g-v).y),new h(p.get(g).x,p.get(g).y),x,T-b+1,f)}b+=w,w=x.dist(_)}var z=(T-b)/w,A=_.sub(x),C=A.mult(z)._add(x);return C._add(A._unit()._perp()._mult(r*v)),{point:C,angle:y+Math.atan2(_.y-x.y,_.x-x.x)}}function p(t,e){for(var r=0;r<t;r++)g(e,_,0,25)}var h=t("@mapbox/point-geometry"),f=t("@mapbox/gl-matrix"),d=f.mat4,m=f.vec4,v=t("./symbol_size"),y=t("../data/bucket/symbol_bucket"),g=y.addDynamicAttributes;e.exports={updateLineLabels:s,getLabelPlaneMatrix:n,getGlCoordMatrix:i};var _=new h(-1/0,-1/0)},{"../data/bucket/symbol_bucket":47,"./symbol_size":178,"@mapbox/gl-matrix":1,"@mapbox/point-geometry":2}],176:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,s){var l,u,c,p,h=e.image,f=r.layout,d=e.top-1/h.pixelRatio,m=e.left-1/h.pixelRatio,v=e.bottom+1/h.pixelRatio,y=e.right+1/h.pixelRatio;if("none"!==f["icon-text-fit"]&&i){var g=y-m,_=v-d,x=f["text-size"]/24,b=i.left*x,w=i.right*x,T=i.top*x,S=i.bottom*x,z=w-b,A=S-T,C=f["icon-text-fit-padding"][0],E=f["icon-text-fit-padding"][1],k=f["icon-text-fit-padding"][2],M=f["icon-text-fit-padding"][3],L="width"===f["icon-text-fit"]?.5*(A-_):0,I="height"===f["icon-text-fit"]?.5*(z-g):0,P="width"===f["icon-text-fit"]||"both"===f["icon-text-fit"]?z:g,R="height"===f["icon-text-fit"]||"both"===f["icon-text-fit"]?A:_;l=new o(b+I-M,T+L-C),u=new o(b+I+E+P,T+L-C),c=new o(b+I+E+P,T+L+k+R),p=new o(b+I-M,T+L+k+R)}else l=new o(m,d),u=new o(y,d),c=new o(y,v),p=new o(m,v);var D=r.getLayoutValue("icon-rotate",a,s)*Math.PI/180;if(D){var O=Math.sin(D),B=Math.cos(D),F=[B,-O,O,B];l._matMult(F),u._matMult(F),p._matMult(F),c._matMult(F)}return[{tl:l,tr:u,bl:p,br:c,tex:{x:h.textureRect.x-1,y:h.textureRect.y-1,w:h.textureRect.w+2,h:h.textureRect.h+2},writingMode:void 0,glyphOffset:[0,0]}]}function i(t,e,r,n,i,a,l){for(var u=r.getLayoutValue("text-rotate",i,a)*Math.PI/180,c=r.getLayoutValue("text-offset",i,a).map(function(t){return 24*t}),p=e.positionedGlyphs,h=[],f=0;f<p.length;f++){var d=p[f],m=l[d.glyph];if(m){var v=m.rect;if(v){var y=s+1,g=m.metrics.advance/2,_=n?[d.x+g,d.y]:[0,0],x=n?[0,0]:[d.x+g+c[0],d.y+c[1]],b=m.metrics.left-y-g+x[0],w=-m.metrics.top-y+x[1],T=b+v.w,S=w+v.h,z=new o(b,w),A=new o(T,w),C=new o(b,S),E=new o(T,S);if(n&&d.vertical){var k=new o(-g,g),M=-Math.PI/2,L=new o(5,0);z._rotateAround(M,k)._add(L),A._rotateAround(M,k)._add(L),C._rotateAround(M,k)._add(L),E._rotateAround(M,k)._add(L)}if(u){var I=Math.sin(u),P=Math.cos(u),R=[P,-I,I,P];z._matMult(R),A._matMult(R),C._matMult(R),E._matMult(R)}h.push({tl:z,tr:A,bl:C,br:E,tex:v,writingMode:e.writingMode,glyphOffset:_})}}}return h}var o=t("@mapbox/point-geometry"),a=t("../style/parse_glyph_pbf"),s=a.GLYPH_PBF_BORDER;e.exports={getIconQuads:n,getGlyphQuads:i}},{"../style/parse_glyph_pbf":154,"@mapbox/point-geometry":2}],177:[function(t,e,r){"use strict";function n(t,e){for(var r=[],n=0,i=0,o=e;i<o.length;i+=1){var a=o[i];r.push(t.substring(n,a)),n=a}return n<t.length&&r.push(t.substring(n,t.length)),r}function i(t,e,r,i,o,a,s,l,u,p){var f=t.trim();p===_.vertical&&(f=y(f));var d,m=[],v={positionedGlyphs:m,text:f,top:l[1],bottom:l[1],left:l[0],right:l[0],writingMode:p},x=g.processBidirectionalText;return d=x?x(f,c(f,s,r,e)):n(f,c(f,s,r,e)),h(v,e,d,i,o,a,p,s,u),!!m.length&&v}function o(t,e,r,n){for(var i=0,o=0;o<t.length;o++){var a=n[t.charCodeAt(o)];a&&(i+=a.metrics.advance+e)}return i/Math.max(1,Math.ceil(i/r))}function a(t,e,r,n){var i=Math.pow(t-e,2);return n?t<e?i/2:2*i:i+Math.abs(r)*r}function s(t,e){var r=0;return 10===t&&(r-=1e4),40!==t&&65288!==t||(r+=50),41!==e&&65289!==e||(r+=50),r}function l(t,e,r,n,i,o){for(var s=null,l=a(e,r,i,o),u=0,c=n;u<c.length;u+=1){var p=c[u],h=e-p.x,f=a(h,r,i,o)+p.badness;f<=l&&(s=p,l=f)}return{index:t,x:e,priorBreak:s,badness:l}}function u(t){return t?u(t.priorBreak).concat(t.index):[]}function c(t,e,r,n){if(!r)return[];if(!t)return[];for(var i=[],a=o(t,e,r,n),c=0,p=0;p<t.length;p++){var h=t.charCodeAt(p),f=n[h];f&&!x[h]&&(c+=f.metrics.advance+e),p<t.length-1&&(b[h]||v.charAllowsIdeographicBreaking(h))&&i.push(l(p+1,c,a,i,s(h,t.charCodeAt(p+1)),!1))}return u(l(t.length,c,a,i,0,!0))}function p(t){var e=.5,r=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:e,verticalAlign:r}}function h(t,e,r,n,i,o,a,s,l){for(var u=0,c=-17,h=0,m=t.positionedGlyphs,y="right"===o?1:"left"===o?0:.5,g=0,x=r;g<x.length;g+=1){var b=x[g];if(b=b.trim(),b.length){for(var w=m.length,T=0;T<b.length;T++){var S=b.charCodeAt(T),z=e[S];z&&(v.charHasUprightVerticalOrientation(S)&&a!==_.horizontal?(m.push({glyph:S,x:u,y:0,vertical:!0}),u+=l+s):(m.push({glyph:S,x:u,y:c,vertical:!1}),u+=z.metrics.advance+s))}if(m.length!==w){var A=u-s;h=Math.max(A,h),f(m,e,w,m.length-1,y)}u=0,c+=n}else c+=n}var C=p(i),E=C.horizontalAlign,k=C.verticalAlign;d(m,y,E,k,h,n,r.length);var M=r.length*n;t.top+=-k*M,t.bottom=t.top+M,t.left+=-E*h,t.right=t.left+h}function f(t,e,r,n,i){if(i){var o=e[t[n].glyph];if(o)for(var a=o.metrics.advance,s=(t[n].x+a)*i,l=r;l<=n;l++)t[l].x-=s}}function d(t,e,r,n,i,o,a){for(var s=(e-r)*i,l=(-n*a+.5)*o,u=0;u<t.length;u++)t[u].x+=s,t[u].y+=l}function m(t,e,r){var n=p(r),i=n.horizontalAlign,o=n.verticalAlign,a=e[0],s=e[1],l=a-t.displaySize[0]*i,u=l+t.displaySize[0],c=s-t.displaySize[1]*o;return{image:t,top:c,bottom:c+t.displaySize[1],left:l,right:u}}var v=t("../util/script_detection"),y=t("../util/verticalize_punctuation"),g=t("../source/rtl_text_plugin"),_={horizontal:1,vertical:2};e.exports={shapeText:i,shapeIcon:m,WritingMode:_};var x={};x[9]=!0,x[10]=!0,x[11]=!0,x[12]=!0,x[13]=!0,x[32]=!0;var b={};b[10]=!0,b[32]=!0,b[38]=!0,b[40]=!0,b[41]=!0,b[43]=!0,b[45]=!0,b[47]=!0,b[173]=!0,b[183]=!0,b[8203]=!0,b[8208]=!0,b[8211]=!0,b[8231]=!0},{"../source/rtl_text_plugin":96,"../util/script_detection":218,"../util/verticalize_punctuation":225}],178:[function(t,e,r){"use strict";function n(t,e,r){var n=e;return t.isFeatureConstant?n.uSize:t.isZoomConstant?r.lowerSize/10:o.number(r.lowerSize/10,r.upperSize/10,n.uSizeT)}function i(t,e,r,n){var i={};if(t.isZoomConstant||t.isFeatureConstant)if(t.isFeatureConstant&&!t.isZoomConstant){var o;if("interval"===t.functionType)o=r.getLayoutValue(n?"text-size":"icon-size",{zoom:e.zoom});else{var a="interval"===t.functionType?0:s(e.zoom,t.functionBase,t.coveringZoomRange[0],t.coveringZoomRange[1]),u=t.coveringStopValues[0],c=t.coveringStopValues[1];o=u+(c-u)*l.clamp(a,0,1)}i.uSize=o}else t.isFeatureConstant&&t.isZoomConstant&&(i.uSize=t.layoutSize);else{var p=s(e.zoom,t.functionBase,t.coveringZoomRange[0],t.coveringZoomRange[1]);i.uSizeT=l.clamp(p,0,1)}return i}var o=t("../style-spec/util/interpolate"),a=t("../style-spec/function"),s=a.interpolationFactor,l=t("../util/util");e.exports={evaluateSizeForFeature:n,evaluateSizeForZoom:i}},{"../style-spec/function":112,"../style-spec/util/interpolate":127,"../util/util":223}],179:[function(t,e,r){"use strict";var n=t("../source/rtl_text_plugin");e.exports=function(t,e,r,i){var o=e.getLayoutValue("text-transform",r,i);return"uppercase"===o?t=t.toLocaleUpperCase():"lowercase"===o&&(t=t.toLocaleLowerCase()),n.applyArabicShaping&&(t=n.applyArabicShaping(t)),t}},{"../source/rtl_text_plugin":96}],180:[function(t,e,r){"use strict";var n=t("../util/dom"),i=t("@mapbox/point-geometry"),o={scrollZoom:t("./handler/scroll_zoom"),boxZoom:t("./handler/box_zoom"),dragRotate:t("./handler/drag_rotate"),dragPan:t("./handler/drag_pan"),keyboard:t("./handler/keyboard"),doubleClickZoom:t("./handler/dblclick_zoom"),touchZoomRotate:t("./handler/touch_zoom_rotate")};e.exports=function(t,e){function r(t){y("mouseout",t)}function a(e){t.stop(),w=n.mousePos(_,e),y("mousedown",e),b=!0}function s(e){var r=t.dragRotate&&t.dragRotate.isActive();x&&!r&&y("contextmenu",x),x=null,b=!1,y("mouseup",e)}function l(e){if(!(t.dragPan&&t.dragPan.isActive()||t.dragRotate&&t.dragRotate.isActive())){for(var r=e.toElement||e.target;r&&r!==_;)r=r.parentNode;r===_&&y("mousemove",e)}}function u(e){t.stop(),g("touchstart",e),!e.touches||e.touches.length>1||(T?(clearTimeout(T),T=null,y("dblclick",e)):T=setTimeout(f,300))}function c(t){g("touchmove",t)}function p(t){g("touchend",t)}function h(t){g("touchcancel",t)}function f(){T=null}function d(t){n.mousePos(_,t).equals(w)&&y("click",t)}function m(t){y("dblclick",t),t.preventDefault()}function v(e){var r=t.dragRotate&&t.dragRotate.isActive();b||r?b&&(x=e):y("contextmenu",e),e.preventDefault()}function y(e,r){var i=n.mousePos(_,r);return t.fire(e,{lngLat:t.unproject(i),point:i,originalEvent:r})}function g(e,r){var o=n.touchPos(_,r),a=o.reduce(function(t,e,r,n){return t.add(e.div(n.length))},new i(0,0));return t.fire(e,{lngLat:t.unproject(a),point:a,lngLats:o.map(function(e){return t.unproject(e)},this),points:o,originalEvent:r})}var _=t.getCanvasContainer(),x=null,b=!1,w=null,T=null;for(var S in o)t[S]=new o[S](t,e),e.interactive&&e[S]&&t[S].enable(e[S]);_.addEventListener("mouseout",r,!1),_.addEventListener("mousedown",a,!1),_.addEventListener("mouseup",s,!1),_.addEventListener("mousemove",l,!1),_.addEventListener("touchstart",u,!1),_.addEventListener("touchend",p,!1),_.addEventListener("touchmove",c,!1),_.addEventListener("touchcancel",h,!1),_.addEventListener("click",d,!1),_.addEventListener("dblclick",m,!1),_.addEventListener("contextmenu",v,!1)}},{"../util/dom":209,"./handler/box_zoom":189,"./handler/dblclick_zoom":190,"./handler/drag_pan":191,"./handler/drag_rotate":192,"./handler/keyboard":193,"./handler/scroll_zoom":194,"./handler/touch_zoom_rotate":195,"@mapbox/point-geometry":2}],181:[function(t,e,r){"use strict";var n=t("../util/util"),i=t("../style-spec/util/interpolate"),o=t("../util/browser"),a=t("../geo/lng_lat"),s=t("../geo/lng_lat_bounds"),l=t("@mapbox/point-geometry"),u=t("../util/evented"),c=function(t){function e(e,r){t.call(this),this.moving=!1,this.transform=e,this._bearingSnap=r.bearingSnap}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCenter=function(){return this.transform.center},e.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},e.prototype.panBy=function(t,e,r){return t=l.convert(t).mult(-1),this.panTo(this.transform.center,n.extend({offset:t},e),r)},e.prototype.panTo=function(t,e,r){return this.easeTo(n.extend({center:t},e),r)},e.prototype.getZoom=function(){return this.transform.zoom},e.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},e.prototype.zoomTo=function(t,e,r){return this.easeTo(n.extend({zoom:t},e),r)},e.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},e.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},e.prototype.getBearing=function(){return this.transform.bearing},e.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},e.prototype.rotateTo=function(t,e,r){return this.easeTo(n.extend({bearing:t},e),r)},e.prototype.resetNorth=function(t,e){return this.rotateTo(0,n.extend({duration:1e3},t),e),this},e.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this},e.prototype.getPitch=function(){return this.transform.pitch},e.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},e.prototype.fitBounds=function(t,e,r){if(e=n.extend({padding:{top:0,bottom:0,right:0,left:0},offset:[0,0],maxZoom:this.transform.maxZoom},e),"number"==typeof e.padding){var i=e.padding;e.padding={top:i,bottom:i,right:i,left:i}}if(!n.deepEqual(Object.keys(e.padding).sort(function(t,e){return t<e?-1:t>e?1:0}),["bottom","left","right","top"]))return n.warnOnce("options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'"),this;t=s.convert(t);var o=[e.padding.left-e.padding.right,e.padding.top-e.padding.bottom],a=Math.min(e.padding.right,e.padding.left),u=Math.min(e.padding.top,e.padding.bottom);e.offset=[e.offset[0]+o[0],e.offset[1]+o[1]];var c=l.convert(e.offset),p=this.transform,h=p.project(t.getNorthWest()),f=p.project(t.getSouthEast()),d=f.sub(h),m=(p.width-2*a-2*Math.abs(c.x))/d.x,v=(p.height-2*u-2*Math.abs(c.y))/d.y;return v<0||m<0?(n.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset."),this):(e.center=p.unproject(h.add(f).div(2)),e.zoom=Math.min(p.scaleZoom(p.scale*Math.min(m,v)),e.maxZoom),e.bearing=0,e.linear?this.easeTo(e,r):this.flyTo(e,r))},e.prototype.jumpTo=function(t,e){this.stop();var r=this.transform,n=!1,i=!1,o=!1;return"zoom"in t&&r.zoom!==+t.zoom&&(n=!0,r.zoom=+t.zoom),void 0!==t.center&&(r.center=a.convert(t.center)),"bearing"in t&&r.bearing!==+t.bearing&&(i=!0,r.bearing=+t.bearing),"pitch"in t&&r.pitch!==+t.pitch&&(o=!0,r.pitch=+t.pitch),this.fire("movestart",e).fire("move",e),n&&this.fire("zoomstart",e).fire("zoom",e).fire("zoomend",e),i&&this.fire("rotate",e),o&&this.fire("pitchstart",e).fire("pitch",e).fire("pitchend",e),this.fire("moveend",e)},e.prototype.easeTo=function(t,e){var r=this;this.stop(),t=n.extend({offset:[0,0],duration:500,easing:n.ease},t),!1===t.animate&&(t.duration=0),t.smoothEasing&&0!==t.duration&&(t.easing=this._smoothOutEasing(t.duration));var o=this.transform,s=this.getZoom(),u=this.getBearing(),c=this.getPitch(),p="zoom"in t?+t.zoom:s,h="bearing"in t?this._normalizeBearing(t.bearing,u):u,f="pitch"in t?+t.pitch:c,d=o.centerPoint.add(l.convert(t.offset)),m=o.pointLocation(d),v=a.convert(t.center||m);this._normalizeCenter(v);var y,g,_=o.project(m),x=o.project(v).sub(_),b=o.zoomScale(p-s);return t.around&&(y=a.convert(t.around),g=o.locationPoint(y)),this.zooming=p!==s,this.rotating=u!==h,this.pitching=f!==c,this._prepareEase(e,t.noMoveStart),clearTimeout(this._onEaseEnd),this._ease(function(t){if(this.zooming&&(o.zoom=i(s,p,t)),this.rotating&&(o.bearing=i(u,h,t)),this.pitching&&(o.pitch=i(c,f,t)),y)o.setLocationAtPoint(y,g);else{var r=o.zoomScale(o.zoom-s),n=p>s?Math.min(2,b):Math.max(.5,b),a=Math.pow(n,1-t),l=o.unproject(_.add(x.mult(t*a)).mult(r));o.setLocationAtPoint(o.renderWorldCopies?l.wrap():l,d)}this._fireMoveEvents(e)},function(){t.delayEndEvents?r._onEaseEnd=setTimeout(function(){return r._easeToEnd(e)},t.delayEndEvents):r._easeToEnd(e)},t),this},e.prototype._prepareEase=function(t,e){this.moving=!0,e||this.fire("movestart",t),this.zooming&&this.fire("zoomstart",t),this.pitching&&this.fire("pitchstart",t)},e.prototype._fireMoveEvents=function(t){this.fire("move",t),this.zooming&&this.fire("zoom",t),this.rotating&&this.fire("rotate",t),this.pitching&&this.fire("pitch",t)},e.prototype._easeToEnd=function(t){var e=this.zooming,r=this.pitching;this.moving=!1,this.zooming=!1,this.rotating=!1,this.pitching=!1,e&&this.fire("zoomend",t),r&&this.fire("pitchend",t),this.fire("moveend",t)},e.prototype.flyTo=function(t,e){function r(t){var e=(A*A-z*z+(t?-1:1)*M*M*C*C)/(2*(t?A:z)*M*C);return Math.log(Math.sqrt(e*e+1)-e)}function o(t){return(Math.exp(t)-Math.exp(-t))/2}function s(t){return(Math.exp(t)+Math.exp(-t))/2}function u(t){return o(t)/s(t)}var c=this;this.stop(),t=n.extend({offset:[0,0],speed:1.2,curve:1.42,easing:n.ease},t);var p=this.transform,h=this.getZoom(),f=this.getBearing(),d=this.getPitch(),m="zoom"in t?n.clamp(+t.zoom,p.minZoom,p.maxZoom):h,v="bearing"in t?this._normalizeBearing(t.bearing,f):f,y="pitch"in t?+t.pitch:d,g=p.zoomScale(m-h),_=p.centerPoint.add(l.convert(t.offset)),x=p.pointLocation(_),b=a.convert(t.center||x);this._normalizeCenter(b);var w=p.project(x),T=p.project(b).sub(w),S=t.curve,z=Math.max(p.width,p.height),A=z/g,C=T.mag();if("minZoom"in t){var E=n.clamp(Math.min(t.minZoom,h,m),p.minZoom,p.maxZoom),k=z/p.zoomScale(E-h);S=Math.sqrt(k/C*2)}var M=S*S,L=r(0),I=function(t){return s(L)/s(L+S*t)},P=function(t){return z*((s(L)*u(L+S*t)-o(L))/M)/C},R=(r(1)-L)/S;if(Math.abs(C)<1e-6||isNaN(R)){if(Math.abs(z-A)<1e-6)return this.easeTo(t,e);var D=A<z?-1:1;R=Math.abs(Math.log(A/z))/S,P=function(){return 0},I=function(t){return Math.exp(D*S*t)}}if("duration"in t)t.duration=+t.duration;else{var O="screenSpeed"in t?+t.screenSpeed/S:+t.speed;t.duration=1e3*R/O}return this.zooming=!0,this.rotating=f!==v,this.pitching=y!==d,this._prepareEase(e,!1),this._ease(function(t){var r=t*R,n=1/I(r);p.zoom=h+p.scaleZoom(n),this.rotating&&(p.bearing=i(f,v,t)),this.pitching&&(p.pitch=i(d,y,t));var o=p.unproject(w.add(T.mult(P(r))).mult(n));p.setLocationAtPoint(p.renderWorldCopies?o.wrap():o,_),this._fireMoveEvents(e)},function(){return c._easeToEnd(e)},t),this},e.prototype.isEasing=function(){return!!this._abortFn},e.prototype.isMoving=function(){return this.moving},e.prototype.stop=function(){return this._abortFn&&(this._abortFn(),this._finishEase()),this},e.prototype._ease=function(t,e,r){this._finishFn=e,this._abortFn=o.timed(function(e){t.call(this,r.easing(e)),1===e&&this._finishEase()},!1===r.animate?0:r.duration,this)},e.prototype._finishEase=function(){delete this._abortFn;var t=this._finishFn;delete this._finishFn,t.call(this)},e.prototype._normalizeBearing=function(t,e){t=n.wrap(t,-180,180);var r=Math.abs(t-e);return Math.abs(t-360-e)<r&&(t-=360),Math.abs(t+360-e)<r&&(t+=360),t},e.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&&!e.lngRange){var r=t.lng-e.center.lng;t.lng+=r>180?-360:r<-180?360:0}},e.prototype._smoothOutEasing=function(t){var e=n.ease;if(this._prevEase){var r=this._prevEase,i=(Date.now()-r.start)/r.duration,o=r.easing(i+.01)-r.easing(i),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);e=n.bezier(a,s,.25,1)}return this._prevEase={start:(new Date).getTime(),duration:t,easing:e},e},e}(u);e.exports=c},{"../geo/lng_lat":58,"../geo/lng_lat_bounds":59,"../style-spec/util/interpolate":127,"../util/browser":202,"../util/evented":210,"../util/util":223,"@mapbox/point-geometry":2}],182:[function(t,e,r){"use strict";var n=t("../../util/dom"),i=t("../../util/util"),o=t("../../util/config"),a=function(t){this.options=t,i.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};a.prototype.getDefaultPosition=function(){return"bottom-right"},a.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),e&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},a.prototype.onRemove=function(){n.remove(this._container),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0},a.prototype._updateEditLink=function(){var t=this._editLink;t||(t=this._editLink=this._container.querySelector(".mapbox-improve-map"));var e=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:o.ACCESS_TOKEN}];if(t){var r=e.reduce(function(t,r,n){return r.value&&(t+=r.key+"="+r.value+(n<e.length-1?"&":"")),t},"?");t.href="https://www.mapbox.com/feedback/"+r+(this._map._hash?this._map._hash.getHashString(!0):"")}},a.prototype._updateData=function(t){t&&"metadata"===t.sourceDataType&&(this._updateAttributions(),this._updateEditLink())},a.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}var r=this._map.style.sourceCaches;for(var n in r){var i=r[n].getSource();i.attribution&&t.indexOf(i.attribution)<0&&t.push(i.attribution)}t.sort(function(t,e){return t.length-e.length}),t=t.filter(function(e,r){for(var n=r+1;n<t.length;n++)if(t[n].indexOf(e)>=0)return!1;return!0}),this._container.innerHTML=t.join(" | "),this._editLink=null}},a.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")},e.exports=a},{"../../util/config":206,"../../util/dom":209,"../../util/util":223}],183:[function(t,e,r){"use strict";var n=t("../../util/dom"),i=t("../../util/util"),o=t("../../util/window"),a=function(){this._fullscreen=!1,i.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in o.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in o.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in o.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in o.document&&(this._fullscreenchange="MSFullscreenChange"),this._className="mapboxgl-ctrl"};a.prototype.onAdd=function(t){return this._map=t,this._mapContainer=this._map.getContainer(),this._container=n.create("div",this._className+" mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._container.style.display="none",i.warnOnce("This device does not support fullscreen mode.")),this._container},a.prototype.onRemove=function(){n.remove(this._container),this._map=null,o.document.removeEventListener(this._fullscreenchange,this._changeIcon)},a.prototype._checkFullscreenSupport=function(){return!!(o.document.fullscreenEnabled||o.document.mozFullScreenEnabled||o.document.msFullscreenEnabled||o.document.webkitFullscreenEnabled)},a.prototype._setupUI=function(){var t=this._fullscreenButton=n.create("button",this._className+"-icon "+this._className+"-fullscreen",this._container);t.setAttribute("aria-label","Toggle fullscreen"),t.type="button",this._fullscreenButton.addEventListener("click",this._onClickFullscreen),o.document.addEventListener(this._fullscreenchange,this._changeIcon)},a.prototype._isFullscreen=function(){return this._fullscreen},a.prototype._changeIcon=function(){(o.document.fullscreenElement||o.document.mozFullScreenElement||o.document.webkitFullscreenElement||o.document.msFullscreenElement)===this._mapContainer!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(this._className+"-shrink"),this._fullscreenButton.classList.toggle(this._className+"-fullscreen"))},a.prototype._onClickFullscreen=function(){this._isFullscreen()?o.document.exitFullscreen?o.document.exitFullscreen():o.document.mozCancelFullScreen?o.document.mozCancelFullScreen():o.document.msExitFullscreen?o.document.msExitFullscreen():o.document.webkitCancelFullScreen&&o.document.webkitCancelFullScreen():this._mapContainer.requestFullscreen?this._mapContainer.requestFullscreen():this._mapContainer.mozRequestFullScreen?this._mapContainer.mozRequestFullScreen():this._mapContainer.msRequestFullscreen?this._mapContainer.msRequestFullscreen():this._mapContainer.webkitRequestFullscreen&&this._mapContainer.webkitRequestFullscreen()},e.exports=a},{"../../util/dom":209,"../../util/util":223,"../../util/window":204}],184:[function(t,e,r){"use strict";function n(t){void 0!==i?t(i):void 0!==s.navigator.permissions?s.navigator.permissions.query({name:"geolocation"}).then(function(e){i="denied"!==e.state,t(i)}):(i=!!s.navigator.geolocation,t(i))}var i,o=t("../../util/evented"),a=t("../../util/dom"),s=t("../../util/window"),l=t("../../util/util"),u=t("../../geo/lng_lat"),c=t("../marker"),p={positionOptions:{enableHighAccuracy:!1,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0},h=function(t){function e(e){t.call(this),this.options=l.extend({},p,e),l.bindAll(["_onSuccess","_onError","_finish","_setupUI","_updateCamera","_updateMarker","_onClickGeolocate"],this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onAdd=function(t){return this._map=t,this._container=a.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),n(this._setupUI),this._container},e.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(s.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker.remove(),a.remove(this._container),this._map=void 0},e.prototype._onSuccess=function(t){if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(t),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire("geolocate",t),this._finish()},e.prototype._updateCamera=function(t){var e=new u(t.coords.longitude,t.coords.latitude),r=t.coords.accuracy;this._map.fitBounds(e.toBounds(r),this.options.fitBoundsOptions,{geolocateSource:!0})},e.prototype._updateMarker=function(t){t?this._userLocationDotMarker.setLngLat([t.coords.longitude,t.coords.latitude]).addTo(this._map):this._userLocationDotMarker.remove()},e.prototype._onError=function(t){if(this.options.trackUserLocation)if(1===t.code)this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),void 0!==this._geolocationWatchID&&this._clearWatch();else 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")}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire("error",t),this._finish()},e.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},e.prototype._setupUI=function(t){var e=this;!1!==t&&(this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this._geolocateButton=a.create("button","mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",this._container),this._geolocateButton.type="button",this._geolocateButton.setAttribute("aria-label","Geolocate"),this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=a.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new c(this._dotElement),this.options.trackUserLocation&&(this._watchState="OFF")),this._geolocateButton.addEventListener("click",this._onClickGeolocate.bind(this)),this.options.trackUserLocation&&this._map.on("movestart",function(t){t.geolocateSource||"ACTIVE_LOCK"!==e._watchState||(e._watchState="BACKGROUND",e._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),e._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),e.fire("trackuserlocationend"))}))},e.prototype._onClickGeolocate=function(){if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire("trackuserlocationstart");break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":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("trackuserlocationend");break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire("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")}"OFF"===this._watchState&&void 0!==this._geolocationWatchID?this._clearWatch():void 0===this._geolocationWatchID&&(this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._geolocationWatchID=s.navigator.geolocation.watchPosition(this._onSuccess,this._onError,this.options.positionOptions))}else s.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4)},e.prototype._clearWatch=function(){s.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)},e}(o);e.exports=h},{"../../geo/lng_lat":58,"../../util/dom":209,"../../util/evented":210,"../../util/util":223,"../../util/window":204,"../marker":198}],185:[function(t,e,r){"use strict";var n=t("../../util/dom"),i=t("../../util/util"),o=function(){i.bindAll(["_updateLogo"],this)};o.prototype.onAdd=function(t){this._map=t,this._container=n.create("div","mapboxgl-ctrl");var e=n.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.href="https://www.mapbox.com/",e.setAttribute("aria-label","Mapbox logo"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._container},o.prototype.onRemove=function(){n.remove(this._container),this._map.off("sourcedata",this._updateLogo)},o.prototype.getDefaultPosition=function(){return"bottom-left"},o.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},o.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}},e.exports=o},{"../../util/dom":209,"../../util/util":223}],186:[function(t,e,r){"use strict";var n=t("../../util/dom"),i=t("../../util/util"),o=t("../handler/drag_rotate"),a=function(){var t=this;i.bindAll(["_rotateCompassArrow"],this),this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this._zoomInButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-in","Zoom In",function(){return t._map.zoomIn()}),this._zoomOutButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-out","Zoom Out",function(){return t._map.zoomOut()}),this._compass=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-compass","Reset North",function(){return t._map.resetNorth()}),this._compassArrow=n.create("span","mapboxgl-ctrl-compass-arrow",this._compass)};a.prototype._rotateCompassArrow=function(){var t="rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=t},a.prototype.onAdd=function(t){return this._map=t,this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new o(t,{button:"left",element:this._compass,pitchWithRotate:!1}),this._handler.enable(),this._container},a.prototype.onRemove=function(){n.remove(this._container),this._map.off("rotate",this._rotateCompassArrow),delete this._map,this._handler.disable(),delete this._handler},a.prototype._createButton=function(t,e,r){var i=n.create("button",t,this._container);return i.type="button",i.setAttribute("aria-label",e),i.addEventListener("click",r),i},e.exports=a},{"../../util/dom":209,"../../util/util":223,"../handler/drag_rotate":192}],187:[function(t,e,r){"use strict";function n(t,e,r){var n=r&&r.maxWidth||100,a=t._container.clientHeight/2,s=o(t.unproject([0,a]),t.unproject([n,a]));if(r&&"imperial"===r.unit){var l=3.2808*s;l>5280?i(e,n,l/5280,"mi"):i(e,n,l,"ft")}else if(r&&"nautical"===r.unit){var u=s/1852;i(e,n,u,"nm")}else i(e,n,s,"m")}function i(t,e,r,n){var i=a(r),o=i/r;"m"===n&&i>=1e3&&(i/=1e3,n="km"),t.style.width=e*o+"px",t.innerHTML=i+n}function o(t,e){var r=Math.PI/180,n=t.lat*r,i=e.lat*r,o=Math.sin(n)*Math.sin(i)+Math.cos(n)*Math.cos(i)*Math.cos((e.lng-t.lng)*r);return 6371e3*Math.acos(Math.min(o,1))}function a(t){var e=Math.pow(10,(""+Math.floor(t)).length-1),r=t/e;return r=r>=10?10:r>=5?5:r>=3?3:r>=2?2:1,e*r}var s=t("../../util/dom"),l=t("../../util/util"),u=function(t){this.options=t,l.bindAll(["_onMove"],this)};u.prototype.getDefaultPosition=function(){return"bottom-left"},u.prototype._onMove=function(){n(this._map,this._container,this.options)},u.prototype.onAdd=function(t){return this._map=t,this._container=s.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},u.prototype.onRemove=function(){s.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},e.exports=u},{"../../util/dom":209,"../../util/util":223}],188:[function(t,e,r){"use strict"},{}],189:[function(t,e,r){"use strict";var n=t("../../util/dom"),i=t("../../geo/lng_lat_bounds"),o=t("../../util/util"),a=t("../../util/window"),s=function(t){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),o.bindAll(["_onMouseDown","_onMouseMove","_onMouseUp","_onKeyDown"],this)};s.prototype.isEnabled=function(){return!!this._enabled},s.prototype.isActive=function(){return!!this._active},s.prototype.enable=function(){this.isEnabled()||(this._map.dragPan&&this._map.dragPan.disable(),this._el.addEventListener("mousedown",this._onMouseDown,!1),this._map.dragPan&&this._map.dragPan.enable(),this._enabled=!0)},s.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onMouseDown),this._enabled=!1)},s.prototype._onMouseDown=function(t){t.shiftKey&&0===t.button&&(a.document.addEventListener("mousemove",this._onMouseMove,!1),a.document.addEventListener("keydown",this._onKeyDown,!1),a.document.addEventListener("mouseup",this._onMouseUp,!1),n.disableDrag(),this._startPos=n.mousePos(this._el,t),this._active=!0)},s.prototype._onMouseMove=function(t){var e=this._startPos,r=n.mousePos(this._el,t);this._box||(this._box=n.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var i=Math.min(e.x,r.x),o=Math.max(e.x,r.x),a=Math.min(e.y,r.y),s=Math.max(e.y,r.y);n.setTransform(this._box,"translate("+i+"px,"+a+"px)"),this._box.style.width=o-i+"px",this._box.style.height=s-a+"px"},s.prototype._onMouseUp=function(t){if(0===t.button){var e=this._startPos,r=n.mousePos(this._el,t),o=(new i).extend(this._map.unproject(e)).extend(this._map.unproject(r));this._finish(),e.x===r.x&&e.y===r.y?this._fireEvent("boxzoomcancel",t):this._map.fitBounds(o,{linear:!0}).fire("boxzoomend",{originalEvent:t,boxZoomBounds:o})}},s.prototype._onKeyDown=function(t){27===t.keyCode&&(this._finish(),this._fireEvent("boxzoomcancel",t))},s.prototype._finish=function(){this._active=!1,a.document.removeEventListener("mousemove",this._onMouseMove,!1),a.document.removeEventListener("keydown",this._onKeyDown,!1),a.document.removeEventListener("mouseup",this._onMouseUp,!1),this._container.classList.remove("mapboxgl-crosshair"),this._box&&(n.remove(this._box),this._box=null),n.enableDrag()},s.prototype._fireEvent=function(t,e){return this._map.fire(t,{originalEvent:e})},e.exports=s},{"../../geo/lng_lat_bounds":59,"../../util/dom":209,"../../util/util":223,"../../util/window":204}],190:[function(t,e,r){"use strict";var n=t("../../util/util"),i=function(t){this._map=t,n.bindAll(["_onDblClick"],this)};i.prototype.isEnabled=function(){return!!this._enabled},i.prototype.enable=function(){this.isEnabled()||(this._map.on("dblclick",this._onDblClick),this._enabled=!0)},i.prototype.disable=function(){this.isEnabled()&&(this._map.off("dblclick",this._onDblClick),this._enabled=!1)},i.prototype._onDblClick=function(t){this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)},e.exports=i},{"../../util/util":223}],191:[function(t,e,r){"use strict";var n=t("../../util/dom"),i=t("../../util/util"),o=t("../../util/window"),a=i.bezier(0,0,.3,1),s=function(t){this._map=t,this._el=t.getCanvasContainer(),i.bindAll(["_onDown","_onMove","_onUp","_onTouchEnd","_onMouseUp"],this)};s.prototype.isEnabled=function(){return!!this._enabled},s.prototype.isActive=function(){return!!this._active},s.prototype.enable=function(){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-drag-pan"),this._el.addEventListener("mousedown",this._onDown),this._el.addEventListener("touchstart",this._onDown),this._enabled=!0)},s.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-drag-pan"),this._el.removeEventListener("mousedown",this._onDown),this._el.removeEventListener("touchstart",this._onDown),this._enabled=!1)},s.prototype._onDown=function(t){this._ignoreEvent(t)||this.isActive()||(t.touches?(o.document.addEventListener("touchmove",this._onMove),o.document.addEventListener("touchend",this._onTouchEnd)):(o.document.addEventListener("mousemove",this._onMove),o.document.addEventListener("mouseup",this._onMouseUp)),o.addEventListener("blur",this._onMouseUp),this._active=!1,this._startPos=this._pos=n.mousePos(this._el,t),this._inertia=[[Date.now(),this._pos]])},s.prototype._onMove=function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._map.moving=!0,this._fireEvent("dragstart",t),this._fireEvent("movestart",t));var e=n.mousePos(this._el,t),r=this._map;r.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),e]),r.transform.setLocationAtPoint(r.transform.pointLocation(this._pos),e),this._fireEvent("drag",t),this._fireEvent("move",t),this._pos=e,t.preventDefault()}},s.prototype._onUp=function(t){var e=this;if(this.isActive()){this._active=!1,this._fireEvent("dragend",t),this._drainInertiaBuffer();var r=function(){e._map.moving=!1,e._fireEvent("moveend",t)},n=this._inertia;if(n.length<2)return void r();var i=n[n.length-1],o=n[0],s=i[1].sub(o[1]),l=(i[0]-o[0])/1e3;if(0===l||i[1].equals(o[1]))return void r();var u=s.mult(.3/l),c=u.mag();c>1400&&(c=1400,u._unit()._mult(c));var p=c/750,h=u.mult(-p/2);this._map.panBy(h,{duration:1e3*p,easing:a,noMoveStart:!0},{originalEvent:t})}},s.prototype._onMouseUp=function(t){this._ignoreEvent(t)||(this._onUp(t),o.document.removeEventListener("mousemove",this._onMove),o.document.removeEventListener("mouseup",this._onMouseUp),o.removeEventListener("blur",this._onMouseUp))},s.prototype._onTouchEnd=function(t){this._ignoreEvent(t)||(this._onUp(t),o.document.removeEventListener("touchmove",this._onMove),o.document.removeEventListener("touchend",this._onTouchEnd))},s.prototype._fireEvent=function(t,e){return this._map.fire(t,{originalEvent:e})},s.prototype._ignoreEvent=function(t){var e=this._map;return!(!e.boxZoom||!e.boxZoom.isActive())||!(!e.dragRotate||!e.dragRotate.isActive())||(t.touches?t.touches.length>1:!!t.ctrlKey||"mousemove"!==t.type&&t.button&&0!==t.button)},s.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now();t.length>0&&e-t[0][0]>160;)t.shift()},e.exports=s},{"../../util/dom":209,"../../util/util":223,"../../util/window":204}],192:[function(t,e,r){"use strict";var n=t("../../util/dom"),i=t("../../util/util"),o=t("../../util/window"),a=i.bezier(0,0,.25,1),s=function(t,e){this._map=t,this._el=e.element||t.getCanvasContainer(),this._button=e.button||"right",this._bearingSnap=e.bearingSnap||0,this._pitchWithRotate=!1!==e.pitchWithRotate,i.bindAll(["_onDown","_onMove","_onUp"],this)};s.prototype.isEnabled=function(){return!!this._enabled},s.prototype.isActive=function(){return!!this._active},s.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onDown),this._enabled=!0)},s.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onDown),this._enabled=!1)},s.prototype._onDown=function(t){if(!(this._map.boxZoom&&this._map.boxZoom.isActive()||this._map.dragPan&&this._map.dragPan.isActive()||this.isActive())){if("right"===this._button){var e=t.ctrlKey?0:2,r=t.button;if(void 0!==o.InstallTrigger&&2===t.button&&t.ctrlKey&&o.navigator.platform.toUpperCase().indexOf("MAC")>=0&&(r=0),r!==e)return}else if(t.ctrlKey||0!==t.button)return;n.disableDrag(),o.document.addEventListener("mousemove",this._onMove,{capture:!0}),o.document.addEventListener("mouseup",this._onUp),o.addEventListener("blur",this._onUp),this._active=!1,this._inertia=[[Date.now(),this._map.getBearing()]],this._startPos=this._pos=n.mousePos(this._el,t),this._center=this._map.transform.centerPoint,t.preventDefault()}},s.prototype._onMove=function(t){this.isActive()||(this._active=!0,this._map.moving=!0,this._fireEvent("rotatestart",t),this._fireEvent("movestart",t),this._pitchWithRotate&&this._fireEvent("pitchstart",t));var e=this._map;e.stop();var r=this._pos,i=n.mousePos(this._el,t),o=.8*(r.x-i.x),a=-.5*(r.y-i.y),s=e.getBearing()-o,l=e.getPitch()-a,u=this._inertia,c=u[u.length-1];this._drainInertiaBuffer(),u.push([Date.now(),e._normalizeBearing(s,c[1])]),e.transform.bearing=s,this._pitchWithRotate&&(this._fireEvent("pitch",t),e.transform.pitch=l),this._fireEvent("rotate",t),this._fireEvent("move",t),this._pos=i},s.prototype._onUp=function(t){var e=this;if(o.document.removeEventListener("mousemove",this._onMove,{capture:!0}),o.document.removeEventListener("mouseup",this._onUp),o.removeEventListener("blur",this._onUp),n.enableDrag(),this.isActive()){this._active=!1,this._fireEvent("rotateend",t),this._drainInertiaBuffer();var r=this._map,i=r.getBearing(),s=this._inertia,l=function(){Math.abs(i)<e._bearingSnap?r.resetNorth({noMoveStart:!0},{originalEvent:t}):(e._map.moving=!1,e._fireEvent("moveend",t)),e._pitchWithRotate&&e._fireEvent("pitchend",t)};if(s.length<2)return void l();var u=s[0],c=s[s.length-1],p=s[s.length-2],h=r._normalizeBearing(i,p[1]),f=c[1]-u[1],d=f<0?-1:1,m=(c[0]-u[0])/1e3;if(0===f||0===m)return void l();var v=Math.abs(f*(.25/m));v>180&&(v=180);var y=v/180;h+=d*v*(y/2),Math.abs(r._normalizeBearing(h,0))<this._bearingSnap&&(h=r._normalizeBearing(0,h)),r.rotateTo(h,{duration:1e3*y,easing:a,noMoveStart:!0},{originalEvent:t})}},s.prototype._fireEvent=function(t,e){return this._map.fire(t,{originalEvent:e})},s.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now();t.length>0&&e-t[0][0]>160;)t.shift()},e.exports=s},{"../../util/dom":209,"../../util/util":223,"../../util/window":204}],193:[function(t,e,r){"use strict";function n(t){return t*(2-t)}var i=t("../../util/util"),o=function(t){this._map=t,this._el=t.getCanvasContainer(),i.bindAll(["_onKeyDown"],this)};o.prototype.isEnabled=function(){return!!this._enabled},o.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},o.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},o.prototype._onKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=0,r=0,i=0,o=0,a=0;switch(t.keyCode){case 61:case 107:case 171:case 187:e=1;break;case 189:case 109:case 173:e=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),o=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),o=1);break;case 38:t.shiftKey?i=1:(t.preventDefault(),a=-1);break;case 40:t.shiftKey?i=-1:(a=1,t.preventDefault());break;default:return}var s=this._map,l=s.getZoom(),u={duration:300,delayEndEvents:500,easing:n,zoom:e?Math.round(l)+e*(t.shiftKey?2:1):l,bearing:s.getBearing()+15*r,pitch:s.getPitch()+10*i,offset:[100*-o,100*-a],center:s.getCenter()};s.easeTo(u,{originalEvent:t})}},e.exports=o},{"../../util/util":223}],194:[function(t,e,r){"use strict";var n=t("../../util/dom"),i=t("../../util/util"),o=t("../../util/browser"),a=t("../../util/window"),s=a.navigator.userAgent.toLowerCase(),l=-1!==s.indexOf("firefox"),u=-1!==s.indexOf("safari")&&-1===s.indexOf("chrom"),c=function(t){this._map=t,this._el=t.getCanvasContainer(),i.bindAll(["_onWheel","_onTimeout"],this)};c.prototype.isEnabled=function(){return!!this._enabled},c.prototype.enable=function(t){this.isEnabled()||(this._el.addEventListener("wheel",this._onWheel,!1),this._el.addEventListener("mousewheel",this._onWheel,!1),this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},c.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("wheel",this._onWheel),this._el.removeEventListener("mousewheel",this._onWheel),this._enabled=!1)},c.prototype._onWheel=function(t){var e=0;"wheel"===t.type?(e=t.deltaY,l&&t.deltaMode===a.WheelEvent.DOM_DELTA_PIXEL&&(e/=o.devicePixelRatio),t.deltaMode===a.WheelEvent.DOM_DELTA_LINE&&(e*=40)):"mousewheel"===t.type&&(e=-t.wheelDeltaY,u&&(e/=3));var r=o.now(),i=r-(this._time||0);this._pos=n.mousePos(this._el,t),this._time=r,0!==e&&e%4.000244140625==0?this._type="wheel":0!==e&&Math.abs(e)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=e,this._timeout=setTimeout(this._onTimeout,40)):this._type||(this._type=Math.abs(i*e)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,e+=this._lastValue)),t.shiftKey&&e&&(e/=4),this._type&&this._zoom(-e,t),t.preventDefault()},c.prototype._onTimeout=function(){this._type="wheel",this._zoom(-this._lastValue)},c.prototype._zoom=function(t,e){if(0!==t){var r=this._map,n=2/(1+Math.exp(-Math.abs(t/100)));t<0&&0!==n&&(n=1/n);var i=r.ease?r.ease.to:r.transform.scale,o=r.transform.scaleZoom(i*n);r.zoomTo(o,{duration:"wheel"===this._type?200:0,around:this._aroundCenter?r.getCenter():r.unproject(this._pos),delayEndEvents:200,smoothEasing:!0},{originalEvent:e})}},e.exports=c},{"../../util/browser":202,"../../util/dom":209,"../../util/util":223,"../../util/window":204}],195:[function(t,e,r){"use strict";var n=t("../../util/dom"),i=t("../../util/util"),o=t("../../util/window"),a=i.bezier(0,0,.15,1),s=function(t){this._map=t,this._el=t.getCanvasContainer(),i.bindAll(["_onStart","_onMove","_onEnd"],this)};s.prototype.isEnabled=function(){return!!this._enabled},s.prototype.enable=function(t){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-zoom-rotate"),this._el.addEventListener("touchstart",this._onStart,!1),this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},s.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-zoom-rotate"),this._el.removeEventListener("touchstart",this._onStart),this._enabled=!1)},s.prototype.disableRotation=function(){this._rotationDisabled=!0},s.prototype.enableRotation=function(){this._rotationDisabled=!1},s.prototype._onStart=function(t){if(2===t.touches.length){var e=n.mousePos(this._el,t.touches[0]),r=n.mousePos(this._el,t.touches[1]);this._startVec=e.sub(r),this._startScale=this._map.transform.scale,this._startBearing=this._map.transform.bearing,this._gestureIntent=void 0,this._inertia=[],o.document.addEventListener("touchmove",this._onMove,!1),o.document.addEventListener("touchend",this._onEnd,!1)}},s.prototype._onMove=function(t){if(2===t.touches.length){var e=n.mousePos(this._el,t.touches[0]),r=n.mousePos(this._el,t.touches[1]),i=e.add(r).div(2),o=e.sub(r),a=o.mag()/this._startVec.mag(),s=this._rotationDisabled?0:180*o.angleWith(this._startVec)/Math.PI,l=this._map;if(this._gestureIntent){var u={duration:0,around:l.unproject(i)};"rotate"===this._gestureIntent&&(u.bearing=this._startBearing+s),"zoom"!==this._gestureIntent&&"rotate"!==this._gestureIntent||(u.zoom=l.transform.scaleZoom(this._startScale*a)),l.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),a,i]),l.easeTo(u,{originalEvent:t})}else{var c=Math.abs(1-a)>.15;Math.abs(s)>10?this._gestureIntent="rotate":c&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._startVec=o,this._startScale=l.transform.scale,this._startBearing=l.transform.bearing)}t.preventDefault()}},s.prototype._onEnd=function(t){o.document.removeEventListener("touchmove",this._onMove),o.document.removeEventListener("touchend",this._onEnd),this._drainInertiaBuffer();var e=this._inertia,r=this._map;if(e.length<2)return void r.snapToNorth({},{originalEvent:t});var n=e[e.length-1],i=e[0],s=r.transform.scaleZoom(this._startScale*n[1]),l=r.transform.scaleZoom(this._startScale*i[1]),u=s-l,c=(n[0]-i[0])/1e3,p=n[2];if(0===c||s===l)return void r.snapToNorth({},{originalEvent:t});var h=.15*u/c;Math.abs(h)>2.5&&(h=h>0?2.5:-2.5);var f=1e3*Math.abs(h/(12*.15)),d=s+h*f/2e3;d<0&&(d=0),r.easeTo({zoom:d,duration:f,easing:a,around:this._aroundCenter?r.getCenter():r.unproject(p)},{originalEvent:t})},s.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now();t.length>2&&e-t[0][0]>160;)t.shift()},e.exports=s},{"../../util/dom":209,"../../util/util":223,"../../util/window":204}],196:[function(t,e,r){"use strict";var n=t("../util/util"),i=t("../util/window"),o=function(){n.bindAll(["_onHashChange","_updateHash"],this)};o.prototype.addTo=function(t){return this._map=t,i.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},o.prototype.remove=function(){return i.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),delete this._map,this},o.prototype.getHashString=function(t){var e=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,n=Math.max(0,Math.ceil(Math.log(r)/Math.LN2)),i=Math.round(e.lng*Math.pow(10,n))/Math.pow(10,n),o=Math.round(e.lat*Math.pow(10,n))/Math.pow(10,n),a=this._map.getBearing(),s=this._map.getPitch(),l="";return l+=t?"#/"+i+"/"+o+"/"+r:"#"+r+"/"+o+"/"+i,(a||s)&&(l+="/"+Math.round(10*a)/10),s&&(l+="/"+Math.round(s)),l},o.prototype._onHashChange=function(){var t=i.location.hash.replace("#","").split("/");return t.length>=3&&(this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:+(t[3]||0),pitch:+(t[4]||0)}),!0)},o.prototype._updateHash=function(){var t=this.getHashString();i.history.replaceState("","",t)},e.exports=o},{"../util/util":223,"../util/window":204}],197:[function(t,e,r){"use strict";function n(t){t.parentNode&&t.parentNode.removeChild(t)}var i=t("../util/util"),o=t("../util/browser"),a=t("../util/window"),s=t("../util/window"),l=s.HTMLImageElement,u=t("../util/dom"),c=t("../util/ajax"),p=t("../style/style"),h=t("../style/animation_loop"),f=t("../render/painter"),d=t("../geo/transform"),m=t("./hash"),v=t("./bind_handlers"),y=t("./camera"),g=t("../geo/lng_lat"),_=t("../geo/lng_lat_bounds"),x=t("@mapbox/point-geometry"),b=t("./control/attribution_control"),w=t("./control/logo_control"),T=t("mapbox-gl-supported");t("./events");var S={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:22,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,transformRequest:null},z=function(t){function e(e){var r=this;if(e=i.extend({},S,e),null!=e.minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error("maxZoom must be greater than minZoom");var n=new d(e.minZoom,e.maxZoom,e.renderWorldCopies);t.call(this,n,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles;var o=e.transformRequest;if(this._transformRequest=o?function(t,e){return o(t,e)||{url:t}}:function(t){return{url:t}},"string"==typeof e.container){var s=a.document.getElementById(e.container);if(!s)throw new Error("Container '"+e.container+"' not found.");this._container=s}else this._container=e.container;this.animationLoop=new h,e.maxBounds&&this.setMaxBounds(e.maxBounds),i.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored","_update","_render","_onData","_onDataLoading"],this),this._setupContainer(),this._setupPainter(),this.on("move",this._update.bind(this,!1)),this.on("zoom",this._update.bind(this,!0)),this.on("moveend",function(){r.animationLoop.set(300),r._rerender()}),void 0!==a&&(a.addEventListener("online",this._onWindowOnline,!1),a.addEventListener("resize",this._onWindowResize,!1)),v(this,e),this._hash=e.hash&&(new m).addTo(this),this._hash&&this._hash._onHashChange()||this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),this._classes=[],this.resize(),e.classes&&this.setClasses(e.classes),e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new b),this.addControl(new w,e.logoPosition),this.on("style.load",function(){this.transform.unmodified&&this.jumpTo(this.style.stylesheet),this.style.update(this._classes,{transition:!1})}),this.on("data",this._onData),this.on("dataloading",this._onDataLoading)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={showTileBoundaries:{},showCollisionBoxes:{},showOverdrawInspector:{},repaint:{},vertices:{}};return e.prototype.addControl=function(t,e){void 0===e&&t.getDefaultPosition&&(e=t.getDefaultPosition()),void 0===e&&(e="top-right");var r=t.onAdd(this),n=this._controlPositions[e];return-1!==e.indexOf("bottom")?n.insertBefore(r,n.firstChild):n.appendChild(r),this},e.prototype.removeControl=function(t){return t.onRemove(this),this},e.prototype.addClass=function(t,e){return i.warnOnce("Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS."),this._classes.indexOf(t)>=0||""===t?this:(this._classes.push(t),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},e.prototype.removeClass=function(t,e){i.warnOnce("Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.");var r=this._classes.indexOf(t);return r<0||""===t?this:(this._classes.splice(r,1),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},e.prototype.setClasses=function(t,e){i.warnOnce("Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.");for(var r={},n=0;n<t.length;n++)""!==t[n]&&(r[t[n]]=!0);return this._classes=Object.keys(r),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0)},e.prototype.hasClass=function(t){return i.warnOnce("Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS."),this._classes.indexOf(t)>=0},e.prototype.getClasses=function(){return i.warnOnce("Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS."),this._classes},e.prototype.resize=function(){var t=this._containerDimensions(),e=t[0],r=t[1];return this._resizeCanvas(e,r),this.transform.resize(e,r),this.painter.resize(e,r),this.fire("movestart").fire("move").fire("resize").fire("moveend")},e.prototype.getBounds=function(){var t=new _(this.transform.pointLocation(new x(0,this.transform.height)),this.transform.pointLocation(new x(this.transform.width,0)));return(this.transform.angle||this.transform.pitch)&&(t.extend(this.transform.pointLocation(new x(this.transform.size.x,0))),t.extend(this.transform.pointLocation(new x(0,this.transform.size.y)))),t},e.prototype.getMaxBounds=function(){return this.transform.latRange&&2===this.transform.latRange.length&&this.transform.lngRange&&2===this.transform.lngRange.length?new _([this.transform.lngRange[0],this.transform.latRange[0]],[this.transform.lngRange[1],this.transform.latRange[1]]):null},e.prototype.setMaxBounds=function(t){if(t){var e=_.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update()}else null!==t&&void 0!==t||(this.transform.lngRange=null,this.transform.latRange=null,this._update());return this},e.prototype.setMinZoom=function(t){if((t=null===t||void 0===t?0:t)>=0&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()<t&&this.setZoom(t),this;throw new Error("minZoom must be between 0 and the current maxZoom, inclusive")},e.prototype.getMinZoom=function(){return this.transform.minZoom},e.prototype.setMaxZoom=function(t){if((t=null===t||void 0===t?22:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")},e.prototype.getMaxZoom=function(){return this.transform.maxZoom},e.prototype.project=function(t){return this.transform.locationPoint(g.convert(t))},e.prototype.unproject=function(t){return this.transform.pointLocation(x.convert(t))},e.prototype.on=function(e,r,n){var o=this;if(void 0===n)return t.prototype.on.call(this,e,r);var a=function(){if("mouseenter"===e||"mouseover"===e){var t=!1;return{layer:r,listener:n,delegates:{mousemove:function(a){var s=o.getLayer(r)?o.queryRenderedFeatures(a.point,{layers:[r]}):[];s.length?t||(t=!0,n.call(o,i.extend({features:s},a,{type:e}))):t=!1},mouseout:function(){t=!1}}}}if("mouseleave"===e||"mouseout"===e){var a=!1;return{layer:r,listener:n,delegates:{mousemove:function(t){(o.getLayer(r)?o.queryRenderedFeatures(t.point,{layers:[r]}):[]).length?a=!0:a&&(a=!1,n.call(o,i.extend({},t,{type:e})))},mouseout:function(t){a&&(a=!1,n.call(o,i.extend({},t,{type:e})))}}}}var s=function(t){var e=o.getLayer(r)?o.queryRenderedFeatures(t.point,{layers:[r]}):[];e.length&&n.call(o,i.extend({features:e},t))};return{layer:r,listener:n,delegates:(l={},l[e]=s,l)};var l}();this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(a);for(var s in a.delegates)o.on(s,a.delegates[s]);return this},e.prototype.off=function(e,r,n){var i=this;if(void 0===n)return t.prototype.off.call(this,e,r);if(this._delegatedListeners&&this._delegatedListeners[e])for(var o=this._delegatedListeners[e],a=0;a<o.length;a++){var s=o[a];if(s.layer===r&&s.listener===n){for(var l in s.delegates)i.off(l,s.delegates[l]);return o.splice(a,1),i}}return this},e.prototype.queryRenderedFeatures=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r,n={};return 2===t.length?(r=arguments[0],n=arguments[1]):1===t.length&&function(t){return t instanceof x||Array.isArray(t)}(t[0])?r=t[0]:1===t.length&&(n=t[0]),this.style?this.style.queryRenderedFeatures(this._makeQueryGeometry(r),n,this.transform.zoom,this.transform.angle):[]},e.prototype._makeQueryGeometry=function(t){var e=this;void 0===t&&(t=[x.convert([0,0]),x.convert([this.transform.width,this.transform.height])]);var r;if(t instanceof x||"number"==typeof t[0])r=[x.convert(t)];else{var n=[x.convert(t[0]),x.convert(t[1])];r=[n[0],new x(n[1].x,n[0].y),n[1],new x(n[0].x,n[1].y),n[0]]}return r=r.map(function(t){return e.transform.pointCoordinate(t)})},e.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},e.prototype.setStyle=function(t,e){if((!e||!1!==e.diff&&!e.localIdeographFontFamily)&&this.style&&t&&!(t instanceof p)&&"string"!=typeof t)try{return this.style.setState(t)&&this._update(!0),this}catch(t){i.warnOnce("Unable to perform style diff: "+(t.message||t.error||t)+". Rebuilding the style from scratch.")}return this.style&&(this.style.setEventedParent(null),this.style._remove(),this.off("rotate",this.style._redoPlacement),this.off("pitch",this.style._redoPlacement),this.off("move",this.style._redoPlacement)),t?(this.style=t instanceof p?t:new p(t,this,e||{}),this.style.setEventedParent(this,{style:this.style}),this.on("rotate",this.style._redoPlacement),this.on("pitch",this.style._redoPlacement),this.on("move",this.style._redoPlacement),this):(this.style=null,this)},e.prototype.getStyle=function(){if(this.style)return this.style.serialize()},e.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():i.warnOnce("There is no style added to the map.")},e.prototype.addSource=function(t,e){return this.style.addSource(t,e),this._update(!0),this},e.prototype.isSourceLoaded=function(t){var e=this.style&&this.style.sourceCaches[t];return void 0===e?void this.fire("error",{error:new Error("There is no source with ID '"+t+"'")}):e.loaded()},e.prototype.areTilesLoaded=function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var r=t[e],n=r._tiles;for(var i in n){var o=n[i];if("loaded"!==o.state&&"errored"!==o.state)return!1}}return!0},e.prototype.addSourceType=function(t,e,r){return this.style.addSourceType(t,e,r)},e.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0),this},e.prototype.getSource=function(t){return this.style.getSource(t)},e.prototype.addImage=function(t,e,r){void 0===r&&(r={});var n=r.pixelRatio;void 0===n&&(n=1);var i=r.sdf;if(void 0===i&&(i=!1),e instanceof l)e=o.getImageData(e);else if(void 0===e.width||void 0===e.height)return this.fire("error",{error:new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")});this.style.addImage(t,{data:e,pixelRatio:n,sdf:i})},e.prototype.removeImage=function(t){this.style.removeImage(t)},e.prototype.loadImage=function(t,e){c.getImage(this._transformRequest(t,c.ResourceType.Image),e)},e.prototype.addLayer=function(t,e){return this.style.addLayer(t,e),this._update(!0),this},e.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0),this},e.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0),this},e.prototype.getLayer=function(t){return this.style.getLayer(t)},e.prototype.setFilter=function(t,e){return this.style.setFilter(t,e),this._update(!0),this},e.prototype.setLayerZoomRange=function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0),this},e.prototype.getFilter=function(t){return this.style.getFilter(t)},e.prototype.setPaintProperty=function(t,e,r,n){return this.style.setPaintProperty(t,e,r,n),this._update(!0),this},e.prototype.getPaintProperty=function(t,e,r){return this.style.getPaintProperty(t,e,r)},e.prototype.setLayoutProperty=function(t,e,r){return this.style.setLayoutProperty(t,e,r),this._update(!0),this},e.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},e.prototype.setLight=function(t){return this.style.setLight(t),this._update(!0),this},e.prototype.getLight=function(){return this.style.getLight()},e.prototype.getContainer=function(){return this._container},e.prototype.getCanvasContainer=function(){return this._canvasContainer},e.prototype.getCanvas=function(){return this._canvas},e.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),[t,e]},e.prototype._setupContainer=function(){var t=this._container;t.classList.add("mapboxgl-map");var e=this._canvasContainer=u.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=u.create("canvas","mapboxgl-canvas",e),this._canvas.style.position="absolute",this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map");var r=this._containerDimensions();this._resizeCanvas(r[0],r[1]);var n=this._controlContainer=u.create("div","mapboxgl-control-container",t),i=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(t){i[t]=u.create("div","mapboxgl-ctrl-"+t,n)})},e.prototype._resizeCanvas=function(t,e){var r=a.devicePixelRatio||1;this._canvas.width=r*t,this._canvas.height=r*e,this._canvas.style.width=t+"px",this._canvas.style.height=e+"px"},e.prototype._setupPainter=function(){var t=i.extend({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer},T.webGLContextAttributes),e=this._canvas.getContext("webgl",t)||this._canvas.getContext("experimental-webgl",t);if(!e)return void this.fire("error",{error:new Error("Failed to initialize WebGL")});this.painter=new f(e,this.transform)},e.prototype._contextLost=function(t){t.preventDefault(),this._frameId&&(o.cancelFrame(this._frameId),this._frameId=null),this.fire("webglcontextlost",{originalEvent:t})},e.prototype._contextRestored=function(t){this._setupPainter(),this.resize(),this._update(),this.fire("webglcontextrestored",{originalEvent:t})},e.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!(!this.style||!this.style.loaded())},e.prototype._update=function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender(),this):this},e.prototype._render=function(){return this.style&&this._styleDirty&&(this._styleDirty=!1,this.style.update(this._classes,this._classOptions),this._classOptions=null,this.style._recalculate(this.transform.zoom)),this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.rotating,zooming:this.zooming}),this.fire("render"),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire("load")),this._frameId=null,this.animationLoop.stopped()||(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty)&&this._rerender(),this},e.prototype.remove=function(){this._hash&&this._hash.remove(),o.cancelFrame(this._frameId),this._frameId=null,this.setStyle(null),void 0!==a&&(a.removeEventListener("resize",this._onWindowResize,!1),a.removeEventListener("online",this._onWindowOnline,!1));var t=this.painter.gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),n(this._canvasContainer),n(this._controlContainer),this._container.classList.remove("mapboxgl-map"),this.fire("remove")},e.prototype._rerender=function(){this.style&&!this._frameId&&(this._frameId=o.frame(this._render))},e.prototype._onWindowOnline=function(){this._update()},e.prototype._onWindowResize=function(){this._trackResize&&this.stop().resize()._update()},r.showTileBoundaries.get=function(){return!!this._showTileBoundaries},r.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},r.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},r.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,this.style._redoPlacement())},r.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},r.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},r.repaint.get=function(){return!!this._repaint},r.repaint.set=function(t){this._repaint=t,this._update()},r.vertices.get=function(){return!!this._vertices},r.vertices.set=function(t){this._vertices=t,this._update()},e.prototype._onData=function(t){this._update("style"===t.dataType),this.fire(t.dataType+"data",t)},e.prototype._onDataLoading=function(t){this.fire(t.dataType+"dataloading",t)},Object.defineProperties(e.prototype,r),e}(y);e.exports=z},{"../geo/lng_lat":58,"../geo/lng_lat_bounds":59,"../geo/transform":60,"../render/painter":79,"../style/animation_loop":150,"../style/style":156,"../util/ajax":201,"../util/browser":202,"../util/dom":209,"../util/util":223,"../util/window":204,"./bind_handlers":180,"./camera":181,"./control/attribution_control":182,"./control/logo_control":185,"./events":188,"./hash":196,"@mapbox/point-geometry":2,"mapbox-gl-supported":28}],198:[function(t,e,r){"use strict";var n=t("../util/dom"),i=t("../geo/lng_lat"),o=t("@mapbox/point-geometry"),a=t("../util/smart_wrap"),s=t("../util/util"),l=s.bindAll,u=function(t,e){this._offset=o.convert(e&&e.offset||[0,0]),l(["_update","_onMapClick"],this),t||(t=n.create("div")),t.classList.add("mapboxgl-marker"),this._element=t,this._popup=null};u.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),this._update(),this._map.on("click",this._onMapClick),this},u.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),delete this._map),n.remove(this._element),this._popup&&this._popup.remove(),this},u.prototype.getLngLat=function(){return this._lngLat},u.prototype.setLngLat=function(t){return this._lngLat=i.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},u.prototype.getElement=function(){return this._element},u.prototype.setPopup=function(t){return this._popup&&(this._popup.remove(),this._popup=null),t&&("offset"in t.options||(t.options.offset=this._offset),this._popup=t,this._popup.setLngLat(this._lngLat)),this},u.prototype._onMapClick=function(t){var e=t.originalEvent.target,r=this._element;this._popup&&(e===r||r.contains(e))&&this.togglePopup()},u.prototype.getPopup=function(){return this._popup},u.prototype.togglePopup=function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this},u.prototype._update=function(t){this._map&&(this._map.transform.renderWorldCopies&&(this._lngLat=a(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset),t&&"moveend"!==t.type||(this._pos=this._pos.round()),n.setTransform(this._element,"translate(-50%, -50%) translate("+this._pos.x+"px, "+this._pos.y+"px)"))},e.exports=u},{"../geo/lng_lat":58,"../util/dom":209,"../util/smart_wrap":219,"../util/util":223,"@mapbox/point-geometry":2}],199:[function(t,e,r){"use strict";function n(t){if(t){if("number"==typeof t){var e=Math.round(Math.sqrt(.5*Math.pow(t,2)));return{top:new l(0,t),"top-left":new l(e,e),"top-right":new l(-e,e),bottom:new l(0,-t),"bottom-left":new l(e,-e),"bottom-right":new l(-e,-e),left:new l(t,0),right:new l(-t,0)}}if(t instanceof l||Array.isArray(t)){var r=l.convert(t);return{top:r,"top-left":r,"top-right":r,bottom:r,"bottom-left":r,"bottom-right":r,left:r,right:r}}return{top:l.convert(t.top||[0,0]),"top-left":l.convert(t["top-left"]||[0,0]),"top-right":l.convert(t["top-right"]||[0,0]),bottom:l.convert(t.bottom||[0,0]),"bottom-left":l.convert(t["bottom-left"]||[0,0]),"bottom-right":l.convert(t["bottom-right"]||[0,0]),left:l.convert(t.left||[0,0]),right:l.convert(t.right||[0,0])}}return n(new l(0,0))}var i=t("../util/util"),o=t("../util/evented"),a=t("../util/dom"),s=t("../geo/lng_lat"),l=t("@mapbox/point-geometry"),u=t("../util/window"),c=t("../util/smart_wrap"),p={closeButton:!0,closeOnClick:!0},h=function(t){function e(e){t.call(this),this.options=i.extend(Object.create(p),e),i.bindAll(["_update","_onClickClose"],this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addTo=function(t){return this._map=t,this._map.on("move",this._update),this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._update(),this},e.prototype.isOpen=function(){return!!this._map},e.prototype.remove=function(){return this._content&&a.remove(this._content),this._container&&(a.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),delete this._map),this.fire("close"),this},e.prototype.getLngLat=function(){return this._lngLat},e.prototype.setLngLat=function(t){return this._lngLat=s.convert(t),this._pos=null,this._update(),this},e.prototype.setText=function(t){return this.setDOMContent(u.document.createTextNode(t))},e.prototype.setHTML=function(t){var e,r=u.document.createDocumentFragment(),n=u.document.createElement("body");for(n.innerHTML=t;e=n.firstChild;)r.appendChild(e);return this.setDOMContent(r)},e.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},e.prototype._createContent=function(){this._content&&a.remove(this._content),this._content=a.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=a.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._onClickClose))},e.prototype._update=function(){if(this._map&&this._lngLat&&this._content){this._container||(this._container=a.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=a.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content)),this._map.transform.renderWorldCopies&&(this._lngLat=c(this._lngLat,this._pos,this._map.transform));var t=this._pos=this._map.project(this._lngLat),e=this.options.anchor,r=n(this.options.offset);if(!e){var i=this._container.offsetWidth,o=this._container.offsetHeight;e=t.y+r.bottom.y<o?["top"]:t.y>this._map.transform.height-o?["bottom"]:[],t.x<i/2?e.push("left"):t.x>this._map.transform.width-i/2&&e.push("right"),e=0===e.length?"bottom":e.join("-")}var s=t.add(r[e]).round(),l={top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"},u=this._container.classList;for(var p in l)u.remove("mapboxgl-popup-anchor-"+p);u.add("mapboxgl-popup-anchor-"+e),a.setTransform(this._container,l[e]+" translate("+s.x+"px,"+s.y+"px)")}},e.prototype._onClickClose=function(){this.remove()},e}(o);e.exports=h},{"../geo/lng_lat":58,"../util/dom":209,"../util/evented":210,"../util/smart_wrap":219,"../util/util":223,"../util/window":204,"@mapbox/point-geometry":2}],200:[function(t,e,r){"use strict";var n=t("./util"),i=function(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.callbackID=0,n.bindAll(["receive"],this),this.target.addEventListener("message",this.receive,!1)};i.prototype.send=function(t,e,r,n,i){var o=r?this.mapId+":"+this.callbackID++:null;r&&(this.callbacks[o]=r),this.target.postMessage({targetMapId:i,sourceMapId:this.mapId,type:t,id:String(o),data:e},n)},i.prototype.receive=function(t){var e,r=this,n=t.data,i=n.id;if(!n.targetMapId||this.mapId===n.targetMapId){var o=function(t,e,n){r.target.postMessage({sourceMapId:r.mapId,type:"<response>",id:String(i),error:t?String(t):null,data:e},n)};if("<response>"===n.type)e=this.callbacks[n.id],delete this.callbacks[n.id],e&&n.error?e(new Error(n.error)):e&&e(null,n.data);else if(void 0!==n.id&&this.parent[n.type])this.parent[n.type](n.sourceMapId,n.data,o);else if(void 0!==n.id&&this.parent.getWorkerSource){var a=n.type.split("."),s=this.parent.getWorkerSource(n.sourceMapId,a[0]);s[a[1]](n.data,o)}else this.parent[n.type](n.data)}},i.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)},e.exports=i},{"./util":223}],201:[function(t,e,r){"use strict";function n(t){var e=new o.XMLHttpRequest;e.open("GET",t.url,!0);for(var r in t.headers)e.setRequestHeader(r,t.headers[r]);return e.withCredentials="include"===t.credentials,e}function i(t){var e=o.document.createElement("a");return e.href=t,e.protocol===o.document.location.protocol&&e.host===o.document.location.host}var o=t("./window"),a={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};r.ResourceType=a,"function"==typeof Object.freeze&&Object.freeze(a);var s=function(t){function e(e,r){t.call(this,e),this.status=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error);r.getJSON=function(t,e){var r=n(t);return r.setRequestHeader("Accept","application/json"),r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if(r.status>=200&&r.status<300&&r.response){var t;try{t=JSON.parse(r.response)}catch(t){return e(t)}e(null,t)}else e(new s(r.statusText,r.status))},r.send(),r},r.getArrayBuffer=function(t,e){var r=n(t);return r.responseType="arraybuffer",r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){var t=r.response;if(0===t.byteLength&&200===r.status)return e(new Error("http status 200 returned without content."));r.status>=200&&r.status<300&&r.response?e(null,{data:t,cacheControl:r.getResponseHeader("Cache-Control"),expires:r.getResponseHeader("Expires")}):e(new s(r.statusText,r.status))},r.send(),r};r.getImage=function(t,e){return r.getArrayBuffer(t,function(t,r){if(t)e(t);else if(r){var n=new o.Image,i=o.URL||o.webkitURL;n.onload=function(){e(null,n),i.revokeObjectURL(n.src)};var a=new o.Blob([new Uint8Array(r.data)],{type:"image/png"});n.cacheControl=r.cacheControl,n.expires=r.expires,n.src=r.data.byteLength?i.createObjectURL(a):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}})},r.getVideo=function(t,e){var r=o.document.createElement("video");r.onloadstart=function(){e(null,r)};for(var n=0;n<t.length;n++){var a=o.document.createElement("source");i(t[n])||(r.crossOrigin="Anonymous"),a.src=t[n],r.appendChild(a)}return r}},{"./window":204}],202:[function(t,e,r){"use strict";var n=t("./window"),i=n.performance&&n.performance.now?n.performance.now.bind(n.performance):Date.now.bind(Date),o=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||n.msRequestAnimationFrame,a=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||n.msCancelAnimationFrame;e.exports={now:i,frame:function(t){return o(t)},cancelFrame:function(t){return a(t)},timed:function(t,e,r){function n(){if(!a){var l=i();l>=s+e?t.call(r,1):(t.call(r,(l-s)/e),o(n))}}if(!e)return t.call(r,1),null;var a=!1,s=i();return o(n),function(){a=!0}},getImageData:function(t){var e=n.document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0,t.width,t.height),r.getImageData(0,0,t.width,t.height)},hardwareConcurrency:n.navigator.hardwareConcurrency||4,get devicePixelRatio(){return n.devicePixelRatio},supportsWebp:!1};var s=n.document.createElement("img");s.onload=function(){e.exports.supportsWebp=!0},s.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="},{"./window":204}],203:[function(t,e,r){"use strict";var n=t("webworkify"),i=t("../window"),o=i.URL.createObjectURL(new n(t("../../source/worker"),{bare:!0}));e.exports=function(){return new i.Worker(o)}},{"../../source/worker":105,"../window":204,webworkify:39}],204:[function(t,e,r){"use strict";e.exports=self},{}],205:[function(t,e,r){"use strict";function n(t,e){return e.area-t.area}var i=t("quickselect"),o=t("./util").calculateSignedArea;e.exports=function(t,e){var r=t.length;if(r<=1)return[t];for(var a,s,l=[],u=0;u<r;u++){var c=o(t[u]);0!==c&&(t[u].area=Math.abs(c),void 0===s&&(s=c<0),s===c<0?(a&&l.push(a),a=[t[u]]):a.push(t[u]))}if(a&&l.push(a),e>1)for(var p=0;p<l.length;p++)l[p].length<=e||(i(l[p],e,1,l[p].length-1,n),l[p]=l[p].slice(0,e));return l}},{"./util":223,quickselect:31}],206:[function(t,e,r){"use strict";var n={API_URL:"https://api.mapbox.com",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null};e.exports=n},{}],207:[function(t,e,r){"use strict";var n=function(t){var e=this;this._stringToNumber={},this._numberToString=[];for(var r=0;r<t.length;r++){var n=t[r];e._stringToNumber[n]=r,e._numberToString[r]=n}};n.prototype.encode=function(t){return this._stringToNumber[t]},n.prototype.decode=function(t){return this._numberToString[t]},e.exports=n},{}],208:[function(t,e,r){"use strict";var n=t("./util"),i=t("./actor"),o=function(t,e){var r=this;this.workerPool=t,this.actors=[],this.currentActor=0,this.id=n.uniqueId();for(var o=this.workerPool.acquire(this.id),a=0;a<o.length;a++){var s=o[a],l=new i(s,e,r.id);l.name="Worker "+a,r.actors.push(l)}};o.prototype.broadcast=function(t,e,r){r=r||function(){},n.asyncAll(this.actors,function(r,n){r.send(t,e,n)},r)},o.prototype.send=function(t,e,r,n,i){return("number"!=typeof n||isNaN(n))&&(n=this.currentActor=(this.currentActor+1)%this.actors.length),this.actors[n].send(t,e,r,i),n},o.prototype.remove=function(){this.actors.forEach(function(t){t.remove()}),this.actors=[],this.workerPool.release(this.id)},e.exports=o},{"./actor":200,"./util":223}],209:[function(t,e,r){"use strict";function n(t){for(var e=0;e<t.length;e++)if(t[e]in s)return t[e];return t[0]}var i=t("@mapbox/point-geometry"),o=t("./window");r.create=function(t,e,r){var n=o.document.createElement(t);return e&&(n.className=e),r&&r.appendChild(n),n};var a,s=o.document.documentElement.style,l=n(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);r.disableDrag=function(){l&&(a=s[l],s[l]="none")},r.enableDrag=function(){l&&(s[l]=a)};var u=n(["transform","WebkitTransform"]);r.setTransform=function(t,e){t.style[u]=e};var c=function(t){t.preventDefault(),t.stopPropagation(),o.removeEventListener("click",c,!0)};r.suppressClick=function(){o.addEventListener("click",c,!0),o.setTimeout(function(){o.removeEventListener("click",c,!0)},0)},r.mousePos=function(t,e){var r=t.getBoundingClientRect();return e=e.touches?e.touches[0]:e,new i(e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop)},r.touchPos=function(t,e){for(var r=t.getBoundingClientRect(),n=[],o="touchend"===e.type?e.changedTouches:e.touches,a=0;a<o.length;a++)n.push(new i(o[a].clientX-r.left-t.clientLeft,o[a].clientY-r.top-t.clientTop));return n},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)}},{"./window":204,"@mapbox/point-geometry":2}],210:[function(t,e,r){"use strict";function n(t,e,r){r[t]=r[t]||[],r[t].push(e)}function i(t,e,r){if(r&&r[t]){var n=r[t].indexOf(e);-1!==n&&r[t].splice(n,1)}}var o=t("./util"),a=function(){};a.prototype.on=function(t,e){return this._listeners=this._listeners||{},n(t,e,this._listeners),this},a.prototype.off=function(t,e){return i(t,e,this._listeners),i(t,e,this._oneTimeListeners),this},a.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},n(t,e,this._oneTimeListeners),this},a.prototype.fire=function(t,e){var r=this;if(this.listens(t)){e=o.extend({},e,{type:t,target:this});for(var n=this._listeners&&this._listeners[t]?this._listeners[t].slice():[],a=0;a<n.length;a++)n[a].call(r,e);for(var s=this._oneTimeListeners&&this._oneTimeListeners[t]?this._oneTimeListeners[t].slice():[],l=0;l<s.length;l++)s[l].call(r,e),i(t,s[l],r._oneTimeListeners);this._eventedParent&&this._eventedParent.fire(t,o.extend({},e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData))}else o.endsWith(t,"error")&&console.error(e&&e.error||e||"Empty error event");return this},a.prototype.listens=function(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},a.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this},e.exports=a},{"./util":223}],211:[function(t,e,r){"use strict";function n(t,e){return e.max-t.max}function i(t,e,r,n){this.p=new l(t,e),this.h=r,this.d=o(this.p,n),this.max=this.d+this.h*Math.SQRT2}function o(t,e){for(var r=!1,n=1/0,i=0;i<e.length;i++)for(var o=e[i],a=0,s=o.length,l=s-1;a<s;l=a++){var c=o[a],p=o[l];c.y>t.y!=p.y>t.y&&t.x<(p.x-c.x)*(t.y-c.y)/(p.y-c.y)+c.x&&(r=!r),n=Math.min(n,u(t,c,p))}return(r?1:-1)*Math.sqrt(n)}function a(t){for(var e=0,r=0,n=0,o=t[0],a=0,s=o.length,l=s-1;a<s;l=a++){var u=o[a],c=o[l],p=u.x*c.y-c.x*u.y;r+=(u.x+c.x)*p,n+=(u.y+c.y)*p,e+=3*p}return new i(r/e,n/e,0,t)}var s=t("tinyqueue"),l=t("@mapbox/point-geometry"),u=t("./intersection_tests").distToSegmentSquared;e.exports=function(t,e,r){void 0===e&&(e=1),void 0===r&&(r=!1);for(var o=1/0,u=1/0,c=-1/0,p=-1/0,h=t[0],f=0;f<h.length;f++){var d=h[f];(!f||d.x<o)&&(o=d.x),(!f||d.y<u)&&(u=d.y),(!f||d.x>c)&&(c=d.x),(!f||d.y>p)&&(p=d.y)}var m=c-o,v=p-u,y=Math.min(m,v),g=y/2,_=new s(null,n);if(0===y)return new l(o,u);for(var x=o;x<c;x+=y)for(var b=u;b<p;b+=y)_.push(new i(x+g,b+g,g,t));for(var w=a(t),T=_.length;_.length;){var S=_.pop();(S.d>w.d||!w.d)&&(w=S,r&&console.log("found best %d after %d probes",Math.round(1e4*S.d)/1e4,T)),S.max-w.d<=e||(g=S.h/2,_.push(new i(S.p.x-g,S.p.y-g,g,t)),_.push(new i(S.p.x+g,S.p.y-g,g,t)),_.push(new i(S.p.x-g,S.p.y+g,g,t)),_.push(new i(S.p.x+g,S.p.y+g,g,t)),T+=4)}return r&&(console.log("num probes: "+T),console.log("best distance: "+w.d)),w.p}},{"./intersection_tests":214,"@mapbox/point-geometry":2,tinyqueue:33}],212:[function(t,e,r){"use strict";var n,i=t("./worker_pool");e.exports=function(){return n||(n=new i),n}},{"./worker_pool":226}],213:[function(t,e,r){"use strict";function n(t,e,r){var n=t.width,i=t.height;if(r){if(r.length!==n*i*e)throw new RangeError("mismatched image size")}else r=new Uint8Array(n*i*e);return{width:n,height:i,data:r}}function i(t,e,r){var i=e.width,a=e.height;if(i===t.width&&a===t.height)return t;var s=n({width:i,height:a},r);o(t,s,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,i),height:Math.min(t.height,a)},r),t.width=i,t.height=a,t.data=s.data}function o(t,e,r,n,i,o){if(0===i.width||0===i.height)return e;if(i.width>t.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>e.width||i.height>e.height||n.x>e.width-i.width||n.y>e.height-i.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=t.data,s=e.data,l=0;l<i.height;l++)for(var u=((r.y+l)*t.width+r.x)*o,c=((n.y+l)*e.width+n.x)*o,p=0;p<i.width*o;p++)s[c+p]=a[u+p];return e}var a=function(){};a.create=function(t,e){return n(t,1,e)},a.resize=function(t,e){i(t,e,1)},a.copy=function(t,e,r,n,i){o(t,e,r,n,i,1)};var s=function(){};s.create=function(t,e){return n(t,4,e)},s.resize=function(t,e){i(t,e,4)},s.copy=function(t,e,r,n,i){o(t,e,r,n,i,4)},e.exports={AlphaImage:a,RGBAImage:s}},{}],214:[function(t,e,r){"use strict";function n(t,e){for(var r=0;r<t.length;r++)if(f(e,t[r]))return!0;for(var n=0;n<e.length;n++)if(f(t,e[n]))return!0;return!!l(t,e)}function i(t,e,r){for(var n=0;n<t.length;n++)for(var i=t[n],o=0;o<e.length;o++)for(var a=e[o],s=0;s<a.length;s++){var l=a[s];if(f(i,l))return!0;if(c(l,i,r))return!0}return!1}function o(t,e){if(1===t.length&&1===t[0].length)return h(e,t[0][0]);for(var r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;i++)if(h(t,n[i]))return!0;for(var o=0;o<t.length;o++){for(var a=t[o],s=0;s<a.length;s++)if(h(e,a[s]))return!0;for(var u=0;u<e.length;u++)if(l(a,e[u]))return!0}return!1}function a(t,e,r){for(var n=0;n<e.length;n++)for(var i=e[n],o=0;o<t.length;o++){var a=t[o];if(a.length>=3)for(var l=0;l<i.length;l++)if(f(a,i[l]))return!0;if(s(a,i,r))return!0}return!1}function s(t,e,r){if(t.length>1){if(l(t,e))return!0;for(var n=0;n<e.length;n++)if(c(e[n],t,r))return!0}for(var i=0;i<t.length;i++)if(c(t[i],e,r))return!0;return!1}function l(t,e){if(0===t.length||0===e.length)return!1;for(var r=0;r<t.length-1;r++)for(var n=t[r],i=t[r+1],o=0;o<e.length-1;o++){var a=e[o],s=e[o+1];if(u(n,i,a,s))return!0}return!1}function u(t,e,r,n){return m(t,r,n)!==m(e,r,n)&&m(t,e,r)!==m(t,e,n)}function c(t,e,r){var n=r*r;if(1===e.length)return t.distSqr(e[0])<n;for(var i=1;i<e.length;i++)if(p(t,e[i-1],e[i])<n)return!0;return!1}function p(t,e,r){var n=e.distSqr(r);if(0===n)return t.distSqr(e);var i=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/n;return i<0?t.distSqr(e):i>1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function h(t,e){for(var r,n,i,o=!1,a=0;a<t.length;a++){r=t[a];for(var s=0,l=r.length-1;s<r.length;l=s++)n=r[s],i=r[l],n.y>e.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(o=!o)}return o}function f(t,e){for(var r=!1,n=0,i=t.length-1;n<t.length;i=n++){var o=t[n],a=t[i];o.y>e.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(r=!r)}return r}var d=t("./util"),m=d.isCounterClockwise;e.exports={multiPolygonIntersectsBufferedMultiPoint:i,multiPolygonIntersectsMultiPolygon:o,multiPolygonIntersectsBufferedMultiLine:a,polygonIntersectsPolygon:n,distToSegmentSquared:p}},{"./util":223}],215:[function(t,e,r){"use strict";var n={"Latin-1 Supplement":function(t){return t>=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},"Arabic Supplement":function(t){return t>=1872&&t<=1919},"Arabic Extended-A":function(t){return t>=2208&&t<=2303},"Hangul Jamo":function(t){return t>=4352&&t<=4607},"Unified Canadian Aboriginal Syllabics":function(t){return t>=5120&&t<=5759},"Unified Canadian Aboriginal Syllabics Extended":function(t){return t>=6320&&t<=6399},"General Punctuation":function(t){return t>=8192&&t<=8303},"Letterlike Symbols":function(t){return t>=8448&&t<=8527},"Number Forms":function(t){return t>=8528&&t<=8591},"Miscellaneous Technical":function(t){return t>=8960&&t<=9215},"Control Pictures":function(t){return t>=9216&&t<=9279},"Optical Character Recognition":function(t){return t>=9280&&t<=9311},"Enclosed Alphanumerics":function(t){return t>=9312&&t<=9471},"Geometric Shapes":function(t){return t>=9632&&t<=9727},"Miscellaneous Symbols":function(t){return t>=9728&&t<=9983},"Miscellaneous Symbols and Arrows":function(t){return t>=11008&&t<=11263},"CJK Radicals Supplement":function(t){return t>=11904&&t<=12031},"Kangxi Radicals":function(t){return t>=12032&&t<=12255},"Ideographic Description Characters":function(t){return t>=12272&&t<=12287},"CJK Symbols and Punctuation":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},"Hangul Compatibility Jamo":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},"Bopomofo Extended":function(t){return t>=12704&&t<=12735},"CJK Strokes":function(t){return t>=12736&&t<=12783},"Katakana Phonetic Extensions":function(t){return t>=12784&&t<=12799},"Enclosed CJK Letters and Months":function(t){return t>=12800&&t<=13055},"CJK Compatibility":function(t){return t>=13056&&t<=13311},"CJK Unified Ideographs Extension A":function(t){return t>=13312&&t<=19903},"Yijing Hexagram Symbols":function(t){return t>=19904&&t<=19967},"CJK Unified Ideographs":function(t){return t>=19968&&t<=40959},"Yi Syllables":function(t){return t>=40960&&t<=42127},"Yi Radicals":function(t){return t>=42128&&t<=42191},"Hangul Jamo Extended-A":function(t){return t>=43360&&t<=43391},"Hangul Syllables":function(t){return t>=44032&&t<=55215},"Hangul Jamo Extended-B":function(t){return t>=55216&&t<=55295},"Private Use Area":function(t){return t>=57344&&t<=63743},"CJK Compatibility Ideographs":function(t){return t>=63744&&t<=64255},"Arabic Presentation Forms-A":function(t){return t>=64336&&t<=65023},"Vertical Forms":function(t){return t>=65040&&t<=65055},"CJK Compatibility Forms":function(t){return t>=65072&&t<=65103},"Small Form Variants":function(t){return t>=65104&&t<=65135},"Arabic Presentation Forms-B":function(t){return t>=65136&&t<=65279},"Halfwidth and Fullwidth Forms":function(t){return t>=65280&&t<=65519}};e.exports=n},{}],216:[function(t,e,r){"use strict";var n=function(t,e){this.max=t,this.onRemove=e,this.reset()};n.prototype.reset=function(){var t=this;for(var e in t.data)t.onRemove(t.data[e]);return this.data={},this.order=[],this},n.prototype.add=function(t,e){if(this.has(t))this.order.splice(this.order.indexOf(t),1),this.data[t]=e,this.order.push(t);else if(this.data[t]=e,this.order.push(t),this.order.length>this.max){var r=this.get(this.order[0]);r&&this.onRemove(r)}return this},n.prototype.has=function(t){return t in this.data},n.prototype.keys=function(){return this.order},n.prototype.get=function(t){if(!this.has(t))return null;var e=this.data[t];return delete this.data[t],this.order.splice(this.order.indexOf(t),1),e},n.prototype.getWithoutRemoving=function(t){return this.has(t)?this.data[t]:null},n.prototype.remove=function(t){if(!this.has(t))return this;var e=this.data[t];return delete this.data[t],this.onRemove(e),this.order.splice(this.order.indexOf(t),1),this},n.prototype.setMaxSize=function(t){var e=this;for(this.max=t;this.order.length>this.max;){var r=e.get(e.order[0]);r&&e.onRemove(r)}return this},e.exports=n},{}],217:[function(t,e,r){"use strict";function n(t,e){var r=a(l.API_URL);if(t.protocol=r.protocol,t.authority=r.authority,"/"!==r.path&&(t.path=""+r.path+t.path),!l.REQUIRE_ACCESS_TOKEN)return s(t);if(!(e=e||l.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+c);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+c);return t.params.push("access_token="+e),s(t)}function i(t){return 0===t.indexOf("mapbox:")}function o(t){for(var e=0;e<t.length;e++)0===t[e].indexOf("access_token=tk.")&&(t[e]="access_token="+(l.ACCESS_TOKEN||""))}function a(t){var e=t.match(h);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function s(t){var e=t.params.length?"?"+t.params.join("&"):"";return t.protocol+"://"+t.authority+t.path+e}var l=t("./config"),u=t("./browser"),c="See https://www.mapbox.com/api-documentation/#access-tokens";r.isMapboxURL=i,r.normalizeStyleURL=function(t,e){if(!i(t))return t;var r=a(t);return r.path="/styles/v1"+r.path,n(r,e)},r.normalizeGlyphsURL=function(t,e){if(!i(t))return t;var r=a(t);return r.path="/fonts/v1"+r.path,n(r,e)},r.normalizeSourceURL=function(t,e){if(!i(t))return t;var r=a(t);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),n(r,e)},r.normalizeSpriteURL=function(t,e,r,o){var l=a(t);return i(t)?(l.path="/styles/v1"+l.path+"/sprite"+e+r,n(l,o)):(l.path+=""+e+r,s(l))};var p=/(\.(png|jpg)\d*)(?=$)/;r.normalizeTileURL=function(t,e,r){if(!e||!i(e))return t;var n=a(t),l=u.devicePixelRatio>=2||512===r?"@2x":"",c=u.supportsWebp?".webp":"$1";return n.path=n.path.replace(p,""+l+c),o(n.params),s(n)};var h=/^(\w+):\/\/([^\/?]*)(\/[^?]+)?\??(.+)?/},{"./browser":202,"./config":206}],218:[function(t,e,r){"use strict";var n=t("./is_char_in_unicode_block");e.exports.allowsIdeographicBreaking=function(t){for(var e=0,n=t;e<n.length;e+=1){var i=n[e];if(!r.charAllowsIdeographicBreaking(i.charCodeAt(0)))return!1}return!0},e.exports.allowsVerticalWritingMode=function(t){for(var e=0,n=t;e<n.length;e+=1){var i=n[e];if(r.charHasUprightVerticalOrientation(i.charCodeAt(0)))return!0}return!1},e.exports.allowsLetterSpacing=function(t){for(var e=0,n=t;e<n.length;e+=1){var i=n[e];if(!r.charAllowsLetterSpacing(i.charCodeAt(0)))return!1}return!0},e.exports.charAllowsLetterSpacing=function(t){return!n.Arabic(t)&&!n["Arabic Supplement"](t)&&!n["Arabic Extended-A"](t)&&!n["Arabic Presentation Forms-A"](t)&&!n["Arabic Presentation Forms-B"](t)},e.exports.charAllowsIdeographicBreaking=function(t){return!(t<11904)&&(!!n["Bopomofo Extended"](t)||!!n.Bopomofo(t)||!!n["CJK Compatibility Forms"](t)||!!n["CJK Compatibility Ideographs"](t)||!!n["CJK Compatibility"](t)||!!n["CJK Radicals Supplement"](t)||!!n["CJK Strokes"](t)||!!n["CJK Symbols and Punctuation"](t)||!!n["CJK Unified Ideographs Extension A"](t)||!!n["CJK Unified Ideographs"](t)||!!n["Enclosed CJK Letters and Months"](t)||!!n["Halfwidth and Fullwidth Forms"](t)||!!n.Hiragana(t)||!!n["Ideographic Description Characters"](t)||!!n["Kangxi Radicals"](t)||!!n["Katakana Phonetic Extensions"](t)||!!n.Katakana(t)||!!n["Vertical Forms"](t)||!!n["Yi Radicals"](t)||!!n["Yi Syllables"](t))},r.charHasUprightVerticalOrientation=function(t){return 746===t||747===t||!(t<4352)&&(!!n["Bopomofo Extended"](t)||!!n.Bopomofo(t)||!(!n["CJK Compatibility Forms"](t)||t>=65097&&t<=65103)||!!n["CJK Compatibility Ideographs"](t)||!!n["CJK Compatibility"](t)||!!n["CJK Radicals Supplement"](t)||!!n["CJK Strokes"](t)||!(!n["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||!!n["CJK Unified Ideographs Extension A"](t)||!!n["CJK Unified Ideographs"](t)||!!n["Enclosed CJK Letters and Months"](t)||!!n["Hangul Compatibility Jamo"](t)||!!n["Hangul Jamo Extended-A"](t)||!!n["Hangul Jamo Extended-B"](t)||!!n["Hangul Jamo"](t)||!!n["Hangul Syllables"](t)||!!n.Hiragana(t)||!!n["Ideographic Description Characters"](t)||!!n.Kanbun(t)||!!n["Kangxi Radicals"](t)||!!n["Katakana Phonetic Extensions"](t)||!(!n.Katakana(t)||12540===t)||!(!n["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||!(!n["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||!!n["Unified Canadian Aboriginal Syllabics"](t)||!!n["Unified Canadian Aboriginal Syllabics Extended"](t)||!!n["Vertical Forms"](t)||!!n["Yijing Hexagram Symbols"](t)||!!n["Yi Syllables"](t)||!!n["Yi Radicals"](t))},r.charHasNeutralVerticalOrientation=function(t){return!(!n["Latin-1 Supplement"](t)||167!==t&&169!==t&&174!==t&&177!==t&&188!==t&&189!==t&&190!==t&&215!==t&&247!==t)||!(!n["General Punctuation"](t)||8214!==t&&8224!==t&&8225!==t&&8240!==t&&8241!==t&&8251!==t&&8252!==t&&8258!==t&&8263!==t&&8264!==t&&8265!==t&&8273!==t)||!!n["Letterlike Symbols"](t)||!!n["Number Forms"](t)||!(!n["Miscellaneous Technical"](t)||!(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215))||!(!n["Control Pictures"](t)||9251===t)||!!n["Optical Character Recognition"](t)||!!n["Enclosed Alphanumerics"](t)||!!n["Geometric Shapes"](t)||!(!n["Miscellaneous Symbols"](t)||t>=9754&&t<=9759)||!(!n["Miscellaneous Symbols and Arrows"](t)||!(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243))||!!n["CJK Symbols and Punctuation"](t)||!!n.Katakana(t)||!!n["Private Use Area"](t)||!!n["CJK Compatibility Forms"](t)||!!n["Small Form Variants"](t)||!!n["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t},r.charHasRotatedVerticalOrientation=function(t){return!(r.charHasUprightVerticalOrientation(t)||r.charHasNeutralVerticalOrientation(t))}},{"./is_char_in_unicode_block":215}],219:[function(t,e,r){"use strict";var n=t("../geo/lng_lat");e.exports=function(t,e,r){if(t=new n(t.lng,t.lat),e){var i=new n(t.lng-360,t.lat),o=new n(t.lng+360,t.lat),a=r.locationPoint(t).distSqr(e);r.locationPoint(i).distSqr(e)<a?t=i:r.locationPoint(o).distSqr(e)<a&&(t=o)}for(;Math.abs(t.lng-r.center.lng)>180;){var s=r.locationPoint(t);if(s.x>=0&&s.y>=0&&s.x<=r.width&&s.y<=r.height)break;t.lng>r.center.lng?t.lng-=360:t.lng+=360}return t}},{"../geo/lng_lat":58}],220:[function(t,e,r){"use strict";function n(t){var e=JSON.stringify(t);if(f[e])return f[e];var r=void 0===t.alignment?1:t.alignment,n=0,a=0,l=["Uint8"],c=t.members.map(function(t){l.indexOf(t.type)<0&&l.push(t.type);var e=o(t.type),s=n=i(n,Math.max(r,e)),u=t.components||1;return a=Math.max(a,e),n+=e*u,{name:t.name,type:t.type,components:u,offset:s}}),d=i(n,Math.max(a,r)),m=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(p);m.prototype.alignment=r,m.prototype.size=d;for(var v=0,y=c;v<y.length;v+=1)for(var g=y[v],_=0;_<g.components;_++){var x=g.name;if(g.components>1&&(x+=_),x in m.prototype)throw new Error(x+" is a reserved name and cannot be used as a member name.");Object.defineProperty(m.prototype,x,u(g,_))}var b=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(h);return b.prototype.members=c,b.prototype.StructType=m,b.prototype.bytesPerElement=d,b.prototype.emplaceBack=s(c,d),b.prototype._usedTypes=l,f[e]=b,b}function i(t,e){return Math.ceil(t/e)*e}function o(t){return c[t].BYTES_PER_ELEMENT}function a(t){return t.toLowerCase()}function s(t,e){for(var r=[],n=[],i="var i = this.length;\nthis.resize(this.length + 1);\n",s=0,l=t;s<l.length;s+=1){var u=l[s],c=o(u.type);r.indexOf(c)<0&&(r.push(c),i+="var o"+c.toFixed(0)+" = i * "+(e/c).toFixed(0)+";\n");for(var p=0;p<u.components;p++){var h="v"+n.length,f="o"+c.toFixed(0)+" + "+(u.offset/c+p).toFixed(0);i+="this."+a(u.type)+"["+f+"] = "+h+";\n",n.push(h)}}return i+="return i;",new Function(n.toString(),i)}function l(t,e){var r="this._pos"+o(t.type).toFixed(0),n=(t.offset/o(t.type)+e).toFixed(0),i=r+" + "+n;return"this._structArray."+a(t.type)+"["+i+"]"}function u(t,e){var r=l(t,e);return{get:new Function("return "+r+";"),set:new Function("x",r+" = x;")}}e.exports=n;var c={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},p=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},h=function(t){this.isTransferred=!1,void 0!==t?(this.arrayBuffer=t.arrayBuffer,this.length=t.length,this.capacity=this.arrayBuffer.byteLength/this.bytesPerElement,this._refreshViews()):(this.capacity=-1,this.resize(0))};h.serialize=function(){return{members:this.prototype.members,alignment:this.prototype.StructType.prototype.alignment}},h.prototype.serialize=function(t){return this._trim(),t&&(this.isTransferred=!0,t.push(this.arrayBuffer)),{length:this.length,arrayBuffer:this.arrayBuffer}},h.prototype.get=function(t){return new this.StructType(this,t)},h.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},h.prototype.clear=function(){this.length=0},h.prototype.resize=function(t){if(this.length=t,t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},h.prototype._refreshViews=function(){for(var t=this,e=0,r=t._usedTypes;e<r.length;e+=1){var n=r[e];t[a(n)]=new c[n](t.arrayBuffer)}},h.prototype.toArray=function(t,e){for(var r=this,n=[],i=t;i<e;i++){var o=r.get(i);n.push(o)}return n};var f={}},{}],221:[function(t,e,r){"use strict";var n=t("./browser"),i=function(t,e){this.frequency=t,this.throttledFunction=e,this.lastInvocation=0};i.prototype.invoke=function(){var t=this;if(!this.pendingInvocation){var e=0===this.lastInvocation?0:this.lastInvocation+this.frequency-n.now();e<=0?(this.lastInvocation=n.now(),this.throttledFunction()):this.pendingInvocation=setTimeout(function(){t.pendingInvocation=void 0,t.lastInvocation=n.now(),t.throttledFunction()},e)}},i.prototype.stop=function(){this.pendingInvocation&&(clearTimeout(this.pendingInvocation),this.pendingInvocation=void 0)},e.exports=i},{"./browser":202}],222:[function(t,e,r){"use strict";function n(t,e){return e.replace(/{([^{}]+)}/g,function(e,r){return r in t?String(t[r]):""})}e.exports=n},{}],223:[function(t,e,r){"use strict";var n=t("@mapbox/unitbezier"),i=t("../geo/coordinate");t("@mapbox/point-geometry");r.easeCubicInOut=function(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)},r.bezier=function(t,e,r,i){var o=new n(t,e,r,i);return function(t){return o.solve(t)}},r.ease=r.bezier(.25,.1,.25,1),r.clamp=function(t,e,r){return Math.min(r,Math.max(e,t))},r.wrap=function(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i},r.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var n=t.length,i=new Array(t.length),o=null;t.forEach(function(t,a){e(t,function(t,e){t&&(o=t),i[a]=e,0==--n&&r(o,i)})})},r.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},r.keysDifference=function(t,e){var r=[];for(var n in t)n in e||r.push(n);return r},r.extend=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n<i.length;n+=1){var o=i[n];for(var a in o)t[a]=o[a]}return t},r.pick=function(t,e){for(var r={},n=0;n<e.length;n++){var i=e[n];i in t&&(r[i]=t[i])}return r};var o=1;r.uniqueId=function(){return o++},r.bindAll=function(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})},r.getCoordinatesCenter=function(t){for(var e=1/0,r=1/0,n=-1/0,o=-1/0,a=0;a<t.length;a++)e=Math.min(e,t[a].column),r=Math.min(r,t[a].row),n=Math.max(n,t[a].column),o=Math.max(o,t[a].row);var s=n-e,l=o-r,u=Math.max(s,l),c=Math.max(0,Math.floor(-Math.log(u)/Math.LN2));return new i((e+n)/2,(r+o)/2,0).zoomTo(c)},r.endsWith=function(t,e){return-1!==t.indexOf(e,t.length-e.length)},r.mapObject=function(t,e,r){var n=this,i={};for(var o in t)i[o]=e.call(r||n,t[o],o,t);return i},r.filterObject=function(t,e,r){var n=this,i={};for(var o in t)e.call(r||n,t[o],o,t)&&(i[o]=t[o]);return i},r.deepEqual=function(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!r.deepEqual(t[n],e[n]))return!1;return!0}if("object"==typeof t&&null!==t&&null!==e){if("object"!=typeof e)return!1;if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var i in t)if(!r.deepEqual(t[i],e[i]))return!1;return!0}return t===e},r.clone=function(t){return Array.isArray(t)?t.map(r.clone):"object"==typeof t&&t?r.mapObject(t,r.clone):t},r.arraysIntersect=function(t,e){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>=0)return!0;return!1};var a={};r.warnOnce=function(t){a[t]||("undefined"!=typeof console&&console.warn(t),a[t]=!0)},r.isCounterClockwise=function(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)},r.calculateSignedArea=function(t){for(var e=0,r=0,n=t.length,i=n-1,o=void 0,a=void 0;r<n;i=r++)o=t[r],a=t[i],e+=(a.x-o.x)*(o.y+a.y);return e},r.isClosedPolygon=function(t){if(t.length<4)return!1;var e=t[0],n=t[t.length-1];return!(Math.abs(e.x-n.x)>0||Math.abs(e.y-n.y)>0)&&Math.abs(r.calculateSignedArea(t))>.01},r.sphericalToCartesian=function(t){var e=t[0],r=t[1],n=t[2];return r+=90,r*=Math.PI/180,n*=Math.PI/180,[e*Math.cos(r)*Math.sin(n),e*Math.sin(r)*Math.sin(n),e*Math.cos(n)]},r.parseCacheControl=function(t){var e=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,r={};if(t.replace(e,function(t,e,n,i){var o=n||i;return r[e]=!o||o.toLowerCase(),""}),r["max-age"]){var n=parseInt(r["max-age"],10);isNaN(n)?delete r["max-age"]:r["max-age"]=n}return r}},{"../geo/coordinate":57,"@mapbox/point-geometry":2,"@mapbox/unitbezier":5}],224:[function(t,e,r){"use strict";var n=function(t,e,r,n){this.type="Feature",this._vectorTileFeature=t,t._z=e,t._x=r,t._y=n,this.properties=t.properties,null!=t.id&&(this.id=t.id)},i={geometry:{}};i.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},i.geometry.set=function(t){this._geometry=t},n.prototype.toJSON=function(){var t=this,e={geometry:this.geometry};for(var r in t)"_geometry"!==r&&"_vectorTileFeature"!==r&&(e[r]=t[r]);return e},Object.defineProperties(n.prototype,i),e.exports=n},{}],225:[function(t,e,r){"use strict";var n=t("./script_detection");e.exports=function(t){for(var r="",i=0;i<t.length;i++){var o=t.charCodeAt(i+1)||null,a=t.charCodeAt(i-1)||null;o&&n.charHasRotatedVerticalOrientation(o)&&!e.exports.lookup[t[i+1]]||a&&n.charHasRotatedVerticalOrientation(a)&&!e.exports.lookup[t[i-1]]||!e.exports.lookup[t[i]]?r+=t[i]:r+=e.exports.lookup[t[i]]}return r},e.exports.lookup={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"}},{"./script_detection":218}],226:[function(t,e,r){"use strict";var n=t("./web_worker"),i=function(){this.active={}};i.prototype.acquire=function(e){var r=this;if(!this.workers){var i=t("../").workerCount;for(this.workers=[];this.workers.length<i;)r.workers.push(new n)}return this.active[e]=!0,this.workers.slice()},i.prototype.release=function(t){delete this.active[t],0===Object.keys(this.active).length&&(this.workers.forEach(function(t){t.terminate()}),this.workers=null)},e.exports=i},{"../":63,"./web_worker":203}]},{},[63])(63)})}).call(e,r(0))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),i=r.n(n),o=r(3),a=r(7);i.a.accessToken="pk.eyJ1IjoieXV2YWRtIiwiYSI6ImNpcnMxbzBuaTAwZWdoa25oczlzZmkwbHcifQ.UHtLngbKm9O8945pJm23Nw";new o.a({el:"#app",render:function(t){return t(a.a)}})},function(t,e,r){"use strict";(function(t,r){/*! * Vue.js v2.5.2 * (c) 2014-2017 Evan You * Released under the MIT License. */ -function i(t){return void 0===t||null===t}function n(t){return void 0!==t&&null!==t}function o(t){return!0===t}function a(t){return!1===t}function s(t){return"string"==typeof t||"number"==typeof t||"boolean"==typeof t}function l(t){return null!==t&&"object"==typeof t}function u(t){return"[object Object]"===Qn.call(t)}function c(t){return"[object RegExp]"===Qn.call(t)}function p(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function h(t){return null==t?"":"object"==typeof t?JSON.stringify(t,null,2):String(t)}function f(t){var e=parseFloat(t);return isNaN(e)?t:e}function d(t,e){for(var r=Object.create(null),i=t.split(","),n=0;n<i.length;n++)r[i[n]]=!0;return e?function(t){return r[t.toLowerCase()]}:function(t){return r[t]}}function m(t,e){if(t.length){var r=t.indexOf(e);if(r>-1)return t.splice(r,1)}}function v(t,e){return ro.call(t,e)}function y(t){var e=Object.create(null);return function(r){return e[r]||(e[r]=t(r))}}function g(t,e){function r(r){var i=arguments.length;return i?i>1?t.apply(e,arguments):t.call(e,r):t.call(e)}return r._length=t.length,r}function _(t,e){e=e||0;for(var r=t.length-e,i=new Array(r);r--;)i[r]=t[r+e];return i}function x(t,e){for(var r in e)t[r]=e[r];return t}function b(t){for(var e={},r=0;r<t.length;r++)t[r]&&x(e,t[r]);return e}function w(t,e,r){}function T(t,e){if(t===e)return!0;var r=l(t),i=l(e);if(!r||!i)return!r&&!i&&String(t)===String(e);try{var n=Array.isArray(t),o=Array.isArray(e);if(n&&o)return t.length===e.length&&t.every(function(t,r){return T(t,e[r])});if(n||o)return!1;var a=Object.keys(t),s=Object.keys(e);return a.length===s.length&&a.every(function(r){return T(t[r],e[r])})}catch(t){return!1}}function S(t,e){for(var r=0;r<t.length;r++)if(T(t[r],e))return r;return-1}function z(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}function A(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function C(t,e,r,i){Object.defineProperty(t,e,{value:r,enumerable:!!i,writable:!0,configurable:!0})}function E(t){if(!vo.test(t)){var e=t.split(".");return function(t){for(var r=0;r<e.length;r++){if(!t)return;t=t[e[r]]}return t}}}function k(t){return"function"==typeof t&&/native code/.test(t.toString())}function M(t){Do.target&&Oo.push(Do.target),Do.target=t}function L(){Do.target=Oo.pop()}function I(t){return new Bo(void 0,void 0,void 0,String(t))}function P(t,e){var r=new Bo(t.tag,t.data,t.children,t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return r.ns=t.ns,r.isStatic=t.isStatic,r.key=t.key,r.isComment=t.isComment,r.isCloned=!0,e&&t.children&&(r.children=R(t.children)),r}function R(t,e){for(var r=t.length,i=new Array(r),n=0;n<r;n++)i[n]=P(t[n],e);return i}function D(t,e,r){t.__proto__=e}function O(t,e,r){for(var i=0,n=r.length;i<n;i++){var o=r[i];C(t,o,e[o])}}function B(t,e){if(l(t)&&!(t instanceof Bo)){var r;return v(t,"__ob__")&&t.__ob__ instanceof qo?r=t.__ob__:$o.shouldConvert&&!Mo()&&(Array.isArray(t)||u(t))&&Object.isExtensible(t)&&!t._isVue&&(r=new qo(t)),e&&r&&r.vmCount++,r}}function F(t,e,r,i,n){var o=new Do,a=Object.getOwnPropertyDescriptor(t,e);if(!a||!1!==a.configurable){var s=a&&a.get,l=a&&a.set,u=!n&&B(r);Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){var e=s?s.call(t):r;return Do.target&&(o.depend(),u&&(u.dep.depend(),Array.isArray(e)&&N(e))),e},set:function(e){var i=s?s.call(t):r;e===i||e!==e&&i!==i||(l?l.call(t,e):r=e,u=!n&&B(e),o.notify())}})}}function j(t,e,r){if(Array.isArray(t)&&p(e))return t.length=Math.max(t.length,e),t.splice(e,1,r),r;if(v(t,e))return t[e]=r,r;var i=t.__ob__;return t._isVue||i&&i.vmCount?r:i?(F(i.value,e,r),i.dep.notify(),r):(t[e]=r,r)}function V(t,e){if(Array.isArray(t)&&p(e))return void t.splice(e,1);var r=t.__ob__;t._isVue||r&&r.vmCount||v(t,e)&&(delete t[e],r&&r.dep.notify())}function N(t){for(var e=void 0,r=0,i=t.length;r<i;r++)e=t[r],e&&e.__ob__&&e.__ob__.dep.depend(),Array.isArray(e)&&N(e)}function U(t,e){if(!e)return t;for(var r,i,n,o=Object.keys(e),a=0;a<o.length;a++)r=o[a],i=t[r],n=e[r],v(t,r)?u(i)&&u(n)&&U(i,n):j(t,r,n);return t}function $(t,e,r){return r?t||e?function(){var i="function"==typeof e?e.call(r):e,n="function"==typeof t?t.call(r):t;return i?U(i,n):n}:void 0:e?t?function(){return U("function"==typeof e?e.call(this):e,"function"==typeof t?t.call(this):t)}:e:t}function q(t,e){return e?t?t.concat(e):Array.isArray(e)?e:[e]:t}function Z(t,e,r,i){var n=Object.create(t||null);return e?x(n,e):n}function G(t,e){var r=t.props;if(r){var i,n,o,a={};if(Array.isArray(r))for(i=r.length;i--;)"string"==typeof(n=r[i])&&(o=no(n),a[o]={type:null});else if(u(r))for(var s in r)n=r[s],o=no(s),a[o]=u(n)?n:{type:n};t.props=a}}function W(t,e){var r=t.inject,i=t.inject={};if(Array.isArray(r))for(var n=0;n<r.length;n++)i[r[n]]={from:r[n]};else if(u(r))for(var o in r){var a=r[o];i[o]=u(a)?x({from:o},a):{from:a}}}function H(t){var e=t.directives;if(e)for(var r in e){var i=e[r];"function"==typeof i&&(e[r]={bind:i,update:i})}}function X(t,e,r){function i(i){var n=Zo[i]||Ho;l[i]=n(t[i],e[i],r,i)}"function"==typeof e&&(e=e.options),G(e,r),W(e,r),H(e);var n=e.extends;if(n&&(t=X(t,n,r)),e.mixins)for(var o=0,a=e.mixins.length;o<a;o++)t=X(t,e.mixins[o],r);var s,l={};for(s in t)i(s);for(s in e)v(t,s)||i(s);return l}function K(t,e,r,i){if("string"==typeof r){var n=t[e];if(v(n,r))return n[r];var o=no(r);if(v(n,o))return n[o];var a=oo(o);if(v(n,a))return n[a];return n[r]||n[o]||n[a]}}function J(t,e,r,i){var n=e[t],o=!v(r,t),a=r[t];if(tt(Boolean,n.type)&&(o&&!v(n,"default")?a=!1:tt(String,n.type)||""!==a&&a!==so(t)||(a=!0)),void 0===a){a=Y(i,n,t);var s=$o.shouldConvert;$o.shouldConvert=!0,B(a),$o.shouldConvert=s}return a}function Y(t,e,r){if(v(e,"default")){var i=e.default;return t&&t.$options.propsData&&void 0===t.$options.propsData[r]&&void 0!==t._props[r]?t._props[r]:"function"==typeof i&&"Function"!==Q(e.type)?i.call(t):i}}function Q(t){var e=t&&t.toString().match(/^\s*function (\w+)/);return e?e[1]:""}function tt(t,e){if(!Array.isArray(e))return Q(e)===Q(t);for(var r=0,i=e.length;r<i;r++)if(Q(e[r])===Q(t))return!0;return!1}function et(t,e,r){if(e)for(var i=e;i=i.$parent;){var n=i.$options.errorCaptured;if(n)for(var o=0;o<n.length;o++)try{var a=!1===n[o].call(i,t,e,r);if(a)return}catch(t){rt(t,i,"errorCaptured hook")}}rt(t,e,r)}function rt(t,e,r){if(fo.errorHandler)try{return fo.errorHandler.call(null,t,e,r)}catch(t){it(t,null,"config.errorHandler")}it(t,e,r)}function it(t,e,r){if(!go||"undefined"==typeof console)throw t;console.error(t)}function nt(){Ko=!1;var t=Xo.slice(0);Xo.length=0;for(var e=0;e<t.length;e++)t[e]()}function ot(t){return t._withTask||(t._withTask=function(){Jo=!0;var e=t.apply(null,arguments);return Jo=!1,e})}function at(t,e){var r;if(Xo.push(function(){if(t)try{t.call(e)}catch(t){et(t,e,"nextTick")}else r&&r(e)}),Ko||(Ko=!0,Jo?Wo():Go()),!t&&"undefined"!=typeof Promise)return new Promise(function(t){r=t})}function st(t){function e(){var t=arguments,r=e.fns;if(!Array.isArray(r))return r.apply(null,arguments);for(var i=r.slice(),n=0;n<i.length;n++)i[n].apply(null,t)}return e.fns=t,e}function lt(t,e,r,n,o){var a,s,l,u;for(a in t)s=t[a],l=e[a],u=ra(a),i(s)||(i(l)?(i(s.fns)&&(s=t[a]=st(s)),r(u.name,s,u.once,u.capture,u.passive)):s!==l&&(l.fns=s,t[a]=l));for(a in e)i(t[a])&&(u=ra(a),n(u.name,e[a],u.capture))}function ut(t,e,r){function a(){r.apply(this,arguments),m(s.fns,a)}var s,l=t[e];i(l)?s=st([a]):n(l.fns)&&o(l.merged)?(s=l,s.fns.push(a)):s=st([l,a]),s.merged=!0,t[e]=s}function ct(t,e,r){var o=e.options.props;if(!i(o)){var a={},s=t.attrs,l=t.props;if(n(s)||n(l))for(var u in o){var c=so(u);pt(a,l,u,c,!0)||pt(a,s,u,c,!1)}return a}}function pt(t,e,r,i,o){if(n(e)){if(v(e,r))return t[r]=e[r],o||delete e[r],!0;if(v(e,i))return t[r]=e[i],o||delete e[i],!0}return!1}function ht(t){for(var e=0;e<t.length;e++)if(Array.isArray(t[e]))return Array.prototype.concat.apply([],t);return t}function ft(t){return s(t)?[I(t)]:Array.isArray(t)?mt(t):void 0}function dt(t){return n(t)&&n(t.text)&&a(t.isComment)}function mt(t,e){var r,a,l,u,c=[];for(r=0;r<t.length;r++)a=t[r],i(a)||"boolean"==typeof a||(l=c.length-1,u=c[l],Array.isArray(a)?a.length>0&&(a=mt(a,(e||"")+"_"+r),dt(a[0])&&dt(u)&&(c[l]=I(u.text+a[0].text),a.shift()),c.push.apply(c,a)):s(a)?dt(u)?c[l]=I(u.text+a):""!==a&&c.push(I(a)):dt(a)&&dt(u)?c[l]=I(u.text+a.text):(o(t._isVList)&&n(a.tag)&&i(a.key)&&n(e)&&(a.key="__vlist"+e+"_"+r+"__"),c.push(a)));return c}function vt(t,e){return(t.__esModule||Io&&"Module"===t[Symbol.toStringTag])&&(t=t.default),l(t)?e.extend(t):t}function yt(t,e,r,i,n){var o=jo();return o.asyncFactory=t,o.asyncMeta={data:e,context:r,children:i,tag:n},o}function gt(t,e,r){if(o(t.error)&&n(t.errorComp))return t.errorComp;if(n(t.resolved))return t.resolved;if(o(t.loading)&&n(t.loadingComp))return t.loadingComp;if(!n(t.contexts)){var a=t.contexts=[r],s=!0,u=function(){for(var t=0,e=a.length;t<e;t++)a[t].$forceUpdate()},c=z(function(r){t.resolved=vt(r,e),s||u()}),p=z(function(e){n(t.errorComp)&&(t.error=!0,u())}),h=t(c,p);return l(h)&&("function"==typeof h.then?i(t.resolved)&&h.then(c,p):n(h.component)&&"function"==typeof h.component.then&&(h.component.then(c,p),n(h.error)&&(t.errorComp=vt(h.error,e)),n(h.loading)&&(t.loadingComp=vt(h.loading,e),0===h.delay?t.loading=!0:setTimeout(function(){i(t.resolved)&&i(t.error)&&(t.loading=!0,u())},h.delay||200)),n(h.timeout)&&setTimeout(function(){i(t.resolved)&&p(null)},h.timeout))),s=!1,t.loading?t.loadingComp:t.resolved}t.contexts.push(r)}function _t(t){return t.isComment&&t.asyncFactory}function xt(t){if(Array.isArray(t))for(var e=0;e<t.length;e++){var r=t[e];if(n(r)&&(n(r.componentOptions)||_t(r)))return r}}function bt(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&St(t,e)}function wt(t,e,r){r?ea.$once(t,e):ea.$on(t,e)}function Tt(t,e){ea.$off(t,e)}function St(t,e,r){ea=t,lt(e,r||{},wt,Tt,t)}function zt(t,e){var r={};if(!t)return r;for(var i=[],n=0,o=t.length;n<o;n++){var a=t[n],s=a.data;if(s&&s.attrs&&s.attrs.slot&&delete s.attrs.slot,a.context!==e&&a.functionalContext!==e||!s||null==s.slot)i.push(a);else{var l=a.data.slot,u=r[l]||(r[l]=[]);"template"===a.tag?u.push.apply(u,a.children):u.push(a)}}return i.every(At)||(r.default=i),r}function At(t){return t.isComment||" "===t.text}function Ct(t,e){e=e||{};for(var r=0;r<t.length;r++)Array.isArray(t[r])?Ct(t[r],e):e[t[r].key]=t[r].fn;return e}function Et(t){var e=t.$options,r=e.parent;if(r&&!e.abstract){for(;r.$options.abstract&&r.$parent;)r=r.$parent;r.$children.push(t)}t.$parent=r,t.$root=r?r.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}function kt(t,e,r){t.$el=e,t.$options.render||(t.$options.render=jo),Rt(t,"beforeMount");var i;return i=function(){t._update(t._render(),r)},t._watcher=new pa(t,i,w),r=!1,null==t.$vnode&&(t._isMounted=!0,Rt(t,"mounted")),t}function Mt(t,e,r,i,n){var o=!!(n||t.$options._renderChildren||i.data.scopedSlots||t.$scopedSlots!==mo);if(t.$options._parentVnode=i,t.$vnode=i,t._vnode&&(t._vnode.parent=i),t.$options._renderChildren=n,t.$attrs=i.data&&i.data.attrs||mo,t.$listeners=r||mo,e&&t.$options.props){$o.shouldConvert=!1;for(var a=t._props,s=t.$options._propKeys||[],l=0;l<s.length;l++){var u=s[l];a[u]=J(u,t.$options.props,e,t)}$o.shouldConvert=!0,t.$options.propsData=e}if(r){var c=t.$options._parentListeners;t.$options._parentListeners=r,St(t,r,c)}o&&(t.$slots=zt(n,i.context),t.$forceUpdate())}function Lt(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function It(t,e){if(e){if(t._directInactive=!1,Lt(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(var r=0;r<t.$children.length;r++)It(t.$children[r]);Rt(t,"activated")}}function Pt(t,e){if(!(e&&(t._directInactive=!0,Lt(t))||t._inactive)){t._inactive=!0;for(var r=0;r<t.$children.length;r++)Pt(t.$children[r]);Rt(t,"deactivated")}}function Rt(t,e){var r=t.$options[e];if(r)for(var i=0,n=r.length;i<n;i++)try{r[i].call(t)}catch(r){et(r,t,e+" hook")}t._hasHookEvent&&t.$emit("hook:"+e)}function Dt(){ua=na.length=oa.length=0,aa={},sa=la=!1}function Ot(){la=!0;var t,e;for(na.sort(function(t,e){return t.id-e.id}),ua=0;ua<na.length;ua++)t=na[ua],e=t.id,aa[e]=null,t.run();var r=oa.slice(),i=na.slice();Dt(),jt(r),Bt(i),Lo&&fo.devtools&&Lo.emit("flush")}function Bt(t){for(var e=t.length;e--;){var r=t[e],i=r.vm;i._watcher===r&&i._isMounted&&Rt(i,"updated")}}function Ft(t){t._inactive=!1,oa.push(t)}function jt(t){for(var e=0;e<t.length;e++)t[e]._inactive=!0,It(t[e],!0)}function Vt(t){var e=t.id;if(null==aa[e]){if(aa[e]=!0,la){for(var r=na.length-1;r>ua&&na[r].id>t.id;)r--;na.splice(r+1,0,t)}else na.push(t);sa||(sa=!0,at(Ot))}}function Nt(t){ha.clear(),Ut(t,ha)}function Ut(t,e){var r,i,n=Array.isArray(t);if((n||l(t))&&Object.isExtensible(t)){if(t.__ob__){var o=t.__ob__.dep.id;if(e.has(o))return;e.add(o)}if(n)for(r=t.length;r--;)Ut(t[r],e);else for(i=Object.keys(t),r=i.length;r--;)Ut(t[i[r]],e)}}function $t(t,e,r){fa.get=function(){return this[e][r]},fa.set=function(t){this[e][r]=t},Object.defineProperty(t,r,fa)}function qt(t){t._watchers=[];var e=t.$options;e.props&&Zt(t,e.props),e.methods&&Jt(t,e.methods),e.data?Gt(t):B(t._data={},!0),e.computed&&Ht(t,e.computed),e.watch&&e.watch!==zo&&Yt(t,e.watch)}function Zt(t,e){var r=t.$options.propsData||{},i=t._props={},n=t.$options._propKeys=[],o=!t.$parent;$o.shouldConvert=o;for(var a in e)!function(o){n.push(o);var a=J(o,e,r,t);F(i,o,a),o in t||$t(t,"_props",o)}(a);$o.shouldConvert=!0}function Gt(t){var e=t.$options.data;e=t._data="function"==typeof e?Wt(e,t):e||{},u(e)||(e={});for(var r=Object.keys(e),i=t.$options.props,n=(t.$options.methods,r.length);n--;){var o=r[n];i&&v(i,o)||A(o)||$t(t,"_data",o)}B(e,!0)}function Wt(t,e){try{return t.call(e,e)}catch(t){return et(t,e,"data()"),{}}}function Ht(t,e){var r=t._computedWatchers=Object.create(null),i=Mo();for(var n in e){var o=e[n],a="function"==typeof o?o:o.get;i||(r[n]=new pa(t,a||w,w,da)),n in t||Xt(t,n,o)}}function Xt(t,e,r){var i=!Mo();"function"==typeof r?(fa.get=i?Kt(e):r,fa.set=w):(fa.get=r.get?i&&!1!==r.cache?Kt(e):r.get:w,fa.set=r.set?r.set:w),Object.defineProperty(t,e,fa)}function Kt(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),Do.target&&e.depend(),e.value}}function Jt(t,e){t.$options.props;for(var r in e)t[r]=null==e[r]?w:g(e[r],t)}function Yt(t,e){for(var r in e){var i=e[r];if(Array.isArray(i))for(var n=0;n<i.length;n++)Qt(t,r,i[n]);else Qt(t,r,i)}}function Qt(t,e,r,i){return u(r)&&(i=r,r=r.handler),"string"==typeof r&&(r=t[r]),t.$watch(e,r,i)}function te(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}function ee(t){var e=re(t.$options.inject,t);e&&($o.shouldConvert=!1,Object.keys(e).forEach(function(r){F(t,r,e[r])}),$o.shouldConvert=!0)}function re(t,e){if(t){for(var r=Object.create(null),i=Io?Reflect.ownKeys(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}):Object.keys(t),n=0;n<i.length;n++){for(var o=i[n],a=t[o].from,s=e;s;){if(s._provided&&a in s._provided){r[o]=s._provided[a];break}s=s.$parent}if(!s&&"default"in t[o]){var l=t[o].default;r[o]="function"==typeof l?l.call(e):l}}return r}}function ie(t,e){var r,i,o,a,s;if(Array.isArray(t)||"string"==typeof t)for(r=new Array(t.length),i=0,o=t.length;i<o;i++)r[i]=e(t[i],i);else if("number"==typeof t)for(r=new Array(t),i=0;i<t;i++)r[i]=e(i+1,i);else if(l(t))for(a=Object.keys(t),r=new Array(a.length),i=0,o=a.length;i<o;i++)s=a[i],r[i]=e(t[s],s,i);return n(r)&&(r._isVList=!0),r}function ne(t,e,r,i){var n=this.$scopedSlots[t];if(n)return r=r||{},i&&(r=x(x({},i),r)),n(r)||e;var o=this.$slots[t];return o||e}function oe(t){return K(this.$options,"filters",t,!0)||uo}function ae(t,e,r,i){var n=fo.keyCodes[e]||r;return n?Array.isArray(n)?-1===n.indexOf(t):n!==t:i?so(i)!==e:void 0}function se(t,e,r,i,n){if(r)if(l(r)){Array.isArray(r)&&(r=b(r));var o;for(var a in r)!function(a){if("class"===a||"style"===a||eo(a))o=t;else{var s=t.attrs&&t.attrs.type;o=i||fo.mustUseProp(e,s,a)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}if(!(a in o)&&(o[a]=r[a],n)){(t.on||(t.on={}))["update:"+a]=function(t){r[a]=t}}}(a)}else;return t}function le(t,e){var r=this.$options.staticRenderFns,i=r.cached||(r.cached=[]),n=i[t];return n&&!e?Array.isArray(n)?R(n):P(n):(n=i[t]=r[t].call(this._renderProxy,null,this),ce(n,"__static__"+t,!1),n)}function ue(t,e,r){return ce(t,"__once__"+e+(r?"_"+r:""),!0),t}function ce(t,e,r){if(Array.isArray(t))for(var i=0;i<t.length;i++)t[i]&&"string"!=typeof t[i]&&pe(t[i],e+"_"+i,r);else pe(t,e,r)}function pe(t,e,r){t.isStatic=!0,t.key=e,t.isOnce=r}function he(t,e){if(e)if(u(e)){var r=t.on=t.on?x({},t.on):{};for(var i in e){var n=r[i],o=e[i];r[i]=n?[].concat(n,o):o}}else;return t}function fe(t){t._o=ue,t._n=f,t._s=h,t._l=ie,t._t=ne,t._q=T,t._i=S,t._m=le,t._f=oe,t._k=ae,t._b=se,t._v=I,t._e=jo,t._u=Ct,t._g=he}function de(t,e,r,i,n){var a=n.options;this.data=t,this.props=e,this.children=r,this.parent=i,this.listeners=t.on||mo,this.injections=re(a.inject,i),this.slots=function(){return zt(r,i)};var s=Object.create(i),l=o(a._compiled),u=!l;l&&(this.$options=a,this.$slots=this.slots(),this.$scopedSlots=t.scopedSlots||mo),a._scopeId?this._c=function(t,e,r,n){var o=we(s,t,e,r,n,u);return o&&(o.functionalScopeId=a._scopeId,o.functionalContext=i),o}:this._c=function(t,e,r,i){return we(s,t,e,r,i,u)}}function me(t,e,r,i,o){var a=t.options,s={},l=a.props;if(n(l))for(var u in l)s[u]=J(u,l,e||mo);else n(r.attrs)&&ve(s,r.attrs),n(r.props)&&ve(s,r.props);var c=new de(r,s,o,i,t),p=a.render.call(null,c._c,c);return p instanceof Bo&&(p.functionalContext=i,p.functionalOptions=a,r.slot&&((p.data||(p.data={})).slot=r.slot)),p}function ve(t,e){for(var r in e)t[no(r)]=e[r]}function ye(t,e,r,a,s){if(!i(t)){var u=r.$options._base;if(l(t)&&(t=u.extend(t)),"function"==typeof t){var c;if(i(t.cid)&&(c=t,void 0===(t=gt(c,u,r))))return yt(c,e,r,a,s);e=e||{},Ce(t),n(e.model)&&be(t.options,e);var p=ct(e,t,s);if(o(t.options.functional))return me(t,p,e,r,a);var h=e.on;if(e.on=e.nativeOn,o(t.options.abstract)){var f=e.slot;e={},f&&(e.slot=f)}_e(e);var d=t.options.name||s;return new Bo("vue-component-"+t.cid+(d?"-"+d:""),e,void 0,void 0,void 0,r,{Ctor:t,propsData:p,listeners:h,tag:s,children:a},c)}}}function ge(t,e,r,i){var o=t.componentOptions,a={_isComponent:!0,parent:e,propsData:o.propsData,_componentTag:o.tag,_parentVnode:t,_parentListeners:o.listeners,_renderChildren:o.children,_parentElm:r||null,_refElm:i||null},s=t.data.inlineTemplate;return n(s)&&(a.render=s.render,a.staticRenderFns=s.staticRenderFns),new o.Ctor(a)}function _e(t){t.hook||(t.hook={});for(var e=0;e<va.length;e++){var r=va[e],i=t.hook[r],n=ma[r];t.hook[r]=i?xe(n,i):n}}function xe(t,e){return function(r,i,n,o){t(r,i,n,o),e(r,i,n,o)}}function be(t,e){var r=t.model&&t.model.prop||"value",i=t.model&&t.model.event||"input";(e.props||(e.props={}))[r]=e.model.value;var o=e.on||(e.on={});n(o[i])?o[i]=[e.model.callback].concat(o[i]):o[i]=e.model.callback}function we(t,e,r,i,n,a){return(Array.isArray(r)||s(r))&&(n=i,i=r,r=void 0),o(a)&&(n=ga),Te(t,e,r,i,n)}function Te(t,e,r,i,o){if(n(r)&&n(r.__ob__))return jo();if(n(r)&&n(r.is)&&(e=r.is),!e)return jo();Array.isArray(i)&&"function"==typeof i[0]&&(r=r||{},r.scopedSlots={default:i[0]},i.length=0),o===ga?i=ft(i):o===ya&&(i=ht(i));var a,s;if("string"==typeof e){var l;s=t.$vnode&&t.$vnode.ns||fo.getTagNamespace(e),a=fo.isReservedTag(e)?new Bo(fo.parsePlatformTagName(e),r,i,void 0,void 0,t):n(l=K(t.$options,"components",e))?ye(l,r,t,i,e):new Bo(e,r,i,void 0,void 0,t)}else a=ye(e,r,t,i);return n(a)?(s&&Se(a,s),a):jo()}function Se(t,e,r){if(t.ns=e,"foreignObject"===t.tag&&(e=void 0,r=!0),n(t.children))for(var a=0,s=t.children.length;a<s;a++){var l=t.children[a];n(l.tag)&&(i(l.ns)||o(r))&&Se(l,e,r)}}function ze(t){t._vnode=null;var e=t.$options,r=t.$vnode=e._parentVnode,i=r&&r.context;t.$slots=zt(e._renderChildren,i),t.$scopedSlots=mo,t._c=function(e,r,i,n){return we(t,e,r,i,n,!1)},t.$createElement=function(e,r,i,n){return we(t,e,r,i,n,!0)};var n=r&&r.data;F(t,"$attrs",n&&n.attrs||mo,null,!0),F(t,"$listeners",e._parentListeners||mo,null,!0)}function Ae(t,e){var r=t.$options=Object.create(t.constructor.options);r.parent=e.parent,r.propsData=e.propsData,r._parentVnode=e._parentVnode,r._parentListeners=e._parentListeners,r._renderChildren=e._renderChildren,r._componentTag=e._componentTag,r._parentElm=e._parentElm,r._refElm=e._refElm,e.render&&(r.render=e.render,r.staticRenderFns=e.staticRenderFns)}function Ce(t){var e=t.options;if(t.super){var r=Ce(t.super);if(r!==t.superOptions){t.superOptions=r;var i=Ee(t);i&&x(t.extendOptions,i),e=t.options=X(r,t.extendOptions),e.name&&(e.components[e.name]=t)}}return e}function Ee(t){var e,r=t.options,i=t.extendOptions,n=t.sealedOptions;for(var o in r)r[o]!==n[o]&&(e||(e={}),e[o]=ke(r[o],i[o],n[o]));return e}function ke(t,e,r){if(Array.isArray(t)){var i=[];r=Array.isArray(r)?r:[r],e=Array.isArray(e)?e:[e];for(var n=0;n<t.length;n++)(e.indexOf(t[n])>=0||r.indexOf(t[n])<0)&&i.push(t[n]);return i}return t}function Me(t){this._init(t)}function Le(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var r=_(arguments,1);return r.unshift(this),"function"==typeof t.install?t.install.apply(t,r):"function"==typeof t&&t.apply(null,r),e.push(t),this}}function Ie(t){t.mixin=function(t){return this.options=X(this.options,t),this}}function Pe(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var r=this,i=r.cid,n=t._Ctor||(t._Ctor={});if(n[i])return n[i];var o=t.name||r.options.name,a=function(t){this._init(t)};return a.prototype=Object.create(r.prototype),a.prototype.constructor=a,a.cid=e++,a.options=X(r.options,t),a.super=r,a.options.props&&Re(a),a.options.computed&&De(a),a.extend=r.extend,a.mixin=r.mixin,a.use=r.use,po.forEach(function(t){a[t]=r[t]}),o&&(a.options.components[o]=a),a.superOptions=r.options,a.extendOptions=t,a.sealedOptions=x({},a.options),n[i]=a,a}}function Re(t){var e=t.options.props;for(var r in e)$t(t.prototype,"_props",r)}function De(t){var e=t.options.computed;for(var r in e)Xt(t.prototype,r,e[r])}function Oe(t){po.forEach(function(e){t[e]=function(t,r){return r?("component"===e&&u(r)&&(r.name=r.name||t,r=this.options._base.extend(r)),"directive"===e&&"function"==typeof r&&(r={bind:r,update:r}),this.options[e+"s"][t]=r,r):this.options[e+"s"][t]}})}function Be(t){return t&&(t.Ctor.options.name||t.tag)}function Fe(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!c(t)&&t.test(e)}function je(t,e){var r=t.cache,i=t.keys,n=t._vnode;for(var o in r){var a=r[o];if(a){var s=Be(a.componentOptions);s&&!e(s)&&Ve(r,o,i,n)}}}function Ve(t,e,r,i){var n=t[e];n&&n!==i&&n.componentInstance.$destroy(),t[e]=null,m(r,e)}function Ne(t){for(var e=t.data,r=t,i=t;n(i.componentInstance);)i=i.componentInstance._vnode,i.data&&(e=Ue(i.data,e));for(;n(r=r.parent);)r.data&&(e=Ue(e,r.data));return $e(e.staticClass,e.class)}function Ue(t,e){return{staticClass:qe(t.staticClass,e.staticClass),class:n(t.class)?[t.class,e.class]:e.class}}function $e(t,e){return n(t)||n(e)?qe(t,Ze(e)):""}function qe(t,e){return t?e?t+" "+e:t:e||""}function Ze(t){return Array.isArray(t)?Ge(t):l(t)?We(t):"string"==typeof t?t:""}function Ge(t){for(var e,r="",i=0,o=t.length;i<o;i++)n(e=Ze(t[i]))&&""!==e&&(r&&(r+=" "),r+=e);return r}function We(t){var e="";for(var r in t)t[r]&&(e&&(e+=" "),e+=r);return e}function He(t){return $a(t)?"svg":"math"===t?"math":void 0}function Xe(t){if(!go)return!0;if(Za(t))return!1;if(t=t.toLowerCase(),null!=Ga[t])return Ga[t];var e=document.createElement(t);return t.indexOf("-")>-1?Ga[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Ga[t]=/HTMLUnknownElement/.test(e.toString())}function Ke(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function Je(t,e){var r=document.createElement(t);return"select"!==t?r:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&r.setAttribute("multiple","multiple"),r)}function Ye(t,e){return document.createElementNS(Na[t],e)}function Qe(t){return document.createTextNode(t)}function tr(t){return document.createComment(t)}function er(t,e,r){t.insertBefore(e,r)}function rr(t,e){t.removeChild(e)}function ir(t,e){t.appendChild(e)}function nr(t){return t.parentNode}function or(t){return t.nextSibling}function ar(t){return t.tagName}function sr(t,e){t.textContent=e}function lr(t,e,r){t.setAttribute(e,r)}function ur(t,e){var r=t.data.ref;if(r){var i=t.context,n=t.componentInstance||t.elm,o=i.$refs;e?Array.isArray(o[r])?m(o[r],n):o[r]===n&&(o[r]=void 0):t.data.refInFor?Array.isArray(o[r])?o[r].indexOf(n)<0&&o[r].push(n):o[r]=[n]:o[r]=n}}function cr(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&n(t.data)===n(e.data)&&pr(t,e)||o(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&i(e.asyncFactory.error))}function pr(t,e){if("input"!==t.tag)return!0;var r,i=n(r=t.data)&&n(r=r.attrs)&&r.type,o=n(r=e.data)&&n(r=r.attrs)&&r.type;return i===o||Wa(i)&&Wa(o)}function hr(t,e,r){var i,o,a={};for(i=e;i<=r;++i)o=t[i].key,n(o)&&(a[o]=i);return a}function fr(t,e){(t.data.directives||e.data.directives)&&dr(t,e)}function dr(t,e){var r,i,n,o=t===Ka,a=e===Ka,s=mr(t.data.directives,t.context),l=mr(e.data.directives,e.context),u=[],c=[];for(r in l)i=s[r],n=l[r],i?(n.oldValue=i.value,yr(n,"update",e,t),n.def&&n.def.componentUpdated&&c.push(n)):(yr(n,"bind",e,t),n.def&&n.def.inserted&&u.push(n));if(u.length){var p=function(){for(var r=0;r<u.length;r++)yr(u[r],"inserted",e,t)};o?ut(e.data.hook||(e.data.hook={}),"insert",p):p()}if(c.length&&ut(e.data.hook||(e.data.hook={}),"postpatch",function(){for(var r=0;r<c.length;r++)yr(c[r],"componentUpdated",e,t)}),!o)for(r in s)l[r]||yr(s[r],"unbind",t,t,a)}function mr(t,e){var r=Object.create(null);if(!t)return r;var i,n;for(i=0;i<t.length;i++)n=t[i],n.modifiers||(n.modifiers=Qa),r[vr(n)]=n,n.def=K(e.$options,"directives",n.name,!0);return r}function vr(t){return t.rawName||t.name+"."+Object.keys(t.modifiers||{}).join(".")}function yr(t,e,r,i,n){var o=t.def&&t.def[e];if(o)try{o(r.elm,t,r,i,n)}catch(i){et(i,r.context,"directive "+t.name+" "+e+" hook")}}function gr(t,e){var r=e.componentOptions;if(!(n(r)&&!1===r.Ctor.options.inheritAttrs||i(t.data.attrs)&&i(e.data.attrs))){var o,a,s=e.elm,l=t.data.attrs||{},u=e.data.attrs||{};n(u.__ob__)&&(u=e.data.attrs=x({},u));for(o in u)a=u[o],l[o]!==a&&_r(s,o,a);(bo||wo)&&u.value!==l.value&&_r(s,"value",u.value);for(o in l)i(u[o])&&(Fa(o)?s.removeAttributeNS(Ba,ja(o)):Da(o)||s.removeAttribute(o))}}function _r(t,e,r){Oa(e)?Va(r)?t.removeAttribute(e):(r="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,r)):Da(e)?t.setAttribute(e,Va(r)||"false"===r?"false":"true"):Fa(e)?Va(r)?t.removeAttributeNS(Ba,ja(e)):t.setAttributeNS(Ba,e,r):Va(r)?t.removeAttribute(e):t.setAttribute(e,r)}function xr(t,e){var r=e.elm,o=e.data,a=t.data;if(!(i(o.staticClass)&&i(o.class)&&(i(a)||i(a.staticClass)&&i(a.class)))){var s=Ne(e),l=r._transitionClasses;n(l)&&(s=qe(s,Ze(l))),s!==r._prevClass&&(r.setAttribute("class",s),r._prevClass=s)}}function br(t){function e(){(a||(a=[])).push(t.slice(d,n).trim()),d=n+1}var r,i,n,o,a,s=!1,l=!1,u=!1,c=!1,p=0,h=0,f=0,d=0;for(n=0;n<t.length;n++)if(i=r,r=t.charCodeAt(n),s)39===r&&92!==i&&(s=!1);else if(l)34===r&&92!==i&&(l=!1);else if(u)96===r&&92!==i&&(u=!1);else if(c)47===r&&92!==i&&(c=!1);else if(124!==r||124===t.charCodeAt(n+1)||124===t.charCodeAt(n-1)||p||h||f){switch(r){case 34:l=!0;break;case 39:s=!0;break;case 96:u=!0;break;case 40:f++;break;case 41:f--;break;case 91:h++;break;case 93:h--;break;case 123:p++;break;case 125:p--}if(47===r){for(var m=n-1,v=void 0;m>=0&&" "===(v=t.charAt(m));m--);v&&is.test(v)||(c=!0)}}else void 0===o?(d=n+1,o=t.slice(0,n).trim()):e();if(void 0===o?o=t.slice(0,n).trim():0!==d&&e(),a)for(n=0;n<a.length;n++)o=wr(o,a[n]);return o}function wr(t,e){var r=e.indexOf("(");return r<0?'_f("'+e+'")('+t+")":'_f("'+e.slice(0,r)+'")('+t+","+e.slice(r+1)}function Tr(t){console.error("[Vue compiler]: "+t)}function Sr(t,e){return t?t.map(function(t){return t[e]}).filter(function(t){return t}):[]}function zr(t,e,r){(t.props||(t.props=[])).push({name:e,value:r})}function Ar(t,e,r){(t.attrs||(t.attrs=[])).push({name:e,value:r})}function Cr(t,e,r,i,n,o){(t.directives||(t.directives=[])).push({name:e,rawName:r,value:i,arg:n,modifiers:o})}function Er(t,e,r,i,n,o){i&&i.capture&&(delete i.capture,e="!"+e),i&&i.once&&(delete i.once,e="~"+e),i&&i.passive&&(delete i.passive,e="&"+e);var a;i&&i.native?(delete i.native,a=t.nativeEvents||(t.nativeEvents={})):a=t.events||(t.events={});var s={value:r,modifiers:i},l=a[e];Array.isArray(l)?n?l.unshift(s):l.push(s):a[e]=l?n?[s,l]:[l,s]:s}function kr(t,e,r){var i=Mr(t,":"+e)||Mr(t,"v-bind:"+e);if(null!=i)return br(i);if(!1!==r){var n=Mr(t,e);if(null!=n)return JSON.stringify(n)}}function Mr(t,e,r){var i;if(null!=(i=t.attrsMap[e]))for(var n=t.attrsList,o=0,a=n.length;o<a;o++)if(n[o].name===e){n.splice(o,1);break}return r&&delete t.attrsMap[e],i}function Lr(t,e,r){var i=r||{},n=i.number,o=i.trim,a="$$v";o&&(a="(typeof $$v === 'string'? $$v.trim(): $$v)"),n&&(a="_n("+a+")");var s=Ir(e,a);t.model={value:"("+e+")",expression:'"'+e+'"',callback:"function ($$v) {"+s+"}"}}function Ir(t,e){var r=Pr(t);return null===r.key?t+"="+e:"$set("+r.exp+", "+r.key+", "+e+")"}function Pr(t){if(Ta=t.length,t.indexOf("[")<0||t.lastIndexOf("]")<Ta-1)return Aa=t.lastIndexOf("."),Aa>-1?{exp:t.slice(0,Aa),key:'"'+t.slice(Aa+1)+'"'}:{exp:t,key:null};for(Sa=t,Aa=Ca=Ea=0;!Dr();)za=Rr(),Or(za)?Fr(za):91===za&&Br(za);return{exp:t.slice(0,Ca),key:t.slice(Ca+1,Ea)}}function Rr(){return Sa.charCodeAt(++Aa)}function Dr(){return Aa>=Ta}function Or(t){return 34===t||39===t}function Br(t){var e=1;for(Ca=Aa;!Dr();)if(t=Rr(),Or(t))Fr(t);else if(91===t&&e++,93===t&&e--,0===e){Ea=Aa;break}}function Fr(t){for(var e=t;!Dr()&&(t=Rr())!==e;);}function jr(t,e,r){ka=r;var i=e.value,n=e.modifiers,o=t.tag,a=t.attrsMap.type;if(t.component)return Lr(t,i,n),!1;if("select"===o)Ur(t,i,n);else if("input"===o&&"checkbox"===a)Vr(t,i,n);else if("input"===o&&"radio"===a)Nr(t,i,n);else if("input"===o||"textarea"===o)$r(t,i,n);else if(!fo.isReservedTag(o))return Lr(t,i,n),!1;return!0}function Vr(t,e,r){var i=r&&r.number,n=kr(t,"value")||"null",o=kr(t,"true-value")||"true",a=kr(t,"false-value")||"false";zr(t,"checked","Array.isArray("+e+")?_i("+e+","+n+")>-1"+("true"===o?":("+e+")":":_q("+e+","+o+")")),Er(t,"change","var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(i?"_n("+n+")":n)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+e+"=$$a.concat([$$v]))}else{$$i>-1&&("+e+"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{"+Ir(e,"$$c")+"}",null,!0)}function Nr(t,e,r){var i=r&&r.number,n=kr(t,"value")||"null";n=i?"_n("+n+")":n,zr(t,"checked","_q("+e+","+n+")"),Er(t,"change",Ir(e,n),null,!0)}function Ur(t,e,r){var i=r&&r.number,n='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(i?"_n(val)":"val")+"})",o="var $$selectedVal = "+n+";";o=o+" "+Ir(e,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),Er(t,"change",o,null,!0)}function $r(t,e,r){var i=t.attrsMap.type,n=r||{},o=n.lazy,a=n.number,s=n.trim,l=!o&&"range"!==i,u=o?"change":"range"===i?ns:"input",c="$event.target.value";s&&(c="$event.target.value.trim()"),a&&(c="_n("+c+")");var p=Ir(e,c);l&&(p="if($event.target.composing)return;"+p),zr(t,"value","("+e+")"),Er(t,u,p,null,!0),(s||a)&&Er(t,"blur","$forceUpdate()")}function qr(t){if(n(t[ns])){var e=xo?"change":"input";t[e]=[].concat(t[ns],t[e]||[]),delete t[ns]}n(t[os])&&(t.change=[].concat(t[os],t.change||[]),delete t[os])}function Zr(t,e,r){var i=Ma;return function n(){null!==t.apply(null,arguments)&&Wr(e,n,r,i)}}function Gr(t,e,r,i,n){e=ot(e),r&&(e=Zr(e,t,i)),Ma.addEventListener(t,e,Ao?{capture:i,passive:n}:i)}function Wr(t,e,r,i){(i||Ma).removeEventListener(t,e._withTask||e,r)}function Hr(t,e){if(!i(t.data.on)||!i(e.data.on)){var r=e.data.on||{},n=t.data.on||{};Ma=e.elm,qr(r),lt(r,n,Gr,Wr,e.context)}}function Xr(t,e){if(!i(t.data.domProps)||!i(e.data.domProps)){var r,o,a=e.elm,s=t.data.domProps||{},l=e.data.domProps||{};n(l.__ob__)&&(l=e.data.domProps=x({},l));for(r in s)i(l[r])&&(a[r]="");for(r in l){if(o=l[r],"textContent"===r||"innerHTML"===r){if(e.children&&(e.children.length=0),o===s[r])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===r){a._value=o;var u=i(o)?"":String(o);Kr(a,u)&&(a.value=u)}else a[r]=o}}}function Kr(t,e){return!t.composing&&("OPTION"===t.tagName||Jr(t,e)||Yr(t,e))}function Jr(t,e){var r=!0;try{r=document.activeElement!==t}catch(t){}return r&&t.value!==e}function Yr(t,e){var r=t.value,i=t._vModifiers;return n(i)&&i.number?f(r)!==f(e):n(i)&&i.trim?r.trim()!==e.trim():r!==e}function Qr(t){var e=ti(t.style);return t.staticStyle?x(t.staticStyle,e):e}function ti(t){return Array.isArray(t)?b(t):"string"==typeof t?ls(t):t}function ei(t,e){var r,i={};if(e)for(var n=t;n.componentInstance;)n=n.componentInstance._vnode,n.data&&(r=Qr(n.data))&&x(i,r);(r=Qr(t.data))&&x(i,r);for(var o=t;o=o.parent;)o.data&&(r=Qr(o.data))&&x(i,r);return i}function ri(t,e){var r=e.data,o=t.data;if(!(i(r.staticStyle)&&i(r.style)&&i(o.staticStyle)&&i(o.style))){var a,s,l=e.elm,u=o.staticStyle,c=o.normalizedStyle||o.style||{},p=u||c,h=ti(e.data.style)||{};e.data.normalizedStyle=n(h.__ob__)?x({},h):h;var f=ei(e,!0);for(s in p)i(f[s])&&ps(l,s,"");for(s in f)(a=f[s])!==p[s]&&ps(l,s,null==a?"":a)}}function ii(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var r=" "+(t.getAttribute("class")||"")+" ";r.indexOf(" "+e+" ")<0&&t.setAttribute("class",(r+e).trim())}}function ni(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var r=" "+(t.getAttribute("class")||"")+" ",i=" "+e+" ";r.indexOf(i)>=0;)r=r.replace(i," ");r=r.trim(),r?t.setAttribute("class",r):t.removeAttribute("class")}}function oi(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&x(e,ms(t.name||"v")),x(e,t),e}return"string"==typeof t?ms(t):void 0}}function ai(t){Ts(function(){Ts(t)})}function si(t,e){var r=t._transitionClasses||(t._transitionClasses=[]);r.indexOf(e)<0&&(r.push(e),ii(t,e))}function li(t,e){t._transitionClasses&&m(t._transitionClasses,e),ni(t,e)}function ui(t,e,r){var i=ci(t,e),n=i.type,o=i.timeout,a=i.propCount;if(!n)return r();var s=n===ys?xs:ws,l=0,u=function(){t.removeEventListener(s,c),r()},c=function(e){e.target===t&&++l>=a&&u()};setTimeout(function(){l<a&&u()},o+1),t.addEventListener(s,c)}function ci(t,e){var r,i=window.getComputedStyle(t),n=i[_s+"Delay"].split(", "),o=i[_s+"Duration"].split(", "),a=pi(n,o),s=i[bs+"Delay"].split(", "),l=i[bs+"Duration"].split(", "),u=pi(s,l),c=0,p=0;return e===ys?a>0&&(r=ys,c=a,p=o.length):e===gs?u>0&&(r=gs,c=u,p=l.length):(c=Math.max(a,u),r=c>0?a>u?ys:gs:null,p=r?r===ys?o.length:l.length:0),{type:r,timeout:c,propCount:p,hasTransform:r===ys&&Ss.test(i[_s+"Property"])}}function pi(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(null,e.map(function(e,r){return hi(e)+hi(t[r])}))}function hi(t){return 1e3*Number(t.slice(0,-1))}function fi(t,e){var r=t.elm;n(r._leaveCb)&&(r._leaveCb.cancelled=!0,r._leaveCb());var o=oi(t.data.transition);if(!i(o)&&!n(r._enterCb)&&1===r.nodeType){for(var a=o.css,s=o.type,u=o.enterClass,c=o.enterToClass,p=o.enterActiveClass,h=o.appearClass,d=o.appearToClass,m=o.appearActiveClass,v=o.beforeEnter,y=o.enter,g=o.afterEnter,_=o.enterCancelled,x=o.beforeAppear,b=o.appear,w=o.afterAppear,T=o.appearCancelled,S=o.duration,A=ia,C=ia.$vnode;C&&C.parent;)C=C.parent,A=C.context;var E=!A._isMounted||!t.isRootInsert;if(!E||b||""===b){var k=E&&h?h:u,M=E&&m?m:p,L=E&&d?d:c,I=E?x||v:v,P=E&&"function"==typeof b?b:y,R=E?w||g:g,D=E?T||_:_,O=f(l(S)?S.enter:S),B=!1!==a&&!bo,F=vi(P),j=r._enterCb=z(function(){B&&(li(r,L),li(r,M)),j.cancelled?(B&&li(r,k),D&&D(r)):R&&R(r),r._enterCb=null});t.data.show||ut(t.data.hook||(t.data.hook={}),"insert",function(){var e=r.parentNode,i=e&&e._pending&&e._pending[t.key];i&&i.tag===t.tag&&i.elm._leaveCb&&i.elm._leaveCb(),P&&P(r,j)}),I&&I(r),B&&(si(r,k),si(r,M),ai(function(){si(r,L),li(r,k),j.cancelled||F||(mi(O)?setTimeout(j,O):ui(r,s,j))})),t.data.show&&(e&&e(),P&&P(r,j)),B||F||j()}}}function di(t,e){function r(){T.cancelled||(t.data.show||((o.parentNode._pending||(o.parentNode._pending={}))[t.key]=t),d&&d(o),x&&(si(o,c),si(o,h),ai(function(){si(o,p),li(o,c),T.cancelled||b||(mi(w)?setTimeout(T,w):ui(o,u,T))})),m&&m(o,T),x||b||T())}var o=t.elm;n(o._enterCb)&&(o._enterCb.cancelled=!0,o._enterCb());var a=oi(t.data.transition);if(i(a))return e();if(!n(o._leaveCb)&&1===o.nodeType){var s=a.css,u=a.type,c=a.leaveClass,p=a.leaveToClass,h=a.leaveActiveClass,d=a.beforeLeave,m=a.leave,v=a.afterLeave,y=a.leaveCancelled,g=a.delayLeave,_=a.duration,x=!1!==s&&!bo,b=vi(m),w=f(l(_)?_.leave:_),T=o._leaveCb=z(function(){o.parentNode&&o.parentNode._pending&&(o.parentNode._pending[t.key]=null),x&&(li(o,p),li(o,h)),T.cancelled?(x&&li(o,c),y&&y(o)):(e(),v&&v(o)),o._leaveCb=null});g?g(r):r()}}function mi(t){return"number"==typeof t&&!isNaN(t)}function vi(t){if(i(t))return!1;var e=t.fns;return n(e)?vi(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function yi(t,e){!0!==e.data.show&&fi(e)}function gi(t,e,r){_i(t,e,r),(xo||wo)&&setTimeout(function(){_i(t,e,r)},0)}function _i(t,e,r){var i=e.value,n=t.multiple;if(!n||Array.isArray(i)){for(var o,a,s=0,l=t.options.length;s<l;s++)if(a=t.options[s],n)o=S(i,bi(a))>-1,a.selected!==o&&(a.selected=o);else if(T(bi(a),i))return void(t.selectedIndex!==s&&(t.selectedIndex=s));n||(t.selectedIndex=-1)}}function xi(t,e){return e.every(function(e){return!T(e,t)})}function bi(t){return"_value"in t?t._value:t.value}function wi(t){t.target.composing=!0}function Ti(t){t.target.composing&&(t.target.composing=!1,Si(t.target,"input"))}function Si(t,e){var r=document.createEvent("HTMLEvents");r.initEvent(e,!0,!0),t.dispatchEvent(r)}function zi(t){return!t.componentInstance||t.data&&t.data.transition?t:zi(t.componentInstance._vnode)}function Ai(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Ai(xt(e.children)):t}function Ci(t){var e={},r=t.$options;for(var i in r.propsData)e[i]=t[i];var n=r._parentListeners;for(var o in n)e[no(o)]=n[o];return e}function Ei(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function ki(t){for(;t=t.parent;)if(t.data.transition)return!0}function Mi(t,e){return e.key===t.key&&e.tag===t.tag}function Li(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Ii(t){t.data.newPos=t.elm.getBoundingClientRect()}function Pi(t){var e=t.data.pos,r=t.data.newPos,i=e.left-r.left,n=e.top-r.top;if(i||n){t.data.moved=!0;var o=t.elm.style;o.transform=o.WebkitTransform="translate("+i+"px,"+n+"px)",o.transitionDuration="0s"}}function Ri(t,e){var r=e?Ns(e):js;if(r.test(t)){for(var i,n,o=[],a=r.lastIndex=0;i=r.exec(t);){n=i.index,n>a&&o.push(JSON.stringify(t.slice(a,n)));var s=br(i[1].trim());o.push("_s("+s+")"),a=n+i[0].length}return a<t.length&&o.push(JSON.stringify(t.slice(a))),o.join("+")}}function Di(t,e){var r=(e.warn,Mr(t,"class"));r&&(t.staticClass=JSON.stringify(r));var i=kr(t,"class",!1);i&&(t.classBinding=i)}function Oi(t){var e="";return t.staticClass&&(e+="staticClass:"+t.staticClass+","),t.classBinding&&(e+="class:"+t.classBinding+","),e}function Bi(t,e){var r=(e.warn,Mr(t,"style"));if(r){t.staticStyle=JSON.stringify(ls(r))}var i=kr(t,"style",!1);i&&(t.styleBinding=i)}function Fi(t){var e="";return t.staticStyle&&(e+="staticStyle:"+t.staticStyle+","),t.styleBinding&&(e+="style:("+t.styleBinding+"),"),e}function ji(t,e){var r=e?gl:yl;return t.replace(r,function(t){return vl[t]})}function Vi(t,e){function r(e){c+=e,t=t.substring(e)}function i(t,r,i){var n,s;if(null==r&&(r=c),null==i&&(i=c),t&&(s=t.toLowerCase()),t)for(n=a.length-1;n>=0&&a[n].lowerCasedTag!==s;n--);else n=0;if(n>=0){for(var l=a.length-1;l>=n;l--)e.end&&e.end(a[l].tag,r,i);a.length=n,o=n&&a[n-1].tag}else"br"===s?e.start&&e.start(t,[],!0,r,i):"p"===s&&(e.start&&e.start(t,[],!1,r,i),e.end&&e.end(t,r,i))}for(var n,o,a=[],s=e.expectHTML,l=e.isUnaryTag||lo,u=e.canBeLeftOpenTag||lo,c=0;t;){if(n=t,o&&dl(o)){var p=0,h=o.toLowerCase(),f=ml[h]||(ml[h]=new RegExp("([\\s\\S]*?)(</"+h+"[^>]*>)","i")),d=t.replace(f,function(t,r,i){return p=i.length,dl(h)||"noscript"===h||(r=r.replace(/<!--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),xl(h,r)&&(r=r.slice(1)),e.chars&&e.chars(r),""});c+=t.length-d.length,t=d,i(h,c-p,c)}else{var m=t.indexOf("<");if(0===m){if(el.test(t)){var v=t.indexOf("--\x3e");if(v>=0){e.shouldKeepComment&&e.comment(t.substring(4,v)),r(v+3);continue}}if(rl.test(t)){var y=t.indexOf("]>");if(y>=0){r(y+2);continue}}var g=t.match(tl);if(g){r(g[0].length);continue}var _=t.match(Qs);if(_){var x=c;r(_[0].length),i(_[1],x,c);continue}var b=function(){var e=t.match(Js);if(e){var i={tagName:e[1],attrs:[],start:c};r(e[0].length);for(var n,o;!(n=t.match(Ys))&&(o=t.match(Hs));)r(o[0].length),i.attrs.push(o);if(n)return i.unarySlash=n[1],r(n[0].length),i.end=c,i}}();if(b){!function(t){var r=t.tagName,n=t.unarySlash;s&&("p"===o&&Ws(r)&&i(o),u(r)&&o===r&&i(r));for(var c=l(r)||!!n,p=t.attrs.length,h=new Array(p),f=0;f<p;f++){var d=t.attrs[f];il&&-1===d[0].indexOf('""')&&(""===d[3]&&delete d[3],""===d[4]&&delete d[4],""===d[5]&&delete d[5]);var m=d[3]||d[4]||d[5]||"";h[f]={name:d[1],value:ji(m,e.shouldDecodeNewlines)}}c||(a.push({tag:r,lowerCasedTag:r.toLowerCase(),attrs:h}),o=r),e.start&&e.start(r,h,c,t.start,t.end)}(b),xl(o,t)&&r(1);continue}}var w=void 0,T=void 0,S=void 0;if(m>=0){for(T=t.slice(m);!(Qs.test(T)||Js.test(T)||el.test(T)||rl.test(T)||(S=T.indexOf("<",1))<0);)m+=S,T=t.slice(m);w=t.substring(0,m),r(m)}m<0&&(w=t,t=""),e.chars&&w&&e.chars(w)}if(t===n){e.chars&&e.chars(t);break}}i()}function Ni(t,e,r){return{type:1,tag:t,attrsList:e,attrsMap:an(e),parent:r,children:[]}}function Ui(t,e){function r(t){t.pre&&(s=!1),ul(t.tag)&&(l=!1)}nl=e.warn||Tr,ul=e.isPreTag||lo,cl=e.mustUseProp||lo,pl=e.getTagNamespace||lo,al=Sr(e.modules,"transformNode"),sl=Sr(e.modules,"preTransformNode"),ll=Sr(e.modules,"postTransformNode"),ol=e.delimiters;var i,n,o=[],a=!1!==e.preserveWhitespace,s=!1,l=!1;return Vi(t,{warn:nl,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldKeepComment:e.comments,start:function(t,a,u){var c=n&&n.ns||pl(t);xo&&"svg"===c&&(a=un(a));var p=Ni(t,a,n);c&&(p.ns=c),ln(p)&&!Mo()&&(p.forbidden=!0);for(var h=0;h<sl.length;h++)p=sl[h](p,e)||p;if(s||($i(p),p.pre&&(s=!0)),ul(p.tag)&&(l=!0),s?qi(p):p.processed||(Hi(p),Xi(p),Qi(p),Zi(p,e)),i?o.length||i.if&&(p.elseif||p.else)&&Yi(i,{exp:p.elseif,block:p}):i=p,n&&!p.forbidden)if(p.elseif||p.else)Ki(p,n);else if(p.slotScope){n.plain=!1;var f=p.slotTarget||'"default"';(n.scopedSlots||(n.scopedSlots={}))[f]=p}else n.children.push(p),p.parent=n;u?r(p):(n=p,o.push(p));for(var d=0;d<ll.length;d++)ll[d](p,e)},end:function(){var t=o[o.length-1],e=t.children[t.children.length-1];e&&3===e.type&&" "===e.text&&!l&&t.children.pop(),o.length-=1,n=o[o.length-1],r(t)},chars:function(t){if(n&&(!xo||"textarea"!==n.tag||n.attrsMap.placeholder!==t)){var e=n.children;if(t=l||t.trim()?sn(n)?t:El(t):a&&e.length?" ":""){var r;!s&&" "!==t&&(r=Ri(t,ol))?e.push({type:2,expression:r,text:t}):" "===t&&e.length&&" "===e[e.length-1].text||e.push({type:3,text:t})}}},comment:function(t){n.children.push({type:3,text:t,isComment:!0})}}),i}function $i(t){null!=Mr(t,"v-pre")&&(t.pre=!0)}function qi(t){var e=t.attrsList.length;if(e)for(var r=t.attrs=new Array(e),i=0;i<e;i++)r[i]={name:t.attrsList[i].name,value:JSON.stringify(t.attrsList[i].value)};else t.pre||(t.plain=!0)}function Zi(t,e){Gi(t),t.plain=!t.key&&!t.attrsList.length,Wi(t),tn(t),en(t);for(var r=0;r<al.length;r++)t=al[r](t,e)||t;rn(t)}function Gi(t){var e=kr(t,"key");e&&(t.key=e)}function Wi(t){var e=kr(t,"ref");e&&(t.ref=e,t.refInFor=nn(t))}function Hi(t){var e;if(e=Mr(t,"v-for")){var r=e.match(Tl);if(!r)return;t.for=r[2].trim();var i=r[1].trim(),n=i.match(Sl);n?(t.alias=n[1].trim(),t.iterator1=n[2].trim(),n[3]&&(t.iterator2=n[3].trim())):t.alias=i}}function Xi(t){var e=Mr(t,"v-if");if(e)t.if=e,Yi(t,{exp:e,block:t});else{null!=Mr(t,"v-else")&&(t.else=!0);var r=Mr(t,"v-else-if");r&&(t.elseif=r)}}function Ki(t,e){var r=Ji(e.children);r&&r.if&&Yi(r,{exp:t.elseif,block:t})}function Ji(t){for(var e=t.length;e--;){if(1===t[e].type)return t[e];t.pop()}}function Yi(t,e){t.ifConditions||(t.ifConditions=[]),t.ifConditions.push(e)}function Qi(t){null!=Mr(t,"v-once")&&(t.once=!0)}function tn(t){if("slot"===t.tag)t.slotName=kr(t,"name");else{var e;"template"===t.tag?(e=Mr(t,"scope"),t.slotScope=e||Mr(t,"slot-scope")):(e=Mr(t,"slot-scope"))&&(t.slotScope=e);var r=kr(t,"slot");r&&(t.slotTarget='""'===r?'"default"':r,t.slotScope||Ar(t,"slot",r))}}function en(t){var e;(e=kr(t,"is"))&&(t.component=e),null!=Mr(t,"inline-template")&&(t.inlineTemplate=!0)}function rn(t){var e,r,i,n,o,a,s,l=t.attrsList;for(e=0,r=l.length;e<r;e++)if(i=n=l[e].name,o=l[e].value,wl.test(i))if(t.hasBindings=!0,a=on(i),a&&(i=i.replace(Cl,"")),Al.test(i))i=i.replace(Al,""),o=br(o),s=!1,a&&(a.prop&&(s=!0,"innerHtml"===(i=no(i))&&(i="innerHTML")),a.camel&&(i=no(i)),a.sync&&Er(t,"update:"+no(i),Ir(o,"$event"))),s||!t.component&&cl(t.tag,t.attrsMap.type,i)?zr(t,i,o):Ar(t,i,o);else if(bl.test(i))i=i.replace(bl,""),Er(t,i,o,a,!1,nl);else{i=i.replace(wl,"");var u=i.match(zl),c=u&&u[1];c&&(i=i.slice(0,-(c.length+1))),Cr(t,i,n,o,c,a)}else{Ar(t,i,JSON.stringify(o))}}function nn(t){for(var e=t;e;){if(void 0!==e.for)return!0;e=e.parent}return!1}function on(t){var e=t.match(Cl);if(e){var r={};return e.forEach(function(t){r[t.slice(1)]=!0}),r}}function an(t){for(var e={},r=0,i=t.length;r<i;r++)e[t[r].name]=t[r].value;return e}function sn(t){return"script"===t.tag||"style"===t.tag}function ln(t){return"style"===t.tag||"script"===t.tag&&(!t.attrsMap.type||"text/javascript"===t.attrsMap.type)}function un(t){for(var e=[],r=0;r<t.length;r++){var i=t[r];kl.test(i.name)||(i.name=i.name.replace(Ml,""),e.push(i))}return e}function cn(t,e){if("input"===t.tag){var r=t.attrsMap;if(r["v-model"]&&(r["v-bind:type"]||r[":type"])){var i=kr(t,"type"),n=Mr(t,"v-if",!0),o=n?"&&("+n+")":"",a=pn(t);Hi(a),hn(a,"type","checkbox"),Zi(a,e),a.processed=!0,a.if="("+i+")==='checkbox'"+o,Yi(a,{exp:a.if,block:a});var s=pn(t);Mr(s,"v-for",!0),hn(s,"type","radio"),Zi(s,e),Yi(a,{exp:"("+i+")==='radio'"+o,block:s});var l=pn(t);return Mr(l,"v-for",!0),hn(l,":type",i),Zi(l,e),Yi(a,{exp:n,block:l}),a}}}function pn(t){return Ni(t.tag,t.attrsList.slice(),t.parent)}function hn(t,e,r){t.attrsMap[e]=r,t.attrsList.push({name:e,value:r})}function fn(t,e){e.value&&zr(t,"textContent","_s("+e.value+")")}function dn(t,e){e.value&&zr(t,"innerHTML","_s("+e.value+")")}function mn(t,e){t&&(hl=Dl(e.staticKeys||""),fl=e.isReservedTag||lo,yn(t),gn(t,!1))}function vn(t){return d("type,tag,attrsList,attrsMap,plain,parent,children,attrs"+(t?","+t:""))}function yn(t){if(t.static=_n(t),1===t.type){if(!fl(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var e=0,r=t.children.length;e<r;e++){var i=t.children[e];yn(i),i.static||(t.static=!1)}if(t.ifConditions)for(var n=1,o=t.ifConditions.length;n<o;n++){var a=t.ifConditions[n].block;yn(a),a.static||(t.static=!1)}}}function gn(t,e){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=e),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var r=0,i=t.children.length;r<i;r++)gn(t.children[r],e||!!t.for);if(t.ifConditions)for(var n=1,o=t.ifConditions.length;n<o;n++)gn(t.ifConditions[n].block,e)}}function _n(t){return 2!==t.type&&(3===t.type||!(!t.pre&&(t.hasBindings||t.if||t.for||to(t.tag)||!fl(t.tag)||xn(t)||!Object.keys(t).every(hl))))}function xn(t){for(;t.parent;){if(t=t.parent,"template"!==t.tag)return!1;if(t.for)return!0}return!1}function bn(t,e,r){var i=e?"nativeOn:{":"on:{";for(var n in t){i+='"'+n+'":'+wn(n,t[n])+","}return i.slice(0,-1)+"}"}function wn(t,e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(e){return wn(t,e)}).join(",")+"]";var r=Bl.test(e.value),i=Ol.test(e.value);if(e.modifiers){var n="",o="",a=[];for(var s in e.modifiers)if(Vl[s])o+=Vl[s],Fl[s]&&a.push(s);else if("exact"===s){var l=e.modifiers;o+=jl(["ctrl","shift","alt","meta"].filter(function(t){return!l[t]}).map(function(t){return"$event."+t+"Key"}).join("||"))}else a.push(s);a.length&&(n+=Tn(a)),o&&(n+=o);return"function($event){"+n+(r?e.value+"($event)":i?"("+e.value+")($event)":e.value)+"}"}return r||i?e.value:"function($event){"+e.value+"}"}function Tn(t){return"if(!('button' in $event)&&"+t.map(Sn).join("&&")+")return null;"}function Sn(t){var e=parseInt(t,10);if(e)return"$event.keyCode!=="+e;var r=Fl[t];return"_k($event.keyCode,"+JSON.stringify(t)+","+JSON.stringify(r)+",$event.key)"}function zn(t,e){t.wrapListeners=function(t){return"_g("+t+","+e.value+")"}}function An(t,e){t.wrapData=function(r){return"_b("+r+",'"+t.tag+"',"+e.value+","+(e.modifiers&&e.modifiers.prop?"true":"false")+(e.modifiers&&e.modifiers.sync?",true":"")+")"}}function Cn(t,e){var r=new Ul(e);return{render:"with(this){return "+(t?En(t,r):'_c("div")')+"}",staticRenderFns:r.staticRenderFns}}function En(t,e){if(t.staticRoot&&!t.staticProcessed)return kn(t,e);if(t.once&&!t.onceProcessed)return Mn(t,e);if(t.for&&!t.forProcessed)return Pn(t,e);if(t.if&&!t.ifProcessed)return Ln(t,e);if("template"!==t.tag||t.slotTarget){if("slot"===t.tag)return Gn(t,e);var r;if(t.component)r=Wn(t.component,t,e);else{var i=t.plain?void 0:Rn(t,e),n=t.inlineTemplate?null:Vn(t,e,!0);r="_c('"+t.tag+"'"+(i?","+i:"")+(n?","+n:"")+")"}for(var o=0;o<e.transforms.length;o++)r=e.transforms[o](t,r);return r}return Vn(t,e)||"void 0"}function kn(t,e){return t.staticProcessed=!0,e.staticRenderFns.push("with(this){return "+En(t,e)+"}"),"_m("+(e.staticRenderFns.length-1)+(t.staticInFor?",true":"")+")"}function Mn(t,e){if(t.onceProcessed=!0,t.if&&!t.ifProcessed)return Ln(t,e);if(t.staticInFor){for(var r="",i=t.parent;i;){if(i.for){r=i.key;break}i=i.parent}return r?"_o("+En(t,e)+","+e.onceId+++","+r+")":En(t,e)}return kn(t,e)}function Ln(t,e,r,i){return t.ifProcessed=!0,In(t.ifConditions.slice(),e,r,i)}function In(t,e,r,i){function n(t){return r?r(t,e):t.once?Mn(t,e):En(t,e)}if(!t.length)return i||"_e()";var o=t.shift();return o.exp?"("+o.exp+")?"+n(o.block)+":"+In(t,e,r,i):""+n(o.block)}function Pn(t,e,r,i){var n=t.for,o=t.alias,a=t.iterator1?","+t.iterator1:"",s=t.iterator2?","+t.iterator2:"";return t.forProcessed=!0,(i||"_l")+"(("+n+"),function("+o+a+s+"){return "+(r||En)(t,e)+"})"}function Rn(t,e){var r="{",i=Dn(t,e);i&&(r+=i+","),t.key&&(r+="key:"+t.key+","),t.ref&&(r+="ref:"+t.ref+","),t.refInFor&&(r+="refInFor:true,"),t.pre&&(r+="pre:true,"),t.component&&(r+='tag:"'+t.tag+'",');for(var n=0;n<e.dataGenFns.length;n++)r+=e.dataGenFns[n](t);if(t.attrs&&(r+="attrs:{"+Hn(t.attrs)+"},"),t.props&&(r+="domProps:{"+Hn(t.props)+"},"),t.events&&(r+=bn(t.events,!1,e.warn)+","),t.nativeEvents&&(r+=bn(t.nativeEvents,!0,e.warn)+","),t.slotTarget&&!t.slotScope&&(r+="slot:"+t.slotTarget+","),t.scopedSlots&&(r+=Bn(t.scopedSlots,e)+","),t.model&&(r+="model:{value:"+t.model.value+",callback:"+t.model.callback+",expression:"+t.model.expression+"},"),t.inlineTemplate){var o=On(t,e);o&&(r+=o+",")}return r=r.replace(/,$/,"")+"}",t.wrapData&&(r=t.wrapData(r)),t.wrapListeners&&(r=t.wrapListeners(r)),r}function Dn(t,e){var r=t.directives;if(r){var i,n,o,a,s="directives:[",l=!1;for(i=0,n=r.length;i<n;i++){o=r[i],a=!0;var u=e.directives[o.name];u&&(a=!!u(t,o,e.warn)),a&&(l=!0,s+='{name:"'+o.name+'",rawName:"'+o.rawName+'"'+(o.value?",value:("+o.value+"),expression:"+JSON.stringify(o.value):"")+(o.arg?',arg:"'+o.arg+'"':"")+(o.modifiers?",modifiers:"+JSON.stringify(o.modifiers):"")+"},")}return l?s.slice(0,-1)+"]":void 0}}function On(t,e){var r=t.children[0];if(1===r.type){var i=Cn(r,e.options);return"inlineTemplate:{render:function(){"+i.render+"},staticRenderFns:["+i.staticRenderFns.map(function(t){return"function(){"+t+"}"}).join(",")+"]}"}}function Bn(t,e){return"scopedSlots:_u(["+Object.keys(t).map(function(r){return Fn(r,t[r],e)}).join(",")+"])"}function Fn(t,e,r){return e.for&&!e.forProcessed?jn(t,e,r):"{key:"+t+",fn:function("+String(e.slotScope)+"){return "+("template"===e.tag?e.if?e.if+"?"+(Vn(e,r)||"undefined")+":undefined":Vn(e,r)||"undefined":En(e,r))+"}}"}function jn(t,e,r){var i=e.for,n=e.alias,o=e.iterator1?","+e.iterator1:"",a=e.iterator2?","+e.iterator2:"";return e.forProcessed=!0,"_l(("+i+"),function("+n+o+a+"){return "+Fn(t,e,r)+"})"}function Vn(t,e,r,i,n){var o=t.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag)return(i||En)(a,e);var s=r?Nn(o,e.maybeComponent):0,l=n||$n;return"["+o.map(function(t){return l(t,e)}).join(",")+"]"+(s?","+s:"")}}function Nn(t,e){for(var r=0,i=0;i<t.length;i++){var n=t[i];if(1===n.type){if(Un(n)||n.ifConditions&&n.ifConditions.some(function(t){return Un(t.block)})){r=2;break}(e(n)||n.ifConditions&&n.ifConditions.some(function(t){return e(t.block)}))&&(r=1)}}return r}function Un(t){return void 0!==t.for||"template"===t.tag||"slot"===t.tag}function $n(t,e){return 1===t.type?En(t,e):3===t.type&&t.isComment?Zn(t):qn(t)}function qn(t){return"_v("+(2===t.type?t.expression:Xn(JSON.stringify(t.text)))+")"}function Zn(t){return"_e("+JSON.stringify(t.text)+")"}function Gn(t,e){var r=t.slotName||'"default"',i=Vn(t,e),n="_t("+r+(i?","+i:""),o=t.attrs&&"{"+t.attrs.map(function(t){return no(t.name)+":"+t.value}).join(",")+"}",a=t.attrsMap["v-bind"];return!o&&!a||i||(n+=",null"),o&&(n+=","+o),a&&(n+=(o?"":",null")+","+a),n+")"}function Wn(t,e,r){var i=e.inlineTemplate?null:Vn(e,r,!0);return"_c("+t+","+Rn(e,r)+(i?","+i:"")+")"}function Hn(t){for(var e="",r=0;r<t.length;r++){var i=t[r];e+='"'+i.name+'":'+Xn(i.value)+","}return e.slice(0,-1)}function Xn(t){return t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function Kn(t,e){try{return new Function(t)}catch(r){return e.push({err:r,code:t}),w}}function Jn(t){var e=Object.create(null);return function(r,i,n){i=x({},i);i.warn;delete i.warn;var o=i.delimiters?String(i.delimiters)+r:r;if(e[o])return e[o];var a=t(r,i),s={},l=[];return s.render=Kn(a.render,l),s.staticRenderFns=a.staticRenderFns.map(function(t){return Kn(t,l)}),e[o]=s}}function Yn(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}var Qn=Object.prototype.toString,to=d("slot,component",!0),eo=d("key,ref,slot,slot-scope,is"),ro=Object.prototype.hasOwnProperty,io=/-(\w)/g,no=y(function(t){return t.replace(io,function(t,e){return e?e.toUpperCase():""})}),oo=y(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),ao=/\B([A-Z])/g,so=y(function(t){return t.replace(ao,"-$1").toLowerCase()}),lo=function(t,e,r){return!1},uo=function(t){return t},co="data-server-rendered",po=["component","directive","filter"],ho=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],fo={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:lo,isReservedAttr:lo,isUnknownElement:lo,getTagNamespace:w,parsePlatformTagName:uo,mustUseProp:lo,_lifecycleHooks:ho},mo=Object.freeze({}),vo=/[^\w.$]/,yo="__proto__"in{},go="undefined"!=typeof window,_o=go&&window.navigator.userAgent.toLowerCase(),xo=_o&&/msie|trident/.test(_o),bo=_o&&_o.indexOf("msie 9.0")>0,wo=_o&&_o.indexOf("edge/")>0,To=_o&&_o.indexOf("android")>0,So=_o&&/iphone|ipad|ipod|ios/.test(_o),zo=(_o&&/chrome\/\d+/.test(_o),{}.watch),Ao=!1;if(go)try{var Co={};Object.defineProperty(Co,"passive",{get:function(){Ao=!0}}),window.addEventListener("test-passive",null,Co)}catch(t){}var Eo,ko,Mo=function(){return void 0===Eo&&(Eo=!go&&void 0!==t&&"server"===t.process.env.VUE_ENV),Eo},Lo=go&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Io="undefined"!=typeof Symbol&&k(Symbol)&&"undefined"!=typeof Reflect&&k(Reflect.ownKeys);ko="undefined"!=typeof Set&&k(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var Po=w,Ro=0,Do=function(){this.id=Ro++,this.subs=[]};Do.prototype.addSub=function(t){this.subs.push(t)},Do.prototype.removeSub=function(t){m(this.subs,t)},Do.prototype.depend=function(){Do.target&&Do.target.addDep(this)},Do.prototype.notify=function(){for(var t=this.subs.slice(),e=0,r=t.length;e<r;e++)t[e].update()},Do.target=null;var Oo=[],Bo=function(t,e,r,i,n,o,a,s){this.tag=t,this.data=e,this.children=r,this.text=i,this.elm=n,this.ns=void 0,this.context=o,this.functionalContext=void 0,this.functionalOptions=void 0,this.functionalScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},Fo={child:{configurable:!0}};Fo.child.get=function(){return this.componentInstance},Object.defineProperties(Bo.prototype,Fo);var jo=function(t){void 0===t&&(t="");var e=new Bo;return e.text=t,e.isComment=!0,e},Vo=Array.prototype,No=Object.create(Vo);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(t){var e=Vo[t];C(No,t,function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];var n,o=e.apply(this,r),a=this.__ob__;switch(t){case"push":case"unshift":n=r;break;case"splice":n=r.slice(2)}return n&&a.observeArray(n),a.dep.notify(),o})});var Uo=Object.getOwnPropertyNames(No),$o={shouldConvert:!0},qo=function(t){if(this.value=t,this.dep=new Do,this.vmCount=0,C(t,"__ob__",this),Array.isArray(t)){(yo?D:O)(t,No,Uo),this.observeArray(t)}else this.walk(t)};qo.prototype.walk=function(t){for(var e=Object.keys(t),r=0;r<e.length;r++)F(t,e[r],t[e[r]])},qo.prototype.observeArray=function(t){for(var e=0,r=t.length;e<r;e++)B(t[e])};var Zo=fo.optionMergeStrategies;Zo.data=function(t,e,r){return r?$(t,e,r):e&&"function"!=typeof e?t:$.call(this,t,e)},ho.forEach(function(t){Zo[t]=q}),po.forEach(function(t){Zo[t+"s"]=Z}),Zo.watch=function(t,e,r,i){if(t===zo&&(t=void 0),e===zo&&(e=void 0),!e)return Object.create(t||null);if(!t)return e;var n={};x(n,t);for(var o in e){var a=n[o],s=e[o];a&&!Array.isArray(a)&&(a=[a]),n[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return n},Zo.props=Zo.methods=Zo.inject=Zo.computed=function(t,e,r,i){if(!t)return e;var n=Object.create(null);return x(n,t),e&&x(n,e),n},Zo.provide=$;var Go,Wo,Ho=function(t,e){return void 0===e?t:e},Xo=[],Ko=!1,Jo=!1;if(void 0!==r&&k(r))Wo=function(){r(nt)};else if("undefined"==typeof MessageChannel||!k(MessageChannel)&&"[object MessageChannelConstructor]"!==MessageChannel.toString())Wo=function(){setTimeout(nt,0)};else{var Yo=new MessageChannel,Qo=Yo.port2;Yo.port1.onmessage=nt,Wo=function(){Qo.postMessage(1)}}if("undefined"!=typeof Promise&&k(Promise)){var ta=Promise.resolve();Go=function(){ta.then(nt),So&&setTimeout(w)}}else Go=Wo;var ea,ra=y(function(t){var e="&"===t.charAt(0);t=e?t.slice(1):t;var r="~"===t.charAt(0);t=r?t.slice(1):t;var i="!"===t.charAt(0);return t=i?t.slice(1):t,{name:t,once:r,capture:i,passive:e}}),ia=null,na=[],oa=[],aa={},sa=!1,la=!1,ua=0,ca=0,pa=function(t,e,r,i){this.vm=t,t._watchers.push(this),i?(this.deep=!!i.deep,this.user=!!i.user,this.lazy=!!i.lazy,this.sync=!!i.sync):this.deep=this.user=this.lazy=this.sync=!1,this.cb=r,this.id=++ca,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ko,this.newDepIds=new ko,this.expression="","function"==typeof e?this.getter=e:(this.getter=E(e),this.getter||(this.getter=function(){})),this.value=this.lazy?void 0:this.get()};pa.prototype.get=function(){M(this);var t,e=this.vm;try{t=this.getter.call(e,e)}catch(t){if(!this.user)throw t;et(t,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&Nt(t),L(),this.cleanupDeps()}return t},pa.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},pa.prototype.cleanupDeps=function(){for(var t=this,e=this.deps.length;e--;){var r=t.deps[e];t.newDepIds.has(r.id)||r.removeSub(t)}var i=this.depIds;this.depIds=this.newDepIds,this.newDepIds=i,this.newDepIds.clear(),i=this.deps,this.deps=this.newDeps,this.newDeps=i,this.newDeps.length=0},pa.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():Vt(this)},pa.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||l(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){et(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},pa.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},pa.prototype.depend=function(){for(var t=this,e=this.deps.length;e--;)t.deps[e].depend()},pa.prototype.teardown=function(){var t=this;if(this.active){this.vm._isBeingDestroyed||m(this.vm._watchers,this);for(var e=this.deps.length;e--;)t.deps[e].removeSub(t);this.active=!1}};var ha=new ko,fa={enumerable:!0,configurable:!0,get:w,set:w},da={lazy:!0};fe(de.prototype);var ma={init:function(t,e,r,i){if(!t.componentInstance||t.componentInstance._isDestroyed){(t.componentInstance=ge(t,ia,r,i)).$mount(e?t.elm:void 0,e)}else if(t.data.keepAlive){var n=t;ma.prepatch(n,n)}},prepatch:function(t,e){var r=e.componentOptions;Mt(e.componentInstance=t.componentInstance,r.propsData,r.listeners,e,r.children)},insert:function(t){var e=t.context,r=t.componentInstance;r._isMounted||(r._isMounted=!0,Rt(r,"mounted")),t.data.keepAlive&&(e._isMounted?Ft(r):It(r,!0))},destroy:function(t){var e=t.componentInstance;e._isDestroyed||(t.data.keepAlive?Pt(e,!0):e.$destroy())}},va=Object.keys(ma),ya=1,ga=2,_a=0;!function(t){t.prototype._init=function(t){var e=this;e._uid=_a++,e._isVue=!0,t&&t._isComponent?Ae(e,t):e.$options=X(Ce(e.constructor),t||{},e),e._renderProxy=e,e._self=e,Et(e),bt(e),ze(e),Rt(e,"beforeCreate"),ee(e),qt(e),te(e),Rt(e,"created"),e.$options.el&&e.$mount(e.$options.el)}}(Me),function(t){var e={};e.get=function(){return this._data};var r={};r.get=function(){return this._props},Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",r),t.prototype.$set=j,t.prototype.$delete=V,t.prototype.$watch=function(t,e,r){var i=this;if(u(e))return Qt(i,t,e,r);r=r||{},r.user=!0;var n=new pa(i,t,e,r);return r.immediate&&e.call(i,n.value),function(){n.teardown()}}}(Me),function(t){var e=/^hook:/;t.prototype.$on=function(t,r){var i=this,n=this;if(Array.isArray(t))for(var o=0,a=t.length;o<a;o++)i.$on(t[o],r);else(n._events[t]||(n._events[t]=[])).push(r),e.test(t)&&(n._hasHookEvent=!0);return n},t.prototype.$once=function(t,e){function r(){i.$off(t,r),e.apply(i,arguments)}var i=this;return r.fn=e,i.$on(t,r),i},t.prototype.$off=function(t,e){var r=this,i=this;if(!arguments.length)return i._events=Object.create(null),i;if(Array.isArray(t)){for(var n=0,o=t.length;n<o;n++)r.$off(t[n],e);return i}var a=i._events[t];if(!a)return i;if(1===arguments.length)return i._events[t]=null,i;if(e)for(var s,l=a.length;l--;)if((s=a[l])===e||s.fn===e){a.splice(l,1);break}return i},t.prototype.$emit=function(t){var e=this,r=e._events[t];if(r){r=r.length>1?_(r):r;for(var i=_(arguments,1),n=0,o=r.length;n<o;n++)try{r[n].apply(e,i)}catch(r){et(r,e,'event handler for "'+t+'"')}}return e}}(Me),function(t){t.prototype._update=function(t,e){var r=this;r._isMounted&&Rt(r,"beforeUpdate");var i=r.$el,n=r._vnode,o=ia;ia=r,r._vnode=t,n?r.$el=r.__patch__(n,t):(r.$el=r.__patch__(r.$el,t,e,!1,r.$options._parentElm,r.$options._refElm),r.$options._parentElm=r.$options._refElm=null),ia=o,i&&(i.__vue__=null),r.$el&&(r.$el.__vue__=r),r.$vnode&&r.$parent&&r.$vnode===r.$parent._vnode&&(r.$parent.$el=r.$el)},t.prototype.$forceUpdate=function(){var t=this;t._watcher&&t._watcher.update()},t.prototype.$destroy=function(){var t=this;if(!t._isBeingDestroyed){Rt(t,"beforeDestroy"),t._isBeingDestroyed=!0;var e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||m(e.$children,t),t._watcher&&t._watcher.teardown();for(var r=t._watchers.length;r--;)t._watchers[r].teardown();t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),Rt(t,"destroyed"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}}(Me),function(t){fe(t.prototype),t.prototype.$nextTick=function(t){return at(t,this)},t.prototype._render=function(){var t=this,e=t.$options,r=e.render,i=e._parentVnode;if(t._isMounted)for(var n in t.$slots){var o=t.$slots[n];o._rendered&&(t.$slots[n]=R(o,!0))}t.$scopedSlots=i&&i.data.scopedSlots||mo,t.$vnode=i;var a;try{a=r.call(t._renderProxy,t.$createElement)}catch(e){et(e,t,"render"),a=t._vnode}return a instanceof Bo||(a=jo()),a.parent=i,a}}(Me);var xa=[String,RegExp,Array],ba={name:"keep-alive",abstract:!0,props:{include:xa,exclude:xa,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){var t=this;for(var e in t.cache)Ve(t.cache,e,t.keys)},watch:{include:function(t){je(this,function(e){return Fe(t,e)})},exclude:function(t){je(this,function(e){return!Fe(t,e)})}},render:function(){var t=xt(this.$slots.default),e=t&&t.componentOptions;if(e){var r=Be(e);if(r&&(this.include&&!Fe(this.include,r)||this.exclude&&Fe(this.exclude,r)))return t;var i=this,n=i.cache,o=i.keys,a=null==t.key?e.Ctor.cid+(e.tag?"::"+e.tag:""):t.key;n[a]?(t.componentInstance=n[a].componentInstance,m(o,a),o.push(a)):(n[a]=t,o.push(a),this.max&&o.length>parseInt(this.max)&&Ve(n,o[0],o,this._vnode)),t.data.keepAlive=!0}return t}},wa={KeepAlive:ba};!function(t){var e={};e.get=function(){return fo},Object.defineProperty(t,"config",e),t.util={warn:Po,extend:x,mergeOptions:X,defineReactive:F},t.set=j,t.delete=V,t.nextTick=at,t.options=Object.create(null),po.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,x(t.options.components,wa),Le(t),Ie(t),Pe(t),Oe(t)}(Me),Object.defineProperty(Me.prototype,"$isServer",{get:Mo}),Object.defineProperty(Me.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Me.version="2.5.2";var Ta,Sa,za,Aa,Ca,Ea,ka,Ma,La,Ia=d("style,class"),Pa=d("input,textarea,option,select,progress"),Ra=function(t,e,r){return"value"===r&&Pa(t)&&"button"!==e||"selected"===r&&"option"===t||"checked"===r&&"input"===t||"muted"===r&&"video"===t},Da=d("contenteditable,draggable,spellcheck"),Oa=d("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Ba="http://www.w3.org/1999/xlink",Fa=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},ja=function(t){return Fa(t)?t.slice(6,t.length):""},Va=function(t){return null==t||!1===t},Na={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Ua=d("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),$a=d("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),qa=function(t){return"pre"===t},Za=function(t){return Ua(t)||$a(t)},Ga=Object.create(null),Wa=d("text,number,password,search,email,tel,url"),Ha=Object.freeze({createElement:Je,createElementNS:Ye,createTextNode:Qe,createComment:tr,insertBefore:er,removeChild:rr,appendChild:ir,parentNode:nr,nextSibling:or,tagName:ar,setTextContent:sr,setAttribute:lr}),Xa={create:function(t,e){ur(e)},update:function(t,e){t.data.ref!==e.data.ref&&(ur(t,!0),ur(e))},destroy:function(t){ur(t,!0)}},Ka=new Bo("",{},[]),Ja=["create","activate","update","remove","destroy"],Ya={create:fr,update:fr,destroy:function(t){fr(t,Ka)}},Qa=Object.create(null),ts=[Xa,Ya],es={create:gr,update:gr},rs={create:xr,update:xr},is=/[\w).+\-_$\]]/,ns="__r",os="__c",as={create:Hr,update:Hr},ss={create:Xr,update:Xr},ls=y(function(t){var e={},r=/;(?![^(]*\))/g,i=/:(.+)/;return t.split(r).forEach(function(t){if(t){var r=t.split(i);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}),us=/^--/,cs=/\s*!important$/,ps=function(t,e,r){if(us.test(e))t.style.setProperty(e,r);else if(cs.test(r))t.style.setProperty(e,r.replace(cs,""),"important");else{var i=fs(e);if(Array.isArray(r))for(var n=0,o=r.length;n<o;n++)t.style[i]=r[n];else t.style[i]=r}},hs=["Webkit","Moz","ms"],fs=y(function(t){if(La=La||document.createElement("div").style,"filter"!==(t=no(t))&&t in La)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),r=0;r<hs.length;r++){var i=hs[r]+e;if(i in La)return i}}),ds={create:ri,update:ri},ms=y(function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}}),vs=go&&!bo,ys="transition",gs="animation",_s="transition",xs="transitionend",bs="animation",ws="animationend";vs&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(_s="WebkitTransition",xs="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(bs="WebkitAnimation",ws="webkitAnimationEnd"));var Ts=go?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()},Ss=/\b(transform|all)(,|$)/,zs=go?{create:yi,activate:yi,remove:function(t,e){!0!==t.data.show?di(t,e):e()}}:{},As=[es,rs,as,ss,ds,zs],Cs=As.concat(ts),Es=function(t){function e(t){return new Bo(L.tagName(t).toLowerCase(),{},[],void 0,t)}function r(t,e){function r(){0==--r.listeners&&a(t)}return r.listeners=e,r}function a(t){var e=L.parentNode(t);n(e)&&L.removeChild(e,t)}function l(t,e,r,i,a){if(t.isRootInsert=!a,!u(t,e,r,i)){var s=t.data,l=t.children,c=t.tag;n(c)?(t.elm=t.ns?L.createElementNS(t.ns,c):L.createElement(c,t),y(t),f(t,l,e),n(s)&&v(t,e),h(r,t.elm,i)):o(t.isComment)?(t.elm=L.createComment(t.text),h(r,t.elm,i)):(t.elm=L.createTextNode(t.text),h(r,t.elm,i))}}function u(t,e,r,i){var a=t.data;if(n(a)){var s=n(t.componentInstance)&&a.keepAlive;if(n(a=a.hook)&&n(a=a.init)&&a(t,!1,r,i),n(t.componentInstance))return c(t,e),o(s)&&p(t,e,r,i),!0}}function c(t,e){n(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,m(t)?(v(t,e),y(t)):(ur(t),e.push(t))}function p(t,e,r,i){for(var o,a=t;a.componentInstance;)if(a=a.componentInstance._vnode,n(o=a.data)&&n(o=o.transition)){for(o=0;o<k.activate.length;++o)k.activate[o](Ka,a);e.push(a);break}h(r,t.elm,i)}function h(t,e,r){n(t)&&(n(r)?r.parentNode===t&&L.insertBefore(t,e,r):L.appendChild(t,e))}function f(t,e,r){if(Array.isArray(e))for(var i=0;i<e.length;++i)l(e[i],r,t.elm,null,!0);else s(t.text)&&L.appendChild(t.elm,L.createTextNode(t.text))}function m(t){for(;t.componentInstance;)t=t.componentInstance._vnode;return n(t.tag)}function v(t,e){for(var r=0;r<k.create.length;++r)k.create[r](Ka,t);C=t.data.hook,n(C)&&(n(C.create)&&C.create(Ka,t),n(C.insert)&&e.push(t))}function y(t){var e;if(n(e=t.functionalScopeId))L.setAttribute(t.elm,e,"");else for(var r=t;r;)n(e=r.context)&&n(e=e.$options._scopeId)&&L.setAttribute(t.elm,e,""),r=r.parent;n(e=ia)&&e!==t.context&&e!==t.functionalContext&&n(e=e.$options._scopeId)&&L.setAttribute(t.elm,e,"")}function g(t,e,r,i,n,o){for(;i<=n;++i)l(r[i],o,t,e)}function _(t){var e,r,i=t.data;if(n(i))for(n(e=i.hook)&&n(e=e.destroy)&&e(t),e=0;e<k.destroy.length;++e)k.destroy[e](t);if(n(e=t.children))for(r=0;r<t.children.length;++r)_(t.children[r])}function x(t,e,r,i){for(;r<=i;++r){var o=e[r];n(o)&&(n(o.tag)?(b(o),_(o)):a(o.elm))}}function b(t,e){if(n(e)||n(t.data)){var i,o=k.remove.length+1;for(n(e)?e.listeners+=o:e=r(t.elm,o),n(i=t.componentInstance)&&n(i=i._vnode)&&n(i.data)&&b(i,e),i=0;i<k.remove.length;++i)k.remove[i](t,e);n(i=t.data.hook)&&n(i=i.remove)?i(t,e):e()}else a(t.elm)}function w(t,e,r,o,a){for(var s,u,c,p,h=0,f=0,d=e.length-1,m=e[0],v=e[d],y=r.length-1,_=r[0],b=r[y],w=!a;h<=d&&f<=y;)i(m)?m=e[++h]:i(v)?v=e[--d]:cr(m,_)?(S(m,_,o),m=e[++h],_=r[++f]):cr(v,b)?(S(v,b,o),v=e[--d],b=r[--y]):cr(m,b)?(S(m,b,o),w&&L.insertBefore(t,m.elm,L.nextSibling(v.elm)),m=e[++h],b=r[--y]):cr(v,_)?(S(v,_,o),w&&L.insertBefore(t,v.elm,m.elm),v=e[--d],_=r[++f]):(i(s)&&(s=hr(e,h,d)),u=n(_.key)?s[_.key]:T(_,e,h,d),i(u)?l(_,o,t,m.elm):(c=e[u],cr(c,_)?(S(c,_,o),e[u]=void 0,w&&L.insertBefore(t,c.elm,m.elm)):l(_,o,t,m.elm)),_=r[++f]);h>d?(p=i(r[y+1])?null:r[y+1].elm,g(t,p,r,f,y,o)):f>y&&x(t,e,h,d)}function T(t,e,r,i){for(var o=r;o<i;o++){var a=e[o];if(n(a)&&cr(t,a))return o}}function S(t,e,r,a){if(t!==e){var s=e.elm=t.elm;if(o(t.isAsyncPlaceholder))return void(n(e.asyncFactory.resolved)?A(t.elm,e,r):e.isAsyncPlaceholder=!0);if(o(e.isStatic)&&o(t.isStatic)&&e.key===t.key&&(o(e.isCloned)||o(e.isOnce)))return void(e.componentInstance=t.componentInstance);var l,u=e.data;n(u)&&n(l=u.hook)&&n(l=l.prepatch)&&l(t,e);var c=t.children,p=e.children;if(n(u)&&m(e)){for(l=0;l<k.update.length;++l)k.update[l](t,e);n(l=u.hook)&&n(l=l.update)&&l(t,e)}i(e.text)?n(c)&&n(p)?c!==p&&w(s,c,p,r,a):n(p)?(n(t.text)&&L.setTextContent(s,""),g(s,null,p,0,p.length-1,r)):n(c)?x(s,c,0,c.length-1):n(t.text)&&L.setTextContent(s,""):t.text!==e.text&&L.setTextContent(s,e.text),n(u)&&n(l=u.hook)&&n(l=l.postpatch)&&l(t,e)}}function z(t,e,r){if(o(r)&&n(t.parent))t.parent.data.pendingInsert=e;else for(var i=0;i<e.length;++i)e[i].data.hook.insert(e[i])}function A(t,e,r){if(o(e.isComment)&&n(e.asyncFactory))return e.elm=t,e.isAsyncPlaceholder=!0,!0;e.elm=t;var i=e.tag,a=e.data,s=e.children;if(n(a)&&(n(C=a.hook)&&n(C=C.init)&&C(e,!0),n(C=e.componentInstance)))return c(e,r),!0;if(n(i)){if(n(s))if(t.hasChildNodes())if(n(C=a)&&n(C=C.domProps)&&n(C=C.innerHTML)){if(C!==t.innerHTML)return!1}else{for(var l=!0,u=t.firstChild,p=0;p<s.length;p++){if(!u||!A(u,s[p],r)){l=!1;break}u=u.nextSibling}if(!l||u)return!1}else f(e,s,r);if(n(a))for(var h in a)if(!I(h)){v(e,r);break}}else t.data!==e.text&&(t.data=e.text);return!0}var C,E,k={},M=t.modules,L=t.nodeOps;for(C=0;C<Ja.length;++C)for(k[Ja[C]]=[],E=0;E<M.length;++E)n(M[E][Ja[C]])&&k[Ja[C]].push(M[E][Ja[C]]);var I=d("attrs,style,class,staticClass,staticStyle,key");return function(t,r,a,s,u,c){if(i(r))return void(n(t)&&_(t));var p=!1,h=[];if(i(t))p=!0,l(r,h,u,c);else{var f=n(t.nodeType);if(!f&&cr(t,r))S(t,r,h,s);else{if(f){if(1===t.nodeType&&t.hasAttribute(co)&&(t.removeAttribute(co),a=!0),o(a)&&A(t,r,h))return z(r,h,!0),t;t=e(t)}var d=t.elm,v=L.parentNode(d);if(l(r,h,d._leaveCb?null:v,L.nextSibling(d)),n(r.parent))for(var y=r.parent,g=m(r);y;){for(var b=0;b<k.destroy.length;++b)k.destroy[b](y);if(y.elm=r.elm,g){for(var w=0;w<k.create.length;++w)k.create[w](Ka,y);var T=y.data.hook.insert;if(T.merged)for(var C=1;C<T.fns.length;C++)T.fns[C]()}else ur(y);y=y.parent}n(v)?x(v,[t],0,0):n(t.tag)&&_(t)}}return z(r,h,p),r.elm}}({nodeOps:Ha,modules:Cs});bo&&document.addEventListener("selectionchange",function(){var t=document.activeElement;t&&t.vmodel&&Si(t,"input")});var ks={inserted:function(t,e,r){"select"===r.tag?(gi(t,e,r.context),t._vOptions=[].map.call(t.options,bi)):("textarea"===r.tag||Wa(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("change",Ti),To||(t.addEventListener("compositionstart",wi),t.addEventListener("compositionend",Ti)),bo&&(t.vmodel=!0)))},componentUpdated:function(t,e,r){if("select"===r.tag){gi(t,e,r.context);var i=t._vOptions,n=t._vOptions=[].map.call(t.options,bi);if(n.some(function(t,e){return!T(t,i[e])})){(t.multiple?e.value.some(function(t){return xi(t,n)}):e.value!==e.oldValue&&xi(e.value,n))&&Si(t,"change")}}}},Ms={bind:function(t,e,r){var i=e.value;r=zi(r);var n=r.data&&r.data.transition,o=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;i&&n?(r.data.show=!0,fi(r,function(){t.style.display=o})):t.style.display=i?o:"none"},update:function(t,e,r){var i=e.value;i!==e.oldValue&&(r=zi(r),r.data&&r.data.transition?(r.data.show=!0,i?fi(r,function(){t.style.display=t.__vOriginalDisplay}):di(r,function(){t.style.display="none"})):t.style.display=i?t.__vOriginalDisplay:"none")},unbind:function(t,e,r,i,n){n||(t.style.display=t.__vOriginalDisplay)}},Ls={model:ks,show:Ms},Is={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]},Ps={name:"transition",props:Is,abstract:!0,render:function(t){var e=this,r=this.$options._renderChildren;if(r&&(r=r.filter(function(t){return t.tag||_t(t)}),r.length)){var i=this.mode,n=r[0];if(ki(this.$vnode))return n;var o=Ai(n);if(!o)return n;if(this._leaving)return Ei(t,n);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:s(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var l=(o.data||(o.data={})).transition=Ci(this),u=this._vnode,c=Ai(u);if(o.data.directives&&o.data.directives.some(function(t){return"show"===t.name})&&(o.data.show=!0),c&&c.data&&!Mi(o,c)&&!_t(c)){var p=c.data.transition=x({},l);if("out-in"===i)return this._leaving=!0,ut(p,"afterLeave",function(){e._leaving=!1,e.$forceUpdate()}),Ei(t,n);if("in-out"===i){if(_t(o))return u;var h,f=function(){h()};ut(l,"afterEnter",f),ut(l,"enterCancelled",f),ut(p,"delayLeave",function(t){h=t})}}return n}}},Rs=x({tag:String,moveClass:String},Is);delete Rs.mode;var Ds={props:Rs,render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",r=Object.create(null),i=this.prevChildren=this.children,n=this.$slots.default||[],o=this.children=[],a=Ci(this),s=0;s<n.length;s++){var l=n[s];if(l.tag)if(null!=l.key&&0!==String(l.key).indexOf("__vlist"))o.push(l),r[l.key]=l,(l.data||(l.data={})).transition=a;else;}if(i){for(var u=[],c=[],p=0;p<i.length;p++){var h=i[p];h.data.transition=a,h.data.pos=h.elm.getBoundingClientRect(),r[h.key]?u.push(h):c.push(h)}this.kept=t(e,null,u),this.removed=c}return t(e,null,o)},beforeUpdate:function(){this.__patch__(this._vnode,this.kept,!1,!0),this._vnode=this.kept},updated:function(){var t=this.prevChildren,e=this.moveClass||(this.name||"v")+"-move";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach(Li),t.forEach(Ii),t.forEach(Pi),this._reflow=document.body.offsetHeight,t.forEach(function(t){if(t.data.moved){var r=t.elm,i=r.style;si(r,e),i.transform=i.WebkitTransform=i.transitionDuration="",r.addEventListener(xs,r._moveCb=function t(i){i&&!/transform$/.test(i.propertyName)||(r.removeEventListener(xs,t),r._moveCb=null,li(r,e))})}}))},methods:{hasMove:function(t,e){if(!vs)return!1;if(this._hasMove)return this._hasMove;var r=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach(function(t){ni(r,t)}),ii(r,e),r.style.display="none",this.$el.appendChild(r);var i=ci(r);return this.$el.removeChild(r),this._hasMove=i.hasTransform}}},Os={Transition:Ps,TransitionGroup:Ds};Me.config.mustUseProp=Ra,Me.config.isReservedTag=Za,Me.config.isReservedAttr=Ia,Me.config.getTagNamespace=He,Me.config.isUnknownElement=Xe,x(Me.options.directives,Ls),x(Me.options.components,Os),Me.prototype.__patch__=go?Es:w,Me.prototype.$mount=function(t,e){return t=t&&go?Ke(t):void 0,kt(this,t,e)},Me.nextTick(function(){fo.devtools&&Lo&&Lo.emit("init",Me)},0);var Bs,Fs=!!go&&function(t,e){var r=document.createElement("div");return r.innerHTML='<div a="'+t+'"/>',r.innerHTML.indexOf(e)>0}("\n"," "),js=/\{\{((?:.|\n)+?)\}\}/g,Vs=/[-.*+?^${}()|[\]\/\\]/g,Ns=y(function(t){var e=t[0].replace(Vs,"\\$&"),r=t[1].replace(Vs,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+r,"g")}),Us={staticKeys:["staticClass"],transformNode:Di,genData:Oi},$s={staticKeys:["staticStyle"],transformNode:Bi,genData:Fi},qs={decode:function(t){return Bs=Bs||document.createElement("div"),Bs.innerHTML=t,Bs.textContent}},Zs=d("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),Gs=d("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),Ws=d("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Hs=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Xs="[a-zA-Z_][\\w\\-\\.]*",Ks="((?:"+Xs+"\\:)?"+Xs+")",Js=new RegExp("^<"+Ks),Ys=/^\s*(\/?)>/,Qs=new RegExp("^<\\/"+Ks+"[^>]*>"),tl=/^<!DOCTYPE [^>]+>/i,el=/^<!--/,rl=/^<!\[/,il=!1;"x".replace(/x(.)?/g,function(t,e){il=""===e});var nl,ol,al,sl,ll,ul,cl,pl,hl,fl,dl=d("script,style,textarea",!0),ml={},vl={"<":"<",">":">",""":'"',"&":"&"," ":"\n"},yl=/&(?:lt|gt|quot|amp);/g,gl=/&(?:lt|gt|quot|amp|#10);/g,_l=d("pre,textarea",!0),xl=function(t,e){return t&&_l(t)&&"\n"===e[0]},bl=/^@|^v-on:/,wl=/^v-|^@|^:/,Tl=/(.*?)\s+(?:in|of)\s+(.*)/,Sl=/\((\{[^}]*\}|[^,]*),([^,]*)(?:,([^,]*))?\)/,zl=/:(.*)$/,Al=/^:|^v-bind:/,Cl=/\.[^.]+/g,El=y(qs.decode),kl=/^xmlns:NS\d+/,Ml=/^NS\d+:/,Ll={preTransformNode:cn},Il=[Us,$s,Ll],Pl={model:jr,text:fn,html:dn},Rl={expectHTML:!0,modules:Il,directives:Pl,isPreTag:qa,isUnaryTag:Zs,mustUseProp:Ra,canBeLeftOpenTag:Gs,isReservedTag:Za,getTagNamespace:He,staticKeys:function(t){return t.reduce(function(t,e){return t.concat(e.staticKeys||[])},[]).join(",")}(Il)},Dl=y(vn),Ol=/^\s*([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/,Bl=/^\s*[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?']|\[".*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*\s*$/,Fl={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},jl=function(t){return"if("+t+")return null;"},Vl={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:jl("$event.target !== $event.currentTarget"),ctrl:jl("!$event.ctrlKey"),shift:jl("!$event.shiftKey"),alt:jl("!$event.altKey"),meta:jl("!$event.metaKey"),left:jl("'button' in $event && $event.button !== 0"),middle:jl("'button' in $event && $event.button !== 1"),right:jl("'button' in $event && $event.button !== 2")},Nl={on:zn,bind:An,cloak:w},Ul=function(t){this.options=t,this.warn=t.warn||Tr,this.transforms=Sr(t.modules,"transformCode"),this.dataGenFns=Sr(t.modules,"genData"),this.directives=x(x({},Nl),t.directives);var e=t.isReservedTag||lo;this.maybeComponent=function(t){return!e(t.tag)},this.onceId=0,this.staticRenderFns=[]},$l=(new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)"),function(t){return function(e){function r(r,i){var n=Object.create(e),o=[],a=[];if(n.warn=function(t,e){(e?a:o).push(t)},i){i.modules&&(n.modules=(e.modules||[]).concat(i.modules)),i.directives&&(n.directives=x(Object.create(e.directives),i.directives));for(var s in i)"modules"!==s&&"directives"!==s&&(n[s]=i[s])}var l=t(r,n);return l.errors=o,l.tips=a,l}return{compile:r,compileToFunctions:Jn(r)}}}(function(t,e){var r=Ui(t.trim(),e);mn(r,e);var i=Cn(r,e);return{ast:r,render:i.render,staticRenderFns:i.staticRenderFns}})),ql=$l(Rl),Zl=ql.compileToFunctions,Gl=y(function(t){var e=Ke(t);return e&&e.innerHTML}),Wl=Me.prototype.$mount;Me.prototype.$mount=function(t,e){if((t=t&&Ke(t))===document.body||t===document.documentElement)return this;var r=this.$options;if(!r.render){var i=r.template;if(i)if("string"==typeof i)"#"===i.charAt(0)&&(i=Gl(i));else{if(!i.nodeType)return this;i=i.innerHTML}else t&&(i=Yn(t));if(i){var n=Zl(i,{shouldDecodeNewlines:Fs,delimiters:r.delimiters,comments:r.comments},this),o=n.render,a=n.staticRenderFns;r.render=o,r.staticRenderFns=a}}return Wl.call(this,t,e)},Me.compile=Zl,e.a=Me}).call(e,r(0),r(4).setImmediate)},function(t,e,r){function i(t,e){this._id=t,this._clearFn=e}var n=Function.prototype.apply;e.setTimeout=function(){return new i(n.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(n.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},r(5),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,r){(function(t,e){!function(t,r){"use strict";function i(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r<e.length;r++)e[r]=arguments[r+1];var i={callback:t,args:e};return u[l]=i,s(l),l++}function n(t){delete u[t]}function o(t){var e=t.callback,i=t.args;switch(i.length){case 0:e();break;case 1:e(i[0]);break;case 2:e(i[0],i[1]);break;case 3:e(i[0],i[1],i[2]);break;default:e.apply(r,i)}}function a(t){if(c)setTimeout(a,0,t);else{var e=u[t];if(e){c=!0;try{o(e)}finally{n(t),c=!1}}}}if(!t.setImmediate){var s,l=1,u={},c=!1,p=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?function(){s=function(t){e.nextTick(function(){a(t)})}}():function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?function(){var e="setImmediate$"+Math.random()+"$",r=function(r){r.source===t&&"string"==typeof r.data&&0===r.data.indexOf(e)&&a(+r.data.slice(e.length))};t.addEventListener?t.addEventListener("message",r,!1):t.attachEvent("onmessage",r),s=function(r){t.postMessage(e+r,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){a(t.data)},s=function(e){t.port2.postMessage(e)}}():p&&"onreadystatechange"in p.createElement("script")?function(){var t=p.documentElement;s=function(e){var r=p.createElement("script");r.onreadystatechange=function(){a(e),r.onreadystatechange=null,t.removeChild(r),r=null},t.appendChild(r)}}():function(){s=function(t){setTimeout(a,0,t)}}(),h.setImmediate=i,h.clearImmediate=n}}("undefined"==typeof self?void 0===t?this:t:self)}).call(e,r(0),r(6))},function(t,e){function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function n(t){if(c===setTimeout)return setTimeout(t,0);if((c===r||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(p===clearTimeout)return clearTimeout(t);if((p===i||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(t);try{return p(t)}catch(e){try{return p.call(null,t)}catch(e){return p.call(this,t)}}}function a(){m&&f&&(m=!1,f.length?d=f.concat(d):v=-1,d.length&&s())}function s(){if(!m){var t=n(a);m=!0;for(var e=d.length;e;){for(f=d,d=[];++v<e;)f&&f[v].run();v=-1,e=d.length}f=null,m=!1,o(t)}}function l(t,e){this.fun=t,this.array=e}function u(){}var c,p,h=t.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:r}catch(t){c=r}try{p="function"==typeof clearTimeout?clearTimeout:i}catch(t){p=i}}();var f,d=[],m=!1,v=-1;h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];d.push(new l(t,e)),1!==d.length||m||n(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=u,h.addListener=u,h.once=u,h.off=u,h.removeListener=u,h.removeAllListeners=u,h.emit=u,h.prependListener=u,h.prependOnceListener=u,h.listeners=function(t){return[]},h.binding=function(t){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(t){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(t,e,r){"use strict";function i(t){r(8)}var n=r(14),o=r(16),a=r(13),s=i,l=a(n.a,o.a,!1,s,null,null);e.a=l.exports},function(t,e,r){var i=r(9);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);r(11)("1cc1a7d4",i,!0)},function(t,e,r){e=t.exports=r(10)(void 0),e.push([t.i,"#geshem #datetime{position:absolute;margin:20px 0 0 20px;color:#fff;font-family:monospace}#geshem #datetime #date{font-size:1.4em}#geshem #datetime #time{font-size:1.8em}#geshem #slider{position:absolute;bottom:8vh;width:30vw;margin-left:35vw}@media only screen and (max-device-width:812px){#geshem #slider{width:80vw;margin-left:8vw}}",""])},function(t,e){function r(t,e){var r=t[1]||"",n=t[3];if(!n)return r;if(e&&"function"==typeof btoa){var o=i(n);return[r].concat(n.sources.map(function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"})).concat([o]).join("\n")}return[r].join("\n")}function i(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var i=r(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i}).join("")},e.i=function(t,r){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},n=0;n<this.length;n++){var o=this[n][0];"number"==typeof o&&(i[o]=!0)}for(n=0;n<t.length;n++){var a=t[n];"number"==typeof a[0]&&i[a[0]]||(r&&!a[2]?a[2]=r:r&&(a[2]="("+a[2]+") and ("+r+")"),e.push(a))}},e}},function(t,e,r){function i(t){for(var e=0;e<t.length;e++){var r=t[e],i=c[r.id];if(i){i.refs++;for(var n=0;n<i.parts.length;n++)i.parts[n](r.parts[n]);for(;n<r.parts.length;n++)i.parts.push(o(r.parts[n]));i.parts.length>r.parts.length&&(i.parts.length=r.parts.length)}else{for(var a=[],n=0;n<r.parts.length;n++)a.push(o(r.parts[n]));c[r.id]={id:r.id,refs:1,parts:a}}}}function n(){var t=document.createElement("style");return t.type="text/css",p.appendChild(t),t}function o(t){var e,r,i=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(i){if(d)return m;i.parentNode.removeChild(i)}if(v){var o=f++;i=h||(h=n()),e=a.bind(null,i,o,!1),r=a.bind(null,i,o,!0)}else i=n(),e=s.bind(null,i),r=function(){i.parentNode.removeChild(i)};return e(t),function(i){if(i){if(i.css===t.css&&i.media===t.media&&i.sourceMap===t.sourceMap)return;e(t=i)}else r()}}function a(t,e,r,i){var n=r?"":i.css;if(t.styleSheet)t.styleSheet.cssText=y(e,n);else{var o=document.createTextNode(n),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function s(t,e){var r=e.css,i=e.media,n=e.sourceMap;if(i&&t.setAttribute("media",i),n&&(r+="\n/*# sourceURL="+n.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}var l="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!l)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var u=r(12),c={},p=l&&(document.head||document.getElementsByTagName("head")[0]),h=null,f=0,d=!1,m=function(){},v="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());t.exports=function(t,e,r){d=r;var n=u(t,e);return i(n),function(e){for(var r=[],o=0;o<n.length;o++){var a=n[o],s=c[a.id];s.refs--,r.push(s)}e?(n=u(t,e),i(n)):n=[];for(var o=0;o<r.length;o++){var s=r[o];if(0===s.refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete c[s.id]}}}};var y=function(){var t=[];return function(e,r){return t[e]=r,t.filter(Boolean).join("\n")}}()},function(t,e){t.exports=function(t,e){for(var r=[],i={},n=0;n<e.length;n++){var o=e[n],a=o[0],s=o[1],l=o[2],u=o[3],c={id:t+":"+n,css:s,media:l,sourceMap:u};i[a]?i[a].parts.push(c):r.push(i[a]={id:a,parts:[c]})}return r}},function(t,e){t.exports=function(t,e,r,i,n,o){var a,s=t=t||{},l=typeof t.default;"object"!==l&&"function"!==l||(a=t,s=t.default);var u="function"==typeof s?s.options:s;e&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0),r&&(u.functional=!0),n&&(u._scopeId=n);var c;if(o?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},u._ssrRegister=c):i&&(c=i),c){var p=u.functional,h=p?u.render:u.beforeCreate;p?(u._injectStyles=c,u.render=function(t,e){return c.call(e),h(t,e)}):u.beforeCreate=h?[].concat(h,c):[c]}return{esModule:a,exports:s,options:u}}},function(t,e,r){"use strict";function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var n=r(15),o=r.n(n),a=r(1),s=r.n(a);e.a={name:"geshem",components:{"vue-slider":o.a},data:function(){var t;return{imgs:window.imgs,res:280,slider:7,rasterCoords:{140:[[33.35317413,33.27232471],[36.32243686,33.27232471],[36.32243686,30.72293428],[33.35317413,30.72293428]],280:[[31.93095218,34.5156862],[37.86644267,34.5156862],[37.86644267,29.42911589],[31.93095218,29.42911589]]},map:new s.a.Map((t={container:"map",style:"mapbox://styles/mapbox/dark-v9"},i(t,"container","map"),i(t,"maxZoom",10),i(t,"minZoom",5),i(t,"zoom",6.3),i(t,"center",[35,31.9]),i(t,"hash",!1),t))}},computed:{date:function(){var t=this.imgs[this.res][7-this.slider].substr(0,8);return t.substr(6,2)+"-"+t.substr(4,2)+"-"+t.substr(0,4)},time:function(){var t=this.imgs[this.res][7-this.slider].substr(9,6);return t.substr(0,2)+":"+t.substr(2,2)},curImg:function(){return 7-this.slider}},created:function(){var t=this;this.map.on("style.load",function(){for(var e=0;e<t.imgs[140].length;)t.addRadarSource("140",e,t.imgs[140][e++]);for(var e=0;e<t.imgs[280].length;)t.addRadarSource("280",e,t.imgs[280][e++]);t.addRadarLayer("280",0)}),this.map.on("zoom",function(){var e=t.map.getZoom()>7,r=e?"280":"140",i=e?"140":"280";i!=t.res&&(console.log("Zoom event from "+r+" to "+i),t.removeRadarLayer(r,t.curImg),t.addRadarLayer(i,t.curImg),t.res=i)})},methods:{addRadarSource:function(t,e,r){this.map.addSource("radar-"+t+"-"+e,{type:"image",url:"/static/img/"+r,coordinates:this.rasterCoords[t]})},addRadarLayer:function(t,e){this.map.addLayer({id:"radar-"+t+"-"+e,source:"radar-"+t+"-"+e,type:"raster",paint:{"raster-opacity":.85}})},removeRadarLayer:function(t,e){this.map.removeLayer("radar-"+t+"-"+e)}},watch:{slider:function(t,e){this.removeRadarLayer(this.res,7-e),this.addRadarLayer(this.res,7-t)}}}},function(t,e,r){!function(e,r){t.exports=r()}(0,function(){return function(t){function e(i){if(r[i])return r[i].exports;var n=r[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,r,i){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=2)}([function(t,e,r){r(7);var i=r(5)(r(1),r(6),null,null);t.exports=i.exports},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={data:function(){return{flag:!1,size:0,currentValue:0,currentSlider:0,dotWidthVal:"number"==typeof this.dotWidth?this.dotWidth:this.dotSize,dotHeightVal:"number"==typeof this.dotHeight?this.dotHeight:this.dotSize}},props:{width:{type:[Number,String],default:"auto"},height:{type:[Number,String],default:6},data:{type:Array,default:null},dotSize:{type:Number,default:16},dotWidth:{type:Number,required:!1},dotHeight:{type:Number,required:!1},min:{type:Number,default:0},max:{type:Number,default:100},interval:{type:Number,default:1},show:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},piecewise:{type:Boolean,default:!1},tooltip:{type:[String,Boolean],default:"always"},eventType:{type:String,default:"auto"},direction:{type:String,default:"horizontal"},reverse:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},clickable:{type:Boolean,default:!0},speed:{type:Number,default:.5},realTime:{type:Boolean,default:!1},value:{type:[String,Number,Array],default:0},piecewiseLabel:{type:Boolean,default:!1},sliderStyle:[Array,Object],tooltipDir:[Array,String],formatter:[String,Function],piecewiseStyle:Object,piecewiseActiveStyle:Object,processStyle:Object,bgStyle:Object,tooltipStyle:[Array,Object],labelStyle:Object,labelActiveStyle:Object},computed:{flowDirection:function(){return"vue-slider-"+this.direction+(this.reverse?"-reverse":"")},tooltipDirection:function(){var t=this.tooltipDir||("vertical"===this.direction?"left":"top");return Array.isArray(t)?this.isRange?t:t[1]:this.isRange?[t,t]:t},tooltipStatus:function(){return"hover"===this.tooltip&&this.flag?"vue-slider-always":this.tooltip?"vue-slider-"+this.tooltip:""},tooltipClass:function(){return["vue-slider-tooltip-"+this.tooltipDirection,"vue-slider-tooltip"]},isDisabled:function(){return"none"===this.eventType||this.disabled},disabledClass:function(){return this.disabled?"vue-slider-disabled":""},isRange:function(){return Array.isArray(this.value)},slider:function(){return this.isRange?[this.$refs.dot0,this.$refs.dot1]:this.$refs.dot},minimum:function(){return this.data?0:this.min},val:{get:function(){return this.data?this.isRange?[this.data[this.currentValue[0]],this.data[this.currentValue[1]]]:this.data[this.currentValue]:this.currentValue},set:function(t){if(this.data)if(this.isRange){var e=this.data.indexOf(t[0]),r=this.data.indexOf(t[1]);e>-1&&r>-1&&(this.currentValue=[e,r])}else{var i=this.data.indexOf(t);i>-1&&(this.currentValue=i)}else this.currentValue=t}},currentIndex:function(){return this.isRange?this.data?this.currentValue:[(this.currentValue[0]-this.minimum)/this.spacing,(this.currentValue[1]-this.minimum)/this.spacing]:(this.currentValue-this.minimum)/this.spacing},indexRange:function(){return this.isRange?this.currentIndex:[0,this.currentIndex]},maximum:function(){return this.data?this.data.length-1:this.max},multiple:function(){var t=(""+this.interval).split(".")[1];return t?Math.pow(10,t.length):1},spacing:function(){return this.data?1:this.interval},total:function(){return this.data?this.data.length-1:(~~((this.maximum-this.minimum)*this.multiple)%(this.interval*this.multiple)!=0&&console.error("[Vue-slider warn]: Prop[interval] is illegal, Please make sure that the interval can be divisible"),(this.maximum-this.minimum)/this.interval)},gap:function(){return this.size/this.total},position:function(){return this.isRange?[(this.currentValue[0]-this.minimum)/this.spacing*this.gap,(this.currentValue[1]-this.minimum)/this.spacing*this.gap]:(this.currentValue-this.minimum)/this.spacing*this.gap},limit:function(){return this.isRange?[[0,this.position[1]],[this.position[0],this.size]]:[0,this.size]},valueLimit:function(){return this.isRange?[[this.minimum,this.currentValue[1]],[this.currentValue[0],this.maximum]]:[this.minimum,this.maximum]},wrapStyles:function(){return"vertical"===this.direction?{height:"number"==typeof this.height?this.height+"px":this.height,padding:this.dotHeightVal/2+"px "+this.dotWidthVal/2+"px"}:{width:"number"==typeof this.width?this.width+"px":this.width,padding:this.dotHeightVal/2+"px "+this.dotWidthVal/2+"px"}},sliderStyles:function(){return Array.isArray(this.sliderStyle)?this.isRange?this.sliderStyle:this.sliderStyle[1]:this.isRange?[this.sliderStyle,this.sliderStyle]:this.sliderStyle},tooltipStyles:function(){return Array.isArray(this.tooltipStyle)?this.isRange?this.tooltipStyle:this.tooltipStyle[1]:this.isRange?[this.tooltipStyle,this.tooltipStyle]:this.tooltipStyle},elemStyles:function(){return"vertical"===this.direction?{width:this.width+"px",height:"100%"}:{height:this.height+"px"}},dotStyles:function(){return"vertical"===this.direction?{width:this.dotWidthVal+"px",height:this.dotHeightVal+"px",left:-(this.dotWidthVal-this.width)/2+"px"}:{width:this.dotWidthVal+"px",height:this.dotHeightVal+"px",top:-(this.dotHeightVal-this.height)/2+"px"}},piecewiseDotStyle:function(){return"vertical"===this.direction?{width:this.width+"px",height:this.width+"px"}:{width:this.height+"px",height:this.height+"px"}},piecewiseDotWrap:function(){if(!this.piecewise&&!this.piecewiseLabel)return!1;for(var t=[],e=0;e<=this.total;e++){var r="vertical"===this.direction?{bottom:this.gap*e-this.width/2+"px",left:0}:{left:this.gap*e-this.height/2+"px",top:0},i=this.reverse?this.total-e:e,n=this.data?this.data[i]:this.spacing*i+this.min;t.push({style:r,label:this.formatter?this.formatting(n):n,inRange:i>=this.indexRange[0]&&i<=this.indexRange[1]})}return t}},watch:{value:function(t){this.flag||this.setValue(t,!0)},max:function(t){var e=this.limitValue(this.val);!1!==e&&this.setValue(e),this.refresh()},min:function(t){var e=this.limitValue(this.val);!1!==e&&this.setValue(e),this.refresh()},show:function(t){var e=this;t&&!this.size&&this.$nextTick(function(){e.refresh()})}},methods:{bindEvents:function(){document.addEventListener("touchmove",this.moving,{passive:!1}),document.addEventListener("touchend",this.moveEnd,{passive:!1}),document.addEventListener("mousemove",this.moving),document.addEventListener("mouseup",this.moveEnd),document.addEventListener("mouseleave",this.moveEnd),window.addEventListener("resize",this.refresh)},unbindEvents:function(){window.removeEventListener("resize",this.refresh),document.removeEventListener("touchmove",this.moving),document.removeEventListener("touchend",this.moveEnd),document.removeEventListener("mousemove",this.moving),document.removeEventListener("mouseup",this.moveEnd),document.removeEventListener("mouseleave",this.moveEnd)},formatting:function(t){return"string"==typeof this.formatter?this.formatter.replace(/\{value\}/,t):this.formatter(t)},getPos:function(t){return this.realTime&&this.getStaticData(),"vertical"===this.direction?this.reverse?t.pageY-this.offset:this.size-(t.pageY-this.offset):this.reverse?this.size-(t.clientX-this.offset):t.clientX-this.offset},wrapClick:function(t){if(this.isDisabled||!this.clickable)return!1;var e=this.getPos(t);this.isRange&&(this.currentSlider=e>(this.position[1]-this.position[0])/2+this.position[0]?1:0),this.setValueOnPos(e)},moveStart:function(t){if(this.isDisabled)return!1;this.isRange&&(this.currentSlider=t),this.flag=!0,this.$emit("drag-start",this)},moving:function(t){if(!this.flag)return!1;t.preventDefault(),t.targetTouches&&t.targetTouches[0]&&(t=t.targetTouches[0]),this.setValueOnPos(this.getPos(t),!0)},moveEnd:function(t){if(!this.flag)return!1;this.$emit("drag-end",this),this.lazy&&this.isDiff(this.val,this.value)&&this.syncValue(),this.flag=!1,this.setPosition()},setValueOnPos:function(t,e){var r=this.isRange?this.limit[this.currentSlider]:this.limit,i=this.isRange?this.valueLimit[this.currentSlider]:this.valueLimit;if(t>=r[0]&&t<=r[1]){this.setTransform(t);var n=(Math.round(t/this.gap)*(this.spacing*this.multiple)+this.minimum*this.multiple)/this.multiple;this.setCurrentValue(n,e)}else t<r[0]?(this.setTransform(r[0]),this.setCurrentValue(i[0]),1===this.currentSlider&&(this.currentSlider=0)):(this.setTransform(r[1]),this.setCurrentValue(i[1]),0===this.currentSlider&&(this.currentSlider=1))},isDiff:function(t,e){return Object.prototype.toString.call(t)!==Object.prototype.toString.call(e)||(Array.isArray(t)&&t.length===e.length?t.some(function(t,r){return t!==e[r]}):t!==e)},setCurrentValue:function(t,e){if(t<this.minimum||t>this.maximum)return!1;this.isRange?this.isDiff(this.currentValue[this.currentSlider],t)&&(this.currentValue.splice(this.currentSlider,1,t),this.lazy&&this.flag||this.syncValue()):this.isDiff(this.currentValue,t)&&(this.currentValue=t,this.lazy&&this.flag||this.syncValue()),e||this.setPosition()},setIndex:function(t){if(Array.isArray(t)&&this.isRange){var e=void 0;e=this.data?[this.data[t[0]],this.data[t[1]]]:[this.spacing*t[0]+this.minimum,this.spacing*t[1]+this.minimum],this.setValue(e)}else t=this.spacing*t+this.minimum,this.isRange&&(this.currentSlider=t>(this.currentValue[1]-this.currentValue[0])/2+this.currentValue[0]?1:0),this.setCurrentValue(t)},setValue:function(t,e,r){var i=this;if(this.isDiff(this.val,t)){var n=this.limitValue(t);this.val=!1!==n?this.isRange?n.concat():n:this.isRange?t.concat():t,this.syncValue(e)}this.$nextTick(function(){return i.setPosition(r)})},setPosition:function(t){this.flag||this.setTransitionTime(void 0===t?this.speed:t),this.isRange?(this.currentSlider=0,this.setTransform(this.position[this.currentSlider]),this.currentSlider=1,this.setTransform(this.position[this.currentSlider])):this.setTransform(this.position),this.flag||this.setTransitionTime(0)},setTransform:function(t){var e=("vertical"===this.direction?this.dotHeightVal/2-t:t-this.dotWidthVal/2)*(this.reverse?-1:1),r="vertical"===this.direction?"translateY("+e+"px)":"translateX("+e+"px)",i=(0===this.currentSlider?this.position[1]-t:t-this.position[0])+"px",n=(0===this.currentSlider?t:this.position[0])+"px";this.isRange?(this.slider[this.currentSlider].style.transform=r,this.slider[this.currentSlider].style.WebkitTransform=r,this.slider[this.currentSlider].style.msTransform=r,"vertical"===this.direction?(this.$refs.process.style.height=i,this.$refs.process.style[this.reverse?"top":"bottom"]=n):(this.$refs.process.style.width=i,this.$refs.process.style[this.reverse?"right":"left"]=n)):(this.slider.style.transform=r,this.slider.style.WebkitTransform=r,this.slider.style.msTransform=r,"vertical"===this.direction?(this.$refs.process.style.height=t+"px",this.$refs.process.style[this.reverse?"top":"bottom"]=0):(this.$refs.process.style.width=t+"px",this.$refs.process.style[this.reverse?"right":"left"]=0))},setTransitionTime:function(t){if(t||this.$refs.process.offsetWidth,this.isRange){for(var e=0;e<this.slider.length;e++)this.slider[e].style.transitionDuration=t+"s",this.slider[e].style.WebkitTransitionDuration=t+"s";this.$refs.process.style.transitionDuration=t+"s",this.$refs.process.style.WebkitTransitionDuration=t+"s"}else this.slider.style.transitionDuration=t+"s",this.slider.style.WebkitTransitionDuration=t+"s",this.$refs.process.style.transitionDuration=t+"s",this.$refs.process.style.WebkitTransitionDuration=t+"s"},limitValue:function(t){var e=this;if(this.data)return t;var r=!1;return this.isRange?t=t.map(function(t){return t<e.min?(r=!0,e.min):t>e.max?(r=!0,e.max):t}):t>this.max?(r=!0,t=this.max):t<this.min&&(r=!0,t=this.min),r&&t},syncValue:function(t){t||this.$emit("callback",this.val),this.$emit("input",this.isRange?this.val.concat():this.val)},getValue:function(){return this.val},getIndex:function(){return this.currentIndex},getStaticData:function(){this.$refs.elem&&(this.size="vertical"===this.direction?this.$refs.elem.offsetHeight:this.$refs.elem.offsetWidth,this.offset="vertical"===this.direction?this.$refs.elem.getBoundingClientRect().top+window.pageYOffset||document.documentElement.scrollTop:this.$refs.elem.getBoundingClientRect().left)},refresh:function(){this.$refs.elem&&(this.getStaticData(),this.setPosition())}},mounted:function(){var t=this;"undefined"!=typeof window&&"undefined"!=typeof document&&this.$nextTick(function(){t.getStaticData(),t.setValue(t.value,!0,0),t.bindEvents()})},beforeDestroy:function(){this.unbindEvents()}}},function(t,e,r){"use strict";var i=r(0);t.exports=i},function(t,e,r){e=t.exports=r(4)(),e.push([t.i,'.vue-slider-component{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vue-slider-component.vue-slider-disabled{opacity:.5;cursor:not-allowed}.vue-slider-component.vue-slider-has-label{margin-bottom:15px}.vue-slider-component.vue-slider-disabled .vue-slider-dot{cursor:not-allowed}.vue-slider-component .vue-slider{position:relative;display:block;border-radius:15px;background-color:#ccc}.vue-slider-component .vue-slider:after{content:"";position:absolute;left:0;top:0;width:100%;height:100%;z-index:2}.vue-slider-component .vue-slider-process{position:absolute;border-radius:15px;background-color:#3498db;-webkit-transition:all 0s;transition:all 0s;z-index:1}.vue-slider-component.vue-slider-horizontal .vue-slider-process{width:0;height:100%;top:0;left:0;will-change:width}.vue-slider-component.vue-slider-vertical .vue-slider-process{width:100%;height:0;bottom:0;left:0;will-change:height}.vue-slider-component.vue-slider-horizontal-reverse .vue-slider-process{width:0;height:100%;top:0;right:0}.vue-slider-component.vue-slider-vertical-reverse .vue-slider-process{width:100%;height:0;top:0;left:0}.vue-slider-component .vue-slider-dot{position:absolute;border-radius:50%;background-color:#fff;-webkit-box-shadow:.5px .5px 2px 1px rgba(0,0,0,.32);box-shadow:.5px .5px 2px 1px rgba(0,0,0,.32);-webkit-transition:all 0s;transition:all 0s;will-change:transform;cursor:pointer;z-index:3}.vue-slider-component.vue-slider-horizontal .vue-slider-dot{left:0}.vue-slider-component.vue-slider-vertical .vue-slider-dot{bottom:0}.vue-slider-component.vue-slider-horizontal-reverse .vue-slider-dot{right:0}.vue-slider-component.vue-slider-vertical-reverse .vue-slider-dot{top:0}.vue-slider-component .vue-slider-tooltip-wrap{display:none;position:absolute;z-index:9}.vue-slider-component .vue-slider-tooltip{display:block;font-size:14px;white-space:nowrap;padding:2px 5px;min-width:20px;text-align:center;color:#fff;border-radius:5px;border:1px solid #3498db;background-color:#3498db}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-top{top:-9px;left:50%;-webkit-transform:translate(-50%,-100%);transform:translate(-50%,-100%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-bottom{bottom:-9px;left:50%;-webkit-transform:translate(-50%,100%);transform:translate(-50%,100%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-left{top:50%;left:-9px;-webkit-transform:translate(-100%,-50%);transform:translate(-100%,-50%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-right{top:50%;right:-9px;-webkit-transform:translate(100%,-50%);transform:translate(100%,-50%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-top .vue-slider-tooltip:before{content:"";position:absolute;bottom:-10px;left:50%;width:0;height:0;border:5px solid transparent;border:6px solid transparent\\0;border-top-color:inherit;-webkit-transform:translate(-50%);transform:translate(-50%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-bottom .vue-slider-tooltip:before{content:"";position:absolute;top:-10px;left:50%;width:0;height:0;border:5px solid transparent;border:6px solid transparent\\0;border-bottom-color:inherit;-webkit-transform:translate(-50%);transform:translate(-50%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-left .vue-slider-tooltip:before{content:"";position:absolute;top:50%;right:-10px;width:0;height:0;border:5px solid transparent;border:6px solid transparent\\0;border-left-color:inherit;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-right .vue-slider-tooltip:before{content:"";position:absolute;top:50%;left:-10px;width:0;height:0;border:5px solid transparent;border:6px solid transparent\\0;border-right-color:inherit;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.vue-slider-component .vue-slider-dot.vue-slider-hover:hover .vue-slider-tooltip-wrap{display:block}.vue-slider-component .vue-slider-dot.vue-slider-always .vue-slider-tooltip-wrap{display:block!important}.vue-slider-component .vue-slider-piecewise{position:absolute;width:100%;padding:0;margin:0;left:0;top:0;height:100%;list-style:none}.vue-slider-component .vue-slider-piecewise-item{position:absolute;width:8px;height:8px}.vue-slider-component .vue-slider-piecewise-dot{position:absolute;left:50%;top:50%;width:100%;height:100%;display:inline-block;background-color:rgba(0,0,0,.16);border-radius:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:2;-webkit-transition:all .3s;transition:all .3s}.vue-slider-component .vue-slider-piecewise-item:first-child .vue-slider-piecewise-dot,.vue-slider-component .vue-slider-piecewise-item:last-child .vue-slider-piecewise-dot{visibility:hidden}.vue-slider-component.vue-slider-horizontal-reverse .vue-slider-piecewise-label,.vue-slider-component.vue-slider-horizontal .vue-slider-piecewise-label{position:absolute;display:inline-block;top:100%;left:50%;white-space:nowrap;font-size:12px;color:#333;-webkit-transform:translate(-50%,8px);transform:translate(-50%,8px);visibility:visible}.vue-slider-component.vue-slider-vertical-reverse .vue-slider-piecewise-label,.vue-slider-component.vue-slider-vertical .vue-slider-piecewise-label{position:absolute;display:inline-block;top:50%;left:100%;white-space:nowrap;font-size:12px;color:#333;-webkit-transform:translate(8px,-50%);transform:translate(8px,-50%);visibility:visible}.vue-slider-component .vue-slider-sr-only{clip:rect(1px,1px,1px,1px);height:1px;width:1px;overflow:hidden;position:absolute!important}',""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var r=this[e];r[2]?t.push("@media "+r[2]+"{"+r[1]+"}"):t.push(r[1])}return t.join("")},t.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},n=0;n<this.length;n++){var o=this[n][0];"number"==typeof o&&(i[o]=!0)}for(n=0;n<e.length;n++){var a=e[n];"number"==typeof a[0]&&i[a[0]]||(r&&!a[2]?a[2]=r:r&&(a[2]="("+a[2]+") and ("+r+")"),t.push(a))}},t}},function(t,e){t.exports=function(t,e,r,i){var n,o=t=t||{},a=typeof t.default;"object"!==a&&"function"!==a||(n=t,o=t.default);var s="function"==typeof o?o.options:o;if(e&&(s.render=e.render,s.staticRenderFns=e.staticRenderFns),r&&(s._scopeId=r),i){var l=Object.create(s.computed||null);Object.keys(i).forEach(function(t){var e=i[t];l[t]=function(){return e}}),s.computed=l}return{esModule:n,exports:o,options:s}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"show"}],ref:"wrap",class:["vue-slider-component",t.flowDirection,t.disabledClass,{"vue-slider-has-label":t.piecewiseLabel}],style:t.wrapStyles,on:{click:t.wrapClick}},[r("div",{ref:"elem",staticClass:"vue-slider",style:[t.elemStyles,t.bgStyle],attrs:{"aria-hidden":"true"}},[t.isRange?[r("div",{ref:"dot0",class:[t.tooltipStatus,"vue-slider-dot"],style:[t.dotStyles,t.sliderStyles[0]],on:{mousedown:function(e){t.moveStart(0)},touchstart:function(e){t.moveStart(0)}}},[r("span",{class:["vue-slider-tooltip-"+t.tooltipDirection[0],"vue-slider-tooltip-wrap"]},[t._t("tooltip",[r("span",{staticClass:"vue-slider-tooltip",style:t.tooltipStyles[0]},[t._v(t._s(t.formatter?t.formatting(t.val[0]):t.val[0]))])],{value:t.val[0],index:0})],2)]),t._v(" "),r("div",{ref:"dot1",class:[t.tooltipStatus,"vue-slider-dot"],style:[t.dotStyles,t.sliderStyles[1]],on:{mousedown:function(e){t.moveStart(1)},touchstart:function(e){t.moveStart(1)}}},[r("span",{class:["vue-slider-tooltip-"+t.tooltipDirection[1],"vue-slider-tooltip-wrap"]},[t._t("tooltip",[r("span",{staticClass:"vue-slider-tooltip",style:t.tooltipStyles[1]},[t._v(t._s(t.formatter?t.formatting(t.val[1]):t.val[1]))])],{value:t.val[1],index:1})],2)])]:[r("div",{ref:"dot",class:[t.tooltipStatus,"vue-slider-dot"],style:[t.dotStyles,t.sliderStyles],on:{mousedown:t.moveStart,touchstart:t.moveStart}},[r("span",{class:["vue-slider-tooltip-"+t.tooltipDirection,"vue-slider-tooltip-wrap"]},[t._t("tooltip",[r("span",{staticClass:"vue-slider-tooltip",style:t.tooltipStyles},[t._v(t._s(t.formatter?t.formatting(t.val):t.val))])],{value:t.val})],2)])],t._v(" "),r("ul",{staticClass:"vue-slider-piecewise"},t._l(t.piecewiseDotWrap,function(e,i){return r("li",{key:i,staticClass:"vue-slider-piecewise-item",style:[t.piecewiseDotStyle,e.style]},[t._t("piecewise",[t.piecewise?r("span",{staticClass:"vue-slider-piecewise-dot",style:[t.piecewiseStyle,e.inRange?t.piecewiseActiveStyle:null]}):t._e()],{label:e.label,index:i,first:0===i,last:i===t.piecewiseDotWrap.length-1}),t._v(" "),t._t("label",[t.piecewiseLabel?r("span",{staticClass:"vue-slider-piecewise-label",style:[t.labelStyle,e.inRange?t.labelActiveStyle:null]},[t._v("\n\t\t\t\t\t\t"+t._s(e.label)+"\n\t\t\t\t\t")]):t._e()],{label:e.label,index:i,first:0===i,last:i===t.piecewiseDotWrap.length-1})],2)})),t._v(" "),r("div",{ref:"process",staticClass:"vue-slider-process",style:t.processStyle})],2),t._v(" "),t.isRange||t.data?t._e():r("input",{directives:[{name:"model",rawName:"v-model",value:t.val,expression:"val"}],staticClass:"vue-slider-sr-only",attrs:{type:"range",min:t.min,max:t.max},domProps:{value:t.val},on:{__r:function(e){t.val=e.target.value}}})])},staticRenderFns:[]}},function(t,e,r){var i=r(3);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals),r(8)("743d98f5",i,!0)},function(t,e,r){function i(t){for(var e=0;e<t.length;e++){var r=t[e],i=c[r.id];if(i){i.refs++;for(var n=0;n<i.parts.length;n++)i.parts[n](r.parts[n]);for(;n<r.parts.length;n++)i.parts.push(o(r.parts[n]));i.parts.length>r.parts.length&&(i.parts.length=r.parts.length)}else{for(var a=[],n=0;n<r.parts.length;n++)a.push(o(r.parts[n]));c[r.id]={id:r.id,refs:1,parts:a}}}}function n(){var t=document.createElement("style");return t.type="text/css",p.appendChild(t),t}function o(t){var e,r,i=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(i){if(d)return m;i.parentNode.removeChild(i)}if(v){var o=f++;i=h||(h=n()),e=a.bind(null,i,o,!1),r=a.bind(null,i,o,!0)}else i=n(),e=s.bind(null,i),r=function(){i.parentNode.removeChild(i)};return e(t),function(i){if(i){if(i.css===t.css&&i.media===t.media&&i.sourceMap===t.sourceMap)return;e(t=i)}else r()}}function a(t,e,r,i){var n=r?"":i.css;if(t.styleSheet)t.styleSheet.cssText=y(e,n);else{var o=document.createTextNode(n),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function s(t,e){var r=e.css,i=e.media,n=e.sourceMap;if(i&&t.setAttribute("media",i),n&&(r+="\n/*# sourceURL="+n.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}var l="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!l)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var u=r(9),c={},p=l&&(document.head||document.getElementsByTagName("head")[0]),h=null,f=0,d=!1,m=function(){},v="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());t.exports=function(t,e,r){d=r;var n=u(t,e);return i(n),function(e){for(var r=[],o=0;o<n.length;o++){var a=n[o],s=c[a.id];s.refs--,r.push(s)}e?(n=u(t,e),i(n)):n=[];for(var o=0;o<r.length;o++){var s=r[o];if(0===s.refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete c[s.id]}}}};var y=function(){var t=[];return function(e,r){return t[e]=r,t.filter(Boolean).join("\n")}}()},function(t,e){t.exports=function(t,e){for(var r=[],i={},n=0;n<e.length;n++){var o=e[n],a=o[0],s=o[1],l=o[2],u=o[3],c={id:t+":"+n,css:s,media:l,sourceMap:u};i[a]?i[a].parts.push(c):r.push(i[a]={id:a,parts:[c]})}return r}}])})},function(t,e,r){"use strict";var i=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{attrs:{id:"geshem"}},[r("div",{attrs:{id:"datetime"}},[r("div",{attrs:{id:"date"}},[t._v(t._s(t.date))]),t._v(" "),r("div",{attrs:{id:"time"}},[t._v(t._s(t.time))])]),t._v(" "),r("div",{attrs:{id:"slider"}},[r("vue-slider",{ref:"slider",attrs:{min:1,max:7,height:20,"dot-size":45,tooltip:!1},model:{value:t.slider,callback:function(e){t.slider=e},expression:"slider"}})],1)])},n=[],o={render:i,staticRenderFns:n};e.a=o}]); +function n(t){return void 0===t||null===t}function i(t){return void 0!==t&&null!==t}function o(t){return!0===t}function a(t){return!1===t}function s(t){return"string"===typeof t||"number"===typeof t||"boolean"===typeof t}function l(t){return null!==t&&"object"===typeof t}function u(t){return"[object Object]"===Qi.call(t)}function c(t){return"[object RegExp]"===Qi.call(t)}function p(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function h(t){return null==t?"":"object"===typeof t?JSON.stringify(t,null,2):String(t)}function f(t){var e=parseFloat(t);return isNaN(e)?t:e}function d(t,e){for(var r=Object.create(null),n=t.split(","),i=0;i<n.length;i++)r[n[i]]=!0;return e?function(t){return r[t.toLowerCase()]}:function(t){return r[t]}}function m(t,e){if(t.length){var r=t.indexOf(e);if(r>-1)return t.splice(r,1)}}function v(t,e){return ro.call(t,e)}function y(t){var e=Object.create(null);return function(r){return e[r]||(e[r]=t(r))}}function g(t,e){function r(r){var n=arguments.length;return n?n>1?t.apply(e,arguments):t.call(e,r):t.call(e)}return r._length=t.length,r}function _(t,e){e=e||0;for(var r=t.length-e,n=new Array(r);r--;)n[r]=t[r+e];return n}function x(t,e){for(var r in e)t[r]=e[r];return t}function b(t){for(var e={},r=0;r<t.length;r++)t[r]&&x(e,t[r]);return e}function w(t,e,r){}function T(t,e){if(t===e)return!0;var r=l(t),n=l(e);if(!r||!n)return!r&&!n&&String(t)===String(e);try{var i=Array.isArray(t),o=Array.isArray(e);if(i&&o)return t.length===e.length&&t.every(function(t,r){return T(t,e[r])});if(i||o)return!1;var a=Object.keys(t),s=Object.keys(e);return a.length===s.length&&a.every(function(r){return T(t[r],e[r])})}catch(t){return!1}}function S(t,e){for(var r=0;r<t.length;r++)if(T(t[r],e))return r;return-1}function z(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}function A(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function C(t,e,r,n){Object.defineProperty(t,e,{value:r,enumerable:!!n,writable:!0,configurable:!0})}function E(t){if(!vo.test(t)){var e=t.split(".");return function(t){for(var r=0;r<e.length;r++){if(!t)return;t=t[e[r]]}return t}}}function k(t){return"function"===typeof t&&/native code/.test(t.toString())}function M(t){Do.target&&Oo.push(Do.target),Do.target=t}function L(){Do.target=Oo.pop()}function I(t){return new Bo(void 0,void 0,void 0,String(t))}function P(t,e){var r=new Bo(t.tag,t.data,t.children,t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return r.ns=t.ns,r.isStatic=t.isStatic,r.key=t.key,r.isComment=t.isComment,r.isCloned=!0,e&&t.children&&(r.children=R(t.children)),r}function R(t,e){for(var r=t.length,n=new Array(r),i=0;i<r;i++)n[i]=P(t[i],e);return n}function D(t,e,r){t.__proto__=e}function O(t,e,r){for(var n=0,i=r.length;n<i;n++){var o=r[n];C(t,o,e[o])}}function B(t,e){if(l(t)&&!(t instanceof Bo)){var r;return v(t,"__ob__")&&t.__ob__ instanceof qo?r=t.__ob__:$o.shouldConvert&&!Mo()&&(Array.isArray(t)||u(t))&&Object.isExtensible(t)&&!t._isVue&&(r=new qo(t)),e&&r&&r.vmCount++,r}}function F(t,e,r,n,i){var o=new Do,a=Object.getOwnPropertyDescriptor(t,e);if(!a||!1!==a.configurable){var s=a&&a.get,l=a&&a.set,u=!i&&B(r);Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){var e=s?s.call(t):r;return Do.target&&(o.depend(),u&&(u.dep.depend(),Array.isArray(e)&&N(e))),e},set:function(e){var n=s?s.call(t):r;e===n||e!==e&&n!==n||(l?l.call(t,e):r=e,u=!i&&B(e),o.notify())}})}}function j(t,e,r){if(Array.isArray(t)&&p(e))return t.length=Math.max(t.length,e),t.splice(e,1,r),r;if(v(t,e))return t[e]=r,r;var n=t.__ob__;return t._isVue||n&&n.vmCount?r:n?(F(n.value,e,r),n.dep.notify(),r):(t[e]=r,r)}function V(t,e){if(Array.isArray(t)&&p(e))return void t.splice(e,1);var r=t.__ob__;t._isVue||r&&r.vmCount||v(t,e)&&(delete t[e],r&&r.dep.notify())}function N(t){for(var e=void 0,r=0,n=t.length;r<n;r++)e=t[r],e&&e.__ob__&&e.__ob__.dep.depend(),Array.isArray(e)&&N(e)}function U(t,e){if(!e)return t;for(var r,n,i,o=Object.keys(e),a=0;a<o.length;a++)r=o[a],n=t[r],i=e[r],v(t,r)?u(n)&&u(i)&&U(n,i):j(t,r,i);return t}function $(t,e,r){return r?t||e?function(){var n="function"===typeof e?e.call(r):e,i="function"===typeof t?t.call(r):t;return n?U(n,i):i}:void 0:e?t?function(){return U("function"===typeof e?e.call(this):e,"function"===typeof t?t.call(this):t)}:e:t}function q(t,e){return e?t?t.concat(e):Array.isArray(e)?e:[e]:t}function Z(t,e,r,n){var i=Object.create(t||null);return e?x(i,e):i}function G(t,e){var r=t.props;if(r){var n,i,o,a={};if(Array.isArray(r))for(n=r.length;n--;)"string"===typeof(i=r[n])&&(o=io(i),a[o]={type:null});else if(u(r))for(var s in r)i=r[s],o=io(s),a[o]=u(i)?i:{type:i};t.props=a}}function W(t,e){var r=t.inject,n=t.inject={};if(Array.isArray(r))for(var i=0;i<r.length;i++)n[r[i]]={from:r[i]};else if(u(r))for(var o in r){var a=r[o];n[o]=u(a)?x({from:o},a):{from:a}}}function H(t){var e=t.directives;if(e)for(var r in e){var n=e[r];"function"===typeof n&&(e[r]={bind:n,update:n})}}function X(t,e,r){function n(n){var i=Zo[n]||Ho;l[n]=i(t[n],e[n],r,n)}"function"===typeof e&&(e=e.options),G(e,r),W(e,r),H(e);var i=e.extends;if(i&&(t=X(t,i,r)),e.mixins)for(var o=0,a=e.mixins.length;o<a;o++)t=X(t,e.mixins[o],r);var s,l={};for(s in t)n(s);for(s in e)v(t,s)||n(s);return l}function K(t,e,r,n){if("string"===typeof r){var i=t[e];if(v(i,r))return i[r];var o=io(r);if(v(i,o))return i[o];var a=oo(o);if(v(i,a))return i[a];return i[r]||i[o]||i[a]}}function J(t,e,r,n){var i=e[t],o=!v(r,t),a=r[t];if(tt(Boolean,i.type)&&(o&&!v(i,"default")?a=!1:tt(String,i.type)||""!==a&&a!==so(t)||(a=!0)),void 0===a){a=Y(n,i,t);var s=$o.shouldConvert;$o.shouldConvert=!0,B(a),$o.shouldConvert=s}return a}function Y(t,e,r){if(v(e,"default")){var n=e.default;return t&&t.$options.propsData&&void 0===t.$options.propsData[r]&&void 0!==t._props[r]?t._props[r]:"function"===typeof n&&"Function"!==Q(e.type)?n.call(t):n}}function Q(t){var e=t&&t.toString().match(/^\s*function (\w+)/);return e?e[1]:""}function tt(t,e){if(!Array.isArray(e))return Q(e)===Q(t);for(var r=0,n=e.length;r<n;r++)if(Q(e[r])===Q(t))return!0;return!1}function et(t,e,r){if(e)for(var n=e;n=n.$parent;){var i=n.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{var a=!1===i[o].call(n,t,e,r);if(a)return}catch(t){rt(t,n,"errorCaptured hook")}}rt(t,e,r)}function rt(t,e,r){if(fo.errorHandler)try{return fo.errorHandler.call(null,t,e,r)}catch(t){nt(t,null,"config.errorHandler")}nt(t,e,r)}function nt(t,e,r){if(!go||"undefined"===typeof console)throw t;console.error(t)}function it(){Ko=!1;var t=Xo.slice(0);Xo.length=0;for(var e=0;e<t.length;e++)t[e]()}function ot(t){return t._withTask||(t._withTask=function(){Jo=!0;var e=t.apply(null,arguments);return Jo=!1,e})}function at(t,e){var r;if(Xo.push(function(){if(t)try{t.call(e)}catch(t){et(t,e,"nextTick")}else r&&r(e)}),Ko||(Ko=!0,Jo?Wo():Go()),!t&&"undefined"!==typeof Promise)return new Promise(function(t){r=t})}function st(t){function e(){var t=arguments,r=e.fns;if(!Array.isArray(r))return r.apply(null,arguments);for(var n=r.slice(),i=0;i<n.length;i++)n[i].apply(null,t)}return e.fns=t,e}function lt(t,e,r,i,o){var a,s,l,u;for(a in t)s=t[a],l=e[a],u=ra(a),n(s)||(n(l)?(n(s.fns)&&(s=t[a]=st(s)),r(u.name,s,u.once,u.capture,u.passive)):s!==l&&(l.fns=s,t[a]=l));for(a in e)n(t[a])&&(u=ra(a),i(u.name,e[a],u.capture))}function ut(t,e,r){function a(){r.apply(this,arguments),m(s.fns,a)}var s,l=t[e];n(l)?s=st([a]):i(l.fns)&&o(l.merged)?(s=l,s.fns.push(a)):s=st([l,a]),s.merged=!0,t[e]=s}function ct(t,e,r){var o=e.options.props;if(!n(o)){var a={},s=t.attrs,l=t.props;if(i(s)||i(l))for(var u in o){var c=so(u);pt(a,l,u,c,!0)||pt(a,s,u,c,!1)}return a}}function pt(t,e,r,n,o){if(i(e)){if(v(e,r))return t[r]=e[r],o||delete e[r],!0;if(v(e,n))return t[r]=e[n],o||delete e[n],!0}return!1}function ht(t){for(var e=0;e<t.length;e++)if(Array.isArray(t[e]))return Array.prototype.concat.apply([],t);return t}function ft(t){return s(t)?[I(t)]:Array.isArray(t)?mt(t):void 0}function dt(t){return i(t)&&i(t.text)&&a(t.isComment)}function mt(t,e){var r,a,l,u,c=[];for(r=0;r<t.length;r++)a=t[r],n(a)||"boolean"===typeof a||(l=c.length-1,u=c[l],Array.isArray(a)?a.length>0&&(a=mt(a,(e||"")+"_"+r),dt(a[0])&&dt(u)&&(c[l]=I(u.text+a[0].text),a.shift()),c.push.apply(c,a)):s(a)?dt(u)?c[l]=I(u.text+a):""!==a&&c.push(I(a)):dt(a)&&dt(u)?c[l]=I(u.text+a.text):(o(t._isVList)&&i(a.tag)&&n(a.key)&&i(e)&&(a.key="__vlist"+e+"_"+r+"__"),c.push(a)));return c}function vt(t,e){return(t.__esModule||Io&&"Module"===t[Symbol.toStringTag])&&(t=t.default),l(t)?e.extend(t):t}function yt(t,e,r,n,i){var o=jo();return o.asyncFactory=t,o.asyncMeta={data:e,context:r,children:n,tag:i},o}function gt(t,e,r){if(o(t.error)&&i(t.errorComp))return t.errorComp;if(i(t.resolved))return t.resolved;if(o(t.loading)&&i(t.loadingComp))return t.loadingComp;if(!i(t.contexts)){var a=t.contexts=[r],s=!0,u=function(){for(var t=0,e=a.length;t<e;t++)a[t].$forceUpdate()},c=z(function(r){t.resolved=vt(r,e),s||u()}),p=z(function(e){i(t.errorComp)&&(t.error=!0,u())}),h=t(c,p);return l(h)&&("function"===typeof h.then?n(t.resolved)&&h.then(c,p):i(h.component)&&"function"===typeof h.component.then&&(h.component.then(c,p),i(h.error)&&(t.errorComp=vt(h.error,e)),i(h.loading)&&(t.loadingComp=vt(h.loading,e),0===h.delay?t.loading=!0:setTimeout(function(){n(t.resolved)&&n(t.error)&&(t.loading=!0,u())},h.delay||200)),i(h.timeout)&&setTimeout(function(){n(t.resolved)&&p(null)},h.timeout))),s=!1,t.loading?t.loadingComp:t.resolved}t.contexts.push(r)}function _t(t){return t.isComment&&t.asyncFactory}function xt(t){if(Array.isArray(t))for(var e=0;e<t.length;e++){var r=t[e];if(i(r)&&(i(r.componentOptions)||_t(r)))return r}}function bt(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&St(t,e)}function wt(t,e,r){r?ea.$once(t,e):ea.$on(t,e)}function Tt(t,e){ea.$off(t,e)}function St(t,e,r){ea=t,lt(e,r||{},wt,Tt,t)}function zt(t,e){var r={};if(!t)return r;for(var n=[],i=0,o=t.length;i<o;i++){var a=t[i],s=a.data;if(s&&s.attrs&&s.attrs.slot&&delete s.attrs.slot,a.context!==e&&a.functionalContext!==e||!s||null==s.slot)n.push(a);else{var l=a.data.slot,u=r[l]||(r[l]=[]);"template"===a.tag?u.push.apply(u,a.children):u.push(a)}}return n.every(At)||(r.default=n),r}function At(t){return t.isComment||" "===t.text}function Ct(t,e){e=e||{};for(var r=0;r<t.length;r++)Array.isArray(t[r])?Ct(t[r],e):e[t[r].key]=t[r].fn;return e}function Et(t){var e=t.$options,r=e.parent;if(r&&!e.abstract){for(;r.$options.abstract&&r.$parent;)r=r.$parent;r.$children.push(t)}t.$parent=r,t.$root=r?r.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}function kt(t,e,r){t.$el=e,t.$options.render||(t.$options.render=jo),Rt(t,"beforeMount");var n;return n=function(){t._update(t._render(),r)},t._watcher=new pa(t,n,w),r=!1,null==t.$vnode&&(t._isMounted=!0,Rt(t,"mounted")),t}function Mt(t,e,r,n,i){var o=!!(i||t.$options._renderChildren||n.data.scopedSlots||t.$scopedSlots!==mo);if(t.$options._parentVnode=n,t.$vnode=n,t._vnode&&(t._vnode.parent=n),t.$options._renderChildren=i,t.$attrs=n.data&&n.data.attrs||mo,t.$listeners=r||mo,e&&t.$options.props){$o.shouldConvert=!1;for(var a=t._props,s=t.$options._propKeys||[],l=0;l<s.length;l++){var u=s[l];a[u]=J(u,t.$options.props,e,t)}$o.shouldConvert=!0,t.$options.propsData=e}if(r){var c=t.$options._parentListeners;t.$options._parentListeners=r,St(t,r,c)}o&&(t.$slots=zt(i,n.context),t.$forceUpdate())}function Lt(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function It(t,e){if(e){if(t._directInactive=!1,Lt(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(var r=0;r<t.$children.length;r++)It(t.$children[r]);Rt(t,"activated")}}function Pt(t,e){if((!e||(t._directInactive=!0,!Lt(t)))&&!t._inactive){t._inactive=!0;for(var r=0;r<t.$children.length;r++)Pt(t.$children[r]);Rt(t,"deactivated")}}function Rt(t,e){var r=t.$options[e];if(r)for(var n=0,i=r.length;n<i;n++)try{r[n].call(t)}catch(r){et(r,t,e+" hook")}t._hasHookEvent&&t.$emit("hook:"+e)}function Dt(){ua=ia.length=oa.length=0,aa={},sa=la=!1}function Ot(){la=!0;var t,e;for(ia.sort(function(t,e){return t.id-e.id}),ua=0;ua<ia.length;ua++)t=ia[ua],e=t.id,aa[e]=null,t.run();var r=oa.slice(),n=ia.slice();Dt(),jt(r),Bt(n),Lo&&fo.devtools&&Lo.emit("flush")}function Bt(t){for(var e=t.length;e--;){var r=t[e],n=r.vm;n._watcher===r&&n._isMounted&&Rt(n,"updated")}}function Ft(t){t._inactive=!1,oa.push(t)}function jt(t){for(var e=0;e<t.length;e++)t[e]._inactive=!0,It(t[e],!0)}function Vt(t){var e=t.id;if(null==aa[e]){if(aa[e]=!0,la){for(var r=ia.length-1;r>ua&&ia[r].id>t.id;)r--;ia.splice(r+1,0,t)}else ia.push(t);sa||(sa=!0,at(Ot))}}function Nt(t){ha.clear(),Ut(t,ha)}function Ut(t,e){var r,n,i=Array.isArray(t);if((i||l(t))&&Object.isExtensible(t)){if(t.__ob__){var o=t.__ob__.dep.id;if(e.has(o))return;e.add(o)}if(i)for(r=t.length;r--;)Ut(t[r],e);else for(n=Object.keys(t),r=n.length;r--;)Ut(t[n[r]],e)}}function $t(t,e,r){fa.get=function(){return this[e][r]},fa.set=function(t){this[e][r]=t},Object.defineProperty(t,r,fa)}function qt(t){t._watchers=[];var e=t.$options;e.props&&Zt(t,e.props),e.methods&&Jt(t,e.methods),e.data?Gt(t):B(t._data={},!0),e.computed&&Ht(t,e.computed),e.watch&&e.watch!==zo&&Yt(t,e.watch)}function Zt(t,e){var r=t.$options.propsData||{},n=t._props={},i=t.$options._propKeys=[],o=!t.$parent;$o.shouldConvert=o;for(var a in e)!function(o){i.push(o);var a=J(o,e,r,t);F(n,o,a),o in t||$t(t,"_props",o)}(a);$o.shouldConvert=!0}function Gt(t){var e=t.$options.data;e=t._data="function"===typeof e?Wt(e,t):e||{},u(e)||(e={});for(var r=Object.keys(e),n=t.$options.props,i=(t.$options.methods,r.length);i--;){var o=r[i];n&&v(n,o)||A(o)||$t(t,"_data",o)}B(e,!0)}function Wt(t,e){try{return t.call(e,e)}catch(t){return et(t,e,"data()"),{}}}function Ht(t,e){var r=t._computedWatchers=Object.create(null),n=Mo();for(var i in e){var o=e[i],a="function"===typeof o?o:o.get;n||(r[i]=new pa(t,a||w,w,da)),i in t||Xt(t,i,o)}}function Xt(t,e,r){var n=!Mo();"function"===typeof r?(fa.get=n?Kt(e):r,fa.set=w):(fa.get=r.get?n&&!1!==r.cache?Kt(e):r.get:w,fa.set=r.set?r.set:w),Object.defineProperty(t,e,fa)}function Kt(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),Do.target&&e.depend(),e.value}}function Jt(t,e){t.$options.props;for(var r in e)t[r]=null==e[r]?w:g(e[r],t)}function Yt(t,e){for(var r in e){var n=e[r];if(Array.isArray(n))for(var i=0;i<n.length;i++)Qt(t,r,n[i]);else Qt(t,r,n)}}function Qt(t,e,r,n){return u(r)&&(n=r,r=r.handler),"string"===typeof r&&(r=t[r]),t.$watch(e,r,n)}function te(t){var e=t.$options.provide;e&&(t._provided="function"===typeof e?e.call(t):e)}function ee(t){var e=re(t.$options.inject,t);e&&($o.shouldConvert=!1,Object.keys(e).forEach(function(r){F(t,r,e[r])}),$o.shouldConvert=!0)}function re(t,e){if(t){for(var r=Object.create(null),n=Io?Reflect.ownKeys(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}):Object.keys(t),i=0;i<n.length;i++){for(var o=n[i],a=t[o].from,s=e;s;){if(s._provided&&a in s._provided){r[o]=s._provided[a];break}s=s.$parent}if(!s&&"default"in t[o]){var l=t[o].default;r[o]="function"===typeof l?l.call(e):l}}return r}}function ne(t,e){var r,n,o,a,s;if(Array.isArray(t)||"string"===typeof t)for(r=new Array(t.length),n=0,o=t.length;n<o;n++)r[n]=e(t[n],n);else if("number"===typeof t)for(r=new Array(t),n=0;n<t;n++)r[n]=e(n+1,n);else if(l(t))for(a=Object.keys(t),r=new Array(a.length),n=0,o=a.length;n<o;n++)s=a[n],r[n]=e(t[s],s,n);return i(r)&&(r._isVList=!0),r}function ie(t,e,r,n){var i=this.$scopedSlots[t];if(i)return r=r||{},n&&(r=x(x({},n),r)),i(r)||e;var o=this.$slots[t];return o||e}function oe(t){return K(this.$options,"filters",t,!0)||uo}function ae(t,e,r,n){var i=fo.keyCodes[e]||r;return i?Array.isArray(i)?-1===i.indexOf(t):i!==t:n?so(n)!==e:void 0}function se(t,e,r,n,i){if(r)if(l(r)){Array.isArray(r)&&(r=b(r));var o;for(var a in r)!function(a){if("class"===a||"style"===a||eo(a))o=t;else{var s=t.attrs&&t.attrs.type;o=n||fo.mustUseProp(e,s,a)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}if(!(a in o)&&(o[a]=r[a],i)){(t.on||(t.on={}))["update:"+a]=function(t){r[a]=t}}}(a)}else;return t}function le(t,e){var r=this.$options.staticRenderFns,n=r.cached||(r.cached=[]),i=n[t];return i&&!e?Array.isArray(i)?R(i):P(i):(i=n[t]=r[t].call(this._renderProxy,null,this),ce(i,"__static__"+t,!1),i)}function ue(t,e,r){return ce(t,"__once__"+e+(r?"_"+r:""),!0),t}function ce(t,e,r){if(Array.isArray(t))for(var n=0;n<t.length;n++)t[n]&&"string"!==typeof t[n]&&pe(t[n],e+"_"+n,r);else pe(t,e,r)}function pe(t,e,r){t.isStatic=!0,t.key=e,t.isOnce=r}function he(t,e){if(e)if(u(e)){var r=t.on=t.on?x({},t.on):{};for(var n in e){var i=r[n],o=e[n];r[n]=i?[].concat(i,o):o}}else;return t}function fe(t){t._o=ue,t._n=f,t._s=h,t._l=ne,t._t=ie,t._q=T,t._i=S,t._m=le,t._f=oe,t._k=ae,t._b=se,t._v=I,t._e=jo,t._u=Ct,t._g=he}function de(t,e,r,n,i){var a=i.options;this.data=t,this.props=e,this.children=r,this.parent=n,this.listeners=t.on||mo,this.injections=re(a.inject,n),this.slots=function(){return zt(r,n)};var s=Object.create(n),l=o(a._compiled),u=!l;l&&(this.$options=a,this.$slots=this.slots(),this.$scopedSlots=t.scopedSlots||mo),a._scopeId?this._c=function(t,e,r,i){var o=we(s,t,e,r,i,u);return o&&(o.functionalScopeId=a._scopeId,o.functionalContext=n),o}:this._c=function(t,e,r,n){return we(s,t,e,r,n,u)}}function me(t,e,r,n,o){var a=t.options,s={},l=a.props;if(i(l))for(var u in l)s[u]=J(u,l,e||mo);else i(r.attrs)&&ve(s,r.attrs),i(r.props)&&ve(s,r.props);var c=new de(r,s,o,n,t),p=a.render.call(null,c._c,c);return p instanceof Bo&&(p.functionalContext=n,p.functionalOptions=a,r.slot&&((p.data||(p.data={})).slot=r.slot)),p}function ve(t,e){for(var r in e)t[io(r)]=e[r]}function ye(t,e,r,a,s){if(!n(t)){var u=r.$options._base;if(l(t)&&(t=u.extend(t)),"function"===typeof t){var c;if(n(t.cid)&&(c=t,void 0===(t=gt(c,u,r))))return yt(c,e,r,a,s);e=e||{},Ce(t),i(e.model)&&be(t.options,e);var p=ct(e,t,s);if(o(t.options.functional))return me(t,p,e,r,a);var h=e.on;if(e.on=e.nativeOn,o(t.options.abstract)){var f=e.slot;e={},f&&(e.slot=f)}_e(e);var d=t.options.name||s;return new Bo("vue-component-"+t.cid+(d?"-"+d:""),e,void 0,void 0,void 0,r,{Ctor:t,propsData:p,listeners:h,tag:s,children:a},c)}}}function ge(t,e,r,n){var o=t.componentOptions,a={_isComponent:!0,parent:e,propsData:o.propsData,_componentTag:o.tag,_parentVnode:t,_parentListeners:o.listeners,_renderChildren:o.children,_parentElm:r||null,_refElm:n||null},s=t.data.inlineTemplate;return i(s)&&(a.render=s.render,a.staticRenderFns=s.staticRenderFns),new o.Ctor(a)}function _e(t){t.hook||(t.hook={});for(var e=0;e<va.length;e++){var r=va[e],n=t.hook[r],i=ma[r];t.hook[r]=n?xe(i,n):i}}function xe(t,e){return function(r,n,i,o){t(r,n,i,o),e(r,n,i,o)}}function be(t,e){var r=t.model&&t.model.prop||"value",n=t.model&&t.model.event||"input";(e.props||(e.props={}))[r]=e.model.value;var o=e.on||(e.on={});i(o[n])?o[n]=[e.model.callback].concat(o[n]):o[n]=e.model.callback}function we(t,e,r,n,i,a){return(Array.isArray(r)||s(r))&&(i=n,n=r,r=void 0),o(a)&&(i=ga),Te(t,e,r,n,i)}function Te(t,e,r,n,o){if(i(r)&&i(r.__ob__))return jo();if(i(r)&&i(r.is)&&(e=r.is),!e)return jo();Array.isArray(n)&&"function"===typeof n[0]&&(r=r||{},r.scopedSlots={default:n[0]},n.length=0),o===ga?n=ft(n):o===ya&&(n=ht(n));var a,s;if("string"===typeof e){var l;s=t.$vnode&&t.$vnode.ns||fo.getTagNamespace(e),a=fo.isReservedTag(e)?new Bo(fo.parsePlatformTagName(e),r,n,void 0,void 0,t):i(l=K(t.$options,"components",e))?ye(l,r,t,n,e):new Bo(e,r,n,void 0,void 0,t)}else a=ye(e,r,t,n);return i(a)?(s&&Se(a,s),a):jo()}function Se(t,e,r){if(t.ns=e,"foreignObject"===t.tag&&(e=void 0,r=!0),i(t.children))for(var a=0,s=t.children.length;a<s;a++){var l=t.children[a];i(l.tag)&&(n(l.ns)||o(r))&&Se(l,e,r)}}function ze(t){t._vnode=null;var e=t.$options,r=t.$vnode=e._parentVnode,n=r&&r.context;t.$slots=zt(e._renderChildren,n),t.$scopedSlots=mo,t._c=function(e,r,n,i){return we(t,e,r,n,i,!1)},t.$createElement=function(e,r,n,i){return we(t,e,r,n,i,!0)};var i=r&&r.data;F(t,"$attrs",i&&i.attrs||mo,null,!0),F(t,"$listeners",e._parentListeners||mo,null,!0)}function Ae(t,e){var r=t.$options=Object.create(t.constructor.options);r.parent=e.parent,r.propsData=e.propsData,r._parentVnode=e._parentVnode,r._parentListeners=e._parentListeners,r._renderChildren=e._renderChildren,r._componentTag=e._componentTag,r._parentElm=e._parentElm,r._refElm=e._refElm,e.render&&(r.render=e.render,r.staticRenderFns=e.staticRenderFns)}function Ce(t){var e=t.options;if(t.super){var r=Ce(t.super);if(r!==t.superOptions){t.superOptions=r;var n=Ee(t);n&&x(t.extendOptions,n),e=t.options=X(r,t.extendOptions),e.name&&(e.components[e.name]=t)}}return e}function Ee(t){var e,r=t.options,n=t.extendOptions,i=t.sealedOptions;for(var o in r)r[o]!==i[o]&&(e||(e={}),e[o]=ke(r[o],n[o],i[o]));return e}function ke(t,e,r){if(Array.isArray(t)){var n=[];r=Array.isArray(r)?r:[r],e=Array.isArray(e)?e:[e];for(var i=0;i<t.length;i++)(e.indexOf(t[i])>=0||r.indexOf(t[i])<0)&&n.push(t[i]);return n}return t}function Me(t){this._init(t)}function Le(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var r=_(arguments,1);return r.unshift(this),"function"===typeof t.install?t.install.apply(t,r):"function"===typeof t&&t.apply(null,r),e.push(t),this}}function Ie(t){t.mixin=function(t){return this.options=X(this.options,t),this}}function Pe(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var r=this,n=r.cid,i=t._Ctor||(t._Ctor={});if(i[n])return i[n];var o=t.name||r.options.name,a=function(t){this._init(t)};return a.prototype=Object.create(r.prototype),a.prototype.constructor=a,a.cid=e++,a.options=X(r.options,t),a.super=r,a.options.props&&Re(a),a.options.computed&&De(a),a.extend=r.extend,a.mixin=r.mixin,a.use=r.use,po.forEach(function(t){a[t]=r[t]}),o&&(a.options.components[o]=a),a.superOptions=r.options,a.extendOptions=t,a.sealedOptions=x({},a.options),i[n]=a,a}}function Re(t){var e=t.options.props;for(var r in e)$t(t.prototype,"_props",r)}function De(t){var e=t.options.computed;for(var r in e)Xt(t.prototype,r,e[r])}function Oe(t){po.forEach(function(e){t[e]=function(t,r){return r?("component"===e&&u(r)&&(r.name=r.name||t,r=this.options._base.extend(r)),"directive"===e&&"function"===typeof r&&(r={bind:r,update:r}),this.options[e+"s"][t]=r,r):this.options[e+"s"][t]}})}function Be(t){return t&&(t.Ctor.options.name||t.tag)}function Fe(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"===typeof t?t.split(",").indexOf(e)>-1:!!c(t)&&t.test(e)}function je(t,e){var r=t.cache,n=t.keys,i=t._vnode;for(var o in r){var a=r[o];if(a){var s=Be(a.componentOptions);s&&!e(s)&&Ve(r,o,n,i)}}}function Ve(t,e,r,n){var i=t[e];i&&i!==n&&i.componentInstance.$destroy(),t[e]=null,m(r,e)}function Ne(t){for(var e=t.data,r=t,n=t;i(n.componentInstance);)n=n.componentInstance._vnode,n.data&&(e=Ue(n.data,e));for(;i(r=r.parent);)r.data&&(e=Ue(e,r.data));return $e(e.staticClass,e.class)}function Ue(t,e){return{staticClass:qe(t.staticClass,e.staticClass),class:i(t.class)?[t.class,e.class]:e.class}}function $e(t,e){return i(t)||i(e)?qe(t,Ze(e)):""}function qe(t,e){return t?e?t+" "+e:t:e||""}function Ze(t){return Array.isArray(t)?Ge(t):l(t)?We(t):"string"===typeof t?t:""}function Ge(t){for(var e,r="",n=0,o=t.length;n<o;n++)i(e=Ze(t[n]))&&""!==e&&(r&&(r+=" "),r+=e);return r}function We(t){var e="";for(var r in t)t[r]&&(e&&(e+=" "),e+=r);return e}function He(t){return $a(t)?"svg":"math"===t?"math":void 0}function Xe(t){if(!go)return!0;if(Za(t))return!1;if(t=t.toLowerCase(),null!=Ga[t])return Ga[t];var e=document.createElement(t);return t.indexOf("-")>-1?Ga[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Ga[t]=/HTMLUnknownElement/.test(e.toString())}function Ke(t){if("string"===typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function Je(t,e){var r=document.createElement(t);return"select"!==t?r:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&r.setAttribute("multiple","multiple"),r)}function Ye(t,e){return document.createElementNS(Na[t],e)}function Qe(t){return document.createTextNode(t)}function tr(t){return document.createComment(t)}function er(t,e,r){t.insertBefore(e,r)}function rr(t,e){t.removeChild(e)}function nr(t,e){t.appendChild(e)}function ir(t){return t.parentNode}function or(t){return t.nextSibling}function ar(t){return t.tagName}function sr(t,e){t.textContent=e}function lr(t,e,r){t.setAttribute(e,r)}function ur(t,e){var r=t.data.ref;if(r){var n=t.context,i=t.componentInstance||t.elm,o=n.$refs;e?Array.isArray(o[r])?m(o[r],i):o[r]===i&&(o[r]=void 0):t.data.refInFor?Array.isArray(o[r])?o[r].indexOf(i)<0&&o[r].push(i):o[r]=[i]:o[r]=i}}function cr(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&i(t.data)===i(e.data)&&pr(t,e)||o(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&n(e.asyncFactory.error))}function pr(t,e){if("input"!==t.tag)return!0;var r,n=i(r=t.data)&&i(r=r.attrs)&&r.type,o=i(r=e.data)&&i(r=r.attrs)&&r.type;return n===o||Wa(n)&&Wa(o)}function hr(t,e,r){var n,o,a={};for(n=e;n<=r;++n)o=t[n].key,i(o)&&(a[o]=n);return a}function fr(t,e){(t.data.directives||e.data.directives)&&dr(t,e)}function dr(t,e){var r,n,i,o=t===Ka,a=e===Ka,s=mr(t.data.directives,t.context),l=mr(e.data.directives,e.context),u=[],c=[];for(r in l)n=s[r],i=l[r],n?(i.oldValue=n.value,yr(i,"update",e,t),i.def&&i.def.componentUpdated&&c.push(i)):(yr(i,"bind",e,t),i.def&&i.def.inserted&&u.push(i));if(u.length){var p=function(){for(var r=0;r<u.length;r++)yr(u[r],"inserted",e,t)};o?ut(e.data.hook||(e.data.hook={}),"insert",p):p()}if(c.length&&ut(e.data.hook||(e.data.hook={}),"postpatch",function(){for(var r=0;r<c.length;r++)yr(c[r],"componentUpdated",e,t)}),!o)for(r in s)l[r]||yr(s[r],"unbind",t,t,a)}function mr(t,e){var r=Object.create(null);if(!t)return r;var n,i;for(n=0;n<t.length;n++)i=t[n],i.modifiers||(i.modifiers=Qa),r[vr(i)]=i,i.def=K(e.$options,"directives",i.name,!0);return r}function vr(t){return t.rawName||t.name+"."+Object.keys(t.modifiers||{}).join(".")}function yr(t,e,r,n,i){var o=t.def&&t.def[e];if(o)try{o(r.elm,t,r,n,i)}catch(n){et(n,r.context,"directive "+t.name+" "+e+" hook")}}function gr(t,e){var r=e.componentOptions;if((!i(r)||!1!==r.Ctor.options.inheritAttrs)&&(!n(t.data.attrs)||!n(e.data.attrs))){var o,a,s=e.elm,l=t.data.attrs||{},u=e.data.attrs||{};i(u.__ob__)&&(u=e.data.attrs=x({},u));for(o in u)a=u[o],l[o]!==a&&_r(s,o,a);(bo||wo)&&u.value!==l.value&&_r(s,"value",u.value);for(o in l)n(u[o])&&(Fa(o)?s.removeAttributeNS(Ba,ja(o)):Da(o)||s.removeAttribute(o))}}function _r(t,e,r){Oa(e)?Va(r)?t.removeAttribute(e):(r="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,r)):Da(e)?t.setAttribute(e,Va(r)||"false"===r?"false":"true"):Fa(e)?Va(r)?t.removeAttributeNS(Ba,ja(e)):t.setAttributeNS(Ba,e,r):Va(r)?t.removeAttribute(e):t.setAttribute(e,r)}function xr(t,e){var r=e.elm,o=e.data,a=t.data;if(!(n(o.staticClass)&&n(o.class)&&(n(a)||n(a.staticClass)&&n(a.class)))){var s=Ne(e),l=r._transitionClasses;i(l)&&(s=qe(s,Ze(l))),s!==r._prevClass&&(r.setAttribute("class",s),r._prevClass=s)}}function br(t){function e(){(a||(a=[])).push(t.slice(d,i).trim()),d=i+1}var r,n,i,o,a,s=!1,l=!1,u=!1,c=!1,p=0,h=0,f=0,d=0;for(i=0;i<t.length;i++)if(n=r,r=t.charCodeAt(i),s)39===r&&92!==n&&(s=!1);else if(l)34===r&&92!==n&&(l=!1);else if(u)96===r&&92!==n&&(u=!1);else if(c)47===r&&92!==n&&(c=!1);else if(124!==r||124===t.charCodeAt(i+1)||124===t.charCodeAt(i-1)||p||h||f){switch(r){case 34:l=!0;break;case 39:s=!0;break;case 96:u=!0;break;case 40:f++;break;case 41:f--;break;case 91:h++;break;case 93:h--;break;case 123:p++;break;case 125:p--}if(47===r){for(var m=i-1,v=void 0;m>=0&&" "===(v=t.charAt(m));m--);v&&ns.test(v)||(c=!0)}}else void 0===o?(d=i+1,o=t.slice(0,i).trim()):e();if(void 0===o?o=t.slice(0,i).trim():0!==d&&e(),a)for(i=0;i<a.length;i++)o=wr(o,a[i]);return o}function wr(t,e){var r=e.indexOf("(");return r<0?'_f("'+e+'")('+t+")":'_f("'+e.slice(0,r)+'")('+t+","+e.slice(r+1)}function Tr(t){console.error("[Vue compiler]: "+t)}function Sr(t,e){return t?t.map(function(t){return t[e]}).filter(function(t){return t}):[]}function zr(t,e,r){(t.props||(t.props=[])).push({name:e,value:r})}function Ar(t,e,r){(t.attrs||(t.attrs=[])).push({name:e,value:r})}function Cr(t,e,r,n,i,o){(t.directives||(t.directives=[])).push({name:e,rawName:r,value:n,arg:i,modifiers:o})}function Er(t,e,r,n,i,o){n&&n.capture&&(delete n.capture,e="!"+e),n&&n.once&&(delete n.once,e="~"+e),n&&n.passive&&(delete n.passive,e="&"+e);var a;n&&n.native?(delete n.native,a=t.nativeEvents||(t.nativeEvents={})):a=t.events||(t.events={});var s={value:r,modifiers:n},l=a[e];Array.isArray(l)?i?l.unshift(s):l.push(s):a[e]=l?i?[s,l]:[l,s]:s}function kr(t,e,r){var n=Mr(t,":"+e)||Mr(t,"v-bind:"+e);if(null!=n)return br(n);if(!1!==r){var i=Mr(t,e);if(null!=i)return JSON.stringify(i)}}function Mr(t,e,r){var n;if(null!=(n=t.attrsMap[e]))for(var i=t.attrsList,o=0,a=i.length;o<a;o++)if(i[o].name===e){i.splice(o,1);break}return r&&delete t.attrsMap[e],n}function Lr(t,e,r){var n=r||{},i=n.number,o=n.trim,a="$$v";o&&(a="(typeof $$v === 'string'? $$v.trim(): $$v)"),i&&(a="_n("+a+")");var s=Ir(e,a);t.model={value:"("+e+")",expression:'"'+e+'"',callback:"function ($$v) {"+s+"}"}}function Ir(t,e){var r=Pr(t);return null===r.key?t+"="+e:"$set("+r.exp+", "+r.key+", "+e+")"}function Pr(t){if(Ta=t.length,t.indexOf("[")<0||t.lastIndexOf("]")<Ta-1)return Aa=t.lastIndexOf("."),Aa>-1?{exp:t.slice(0,Aa),key:'"'+t.slice(Aa+1)+'"'}:{exp:t,key:null};for(Sa=t,Aa=Ca=Ea=0;!Dr();)za=Rr(),Or(za)?Fr(za):91===za&&Br(za);return{exp:t.slice(0,Ca),key:t.slice(Ca+1,Ea)}}function Rr(){return Sa.charCodeAt(++Aa)}function Dr(){return Aa>=Ta}function Or(t){return 34===t||39===t}function Br(t){var e=1;for(Ca=Aa;!Dr();)if(t=Rr(),Or(t))Fr(t);else if(91===t&&e++,93===t&&e--,0===e){Ea=Aa;break}}function Fr(t){for(var e=t;!Dr()&&(t=Rr())!==e;);}function jr(t,e,r){ka=r;var n=e.value,i=e.modifiers,o=t.tag,a=t.attrsMap.type;if(t.component)return Lr(t,n,i),!1;if("select"===o)Ur(t,n,i);else if("input"===o&&"checkbox"===a)Vr(t,n,i);else if("input"===o&&"radio"===a)Nr(t,n,i);else if("input"===o||"textarea"===o)$r(t,n,i);else if(!fo.isReservedTag(o))return Lr(t,n,i),!1;return!0}function Vr(t,e,r){var n=r&&r.number,i=kr(t,"value")||"null",o=kr(t,"true-value")||"true",a=kr(t,"false-value")||"false";zr(t,"checked","Array.isArray("+e+")?_i("+e+","+i+")>-1"+("true"===o?":("+e+")":":_q("+e+","+o+")")),Er(t,"change","var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(n?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+e+"=$$a.concat([$$v]))}else{$$i>-1&&("+e+"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{"+Ir(e,"$$c")+"}",null,!0)}function Nr(t,e,r){var n=r&&r.number,i=kr(t,"value")||"null";i=n?"_n("+i+")":i,zr(t,"checked","_q("+e+","+i+")"),Er(t,"change",Ir(e,i),null,!0)}function Ur(t,e,r){var n=r&&r.number,i='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(n?"_n(val)":"val")+"})",o="var $$selectedVal = "+i+";";o=o+" "+Ir(e,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),Er(t,"change",o,null,!0)}function $r(t,e,r){var n=t.attrsMap.type,i=r||{},o=i.lazy,a=i.number,s=i.trim,l=!o&&"range"!==n,u=o?"change":"range"===n?is:"input",c="$event.target.value";s&&(c="$event.target.value.trim()"),a&&(c="_n("+c+")");var p=Ir(e,c);l&&(p="if($event.target.composing)return;"+p),zr(t,"value","("+e+")"),Er(t,u,p,null,!0),(s||a)&&Er(t,"blur","$forceUpdate()")}function qr(t){if(i(t[is])){var e=xo?"change":"input";t[e]=[].concat(t[is],t[e]||[]),delete t[is]}i(t[os])&&(t.change=[].concat(t[os],t.change||[]),delete t[os])}function Zr(t,e,r){var n=Ma;return function i(){null!==t.apply(null,arguments)&&Wr(e,i,r,n)}}function Gr(t,e,r,n,i){e=ot(e),r&&(e=Zr(e,t,n)),Ma.addEventListener(t,e,Ao?{capture:n,passive:i}:n)}function Wr(t,e,r,n){(n||Ma).removeEventListener(t,e._withTask||e,r)}function Hr(t,e){if(!n(t.data.on)||!n(e.data.on)){var r=e.data.on||{},i=t.data.on||{};Ma=e.elm,qr(r),lt(r,i,Gr,Wr,e.context)}}function Xr(t,e){if(!n(t.data.domProps)||!n(e.data.domProps)){var r,o,a=e.elm,s=t.data.domProps||{},l=e.data.domProps||{};i(l.__ob__)&&(l=e.data.domProps=x({},l));for(r in s)n(l[r])&&(a[r]="");for(r in l){if(o=l[r],"textContent"===r||"innerHTML"===r){if(e.children&&(e.children.length=0),o===s[r])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===r){a._value=o;var u=n(o)?"":String(o);Kr(a,u)&&(a.value=u)}else a[r]=o}}}function Kr(t,e){return!t.composing&&("OPTION"===t.tagName||Jr(t,e)||Yr(t,e))}function Jr(t,e){var r=!0;try{r=document.activeElement!==t}catch(t){}return r&&t.value!==e}function Yr(t,e){var r=t.value,n=t._vModifiers;return i(n)&&n.number?f(r)!==f(e):i(n)&&n.trim?r.trim()!==e.trim():r!==e}function Qr(t){var e=tn(t.style);return t.staticStyle?x(t.staticStyle,e):e}function tn(t){return Array.isArray(t)?b(t):"string"===typeof t?ls(t):t}function en(t,e){var r,n={};if(e)for(var i=t;i.componentInstance;)i=i.componentInstance._vnode,i.data&&(r=Qr(i.data))&&x(n,r);(r=Qr(t.data))&&x(n,r);for(var o=t;o=o.parent;)o.data&&(r=Qr(o.data))&&x(n,r);return n}function rn(t,e){var r=e.data,o=t.data;if(!(n(r.staticStyle)&&n(r.style)&&n(o.staticStyle)&&n(o.style))){var a,s,l=e.elm,u=o.staticStyle,c=o.normalizedStyle||o.style||{},p=u||c,h=tn(e.data.style)||{};e.data.normalizedStyle=i(h.__ob__)?x({},h):h;var f=en(e,!0);for(s in p)n(f[s])&&ps(l,s,"");for(s in f)(a=f[s])!==p[s]&&ps(l,s,null==a?"":a)}}function nn(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var r=" "+(t.getAttribute("class")||"")+" ";r.indexOf(" "+e+" ")<0&&t.setAttribute("class",(r+e).trim())}}function on(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var r=" "+(t.getAttribute("class")||"")+" ",n=" "+e+" ";r.indexOf(n)>=0;)r=r.replace(n," ");r=r.trim(),r?t.setAttribute("class",r):t.removeAttribute("class")}}function an(t){if(t){if("object"===typeof t){var e={};return!1!==t.css&&x(e,ms(t.name||"v")),x(e,t),e}return"string"===typeof t?ms(t):void 0}}function sn(t){Ts(function(){Ts(t)})}function ln(t,e){var r=t._transitionClasses||(t._transitionClasses=[]);r.indexOf(e)<0&&(r.push(e),nn(t,e))}function un(t,e){t._transitionClasses&&m(t._transitionClasses,e),on(t,e)}function cn(t,e,r){var n=pn(t,e),i=n.type,o=n.timeout,a=n.propCount;if(!i)return r();var s=i===ys?xs:ws,l=0,u=function(){t.removeEventListener(s,c),r()},c=function(e){e.target===t&&++l>=a&&u()};setTimeout(function(){l<a&&u()},o+1),t.addEventListener(s,c)}function pn(t,e){var r,n=window.getComputedStyle(t),i=n[_s+"Delay"].split(", "),o=n[_s+"Duration"].split(", "),a=hn(i,o),s=n[bs+"Delay"].split(", "),l=n[bs+"Duration"].split(", "),u=hn(s,l),c=0,p=0;return e===ys?a>0&&(r=ys,c=a,p=o.length):e===gs?u>0&&(r=gs,c=u,p=l.length):(c=Math.max(a,u),r=c>0?a>u?ys:gs:null,p=r?r===ys?o.length:l.length:0),{type:r,timeout:c,propCount:p,hasTransform:r===ys&&Ss.test(n[_s+"Property"])}}function hn(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(null,e.map(function(e,r){return fn(e)+fn(t[r])}))}function fn(t){return 1e3*Number(t.slice(0,-1))}function dn(t,e){var r=t.elm;i(r._leaveCb)&&(r._leaveCb.cancelled=!0,r._leaveCb());var o=an(t.data.transition);if(!n(o)&&!i(r._enterCb)&&1===r.nodeType){for(var a=o.css,s=o.type,u=o.enterClass,c=o.enterToClass,p=o.enterActiveClass,h=o.appearClass,d=o.appearToClass,m=o.appearActiveClass,v=o.beforeEnter,y=o.enter,g=o.afterEnter,_=o.enterCancelled,x=o.beforeAppear,b=o.appear,w=o.afterAppear,T=o.appearCancelled,S=o.duration,A=na,C=na.$vnode;C&&C.parent;)C=C.parent,A=C.context;var E=!A._isMounted||!t.isRootInsert;if(!E||b||""===b){var k=E&&h?h:u,M=E&&m?m:p,L=E&&d?d:c,I=E?x||v:v,P=E&&"function"===typeof b?b:y,R=E?w||g:g,D=E?T||_:_,O=f(l(S)?S.enter:S),B=!1!==a&&!bo,F=yn(P),j=r._enterCb=z(function(){B&&(un(r,L),un(r,M)),j.cancelled?(B&&un(r,k),D&&D(r)):R&&R(r),r._enterCb=null});t.data.show||ut(t.data.hook||(t.data.hook={}),"insert",function(){var e=r.parentNode,n=e&&e._pending&&e._pending[t.key];n&&n.tag===t.tag&&n.elm._leaveCb&&n.elm._leaveCb(),P&&P(r,j)}),I&&I(r),B&&(ln(r,k),ln(r,M),sn(function(){ln(r,L),un(r,k),j.cancelled||F||(vn(O)?setTimeout(j,O):cn(r,s,j))})),t.data.show&&(e&&e(),P&&P(r,j)),B||F||j()}}}function mn(t,e){function r(){T.cancelled||(t.data.show||((o.parentNode._pending||(o.parentNode._pending={}))[t.key]=t),d&&d(o),x&&(ln(o,c),ln(o,h),sn(function(){ln(o,p),un(o,c),T.cancelled||b||(vn(w)?setTimeout(T,w):cn(o,u,T))})),m&&m(o,T),x||b||T())}var o=t.elm;i(o._enterCb)&&(o._enterCb.cancelled=!0,o._enterCb());var a=an(t.data.transition);if(n(a))return e();if(!i(o._leaveCb)&&1===o.nodeType){var s=a.css,u=a.type,c=a.leaveClass,p=a.leaveToClass,h=a.leaveActiveClass,d=a.beforeLeave,m=a.leave,v=a.afterLeave,y=a.leaveCancelled,g=a.delayLeave,_=a.duration,x=!1!==s&&!bo,b=yn(m),w=f(l(_)?_.leave:_),T=o._leaveCb=z(function(){o.parentNode&&o.parentNode._pending&&(o.parentNode._pending[t.key]=null),x&&(un(o,p),un(o,h)),T.cancelled?(x&&un(o,c),y&&y(o)):(e(),v&&v(o)),o._leaveCb=null});g?g(r):r()}}function vn(t){return"number"===typeof t&&!isNaN(t)}function yn(t){if(n(t))return!1;var e=t.fns;return i(e)?yn(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function gn(t,e){!0!==e.data.show&&dn(e)}function _n(t,e,r){xn(t,e,r),(xo||wo)&&setTimeout(function(){xn(t,e,r)},0)}function xn(t,e,r){var n=e.value,i=t.multiple;if(!i||Array.isArray(n)){for(var o,a,s=0,l=t.options.length;s<l;s++)if(a=t.options[s],i)o=S(n,wn(a))>-1,a.selected!==o&&(a.selected=o);else if(T(wn(a),n))return void(t.selectedIndex!==s&&(t.selectedIndex=s));i||(t.selectedIndex=-1)}}function bn(t,e){return e.every(function(e){return!T(e,t)})}function wn(t){return"_value"in t?t._value:t.value}function Tn(t){t.target.composing=!0}function Sn(t){t.target.composing&&(t.target.composing=!1,zn(t.target,"input"))}function zn(t,e){var r=document.createEvent("HTMLEvents");r.initEvent(e,!0,!0),t.dispatchEvent(r)}function An(t){return!t.componentInstance||t.data&&t.data.transition?t:An(t.componentInstance._vnode)}function Cn(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Cn(xt(e.children)):t}function En(t){var e={},r=t.$options;for(var n in r.propsData)e[n]=t[n];var i=r._parentListeners;for(var o in i)e[io(o)]=i[o];return e}function kn(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function Mn(t){for(;t=t.parent;)if(t.data.transition)return!0}function Ln(t,e){return e.key===t.key&&e.tag===t.tag}function In(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Pn(t){t.data.newPos=t.elm.getBoundingClientRect()}function Rn(t){var e=t.data.pos,r=t.data.newPos,n=e.left-r.left,i=e.top-r.top;if(n||i){t.data.moved=!0;var o=t.elm.style;o.transform=o.WebkitTransform="translate("+n+"px,"+i+"px)",o.transitionDuration="0s"}}function Dn(t,e){var r=e?Ns(e):js;if(r.test(t)){for(var n,i,o=[],a=r.lastIndex=0;n=r.exec(t);){i=n.index,i>a&&o.push(JSON.stringify(t.slice(a,i)));var s=br(n[1].trim());o.push("_s("+s+")"),a=i+n[0].length}return a<t.length&&o.push(JSON.stringify(t.slice(a))),o.join("+")}}function On(t,e){var r=(e.warn,Mr(t,"class"));r&&(t.staticClass=JSON.stringify(r));var n=kr(t,"class",!1);n&&(t.classBinding=n)}function Bn(t){var e="";return t.staticClass&&(e+="staticClass:"+t.staticClass+","),t.classBinding&&(e+="class:"+t.classBinding+","),e}function Fn(t,e){var r=(e.warn,Mr(t,"style"));if(r){t.staticStyle=JSON.stringify(ls(r))}var n=kr(t,"style",!1);n&&(t.styleBinding=n)}function jn(t){var e="";return t.staticStyle&&(e+="staticStyle:"+t.staticStyle+","),t.styleBinding&&(e+="style:("+t.styleBinding+"),"),e}function Vn(t,e){var r=e?gl:yl;return t.replace(r,function(t){return vl[t]})}function Nn(t,e){function r(e){c+=e,t=t.substring(e)}function n(t,r,n){var i,s;if(null==r&&(r=c),null==n&&(n=c),t&&(s=t.toLowerCase()),t)for(i=a.length-1;i>=0&&a[i].lowerCasedTag!==s;i--);else i=0;if(i>=0){for(var l=a.length-1;l>=i;l--)e.end&&e.end(a[l].tag,r,n);a.length=i,o=i&&a[i-1].tag}else"br"===s?e.start&&e.start(t,[],!0,r,n):"p"===s&&(e.start&&e.start(t,[],!1,r,n),e.end&&e.end(t,r,n))}for(var i,o,a=[],s=e.expectHTML,l=e.isUnaryTag||lo,u=e.canBeLeftOpenTag||lo,c=0;t;){if(i=t,o&&dl(o)){var p=0,h=o.toLowerCase(),f=ml[h]||(ml[h]=new RegExp("([\\s\\S]*?)(</"+h+"[^>]*>)","i")),d=t.replace(f,function(t,r,n){return p=n.length,dl(h)||"noscript"===h||(r=r.replace(/<!--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),xl(h,r)&&(r=r.slice(1)),e.chars&&e.chars(r),""});c+=t.length-d.length,t=d,n(h,c-p,c)}else{var m=t.indexOf("<");if(0===m){if(el.test(t)){var v=t.indexOf("--\x3e");if(v>=0){e.shouldKeepComment&&e.comment(t.substring(4,v)),r(v+3);continue}}if(rl.test(t)){var y=t.indexOf("]>");if(y>=0){r(y+2);continue}}var g=t.match(tl);if(g){r(g[0].length);continue}var _=t.match(Qs);if(_){var x=c;r(_[0].length),n(_[1],x,c);continue}var b=function(){var e=t.match(Js);if(e){var n={tagName:e[1],attrs:[],start:c};r(e[0].length);for(var i,o;!(i=t.match(Ys))&&(o=t.match(Hs));)r(o[0].length),n.attrs.push(o);if(i)return n.unarySlash=i[1],r(i[0].length),n.end=c,n}}();if(b){!function(t){var r=t.tagName,i=t.unarySlash;s&&("p"===o&&Ws(r)&&n(o),u(r)&&o===r&&n(r));for(var c=l(r)||!!i,p=t.attrs.length,h=new Array(p),f=0;f<p;f++){var d=t.attrs[f];nl&&-1===d[0].indexOf('""')&&(""===d[3]&&delete d[3],""===d[4]&&delete d[4],""===d[5]&&delete d[5]);var m=d[3]||d[4]||d[5]||"";h[f]={name:d[1],value:Vn(m,e.shouldDecodeNewlines)}}c||(a.push({tag:r,lowerCasedTag:r.toLowerCase(),attrs:h}),o=r),e.start&&e.start(r,h,c,t.start,t.end)}(b),xl(o,t)&&r(1);continue}}var w=void 0,T=void 0,S=void 0;if(m>=0){for(T=t.slice(m);!Qs.test(T)&&!Js.test(T)&&!el.test(T)&&!rl.test(T)&&!((S=T.indexOf("<",1))<0);)m+=S,T=t.slice(m);w=t.substring(0,m),r(m)}m<0&&(w=t,t=""),e.chars&&w&&e.chars(w)}if(t===i){e.chars&&e.chars(t);break}}n()}function Un(t,e,r){return{type:1,tag:t,attrsList:e,attrsMap:ai(e),parent:r,children:[]}}function $n(t,e){function r(t){t.pre&&(s=!1),ul(t.tag)&&(l=!1)}il=e.warn||Tr,ul=e.isPreTag||lo,cl=e.mustUseProp||lo,pl=e.getTagNamespace||lo,al=Sr(e.modules,"transformNode"),sl=Sr(e.modules,"preTransformNode"),ll=Sr(e.modules,"postTransformNode"),ol=e.delimiters;var n,i,o=[],a=!1!==e.preserveWhitespace,s=!1,l=!1;return Nn(t,{warn:il,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldKeepComment:e.comments,start:function(t,a,u){var c=i&&i.ns||pl(t);xo&&"svg"===c&&(a=ui(a));var p=Un(t,a,i);c&&(p.ns=c),li(p)&&!Mo()&&(p.forbidden=!0);for(var h=0;h<sl.length;h++)p=sl[h](p,e)||p;if(s||(qn(p),p.pre&&(s=!0)),ul(p.tag)&&(l=!0),s?Zn(p):p.processed||(Xn(p),Kn(p),ti(p),Gn(p,e)),n?o.length||n.if&&(p.elseif||p.else)&&Qn(n,{exp:p.elseif,block:p}):n=p,i&&!p.forbidden)if(p.elseif||p.else)Jn(p,i);else if(p.slotScope){i.plain=!1;var f=p.slotTarget||'"default"';(i.scopedSlots||(i.scopedSlots={}))[f]=p}else i.children.push(p),p.parent=i;u?r(p):(i=p,o.push(p));for(var d=0;d<ll.length;d++)ll[d](p,e)},end:function(){var t=o[o.length-1],e=t.children[t.children.length-1];e&&3===e.type&&" "===e.text&&!l&&t.children.pop(),o.length-=1,i=o[o.length-1],r(t)},chars:function(t){if(i&&(!xo||"textarea"!==i.tag||i.attrsMap.placeholder!==t)){var e=i.children;if(t=l||t.trim()?si(i)?t:El(t):a&&e.length?" ":""){var r;!s&&" "!==t&&(r=Dn(t,ol))?e.push({type:2,expression:r,text:t}):" "===t&&e.length&&" "===e[e.length-1].text||e.push({type:3,text:t})}}},comment:function(t){i.children.push({type:3,text:t,isComment:!0})}}),n}function qn(t){null!=Mr(t,"v-pre")&&(t.pre=!0)}function Zn(t){var e=t.attrsList.length;if(e)for(var r=t.attrs=new Array(e),n=0;n<e;n++)r[n]={name:t.attrsList[n].name,value:JSON.stringify(t.attrsList[n].value)};else t.pre||(t.plain=!0)}function Gn(t,e){Wn(t),t.plain=!t.key&&!t.attrsList.length,Hn(t),ei(t),ri(t);for(var r=0;r<al.length;r++)t=al[r](t,e)||t;ni(t)}function Wn(t){var e=kr(t,"key");e&&(t.key=e)}function Hn(t){var e=kr(t,"ref");e&&(t.ref=e,t.refInFor=ii(t))}function Xn(t){var e;if(e=Mr(t,"v-for")){var r=e.match(Tl);if(!r)return;t.for=r[2].trim();var n=r[1].trim(),i=n.match(Sl);i?(t.alias=i[1].trim(),t.iterator1=i[2].trim(),i[3]&&(t.iterator2=i[3].trim())):t.alias=n}}function Kn(t){var e=Mr(t,"v-if");if(e)t.if=e,Qn(t,{exp:e,block:t});else{null!=Mr(t,"v-else")&&(t.else=!0);var r=Mr(t,"v-else-if");r&&(t.elseif=r)}}function Jn(t,e){var r=Yn(e.children);r&&r.if&&Qn(r,{exp:t.elseif,block:t})}function Yn(t){for(var e=t.length;e--;){if(1===t[e].type)return t[e];t.pop()}}function Qn(t,e){t.ifConditions||(t.ifConditions=[]),t.ifConditions.push(e)}function ti(t){null!=Mr(t,"v-once")&&(t.once=!0)}function ei(t){if("slot"===t.tag)t.slotName=kr(t,"name");else{var e;"template"===t.tag?(e=Mr(t,"scope"),t.slotScope=e||Mr(t,"slot-scope")):(e=Mr(t,"slot-scope"))&&(t.slotScope=e);var r=kr(t,"slot");r&&(t.slotTarget='""'===r?'"default"':r,t.slotScope||Ar(t,"slot",r))}}function ri(t){var e;(e=kr(t,"is"))&&(t.component=e),null!=Mr(t,"inline-template")&&(t.inlineTemplate=!0)}function ni(t){var e,r,n,i,o,a,s,l=t.attrsList;for(e=0,r=l.length;e<r;e++)if(n=i=l[e].name,o=l[e].value,wl.test(n))if(t.hasBindings=!0,a=oi(n),a&&(n=n.replace(Cl,"")),Al.test(n))n=n.replace(Al,""),o=br(o),s=!1,a&&(a.prop&&(s=!0,"innerHtml"===(n=io(n))&&(n="innerHTML")),a.camel&&(n=io(n)),a.sync&&Er(t,"update:"+io(n),Ir(o,"$event"))),s||!t.component&&cl(t.tag,t.attrsMap.type,n)?zr(t,n,o):Ar(t,n,o);else if(bl.test(n))n=n.replace(bl,""),Er(t,n,o,a,!1,il);else{n=n.replace(wl,"");var u=n.match(zl),c=u&&u[1];c&&(n=n.slice(0,-(c.length+1))),Cr(t,n,i,o,c,a)}else{Ar(t,n,JSON.stringify(o))}}function ii(t){for(var e=t;e;){if(void 0!==e.for)return!0;e=e.parent}return!1}function oi(t){var e=t.match(Cl);if(e){var r={};return e.forEach(function(t){r[t.slice(1)]=!0}),r}}function ai(t){for(var e={},r=0,n=t.length;r<n;r++)e[t[r].name]=t[r].value;return e}function si(t){return"script"===t.tag||"style"===t.tag}function li(t){return"style"===t.tag||"script"===t.tag&&(!t.attrsMap.type||"text/javascript"===t.attrsMap.type)}function ui(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];kl.test(n.name)||(n.name=n.name.replace(Ml,""),e.push(n))}return e}function ci(t,e){if("input"===t.tag){var r=t.attrsMap;if(r["v-model"]&&(r["v-bind:type"]||r[":type"])){var n=kr(t,"type"),i=Mr(t,"v-if",!0),o=i?"&&("+i+")":"",a=pi(t);Xn(a),hi(a,"type","checkbox"),Gn(a,e),a.processed=!0,a.if="("+n+")==='checkbox'"+o,Qn(a,{exp:a.if,block:a});var s=pi(t);Mr(s,"v-for",!0),hi(s,"type","radio"),Gn(s,e),Qn(a,{exp:"("+n+")==='radio'"+o,block:s});var l=pi(t);return Mr(l,"v-for",!0),hi(l,":type",n),Gn(l,e),Qn(a,{exp:i,block:l}),a}}}function pi(t){return Un(t.tag,t.attrsList.slice(),t.parent)}function hi(t,e,r){t.attrsMap[e]=r,t.attrsList.push({name:e,value:r})}function fi(t,e){e.value&&zr(t,"textContent","_s("+e.value+")")}function di(t,e){e.value&&zr(t,"innerHTML","_s("+e.value+")")}function mi(t,e){t&&(hl=Dl(e.staticKeys||""),fl=e.isReservedTag||lo,yi(t),gi(t,!1))}function vi(t){return d("type,tag,attrsList,attrsMap,plain,parent,children,attrs"+(t?","+t:""))}function yi(t){if(t.static=_i(t),1===t.type){if(!fl(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var e=0,r=t.children.length;e<r;e++){var n=t.children[e];yi(n),n.static||(t.static=!1)}if(t.ifConditions)for(var i=1,o=t.ifConditions.length;i<o;i++){var a=t.ifConditions[i].block;yi(a),a.static||(t.static=!1)}}}function gi(t,e){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=e),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var r=0,n=t.children.length;r<n;r++)gi(t.children[r],e||!!t.for);if(t.ifConditions)for(var i=1,o=t.ifConditions.length;i<o;i++)gi(t.ifConditions[i].block,e)}}function _i(t){return 2!==t.type&&(3===t.type||!(!t.pre&&(t.hasBindings||t.if||t.for||to(t.tag)||!fl(t.tag)||xi(t)||!Object.keys(t).every(hl))))}function xi(t){for(;t.parent;){if(t=t.parent,"template"!==t.tag)return!1;if(t.for)return!0}return!1}function bi(t,e,r){var n=e?"nativeOn:{":"on:{";for(var i in t){n+='"'+i+'":'+wi(i,t[i])+","}return n.slice(0,-1)+"}"}function wi(t,e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(e){return wi(t,e)}).join(",")+"]";var r=Bl.test(e.value),n=Ol.test(e.value);if(e.modifiers){var i="",o="",a=[];for(var s in e.modifiers)if(Vl[s])o+=Vl[s],Fl[s]&&a.push(s);else if("exact"===s){var l=e.modifiers;o+=jl(["ctrl","shift","alt","meta"].filter(function(t){return!l[t]}).map(function(t){return"$event."+t+"Key"}).join("||"))}else a.push(s);a.length&&(i+=Ti(a)),o&&(i+=o);return"function($event){"+i+(r?e.value+"($event)":n?"("+e.value+")($event)":e.value)+"}"}return r||n?e.value:"function($event){"+e.value+"}"}function Ti(t){return"if(!('button' in $event)&&"+t.map(Si).join("&&")+")return null;"}function Si(t){var e=parseInt(t,10);if(e)return"$event.keyCode!=="+e;var r=Fl[t];return"_k($event.keyCode,"+JSON.stringify(t)+","+JSON.stringify(r)+",$event.key)"}function zi(t,e){t.wrapListeners=function(t){return"_g("+t+","+e.value+")"}}function Ai(t,e){t.wrapData=function(r){return"_b("+r+",'"+t.tag+"',"+e.value+","+(e.modifiers&&e.modifiers.prop?"true":"false")+(e.modifiers&&e.modifiers.sync?",true":"")+")"}}function Ci(t,e){var r=new Ul(e);return{render:"with(this){return "+(t?Ei(t,r):'_c("div")')+"}",staticRenderFns:r.staticRenderFns}}function Ei(t,e){if(t.staticRoot&&!t.staticProcessed)return ki(t,e);if(t.once&&!t.onceProcessed)return Mi(t,e);if(t.for&&!t.forProcessed)return Pi(t,e);if(t.if&&!t.ifProcessed)return Li(t,e);if("template"!==t.tag||t.slotTarget){if("slot"===t.tag)return Gi(t,e);var r;if(t.component)r=Wi(t.component,t,e);else{var n=t.plain?void 0:Ri(t,e),i=t.inlineTemplate?null:Vi(t,e,!0);r="_c('"+t.tag+"'"+(n?","+n:"")+(i?","+i:"")+")"}for(var o=0;o<e.transforms.length;o++)r=e.transforms[o](t,r);return r}return Vi(t,e)||"void 0"}function ki(t,e){return t.staticProcessed=!0,e.staticRenderFns.push("with(this){return "+Ei(t,e)+"}"),"_m("+(e.staticRenderFns.length-1)+(t.staticInFor?",true":"")+")"}function Mi(t,e){if(t.onceProcessed=!0,t.if&&!t.ifProcessed)return Li(t,e);if(t.staticInFor){for(var r="",n=t.parent;n;){if(n.for){r=n.key;break}n=n.parent}return r?"_o("+Ei(t,e)+","+e.onceId+++","+r+")":Ei(t,e)}return ki(t,e)}function Li(t,e,r,n){return t.ifProcessed=!0,Ii(t.ifConditions.slice(),e,r,n)}function Ii(t,e,r,n){function i(t){return r?r(t,e):t.once?Mi(t,e):Ei(t,e)}if(!t.length)return n||"_e()";var o=t.shift();return o.exp?"("+o.exp+")?"+i(o.block)+":"+Ii(t,e,r,n):""+i(o.block)}function Pi(t,e,r,n){var i=t.for,o=t.alias,a=t.iterator1?","+t.iterator1:"",s=t.iterator2?","+t.iterator2:"";return t.forProcessed=!0,(n||"_l")+"(("+i+"),function("+o+a+s+"){return "+(r||Ei)(t,e)+"})"}function Ri(t,e){var r="{",n=Di(t,e);n&&(r+=n+","),t.key&&(r+="key:"+t.key+","),t.ref&&(r+="ref:"+t.ref+","),t.refInFor&&(r+="refInFor:true,"),t.pre&&(r+="pre:true,"),t.component&&(r+='tag:"'+t.tag+'",');for(var i=0;i<e.dataGenFns.length;i++)r+=e.dataGenFns[i](t);if(t.attrs&&(r+="attrs:{"+Hi(t.attrs)+"},"),t.props&&(r+="domProps:{"+Hi(t.props)+"},"),t.events&&(r+=bi(t.events,!1,e.warn)+","),t.nativeEvents&&(r+=bi(t.nativeEvents,!0,e.warn)+","),t.slotTarget&&!t.slotScope&&(r+="slot:"+t.slotTarget+","),t.scopedSlots&&(r+=Bi(t.scopedSlots,e)+","),t.model&&(r+="model:{value:"+t.model.value+",callback:"+t.model.callback+",expression:"+t.model.expression+"},"),t.inlineTemplate){var o=Oi(t,e);o&&(r+=o+",")}return r=r.replace(/,$/,"")+"}",t.wrapData&&(r=t.wrapData(r)),t.wrapListeners&&(r=t.wrapListeners(r)),r}function Di(t,e){var r=t.directives;if(r){var n,i,o,a,s="directives:[",l=!1;for(n=0,i=r.length;n<i;n++){o=r[n],a=!0;var u=e.directives[o.name];u&&(a=!!u(t,o,e.warn)),a&&(l=!0,s+='{name:"'+o.name+'",rawName:"'+o.rawName+'"'+(o.value?",value:("+o.value+"),expression:"+JSON.stringify(o.value):"")+(o.arg?',arg:"'+o.arg+'"':"")+(o.modifiers?",modifiers:"+JSON.stringify(o.modifiers):"")+"},")}return l?s.slice(0,-1)+"]":void 0}}function Oi(t,e){var r=t.children[0];if(1===r.type){var n=Ci(r,e.options);return"inlineTemplate:{render:function(){"+n.render+"},staticRenderFns:["+n.staticRenderFns.map(function(t){return"function(){"+t+"}"}).join(",")+"]}"}}function Bi(t,e){return"scopedSlots:_u(["+Object.keys(t).map(function(r){return Fi(r,t[r],e)}).join(",")+"])"}function Fi(t,e,r){return e.for&&!e.forProcessed?ji(t,e,r):"{key:"+t+",fn:function("+String(e.slotScope)+"){return "+("template"===e.tag?e.if?e.if+"?"+(Vi(e,r)||"undefined")+":undefined":Vi(e,r)||"undefined":Ei(e,r))+"}}"}function ji(t,e,r){var n=e.for,i=e.alias,o=e.iterator1?","+e.iterator1:"",a=e.iterator2?","+e.iterator2:"";return e.forProcessed=!0,"_l(("+n+"),function("+i+o+a+"){return "+Fi(t,e,r)+"})"}function Vi(t,e,r,n,i){var o=t.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag)return(n||Ei)(a,e);var s=r?Ni(o,e.maybeComponent):0,l=i||$i;return"["+o.map(function(t){return l(t,e)}).join(",")+"]"+(s?","+s:"")}}function Ni(t,e){for(var r=0,n=0;n<t.length;n++){var i=t[n];if(1===i.type){if(Ui(i)||i.ifConditions&&i.ifConditions.some(function(t){return Ui(t.block)})){r=2;break}(e(i)||i.ifConditions&&i.ifConditions.some(function(t){return e(t.block)}))&&(r=1)}}return r}function Ui(t){return void 0!==t.for||"template"===t.tag||"slot"===t.tag}function $i(t,e){return 1===t.type?Ei(t,e):3===t.type&&t.isComment?Zi(t):qi(t)}function qi(t){return"_v("+(2===t.type?t.expression:Xi(JSON.stringify(t.text)))+")"}function Zi(t){return"_e("+JSON.stringify(t.text)+")"}function Gi(t,e){var r=t.slotName||'"default"',n=Vi(t,e),i="_t("+r+(n?","+n:""),o=t.attrs&&"{"+t.attrs.map(function(t){return io(t.name)+":"+t.value}).join(",")+"}",a=t.attrsMap["v-bind"];return!o&&!a||n||(i+=",null"),o&&(i+=","+o),a&&(i+=(o?"":",null")+","+a),i+")"}function Wi(t,e,r){var n=e.inlineTemplate?null:Vi(e,r,!0);return"_c("+t+","+Ri(e,r)+(n?","+n:"")+")"}function Hi(t){for(var e="",r=0;r<t.length;r++){var n=t[r];e+='"'+n.name+'":'+Xi(n.value)+","}return e.slice(0,-1)}function Xi(t){return t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function Ki(t,e){try{return new Function(t)}catch(r){return e.push({err:r,code:t}),w}}function Ji(t){var e=Object.create(null);return function(r,n,i){n=x({},n);n.warn;delete n.warn;var o=n.delimiters?String(n.delimiters)+r:r;if(e[o])return e[o];var a=t(r,n),s={},l=[];return s.render=Ki(a.render,l),s.staticRenderFns=a.staticRenderFns.map(function(t){return Ki(t,l)}),e[o]=s}}function Yi(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}var Qi=Object.prototype.toString,to=d("slot,component",!0),eo=d("key,ref,slot,slot-scope,is"),ro=Object.prototype.hasOwnProperty,no=/-(\w)/g,io=y(function(t){return t.replace(no,function(t,e){return e?e.toUpperCase():""})}),oo=y(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),ao=/\B([A-Z])/g,so=y(function(t){return t.replace(ao,"-$1").toLowerCase()}),lo=function(t,e,r){return!1},uo=function(t){return t},co="data-server-rendered",po=["component","directive","filter"],ho=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],fo={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:lo,isReservedAttr:lo,isUnknownElement:lo,getTagNamespace:w,parsePlatformTagName:uo,mustUseProp:lo,_lifecycleHooks:ho},mo=Object.freeze({}),vo=/[^\w.$]/,yo="__proto__"in{},go="undefined"!==typeof window,_o=go&&window.navigator.userAgent.toLowerCase(),xo=_o&&/msie|trident/.test(_o),bo=_o&&_o.indexOf("msie 9.0")>0,wo=_o&&_o.indexOf("edge/")>0,To=_o&&_o.indexOf("android")>0,So=_o&&/iphone|ipad|ipod|ios/.test(_o),zo=(_o&&/chrome\/\d+/.test(_o),{}.watch),Ao=!1;if(go)try{var Co={};Object.defineProperty(Co,"passive",{get:function(){Ao=!0}}),window.addEventListener("test-passive",null,Co)}catch(t){}var Eo,ko,Mo=function(){return void 0===Eo&&(Eo=!go&&"undefined"!==typeof t&&"server"===t.process.env.VUE_ENV),Eo},Lo=go&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Io="undefined"!==typeof Symbol&&k(Symbol)&&"undefined"!==typeof Reflect&&k(Reflect.ownKeys);ko="undefined"!==typeof Set&&k(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var Po=w,Ro=0,Do=function(){this.id=Ro++,this.subs=[]};Do.prototype.addSub=function(t){this.subs.push(t)},Do.prototype.removeSub=function(t){m(this.subs,t)},Do.prototype.depend=function(){Do.target&&Do.target.addDep(this)},Do.prototype.notify=function(){for(var t=this.subs.slice(),e=0,r=t.length;e<r;e++)t[e].update()},Do.target=null;var Oo=[],Bo=function(t,e,r,n,i,o,a,s){this.tag=t,this.data=e,this.children=r,this.text=n,this.elm=i,this.ns=void 0,this.context=o,this.functionalContext=void 0,this.functionalOptions=void 0,this.functionalScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},Fo={child:{configurable:!0}};Fo.child.get=function(){return this.componentInstance},Object.defineProperties(Bo.prototype,Fo);var jo=function(t){void 0===t&&(t="");var e=new Bo;return e.text=t,e.isComment=!0,e},Vo=Array.prototype,No=Object.create(Vo);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(t){var e=Vo[t];C(No,t,function(){for(var r=[],n=arguments.length;n--;)r[n]=arguments[n];var i,o=e.apply(this,r),a=this.__ob__;switch(t){case"push":case"unshift":i=r;break;case"splice":i=r.slice(2)}return i&&a.observeArray(i),a.dep.notify(),o})});var Uo=Object.getOwnPropertyNames(No),$o={shouldConvert:!0},qo=function(t){if(this.value=t,this.dep=new Do,this.vmCount=0,C(t,"__ob__",this),Array.isArray(t)){(yo?D:O)(t,No,Uo),this.observeArray(t)}else this.walk(t)};qo.prototype.walk=function(t){for(var e=Object.keys(t),r=0;r<e.length;r++)F(t,e[r],t[e[r]])},qo.prototype.observeArray=function(t){for(var e=0,r=t.length;e<r;e++)B(t[e])};var Zo=fo.optionMergeStrategies;Zo.data=function(t,e,r){return r?$(t,e,r):e&&"function"!==typeof e?t:$.call(this,t,e)},ho.forEach(function(t){Zo[t]=q}),po.forEach(function(t){Zo[t+"s"]=Z}),Zo.watch=function(t,e,r,n){if(t===zo&&(t=void 0),e===zo&&(e=void 0),!e)return Object.create(t||null);if(!t)return e;var i={};x(i,t);for(var o in e){var a=i[o],s=e[o];a&&!Array.isArray(a)&&(a=[a]),i[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return i},Zo.props=Zo.methods=Zo.inject=Zo.computed=function(t,e,r,n){if(!t)return e;var i=Object.create(null);return x(i,t),e&&x(i,e),i},Zo.provide=$;var Go,Wo,Ho=function(t,e){return void 0===e?t:e},Xo=[],Ko=!1,Jo=!1;if("undefined"!==typeof r&&k(r))Wo=function(){r(it)};else if("undefined"===typeof MessageChannel||!k(MessageChannel)&&"[object MessageChannelConstructor]"!==MessageChannel.toString())Wo=function(){setTimeout(it,0)};else{var Yo=new MessageChannel,Qo=Yo.port2;Yo.port1.onmessage=it,Wo=function(){Qo.postMessage(1)}}if("undefined"!==typeof Promise&&k(Promise)){var ta=Promise.resolve();Go=function(){ta.then(it),So&&setTimeout(w)}}else Go=Wo;var ea,ra=y(function(t){var e="&"===t.charAt(0);t=e?t.slice(1):t;var r="~"===t.charAt(0);t=r?t.slice(1):t;var n="!"===t.charAt(0);return t=n?t.slice(1):t,{name:t,once:r,capture:n,passive:e}}),na=null,ia=[],oa=[],aa={},sa=!1,la=!1,ua=0,ca=0,pa=function(t,e,r,n){this.vm=t,t._watchers.push(this),n?(this.deep=!!n.deep,this.user=!!n.user,this.lazy=!!n.lazy,this.sync=!!n.sync):this.deep=this.user=this.lazy=this.sync=!1,this.cb=r,this.id=++ca,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ko,this.newDepIds=new ko,this.expression="","function"===typeof e?this.getter=e:(this.getter=E(e),this.getter||(this.getter=function(){})),this.value=this.lazy?void 0:this.get()};pa.prototype.get=function(){M(this);var t,e=this.vm;try{t=this.getter.call(e,e)}catch(t){if(!this.user)throw t;et(t,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&Nt(t),L(),this.cleanupDeps()}return t},pa.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},pa.prototype.cleanupDeps=function(){for(var t=this,e=this.deps.length;e--;){var r=t.deps[e];t.newDepIds.has(r.id)||r.removeSub(t)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},pa.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():Vt(this)},pa.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||l(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){et(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},pa.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},pa.prototype.depend=function(){for(var t=this,e=this.deps.length;e--;)t.deps[e].depend()},pa.prototype.teardown=function(){var t=this;if(this.active){this.vm._isBeingDestroyed||m(this.vm._watchers,this);for(var e=this.deps.length;e--;)t.deps[e].removeSub(t);this.active=!1}};var ha=new ko,fa={enumerable:!0,configurable:!0,get:w,set:w},da={lazy:!0};fe(de.prototype);var ma={init:function(t,e,r,n){if(!t.componentInstance||t.componentInstance._isDestroyed){(t.componentInstance=ge(t,na,r,n)).$mount(e?t.elm:void 0,e)}else if(t.data.keepAlive){var i=t;ma.prepatch(i,i)}},prepatch:function(t,e){var r=e.componentOptions;Mt(e.componentInstance=t.componentInstance,r.propsData,r.listeners,e,r.children)},insert:function(t){var e=t.context,r=t.componentInstance;r._isMounted||(r._isMounted=!0,Rt(r,"mounted")),t.data.keepAlive&&(e._isMounted?Ft(r):It(r,!0))},destroy:function(t){var e=t.componentInstance;e._isDestroyed||(t.data.keepAlive?Pt(e,!0):e.$destroy())}},va=Object.keys(ma),ya=1,ga=2,_a=0;!function(t){t.prototype._init=function(t){var e=this;e._uid=_a++,e._isVue=!0,t&&t._isComponent?Ae(e,t):e.$options=X(Ce(e.constructor),t||{},e),e._renderProxy=e,e._self=e,Et(e),bt(e),ze(e),Rt(e,"beforeCreate"),ee(e),qt(e),te(e),Rt(e,"created"),e.$options.el&&e.$mount(e.$options.el)}}(Me),function(t){var e={};e.get=function(){return this._data};var r={};r.get=function(){return this._props},Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",r),t.prototype.$set=j,t.prototype.$delete=V,t.prototype.$watch=function(t,e,r){var n=this;if(u(e))return Qt(n,t,e,r);r=r||{},r.user=!0;var i=new pa(n,t,e,r);return r.immediate&&e.call(n,i.value),function(){i.teardown()}}}(Me),function(t){var e=/^hook:/;t.prototype.$on=function(t,r){var n=this,i=this;if(Array.isArray(t))for(var o=0,a=t.length;o<a;o++)n.$on(t[o],r);else(i._events[t]||(i._events[t]=[])).push(r),e.test(t)&&(i._hasHookEvent=!0);return i},t.prototype.$once=function(t,e){function r(){n.$off(t,r),e.apply(n,arguments)}var n=this;return r.fn=e,n.$on(t,r),n},t.prototype.$off=function(t,e){var r=this,n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(t)){for(var i=0,o=t.length;i<o;i++)r.$off(t[i],e);return n}var a=n._events[t];if(!a)return n;if(1===arguments.length)return n._events[t]=null,n;if(e)for(var s,l=a.length;l--;)if((s=a[l])===e||s.fn===e){a.splice(l,1);break}return n},t.prototype.$emit=function(t){var e=this,r=e._events[t];if(r){r=r.length>1?_(r):r;for(var n=_(arguments,1),i=0,o=r.length;i<o;i++)try{r[i].apply(e,n)}catch(r){et(r,e,'event handler for "'+t+'"')}}return e}}(Me),function(t){t.prototype._update=function(t,e){var r=this;r._isMounted&&Rt(r,"beforeUpdate");var n=r.$el,i=r._vnode,o=na;na=r,r._vnode=t,i?r.$el=r.__patch__(i,t):(r.$el=r.__patch__(r.$el,t,e,!1,r.$options._parentElm,r.$options._refElm),r.$options._parentElm=r.$options._refElm=null),na=o,n&&(n.__vue__=null),r.$el&&(r.$el.__vue__=r),r.$vnode&&r.$parent&&r.$vnode===r.$parent._vnode&&(r.$parent.$el=r.$el)},t.prototype.$forceUpdate=function(){var t=this;t._watcher&&t._watcher.update()},t.prototype.$destroy=function(){var t=this;if(!t._isBeingDestroyed){Rt(t,"beforeDestroy"),t._isBeingDestroyed=!0;var e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||m(e.$children,t),t._watcher&&t._watcher.teardown();for(var r=t._watchers.length;r--;)t._watchers[r].teardown();t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),Rt(t,"destroyed"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}}(Me),function(t){fe(t.prototype),t.prototype.$nextTick=function(t){return at(t,this)},t.prototype._render=function(){var t=this,e=t.$options,r=e.render,n=e._parentVnode;if(t._isMounted)for(var i in t.$slots){var o=t.$slots[i];o._rendered&&(t.$slots[i]=R(o,!0))}t.$scopedSlots=n&&n.data.scopedSlots||mo,t.$vnode=n;var a;try{a=r.call(t._renderProxy,t.$createElement)}catch(e){et(e,t,"render"),a=t._vnode}return a instanceof Bo||(a=jo()),a.parent=n,a}}(Me);var xa=[String,RegExp,Array],ba={name:"keep-alive",abstract:!0,props:{include:xa,exclude:xa,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){var t=this;for(var e in t.cache)Ve(t.cache,e,t.keys)},watch:{include:function(t){je(this,function(e){return Fe(t,e)})},exclude:function(t){je(this,function(e){return!Fe(t,e)})}},render:function(){var t=xt(this.$slots.default),e=t&&t.componentOptions;if(e){var r=Be(e);if(r&&(this.include&&!Fe(this.include,r)||this.exclude&&Fe(this.exclude,r)))return t;var n=this,i=n.cache,o=n.keys,a=null==t.key?e.Ctor.cid+(e.tag?"::"+e.tag:""):t.key;i[a]?(t.componentInstance=i[a].componentInstance,m(o,a),o.push(a)):(i[a]=t,o.push(a),this.max&&o.length>parseInt(this.max)&&Ve(i,o[0],o,this._vnode)),t.data.keepAlive=!0}return t}},wa={KeepAlive:ba};!function(t){var e={};e.get=function(){return fo},Object.defineProperty(t,"config",e),t.util={warn:Po,extend:x,mergeOptions:X,defineReactive:F},t.set=j,t.delete=V,t.nextTick=at,t.options=Object.create(null),po.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,x(t.options.components,wa),Le(t),Ie(t),Pe(t),Oe(t)}(Me),Object.defineProperty(Me.prototype,"$isServer",{get:Mo}),Object.defineProperty(Me.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Me.version="2.5.2";var Ta,Sa,za,Aa,Ca,Ea,ka,Ma,La,Ia=d("style,class"),Pa=d("input,textarea,option,select,progress"),Ra=function(t,e,r){return"value"===r&&Pa(t)&&"button"!==e||"selected"===r&&"option"===t||"checked"===r&&"input"===t||"muted"===r&&"video"===t},Da=d("contenteditable,draggable,spellcheck"),Oa=d("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Ba="http://www.w3.org/1999/xlink",Fa=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},ja=function(t){return Fa(t)?t.slice(6,t.length):""},Va=function(t){return null==t||!1===t},Na={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Ua=d("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),$a=d("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),qa=function(t){return"pre"===t},Za=function(t){return Ua(t)||$a(t)},Ga=Object.create(null),Wa=d("text,number,password,search,email,tel,url"),Ha=Object.freeze({createElement:Je,createElementNS:Ye,createTextNode:Qe,createComment:tr,insertBefore:er,removeChild:rr,appendChild:nr,parentNode:ir,nextSibling:or,tagName:ar,setTextContent:sr,setAttribute:lr}),Xa={create:function(t,e){ur(e)},update:function(t,e){t.data.ref!==e.data.ref&&(ur(t,!0),ur(e))},destroy:function(t){ur(t,!0)}},Ka=new Bo("",{},[]),Ja=["create","activate","update","remove","destroy"],Ya={create:fr,update:fr,destroy:function(t){fr(t,Ka)}},Qa=Object.create(null),ts=[Xa,Ya],es={create:gr,update:gr},rs={create:xr,update:xr},ns=/[\w).+\-_$\]]/,is="__r",os="__c",as={create:Hr,update:Hr},ss={create:Xr,update:Xr},ls=y(function(t){var e={},r=/;(?![^(]*\))/g,n=/:(.+)/;return t.split(r).forEach(function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}),us=/^--/,cs=/\s*!important$/,ps=function(t,e,r){if(us.test(e))t.style.setProperty(e,r);else if(cs.test(r))t.style.setProperty(e,r.replace(cs,""),"important");else{var n=fs(e);if(Array.isArray(r))for(var i=0,o=r.length;i<o;i++)t.style[n]=r[i];else t.style[n]=r}},hs=["Webkit","Moz","ms"],fs=y(function(t){if(La=La||document.createElement("div").style,"filter"!==(t=io(t))&&t in La)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),r=0;r<hs.length;r++){var n=hs[r]+e;if(n in La)return n}}),ds={create:rn,update:rn},ms=y(function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}}),vs=go&&!bo,ys="transition",gs="animation",_s="transition",xs="transitionend",bs="animation",ws="animationend";vs&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(_s="WebkitTransition",xs="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(bs="WebkitAnimation",ws="webkitAnimationEnd"));var Ts=go?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()},Ss=/\b(transform|all)(,|$)/,zs=go?{create:gn,activate:gn,remove:function(t,e){!0!==t.data.show?mn(t,e):e()}}:{},As=[es,rs,as,ss,ds,zs],Cs=As.concat(ts),Es=function(t){function e(t){return new Bo(L.tagName(t).toLowerCase(),{},[],void 0,t)}function r(t,e){function r(){0===--r.listeners&&a(t)}return r.listeners=e,r}function a(t){var e=L.parentNode(t);i(e)&&L.removeChild(e,t)}function l(t,e,r,n,a){if(t.isRootInsert=!a,!u(t,e,r,n)){var s=t.data,l=t.children,c=t.tag;i(c)?(t.elm=t.ns?L.createElementNS(t.ns,c):L.createElement(c,t),y(t),f(t,l,e),i(s)&&v(t,e),h(r,t.elm,n)):o(t.isComment)?(t.elm=L.createComment(t.text),h(r,t.elm,n)):(t.elm=L.createTextNode(t.text),h(r,t.elm,n))}}function u(t,e,r,n){var a=t.data;if(i(a)){var s=i(t.componentInstance)&&a.keepAlive;if(i(a=a.hook)&&i(a=a.init)&&a(t,!1,r,n),i(t.componentInstance))return c(t,e),o(s)&&p(t,e,r,n),!0}}function c(t,e){i(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,m(t)?(v(t,e),y(t)):(ur(t),e.push(t))}function p(t,e,r,n){for(var o,a=t;a.componentInstance;)if(a=a.componentInstance._vnode,i(o=a.data)&&i(o=o.transition)){for(o=0;o<k.activate.length;++o)k.activate[o](Ka,a);e.push(a);break}h(r,t.elm,n)}function h(t,e,r){i(t)&&(i(r)?r.parentNode===t&&L.insertBefore(t,e,r):L.appendChild(t,e))}function f(t,e,r){if(Array.isArray(e))for(var n=0;n<e.length;++n)l(e[n],r,t.elm,null,!0);else s(t.text)&&L.appendChild(t.elm,L.createTextNode(t.text))}function m(t){for(;t.componentInstance;)t=t.componentInstance._vnode;return i(t.tag)}function v(t,e){for(var r=0;r<k.create.length;++r)k.create[r](Ka,t);C=t.data.hook,i(C)&&(i(C.create)&&C.create(Ka,t),i(C.insert)&&e.push(t))}function y(t){var e;if(i(e=t.functionalScopeId))L.setAttribute(t.elm,e,"");else for(var r=t;r;)i(e=r.context)&&i(e=e.$options._scopeId)&&L.setAttribute(t.elm,e,""),r=r.parent;i(e=na)&&e!==t.context&&e!==t.functionalContext&&i(e=e.$options._scopeId)&&L.setAttribute(t.elm,e,"")}function g(t,e,r,n,i,o){for(;n<=i;++n)l(r[n],o,t,e)}function _(t){var e,r,n=t.data;if(i(n))for(i(e=n.hook)&&i(e=e.destroy)&&e(t),e=0;e<k.destroy.length;++e)k.destroy[e](t);if(i(e=t.children))for(r=0;r<t.children.length;++r)_(t.children[r])}function x(t,e,r,n){for(;r<=n;++r){var o=e[r];i(o)&&(i(o.tag)?(b(o),_(o)):a(o.elm))}}function b(t,e){if(i(e)||i(t.data)){var n,o=k.remove.length+1;for(i(e)?e.listeners+=o:e=r(t.elm,o),i(n=t.componentInstance)&&i(n=n._vnode)&&i(n.data)&&b(n,e),n=0;n<k.remove.length;++n)k.remove[n](t,e);i(n=t.data.hook)&&i(n=n.remove)?n(t,e):e()}else a(t.elm)}function w(t,e,r,o,a){for(var s,u,c,p,h=0,f=0,d=e.length-1,m=e[0],v=e[d],y=r.length-1,_=r[0],b=r[y],w=!a;h<=d&&f<=y;)n(m)?m=e[++h]:n(v)?v=e[--d]:cr(m,_)?(S(m,_,o),m=e[++h],_=r[++f]):cr(v,b)?(S(v,b,o),v=e[--d],b=r[--y]):cr(m,b)?(S(m,b,o),w&&L.insertBefore(t,m.elm,L.nextSibling(v.elm)),m=e[++h],b=r[--y]):cr(v,_)?(S(v,_,o),w&&L.insertBefore(t,v.elm,m.elm),v=e[--d],_=r[++f]):(n(s)&&(s=hr(e,h,d)),u=i(_.key)?s[_.key]:T(_,e,h,d),n(u)?l(_,o,t,m.elm):(c=e[u],cr(c,_)?(S(c,_,o),e[u]=void 0,w&&L.insertBefore(t,c.elm,m.elm)):l(_,o,t,m.elm)),_=r[++f]);h>d?(p=n(r[y+1])?null:r[y+1].elm,g(t,p,r,f,y,o)):f>y&&x(t,e,h,d)}function T(t,e,r,n){for(var o=r;o<n;o++){var a=e[o];if(i(a)&&cr(t,a))return o}}function S(t,e,r,a){if(t!==e){var s=e.elm=t.elm;if(o(t.isAsyncPlaceholder))return void(i(e.asyncFactory.resolved)?A(t.elm,e,r):e.isAsyncPlaceholder=!0);if(o(e.isStatic)&&o(t.isStatic)&&e.key===t.key&&(o(e.isCloned)||o(e.isOnce)))return void(e.componentInstance=t.componentInstance);var l,u=e.data;i(u)&&i(l=u.hook)&&i(l=l.prepatch)&&l(t,e);var c=t.children,p=e.children;if(i(u)&&m(e)){for(l=0;l<k.update.length;++l)k.update[l](t,e);i(l=u.hook)&&i(l=l.update)&&l(t,e)}n(e.text)?i(c)&&i(p)?c!==p&&w(s,c,p,r,a):i(p)?(i(t.text)&&L.setTextContent(s,""),g(s,null,p,0,p.length-1,r)):i(c)?x(s,c,0,c.length-1):i(t.text)&&L.setTextContent(s,""):t.text!==e.text&&L.setTextContent(s,e.text),i(u)&&i(l=u.hook)&&i(l=l.postpatch)&&l(t,e)}}function z(t,e,r){if(o(r)&&i(t.parent))t.parent.data.pendingInsert=e;else for(var n=0;n<e.length;++n)e[n].data.hook.insert(e[n])}function A(t,e,r){if(o(e.isComment)&&i(e.asyncFactory))return e.elm=t,e.isAsyncPlaceholder=!0,!0;e.elm=t;var n=e.tag,a=e.data,s=e.children;if(i(a)&&(i(C=a.hook)&&i(C=C.init)&&C(e,!0),i(C=e.componentInstance)))return c(e,r),!0;if(i(n)){if(i(s))if(t.hasChildNodes())if(i(C=a)&&i(C=C.domProps)&&i(C=C.innerHTML)){if(C!==t.innerHTML)return!1}else{for(var l=!0,u=t.firstChild,p=0;p<s.length;p++){if(!u||!A(u,s[p],r)){l=!1;break}u=u.nextSibling}if(!l||u)return!1}else f(e,s,r);if(i(a))for(var h in a)if(!I(h)){v(e,r);break}}else t.data!==e.text&&(t.data=e.text);return!0}var C,E,k={},M=t.modules,L=t.nodeOps;for(C=0;C<Ja.length;++C)for(k[Ja[C]]=[],E=0;E<M.length;++E)i(M[E][Ja[C]])&&k[Ja[C]].push(M[E][Ja[C]]);var I=d("attrs,style,class,staticClass,staticStyle,key");return function(t,r,a,s,u,c){if(n(r))return void(i(t)&&_(t));var p=!1,h=[];if(n(t))p=!0,l(r,h,u,c);else{var f=i(t.nodeType);if(!f&&cr(t,r))S(t,r,h,s);else{if(f){if(1===t.nodeType&&t.hasAttribute(co)&&(t.removeAttribute(co),a=!0),o(a)&&A(t,r,h))return z(r,h,!0),t;t=e(t)}var d=t.elm,v=L.parentNode(d);if(l(r,h,d._leaveCb?null:v,L.nextSibling(d)),i(r.parent))for(var y=r.parent,g=m(r);y;){for(var b=0;b<k.destroy.length;++b)k.destroy[b](y);if(y.elm=r.elm,g){for(var w=0;w<k.create.length;++w)k.create[w](Ka,y);var T=y.data.hook.insert;if(T.merged)for(var C=1;C<T.fns.length;C++)T.fns[C]()}else ur(y);y=y.parent}i(v)?x(v,[t],0,0):i(t.tag)&&_(t)}}return z(r,h,p),r.elm}}({nodeOps:Ha,modules:Cs});bo&&document.addEventListener("selectionchange",function(){var t=document.activeElement;t&&t.vmodel&&zn(t,"input")});var ks={inserted:function(t,e,r){"select"===r.tag?(_n(t,e,r.context),t._vOptions=[].map.call(t.options,wn)):("textarea"===r.tag||Wa(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("change",Sn),To||(t.addEventListener("compositionstart",Tn),t.addEventListener("compositionend",Sn)),bo&&(t.vmodel=!0)))},componentUpdated:function(t,e,r){if("select"===r.tag){_n(t,e,r.context);var n=t._vOptions,i=t._vOptions=[].map.call(t.options,wn);if(i.some(function(t,e){return!T(t,n[e])})){(t.multiple?e.value.some(function(t){return bn(t,i)}):e.value!==e.oldValue&&bn(e.value,i))&&zn(t,"change")}}}},Ms={bind:function(t,e,r){var n=e.value;r=An(r);var i=r.data&&r.data.transition,o=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;n&&i?(r.data.show=!0,dn(r,function(){t.style.display=o})):t.style.display=n?o:"none"},update:function(t,e,r){var n=e.value;n!==e.oldValue&&(r=An(r),r.data&&r.data.transition?(r.data.show=!0,n?dn(r,function(){t.style.display=t.__vOriginalDisplay}):mn(r,function(){t.style.display="none"})):t.style.display=n?t.__vOriginalDisplay:"none")},unbind:function(t,e,r,n,i){i||(t.style.display=t.__vOriginalDisplay)}},Ls={model:ks,show:Ms},Is={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]},Ps={name:"transition",props:Is,abstract:!0,render:function(t){var e=this,r=this.$options._renderChildren;if(r&&(r=r.filter(function(t){return t.tag||_t(t)}),r.length)){var n=this.mode,i=r[0];if(Mn(this.$vnode))return i;var o=Cn(i);if(!o)return i;if(this._leaving)return kn(t,i);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:s(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var l=(o.data||(o.data={})).transition=En(this),u=this._vnode,c=Cn(u);if(o.data.directives&&o.data.directives.some(function(t){return"show"===t.name})&&(o.data.show=!0),c&&c.data&&!Ln(o,c)&&!_t(c)){var p=c.data.transition=x({},l);if("out-in"===n)return this._leaving=!0,ut(p,"afterLeave",function(){e._leaving=!1,e.$forceUpdate()}),kn(t,i);if("in-out"===n){if(_t(o))return u;var h,f=function(){h()};ut(l,"afterEnter",f),ut(l,"enterCancelled",f),ut(p,"delayLeave",function(t){h=t})}}return i}}},Rs=x({tag:String,moveClass:String},Is);delete Rs.mode;var Ds={props:Rs,render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",r=Object.create(null),n=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=En(this),s=0;s<i.length;s++){var l=i[s];if(l.tag)if(null!=l.key&&0!==String(l.key).indexOf("__vlist"))o.push(l),r[l.key]=l,(l.data||(l.data={})).transition=a;else;}if(n){for(var u=[],c=[],p=0;p<n.length;p++){var h=n[p];h.data.transition=a,h.data.pos=h.elm.getBoundingClientRect(),r[h.key]?u.push(h):c.push(h)}this.kept=t(e,null,u),this.removed=c}return t(e,null,o)},beforeUpdate:function(){this.__patch__(this._vnode,this.kept,!1,!0),this._vnode=this.kept},updated:function(){var t=this.prevChildren,e=this.moveClass||(this.name||"v")+"-move";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach(In),t.forEach(Pn),t.forEach(Rn),this._reflow=document.body.offsetHeight,t.forEach(function(t){if(t.data.moved){var r=t.elm,n=r.style;ln(r,e),n.transform=n.WebkitTransform=n.transitionDuration="",r.addEventListener(xs,r._moveCb=function t(n){n&&!/transform$/.test(n.propertyName)||(r.removeEventListener(xs,t),r._moveCb=null,un(r,e))})}}))},methods:{hasMove:function(t,e){if(!vs)return!1;if(this._hasMove)return this._hasMove;var r=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach(function(t){on(r,t)}),nn(r,e),r.style.display="none",this.$el.appendChild(r);var n=pn(r);return this.$el.removeChild(r),this._hasMove=n.hasTransform}}},Os={Transition:Ps,TransitionGroup:Ds};Me.config.mustUseProp=Ra,Me.config.isReservedTag=Za,Me.config.isReservedAttr=Ia,Me.config.getTagNamespace=He,Me.config.isUnknownElement=Xe,x(Me.options.directives,Ls),x(Me.options.components,Os),Me.prototype.__patch__=go?Es:w,Me.prototype.$mount=function(t,e){return t=t&&go?Ke(t):void 0,kt(this,t,e)},Me.nextTick(function(){fo.devtools&&Lo&&Lo.emit("init",Me)},0);var Bs,Fs=!!go&&function(t,e){var r=document.createElement("div");return r.innerHTML='<div a="'+t+'"/>',r.innerHTML.indexOf(e)>0}("\n"," "),js=/\{\{((?:.|\n)+?)\}\}/g,Vs=/[-.*+?^${}()|[\]\/\\]/g,Ns=y(function(t){var e=t[0].replace(Vs,"\\$&"),r=t[1].replace(Vs,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+r,"g")}),Us={staticKeys:["staticClass"],transformNode:On,genData:Bn},$s={staticKeys:["staticStyle"],transformNode:Fn,genData:jn},qs={decode:function(t){return Bs=Bs||document.createElement("div"),Bs.innerHTML=t,Bs.textContent}},Zs=d("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),Gs=d("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),Ws=d("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Hs=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Xs="[a-zA-Z_][\\w\\-\\.]*",Ks="((?:"+Xs+"\\:)?"+Xs+")",Js=new RegExp("^<"+Ks),Ys=/^\s*(\/?)>/,Qs=new RegExp("^<\\/"+Ks+"[^>]*>"),tl=/^<!DOCTYPE [^>]+>/i,el=/^<!--/,rl=/^<!\[/,nl=!1;"x".replace(/x(.)?/g,function(t,e){nl=""===e});var il,ol,al,sl,ll,ul,cl,pl,hl,fl,dl=d("script,style,textarea",!0),ml={},vl={"<":"<",">":">",""":'"',"&":"&"," ":"\n"},yl=/&(?:lt|gt|quot|amp);/g,gl=/&(?:lt|gt|quot|amp|#10);/g,_l=d("pre,textarea",!0),xl=function(t,e){return t&&_l(t)&&"\n"===e[0]},bl=/^@|^v-on:/,wl=/^v-|^@|^:/,Tl=/(.*?)\s+(?:in|of)\s+(.*)/,Sl=/\((\{[^}]*\}|[^,]*),([^,]*)(?:,([^,]*))?\)/,zl=/:(.*)$/,Al=/^:|^v-bind:/,Cl=/\.[^.]+/g,El=y(qs.decode),kl=/^xmlns:NS\d+/,Ml=/^NS\d+:/,Ll={preTransformNode:ci},Il=[Us,$s,Ll],Pl={model:jr,text:fi,html:di},Rl={expectHTML:!0,modules:Il,directives:Pl,isPreTag:qa,isUnaryTag:Zs,mustUseProp:Ra,canBeLeftOpenTag:Gs,isReservedTag:Za,getTagNamespace:He,staticKeys:function(t){return t.reduce(function(t,e){return t.concat(e.staticKeys||[])},[]).join(",")}(Il)},Dl=y(vi),Ol=/^\s*([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/,Bl=/^\s*[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?']|\[".*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*\s*$/,Fl={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},jl=function(t){return"if("+t+")return null;"},Vl={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:jl("$event.target !== $event.currentTarget"),ctrl:jl("!$event.ctrlKey"),shift:jl("!$event.shiftKey"),alt:jl("!$event.altKey"),meta:jl("!$event.metaKey"),left:jl("'button' in $event && $event.button !== 0"),middle:jl("'button' in $event && $event.button !== 1"),right:jl("'button' in $event && $event.button !== 2")},Nl={on:zi,bind:Ai,cloak:w},Ul=function(t){this.options=t,this.warn=t.warn||Tr,this.transforms=Sr(t.modules,"transformCode"),this.dataGenFns=Sr(t.modules,"genData"),this.directives=x(x({},Nl),t.directives);var e=t.isReservedTag||lo;this.maybeComponent=function(t){return!e(t.tag)},this.onceId=0,this.staticRenderFns=[]},$l=(new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)"),function(t){return function(e){function r(r,n){var i=Object.create(e),o=[],a=[];if(i.warn=function(t,e){(e?a:o).push(t)},n){n.modules&&(i.modules=(e.modules||[]).concat(n.modules)),n.directives&&(i.directives=x(Object.create(e.directives),n.directives));for(var s in n)"modules"!==s&&"directives"!==s&&(i[s]=n[s])}var l=t(r,i);return l.errors=o,l.tips=a,l}return{compile:r,compileToFunctions:Ji(r)}}}(function(t,e){var r=$n(t.trim(),e);mi(r,e);var n=Ci(r,e);return{ast:r,render:n.render,staticRenderFns:n.staticRenderFns}})),ql=$l(Rl),Zl=ql.compileToFunctions,Gl=y(function(t){var e=Ke(t);return e&&e.innerHTML}),Wl=Me.prototype.$mount;Me.prototype.$mount=function(t,e){if((t=t&&Ke(t))===document.body||t===document.documentElement)return this;var r=this.$options;if(!r.render){var n=r.template;if(n)if("string"===typeof n)"#"===n.charAt(0)&&(n=Gl(n));else{if(!n.nodeType)return this;n=n.innerHTML}else t&&(n=Yi(t));if(n){var i=Zl(n,{shouldDecodeNewlines:Fs,delimiters:r.delimiters,comments:r.comments},this),o=i.render,a=i.staticRenderFns;r.render=o,r.staticRenderFns=a}}return Wl.call(this,t,e)},Me.compile=Zl,e.a=Me}).call(e,r(0),r(4).setImmediate)},function(t,e,r){function n(t,e){this._id=t,this._clearFn=e}var i=Function.prototype.apply;e.setTimeout=function(){return new n(i.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new n(i.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},n.prototype.unref=n.prototype.ref=function(){},n.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},r(5),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,r){(function(t,e){!function(t,r){"use strict";function n(t){"function"!==typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r<e.length;r++)e[r]=arguments[r+1];var n={callback:t,args:e};return u[l]=n,s(l),l++}function i(t){delete u[t]}function o(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(r,n)}}function a(t){if(c)setTimeout(a,0,t);else{var e=u[t];if(e){c=!0;try{o(e)}finally{i(t),c=!1}}}}if(!t.setImmediate){var s,l=1,u={},c=!1,p=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?function(){s=function(t){e.nextTick(function(){a(t)})}}():function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?function(){var e="setImmediate$"+Math.random()+"$",r=function(r){r.source===t&&"string"===typeof r.data&&0===r.data.indexOf(e)&&a(+r.data.slice(e.length))};t.addEventListener?t.addEventListener("message",r,!1):t.attachEvent("onmessage",r),s=function(r){t.postMessage(e+r,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){a(t.data)},s=function(e){t.port2.postMessage(e)}}():p&&"onreadystatechange"in p.createElement("script")?function(){var t=p.documentElement;s=function(e){var r=p.createElement("script");r.onreadystatechange=function(){a(e),r.onreadystatechange=null,t.removeChild(r),r=null},t.appendChild(r)}}():function(){s=function(t){setTimeout(a,0,t)}}(),h.setImmediate=n,h.clearImmediate=i}}("undefined"===typeof self?"undefined"===typeof t?this:t:self)}).call(e,r(0),r(6))},function(t,e){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(t){if(c===setTimeout)return setTimeout(t,0);if((c===r||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(p===clearTimeout)return clearTimeout(t);if((p===n||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(t);try{return p(t)}catch(e){try{return p.call(null,t)}catch(e){return p.call(this,t)}}}function a(){m&&f&&(m=!1,f.length?d=f.concat(d):v=-1,d.length&&s())}function s(){if(!m){var t=i(a);m=!0;for(var e=d.length;e;){for(f=d,d=[];++v<e;)f&&f[v].run();v=-1,e=d.length}f=null,m=!1,o(t)}}function l(t,e){this.fun=t,this.array=e}function u(){}var c,p,h=t.exports={};!function(){try{c="function"===typeof setTimeout?setTimeout:r}catch(t){c=r}try{p="function"===typeof clearTimeout?clearTimeout:n}catch(t){p=n}}();var f,d=[],m=!1,v=-1;h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];d.push(new l(t,e)),1!==d.length||m||i(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=u,h.addListener=u,h.once=u,h.off=u,h.removeListener=u,h.removeAllListeners=u,h.emit=u,h.prependListener=u,h.prependOnceListener=u,h.listeners=function(t){return[]},h.binding=function(t){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(t){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(t,e,r){"use strict";function n(t){r(8)}var i=r(14),o=r(16),a=r(13),s=n,l=a(i.a,o.a,!1,s,null,null);e.a=l.exports},function(t,e,r){var n=r(9);"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);r(11)("1cc1a7d4",n,!0)},function(t,e,r){e=t.exports=r(10)(void 0),e.push([t.i,"#geshem #datetime{position:absolute;margin:20px 0 0 20px;color:#fff;font-family:monospace}#geshem #datetime #date{font-size:1.4em}#geshem #datetime #time{font-size:1.8em}#geshem #slider{position:absolute;bottom:8vh;width:30vw;margin-left:35vw}@media only screen and (max-device-width:812px){#geshem #slider{width:80vw;margin-left:8vw}}",""])},function(t,e){function r(t,e){var r=t[1]||"",i=t[3];if(!i)return r;if(e&&"function"===typeof btoa){var o=n(i);return[r].concat(i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"})).concat([o]).join("\n")}return[r].join("\n")}function n(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=r(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,r){"string"===typeof t&&(t=[[null,t,""]]);for(var n={},i=0;i<this.length;i++){var o=this[i][0];"number"===typeof o&&(n[o]=!0)}for(i=0;i<t.length;i++){var a=t[i];"number"===typeof a[0]&&n[a[0]]||(r&&!a[2]?a[2]=r:r&&(a[2]="("+a[2]+") and ("+r+")"),e.push(a))}},e}},function(t,e,r){function n(t){for(var e=0;e<t.length;e++){var r=t[e],n=c[r.id];if(n){n.refs++;for(var i=0;i<n.parts.length;i++)n.parts[i](r.parts[i]);for(;i<r.parts.length;i++)n.parts.push(o(r.parts[i]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{for(var a=[],i=0;i<r.parts.length;i++)a.push(o(r.parts[i]));c[r.id]={id:r.id,refs:1,parts:a}}}}function i(){var t=document.createElement("style");return t.type="text/css",p.appendChild(t),t}function o(t){var e,r,n=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(n){if(d)return m;n.parentNode.removeChild(n)}if(v){var o=f++;n=h||(h=i()),e=a.bind(null,n,o,!1),r=a.bind(null,n,o,!0)}else n=i(),e=s.bind(null,n),r=function(){n.parentNode.removeChild(n)};return e(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;e(t=n)}else r()}}function a(t,e,r,n){var i=r?"":n.css;if(t.styleSheet)t.styleSheet.cssText=y(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function s(t,e){var r=e.css,n=e.media,i=e.sourceMap;if(n&&t.setAttribute("media",n),i&&(r+="\n/*# sourceURL="+i.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}var l="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!l)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var u=r(12),c={},p=l&&(document.head||document.getElementsByTagName("head")[0]),h=null,f=0,d=!1,m=function(){},v="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());t.exports=function(t,e,r){d=r;var i=u(t,e);return n(i),function(e){for(var r=[],o=0;o<i.length;o++){var a=i[o],s=c[a.id];s.refs--,r.push(s)}e?(i=u(t,e),n(i)):i=[];for(var o=0;o<r.length;o++){var s=r[o];if(0===s.refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete c[s.id]}}}};var y=function(){var t=[];return function(e,r){return t[e]=r,t.filter(Boolean).join("\n")}}()},function(t,e){t.exports=function(t,e){for(var r=[],n={},i=0;i<e.length;i++){var o=e[i],a=o[0],s=o[1],l=o[2],u=o[3],c={id:t+":"+i,css:s,media:l,sourceMap:u};n[a]?n[a].parts.push(c):r.push(n[a]={id:a,parts:[c]})}return r}},function(t,e){t.exports=function(t,e,r,n,i,o){var a,s=t=t||{},l=typeof t.default;"object"!==l&&"function"!==l||(a=t,s=t.default);var u="function"===typeof s?s.options:s;e&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId=i);var c;if(o?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},u._ssrRegister=c):n&&(c=n),c){var p=u.functional,h=p?u.render:u.beforeCreate;p?(u._injectStyles=c,u.render=function(t,e){return c.call(e),h(t,e)}):u.beforeCreate=h?[].concat(h,c):[c]}return{esModule:a,exports:s,options:u}}},function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var i=r(15),o=r.n(i),a=r(1),s=r.n(a);e.a={name:"geshem",components:{"vue-slider":o.a},data:function(){var t;return{imgs:window.imgs,res:280,slider:7,rasterCoords:{140:[[33.35317413,33.27232471],[36.32243686,33.27232471],[36.32243686,30.72293428],[33.35317413,30.72293428]],280:[[31.93095218,34.5156862],[37.86644267,34.5156862],[37.86644267,29.42911589],[31.93095218,29.42911589]]},map:new s.a.Map((t={container:"map",style:"mapbox://styles/mapbox/dark-v9"},n(t,"container","map"),n(t,"maxZoom",10),n(t,"minZoom",5),n(t,"zoom",6.3),n(t,"center",[35,31.9]),n(t,"hash",!1),t))}},computed:{date:function(){var t=this.imgs[this.res][7-this.slider].substr(0,8);return t.substr(6,2)+"-"+t.substr(4,2)+"-"+t.substr(0,4)},time:function(){var t=this.imgs[this.res][7-this.slider].substr(9,6);return t.substr(0,2)+":"+t.substr(2,2)},curImg:function(){return 7-this.slider}},created:function(){var t=this;this.map.on("style.load",function(){for(var e=0;e<t.imgs[140].length;)t.addRadarSource("140",e,t.imgs[140][e++]);for(var e=0;e<t.imgs[280].length;)t.addRadarSource("280",e,t.imgs[280][e++]);t.addRadarLayer("280",0)}),this.map.on("zoom",function(){var e=t.map.getZoom()>7,r=e?"280":"140",n=e?"140":"280";n!=t.res&&(console.log("Zoom event from "+r+" to "+n),t.removeRadarLayer(r,t.curImg),t.addRadarLayer(n,t.curImg),t.res=n)})},methods:{addRadarSource:function(t,e,r){this.map.addSource("radar-"+t+"-"+e,{type:"image",url:"/static/img/"+r,coordinates:this.rasterCoords[t]})},addRadarLayer:function(t,e){this.map.addLayer({id:"radar-"+t+"-"+e,source:"radar-"+t+"-"+e,type:"raster",paint:{"raster-opacity":.85}})},removeRadarLayer:function(t,e){this.map.removeLayer("radar-"+t+"-"+e)}},watch:{slider:function(t,e){this.removeRadarLayer(this.res,7-e),this.addRadarLayer(this.res,7-t)}}}},function(t,e,r){!function(e,r){t.exports=r()}(0,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=2)}([function(t,e,r){r(7);var n=r(5)(r(1),r(6),null,null);t.exports=n.exports},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={data:function(){return{flag:!1,size:0,currentValue:0,currentSlider:0,dotWidthVal:"number"==typeof this.dotWidth?this.dotWidth:this.dotSize,dotHeightVal:"number"==typeof this.dotHeight?this.dotHeight:this.dotSize}},props:{width:{type:[Number,String],default:"auto"},height:{type:[Number,String],default:6},data:{type:Array,default:null},dotSize:{type:Number,default:16},dotWidth:{type:Number,required:!1},dotHeight:{type:Number,required:!1},min:{type:Number,default:0},max:{type:Number,default:100},interval:{type:Number,default:1},show:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},piecewise:{type:Boolean,default:!1},tooltip:{type:[String,Boolean],default:"always"},eventType:{type:String,default:"auto"},direction:{type:String,default:"horizontal"},reverse:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},clickable:{type:Boolean,default:!0},speed:{type:Number,default:.5},realTime:{type:Boolean,default:!1},value:{type:[String,Number,Array],default:0},piecewiseLabel:{type:Boolean,default:!1},sliderStyle:[Array,Object],tooltipDir:[Array,String],formatter:[String,Function],piecewiseStyle:Object,piecewiseActiveStyle:Object,processStyle:Object,bgStyle:Object,tooltipStyle:[Array,Object],labelStyle:Object,labelActiveStyle:Object},computed:{flowDirection:function(){return"vue-slider-"+this.direction+(this.reverse?"-reverse":"")},tooltipDirection:function(){var t=this.tooltipDir||("vertical"===this.direction?"left":"top");return Array.isArray(t)?this.isRange?t:t[1]:this.isRange?[t,t]:t},tooltipStatus:function(){return"hover"===this.tooltip&&this.flag?"vue-slider-always":this.tooltip?"vue-slider-"+this.tooltip:""},tooltipClass:function(){return["vue-slider-tooltip-"+this.tooltipDirection,"vue-slider-tooltip"]},isDisabled:function(){return"none"===this.eventType||this.disabled},disabledClass:function(){return this.disabled?"vue-slider-disabled":""},isRange:function(){return Array.isArray(this.value)},slider:function(){return this.isRange?[this.$refs.dot0,this.$refs.dot1]:this.$refs.dot},minimum:function(){return this.data?0:this.min},val:{get:function(){return this.data?this.isRange?[this.data[this.currentValue[0]],this.data[this.currentValue[1]]]:this.data[this.currentValue]:this.currentValue},set:function(t){if(this.data)if(this.isRange){var e=this.data.indexOf(t[0]),r=this.data.indexOf(t[1]);e>-1&&r>-1&&(this.currentValue=[e,r])}else{var n=this.data.indexOf(t);n>-1&&(this.currentValue=n)}else this.currentValue=t}},currentIndex:function(){return this.isRange?this.data?this.currentValue:[(this.currentValue[0]-this.minimum)/this.spacing,(this.currentValue[1]-this.minimum)/this.spacing]:(this.currentValue-this.minimum)/this.spacing},indexRange:function(){return this.isRange?this.currentIndex:[0,this.currentIndex]},maximum:function(){return this.data?this.data.length-1:this.max},multiple:function(){var t=(""+this.interval).split(".")[1];return t?Math.pow(10,t.length):1},spacing:function(){return this.data?1:this.interval},total:function(){return this.data?this.data.length-1:(~~((this.maximum-this.minimum)*this.multiple)%(this.interval*this.multiple)!=0&&console.error("[Vue-slider warn]: Prop[interval] is illegal, Please make sure that the interval can be divisible"),(this.maximum-this.minimum)/this.interval)},gap:function(){return this.size/this.total},position:function(){return this.isRange?[(this.currentValue[0]-this.minimum)/this.spacing*this.gap,(this.currentValue[1]-this.minimum)/this.spacing*this.gap]:(this.currentValue-this.minimum)/this.spacing*this.gap},limit:function(){return this.isRange?[[0,this.position[1]],[this.position[0],this.size]]:[0,this.size]},valueLimit:function(){return this.isRange?[[this.minimum,this.currentValue[1]],[this.currentValue[0],this.maximum]]:[this.minimum,this.maximum]},wrapStyles:function(){return"vertical"===this.direction?{height:"number"==typeof this.height?this.height+"px":this.height,padding:this.dotHeightVal/2+"px "+this.dotWidthVal/2+"px"}:{width:"number"==typeof this.width?this.width+"px":this.width,padding:this.dotHeightVal/2+"px "+this.dotWidthVal/2+"px"}},sliderStyles:function(){return Array.isArray(this.sliderStyle)?this.isRange?this.sliderStyle:this.sliderStyle[1]:this.isRange?[this.sliderStyle,this.sliderStyle]:this.sliderStyle},tooltipStyles:function(){return Array.isArray(this.tooltipStyle)?this.isRange?this.tooltipStyle:this.tooltipStyle[1]:this.isRange?[this.tooltipStyle,this.tooltipStyle]:this.tooltipStyle},elemStyles:function(){return"vertical"===this.direction?{width:this.width+"px",height:"100%"}:{height:this.height+"px"}},dotStyles:function(){return"vertical"===this.direction?{width:this.dotWidthVal+"px",height:this.dotHeightVal+"px",left:-(this.dotWidthVal-this.width)/2+"px"}:{width:this.dotWidthVal+"px",height:this.dotHeightVal+"px",top:-(this.dotHeightVal-this.height)/2+"px"}},piecewiseDotStyle:function(){return"vertical"===this.direction?{width:this.width+"px",height:this.width+"px"}:{width:this.height+"px",height:this.height+"px"}},piecewiseDotWrap:function(){if(!this.piecewise&&!this.piecewiseLabel)return!1;for(var t=[],e=0;e<=this.total;e++){var r="vertical"===this.direction?{bottom:this.gap*e-this.width/2+"px",left:0}:{left:this.gap*e-this.height/2+"px",top:0},n=this.reverse?this.total-e:e,i=this.data?this.data[n]:this.spacing*n+this.min;t.push({style:r,label:this.formatter?this.formatting(i):i,inRange:n>=this.indexRange[0]&&n<=this.indexRange[1]})}return t}},watch:{value:function(t){this.flag||this.setValue(t,!0)},max:function(t){var e=this.limitValue(this.val);!1!==e&&this.setValue(e),this.refresh()},min:function(t){var e=this.limitValue(this.val);!1!==e&&this.setValue(e),this.refresh()},show:function(t){var e=this;t&&!this.size&&this.$nextTick(function(){e.refresh()})}},methods:{bindEvents:function(){document.addEventListener("touchmove",this.moving,{passive:!1}),document.addEventListener("touchend",this.moveEnd,{passive:!1}),document.addEventListener("mousemove",this.moving),document.addEventListener("mouseup",this.moveEnd),document.addEventListener("mouseleave",this.moveEnd),window.addEventListener("resize",this.refresh)},unbindEvents:function(){window.removeEventListener("resize",this.refresh),document.removeEventListener("touchmove",this.moving),document.removeEventListener("touchend",this.moveEnd),document.removeEventListener("mousemove",this.moving),document.removeEventListener("mouseup",this.moveEnd),document.removeEventListener("mouseleave",this.moveEnd)},formatting:function(t){return"string"==typeof this.formatter?this.formatter.replace(/\{value\}/,t):this.formatter(t)},getPos:function(t){return this.realTime&&this.getStaticData(),"vertical"===this.direction?this.reverse?t.pageY-this.offset:this.size-(t.pageY-this.offset):this.reverse?this.size-(t.clientX-this.offset):t.clientX-this.offset},wrapClick:function(t){if(this.isDisabled||!this.clickable)return!1;var e=this.getPos(t);this.isRange&&(this.currentSlider=e>(this.position[1]-this.position[0])/2+this.position[0]?1:0),this.setValueOnPos(e)},moveStart:function(t){if(this.isDisabled)return!1;this.isRange&&(this.currentSlider=t),this.flag=!0,this.$emit("drag-start",this)},moving:function(t){if(!this.flag)return!1;t.preventDefault(),t.targetTouches&&t.targetTouches[0]&&(t=t.targetTouches[0]),this.setValueOnPos(this.getPos(t),!0)},moveEnd:function(t){if(!this.flag)return!1;this.$emit("drag-end",this),this.lazy&&this.isDiff(this.val,this.value)&&this.syncValue(),this.flag=!1,this.setPosition()},setValueOnPos:function(t,e){var r=this.isRange?this.limit[this.currentSlider]:this.limit,n=this.isRange?this.valueLimit[this.currentSlider]:this.valueLimit;if(t>=r[0]&&t<=r[1]){this.setTransform(t);var i=(Math.round(t/this.gap)*(this.spacing*this.multiple)+this.minimum*this.multiple)/this.multiple;this.setCurrentValue(i,e)}else t<r[0]?(this.setTransform(r[0]),this.setCurrentValue(n[0]),1===this.currentSlider&&(this.currentSlider=0)):(this.setTransform(r[1]),this.setCurrentValue(n[1]),0===this.currentSlider&&(this.currentSlider=1))},isDiff:function(t,e){return Object.prototype.toString.call(t)!==Object.prototype.toString.call(e)||(Array.isArray(t)&&t.length===e.length?t.some(function(t,r){return t!==e[r]}):t!==e)},setCurrentValue:function(t,e){if(t<this.minimum||t>this.maximum)return!1;this.isRange?this.isDiff(this.currentValue[this.currentSlider],t)&&(this.currentValue.splice(this.currentSlider,1,t),this.lazy&&this.flag||this.syncValue()):this.isDiff(this.currentValue,t)&&(this.currentValue=t,this.lazy&&this.flag||this.syncValue()),e||this.setPosition()},setIndex:function(t){if(Array.isArray(t)&&this.isRange){var e=void 0;e=this.data?[this.data[t[0]],this.data[t[1]]]:[this.spacing*t[0]+this.minimum,this.spacing*t[1]+this.minimum],this.setValue(e)}else t=this.spacing*t+this.minimum,this.isRange&&(this.currentSlider=t>(this.currentValue[1]-this.currentValue[0])/2+this.currentValue[0]?1:0),this.setCurrentValue(t)},setValue:function(t,e,r){var n=this;if(this.isDiff(this.val,t)){var i=this.limitValue(t);this.val=!1!==i?this.isRange?i.concat():i:this.isRange?t.concat():t,this.syncValue(e)}this.$nextTick(function(){return n.setPosition(r)})},setPosition:function(t){this.flag||this.setTransitionTime(void 0===t?this.speed:t),this.isRange?(this.currentSlider=0,this.setTransform(this.position[this.currentSlider]),this.currentSlider=1,this.setTransform(this.position[this.currentSlider])):this.setTransform(this.position),this.flag||this.setTransitionTime(0)},setTransform:function(t){var e=("vertical"===this.direction?this.dotHeightVal/2-t:t-this.dotWidthVal/2)*(this.reverse?-1:1),r="vertical"===this.direction?"translateY("+e+"px)":"translateX("+e+"px)",n=(0===this.currentSlider?this.position[1]-t:t-this.position[0])+"px",i=(0===this.currentSlider?t:this.position[0])+"px";this.isRange?(this.slider[this.currentSlider].style.transform=r,this.slider[this.currentSlider].style.WebkitTransform=r,this.slider[this.currentSlider].style.msTransform=r,"vertical"===this.direction?(this.$refs.process.style.height=n,this.$refs.process.style[this.reverse?"top":"bottom"]=i):(this.$refs.process.style.width=n,this.$refs.process.style[this.reverse?"right":"left"]=i)):(this.slider.style.transform=r,this.slider.style.WebkitTransform=r,this.slider.style.msTransform=r,"vertical"===this.direction?(this.$refs.process.style.height=t+"px",this.$refs.process.style[this.reverse?"top":"bottom"]=0):(this.$refs.process.style.width=t+"px",this.$refs.process.style[this.reverse?"right":"left"]=0))},setTransitionTime:function(t){if(t||this.$refs.process.offsetWidth,this.isRange){for(var e=0;e<this.slider.length;e++)this.slider[e].style.transitionDuration=t+"s",this.slider[e].style.WebkitTransitionDuration=t+"s";this.$refs.process.style.transitionDuration=t+"s",this.$refs.process.style.WebkitTransitionDuration=t+"s"}else this.slider.style.transitionDuration=t+"s",this.slider.style.WebkitTransitionDuration=t+"s",this.$refs.process.style.transitionDuration=t+"s",this.$refs.process.style.WebkitTransitionDuration=t+"s"},limitValue:function(t){var e=this;if(this.data)return t;var r=!1;return this.isRange?t=t.map(function(t){return t<e.min?(r=!0,e.min):t>e.max?(r=!0,e.max):t}):t>this.max?(r=!0,t=this.max):t<this.min&&(r=!0,t=this.min),r&&t},syncValue:function(t){t||this.$emit("callback",this.val),this.$emit("input",this.isRange?this.val.concat():this.val)},getValue:function(){return this.val},getIndex:function(){return this.currentIndex},getStaticData:function(){this.$refs.elem&&(this.size="vertical"===this.direction?this.$refs.elem.offsetHeight:this.$refs.elem.offsetWidth,this.offset="vertical"===this.direction?this.$refs.elem.getBoundingClientRect().top+window.pageYOffset||document.documentElement.scrollTop:this.$refs.elem.getBoundingClientRect().left)},refresh:function(){this.$refs.elem&&(this.getStaticData(),this.setPosition())}},mounted:function(){var t=this;"undefined"!=typeof window&&"undefined"!=typeof document&&this.$nextTick(function(){t.getStaticData(),t.setValue(t.value,!0,0),t.bindEvents()})},beforeDestroy:function(){this.unbindEvents()}}},function(t,e,r){"use strict";var n=r(0);t.exports=n},function(t,e,r){e=t.exports=r(4)(),e.push([t.i,'.vue-slider-component{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vue-slider-component.vue-slider-disabled{opacity:.5;cursor:not-allowed}.vue-slider-component.vue-slider-has-label{margin-bottom:15px}.vue-slider-component.vue-slider-disabled .vue-slider-dot{cursor:not-allowed}.vue-slider-component .vue-slider{position:relative;display:block;border-radius:15px;background-color:#ccc}.vue-slider-component .vue-slider:after{content:"";position:absolute;left:0;top:0;width:100%;height:100%;z-index:2}.vue-slider-component .vue-slider-process{position:absolute;border-radius:15px;background-color:#3498db;-webkit-transition:all 0s;transition:all 0s;z-index:1}.vue-slider-component.vue-slider-horizontal .vue-slider-process{width:0;height:100%;top:0;left:0;will-change:width}.vue-slider-component.vue-slider-vertical .vue-slider-process{width:100%;height:0;bottom:0;left:0;will-change:height}.vue-slider-component.vue-slider-horizontal-reverse .vue-slider-process{width:0;height:100%;top:0;right:0}.vue-slider-component.vue-slider-vertical-reverse .vue-slider-process{width:100%;height:0;top:0;left:0}.vue-slider-component .vue-slider-dot{position:absolute;border-radius:50%;background-color:#fff;-webkit-box-shadow:.5px .5px 2px 1px rgba(0,0,0,.32);box-shadow:.5px .5px 2px 1px rgba(0,0,0,.32);-webkit-transition:all 0s;transition:all 0s;will-change:transform;cursor:pointer;z-index:3}.vue-slider-component.vue-slider-horizontal .vue-slider-dot{left:0}.vue-slider-component.vue-slider-vertical .vue-slider-dot{bottom:0}.vue-slider-component.vue-slider-horizontal-reverse .vue-slider-dot{right:0}.vue-slider-component.vue-slider-vertical-reverse .vue-slider-dot{top:0}.vue-slider-component .vue-slider-tooltip-wrap{display:none;position:absolute;z-index:9}.vue-slider-component .vue-slider-tooltip{display:block;font-size:14px;white-space:nowrap;padding:2px 5px;min-width:20px;text-align:center;color:#fff;border-radius:5px;border:1px solid #3498db;background-color:#3498db}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-top{top:-9px;left:50%;-webkit-transform:translate(-50%,-100%);transform:translate(-50%,-100%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-bottom{bottom:-9px;left:50%;-webkit-transform:translate(-50%,100%);transform:translate(-50%,100%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-left{top:50%;left:-9px;-webkit-transform:translate(-100%,-50%);transform:translate(-100%,-50%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-right{top:50%;right:-9px;-webkit-transform:translate(100%,-50%);transform:translate(100%,-50%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-top .vue-slider-tooltip:before{content:"";position:absolute;bottom:-10px;left:50%;width:0;height:0;border:5px solid transparent;border:6px solid transparent\\0;border-top-color:inherit;-webkit-transform:translate(-50%);transform:translate(-50%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-bottom .vue-slider-tooltip:before{content:"";position:absolute;top:-10px;left:50%;width:0;height:0;border:5px solid transparent;border:6px solid transparent\\0;border-bottom-color:inherit;-webkit-transform:translate(-50%);transform:translate(-50%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-left .vue-slider-tooltip:before{content:"";position:absolute;top:50%;right:-10px;width:0;height:0;border:5px solid transparent;border:6px solid transparent\\0;border-left-color:inherit;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-right .vue-slider-tooltip:before{content:"";position:absolute;top:50%;left:-10px;width:0;height:0;border:5px solid transparent;border:6px solid transparent\\0;border-right-color:inherit;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.vue-slider-component .vue-slider-dot.vue-slider-hover:hover .vue-slider-tooltip-wrap{display:block}.vue-slider-component .vue-slider-dot.vue-slider-always .vue-slider-tooltip-wrap{display:block!important}.vue-slider-component .vue-slider-piecewise{position:absolute;width:100%;padding:0;margin:0;left:0;top:0;height:100%;list-style:none}.vue-slider-component .vue-slider-piecewise-item{position:absolute;width:8px;height:8px}.vue-slider-component .vue-slider-piecewise-dot{position:absolute;left:50%;top:50%;width:100%;height:100%;display:inline-block;background-color:rgba(0,0,0,.16);border-radius:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:2;-webkit-transition:all .3s;transition:all .3s}.vue-slider-component .vue-slider-piecewise-item:first-child .vue-slider-piecewise-dot,.vue-slider-component .vue-slider-piecewise-item:last-child .vue-slider-piecewise-dot{visibility:hidden}.vue-slider-component.vue-slider-horizontal-reverse .vue-slider-piecewise-label,.vue-slider-component.vue-slider-horizontal .vue-slider-piecewise-label{position:absolute;display:inline-block;top:100%;left:50%;white-space:nowrap;font-size:12px;color:#333;-webkit-transform:translate(-50%,8px);transform:translate(-50%,8px);visibility:visible}.vue-slider-component.vue-slider-vertical-reverse .vue-slider-piecewise-label,.vue-slider-component.vue-slider-vertical .vue-slider-piecewise-label{position:absolute;display:inline-block;top:50%;left:100%;white-space:nowrap;font-size:12px;color:#333;-webkit-transform:translate(8px,-50%);transform:translate(8px,-50%);visibility:visible}.vue-slider-component .vue-slider-sr-only{clip:rect(1px,1px,1px,1px);height:1px;width:1px;overflow:hidden;position:absolute!important}',""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var r=this[e];r[2]?t.push("@media "+r[2]+"{"+r[1]+"}"):t.push(r[1])}return t.join("")},t.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(n[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&n[a[0]]||(r&&!a[2]?a[2]=r:r&&(a[2]="("+a[2]+") and ("+r+")"),t.push(a))}},t}},function(t,e){t.exports=function(t,e,r,n){var i,o=t=t||{},a=typeof t.default;"object"!==a&&"function"!==a||(i=t,o=t.default);var s="function"==typeof o?o.options:o;if(e&&(s.render=e.render,s.staticRenderFns=e.staticRenderFns),r&&(s._scopeId=r),n){var l=Object.create(s.computed||null);Object.keys(n).forEach(function(t){var e=n[t];l[t]=function(){return e}}),s.computed=l}return{esModule:i,exports:o,options:s}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"show"}],ref:"wrap",class:["vue-slider-component",t.flowDirection,t.disabledClass,{"vue-slider-has-label":t.piecewiseLabel}],style:t.wrapStyles,on:{click:t.wrapClick}},[r("div",{ref:"elem",staticClass:"vue-slider",style:[t.elemStyles,t.bgStyle],attrs:{"aria-hidden":"true"}},[t.isRange?[r("div",{ref:"dot0",class:[t.tooltipStatus,"vue-slider-dot"],style:[t.dotStyles,t.sliderStyles[0]],on:{mousedown:function(e){t.moveStart(0)},touchstart:function(e){t.moveStart(0)}}},[r("span",{class:["vue-slider-tooltip-"+t.tooltipDirection[0],"vue-slider-tooltip-wrap"]},[t._t("tooltip",[r("span",{staticClass:"vue-slider-tooltip",style:t.tooltipStyles[0]},[t._v(t._s(t.formatter?t.formatting(t.val[0]):t.val[0]))])],{value:t.val[0],index:0})],2)]),t._v(" "),r("div",{ref:"dot1",class:[t.tooltipStatus,"vue-slider-dot"],style:[t.dotStyles,t.sliderStyles[1]],on:{mousedown:function(e){t.moveStart(1)},touchstart:function(e){t.moveStart(1)}}},[r("span",{class:["vue-slider-tooltip-"+t.tooltipDirection[1],"vue-slider-tooltip-wrap"]},[t._t("tooltip",[r("span",{staticClass:"vue-slider-tooltip",style:t.tooltipStyles[1]},[t._v(t._s(t.formatter?t.formatting(t.val[1]):t.val[1]))])],{value:t.val[1],index:1})],2)])]:[r("div",{ref:"dot",class:[t.tooltipStatus,"vue-slider-dot"],style:[t.dotStyles,t.sliderStyles],on:{mousedown:t.moveStart,touchstart:t.moveStart}},[r("span",{class:["vue-slider-tooltip-"+t.tooltipDirection,"vue-slider-tooltip-wrap"]},[t._t("tooltip",[r("span",{staticClass:"vue-slider-tooltip",style:t.tooltipStyles},[t._v(t._s(t.formatter?t.formatting(t.val):t.val))])],{value:t.val})],2)])],t._v(" "),r("ul",{staticClass:"vue-slider-piecewise"},t._l(t.piecewiseDotWrap,function(e,n){return r("li",{key:n,staticClass:"vue-slider-piecewise-item",style:[t.piecewiseDotStyle,e.style]},[t._t("piecewise",[t.piecewise?r("span",{staticClass:"vue-slider-piecewise-dot",style:[t.piecewiseStyle,e.inRange?t.piecewiseActiveStyle:null]}):t._e()],{label:e.label,index:n,first:0===n,last:n===t.piecewiseDotWrap.length-1}),t._v(" "),t._t("label",[t.piecewiseLabel?r("span",{staticClass:"vue-slider-piecewise-label",style:[t.labelStyle,e.inRange?t.labelActiveStyle:null]},[t._v("\n\t\t\t\t\t\t"+t._s(e.label)+"\n\t\t\t\t\t")]):t._e()],{label:e.label,index:n,first:0===n,last:n===t.piecewiseDotWrap.length-1})],2)})),t._v(" "),r("div",{ref:"process",staticClass:"vue-slider-process",style:t.processStyle})],2),t._v(" "),t.isRange||t.data?t._e():r("input",{directives:[{name:"model",rawName:"v-model",value:t.val,expression:"val"}],staticClass:"vue-slider-sr-only",attrs:{type:"range",min:t.min,max:t.max},domProps:{value:t.val},on:{__r:function(e){t.val=e.target.value}}})])},staticRenderFns:[]}},function(t,e,r){var n=r(3);"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals),r(8)("743d98f5",n,!0)},function(t,e,r){function n(t){for(var e=0;e<t.length;e++){var r=t[e],n=c[r.id];if(n){n.refs++;for(var i=0;i<n.parts.length;i++)n.parts[i](r.parts[i]);for(;i<r.parts.length;i++)n.parts.push(o(r.parts[i]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{for(var a=[],i=0;i<r.parts.length;i++)a.push(o(r.parts[i]));c[r.id]={id:r.id,refs:1,parts:a}}}}function i(){var t=document.createElement("style");return t.type="text/css",p.appendChild(t),t}function o(t){var e,r,n=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(n){if(d)return m;n.parentNode.removeChild(n)}if(v){var o=f++;n=h||(h=i()),e=a.bind(null,n,o,!1),r=a.bind(null,n,o,!0)}else n=i(),e=s.bind(null,n),r=function(){n.parentNode.removeChild(n)};return e(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;e(t=n)}else r()}}function a(t,e,r,n){var i=r?"":n.css;if(t.styleSheet)t.styleSheet.cssText=y(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function s(t,e){var r=e.css,n=e.media,i=e.sourceMap;if(n&&t.setAttribute("media",n),i&&(r+="\n/*# sourceURL="+i.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}var l="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!l)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var u=r(9),c={},p=l&&(document.head||document.getElementsByTagName("head")[0]),h=null,f=0,d=!1,m=function(){},v="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());t.exports=function(t,e,r){d=r;var i=u(t,e);return n(i),function(e){for(var r=[],o=0;o<i.length;o++){var a=i[o],s=c[a.id];s.refs--,r.push(s)}e?(i=u(t,e),n(i)):i=[];for(var o=0;o<r.length;o++){var s=r[o];if(0===s.refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete c[s.id]}}}};var y=function(){var t=[];return function(e,r){return t[e]=r,t.filter(Boolean).join("\n")}}()},function(t,e){t.exports=function(t,e){for(var r=[],n={},i=0;i<e.length;i++){var o=e[i],a=o[0],s=o[1],l=o[2],u=o[3],c={id:t+":"+i,css:s,media:l,sourceMap:u};n[a]?n[a].parts.push(c):r.push(n[a]={id:a,parts:[c]})}return r}}])})},function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{attrs:{id:"geshem"}},[r("div",{attrs:{id:"datetime"}},[r("div",{attrs:{id:"date"}},[t._v(t._s(t.date))]),t._v(" "),r("div",{attrs:{id:"time"}},[t._v(t._s(t.time))])]),t._v(" "),r("div",{attrs:{id:"slider"}},[r("vue-slider",{ref:"slider",attrs:{min:1,max:7,height:20,"dot-size":45,tooltip:!1},model:{value:t.slider,callback:function(e){t.slider=e},expression:"slider"}})],1)])},i=[],o={render:n,staticRenderFns:i};e.a=o}]); //# sourceMappingURL=build.js.map
\ No newline at end of file |
