returnthis.subarray(t,e)},copy:function(t,e){e=e||0;for(varr=0;r<this.length;r++)t[e+r]=this[r]}},BufferMethods.writeInt32LE=BufferMethods.writeUInt32LE,Buffer.byteLength=function(t){returnlastStr=t,lastStrEncoded=encodeString(t),lastStrEncoded.length},Buffer.isBuffer=function(t){return!(!t||!t._isBuffer)}},{ieee754:17}],25:[function(require,module,exports){(function(global){"use strict";functionPbf(t){this.buf=Buffer.isBuffer(t)?t:newBuffer(t||0),this.pos=0,this.length=this.buf.length}functionreadVarintRemainder(t,i){vare,r=i.buf;if(e=r[i.pos++],t+=268435456*(127&e),e<128)returnt;if(e=r[i.pos++],t+=34359738368*(127&e),e<128)returnt;if(e=r[i.pos++],t+=4398046511104*(127&e),e<128)returnt;if(e=r[i.pos++],t+=562949953421312*(127&e),e<128)returnt;if(e=r[i.pos++],t+=72057594037927940*(127&e),e<128)returnt;if(e=r[i.pos++],t+=0x8000000000000000*(127&e),e<128)returnt;thrownewError("Expected varint not more than 10 bytes")}functionwriteBigVarint(t,i){i.realloc(10);for(vare=i.pos+10;t>=1;){if(i.pos>=e)thrownewError("Given varint doesn't fit into 10 bytes");varr=255&t;i.buf[i.pos++]=r|(t>=128?128:0),t/=128}}functionreallocForRawMessage(t,i,e){varr=i<=16383?1:i<=2097151?2:i<=268435455?3:Math.ceil(Math.log(i)/(7*Math.LN2));e.realloc(r);for(vars=e.pos-1;s>=t;s--)e.buf[s+r]=e.buf[s]}functionwritePackedVarint(t,i){for(vare=0;e<t.length;e++)i.writeVarint(t[e])}functionwritePackedSVarint(t,i){for(vare=0;e<t.length;e++)i.writeSVarint(t[e])}functionwritePackedFloat(t,i){for(vare=0;e<t.length;e++)i.writeFloat(t[e])}functionwritePackedDouble(t,i){for(vare=0;e<t.length;e++)i.writeDouble(t[e])}functionwritePackedBoolean(t,i){for(vare=0;e<t.length;e++)i.writeBoolean(t[e])}functionwritePackedFixed32(t,i){for(vare=0;e<t.length;e++)i.writeFixed32(t[e])}functionwritePackedSFixed32(t,i){for(vare=0;e<t.length;e++)i.writeSFixed32(t[e])}functionwritePackedFixed64(t,i){for(vare=0;e<t.length;e++)i.writeFixed64(t[e])}functionwritePackedSFixed64(t,i){for(vare=0;e<t.length;e++)i.writeSFixed64(t[e])}module.exports=Pbf;varBuffer=global.Buffer||require("./buffer");Pbf.Varint=0,Pbf.Fixed64=1,Pbf.Bytes=2,Pbf.Fixed32=5;varSHIFT_LEFT_32=4294967296,SHIFT_RIGHT_32=1/SHIFT_LEFT_32,POW_2_63=Math.pow(2,63);Pbf.prototype={destroy:function(){this.buf=null},readFields:function(t,i,e){for(e=e||this.length;this.pos<e;){varr=this.readVarint(),s=r>>3,n=this.pos;t(s,i,this),this.pos===n&&this.skip(r)}returni},readMessage:function(t,i){returnthis.readFields(t,i,this.readVarint()+this.pos)},readFixed32:function(){vart=this.buf.readUInt32LE(this.pos);returnthis.pos+=4,t},readSFixed32:function(){vart=this.buf.readInt32LE(this.pos);returnthis.pos+=4,t},readFixed64:function(){vart=this.buf.readUInt32LE(this.pos)+this.buf.readUInt32LE(this.pos+4)*SHIFT_LEFT_32;returnthis.pos+=8,t},readSFixed64:function(){vart=this.buf.readUInt32LE(this.pos)+this.buf.readInt32LE(this.pos+4)*SHIFT_LEFT_32;returnthis.pos+=8,t},readFloat:function(){vart=this.buf.readFloatLE(this.pos);returnthis.pos+=4,t},readDouble:function(){vart=this.buf.readDoubleLE(this.pos);returnthis.pos+=8,t},readVarint:function(){vart,i,e=this.buf;returni=e[this.pos++],t=127&i,i<128?t:(i=e[this.pos++],t|=(127&i)<<7,i<128?t:(i=e[this.pos++],t|=(127&i)<<14,i<128?t:(i=e[this.pos++],t|=(127&i)<<21,i<128?t:readVarintRemainder(t,this))))},readVarint64:function(){vart=this.pos,i=this.readVarint();if(i<POW_2_63)returni;for(vare=this.pos-2;255===this.buf[e];)e--;e<t&&(e=t),i=0;for(varr=0;r<e-t+1;r++){vars=127&~this.buf[t+r];i+=r<4?s<<7*r:s*Math.pow(2,7*r)}return-i-1},readSVarint:function(){vart=this.readVarint();returnt%2===1?(t+1)/-2:t/2},readBoolean:function(){returnBoolean(this.readVarint())},readString:function(){vart=this.readVarint()+this.pos,i=this.buf.toString("utf8",this.pos,t);returnthis.pos=t,i},readBytes:function(){vart=this.readVarint()+this.pos,i=this.buf.slice(this.pos,t);returnthis.pos=t,i},readPackedVarint:function(){for(vart=this.readVarint()+this.pos,i=[];this.pos<t;)i.push(this.readVarint());returni},readPackedSVarint:function(){for(vart=this.re
;if(!(T<=S)){S===p&&(S=0);varM=Math.round(u.glyphAngle/(2*Math.PI)*256),B=e.prepareSegment(4),A=B.vertexLength;addVertex(c,I.x,I.y,m.x,m.y,v.x,v.y,S,T,p,M),addVertex(c,I.x,I.y,g.x,g.y,v.x+v.w,v.y,S,T,p,M),addVertex(c,I.x,I.y,f.x,f.y,v.x,v.y+v.h,S,T,p,M),addVertex(c,I.x,I.y,b.x,b.y,v.x+v.w,v.y+v.h,S,T,p,M),s.emplaceBack(A,A+1,A+2),s.emplaceBack(A+1,A+2,A+3),B.vertexLength+=4,B.primitiveLength+=2}}e.populatePaintArrays(n)},SymbolBucket.prototype.addToDebugBuffers=function(e){for(vart=this,o=this.arrays.collisionBox,r=o.layoutVertexArray,a=o.elementArray,i=-e.angle,n=e.yStretch,l=0,s=t.symbolInstances;l<s.length;l+=1){varc=s[l];c.textCollisionFeature={boxStartIndex:c.textBoxStartIndex,boxEndIndex:c.textBoxEndIndex},c.iconCollisionFeature={boxStartIndex:c.iconBoxStartIndex,boxEndIndex:c.iconBoxEndIndex};for(vary=0;y<2;y++){varp=c[0===y?"textCollisionFeature":"iconCollisionFeature"];if(p)for(varx=p.boxStartIndex;x<p.boxEndIndex;x++){varh=t.collisionBoxArray.get(x),u=h.anchorPoint,d=newPoint(h.x1,h.y1*n)._rotate(i),m=newPoint(h.x2,h.y1*n)._rotate(i),g=newPoint(h.x1,h.y2*n)._rotate(i),f=newPoint(h.x2,h.y2*n)._rotate(i),b=Math.max(0,Math.min(25,t.zoom+Math.log(h.maxScale)/Math.LN2)),v=Math.max(0,Math.min(25,t.zoom+Math.log(h.placementScale)/Math.LN2)),I=o.prepareSegment(4),S=I.vertexLength;addCollisionBoxVertex(r,u,d,b,v),addCollisionBoxVertex(r,u,m,b,v),addCollisionBoxVertex(r,u,f,b,v),addCollisionBoxVertex(r,u,g,b,v),a.emplaceBack(S,S+1),a.emplaceBack(S+1,S+2),a.emplaceBack(S+2,S+3),a.emplaceBack(S+3,S),I.vertexLength+=4,I.primitiveLength+=4}}}},SymbolBucket.prototype.addSymbolInstance=function(e,t,o,r,a,i,n,l,s,c,y,p,x,h,u,d,m,g){varf,b,v=[],I=[];for(varSino){varT=parseInt(S,10);o[T]&&(I=I.concat(i?getGlyphQuads(e,o[T],y,t,a,x):[]),f=newCollisionFeature(n,t,e,l,s,c,o[T],y,p,x,!1))}varM=f?f.boxStartIndex:this.collisionBoxArray.length,B=f?f.boxEndIndex:this.collisionBoxArray.length;r&&(v=i?getIconQuads(e,r,h,t,a,d,o[WritingMode.horizontal],m,g):[],b=newCollisionFeature(n,t,e,l,s,c,r,h,u,d,!0));varA=b?b.boxStartIndex:this.collisionBoxArray.length,z=b?b.boxEndIndex:this.collisionBoxArray.length;B>SymbolBucket.MAX_INSTANCES&&util.warnOnce("Too many symbols being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),z>SymbolBucket.MAX_INSTANCES&&util.warnOnce("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907");var_=(o[WritingMode.vertical]?WritingMode.vertical:0)|(o[WritingMode.horizontal]?WritingMode.horizontal:0);this.symbolInstances.push({textBoxStartIndex:M,textBoxEndIndex:B,iconBoxStartIndex:A,iconBoxEndIndex:z,glyphQuads:I,iconQuads:v,anchor:e,featureIndex:l,featureProperties:g,writingModes:_})},SymbolBucket.programInterfaces=symbolInterfaces,SymbolBucket.MAX_INSTANCES=65535,module.exports=SymbolBucket},{"../../source/rtl_text_plugin":90,"../../symbol/anchor":157,"../../symbol/clip_line":159,"../../symbol/collision_feature":161,"../../symbol/get_anchors":163,"../../symbol/mergelines":166,"../../symbol/quads":167,"../../symbol/resolve_text":168,"../../symbol/shaping":169,"../../util/classify_rings":195,"../../util/find_pole_of_inaccessibility":201,"../../util/script_detection":209,"../../util/token":211,"../../util/util":212,"../array_group":44,"../buffer_group":52,"../element_array_type":53,"../extent":54,"../load_geometry":56,"../vertex_array_type":60,"point-geometry":26,"vector-tile":34}],51:[function(require,module,exports){"use strict";varAttributeType={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT"},Buffer=function(e,t,r){this.arrayBuffer=e.arrayBuffer,this.length=e.length,this.attributes=t.members,this.itemSize=t.bytesPerElement,this.type=r,this.arrayType=t};Buffer.fromStructArray=function(e,t){returnnewBuffer(e.serialize(),e.constructor.serialize(),t)},Buffer.prototype.bind=function(e){vart=e[this.type];this.buffer?e.bindBuffer(t,this.buffer):(this.gl=e,this.buffer=e.createBuffer(),e.bindBuffer(t,this.buffer),e.bufferData(t,this.arrayBuffer,e.STATIC_DRAW),this.arrayBuffer=null)},Buffer.prototype.set
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 vec2 a_pos;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform mediump float u_width;\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 lowp 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\nvoid main() {\n #pragma mapbox: initialize lowp 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\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n\n // We store the texture normals in the most insignificant bit\n // transform y so that 0 => -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\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 width = u_width / 2.0;\n offset = -1.0 * offset; \n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + width * (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 // Remove the texture normal bit to get the position\n vec2 pos = floor(a_pos * 0.5);\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:"uniformvec2u_pattern_size_a;\nuniformvec2u_pattern_size_b;\nuniformvec2u_pattern_tl_a;\nuniformvec2u_pattern_br_a;\nuniformvec2u_pattern_tl_b;\nuniformvec2u_pattern_br_b;\nuniformfloatu_fade;\n\nuniformsampler2Du_image;\n\nvaryingvec2v_normal;\nvaryingvec2v_width2;\nvaryingfloatv_linesofar;\nvaryingfloatv_gamma_scale;\n\n#pragmamapbox:definelowpfloatblur\n#pragmamapbox:definelowpfloatopacity\n\nvoidmain(){\n#pragmamapbox:initializelowpfloatblur\n#pragmamapbox:initializelowpfloatopacity\n\n// Calculate the distance of the pixel from the line in pixels.\n floa
if(globalRTLTextPlugin.applyArabicShaping||globalRTLTextPlugin.processBidirectionalText)thrownewError("RTL text plugin already registered.");globalRTLTextPlugin.applyArabicShaping=e.applyArabicShaping,globalRTLTextPlugin.processBidirectionalText=e.processBidirectionalText}};Worker.prototype.setLayers=function(e,r){this.getLayerIndex(e).replace(r)},Worker.prototype.updateLayers=function(e,r){this.getLayerIndex(e).update(r.layers,r.removedIds,r.symbolOrder)},Worker.prototype.loadTile=function(e,r,o){this.getWorkerSource(e,r.type).loadTile(r,o)},Worker.prototype.reloadTile=function(e,r,o){this.getWorkerSource(e,r.type).reloadTile(r,o)},Worker.prototype.abortTile=function(e,r){this.getWorkerSource(e,r.type).abortTile(r)},Worker.prototype.removeTile=function(e,r){this.getWorkerSource(e,r.type).removeTile(r)},Worker.prototype.removeSource=function(e,r){varo=this.getWorkerSource(e,r.type);void0!==o.removeSource&&o.removeSource(r)},Worker.prototype.redoPlacement=function(e,r,o){this.getWorkerSource(e,r.type).redoPlacement(r,o)},Worker.prototype.loadWorkerSource=function(e,r,o){try{this.self.importScripts(r.url),o()}catch(e){o(e)}},Worker.prototype.loadRTLTextPlugin=function(e,r,o){try{globalRTLTextPlugin.applyArabicShaping||globalRTLTextPlugin.processBidirectionalText||this.self.importScripts(r)}catch(e){o(e)}},Worker.prototype.getLayerIndex=function(e){varr=this.layerIndexes[e];returnr||(r=this.layerIndexes[e]=newStyleLayerIndex),r},Worker.prototype.getWorkerSource=function(e,r){varo=this;if(this.workerSources[e]||(this.workerSources[e]={}),!this.workerSources[e][r]){vart={send:function(r,t,i,n){o.actor.send(r,t,i,n,e)}};this.workerSources[e][r]=newthis.workerSourceTypes[r](t,this.getLayerIndex(e))}returnthis.workerSources[e][r]},module.exports=function(e){returnnewWorker(e)}},{"../style/style_layer_index":154,"../util/actor":190,"./geojson_worker_source":83,"./rtl_text_plugin":90,"./vector_tile_worker_source":96}],99:[function(require,module,exports){"use strict";functionrecalculateLayers(e,i){for(varr=0,o=e.layers;r<o.length;r+=1){vart=o[r];t.recalculate(i)}}functionserializeBuckets(e,i){returne.filter(function(e){return!e.isEmpty()}).map(function(e){returne.serialize(i)})}varFeatureIndex=require("../data/feature_index"),CollisionTile=require("../symbol/collision_tile"),CollisionBoxArray=require("../symbol/collision_box"),DictionaryCoder=require("../util/dictionary_coder"),util=require("../util/util"),WorkerTile=function(e){this.coord=e.coord,this.uid=e.uid,this.zoom=e.zoom,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=e.overscaling,this.angle=e.angle,this.pitch=e.pitch,this.showCollisionBoxes=e.showCollisionBoxes};WorkerTile.prototype.parse=function(e,i,r,o){vart=this;e.layers||(e={layers:{_geojsonTileLayer:e}}),this.status="parsing",this.data=e,this.collisionBoxArray=newCollisionBoxArray;vars=newDictionaryCoder(Object.keys(e.layers).sort()),l=newFeatureIndex(this.coord,this.overscaling);l.bucketLayerIDs={};varn={},a=0,c={featureIndex:l,iconDependencies:{},glyphDependencies:{}},u=i.familiesBySource[this.source];for(varhinu){vary=e.layers[h];if(y){1===y.version&&util.warnOnce('Vector tile source "'+t.source+'" layer "'+h+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(vard=s.encode(h),p=[],m=0;m<y.length;m++){varv=y.feature(m);v.index=m,v.sourceLayerIndex=d,p.push(v)}for(varf=0,g=u[h];f<g.length;f+=1){varx=g[f],B=x[0];if(!(B.minzoom&&t.zoom<B.minzoom||B.maxzoom&&t.zoom>=B.maxzoom||B.layout&&"none"===B.layout.visibility)){for(varb=0,k=x;b<k.length;b+=1){varz=k[b];z.recalculate(t.zoom)}varC=n[B.id]=B.createBucket({index:a,layers:x,zoom:t.zoom,overscaling:t.overscaling,collisionBoxArray:t.collisionBoxArray});C.populate(p,c),l.bucketLayerIDs[a]=x.map(function(e){returne.id}),a++}}}}varT=function(e){t.status="done",l.paintPropertyStatistics={};for(variinn)util.extend(l.paintPropertyStatistics,n[i].getPaintPropertyStatistics());varr=[];o(null,{buckets:serializeBuckets(util.values(n),r),featureIndex:l.serialize(r),collisionTile:e.ser
;returnu["property-function"]&&void0===p&&(a+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[newValidationError(e.key,e.value,a,t)]}return"categorical"!==p||"number"!==t||isFinite(r)&&Math.floor(r)===r?"number"===t&&void0!==i&&r<i?[newValidationError(e.key,e.value,"stop domain values must appear in ascending order")]:(i=r,"categorical"===p&&rins?[newValidationError(e.key,e.value,"stop domain values must be unique")]:(s[r]=!0,[])):[newValidationError(e.key,e.value,"integer expected, found %s",r)]}functiono(e){returnvalidate({key:e.key,value:e.value,valueSpec:u,style:e.style,styleSpec:e.styleSpec})}varn,i,l,u=e.valueSpec,p=unbundle(e.value.type),s={},y="categorical"!==p&&void0===e.value.property,d=!y,c="array"===getType(e.value.stops)&&"array"===getType(e.value.stops[0])&&"object"===getType(e.value.stops[0][0]),v=validateObject({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:t,default:o}});return"identity"===p&&y&&v.push(newValidationError(e.key,e.value,'missing required property "property"')),"identity"===p||e.value.stops||v.push(newValidationError(e.key,e.value,'missing required property "stops"')),"exponential"===p&&"piecewise-constant"===e.valueSpec.function&&v.push(newValidationError(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(d&&!e.valueSpec["property-function"]?v.push(newValidationError(e.key,e.value,"property functions not supported")):y&&!e.valueSpec["zoom-function"]&&v.push(newValidationError(e.key,e.value,"zoom functions not supported"))),"categorical"!==p&&!c||void0!==e.value.property||v.push(newValidationError(e.key,e.value,'"property" property is required')),v}},{"../error/validation_error":102,"../util/get_type":120,"../util/unbundle_jsonlint":123,"./validate":124,"./validate_array":125,"./validate_number":136,"./validate_object":137}],132:[function(require,module,exports){"use strict";varValidationError=require("../error/validation_error"),validateString=require("./validate_string");module.exports=function(r){vare=r.value,t=r.key,a=validateString(r);returna.length?a:(e.indexOf("{fontstack}")===-1&&a.push(newValidationError(t,e,'"glyphs" url must include a "{fontstack}" token')),e.indexOf("{range}")===-1&&a.push(newValidationError(t,e,'"glyphs" url must include a "{range}" token')),a)}},{"../error/validation_error":102,"./validate_string":141}],133:[function(require,module,exports){"use strict";varValidationError=require("../error/validation_error"),unbundle=require("../util/unbundle_jsonlint"),validateObject=require("./validate_object"),validateFilter=require("./validate_filter"),validatePaintProperty=require("./validate_paint_property"),validateLayoutProperty=require("./validate_layout_property"),extend=require("../util/extend");module.exports=function(e){varr=[],t=e.value,a=e.key,i=e.style,l=e.styleSpec;t.type||t.ref||r.push(newValidationError(a,t,'either "type" or "ref" is required'));varu=unbundle(t.type),n=unbundle(t.ref);if(t.id)for(varo=unbundle(t.id),s=0;s<e.arrayIndex;s++){vard=i.layers[s];unbundle(d.id)===o&&r.push(newValidationError(a,t.id,'duplicate layer id "%s", previously used at line %d',t.id,d.id.__line__))}if("ref"int){["type","source","source-layer","filter","layout"].forEach(function(e){eint&&r.push(newValidationError(a,t[e],'"%s" is prohibited for ref layers',e))});vary;i.layers.forEach(function(e){unbundle(e.id)===n&&(y=e)}),y?y.ref?r.push(newValidationError(a,t.ref,"ref cannot reference another ref layer")):u=unbundle(y.type):r.push(newValidationError(a,t.ref,'ref layer "%s" not found',n))}elseif("background"!==u)if(t.source){varc=i.sources&&i.sources[t.source],p=c&&unbundle(c.type);c?"vector"===p&&"raster"===u?r.push(newValidationError(a,t.source,'layer "%s" requires a raster source',t.id)):"raster"===p&&"raster"!==u?r.push(newValidationError(a,t.source,'layer "%s" requires a vector source',t.id)):"vector"!==p||t["source-layer"]||r.push(newValidationError(a,t,'layer"%s"mustspecifya"sourc
e.prototype.getLayoutProperty=function(t,e){returnthis.style.getLayoutProperty(t,e)},e.prototype.setLight=function(t){returnthis.style.setLight(t),this._update(!0),this},e.prototype.getLight=function(){returnthis.style.getLight()},e.prototype.getContainer=function(){returnthis._container},e.prototype.getCanvasContainer=function(){returnthis._canvasContainer},e.prototype.getCanvas=function(){returnthis._canvas},e.prototype._containerDimensions=function(){vart=0,e=0;returnthis._container&&(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),[t,e]},e.prototype._setupContainer=function(){vart=this._container;t.classList.add("mapboxgl-map");vare=this._canvasContainer=DOM.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=DOM.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");varo=this._containerDimensions();this._resizeCanvas(o[0],o[1]);vari=this._controlContainer=DOM.create("div","mapboxgl-control-container",t),r=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(t){r[t]=DOM.create("div","mapboxgl-ctrl-"+t,i)})},e.prototype._resizeCanvas=function(t,e){varo=window.devicePixelRatio||1;this._canvas.width=o*t,this._canvas.height=o*e,this._canvas.style.width=t+"px",this._canvas.style.height=e+"px"},e.prototype._setupPainter=function(){vart=util.extend({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer},isSupported.webGLContextAttributes),e=this._canvas.getContext("webgl",t)||this._canvas.getContext("experimental-webgl",t);returne?void(this.painter=newPainter(e,this.transform)):voidthis.fire("error",{error:newError("Failed to initialize WebGL")})},e.prototype._contextLost=function(t){t.preventDefault(),this._frameId&&browser.cancelFrame(this._frameId),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){returnthis.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender(),this):this},e.prototype._render=function(){returnthis.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(),browser.cancelFrame(this._frameId),this.setStyle(null),"undefined"!=typeofwindow&&(window.removeEventListener("resize",this._onWindowResize,!1),window.removeEventListener("online",this._onWindowOnline,!1));vart=this.painter.gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),removeNode(this._canvasContainer),removeNode(this._controlContainer),this._container.classList.remove("mapboxgl-map"),this.fire("remove")},e.prototype._rerender=function(){this.style&&!this._frameId&&(this._frameId=browser.frame(this._render))},e.prototype._onWindowOnline=function(){this._update()},e.prototype._onWindowResize=function(){this._trackResize&&this.stop().resize()._update()},o.showTileBoundaries.get=function(){return!!this._showT
varr=e.get(e.order[0]);r&&e.onRemove(r)}returnthis},module.exports=LRUCache},{}],208:[function(require,module,exports){"use strict";functionmakeAPIURL(r,e){vart=parseUrl(config.API_URL);if(r.protocol=t.protocol,r.authority=t.authority,!config.REQUIRE_ACCESS_TOKEN)returnformatUrl(r);if(e=e||config.ACCESS_TOKEN,!e)thrownewError("An API access token is required to use Mapbox GL. "+help);if("s"===e[0])thrownewError("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+help);returnr.params.push("access_token="+e),formatUrl(r)}functionisMapboxURL(r){return0===r.indexOf("mapbox:")}functionreplaceTempAccessToken(r){for(vare=0;e<r.length;e++)0===r[e].indexOf("access_token=tk.")&&(r[e]="access_token="+(config.ACCESS_TOKEN||""))}functionparseUrl(r){vare=r.match(urlRe);if(!e)thrownewError("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}functionformatUrl(r){vare=r.params.length?"?"+r.params.join("&"):"";returnr.protocol+"://"+r.authority+r.path+e}varconfig=require("./config"),browser=require("./browser"),help="See https://www.mapbox.com/api-documentation/#access-tokens";exports.isMapboxURL=isMapboxURL,exports.normalizeStyleURL=function(r,e){if(!isMapboxURL(r))returnr;vart=parseUrl(r);returnt.path="/styles/v1"+t.path,makeAPIURL(t,e)},exports.normalizeGlyphsURL=function(r,e){if(!isMapboxURL(r))returnr;vart=parseUrl(r);returnt.path="/fonts/v1"+t.path,makeAPIURL(t,e)},exports.normalizeSourceURL=function(r,e){if(!isMapboxURL(r))returnr;vart=parseUrl(r);returnt.path="/v4/"+t.authority+".json",t.params.push("secure"),makeAPIURL(t,e)},exports.normalizeSpriteURL=function(r,e,t,o){vara=parseUrl(r);returnisMapboxURL(r)?(a.path="/styles/v1"+a.path+"/sprite"+e+t,makeAPIURL(a,o)):(a.path+=""+e+t,formatUrl(a))};varimageExtensionRe=/(\.(png|jpg)\d*)(?=$)/;exports.normalizeTileURL=function(r,e,t){if(!e||!isMapboxURL(e))returnr;varo=parseUrl(r),a=browser.devicePixelRatio>=2||512===t?"@2x":"",s=browser.supportsWebp?".webp":"$1";returno.path=o.path.replace(imageExtensionRe,""+a+s),replaceTempAccessToken(o.params),formatUrl(o)};varurlRe=/^(\w+):\/\/([^\/?]+)(\/[^?]+)?\??(.+)?/},{"./browser":192,"./config":196}],209:[function(require,module,exports){"use strict";varisChar=require("./is_char_in_unicode_block");module.exports.allowsIdeographicBreaking=function(a){for(vari=0,r=a;i<r.length;i+=1){vars=r[i];if(!exports.charAllowsIdeographicBreaking(s.charCodeAt(0)))return!1}return!0},module.exports.allowsVerticalWritingMode=function(a){for(vari=0,r=a;i<r.length;i+=1){vars=r[i];if(exports.charHasUprightVerticalOrientation(s.charCodeAt(0)))return!0}return!1},module.exports.charAllowsIdeographicBreaking=function(a){return!(a<11904)&&(!!isChar["Bopomofo Extended"](a)||(!!isChar.Bopomofo(a)||(!!isChar["CJK Compatibility Forms"](a)||(!!isChar["CJK Compatibility Ideographs"](a)||(!!isChar["CJK Compatibility"](a)||(!!isChar["CJK Radicals Supplement"](a)||(!!isChar["CJK Strokes"](a)||(!!isChar["CJK Symbols and Punctuation"](a)||(!!isChar["CJK Unified Ideographs Extension A"](a)||(!!isChar["CJK Unified Ideographs"](a)||(!!isChar["Enclosed CJK Letters and Months"](a)||(!!isChar["Halfwidth and Fullwidth Forms"](a)||(!!isChar.Hiragana(a)||(!!isChar["Ideographic Description Characters"](a)||(!!isChar["Kangxi Radicals"](a)||(!!isChar["Katakana Phonetic Extensions"](a)||(!!isChar.Katakana(a)||(!!isChar["Vertical Forms"](a)||(!!isChar["Yi Radicals"](a)||!!isChar["Yi Syllables"](a))))))))))))))))))))},exports.charHasUprightVerticalOrientation=function(a){return746===a||747===a||!(a<4352)&&(!!isChar["Bopomofo Extended"](a)||(!!isChar.Bopomofo(a)||(!(!isChar["CJK Compatibility Forms"](a)||a>=65097&&a<=65103)||(!!isChar["CJK Compatibility Ideographs"](a)||(!!isChar["CJK Compatibility"](a)||(!!isChar["CJK Radicals Supplement"](a)||(!!isChar["CJK Strokes"](a)||(!(!isChar["CJK Symbols and Punctuation"](a)||a>=12296&&a<=12305||a>=12308&&a<=12319||12336===a)||(!!isChar["CJK Unified Ideographs Extension A"](a)||(!!isChar["CJK Unified Ideographs"](
;var_iterateStorage2=_interopRequireDefault(_iterateStorage);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj}}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function")}}vardefaultConfig={driver:localStorage,name:"webStorage"};varevents={set:"setItem",set_err:"setItemError",get:"getItem",get_err:"getItemError",remove:"removeItem",clear:"clear"};varWebStorage=function(){functionWebStorage(options){_classCallCheck(this,WebStorage);options=(0,_extend2.default)({},defaultConfig,options);if(options.name==null||(0,_trim2.default)(options.name)===""){throw"You must use a valid name for the database."}this.options=options;this.storeKeyPrefix=(0,_createKeyPrefix2.default)(this);_grEventDispatcher2.default.apply(Object.getPrototypeOf(this))}_createClass(WebStorage,[{key:"createInstance",value:functioncreateInstance(options){returnnewWebStorage(options)}},{key:"config",value:functionconfig(options){options=(0,_extend2.default)({},defaultConfig,options);if(options.name==null||(0,_trim2.default)(options.name)===""){throw"You must use a valid name for the database."}this.options=options;this.storeKeyPrefix=(0,_createKeyPrefix2.default)(this)}},{key:"getItem",value:functiongetItem(key){varitem=this.options.driver.getItem(this.storeKeyPrefix+key);try{var_item=JSON.parse(item);this.dispatchEvent({type:events.get,data:_item});return_item}catch(error){this.dispatchEvent({type:events.get_err,data:error});throwerror}}},{key:"setItem",value:functionsetItem(key,value){try{value=value==null?null:value;key=this.storeKeyPrefix+key;this.options.driver.setItem(key,JSON.stringify(value));this.dispatchEvent({type:events.set,data:value});returnvalue}catch(error){this.dispatchEvent({type:events.set_err,data:error});throwerror}}},{key:"removeItem",value:functionremoveItem(key){this.dispatchEvent({type:events.remove,data:key});this.options.driver.removeItem(this.storeKeyPrefix+key)}},{key:"clear",value:functionclear(clearAll){vardriver=this.options.driver;if(clearAll===true){driver.clear()}else{(0,_iterateStorage2.default)(this,function(key){driver.removeItem(key)})}this.dispatchEvent({type:events.clear})}},{key:"keys",value:functionkeys(){varkeysArr=[];varstoreKeyPrefix=this.storeKeyPrefix;(0,_iterateStorage2.default)(this,function(key){keysArr.push((0,_removePrefix2.default)(key,storeKeyPrefix))});returnkeysArr}},{key:"length",value:functionlength(){varcounter=0;(0,_iterateStorage2.default)(this,function(){counter+=1});returncounter}},{key:"iterate",value:functioniterate(callback){varstoreKeyPrefix=this.storeKeyPrefix;(0,_iterateStorage2.default)(this,function(key,value,iterationNumber){var_key=(0,_removePrefix2.default)(key,storeKeyPrefix);var_value=JSON.parse(value);if(callback&&callback(_key,_value,iterationNumber)===false){returnfalse}})}},{key:"quota",value:functionquota(){varitems={};vartotalSize=0;(0,_iterateStorage2.default)(this,function(key,value){varitemSize=value.length*2/1024/1024;totalSize+=itemSize;items[key]=itemSize});return{total:totalSize,items:items}}},{key:"supported",value:functionsupported(){return(0,_isStorageSupported2.default)(this.options.driver)}}]);returnWebStorage}();exports.default=newWebStorage;module.exports=exports["default"]},function(module,exports,__webpack_require__){var__WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(name,context,definition){"use strict";if(true){!(__WEBPACK_AMD_DEFINE_FACTORY__=definition,__WEBPACK_AMD_DEFINE_RESULT__=typeof__WEBPACK_AMD_DEFINE_FACTORY__==="function"?__WEBPACK_AMD_DEFINE_FACTORY__.call(exports,__webpack_require__,exports,module):__WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))}elseif(typeofmodule!=="undefined"&&module.exports){module.exports=definition()}else{context[name]=definition(name,context)}})("eventDispatcher",this,function(name){"use strict";varerrors={nonExtensible:'Cannot apply "'+name+'" on an non extensible object'