????

Your IP : 3.17.81.34


Current Path : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/
Upload File :
Current File : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/46.8b3309e3b0dd47d17dad.js

(function(){var e={"esri/views/2d/engine/vectorTiles/Feature":"0+xL","esri/views/2d/engine/vectorTiles/Bucket":"2yK+","esri/views/2d/engine/vectorTiles/CircleBucket":"7CQW","esri/views/2d/engine/vectorTiles/TextShaping":"BWOx","esri/views/2d/engine/vectorTiles/BackgroundBucket":"EO7D","esri/views/2d/engine/vectorTiles/IndexMemoryBuffer":"Gc+D","esri/views/2d/engine/vectorTiles/WorkerTileHandler":"OBe7","esri/views/2d/engine/vectorTiles/ScriptUtils":"PB92","esri/views/2d/engine/vectorTiles/VertexMemoryBuffer":"RY7r","esri/views/2d/tiling/enums":"UTXC","esri/views/2d/engine/vectorTiles/MemoryBuffer":"ahJM","esri/views/2d/engine/vectorTiles/LineBucket":"c0+/","esri/views/2d/engine/vectorTiles/Conflict":"ki27","esri/views/2d/engine/vectorTiles/TileParser":"qDf7","esri/views/2d/engine/vectorTiles/FillBucket":"tVEB","esri/views/2d/engine/vectorTiles/WorkerTile":"ujH7","esri/views/2d/engine/vectorTiles/SourceLayerData":"wodO","esri/views/2d/engine/vectorTiles/SymbolBucket":"yaQU","esri/views/2d/engine/vectorTiles/Placement":"zywo"},t=this||window,r=t.webpackJsonp=t.webpackJsonp||[];r.registerAbsMids?r.registerAbsMids(e):(r.absMidsWaiting=r.absMidsWaiting||[]).push(e)})(),(window.webpackJsonp=window.webpackJsonp||[]).push([[46],{"0+xL":function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r("6+ni")],void 0===(i=(function(e,t,r){return function(){function e(e,t){this.values={};for(var r=t.keys,n=t.values;e.next();)switch(e.tag()){case 1:this.id=e.getUInt64();break;case 2:for(var i=e.getMessage(),o=this.values;!i.empty();){var a=i.getUInt32(),s=i.getUInt32();o[r[a]]=n[s]}i.release();break;case 3:this.type=e.getUInt32();break;case 4:this._pbfGeometry=e.getMessage();break;default:e.skip()}}return e.prototype.getGeometry=function(e){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;var t,n,i=this._pbfGeometry;this._pbfGeometry=null,e?e.reset(this.type):t=[];for(var o,a=1,s=0,l=0,u=0;!i.empty();){if(0===s){var f=i.getUInt32();a=7&f,s=f>>3}switch(s--,a){case 1:l+=i.getSInt32(),u+=i.getSInt32(),e?e.moveTo(l,u):(n&&t.push(n),(n=[]).push(new r.Point(l,u)));break;case 2:l+=i.getSInt32(),u+=i.getSInt32(),e?e.lineTo(l,u):n.push(new r.Point(l,u));break;case 7:e?e.close():n&&!n[0].equals(l,u)&&n.push(n[0].clone());break;default:throw i.release(),new Error("Invalid path operation")}}return e?o=e.result():(n&&t.push(n),o=t),i.release(),this._geometry=o,o},e}()}).apply(null,n))||(e.exports=i)},"2yK+":function(e,t,r){var n,i;n=[r.dj.c(e.i),t],void 0===(i=(function(e,t){return function(){function e(e,t){this.layerExtent=4096,this._features=[],this.layer=e,this.zoom=t,this._filter=e.getFeatureFilter()}return e.prototype.pushFeature=function(e){this._filter.filter(e)&&this._features.push(e)},e.prototype.hasFeatures=function(){return this._features.length>0},e}()}).apply(null,n))||(e.exports=i)},"7CQW":function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r("zOht"),r("2yK+")],void 0===(i=(function(e,t,r,n){return function(e){function t(t,r,n,i){var o=e.call(this,t,r)||this;return o._circleVertexBuffer=n,o._circleIndexBuffer=i,o}return r.__extends(t,e),Object.defineProperty(t.prototype,"circleIndexStart",{get:function(){return this._circleIndexStart},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"circleIndexCount",{get:function(){return this._circleIndexCount},enumerable:!0,configurable:!0}),t.prototype.assignBufferInfo=function(e){var t=e;t._circleIndexStart=this._circleIndexStart,t._circleIndexCount=this._circleIndexCount},t.prototype.processFeatures=function(e){var t=this._circleVertexBuffer,r=this._circleIndexBuffer;this._circleIndexStart=r.index,this._circleIndexCount=0;var n=this.layer,i=this.zoom;e&&e.setExtent(this.layerExtent);for(var o=1,a=[1,1,1,1],s=1,l=0,u=1,f=[1,1,1,1],c=1,h=0,x=this._features;h<x.length;h++){var d=x[h],p=d.getGeometry(e);if(p){n.hasDataDrivenRadius&&(o=n.getPaintValue("circle-radius",i,d)),n.hasDataDrivenColor&&(a=n.getPaintValue("circle-color",i,d)),n.hasDataDrivenOpacity&&(s=n.getPaintValue("circle-opacity",i,d)),n.hasDataDrivenStrokeWidth&&(u=n.getPaintValue("circle-stroke-width",i,d)),n.hasDataDrivenStrokeColor&&(f=n.getPaintValue("circle-stroke-color",i,d)),n.hasDataDrivenStrokeOpacity&&(c=n.getPaintValue("circle-stroke-opacity",i,d)),n.hasDataDrivenBlur&&(l=n.getPaintValue("circle-blur",i,d));for(var y=0,_=p;y<_.length;y++){var g=_[y];if(g)for(var v=0,m=g;v<m.length;v++){var I=m[v],B=t.index;t.add(I.x,I.y,0,0,o,a,s,l,u,f,c),t.add(I.x,I.y,0,1,o,a,s,l,u,f,c),t.add(I.x,I.y,1,0,o,a,s,l,u,f,c),t.add(I.x,I.y,1,1,o,a,s,l,u,f,c),r.add(B+0,B+1,B+2),r.add(B+1,B+2,B+3),this._circleIndexCount+=6}}}}},t}(n)}).apply(null,n))||(e.exports=i)},BWOx:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r("PB92"),r("6cAc")],void 0===(i=(function(e,t,r,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SDF_GLYPH_SIZE=24,t.SDF_GLYPH_BASELINE=17;var i=function(){function e(e,t,r,n,i,o,a){this._glyphItems=e,this._maxWidth=t,this._lineHeight=r,this._letterSpacing=n,this._hAnchor=i,this._vAnchor=o,this._justify=a}return e.prototype.getShaping=function(e,t,n){for(var i=this._letterSpacing,o=this._lineHeight,a=this._justify,s=this._maxWidth,l=[],u=0,f=0,c=0,h=0,x=-1,d=0,p=-1,y=e.length,_=0;_<y;_++){var g=e.charCodeAt(_),v=n&&r.hasVerticalOrientation(g);if(10!==g){for(var m=void 0,I=0,B=this._glyphItems;I<B.length&&!(m=B[I][g]);I++);if(m){if(l.push({codePoint:g,x:u,y:f,vertical:v,glyphMosaicItem:m}),u+=m.metrics.advance+i,s>0&&u>s&&p>=0){var V=p+1;D=l[V].x,d=Math.max(D,d);for(var b=V;b<l.length;b++)t?l[b].y-=o:l[b].y+=o,l[b].x-=D;a&&this._applyJustification(l,h,p),t?f-=o:f+=o,u-=D,++c,h=V,p=-1}++x,32===g&&(p=l.length-1)}}else{if(_===y-1)continue;if(x>=h){var D=(w=l[x]).x+w.glyphMosaicItem.metrics.advance;d=Math.max(D,d),a&&this._applyJustification(l,h,x),h=l.length}t?f-=o:f+=o,u=0,++c}}if(x>=h){var w,P=(w=l[x]).x+w.glyphMosaicItem.metrics.advance;d=Math.max(d,P),a&&this._applyJustification(l,h,x)}if(l.length>0){var M=(a-this._hAnchor)*d,E=(-this._vAnchor*(c+1)+.5)*o;t&&c&&(E+=c*o);for(var S=0,T=l;S<T.length;S++){var z=T[S];z.x+=M,z.y+=E}}return l},e.getTextBox=function(e,r){if(!e.length)return null;for(var n=1/0,i=1/0,o=0,a=0,s=0,l=e;s<l.length;s++){var u=l[s],f=u.x,c=u.y-t.SDF_GLYPH_BASELINE,h=f+u.glyphMosaicItem.metrics.advance,x=c+r;n=Math.min(n,f),o=Math.max(o,h),i=Math.min(i,c),a=Math.max(a,x)}return{x:n,y:i,width:o-n,height:a-i}},e.getBox=function(e){if(!e.length)return null;for(var t=1/0,r=1/0,n=0,i=0,o=0,a=e;o<a.length;o++){var s=a[o],l=s.glyphMosaicItem.metrics,u=l.height,f=l.left,c=l.width,h=s.x,x=s.y-(u-Math.abs(l.top)),d=h+c+f,p=x+u;t=Math.min(t,h),n=Math.max(n,d),r=Math.min(r,x),i=Math.max(i,p)}return{x:t,y:r,width:n-t,height:i-r}},e.addDecoration=function(e,t){var r=e.length;if(0!==r){for(var i=e[0].x+e[0].glyphMosaicItem.metrics.left,o=e[0].y,a=1;a<r;a++){var s=e[a];if(s.y!==o){var l=e[a-1].x+e[a-1].glyphMosaicItem.metrics.left+e[a-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:i,y:o+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new n.default(4,0,4,8),metrics:{width:l-i,height:8,left:0,top:0,advance:0},page:0,code:0}}),o=s.y,i=s.x+s.glyphMosaicItem.metrics.left}}var u=e[r-1].x+e[r-1].glyphMosaicItem.metrics.left+e[r-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:i,y:o+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new n.default(4,0,4,8),metrics:{width:u-i,height:8,left:0,top:0,advance:0},page:0,code:0}})}},e.prototype._applyJustification=function(e,r,n){for(var i=e[n],o=(i.x+(i.vertical?t.SDF_GLYPH_SIZE:i.glyphMosaicItem.metrics.advance))*this._justify,a=r;a<=n;a++)e[a].x-=o},e}();t.TextShaping=i}).apply(null,n))||(e.exports=i)},EO7D:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r("zOht"),r("2yK+")],void 0===(i=(function(e,t,r,n){return function(e){function t(t,r){return e.call(this,t,r)||this}return r.__extends(t,e),t.prototype.processFeatures=function(){},t.prototype.assignBufferInfo=function(){},t}(n)}).apply(null,n))||(e.exports=i)},"Gc+D":function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r("zOht"),r("ahJM")],void 0===(i=(function(e,t,r,n){Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return e.call(this,12)||this}return r.__extends(t,e),t.prototype.add=function(e,t,r){var n=this.array;n.push(e),n.push(t),n.push(r)},t}(n);t.TriangleIndexBuffer=i;var o=function(e){function t(){return e.call(this,4)||this}return r.__extends(t,e),t.prototype.add=function(e){this.array.push(e)},t}(n);t.PointElementMemoryBuffer=o}).apply(null,n))||(e.exports=i)},OBe7:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r("qMld"),r("ujH7"),r("Am75")],void 0===(i=(function(e,t,r,n,i){return function(){function e(){this._tiles=new Map,this._spriteInfo={},this._glyphInfo={}}return e.prototype.reset=function(){this._spriteInfo={},this._glyphInfo={};var e=this._tiles;return e.forEach((function(e){return e.setObsolete()})),e.clear(),r.resolve()},e.prototype.getLayers=function(){return this._layers},e.prototype.setLayers=function(e){var t=new i(e.style);return this._layers=t.layers,this._enableCachingTiles=e.enableCachingTiles,r.resolve({data:""})},e.prototype.createTileAndParse=function(e,t){for(var i=this,o=e.key,a=new n,s={},l=0,u=Object.keys(e.sourceName2DataAndRefKey);l<u.length;l++){var f=u[l];s[f]=e.sourceName2DataAndRefKey[f].refKey}return a.initialize(o,s,this,e.rotation),a.setDataAndParse(e.sourceName2DataAndRefKey,t).then((function(e){return i._enableCachingTiles&&i._tiles.set(o,a),e})).catch((function(e){if(a.setObsolete(),a.release(),!r.isAbortError(e))throw e}))},e.prototype.updateSymbols=function(e,t){var n=this._tiles.get(e.key);return n?n.updateSymbols(e.rotation,t):r.reject()},e.prototype.updateStyle=function(e,t){var n=new i(e);return this._layers=n.layers,this._tiles.forEach((function(e){e.reparse(t).then((function(r){t.client.invoke("updateTileData",{tileId:e.tileKey,tileData:r.result})}))})),r.resolve({data:""})},e.prototype.destructTileData=function(e){if(this._enableCachingTiles){var t=this._tiles.get(e);t&&(t.release(),this._tiles.delete(e))}},e.prototype.fetchSprites=function(e,t,n){var i=[],o=this._spriteInfo;return e.forEach((function(e){void 0===o[e]&&i.push(e)})),0===i.length?r.resolve():t.invoke("getSprites",i,{signal:n&&n.signal}).then((function(e){for(var t in e)o[t]=e[t]}))},e.prototype.getSpriteItems=function(){return this._spriteInfo},e.prototype.fetchGlyphs=function(e,t,n,i,o){var a=[],s=this._glyphInfo[t];return s?n.forEach((function(e){s[e]||a.push(e)})):(s=this._glyphInfo[t]=[],n.forEach((function(e){return a.push(e)}))),0===a.length?r.resolve():i.invoke("getGlyphs",{tileID:e,font:t,codePoints:a},o).then((function(e){for(var t=0;t<e.length;t++)e[t]&&(s[t]=e[t])}))},e.prototype.getGlyphItems=function(e){return this._glyphInfo[e]},e}()}).apply(null,n))||(e.exports=i)},PB92:function(e,t,r){var n,i;n=[r.dj.c(e.i),t],void 0===(i=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.hasVerticalOrientation=function(e){return 746===e||747===e||!(e<4352)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103&&!(e>=65097&&e<=65103)||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351&&!(e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=12592&&e<=12687||e>=43360&&e<=43391||e>=55216&&e<=55295||e>=4352&&e<=4607||e>=44032&&e<=55215||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12688&&e<=12703||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543&&12540!==e||e>=65280&&e<=65519&&!(65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||e>=65104&&e<=65135&&!(e>=65112&&e<=65118||e>=65123&&e<=65126)||e>=5120&&e<=5759||e>=6320&&e<=6399||e>=65040&&e<=65055||e>=19904&&e<=19967||e>=40960&&e<=42127||e>=42128&&e<=42191)},t.isWhiteSpace=function(e){return 32===e}}).apply(null,n))||(e.exports=i)},RY7r:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r("zOht"),r("c9QS"),r("ahJM")],void 0===(i=(function(e,t,r,n,i){Object.defineProperty(t,"__esModule",{value:!0});var o=new Float32Array(1),a=new Uint32Array(o.buffer),s=function(e){function t(t){var r=e.call(this,t?20:12)||this;return r._isDataDriven=t,r}return r.__extends(t,e),t.prototype.isDataDriven=function(){return this._isDataDriven},t.prototype.add=function(e,t,r,n,s,l,u,f){var c=this.array,h=i.i1616to32(e,t);if(c.push(h),h=i.i8888to32(Math.round(31*r),Math.round(31*n),Math.round(31*s),Math.round(31*l)),c.push(h),h=i.i1616to32(u,0),c.push(h),this._isDataDriven){if(!f)throw new Error("Expecting data driven values.");var x=f.color,d=x[3]*f.opacity*255;c.push(i.i8888to32(x[0]*d,x[1]*d,x[2]*d,d)),o[0]=f.size,c.push(a[0])}},t}(i);t.LineVertexBuffer=s;var l=function(e){function t(t){var r=e.call(this,t?8:4)||this;return r._isDataDriven=t,r}return r.__extends(t,e),t.prototype.isDataDriven=function(){return this._isDataDriven},t.prototype.add=function(e,t,r){var n=this.array;if(n.push(i.i1616to32(e,t)),this._isDataDriven){if(!r)throw new Error("Expecting data driven values.");var o=r.color,a=o[3]*r.opacity*255;n.push(i.i8888to32(o[0]*a,o[1]*a,o[2]*a,a))}},t}(i);t.FillVertexBuffer=l;var u=function(e){function t(t){var r=e.call(this,t?12:8)||this;return r._isDataDriven=t,r}return r.__extends(t,e),t.prototype.isDataDriven=function(){return this._isDataDriven},t.prototype.add=function(e,t,r,n,o,a,s){var l=this.array,u=this.index,f=i.i1616to32(e,t);if(l.push(f),f=i.i8888to32(Math.round(15*r),Math.round(15*n),o,a),l.push(f),this._isDataDriven){if(!s)throw new Error("Expecting data driven values.");var c=s.color,h=c[3]*s.opacity*255;l.push(i.i8888to32(c[0]*h,c[1]*h,c[2]*h,h))}return u},t}(i);t.OutlineVertexBuffer=u;var f=function(e){function t(t){var r=e.call(this,t?28:20)||this;return r._isDataDriven=t,r}return r.__extends(t,e),t.prototype.isDataDriven=function(){return this._isDataDriven},t.prototype.add=function(e,t,r,s,l,u,f,c,h,x,d,p,y){var _=this.array,g=i.i1616to32(e,t);if(_.push(g),g=i.i1616to32(Math.round(8*r),Math.round(8*s)),_.push(g),g=i.i8888to32(l/4,u/4,0,0),_.push(g),g=i.i8888to32(Math.ceil(10*p),n.radToByte(f),10*x,Math.min(10*d,255)),_.push(g),g=i.i8888to32(c,h,0,0),_.push(g),this._isDataDriven){if(!y)throw new Error("Expecting data driven values.");var v=y.color,m=v[3]*y.opacity*255;_.push(i.i8888to32(v[0]*m,v[1]*m,v[2]*m,m)),o[0]=y.size,_.push(a[0])}},t}(i);t.SymbolVertexBuffer=f;var c=function(e){function t(){return e.call(this,16)||this}return r.__extends(t,e),t.prototype.add=function(e,t,r,n,o,a,s,l,u,f,c){var h=this.array,x=i.i1616to32(2*e+r,2*t+n);h.push(x);var d=a[3]*s*255;x=i.i8888to32(a[0]*d,a[1]*d,a[2]*d,d),h.push(x);var p=f[3]*c*255;x=i.i8888to32(f[0]*p,f[1]*p,f[2]*p,p),h.push(x),x=i.i8888to32(Math.min(32*l,255),Math.min(4*u,255),Math.min(o,255),0),h.push(x)},t}(i);t.CircleVertexBuffer=c}).apply(null,n))||(e.exports=i)},UTXC:function(e,t,r){var n,i;n=[r.dj.c(e.i),t],void 0===(i=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.NO_DATA=1]="NO_DATA",e[e.READY=2]="READY",e[e.MODIFIED=3]="MODIFIED",e[e.INVALID=4]="INVALID"}(t.TileStatus||(t.TileStatus={}))}).apply(null,n))||(e.exports=i)},ahJM:function(e,t,r){var n,i;n=[r.dj.c(e.i),t],void 0===(i=(function(e,t){return function(){function e(e){this._array=[],e<=0&&console.error("strideInBytes must be positive!"),this._stride=e}return Object.defineProperty(e.prototype,"array",{get:function(){return this._array},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"index",{get:function(){return 4*this._array.length/this._stride},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"itemSize",{get:function(){return this._stride},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sizeInBytes",{get:function(){return 4*this._array.length},enumerable:!0,configurable:!0}),e.prototype.reset=function(){this.array.length=0},e.prototype.toBuffer=function(){return new Uint32Array(this._array).buffer},e.i1616to32=function(e,t){return 65535&e|t<<16},e.i8888to32=function(e,t,r,n){return 255&e|(255&t)<<8|(255&r)<<16|n<<24},e.i8816to32=function(e,t,r){return 255&e|(255&t)<<8|r<<16},e}()}).apply(null,n))||(e.exports=i)},"c0+/":function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r("zOht"),r("H1tY"),r("2yK+"),r("UXHw"),r("tBzM"),r("8Lwu")],void 0===(i=(function(e,t,r,n,i,o,a,s){var l=0,u=0,f=0;n("esri-tiles-performance")&&setInterval((function(){console.log("New (VTL)","feat="+f,"secs="+l,"tris="+u,"tris/sec="+Math.round(u/l))}),1e4);var c=function(e){function t(t,r,n,i){var o=e.call(this,t,r)||this;if(o._tessellationOptions={},o.tessellationProperties={_lineVertexBuffer:null,_lineIndexBuffer:null,_hasPattern:null,_ddValues:null,_capType:null,_joinType:null,_miterLimitCosine:null,_roundLimitCosine:null},t.hasDataDrivenLine!==n.isDataDriven())throw new Error("incompatible line buffer");return o.tessellationProperties._lineVertexBuffer=n,o.tessellationProperties._lineIndexBuffer=i,o.tessellationProperties._hasPattern=t.getPaintValue("line-pattern",o.zoom)||t.getPaintValue("line-dasharray",o.zoom).length>0,o._isThinLine=t.isThinLine,o._tessellationCallbacks=o._isThinLine?{vertex:h(o.tessellationProperties),bridge:x(o.tessellationProperties)}:{vertex:d(o.tessellationProperties),bridge:p(o.tessellationProperties)},o}return r.__extends(t,e),Object.defineProperty(t.prototype,"lineIndexStart",{get:function(){return this._lineIndexStart},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineIndexCount",{get:function(){return this._lineIndexCount},enumerable:!0,configurable:!0}),t.prototype.assignBufferInfo=function(e){var t=e;t._lineIndexStart=this._lineIndexStart,t._lineIndexCount=this._lineIndexCount},t.prototype.processFeatures=function(e){this._lineIndexStart=this.tessellationProperties._lineIndexBuffer.index,this._lineIndexCount=0;var t=this.layer,r=this.zoom,n=t.hasDataDrivenLine;e&&e.setExtent(this.layerExtent);for(var i=[1,1,1,1],l=1,u=1,f=0,c=this._features;f<c.length;f++){var h=c[f],x=new o.LineLayout(t,r,h);!this.tessellationProperties._hasPattern&&t.hasDataDrivenColor&&(i=t.getPaintValue("line-color",r,h)),t.hasDataDrivenOpacity&&(l=t.getPaintValue("line-opacity",r,h)),t.hasDataDrivenWidth&&(u=t.getPaintValue("line-width",r,h));var d=void 0;if(!n||!((d={color:i,opacity:l,size:Math.max(Math.min(u,256),0)}).size<=0||d.opacity<=0||d.color[3]<=0)){this.tessellationProperties._capType=x.cap,this.tessellationProperties._joinType=x.join,this.tessellationProperties._miterLimitCosine=s.getLimitCosine(x.miterLimit),this.tessellationProperties._roundLimitCosine=s.getLimitCosine(x.roundLimit);var p=h.getGeometry(e);this._processFeature(p,d)}}a.cleanup()},t.prototype._processFeature=function(e,t){if(e)for(var r=e.length,n=0;n<r;n++)this._processGeometry(e[n],t)},t.prototype._processGeometry=function(e,t){var r;if(n("esri-tiles-performance")&&(r=performance.now()),!(e.length<2)){for(var i,o,s=e[0],c=1;c<e.length;)(i=e[c].x-s.x)*i+(o=e[c].y-s.y)*o<1e-6?e.splice(c,1):(s=e[c],++c);if(!(e.length<2)){var h=this.tessellationProperties._lineIndexBuffer.index;this._tessellationOptions.trackDistance=this.tessellationProperties._hasPattern,this._tessellationOptions.initialDistance=0,this._tessellationOptions.thin=this._isThinLine,this._tessellationOptions.wrapDistance=65535,this._tessellationOptions.outerBisectorAutoSplitThreshold=1/3.8,this._tessellationOptions.enableOuterBisectorSplit=this.tessellationProperties._hasPattern,this._tessellationOptions.innerBisectorAutoSplitThreshold=1/3.8,this._tessellationOptions.enableInnerBisectorSplit=this.tessellationProperties._hasPattern,this.tessellationProperties._ddValues=t,a.tessellate(e,this._tessellationOptions,this._tessellationCallbacks),this._lineIndexCount+=3*(this.tessellationProperties._lineIndexBuffer.index-h),n("esri-tiles-performance")&&(l+=(performance.now()-r)/1e3,u+=this.tessellationProperties._lineIndexBuffer.index-h,f++)}}},t}(i),h=function(e){return function(t){t.entry0=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,t.prevNormal.x,t.prevNormal.y,0,-1,t.distance,e._ddValues),t.entry2=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,-t.prevNormal.x,-t.prevNormal.y,0,1,t.distance,e._ddValues),t.exit0=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,t.nextNormal.x,t.nextNormal.y,0,-1,t.distance,e._ddValues),t.exit2=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,-t.nextNormal.x,-t.nextNormal.y,0,1,t.distance,e._ddValues)}},x=function(e){return function(t){e._lineIndexBuffer.add(t.leftExit0,t.rightEntry0,t.leftExit2),e._lineIndexBuffer.add(t.rightEntry0,t.rightEntry2,t.leftExit2)}},d=function(e){return function(t){var r,n=2===e._joinType?e._miterLimitCosine:e._roundLimitCosine,i=t.isCap&&0!==e._capType,o=!1;if(t.cosine>.97?(t.exit0=t.entry0=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,t.bisector.x/t.cosine,t.bisector.y/t.cosine,0,-1,t.distance,e._ddValues),t.exit2=t.entry2=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,-t.bisector.x/t.cosine,-t.bisector.y/t.cosine,0,1,t.distance,e._ddValues)):t.cosine<1-.97?(t.entry0=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,t.prevNormal.x,t.prevNormal.y,0,-1,t.distance,e._ddValues),t.entry2=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,-t.prevNormal.x,-t.prevNormal.y,0,1,t.distance,e._ddValues),t.exit0=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,t.nextNormal.x,t.nextNormal.y,0,-1,t.distance,e._ddValues),t.exit2=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,-t.nextNormal.x,-t.nextNormal.y,0,1,t.distance,e._ddValues)):t.canSplit?(a.splitVertex(),t.sign>0?(t.splitInner?(t.exit0=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,t.leftInner.x,t.leftInner.y,0,-1,t.distance,e._ddValues),t.entry0=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,t.rightInner.x,t.rightInner.y,0,-1,t.distance,e._ddValues)):(t.exit0=t.entry0=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,t.bisector.x/t.cosine,t.bisector.y/t.cosine,0,-1,t.distance,e._ddValues)),t.cosine<n?(o=!t.isCap,t.entry2=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,-t.prevNormal.x,-t.prevNormal.y,0,1,t.distance,e._ddValues),t.exit2=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,-t.nextNormal.x,-t.nextNormal.y,0,1,t.distance,e._ddValues)):t.splitOuter?(o=o||t.gapOuter,t.entry2=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,-t.leftOuter.x,-t.leftOuter.y,0,1,t.distance,e._ddValues),t.exit2=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,-t.rightOuter.x,-t.rightOuter.y,0,1,t.distance,e._ddValues)):(t.entry2=t.exit2=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,-t.bisector.x/t.cosine,-t.bisector.y/t.cosine,0,1,t.distance,e._ddValues))):(t.splitInner?(t.exit2=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,-t.leftInner.x,-t.leftInner.y,0,1,t.distance,e._ddValues),t.entry2=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,-t.rightInner.x,-t.rightInner.y,0,1,t.distance,e._ddValues)):(t.exit2=t.entry2=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,-t.bisector.x/t.cosine,-t.bisector.y/t.cosine,0,1,t.distance,e._ddValues)),t.cosine<n?(o=!t.isCap,t.entry0=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,t.prevNormal.x,t.prevNormal.y,0,-1,t.distance,e._ddValues),t.exit0=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,t.nextNormal.x,t.nextNormal.y,0,-1,t.distance,e._ddValues)):t.splitOuter?(o=o||t.gapOuter,t.entry0=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,t.leftOuter.x,t.leftOuter.y,0,-1,t.distance,e._ddValues),t.exit0=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,t.rightOuter.x,t.rightOuter.y,0,-1,t.distance,e._ddValues)):(t.exit0=t.entry0=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,t.bisector.x/t.cosine,t.bisector.y/t.cosine,0,-1,t.distance,e._ddValues)))):t.sign>0?(t.exit0=t.entry0=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,t.bisector.x/t.cosine,t.bisector.y/t.cosine,0,-1,t.distance,e._ddValues),t.cosine<n?(o=!t.isCap,t.entry2=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,-t.prevNormal.x,-t.prevNormal.y,0,1,t.distance,e._ddValues),t.exit2=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,-t.nextNormal.x,-t.nextNormal.y,0,1,t.distance,e._ddValues)):(t.entry2=t.exit2=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,-t.bisector.x/t.cosine,-t.bisector.y/t.cosine,0,1,t.distance,e._ddValues))):(t.exit2=t.entry2=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,-t.bisector.x/t.cosine,-t.bisector.y/t.cosine,0,1,t.distance,e._ddValues),t.cosine<n?(o=!t.isCap,t.entry0=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,t.prevNormal.x,t.prevNormal.y,0,-1,t.distance,e._ddValues),t.exit0=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,t.nextNormal.x,t.nextNormal.y,0,-1,t.distance,e._ddValues)):(t.exit0=t.entry0=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,t.bisector.x/t.cosine,t.bisector.y/t.cosine,0,-1,t.distance,e._ddValues))),t.canSplit&&(t.splitInner||t.splitOuter)||o||i?(r=t.entry1=t.exit1=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,0,0,0,0,t.distance,e._ddValues)):r=t.entry1=t.exit1=null,o&&1!==e._joinType)e._lineIndexBuffer.add(r,t.sign>0?t.exit2:t.entry0,t.sign>0?t.entry2:t.exit0);else if(i&&1===e._capType||o&&1===e._joinType){var s,l=void 0,u=void 0,f=void 0,c=void 0,h=void 0,x=void 0;t.isCap?(x=(s=Math.PI)/(h=Math.ceil(s/.8)),t.isFirstVertex?(l=t.prevNormal.x,u=t.prevNormal.y,f=t.entry0,c=t.entry2):t.isLastVertex&&(l=-t.nextNormal.x,u=-t.nextNormal.y,f=t.exit2,c=t.exit0)):(x=(s=2*Math.acos(t.cosine))/(h=Math.ceil(s/.8)),l=t.sign>0?-t.prevNormal.x:t.nextNormal.x,u=t.sign>0?-t.prevNormal.y:t.nextNormal.y,f=t.sign>0?t.entry2:t.exit0,c=t.sign>0?t.exit2:t.entry0);var d=Math.cos(x),p=Math.sin(x),y=p*l+d*u;l=d*l-p*u,u=y;for(var _=void 0,g=void 0,v=0;v<h;++v){_=g,v<h-1&&(t.isCap?(g=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,l,u,t.isFirstVertex?-1:1,0,t.distance,e._ddValues)):(g=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,l,u,0,t.sign,t.distance,e._ddValues))),e._lineIndexBuffer.add(0===v?f:_,r,v===h-1?c:g);var m=p*l+d*u;l=d*l-p*u,u=m}}else if(i&&2===e._capType){var I=t.isFirstVertex?1:-1,B=void 0,V=void 0;e._hasPattern?(B=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,t.prevNormal.x-I*t.inbound.x,t.prevNormal.y-I*t.inbound.y,-I,-1,t.distance,e._ddValues),V=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,-t.prevNormal.x-I*t.inbound.x,-t.prevNormal.y-I*t.inbound.y,-I,1,t.distance,e._ddValues)):(B=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,t.prevNormal.x-I*t.inbound.x,t.prevNormal.y-I*t.inbound.y,0,-1,t.distance,e._ddValues),V=e._lineVertexBuffer.index,e._lineVertexBuffer.add(t.currentVertex.x,t.currentVertex.y,-t.prevNormal.x-I*t.inbound.x,-t.prevNormal.y-I*t.inbound.y,0,1,t.distance,e._ddValues)),I>0?(e._lineIndexBuffer.add(r,t.entry2,V),e._lineIndexBuffer.add(r,V,B),e._lineIndexBuffer.add(r,B,t.entry0)):(e._lineIndexBuffer.add(r,V,t.exit2),e._lineIndexBuffer.add(r,B,V),e._lineIndexBuffer.add(r,t.exit0,B))}}},p=function(e){return function(t){e._lineIndexBuffer.add(t.leftExit0,t.rightEntry0,null!=t.leftExit1?t.leftExit1:t.leftExit2),e._lineIndexBuffer.add(t.rightEntry0,null!=t.rightEntry1?t.rightEntry1:t.rightEntry2,null!=t.leftExit1?t.leftExit1:t.leftExit2),null!=t.leftExit1&&null!=t.rightEntry1?(e._lineIndexBuffer.add(t.leftExit1,t.rightEntry1,t.leftExit2),e._lineIndexBuffer.add(t.rightEntry1,t.rightEntry2,t.leftExit2)):null!=t.leftExit1?e._lineIndexBuffer.add(t.leftExit1,t.rightEntry2,t.leftExit2):null!=t.rightEntry1&&e._lineIndexBuffer.add(t.rightEntry1,t.rightEntry2,t.leftExit2)}};return c}).apply(null,n))||(e.exports=i)},ki27:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r("xoE+"),r("c9QS"),r("6+ni")],void 0===(i=(function(e,t,r,n,i){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t,r,n){this.left=e,this.top=t,this.right=r,this.bottom=n}return e.prototype.clone=function(){return new e(this.left,this.top,this.right,this.bottom)},e.prototype.move=function(e,t){this.left+=e,this.top+=t,this.right+=e,this.bottom+=t},e.prototype.rotate=function(e,t){var r=this.left,n=this.right,i=this.top,o=this.bottom,a=r*e-i*t,s=r*t+i*e,l=n*e-i*t,u=n*t+i*e,f=r*e-o*t,c=r*t+o*e,h=n*e-o*t,x=n*t+o*e;this.left=Math.min(a,l,f,h),this.top=Math.min(s,u,c,x),this.right=Math.max(a,l,f,h),this.bottom=Math.max(s,u,c,x)},e.overlaps=function(e,t){return e.right>t.left&&e.left<t.right&&e.bottom>t.top&&e.top<t.bottom},e}();t.Box=o;var a=function(){function e(e,t,r,n){this.anchor=e,this.corners=t,this.minzoom=r,this.maxzoom=n}return e.prototype.left=function(){return this.corners[0].x},e.prototype.right=function(){return this.corners[2].x},e.prototype.top=function(){return this.corners[1].y},e.prototype.bottom=function(){return this.corners[3].y},e}();t.Obstacle=a;var s=function(){function e(e,t,r){this.obstacles=[],this.mapAngle=e,this.padding=t,this.isScreenAligned=r,this.minzoom=l}return e.prototype.addBox=function(e,t,r,n,o,s,l){var u=t.left*r-this.padding,f=t.top*r-this.padding,c=t.right*r+this.padding,h=t.bottom*r+this.padding,x=[new i.Point(u,f),new i.Point(c,f),new i.Point(c,h),new i.Point(u,h)];if(0!==this.mapAngle){var d=Math.cos(this.mapAngle),p=Math.sin(this.mapAngle);(e=e.clone()).rotate(d,p)}if(this.isScreenAligned||(n+=this.mapAngle),0!==n){d=Math.cos(n),p=Math.sin(n),x[0].rotate(d,p),x[1].rotate(d,p),x[2].rotate(d,p),x[3].rotate(d,p);for(var y=0,_=1;_<4;_++)(x[_].x<x[y].x||x[_].x===x[y].x&&x[_].y<x[y].y)&&(y=_);if(y){var g=[];for(_=0;_<4;_++)g.push(x[(_+y)%4]);x=g}}if(o)for(var v=0,m=x;v<m.length;v++)m[v].move(o[0],o[1]);this.obstacles.push(new a(e,x,s,l))},e}();t.Footprint=s;var l=.5,u=function(){function e(){this._grid=[]}return e.prototype.reset=function(){this._grid=[]},e.prototype.add=function(t){for(var r=this._grid,n=0,i=t.obstacles;n<i.length;n++)for(var o=i[n],a=o.anchor,s=e._gridClamp(Math.min(o.left()+a.x,a.x)),l=e._gridClamp(Math.max(o.right()+a.x,a.x)),u=e._gridClamp(Math.min(o.top()+a.y,a.y)),f=e._gridClamp(Math.max(o.bottom()+a.y,a.y)),c=u;c<=f;c++)for(var h=s;h<=l;h++){var x=r[16*c+h];x||(x=r[16*c+h]=[]),x.push(o)}},e.prototype.getMinZoom=function(t,r){if(0===t.obstacles.length)return n.C_INFINITY;for(var i=r,o=this._grid,a=0,s=t.obstacles;a<s.length;a++)for(var l=s[a],u=l.anchor,f=e._gridClamp(Math.min(l.left()+u.x,u.x)),c=e._gridClamp(Math.max(l.right()+u.x,u.x)),h=e._gridClamp(Math.min(l.top()+u.y,u.y)),x=e._gridClamp(Math.max(l.bottom()+u.y,u.y)),d=h;d<=x;d++)for(var p=f;p<=c;p++){var y=o[16*d+p];if(y)for(var _=0,g=y;_<g.length;_++){var v=g[_];if(!(l.minzoom>=v.maxzoom||v.minzoom>=l.maxzoom)&&(i=e._calcPlacementZoom(l,v,i))>=2)return n.C_INFINITY}}return i<2?i:n.C_INFINITY},e._gridClamp=function(e){return r.clamp(e>>9,-7,8)},e._calcPlacementZoom=function(t,r,i){var o=r.anchor.x-t.anchor.x;if(0===o&&(t.right()<r.left()||r.right()<t.left()))return i;var a=r.anchor.y-t.anchor.y;if(0===a&&(t.bottom()<r.top()||r.bottom()<t.top()))return i;var s=n.C_INFINITY;if(0!==o){var l=(o>0?t.right()-r.left():t.left()-r.right())/o;l<s&&(s=l);var u=o>0?e._calcExtZoomX(t,r,l):e._calcExtZoomX(r,t,l);u<s&&(s=u)}if(0!==a){var f=(a>0?t.bottom()-r.top():t.top()-r.bottom())/a;f<s&&(s=f);var c=a>0?e._calcExtZoomY(t,r,f):e._calcExtZoomY(r,t,f);c<s&&(s=c)}return s<t.minzoom||s<r.minzoom?i:((s=Math.min(s,t.maxzoom,r.maxzoom))<i&&(s=i),s)},e._calcExtZoomX=function(e,t,r){var n,i,o,a;if(e.anchor.y+e.corners[2].y/r<t.anchor.y+t.corners[0].y/r){var s=e.corners[2].x-e.corners[3].x,l=e.corners[2].y-e.corners[3].y,u=t.corners[1].x-t.corners[0].x;s*(t.corners[1].y-t.corners[0].y)-l*u>=0?e.anchor.y+e.corners[3].y/r<t.anchor.y+t.corners[0].y/r?(n=e.corners[3],i=t.corners[0],o=t.corners[1],a=1):(n=t.corners[0],i=e.corners[3],o=e.corners[2],a=-1):e.anchor.y+e.corners[2].y/r>t.anchor.y+t.corners[1].y/r?(n=e.corners[2],i=t.corners[0],o=t.corners[1],a=1):(n=t.corners[1],i=e.corners[3],o=e.corners[2],a=-1)}else(s=e.corners[2].x-e.corners[1].x)*(t.corners[3].y-t.corners[0].y)-(l=e.corners[2].y-e.corners[1].y)*(u=t.corners[3].x-t.corners[0].x)<0?e.anchor.y+e.corners[1].y/r>t.anchor.y+t.corners[0].y/r?(n=e.corners[1],i=t.corners[0],o=t.corners[3],a=1):(n=t.corners[0],i=e.corners[1],o=e.corners[2],a=-1):e.anchor.y+e.corners[2].y/r<t.anchor.y+t.corners[3].y/r?(n=e.corners[2],i=t.corners[0],o=t.corners[3],a=1):(n=t.corners[3],i=e.corners[1],o=e.corners[2],a=-1);var f=o.x-i.x,c=o.y-i.y;return a*((n.y-i.y)*f-(n.x-i.x)*c)/((e.anchor.x-t.anchor.x)*c-(e.anchor.y-t.anchor.y)*f)},e._calcExtZoomY=function(e,t,r){var n,i,o,a;if(e.anchor.x+e.corners[3].x/r<t.anchor.x+t.corners[1].x/r){var s=e.corners[3].x-e.corners[2].x,l=e.corners[3].y-e.corners[2].y,u=t.corners[0].x-t.corners[1].x;s*(t.corners[0].y-t.corners[1].y)-l*u<0?e.anchor.x+e.corners[2].x/r<t.anchor.x+t.corners[1].x/r?(n=e.corners[2],i=t.corners[1],o=t.corners[0],a=1):(n=t.corners[1],i=e.corners[2],o=e.corners[3],a=-1):e.anchor.x+e.corners[3].x/r>t.anchor.x+t.corners[0].x/r?(n=e.corners[3],i=t.corners[1],o=t.corners[0],a=1):(n=t.corners[0],i=e.corners[2],o=e.corners[3],a=-1)}else(s=e.corners[3].x-e.corners[0].x)*(t.corners[2].y-t.corners[1].y)-(l=e.corners[3].y-e.corners[0].y)*(u=t.corners[2].x-t.corners[1].x)>0?e.anchor.x+e.corners[0].x/r>t.anchor.x+t.corners[1].x/r?(n=e.corners[0],i=t.corners[1],o=t.corners[2],a=1):(n=t.corners[1],i=e.corners[0],o=e.corners[3],a=-1):e.anchor.x+e.corners[3].x/r<t.anchor.x+t.corners[2].x/r?(n=e.corners[3],i=t.corners[1],o=t.corners[2],a=1):(n=t.corners[2],i=e.corners[0],o=e.corners[3],a=-1);var f=o.x-i.x,c=o.y-i.y;return a*((n.y-i.y)*f-(n.x-i.x)*c)/((e.anchor.x-t.anchor.x)*c-(e.anchor.y-t.anchor.y)*f)},e}();t.ConflictEngine=u}).apply(null,n))||(e.exports=i)},qDf7:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r("zOht"),r("v7zm"),r("qMld"),r("EO7D"),r("7CQW"),r("0+xL"),r("tVEB"),r("c0+/"),r("wodO"),r("yaQU"),r("GDRe"),r("UTXC")],void 0===(i=(function(e,t,r,n,i,o,a,s,l,u,f,c,h,x){return function(){function e(e,t,r){this._pbfTiles={},this._tileClippers={},this._client=r,this._tile=t,this._layers=t.getLayers();var i=t.tileKey.split("/").map(parseFloat),o=i[0],a=i[1],s=i[2];this._level=o;for(var l=Math.max(8,Math.round(1*this._level)-8),u=0,f=Object.keys(e);u<f.length;u++){var c=f[u],x=e[c];if(this._pbfTiles[c]=new n(new Uint8Array(x.protobuff),new DataView(x.protobuff)),x.refKey){var d=o-x.refKey.split("/").map(parseFloat)[0];if(d>0){var p=(1<<d)-1;this._tileClippers[c]=new h.TileClipper(d,a&p,s&p,8,l)}}this._tileClippers[c]||(this._tileClippers[c]=new h.SimpleBuilder)}}return e.prototype.parse=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n,o,a,l,u,f,c,h,d,p,y,_,g,v,m,I,B,V,b,D,w,P,M,E,S,T,z,C,A,L,k,N,O,F,j,G,Y,H,R,U,Z,K,W,q,Q,J,X,$,ee,te,re,ne,ie,oe,ae,se;return r.__generator(this,(function(r){for(t=e&&e.signal,n=this._parseTileData(this._pbfTiles),a=this._level,u=[],f=this._tileClippers,c={},h={},d=(o=this._layers).length-1;d>=0;d--)(l=o[d]).minzoom&&a<Math.floor(l.minzoom)||l.maxzoom&&a>=l.maxzoom||l.layout&&l.layout.visibility&&"none"===l.layout.visibility||0!==l.type&&n[l.source]&&f[l.source]&&(p=f[l.source],(C=n[l.source][W=l.sourceLayer])&&((y=h[l.source])||(y=h[l.source]=new Set),y.add(l.sourceLayer),(ee=this._createBucket(l))&&(ee.layerIndex=d,ee.layerExtent=C.extent,ee.tileClipper=p,(A=c[l.source])||(A=c[l.source]={}),(_=A[W])||(_=A[W]=[]),_.push(ee))));for(g=10*this._level,v=10*(this._level+1),m=[],I=[],B=[],V=[],b=new Set,D={},w=[],P=[],M=function(e){h[e].forEach((function(t){w.push(t),P.push(e)}))},E=0,S=Object.keys(h);E<S.length;E++)M(Z=S[E]);for(T=0;T<w.length;T++)if(z=w[T],n[Z=P[T]]&&c[Z]&&(C=n[Z][z],(q=(A=c[Z])[z])&&0!==q.length)){if(i.isAborted(t))return[2,void 0];for(L=C.getData();L.next(2);){if(k=L.getMessage(),N=new s(k,C),k.release(),O=N.values){if((F=O._minzoom)&&F>=v)continue;if((j=O._maxzoom)&&j<=g)continue}for(G=0,Y=q;G<Y.length;G++)(ee=Y[G]).pushFeature(N)}}for(H=this._tile,R=0,U=Object.keys(c);R<U.length;R++)for(W in K=c[Z=U[R]])for(Q=0,J=q=K[W];Q<J.length;Q++)(ee=J[Q]).hasFeatures()&&(3===ee.layer.type?(m.push(ee),H.addBucket(ee)):ee.layer.refLayerId?B.push(ee):(I.push(ee),V[ee.layer.id]=ee));for(X=0,$=m;X<$.length;X++)(te=ee=$[X]).getResources(te.tileClipper,b,D);if(this._tile.status===x.TileStatus.INVALID)return[2,i.resolve([])];for(ae in re=[],ne=this._tile.getWorkerTileHandler(),b.size>0&&(ie=ne.fetchSprites(b,this._client,e),re.push(ie)),D)(se=D[ae]).size>0&&(oe=ne.fetchGlyphs(this._tile.tileKey,ae,se,this._client,e),re.push(oe));return[2,i.all(re).then((function(){for(var e=0,t=I;e<t.length;e++){var r=t[e];r.processFeatures(r.tileClipper),u.push(r)}for(var n=0,i=B;n<i.length;n++){var o=i[n],a=V[o.layer.refLayerId];a&&(a.assignBufferInfo(o),u.push(o))}for(var s=0,l=m;s<l.length;s++){var f=l[s];f.processFeatures(f.tileClipper),u.push(f)}return u.sort((function(e,t){return e.layerIndex-t.layerIndex})),u}))]}))}))},e.prototype._parseTileData=function(e){for(var t={},r=0,n=Object.keys(e);r<n.length;r++){for(var i=n[r],o=e[i],a={};o.next();)if(3===o.tag()){var s=o.getMessage(),l=new f(s);s.release(),a[l.name]=l}else o.skip();t[i]=a}return t},e.prototype._createBucket=function(e){switch(e.type){case 0:return this._createBackgroundBucket(e);case 1:return this._createFillBucket(e);case 2:return this._createLineBucket(e);case 4:return this._createCircleBucket(e);case 3:return this._createSymbolBucket(e)}},e.prototype._createBackgroundBucket=function(e){return new o(e,this._level)},e.prototype._createFillBucket=function(e){var t=this._tile;return new l(e,this._level,e.hasDataDrivenFill?t.fillDDVertexBuffer:t.fillVertexBuffer,t.fillIndexBuffer,e.hasDataDrivenOutline?t.outlineDDVertexBuffer:t.outlineVertexBuffer,t.outlineIndexBuffer)},e.prototype._createLineBucket=function(e){var t=this._tile;return new u(e,this._level,e.hasDataDrivenLine?t.lineDDVertexBuffer:t.lineVertexBuffer,t.lineIndexBuffer)},e.prototype._createCircleBucket=function(e){var t=this._tile;return new a(e,this._level,t.circleVertexBuffer,t.circleIndexBuffer)},e.prototype._createSymbolBucket=function(e){var t=this._tile;return new c(e,this._level,e.hasDataDrivenIcon?t.iconDDVertexBuffer:t.iconVertexBuffer,t.iconIndexBuffer,e.hasDataDrivenText?t.textDDVertexBuffer:t.textVertexBuffer,t.textIndexBuffer,t.placementEngine,t.getWorkerTileHandler())},e}()}).apply(null,n))||(e.exports=i)},tVEB:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r("zOht"),r("QVms"),r("1E+e"),r("2yK+"),r("6+ni")],void 0===(i=(function(e,t,r,n,i,o,a){return function(e){function t(t,r,n,i,o,a){var s=e.call(this,t,r)||this;if(t.hasDataDrivenFill!==n.isDataDriven())throw new Error("incompatible fill buffer");if(t.hasDataDrivenOutline!==o.isDataDriven())throw new Error("incompatible outline buffer");return s._fillVertexBuffer=n,s._fillIndexBuffer=i,s._outlineVertexBuffer=o,s._outlineIndexBuffer=a,s}return r.__extends(t,e),Object.defineProperty(t.prototype,"fillIndexStart",{get:function(){return this._fillIndexStart},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fillIndexCount",{get:function(){return this._fillIndexCount},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"outlineIndexStart",{get:function(){return this._outlineIndexStart},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"outlineIndexCount",{get:function(){return this._outlineIndexCount},enumerable:!0,configurable:!0}),t.prototype.assignBufferInfo=function(e){var t=e;t._fillIndexStart=this._fillIndexStart,t._fillIndexCount=this._fillIndexCount,e.layer.getPaintProperty("fill-outline-color")?(t._outlineIndexStart=this._outlineIndexStart,t._outlineIndexCount=this._outlineIndexCount):(t._outlineIndexStart=0,t._outlineIndexCount=0)},t.prototype.processFeatures=function(e){this._fillIndexStart=this._fillIndexBuffer.index,this._fillIndexCount=0,this._outlineIndexStart=this._outlineIndexBuffer.index,this._outlineIndexCount=0;var t=this.layer,r=this.zoom,n=t.hasDataDrivenFill,i=t.hasDataDrivenOutline;e&&e.setExtent(this.layerExtent);var o=t.getPaintValue("fill-pattern",r),a=t.getPaintValue("fill-antialias",r)&&void 0===o,s=[1,1,1,1],l=[1,1,1,1],u=1;if(t.outlineUsesFillColor){if(a&&!t.hasDataDrivenOpacity){var f=t.getPaintValue("fill-opacity",r),c=t.getPaintValue("fill-opacity",r+1);f<1&&c<1&&(a=!1)}if(a&&!t.hasDataDrivenColor){var h=t.getPaintValue("fill-color",r),x=t.getPaintValue("fill-color",r+1);h[3]<1&&x[3]<1&&(a=!1)}}for(var d=0,p=this._features;d<p.length;d++){var y=p[d];!o&&t.hasDataDrivenColor&&(s=t.getPaintValue("fill-color",r,y)),t.hasDataDrivenOpacity&&(u=t.getPaintValue("fill-opacity",r,y)),!o&&t.hasDataDrivenOutlineColor&&(l=t.getPaintValue("fill-outline-color",r,y));var _=void 0;n&&(_={color:s,opacity:u});var g=void 0;i&&(g={color:t.outlineUsesFillColor?s:l,opacity:u});var v=y.getGeometry(e);this._processFeature(v,a,t.outlineUsesFillColor,_,g)}},t.prototype._processFeature=function(e,r,n,i,o){if(e){var a,s=e.length;if(r&&(!n||!o||o.color[3]*o.opacity==1))for(var l=0;l<s;l++)this._processOutline(e[l],o);for(l=0;l<s;l++){var u=t._area(e[l]);u>128?(void 0!==a&&this._processFill(e,a,i),a=[l]):u<-128&&void 0!==a&&a.push(l)}void 0!==a&&this._processFill(e,a,i)}},t.prototype._processOutline=function(e,t){var r,n,i,o=this._outlineVertexBuffer,s=this._outlineIndexBuffer,l=s.index,u=new a.Point(0,0),f=new a.Point(0,0),c=new a.Point(0,0),h=-1,x=-1,d=-1,p=-1,y=-1,_=!1,g=e.length;if(!(g<2)){for(var v=e[0],m=e[g-1];g&&m.isEqual(v);)m=e[--g-1];if(!(g-0<2)){for(var I=0;I<g;++I){0===I?(i=e[1],u.assignSub(n=e[0],r=e[g-1]),u.normalize(),u.rightPerpendicular()):(r=n,n=i,i=I!==g-1?e[I+1]:e[0],u.assign(f));var B=this._isClipEdge(r,n);-1===p&&(_=B),f.assignSub(i,n),f.normalize(),f.rightPerpendicular();var V=u.x*f.y-u.y*f.x;c.assignAdd(u,f),c.normalize();var b=-c.x*-u.x+-c.y*-u.y,D=Math.abs(0!==b?1/b:1);D>8&&(D=8),V>=0?(d=o.add(n.x,n.y,u.x,u.y,0,1,t),-1===p&&(p=d),h>=0&&x>=0&&d>=0&&!B&&s.add(h,x,d),x=o.add(n.x,n.y,D*-c.x,D*-c.y,0,-1,t),-1===y&&(y=x),h>=0&&x>=0&&d>=0&&!B&&s.add(h,x,d),h=x,x=d,d=o.add(n.x,n.y,c.x,c.y,0,1,t),h>=0&&x>=0&&d>=0&&!B&&s.add(h,x,d),x=o.add(n.x,n.y,f.x,f.y,0,1,t),h>=0&&x>=0&&d>=0&&!B&&s.add(h,x,d)):(d=o.add(n.x,n.y,D*c.x,D*c.y,0,1,t),-1===p&&(p=d),h>=0&&x>=0&&d>=0&&!B&&s.add(h,x,d),x=o.add(n.x,n.y,-u.x,-u.y,0,-1,t),-1===y&&(y=x),h>=0&&x>=0&&d>=0&&!B&&s.add(h,x,d),h=x,x=d,d=o.add(n.x,n.y,-c.x,-c.y,0,-1,t),h>=0&&x>=0&&d>=0&&!B&&s.add(h,x,d),(h=o.add(n.x,n.y,-f.x,-f.y,0,-1,t))>=0&&x>=0&&d>=0&&!B&&s.add(h,x,d))}h>=0&&x>=0&&p>=0&&!_&&s.add(h,x,p),h>=0&&p>=0&&y>=0&&!_&&s.add(h,y,p),this._outlineIndexCount+=3*(s.index-l)}}},t.prototype._processFill=function(e,t,r){var o;t.length>1&&(o=[]);for(var a=0,s=0,l=t;s<l.length;s++){var u=l[s];0!==a&&o.push(a),a+=e[u].length}for(var f=2*a,c=n.acquire(),h=0,x=t;h<x.length;h++)for(var d=e[u=x[h]],p=d.length,y=0;y<p;++y)c.push(d[y].x),c.push(d[y].y);var _=i.earcut(c,o,2),g=_.length;if(g>0){for(var v=this._fillVertexBuffer.index,m=0;m<f;)this._fillVertexBuffer.add(c[m++],c[m++],r);for(var I=0;I<g;)this._fillIndexBuffer.add(v+_[I++],v+_[I++],v+_[I++]);this._fillIndexCount+=g}n.release(c)},t.prototype._isClipEdge=function(e,t){return e.x===t.x?e.x<=-64||e.x>=4160:e.y===t.y&&(e.y<=-64||e.y>=4160)},t._area=function(e){for(var t=0,r=e.length-1,n=0;n<r;n++)t+=(e[n].x-e[n+1].x)*(e[n].y+e[n+1].y);return.5*(t+(e[r].x-e[0].x)*(e[r].y+e[0].y))},t}(o)}).apply(null,n))||(e.exports=i)},ujH7:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r("zOht"),r("LxLY"),r("qMld"),r("EO7D"),r("7CQW"),r("tVEB"),r("c9QS"),r("Gc+D"),r("c0+/"),r("zywo"),r("yaQU"),r("qDf7"),r("RY7r"),r("UTXC")],void 0===(i=(function(e,t,r,n,i,o,a,s,l,u,f,c,h,x,d,p){return function(){function e(){this.rotation=0,this.status=p.TileStatus.INITIALIZED,this._symbolBuckets=[],this.placementEngine=new c.PlacementEngine,this.fillVertexBuffer=new d.FillVertexBuffer(!1),this.fillDDVertexBuffer=new d.FillVertexBuffer(!0),this.fillIndexBuffer=new u.TriangleIndexBuffer,this.outlineVertexBuffer=new d.OutlineVertexBuffer(!1),this.outlineDDVertexBuffer=new d.OutlineVertexBuffer(!0),this.outlineIndexBuffer=new u.TriangleIndexBuffer,this.lineVertexBuffer=new d.LineVertexBuffer(!1),this.lineDDVertexBuffer=new d.LineVertexBuffer(!0),this.lineIndexBuffer=new u.TriangleIndexBuffer,this.iconVertexBuffer=new d.SymbolVertexBuffer(!1),this.iconDDVertexBuffer=new d.SymbolVertexBuffer(!0),this.iconIndexBuffer=new u.TriangleIndexBuffer,this.textVertexBuffer=new d.SymbolVertexBuffer(!1),this.textDDVertexBuffer=new d.SymbolVertexBuffer(!0),this.textIndexBuffer=new u.TriangleIndexBuffer,this.circleVertexBuffer=new d.CircleVertexBuffer,this.circleIndexBuffer=new u.TriangleIndexBuffer}return e.prototype.initialize=function(e,t,r,n){void 0===n&&(n=0),this.tileKey=e,this.refKeys=t,this._workerTileHandler=r,this.rotation=n,this.placementEngine.setAngle(l.C_DEG_TO_RAD*n)},e.prototype.release=function(){this.tileKey="",this.refKeys=null,this.status=p.TileStatus.INITIALIZED,this.rotation=0,this.resetData(),this._workerTileHandler=null},e.prototype.resetData=function(){this.fillVertexBuffer.reset(),this.fillDDVertexBuffer.reset(),this.fillIndexBuffer.reset(),this.outlineVertexBuffer.reset(),this.outlineDDVertexBuffer.reset(),this.outlineIndexBuffer.reset(),this.lineVertexBuffer.reset(),this.lineDDVertexBuffer.reset(),this.lineIndexBuffer.reset(),this.iconVertexBuffer.reset(),this.iconDDVertexBuffer.reset(),this.iconIndexBuffer.reset(),this.textVertexBuffer.reset(),this.textDDVertexBuffer.reset(),this.textIndexBuffer.reset(),this.circleVertexBuffer.reset(),this.circleIndexBuffer.reset(),this.placementEngine.reset(),this._symbolBuckets.length=0},e.prototype.reparse=function(e){return this.resetData(),this.setDataAndParse(this._data,e)},e.prototype.setDataAndParse=function(e,t){var r=this,i=t&&t.signal;return n.isSome(i)&&i.addEventListener("abort",(function e(){i.removeEventListener("abort",e),r.status=p.TileStatus.INVALID})),this._data=e,this._parse(e,t).then((function(e){r.status=p.TileStatus.READY;for(var t=new Uint32Array([1,r.fillVertexBuffer.sizeInBytes,2,r.fillDDVertexBuffer.sizeInBytes,3,r.fillIndexBuffer.sizeInBytes,4,r.outlineVertexBuffer.sizeInBytes,5,r.outlineDDVertexBuffer.sizeInBytes,6,r.outlineIndexBuffer.sizeInBytes,7,r.lineVertexBuffer.sizeInBytes,8,r.lineDDVertexBuffer.sizeInBytes,9,r.lineIndexBuffer.sizeInBytes,10,r.iconVertexBuffer.sizeInBytes,11,r.iconDDVertexBuffer.sizeInBytes,12,r.iconIndexBuffer.sizeInBytes,13,r.textVertexBuffer.sizeInBytes,14,r.textDDVertexBuffer.sizeInBytes,15,r.textIndexBuffer.sizeInBytes,16,r.circleVertexBuffer.sizeInBytes,17,r.circleIndexBuffer.sizeInBytes]),n=[],i=e.length,l=0;l<i;l++){var u=e[l];if(u instanceof s)n.push(u.layerIndex),n.push(1),n.push(u.fillIndexStart),n.push(u.fillIndexCount),n.push(u.outlineIndexStart),n.push(u.outlineIndexCount);else if(u instanceof f)n.push(u.layerIndex),n.push(2),n.push(u.lineIndexStart),n.push(u.lineIndexCount);else if(u instanceof h){n.push(u.layerIndex),n.push(3),n.push(u.sdfMarker?1:0);var c=u.markerPageMap;n.push(c.size),c.forEach((function(e,t){n.push(t),n.push(e[0]),n.push(e[1])}));var x=u.glyphsPageMap;n.push(x.size),x.forEach((function(e,t){n.push(t),n.push(e[0]),n.push(e[1])}))}else u instanceof a?(n.push(u.layerIndex),n.push(4),n.push(u.circleIndexStart),n.push(u.circleIndexCount)):u instanceof o&&(n.push(u.layerIndex),n.push(0))}var d=new Uint32Array(n),y=r.fillVertexBuffer.toBuffer(),_=r.fillDDVertexBuffer.toBuffer(),g=r.fillIndexBuffer.toBuffer(),v=r.outlineVertexBuffer.toBuffer(),m=r.outlineDDVertexBuffer.toBuffer(),I=r.outlineIndexBuffer.toBuffer(),B=r.lineVertexBuffer.toBuffer(),V=r.lineDDVertexBuffer.toBuffer(),b=r.lineIndexBuffer.toBuffer(),D=r.iconVertexBuffer.toBuffer(),w=r.iconDDVertexBuffer.toBuffer(),P=r.iconIndexBuffer.toBuffer(),M=r.textVertexBuffer.toBuffer(),E=r.textDDVertexBuffer.toBuffer(),S=r.textIndexBuffer.toBuffer(),T=r.circleVertexBuffer.toBuffer(),z=r.circleIndexBuffer.toBuffer();return{result:{bufferDataInfo:t.buffer,bucketDataInfo:d.buffer,bufferData:[y,_,g,v,m,I,B,V,b,D,w,P,M,E,S,T,z]},transferList:[y,_,g,v,m,I,B,V,b,D,w,P,M,E,S,T,z,t.buffer,d.buffer]}}))},e.prototype.addBucket=function(e){this._symbolBuckets.push(e)},e.prototype.updateSymbols=function(e,t){var r=this,o=this._symbolBuckets;if(!o||0===o.length)return i.resolve();var a=t&&t.signal;n.isSome(a)&&a.addEventListener("abort",(function e(){a.removeEventListener("abort",e),r.status=p.TileStatus.INVALID})),this.rotation=e;var s=this.placementEngine;s.reset(),s.setAngle(e/256*360*l.C_DEG_TO_RAD);var u=this.iconVertexBuffer;u.reset();var f=this.iconDDVertexBuffer;f.reset();var c=this.iconIndexBuffer;c.reset();var h=this.textVertexBuffer;h.reset();var x=this.textDDVertexBuffer;x.reset();var d=this.textIndexBuffer;d.reset();for(var y=[],_=0;_<o.length;_++){var g=o[_];if(g&&g.layer){var v=g.layer,m=g.copy(v.hasDataDrivenIcon?f:u,c,v.hasDataDrivenText?x:h,d,s);m&&(y.push(m),m.updateSymbols())}}if(this.status===p.TileStatus.INVALID||this.status===p.TileStatus.INITIALIZED||0===u.sizeInBytes&&0===f.sizeInBytes&&0===c.sizeInBytes&&0===h.sizeInBytes&&0===x.sizeInBytes&&0===d.sizeInBytes)return i.reject();var I=new Uint32Array([10,u.sizeInBytes,11,f.sizeInBytes,12,c.sizeInBytes,13,h.sizeInBytes,14,x.sizeInBytes,15,d.sizeInBytes]),B=[];for(_=0;_<y.length;_++){var V=y[_];B.push(V.layerIndex),B.push(3),B.push(V.sdfMarker?1:0);var b=V.markerPageMap;B.push(b.size),b.forEach((function(e,t){B.push(t),B.push(e[0]),B.push(e[1])}));var D=V.glyphsPageMap;B.push(D.size),D.forEach((function(e,t){B.push(t),B.push(e[0]),B.push(e[1])}))}var w=new Uint32Array(B),P=u.toBuffer(),M=f.toBuffer(),E=c.toBuffer(),S=h.toBuffer(),T=x.toBuffer(),z=d.toBuffer();return i.resolve({result:{bufferDataInfo:I.buffer,bucketDataInfo:w.buffer,bufferData:[P,M,E,S,T,z]},transferList:[P,M,E,S,T,z,I.buffer,w.buffer]})},e.prototype.setObsolete=function(){this.status=p.TileStatus.INVALID},e.prototype.getLayers=function(){return this._workerTileHandler.getLayers()},e.prototype.getWorkerTileHandler=function(){return this._workerTileHandler},e.prototype._parse=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return 0===Object.keys(e).length?[2,[]]:(this.status=p.TileStatus.MODIFIED,[2,new x(e,this,t.client).parse(t)])}))}))},e}()}).apply(null,n))||(e.exports=i)},wodO:function(e,t,r){var n,i;n=[r.dj.c(e.i),t],void 0===(i=(function(e,t){return function(){function e(t){for(this.extent=4096,this.keys=[],this.values=[],this._pbfLayer=t.clone();t.next();)switch(t.tag()){case 1:this.name=t.getString();break;case 3:this.keys.push(t.getString());break;case 4:this.values.push(t.processMessage(e._parseValue));break;case 5:this.extent=t.getUInt32();break;default:t.skip()}}return e.prototype.getData=function(){return this._pbfLayer},e._parseValue=function(e){for(;e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getInt64();case 5:return e.getUInt64();case 6:return e.getSInt64();case 7:return e.getBool();default:e.skip()}return null},e}()}).apply(null,n))||(e.exports=i)},yaQU:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r("zOht"),r("uhzp"),r("2yK+"),r("c9QS"),r("zywo"),r("BWOx"),r("UXHw"),r("6+ni")],void 0===(i=(function(e,t,r,n,i,o,a,s,l,u){function f(e,t){return e.iconMosaicItem&&t.iconMosaicItem?e.iconMosaicItem.page===t.iconMosaicItem.page?0:e.iconMosaicItem.page<t.iconMosaicItem.page?-1:1:e.iconMosaicItem&&!t.iconMosaicItem?1:!e.iconMosaicItem&&t.iconMosaicItem?-1:0}return function(e){function t(t,r,n,i,o,a,s,l){var u=e.call(this,t,r)||this;if(u._markerMap=new Map,u._glyphMap=new Map,u._glyphBufferDataStorage=new Map,u._sdfMarkers=!1,t.hasDataDrivenIcon!==n.isDataDriven())throw new Error("incompatible icon buffer");if(t.hasDataDrivenText!==o.isDataDriven())throw new Error("incompatible text buffer");return u._iconVertexBuffer=n,u._iconIndexBuffer=i,u._textVertexBuffer=o,u._textIndexBuffer=a,u._placementEngine=s,u._workerTileHandler=l,u}return r.__extends(t,e),Object.defineProperty(t.prototype,"markerPageMap",{get:function(){return this._markerMap},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"glyphsPageMap",{get:function(){return this._glyphMap},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sdfMarker",{get:function(){return this._sdfMarkers},enumerable:!0,configurable:!0}),t.prototype.copy=function(e,r,n,i,o){var a=new t(this.layer,this.zoom,e,r,n,i,o,this._workerTileHandler);return a.layerIndex=this.layerIndex,a.layerExtent=this.layerExtent,a._iconIndexStart=r.index,a._textIndexStart=i.index,a._iconIndexCount=0,a._textIndexCount=0,a._symbolInstances=this._symbolInstances,a._workerTileHandler=this._workerTileHandler,a._fontArray=this._fontArray,a._textLayout=this._textLayout,a._iconLayout=this._iconLayout,a._isLinePlacement=this._isLinePlacement,a._avoidEdges=this._avoidEdges,a},t.prototype.getResources=function(e,r,n){var i=this.layer,o=this.zoom,a=i.hasDataDrivenIcon,s=i.hasDataDrivenText;e&&e.setExtent(this.layerExtent);for(var l=i.getLayoutProperty("icon-image"),u=i.getLayoutProperty("text-field"),f=i.getLayoutValue("text-font",o),c=i.getLayoutValue("text-transform",o),h=[],x=[1,1,1,1],d=1,p=1,y=[1,1,1,1],_=1,g=1,v=0,m=this._features;v<m.length;v++){var I=m[v],B=I.getGeometry(e);if(B&&0!==B.length){var V=void 0;l&&(V=i.getLayoutValue("icon-image",o,I),l.isDataDriven||(V=this._replaceKeys(V,I.values)),V&&r.add(V));var b=void 0,D=!1;if(u&&((b=i.getLayoutValue("text-field",o,I))&&!u.isDataDriven&&(b=this._replaceKeys(b,I.values)),b)){switch(b=b.replace(/\\n/g,"\n"),c){case 2:b=b.toLowerCase();break;case 1:b=b.toUpperCase()}var w;t._bidiEngine.hasBidiChar(b)&&(w="rtl"===t._bidiEngine.checkContextual(b)?"IDNNN":"ICNNN",b=t._bidiEngine.bidiTransform(b,w,"VLYSN"),D=!0);var P=b.length;if(P>0)for(var M=0,E=f;M<E.length;M++){var S=E[M],T=n[S];T||(T=n[S]=new Set);for(var z=0;z<P;z++){var C=b.charCodeAt(z);T.add(C)}}}if(V||b){var A=i.getLayoutValue("icon-size",o,I),L=i.getLayoutValue("text-size",o,I);i.hasDataDrivenIconColor&&(x=i.getPaintValue("icon-color",o,I)),i.hasDataDrivenIconOpacity&&(d=i.getPaintValue("icon-opacity",o,I)),i.hasDataDrivenIconSize&&(p=A),i.hasDataDrivenTextColor&&(y=i.getPaintValue("text-color",o,I)),i.hasDataDrivenTextOpacity&&(_=i.getPaintValue("text-opacity",o,I)),i.hasDataDrivenTextSize&&(g=L);var k={sprite:V,label:b,rtl:D,type:I.type,geometry:B,iconSize:A,iconRotate:i.getLayoutValue("icon-rotate",o,I),ddIconValues:a?{color:x,opacity:d,size:p}:null,textSize:L,textRotate:i.getLayoutValue("text-rotate",o,I),ddTextValues:s?{color:y,opacity:_,size:g}:null};h.push(k)}}}this._symbolFeatures=h},t.prototype.processFeatures=function(e){e&&e.setExtent(this.layerExtent);var r,n,i,u,c,h=this.layer,x=this.zoom,d=this._isLinePlacement=1===h.getLayoutValue("symbol-placement",x),p=8*h.getLayoutValue("symbol-spacing",x),y=h.getLayoutProperty("icon-image"),_=h.getLayoutProperty("text-field"),g=this._workerTileHandler;if(y&&(this._iconLayout=new l.IconLayout(h,x,d),r=g.getSpriteItems(),n=this._getTranslate(!0)),_){var v=this._textLayout=new l.TextLayout(h,x,d);this._fontArray=v.fontArray;var m=.5;switch(v.anchor){case 5:case 1:case 7:m=0;break;case 6:case 2:case 8:m=1}var I=.5;switch(v.anchor){case 5:case 3:case 6:I=0;break;case 7:case 4:case 8:I=1}var B=.5;switch(v.justify){case 0:B=0;break;case 2:B=1}var V=v.letterSpacing*s.SDF_GLYPH_SIZE,b=d?0:v.maxWidth*s.SDF_GLYPH_SIZE,D=v.lineHeight*s.SDF_GLYPH_SIZE;i=this._fontArray.map((function(e){return g.getGlyphItems(e)})),u=new s.TextShaping(i,b,D,V,m,I,B),c=this._getTranslate(!1)}this._iconIndexStart=this._iconIndexBuffer.index,this._textIndexStart=this._textIndexBuffer.index,this._iconIndexCount=0,this._textIndexCount=0,this._markerMap.clear(),this._glyphMap.clear();var w=[];this._symbolInstances=w;var P=this._textLayout,M=1;P&&P.size&&(M=P.size/s.SDF_GLYPH_SIZE);for(var E=P?P.maxAngle*o.C_DEG_TO_RAD:0,S=P?8*P.size:0,T=0,z=this._symbolFeatures;T<z.length;T++){var C=z[T],A=void 0;C.sprite&&(A=r[C.sprite])&&A.sdf&&(this._sdfMarkers=!0);var L=void 0,k=C.label,N=0;if(k){var O=d?P.keepUpright:P.writingMode&&P.writingMode.indexOf(1)>=0;if((L=u.getShaping(k,C.rtl,O))&&L.length>0){for(var F=1e30,j=-1e30,G=0,Y=L;G<Y.length;G++){var H=Y[G];F=Math.min(F,H.x),j=Math.max(j,H.x)}N=(j-F+2*s.SDF_GLYPH_SIZE)*M*8}}for(var R=0,U=C.geometry;R<U.length;R++){var Z=U[R],K=void 0;if(d){if(L&&L.length>0&&P&&P.size){var W=8*P.size*(2+Math.min(2,4*Math.abs(P.offset[1])));t._smoothVertices(Z,W)}K=t._findAnchors(Z,p,N)}else K=3===C.type?t._findCentroid(Z):[new a.Anchor(Z[0].x,Z[0].y)];for(var q=0,Q=K;q<Q.length;q++){var J=Q[q];J.x<0||J.x>4096||J.y<0||J.y>4096||d&&N>0&&0===P.rotationAlignment&&!t._honorsTextMaxAngle(Z,J,N,E,S)||w.push({shaping:L,line:Z,iconMosaicItem:A,anchor:J,iconSize:C.iconSize,iconRotate:C.iconRotate,ddIconValues:C.ddIconValues,textSize:C.textSize,textRotate:C.textRotate,ddTextValues:C.ddTextValues})}}}w.sort(f);for(var X=0,$=w;X<$.length;X++)this._processFeature($[X],n,c);this._addPlacedGlyphs()},t.prototype.updateSymbols=function(){this._iconIndexStart=this._iconIndexBuffer.index,this._textIndexStart=this._textIndexBuffer.index,this._iconIndexCount=0,this._textIndexCount=0,this._markerMap.clear(),this._glyphMap.clear();var e,t,r=this.layer;r.getLayoutProperty("icon-image")&&(e=this._getTranslate(!0)),r.getLayoutProperty("text-field")&&(t=this._getTranslate(!1));for(var n=0,i=this._symbolInstances;n<i.length;n++)this._processFeature(i[n],e,t);this._addPlacedGlyphs()},t.prototype.assignBufferInfo=function(){},t.prototype._getTranslate=function(e){var t=this.layer.getPaintValue(e?"icon-translate":"text-translate",this.zoom);if(0!==t[0]||0!==t[1]){var r=this._placementEngine.mapAngle;if(0!==r&&0===this.layer.getPaintValue(e?"icon-translate-anchor":"text-translate-anchor",this.zoom)){var n=Math.sin(r),i=Math.cos(r);return[8*(t[0]*i-t[1]*n),8*(t[0]*n+t[1]*i)]}return[8*t[0],8*t[1]]}},t.prototype._replaceKeys=function(e,t){return e.replace(/{([^{}]+)}/g,(function(e,r){return r in t?t[r]:""}))},t.prototype._processFeature=function(e,t,r){var n=e.line,i=e.iconMosaicItem,a=e.shaping,l=e.anchor,u=this._iconLayout,f=u&&!!i,c=!0,h=1;f&&(u.size=e.iconSize,u.rotate=e.iconRotate,h=8*u.size,c=u.optional||!i);var x,d,p=this._textLayout,y=p&&a&&a.length>0,_=1,g=_,v=!0;if(y&&(p.size=e.textSize,p.rotate=e.textRotate,g=8*(_=p.size/s.SDF_GLYPH_SIZE),v=p.optional||!a||0===a.length),f&&(x=this._placementEngine.getIconPlacement(l,t,i,h,u),l.minzoom>x.footprint.minzoom&&(x.footprint.minzoom=l.minzoom),x.footprint.minzoom===o.C_INFINITY&&(x=null)),(x||c)&&(y&&(d=this._placementEngine.getTextPlacement(l,r,a,g,n,p))&&(l.minzoom>d.footprint.minzoom&&(d.footprint.minzoom=l.minzoom),d.footprint.minzoom===o.C_INFINITY&&(d=null)),d||v)){if(x&&d||(v||c?v||d?c||x||(d=null):x=null:(x=null,d=null)),x&&d&&!v&&!c){var m=Math.max(x.footprint.minzoom,d.footprint.minzoom);x.footprint.minzoom=m,d.footprint.minzoom=m}d&&(p.ignorePlacement||this._placementEngine.add(d),this._storePlacedGlyphs(d.shapes,d.footprint.minzoom,this.zoom,e.ddTextValues)),x&&(u.ignorePlacement||this._placementEngine.add(x),this._addPlacedIcons(x.shapes,x.footprint.minzoom,this.zoom,i.page,e.ddIconValues))}},t.prototype._addPlacedIcons=function(e,t,r,n,i){for(var a=Math.max(r+o.log2(t),0),s=this._iconVertexBuffer,l=this._iconIndexBuffer,u=0,f=e;u<f.length;u++){var c=f[u],h=Math.max(r+o.log2(c.minzoom),a),x=Math.min(r+o.log2(c.maxzoom),25);if(!(x<=h)){var d=c.tl,p=c.tr,y=c.bl,_=c.br,g=c.mosaicRect,v=c.labelAngle,m=c.minAngle,I=c.maxAngle,B=c.anchor,V=s.index,b=g.x,D=g.y,w=b+g.width,P=D+g.height;s.add(B.x,B.y,d.x,d.y,b,D,v,m,I,h,x,a,i),s.add(B.x,B.y,p.x,p.y,w,D,v,m,I,h,x,a,i),s.add(B.x,B.y,y.x,y.y,b,P,v,m,I,h,x,a,i),s.add(B.x,B.y,_.x,_.y,w,P,v,m,I,h,x,a,i),l.add(V+0,V+1,V+2),l.add(V+1,V+2,V+3),this._markerMap.has(n)?this._markerMap.get(n)[1]+=6:this._markerMap.set(n,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=2}}},t.prototype._addPlacedGlyphs=function(){var e=this,t=this._textVertexBuffer,r=this._textIndexBuffer;this._glyphBufferDataStorage.forEach((function(n,i){for(var o=0,a=n;o<a.length;o++){var s=a[o],l=t.index;t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.tl[0],s.tl[1],s.xmin,s.ymin,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,s.placementLod,s.ddValues),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.tr[0],s.tr[1],s.xmax,s.ymin,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,s.placementLod,s.ddValues),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.bl[0],s.bl[1],s.xmin,s.ymax,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,s.placementLod,s.ddValues),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.br[0],s.br[1],s.xmax,s.ymax,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,s.placementLod,s.ddValues),r.add(l+0,l+1,l+2),r.add(l+1,l+2,l+3),e._glyphMap.has(i)?e._glyphMap.get(i)[1]+=6:e._glyphMap.set(i,[e._textIndexStart+e._textIndexCount,6]),e._textIndexCount+=2}})),this._glyphBufferDataStorage.clear()},t.prototype._storePlacedGlyphs=function(e,t,r,n){for(var i=Math.max(r+o.log2(t),0),a=0,s=e;a<s.length;a++){var l=s[a],u=Math.max(r+o.log2(l.minzoom),i),f=Math.min(r+o.log2(l.maxzoom),25);if(!(f<=u)){var c=l.tl,h=l.tr,x=l.bl,d=l.br,p=l.labelAngle,y=l.minAngle,_=l.maxAngle,g=l.anchor,v=l.mosaicRect;this._glyphBufferDataStorage.has(l.page)||this._glyphBufferDataStorage.set(l.page,[]),this._glyphBufferDataStorage.get(l.page).push({glyphAnchor:[g.x,g.y],tl:[c.x,c.y],tr:[h.x,h.y],bl:[x.x,x.y],br:[d.x,d.y],xmin:v.x,ymin:v.y,xmax:v.x+v.width,ymax:v.y+v.height,labelAngle:p,minAngle:y,maxAngle:_,minLod:u,maxLod:f,placementLod:i,ddValues:n})}}},t._findAnchors=function(e,t,r){t+=r;for(var n=0,i=e.length-1,s=0;s<i;s++)n+=u.Point.distance(e[s],e[s+1]);var l=r||t;if(n<=(l*=.5))return[];var f=l/n,c=0,h=-(t=n/Math.max(Math.round(n/t),1))/2,x=[],d=e.length-1;for(s=0;s<d;s++){for(var p=e[s],y=e[s+1],_=y.x-p.x,g=y.y-p.y,v=Math.sqrt(_*_+g*g),m=void 0;h+t<c+v;){var I=((h+=t)-c)/v,B=o.interpolate(p.x,y.x,I),V=o.interpolate(p.y,y.y,I);void 0===m&&(m=Math.atan2(g,_)),x.push(new a.Anchor(B,V,m,s,f))}c+=v}return x},t._deviation=function(e,t,r){return Math.atan2((t.x-e.x)*(r.y-t.y)-(t.y-e.y)*(r.x-t.x),(t.x-e.x)*(r.x-t.x)+(t.y-e.y)*(r.y-t.y))},t._honorsTextMaxAngle=function(e,t,r,n,i){for(var o=0,a=r/2,s=new u.Point(t.x,t.y),l=t.segment+1;o>-a;){if(--l<0)return!1;o-=u.Point.distance(e[l],s),s=e[l]}o+=u.Point.distance(e[l],e[l+1]);for(var f=[],c=0,h=e.length;o<a;){var x=e[l],d=l,p=void 0;do{if(++d===h)return!1;p=e[d]}while(p.isEqual(x));var y=d,_=void 0;do{if(++y===h)return!1;_=e[y]}while(_.isEqual(p));var g=this._deviation(x,p,_);for(f.push({deviation:g,distToAnchor:o}),c+=g;o-f[0].distToAnchor>i;)c-=f.shift().deviation;if(Math.abs(c)>n)return!1;o+=u.Point.distance(p,_),l=d}return!0},t._smoothVertices=function(e,t){if(!(t<=0)){var r=e.length;if(!(r<3)){var n=[],i=0;n.push(0);for(var o=1;o<r;o++)i+=u.Point.distance(e[o],e[o-1]),n.push(i);t=Math.min(t,.2*i);var a=[];a.push(e[0].x),a.push(e[0].y);var s=e[r-1].x,l=e[r-1].y,f=u.Point.sub(e[0],e[1]);for(f.normalize(),e[0].x+=t*f.x,e[0].y+=t*f.y,f.assignSub(e[r-1],e[r-2]),f.normalize(),e[r-1].x+=t*f.x,e[r-1].y+=t*f.y,o=1;o<r;o++)n[o]+=t;n[r-1]+=t;var c=.5*t;for(o=1;o<r-1;o++){for(var h=0,x=0,d=0,p=o-1;p>=0&&!(n[p+1]<n[o]-c);p--){var y=c+n[p+1]-n[o],_=n[p+1]-n[p],g=n[o]-n[p]<c?1:y/_;if(Math.abs(g)<1e-6)break;var v=g*y-.5*(b=g*g)*_,m=g*_/t,I=e[p+1],B=e[p].x-I.x,V=e[p].y-I.y;h+=m/v*(I.x*g*y+.5*b*(y*B-_*I.x)-b*g*_*B/3),x+=m/v*(I.y*g*y+.5*b*(y*V-_*I.y)-b*g*_*V/3),d+=m}for(p=o+1;p<r&&!(n[p-1]>n[o]+c)&&(y=c-n[p-1]+n[o],_=n[p]-n[p-1],g=n[p]-n[o]<c?1:y/_,!(Math.abs(g)<1e-6));p++){var b;h+=(m=g*_/t)/(v=g*y-.5*(b=g*g)*_)*((I=e[p-1]).x*g*y+.5*b*(y*(B=e[p].x-I.x)-_*I.x)-b*g*_*B/3),x+=m/v*(I.y*g*y+.5*b*(y*(V=e[p].y-I.y)-_*I.y)-b*g*_*V/3),d+=m}a.push(h/d),a.push(x/d)}for(a.push(s),a.push(l),o=0,p=0;o<r;o++)e[o].x=a[p++],e[o].y=a[p++]}}},t._findCentroid=function(e){var t=e.length-1,r=0,n=0,i=0,o=e[0].x,s=e[0].y;o>4096&&(o=4096),o<0&&(o=0),s>4096&&(s=4096),s<0&&(s=0);for(var l=1;l<t;l++){var u=e[l].x,f=e[l].y,c=e[l+1].x,h=e[l+1].y;u>4096&&(u=4096),u<0&&(u=0),f>4096&&(f=4096),f<0&&(f=0),c>4096&&(c=4096),c<0&&(c=0),h>4096&&(h=4096),h<0&&(h=0);var x=(u-o)*(h-s)-(c-o)*(f-s);r+=x*(o+u+c),n+=x*(s+f+h),i+=x}return r/=3*i,n/=3*i,isNaN(r)||isNaN(n)?[]:[new a.Anchor(r,n)]},t._bidiEngine=new n.default,t}(i)}).apply(null,n))||(e.exports=i)},zywo:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r("ki27"),r("c9QS"),r("BWOx"),r("6+ni")],void 0===(i=(function(e,t,r,n,i,o){Object.defineProperty(t,"__esModule",{value:!0}),t.Anchor=function(e,t,r,n,i){void 0===r&&(r=0),void 0===n&&(n=-1),void 0===i&&(i=u),this.x=e,this.y=t,this.angle=r,this.segment=n,this.minzoom=i};var a=function(e,t,r,i,o,a,s){void 0===a&&(a=u),void 0===s&&(s=n.C_INFINITY),this.anchor=e,this.labelAngle=t,this.glyphAngle=r,this.page=i,this.alternateVerticalGlyph=o,this.minzoom=a,this.maxzoom=s},s=function(e,t,r,n,i,o,a,s,l,u,f,c){this.tl=e,this.tr=t,this.bl=r,this.br=n,this.mosaicRect=i,this.labelAngle=o,this.minAngle=a,this.maxAngle=s,this.anchor=l,this.minzoom=u,this.maxzoom=f,this.page=c};t.PlacedSymbol=s;var l=function(e,t){this.footprint=e,this.shapes=t};t.Placement=l;var u=.5,f=function(){function e(){this.mapAngle=0,this._conflictEngine=new r.ConflictEngine}return e.prototype.reset=function(){this._conflictEngine.reset()},e.prototype.setAngle=function(e){this.mapAngle=e},e.prototype.getIconPlacement=function(e,t,i,a,f){var c=i.width/i.pixelRatio,h=i.height/i.pixelRatio,x=f.offset[0]-c/2,d=f.offset[1]-h/2,p=x+c,y=d+h,_=i.rect,g=2/i.pixelRatio,v=x-g,m=d-g,I=v+_.width/i.pixelRatio,B=m+_.height/i.pixelRatio,V=new o.Point(v,m),b=new o.Point(I,B),D=new o.Point(v,B),w=new o.Point(I,m),P=f.rotate*n.C_DEG_TO_RAD,M=1===f.rotationAlignment;if(e.segment>=0&&!M&&(P+=e.angle),0!==P){var E=Math.cos(P),S=Math.sin(P);V.rotate(E,S),b.rotate(E,S),D.rotate(E,S),w.rotate(E,S)}var T=8*f.padding,z=new o.Point(e.x,e.y),C=new r.Footprint(this.mapAngle,T,M);C.addBox(z,new r.Box(x,d,p,y),a,P,t,u,n.C_INFINITY);var A=new s(V,w,D,b,_,0,0,256,z,u,n.C_INFINITY,0),L=new l(C,[A]),k=u;return f.allowOverlap||(k=this._conflictEngine.getMinZoom(L.footprint,k)),C.minzoom=k,L},e.prototype.getTextPlacement=function(e,t,f,c,h,x){for(var d=new o.Point(e.x,e.y),p=x.rotate*n.C_DEG_TO_RAD,y=0===x.rotationAlignment,_=x.keepUpright,g=u,v=!y,m=v?0:e.angle,I=e.segment>=0&&y,B=new r.Footprint(this.mapAngle,8*x.padding,v),V=[],b=!I,D=Number.POSITIVE_INFINITY,w=Number.NEGATIVE_INFINITY,P=D,M=w,E=(I||y)&&_,S=!1,T=0,z=f;T<z.length;T++)if((F=z[T]).vertical){S=!0;break}var C,A=0,L=0;if(!I&&S){var k=i.TextShaping.getTextBox(f,x.lineHeight*i.SDF_GLYPH_SIZE);switch(x.anchor){case 1:A=k.height/2,L=-k.width/2;break;case 2:A=-k.height/2,L=k.width/2;break;case 3:A=k.height/2,L=k.width/2;break;case 4:A=-k.height/2,L=-k.width/2;break;case 5:A=k.height;break;case 7:L=-k.width;break;case 6:L=k.width;break;case 8:A=-k.height}}A+=x.offset[0]*i.SDF_GLYPH_SIZE,L+=x.offset[1]*i.SDF_GLYPH_SIZE;for(var N=0,O=f;N<O.length;N++){var F,j=(F=O[N]).glyphMosaicItem;if(j&&!j.rect.isEmpty){var G=j.rect,Y=j.metrics,H=j.page;b&&(C&&C!==F.y&&(k=void 0,k=S?new r.Box(-M+A,D+L,-P+A,w+L):new r.Box(D+A,P+L,w+A,M+L),B.addBox(d,k,c,p,t,u,n.C_INFINITY),P=D=Number.POSITIVE_INFINITY,M=w=Number.NEGATIVE_INFINITY),C=F.y);var R=[];if(I){var U=(F.x+Y.left-4+.5*j.metrics.width)*c;if(g=this._placeGlyph(e,g,U,h,e.segment,1,F.vertical,H,R),_&&(g=this._placeGlyph(e,g,U,h,e.segment,-1,F.vertical,H,R)),g>=2)break}else R.push(new a(d,m,m,H,!1)),y&&_&&R.push(new a(d,m+n.C_PI,m+n.C_PI,H,!1));var Z=F.x+Y.left,K=F.y-i.SDF_GLYPH_BASELINE-Y.top,W=Z+Y.width,q=K+Y.height,Q=void 0,J=void 0,X=void 0,$=void 0;if(!I&&S)if(F.vertical){var ee=(Z+W)/2-Y.height/2,te=(K+q)/2+Y.width/2;Q=new o.Point(-te-4+A,ee-4+L),J=new o.Point(Q.x+G.width,Q.y+G.height),X=new o.Point(Q.x,J.y),$=new o.Point(J.x,Q.y)}else Q=new o.Point(4-K+A,Z-4+L),J=new o.Point(Q.x-G.height,Q.y+G.width),X=new o.Point(J.x,Q.y),$=new o.Point(Q.x,J.y);else Q=new o.Point(Z-4+A,K-4+L),J=new o.Point(Q.x+G.width,Q.y+G.height),X=new o.Point(Q.x,J.y),$=new o.Point(J.x,Q.y);for(var re=void 0,ne=void 0,ie=void 0,oe=void 0,ae=0,se=R;ae<se.length;ae++){var le=se[ae],ue=void 0,fe=void 0,ce=void 0,he=void 0;le.alternateVerticalGlyph?(re||(re=new o.Point((ee=(Z+W)/2+A)-Y.height/2-4,(te=(K+q)/2+L)+Y.width/2+4),ne=new o.Point(re.x+G.height,re.y-G.width),ie=new o.Point(ne.x,re.y),oe=new o.Point(re.x,ne.y)),ue=re,fe=ie,ce=oe,he=ne):(ue=Q,fe=X,ce=$,he=J);var xe=K,de=q,pe=le.glyphAngle+p;if(0!==pe){var ye=Math.cos(pe),_e=Math.sin(pe);ue=ue.clone(),fe=fe.clone(),ce=ce.clone(),he=he.clone(),ue.rotate(ye,_e),he.rotate(ye,_e),fe.rotate(ye,_e),ce.rotate(ye,_e)}var ge=0,ve=256;I&&S?F.vertical?le.alternateVerticalGlyph?(ge=32,ve=96):(ge=224,ve=32):(ge=224,ve=96):(ge=192,ve=64),V.push(new s(ue,ce,fe,he,G,le.labelAngle,ge,ve,le.anchor,le.minzoom,le.maxzoom,le.page)),E&&!this._legible(le.labelAngle)||(b?(Z<D&&(D=Z),xe<P&&(P=xe),W>w&&(w=W),de>M&&(M=de)):le.minzoom<2&&B.addBox(le.anchor,new r.Box(Z+A,xe+L,W+A,de+L),c,pe,t,le.minzoom,le.maxzoom))}}}if(g>=2)return null;b&&(k=void 0,k=S?new r.Box(-M+A,D+L,-P+A,w+L):new r.Box(D+A,P+L,w+A,M+L),B.addBox(d,k,c,p,t,u,n.C_INFINITY));var me=new l(B,V);return x.allowOverlap||(g=this._conflictEngine.getMinZoom(me.footprint,g)),B.minzoom=g,me},e.prototype.add=function(e){this._conflictEngine.add(e.footprint)},e.prototype._legible=function(e){var t=n.radToByte(e);return t<65||t>=193},e.prototype._placeGlyph=function(e,t,r,i,s,l,u,f,c){var h=l,x=h<0?n.positiveMod(e.angle+n.C_PI,n.C_2PI):e.angle,d=0;r<0&&(h*=-1,r*=-1,d=n.C_PI),h>0&&++s;var p=new o.Point(e.x,e.y),y=i[s],_=n.C_INFINITY;if(i.length<=s)return _;for(;;){var g=y.x-p.x,v=y.y-p.y,m=Math.sqrt(g*g+v*v),I=Math.max(r/m,t),B=n.positiveMod(Math.atan2(v/m,g/m)+d,n.C_2PI);if(c.push(new a(p,x,B,f,!1,I,_)),u&&c.push(new a(p,x,B,f,!0,I,_)),I<=t)return I;p=y.clone();do{if(i.length<=(s+=h)||s<0)return I;y=i[s]}while(p.isEqual(y));var V=y.x-p.x,b=y.y-p.y,D=Math.sqrt(V*V+b*b);b*=m/D,p.x-=V*=m/D,p.y-=b,_=I}},e}();t.PlacementEngine=f}).apply(null,n))||(e.exports=i)}}]);