????
Current Path : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/ |
Current File : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/5.8d2be883471f51a5b7f1.js |
(function(){var e={"esri/views/2d/engine/webgl/AttributeStoreView":"+4HP","esri/views/2d/engine/webgl/BitBlitRenderer":"+P5t","esri/views/2d/engine/webgl/shaders/BitBlitPrograms":"/2xn","esri/views/2d/engine/webgl/WGLContainer":"/U66","esri/views/2d/engine/webgl/fontUtils":"0XPR","esri/symbols/cim/effects/CIMEffectHelper":"0zc9","esri/views/2d/engine/Container":"1Mg+","esri/views/2d/engine/webgl/SpriteMosaic":"1ZJt","esri/views/2d/engine/webgl/util/BidiText":"2Gaw","esri/views/2d/engine/webgl/brushes/WGLGeometryBrushMarker":"2pwJ","esri/views/2d/engine/webgl/brushes/WGLBrush":"3+7H","esri/symbols/cim/placements/CIMMarkerPlacementHelper":"3KXq","esri/views/2d/engine/RasterTile":"3SpT","esri/core/libs/gl-matrix-2/factories/vec4f32":"3gjc","esri/views/2d/engine/webgl/effects/Effect":"3ikD","esri/views/2d/engine/webgl/effects/highlight/HighlightSurfaces":"3o6C","esri/views/2d/engine/webgl/GlyphMosaic":"3pdx","esri/views/2d/engine/webgl/brushes/WGLGeometryBrushText":"3u8V","esri/views/2d/engine/webgl/util/Writer":"3vQA","esri/views/2d/engine/webgl/color":"4F/P","esri/views/2d/engine/webgl/shaders/StencilPrograms":"5MKl","esri/views/2d/engine/webgl/mesh/templates/WGLLineTemplate":"65my","esri/views/2d/engine/webgl/brushes/WGLBrushInfo":"66cO","esri/views/2d/engine/BitmapTile":"6h7w","esri/views/2d/engine/webgl/SymbolProperties":"7AYJ","esri/core/libs/gl-matrix-2/factories/mat4f32":"7Yqx","esri/views/2d/engine/vectorTiles/shaders/sources/resolver":"8HLi","esri/views/2d/engine/webgl/brushes/WGLGeometryBrushFill":"8fgo","esri/views/2d/engine/webgl/mesh/templates/WGLDynamicTextTemplate":"8rHD","esri/views/webgl/rasterUtils":"A97r","esri/views/2d/engine/webgl/mesh/templates/WGLLabelTemplate":"AKDC","esri/views/2d/engine/webgl/WGLTile":"AP+j","esri/views/2d/engine/webgl/util/debug":"AbdV","esri/views/2d/engine/webgl/MemoryRequirements":"AwqN","esri/views/2d/engine/webgl/alignmentUtils":"B+Jm","esri/views/2d/engine/webgl/mesh/templates/WGLFillTemplate":"BU48","esri/views/2d/engine/webgl/mesh/templates/segmentUtils":"Bp7l","esri/views/2d/engine/DisplayObject":"Brhx","esri/views/2d/engine/webgl/collisions/visualVariableSimpleUtils":"CE5S","esri/views/2d/engine/webgl/util/Matcher":"CX95","esri/views/2d/engine/webgl/WGLDisplayList":"Dikz","esri/views/2d/engine/webgl/number":"Dos2","esri/views/2d/engine/BitmapTileContainer":"DvfX","esri/views/2d/engine/webgl/util/Reader":"Ed/z","esri/views/2d/engine/webgl/mesh/VertexVector":"FDNA","esri/views/2d/engine/webgl/mesh/templates/WGLDynamicFillTemplate":"Fo2y","esri/views/2d/engine/webgl/visualVariablesUtils":"G59t","esri/views/2d/engine/vectorTiles/shaders/ProgramCache":"GBWg","esri/views/2d/engine/webgl/mesh/templates/WGLDynamicMarkerTemplate":"Hcrl","esri/views/2d/engine/vectorTiles/shaders/sources/shaderRepository":"HjjH","esri/views/2d/engine/webgl/GlyphSource":"Hoc/","esri/views/2d/engine/webgl/effects/HittestEffect":"HtXH","esri/views/2d/engine/webgl/effects/AnimationEffect":"I6Kl","esri/views/2d/engine/webgl/mesh/templates/WGLBaseTextTemplate":"IWfl","esri/views/2d/engine/webgl/enums":"JNkf","esri/views/2d/engine/webgl/util/Lock":"KAqe","esri/views/2d/engine/webgl/mesh/factories/WGLMeshFactory":"LCdb","esri/views/2d/engine/Stage":"LN/d","esri/views/2d/engine/RasterTileContainer":"M8xM","esri/views/2d/engine/webgl/mesh/templates/WGLTemplateStore":"MGRT","esri/views/2d/engine/webgl/animatedFormats/gif":"MUu6","esri/views/2d/engine/webgl/util/vvFlagUtils":"MtZC","esri/views/2d/engine/webgl/mesh/templates/WGLMeshTemplate":"MzWl","esri/views/2d/engine/webgl/ClippingInfo":"NRog","esri/views/2d/engine/LevelDependentSizeVariable":"NoUk","esri/views/2d/engine/webgl/VertexStream":"Nwkb","esri/views/2d/engine/webgl/mesh/templates/WGLBaseLineTemplate":"O6Ih","esri/views/2d/engine/webgl/Painter":"OO/B","esri/views/2d/engine/webgl/shaders/BlendPrograms":"ORRN","esri/views/2d/engine/ImageryBitmapSource":"Ob6M","esri/views/2d/engine/webgl/brushes/WGLGeometryBrush":"PDSL","esri/views/2d/engine/webgl/Profiler":"PKCt","esri/views/2d/engine/webgl/RectangleBinPack":"PhOF","esri/views/2d/engine/webgl/util/Result":"PlK1","esri/views/2d/engine/webgl/TileBufferData":"PwbG","esri/views/2d/engine/webgl/brushes/WGLBrushVTLFill":"Rpsm","esri/views/2d/engine/webgl/effects/highlight/HighlightRenderer":"RyYO","esri/views/2d/engine/webgl/collisions/LayerCollisionInfo":"S0eh","esri/views/2d/engine/webgl/collisions/CollisionBucketEntry":"ST29","esri/views/2d/engine/webgl/DirtyMap":"SkDs","esri/views/2d/engine/webgl/DisplayRecordStore":"Sq9p","esri/views/2d/engine/webgl/shaders/HighlightPrograms":"TEGq","esri/views/2d/engine/webgl/collisions/CollisionBucket":"TF9k","esri/views/2d/engine/webgl/shaders/BackgroundPrograms":"TQvW","esri/views/2d/engine/webgl/collisions/CollisionGrid":"Tauk","esri/views/2d/engine/webgl/shaders/sources/shaderRepository":"Uu9s","esri/views/2d/engine/webgl/brushes/BrushClip":"V5jM","esri/views/2d/engine/webgl/WebGLDriverTest":"W14q","esri/views/2d/engine/webgl/SDFConverter":"XCks","esri/views/2d/engine/webgl/shaders/MagnifierPrograms":"YIDE","esri/views/2d/engine":"YaB4","esri/views/2d/engine/webgl/mesh/templates/WGLBaseMarkerTemplate":"ZOLT","esri/views/2d/engine/webgl/FreeList":"Zry2","esri/views/2d/engine/webgl/brushes/WGLBrushVTLLine":"a08a","esri/views/2d/engine/webgl/Utils":"apbF","esri/views/2d/engine/webgl/WGLDisplayObject":"azm3","esri/views/2d/engine/webgl/mesh/factories/matcherUtils":"bLBh","esri/views/2d/engine/BitmapContainer":"bOAX","esri/views/2d/engine/webgl/mesh/templates/WGLDynamicLineTemplate":"bePc","esri/views/2d/engine/webgl/shaders/TileInfoPrograms":"bqoF","esri/views/2d/engine/webgl/mesh/MeshData":"cF6f","esri/views/2d/engine/webgl/mesh/templates/WGLMarkerTemplate":"cjzh","esri/views/2d/engine/webgl/animatedFormats/apng":"dEz+","esri/views/2d/engine/webgl/util/symbolUtils":"dtJe","esri/views/2d/engine/webgl/collisions/LayerViewSorter":"eFQu","esri/views/2d/engine/webgl/TextureManager":"eprR","esri/views/2d/engine/webgl/brushes/WGLGeometryBrushLabel":"f93k","esri/views/2d/engine/webgl/collisions/Metric":"fVTS","esri/views/2d/engine/webgl/util/serializationUtils":"flWe","esri/views/2d/engine/Bitmap":"ge+T","esri/views/2d/engine/webgl/TiledDisplayObject":"gi5q","esri/views/2d/engine/webgl/collisions/CollisionEngine":"gm1X","esri/views/2d/engine/RasterBitmap":"gn2p","esri/views/2d/engine/webgl/brushes/WGLGeometryBrushLine":"gvME","esri/views/2d/engine/webgl/painter/RenderPass":"hAHX","esri/views/2d/engine/webgl/WGLDisplayRecord":"hNI9","esri/views/2d/engine/webgl/shaders/sources/resolver":"hPTP","esri/core/libs/gl-matrix-2/vec4f32":"j2SP","esri/views/2d/engine/webgl/brushes/WGLBrushVTLCircle":"jEV9","esri/views/2d/engine/webgl/mesh/templates/WGLBaseFillTemplate":"kNAO","esri/views/2d/engine/webgl/brushes/BrushBitmap":"kmbk","esri/views/2d/engine/vectorTiles/shaders/Programs":"lUvf","esri/core/libs/libtess/libtess":"lnyn","esri/views/2d/engine/webgl/materialKey/MaterialKey":"m87x","esri/views/2d/engine/webgl/effects/highlight/HighlightGradient":"mvc2","esri/views/2d/engine/webgl/effects/highlight/parameters":"n4XV","esri/views/2d/engine/webgl/effects/HighlightEffect":"nOTS","esri/views/2d/engine/webgl/effects/BlendEffect":"nzKn","esri/views/2d/engine/webgl/brushes/WGLBrushVTLBackground":"oBAw","esri/views/2d/engine/webgl/WGLRendererInfo":"oDRR","esri/views/2d/engine/webgl/brushes/raster/BrushRasterBitmap":"oUUG","esri/core/libs/gl-matrix-2/mat4f32":"oZZu","esri/views/2d/engine/webgl/brushes/WGLBrushStencil":"p2sx","esri/views/2d/engine/webgl/mesh/VertexBuffer":"ph8t","esri/views/2d/engine/webgl/MaterialManager":"pvXx","esri/views/2d/engine/webgl/packingUtils":"qdig","esri/views/2d/engine/webgl/Fader":"qe2g","esri/views/2d/layers/features/textUtils":"rAGl","esri/views/2d/engine/webgl/TileData":"rYkQ","esri/views/2d/engine/webgl/Mesh2D":"sbqO","esri/views/2d/engine/webgl/mesh/templates/WGLTextTemplate":"t1uL","esri/views/2d/engine/webgl/TileDisplayData":"tTR7","esri/views/2d/engine/webgl/mesh/Tesselator":"v3M4","esri/views/2d/engine/webgl/mesh/templates/shapingUtils":"vsbv","esri/views/2d/engine/webgl/TileContainer":"wUCb","esri/views/2d/engine/webgl/shaders/MaterialPrograms":"wdp+","esri/views/2d/engine/webgl/collisions/BoundingBox":"x84Q","esri/views/2d/engine/webgl/WGLBuffers":"xxo4","esri/views/2d/engine/webgl/mesh/templates/WGLDynamicMeshTemplate":"yVlQ","esri/views/2d/engine/webgl/MeshData":"yai7","esri/core/CircularArray":"zIqJ","esri/views/2d/engine/webgl/brushes/WGLBrushVTLSymbol":"zbL2"},t=this||window,i=t.webpackJsonp=t.webpackJsonp||[];i.registerAbsMids?i.registerAbsMids(e):(i.absMidsWaiting=i.absMidsWaiting||[]).push(e)})(),(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{"+4HP":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("ma1f"),i("H1tY"),i("qsST"),i("LxLY"),i("qMld"),i("DJpR"),i("tI6k"),i("apbF"),i("AbdV"),i("/f24")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c,f,d){Object.defineProperty(t,"__esModule",{value:!0});var h=o.getLogger("esri.views.2d.engine.webgl.AttributeStoreView"),p=f.createDebugLogger(f.DEBUG_ATTR_UPDATES,h),_=function(e){return 2147483647&e},m=!1,v=function(){function e(e,t,i){this._texture=null,this._lastTexture=null,this._fbos={},this.texelSize=4;var r=e.buffer,n=e.pixelType,o=e.textureOnly,s=c.getPixelArrayCtor(n);this.shared=i,this.pixelType=n,this.size=t,this.textureOnly=o,o||(this.data=new s(a.unwrap(r))),this._resetRange()}return e.prototype.destroy=function(){a.andThen(this._texture,(function(e){return e.dispose()}));var e=function(e){a.andThen(t._fbos[e],(function(t){"0"===e&&t.detachColorTexture(),t.dispose()})),t._fbos[e]=null},t=this;for(var i in this._fbos)e(i);this._texture=null},Object.defineProperty(e.prototype,"_textureDesc",{get:function(){return{target:3553,wrapMode:33071,pixelFormat:6408,dataType:this.pixelType,samplingMode:9728,width:this.size,height:this.size}},enumerable:!0,configurable:!0}),e.prototype.setData=function(e,t,i){var o=_(e),s=a.unwrap(this.data),l=o*this.texelSize+t;!s||l>=s.length?n("esri-2d-debug")&&!m&&(h.error(new r("mapview-attributeStore","Attempted to set out of bounds index")),m=!0):(s[l]=i,this.dirtyStart=Math.min(this.dirtyStart,o),this.dirtyEnd=Math.max(this.dirtyEnd,o))},e.prototype.getData=function(e,t){if(a.isNone(this.data))return null;var i=_(e)*this.texelSize+t;return!this.data||i>=this.data.length?(n("esri-2d-debug")&&!m&&(h.error(new r("mapview-attributeStore","Attempted to read out of bounds index")),m=!0),null):this.data[i]},e.prototype.getTexture=function(e){var t=this;return a.unwrapOr(this._texture,(function(){return t._initTexture(e)}))},e.prototype.getFBO=function(e,t){if(void 0===t&&(t=0),a.isNone(this._fbos[t])){var i=0===t?this.getTexture(e):this._textureDesc;this._fbos[t]=new d(e,{colorTarget:0,depthStencilTarget:0},i)}return this._fbos[t]},Object.defineProperty(e.prototype,"locked",{get:function(){return!(5121!==this.pixelType||!this.shared||this.textureOnly||!n("esri-atomics")||!this.data)&&1===Atomics.load(this.data,0)},enumerable:!0,configurable:!0}),e.prototype.updateTexture=function(e){if(!this.locked)try{var t=this.dirtyStart,i=this.dirtyEnd;if(t>i)return;this._resetRange();var n=a.unwrap(this.data).buffer,o=this.getTexture(e),s=(t-t%this.size)/this.size,l=s,u=(i-i%this.size)/this.size,f=s*this.size*4,d=4*(this.size+u*this.size)-f,p=c.getPixelArrayCtor(this.pixelType),_=p.BYTES_PER_ELEMENT;try{new p(n,f*_,d)}catch(e){console.debug(e)}var m=new p(n,f*_,d),v=this.size,g=u-l+1;if(g>this.size)return void h.error(new r("mapview-webgl","Out-of-bounds index when updating AttributeData"));o.updateData(0,0,l,v,g,m)}catch(e){console.debug(e)}},e.prototype.update=function(e){var t=e.data,i=e.start,r=e.end;if(a.isSome(t))for(var n=this.data,o=i*this.texelSize,s=0;s<t.length;s++)e.layout&1<<s%this.texelSize&&(n[o+s]=t[s]);this.dirtyStart=Math.min(this.dirtyStart,i),this.dirtyEnd=Math.max(this.dirtyEnd,r)},e.prototype.resize=function(e,t){var i=this.size;if(this.size=t,this.textureOnly)i!==this.size&&(this._lastTexture=this._texture,this._texture=null);else{var r=c.getPixelArrayCtor(this.pixelType);this.destroy(),this.data=new r(a.unwrap(e.buffer))}},e.prototype._resetRange=function(){this.dirtyStart=2147483647,this.dirtyEnd=0},e.prototype._initTexture=function(e){var t=new l.Texture(e,this._textureDesc,a.unwrapOr(this.data,void 0));if(a.isSome(this._lastTexture)&&this._fbos[0]){var i=this._lastTexture.descriptor.width,r=this._lastTexture.descriptor.height,n=this._lastTexture.descriptor.dataType,o=this._lastTexture.descriptor.pixelFormat,s=this.getFBO(e),u=c.getPixelBytes(n),f=new(c.getPixelArrayCtor(n))(new ArrayBuffer(i*r*u*this.texelSize)),d=e.getBoundFramebufferObject(),h=e.getViewport(),p=h.x,_=h.y,m=h.width,v=h.height;e.bindFramebuffer(s),s.readPixels(0,0,i,r,o,n,f),t.updateData(0,0,0,2*i,r/2,f),e.setViewport(p,_,m,v),e.bindFramebuffer(d)}return this.destroy(),this._texture=t,this._texture},e}(),g=function(){function e(){this._initialized=!1,this._forceNextUpload=!1,this._locked=!1}return e.prototype.initialize=function(e){var t=e.blocks,i=e.shared,r=e.size;if(this.shared=i,this.size=r,p("Initializing AttributeStoreView",e),a.isNone(this._data))this._data=a.mapMany(t,(function(e){return new v(e,r,i)}));else for(var n=0;n<this._data.length;n++){var o=this._data[n],s=t[n];a.isSome(s)&&(a.isNone(o)?this._data[n]=new v(s,r,i):o.resize(s,r))}this._initialized=!0},e.prototype.destroy=function(){a.andThen(this._data,(function(e){return a.mapMany(e,(function(e){return e.destroy()}))})),a.andThen(this._defaultTexture,(function(e){return e.dispose()}))},e.prototype.getBlock=function(e){return a.isNone(this._data)?null:this._data[e]},e.prototype.setLabelMinZoom=function(e,t){this.setData(e,0,1,t)},e.prototype.getLabelMinZoom=function(e){return this.getData(e,0,1,255)},e.prototype.getFilterFlags=function(e){return this.getData(e,0,0,0)},e.prototype.getVVSize=function(e){return this.getData(e,u.ATTRIBUTE_DATA_VV,0,0)},e.prototype.getData=function(e,t,i,r){if(!this._data)return 0;var n=a.unwrap(this._data)[t];if(a.isNone(n))return 0;var o=n.getData(e,i);return a.isSome(o)?o:r},e.prototype.setData=function(e,t,i,r){var n=a.unwrap(this._data)[t];a.unwrap(n).setData(e,i,r)},e.prototype.lockTextureUpload=function(){this._locked=!0},e.prototype.unlockTextureUpload=function(){this._locked=!1},e.prototype.forceTextureUpload=function(){this._forceNextUpload=!0},e.prototype.requestUpdate=function(e){return i.__awaiter(this,void 0,void 0,(function(){var t;return i.__generator(this,(function(i){return this._pendingAttributeUpdate?(h.error(new r("mapview-webgl","Tried to update attribute data with a pending update")),[2]):(t=s.createResolver(),p("AttributeStoreView Update Requested",e),this._pendingAttributeUpdate={data:e,resolver:t},[2,t.promise])}))}))},e.prototype.update=function(){if(this._initialized&&a.isSome(this._pendingAttributeUpdate)){for(var e=this._pendingAttributeUpdate,t=e.data,i=e.resolver,r=a.unwrap(this._data),n=function(e){var i=t.blocks[e];a.andThen(r[e],(function(t){return a.andThen(i,(function(i){p("Updating block "+e,i),t.update(i)}))}))},o=0;o<t.blocks.length;o++)n(o);this._pendingAttributeUpdate=null,i()}},e.prototype.bindTextures=function(e){this.update();var t=this._getDefaultTexture(e);if(!this._initialized)return e.bindTexture(t,u.TEXTURE_BINDING_ATTRIBUTE_DATA_0),e.bindTexture(t,u.TEXTURE_BINDING_ATTRIBUTE_DATA_1),e.bindTexture(t,u.TEXTURE_BINDING_ATTRIBUTE_DATA_2),void e.bindTexture(t,u.TEXTURE_BINDING_ATTRIBUTE_DATA_3);var i=a.unwrap(this._data);this._locked&&!this._forceNextUpload||(a.forEachSome(i,(function(t){return t.updateTexture(e)})),this._forceNextUpload=!1),e.bindTexture(a.mapOr(i[0],t,(function(t){return t.getTexture(e)})),u.TEXTURE_BINDING_ATTRIBUTE_DATA_0),e.bindTexture(a.mapOr(i[1],t,(function(t){return t.getTexture(e)})),u.TEXTURE_BINDING_ATTRIBUTE_DATA_1),e.bindTexture(a.mapOr(i[2],t,(function(t){return t.getTexture(e)})),u.TEXTURE_BINDING_ATTRIBUTE_DATA_2),e.bindTexture(a.mapOr(i[3],t,(function(t){return t.getTexture(e)})),u.TEXTURE_BINDING_ATTRIBUTE_DATA_3)},e.prototype._getDefaultTexture=function(e){return a.isNone(this._defaultTexture)&&(this._defaultTexture=new l.Texture(e,{wrapMode:33071,pixelFormat:6408,dataType:5121,samplingMode:9728,width:1,height:1},new Uint8Array(4))),this._defaultTexture},e}();t.AttributeStoreView=g}).apply(null,r))||(e.exports=n)},"+P5t":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("DJpR"),i("/2xn")],void 0===(n=(function(e,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this._initialized=!1}return e.prototype.dispose=function(){this._program&&(this._program.dispose(),this._program=null),this._vertexArrayObject&&(this._vertexArrayObject.dispose(),this._vertexArrayObject=null)},e.prototype.render=function(e,t,i,r){e&&(this._initialized||this._initialize(e),e.setBlendFunctionSeparate(1,771,1,771),e.bindVAO(this._vertexArrayObject),e.bindProgram(this._program),t.setSamplingMode(i),e.bindTexture(t,0),this._program.setUniform1i("u_tex",0),this._program.setUniform1f("u_opacity",r),e.drawArrays(5,0,4),e.bindTexture(null,0),e.bindVAO())},e.prototype._initialize=function(e){if(this._initialized)return!0;var t=r.bitBlit.attributes,n=i.createProgram(e,r.bitBlit);if(!n)return!1;var o=new Int8Array(16);o[0]=-1,o[1]=-1,o[2]=0,o[3]=0,o[4]=1,o[5]=-1,o[6]=1,o[7]=0,o[8]=-1,o[9]=1,o[10]=0,o[11]=1,o[12]=1,o[13]=1,o[14]=1,o[15]=1;var a=new i.VertexArrayObject(e,t,{geometry:[{name:"a_pos",count:2,type:5120,offset:0,stride:4,normalized:!1,divisor:0},{name:"a_tex",count:2,type:5120,offset:2,stride:4,normalized:!1,divisor:0}]},{geometry:i.BufferObject.createVertex(e,35044,o)});return this._program=n,this._vertexArrayObject=a,this._initialized=!0,!0},e}();t.BitBlitRenderer=n}).apply(null,r))||(e.exports=n)},"/2xn":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("hPTP")],void 0===(n=(function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.bitBlit={name:"bitBlit",shaders:{vertexShader:i.resolveIncludes("bitBlit/bitBlit.vert"),fragmentShader:i.resolveIncludes("bitBlit/bitBlit.frag")},attributes:{a_pos:0,a_tex:1}}}).apply(null,r))||(e.exports=n)},"/U66":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("LxLY"),i("YaB4"),i("1Mg+"),i("NRog"),i("JNkf")],n=(function(e,t,i,r,n,o,a,s){Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._lastTime=null,t.name=t.constructor.name,t}return i.__extends(t,e),Object.defineProperty(t.prototype,"clips",{set:function(e){this._clips=e,this.children.forEach((function(t){return t.clips=e})),this._updateClippingInfo()},enumerable:!0,configurable:!0}),t.prototype.doRender=function(e){var t=this.createRenderParams(e),i=t.painter,r=t.profiler,n=t.drawPhase===s.WGLDrawPhase.LABEL?1:t.globalOpacity*this.opacity;r.recordContainerStart(this.name),i.beforeRenderLayer(t,this._clippingInfos?255:0,n),this.updateTransforms(e.state),this.renderChildren(t),i.compositeLayer(t,n),r.recordContainerEnd()},t.prototype.renderChildren=function(e){r.isNone(this._renderPasses)&&(this._renderPasses=this.prepareRenderPasses(this.stage.painter));for(var t=0,i=this._renderPasses;t<i.length;t++)i[t].render(e)},t.prototype.createRenderParams=function(e){var t=Date.now(),n=(r.isSome(this._lastTime)?t-this._lastTime:0)/1e3;return this._lastTime=t,i.__assign(i.__assign({},e),{context:this.stage.context,painter:this.stage.painter,profiler:this.stage.profiler,renderingOptions:this.stage.renderingOptions,driverTestResult:this.stage.driverTestResult,timeDelta:n,timeline:this.stage.timeline})},t.prototype.prepareRenderPasses=function(e){var t=this;return[e.registerRenderPass({name:"clip",brushes:[n.brushes.Clip],target:function(){return t._clippingInfos},drawPhase:s.WGLDrawPhase.MAP|s.WGLDrawPhase.LABEL|s.WGLDrawPhase.LABEL_ALPHA|s.WGLDrawPhase.DEBUG})]},t.prototype.updateTransforms=function(e){for(var t=0,i=this.children;t<i.length;t++)i[t].setTransform(e)},t.prototype.onAttach=function(){e.prototype.onAttach.call(this),this._updateClippingInfo()},t.prototype.onDetach=function(){e.prototype.onDetach.call(this),this._updateClippingInfo()},t.prototype._updateClippingInfo=function(){var e=this;if(r.isSome(this._clippingInfos)&&(this._clippingInfos.forEach((function(e){return e.destroy()})),this._clippingInfos=null),this.stage){var t=this._clips;r.isSome(t)&&t.length&&(this._clippingInfos=t.items.map((function(t){return a.default.fromClipArea(e.stage,t)}))),this.requestRender()}},t}(o.Container);t.default=l}).apply(null,r),void 0===n||(e.exports=n)},"0XPR":function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getFullyQualifiedFontName=function(e){var t=function(e){if(!e.weight)return"";switch(e.weight.toLowerCase()){case"bold":case"bolder":return"-bold"}return""}(e)+function(e){if(!e.style)return"";switch(e.style.toLowerCase()){case"italic":case"oblic":return"-italic"}return""}(e);return function(e){var t=e.toLowerCase().split(" ").join("-");switch(t){case"serif":return"noto-serif";case"sans-serif":return"arial-unicode-ms";case"monospace":return"ubuntu-mono";case"fantasy":return"cabin-sketch";case"cursive":return"redressed";default:return t}}(e.family)+(t.length>0?t:"-regular")},t.getFontDecorationTop=function(e){switch(e){case"underline":return-26;case"line-through":return-18}return NaN}}).apply(null,r))||(e.exports=n)},"0zc9":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("hf/7"),i("++A9"),i("AKcB")],void 0===(n=(function(e,t,i,r,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.executeEffects=function(e,t){for(var o=i.cloneAndDecodeGeometry(t),a=new r.SimpleGeometryCursor(o),s=0,l=e;s<l.length;s++){var u=l[s],c=n.getEffectOperator(u);c&&(a=c.execute(a,u,96/72))}return a},e.next=function(e){var t=e.next();return i.deltaEncodeGeometry(t),t},e}();t.CIMEffectHelper=o}).apply(null,r))||(e.exports=n)},"1Mg+":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("Brhx")],n=(function(e,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._childrenSet=new Set,t.children=[],t}return i.__extends(t,e),Object.defineProperty(t.prototype,"blendMode",{get:function(){return this._blendMode},set:function(e){this._blendMode=e,this.requestRender()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clips",{get:function(){return this._clips},set:function(e){this._clips=e,this.children.forEach((function(t){return t.clips=e}))},enumerable:!0,configurable:!0}),t.prototype.doRender=function(e){var t=this.createRenderParams(e);this.renderChildren(t)},t.prototype.addChild=function(e){return this.addChildAt(e,this.children.length)},t.prototype.addChildAt=function(e,t){if(void 0===t&&(t=this.children.length),!e)return e;if(this.contains(e))return e;var i=e.parent;return i&&i!==this&&i.removeChild(e),t>=this.children.length?this.children.push(e):this.children.splice(t,0,e),this._childrenSet.add(e),e.parent=this,e.stage=this.stage,this!==this.stage&&(e.clips=this.clips),this.requestRender(),e},t.prototype.contains=function(e){return this._childrenSet.has(e)},t.prototype.removeAllChildren=function(){this._childrenSet.clear();for(var e=0,t=this.children;e<t.length;e++){var i=t[e];this!==this.stage&&(i.clips=null),i.stage=null,i.parent=null}this.children.length=0},t.prototype.removeChild=function(e){return this.contains(e)?this.removeChildAt(this.children.indexOf(e)):e},t.prototype.removeChildAt=function(e){var t;return e<0||e>=this.children.length?null:(t=this.children.splice(e,1)[0],this._childrenSet.delete(t),this!==this.stage&&(t.clips=null),t.stage=null,t.parent=null,t)},t.prototype.sortChildren=function(e){return this.children.sort(e)},t.prototype.onAttach=function(){e.prototype.onAttach.call(this);for(var t=this.stage,i=0,r=this.children;i<r.length;i++)r[i].stage=t},t.prototype.onDetach=function(){e.prototype.onDetach.call(this);for(var t=0,i=this.children;t<i.length;t++)i[t].stage=null},t.prototype.renderChildren=function(e){for(var t=this.children,i=t.length,r=0;r<i;r++)t[r].processRender(e)},t.prototype.createRenderParams=function(e){return i.__assign(i.__assign({},e),{blendMode:this.blendMode,globalOpacity:e.globalOpacity*this.opacity})},t}(r.DisplayObject);t.Container=n}).apply(null,r),void 0===n||(e.exports=n)},"1ZJt":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("ma1f"),i("H1tY"),i("LxLY"),i("DJpR"),i("VY6u"),i("6cAc"),i("PhOF")],void 0===(n=(function(e,t,i,r,n,o,a,s,l){function u(e){return e&&"static"===e.type}return function(){function e(e,t,i,n){if(void 0===n&&(n=0),this._mosaicPages=[],this._maxItemSize=0,this._currentPage=0,this._fixSpriteLocationsTable=r("fix-sprite-locations"),this._testId=r("test-id"),this._pageWidth=0,this._pageHeight=0,this._mosaicRects=new Map,this._spriteCopyQueue=[],this.pixelRatio=1,(t<=0||i<=0)&&console.error("Sprites mosaic defaultWidth and defaultHeight must be greater than zero!"),this._pageWidth=t,this._pageHeight=i,this._requestRender=e,n>0&&(this._maxItemSize=n),this.pixelRatio=window.devicePixelRatio||1,this._fixSpriteLocationsTable){var o=[];for(var a in this._fixSpriteLocationsTable[this._testId]){var s=this._fixSpriteLocationsTable[this._testId][a];o[s.page]=s.pageSize}for(var u=0,c=o;u<c.length;u++){var f=c[u];this._mosaicPages.push({mosaicsData:{type:"static",data:new Uint32Array(f[0]*f[1])},size:[f[0],f[1]],dirty:!0,texture:void 0})}}this._binPack=new l(this._pageWidth,this._pageHeight);var d=Math.floor(this._pageWidth),h=Math.floor(this._pageHeight);this._mosaicPages.push({mosaicsData:{type:"static",data:new Uint32Array(d*h)},size:[this._pageWidth,this._pageHeight],dirty:!0,texture:void 0})}return e.prototype.getWidth=function(e){return e>=this._mosaicPages.length?-1:this._mosaicPages[e].size[0]},e.prototype.getHeight=function(e){return e>=this._mosaicPages.length?-1:this._mosaicPages[e].size[1]},e.prototype.getPageTexture=function(e){return e<this._mosaicPages.length?this._mosaicPages[e].texture:null},e.prototype.has=function(e){return this._mosaicRects.has(e)},Object.defineProperty(e.prototype,"itemCount",{get:function(){return this._mosaicRects.size},enumerable:!0,configurable:!0}),e.prototype.getSpriteItem=function(e){return this._mosaicRects.get(e)},e.prototype.addSpriteItem=function(e,t,i,r,n,o){var a,l,c,f;if(this._mosaicRects.has(e))return this._mosaicRects.get(e);if(u(i))if(this._fixSpriteLocationsTable&&this._fixSpriteLocationsTable[this._testId]&&this._fixSpriteLocationsTable[this._testId][e]){var d=this._fixSpriteLocationsTable[this._testId][e];l=d.rect,c=d.page,f=d.pageSize}else l=(a=this._allocateImage(t[0],t[1]))[0],c=a[1],f=a[2];else l=new s.default(0,0,t[0],t[1]),c=this._mosaicPages.length,this._mosaicPages.push({mosaicsData:i,size:t,dirty:!0,texture:void 0});if(l.width<=0||l.height<=0)return null;var h={rect:l,width:t[0],height:t[1],sdf:n,simplePattern:o,pixelRatio:1,page:c};return this._mosaicRects.set(e,h),u(i)&&this._copy({rect:l,spriteSize:t,spriteData:i.data,page:c,pageSize:f,repeat:r,sdf:n}),h},e.prototype.hasItemsToProcess=function(){return 0!==this._spriteCopyQueue.length},e.prototype.processNextItem=function(){var e=this._spriteCopyQueue.pop();e&&this._copy(e)},e.prototype.getSpriteItems=function(e){for(var t={},i=0,r=e;i<r.length;i++){var n=r[i];t[n]=this.getSpriteItem(n)}return t},e.prototype.getMosaicItemPosition=function(e){var t=this.getSpriteItem(e),i=t&&t.rect;if(!i)return null;i.width=t.width,i.height=t.height;var r=this._mosaicPages[t.page];return{size:[t.width,t.height],tl:[(i.x+1)/r[0],(i.y+1)/r[1]],br:[(i.x+1+t.width)/r[0],(i.y+1+t.height)/r[1]],page:t.page}},e.prototype.bind=function(e,t,i,r){void 0===i&&(i=0),void 0===r&&(r=0);var a=this._mosaicPages[i],s=a.mosaicsData,l=a.texture;if(l||(l=function(e,t,i){return u(t)?new o.Texture(e,{pixelFormat:6408,dataType:5121,width:i[0],height:i[1]},new Uint8Array(t.data.buffer)):new o.Texture(e,{pixelFormat:6408,dataType:5121,samplingMode:9729,wrapMode:33071,width:i[0],height:i[1]},null)}(e,s,a.size),a.texture=l),l.setSamplingMode(t),u(s))e.bindTexture(l,r),a.dirty&&(l.setData(new Uint8Array(s.data.buffer)),l.generateMipmap());else{var c=s.data,f=c.bindFrame(e,l,r);n.isSome(this._requestRender)&&f&&c.frameCount>0&&this._requestRender.requestRender(),c.bindFrame(e,l,r)}a.dirty=!1},e._copyBits=function(e,t,i,r,n,o,a,s,l,u,c){var f=r*t+i,d=s*o+a;if(c){d-=o;for(var h=-1;h<=u;f=((++h+u)%u+r)*t+i,d+=o)for(var p=-1;p<=l;p++)n[d+p]=e[f+(p+l)%l]}else for(h=0;h<u;h++){for(p=0;p<l;p++)n[d+p]=e[f+p];f+=t,d+=o}},e.prototype._copy=function(t){if(!(t.page>=this._mosaicPages.length)){var r=this._mosaicPages[t.page],n=r.mosaicsData;if(!u(r.mosaicsData))throw new i("mapview-invalid-resource","unsuitable data type!");var o=t.spriteData,a=n.data;a&&o||console.error("Source or target images are uninitialized!"),e._copyBits(o,t.spriteSize[0],0,0,a,t.pageSize[0],t.rect.x+1,t.rect.y+1,t.spriteSize[0],t.spriteSize[1],t.repeat),r.dirty=!0}},e.prototype._allocateImage=function(e,t){e+=2,t+=2;var i=Math.max(e,t);if(this._maxItemSize&&this._maxItemSize<i){var r=Math.pow(2,Math.ceil(a.log2(e))),n=Math.pow(2,Math.ceil(a.log2(t))),o=new s.default(0,0,e,t);return this._mosaicPages.push({mosaicsData:{type:"static",data:new Uint32Array(r*n)},size:[r,n],dirty:!0,texture:void 0}),[o,this._mosaicPages.length-1,[r,n]]}var c=this._binPack.allocate(e,t);if(c.width<=0){var f=this._mosaicPages[this._currentPage];return!f.dirty&&u(f.mosaicsData)&&(f.mosaicsData=null),this._currentPage=this._mosaicPages.length,this._mosaicPages.push({mosaicsData:{type:"static",data:new Uint32Array(this._pageWidth*this._pageHeight)},size:[this._pageWidth,this._pageHeight],dirty:!0,texture:void 0}),this._binPack=new l(this._pageWidth,this._pageHeight),this._allocateImage(e,t)}return[c,this._currentPage,[this._pageWidth,this._pageHeight]]},e.prototype.dispose=function(){this._binPack=null;for(var e=0,t=this._mosaicPages;e<t.length;e++){var i=t[e],r=i.texture;r&&r.dispose();var n=i.mosaicsData;u(n)||n.data.pause()}this._mosaicPages=null,this._mosaicRects.clear()},e}()}).apply(null,r))||(e.exports=n)},"2Gaw":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("uhzp")],void 0===(n=(function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=new i.default;t.bidiText=function(e){return r.hasBidiChar(e)?(t="rtl"===r.checkContextual(e)?"IDNNN":"ICNNN",[r.bidiTransform(e,t,"VLYSN"),!0]):[e,!1];var t}}).apply(null,r))||(e.exports=n)},"2pwJ":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("JNkf"),i("apbF"),i("PDSL"),i("m87x")],n=(function(e,t,i,r,n,o,a){Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.dispose=function(){},t.prototype.getGeometryType=function(){return r.WGLGeometryType.MARKER},t.prototype.drawGeometry=function(e,t,i,r,o){var s=e.context,l=e.painter,u=e.rendererInfo,c=e.state,f=i.indexCount,d=i.indexFrom,h=a.MarkerMaterialKey.load(i.materialKey),p=function(e){return n.createProgramDescriptor(e.data,{geometry:[{location:0,name:"a_pos",count:2,type:5122},{location:1,name:"a_vertexOffset",count:2,type:5122},{location:2,name:"a_texCoords",count:2,type:5123},{location:3,name:"a_bitSetAndDistRatio",count:4,type:5121},{location:4,name:"a_id",count:4,type:5121},{location:5,name:"a_color",count:4,type:5121,normalized:!0},{location:6,name:"a_outlineColor",count:4,type:5121,normalized:!0},{location:7,name:"a_sizeAndOutlineWidth",count:4,type:5121}]})}(h),_=p.bufferLayouts,m=p.attributes,v=l.materialManager.getMaterialProgram(e,h,"materials/icon",m,o),g=this._getVAO(s,_,m,r);if(s.bindProgram(v),s.bindVAO(g),h.textureBinding&&l.textureManager.bindTextures(s,v,h),this._setSharedUniforms(v,e,t),v.setUniformMatrix3fv("u_displayMat3",h.vvRotation?c.displayViewMat3:c.displayMat3),h.vvSizeMinMaxValue&&v.setUniform4fv("u_vvSizeMinMaxValue",u.vvSizeMinMaxValue),h.vvSizeScaleStops&&v.setUniform1f("u_vvSizeScaleStopsValue",u.vvSizeScaleStopsValue),h.vvSizeFieldStops){var y=u.getSizeVVFieldStops(t.key.level);v.setUniform1fv("u_vvSizeFieldStopsValues",y.values),v.setUniform1fv("u_vvSizeFieldStopsSizes",y.sizes)}h.vvSizeUnitValue&&v.setUniform1f("u_vvSizeUnitValueWorldToPixelsRatio",u.vvSizeUnitValueToPixelsRatio),h.vvColor&&(v.setUniform1fv("u_vvColorValues",u.vvColorValues),v.setUniform4fv("u_vvColors",u.vvColors)),h.vvOpacity&&(v.setUniform1fv("u_vvOpacityValues",u.vvOpacityValues),v.setUniform1fv("u_vvOpacities",u.vvOpacities)),h.vvRotation&&v.setUniform1f("u_vvRotationType","geographic"===u.vvMaterialParameters.vvRotationType?0:1),s.drawElements(4,f,5125,4*d),s.bindVAO(null)},t}(o.default);t.default=s}).apply(null,r),void 0===n||(e.exports=n)},"3+7H":function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this.name=this.constructor.name||"UnnamedBrush"}return e.prototype.prepareState=function(e,t,i){},e.prototype.draw=function(e,t,i){},e.prototype.drawMany=function(e,t,i){for(var r=0,n=t;r<n.length;r++)this.draw(e,n[r],i)},e}();t.default=i}).apply(null,r))||(e.exports=n)},"3KXq":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("hf/7"),i("AKcB")],void 0===(n=(function(e,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.getPlacement=function(e,t,n){var o=r.getPlacementOperator(t);if(!o)return null;var a=i.cloneAndDecodeGeometry(e);return o.execute(a,t,n)},e}();t.CIMMarkerPlacementHelper=n}).apply(null,r))||(e.exports=n)},"3SpT":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("gn2p"),i("gi5q")],void 0===(n=(function(e,t,i,r,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t,i,n,o){void 0===o&&(o=null);var a=e.call(this,t,i,n)||this;return a.bitmap=new r.RasterBitmap(o,null,null),a.bitmap.coordScale=n,a.bitmap.once("isReady",(function(){return a.ready()})),a}return i.__extends(t,e),Object.defineProperty(t.prototype,"stencilRef",{get:function(){return this.bitmap.stencilRef},set:function(e){this.bitmap.stencilRef=e},enumerable:!0,configurable:!0}),t.prototype.getMemoryUsage=function(){return this.bitmap.getMemoryUsage()},t.prototype.setTransform=function(t,i){e.prototype.setTransform.call(this,t,i),this.bitmap.transforms.dvs=this.transforms.dvs},t.prototype.release=function(){return this.destroy(),this.bitmap=null,this.stage=null,!0},t.prototype.onAttach=function(){this.bitmap.stage=this.stage},t.prototype.onDetach=function(){this.bitmap.stage=null},t}(n.TiledDisplayObject);t.RasterTile=o}).apply(null,r))||(e.exports=n)},"3gjc":function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){function i(){return new Float32Array(4)}function r(e,t,i,r){var n=new Float32Array(4);return n[0]=e,n[1]=t,n[2]=i,n[3]=r,n}function n(){return i()}function o(){return r(1,1,1,1)}function a(){return r(1,0,0,0)}function s(){return r(0,1,0,0)}function l(){return r(0,0,1,0)}function u(){return r(0,0,0,1)}Object.defineProperty(t,"__esModule",{value:!0}),t.create=i,t.clone=function(e){var t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},t.fromValues=r,t.createView=function(e,t){return new Float32Array(e,t,4)},t.zeros=n,t.ones=o,t.unitX=a,t.unitY=s,t.unitZ=l,t.unitW=u,t.ZEROS=n(),t.ONES=o(),t.UNIT_X=a(),t.UNIT_Y=s(),t.UNIT_Z=l(),t.UNIT_W=u()}).apply(null,r))||(e.exports=n)},"3ikD":function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Effect=function(){this.name=this.constructor.name}}).apply(null,r))||(e.exports=n)},"3o6C":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("DJpR")],void 0===(n=(function(e,t,i){function r(e,t,r){var n=new i.Texture(e,{target:3553,pixelFormat:6408,dataType:5121,wrapMode:33071,width:t,height:r,samplingMode:9729});return[n,new i.FramebufferObject(e,{colorTarget:0,depthStencilTarget:2},n)]}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this._width=void 0,this._height=void 0,this._resources=null}return e.prototype.dispose=function(){this._resources&&(this._resources.sharedBlur1Tex.dispose(),this._resources.sharedBlur1Fbo.dispose(),this._resources.sharedBlur2Tex.dispose(),this._resources.sharedBlur2Fbo.dispose(),this._resources=null)},e.prototype._initialize=function(e,t,i){this._width=t,this._height=i;var n=r(e,t,i),o=n[0],a=n[1],s=r(e,t,i);this._resources={sharedBlur1Tex:o,sharedBlur1Fbo:a,sharedBlur2Tex:s[0],sharedBlur2Fbo:s[1]}},e.prototype.setup=function(e,t,i){!this._resources||this._width===t&&this._height===i||this.dispose(),this._resources||this._initialize(e,t,i)},Object.defineProperty(e.prototype,"sharedBlur1Tex",{get:function(){return this._resources.sharedBlur1Tex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sharedBlur1Fbo",{get:function(){return this._resources.sharedBlur1Fbo},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sharedBlur2Tex",{get:function(){return this._resources.sharedBlur2Tex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sharedBlur2Fbo",{get:function(){return this._resources.sharedBlur2Fbo},enumerable:!0,configurable:!0}),e}();t.default=n}).apply(null,r))||(e.exports=n)},"3pdx":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("H1tY"),i("qMld"),i("DJpR"),i("6cAc"),i("PhOF")],void 0===(n=(function(e,t,i,r,n,o,a,s){var l;r("stable-symbol-rendering")&&(l=new Set);var u=function(e){return Math.floor(e/256)};return function(){function e(e,t,i){this.width=0,this.height=0,this._dirties=[],this._glyphData=[],this._currentPage=0,this._glyphCache={},this._textures=[],this._rangePromises=new Map,!l&&r("stable-symbol-rendering")&&(l=new Set),this.width=e,this.height=t,this._glyphSource=i,this._binPack=new s(e-4,t-4),this._glyphData.push(new Uint8Array(e*t)),this._dirties.push(!0),this._textures.push(null),this._initDecorationGlyph()}return e.prototype.dispose=function(){this._binPack=null;for(var e=0,t=this._textures;e<t.length;e++){var i=t[e];i&&i.dispose()}this._textures.length=0,this._glyphData.length=0},e.prototype._initDecorationGlyph=function(){for(var e=[117,149,181,207,207,181,149,117],t=[],i=0;i<e.length;i++)for(var r=e[i],n=0;n<11;n++)t.push(r);var o={metrics:{width:5,height:2,left:0,top:0,advance:0},bitmap:new Uint8Array(t)};this._recordGlyph(o)},e.prototype.getGlyphItems=function(e,t,n){return i.__awaiter(this,void 0,void 0,(function(){var o,a=this;return i.__generator(this,(function(i){switch(i.label){case 0:return o=this._getGlyphCache(e),[4,this._fetchRanges(e,t,n)];case 1:return i.sent(),r("stable-symbol-rendering")?[2,this._getMosaicItemsStable(o,e,t)]:[2,t.map((function(t){return a._getMosaicItem(o,e,t)}))]}}))}))},e.prototype.bind=function(e,t,i,r){var n=this._getTexture(e,i);n.setSamplingMode(t),this._dirties[i]&&(n.setData(this._glyphData[i]),this._dirties[i]=!1),e.bindTexture(n,r)},e.prototype._getGlyphCache=function(e){return this._glyphCache[e]||(this._glyphCache[e]={}),this._glyphCache[e]},e.prototype._getTexture=function(e,t){return this._textures[t]||(this._textures[t]=new o.Texture(e,{pixelFormat:6406,dataType:5121,width:this.width,height:this.height},new Uint8Array(this.width*this.height))),this._textures[t]},e.prototype._invalidate=function(){this._dirties[this._currentPage]=!0},e.prototype._fetchRanges=function(e,t,r){return i.__awaiter(this,void 0,void 0,(function(){var o,a,s=this;return i.__generator(this,(function(i){switch(i.label){case 0:return o=function(e){for(var t=new Set,i=0,r=e;i<r.length;i++)t.add(u(r[i]));return t}(t),a=[],o.forEach((function(t){a.push(s._fetchRange(e,t,r))})),[4,n.all(a)];case 1:return i.sent(),[2]}}))}))},e.prototype._fetchRange=function(e,t,r){return i.__awaiter(this,void 0,void 0,(function(){var o=this;return i.__generator(this,(function(i){return t>256?[2,null]:[2,(a=this._rangePromises,s=e+t,l=function(){return o._glyphSource.getRange(e,t,r)},a.has(s)||a.set(s,l().then((function(){a.delete(s)})).catch((function(e){a.delete(s),n.throwIfNotAbortError(e)}))),a.get(s))];var a,s,l}))}))},e.prototype._getMosaicItem=function(e,t,i){if(!e[i]){var r=this._glyphSource.getGlyph(t,i);if(!r||!r.metrics)return function(e){return{rect:new a.default(0,0,0,0),page:0,metrics:{left:0,width:0,height:0,advance:0,top:0},code:e,sdf:!0}}(i);var n=this._recordGlyph(r);e[i]={rect:n,page:this._currentPage,metrics:r.metrics,code:i,sdf:!0},this._invalidate()}return e[i]},e.prototype._getMosaicItemsStable=function(e,t,i){var r=this,n=[],o=i.map((function(e){return e}));return i.map((function(e){return e})).sort().map((function(i){return r._getMosaicItem(e,t,i)})).forEach((function(e){var t=o.indexOf(e.code);n[t]=e,o[t]=null})),n},e.prototype._recordGlyph=function(e){var t,i=e.metrics;if(0===i.width)t=new a.default(0,0,0,0);else{var n=i.width+6,o=i.height+6;(t=this._binPack.allocate(n,o)).isEmpty&&(this._dirties[this._currentPage]||(this._glyphData[this._currentPage]=null),this._currentPage=this._glyphData.length,this._glyphData.push(new Uint8Array(this.width*this.height)),this._dirties.push(!0),this._textures.push(null),this._initDecorationGlyph(),this._binPack=new s(this.width-4,this.height-4),t=this._binPack.allocate(n,o));var l=this._glyphData[this._currentPage],u=e.bitmap,c=void 0,f=void 0;if(u)for(var d=0;d<o;d++){c=n*d,f=this.width*(t.y+d)+t.x;for(var h=0;h<n;h++)l[f+h]=u[c+h]}r("esri-glyph-debug")&&this._showDebugPage(l)}return t},e.prototype._showDebugPage=function(e){var t=document.createElement("canvas"),i=t.getContext("2d"),r=new ImageData(this.width,this.height),n=r.data;t.width=this.width,t.height=this.height,t.style.border="1px solid black";for(var o=0;o<e.length;++o)n[4*o+0]=e[o],n[4*o+1]=0,n[4*o+2]=0,n[4*o+3]=255;i.putImageData(r,0,0),document.body.appendChild(t)},e}()}).apply(null,r))||(e.exports=n)},"3u8V":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("JNkf"),i("apbF"),i("PDSL"),i("m87x")],n=(function(e,t,i,r,n,o,a){Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.dispose=function(){},t.prototype.getGeometryType=function(){return r.WGLGeometryType.TEXT},t.prototype.drawGeometry=function(e,t,i,r,o){var s=e.context,l=e.painter,u=e.rendererInfo,c=e.state,f=i.indexCount,d=i.indexFrom,h=a.TextMaterialKey.load(i.materialKey),p=function(e){return n.createProgramDescriptor(e.data,{geometry:[{location:0,name:"a_pos",count:2,type:5122},{location:1,name:"a_id",count:4,type:5121},{location:2,name:"a_color",count:4,type:5121,normalized:!0},{location:3,name:"a_haloColor",count:4,type:5121,normalized:!0},{location:4,name:"a_texFontSize",count:4,type:5121},{location:5,name:"a_aux",count:4,type:5120},{location:6,name:"a_vertexOffset",count:2,type:5122},{location:7,name:"a_texCoords",count:2,type:5123}]})}(h),_=p.bufferLayouts,m=p.attributes,v=l.materialManager.getMaterialProgram(e,h,"materials/text",m,o),g=this._getVAO(s,_,m,r);if(s.bindProgram(v),s.bindVAO(g),this._setSharedUniforms(v,e,t),l.textureManager.bindTextures(s,v,h),v.setUniformMatrix3fv("u_displayMat3",c.displayMat3),v.setUniformMatrix3fv("u_displayViewMat3",c.displayViewMat3),h.vvSizeMinMaxValue&&v.setUniform4fv("u_vvSizeMinMaxValue",u.vvSizeMinMaxValue),h.vvSizeScaleStops&&v.setUniform1f("u_vvSizeScaleStopsValue",u.vvSizeScaleStopsValue),h.vvSizeFieldStops){var y=u.getSizeVVFieldStops(t.key.level);v.setUniform1fv("u_vvSizeFieldStopsValues",y.values),v.setUniform1fv("u_vvSizeFieldStopsSizes",y.sizes)}h.vvSizeUnitValue&&v.setUniform1f("u_vvSizeUnitValueWorldToPixelsRatio",u.vvSizeUnitValueToPixelsRatio),h.vvColor&&(v.setUniform1fv("u_vvColorValues",u.vvColorValues),v.setUniform4fv("u_vvColors",u.vvColors)),h.vvOpacity&&(v.setUniform1fv("u_vvOpacityValues",u.vvOpacityValues),v.setUniform1fv("u_vvOpacities",u.vvOpacities)),h.vvRotation&&v.setUniform1f("u_vvRotationType","geographic"===u.vvMaterialParameters.vvRotationType?0:1),v.setUniform1f("u_isHalo",1),s.drawElements(4,f,5125,4*d),v.setUniform1f("u_isHalo",0),s.drawElements(4,f,5125,4*d),s.bindVAO(null)},t}(o.default);t.default=s}).apply(null,r),void 0===n||(e.exports=n)},"3vQA":function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){this._pos=0;var i=t?this._roundToNearest(t,e.BYTES_PER_ELEMENT):40;this._array=new ArrayBuffer(i),this._buffer=new e(this._array),this._ctor=e}return Object.defineProperty(e.prototype,"length",{get:function(){return this._pos},enumerable:!0,configurable:!0}),e.prototype._roundToNearest=function(e,t){var i=Math.round(e);return i+(t-i%t)},e.prototype._ensureSize=function(e){if(this._pos+e>=this._buffer.length){var t=this._roundToNearest(1.5*(this._array.byteLength+e*this._buffer.BYTES_PER_ELEMENT),this._buffer.BYTES_PER_ELEMENT),i=new ArrayBuffer(t),r=new this._ctor(i);r.set(this._buffer,0),this._array=i,this._buffer=r}},e.prototype.writeF32=function(e){this._ensureSize(1);var t=this._pos;return new Float32Array(this._array,4*this._pos,1)[0]=e,this._pos++,t},e.prototype.push=function(e){this._ensureSize(1);var t=this._pos;return this._buffer[this._pos++]=e,t},e.prototype.writeRegion=function(e){this._ensureSize(e.length);var t=this._pos;return this._buffer.set(e,this._pos),this._pos+=e.length,t},e.prototype.buffer=function(){var e=this._array.slice(0,4*this._pos);return this.destroy(),e},e.prototype.seek=function(e){this._pos=e},e.prototype.destroy=function(){this._array=null,this._buffer=null},e}();t.default=i}).apply(null,r))||(e.exports=n)},"4F/P":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("Dos2")],void 0===(n=(function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.white=[255,255,255,1];var r=[0,0,0,0];function n(e,t){return Array.isArray(t)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3]):(e[0]=t.r,e[1]=t.g,e[2]=t.b,e[3]=t.a),e}function o(e,t,i){void 0===t&&(t=0),void 0===i&&(i=!1);var r=e[t+3];return e[t+0]*=r,e[t+1]*=r,e[t+2]*=r,i||(e[t+3]*=255),e}t.premultiplyAlpha=o,t.copyAndPremultiply=function(e){return o(n([],e))},t.premultiplyAlphaUint32=function(e){return o(n(r,e)),i.i8888to32(r[0],r[1],r[2],r[3])},t.premultiplyAlphaRGBA=function(e){if(!e)return 0;var t=e.a;return i.i8888to32(e.r*t,e.g*t,e.b*t,255*t)}}).apply(null,r))||(e.exports=n)},"5MKl":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("hPTP")],void 0===(n=(function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.stencil={name:"stencil",shaders:{vertexShader:i.resolveIncludes("stencil/stencil.vert"),fragmentShader:i.resolveIncludes("stencil/stencil.frag")},attributes:{a_pos:0}}}).apply(null,r))||(e.exports=n)},"65my":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("qsST"),i("jBNx"),i("4F/P"),i("Dos2"),i("apbF"),i("m87x"),i("8Lwu"),i("O6Ih"),i("MzWl")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c,f){Object.defineProperty(t,"__esModule",{value:!0});var d=r.getLogger("esri.views.2d.engine.webgl.WGLLineTemplate"),h=function(e){function t(t,i,r,n,o,a,s,c,f,d,h,p,_,m,v,g,y){var b=e.call(this)||this,x=l.LineMaterialKey.load(l.createMaterialKey(b.geometryType,t,_));return i&&(x.sdf=i.sdf,x.pattern=!0,x.textureBinding=i.textureBinding),b._capType=n,b._joinType=o,b._miterLimitCosine=u.getLimitCosine(a),b.tessellationProperties._fillColor=s,b.tessellationProperties._tl=c,b.tessellationProperties._br=f,b._hasPattern=d,b._isDashed=h,b._joinOnUTurn=g,b._isColorLocked=p,b._isOutline=_,b._zOrder=v,b.effects=y,b._materialKey=x.data,b.tessellationProperties._bitset=p?1:0,b.tessellationProperties._halfWidth=.5*r,b.tessellationProperties._halfReferenceWidth=.5*m,b._initializeTessellator(!1),b}return i.__extends(t,e),t.fromCIMLine=function(e,i,r,s,l){var u=i.color,c=i.scaleFactor||1,f=i.isDashed,d=i.cap;f&&1===d&&(d=2);var h=i.join,p=n.pt2px(i.width)*c,_=n.pt2px(i.referenceWidth),m=n.pt2px(i.miterLimit),v=u&&o.premultiplyAlphaRGBA(u)||0;if(!r)return new t(e,r,p,d,h,m,v,0,0,!1,f,i.colorLocked,s,_,i.zOrder,l,i.effects);var g=r.rect,y=g.x+1+r.width,b=g.y+1+r.height;return new t(e,r,p,d,h,m,v,a.i1616to32(g.x+1,g.y+1),a.i1616to32(y,b),!0,f,i.colorLocked,s,_,i.zOrder,l,i.effects)},t.fromSimpleLine=function(e,i,r,l,u){var c=r.color,f="solid"!==r.style&&"none"!==r.style,d=s.getCapType(r.cap||"round",f),h=s.getJoinType(r.join||"round"),p=c&&"none"!==r.style&&o.premultiplyAlphaRGBA(c)||0;"none"===r.style&&(p=0);var _=n.pt2px(r.width),m=r.miterLimit;if(!l)return new t(e,l,_,d,h,m,p,0,0,!1,f,!1,i,_,0,u,null);var v=l.rect,g=v.x+1+l.width,y=v.y+1+l.height;return new t(e,l,_,d,h,m,p,a.i1616to32(v.x+1,v.y+1),a.i1616to32(g,y),!0,f,!1,i,_,0,u,null)},t.fromPictureLineSymbol=function(e,t,i,r){return d.error("PictureLineSymbol support does not exist!"),null},t}(c.default(f.default));t.default=h}).apply(null,r))||(e.exports=n)},"66cO":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("j2SP"),i("DJpR"),i("3+7H"),i("TQvW"),i("bqoF")],n=(function(e,t,i,r,n,o,a,s){Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._color=r.vec4f32.fromValues(1,0,0,1),t}return i.__extends(t,e),t.prototype.dispose=function(){this._outlineProgram&&(this._outlineProgram.dispose(),this._outlineProgram=null),this._tileInfoProgram&&(this._tileInfoProgram.dispose(),this._tileInfoProgram=null),this._outlineVertexArrayObject&&(this._outlineVertexArrayObject.dispose(),this._outlineVertexArrayObject=null),this._tileInfoVertexArrayObject&&(this._tileInfoVertexArrayObject.dispose(),this._tileInfoVertexArrayObject=null),this._canvas=null},t.prototype.prepareState=function(e){var t=e.context;t.setBlendingEnabled(!0),t.setBlendFunctionSeparate(1,771,1,771),t.setColorMask(!0,!0,!0,!0),t.setStencilWriteMask(0),t.setStencilTestEnabled(!1)},t.prototype.draw=function(e,t){var i=e.context;if(t.isReady){this._loadWGLResources(i),i.bindVAO(this._outlineVertexArrayObject),i.bindProgram(this._outlineProgram),this._outlineProgram.setUniformMatrix3fv("u_dvsMat3",t.transforms.dvs),this._outlineProgram.setUniform2f("u_coord_range",t.coordRange[0],t.coordRange[1]),this._outlineProgram.setUniform1f("u_depth",0),this._outlineProgram.setUniform4fv("u_color",this._color),i.drawArrays(3,0,4),i.bindVAO();var r=this._getTexture(i,t);r&&(i.bindVAO(this._tileInfoVertexArrayObject),i.bindProgram(this._tileInfoProgram),i.bindTexture(r,0),this._tileInfoProgram.setUniformMatrix3fv("u_dvsMat3",t.transforms.dvs),this._tileInfoProgram.setUniform1f("u_depth",0),this._tileInfoProgram.setUniform2f("u_coord_ratio",t.coordRange[0]/t.size[0],t.coordRange[1]/t.size[1]),this._tileInfoProgram.setUniform2f("u_delta",8,8),this._tileInfoProgram.setUniform2f("u_dimensions",r.descriptor.width,r.descriptor.height),i.drawArrays(5,0,4),i.bindVAO())}},t.prototype._loadWGLResources=function(e){if(!this._outlineProgram||!this._tileInfoProgram){var t=n.createProgram(e,a.background),i=n.createProgram(e,s.tileInfo),r={geometry:[{name:"a_pos",count:2,type:5120,offset:0,stride:2,normalized:!1,divisor:0}]},o=new Int8Array([0,0,1,0,1,1,0,1]),l=n.BufferObject.createVertex(e,35044,o),u=new n.VertexArrayObject(e,a.background.attributes,r,{geometry:l}),c=new Int8Array([0,0,1,0,0,1,1,1]),f=n.BufferObject.createVertex(e,35044,c),d=new n.VertexArrayObject(e,s.tileInfo.attributes,r,{geometry:f});this._outlineProgram=t,this._tileInfoProgram=i,this._outlineVertexArrayObject=u,this._tileInfoVertexArrayObject=d}},t.prototype._getTexture=function(e,t){if(t.texture)return t.texture;this._canvas||(this._canvas=document.createElement("canvas"),this._canvas.setAttribute("id","canvas2d"),this._canvas.setAttribute("width","300"),this._canvas.setAttribute("height","32"),this._canvas.setAttribute("style","display:none"));var i=t.triangleCount,r=t.key.id;t.triangleCount>0&&(r+=", "+i);var o=this._canvas,a=o.getContext("2d");return a.font="24px sans-serif",a.textAlign="left",a.textBaseline="top",a.clearRect(0,0,300,32),i>1e5?(a.fillStyle="red",a.fillRect(0,0,300,32),a.fillStyle="black"):(a.clearRect(0,0,300,32),a.fillStyle="blue"),a.fillText(r,0,0),t.texture=new n.Texture(e,{target:3553,pixelFormat:6408,dataType:5121,samplingMode:9728,wrapMode:33071},o),t.texture},t}(o.default);t.default=l}).apply(null,r),void 0===n||(e.exports=n)},"6h7w":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("ge+T"),i("gi5q")],void 0===(n=(function(e,t,i,r,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t,i,n,o){void 0===o&&(o=null);var a=e.call(this,t,i,n,n)||this;return a.bitmap=new r.Bitmap(o),a.bitmap.coordScale=n,a.bitmap.once("isReady",(function(){return a.ready()})),a}return i.__extends(t,e),Object.defineProperty(t.prototype,"stencilRef",{get:function(){return this.bitmap.stencilRef},set:function(e){this.bitmap.stencilRef=e},enumerable:!0,configurable:!0}),t.prototype.setTransform=function(t,i){e.prototype.setTransform.call(this,t,i),this.bitmap.transforms.dvs=this.transforms.dvs},t.prototype.onAttach=function(){this.bitmap.stage=this.stage},t.prototype.onDetach=function(){this.bitmap.stage=null},t}(n.TiledDisplayObject);t.BitmapTile=o}).apply(null,r))||(e.exports=n)},"7AYJ":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("SyoC")],void 0===(n=(function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.color=[0,0,0,0],this.haloColor=[0,0,0,0],this.haloSize=0,this.size=12,this.angle=0,this.offsetX=0,this.offsetY=0,this.hAnchor=0,this.vAnchor=0}return e.prototype.acquire=function(e,t,i,r,n,o,a,s,l){this.color=e,this.haloColor=t,this.haloSize=i,this.size=r,this.angle=n,this.offsetX=o,this.offsetY=a,this.hAnchor=s,this.vAnchor=l},e.prototype.release=function(){this.color[0]=this.color[1]=this.color[2]=this.color[3]=0,this.haloColor[0]=this.haloColor[1]=this.haloColor[2]=this.haloColor[3]=0,this.haloSize=0,this.size=0,this.angle=0,this.offsetX=0,this.offsetY=0,this.hAnchor=0,this.vAnchor=0},e.pool=new i(e),e}();t.TextProperties=r}).apply(null,r))||(e.exports=n)},"7Yqx":function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){function i(){var e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}Object.defineProperty(t,"__esModule",{value:!0}),t.create=i,t.clone=function(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},t.fromValues=function(e,t,i,r,n,o,a,s,l,u,c,f,d,h,p,_){var m=new Float32Array(16);return m[0]=e,m[1]=t,m[2]=i,m[3]=r,m[4]=n,m[5]=o,m[6]=a,m[7]=s,m[8]=l,m[9]=u,m[10]=c,m[11]=f,m[12]=d,m[13]=h,m[14]=p,m[15]=_,m},t.createView=function(e,t){return new Float32Array(e,t,16)},t.IDENTITY=i()}).apply(null,r))||(e.exports=n)},"8HLi":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("DJpR"),i("HjjH")],void 0===(n=(function(e,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var n=new i.ShaderCompiler((function(e){var t=r.default;return e.split("/").forEach((function(e){t&&(t=t[e])})),t}));t.resolveIncludes=function(e){return n.resolveIncludes(e)}}).apply(null,r))||(e.exports=n)},"8fgo":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("4w2c"),i("DJpR"),i("tI6k"),i("JNkf"),i("apbF"),i("PDSL"),i("m87x")],n=(function(e,t,i,r,n,o,a,s,l,u){Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._dotTextureSize=0,t._dotTextures=null,t._dotSamplers=new Int32Array([o.TEXTURE_BINDING_RENDERER_0,o.TEXTURE_BINDING_RENDERER_1]),t}return i.__extends(t,e),t.prototype.dispose=function(){this._disposeTextures()},t.prototype.getGeometryType=function(){return a.WGLGeometryType.FILL},t.prototype.drawGeometry=function(e,t,r,n,a){var l=e.context,c=e.painter,f=e.rendererInfo,d=e.requiredLevel,h=r.indexCount,p=r.indexFrom,_=u.FillMaterialKey.load(r.materialKey),m=function(e){return s.createProgramDescriptor(e.data,{geometry:i.__spreadArrays([{location:0,name:"a_pos",count:2,type:5122},{location:1,name:"a_id",count:4,type:5121}],e.dotDensity?[]:[{location:2,name:"a_color",count:4,type:5121,normalized:!0},{location:3,name:"a_tlbr",count:4,type:5123},{location:4,name:"a_aux1",count:4,type:5121},{location:5,name:"a_aux2",count:2,type:5123},{location:6,name:"a_aux3",count:4,type:5121}],e.dotDensity?[{location:2,name:"a_inverseArea",count:1,type:5126}]:[])})}(_),v=m.bufferLayouts,g=m.attributes,y=c.materialManager.getMaterialProgram(e,_,"materials/fill",g,a),b=this._getVAO(l,v,g,n);if(l.bindProgram(y),l.bindVAO(b),this._setSharedUniforms(y,e,t),_.textureBinding){c.textureManager.bindTextures(l,y,_);var x=1/Math.pow(2,d-t.key.level)/e.pixelRatio;y.setUniform1f("u_zoomFactor",x)}if(_.vvColor&&(y.setUniform1fv("u_vvColorValues",f.vvColorValues),y.setUniform4fv("u_vvColors",f.vvColors)),_.vvOpacity&&(y.setUniform1fv("u_vvOpacityValues",f.vvOpacityValues),y.setUniform1fv("u_vvOpacities",f.vvOpacities)),_.dotDensity){var w=o.TILE_SIZE/f.ddDotSize,T=w*window.devicePixelRatio*w*window.devicePixelRatio,S=1/(x=1/Math.pow(2,d-t.key.level))*(1/x),C=f.ddDotScale?e.state.scale/f.ddDotScale:1;y.setUniform1f("u_tileZoomFactor",x),y.setUniform1f("u_tileDotsOverArea",T/(o.TILE_SIZE*window.devicePixelRatio*o.TILE_SIZE*window.devicePixelRatio)),y.setUniformMatrix4fv("u_dotColors",f.ddColors),y.setUniform4fv("u_isActive",f.ddActiveDots),y.setUniform4fv("u_dotBackgroundColor",f.ddBackgroundColor),y.setUniform1f("u_dotValue",Math.max(1,f.ddDotValue*C*S)),this._bindDotDensityTextures(l,y,f,w)}l.drawElements(4,h,5125,4*p),l.bindVAO(null)},t.prototype._disposeTextures=function(){if(this._dotTextures){for(var e=0;e<this._dotTextures.length;e++)this._dotTextures[e].dispose();this._dotTextures=null}},t.prototype._bindDotDensityTextures=function(e,t,i,r){var n=this._createDotDensityTextures(e,r,i.ddSeed);t.setUniform1iv("u_dotTextures",this._dotSamplers);for(var o=0;o<n.length;o++)e.bindTexture(n[o],this._dotSamplers[o])},t.prototype._createDotDensityTextures=function(e,t,i){if(this._dotTextureSize===t&&this._seed===i||(this._disposeTextures(),this._dotTextureSize=t,this._seed=i),null===this._dotTextures){var n=new r(i);this._dotTextures=[this._allocDotDensityTexture(e,t,n),this._allocDotDensityTexture(e,t,n)]}return this._dotTextures},t.prototype._allocDotDensityTexture=function(e,t,i){for(var r=new Float32Array(t*t*4),o=0;o<r.length;o++)r[o]=i.getFloat();return new n.Texture(e,{wrapMode:10497,pixelFormat:6408,dataType:5126,samplingMode:9728,width:t,height:t},r)},t}(l.default);t.default=c}).apply(null,r),void 0===n||(e.exports=n)},"8rHD":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("jBNx"),i("B+Jm"),i("4F/P"),i("m87x"),i("8Lwu"),i("IWfl"),i("yVlQ"),i("rAGl")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c){Object.defineProperty(t,"__esModule",{value:!0});var f=function(e){function t(t,i){var n=e.call(this,i)||this;n._horizontalAlignment="center",n._verticalAlignment="middle",n._textToGlyphs=new Map;var l,u,c,f=i.scaleFactor||1;n._cimTextLayer=i,s.isFunction(i.color)?n._dynamicPropertyMap.set("_color",(function(e,t,r){return o.premultiplyAlphaRGBA(i.color(e,t,r))})):n._color=o.premultiplyAlphaRGBA(i.color),s.isFunction(i.color)?n._dynamicPropertyMap.set("_haloColor",(function(e,t,r){return o.premultiplyAlphaRGBA(i.outlineColor(e,t,r))})):n._haloColor=o.premultiplyAlphaRGBA(i.outlineColor),s.isFunction(i.size)||(l=Math.min(Math.round(r.pt2px(i.size*i.sizeRatio)),127)),n._dynamicPropertyMap.set("_size",(function(e,t,n){return s.isFunction(i.size)?Math.min(Math.round(r.pt2px(i.size(e,t,n)*i.sizeRatio)),127):l})),s.isFunction(i.outlineSize)?n._dynamicPropertyMap.set("_haloSize",(function(e,t,n){return Math.min(Math.floor(5*r.pt2px(i.outlineSize(e,t,n)*i.sizeRatio)),127)})):n._haloSize=Math.min(Math.floor(5*r.pt2px(i.outlineSize*i.sizeRatio)),127),s.isFunction(i.offsetX)||(u=Math.round(r.pt2px(i.offsetX*i.sizeRatio))),n._dynamicPropertyMap.set("_xOffset",(function(e,t,n){return s.isFunction(i.offsetX)?Math.round(r.pt2px(i.offsetX(e,t,n)*i.sizeRatio)):u})),s.isFunction(i.offsetY)||(c=Math.round(r.pt2px(i.offsetY*i.sizeRatio))),n._dynamicPropertyMap.set("_yOffset",(function(e,t,n){return s.isFunction(i.offsetY)?Math.round(r.pt2px(i.offsetY(e,t,n)*i.sizeRatio)):c})),s.isFunction(i.angle)?n._dynamicPropertyMap.set("_angle",i.angle):n._angle=i.angle,s.isFunction(i.horizontalAlignment)?n._dynamicPropertyMap.set("_horizontalAlignment",i.horizontalAlignment):n._horizontalAlignment=i.horizontalAlignment,s.isFunction(i.verticalAlignment)?n._dynamicPropertyMap.set("_verticalAlignment",i.verticalAlignment):n._verticalAlignment=i.verticalAlignment,n._scaleFactor=f,s.isFunction(i.text)?n._dynamicPropertyMap.set("_text",i.text):n._text=i.text;var d=Math.min(Math.round(r.pt2px(i.referenceSize*i.sizeRatio)),127);n._referenceSize=Math.round(Math.sqrt(256*d)),n._materialKey=a.createMaterialKey(n.geometryType,t,!1);var h=a.TextMaterialKey.load(n._materialKey);return h.sdf=!0,n._bitset=(1===i.alignment?1:0)|(i.colorLocked?1:0)<<1,n._materialKey=h.data,n._decoration="none",n._lineHeight=1,n._lineWidth=512,n._textPlacement=i.markerPlacement,n.effects=i.effects,n._isCIM=!0,n}return i.__extends(t,e),t.fromCIMText=function(e,i){return new t(e,i)},t.prototype.analyze=function(e,t,r,n){return i.__awaiter(this,void 0,void 0,(function(){var o,a;return i.__generator(this,(function(i){switch(i.label){case 0:return o=function(e,t,i,r){return"string"==typeof e.text?e.text:"function"==typeof e.text?e.text(t,i,r):""}(this._cimTextLayer,t,r,n),[4,e.getMosaicItem(this._cimTextLayer.cim,!1,c.codepoints(o))];case 1:return a=i.sent(),this._textToGlyphs.set(o,a.glyphMosaicItems),[2,a]}}))}))},t.prototype.bindFeature=function(e,t,i){var r=this;if(this._dynamicPropertyMap.forEach((function(n,o){r[o]=n(e,t,i)})),this._text&&0!==this._text.length){this._size*=this._scaleFactor,this._scale=this._size/24,this._xOffset*=this._scaleFactor,this._yOffset*=this._scaleFactor,this._xAlignD=n.getXAnchorDirection(this._horizontalAlignment||"center"),this._yAlignD=n.getYAnchorDirection(this._verticalAlignment||"baseline");var o=this._textToGlyphs.get(this._text);this.bindTextInfo(o,!1)}else this._shapingInfo=null},t}(l.default(u.default));t.default=f}).apply(null,r))||(e.exports=n)},A97r:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("DJpR")],void 0===(n=(function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.createRasterTexture=function(e,t,r,n){void 0===r&&(r="nearest"),void 0===n&&(n=!1);var o=!(n&&"u8"===t.pixelType),a=o?5126:5121,s=null==t.pixels||0===t.pixels.length?null:o?t.getAsRGBAFloat():t.getAsRGBA();return new i.Texture(e,{width:t.width,height:t.height,target:3553,pixelFormat:6408,internalFormat:6408,samplingMode:"bilinear"===r||"cubic"===r?9729:9728,dataType:a,wrapMode:33071,flipped:!1},s)},t.createFrameBuffer=function(e,t,r,n){var o=new i.Texture(e,{width:t,height:r,target:3553,pixelFormat:6408,internalFormat:6408,samplingMode:9728,dataType:n?5121:5126,wrapMode:33071,flipped:!1});return new i.FramebufferObject(e,{colorTarget:0,depthStencilTarget:3,width:t,height:r},o)},t.createTransformTexture=function(e,t){for(var r=4*t.size[0],n=t.size[1],o={width:r,height:n,target:3553,pixelFormat:6408,internalFormat:6408,dataType:5126,samplingMode:9728,wrapMode:33071,flipped:!1},a=new Float32Array(r*n*4),s=0,l=0;l<t.coefficients.length;l++)a[s++]=t.coefficients[l],l%3==2&&(a[s++]=1);return new i.Texture(e,o,a)},t.createColormapTexture=function(e,t){return new i.Texture(e,{width:t.length/4,height:1,target:3553,pixelFormat:6408,internalFormat:6408,dataType:5121,samplingMode:9728,wrapMode:33071,flipped:!1},t)},t.getCommonUniforms=function(e,t,i,r,n,o){return void 0===r&&(r=1),void 0===n&&(n=!0),void 0===o&&(o=!1),{u_flipY:n,u_isFloatTexture:o,u_applyTransform:!!e,u_opacity:r,u_transformSpacing:e?e.spacing:null,u_transformGridSize:e?e.size:null,u_targetImageSize:t,u_srcImageSize:i}},t.getColormapUniforms=function(e,t){return{u_colormapOffset:t||0,u_colormapMaxIndex:e?e.length/4-1:null}},t.getBasicGridUniforms=function(e,t){return{u_scale:e,u_offset:t}},t.getStretchUniforms=function(e){return{u_bandCount:e.bandCount,u_minOutput:e.outMin,u_maxOutput:e.outMax,u_minCutOff:e.minCutOff,u_maxCutOff:e.maxCutOff,u_factor:e.factor,u_useGamma:e.useGamma,u_gamma:e.gamma,u_gammaCorrection:e.gammaCorrection}},t.getShadedReliefUniforms=function(e){return{u_hillshadeType:e.hillshadeType,u_sinZcosAs:e.sinZcosAs,u_sinZsinAs:e.sinZsinAs,u_cosZs:e.cosZs,u_weights:e.weights,u_factor:e.factor,u_minValue:e.minValue,u_maxValue:e.maxValue}},t.getUniformLocationInfos=function(e,t){for(var i,r=e.gl,n=t.glName,o=r.getProgramParameter(n,r.ACTIVE_UNIFORMS),a=new Map,s=0;s<o;s++)(i=r.getActiveUniform(n,s))&&a.set(i.name,{location:r.getUniformLocation(n,i.name),info:i});return a},t.setUniforms=function(e,t,i){Object.keys(i).forEach((function(r){var n=t.get(r)||t.get(r+"[0]");n&&function(e,t,i,r){if(null===r||null==i)return!1;var n=r.info;switch(n.type){case 5126:n.size>1?e.setUniform1fv(t,i):e.setUniform1f(t,i);break;case 35664:e.setUniform2fv(t,i);break;case 35665:e.setUniform3fv(t,i);break;case 35666:e.setUniform4fv(t,i);break;case 35675:e.setUniformMatrix3fv(t,i);break;case 35676:e.setUniformMatrix4fv(t,i);break;case 5124:n.size>1?e.setUniform1iv(t,i):e.setUniform1i(t,i);break;case 35670:e.setUniform1i(t,i?1:0);break;case 35667:case 35671:e.setUniform2iv(t,i);break;case 35668:case 35672:e.setUniform3iv(t,i);break;case 35669:case 35673:e.setUniform4iv(t,i)}}(e,r,i[r],n)}))},t.setTextures=function(e,t,i,r){i.length===r.length&&(r.some((function(e){return null==e}))||i.some((function(e){return null==e}))||i.forEach((function(i,n){t.setUniform1i(i,n),e.bindTexture(r[n],n)})))}}).apply(null,r))||(e.exports=n)},AKDC:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("ma1f"),i("qsST"),i("xoE+"),i("xoE+"),i("LxLY"),i("jBNx"),i("YaB4"),i("4F/P"),i("tI6k"),i("JNkf"),i("Dos2"),i("hNI9"),i("fVTS"),i("m87x"),i("Bp7l"),i("t1uL")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c,f,d,h,p,_,m,v,g){Object.defineProperty(t,"__esModule",{value:!0});var y=n.getLogger("esri.views.2d.engine.webgl.WGLLabelTemplate");function b(e){switch(e){case"above-along":case"below-along":case"center-along":return 1;default:return 0}}t.isMapAligned=b;var x,w,T=(x=function(e){var t=0;if(0===e)return 1/0;for(;!(e%2);)t++,e/=2;return t},w=new Map,function(e){return w.has(e)||w.set(e,x(e)),w.get(e)}),S=function(e){return Math.floor(127*e+127)},C=function(e){return Math.floor(10*e)},L=function(e){return Math.round(e*(254/360))},O=function(e,t){return h.i1616to32(Math.round(8*e),Math.round(8*t))},M=function(e){function t(t,i,r,n){var a=e.call(this,t,r.font.size,r.haloSize||0,r.color&&c.premultiplyAlphaRGBA(r.color)||0,r.haloColor&&c.premultiplyAlphaRGBA(r.haloColor)||0,r.horizontalAlignment,r.verticalAlignment,b(i.labelPlacement)?1:0,r.font.decoration,!1,r.angle||0,r.xoffset,r.yoffset,r.id,r.lineWidth,r.lineHeight,null,null)||this;a._outLineLabelAngle=0,a._refPlacementPadding=0,a._refPlacementDirX=0,a._refPlacementDirY=0,a._refOffsetX=0,a._refOffsetY=0,a.geometryType=d.WGLGeometryType.LABEL;var s=function(e,t){var i=!!e.minScale&&t.scaleToZoom(e.minScale)||0;return o.clamp(i,0,25.5)}(i,n),h=function(e,t){var i=!!e.maxScale&&t.scaleToZoom(e.maxScale)||255;return o.clamp(i,0,25.5)}(i,n),p=u.alignmentUtils.getAlignmentFromPlacement(i.labelPlacement),_=p[1];a._xAlignD=p[0],a._yAlignD=_,a._minZoom=s,a._maxZoom=h,a._refPlacementPadding=l.pt2px(r.haloSize)+f.TEXT_PLACEMENT_PADDING;var v=m.LabelMaterialKey.load(m.createMaterialKey(a.geometryType,t,!1,i));return v.sdf=!0,a._materialKey=v.data,a}return i.__extends(t,e),t.fromLabelClass=function(e,i,r){if("center-along"===i.labelPlacement){var n=i.symbol;n.xoffset=0,n.yoffset=0,n.angle=0,n.font.decoration="none"}return new t(e,i,i.symbol,r)},Object.defineProperty(t.prototype,"_shapedBox",{get:function(){return s.unwrap(this._shapingInfo).bounds},enumerable:!0,configurable:!0}),t.prototype.bindReferenceTemplate=function(e){var t=u.alignmentUtils.getXDirection(this._xAlignD),i=u.alignmentUtils.getYDirection(this._yAlignD);if(this._refOffsetX=0,this._refOffsetY=0,s.isNone(e))this._refSymbolAndPlacementOffset=h.i8888to32(0,0,S(t),S(i));else{if("circle"===e.boundsType&&(t||i)){var r=Math.sqrt(t*t+i*i);t/=r,i/=r}var n=Math.max(e.height,e.width);this._refSymbolAndPlacementOffset=h.i8888to32(4*this._refPlacementPadding,n,S(t),S(i)),this._referenceSize=n,this._refPlacementDirX=t,this._refPlacementDirY=i,this._refOffsetX=e.xOffset,this._refOffsetY=e.yOffset}},t.prototype.writeMesh=function(e,t,i,n,o,a,l){var u;if(!s.isNone(this._shapingInfo))switch(this.current={outRecords:e,outVecs:t,outMetrics:l,inId:n,inShaping:this._shapingInfo,zoomLevel:a},i){case"esriGeometryPolyline":return this._placeLineLabels(o.geometry);case"esriGeometryPoint":return this._placePointLabels(o.geometry);case"esriGeometryPolygon":return this._placePointLabels(o.centroid);default:void 0===(u="Geometry of type "+i+" is not supported")&&(u="mapview-labeling"),y.error(new r(u,"mapview-labeling"))}},t.prototype._isVisible=function(e,t){var i=C(this.current.zoomLevel);return C(e)<=i&&i<=C(t)},t.prototype._placePointLabels=function(e){var t=this.current;this._writeGlyphs(t.outRecords,t.outVecs,t.inId,e,t.outMetrics)},t.prototype._placeLineLabels=function(e){for(var t=v.smoothPaths(e.paths,this.current.inShaping.bounds.width),i=this._placeSubdivGlyphs.bind(this),r=(this._shapedBox.width+128)/4,n=0,o=t;n<o.length;n++)v.pathDivide(o[n],r,i)},t.prototype._placeSubdivGlyphs=function(e,t,i,r){var n=T(t),o=this._shapedBox.width/4,s=Math.min(i,r-i),l=a.log2(s/(4+o/2)),u=0===t?l:Math.min(n,l),c=Math.max(this._minZoom,this.current.zoomLevel+2-u),f=this._shapedBox.width/2*Math.pow(2,this.current.zoomLevel-c);this.current.inShaping.isMultiline?0===t&&this._placeStraight(e,c):this._placeCurved(e,c,f)},t.prototype._placeStraight=function(e,t){var i=this.current;this._writeGlyphs(i.outRecords,i.outVecs,i.inId,e,i.outMetrics,t)},t.prototype._placeCurved=function(e,t,i){var r=new _.default(this.current.inId,{from:this.current.outRecords.length,count:-1},e.x,e.y,t),n=e.clone(),o=e.angle*(180/Math.PI)%360,a=(e.angle*(180/Math.PI)+180)%360;this._outLineLabelAngle=L(o),this._placeFirst(n,r,t,1),this._placeBack(e,n,r,t,i,1),this._placeForward(e,n,r,t,i,1),this._outLineLabelAngle=L(a),this._placeFirst(n,r,t,0),this._placeBack(e,n,r,t,i,0),this._placeForward(e,n,r,t,i,0),r.range.count=this.current.outRecords.length-r.range.from,r.bounds&&this.current.outMetrics.push(r)},t.prototype._placeBack=function(e,t,i,r,n,o){for(var a=e.clone(),s=e.backwardLength+0;a.prev()&&!(s>=n);)this._placeOnSegment(a,t,i,s,r,-1,o),s+=a.length+0},t.prototype._placeForward=function(e,t,i,r,n,o){for(var a=e.clone(),s=e.remainingLength+0;a.next()&&!(s>=n);)this._placeOnSegment(a,t,i,s,r,1,o),s+=a.length+0},t.prototype._placeFirst=function(e,t,i,r){for(var n=this.current.inShaping,o=n.glyphs,s=this.current.zoomLevel,l=this.current,u=l.outRecords,c=l.outVecs,f=l.inId,d=O(e.x,e.y),h=0,p=o;h<p.length;h++){var _=p[h],m=_.x>n.bounds.x?r:1-r,v=m*e.remainingLength+(1-m)*e.backwardLength,g=Math.abs(_.x+_.width/2-n.bounds.x),y=Math.max(0,s+a.log2(g/(v+0))),b=Math.max(i,y);_.maxZoom=25,_.angle=e.angle+(1-r)*Math.PI,_.minZoom=b,this._writeGlyph(u,c,_,f,d),r&&this._isVisible(_.minZoom,_.maxZoom)&&t.add(_.bounds,0,0)}},t.prototype._placeOnSegment=function(e,t,i,r,n,o,s){for(var l=this.current.inShaping.glyphs,u=this.current,c=u.outRecords,f=u.outVecs,d=u.inId,h=this.current.inShaping,p=this.current.zoomLevel,_={x:e.x+r*-o*(e.dx/e.length),y:e.y+r*-o*(e.dy/e.length)},m=O(_.x,_.y),v=0,g=l;v<g.length;v++){var y=g[v],b=y.x>h.bounds.x?s:1-s;if(b&&1===o||!b&&-1===o){var x=Math.abs(y.x+y.width/2-h.bounds.x),w=Math.max(0,p+a.log2(x/r)-.1),T=Math.max(n,p+a.log2(x/(r+e.length+0)));0!==w&&(y.angle=e.angle+(1-s)*Math.PI,y.minZoom=T,y.maxZoom=w,this._writeGlyph(c,f,y,d,m),s&&this._isVisible(y.minZoom,y.maxZoom)&&i.add(y.bounds,e.x-t.x,e.y-t.y))}}},t.prototype._writeGlyphs=function(e,t,i,r,n,o){void 0===o&&(o=this._minZoom);var a=this._shapingInfo;if(!s.isNone(a)&&!(r.x<0||r.x>=512||r.y<0||r.y>=512)){for(var l=O(r.x+this._refOffsetX,r.y-this._refOffsetY),u=new _.default(i,{from:e.length,count:-1},r.x+this._refOffsetX,r.y-this._refOffsetY,o),c=0,f=a.glyphs;c<f.length;c++){var d=f[c];d.minZoom=o,d.maxZoom=this._maxZoom,this._writeGlyph(e,t,d,i,l)}u.range.count=e.length-u.range.from,u.bounds=a.boundsT;var h=m.LabelMaterialKey.load(this._materialKey);u.setPlacementOffset(h.vvSizeFieldStops||h.vvSizeMinMaxValue||h.vvSizeScaleStops||h.vvSizeUnitValue,this._referenceSize,this._refPlacementPadding,this._refPlacementDirX,this._refPlacementDirY),n.push(u)}},t.prototype._writeGlyph=function(e,t,i,r,n){var o=m.MaterialKeyBase.load(this._materialKey),a=new p(r,this.geometryType,o.data,0,0);o.textureBinding=i.textureBinding,a.materialKey=o.data,a.indexFrom=t.indexVector.length,a.indexCount=this._writeIndices(t),a.vertexFrom=t.getVector("geometry").vertexCount,a.vertexCount=this._writeVertex(t,r,n,i),e.push(a)},t.prototype._writeVertexCommon=function(e,t,i,r){var n=this._color,o=this._haloColor,a=h.i8888to32(0,0,this._size,this._haloSize),s=Math.max(r.minZoom,this._minZoom),l=Math.min(r.maxZoom,this._maxZoom),u=h.i8888to32(C(s),C(l),this._outLineLabelAngle,0);e.push(i),e.push(t),e.push(n),e.push(o),e.push(a),e.push(this._refSymbolAndPlacementOffset),e.push(u)},t}(g.default);t.default=M}).apply(null,r))||(e.exports=n)},"AP+j":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("aMdW"),i("Zx0K"),i("W9tT"),i("ab6c"),i("tI6k"),i("SkDs"),i("Sq9p"),i("qe2g"),i("gi5q"),i("xxo4")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c,f,d){Object.defineProperty(t,"__esModule",{value:!0});var h=new Set,p=function(e){function t(t,i,r){void 0===r&&(r=!1);var o=e.call(this,t,i,[s.TILE_SIZE,s.TILE_SIZE])||this;return o._data=null,o._displayList=null,o._wglBuffers=null,o._dirtyMap=new l.default,o._labelIndex=null,o._dirty=!0,o.fader=new c.default,o._ensureCorrectZOrder=r,o.transforms.labelMat2d=n.mat2df32.create(),o}return i.__extends(t,e),t.prototype.destroy=function(){this.clear()},Object.defineProperty(t.prototype,"displayObjects",{get:function(){return this._data.tileDisplayData.displayObjects},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDirty",{get:function(){return this._dirty},set:function(e){this._dirty=e,e||this.isReady||this.ready(),this.requestRender()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasData",{get:function(){return!!this._data},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"labelIndex",{get:function(){return this._labelIndex},enumerable:!0,configurable:!0}),t.prototype.getGeometry=function(e){return this._wglBuffers&&this._wglBuffers.has(e)?this._wglBuffers.get(e):null},t.prototype.getDisplayList=function(){return this._data&&this._displayList},Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),t.prototype.setTransform=function(t,i){e.prototype.setTransform.call(this,t,i);var n=this.transforms.labelMat2d,s=t.getScreenTransform(n,i),l=a.vec2f32.create();o.vec2.transformMat2d(l,this.coords,s),r.mat2d.identity(n),r.mat2d.translate(n,n,l),r.mat2d.multiply(n,t.viewMat2d,n)},t.prototype.setData=function(e,t,i){var r=e.addOrUpdate,n=e.remove;if((e.clear||!this.hasData)&&!e.addOrUpdate)return this.clear(),this.ready(),void this.emit("change");!e.clear&&this.hasData||!e.addOrUpdate?this.hasData&&this._doPatchData({addOrUpdate:r,remove:n},t,i):(r.tileDisplayData.computeDisplayList(this._ensureCorrectZOrder),this._dirtyMap=new l.default,this._dispRecStore=u.default.fromTileData(r,this._dirtyMap),this._data=r,this._readyTileIfNoLabels(t,i),this._dirtyMap.markAllDirty(),this._displayList||(this._displayList=r.tileDisplayData.displayList.clone())),this.emit("change")},t.prototype.commitChanges=function(){this.fader.step()||this.requestRender(),this._wglBuffers||(this._wglBuffers=new d.default(this.stage.context)),this._wglBuffers.upload(this._data.tileBufferData,this._dirtyMap),this._displayList=this._data.tileDisplayData.displayList.clone(),this._dirtyMap.markAllClean()},t.prototype.clear=function(){this._data=null,this._displayList=null,this._dispRecStore=null,this._wglBuffers&&(this._wglBuffers.dispose(),this._wglBuffers=null)},t.prototype._readyTileIfNoLabels=function(e,t){e&&this._rebuildLabelIndex(),this.isDirty=!(!e||!t)},t.prototype._doPatchData=function(e,t,i){this._patchData(e)||(this._dirtyMap.markAllDirty(),this._data.reshuffle(),this._dispRecStore=u.default.fromTileData(this._data,this._dirtyMap)),this._readyTileIfNoLabels(t,i),this.requestRender()},t.prototype._rebuildLabelIndex=function(){this._labelIndex=this._initLabelIndex();for(var e=0,t=this.displayObjects;e<t.length;e++)for(var i=0,r=t[e].metrics;i<r.length;i++)this._insertIntoLabelIndex(r[i])},t.prototype._insertIntoLabelIndex=function(e){e.xBucket<0||e.yBucket<0||e.yBucket>3||e.xBucket>3||this.labelIndex[e.yBucket][e.xBucket].push(e)},t.prototype._initLabelIndex=function(){for(var e=[],t=0;t<s.TILE_SIZE/s.COLLISION_BUCKET_SIZE;t++){e.push([]);for(var i=0;i<s.TILE_SIZE/s.COLLISION_BUCKET_SIZE;i++)e[t].push([])}return e},t.prototype._patchData=function(e){for(var t=!0,i=e.addOrUpdate&&e.addOrUpdate.tileDisplayData&&e.addOrUpdate.tileDisplayData.displayObjects||[],r=(e.remove||[]).slice(),n=0,o=i;n<o.length;n++)null!=(m=o[n]).insertAfter&&r.push(m.id);for(var a=0,s=r;a<s.length;a++){var l=s[a];if(_=this._data.tileDisplayData.displayObjectRegistry.get(l)){this._data.tileDisplayData.displayList.removeFromList(_.displayRecords);for(var u=0,c=_.displayRecords;u<c.length;u++)this._dispRecStore.delete(c[u]);this._data.tileDisplayData.displayObjectRegistry.delete(l);var f=this._data.tileDisplayData.displayObjects.indexOf(_);this._data.tileDisplayData.displayObjects.splice(f,1)}}for(var d=0,p=i;d<p.length;d++){var _,m=p[d],v=void 0;if(_=this._data.tileDisplayData.displayObjectRegistry.get(m.id)){var g=_.displayRecords;_.set(m),_.displayRecords=g;for(var y=_.displayRecords.length,b=0;b<y;++b){var x=_.displayRecords[b],w=m.displayRecords[b];(b>=m.displayRecords.length||x.geometryType!==w.geometryType||x.symbolLevel!==w.symbolLevel||x.zOrder!==w.zOrder||x.materialKey!==w.materialKey)&&(this._dispRecStore.delete(_.displayRecords[b]),b<m.displayRecords.length&&(_.displayRecords[b]=void 0))}_.displayRecords.length=m.displayRecords.length,_.metrics=m.metrics}else{(_=m.copy()).displayRecords=[],this._data.tileDisplayData.displayObjectRegistry.set(m.id,_);var T=void 0,S=this._data.tileDisplayData.displayObjects;if(null!=_.insertAfter)if(v={},_.insertAfter>=0){var C=this._data.tileDisplayData.displayObjectRegistry.get(_.insertAfter);C&&(T=S.indexOf(C)+1)<S.length?S.splice(T,0,_):(S.push(_),T=S.length)}else S.unshift(_),T=0;else S.push(_),T=S.length;if(v){var L=void 0;if(this._data.tileDisplayData.displayList.unified)L=m.displayRecords.length>0?1:0;else{h.clear();for(var O=0,M=m.displayRecords;O<M.length;O++){var D=this._data.tileDisplayData.displayList.getDPInfoType(M[O].geometryType);h.add(D)}L=h.size}var E=0;for(b=T-1;b>=0&&E<L;--b)for(var I=S[b].displayRecords.length-1;I>=0&&E<L;--I){var P=S[b].displayRecords[I];v[D=this._data.tileDisplayData.displayList.getDPInfoType(P.geometryType)]||(v[D]=P,++E)}}}var A=m.displayRecords.length;for(b=0;b<A;++b){w=m.displayRecords[b],(x=_.displayRecords[b])?(x.meshData=w.meshData,x.materialKey=w.materialKey):((x=w.copy()).vertexFrom=void 0,x.indexFrom=void 0,_.displayRecords[b]=x);var V=w.geometryType,R=(D=this._data.tileDisplayData.displayList.getDPInfoType(V),e.addOrUpdate.tileBufferData.geometries[V]),F=R.vertexBuffer,z=R.indexBuffer,B=void 0;v&&(B=v[D]?this._data.tileDisplayData.displayList.splitAfter(v[D]):-1),t=this._dispRecStore.setMeshData(x,w,F,z,B)&&t,v&&null!=x.indexFrom&&null!=x.indexFrom&&(v[D]=x)}}return t},t}(f.TiledDisplayObject);t.WGLTile=p}).apply(null,r))||(e.exports=n)},AbdV:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht")],n=(function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.createDebugLogger=function(e,t){return e&&function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t.warn.apply(t,i.__spreadArrays(["DEBUG:"],e))}||function(){return null}},t.DEBUG_ATTR_UPDATES=!1}).apply(null,r),void 0===n||(e.exports=n)},AwqN:function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this._byGeometryType=null}return Object.defineProperty(e.prototype,"satisfied",{get:function(){return!this._byGeometryType},enumerable:!0,configurable:!0}),e.prototype.reset=function(){this._byGeometryType=null},e.prototype.verticesFor=function(e){return this._byGeometryType?this._byGeometryType[e].vertices:0},e.prototype.indicesFor=function(e){return this._byGeometryType?this._byGeometryType[e].indices:0},e.prototype.needMore=function(e,t,i){if(t||i){this._byGeometryType||(this._byGeometryType=[{vertices:0,indices:0},{vertices:0,indices:0},{vertices:0,indices:0},{vertices:0,indices:0},{vertices:0,indices:0}]);var r=this._byGeometryType[e];r.vertices+=t,r.indices+=i}},e}();t.default=i}).apply(null,r))||(e.exports=n)},"B+Jm":function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){var i,r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Left=-1]="Left",e[e.Center=0]="Center",e[e.Right=1]="Right"}(i=t.HAlign||(t.HAlign={})),function(e){e[e.Top=1]="Top",e[e.Center=0]="Center",e[e.Bottom=-1]="Bottom",e[e.Baseline=2]="Baseline"}(r=t.VAlign||(t.VAlign={})),t.getXAnchorDirection=function(e){switch(e){case"left":return i.Left;case"right":return i.Right;case"center":case"justify":return i.Center}},t.getYAnchorDirection=function(e){switch(e){case"top":return r.Top;case"middle":return r.Center;case"baseline":return r.Baseline;case"bottom":return r.Bottom}},t.getAlignmentFromPlacement=function(e){switch(e){case"above-left":return[i.Right,r.Bottom];case"above-center":case"above-along":return[i.Center,r.Bottom];case"above-right":return[i.Left,r.Bottom];case"center-left":return[i.Right,r.Center];case"center-center":case"center-along":return[i.Center,r.Center];case"center-right":return[i.Left,r.Center];case"below-left":return[i.Right,r.Top];case"below-center":case"below-along":return[i.Center,r.Top];case"below-right":return[i.Left,r.Top];case"always-horizontal":return[i.Center,r.Baseline];default:return console.debug("Found invalid placement type "+e),[i.Center,r.Center]}},t.getXDirection=function(e){switch(e){case i.Right:return-1;case i.Center:return 0;case i.Left:return 1;default:return console.debug("Found invalid horizontal alignment "+e),0}},t.getYDirection=function(e){switch(e){case r.Top:return 1;case r.Center:return 0;case r.Bottom:case r.Baseline:return-1;default:return console.debug("Found invalid vertical alignment "+e),0}},t.getJustification=function(e){switch(e){case"left":return i.Left;case"right":return i.Right;case"center":case"justify":return i.Center}}}).apply(null,r))||(e.exports=n)},BU48:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("xoE+"),i("jBNx"),i("4F/P"),i("tI6k"),i("VY6u"),i("Dos2"),i("m87x"),i("kNAO"),i("MzWl")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c,f){Object.defineProperty(t,"__esModule",{value:!0});var d=function(e){function t(t,i,r,n,o,a,s,l,c,f){var d=e.call(this)||this;d.effects=f;var h=u.FillMaterialKey.load(u.createMaterialKey(d.geometryType,t,!1));return i&&(h.sdf=i.sdf,h.pattern=!0,h.textureBinding=i.textureBinding),d.fillColor=r,d.tl=n,d.br=o,d.aux1=a,d.aux2=s,d.aux3=l,d.isBFS=c,d._materialKey=h.data,d}return i.__extends(t,e),t.fromCIMFill=function(e,i,a,u){void 0===u&&(u=!1);var c=i.color,f=c&&o.premultiplyAlphaRGBA(c)||0;if(!a)return new t(e,null,f,0,0,0,0,l.i8888to32(0,0,0,i.colorLocked?1:0),u,i.effects);var d=a.rect,h=a.width,p=a.height,_=d.x+1,m=d.y+1,v=_+h,g=m+p,y=r.nextHighestPowerOfTwo(n.pt2px(i.height||0));y>255?y=255:y<=0&&(y=r.nextHighestPowerOfTwo(g-m));var b=r.nextHighestPowerOfTwo(n.pt2px(i.height/p*h||0));b>255?b=255:b<=0&&(b=r.nextHighestPowerOfTwo(v-_));var x=n.pt2px(i.offsetX||0)+128;x>255&&(x=255);var w=n.pt2px(-i.offsetY||0)+128;w>255&&(w=255);var T=i.scaleX||1;return new t(e,a,f,l.i1616to32(_,m),l.i1616to32(v,g),l.i8888to32(b,y,x,w),l.i1616to32(128*T,128),l.i8888to32(0,0,s.degToByte(i.angle),i.colorLocked?1:0),u,i.effects)},t.fromSimpleFill=function(e,i,n,a){void 0===a&&(a=!1);var s=i.color,u=s&&"none"!==i.style&&o.premultiplyAlphaRGBA(s)||0,c=l.i8888to32(0,0,0,a?255:0);if(!n)return new t(e,null,u,0,0,0,0,c,a,null);var f=n.rect,d=f.x+1,h=f.y+1,p=f.x+1+n.width,_=f.y+1+n.height;return new t(e,n,u,l.i1616to32(d,h),l.i1616to32(p,_),l.i8888to32(r.nextHighestPowerOfTwo(p-d),r.nextHighestPowerOfTwo(_-h),0,0),l.i1616to32(128,128),c,a,null)},t.fromPictureFill=function(e,i,o,s){void 0===s&&(s=!1);var u=a.PICTURE_FILL_COLOR,c=o.rect,f=c.x+1,d=c.y+1,h=f+o.width,p=d+o.height,_=l.i1616to32(f,d),m=l.i1616to32(h,p),v=r.nextHighestPowerOfTwo(n.pt2px(i.width));v>255&&(v=255);var g=r.nextHighestPowerOfTwo(n.pt2px(i.height));g>255&&(g=255);var y=n.pt2px(i.xoffset)+128;y>255&&(y=255);var b=n.pt2px(-i.yoffset)+128;return b>255&&(b=255),new t(e,o,u,_,m,l.i8888to32(v,g,y,b),l.i1616to32(128*i.xscale,128*i.yscale),l.i8888to32(0,0,0,s?255:0),s,null)},t}(c.default(f.default));t.default=d}).apply(null,r))||(e.exports=n)},Bp7l:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("LxLY"),i("8Lwu")],void 0===(n=(function(e,t,i,r){function n(e,t){return e[t+1]}function o(e){return e.length-1}function a(e){for(var t=0,i=0;i<o(e);i++)t+=s(e,i);return t}function s(e,t,i){void 0===i&&(i=1);var r=n(e,t),o=r[0],a=r[1];return Math.sqrt(o*o+a*a)*i}Object.defineProperty(t,"__esModule",{value:!0}),t.segmentAt=n,t.segmentCount=o,t.pathLength=a,t.segmentLength=s;var l=function(){function e(e,t,i,r,n){this._segments=e,this._index=t,this._distance=i,this._xStart=r,this._yStart=n,this._done=!1}return e.create=function(t){return new e(t,0,0,t[0][0],t[0][1])},e.prototype.clone=function(){return new e(this._segments,this._index,this._distance,this.xStart,this.yStart)},e.prototype.equals=function(e){return this._index===e._index||e._index===this._index-1&&(0===this._distance||1===e._distance)||e._index===this._index+1&&(1===this._distance||0===e._distance)},e.prototype.leq=function(e){return this._index<e._index||this._index===e._index&&this._distance<=e._distance},e.prototype.geq=function(e){return this._index>e._index||this._index===e._index&&this._distance>=e._distance},Object.defineProperty(e.prototype,"_segment",{get:function(){return this._segments[this._index+1]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){var e=this.dy,t=Math.acos((0*e+-1*-this.dx)/(1*this.length));return e>0&&(t=2*Math.PI-t),t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"xStart",{get:function(){return this._xStart},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yStart",{get:function(){return this._yStart},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x",{get:function(){return this.xStart+this.distance*this.dx},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.yStart+this.distance*this.dy},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dx",{get:function(){return this._segment[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dy",{get:function(){return this._segment[1]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"xMidpoint",{get:function(){return this.xStart+.5*this.dx},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yMidpoint",{get:function(){return this.yStart+.5*this.dy},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"xEnd",{get:function(){return this.xStart+this.dx},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yEnd",{get:function(){return this.yStart+this.dy},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){var e=this.dx,t=this.dy;return Math.sqrt(e*e+t*t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"remainingLength",{get:function(){return this.length*(1-this._distance)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"backwardLength",{get:function(){return this.length*this._distance},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"distance",{get:function(){return this._distance},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"done",{get:function(){return this._done},enumerable:!0,configurable:!0}),e.prototype.hasPrev=function(){return this._index-1>=0},e.prototype.hasNext=function(){return this._index+1<o(this._segments)},e.prototype.next=function(){return this.hasNext()?(this._xStart+=this.dx,this._yStart+=this.dy,this._distance=0,this._index+=1,this):null},e.prototype.prev=function(){return this.hasPrev()?(this._index-=1,this._xStart-=this.dx,this._yStart-=this.dy,this._distance=1,this):(this._done=!0,null)},e.prototype._seekBackwards=function(e,t){var i=this.backwardLength;if(e<=i)return this._distance=(i-e)/this.length,this;for(var r=this.backwardLength;this.prev();){if(r+this.length>e)return this._seekBackwards(e-r);r+=this.length}return this._distance=0,t?this:null},e.prototype.seek=function(e,t){if(void 0===t&&(t=!1),e<0)return this._seekBackwards(Math.abs(e),t);if(e<=this.remainingLength)return this._distance=(this.backwardLength+e)/this.length,this;for(var i=this.remainingLength;this.next();){if(i+this.length>e)return this.seek(e-i,t);i+=this.length}return this._distance=1,t?this:null},e}();function u(e,t){if(!(t<=0)){var i=e.length;if(!(i<3)){var n=[],o=0;n.push(0);for(var a=1;a<i;a++)o+=r.dist(e[a],e[a-1]),n.push(o);t=Math.min(t,.2*o);var s=[];s.push(e[0][0]),s.push(e[0][1]);var l=e[i-1][0],u=e[i-1][1],c=r.sub([0,0],e[0],e[1]);for(r.normalize(c),e[0][0]+=t*c[0],e[0][1]+=t*c[1],r.sub(c,e[i-1],e[i-2]),r.normalize(c),e[i-1][0]+=t*c[0],e[i-1][1]+=t*c[1],a=1;a<i;a++)n[a]+=t;n[i-1]+=t;var f=.5*t;for(a=1;a<i-1;a++){for(var d=0,h=0,p=0,_=a-1;_>=0&&!(n[_+1]<n[a]-f);_--){var m=f+n[_+1]-n[a],v=n[_+1]-n[_],g=n[a]-n[_]<f?1:m/v;if(Math.abs(g)<1e-6)break;var y=g*m-.5*(S=g*g)*v,b=g*v/t,x=e[_+1],w=e[_][0]-x[0],T=e[_][1]-x[1];d+=b/y*(x[0]*g*m+.5*S*(m*w-v*x[0])-S*g*v*w/3),h+=b/y*(x[1]*g*m+.5*S*(m*T-v*x[1])-S*g*v*T/3),p+=b}for(_=a+1;_<i&&!(n[_-1]>n[a]+f)&&(m=f-n[_-1]+n[a],v=n[_]-n[_-1],g=n[_]-n[a]<f?1:m/v,!(Math.abs(g)<1e-6));_++){var S;d+=(b=g*v/t)/(y=g*m-.5*(S=g*g)*v)*((x=e[_-1])[0]*g*m+.5*S*(m*(w=e[_][0]-x[0])-v*x[0])-S*g*v*w/3),h+=b/y*(x[1]*g*m+.5*S*(m*(T=e[_][1]-x[1])-v*x[1])-S*g*v*T/3),p+=b}s.push(d/p),s.push(h/p)}for(s.push(l),s.push(u),a=0,_=0;a<i;a++)e[a][0]=s[_++],e[a][1]=s[_++]}}}t.SegmentCursor=l,t.pathDivide=function(e,t,i){var r=a(e),n=l.create(e),o=r/2,s=Math.floor((r-t)/2/t);n.seek(o-s*t);for(var u=-s;u<=s;u++)n.x<512&&n.x>=0&&n.y<512&&n.y>=0&&i(n.clone(),u,o+u*t,r),n.seek(t)},t.pathSubdivide=function(e,t,r){!function e(t,r,n,o,a){if(!(n<r)){var s=o.clone().seek(n/2);if(!i.isNone(s)){t(s.clone(),n,a),n=(n-r)/2;var l=i.unwrap(s.seek(r/2));e(t,r,n,o,a+1),e(t,r,n,l,a+1)}}}(r,t,a(e),l.create(e),0)},t.smoothPaths=function(e,t){for(var i=t,r=0;r<e.length;r++){var n=e[r],o=[];o.push(n[0]);for(var a=1;a<n.length;a++){var s=o[a-1],l=s[0],c=s[1];o.push([l+=n[a][0],c+=n[a][1]])}u(o,i);var f=[];f.push(o[0]);for(var d=1;d<o.length;d++){var h=o[d-1],p=h[1],_=o[d],m=(l=_[0],c=_[1],Math.round(l-h[0])),v=Math.round(c-p);f.push([m,v])}e[r]=f,n=f}return e}}).apply(null,r))||(e.exports=n)},Brhx:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("BcWh")],n=(function(e,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._clips=null,t._isReady=!1,t._opacity=1,t._stage=null,t._visible=!0,t}return i.__extends(t,e),Object.defineProperty(t.prototype,"clips",{get:function(){return this._clips},set:function(e){this._clips=e,this.requestRender()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isReady",{get:function(){return this._isReady},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"opacity",{get:function(){return this._opacity},set:function(e){this._opacity!==e&&(this._opacity=e,this.requestRender())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stage",{get:function(){return this._stage},set:function(e){if(this._stage!==e){var t=this._stage;this._stage=e,e?this._stage.untrashDisplayObject(this)||(this.onAttach(),this.emit("attach")):t.trashDisplayObject(this)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visible",{get:function(){return this._visible},set:function(e){this._visible!==e&&(this._visible=e,this.requestRender())},enumerable:!0,configurable:!0}),t.prototype.setTransform=function(e){},t.prototype.processRender=function(e){this.visible&&this.stage&&this.doRender(e)},t.prototype.requestRender=function(){this.stage&&this.stage.requestRender()},t.prototype.processDetach=function(){this.onDetach(),this.emit("detach")},t.prototype.onAttach=function(){},t.prototype.onDetach=function(){},t.prototype.doRender=function(e){},t.prototype.ready=function(){this._isReady||(this._isReady=!0,this.emit("isReady"),this.requestRender())},t}(r);t.DisplayObject=n}).apply(null,r),void 0===n||(e.exports=n)},CE5S:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("xoE+"),i("4oaH")],void 0===(n=(function(e,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var n=Math.PI;function o(e,t){switch(t.transformationType){case"additive":return function(e,t){return e+(a(t.minSize,e)||t.minDataValue)}(e,t);case"constant":return function(e,t){var i=e.stops,r=i&&i.length&&i[0].size;return null==r&&(r=e.minSize),a(r,t)}(t,e);case"clamped-linear":return function(e,t){var i=(e-t.minDataValue)/(t.maxDataValue-t.minDataValue),r=a(t.minSize,e),n=a(t.maxSize,e);return e<=t.minDataValue?r:e>=t.maxDataValue?n:r+i*(n-r)}(e,t);case"proportional":return function(e,t){var r=e/t.minDataValue,n=a(t.minSize,e),o=a(t.maxSize,e);return i.clamp(r*n,n,o)}(e,t);case"stops":return function(e,t){var i=function(e,t){if(t){var i=0,r=t.length-1;return t.some((function(t,n){return e<t?(r=n,!0):(i=n,!1)})),[i,r,(e-t[i])/(t[r]-t[i])]}}(e,t.cache.ipData),r=i[0],n=i[1],o=i[2];if(r===n)return a(t.stops[r].size,e);var s=a(t.stops[r].size,e);return s+(a(t.stops[n].size,e)-s)*o}(e,t);case"real-world-size":return function(e,t){var o,s=r.meterIn[t.valueUnit],l=a(t.minSize,e),u=a(t.maxSize,e),c=t.valueRepresentation;return o="area"===c?2*Math.sqrt(e/n)/s:"radius"===c||"distance"===c?2*e/s:e/s,i.clamp(o,l,u)}(e,t);case"identity":return e;case"unknown":return null}}function a(e,t){return"number"==typeof e?e:o(t,e)}t.getSizeForValueSimple=o}).apply(null,r))||(e.exports=n)},CX95:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("ma1f"),i("qsST"),i("LxLY"),i("qMld"),i("sCbS"),i("aqXi"),i("UUqC"),i("WEAo")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c){Object.defineProperty(t,"__esModule",{value:!0});var f=n.getLogger("esri/views/2d/engine/webgl/util/Matcher"),d=function(){function e(){this._defaultResult=null}return e.fromBasicRenderer=function(t,r,n){return i.__awaiter(this,void 0,void 0,(function(){var o,a,s;return i.__generator(this,(function(i){switch(i.label){case 0:return[4,l.expandSymbols(t.getSymbols(),n)];case 1:return o=i.sent(),a=new e,o.length?[4,r.createTemplateGroup(o[0],null,t)]:[3,3];case 2:s=i.sent(),a.setDefault(s),i.label=3;case 3:return[2,a]}}))}))},e.prototype.size=function(){return 1},e.prototype.getDefault=function(){return this._defaultResult},e.prototype.setDefault=function(e){this._defaultResult=e},e.prototype.match=function(e,t,i,r,n){return this.getDefault()},e.prototype.analyze=function(e,t,r,n,o){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(e){return[2]}))}))},e}();t.FeatureMatcher=d;var h=function(e){function t(t,i,r,n){var o=e.call(this)||this;return o._intervals=[],o._isMaxInclusive=i,n?o._getValue=c.callWithFeature.bind(null,n):t&&t.length?"function"==typeof t?(o._field=null,o._getValue=t):(o._field=t,o._normalizationInfo=r,o._getValue=o._getValueFromField.bind(o)):o._field=null,o}return i.__extends(t,e),t.fromCBRenderer=function(e,r,n){return i.__awaiter(this,void 0,void 0,(function(){var o,u,c,f,d,h,p,_,m,v=this;return i.__generator(this,(function(g){switch(g.label){case 0:return o=e.isMaxInclusive,u=e.field,c={normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,normalizationType:e.normalizationType},(d=f=e.valueExpression)?[4,s.createRendererExpression(f,n.spatialReference,n.fields)]:[3,2];case 1:d=g.sent(),g.label=2;case 2:return h=new t(u,o,c,d),[4,l.expandSymbol(e.backgroundFillSymbol,n)];case 3:return p=g.sent(),[4,a.all(e.classBreakInfos.map((function(t){return i.__awaiter(v,void 0,void 0,(function(){var o,a;return i.__generator(this,(function(i){switch(i.label){case 0:return[4,l.expandSymbol(t.symbol,n)];case 1:return o=i.sent(),[4,r.createTemplateGroup(o,p,e)];case 2:return a=i.sent(),h.add({min:t.minValue,max:t.maxValue},a),[2]}}))}))})))];case 4:return g.sent(),[4,l.expandSymbol(e.defaultSymbol,n)];case 5:return(_=g.sent())?[4,r.createTemplateGroup(_,p,e)]:[3,7];case 6:m=g.sent(),h.setDefault(m),g.label=7;case 7:return[2,h]}}))}))},t.prototype.add=function(e,t){this._intervals.push({interval:e,result:t}),this._intervals.sort((function(e,t){return e.interval.min-t.interval.min}))},t.prototype.size=function(){return e.prototype.size.call(this)+this._intervals.length},t.prototype.match=function(e,t,i,r,n){if(!this._getValue)return this.getDefault();var o=this._getValue(t,{$view:n},i,r);if(!o&&(null==o||isNaN(o)))return this.getDefault();for(var a=0;a<this._intervals.length;a++){var s=this._intervals[a],l=s.interval;if(o>=l.min&&(this._isMaxInclusive?o<=l.max:o<l.max))return s.result}return this.getDefault()},t.prototype._needsNormalization=function(){var e=this._normalizationInfo;return e&&(e.normalizationField||e.normalizationTotal||e.normalizationType)},t.prototype._getValueFromField=function(e){var t=e.attributes[this._field];if(!this._needsNormalization())return t;var i=this._normalizationInfo,r=i.normalizationField,n=i.normalizationTotal,o=i.normalizationType,a=!!r&&e.attributes[r];if(o)switch(o){case"field":return a?t/a:void 0;case"log":return Math.log(t)*Math.LOG10E;case"percent-of-total":return t/n*100;default:return void f.error("Found unknown normalization type: "+o)}else f.error("Normalization is required, but no type was set!")},t}(d);t.IntervalMatcher=h;var p=function(e){function t(t,i,r){var n=e.call(this)||this;return n._nullResult=null,n._resultsMap=new Map,r?n._getValue=c.callWithFeature.bind(null,r):t&&t.length?"function"==typeof t[0]?(n._fields=null,n._getValue=t[0]):(n._fields=t,n._seperator=i||"",n._getValue=n._getValueFromFields.bind(n)):n._fields=null,n}return i.__extends(t,e),t.fromUVRenderer=function(e,r,n){return i.__awaiter(this,void 0,void 0,(function(){var o,u,c,f,d,h,p,_,m,v=this;return i.__generator(this,(function(g){switch(g.label){case 0:return o=e.uniqueValueInfos,u=e.fieldDelimiter,c=[e.field],f=e.valueExpression,e.field2&&c.push(e.field2),e.field3&&c.push(e.field3),[4,l.expandSymbol(e.backgroundFillSymbol,n)];case 1:return d=g.sent(),(h=f)?[4,s.createRendererExpression(f,n.spatialReference,n.fields)]:[3,3];case 2:h=g.sent(),g.label=3;case 3:return p=new t(c,u,h),[4,a.all(o.map((function(t){return i.__awaiter(v,void 0,void 0,(function(){var o,a;return i.__generator(this,(function(i){switch(i.label){case 0:return[4,l.expandSymbol(t.symbol,n)];case 1:return o=i.sent(),[4,r.createTemplateGroup(o,d,e)];case 2:return a=i.sent(),"<Null>"===t.value?p.setNullResult(a):p.add(t.value,a),[2]}}))}))})))];case 4:return g.sent(),[4,l.expandSymbol(e.defaultSymbol,n)];case 5:return(_=g.sent())?[4,r.createTemplateGroup(_,d,e)]:[3,7];case 6:m=g.sent(),p.setDefault(m),g.label=7;case 7:return[2,p]}}))}))},t.prototype.setNullResult=function(e){this._nullResult=e},t.prototype.add=function(e,t){this._resultsMap.set(e.toString(),t)},t.prototype.size=function(){return e.prototype.size.call(this)+this._resultsMap.size},t.prototype.match=function(e,t,i,r,n){if(!this._getValue)return this.getDefault();var o=this._getValue(t,{$view:n},i,r);if(null!==this._nullResult&&(null==o||""===o||"<Null>"===o))return this._nullResult;if(!o&&null==o)return this.getDefault();var a=o.toString();return this._resultsMap.has(a)?this._resultsMap.get(a):this.getDefault()},t.prototype._getValueFromFields=function(e){for(var t=[],i=0,r=this._fields;i<r.length;i++)t.push(e.attributes[r[i]]);return t.join(this._seperator)},t}(d);function _(e,t){return i.__awaiter(this,void 0,void 0,(function(){var r,n;return i.__generator(this,(function(i){switch(i.label){case 0:return"number"==typeof(r=e||1)?[2,function(e,t,i){return r}]:[4,s.createRendererExpression(r,t.spatialReference,t.fields)];case 1:return n=i.sent(),[2,function(e,i,r){return c.callWithFeature(n,e,{$view:r},t.geometryType,i)||1}]}}))}))}t.MapMatcher=p;var m=function(e){function t(t,i,r,n){var o=e.call(this)||this;return o._fidToAttributeHash=new Map,o._attributeHashToGroup=new Map,o._renderer=t,o._fieldMap=t.fieldMap,o._templates=i,o._info=r,o._scaleFn=n,o}return i.__extends(t,e),t.fromDictionaryRenderer=function(e,r,n){return i.__awaiter(this,void 0,void 0,(function(){var o;return i.__generator(this,(function(i){switch(i.label){case 0:return e.fetchResources({spatialReference:n.spatialReference,fields:n.fields}),[4,_(e.scaleExpression,n)];case 1:return o=i.sent(),[2,new t(e,r,n,o)]}}))}))},t.prototype._analyzeFeature=function(e,t,n,o,a){return i.__awaiter(this,void 0,void 0,(function(){var s,c,d,h,p,_,m,v,g,y,b;return i.__generator(this,(function(x){switch(x.label){case 0:return c=this._fidToAttributeHash.get(s=e.attributes[t]),d=this._hashAttributes(e),c===d?[2]:this._attributeHashToGroup.has(d)?[3,4]:(h=i.__assign(i.__assign({},o),{spatialReference:this._info.spatialReference,abortOptions:a,fields:this._info.fields}),p=this._scaleFn(e,n,o),[4,this._renderer.getSymbolAsync(e,h)]);case 1:return _=x.sent(),[4,l.expandSymbol(_,this._info,a)];case 2:if("expanded-cim"!==(m=x.sent()).type)return f.error(new r("mapview-bad-type","Found unexpected type "+m.type+" in dictionary response")),[2];for(v=0,g=m.layers;v<g.length;v++)(y=g[v]).scaleFactor=p,y.templateHash+="-"+p,"text"===y.type&&"string"==typeof y.text&&y.text.indexOf("[")>-1&&(y.text=u.createLabelOverrideFunction(this._fieldMap,y.text,y.cim.textCase));return[4,this._templates.createTemplateGroup(m,null,this._renderer)];case 3:b=x.sent(),this._attributeHashToGroup.set(d,b),x.label=4;case 4:return this._fidToAttributeHash.set(s,d),[2]}}))}))},t.prototype.analyze=function(e,t,r,n,o){return i.__awaiter(this,void 0,void 0,(function(){var s,l=this;return i.__generator(this,(function(i){switch(i.label){case 0:return s=t.map((function(t){return l._analyzeFeature(t,e,r,n,o)})),[4,a.all(s)];case 1:return i.sent(),[2]}}))}))},t.prototype.match=function(e,t){var i=this._fidToAttributeHash.get(t.attributes[e]);return this._attributeHashToGroup.get(i)},t.prototype._hashAttributes=function(e){var t="";for(var i in this._fieldMap)t+=". "+e.attributes[this._fieldMap[i]];return t},t}(d);t.DictionaryMatcher=m;var v=function(e){function t(t){var i=e.call(this)||this;return i._templates=t,i}return i.__extends(t,e),t.prototype.match=function(e,t){return o.isNone(t.symbol)?0:t.groupId?t.groupId:this._templates.createTemplateGroup(t.symbol,null,null)},t}(d);t.GraphicMatcher=v}).apply(null,r))||(e.exports=n)},Dikz:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("qsST"),i("JNkf")],n=(function(e,t,i,r,n){var o=r.getLogger("esri.views.2d.engine.webgl.WGLDisplayList");function a(e,t,r){for(var n=[],o=3;o<arguments.length;o++)n[o-3]=arguments[o];t<e.length?e.splice.apply(e,i.__spreadArrays([t,r],n)):e.push.apply(e,n)}var s=new Map;s.set(n.WGLDrawPhase.MAP,[n.WGLGeometryType.FILL,n.WGLGeometryType.LINE,n.WGLGeometryType.MARKER,n.WGLGeometryType.TEXT]),s.set(n.WGLDrawPhase.LABEL,[n.WGLGeometryType.LABEL]),s.set(n.WGLDrawPhase.LABEL_ALPHA,[n.WGLGeometryType.LABEL]);var l=function(){function e(e){void 0===e&&(e=!1),this.symbolLevels=[],this.unified=e}return e.prototype.replay=function(e,t,i){if(this.unified)for(var r=0,n=this.symbolLevels;r<n.length;r++)for(var o=0,a=n[r].zLevels;o<a.length;o++){var s=a[o].geometryDPInfo;for(var l in s)if(s[l])for(var u=0,c=s[l];u<c.length;u++){var f=c[u],d=e.painter.getGeometryBrush(f.geometryType),h=t.getGeometry(f.geometryType);d.prepareState(e,t),d.drawGeometry(e,t,f,h,i)}}},Object.defineProperty(e.prototype,"empty",{get:function(){return!this.symbolLevels||0===this.symbolLevels.length},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this.symbolLevels.length=0},e.prototype.addToList=function(e,t){if(Array.isArray(e))for(var i=0,r=e;i<r.length;i++)this._addToList(r[i],t);else this._addToList(e,t)},e.prototype.removeFromList=function(e){Array.isArray(e)||(e=[e]);for(var t=null,i=0,r=e;i<r.length;i++)t=this._removeFromList(r[i]);return t},e.prototype.byType=function(e,t){for(var i=0,r=this.symbolLevels;i<r.length;i++)for(var n=0,o=r[i].zLevels;n<o.length;n++){var a=o[n].geometryDPInfo,s=this.getDPInfoType(e);if(a[s])for(var l=0,u=a[s];l<u.length;l++)t(u[l])}},e.prototype.clone=function(){for(var t=new e(this.unified),i=0,r=this.symbolLevels;i<r.length;i++)t.symbolLevels.push(r[i].clone());return t},e.prototype.splitAfter=function(e){for(var t=this._getDisplayList(e.symbolLevel,e.zOrder,e.geometryType),i=t.length,r=e.indexFrom+e.indexCount,n=0;n<i;++n){var o=t[n];if(o.geometryType===e.geometryType&&r>o.indexFrom&&r<=o.indexFrom+o.indexCount){if(r<o.indexFrom+o.indexCount){var a=new u;a.geometryType=o.geometryType,a.materialKey=o.materialKey,a.indexFrom=r,a.indexCount=o.indexFrom+o.indexCount-r,t.splice(n+1,0,a),o.indexCount=r-o.indexFrom}return n}}},e.prototype._addToList=function(e,t){var i=this._getDisplayList(e.symbolLevel,e.zOrder,e.geometryType),r=null!=t?t:i.length-1,n=r>=0&&r<i.length?i[r]:null;if(null===n||n.materialKey!==e.materialKey||n.indexFrom+n.indexCount!==e.indexFrom||this.unified&&n.geometryType!==e.geometryType){var o=new u;o.indexFrom=e.indexFrom,o.indexCount=e.indexCount,o.materialKey=e.materialKey,o.geometryType=e.geometryType,a(i,r+1,0,o)}else n.indexCount+=e.indexCount},e.prototype._removeFromList=function(e){for(var t=this._getDisplayList(e.symbolLevel,e.zOrder,e.geometryType),i=t.length,r=void 0,n=0;n<i;++n){var o=t[n];if(e.indexFrom+e.indexCount>o.indexFrom&&e.indexFrom<o.indexFrom+o.indexCount&&(!this.unified||o.geometryType===e.geometryType)){r=n;break}}if(void 0!==r){if(e.indexFrom===(o=t[r]).indexFrom)return o.indexCount-=e.indexCount,o.indexFrom+=e.indexCount,0===o.indexCount&&a(t,r,1),r-1;if(e.indexFrom+e.indexCount===o.indexFrom+o.indexCount)return o.indexCount-=e.indexCount,0===o.indexCount?(a(t,r,1),r-1):r;var s=o.indexFrom,l=e.indexFrom-o.indexFrom,c=e.indexCount,f=o.indexFrom+o.indexCount-(e.indexFrom+e.indexCount);o.indexCount=l;var d=new u;return d.geometryType=o.geometryType,d.materialKey=o.materialKey,d.indexFrom=s+l+c,d.indexCount=f,a(t,r+1,0,d),r}return null},e.prototype._getDisplayList=function(e,t,i){for(var r,o,a=this.symbolLevels.length,s=0;s<a;s++)if(this.symbolLevels[s].symbolLevel===e){r=this.symbolLevels[s];break}r||((r=new d).symbolLevel=e,this.symbolLevels.push(r));for(var l,u=r.zLevels.length,h=0;h<u;h++)if(r.zLevels[h].zLevel===t){o=r.zLevels[h];break}if(o||((o=new f).geometryDPInfo=new c,o.zLevel=t,r.zLevels.push(o)),this.unified)o.geometryDPInfo.unified||(o.geometryDPInfo.unified=[]),l=o.geometryDPInfo.unified;else switch(i){case n.WGLGeometryType.FILL:o.geometryDPInfo.fill||(o.geometryDPInfo.fill=[]),l=o.geometryDPInfo.fill;break;case n.WGLGeometryType.LINE:o.geometryDPInfo.line||(o.geometryDPInfo.line=[]),l=o.geometryDPInfo.line;break;case n.WGLGeometryType.MARKER:o.geometryDPInfo.marker||(o.geometryDPInfo.marker=[]),l=o.geometryDPInfo.marker;break;case n.WGLGeometryType.TEXT:o.geometryDPInfo.text||(o.geometryDPInfo.text=[]),l=o.geometryDPInfo.text;break;case n.WGLGeometryType.LABEL:o.geometryDPInfo.label||(o.geometryDPInfo.label=[]),l=o.geometryDPInfo.label;break;default:console.error("Trying to add a record with geometry type '"+i+"'.")}return l},e.prototype.getDPInfoType=function(e){if(this.unified)return"unified";switch(e){case n.WGLGeometryType.FILL:return"fill";case n.WGLGeometryType.LINE:return"line";case n.WGLGeometryType.MARKER:return"marker";case n.WGLGeometryType.TEXT:return"text";case n.WGLGeometryType.LABEL:return"label";default:return void o.error("DisplayList: Tried to convert unknown geometryType: "+e)}},e}(),u=function(){function e(){this.materialKey=null,this.indexFrom=0,this.indexCount=0}return e.prototype.clone=function(){var t=new e;return t.geometryType=this.geometryType,t.materialKey=this.materialKey,t.indexFrom=this.indexFrom,t.indexCount=this.indexCount,t},e}(),c=function(){function e(){this.fill=null,this.line=null,this.marker=null,this.text=null,this.label=null,this.unified=null}return e.prototype.clone=function(){var t=new e;return t.fill=this.fill&&this.fill.map((function(e){return e.clone()})),t.line=this.line&&this.line.map((function(e){return e.clone()})),t.marker=this.marker&&this.marker.map((function(e){return e.clone()})),t.text=this.text&&this.text.map((function(e){return e.clone()})),t.label=this.label&&this.label.map((function(e){return e.clone()})),t.unified=this.unified&&this.unified.map((function(e){return e.clone()})),t},e}(),f=function(){function e(){this.geometryDPInfo=new c}return e.prototype.clone=function(){var t=new e;return t.zLevel=this.zLevel,t.geometryDPInfo=this.geometryDPInfo.clone(),t},e}(),d=function(){function e(){this.zLevels=[]}return e.prototype.clone=function(){var t=new e;t.symbolLevel=this.symbolLevel;for(var i=0,r=this.zLevels;i<r.length;i++)t.zLevels.push(r[i].clone());return t},e}();return l}).apply(null,r),void 0===n||(e.exports=n)},Dos2:function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var i=new Float32Array(1),r=new Uint32Array(i.buffer);function n(e,t,i){return Math.round(Math.max(Math.min(e,i),t))}t.i8=function(e){return n(e,-128,127)},t.i16=function(e){return n(e,-32768,32767)},t.i32=function(e){return n(e,-2147483648,2147483647)},t.u8=function(e){return n(e,0,255)},t.u16=function(e){return n(e,0,65535)},t.u32=function(e){return n(e,0,4294967295)},t.toUint32=function(e){return i[0]=e,r[0]},t.toFloat32=function(e){return r[0]=e,i[0]},t.u32to4Xu8=function(e){return[255&e,(65280&e)>>>8,(16711680&e)>>>16,(4278190080&e)>>>24]},t.i1616to32=function(e,t){return 65535&e|t<<16},t.i8888to32=function(e,t,i,r){return 255&e|(255&t)<<8|(255&i)<<16|r<<24},t.i8816to32=function(e,t,i){return 255&e|(255&t)<<8|i<<16},t.numTo32=function(e){return 0|e}}).apply(null,r))||(e.exports=n)},DvfX:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("lRq4"),i("YaB4"),i("6h7w"),i("JNkf"),i("wUCb")],n=(function(e,t,i,r,n,o,a,s){Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.createTile=function(e){var t=this._tileInfoView.getTileBounds(r.create(),e);return new o.BitmapTile(e,t,this._tileInfoView.tileInfo.size)},t.prototype.destroyTile=function(){},t.prototype.prepareRenderPasses=function(t){var r=this,o=t.registerRenderPass({name:"bitmap (tile)",brushes:[n.brushes.Bitmap],target:function(){return r.children.map((function(e){return e.bitmap}))},drawPhase:a.WGLDrawPhase.MAP});return i.__spreadArrays(e.prototype.prepareRenderPasses.call(this,t),[o])},t.prototype.doRender=function(t){this.visible&&t.drawPhase===a.WGLDrawPhase.MAP&&e.prototype.doRender.call(this,t)},t}(s.default);t.BitmapTileContainer=l}).apply(null,r),void 0===n||(e.exports=n)},"Ed/z":function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this._pos=0,this._buffer=e,this._i32View=new Int32Array(this._buffer),this._f32View=new Float32Array(this._buffer)}return e.prototype.readInt32=function(){return this._i32View[this._pos++]},e.prototype.readF32=function(){return this._f32View[this._pos++]},e}();t.default=i}).apply(null,r))||(e.exports=n)},FDNA:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("apbF"),i("ph8t"),i("3vQA")],void 0===(n=(function(e,t,i,r,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this.data=e,this.stride=t}return Object.defineProperty(e.prototype,"vertexCount",{get:function(){return this.data.length/(this.stride/4)},enumerable:!0,configurable:!0}),e.prototype.transfer=function(e,t){var i=this.data.buffer();e.vertexCount=this.vertexCount,e.data=i,e.stride=this.stride,t.push(i)},e}();t.default=o;var a=function(){function e(e,t,r){void 0===r&&(r=!1),this.geometryType=e,this.indexVector=new n.default(Uint32Array,t),this.namedVectors={};var a=i.getStrides(e,r);for(var s in a){var l=a[s],u=void 0;switch(l%4){case 0:case 2:u=new n.default(Uint32Array,l/4*t);break;case 1:case 3:u=new n.default(Uint8Array,l*t)}this.namedVectors[s]=new o(u,l)}}return e.prototype.get=function(e){return this.namedVectors[e].data},e.prototype.getVector=function(e){return this.namedVectors[e]},e.prototype.transfer=function(e,t){var i=this.indexVector.buffer(),r={};for(var n in t.push(i),this.namedVectors){var o=this.namedVectors[n];r[n]={},o.transfer(r[n],t)}e.geometryType=this.geometryType,e.indexBuffer=i,e.namedBuffers=r,this.destroy()},e.prototype.intoBuffers=function(){var e=r.VertexBuffers.fromVertexVectors(this);return this.destroy(),e},e.prototype.destroy=function(){this.indexVector=null,this.namedVectors=null},e}();t.VertexVectors=a}).apply(null,r))||(e.exports=n)},Fo2y:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("xoE+"),i("jBNx"),i("4F/P"),i("VY6u"),i("Dos2"),i("m87x"),i("8Lwu"),i("kNAO"),i("yVlQ"),i("PlK1")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c,f,d){Object.defineProperty(t,"__esModule",{value:!0});var h=function(e){function t(t,i){var r=e.call(this,i)||this;if(u.isFunction(i.color))r._dynamicPropertyMap.set("_fillColor",(function(e,t,r){var n=i.color(e,t,r);return n&&o.premultiplyAlphaRGBA(n)||0}));else{var s=i.color;r.fillColor=s&&o.premultiplyAlphaRGBA(s)||0}var c=0;u.isFunction(i.height)||(c=i.height||0),r._dynamicPropertyMap.set("_height",(function(e,t,r){return u.isFunction(i.height)?i.height(e,t,r):c}));var f=0;u.isFunction(i.offsetX)||(f=n.pt2px(i.offsetX||0)+128)>255&&(f=255),r._dynamicPropertyMap.set("_offsetX",(function(e,t,r){if(u.isFunction(i.offsetX)){var o=n.pt2px(i.offsetX(e,t,r))+128;return o>255&&(o=255),o}return f}));var d=1;u.isFunction(i.scaleX)||(d=i.scaleX||1),r._dynamicPropertyMap.set("_scaleX",(function(e,t,r){return u.isFunction(i.scaleX)?i.scaleX(e,t,r):d}));var h=0;u.isFunction(i.offsetY)||(h=n.pt2px(-i.offsetY||0)+128)>255&&(h=255),r._dynamicPropertyMap.set("_offsetY",(function(e,t,r){if(u.isFunction(i.offsetY)){var o=n.pt2px(-i.offsetY(e,t,r))+128;return o>255&&(o=255),o}return h}));var p=0;return u.isFunction(i.angle)||(p=a.radToByte(i.angle)||0),r._dynamicPropertyMap.set("_angle",(function(e,t,r){return u.isFunction(i.angle)?a.radToByte(i.angle(e,t,r)):p})),r.isBFS=!1,r.effects=i.effects,r._cimFillLayer=i,r._fillMaterialKey=l.FillMaterialKey.load(l.createMaterialKey(r.geometryType,t,!1)),r}return i.__extends(t,e),t.fromCIMFill=function(e,i){return new t(e,i)},t.prototype.bindFeature=function(e,t,i){var o=this;this._dynamicPropertyMap.forEach((function(r,n){o[n]=r(e,t,i)}));var a=this._fillMaterialKey,l=this._materialCache,u=this._cimFillLayer;this.aux3=s.i8888to32(0,0,this._angle,u.colorLocked?1:0);var c=(0,u.materialHash)(e,t,i),f=l.get(c),h=null;if(f&&d.ok(f.spriteMosaicItem)&&(h=f.spriteMosaicItem),h){var p=h.rect,_=h.width,m=h.height,v=p.x+1,g=p.y+1,y=v+_,b=g+m,x=r.nextHighestPowerOfTwo(n.pt2px(this._height));x>255?x=255:x<=0&&(x=r.nextHighestPowerOfTwo(b-g));var w=r.nextHighestPowerOfTwo(n.pt2px(this._height/m*_||0));w>255?w=255:w<=0&&(w=r.nextHighestPowerOfTwo(y-v));var T=this._scaleX;this.tl=s.i1616to32(v,g),this.br=s.i1616to32(y,b),this.aux1=s.i8888to32(w,x,this._offsetX,this._offsetY),this.aux2=s.i1616to32(128*T,128),a.sdf=h.sdf,a.pattern=!0,a.textureBinding=h.textureBinding}else this.tl=0,this.br=0,this.aux1=0,this.aux2=0,a.sdf=!1,a.pattern=!1,a.textureBinding=0;this._materialKey=a.data},t}(c.default(f.default));t.default=h}).apply(null,r))||(e.exports=n)},G59t:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("ma1f"),i("qsST"),i("JNkf"),i("apbF")],void 0===(n=(function(e,t,i,r,n,o){Object.defineProperty(t,"__esModule",{value:!0});var a=r.getLogger("esri.views.2d.engine.webgl");t.getTypeOfSizeVisualVariable=function(e){return o.isNumber(e.minDataValue)&&o.isNumber(e.maxDataValue)&&null!=e.minSize&&null!=e.maxSize?n.WGLVVFlag.SIZE_MINMAX_VALUE:(e.expression&&"view.scale"===e.expression||e.valueExpression&&"$view.scale"===e.valueExpression)&&Array.isArray(e.stops)?n.WGLVVFlag.SIZE_SCALE_STOPS:(null!=e.field||e.expression&&"view.scale"!==e.expression||e.valueExpression&&"$view.scale"!==e.valueExpression)&&(Array.isArray(e.stops)||"levels"in e&&e.levels)?n.WGLVVFlag.SIZE_FIELD_STOPS:(null!=e.field||e.expression&&"view.scale"!==e.expression||e.valueExpression&&"$view.scale"!==e.valueExpression)&&null!=e.valueUnit?n.WGLVVFlag.SIZE_UNIT_VALUE:(a.error(new i("mapview-bad-type","Found invalid size VisualVariable",e)),n.WGLVVFlag.NONE)}}).apply(null,r))||(e.exports=n)},GBWg:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("DJpR"),i("lUvf")],void 0===(n=(function(e,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this._cache=new Array(8);for(var t=0;t<8;t++)this._cache[t]={};this._programRepo=new i.ProgramCache(e)}return e.prototype.dispose=function(){this._programRepo&&(this._programRepo.dispose(),this._programRepo=null)},e.prototype.getProgram=function(e,t,i){var r=this._cache[e];if(!r[t]){var n=this._programRepo.getProgram(this._getProgramTemplate(e),i);r[t]=n}return r[t]},e.prototype.getProgramAttributes=function(e){switch(e){case 0:return r.background.attributes;case 5:return r.circle.attributes;case 1:return r.fill.attributes;case 4:return r.icon.attributes;case 3:return r.line.attributes;case 2:return r.outline.attributes;case 6:return r.text.attributes;default:return null}},e.prototype._getProgramTemplate=function(e){switch(e){case 0:return r.background;case 5:return r.circle;case 1:return r.fill;case 4:return r.icon;case 3:return r.line;case 2:return r.outline;case 6:return r.text;default:return null}},e}();t.default=n}).apply(null,r))||(e.exports=n)},Hcrl:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("ma1f"),i("qsST"),i("LxLY"),i("jBNx"),i("Zx0K"),i("ab6c"),i("4F/P"),i("Dos2"),i("m87x"),i("8Lwu"),i("ZOLT"),i("yVlQ"),i("PlK1")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c,f,d,h,p,_){Object.defineProperty(t,"__esModule",{value:!0});var m=l.vec2f32.create(),v=s.mat2df32.create(),g=n.getLogger("esri.views.2d.engine.webgl.WGLDynamicMarkerTemplate"),y=function(e){function t(t,i){var r=e.call(this,i)||this;return r._cimMarkerLayer=i,d.isFunction(i.color)?r._dynamicPropertyMap.set("_fillColor",(function(e,t,r){return u.premultiplyAlphaRGBA(i.color(e,t,r))})):r._fillColor=u.premultiplyAlphaRGBA(i.color),d.isFunction(i.outlineColor)?r._dynamicPropertyMap.set("_outlineColor",(function(e,t,r){return u.premultiplyAlphaRGBA(i.outlineColor(e,t,r))})):r._outlineColor=u.premultiplyAlphaRGBA(i.outlineColor),d.isFunction(i.size)?r._dynamicPropertyMap.set("_size",(function(e,t,r){return a.pt2px(i.size(e,t,r))})):r._size=a.pt2px(i.size),d.isFunction(i.scaleX)?r._dynamicPropertyMap.set("_scaleX",i.scaleX):r._scaleX=i.scaleX,d.isFunction(i.offsetX)?r._dynamicPropertyMap.set("xOffset",(function(e,t,r){return a.pt2px(i.offsetX(e,t,r))})):r.xOffset=a.pt2px(i.offsetX),d.isFunction(i.offsetY)?r._dynamicPropertyMap.set("yOffset",(function(e,t,r){return a.pt2px(i.offsetY(e,t,r))})):r.yOffset=a.pt2px(i.offsetY),d.isFunction(i.outlineWidth)?r._dynamicPropertyMap.set("_outlineWidth",(function(e,t,r){return a.pt2px(i.outlineWidth(e,t,r))})):r._outlineWidth=a.pt2px(i.outlineWidth),d.isFunction(i.rotation)?r._dynamicPropertyMap.set("_angle",i.rotation):r._angle=i.rotation,r._scaleFactor=o.unwrapOr(i.scaleFactor,1),r._markerPlacement=i.markerPlacement,r.effects=i.effects,r._bitSet=(1===i.alignment?1:0)|(i.colorLocked?1:0)<<1|(i.scaleSymbolsProportionally?1:0)<<3,r._materialKey=f.createMaterialKey(r.geometryType,t,!1),r}return i.__extends(t,e),t.fromCIMMarker=function(e,i){return new t(e,i)},t.prototype.bindFeature=function(e,t,i){var n=this;this._dynamicPropertyMap.forEach((function(r,o){n[o]=r(e,t,i)}));var o=this._cimMarkerLayer.materialHash,s="function"==typeof o?o(e,t,i):o,l=this._materialCache.get(s);if(l&&_.ok(l.spriteMosaicItem)&&l.spriteMosaicItem){var u=l.spriteMosaicItem,d=this._cimMarkerLayer.sizeRatio,h=u.width/u.height*this._scaleX,p=this._cimMarkerLayer.rotateClockwise?this._angle:-this._angle,y=this._size,b=y*h,x=this.xOffset,w=this.yOffset;this.xOffset*=this._scaleFactor,this.yOffset*=this._scaleFactor;var T=this._cimMarkerLayer.scaleSymbolsProportionally&&this._cimMarkerLayer.frameHeight?this._size/a.pt2px(this._cimMarkerLayer.frameHeight):1,S=this._outlineWidth*T,C=a.pt2px(this._cimMarkerLayer.referenceSize),L=0,O=0,M=this._cimMarkerLayer.anchorPoint;M&&(this._cimMarkerLayer.isAbsoluteAnchorPoint?this._size&&(L=-M.x/(this._size*h),O=M.y/this._size):(L=M.x,O=M.y)),this._sizeOutlineWidth=c.i8888to32(Math.round(Math.min(Math.sqrt(128*b),255)),Math.round(Math.min(Math.sqrt(128*y),255)),Math.round(Math.min(Math.sqrt(128*S),255)),Math.round(Math.min(Math.sqrt(128*C),255))),this.angle=p;var D=Math.round(Math.min(64*d,255));this._bitestAndDistRatio=c.i8888to32(0,0,this._bitSet,D);var E=u.rect.x,I=u.rect.y,P=E+u.rect.width,A=I+u.rect.height;this._texUpperLeft=c.i1616to32(E,I),this._texUpperRight=c.i1616to32(P,I),this._texBottomLeft=c.i1616to32(E,A),this._texBottomRight=c.i1616to32(P,A);var V=f.MarkerMaterialKey.load(this._materialKey);V.sdf=u.sdf,V.pattern=!0,V.textureBinding=u.textureBinding,this._materialKey=V.data,this._anchorX=.5-((.5+L)*u.width+1)/u.rect.width,this._anchorY=.5-((.5+O)*u.height+1)/u.rect.height,b*=d,y*=d,b*=this._scaleFactor,y*=this._scaleFactor,y*=u.rect.height/u.height,this._computedWidth=b*=u.rect.width/u.width,this._computedHeight=y,this._applyTransformation(v,m),this.xOffset=x,this.yOffset=w}else g.error(new r("mapview-cim","Encountered an error when binding feature"))},t}(h.default(p.default));t.default=y}).apply(null,r))||(e.exports=n)},HjjH:function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={background:{"background.frag":"#ifdef PATTERN\nuniform lowp float u_opacity;\nuniform mediump vec2 u_pattern_tl;\nuniform mediump vec2 u_pattern_br;\nuniform sampler2D u_texture;\nvarying mediump vec2 v_tileTextureCoord;\n#else\nuniform lowp vec4 u_color;\n#endif\n#ifdef ID\nvarying mediump vec4 v_id;\n#endif\nvoid main() {\n#ifdef PATTERN\n mediump vec2 normalizedTextureCoord = mod(v_tileTextureCoord, 1.0);\n mediump vec2 samplePos = mix(u_pattern_tl, u_pattern_br, normalizedTextureCoord);\n lowp vec4 color = texture2D(u_texture, samplePos);\n gl_FragColor = u_opacity * color;\n#else\n gl_FragColor = u_color;\n#endif\n#ifdef ID\n if (gl_FragColor.a < 1.0 / 255.0) {\n discard;\n }\n gl_FragColor = v_id;\n#endif\n}","background.vert":"precision mediump float;\nattribute vec2 a_pos;\n#ifdef ID\nuniform mediump vec4 u_id;\nvarying mediump vec4 v_id;\n#endif\nuniform highp mat3 u_dvsMat3;\nuniform mediump float u_coord_range;\nuniform mediump float u_depth;\n#ifdef PATTERN\nuniform mediump mat3 u_pattern_matrix;\nvarying mediump vec2 v_tileTextureCoord;\n#endif\nvoid main() {\n gl_Position = vec4((u_dvsMat3 * vec3(u_coord_range * a_pos, 1.0)).xy, u_depth, 1.0);\n#ifdef PATTERN\n v_tileTextureCoord = (u_pattern_matrix * vec3(a_pos, 1.0)).xy;\n#endif\n#ifdef ID\n v_id = u_id / 255.0;\n#endif\n}"},circle:{"circle.frag":"precision lowp float;\nvarying lowp vec4 v_color;\nvarying lowp vec4 v_stroke_color;\nvarying mediump float v_blur;\nvarying mediump float v_stroke_width;\nvarying mediump float v_radius;\nvarying mediump vec2 v_offset;\n#ifdef ID\nvarying mediump vec4 v_id;\n#endif\nvoid main()\n{\n mediump float dist = length(v_offset);\n mediump float alpha = smoothstep(0.0, -v_blur, dist - 1.0);\n lowp float color_mix_ratio = v_stroke_width < 0.01 ? 0.0 : smoothstep(-v_blur, 0.0, dist - v_radius / (v_radius + v_stroke_width));\n gl_FragColor = alpha * mix(v_color, v_stroke_color, color_mix_ratio);\n#ifdef ID\n if (gl_FragColor.a < 1.0 / 255.0) {\n discard;\n }\n gl_FragColor = v_id;\n#endif\n}","circle.vert":"precision mediump float;\nattribute vec2 a_pos;\nattribute vec4 a_color;\nattribute vec4 a_stroke_color;\nattribute vec4 a_data;\nconst float sizePrecision = 0.25;\nconst float blurPrecision = 0.03125;\nvarying lowp vec4 v_color;\nvarying lowp vec4 v_stroke_color;\nvarying mediump float v_blur;\nvarying mediump float v_stroke_width;\nvarying mediump float v_radius;\nvarying mediump vec2 v_offset;\n#ifdef ID\nuniform mediump vec4 u_id;\nvarying mediump vec4 v_id;\n#endif\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump vec2 u_circleTranslation;\nuniform mediump float u_depth;\nuniform mediump float u_radius;\nuniform lowp vec4 u_color;\nuniform mediump float u_blur;\nuniform mediump float u_stroke_width;\nuniform lowp vec4 u_stroke_color;\nuniform mediump float u_antialiasingWidth;\nvoid main()\n{\n v_color = a_color * u_color;\n v_stroke_color = a_stroke_color * u_stroke_color;\n v_stroke_width = a_data[1] * sizePrecision * u_stroke_width;\n v_radius = a_data[2] * u_radius;\n v_blur = max(a_data[0] * blurPrecision + u_blur, u_antialiasingWidth / (v_radius + v_stroke_width));\n mediump vec2 offset = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n v_offset = offset;\n#ifdef ID\n v_id = u_id / 255.0;\n#endif\n mediump vec3 pos = u_dvsMat3 * vec3(a_pos * 0.5, 1.0) + u_displayMat3 * vec3((v_radius + v_stroke_width) * offset + u_circleTranslation, 0.0);\n gl_Position = vec4(pos.xy, u_depth, 1.0);\n}"},fill:{"fill.frag":"precision lowp float;\n#ifdef PATTERN\nuniform mediump vec2 u_pattern_tl;\nuniform mediump vec2 u_pattern_br;\nuniform lowp sampler2D u_texture;\nvarying mediump vec2 v_tileTextureCoord;\n#endif\n#ifdef ID\nvarying mediump vec4 v_id;\n#endif\nvarying lowp vec4 v_color;\nvec4 mixColors(vec4 color1, vec4 color2) {\n float compositeAlpha = color2.a + color1.a * (1.0 - color2.a);\n vec3 compositeColor = color2.rgb + color1.rgb * (1.0 - color2.a);\n return vec4(compositeColor, compositeAlpha);\n}\nvoid main()\n{\n#ifdef PATTERN\n mediump vec2 normalizedTextureCoord = fract(v_tileTextureCoord);\n mediump vec2 samplePos = mix(u_pattern_tl, u_pattern_br, normalizedTextureCoord);\n lowp vec4 color = texture2D(u_texture, samplePos);\n gl_FragColor = v_color[3] * color;\n#else\n gl_FragColor = v_color;\n#endif\n#ifdef ID\n if (gl_FragColor.a < 1.0 / 255.0) {\n discard;\n }\n gl_FragColor = v_id;\n#endif\n}","fill.vert":"precision mediump float;\nattribute vec2 a_pos;\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump float u_depth;\nuniform mediump vec2 u_fillTranslation;\n#ifdef PATTERN\nuniform mediump mat3 u_pattern_matrix;\nvarying mediump vec2 v_tileTextureCoord;\n#endif\n#ifdef ID\nuniform mediump vec4 u_id;\nvarying mediump vec4 v_id;\n#endif\n#ifdef DD\nattribute vec4 a_color;\n#endif\nuniform lowp vec4 u_color;\nvarying lowp vec4 v_color;\nvoid main()\n{\n#ifdef DD\n v_color = a_color * u_color;\n#else\n v_color = u_color;\n#endif\n#ifdef ID\n v_id = u_id / 255.0;\n#endif\n#ifdef PATTERN\n v_tileTextureCoord = (u_pattern_matrix * vec3(a_pos, 1.0)).xy;\n#endif\n vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayMat3 * vec3(u_fillTranslation, 0.0);\n gl_Position = vec4(pos.xy, u_depth, 1.0);\n}"},icon:{"icon.frag":"precision mediump float;\nuniform lowp sampler2D u_texture;\n#ifdef SDF\nuniform lowp vec4 u_color;\nuniform lowp vec4 u_outlineColor;\nuniform mediump float u_outlineSize;\n#endif\nvarying mediump vec2 v_tex;\nvarying lowp float v_transparency;\nvarying mediump vec2 v_size;\nvarying lowp vec4 v_color;\n#ifdef ID\nvarying mediump vec4 v_id;\n#endif\n#include <util/encoding.glsl>\nvec4 mixColors(vec4 color1, vec4 color2) {\n float compositeAlpha = color2.a + color1.a * (1.0 - color2.a);\n vec3 compositeColor = color2.rgb + color1.rgb * (1.0 - color2.a);\n return vec4(compositeColor, compositeAlpha);\n}\nvoid main()\n{\n#ifdef SDF\n lowp vec4 fillPixelColor = v_color;\n float d = rgba2float(texture2D(u_texture, v_tex)) - 0.5;\n const float sofetEdgeRatio = 0.248062016;\n float size = max(v_size.x, v_size.y);\n float dist = d * sofetEdgeRatio * size;\n fillPixelColor *= clamp(0.5 - dist, 0.0, 1.0);\n if (u_outlineSize > 0.25) {\n lowp vec4 outlinePixelColor = u_outlineColor;\n const float outlineLimitRatio = (16.0 / 86.0);\n float clampedOutlineSize = sofetEdgeRatio * min(u_outlineSize, outlineLimitRatio * max(v_size.x, v_size.y));\n outlinePixelColor *= clamp(0.5 - (abs(dist) - clampedOutlineSize), 0.0, 1.0);\n gl_FragColor = v_transparency * mixColors(fillPixelColor, outlinePixelColor);\n }\n else {\n gl_FragColor = v_transparency * fillPixelColor;\n }\n#else\n lowp vec4 texColor = texture2D(u_texture, v_tex);\n gl_FragColor = v_transparency * texColor;\n#endif\n#ifdef ID\n if (gl_FragColor.a < 1.0 / 255.0) {\n discard;\n }\n gl_FragColor = v_id;\n#endif\n}","icon.vert":"attribute vec2 a_pos;\nattribute vec2 a_vertexOffset;\nattribute vec4 a_tex;\nattribute vec4 a_levelInfo;\n#ifdef DD\nattribute vec4 a_color;\nattribute mediump float a_size;\n#endif\nuniform lowp vec4 u_color;\nuniform mediump float u_size;\n#ifdef ID\nuniform mediump vec4 u_id;\nvarying mediump vec4 v_id;\n#endif\nvarying lowp vec4 v_color;\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump vec2 u_iconTranslation;\nuniform vec2 u_mosaicSize;\nuniform mediump float u_depth;\nuniform mediump float u_mapRotation;\nuniform mediump float u_level;\nuniform lowp float u_keepUpright;\nuniform mediump float u_fadeSpeed;\nuniform mediump float u_minfadeLevel;\nuniform mediump float u_maxfadeLevel;\nuniform mediump float u_fadeChange;\nuniform mediump float u_opacity;\nvarying mediump vec2 v_tex;\nvarying lowp float v_transparency;\nvarying mediump vec2 v_size;\nconst float C_OFFSET_PRECISION = 1.0 / 8.0;\nconst float C_256_TO_RAD = 3.14159265359 / 128.0;\nconst float C_DEG_TO_RAD = 3.14159265359 / 180.0;\nconst float tileCoordRatio = 1.0 / 8.0;\nvoid main()\n{\n mediump float a_labelMinLevel = a_levelInfo[0];\n mediump float a_angle = a_levelInfo[1];\n mediump float a_minLevel = a_levelInfo[2];\n mediump float a_maxLevel = a_levelInfo[3];\n mediump float delta_z = 0.0;\n mediump float rotated = mod(a_angle + u_mapRotation, 256.0);\n delta_z += (1.0 - step(u_keepUpright, 0.0)) * step(64.0, rotated) * (1.0 - step(192.0, rotated));\n delta_z += 1.0 - step(a_minLevel, u_level);\n delta_z += step(a_maxLevel, u_level);\n mediump float alpha = u_fadeSpeed != 0.0 ? clamp((u_fadeChange - a_labelMinLevel) / u_fadeSpeed, 0.0, 1.0) : 1.0;\n v_transparency = (u_fadeSpeed >= 0.0 ? alpha : 1.0 - alpha);\n if (u_maxfadeLevel < a_labelMinLevel)\n {\n v_transparency = 0.0;\n }\n if (u_minfadeLevel >= a_labelMinLevel)\n {\n v_transparency = 1.0;\n }\n delta_z += step(v_transparency, 0.0);\n vec2 offset = C_OFFSET_PRECISION * a_vertexOffset;\n v_size = abs(offset);\n#ifdef SDF\n offset = (120.0 / 86.0) * offset;\n#endif\n#ifdef DD\n mediump float icon_size = a_size * u_size;\n#else\n mediump float icon_size = u_size;\n#endif\n mediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayViewMat3 * vec3(icon_size * offset, 0.0) + u_displayMat3 * vec3(u_iconTranslation, 0.0);\n gl_Position = vec4(pos.xy, u_depth + delta_z, 1.0);\n#ifdef DD\n v_color = a_color * u_color;\n#else\n v_color = u_color;\n#endif\n#ifdef ID\n v_id = u_id / 255.0;\n#endif\n v_tex = a_tex.xy / u_mosaicSize;\n v_transparency *= v_color.w;\n}"},line:{"line.frag":"varying mediump vec2 v_normal;\nvarying highp float v_accumulatedDistance;\nvarying mediump float v_lineHalfWidth;\nvarying lowp vec4 v_color;\nvarying mediump float v_blur;\n#ifdef PATTERN\nuniform mediump vec2 u_pattern_tl;\nuniform mediump vec2 u_pattern_br;\nuniform mediump vec2 u_spriteSize;\nuniform sampler2D u_texture;\nconst mediump float tileCoordRatio = 8.0;\n#else\nvarying mediump vec2 v_dasharray;\n#endif\n#ifdef ID\nvarying mediump vec4 v_id;\n#endif\nvoid main()\n{\n mediump float fragDist = length(v_normal) * v_lineHalfWidth;\n lowp float alpha = clamp((v_lineHalfWidth - fragDist) / v_blur, 0.0, 1.0);\n#ifdef PATTERN\n mediump float relativeTexX = mod((v_accumulatedDistance + v_normal.x * v_lineHalfWidth * tileCoordRatio) / u_spriteSize.x, 1.0);\n mediump float relativeTexY = 0.5 + (v_normal.y * v_lineHalfWidth / u_spriteSize.y);\n mediump vec2 texCoord = mix(u_pattern_tl, u_pattern_br, vec2(relativeTexX, relativeTexY));\n lowp vec4 color = texture2D(u_texture, texCoord);\n gl_FragColor = alpha * v_color[3] * color;\n#else\n lowp float dashPos = mod(v_accumulatedDistance, v_dasharray.x + v_dasharray.y);\n lowp float dashAlpha = clamp(min(dashPos, v_dasharray.x - dashPos) + 0.5, 0.0, 1.0);\n dashAlpha = max(sign(-v_dasharray.y), dashAlpha);\n alpha *= dashAlpha;\n gl_FragColor = alpha * v_color;\n#endif\n#ifdef ID\n if (gl_FragColor.a < 1.0 / 255.0) {\n discard;\n }\n gl_FragColor = v_id;\n#endif\n}","line.vert":"attribute vec2 a_pos;\nattribute vec4 a_offsetAndNormal;\nattribute vec2 a_accumulatedDistance;\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump vec2 u_lineTranslation;\nuniform mediump float u_blur;\nuniform mediump float u_antialiasing;\nuniform mediump float u_depth;\nvarying mediump vec2 v_normal;\nvarying highp float v_accumulatedDistance;\nconst float scale = 1.0 / 31.0;\n#ifdef DD\nattribute vec4 a_color;\nattribute mediump float a_width;\n#endif\nuniform lowp vec4 u_color;\nuniform mediump float u_width;\n#ifdef ID\nuniform mediump vec4 u_id;\nvarying mediump vec4 v_id;\n#endif\nvarying lowp vec4 v_color;\nvarying mediump float v_lineHalfWidth;\nvarying mediump float v_blur;\n#ifndef PATTERN\nuniform mediump vec2 u_dasharray;\nvarying mediump vec2 v_dasharray;\n#endif\nvoid main()\n{\n v_normal = a_offsetAndNormal.zw * scale;\n#ifdef DD\n v_lineHalfWidth = a_width * u_width;\n#else\n v_lineHalfWidth = u_width;\n#endif\n v_lineHalfWidth += u_antialiasing;\n v_lineHalfWidth *= 0.5;\n#ifndef PATTERN\n#ifdef DD\n v_dasharray = u_dasharray * a_width;\n#else\n v_dasharray = u_dasharray * u_width;\n#endif\n#endif\n mediump vec2 dist = v_lineHalfWidth * scale * a_offsetAndNormal.xy;\n mediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayViewMat3 * vec3(dist, 0.0) + u_displayMat3 * vec3(u_lineTranslation, 0.0);\n gl_Position = vec4(pos.xy, u_depth, 1.0);\n v_accumulatedDistance = a_accumulatedDistance.x;\n v_blur = u_blur + u_antialiasing;\n #ifdef DD\n v_color = a_color * u_color;\n #else\n v_color = u_color;\n #endif\n #ifdef ID\n v_id = u_id / 255.0;\n #endif\n}"},outline:{"outline.frag":"varying lowp vec4 v_color;\nvarying mediump vec2 v_normal;\n#ifdef ID\nvarying mediump vec4 v_id;\n#endif\nvoid main()\n{\n lowp float dist = abs(v_normal.y);\n lowp float alpha = smoothstep(1.0, 0.0, dist);\n gl_FragColor = alpha * v_color;\n#ifdef ID\n if (gl_FragColor.a < 1.0 / 255.0) {\n discard;\n }\n gl_FragColor = v_id;\n#endif\n}","outline.vert":"attribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_xnormal;\n#ifdef DD\nattribute vec4 a_color;\n#endif\nuniform lowp vec4 u_color;\nvarying lowp vec4 v_color;\n#ifdef ID\nuniform mediump vec4 u_id;\nvarying mediump vec4 v_id;\n#endif\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump vec2 u_fillTranslation;\nuniform mediump float u_depth;\nuniform mediump float u_outline_width;\nvarying lowp vec2 v_normal;\nconst float scale = 1.0 / 15.0;\nvoid main()\n{\n#ifdef DD\n v_color = a_color * u_color;\n#else\n v_color = u_color;\n#endif\n#ifdef ID\n v_id = u_id / 255.0;\n#endif\n v_normal = a_xnormal;\n mediump vec2 dist = u_outline_width * scale * a_offset;\n mediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayMat3 * vec3(dist + u_fillTranslation, 0.0);\n gl_Position = vec4(pos.xy, u_depth, 1.0);\n}"},text:{"text.frag":"uniform lowp sampler2D u_texture;\nuniform mediump float u_edgeDistance;\nvarying lowp vec2 v_tex;\nvarying lowp float v_transparency;\nvarying lowp vec4 v_color;\nvarying mediump float v_edgeWidth;\nvarying mediump float v_edgeDistance;\n#ifdef ID\nvarying mediump vec4 v_id;\n#endif\nvoid main()\n{\n lowp float dist = texture2D(u_texture, v_tex).a;\n mediump float alpha = smoothstep(v_edgeDistance - v_edgeWidth, v_edgeDistance + v_edgeWidth, dist) * v_transparency;\n gl_FragColor = alpha * v_color;\n#ifdef ID\n if (gl_FragColor.a < 1.0 / 255.0) {\n discard;\n }\n gl_FragColor = v_id;\n#endif\n}","text.vert":"attribute vec2 a_pos;\nattribute vec2 a_vertexOffset;\nattribute vec4 a_tex;\nattribute vec4 a_levelInfo;\nattribute vec4 a_visInfo;\nuniform lowp vec4 u_color;\n#ifdef DD\nattribute vec4 a_color;\n#endif\nvarying lowp vec4 v_color;\nuniform mediump float u_size;\n#ifdef DD\nattribute mediump float a_size;\n#endif\nvarying mediump float v_size;\n#ifdef ID\nuniform mediump vec4 u_id;\nvarying mediump vec4 v_id;\n#endif\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump vec2 u_textTranslation;\nuniform vec2 u_mosaicSize;\nuniform mediump float u_depth;\nuniform mediump float u_mapRotation;\nuniform mediump float u_level;\nuniform lowp float u_keepUpright;\nuniform mediump float u_fadeSpeed;\nuniform mediump float u_minfadeLevel;\nuniform mediump float u_maxfadeLevel;\nuniform mediump float u_fadeChange;\nuniform mediump float u_opacity;\nvarying lowp vec2 v_tex;\nvarying lowp float v_transparency;\nconst float offsetPrecision = 1.0 / 8.0;\nconst mediump float edgePos = 0.75;\nuniform mediump float u_edgeDistance;\nuniform mediump float u_edgeBlur;\nuniform mediump float u_antialiasingWidth;\nvarying mediump float v_edgeDistance;\nvarying mediump float v_edgeWidth;\nuniform lowp float u_halo;\nconst float sdfFontScale = 1.0 / 24.0;\nvoid main()\n{\n mediump float a_labelMinLevel = a_levelInfo[0];\n mediump float a_angle = a_levelInfo[1];\n mediump float a_minLevel = a_levelInfo[2];\n mediump float a_maxLevel = a_levelInfo[3];\n mediump float a_visMinAngle = a_visInfo[0];\n mediump float a_visMaxAngle = a_visInfo[1];\n mediump float delta_z = 0.0;\n mediump float angle = mod(a_angle + u_mapRotation, 256.0);\n if (a_visMinAngle < a_visMaxAngle)\n {\n delta_z += (1.0 - step(u_keepUpright, 0.0)) * (step(a_visMaxAngle, angle) + (1.0 - step(a_visMinAngle, angle)));\n }\n else\n {\n delta_z += (1.0 - step(u_keepUpright, 0.0)) * (step(a_visMaxAngle, angle) * (1.0 - step(a_visMinAngle, angle)));\n }\n delta_z += 1.0 - step(a_minLevel, u_level);\n delta_z += step(a_maxLevel, u_level);\n mediump float alpha = u_fadeSpeed != 0.0 ? clamp((u_fadeChange - a_labelMinLevel) / u_fadeSpeed, 0.0, 1.0) : 1.0;\n v_transparency = (u_fadeSpeed >= 0.0 ? alpha : 1.0 - alpha);\n if (u_maxfadeLevel < a_labelMinLevel)\n {\n v_transparency = 0.0;\n }\n if (u_minfadeLevel >= a_labelMinLevel)\n {\n v_transparency = 1.0;\n }\n delta_z += step(v_transparency, 0.0);\n v_tex = a_tex.xy / u_mosaicSize;\n#ifdef DD\n if (u_halo > 0.5)\n {\n v_color = u_color;\n }\n else\n {\n v_color = a_color * u_color;\n }\n#else\n v_color = u_color;\n#endif\n#ifdef DD\n v_size = a_size * u_size;\n#else\n v_size = u_size;\n#endif\n#ifdef ID\n v_id = u_id / 255.0;\n#endif\n v_edgeDistance = edgePos - u_edgeDistance / v_size;\n v_edgeWidth = (u_antialiasingWidth + u_edgeBlur) / v_size;\n mediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + sdfFontScale * u_displayViewMat3 * vec3(offsetPrecision * v_size * a_vertexOffset, 0.0) + u_displayMat3 * vec3(u_textTranslation, 0.0);\n gl_Position = vec4(pos.xy, u_depth + delta_z, 1.0);\n}"},util:{"encoding.glsl":"const vec4 rgba2float_factors = vec4(\n 255.0 / (256.0),\n 255.0 / (256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0 * 256.0)\n );\nfloat rgba2float(vec4 rgba) {\n return dot(rgba, rgba2float_factors);\n}"}}}).apply(null,r))||(e.exports=n)},"Hoc/":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("zp6E"),i("v7zm"),i("qMld")],void 0===(n=(function(e,t,i,r,n,o){var a=function(){function e(e){for(this._metrics=[],this._bitmaps=[];e.next();)if(1===e.tag()){for(var t=e.getMessage();t.next();)if(3===t.tag()){for(var i=t.getMessage(),r=void 0,n=void 0,o=void 0,a=void 0,s=void 0,l=void 0,u=void 0;i.next();)switch(i.tag()){case 1:r=i.getUInt32();break;case 2:n=i.getBytes();break;case 3:o=i.getUInt32();break;case 4:a=i.getUInt32();break;case 5:s=i.getSInt32();break;case 6:l=i.getSInt32();break;case 7:u=i.getUInt32();break;default:i.skip()}i.release(),r&&(this._metrics[r]={width:o,height:a,left:s,top:l,advance:u},this._bitmaps[r]=n)}else t.skip();t.release()}else e.skip()}return e.prototype.getMetrics=function(e){return this._metrics[e]},e.prototype.getBitmap=function(e){return this._bitmaps[e]},e}(),s=function(){function e(){this._ranges=[]}return e.prototype.getRange=function(e){return this._ranges[e]},e.prototype.addRange=function(e,t){this._ranges[e]=t},e}();return function(){function e(e){this._glyphInfo={},this._baseURL=e}return e.prototype.getRange=function(e,t,s){var l=this._getFontStack(e);if(l.getRange(t))return o.resolve();var u=256*t,c=u+255,f=this._baseURL.replace("{fontstack}",e).replace("{range}",u+"-"+c);return r(f,i.__assign({responseType:"array-buffer"},s)).then((function(e){l.addRange(t,new a(new n(new Uint8Array(e.data),new DataView(e.data))))}))},e.prototype.getGlyph=function(e,t){var i=this._getFontStack(e);if(i){var r=Math.floor(t/256);if(!(r>256)){var n=i.getRange(r);if(n)return{metrics:n.getMetrics(t),bitmap:n.getBitmap(t)}}}},e.prototype._getFontStack=function(e){var t=this._glyphInfo[e];return t||(t=this._glyphInfo[e]=new s),t},e}()}).apply(null,r))||(e.exports=n)},HtXH:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("R2Zq"),i("LxLY"),i("tI6k"),i("3ikD")],n=(function(e,t,i,r,n,o,a){Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name=t.constructor.name,t.defines=["id"],t._lastSize=0,t}return i.__extends(t,e),t.prototype.dispose=function(){n.isSome(this._fbo)&&this._fbo.dispose()},t.prototype.bind=function(e){var t=e.context,i=e.painter,r=t.getViewport(),n=i.getFbos(r.width,r.height).effect0;t.bindFramebuffer(n),t.setClearColor(0,0,0,0),t.clear(t.gl.COLOR_BUFFER_BIT)},t.prototype.unbind=function(){},t.prototype.draw=function(e,t,i){var n=this,a=e.state,s=e.pixelRatio;void 0===i&&(i=o.HITTEST_SEARCH_SIZE);var l=e.context.getBoundFramebufferObject(),u=a.size[1]*s,c=Math.round(i*s),f=c/2,d=c/2;this._ensureBuffer(c),t.forEach((function(e,i){var o=new Map,a=Math.floor(i[0]*s-c/2),h=Math.floor(u-i[1]*s-c/2);l.readPixels(a,h,c,c,6408,5121,n._buf);for(var p=0;p<n._buf32.length;p++){var _=n._buf32[p];if(4294967295!==_&&0!==_){var m=p%c,v=c-Math.floor(p/c),g=(f-m)*(f-m)+(d-v)*(d-v),y=o.has(_)?o.get(_):4294967295;o.set(_,Math.min(g,y))}}var b=r.pairsOfMap(o).sort((function(e,t){return e[1]-t[1]})).map((function(e){return e[0]}));e.resolve(b),t.delete(i)}))},t.prototype._ensureBuffer=function(e){this._lastSize!==e&&(this._lastSize=e,this._buf=new Uint8Array(4*e*e),this._buf32=new Uint32Array(this._buf.buffer))},t}(a.Effect);t.HittestEffect=s}).apply(null,r),void 0===n||(e.exports=n)},I6Kl:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("LxLY"),i("tI6k"),i("Nwkb"),i("3ikD")],n=(function(e,t,i,r,n,o,a){Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.defines=[],t._desc={path:"fx/integrate",attributes:{a_position:0}},t}return i.__extends(t,e),t.prototype.dispose=function(){this._quad&&this._quad.dispose()},t.prototype.bind=function(){},t.prototype.unbind=function(){},t.prototype.draw=function(e,t){if(t.size){var i=e.context,a=e.renderingOptions;this._quad||(this._quad=new o(i,[0,0,1,0,0,1,1,1]));var s=i.getBoundFramebufferObject(),l=i.getViewport(),u=l.x,c=l.y,f=l.width,d=l.height;t.bindTextures(i);var h=t.getBlock(n.ATTRIBUTE_DATA_ANIMATION);if(!r.isNone(h)){var p=h.getFBO(i),_=h.getFBO(i,1);i.setViewport(0,0,t.size,t.size),this._computeDelta(e,_,a.labelsAnimationTime),this._updateAnimationState(e,_,p),i.bindFramebuffer(s),i.setViewport(u,c,f,d)}}},t.prototype._computeDelta=function(e,t,i){var r=e.context,o=e.displayLevel,a=e.painter.materialManager.getProgram(e,this._desc,["delta"]);r.bindFramebuffer(t),r.setClearColor(0,0,0,0),r.clear(r.gl.COLOR_BUFFER_BIT),r.bindProgram(a),a.setUniform1i("u_maskTexture",n.TEXTURE_BINDING_ATTRIBUTE_DATA_0),a.setUniform1i("u_sourceTexture",n.TEXTURE_BINDING_ATTRIBUTE_DATA_1),a.setUniform1f("u_timeDelta",e.timeDelta),a.setUniform1f("u_animationTime",i/1e3),a.setUniform1f("u_zoomLevel",Math.round(10*o)),this._quad.draw()},t.prototype._updateAnimationState=function(e,t,i){var r=e.context,n=e.painter.materialManager.getProgram(e,this._desc,["update"]);r.bindTexture(t.colorTexture,1),r.bindProgram(n),n.setUniform1i("u_sourceTexture",1),r.bindFramebuffer(i),r.setClearColor(0,0,0,0),r.clear(r.gl.COLOR_BUFFER_BIT),this._quad.draw()},t}(a.Effect);t.AnimationEffect=s}).apply(null,r),void 0===n||(e.exports=n)},IWfl:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("ma1f"),i("qsST"),i("LxLY"),i("jBNx"),i("3KXq"),i("YaB4"),i("tI6k"),i("JNkf"),i("Dos2"),i("hNI9"),i("m87x"),i("8Lwu")],n=(function(e,t,i,r,n,o,a,s,l,u,c,f,d,h,p){Object.defineProperty(t,"__esModule",{value:!0});var _=n.getLogger("esri.views.2d.engine.webgl.WGLTextTemplate");t.default=function(e){return function(e){function t(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var r=e.apply(this,t)||this;return r._isCIM=!1,r.geometryType=c.WGLGeometryType.TEXT,r._aux=f.i8888to32(0,0,r._referenceSize,r._bitset),r}return i.__extends(t,e),t.prototype.bindTextInfo=function(e,t){var i=this;this._shapingInfo=e&&e.length?o.andThen(e,(function(e){return l.shapeGlyphs(e,t,{scale:i._scale,angle:i._angle,xOffset:i._xOffset,yOffset:i._yOffset,hAlign:i._xAlignD,vAlign:i._yAlignD,maxLineWidth:Math.max(32,Math.min(i._lineWidth,512)),lineHeight:u.MAGIC_LABEL_LINE_HEIGHT*Math.max(.25,Math.min(i._lineHeight,4)),decoration:i._decoration,isCIM:i._isCIM})})):null},t.prototype.writeMeshWithGeometry=function(e,t,i,n,a,s){var l,u=this;if(o.isSome(this._textPlacement))this._writePlacedText(e,t,n,a,s);else if(p.isPoint(s))this._writeGlyphs(e,t,n,s);else if(p.isPolygon(s))o.andThen(a.centroid,(function(i){return u._writeGlyphs(e,t,n,i)}));else if(p.isMultipoint(s))for(var c=0,f=0,d=0,h=s.points;d<h.length;d++){var m=h[d];this._writeGlyphs(e,t,n,{x:c+=m[0],y:f+=m[1]})}else void 0===l&&(l="mapview-processing"),_.error(new r(l,"Unable to handle geometryType: "+i))},t.prototype._writePlacedText=function(e,t,i,r,n){var l=this._shapingInfo;if(!o.isNone(l)){var u=h.MaterialKeyBase.load(this._materialKey),c=s.CIMMarkerPlacementHelper.getPlacement(n,o.unwrap(this._textPlacement),a.pt2px(1));if(c)for(var p,_,m=c.next();null!=m;){_=f.i1616to32(Math.round(8*m.tx),Math.round(8*m.ty)),p=m.getAngle(),l.setRotation(p);for(var v=0,g=l.glyphs;v<g.length;v++){var y=g[v],b=new d(i,this.geometryType,u.data,0,0);u.textureBinding=y.textureBinding,b.materialKey=u.data,b.indexFrom=t.indexVector.length,b.indexCount=this._writeIndices(t),b.vertexFrom=t.getVector("geometry").vertexCount,b.vertexCount=this._writeVertex(t,i,_,y),e.push(b)}l.setRotation(-p),m=c.next()}}},t.prototype._writeGlyphs=function(e,t,i,r){var n=this._shapingInfo;if(!o.isNone(n))for(var a=h.MaterialKeyBase.load(this._materialKey),s=f.i1616to32(Math.round(8*r.x),Math.round(8*r.y)),l=0,u=n.glyphs;l<u.length;l++){var c=u[l],p=new d(i,this.geometryType,a.data,0,0);a.textureBinding=c.textureBinding,p.materialKey=a.data,p.indexFrom=t.indexVector.length,p.indexCount=this._writeIndices(t),p.vertexFrom=t.getVector("geometry").vertexCount,p.vertexCount=this._writeVertex(t,i,s,c),e.push(p)}},t.prototype._writeVertexCommon=function(e,t,i,r){var n=this._color,o=this._haloColor,a=f.i8888to32(0,0,this._referenceSize,this._bitset),s=f.i8888to32(0,0,this._size,this._haloSize);e.push(i),e.push(t),e.push(n),e.push(o),e.push(s),e.push(a)},t.prototype._writeVertex=function(e,t,i,r){var n=e.get("geometry");return this._writeVertexCommon(n,t,i,r),n.push(r.offsets.upperLeft),n.push(r.texcoords.upperLeft),this._writeVertexCommon(n,t,i,r),n.push(r.offsets.upperRight),n.push(r.texcoords.upperRight),this._writeVertexCommon(n,t,i,r),n.push(r.offsets.lowerLeft),n.push(r.texcoords.lowerLeft),this._writeVertexCommon(n,t,i,r),n.push(r.offsets.lowerRight),n.push(r.texcoords.lowerRight),4},t.prototype._writeIndices=function(e){var t=e.getVector("geometry").vertexCount,i=e.indexVector;return i.push(t+0),i.push(t+1),i.push(t+2),i.push(t+1),i.push(t+3),i.push(t+2),6},t}(e)}}).apply(null,r),void 0===n||(e.exports=n)},JNkf:function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.FILL=0]="FILL",e[e.LINE=1]="LINE",e[e.MARKER=2]="MARKER",e[e.TEXT=3]="TEXT",e[e.LABEL=4]="LABEL"}(t.WGLGeometryType||(t.WGLGeometryType={})),function(e){e[e.SUCCEEDED=0]="SUCCEEDED",e[e.FAILED_OUT_OF_MEMORY=1]="FAILED_OUT_OF_MEMORY"}(t.WGLGeometryTransactionStatus||(t.WGLGeometryTransactionStatus={})),function(e){e[e.NONE=0]="NONE",e[e.MAP=1]="MAP",e[e.LABEL=2]="LABEL",e[e.LABEL_ALPHA=4]="LABEL_ALPHA",e[e.HITTEST=8]="HITTEST",e[e.HIGHLIGHT=16]="HIGHLIGHT",e[e.CLIP=32]="CLIP",e[e.DEBUG=64]="DEBUG",e[e.NUM_DRAW_PHASES=9]="NUM_DRAW_PHASES"}(t.WGLDrawPhase||(t.WGLDrawPhase={})),function(e){e[e.SIZE=0]="SIZE",e[e.COLOR=1]="COLOR",e[e.OPACITY=2]="OPACITY",e[e.ROTATION=3]="ROTATION"}(t.VVType||(t.VVType={})),function(e){e[e.NONE=0]="NONE",e[e.OPACITY=1]="OPACITY",e[e.COLOR=2]="COLOR",e[e.ROTATION=4]="ROTATION",e[e.SIZE_MINMAX_VALUE=8]="SIZE_MINMAX_VALUE",e[e.SIZE_SCALE_STOPS=16]="SIZE_SCALE_STOPS",e[e.SIZE_FIELD_STOPS=32]="SIZE_FIELD_STOPS",e[e.SIZE_UNIT_VALUE=64]="SIZE_UNIT_VALUE"}(t.WGLVVFlag||(t.WGLVVFlag={})),function(e){e[e.MINMAX_TARGETS_OUTLINE=128]="MINMAX_TARGETS_OUTLINE",e[e.SCALE_TARGETS_OUTLINE=256]="SCALE_TARGETS_OUTLINE",e[e.FIELD_TARGETS_OUTLINE=512]="FIELD_TARGETS_OUTLINE",e[e.UNIT_TARGETS_OUTLINE=1024]="UNIT_TARGETS_OUTLINE"}(t.WGLVVTarget||(t.WGLVVTarget={})),function(e){e[e.SPRITE=0]="SPRITE",e[e.GLYPH=1]="GLYPH"}(t.MosaicType||(t.MosaicType={}))}).apply(null,r))||(e.exports=n)},KAqe:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("qMld")],void 0===(n=(function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this._resolver=null}return e.prototype.isHeld=function(){return!!this._resolver},e.prototype.acquire=function(){var e=this;return this._resolver?this._resolver.promise.then((function(){return e.acquire()})):(this._resolver=i.createResolver(),i.resolve())},e.prototype.release=function(){var e=this._resolver;this._resolver=null,e.resolve()},e}();t.default=r,t.withLock=function(e,t,i){return e.acquire().then((function(){return t(i)})).then((function(){return e.release()})).catch((function(t){throw e.release(),t}))}}).apply(null,r))||(e.exports=n)},LCdb:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("ma1f"),i("H1tY"),i("qsST"),i("LxLY"),i("qMld"),i("Lzvl"),i("CF4u"),i("tI6k"),i("JNkf"),i("azm3"),i("cF6f"),i("FDNA"),i("AKDC"),i("65my"),i("cjzh"),i("MGRT")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c,f,d,h,p,_,m,v,g){Object.defineProperty(t,"__esModule",{value:!0});var y=o.getLogger("esri.views.2d.engine.webgl.WGLMeshFactory"),b={esriGeometryPoint:["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along"],esriGeometryMultipoint:null,esriGeometryEnvelope:null},x=function(){function e(e,t,i,r){this._isDD=!1,this._labelsDebugTemplate=null,this._isDD=a.isSome(i)&&"dot-density"===i.type,this._geometryType=e,this._idField=t,this._templateStore=r}return e.prototype.update=function(e,t,i){this._isDD=a.isSome(t)&&"dot-density"===t.type,this._setLabelTemplates(e,t,i)},e.prototype._setLabelTemplates=function(e,t,i){e&&this._validateLabelingInfo(e)&&(this._labelTemplates=e.map((function(e){return _.default.fromLabelClass(t,e.labelClass,i)})))},Object.defineProperty(e.prototype,"templates",{get:function(){return this._templateStore},enumerable:!0,configurable:!0}),e.prototype.createMeshData=function(e){var t=new Array(5),i=new Array,r=this._labelTemplates&&this._labelTemplates.length>0,n="esriGeometryPolyline"===this._geometryType?c.HEURISTIC_GLYPHS_PER_LINE:c.HEURISTIC_GLYPHS_PER_FEATURE;return t[f.WGLGeometryType.MARKER]=new p.VertexVectors(f.WGLGeometryType.MARKER,e),t[f.WGLGeometryType.FILL]=new p.VertexVectors(f.WGLGeometryType.FILL,e,this._isDD),t[f.WGLGeometryType.LINE]=new p.VertexVectors(f.WGLGeometryType.LINE,e),t[f.WGLGeometryType.TEXT]=new p.VertexVectors(f.WGLGeometryType.TEXT,e),t[f.WGLGeometryType.LABEL]=new p.VertexVectors(f.WGLGeometryType.LABEL,r?n:0),new h.MeshData(i,t)},e.prototype.analyze=function(e,t,r,n,o){return i.__awaiter(this,void 0,void 0,(function(){var l,u,c,f,d,h,p,_,m;return i.__generator(this,(function(i){switch(i.label){case 0:return l=e,s.isAborted(o)?[2,[]]:a.isSome(t)?[4,t.analyze(this._idField,e,r,n,o)]:[3,2];case 1:i.sent(),i.label=2;case 2:for(u=0,c=l;u<c.length;u++){if(null!=(d=(f=c[u]).groupId)&&-1!==d||(d=t.match(this._idField,f,this._geometryType,r,n)),g.isDynamicId(d))for(h=this._templateStore.getDynamicTemplateGroup(d),p=0,_=h;p<_.length;p++)(m=_[p])&&m.analyze&&m.analyze(this._templateStore,f,r,n);f.groupId=d}return[2,this._templateStore.finalize(o).then((function(){return l}))]}}))}))},e.prototype.write=function(e,t,i,r,o,s){var u=this._templateStore.getTemplateGroup(t.groupId),c=e,f=t.localId;if(null!=f){var h=new d(f);if(g.isDynamicId(t.groupId))for(var p=0,_=u;p<_.length;p++)(w=_[p])&&w.bindFeature(t,i,r);if(u&&(t.geometry||t.centroid)){var m=h.displayRecords,v=t.insertAfter;void 0!==v&&(h.insertAfter=v);var y=this._geometryType;y||(y=null!=t.centroid?"esriGeometryPolygon":l.getJsonType(t.geometry));for(var b=0,x=u;b<x.length;b++){var w;if(w=x[b]){var T=c.get(w.geometryType);w.writeMesh(m,T,y,f,t)}}var S=h.displayRecords.length;if(a.isSome(s)&&S){var C=s&&this._findLabelRef(u);this._writeLabels(h,c,f,t,s,C,o)}c.pushDisplayObject(h)}}else n("esri-2d-debug")&&console.debug("Got null id for feature")},e.prototype._hasBadLabelClass=function(e,t){var i=e.labelPlacement,n=b[t];if(!e.symbol)return y.warn("No LabelClass symbol specified."),!0;if(!n)return y.error(new r("mapview-labeling:unsupported-geometry-type","Unable to create labels for Feature Layer, "+t+" is not supported")),!0;if(!n.some((function(e){return e===i}))){var o=n[0];i&&y.warn("Found invalid label placement type "+i+" for "+t+". Defaulting to "+o),e.labelPlacement=o}return!1},e.prototype._validateLabelingInfo=function(e){var t=this;return!e.some((function(e){return t._hasBadLabelClass(e.labelClass,t._geometryType)}))},e.prototype._findLabelRef=function(e){for(var t=0,i=e;t<i.length;t++){var r=i[t];if(r instanceof v.default)return r}return null},e.prototype._writeLabels=function(e,t,i,r,n,o,s){for(var l=e.displayRecords,u=[],f=0,d=n;f<d.length;f++){var h=d[f];if(a.isSome(h)){var p=h.glyphs,_=h.rtl,m=this._labelTemplates[h.classIndex],v=t.get(m.geometryType);m.bindReferenceTemplate(o),m.bindTextInfo(p,_),m.writeMesh(l,v,this._geometryType,i,r,s,u)}}e.metrics=u,c.DEBUG_LABELS&&this._debugLabels(e,t)},e.prototype._debugLabels=function(e,t){for(var i=e.displayRecords,r=e.id,n=0,o=e.metrics;n<o.length;n++)for(var a=o[n],s=0,l=a.boxes?a.boxes.concat([a.bounds]):[a.bounds];s<l.length;s++){var u=l[s],c={geometry:{paths:[[[a.anchor[0]+a.offsetX+u.center[0]-u.width/2,a.anchor[1]+a.offsetY+u.center[1]+u.height/2],[0,-u.height],[u.width,0],[0,u.height],[-u.width,0]]]},attributes:{}},f=this._getLabelDebugTemplate(),d=t.get(f.geometryType);f.writeMesh(i,d,"esriGeometryPolyline",r,c)}},e.prototype._getLabelDebugTemplate=function(){return this._labelsDebugTemplate||(this._labelsDebugTemplate=this._createLabelsDebugTemplate()),this._labelsDebugTemplate},e.prototype._createLabelsDebugTemplate=function(){var e=new u({style:"solid",width:1,color:[255,0,0,1]});return m.default.fromSimpleLine(null,!1,e,null,!1)},e}();t.WGLMeshFactory=x}).apply(null,r))||(e.exports=n)},"LN/d":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("ma1f"),i("a97G"),i("H1tY"),i("qMld"),i("afW+"),i("ULaq"),i("8MXS"),i("KJwU"),i("aMdW"),i("N5UP"),i("W9tT"),i("DIqE"),i("DJpR"),i("1Mg+"),i("tI6k"),i("JNkf"),i("OO/B"),i("PKCt"),i("W14q"),i("5MKl"),i("HkoZ"),i("dlMz")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c,f,d,h,p,_,m,v,g,y,b,x,w,T,S){Object.defineProperty(t,"__esModule",{value:!0});var C=function(e){function t(t,i){var a=e.call(this)||this;a._renderParameters={drawPhase:0,state:a.state,pixelRatio:window.devicePixelRatio,stationary:!1,globalOpacity:1,blendMode:null},a._trash=new Set,a._clipData=new Float32Array(8),a._upperLeft=p.vec2f64.create(),a._upperRight=p.vec2f64.create(),a._lowerLeft=p.vec2f64.create(),a._lowerRight=p.vec2f64.create(),a._mat2=d.mat2df64.create(),a._clipRendererInitialized=!1,a._supersampleScreenshots=!0,a.dataUploadCounter=0,a.renderRequested=!1,a.stage=a,a._stationary=!0;var l=i.canvas,u=void 0===l?document.createElement("canvas"):l,c=i.alpha,f=void 0===c||c,h=i.stencil,m=void 0===h||h,v=i.renderContext,g=void 0===v?"webgl":v,w=i.supersampleScreenshots,S=void 0===w||w,C=i.contextOptions,L=void 0===C?{}:C;a._canvas=u;var O=_.createContextOrErrorHTML(u,{alpha:f,antialias:!1,depth:!0,stencil:m},g);return a.context=new _.RenderingContext(O,L),a.painter=new y.default(a.context,a),a._taskHandle=s.addFrameTask({render:function(){return a.renderFrame()}}),a._taskHandle.pause(),a._supersampleScreenshots=S,a._lostWebGLContextHandle=n.on(u,"webglcontextlost",(function(){a.emit("webgl-error",{error:new r("webgl-context-lost")})})),o("esri-2d-profiler")&&(a._debugOutput=document.createElement("div"),a._debugOutput.setAttribute("style","margin: 24px 64px; position: absolute; color: red;"),t.appendChild(a._debugOutput)),u.setAttribute("style","width: 100%; height:100%; display:block;"),a.profiler=new b.Profiler(a.context,a._debugOutput),a.renderingOptions=i.renderingOptions,a.timeline=i.timeline||new T.Timeline,a.driverTestResult=x.testWebGLDriver(a.context),t.appendChild(u),a}return i.__extends(t,e),t.prototype.destroy=function(){this.removeAllChildren(),this.renderFrame(),this._taskHandle.remove(),this._taskHandle=null,this._boundFBO=null,this._clipFBO&&(this._clipFBO.dispose(),this._clipFBO=null),this._clipVAO&&(this._clipVAO.dispose(),this._clipVAO=null,this._clipVBO=null),this._clipStencilProgram&&(this._clipStencilProgram.dispose(),this._clipStencilProgram=null),this._lostWebGLContextHandle&&(this._lostWebGLContextHandle.remove(),this._lostWebGLContextHandle=null),this._canvas.parentNode&&this._canvas.parentNode.removeChild(this._canvas),this._debugOutput&&this._debugOutput.parentNode&&this._debugOutput.parentNode.removeChild(this._debugOutput),this.painter.dispose(),this.context.dispose(),this._canvas=null},Object.defineProperty(t.prototype,"background",{get:function(){return this._background},set:function(e){this._background=e,this.requestRender()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"highlightOptions",{get:function(){return this._highlightOptions},set:function(e){var t=this;this._highlightOptionsHandle&&(this._highlightOptionsHandle.remove(),this._highlightOptionsHandle=null),this._highlightOptions=e,this._highlightOptions&&(this._highlightOptionsHandle=u.init(this._highlightOptions,"version",(function(){t.painter.setHighlightOptions(e),t.requestRender()})))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderingOptions",{get:function(){return this._renderingOptions},set:function(e){this._renderingOptions=e,this.requestRender()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(e){this._state=e,this.requestRender()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stationary",{get:function(){return this._stationary},set:function(e){this._stationary!==e&&(this._stationary=e,this.requestRender())},enumerable:!0,configurable:!0}),t.prototype.trashDisplayObject=function(e){this._trash.add(e),this.requestRender()},t.prototype.untrashDisplayObject=function(e){return this._trash.delete(e)},t.prototype.requestRender=function(){this._lastRenderRequestTime=Date.now(),this.renderRequested||(this.renderRequested=!0,this.emit("will-render"),this._taskHandle&&this._taskHandle.resume())},t.prototype.renderFrame=function(){for(Date.now()-this._lastRenderRequestTime>=v.MAX_ANIMATION_TIME_MS&&this._taskHandle.pause(),this.renderRequested=!1,this._renderParameters.state=this._state,this._renderParameters.stationary=this.stationary,this._renderParameters.pixelRatio=window.devicePixelRatio,this._renderParameters.globalOpacity=1,this.processRender(this._renderParameters);this._trash.size>0;){var e=l.valuesOfSet(this._trash);this._trash.clear();for(var t=0,i=e;t<i.length;t++)i[t].processDetach()}this.emit("post-render")},t.prototype.renderChildren=function(e){var t=this.context,i=e.children?e.children:this.children;this.profiler.recordStart("drawLayers"),this.dataUploadCounter=0,this.beforeRenderChildren(e),e.drawPhase=g.WGLDrawPhase.MAP,this.painter.beforeRenderLayers(t,this.background);for(var r=0,n=i;r<n.length;r++)n[r].processRender(e);this.painter.renderLayers(t),e.drawPhase=g.WGLDrawPhase.LABEL,this.painter.beforeRenderLayers(t);for(var a=0,s=i;a<s.length;a++)s[a].processRender(e);if(this.painter.renderLayers(t),o("esri-tiles-debug")){e.drawPhase=g.WGLDrawPhase.DEBUG,this.painter.beforeRenderLayers(t);for(var l=0,u=i;l<u.length;l++)u[l].processRender(e);this.painter.renderLayers(t)}this.profiler.recordEnd("drawLayers"),this.afterRenderChildren()},t.prototype.beforeRenderChildren=function(e){var t=this.context,i=e.state,r=e.pixelRatio;if(this.painter){t.enforceState();var n=i.size,o=i.rotation,a=Math.round(n[0]*r),s=Math.round(n[1]*r);if(this._boundFBO=t.getBoundFramebufferObject(),i.spatialReference&&(i.spatialReference._isWrappable?i.spatialReference._isWrappable():i.spatialReference.isWrappable)){var l=c.common.toRadian(o),u=Math.abs(Math.cos(l)),d=Math.abs(Math.sin(l)),p=Math.round(a*u+s*d),m=Math.round(i.worldScreenWidth);if(p<=m)this._clipFrame=!1;else{this._clipFBO&&this._clipFBO.width===a&&this._clipFBO.height===s||(this._clipFBO=new _.FramebufferObject(t,{colorTarget:0,depthStencilTarget:3,width:a,height:s}));var v=(this.state.padding.left-this.state.padding.right)/2,g=(this.state.padding.bottom-this.state.padding.top)/2,y=.5*a,b=.5*s,x=1/a,w=1/s,T=m*r*.5,S=.5*(a*d+s*u),C=this._upperLeft,L=this._upperRight,O=this._lowerLeft,M=this._lowerRight;h.vec2.set(C,-T,-S),h.vec2.set(L,T,-S),h.vec2.set(O,-T,S),h.vec2.set(M,T,S),f.mat2d.identity(this._mat2),f.mat2d.translate(this._mat2,this._mat2,[y+v,b+g]),0!==o&&f.mat2d.rotate(this._mat2,this._mat2,l),h.vec2.transformMat2d(C,C,this._mat2),h.vec2.transformMat2d(L,L,this._mat2),h.vec2.transformMat2d(O,O,this._mat2),h.vec2.transformMat2d(M,M,this._mat2);var D=this._clipData;D.set([2*O[0]*x-1,2*(s-O[1])*w-1,2*M[0]*x-1,2*(s-M[1])*w-1,2*C[0]*x-1,2*(s-C[1])*w-1,2*L[0]*x-1,2*(s-L[1])*w-1]),this._clipRendererInitialized||this._initializeClipRenderer(t),this._clipVBO.setData(D),this._boundFBO=t.getBoundFramebufferObject(),t.bindFramebuffer(this._clipFBO),t.setDepthWriteEnabled(!0),t.setStencilWriteMask(255),t.setClearColor(0,0,0,0),t.setClearDepth(1),t.setClearStencil(0),t.clear(t.gl.COLOR_BUFFER_BIT|t.gl.DEPTH_BUFFER_BIT|t.gl.STENCIL_BUFFER_BIT),t.setDepthWriteEnabled(!1),this._clipFrame=!0}}else this._clipFrame=!1}},t.prototype.afterRenderChildren=function(){var e=this.context;if(e.logIno(),this._clipFrame&&this._clipRendererInitialized){if(e.bindFramebuffer(this._boundFBO),this._boundFBO=null,e.bindVAO(this._clipVAO),e.bindProgram(this._clipStencilProgram),e.setDepthWriteEnabled(!1),e.setDepthTestEnabled(!1),e.setStencilTestEnabled(!0),e.setBlendingEnabled(!1),e.setColorMask(!1,!1,!1,!1),e.setStencilOp(7680,7680,7681),e.setStencilWriteMask(255),e.setStencilFunction(519,1,255),e.drawElements(4,6,5123,0),e.bindVAO(),e.setColorMask(!0,!0,!0,!0),null!=this.background){var t=this.background.color,i=t.a;e.setClearColor(i*t.r/255,i*t.g/255,i*t.b/255,i)}else e.setClearColor(0,0,0,0);e.clear(e.gl.COLOR_BUFFER_BIT),e.setBlendingEnabled(!0),e.setStencilFunction(514,1,255),this.painter.blitTexture(e,this._clipFBO.colorTexture,9728,1),e.setStencilTestEnabled(!1)}},t.prototype.doRender=function(t){var i=this.context,r=t.state,n=t.pixelRatio;this._resizeCanvas(t),this.context.enforceState(),i.setViewport(0,0,n*r.size[0],n*r.size[1]),i.setDepthWriteEnabled(!0),i.setStencilWriteMask(255),e.prototype.doRender.call(this,t)},t.prototype.takeScreenshot=function(e,t){var i=S.screenshotSuperSampleSettings(e,this._supersampleScreenshots,this._state.padding),r=i.framebufferWidth,n=i.framebufferHeight,o=this.context,s=e.layers,l={drawPhase:null,globalOpacity:1,stationary:!0,state:this._renderParameters.state.clone(),pixelRatio:i.pixelRatio,blendMode:null};if(null!=e.rotation){var u=l.state.viewpoint;u.rotation=e.rotation,l.state.viewpoint=u}s.length>0&&(l.children=[],s.forEach((function(e){var i=t.find((function(t){return t.layer.id===e.id}));i&&"container"in i&&i.container&&l.children.push(i.container)})));var c=new _.FramebufferObject(o,{colorTarget:0,depthStencilTarget:3,width:r,height:n}),f=o.getBoundFramebufferObject(),d=o.getViewport();o.bindFramebuffer(c),o.setViewport(0,0,r,n),this.renderChildren(l);var h=this._readbackScreenshot(i);o.bindFramebuffer(f),o.setViewport(d.x,d.y,d.width,d.height),this.requestRender();var p=this._ensureScreenshotEncodeCanvas(),m=S.encodeResult(h,e,p,{flipY:!0,premultipliedAlpha:!0});return a.resolve(m)},t.prototype._ensureScreenshotEncodeCanvas=function(){return this._screenshotEncodeCanvas||(this._screenshotEncodeCanvas=document.createElement("canvas")),this._screenshotEncodeCanvas},t.prototype._readbackScreenshot=function(e){var t=e.framebufferWidth,i=e.framebufferHeight,r=e.region,n=e.resample,o=this.context.gl;if(n){var a=S.createEmptyImageData(t,i,this._ensureScreenshotEncodeCanvas());o.readPixels(0,0,t,i,6408,5121,new Uint8Array(a.data.buffer));var s=S.createEmptyImageData(r.width,r.height,this._ensureScreenshotEncodeCanvas());return S.resampleHermite(a,s,!0,n.region.x,i-(n.region.y+n.region.height),n.region.width,n.region.height)}return a=S.createEmptyImageData(r.width,r.height,this._ensureScreenshotEncodeCanvas()),o.readPixels(r.x,i-(r.y+r.height),r.width,r.height,6408,5121,new Uint8Array(a.data.buffer)),a},t.prototype._resizeCanvas=function(e){var t=this._canvas,i=t.style,r=e.state.size,n=e.pixelRatio,o=r[0],a=r[1],s=Math.round(o*n),l=Math.round(a*n);t.width===s&&t.height===l||(t.width=s,t.height=l),i.width=o+"px",i.height=a+"px"},t.prototype._initializeClipRenderer=function(e){if(this._clipRendererInitialized)return!0;var t=w.stencil.attributes,i=_.createProgram(e,w.stencil);if(!i)return!1;var r=_.BufferObject.createVertex(e,35040,32),n=new Uint16Array([0,1,2,2,1,3]),o=_.BufferObject.createIndex(e,35044,n),a=new _.VertexArrayObject(e,t,{geometry:[{name:"a_pos",count:2,type:5126,offset:0,stride:8,normalized:!1,divisor:0}]},{geometry:r},o);return this._clipStencilProgram=i,this._clipVBO=r,this._clipVAO=a,this._clipRendererInitialized=!0,!0},t}(m.Container);t.Stage=C}).apply(null,r))||(e.exports=n)},M8xM:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("lRq4"),i("YaB4"),i("3SpT"),i("JNkf"),i("wUCb")],n=(function(e,t,i,r,n,o,a,s){Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.createTile=function(e){var t=this._tileInfoView.getTileBounds(r.create(),e);return new o.RasterTile(e,t,this._tileInfoView.tileInfo.size)},t.prototype.destroyTile=function(){},t.prototype.prepareRenderPasses=function(t){var r=this,o=t.registerRenderPass({name:"bitmap (tile)",brushes:[n.brushes.Raster],target:function(){return r.children.map((function(e){return e.bitmap}))},drawPhase:a.WGLDrawPhase.MAP});return i.__spreadArrays(e.prototype.prepareRenderPasses.call(this,t),[o])},t.prototype.doRender=function(t){this.visible&&t.drawPhase===a.WGLDrawPhase.MAP&&e.prototype.doRender.call(this,t)},t}(s.default);t.RasterTileContainer=l}).apply(null,r),void 0===n||(e.exports=n)},MGRT:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("ma1f"),i("qsST"),i("qMld"),i("dXKx"),i("Fo2y"),i("bePc"),i("Hcrl"),i("8rHD"),i("BU48"),i("65my"),i("cjzh"),i("t1uL"),i("KAqe"),i("PlK1"),i("rAGl")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c,f,d,h,p,_,m,v){Object.defineProperty(t,"__esModule",{value:!0});var g=n.getLogger("esri.views.2d.engine.webgl.mesh.templates.WGLTemplateStore"),y=new Array;function b(e,t){var i=e.length;return e.push(null),t.then((function(t){return e[i]=t})),e}function x(e){return!!(1&e)}t.isDynamicId=x;var w=function(){function e(e,t){this._idCounter=1,this._templateIdCounter=1,this._idToTemplateGroup=new Map,this._symbolToTemplate=new Map,this._fetchQueue=[],this._idToResolver=new Map,this._cimTemplateCache=new Map,this._cimAnalyses=[],this._lock=new _.default,this._fetchResource=e,this._joinOnUTurn=t}return Object.defineProperty(e.prototype,"_markerError",{get:function(){return this._errorTemplates.marker[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_fillError",{get:function(){return this._errorTemplates.fill[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_lineError",{get:function(){return this._errorTemplates.line[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_textError",{get:function(){return this._errorTemplates.line[0]},enumerable:!0,configurable:!0}),e.prototype.createTemplateGroup=function(e,t,i){this._initErrorTemplates();var r=e.hash();if(this._symbolToTemplate.has(r))return this._symbolToTemplate.get(r);var n=new Array;t&&this._createMeshTemplates(n,t,i,!0),this._createMeshTemplates(n,e,i,!1);var o=this._createGroupId("expanded-cim"===e.type);return this._idToTemplateGroup.set(o,n),this._symbolToTemplate.set(r,o),o},e.prototype.getTemplateGroup=function(e){return this._idToTemplateGroup.has(e)?this._idToTemplateGroup.get(e):y},e.prototype.getDynamicTemplateGroup=function(e){return this._idToTemplateGroup.has(e)?(x(e)||g.error("mapview-template-store","Id "+e+" does not refer to a dynamic template"),this._idToTemplateGroup.get(e)):y},e.prototype.getMosaicItem=function(e,t,i){var r=this,n=this._createTemplateId(),a=o.create((function(e){return r._idToResolver.set(n,e)})),s=t?e.toJSON():e;return this._fetchQueue.push({symbol:s,id:n,glyphIds:i}),a},e.prototype.finalize=function(e){return this._fetchQueue.length||this._lock.isHeld()?_.withLock(this._lock,this._fetchAllQueuedResources.bind(this),e):o.resolve()},e.prototype._initErrorTemplates=function(){this._errorTemplates||(this._errorTemplates={fill:this._createMeshTemplates([],a.errorPolygonSymbol2D,null,!1),marker:this._createMeshTemplates([],a.errorPointSymbol2D,null,!1),line:this._createMeshTemplates([],a.errorPolylineSymbol2D,null,!1)})},e.prototype._fetchAllQueuedResources=function(e){var t=this;if(!this._fetchQueue.length)return o.resolve();var i=this._fetchQueue,n=this._cimAnalyses;return this._fetchQueue=[],this._cimAnalyses=[],o.all(n).then((function(){return t._fetchResource(i,e).then((function(e){for(var i=0,r=e;i<r.length;i++){var n=r[i],o=n.id,a=n.mosaicItem;t._idToResolver.get(o)(a),t._idToResolver.delete(o)}}))})).catch((function(e){o.isAbortError(e)?t._fetchQueue=t._fetchQueue.concat(i):g.error(new r("mapview-template-store","Unable to fetch requested texture resources",e))}))},e.prototype._createGroupId=function(e){return this._idCounter++<<1|(e?1:0)},e.prototype._createTemplateId=function(){return this._templateIdCounter++},e.prototype._createSMS=function(e,t){return i.__awaiter(this,void 0,void 0,(function(){var r;return i.__generator(this,(function(i){switch(i.label){case 0:return[4,this.getMosaicItem(e,!0)];case 1:return r=i.sent().spriteMosaicItem,m.ok(r,g)?[2,h.default.fromSimpleMarker(t,e,r)]:[2,this._markerError]}}))}))},e.prototype._createPMS=function(e,t){return i.__awaiter(this,void 0,void 0,(function(){var r;return i.__generator(this,(function(i){switch(i.label){case 0:return[4,this.getMosaicItem(e,!0)];case 1:return r=i.sent().spriteMosaicItem,m.ok(r,g)?[2,h.default.fromPictureMarker(t,e,r)]:[2,this._markerError]}}))}))},e.prototype._createSFS=function(e,t,r){return i.__awaiter(this,void 0,void 0,(function(){var n,o;return i.__generator(this,(function(i){switch(i.label){case 0:return[4,this.getMosaicItem(e,!0)];case 1:return n=i.sent().spriteMosaicItem,o=e,m.ok(n,g)?[2,f.default.fromSimpleFill(t,o,n,r)]:[2,this._fillError]}}))}))},e.prototype._createPFS=function(e,t,r){return i.__awaiter(this,void 0,void 0,(function(){var n,o;return i.__generator(this,(function(i){switch(i.label){case 0:return[4,this.getMosaicItem(e,!0)];case 1:return n=i.sent().spriteMosaicItem,o=e,m.ok(n,g)?[2,f.default.fromPictureFill(t,o,n,r)]:[2,this._fillError]}}))}))},e.prototype._createSLS=function(e,t,r){return i.__awaiter(this,void 0,void 0,(function(){var n,o;return i.__generator(this,(function(i){switch(i.label){case 0:return[4,this.getMosaicItem(e,!0)];case 1:return n=i.sent().spriteMosaicItem,o=e,m.ok(n,g)?[2,d.default.fromSimpleLine(t,r,o,n,this._joinOnUTurn)]:[2,this._lineError]}}))}))},e.prototype._createLMS=function(e,t){return i.__awaiter(this,void 0,void 0,(function(){var r,n;return i.__generator(this,(function(i){switch(i.label){case 0:return[4,this.getMosaicItem((r=e).marker,!0)];case 1:return n=i.sent().spriteMosaicItem,m.ok(n,g)?[2,h.default.fromLineSymbolMarker(t,r,n)]:[2,this._markerError]}}))}))},e.prototype._createTS=function(e,t){return i.__awaiter(this,void 0,void 0,(function(){var r;return i.__generator(this,(function(i){switch(i.label){case 0:return[4,this.getMosaicItem(e,!0)];case 1:return r=i.sent().glyphMosaicItems,[2,p.default.fromText(t,e,r)]}}))}))},e.prototype._createCIMText=function(e,t){return i.__awaiter(this,void 0,void 0,(function(){var r;return i.__generator(this,(function(i){switch(i.label){case 0:return[4,this.getMosaicItem(e.cim,!1,v.codepoints(e.text))];case 1:return r=i.sent().glyphMosaicItems,e.cim.mosaicHash=e.materialHash,m.ok(r,g)?[2,p.default.fromCIMText(t,e,r)]:[2,this._textError]}}))}))},e.prototype._createCIMFill=function(e,t){return i.__awaiter(this,void 0,void 0,(function(){var r;return i.__generator(this,(function(i){switch(i.label){case 0:return e.cim.mosaicHash=e.materialHash,[4,this.getMosaicItem(e.cim,!1)];case 1:return r=i.sent().spriteMosaicItem,m.ok(r,g)?[2,f.default.fromCIMFill(t,e,r,!1)]:[2,this._fillError]}}))}))},e.prototype._createCIMLine=function(e,t){return i.__awaiter(this,void 0,void 0,(function(){var r;return i.__generator(this,(function(i){switch(i.label){case 0:return e.cim.mosaicHash=e.materialHash,[4,this.getMosaicItem(e.cim,!1)];case 1:return r=i.sent().spriteMosaicItem,m.ok(r,g)?[2,d.default.fromCIMLine(t,e,r,!1,this._joinOnUTurn)]:[2,this._lineError]}}))}))},e.prototype._createCIMMarker=function(e,t){return i.__awaiter(this,void 0,void 0,(function(){var r;return i.__generator(this,(function(i){switch(i.label){case 0:return e.cim.mosaicHash=e.materialHash,[4,this.getMosaicItem(e.cim,!1)];case 1:return r=i.sent().spriteMosaicItem,m.ok(r,g)?[2,h.default.fromCIMMarker(t,e,r)]:[2,this._markerError]}}))}))},e.prototype._createCIM=function(e,t){return i.__awaiter(this,void 0,void 0,(function(){var r,n,o=this;return i.__generator(this,(function(i){if(this._cimTemplateCache.has(r=e.templateHash))return[2,this._cimTemplateCache.get(r)];switch(e.type){case"marker":n=this._createCIMMarker(e,t);break;case"line":n=this._createCIMLine(e,t);break;case"fill":n=this._createCIMFill(e,t);break;case"text":n=this._createCIMText(e,t)}return n.then((function(e){return o._cimTemplateCache.set(r,e)})),[2,n]}))}))},e.prototype._createDynamicCIM=function(e,t){var i,r=e.templateHash;if(this._cimTemplateCache.has(r))return this._cimTemplateCache.get(r);switch(e.type){case"marker":i=u.default.fromCIMMarker(t,e);break;case"line":i=l.default.fromCIMLine(t,e);break;case"fill":i=s.default.fromCIMFill(t,e);break;case"text":i=c.default.fromCIMText(t,e)}return this._cimTemplateCache.set(r,i),i},e.prototype._createMeshTemplates=function(e,t,i,n){if(-1!==t.type.indexOf("3d"))return g.error("3D symbols are not supported with MapView"),e;switch(t.type){case"cim":return g.error(new r("mapview-bad-type","Found a cim type not yet expanded")),e;case"expanded-cim":for(var o=0,a=t.layers;o<a.length;o++){var s=a[o];"function"==typeof s.materialHash?e.push(this._createDynamicCIM(s,i)):b(e,this._createCIM(s,i))}return e;case"simple-marker":return b(e,this._createSMS(t,i));case"picture-marker":return b(e,this._createPMS(t,i));case"simple-fill":var l=t;return b(e,this._createSFS(l,i,n)),l.outline&&b(e,this._createSLS(l.outline,i,!0)),e;case"picture-fill":var u=t;return b(e,this._createPFS(u,i,n)),u.outline&&b(e,this._createSLS(u.outline,i,!0)),e;case"simple-line":var c=t;return b(e,this._createSLS(c,i,!1)),c.marker&&b(e,this._createLMS(c,i)),e;case"text":return b(e,this._createTS(t,i));default:return g.error("Unable to create mesh template for unknown symbol type {: $ }{symbol.type}"),e}},e}();t.WGLTemplateStore=w}).apply(null,r))||(e.exports=n)},MUu6:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("ma1f"),i("qMld")],void 0===(n=(function(e,t,i,r,n){function o(e){if(!e||0===e.byteLength)return!1;var t=e.constructor===Uint8Array?e:new Uint8Array(e);return 71===t[0]&&73===t[1]&&70===t[2]&&56===t[3]}Object.defineProperty(t,"__esModule",{value:!0}),t.isGIF=o,t.getGIFSize=function(e){var t=new Uint8ClampedArray(e),i=6;return[t[i++]+(t[i++]<<8),t[i++]+(t[i++]<<8)]},t.isAnimatedGIF=function(e){if(!e||0===e.byteLength)return!1;var t=new Uint8Array(e);if(!o(t))return!1;for(var i=0,r=0,n=t.length-9;r<n&&(0!==t[r]||33!==t[r+1]||249!==t[r+2]||4!==t[r+3]||0!==t[r+8]||44!==t[r+9]&&33!==t[r+9]||!(++i>1));++r);return i>1};var a=function(){function e(){this.paused=!1,this.playing=!1,this.waitTillDone=!0,this.loading=!1,this.firstFrameOnly=!1,this.frames=[],this.comment="",this.length=0,this.currentFrameNumber=0,this.frameCount=0,this.playSpeed=1,this.lastFrame=null,this.playOnLoad=!0,this.complete=!1,this.interlaceOffsets=[0,4,2,1],this.interlaceSteps=[8,8,4,2],this._lastUsedFrame=-1}return e.create=function(t,o){return i.__awaiter(this,void 0,void 0,(function(){var a,s;return i.__generator(this,(function(i){switch(i.label){case 0:a=new e,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,a._load(t,o)];case 2:return i.sent(),[3,4];case 3:return s=i.sent(),n.isAbortError(s)?[3,4]:[2,new r("invalid-resource","Could not load PNG: "+s.message)];case 4:return[2,a]}}))}))},e.prototype.play=function(){this.playing||(this.paused=!1,this.playing=!0,this._play())},e.prototype.pause=function(){this.paused=!0,this.playing=!1,clearTimeout(this.timerID)},e.prototype.togglePlay=function(){this.paused||!this.playing?this.play():this.pause()},e.prototype.bindFrame=function(e,t,i){e.bindTexture(t,i);var r=this.frameChanged();if(r){var n=this.currentFrame;t.updateData(0,0,0,n.width,n.height,n.frameData),this.updateUsedFrame()}return r},e.prototype.seekFrame=function(e){clearTimeout(this.timerID),this.currentFrameNumber=e%this.frames.length,this.playing?this._play():this._setCurrentFrame(this.currentFrameNumber)},e.prototype.seek=function(e){clearTimeout(this.timerID),e<0&&(e=0),e*=1e3,e%=this.length;for(var t=0;e>this.frames[t].time+this.frames[t].delay&&t<this.frames.length;)t+=1;this.currentFrameNumber=t,this.playing?this._play():this._setCurrentFrame(this.currentFrameNumber)},e.prototype.frameChanged=function(){return this._lastUsedFrame!==this.currentFrameNumber},e.prototype.updateUsedFrame=function(){this._lastUsedFrame=this.currentFrameNumber},e.prototype._load=function(e,t){return i.__awaiter(this,void 0,void 0,(function(){var o;return i.__generator(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),this.loading=!0,[4,this._parse(e,t)];case 1:return i.sent(),this.loading=!1,this.play(),[3,3];case 2:return o=i.sent(),n.isAbortError(o)?[3,3]:[2,new r("invalid-resource","Could not parse gif!")];case 3:return[2]}}))}))},e.prototype._parse=function(e,t){var i=this,r=new s(e);r.pos+=6,this.width=r.data[r.pos++]+(r.data[r.pos++]<<8),this.height=r.data[r.pos++]+(r.data[r.pos++]<<8);var o=r.data[r.pos++];return this.globalColourCount=1<<1+(7&o),r.pos++,r.pos++,128&o&&(this.globalColourTable=this._parseColourTable(this.globalColourCount,r)),n.create((function(e,n){setTimeout((function(){return i._parseBlock(r,e,n,t)}),0)}))},e.prototype._parseBlock=function(e,t,r,o){return i.__awaiter(this,void 0,void 0,(function(){var a,s=this;return i.__generator(this,(function(i){if(o&&o.signal&&n.isAborted(o.signal))return r(n.createAbortError()),[2];if(44===(a=e.data[e.pos++])){if(this._parseImg(e),this.firstFrameOnly)return this._finishedLoading(),t(),[2]}else{if(59===a)return this._finishedLoading(),t(),[2];this._parseExt(e)}return"function"==typeof this.onprogress&&this.onprogress({bytesRead:e.pos,totalBytes:e.data.length,frame:this.frames.length}),setTimeout((function(){return s._parseBlock(e,t,r,o)}),0),[2]}))}))},e.prototype._parseColourTable=function(e,t){for(var i=[],r=0;r<e;r++)i.push([t.data[t.pos++],t.data[t.pos++],t.data[t.pos++]]);return i},e.prototype._parseImg=function(e){var t=this,i={};this.frames.push(i),i.disposalMethod=this.disposalMethod,i.time=this.length,i.delay=10*this.delayTime,this.length+=i.delay,i.transparencyIndex=this.transparencyGiven?this.transparencyIndex:void 0,i.leftPos=e.data[e.pos++]+(e.data[e.pos++]<<8),i.topPos=e.data[e.pos++]+(e.data[e.pos++]<<8),i.width=e.data[e.pos++]+(e.data[e.pos++]<<8),i.height=e.data[e.pos++]+(e.data[e.pos++]<<8);var r=e.data[e.pos++];i.localColourTableFlag=!!(128&r),i.localColourTableFlag&&(i.localColourTable=this._parseColourTable(1<<1+(7&r),e)),this.pixelBufSize!==i.width*i.height&&(this.pixelBuf=new Uint8Array(i.width*i.height),this.pixelBufSize=i.width*i.height),this._lzwDecode(e.data[e.pos++],e.readSubBlocksB()),64&r?(i.interlaced=!0,function(e){var i=t.pixelBufSize/e;t.interlacedBufSize!==t.pixelBufSize&&(t.deinterlaceBuf=new Uint8Array(t.pixelBufSize),t.interlacedBufSize=t.pixelBufSize);for(var r=0,n=0;n<4;n++)for(var o=t.interlaceOffsets[n];o<i;o+=t.interlaceSteps[n])t.deinterlaceBuf.set(t.pixelBuf.subarray(r,r+e),o*e),r+=e}(i.width)):i.interlaced=!1,this._processFrame(i)},e.prototype._lzwDecode=function(e,t){var i,r,n,o,a,s,l,u,c,f,d;n=r=0;var h=[];for(a=1+(o=1<<e),s=e+1,d=!1;!d;){for(u=l,l=0,i=0;i<s;i++)t[n>>3]&1<<(7&n)&&(l|=1<<i),n++;if(l===o){for(h=[],s=e+1,i=0;i<o;i++)h[i]=[i];h[o]=[],h[a]=null}else{if(l===a)return void(d=!0);for(l>=h.length?h.push(h[u].concat(h[u][0])):u!==o&&h.push(h[u].concat(h[l][0])),f=(c=h[l]).length,i=0;i<f;i++)this.pixelBuf[r++]=c[i];h.length===1<<s&&s<12&&s++}}},e.prototype._processFrame=function(e){e.image=document.createElement("canvas"),e.image.width=this.width,e.image.height=this.height,e.ctx=e.image.getContext("2d");var t=e.localColourTableFlag?e.localColourTable:this.globalColourTable;null===this.lastFrame&&(this.lastFrame=e);var i=2===this.lastFrame.disposalMethod||3===this.lastFrame.disposalMethod;i||e.ctx.drawImage(this.lastFrame.image,0,0,this.width,this.height);for(var r,n,o=e.ctx.getImageData(e.leftPos,e.topPos,e.width,e.height),a=e.transparencyIndex,s=o.data,l=e.interlaced?this.deinterlaceBuf:this.pixelBuf,u=l.length,c=0,f=0;f<u;f++)n=t[r=l[f]],a!==r?(s[c++]=n[0],s[c++]=n[1],s[c++]=n[2],s[c++]=255):i?(s[c+3]=0,c+=4):c+=4;e.ctx.putImageData(o,e.leftPos,e.topPos),this.lastFrame=e},e.prototype._parseExt=function(e){var t=e.data[e.pos++];249===t?this._parseGCExt(e):254===t?this.comment+=e.readSubBlocks():255===t?this._parseAppExt(e):(1===t&&(e.pos+=13),e.readSubBlocks())},e.prototype._parseAppExt=function(e){e.pos+=1,"NETSCAPE"===e.getString(8)?e.pos+=8:(e.pos+=3,e.readSubBlocks())},e.prototype._parseGCExt=function(e){var t;e.pos++,t=e.data[e.pos++],this.disposalMethod=(28&t)>>2,this.transparencyGiven=!!(1&t),this.delayTime=e.data[e.pos++]+(e.data[e.pos++]<<8),this.transparencyIndex=e.data[e.pos++],e.pos++},e.prototype._finishedLoading=function(){this.loading=!1,this.frameCount=this.frames.length,this.lastFrame=null,this.complete=!0,this.disposalMethod=void 0,this.transparencyGiven=void 0,this.delayTime=void 0,this.transparencyIndex=void 0,this.waitTillDone=void 0,this.pixelBuf=void 0,this.deinterlaceBuf=void 0,this.pixelBufSize=void 0,this.deinterlaceBuf=void 0,this.currentFrameNumber=0,this.frames.length>0&&this._setCurrentFrame(0),this.playOnLoad&&this.play()},e.prototype._play=function(){var e,t,i=this;0!==this.playSpeed?(this.playSpeed<0?(this.currentFrameNumber-=1,this.currentFrameNumber<0&&(this.currentFrameNumber=this.frames.length-1),t=this.currentFrameNumber,(t-=1)<0&&(t=this.frames.length-1),e=1*-this.frames[t].delay/this.playSpeed):(this.currentFrameNumber+=1,this.currentFrameNumber%=this.frames.length,e=1*this.frames[this.currentFrameNumber].delay/this.playSpeed),this._setCurrentFrame(this.currentFrameNumber),this.timerID=window.setTimeout((function(){return i._play()}),e)):this.pause()},e.prototype._setCurrentFrame=function(e){this.currentFrame={frameData:this.frames[e].image,top:0,left:0,width:this.width,height:this.height}},e}();t.default=a;var s=function(){function e(e){this.pos=0,this.data=new Uint8ClampedArray(e),this.len=this.data.length}return e.prototype.getString=function(e){for(var t="";e--;)t+=String.fromCharCode(this.data[this.pos++]);return t},e.prototype.readSubBlocks=function(){var e,t,i="";do{for(t=e=this.data[this.pos++];t--;)i+=String.fromCharCode(this.data[this.pos++])}while(0!==e&&this.pos<this.len);return i},e.prototype.readSubBlocksB=function(){var e,t,i=[];do{for(t=e=this.data[this.pos++];t--;)i.push(this.data[this.pos++])}while(0!==e&&this.pos<this.len);return i},e}()}).apply(null,r))||(e.exports=n)},MtZC:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("JNkf"),i("G59t")],void 0===(n=(function(e,t,i,r){function n(e,t){void 0===t&&(t=!1);var r=i.WGLVVFlag.SIZE_FIELD_STOPS|i.WGLVVFlag.SIZE_MINMAX_VALUE|i.WGLVVFlag.SIZE_SCALE_STOPS|i.WGLVVFlag.SIZE_UNIT_VALUE,n=(e&(i.WGLVVTarget.FIELD_TARGETS_OUTLINE|i.WGLVVTarget.MINMAX_TARGETS_OUTLINE|i.WGLVVTarget.SCALE_TARGETS_OUTLINE|i.WGLVVTarget.UNIT_TARGETS_OUTLINE))>>>4;return t?r&n:r&~n}function o(e){var t=n(e,!1);return e&(i.WGLVVFlag.COLOR|i.WGLVVFlag.OPACITY|i.WGLVVFlag.ROTATION|t)}Object.defineProperty(t,"__esModule",{value:!0}),t.getVVFlags=function(e){if(!e)return i.WGLVVFlag.NONE;for(var t=0,n=0,o=e;n<o.length;n++){var a=o[n];if("size"===a.type){var s=r.getTypeOfSizeVisualVariable(a);t|=s,"outline"===a.target&&(t|=s<<4)}else"color"===a.type?t|=i.WGLVVFlag.COLOR:"opacity"===a.type?t|=i.WGLVVFlag.OPACITY:"rotation"===a.type&&(t|=i.WGLVVFlag.ROTATION)}return t},t.getSizeFlagsMask=n,t.getMarkerVVFlags=o,t.getFillVVFlags=function(e){return e&(i.WGLVVFlag.COLOR|i.WGLVVFlag.OPACITY)},t.getLineVVFlags=function(e,t){if(t)return e&n(e,!0);var r=n(e,!1);return e&(i.WGLVVFlag.COLOR|i.WGLVVFlag.OPACITY|r)},t.getTextVVFlags=function(e){return o(e)},t.getLabelVVFlags=function(e){return e&n(e,!1)}}).apply(null,r))||(e.exports=n)},MzWl:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("LxLY"),i("Lzvl"),i("0zc9")],void 0===(n=(function(e,t,i,r,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.prototype.writeMesh=function(e,t,o,a,s){if(i.isSome(this.effects)){var l=n.CIMEffectHelper.executeEffects(this.effects,s.geometry),u=n.CIMEffectHelper.next(l);for(o=r.getJsonType(u);u;)this.writeMeshWithGeometry(e,t,o,a,s,u),u=n.CIMEffectHelper.next(l),o=r.getJsonType(u)}else this.writeMeshWithGeometry(e,t,o,a,s,s.geometry)},e.prototype.writeMeshWithGeometry=function(e,t,i,r,n,o){},e.prototype.bindFeature=function(e,t,i){},e}();t.default=o}).apply(null,r))||(e.exports=n)},NRog:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("ma1f"),i("qsST"),i("LxLY"),i("Brhx"),i("sbqO"),i("z2+Q")],void 0===(n=(function(e,t,i,r,n,o,a,s,l){Object.defineProperty(t,"__esModule",{value:!0});var u=n.getLogger("esri.views.2d.engine.webgl.ClippingInfo"),c=function(e){return parseFloat(e)/100},f=function(e){function t(t,i){var r=e.call(this)||this;return r._clip=i,r._cache={},r.stage=t,r._handle=i.watch("version",(function(){return r._invalidate()})),r.ready(),r}return i.__extends(t,e),t.fromClipArea=function(e,i){return new t(e,i)},t.prototype._destroyGL=function(){o.isSome(this._cache.mesh)&&(this._cache.mesh.destroy(),this._cache.mesh=null),o.isSome(this._cache.vao)&&(this._cache.vao.dispose(),this._cache.vao=null)},t.prototype.destroy=function(){this._destroyGL(),this._handle.remove()},t.prototype.getVAO=function(e,t,i,r){var n=t.size,a=n[0],s=n[1];if("geometry"!==this._clip.type&&this._lastWidth===a&&this._lastHeight===s||(this._lastWidth=a,this._lastHeight=s,this._destroyGL()),o.isNone(this._cache.vao)){var u=this._createMesh(t,this._clip),c=u.getIndexBuffer(e),f=u.getVertexBuffers(e);this._cache.mesh=u,this._cache.vao=new l(e,i,r,f,c)}return this._cache.vao},t.prototype._invalidate=function(){this._destroyGL(),this.requestRender()},t.prototype._createScreenRect=function(e,t){var i=e.size,r=i[0],n=i[1],o="string"==typeof t.left?c(t.left)*r:t.left,a="string"==typeof t.right?c(t.right)*r:t.right,s="string"==typeof t.top?c(t.top)*n:t.top,l="string"==typeof t.bottom?c(t.bottom)*n:t.bottom,u=s;return{x:o,y:u,width:Math.max(r-a-o,0),height:Math.max(n-l-u,0)}},t.prototype._createMesh=function(e,t){switch(t.type){case"rect":return s.default.fromRect(this._createScreenRect(e,t));case"path":return s.default.fromPath(t);case"geometry":return s.default.fromGeometry(e,t);default:return u.error(new r("mapview-bad-type","Unable to create ClippingInfo mesh from clip of type: ${clip.type}")),s.default.fromRect({x:0,y:0,width:1,height:1})}},t}(a.DisplayObject);t.default=f}).apply(null,r))||(e.exports=n)},NoUk:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("rg9i"),i("Vx27"),i("n7H0"),i("o5TS")],n=(function(e,t,i,r,n,o,a){Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var o;return i.__extends(t,e),o=t,t.prototype.writeLevels=function(e,t,i){for(var r in e)return void(t.stops=this.levels[r])},t.prototype.clone=function(){return new o({axis:this.axis,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,maxDataValue:this.maxDataValue,maxSize:a.isSizeVariable(this.maxSize)?this.maxSize.clone():this.maxSize,minDataValue:this.minDataValue,minSize:a.isSizeVariable(this.minSize)?this.minSize.clone():this.minSize,normalizationField:this.normalizationField,stops:this.stops&&this.stops.map((function(e){return e.clone()})),target:this.target,useSymbolValue:this.useSymbolValue,valueRepresentation:this.valueRepresentation,valueUnit:this.valueUnit,legendOptions:this.legendOptions&&this.legendOptions.clone(),levels:r.clone(this.levels)})},i.__decorate([n.property()],t.prototype,"levels",void 0),i.__decorate([n.writer("levels")],t.prototype,"writeLevels",null),o=i.__decorate([n.subclass("esri.views.2d.engine.LevelDependentSizeVariable")],t)}(o);t.LevelDependentSizeVariable=s}).apply(null,r),void 0===n||(e.exports=n)},Nwkb:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("DJpR")],void 0===(n=(function(e,t,i){return function(){function e(e,t){this.rctx=e,this._vertexBuffer=i.BufferObject.createVertex(e,35044,new Uint16Array(t)),this._vao=new i.VertexArrayObject(e,{a_position:0},{geometry:[{name:"a_position",count:2,type:5122,offset:0,stride:4,normalized:!1}]},{geometry:this._vertexBuffer})}return e.prototype.bind=function(){this._vao.bind()},e.prototype.unbind=function(){this._vao.unbind()},e.prototype.dispose=function(){this._vao.dispose(!1),this._vertexBuffer.dispose()},e.prototype.draw=function(){this.rctx.bindVAO(this._vao),this.rctx.drawArrays(5,0,4)},e}()}).apply(null,r))||(e.exports=n)},O6Ih:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("H1tY"),i("tI6k"),i("JNkf"),i("Dos2"),i("GDRe"),i("tBzM"),i("hNI9"),i("m87x"),i("8Lwu")],n=(function(e,t,i,r,n,o,a,s,l,u,c,f){Object.defineProperty(t,"__esModule",{value:!0});var d=n.TILE_SIZE+16,h=new s.TileClipper(0,0,0,1,16);h.setExtent(n.TILE_SIZE);var p=0,_=0,m=0;r("esri-tiles-performance")&&setInterval((function(){console.log("New (FL)","feat="+m,"secs="+p,"tris="+_,"tris/sec="+Math.round(_/p))}),1e4);var v=new Uint32Array(9),g=new Uint32Array(36),y=new Uint32Array(3),b=new Uint32Array(6),x=function(e){return function(t){var i=Math.ceil(1024*e._halfWidth),r=Math.ceil(1024*e._halfReferenceWidth);t.entry0=e.offset+e.vertexCount++;var n=a.i1616to32(t.distance,i),o=a.i8888to32(Math.round(31*t.prevNormal.x),Math.round(31*t.prevNormal.y),Math.round(0),Math.round(-31)),s=a.i8888to32(0,0,0,e._bitset);g[0]=a.i1616to32(8*t.currentVertex.x,8*t.currentVertex.y),g[1]=e.id,g[2]=e._fillColor,g[3]=o,g[4]=n,g[5]=e._tl,g[6]=e._br,g[7]=s,g[8]=a.i1616to32(r,0),t.entry2=e.offset+e.vertexCount++,n=a.i1616to32(t.distance,i),o=a.i8888to32(Math.round(31*-t.prevNormal.x),Math.round(31*-t.prevNormal.y),Math.round(0),Math.round(31)),s=a.i8888to32(0,0,0,e._bitset),g[9]=a.i1616to32(8*t.currentVertex.x,8*t.currentVertex.y),g[10]=e.id,g[11]=e._fillColor,g[12]=o,g[13]=n,g[14]=e._tl,g[15]=e._br,g[16]=s,g[17]=a.i1616to32(r,0),t.exit0=e.offset+e.vertexCount++,n=a.i1616to32(t.distance,i),o=a.i8888to32(Math.round(31*t.nextNormal.x),Math.round(31*t.nextNormal.y),Math.round(0),Math.round(-31)),s=a.i8888to32(0,0,0,e._bitset),g[18]=a.i1616to32(8*t.currentVertex.x,8*t.currentVertex.y),g[19]=e.id,g[20]=e._fillColor,g[21]=o,g[22]=n,g[23]=e._tl,g[24]=e._br,g[25]=s,g[26]=a.i1616to32(r,0),t.exit2=e.offset+e.vertexCount++,n=a.i1616to32(t.distance,i),o=a.i8888to32(Math.round(31*-t.nextNormal.x),Math.round(31*-t.nextNormal.y),Math.round(0),Math.round(31)),s=a.i8888to32(0,0,0,e._bitset),g[27]=a.i1616to32(8*t.currentVertex.x,8*t.currentVertex.y),g[28]=e.id,g[29]=e._fillColor,g[30]=o,g[31]=n,g[32]=e._tl,g[33]=e._br,g[34]=s,g[35]=a.i1616to32(r,0),e.geometryBuf.writeRegion(g)}},w=function(e){return function(t){b[0]=t.leftExit0,b[1]=t.rightEntry0,b[2]=t.leftExit2,b[3]=t.rightEntry0,b[4]=t.rightEntry2,b[5]=t.leftExit2,e.indexCount+=6,e.indexBuf.writeRegion(b)}};t.default=function(e){return function(e){function t(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var r=e.apply(this,t)||this;return r.tessellationProperties={_fillColor:null,_tl:null,_br:null,_halfWidth:null,_bitset:null,_halfReferenceWidth:null,id:null,indexBuf:null,indexCount:null,geometryBuf:null,vertexCount:null,offset:null},r._tessellationOptions={},r.geometryType=o.WGLGeometryType.LINE,r}return i.__extends(t,e),t.prototype.writeMeshWithGeometry=function(e,t,i,r,n,o){var a=t.indexVector,s=t.get("geometry"),l=new u(r,this.geometryType,this._materialKey),c=t.getVector("geometry").vertexCount;if(l.vertexFrom=c,l.indexFrom=a.length,f.isPolyline(o)){if(0===(d=this._clipLines(o.paths)).length)return;return this._write(l,a,s,c,r,d),void e.push(l)}if(f.isPolygon(o)){var d;if(0===(d=this._clipLines(o.rings)).length)return;return this._write(l,a,s,c,r,d),void e.push(l)}},t.prototype._clipLines=function(e){for(var t=[],i=!1,r=0;r<e.length;){var n=[],o=e[r];h.reset(2);var a=o[0],s=a[0],l=a[1];if(i)h.moveTo(s,l);else{if(s<-16||s>d||l<-16||l>d){i=!0;continue}n.push({x:s,y:l})}for(var u=!1,c=o.length,f=1;f<c;++f)if(s+=o[f][0],l+=o[f][1],i)h.lineTo(s,l);else{if(s<-16||s>d||l<-16||l>d){u=!0;break}n.push({x:s,y:l})}if(u)i=!0;else{if(i){var p=h.resultWithStarts();if(p)for(var _=0,m=p;_<m.length;_++)t.push(m[_])}else t.push({line:n,start:0});r++,i=!1}}return t},t.prototype._write=function(e,t,i,n,o,a){var s;r("esri-tiles-performance")&&(s=performance.now()),this.tessellationProperties.id=o,this.tessellationProperties.indexBuf=t,this.tessellationProperties.indexCount=0,this.tessellationProperties.geometryBuf=i,this.tessellationProperties.vertexCount=0,this.tessellationProperties.offset=n;for(var u=0,c=a;u<c.length;u++){var f=c[u],d=f.line;d.length<2||(this._tessellationOptions.initialDistance=f.start%65535,this._tessellationCallbacks instanceof l.StandardTessellationCallbacks&&(this._tessellationCallbacks.capType=this._capType,this._tessellationCallbacks.joinType=this._joinType),l.tessellate(d,this._tessellationOptions,this._tessellationCallbacks),l.cleanup(),r("esri-tiles-performance")&&m++)}e.vertexCount=this.tessellationProperties.vertexCount,e.indexCount=this.tessellationProperties.indexCount,e.zOrder=this._zOrder,r("esri-tiles-performance")&&(p+=(performance.now()-s)/1e3,_+=e.indexCount/3)},t.prototype._initializeTessellator=function(e){var t=c.LineMaterialKey.load(this._materialKey);if(this._tessellationOptions.trackDistance=this._isDashed||this._hasPattern,this._tessellationOptions.thin=!e&&this.tessellationProperties._halfWidth<n.THIN_LINE_THRESHOLD/2&&!(t.vvSizeFieldStops||t.vvSizeMinMaxValue||t.vvSizeScaleStops||t.vvSizeUnitValue),this._tessellationOptions.wrapDistance=65535,this._tessellationOptions.outerBisectorAutoSplitThreshold=1/3.8,this._tessellationOptions.enableOuterBisectorSplit=this._isDashed||this._hasPattern,this._tessellationOptions.innerBisectorAutoSplitThreshold=1/3.8,this._tessellationOptions.enableInnerBisectorSplit=this._isDashed||this._hasPattern,this._tessellationOptions.thin)this._tessellationCallbacks={vertex:x(this.tessellationProperties),bridge:w(this.tessellationProperties)};else{var i=new l.StandardTessellationCallbacks(function(e){return function(t,i,r,n,o,s,l,u,c){var f=a.i1616to32(c,Math.ceil(1024*e._halfWidth)),d=a.i8888to32(Math.round(31*o),Math.round(31*s),Math.round(31*l),Math.round(31*u)),h=a.i8888to32(31*r,31*n,0,e._bitset);return v[0]=a.i1616to32(8*t,8*i),v[1]=e.id,v[2]=e._fillColor,v[3]=d,v[4]=f,v[5]=e._tl,v[6]=e._br,v[7]=h,v[8]=a.i1616to32(Math.ceil(1024*e._halfReferenceWidth),0),e.geometryBuf.writeRegion(v),e.offset+e.vertexCount++}}(this.tessellationProperties),function(e){return function(t,i,r){y[0]=t,y[1]=i,y[2]=r,e.indexCount+=3,e.indexBuf.writeRegion(y)}}(this.tessellationProperties));i.miterLimitCosine=this._miterLimitCosine,i.textured=this._isDashed||this._hasPattern,i.joinOnUTurn=this._joinOnUTurn,this._tessellationCallbacks=i}},t}(e)}}).apply(null,r),void 0===n||(e.exports=n)},"OO/B":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("LxLY"),i("DJpR"),i("YaB4"),i("GBWg"),i("+P5t"),i("JNkf"),i("pvXx"),i("eprR"),i("I6Kl"),i("nzKn"),i("nOTS"),i("HtXH"),i("hAHX")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c,f,d,h,p){Object.defineProperty(t,"__esModule",{value:!0}),t.PainterOptions=function(){};var _=function(){function e(e,t){this.context=e,this._blitRenderer=new a.BitBlitRenderer,this._brushCache=new Map,this._vtlProgramCache=null,this._blendEffect=new f.BlendEffect,this.brushNameToCtor={marker:n.brushes.Marker,line:n.brushes.Line,fill:n.brushes.Fill,text:n.brushes.Text,label:n.brushes.Label,clip:n.brushes.Clip,stencil:n.brushes.Stencil,bitmap:n.brushes.Bitmap,tileInfo:n.brushes.TileInfo,vtlBackground:n.brushes.VTLBackground,vtlFill:n.brushes.VTLFill,vtlLine:n.brushes.VTLLine,vtlCircle:n.brushes.VTLCircle,vtlSymbol:n.brushes.VTLSymbol},this.effects={highlight:new d.default,hittest:new h.HittestEffect,integrate:new c.AnimationEffect},this.materialManager=new l(e),this._vtlProgramCache=new o.default(e),this.textureManager=new u(t)}return e.prototype.getRenderTarget=function(){return this._renderTarget},e.prototype.setRenderTarget=function(e){this._renderTarget=e},e.prototype.getFbos=function(e,t){if(e!==this._lastWidth||t!==this._lastHeight){if(this._lastWidth=e,this._lastHeight=t,this._fbos){for(var i in this._fbos)this._fbos[i].resize(e,t);return this._fbos}var n={target:3553,pixelFormat:6408,dataType:5121,samplingMode:9728,wrapMode:33071,width:e,height:t},o={colorTarget:0,depthStencilTarget:3},a=new r.Renderbuffer(this.context,{width:e,height:t,internalFormat:34041});this._stencilBuf=a,this._fbos={output:new r.FramebufferObject(this.context,o,n,a),blend:new r.FramebufferObject(this.context,o,n,a),effect0:new r.FramebufferObject(this.context,o,n,a)}}return this._fbos},e.prototype.getSharedStencilBuffer=function(){return this._stencilBuf},e.prototype.beforeRenderLayers=function(e,t){void 0===t&&(t=null);var r=e.getViewport(),n=r.width,o=r.height;this._prevFBO=e.getBoundFramebufferObject();var a=this.getFbos(n,o);if(e.bindFramebuffer(a.output),e.setDepthWriteEnabled(!0),i.isSome(t)){var s=t.color,l=s.a;e.setClearColor(l*s.r/255,l*s.g/255,l*s.b/255,l)}else e.setClearColor(0,0,0,0);e.setClearDepth(1),e.clear(e.gl.COLOR_BUFFER_BIT|e.gl.DEPTH_BUFFER_BIT),e.setDepthWriteEnabled(!1)},e.prototype.beforeRenderLayer=function(e,t,i){var r=e.context;if(m(e.blendMode,i))r.bindFramebuffer(this._fbos.blend),r.setColorMask(!0,!0,!0,!0),r.setClearColor(0,0,0,0),r.clear(r.gl.COLOR_BUFFER_BIT);else{var n=this._getOutputFBO();r.bindFramebuffer(n)}r.setDepthWriteEnabled(!1),r.setDepthTestEnabled(!1),r.setStencilTestEnabled(!0),r.setClearStencil(t),r.setStencilWriteMask(255),r.clear(r.gl.STENCIL_BUFFER_BIT)},e.prototype.compositeLayer=function(e,t){var r=e.context,n=e.blendMode;if(m(n,t)){var o=this._getOutputFBO();r.bindFramebuffer(o),r.setStencilTestEnabled(!1),r.setStencilWriteMask(0),r.setBlendingEnabled(!0),r.setBlendFunctionSeparate(1,771,1,771),r.setColorMask(!0,!0,!0,!0);var a=i.isSome(n)?n:"normal";this._blendEffect.draw(e,this._fbos.blend.colorTexture,9728,a,t)}},e.prototype.renderLayers=function(e){if(e.bindFramebuffer(this._prevFBO),this._fbos){var t=this._getOutputFBO();e.setStencilTestEnabled(!1),e.setStencilWriteMask(0),this.blitTexture(e,t.colorTexture,9728)}},e.prototype.dispose=function(){if(this.materialManager.dispose(),this.textureManager.dispose(),this._blitRenderer&&(this._blitRenderer.dispose(),this._blitRenderer=null),this._vtlProgramCache&&(this._vtlProgramCache.dispose(),this._vtlProgramCache=null),this._brushCache&&(this._brushCache.forEach((function(e){return e.dispose()})),this._brushCache.clear(),this._brushCache=null),this._fbos)for(var e in this._fbos)this._fbos[e]&&this._fbos[e].dispose();if(this.effects)for(var t in this.effects)this.effects[t]&&this.effects[t].dispose();this._prevFBO=null},e.prototype.getGeometryBrush=function(e){var t,i=((t={})[s.WGLGeometryType.FILL]=n.brushes.Fill,t[s.WGLGeometryType.LINE]=n.brushes.Line,t[s.WGLGeometryType.MARKER]=n.brushes.Marker,t[s.WGLGeometryType.TEXT]=n.brushes.Text,t)[e],r=this._brushCache.get(i);return void 0===r&&(r=new i,this._brushCache.set(i,r)),this._brushCache.get(i)},e.prototype.renderObject=function(e,t,i,r){var n=this.brushNameToCtor[i];if(!n)return null;var o=this._brushCache.get(n);void 0===o&&(o=new n,this._brushCache.set(n,o)),o.prepareState(e,t,r),o.draw(e,t,r)},e.prototype.renderObjects=function(e,t,i,r){var n=this.brushNameToCtor[i];if(!n)return null;var o=this._brushCache.get(n);void 0===o&&(o=new n,this._brushCache.set(n,o)),o.drawMany(e,t,r)},e.prototype.getVectorTileProgramCach=function(){return this._vtlProgramCache},e.prototype.registerRenderPass=function(e){var t=this,i=e.brushes.map((function(e){return t._brushCache.has(e)||t._brushCache.set(e,new e),t._brushCache.get(e)}));return new p.default(i,e)},e.prototype.setHighlightOptions=function(e){this.effects.highlight.setHighlightOptions(e)},e.prototype.blitTexture=function(e,t,i,r){void 0===r&&(r=1),e.setBlendingEnabled(!0),e.setBlendFunctionSeparate(1,771,1,771),e.setColorMask(!0,!0,!0,!0),this._blitRenderer.render(e,t,i,r)},e.prototype._getOutputFBO=function(){return null!=this._renderTarget?this._renderTarget:this._fbos.output},e}();function m(e,t){return 1!==t||i.isSome(e)&&"normal"!==e}t.default=_}).apply(null,r))||(e.exports=n)},ORRN:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("hPTP")],void 0===(n=(function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return"#define "+function(e){return e.replace("-","_").toUpperCase()}(e)+"\n"};t.blend={name:"blend",attributes:{a_pos:0,a_tex:1},shaders:function(e){return{vertexShader:r(e)+i.resolveIncludes("blend/blend.vert"),fragmentShader:r(e)+i.resolveIncludes("blend/blend.frag")}}}}).apply(null,r))||(e.exports=n)},Ob6M:function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,i){this.pixelBlock=e,this.extent=t,this.originalPixelBlock=i}return Object.defineProperty(e.prototype,"width",{get:function(){return this.pixelBlock?this.pixelBlock.width:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.pixelBlock?this.pixelBlock.height:0},enumerable:!0,configurable:!0}),e.prototype.render=function(e){var t=this.pixelBlock;if(t){var i=this.filter({pixelBlock:t}),r=i.pixelBlock.getAsRGBA(),n=e.createImageData(i.pixelBlock.width,i.pixelBlock.height);n.data.set(r),e.putImageData(n,0,0)}},e.prototype.getRenderedRasterPixels=function(){var e=this.filter({pixelBlock:this.pixelBlock});return{width:e.pixelBlock.width,height:e.pixelBlock.height,renderedRasterPixels:new Uint8Array(e.pixelBlock.getAsRGBA().buffer)}},e}();t.default=i}).apply(null,r))||(e.exports=n)},PDSL:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("DJpR"),i("tI6k"),i("3+7H")],n=(function(e,t,i,r,n,o){Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.prepareState=function(e,t,i){var r=e.context,n=i&&-1!==i.indexOf("id");r.setBlendingEnabled(!n),r.setBlendFunctionSeparate(1,771,1,771),r.setColorMask(!0,!0,!0,!0),r.setStencilWriteMask(0),r.setStencilTestEnabled(!0),r.setStencilFunction(514,t.stencilRef,255)},t.prototype.draw=function(e,t,i){var r=this;if(t.isReady&&t.hasData){t.commitChanges();var n=this.getGeometryType(),o=t.getDisplayList(),a=t.getGeometry(n);a&&o&&(e.timeline.begin(this.name),o.byType(n,(function(n){r.drawGeometry(e,t,n,a,i)})),e.timeline.end(this.name))}},t.prototype._getVAO=function(e,t,i,n){return n.vao||(n.vao=new r.VertexArrayObject(e,i,t,n.vertexBufferMap,n.indexBuffer)),n.vao},t.prototype._setSharedUniforms=function(e,t,i){e.setUniform1f("u_pixelRatio",t.pixelRatio),e.setUniformMatrix3fv("u_dvsMat3",i.transforms.dvs),e.setUniformMatrix3fv("u_displayViewMat3",t.state.displayViewMat3),e.setUniformMatrix4fv("u_insideEffectMat4",t.rendererInfo.insideEffect),e.setUniformMatrix4fv("u_outsideEffectMat4",t.rendererInfo.outsideEffect),e.setUniform1fv("u_insideOpacities",t.rendererInfo.insideOpacities),e.setUniform1fv("u_outsideOpacities",t.rendererInfo.outsideOpacities),e.setUniform1i("u_attributeTextureSize",t.attributeView.size),e.setUniform1i("u_attributeData0",n.TEXTURE_BINDING_ATTRIBUTE_DATA_0),e.setUniform1i("u_attributeData1",n.TEXTURE_BINDING_ATTRIBUTE_DATA_1),e.setUniform1i("u_attributeData2",n.TEXTURE_BINDING_ATTRIBUTE_DATA_2),e.setUniform1i("u_attributeData3",n.TEXTURE_BINDING_ATTRIBUTE_DATA_3)},t}(o.default);t.default=a}).apply(null,r),void 0===n||(e.exports=n)},PKCt:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zIqJ"),i("BcWh"),i("H1tY"),i("LxLY"),i("U6iw")],n=(function(e,t,i,r,n,o,a){Object.defineProperty(t,"__esModule",{value:!0});var s=n("esri-2d-profiler"),l=function(){function e(e,t){var n=this;if(this._events=new r,this._entries=new Map,this._timings=new i.default(10),s){this._ext=a.load(e.gl,{}),this._debugOutput=t;var o=e.gl;if(this.enableCommandLogging){var l=function(e){if("function"==typeof o[e]){var t=o[e],i=-1!==e.indexOf("draw");o[e]=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return n._events.emit("command",{container:n._currentContainer,pass:n._currentPass,brush:n._currentBrush,method:e,args:r,isDrawCommand:i}),n._currentSummary&&(n._currentSummary.commands++,i&&n._currentSummary.drawCommands++),t.apply(o,r)}}};for(var u in o)l(u)}}}return Object.defineProperty(e.prototype,"enableCommandLogging",{get:function(){return!("object"==typeof s&&s.disableCommands)},enumerable:!0,configurable:!0}),e.prototype.recordContainerStart=function(e){s&&(this._currentContainer=e)},e.prototype.recordContainerEnd=function(){s&&(this._currentContainer=null)},e.prototype.recordPassStart=function(e){s&&(this._currentPass=e,this._initSummary())},e.prototype.recordPassEnd=function(){s&&(this._currentPass=null,this._emitSummary())},e.prototype.recordBrushStart=function(e){s&&(this._currentBrush=e)},e.prototype.recordBrushEnd=function(){s&&(this._currentBrush=null)},e.prototype.recordStart=function(e){if(s&&o.isSome(this._ext)){if(this._entries.has(e)){var t=this._entries.get(e),i=this._ext.resultAvailable(t.query),r=this._ext.disjoint();if(i&&!r){var n=this._ext.getResult(t.query)/1e6,a=0;if(o.isSome(this._timings.enqueue(n))){for(var l=this._timings.entries,u=l.length,c=0,f=0,d=l;f<d.length;f++)c+=d[f];a=c/u}var h=n.toFixed(2),p=a?a.toFixed(2):"--";this.enableCommandLogging?(console.groupCollapsed("Frame report for "+e+", "+h+" ms ("+p+" last 10 avg)\n"+t.commandsLen+" Commands ("+t.drawCommands+" draw)"),console.log("RenderPass breakdown: "),console.table(t.summaries),console.log("Commands: ",t.commands),console.groupEnd()):console.log("Frame report for "+e+", "+h+" ms ("+p+" last 10 avg)"),this._debugOutput.innerHTML=h+" ("+p+")"}for(var _=0,m=t.handles;_<m.length;_++)m[_].remove();this._entries.delete(e)}var v={name:e,query:this._ext.createQuery(),commands:[],commandsLen:0,drawCommands:0,summaries:[],handles:[]};this.enableCommandLogging&&(v.handles.push(this._events.on("command",(function(e){v.commandsLen++,v.commands.push(e),e.isDrawCommand&&v.drawCommands++}))),v.handles.push(this._events.on("summary",(function(e){v.summaries.push(e)})))),this._ext.beginTimeElapsed(v.query),this._entries.set(e,v)}},e.prototype.recordEnd=function(e){s&&o.isSome(this._ext)&&this._entries.has(e)&&this._ext.endTimeElapsed()},e.prototype._initSummary=function(){this.enableCommandLogging&&(this._currentSummary={container:this._currentContainer,pass:this._currentPass,drawCommands:0,commands:0})},e.prototype._emitSummary=function(){this.enableCommandLogging&&this._events.emit("summary",this._currentSummary)},e}();t.Profiler=l}).apply(null,r),void 0===n||(e.exports=n)},PhOF:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("6cAc")],void 0===(n=(function(e,t,i){return function(){function e(e,t){this._width=0,this._height=0,this._free=[],this._width=e,this._height=t,this._free.push(new i.default(0,0,e,t))}return Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),e.prototype.allocate=function(e,t){if(e>this._width||t>this._height)return new i.default;for(var r=null,n=-1,o=0;o<this._free.length;++o){var a=this._free[o];e<=a.width&&t<=a.height&&(null===r||a.y<=r.y&&a.x<=r.x)&&(r=a,n=o)}return null===r?new i.default:(this._free.splice(n,1),r.width<r.height?(r.width>e&&this._free.push(new i.default(r.x+e,r.y,r.width-e,t)),r.height>t&&this._free.push(new i.default(r.x,r.y+t,r.width,r.height-t))):(r.width>e&&this._free.push(new i.default(r.x+e,r.y,r.width-e,r.height)),r.height>t&&this._free.push(new i.default(r.x,r.y+t,e,r.height-t))),new i.default(r.x,r.y,e,t))},e.prototype.release=function(e){for(var t=0;t<this._free.length;++t){var i=this._free[t];if(i.y===e.y&&i.height===e.height&&i.x+i.width===e.x)i.width+=e.width;else if(i.x===e.x&&i.width===e.width&&i.y+i.height===e.y)i.height+=e.height;else if(e.y===i.y&&e.height===i.height&&e.x+e.width===i.x)i.x=e.x,i.width+=e.width;else{if(e.x!==i.x||e.width!==i.width||e.y+e.height!==i.y)continue;i.y=e.y,i.height+=e.height}this._free.splice(t,1),this.release(e)}this._free.push(e)},e}()}).apply(null,r))||(e.exports=n)},PlK1:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("ma1f")],void 0===(n=(function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ok=function(e,t){return!e||!("name"in e)||(t&&t.error(new i(e.name,e.message,e.details)),!1)}}).apply(null,r))||(e.exports=n)},PwbG:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("apbF")],void 0===(n=(function(e,t,i){return function(){function e(){this.geometries=[{indexBuffer:void 0,vertexBuffer:{}},{indexBuffer:void 0,vertexBuffer:{}},{indexBuffer:void 0,vertexBuffer:{}},{indexBuffer:void 0,vertexBuffer:{}},{indexBuffer:void 0,vertexBuffer:{}}]}return e.prototype.clone=function(){for(var t=new e,i=0;i<this.geometries.length;i++){var r=this.geometries[i],n=t.geometries[i];for(var o in n.indexBuffer=r.indexBuffer.slice(),n.vertexBuffer={},r.vertexBuffer){var a=r.vertexBuffer[o],s=a.stride;n.vertexBuffer[o]={data:a.data.slice(),stride:s}}}return t},e.deserialize=function(t){for(var r=new e,n=0;n<5;++n)for(var o in r.geometries[n].indexBuffer=new Uint32Array(t.geometries[n].indexBuffer),r.geometries[n].vertexBuffer={},t.geometries[n].vertexBuffer)r.geometries[n].vertexBuffer[o]={data:i.allocateTypedArrayBufferwithData(t.geometries[n].vertexBuffer[o].data,t.geometries[n].vertexBuffer[o].stride),stride:t.geometries[n].vertexBuffer[o].stride};return r},e.prototype.serialize=function(){for(var e={geometries:[{indexBuffer:this.geometries[0].indexBuffer.buffer,vertexBuffer:{}},{indexBuffer:this.geometries[1].indexBuffer.buffer,vertexBuffer:{}},{indexBuffer:this.geometries[2].indexBuffer.buffer,vertexBuffer:{}},{indexBuffer:this.geometries[3].indexBuffer.buffer,vertexBuffer:{}},{indexBuffer:this.geometries[4].indexBuffer.buffer,vertexBuffer:{}}]},t=0;t<5;++t)for(var i in this.geometries[t].vertexBuffer)e.geometries[t].vertexBuffer[i]={data:this.geometries[t].vertexBuffer[i].data.buffer,stride:this.geometries[t].vertexBuffer[i].stride};return e},e.prototype.getBuffers=function(){for(var e=[],t=0;t<5;++t)for(var i in e.push(this.geometries[t].indexBuffer.buffer),this.geometries[t].vertexBuffer)e.push(this.geometries[t].vertexBuffer[i].data.buffer);return e},e}()}).apply(null,r))||(e.exports=n)},Rpsm:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("lgZd"),i("j2SP"),i("DJpR"),i("tI6k"),i("JNkf"),i("Dos2"),i("3+7H")],n=(function(e,t,i,r,n,o,a,s,l,u){Object.defineProperty(t,"__esModule",{value:!0});var c=[1,1,1,1],f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._fillVertexAttributes={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:4,normalized:!1,divisor:0}]},t._fillVertexAttributesDD={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:8,normalized:!1,divisor:0},{name:"a_color",count:4,type:5121,offset:4,stride:8,normalized:!0,divisor:0}]},t._outlineVertexAttributes={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:8,normalized:!1,divisor:0},{name:"a_offset",count:2,type:5120,offset:4,stride:8,normalized:!1,divisor:0},{name:"a_xnormal",count:2,type:5120,offset:6,stride:8,normalized:!1,divisor:0}]},t._outlineVertexAttributesDD={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:12,normalized:!1,divisor:0},{name:"a_offset",count:2,type:5120,offset:4,stride:12,normalized:!1,divisor:0},{name:"a_xnormal",count:2,type:5120,offset:6,stride:12,normalized:!1,divisor:0},{name:"a_color",count:4,type:5121,offset:8,stride:12,normalized:!0,divisor:0}]},t._color=n.vec4f32.create(),t._outlineColor=n.vec4f32.create(),t._fillProgramOptions={id:!1,dd:!1,pattern:!1},t._outlineProgramOptions={id:!1,dd:!1},t._patternMatrix=r.mat3f32.create(),t}return i.__extends(t,e),t.prototype.dispose=function(){},t.prototype.drawMany=function(e,t){var i=e.displayLevel,r=e.drawPhase,n=e.renderPass,o=e.styleLayerId,a=e.styleLayer,u=a.getPaintValue("fill-pattern",i),f=a.hasDataDrivenColor?c:a.getPaintValue("fill-color",i),d=a.hasDataDrivenOpacity?1:a.getPaintValue("fill-opacity",i),h=d*f[3],p=void 0!==u||h<1||a.hasDataDrivenFill;if(!p||"opaque"!==n){var _;this._color[0]=h*f[0],this._color[1]=h*f[1],this._color[2]=h*f[2],this._color[3]=h,r===s.WGLDrawPhase.HITTEST&&(_=l.u32to4Xu8(o+1));var m=a.getPaintValue("fill-translate",i),v=a.getPaintValue("fill-translate-anchor",i);this._drawFill(e,o,a,t,m,v,u,p,_),this._drawOutline(e,o,a,t,m,v,u,_,d)}},t.prototype._drawFill=function(e,t,i,r,n,o,l,u,c){var f=e.context,d=e.displayLevel,h=e.drawPhase,p=e.spriteMosaic,_=e.state;if(u||"translucent"!==e.renderPass){var m,v=void 0!==l,g=e.pixelRatio>a.VTL_HIGH_RES_CUTOFF?2:1,y=i.hasDataDrivenFill,b=e.painter.getVectorTileProgramCach(),x=h===s.WGLDrawPhase.HITTEST,w=(x?1:0)<<2|(y?1:0)<<1|(v?1:0),T=this._fillProgramOptions;T.id=x,T.dd=y,T.pattern=v;var S=b.getProgram(1,w,T);if(f.bindProgram(S),v){if(!(m=p.getMosaicItemPosition(l,!0)))return void f.bindProgram();S.setUniform2f("u_pattern_tl",m.tl[0],m.tl[1]),S.setUniform2f("u_pattern_br",m.br[0],m.br[1]),S.setUniform1i("u_texture",a.VTL_TEXTURE_BINDING_UNIT_SPRITES),p.bind(f,9729,m.page,a.VTL_TEXTURE_BINDING_UNIT_SPRITES)}S.setUniformMatrix3fv("u_displayMat3",1===o?_.displayMat3:_.displayViewMat3),S.setUniform2fv("u_fillTranslation",n),S.setUniform1f("u_depth",i.z+1/65536),S.setUniform4fv("u_color",this._color),x&&S.setUniform4fv("u_id",c);for(var C=0,L=r;C<L.length;C++){var O=L[C];if(O.layerData[t]){var M=this._getFillVAO(f,O,y,b);if(M){var D=O.layerData[t];if(f.bindVAO(M),S.setUniformMatrix3fv("u_dvsMat3",O.transforms.dvs),v){var E=Math.max(Math.pow(2,Math.round(d)-O.key.level),1),I=O.coordRange[0]/(g*O.size[0]*E),P=1/(m.size[1]*I);this._patternMatrix[0]=1/(m.size[0]*I),this._patternMatrix[4]=P,S.setUniformMatrix3fv("u_pattern_matrix",this._patternMatrix)}f.setStencilFunction(514,O.stencilRef,255),f.drawElements(4,D.triangleElementCount,5125,12*D.triangleElementStart),O.triangleCount+=D.triangleElementCount/3}}}}},t.prototype._drawOutline=function(e,t,i,r,n,o,a,l,u){var f=e.context,d=e.displayLevel,h=e.drawPhase,p=e.pixelRatio,_=e.state;if("opaque"!==e.renderPass){var m=void 0!==a;if(i.getPaintValue("fill-antialias",d)&&!m||i.hasDataDrivenOutlineColor){var v=e.painter.getVectorTileProgramCach(),g=i.hasDataDrivenOutline;if(i.outlineUsesFillColor){if(1!==this._color[3])return;this._outlineColor[0]=this._color[0],this._outlineColor[1]=this._color[1],this._outlineColor[2]=this._color[2],this._outlineColor[3]=this._color[3]}else{var y=i.hasDataDrivenOutlineColor?c:i.getPaintValue("fill-outline-color",d),b=u*y[3];this._outlineColor[0]=b*y[0],this._outlineColor[1]=b*y[1],this._outlineColor[2]=b*y[2],this._outlineColor[3]=b}var x=.75/p,w=h===s.WGLDrawPhase.HITTEST,T=(w?1:0)<<1|(g?1:0),S=this._outlineProgramOptions;S.id=w,S.dd=g;var C=v.getProgram(2,T,S);f.bindProgram(C),C.setUniformMatrix3fv("u_displayMat3",1===o?_.displayMat3:_.displayViewMat3),C.setUniform2fv("u_fillTranslation",n),C.setUniform1f("u_depth",i.z+1/65536),C.setUniform1f("u_outline_width",x),C.setUniform4fv("u_color",this._outlineColor),w&&C.setUniform4fv("u_id",l);for(var L=0,O=r;L<O.length;L++){var M=O[L];if(M.layerData[t]){var D=M.layerData[t],E=this._getOutlineVAO(f,M,g,v);E&&(f.bindVAO(E),C.setUniformMatrix3fv("u_dvsMat3",M.transforms.dvs),f.setStencilFunction(514,M.stencilRef,255),f.drawElements(4,D.outlineElementCount,5125,12*D.outlineElementStart),M.triangleCount+=D.outlineElementCount/3)}}}}},t.prototype._getFillVAO=function(e,t,i,r){if(i){if(t.fillDDVertexArrayObject)return t.fillDDVertexArrayObject;var n=t.fillDDVertexBuffer,a=t.fillIndexBuffer;return n&&a?(t.fillDDVertexArrayObject=new o.VertexArrayObject(e,r.getProgramAttributes(1),this._fillVertexAttributesDD,{geometry:n},a),t.fillDDVertexArrayObject):null}if(t.fillVertexArrayObject)return t.fillVertexArrayObject;var s=t.fillVertexBuffer,l=t.fillIndexBuffer;return s&&l?(t.fillVertexArrayObject=new o.VertexArrayObject(e,r.getProgramAttributes(1),this._fillVertexAttributes,{geometry:s},l),t.fillVertexArrayObject):null},t.prototype._getOutlineVAO=function(e,t,i,r){if(i){if(t.outlineDDVertexArrayObject)return t.outlineDDVertexArrayObject;var n=t.outlineDDVertexBuffer,a=t.outlineIndexBuffer;return n&&a?(t.outlineDDVertexArrayObject=new o.VertexArrayObject(e,r.getProgramAttributes(2),this._outlineVertexAttributesDD,{geometry:n},a),t.outlineDDVertexArrayObject):null}if(t.outlineVertexArrayObject)return t.outlineVertexArrayObject;var s=t.outlineVertexBuffer,l=t.outlineIndexBuffer;return s&&l?(t.outlineVertexArrayObject=new o.VertexArrayObject(e,r.getProgramAttributes(2),this._outlineVertexAttributes,{geometry:s},l),t.outlineVertexArrayObject):null},t}(u.default);t.WGLBrushVTLFill=f}).apply(null,r),void 0===n||(e.exports=n)},RyYO:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("DJpR"),i("tI6k"),i("n4XV"),i("TEGq")],void 0===(n=(function(e,t,i,r,n,o){Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){this._width=void 0,this._height=void 0,this._resources=null}return e.prototype.dispose=function(){this._resources&&(this._resources.quadGeometry.dispose(),this._resources.quadVAO.dispose(),this._resources.highlightProgram.dispose(),this._resources.blurProgram.dispose(),this._resources=null)},e.prototype.preBlur=function(e,t){e.bindTexture(t,r.TEXTURE_BINDING_HIGHLIGHT_0),e.bindProgram(this._resources.blurProgram),this._resources.blurProgram.setUniform4fv("u_direction",[1,0,1/this._width,0]),this._resources.blurProgram.setUniformMatrix4fv("u_channelSelector",n.ALPHA_TO_RGBA_CHANNEL_SELECTOR_MATRIX),e.bindVAO(this._resources.quadVAO),e.drawArrays(5,0,4),e.bindVAO()},e.prototype.finalBlur=function(e,t){e.bindTexture(t,r.TEXTURE_BINDING_HIGHLIGHT_0),e.bindProgram(this._resources.blurProgram),this._resources.blurProgram.setUniform4fv("u_direction",[0,1,0,1/this._height]),this._resources.blurProgram.setUniformMatrix4fv("u_channelSelector",n.RGBA_TO_RGBA_CHANNEL_SELECTOR_MATRIX),e.bindVAO(this._resources.quadVAO),e.drawArrays(5,0,4),e.bindVAO()},e.prototype.renderHighlight=function(e,t,i){e.bindTexture(t,r.TEXTURE_BINDING_HIGHLIGHT_0),e.bindProgram(this._resources.highlightProgram),i.applyHighlightOptions(e,this._resources.highlightProgram),e.bindVAO(this._resources.quadVAO),e.setBlendingEnabled(!0),e.setBlendFunction(1,771),e.drawArrays(5,0,4),e.bindVAO()},e.prototype._initialize=function(e,t,a){this._width=t,this._height=a;var s=new i.BufferObject(e,34962,35044,new Int8Array([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]).buffer),l=new i.VertexArrayObject(e,{a_position:0,a_texcoord:1},{geometry:[{name:"a_position",count:2,type:5120,offset:0,stride:4,normalized:!1},{name:"a_texcoord",count:2,type:5121,offset:2,stride:4,normalized:!1}]},{geometry:s}),u=i.createProgram(e,o.highlight),c=i.createProgram(e,o.blur);u.setUniform1i("u_texture",r.TEXTURE_BINDING_HIGHLIGHT_0),u.setUniform1i("u_shade",r.TEXTURE_BINDING_HIGHLIGHT_1),u.setUniform4fv("u_sigmas",n.SIGMAS),c.setUniform1i("u_texture",r.TEXTURE_BINDING_HIGHLIGHT_0),c.setUniform4fv("u_sigmas",n.SIGMAS),this._resources={quadGeometry:s,quadVAO:l,highlightProgram:u,blurProgram:c}},e.prototype.setup=function(e,t,i){this._resources?(this._width=t,this._height=i):this._initialize(e,t,i)},e}();t.default=a}).apply(null,r))||(e.exports=n)},S0eh:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("qsST"),i("xoE+"),i("jBNx"),i("CE5S")],void 0===(n=(function(e,t,i,r,n,o,a){Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t){return e.order-t.order},l=function(e,t){return e.index-t.index},u=r.getLogger("esri/views/2d/engine/webgl/collisions/CollisionEngine");function c(e,t){var i=!!e.maxScale,r=!!e.minScale&&t.scaleToZoom(e.minScale)||0,o=i&&t.scaleToZoom(e.maxScale)||255;return{deconflictionStrategy:e.deconflictionStrategy,minZoom:n.clamp(Math.floor(10*r),0,255),maxZoom:n.clamp(Math.floor(10*o),0,255)}}function f(e){return function(t){return o.pt2px(a.getSizeForValueSimple(t,e))}}function d(e){if(!e)return null;for(var t=0,i=e;t<i.length;t++){var r=i[t];if("size"===r.type)return f(r)}return null}t.createLabelVVEvaluator=d;var h=function(){function e(e,t,r,n){var o=this;this._vvHandle=null;var a=e.layer,s=a.geometryType,l=a.labelingInfo,u=a.renderer;u&&(this.vvEval=d("visualVariables"in u&&u.visualVariables)),this._vvHandle=a.watch("renderer",(function(e){e&&(o.vvEval=d("visualVariables"in e&&e.visualVariables))}));var f=a.featureReduction,h=f&&"cluster"===f.type&&f.labelingInfo,p=(l||[]).map((function(e){return c(e,n)})),_=(h||[]).map((function(e){return c(e,n)}));this.layerView=e,this.geometryType=s,this.index=t,this.order=r,this.zoomRanges=i.__spreadArrays(p,_),this.layerView=e}return e.prototype.hasVV=function(){return!!this.vvEval},e.prototype.allOrNothing=function(){return!("polyline"===this.geometryType)},e.prototype.destroy=function(){this._vvHandle.remove()},e.create=function(t,i,r,n){for(var o=r.sort(s),a=!1,l=-1,u=0,c=o;u<c.length;u++){var f=c[u];!a&&f.order>i&&(l=f.index,a=!0),a&&f.index++}return a||(l=o.length),new e(t,l,i,n)},e.delete=function(e,t){for(var i=t.sort(l),r=e+1;r<i.length;r++)t[r].index--;t[e].destroy(),t.splice(e,1)},e.find=function(e,t){for(var i=0,r=t;i<r.length;i++){var n=r[i];if(n.index===e)return n}return u.error("Tried to get a LayerCollisionInfo for an index that doesn't exist!"),null},e}();t.default=h}).apply(null,r))||(e.exports=n)},ST29:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("W9tT")],void 0===(n=(function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this._reference=null}return Object.defineProperty(e.prototype,"dirty",{get:function(){return this.reference&&this.reference.isDirty},set:function(e){this.reference&&this.reference.hasData&&(e||this.reference.isDirty)&&(this.reference.isDirty=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"index",{get:function(){return this._reference&&this._reference.labelIndex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reference",{get:function(){return this._reference},set:function(e){this._reference=e},enumerable:!0,configurable:!0}),e.prototype.reset=function(e,t,r){var n=e.state,o=r.layerView.tileRenderer,a=this.reference;if(!a||!a.hasData)return!1;t&&(a.isDirty=!0);for(var s=a.transforms.labelMat2d,l=s[4],u=s[5],c=0,f=a.displayObjects;c<f.length;c++)for(var d=f[c],h=o.featuresView.attributeView,p=r.hasVV()?h.getVVSize(d.id):0,_=0,m=d.metrics;_<m.length;_++){var v=m[_];r.hasVV()&&v.computeVVOffset(p,r.vvEval);var g=v.bounds.center,y=v.bounds.centerT;a.isDirty&&(v.minZoom=-1);var b=i.vec2.copy(y,v.anchor);if(n.rotation?i.vec2.transformMat2d(b,b,s):(y[0]=b[0]+l,y[1]=b[1]+u),i.vec2.add(y,b,g),y[0]+=v.offsetX,y[1]+=v.offsetY,v.boxes)for(var x=0,w=v.boxes;x<w.length;x++){var T=w[x],S=T.centerT;i.vec2.add(S,v.anchor,T.center),n.rotation?i.vec2.transformMat2d(S,S,s):(S[0]=S[0]+l,S[1]=S[1]+u)}}return!0},e}();t.default=r}).apply(null,r))||(e.exports=n)},SkDs:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("apbF")],void 0===(n=(function(e,t,i){function r(e,t,i){if(!e.allDirty)if(null!=e.from&&null!=e.count){var r=Math.min(e.from,t),n=Math.max(e.from+e.count,t+i)-r;e.from=r,e.count=n}else e.from=t,e.count=i}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this._dirties=i.createGeometryData((function(){return{indices:{from:null,count:null,allDirty:!1}}}),(function(){return{vertices:{from:null,count:null,allDirty:!1}}}))}return e.prototype.hasDirty=function(){for(var e=0,t=this._dirties;e<t.length;e++){var i=t[e];if(null!==i.data.indices.count||i.data.indices.allDirty)return!0}return!1},e.prototype.markAllClean=function(){for(var e=0,t=this._dirties;e<t.length;e++){var i=t[e];for(var r in i.data.indices.from=null,i.data.indices.count=null,i.data.indices.allDirty=!1,i.buffers)i.buffers[r].data.vertices.from=null,i.buffers[r].data.vertices.count=null,i.buffers[r].data.vertices.allDirty=!1}},e.prototype.markAllDirty=function(){for(var e=0,t=this._dirties;e<t.length;e++){var i=t[e];for(var r in i.data.indices.allDirty=!0,i.buffers)i.buffers[r].data.vertices.allDirty=!0}},e.prototype.forEach=function(e){for(var t=0;t<this._dirties.length;++t){var i=this._dirties[t],r={};for(var n in i.buffers){var o=i.buffers[n].data.vertices;(o.allDirty||null!=o.from&&null!=o.count&&o.count>0)&&(r[n]=o)}var a,s=i.data.indices;((a=s.allDirty||null!=s.from&&null!=s.count&&s.count>0?{indices:s,vertices:r}:{indices:null,vertices:r}).indices||Object.keys(a).length>0)&&e(a,t)}},e.prototype.markDirtyIndices=function(e,t,i){r(this._dirties[e].data.indices,t,i)},e.prototype.markDirtyVertices=function(e,t,i,n){r(this._dirties[e].buffers[t].data.vertices,i,n)},e}();t.default=n}).apply(null,r))||(e.exports=n)},Sq9p:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("H1tY"),i("Zry2"),i("apbF")],void 0===(n=(function(e,t,i,r,n){Object.defineProperty(t,"__esModule",{value:!0});var o=["FILL","LINE","MARKER","TEXT","LABEL"],a=function(){function e(e,t,i,o){for(var a in this._strides=e,this._displayList=t,this._freeListsAndStorage={},this._dirtyMap=null,this._dirtyMap=i,e)for(var s in this._freeListsAndStorage[a]={vtxFreeList:o?new r.FreeList(o):null,idxFreeList:o?new r.FreeList(o):null,vertexBuffers:{},indexBuffer:o?new Uint32Array(o):null},e[a])this._freeListsAndStorage[a].vertexBuffers[s]={data:o?n.allocateTypedArrayBuffer(o,e[a][s]):null,stride:e[a][s]}}return e.fromTileData=function(t,i){var a=function(e){for(var t=e.getStrides(),i={},r=0;r<t.length;r++)i[o[r]]=t[r];return i}(t),s=[0,0,0,0,0],l=[0,0,0,0,0],u=[];t.tileDisplayData.displayObjectRegistry.forEach((function(e){u.push(e)}));for(var c=0,f=u;c<f.length;c++)for(var d=0,h=f[c].displayRecords;d<h.length;d++){var p=h[d];s[p.geometryType]=Math.max(s[p.geometryType],p.vertexFrom+p.vertexCount),l[p.geometryType]=Math.max(l[p.geometryType],p.indexFrom+p.indexCount)}for(var _=new e(a,t.tileDisplayData.displayList,i,null),m=0;m<t.tileBufferData.geometries.length;++m){var v=s[m],g=l[m],y=t.tileBufferData.geometries[m],b=_._storageFor(o[m]),x=t.tileBufferData.geometries[m].indexBuffer;b.indexBuffer=x,b.idxFreeList=new r.FreeList(x.length),b.idxFreeList.allocate(g);var w=void 0;for(var T in y.vertexBuffer){var S=t.tileBufferData.geometries[m].vertexBuffer[T];b.vertexBuffers[T].data=S.data,b.vertexBuffers[T].stride=S.stride;var C=n.strideToPackingFactor(S.stride);w||(w=S.data.length*C/S.stride)}b.vtxFreeList=new r.FreeList(w),b.vtxFreeList.allocate(v)}return _},e.prototype.delete=function(e){var t=o[e.geometryType];this._freeVertices(t,e.vertexFrom,e.vertexCount),this._freeIndices(t,e.indexFrom,e.indexCount),this._displayList.removeFromList(e),e.vertexFrom=void 0,e.indexFrom=void 0},e.prototype.setMeshData=function(e,t,i,r,a){var s=o[e.geometryType];e.meshData=null;var l=void 0,u=void 0;void 0===e.vertexFrom?l=this._allocateVertices(s,u=t.vertexCount):t.vertexCount>e.vertexCount?(this._freeVertices(s,e.vertexFrom,e.vertexCount),l=this._allocateVertices(s,u=t.vertexCount)):t.vertexCount===e.vertexCount?(l=e.vertexFrom,u=e.vertexCount):(this._freeVertices(s,e.vertexFrom+t.vertexCount,e.vertexCount-t.vertexCount),l=e.vertexFrom,u=t.vertexCount);var c=!0,f=void 0,d=void 0,h=void 0;if(void 0===e.indexFrom?(f=a,d=this._allocateIndices(s,h=t.indexCount)):t.indexCount>e.indexCount?(f=this._displayList.removeFromList(e),this._freeIndices(s,e.indexFrom,e.indexCount),d=this._allocateIndices(s,h=t.indexCount)):t.indexCount===e.indexCount?(c=!1,d=e.indexFrom,h=e.indexCount):(f=this._displayList.removeFromList(e),this._freeIndices(s,e.indexFrom+t.indexCount,e.indexCount-t.indexCount),d=e.indexFrom,h=t.indexCount),-1!==l&&-1!==d){var p=this._storageFor(s);if(n.copyMeshData(l,d,p.vertexBuffers,p.indexBuffer,t,i,r),e.vertexFrom=l,e.indexFrom=d,e.vertexCount=t.vertexCount,e.indexCount=t.indexCount,this._dirtyMap)for(var _ in this._dirtyMap.markDirtyIndices(e.geometryType,e.indexFrom,e.indexCount),i)this._dirtyMap.markDirtyVertices(e.geometryType,_,e.vertexFrom,e.vertexCount);return c&&this._displayList.addToList(e,f),!0}return-1!==l&&this._freeVertices(s,l,u),-1!==d&&this._freeIndices(s,d,h),e.setMeshDataFromBuffers(t,i,r),e.vertexFrom=void 0,e.vertexCount=0,e.indexFrom=void 0,e.indexCount=0,!1},e.prototype._allocateVertices=function(e,t){var i=this._storageFor(e),r=i.vtxFreeList.allocate(t);return-1===r||i.vtxFreeList.fragmentation>.5?-1:r},e.prototype._freeVertices=function(e,t,r){var o=this._storageFor(e);if(o.vtxFreeList.free(t,r),i("esri-feature-tiles-debug"))for(var a in o.vertexBuffers)for(var s=o.vertexBuffers[a].data,l=this._stridesFor(e,a),u=n.strideToPackingFactor(l),c=t*l/u,f=r*l/u,d=c;d<c+f;++d)s[d]=0},e.prototype._freeIndices=function(e,t,r){var n=this._storageFor(e);if(n.idxFreeList.free(t,r),i("esri-feature-tiles-debug"))for(var o=n.indexBuffer,a=t;a<t+r;++a)o[a]=0},e.prototype._allocateIndices=function(e,t){var i=this._storageFor(e),r=i.idxFreeList.allocate(t);return-1===r||i.idxFreeList.fragmentation>.5?-1:r},e.prototype._storageFor=function(e){return this._freeListsAndStorage[e]},e.prototype._stridesFor=function(e,t){return this._strides[e][t]},e}();t.default=a}).apply(null,r))||(e.exports=n)},TEGq:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("hPTP")],void 0===(n=(function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.highlight={name:"highlight",shaders:{vertexShader:i.resolveIncludes("highlight/textured.vert"),fragmentShader:i.resolveIncludes("highlight/highlight.frag")},attributes:{a_position:0,a_texcoord:1}},t.blur={name:"blur",shaders:{vertexShader:i.resolveIncludes("highlight/textured.vert"),fragmentShader:i.resolveIncludes("highlight/blur.frag")},attributes:{a_position:0,a_texcoord:1}}}).apply(null,r))||(e.exports=n)},TF9k:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("ked+"),i("ST29")],void 0===(n=(function(e,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.neighbors=new Array(9),this._tiles=new Array(t);for(var i=0;i<t;i++)this._tiles[i]=new r.default;this.key=e}return Object.defineProperty(e.prototype,"isDirty",{get:function(){for(var e=0,t=this._tiles;e<t.length;e++)if(t[e].dirty)return!0;return!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._tiles.length},enumerable:!0,configurable:!0}),e.prototype.getTile=function(e){return this._tiles[e]},e.prototype.getReference=function(e){var t=this._tiles[e];return t&&t.reference},e.prototype.onRegisterLayer=function(e){this.invalidateRange(e),this._add(e)},e.prototype.onUnregisterLayer=function(e){this.invalidateRange(e),this._remove(e)},e.prototype.onLabelsRendered=function(){},e.prototype.invalidateRange=function(e){for(var t=e;t<this._tiles.length;t++)this._tiles[t].dirty=!0},e.prototype.add=function(e){this._add(e)},e.prototype.remove=function(e){this._remove(e)},e.prototype.canDelete=function(){return 0===this._tiles.length},e.prototype.ready=function(){for(var e=0,t=this._tiles;e<t.length;e++)t[e].dirty=!1},e.prototype.computeNeighbors=function(e){this.neighbors[0]=this._getNeighbor(e,-1,-1),this.neighbors[1]=this._getNeighbor(e,0,-1),this.neighbors[2]=this._getNeighbor(e,1,-1),this.neighbors[3]=this._getNeighbor(e,-1,0),this.neighbors[4]=this,this.neighbors[5]=this._getNeighbor(e,1,0),this.neighbors[6]=this._getNeighbor(e,-1,1),this.neighbors[7]=this._getNeighbor(e,0,1),this.neighbors[8]=this._getNeighbor(e,1,1)},e.prototype.reset=function(e,t,i){var r=this._tiles[i.index];r&&r.reset(e,t,i)},e.prototype._add=function(e){var t=[];if(e>=this._tiles.length)this._tiles.push(new r.default);else{for(var i=0;i<this._tiles.length;i++)i===e&&t.push(new r.default),t.push(this._tiles[i]);this._tiles=t}},e.prototype._remove=function(e){for(var t=[],i=0;i<this._tiles.length;i++)i!==e&&t.push(this._tiles[i]);this._tiles=t},e.prototype._getNeighbor=function(e,t,r){var n=this.key,o=i.TileKey.getId(n.level,n.row+r,n.col+t,n.world);return e.has(o)?e.get(o):null},e}();t.default=n}).apply(null,r))||(e.exports=n)},TQvW:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("hPTP")],void 0===(n=(function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.background={name:"background",shaders:{vertexShader:i.resolveIncludes("background/background.vert"),fragmentShader:i.resolveIncludes("background/background.frag")},attributes:{a_pos:0}}}).apply(null,r))||(e.exports=n)},Tauk:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("tI6k")],void 0===(n=(function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){void 0===t&&(t=2),this._bucketSize=e,this._rowsLength=i.TILE_SIZE/e,this._colsLength=i.TILE_SIZE/e,this._elementsPerBucket=t,this._grid=this._initGrid()}return e.prototype.checkOverlap=function(e,t){var i=Math.floor(e/this._bucketSize),r=Math.floor(t/this._bucketSize);return i<0||i>=this._rowsLength||r<0||r>=this._colsLength||this._grid[r*this._colsLength+i]>=this._elementsPerBucket},e.prototype.markUsed=function(e,t){var i=Math.floor(e/this._bucketSize),r=Math.floor(t/this._bucketSize);this._grid[r*this._colsLength+i]+=1},e.prototype.reset=function(){this._grid=this._initGrid()},e.prototype._initGrid=function(){return new Uint8Array(this._rowsLength*this._colsLength)},e}();t.CollisionGrid=r}).apply(null,r))||(e.exports=n)},Uu9s:function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={background:{"background.frag":"uniform lowp vec4 u_color;\nvoid main() {\n gl_FragColor = u_color;\n}","background.vert":"attribute vec2 a_pos;\nuniform highp mat3 u_dvsMat3;\nuniform mediump vec2 u_coord_range;\nuniform mediump float u_depth;\nvoid main() {\n vec3 v_pos = u_dvsMat3 * vec3(u_coord_range * a_pos, 1.0);\n gl_Position = vec4(v_pos.xy, 0.0, 1.0);\n}"},bitBlit:{"bitBlit.frag":"uniform lowp sampler2D u_tex;\nuniform lowp float u_opacity;\nvarying mediump vec2 v_uv;\nvoid main() {\n lowp vec4 color = texture2D(u_tex, v_uv);\n gl_FragColor = color * u_opacity;\n}","bitBlit.vert":"attribute vec2 a_pos;\nattribute vec2 a_tex;\nvarying mediump vec2 v_uv;\nvoid main(void) {\n gl_Position = vec4(a_pos, 0.0, 1.0);\n v_uv = a_tex;\n}"},blend:{"blend.frag":"precision mediump float;\nuniform sampler2D u_layerTexture;\nuniform lowp float u_opacity;\n#ifndef NORMAL\nuniform sampler2D u_backbufferTexture;\n#endif\nvarying mediump vec2 v_uv;\nfloat rgb2v(in vec3 c) {\n return max(c.x, max(c.y, c.z));\n}\nvec3 rgb2hsv(in vec3 c) {\n vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n vec4 p = c.g < c.b ? vec4(c.bg, K.wz) : vec4(c.gb, K.xy);\n vec4 q = c.r < p.x ? vec4(p.xyw, c.r) : vec4(c.r, p.yzx);\n float d = q.x - min(q.w, q.y);\n float e = 1.0e-10;\n return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), min(d / (q.x + e), 1.0), q.x);\n}\nvec3 hsv2rgb(in vec3 c) {\n vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\nvec3 tint(in vec3 Cb, in vec3 Cs) {\n float vIn = rgb2v(Cb);\n vec3 hsvTint = rgb2hsv(Cs);\n vec3 hsvOut = vec3(hsvTint.x, hsvTint.y, vIn * hsvTint.z);\n return hsv2rgb(hsvOut);\n}\nfloat overlay(in float Cb, in float Cs) {\n return (1.0 - step(0.5, Cs)) * (1.0 - 2.0 * (1.0 - Cs ) * (1.0 - Cb)) + step(0.5, Cs) * (2.0 * Cs * Cb);\n}\nfloat colorDodge(in float Cb, in float Cs) {\n return (Cb == 0.0) ? 0.0 : (Cs == 1.0) ? 1.0 : min(1.0, Cb / (1.0 - Cs));\n}\nfloat colorBurn(in float Cb, in float Cs) {\n return (Cb == 1.0) ? 1.0 : (Cs == 0.0) ? 0.0 : 1.0 - min(1.0, (1.0 - Cb) / Cs);\n}\nfloat hardLight(in float Cb, in float Cs) {\n return (1.0 - step(0.5, Cs)) * (2.0 * Cs * Cb) + step(0.5, Cs) * (1.0 - 2.0 * (1.0 - Cs) * (1.0 - Cb));\n}\nfloat reflectBlend(in float Cb, in float Cs) {\n\treturn (Cs == 1.0) ? Cs : min(Cb * Cb / (1.0 - Cs), 1.0);\n}\nfloat softLight(in float Cb, in float Cs) {\n if (Cs <= 0.5) {\n return Cb - (1.0 - 2.0 * Cs) * Cb * (1.0 - Cb);\n }\n if (Cb <= 0.25) {\n return Cb + (2.0 * Cs - 1.0) * Cb * ((16.0 * Cb - 12.0) * Cb + 3.0);\n }\n return Cb + (2.0 * Cs - 1.0) * (sqrt(Cb) - Cb);\n}\nfloat vividLight(in float Cb, in float Cs) {\n return (1.0 - step(0.5, Cs)) * colorBurn(Cb, 2.0 * Cs) + step(0.5, Cs) * colorDodge(Cb, (2.0 * (Cs - 0.5)));\n}\nfloat minv3(in vec3 c) {\n return min(min(c.r, c.g), c.b);\n}\nfloat maxv3(in vec3 c) {\n return max(max(c.r, c.g), c.b);\n}\nfloat lumv3(in vec3 c) {\n return dot(c, vec3(0.3, 0.59, 0.11));\n}\nfloat satv3(vec3 c) {\n return maxv3(c) - minv3(c);\n}\nvec3 clipColor(vec3 color) {\n float lum = lumv3(color);\n float mincol = minv3(color);\n float maxcol = maxv3(color);\n if (mincol < 0.0) {\n color = lum + ((color - lum) * lum) / (lum - mincol);\n }\n if (maxcol > 1.0) {\n color = lum + ((color - lum) * (1.0 - lum)) / (maxcol - lum);\n }\n return color;\n}\nvec3 setLum(vec3 cbase, vec3 clum) {\n float lbase = lumv3(cbase);\n float llum = lumv3(clum);\n float ldiff = llum - lbase;\n vec3 color = cbase + vec3(ldiff);\n return clipColor(color);\n}\nvec3 setLumSat(vec3 cbase, vec3 csat, vec3 clum)\n{\n float minbase = minv3(cbase);\n float sbase = satv3(cbase);\n float ssat = satv3(csat);\n vec3 color;\n if (sbase > 0.0) {\n color = (cbase - minbase) * ssat / sbase;\n } else {\n color = vec3(0.0);\n }\n return setLum(color, clum);\n}\nvoid main() {\n vec4 src = texture2D(u_layerTexture, v_uv);\n#ifdef NORMAL\n gl_FragColor = src * u_opacity;\n#else\n vec4 dst = texture2D(u_backbufferTexture, v_uv);\n vec3 Cs = src.a == 0.0 ? src.rgb : vec3(src.rgb / src.a);\n vec3 Cb = dst.a == 0.0 ? dst.rgb : vec3(dst.rgb / dst.a);\n float as = u_opacity * src.a;\n float ab = dst.a;\n #ifdef DESTINATION_OVER\n gl_FragColor = vec4(as * Cs * (1.0 - ab) + ab * Cb, as + ab - as * ab);\n #endif\n #ifdef SOURCE_IN\n gl_FragColor = vec4(as * Cs * ab, as * ab);\n #endif\n #ifdef DESTINATION_IN\n gl_FragColor = vec4(ab * Cb * as, ab * as);\n #endif\n #ifdef SOURCE_OUT\n gl_FragColor = vec4(as * Cs * (1.0 - ab), as * (1.0 - ab));\n #endif\n #ifdef DESTINATION_OUT\n gl_FragColor = vec4(ab * Cb * (1.0 - as), ab * (1.0 - as));\n #endif\n #ifdef SOURCE_ATOP\n gl_FragColor = vec4(as * Cs * ab + ab * Cb * (1.0 - as), ab);\n #endif\n #ifdef DESTINATION_ATOP\n gl_FragColor = vec4(as * Cs * (1.0 - ab) + ab * Cb * as, as);\n #endif\n #ifdef XOR\n gl_FragColor = vec4(as * Cs * (1.0 - ab) + ab * Cb * (1.0 - as),\n as * (1.0 - ab) + ab * (1.0 - as));\n #endif\n #ifdef MULTIPLY\n gl_FragColor = vec4(as * Cs * ab * Cb + (1.0 - ab) * as * Cs + (1.0 - as) * ab * Cb,\n as + ab * (1.0 - as));\n #endif\n #ifdef SCREEN\n gl_FragColor = vec4((Cs + Cb - Cs * Cb) * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\n as + ab * (1.0 - as));\n #endif\n #ifdef OVERLAY\n vec3 f = vec3(overlay(Cb.r, Cs.r), overlay(Cb.g, Cs.g), overlay(Cb.b, Cs.b));\n gl_FragColor = vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\n as + ab * (1.0 - as));\n #endif\n #ifdef DARKEN\n gl_FragColor = vec4(min(Cs, Cb) * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\n as + ab * (1.0 - as));\n #endif\n #ifdef LIGHTER\n gl_FragColor = vec4(as * Cs + ab * Cb, as + ab);\n #endif\n #ifdef LIGHTEN\n gl_FragColor = vec4(max(Cs, Cb) * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\n as + ab * (1.0 - as));\n #endif\n #ifdef COLOR_DODGE\n vec3 f = vec3(colorDodge(Cb.r, Cs.r), colorDodge(Cb.g, Cs.g), colorDodge(Cb.b, Cs.b));\n gl_FragColor = vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\n as + ab * (1.0 - as));\n #endif\n #ifdef COLOR_BURN\n vec3 f = vec3(colorBurn(Cb.r, Cs.r), colorBurn(Cb.g, Cs.g), colorBurn(Cb.b, Cs.b));\n gl_FragColor = vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\n as + ab * (1.0 - as));\n #endif\n #ifdef HARD_LIGHT\n vec3 f = vec3(hardLight(Cb.r, Cs.r), hardLight(Cb.g, Cs.g), hardLight(Cb.b, Cs.b));\n gl_FragColor = vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\n as + ab * (1.0 - as));\n #endif\n #ifdef SOFT_LIGHT\n vec3 f = vec3(softLight(Cb.r, Cs.r), softLight(Cb.g, Cs.g), softLight(Cb.b, Cs.b));\n gl_FragColor = vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\n as + ab * (1.0 - as));\n #endif\n #ifdef DIFFERENCE\n gl_FragColor = vec4(abs(Cb - Cs) * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\n as + ab * (1.0 - as));\n #endif\n #ifdef EXCLUSION\n vec3 f = Cs + Cb - 2.0 * Cs * Cb;\n gl_FragColor = vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\n as + ab * (1.0 - as));\n #endif\n #ifdef INVERT\n gl_FragColor = vec4((1.0 - Cb) * as * ab + Cb * ab * (1.0 - as), ab);\n #endif\n #ifdef VIVID_LIGHT\n vec3 f = vec3(vividLight(Cb.r, Cs.r),\n vividLight(Cb.g, Cs.g),\n vividLight(Cb.b, Cs.b));\n gl_FragColor = vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\n as + ab * (1.0 - as));\n #endif\n #ifdef HUE\n vec3 f = setLumSat(Cs,Cb,Cb);\n gl_FragColor = vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\n as + ab * (1.0 - as));\n #endif\n #ifdef SATURATION\n vec3 f = setLumSat(Cb,Cs,Cb);\n gl_FragColor = vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\n as + ab * (1.0 - as));\n #endif\n #ifdef COLOR\n vec3 f = setLum(Cs,Cb);\n gl_FragColor = vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\n as + ab * (1.0 - as));\n #endif\n #ifdef LUMINOSITY\n vec3 f = setLum(Cb,Cs);\n gl_FragColor = vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\n as + ab * (1.0 - as));\n #endif\n #ifdef PLUS\n gl_FragColor = clamp(vec4(src.r + Cb.r, src.g + Cb.g, src.b + Cb.b, as + ab), 0.0, 1.0);\n #endif\n #ifdef MINUS\n gl_FragColor = vec4(clamp(vec3(Cb.r - src.r, Cb.g - src.g, Cb.b - src.b), 0.0, 1.0), ab * as);\n #endif\n #ifdef AVERAGE\n vec3 f = (Cb + Cs) / 2.0;\n gl_FragColor = vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\n as + ab * (1.0 - as));\n #endif\n #ifdef REFLECT\n vec3 f = vec3(reflectBlend(Cb.r, Cs.r),\n reflectBlend(Cb.g, Cs.g),\n reflectBlend(Cb.b, Cs.b));\n gl_FragColor = vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\n as + ab * (1.0 - as));\n #endif\n#endif\n}","blend.vert":"attribute vec2 a_position;\nvarying mediump vec2 v_uv;\nvoid main(void) {\n gl_Position = vec4(a_position , 0.0, 1.0);\n v_uv = (a_position + 1.0) / 2.0;\n}"},filtering:{"bicubic.glsl":"vec4 computeWeights(float v) {\n float b = 1.0 / 6.0;\n float v2 = v * v;\n float v3 = v2 * v;\n float w0 = b * (-v3 + 3.0 * v2 - 3.0 * v + 1.0);\n float w1 = b * (3.0 * v3 - 6.0 * v2 + 4.0);\n float w2 = b * (-3.0 * v3 + 3.0 * v2 + 3.0 * v + 1.0);\n float w3 = b * v3;\n return vec4(w0, w1, w2, w3);\n}\nvec4 bicubicOffsetsAndWeights(float v) {\n vec4 w = computeWeights(v);\n float g0 = w.x + w.y;\n float g1 = w.z + w.w;\n float h0 = 1.0 - (w.y / g0) + v;\n float h1 = 1.0 + (w.w / g1) - v;\n return vec4(h0, h1, g0, g1);\n}\nvec4 sampleBicubicBSpline(sampler2D sampler, vec2 coords, vec2 texSize) {\n vec2 eX = vec2(1.0 / texSize.x, 0.0);\n vec2 eY = vec2(0.0, 1.0 / texSize.y);\n vec2 texel = coords * texSize - 0.5;\n vec3 hgX = bicubicOffsetsAndWeights(fract(texel).x).xyz;\n vec3 hgY = bicubicOffsetsAndWeights(fract(texel).y).xyz;\n vec2 coords10 = coords + hgX.x * eX;\n vec2 coords00 = coords - hgX.y * eX;\n vec2 coords11 = coords10 + hgY.x * eY;\n vec2 coords01 = coords00 + hgY.x * eY;\n coords10 = coords10 - hgY.y * eY;\n coords00 = coords00 - hgY.y * eY;\n vec4 color00 = texture2D(sampler, coords00);\n vec4 color10 = texture2D(sampler, coords10);\n vec4 color01 = texture2D(sampler, coords01);\n vec4 color11 = texture2D(sampler, coords11);\n color00 = mix(color00, color01, hgY.z);\n color10 = mix(color10, color11, hgY.z);\n color00 = mix(color00, color10, hgX.z);\n return color00;\n}","bilinear.glsl":"vec4 sampleBilinear(sampler2D sampler, vec2 coords, vec2 texSize) {\n vec2 texelStart = floor(coords * texSize);\n vec2 coord0 = texelStart / texSize;\n vec2 coord1 = (texelStart + vec2(1.0, 0.0)) / texSize;\n vec2 coord2 = (texelStart + vec2(0.0, 1.0)) / texSize;\n vec2 coord3 = (texelStart + vec2(1.0, 1.0)) / texSize;\n vec4 color0 = texture2D(sampler, coord0);\n vec4 color1 = texture2D(sampler, coord1);\n vec4 color2 = texture2D(sampler, coord2);\n vec4 color3 = texture2D(sampler, coord3);\n vec2 blend = fract(coords * texSize);\n vec4 color01 = mix(color0, color1, blend.x);\n vec4 color23 = mix(color2, color3, blend.x);\n return mix(color01, color23, blend.y);\n}","epx.glsl":"vec4 sampleEPX(sampler2D sampler, float size, vec2 coords, vec2 texSize) {\n vec2 invSize = 1.0 / texSize;\n vec2 texel = coords * texSize;\n vec2 texel_i = floor(texel);\n vec2 texel_frac = fract(texel);\n vec4 colorP = texture2D(sampler, texel_i * invSize);\n vec4 colorP1 = vec4(colorP);\n vec4 colorP2 = vec4(colorP);\n vec4 colorP3 = vec4(colorP);\n vec4 colorP4 = vec4(colorP);\n vec4 colorA = texture2D(sampler, (texel_i - vec2(0.0, 1.0)) * invSize);\n vec4 colorB = texture2D(sampler, (texel_i + vec2(1.0, 0.0)) * invSize);\n vec4 colorC = texture2D(sampler, (texel_i - vec2(1.0, 0.0)) * invSize);\n vec4 colorD = texture2D(sampler, (texel_i + vec2(0.0, 1.0)) * invSize);\n if (colorC == colorA && colorC != colorD && colorA != colorB) {\n colorP1 = colorA;\n }\n if (colorA == colorB && colorA != colorC && colorB != colorD) {\n colorP2 = colorB;\n }\n if (colorD == colorC && colorD != colorB && colorC != colorA) {\n colorP3 = colorC;\n }\n if (colorB == colorD && colorB != colorA && colorD != colorC) {\n colorP4 = colorD;\n }\n vec4 colorP12 = mix(colorP1, colorP2, texel_frac.x);\n vec4 colorP34 = mix(colorP1, colorP2, texel_frac.x);\n return mix(colorP12, colorP34, texel_frac.y);\n}"},fx:{integrate:{"integrate.frag":"precision mediump float;\nuniform lowp sampler2D u_sourceTexture;\nuniform lowp sampler2D u_maskTexture;\nuniform mediump float u_zoomLevel;\nuniform highp float u_timeDelta;\nuniform highp float u_animationTime;\nvarying highp vec2 v_texcoord;\n#include <materials/utils.glsl>\nvoid main()\n{\n#ifdef DELTA\n vec4 texel = texture2D(u_sourceTexture, v_texcoord);\n vec4 data0 = texture2D(u_maskTexture, v_texcoord);\n float flags = data0.r * 255.0;\n float groupMinZoom = data0.g * 255.0;\n float isVisible = getFilterBit(flags, 0);\n float wouldClip = step(groupMinZoom, u_zoomLevel);\n float direction = wouldClip * 1.0 + (1.0 - wouldClip) * -1.0;\n float dt = u_timeDelta / max(u_animationTime, 0.0001);\n vec4 nextState = vec4(texel + direction * dt);\n gl_FragColor = vec4(nextState);\n#elif defined(UPDATE)\n vec4 texel = texture2D(u_sourceTexture, v_texcoord);\n gl_FragColor = texel;\n#endif\n}","integrate.vert":"precision mediump float;\nattribute vec2 a_pos;\nvarying highp vec2 v_texcoord;\nvoid main()\n{\n v_texcoord = a_pos;\n gl_Position = vec4(a_pos * 2.0 - 1.0, 0.0, 1.0);\n}"}},highlight:{"blur.frag":"varying mediump vec2 v_texcoord;\nuniform mediump vec4 u_direction;\nuniform mediump mat4 u_channelSelector;\nuniform mediump vec4 u_sigmas;\nuniform sampler2D u_texture;\nmediump vec4 gauss4(mediump vec2 dir) {\n return exp(-dot(dir, dir) / (2.0 * u_sigmas * u_sigmas));\n}\nmediump float gauss1(mediump vec2 dir) {\n return exp(-dot(dir, dir) / (2.0 * u_sigmas[3] * u_sigmas[3]));\n}\nmediump vec4 selectChannel(mediump vec4 sample) {\n return u_channelSelector * sample;\n}\nvoid accumGauss4(mediump float i, inout mediump vec4 tot, inout mediump vec4 weight) {\n mediump vec4 w = gauss4(i * u_direction.xy);\n tot += selectChannel(texture2D(u_texture, v_texcoord + i * u_direction.zw)) * w;\n weight += w;\n}\nvoid accumGauss1(mediump float i, inout mediump float tot, inout mediump float weight) {\n mediump float w = gauss1(i * u_direction.xy);\n tot += selectChannel(texture2D(u_texture, v_texcoord + i * u_direction.zw))[3] * w;\n weight += w;\n}\nvoid main(void) {\n mediump float tot = 0.0;\n mediump float weight = 0.0;\n accumGauss1(-4.0, tot, weight);\n accumGauss1(-3.0, tot, weight);\n accumGauss1(-2.0, tot, weight);\n accumGauss1(-1.0, tot, weight);\n accumGauss1(0.0, tot, weight);\n accumGauss1(1.0, tot, weight);\n accumGauss1(2.0, tot, weight);\n accumGauss1(3.0, tot, weight);\n accumGauss1(4.0, tot, weight);\n gl_FragColor = vec4(0.0, 0.0, 0.0, tot / weight);\n}","highlight.frag":"varying mediump vec2 v_texcoord;\nuniform sampler2D u_texture;\nuniform mediump vec4 u_sigmas;\nuniform sampler2D u_shade;\nuniform mediump vec2 u_minMaxDistance;\nmediump float estimateDistance() {\n mediump float sigma = u_sigmas[3];\n mediump float y = texture2D(u_texture, v_texcoord)[3];\n const mediump float y0 = 0.5;\n mediump float m0 = 1.0 / (sqrt(2.0 * 3.1415) * sigma);\n mediump float d = (y - y0) / m0;\n return d;\n}\nmediump vec4 shade(mediump float d) {\n mediump float mappedDistance = (d - u_minMaxDistance.x) / (u_minMaxDistance.y - u_minMaxDistance.x);\n mappedDistance = clamp(mappedDistance, 0.0, 1.0);\n return texture2D(u_shade, vec2(mappedDistance, 0.5));\n}\nvoid main(void) {\n mediump float d = estimateDistance();\n gl_FragColor = shade(d);\n}","textured.vert":"attribute mediump vec2 a_position;\nattribute mediump vec2 a_texcoord;\nvarying mediump vec2 v_texcoord;\nvoid main(void) {\n gl_Position = vec4(a_position, 0.0, 1.0);\n v_texcoord = a_texcoord;\n}"},magnifier:{"magnifier.frag":"uniform lowp vec4 u_background;\nuniform mediump sampler2D u_readbackTexture;\nuniform mediump sampler2D u_maskTexture;\nuniform mediump sampler2D u_overlyTexture;\nvarying mediump vec2 v_texCoord;\nvoid main(void)\n{\n lowp vec4 color = texture2D(u_readbackTexture, v_texCoord);\n color = color + (1.0 - color.a) * u_background;\n lowp vec4 mask_color = texture2D(u_maskTexture, v_texCoord);\n lowp float gray = 1.0 - dot(mask_color, vec4(0.3, 0.59, 0.11, 0));\n color *= gray;\n lowp vec4 overley_color = texture2D(u_overlyTexture, v_texCoord);\n overley_color.rgb *= overley_color.a;\n gl_FragColor = overley_color + (1.0 - overley_color.a) * color;\n}","magnifier.vert":"precision mediump float;\nattribute mediump vec2 a_pos;\nuniform mediump vec2 u_drawPos;\nuniform mediump float u_width;\nuniform mediump float u_height;\nvarying mediump vec2 v_texCoord;\nvoid main(void)\n{\n v_texCoord = a_pos;\n vec2 coord = u_drawPos + vec2(a_pos - 0.5) * vec2(u_width, u_height);\n gl_Position = vec4(coord, 0.0, 1.0);\n}"},materials:{"attributeData.glsl":"uniform highp sampler2D u_attributeData0;\nuniform highp sampler2D u_attributeData1;\nuniform highp sampler2D u_attributeData2;\nuniform highp sampler2D u_attributeData3;\nuniform highp int u_attributeTextureSize;\nhighp vec2 getAttributeDataCoords(in highp vec4 id) {\n highp vec4 texel = unpackLocalIdTexel(id);\n highp float size = float(u_attributeTextureSize);\n highp float u32 = float(int(texel.r) + int(texel.g) * 256 + int(texel.b) * 256 * 256 + int(texel.a) * 256 * 256 * 256);\n highp float col = mod(u32, size);\n highp float row = (u32 - col) / size;\n highp float u = col / size;\n highp float v = row / size;\n return vec2(u, v);\n}\nhighp vec4 getAttributeData0(in highp vec4 id) {\n vec2 coords = getAttributeDataCoords(id);\n return texture2D(u_attributeData0, coords);\n}\nhighp vec4 getAttributeData1(in highp vec4 id) {\n highp vec2 coords = getAttributeDataCoords(id);\n return texture2D(u_attributeData1, coords);\n}\nhighp vec4 getAttributeData2(in highp vec4 id) {\n highp vec2 coords = getAttributeDataCoords(id);\n return texture2D(u_attributeData2, coords);\n}\nhighp vec4 getAttributeData3(in highp vec4 id) {\n highp vec2 coords = getAttributeDataCoords(id);\n return texture2D(u_attributeData3, coords);\n}\nfloat u88VVToFloat(in vec2 v) {\n bool isMagic = v.x == 255.0 && v.y == 255.0;\n if (isMagic) {\n return NAN_MAGIC_NUMBER;\n }\n return (v.x + v.y * float(0x100)) - 32768.0;\n}","constants.glsl":"const float C_DEG_TO_RAD = 3.14159265359 / 180.0;\nconst float C_256_TO_RAD = 3.14159265359 / 128.0;\nconst float SIGNED_BYTE_TO_UNSIGNED = 128.0;\nconst float POSITION_PRECISION = 1.0 / 8.0;\nconst float SOFT_EDGE_RATIO = 1.0;\nconst float THIN_LINE_WIDTH_FACTOR = 1.1;\nconst float THIN_LINE_HALF_WIDTH = 1.0;\nconst float EXTRUDE_SCALE_PLACEMENT_PADDING = 1.0 / 4.0;\nconst float OFFSET_PRECISION = 1.0 / 8.0;\nconst float OUTLINE_SCALE = 1.0 / 5.0;\nconst float SDF_FONT_SIZE = 24.0;\nconst float MAX_SDF_DISTANCE = 8.0;\nconst float PLACEMENT_PADDING = 8.0;\nconst float EPSILON = 0.0000001;\nconst int MAX_FILTER_COUNT = 2;\nconst int ATTR_VV_SIZE = 0;\nconst int ATTR_VV_COLOR = 1;\nconst int ATTR_VV_OPACITY = 2;\nconst int ATTR_VV_ROTATION = 3;\nconst highp float NAN_MAGIC_NUMBER = 1e-30;","effects.glsl":"uniform highp mat4 u_insideEffectMat4[ MAX_FILTER_COUNT ];\nuniform highp mat4 u_outsideEffectMat4[ MAX_FILTER_COUNT ];\nuniform highp float u_insideOpacities[ MAX_FILTER_COUNT ];\nuniform highp float u_outsideOpacities[ MAX_FILTER_COUNT ];\nvec4 getEffectColor(in vec4 color, in float filterFlags) {\n vec4 rgbw = vec4(color.a > 0.0 ? color.rgb / color.a : vec3(0.0), 1.0);\n float a = color.a;\n for (int i = 1; i < EFFECT_COUNT + 1; i++) {\n float bit = getFilterBit(filterFlags, i);\n rgbw = u_insideEffectMat4[ i ] * (bit * rgbw) + u_outsideEffectMat4[ i ] * ((1.0 - bit) * rgbw);\n a = u_insideOpacities[ i ] * (bit * a) + u_outsideOpacities[ i ] * ((1.0 - bit) * a);\n }\n return vec4(rgbw.rgb * a, a);\n}\nvec3 applyFilter(inout vec4 color, inout vec3 pos, in float filterFlags) {\n vec4 rgbw = vec4(color.a > 0.0 ? color.rgb / color.a : vec3(0.0), 1.0);\n float a = color.a;\n for (int i = 0; i < EFFECT_COUNT + 1; i++) {\n float bit = getFilterBit(filterFlags, i);\n rgbw = u_insideEffectMat4[ i ] * (bit * rgbw) + u_outsideEffectMat4[ i ] * ((1.0 - bit) * rgbw);\n a = u_insideOpacities[ i ] * (bit * a) + u_outsideOpacities[ i ] * ((1.0 - bit) * a);\n }\n color.rgb = rgbw.rgb * a;\n color.a = a;\n pos.z += 2.0 * (1.0 - getFilterBit(filterFlags, 0));\n#ifdef HIGHLIGHT\n pos.z += 2.0 * (1.0 - getHighlightBit(filterFlags));\n#endif\n return pos;\n}\nvec3 applyFilterLabels(inout vec4 color, inout vec3 pos, in float filterFlags) {\n float bit = getFilterBit(filterFlags, 0);\n pos.z += 2.0 * (1.0 - bit);\n#ifndef OUTSIDE_LABELS_VISIBLE\n for (int i = 1; i < EFFECT_COUNT + 1; i++) {\n float bit = getFilterBit(filterFlags, i);\n pos.z += 2.0 * (1.0 - bit);\n }\n#endif\n return pos;\n}",fill:{"common.glsl":"#ifdef PATTERN\nuniform mediump vec2 u_mosaicSize;\n#endif\n#ifdef DOT_DENSITY\nuniform lowp vec4 u_isActive[ 2 ];\nuniform highp float u_dotValue;\nuniform highp float u_tileDotsOverArea;\nuniform highp float u_dotTextureDotCount;\nuniform mediump float u_tileZoomFactor;\n#endif\nvarying vec3 v_pos;\nvarying lowp float v_opacity;\nvarying lowp vec4 v_color;\nvarying highp vec4 v_id;\nvarying highp float v_flags;\n#ifdef PATTERN\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_tileTextureCoord;\n#endif\n#ifdef DOT_DENSITY\nvarying highp vec2 v_dotTextureCoords;\nvarying highp vec4 v_dotThresholds[ 2 ];\n#endif","fill.frag":"precision highp float;\n#include <materials/constants.glsl>\n#include <materials/utils.glsl>\n#include <materials/fill/common.glsl>\n#ifdef DOT_DENSITY\n#include <materials/effects.glsl>\n#endif\n#ifdef PATTERN\nuniform lowp sampler2D u_texture;\n#endif\n#ifdef DOT_DENSITY\nuniform mediump mat4 u_dotColors[ 2 ];\nuniform sampler2D u_dotTextures[ 2 ];\nuniform vec4 u_dotBackgroundColor;\n#endif\nvoid main() {\n#ifdef ID\n gl_FragColor = v_id;\n#elif defined(PATTERN)\n mediump vec2 normalizedTextureCoord = mod(v_tileTextureCoord, 1.0);\n mediump vec2 samplePos = mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);\n lowp vec4 color = texture2D(u_texture, samplePos);\n gl_FragColor = v_opacity * v_color * color;\n#elif defined(DOT_DENSITY) && !defined(HIGHLIGHT)\n vec4 textureThresholds0 = texture2D(u_dotTextures[0], v_dotTextureCoords);\n vec4 textureThresholds1 = texture2D(u_dotTextures[1], v_dotTextureCoords);\n vec4 difference0 = v_dotThresholds[0] - textureThresholds0;\n vec4 difference1 = v_dotThresholds[1] - textureThresholds1;\n#ifdef DD_DOT_BLENDING\n vec4 isPositive0 = step(0.0, difference0);\n vec4 isPositive1 = step(0.0, difference1);\n float weightSum = dot(isPositive0, difference0) + dot(isPositive1, difference1);\n float lessThanEqZero = step(weightSum, 0.0);\n float greaterThanZero = 1.0 - lessThanEqZero ;\n float divisor = (weightSum + lessThanEqZero);\n vec4 weights0 = difference0 * isPositive0 / divisor;\n vec4 weights1 = difference1 * isPositive1 / divisor;\n vec4 dotColor = u_dotColors[0] * weights0 + u_dotColors[1] * weights1;\n vec4 preEffectColor = greaterThanZero * dotColor + lessThanEqZero * u_dotBackgroundColor;\n#else\n float diffMax = max(max4(difference0), max4(difference1));\n float lessThanZero = step(diffMax, 0.0);\n float greaterOrEqZero = 1.0 - lessThanZero;\n vec4 isMax0 = step(diffMax, difference0);\n vec4 isMax1 = step(diffMax, difference1);\n vec4 dotColor = u_dotColors[0] * isMax0 + u_dotColors[1] * isMax1;\n vec4 preEffectColor = greaterOrEqZero * dotColor + lessThanZero * u_dotBackgroundColor;\n#endif\n gl_FragColor = getEffectColor(preEffectColor, v_flags);\n#else\n gl_FragColor = v_opacity * v_color;\n#endif\n#ifdef HIGHLIGHT\n gl_FragColor.a = 1.0;\n#endif\n}","fill.vert":"precision highp float;\n#ifdef DOT_DENSITY\nattribute float a_inverseArea;\nvec4 a_color = vec4(0.0, 0.0, 0.0, 1.0);\nvec4 a_aux3 = vec4(0.0);\n#else\nattribute vec4 a_color;\nattribute vec4 a_tlbr;\nattribute vec4 a_aux1;\nattribute vec2 a_aux2;\nattribute vec4 a_aux3;\n#endif\n#include <materials/vcommon.glsl>\n#include <materials/fill/common.glsl>\n#ifdef DOT_DENSITY\nvec4 dotThreshold(vec4 featureAttrOverFeatureArea, float dotValue, float tileDotsOverArea) {\n return featureAttrOverFeatureArea * (1.0 / dotValue) * (1.0 / tileDotsOverArea);\n}\n#endif\nvoid main()\n{\n INIT;\n float a_bitSet = a_aux3.a;\n v_color = getColor(a_color, a_bitSet, 0);\n v_opacity = getOpacity();\n v_id = norm(a_id);\n v_pos = u_dvsMat3 * vec3(a_pos * POSITION_PRECISION, 1.);\n v_flags = getFilterFlags();\n#ifdef PATTERN\n vec2 aux2 = (1.0 / SIGNED_BYTE_TO_UNSIGNED) * a_aux2;\n float width = u_zoomFactor * a_aux1.x * aux2.x;\n float height = u_zoomFactor * a_aux1.y * aux2.y;\n float angle = C_256_TO_RAD * a_aux3.z;\n float sinA = sin(angle);\n float cosA = cos(angle);\n mat3 patternMatrix = mat3(cosA / width, sinA / height, 0,\n -sinA / width, cosA / height, 0,\n 0, 0, 1);\n vec2 symbolOffset = (a_aux1.zw - SIGNED_BYTE_TO_UNSIGNED) / vec2(width, height);\n v_tileTextureCoord = (patternMatrix * vec3(a_pos * POSITION_PRECISION, 1.0)).xy - symbolOffset;\n v_tlbr = a_tlbr / u_mosaicSize.xyxy;\n#elif defined(DOT_DENSITY)\n vec4 ddAttributeData0 = getAttributeData2(a_id) * u_isActive[0] * a_inverseArea;\n vec4 ddAttributeData1 = getAttributeData3(a_id) * u_isActive[1] * a_inverseArea;\n float size = u_tileZoomFactor * 512.0 * 1.0 / u_pixelRatio;\n v_dotThresholds[0] = dotThreshold(ddAttributeData0, u_dotValue, u_tileDotsOverArea);\n v_dotThresholds[1] = dotThreshold(ddAttributeData1, u_dotValue, u_tileDotsOverArea);\n v_dotTextureCoords = (a_pos * POSITION_PRECISION + 0.5) / size;\n#endif\n gl_Position = vec4(applyFilter(v_color, v_pos, v_flags), 1.0);\n}"},icon:{"common.glsl":"uniform lowp vec2 u_mosaicSize;\nvarying lowp vec4 v_color;\nvarying highp vec4 v_id;\nvarying highp vec4 v_sizeTex;\nvarying mediump vec3 v_pos;\nvarying highp float v_filters;\nvarying lowp float v_opacity;\n#ifdef SDF\nvarying lowp vec4 v_outlineColor;\nvarying mediump float v_outlineWidth;\nvarying mediump float v_distRatio;\nvarying mediump float v_overridingOutlineColor;\nvarying mediump float v_isThin;\n#endif","icon.frag":"precision mediump float;\n#include <materials/constants.glsl>\n#include <materials/utils.glsl>\n#include <util/encoding.glsl>\n#include <materials/effects.glsl>\n#include <materials/constants.glsl>\n#include <materials/icon/common.glsl>\nuniform lowp sampler2D u_texture;\nvoid main()\n{\n vec2 v_size = v_sizeTex.xy;\n vec2 v_tex = v_sizeTex.zw;\n#ifdef SDF\n lowp vec4 fillPixelColor = v_color;\n float d = 0.5 - rgba2float(texture2D(u_texture, v_tex));\n float size = max(v_size.x, v_size.y);\n float dist = d * size * SOFT_EDGE_RATIO * v_distRatio;\n fillPixelColor *= clamp(0.5 - dist, 0.0, 1.0);\n float outlineWidth = v_outlineWidth;\n #ifdef HIGHLIGHT\n outlineWidth = max(outlineWidth, 4.0 * v_isThin);\n #endif\n if (outlineWidth > 0.25) {\n lowp vec4 outlinePixelColor = v_overridingOutlineColor * v_color + (1.0 - v_overridingOutlineColor) * v_outlineColor;\n float clampedOutlineSize = min(outlineWidth, size);\n outlinePixelColor *= clamp(0.5 - abs(dist) + clampedOutlineSize * 0.5, 0.0, 1.0);\n gl_FragColor = v_opacity * ((1.0 - outlinePixelColor.a) * fillPixelColor + outlinePixelColor);\n }\n else {\n gl_FragColor = v_opacity * fillPixelColor;\n }\n#else\n lowp vec4 texColor = texture2D(u_texture, v_tex);\n gl_FragColor = v_opacity * getEffectColor(texColor, v_filters);\n#endif\n#ifdef HIGHLIGHT\n gl_FragColor.a = step(1.0 / 255.0, gl_FragColor.a);\n#endif\n#ifdef ID\n if (gl_FragColor.a < 1.0 / 255.0) {\n discard;\n }\n gl_FragColor = v_id;\n#endif\n}","icon.vert":"precision highp float;\nattribute vec4 a_color;\nattribute vec4 a_outlineColor;\nattribute vec4 a_sizeAndOutlineWidth;\nattribute vec2 a_vertexOffset;\nattribute vec2 a_texCoords;\nattribute vec4 a_bitSetAndDistRatio;\n#include <materials/vcommon.glsl>\n#include <materials/icon/common.glsl>\nvec2 getMarkerSize(inout vec2 offset, inout vec2 baseSize, inout float outlineSize, in float referenceSize, in float bitSet) {\n#ifdef VV_SIZE\n float r = getSize(baseSize.y) / referenceSize;\n baseSize.xy *= r;\n offset.xy *= r;\n float scaleSymbolProportionally = getBit(bitSet, 3);\n outlineSize *= scaleSymbolProportionally * (r - 1.0) + 1.0;\n#endif\n return baseSize;\n}\nvec3 getOffset(in vec2 in_offset, float a_bitSet) {\n float isMapAligned = getBit(a_bitSet, 0);\n vec3 offset = getRotation() * vec3(in_offset, 0.0);\n return getMatrix(isMapAligned) * offset;\n}\nvoid main()\n{\n INIT;\n vec2 a_size = a_sizeAndOutlineWidth.xy * a_sizeAndOutlineWidth.xy / 128.0;\n vec2 a_offset = a_vertexOffset / 16.0;\n float a_outlineSize = a_sizeAndOutlineWidth.z * a_sizeAndOutlineWidth.z / 128.0;\n float a_bitSet = a_bitSetAndDistRatio.z;\n vec2 v_size = getMarkerSize(a_offset, a_size, a_outlineSize, a_sizeAndOutlineWidth.w * a_sizeAndOutlineWidth.w / 128.0, a_bitSet);\n vec2 v_tex = a_texCoords / u_mosaicSize;\n v_color = getColor(a_color, a_bitSet, 1);\n v_opacity = getOpacity();\n v_id = norm(a_id);\n v_filters = getFilterFlags();\n v_pos = u_dvsMat3 * vec3(a_pos * POSITION_PRECISION, 1.0) + getOffset(a_offset, a_bitSet);\n v_sizeTex = vec4(v_size.xy, v_tex.xy);\n#ifdef SDF\n v_isThin = getBit(a_bitSet, 2);\n #ifdef VV_COLOR\n v_overridingOutlineColor = v_isThin;\n #else\n v_overridingOutlineColor = 0.0;\n #endif\n v_outlineWidth = min(a_outlineSize, max(max(v_size.x, v_size.y) - 0.99, 0.0));\n v_outlineColor = getEffectColor(a_outlineColor, v_filters);\n v_distRatio = a_bitSetAndDistRatio.w / 126.0;\n#endif\n gl_Position = vec4(applyFilter(v_color, v_pos, v_filters), 1.0);\n}"},label:{"common.glsl":"uniform mediump float u_zoomLevel;\nuniform mediump float u_mapRotation;\nuniform mediump float u_mapAligned;\nuniform mediump vec2 u_mosaicSize;\nvarying mediump float v_antialiasingWidth;\nvarying mediump float v_edgeDistanceOffset;\nvarying mediump vec2 v_tex;\nvarying mediump vec4 v_color;\nvarying lowp vec4 v_animation;","label.frag":"#include <materials/text/text.frag>","label.vert":"precision highp float;\n#include <materials/vcommon.glsl>\n#include <materials/text/common.glsl>\nattribute vec4 a_color;\nattribute vec4 a_haloColor;\nattribute vec4 a_texAndSize;\nattribute vec4 a_refSymbolAndPlacementOffset;\nattribute vec4 a_glyphData;\nattribute vec2 a_vertexOffset;\nattribute vec2 a_texCoords;\nuniform float u_isHalo;\nuniform float u_zoomLevel;\nuniform float u_mapRotation;\nuniform float u_mapAligned;\nfloat getZ(in float minZoom, in float maxZoom, in float angle) {\n float glyphAngle = angle * 360.0 / 254.0;\n float mapAngle = u_mapRotation * 360.0 / 254.0;\n float diffAngle = min(360.0 - abs(mapAngle - glyphAngle), abs(mapAngle - glyphAngle));\n float z = 0.0;\n z += u_mapAligned * (2.0 * (1.0 - step(minZoom, u_zoomLevel)));\n z += u_mapAligned * 2.0 * step(90.0, diffAngle);\n z += 2.0 * (1.0 - step(u_zoomLevel, maxZoom));\n return z;\n}\nvoid main()\n{\n INIT;\n float groupMinZoom = getMinZoom();\n float glyphMinZoom = a_glyphData.x;\n float glyphMaxZoom = a_glyphData.y;\n float glyphAngle = a_glyphData.z;\n float a_minZoom = max(groupMinZoom, glyphMinZoom);\n float a_placementPadding = a_refSymbolAndPlacementOffset.x * EXTRUDE_SCALE_PLACEMENT_PADDING;\n vec2 a_placementDir = unpack_u8_nf32(a_refSymbolAndPlacementOffset.zw);\n float a_refSymbolSize = a_refSymbolAndPlacementOffset.y;\n float fontSize = a_texAndSize.z;\n float haloSize = a_texAndSize.w * OUTLINE_SCALE;\n vec2 vertexOffset = a_vertexOffset * OFFSET_PRECISION;\n vec3 pos = vec3(a_pos * POSITION_PRECISION, 1.0);\n float z = getZ(a_minZoom, glyphMaxZoom, glyphAngle);\n float fontScale = fontSize / SDF_FONT_SIZE;\n float halfSize = getSize(a_refSymbolSize) / 2.0;\n float animation = pow(getAnimationState(), vec4(2.0)).r;\n v_color = animation * ((1.0 - u_isHalo) * a_color + (u_isHalo * a_haloColor));\n v_opacity = 1.0;\n v_tex = a_texCoords / u_mosaicSize;\n v_edgeDistanceOffset = u_isHalo * haloSize / fontScale / MAX_SDF_DISTANCE;\n v_antialiasingWidth = 0.105 * SDF_FONT_SIZE / fontSize / u_pixelRatio;\n vec2 placementOffset = a_placementDir * (halfSize + a_placementPadding);\n vec3 glyphOffset = u_displayMat3 * vec3(vertexOffset + placementOffset, 0.0);\n vec3 v_pos = vec3((u_dvsMat3 * pos + glyphOffset).xy, z);\n gl_Position = vec4(applyFilterLabels(v_color, v_pos, getFilterFlags()), 1.0);\n#ifdef DEBUG\n v_color = vec4(a_color.rgb, z == 0.0 ? 1.0 : 0.645);\n#endif\n}"},line:{"common.glsl":"varying lowp vec4 v_color;\nvarying highp vec4 v_id;\nvarying mediump vec2 v_normal;\nvarying mediump float v_lineHalfWidth;\nvarying lowp float v_opacity;\nvarying highp vec3 v_pos;\n#ifdef PATTERN\nuniform mediump vec2 u_mosaicSize;\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_patternSize;\n#endif\n#if defined(PATTERN) || defined(SDF)\nvarying highp float v_accumulatedDistance;\n#endif","line.frag":"precision lowp float;\n#include <util/encoding.glsl>\n#include <materials/constants.glsl>\n#include <materials/line/common.glsl>\nuniform lowp float u_blur;\nuniform mediump float u_zoomFactor;\n#if defined(PATTERN) || defined(SDF)\nuniform sampler2D u_texture;\n#endif\n#ifdef SDF\nconst float sdfPatternHalfWidth = 15.5;\nconst float widthFactor = 2.0;\n#endif\nvoid main()\n{\n mediump float thinLineFactor = max(THIN_LINE_WIDTH_FACTOR * step(v_lineHalfWidth, THIN_LINE_HALF_WIDTH), 1.0);\n mediump float fragDist = length(v_normal) * v_lineHalfWidth;\n lowp float alpha = clamp(thinLineFactor * (v_lineHalfWidth - fragDist) / (u_blur + thinLineFactor - 1.0), 0.0, 1.0);\n#if defined(SDF) && !defined(HIGHLIGHT)\n mediump float lineHalfWidth = widthFactor * v_lineHalfWidth;\n mediump float lineWidthRatio = lineHalfWidth / sdfPatternHalfWidth;\n mediump float relativeTexX = mod((u_zoomFactor * v_accumulatedDistance + v_normal.x * lineHalfWidth) / (lineWidthRatio * v_patternSize.x), 1.0);\n mediump float relativeTexY = 0.5 + 0.5 * v_normal.y;\n mediump vec2 texCoord = mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));\n mediump float d = rgba2float(texture2D(u_texture, texCoord)) - 0.5;\n float dist = d * lineHalfWidth;\n lowp vec4 fillPixelColor = v_opacity * alpha * clamp(0.5 - dist, 0.0, 1.0) * v_color;\n gl_FragColor = fillPixelColor;\n#elif defined(PATTERN) && !defined(HIGHLIGHT)\n mediump float lineHalfWidth = v_lineHalfWidth;\n mediump float adjustedPatternWidth = v_patternSize.x * 2.0 * lineHalfWidth / v_patternSize.y;\n mediump float relativeTexX = mod((u_zoomFactor * v_accumulatedDistance + v_normal.x * lineHalfWidth) / adjustedPatternWidth, 1.0);\n mediump float relativeTexY = 0.5 + 0.5 * v_normal.y;\n mediump vec2 texCoord = mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexY, relativeTexX));\n lowp vec4 color = texture2D(u_texture, texCoord);\n gl_FragColor = v_opacity * alpha * v_color * color;\n#else\n gl_FragColor = v_opacity * alpha * v_color;\n#endif\n#ifdef HIGHLIGHT\n gl_FragColor.a = step(1.0 / 255.0, gl_FragColor.a);\n#endif\n#ifdef ID\n if (gl_FragColor.a < 1.0 / 255.0) {\n discard;\n }\n gl_FragColor = v_id;\n#endif\n}","line.vert":"precision highp float;\nattribute vec4 a_color;\nattribute vec4 a_offsetAndNormal;\nattribute vec2 a_accumulatedDistanceAndHalfWidth;\nattribute vec4 a_tlbr;\nattribute vec4 a_segmentDirection;\nattribute vec2 a_aux;\n#include <materials/vcommon.glsl>\n#include <materials/line/common.glsl>\nconst float SCALE = 1.0 / 31.0;\nconst float WIDTH_SCALE = 1.0 / 1024.0;\nfloat getBaseLineHalfWidth(in float in_lineHalfWidth) {\n#ifdef VV_SIZE\n float referenceHalfWidth = a_aux.x * WIDTH_SCALE;\n float lineWidth = 2.0 * in_lineHalfWidth;\n return 0.5 * (in_lineHalfWidth / referenceHalfWidth) * getSize(lineWidth);\n#else\n return in_lineHalfWidth;\n#endif\n}\nfloat getLineHalfWidth(in float baseWidth, in float aa) {\n float halfWidth = max(baseWidth + aa, 0.45) + 0.1 * aa;\n#ifdef HIGHLIGHT\n halfWidth = max(halfWidth, 2.0);\n#endif\n return halfWidth;\n}\nvec2 getDist(in vec2 offset, in float halfWidth) {\n float thinLineFactor = max(THIN_LINE_WIDTH_FACTOR * step(halfWidth, THIN_LINE_HALF_WIDTH), 1.0);\n#if defined(SDF) && !defined(HIGHLIGHT)\n thinLineFactor *= 2.0;\n#endif\n return thinLineFactor * halfWidth * offset * SCALE;\n}\nvoid main()\n{\n INIT;\n float a_bitSet = a_segmentDirection.w;\n float a_accumulatedDist = a_accumulatedDistanceAndHalfWidth.x;\n float a_lineHalfWidth = a_accumulatedDistanceAndHalfWidth.y * WIDTH_SCALE;\n float aa = 0.5 * u_antialiasing;\n vec2 a_offset = a_offsetAndNormal.xy;\n float baseWidth = getBaseLineHalfWidth(a_lineHalfWidth);\n float halfWidth = getLineHalfWidth(baseWidth, aa);\n float z = 2.0 * step(baseWidth, 0.0);\n vec2 dist = getDist(a_offset, halfWidth);\n vec3 offset = u_displayViewMat3 * vec3(dist, 0.0);\n vec3 pos = u_dvsMat3 * vec3(a_pos * POSITION_PRECISION, 1.0) + offset;\n v_color = getColor(a_color, a_bitSet, 0);\n v_opacity = getOpacity();\n v_lineHalfWidth = halfWidth;\n v_id = norm(a_id);\n v_normal = a_offsetAndNormal.zw * SCALE;\n v_pos = vec3(pos.xy, z);\n#ifdef PATTERN\n v_tlbr = a_tlbr / u_mosaicSize.xyxy;\n v_patternSize = vec2(a_tlbr.z - a_tlbr.x, a_tlbr.w - a_tlbr.y);\n#endif\n#if defined(PATTERN) || defined(SDF)\n v_accumulatedDistance = a_accumulatedDist + dot(SCALE * a_segmentDirection.xy, dist / u_zoomFactor);\n#endif\n gl_Position = vec4(applyFilter(v_color, v_pos, getFilterFlags()), 1.0);\n}"},text:{"common.glsl":"uniform highp vec2 u_mosaicSize;\nvarying highp vec4 v_id;\nvarying mediump vec3 v_pos;\nvarying lowp float v_opacity;\nvarying lowp vec4 v_color;\nvarying highp vec2 v_tex;\nvarying mediump float v_antialiasingWidth;\nvarying mediump float v_edgeDistanceOffset;\nvarying lowp float v_transparency;","text.frag":"precision mediump float;\n#include <materials/text/common.glsl>\nuniform lowp sampler2D u_texture;\nvoid main()\n{\n float SDF_CUTOFF = (2.0 / 8.0);\n float SDF_BASE_EDGE_DIST = 1.0 - SDF_CUTOFF;\n lowp float dist = texture2D(u_texture, v_tex).a;\n mediump float edge = SDF_BASE_EDGE_DIST - v_edgeDistanceOffset;\n#ifdef HIGHLIGHT\n edge /= 2.0;\n#endif\n lowp float aa = v_antialiasingWidth;\n lowp float alpha = smoothstep(edge - aa, edge + aa, dist);\n gl_FragColor = alpha * v_color * v_opacity;\n#ifdef ID\n if (gl_FragColor.a < 1.0 / 255.0) {\n discard;\n }\n gl_FragColor = v_id;\n#endif\n}","text.vert":"precision highp float;\n#include <materials/utils.glsl>\n#include <materials/vcommon.glsl>\n#include <materials/text/common.glsl>\nattribute vec4 a_color;\nattribute vec4 a_haloColor;\nattribute vec4 a_texFontSize;\nattribute vec4 a_aux;\nattribute vec2 a_vertexOffset;\nattribute vec2 a_texCoords;\nuniform float u_isHalo;\nfloat getTextSize(inout vec2 offset, in float baseSize, in float referenceSize) {\n#ifdef VV_SIZE\n float ratio = baseSize / referenceSize;\n baseSize = ratio * getSize(baseSize);\n#endif\n return baseSize;\n}\nvoid main()\n{\n INIT;\n float a_bitSet = a_aux.w;\n float a_fontSize = a_texFontSize.z;\n vec2 a_offset = a_vertexOffset * OFFSET_PRECISION;\n vec3 in_pos = vec3(a_pos * POSITION_PRECISION, 1.0);\n float fontSize = getTextSize(a_offset, a_fontSize, a_aux.z * a_aux.z / 256.0);\n float scaleFactor = fontSize / a_fontSize;\n float fontScale = fontSize / SDF_FONT_SIZE;\n vec3 offset = getRotation() * vec3(scaleFactor * a_offset, 0.0);\n mat3 extrudeMatrix = getBit(a_bitSet, 0) == 1.0 ? u_displayViewMat3 : u_displayMat3;\n v_color = u_isHalo * a_haloColor + (1.0 - u_isHalo) * getColor(a_color, a_bitSet, 1);\n v_opacity = getOpacity();\n v_id = norm(a_id);\n v_tex = a_texCoords / u_mosaicSize;\n v_pos = u_dvsMat3 * in_pos + extrudeMatrix * offset;\n v_edgeDistanceOffset = u_isHalo * OUTLINE_SCALE * a_texFontSize.w / fontScale / MAX_SDF_DISTANCE;\n v_antialiasingWidth = 0.105 * SDF_FONT_SIZE / fontSize / u_pixelRatio;\n gl_Position = vec4(applyFilter(v_color, v_pos, getFilterFlags()), 1.0);\n}"},"utils.glsl":"float rshift(in float u32, in int amount) {\n return floor(u32 / pow(2.0, float(amount)));\n}\nfloat getBit(in float bitset, in int bitIndex) {\n float offset = pow(2.0, float(bitIndex));\n return mod(floor(bitset / offset), 2.0);\n}\nfloat getFilterBit(in float bitset, in int bitIndex) {\n return getBit(bitset, bitIndex + 1);\n}\nfloat getHighlightBit(in float bitset) {\n return getBit(bitset, 0);\n}\nhighp vec4 unpackLocalIdTexel(in highp vec4 bitset) {\n float isAggregate = getBit(bitset.a, 7);\n return (1.0 - isAggregate) * bitset + isAggregate * (vec4(bitset.rgba) - vec4(0.0, 0.0, 0.0, float(0x80)));\n}\nvec4 unpack(in float u32) {\n float r = mod(rshift(u32, 0), 255.0);\n float g = mod(rshift(u32, 8), 255.0);\n float b = mod(rshift(u32, 16), 255.0);\n float a = mod(rshift(u32, 24), 255.0);\n return vec4(r, g, b, a);\n}\nvec4 norm(in vec4 v) {\n return v /= 255.0;\n}\nfloat max4(vec4 target) {\n return max(max(max(target.x, target.y), target.z), target.w);\n}\nvec2 unpack_u8_nf32(vec2 bytes) {\n return (bytes - 127.0) / 127.0;\n}","vcommon.glsl":"#include <materials/constants.glsl>\n#include <materials/utils.glsl>\n#include <materials/attributeData.glsl>\n#include <materials/vv.glsl>\n#include <materials/effects.glsl>\nattribute vec2 a_pos;\nattribute highp vec4 a_id;\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform highp float u_pixelRatio;\nuniform mediump float u_zoomFactor;\nuniform mediump float u_antialiasing;\nvec4 VV_ADATA = vec4(0.0);\nvoid loadVisualVariableData(inout vec4 target) {\n#ifdef OES_TEXTURE_FLOAT\n target.rgba = getAttributeData2(a_id);\n#else\n vec4 data0 = getAttributeData2(a_id);\n vec4 data1 = getAttributeData3(a_id);\n target.r = u88VVToFloat(data0.rg * 255.0);\n target.g = u88VVToFloat(data0.ba * 255.0);\n target.b = u88VVToFloat(data1.rg * 255.0);\n target.a = u88VVToFloat(data1.ba * 255.0);\n#endif\n}\n#ifdef VV\n #define INIT loadVisualVariableData(VV_ADATA)\n#else\n #define INIT\n#endif\nvec4 getColor(in vec4 a_color, in float a_bitSet, int index) {\n#ifdef VV_COLOR\n float isColorLocked = getBit(a_bitSet, index);\n return getVVColor(VV_ADATA[ATTR_VV_COLOR], a_color, isColorLocked);\n#else\n return a_color;\n#endif\n}\nfloat getOpacity() {\n#ifdef VV_OPACITY\n return getVVOpacity(VV_ADATA[ATTR_VV_OPACITY]);\n#else\n return 1.0;\n#endif\n}\nfloat getSize(in float in_size) {\n#ifdef VV_SIZE\n return getVVSize(in_size, VV_ADATA[ATTR_VV_SIZE]);\n#else\n return in_size;\n#endif\n}\nmat3 getRotation() {\n#ifdef VV_ROTATION\n return getVVRotationMat3(mod(VV_ADATA[ATTR_VV_ROTATION], 360.0));\n#else\n return mat3(1.0);\n#endif\n}\nfloat getFilterFlags() {\n#ifdef IGNORES_SAMPLER_PRECISION\n return ceil(getAttributeData0(a_id).x * 255.0);\n#else\n return getAttributeData0(a_id).x * 255.0;\n#endif\n}\nvec4 getAnimationState() {\n return getAttributeData1(a_id);\n}\nfloat getMinZoom() {\n vec4 data0 = getAttributeData0(a_id) * 255.0;\n return data0.g;\n}\nmat3 getMatrix(float isMapAligned) {\n return isMapAligned * u_displayViewMat3 + (1.0 - isMapAligned) * u_displayMat3;\n}","vv.glsl":"#if defined(VV_SIZE_MIN_MAX_VALUE) || defined(VV_SIZE_SCALE_STOPS) || defined(VV_SIZE_FIELD_STOPS) || defined(VV_SIZE_UNIT_VALUE)\n #define VV_SIZE\n#endif\n#if defined(VV_COLOR) || defined(VV_SIZE) || defined(VV_OPACITY) || defined(VV_ROTATION)\n #define VV\n#endif\n#ifdef VV_COLOR\nuniform highp float u_vvColorValues[8];\nuniform vec4 u_vvColors[8];\n#endif\n#ifdef VV_SIZE_MIN_MAX_VALUE\nuniform highp vec4 u_vvSizeMinMaxValue;\n#endif\n#ifdef VV_SIZE_SCALE_STOPS\nuniform highp float u_vvSizeScaleStopsValue;\n#endif\n#ifdef VV_SIZE_FIELD_STOPS\nuniform highp float u_vvSizeFieldStopsValues[6];\nuniform float u_vvSizeFieldStopsSizes[6];\n#endif\n#ifdef VV_SIZE_UNIT_VALUE\nuniform highp float u_vvSizeUnitValueWorldToPixelsRatio;\n#endif\n#ifdef VV_OPACITY\nuniform highp float u_vvOpacityValues[8];\nuniform float u_vvOpacities[8];\n#endif\n#ifdef VV_ROTATION\nuniform lowp float u_vvRotationType;\n#endif\nbool isNan(float val) {\n return (val == NAN_MAGIC_NUMBER);\n}\n#ifdef VV_SIZE_MIN_MAX_VALUE\nfloat getVVMinMaxSize(float sizeValue, float fallback) {\n if (isNan(sizeValue)) {\n return fallback;\n }\n float interpolationRatio = (sizeValue - u_vvSizeMinMaxValue.x) / (u_vvSizeMinMaxValue.y - u_vvSizeMinMaxValue.x);\n interpolationRatio = clamp(interpolationRatio, 0.0, 1.0);\n return u_vvSizeMinMaxValue.z + interpolationRatio * (u_vvSizeMinMaxValue.w - u_vvSizeMinMaxValue.z);\n}\n#endif\n#ifdef VV_SIZE_FIELD_STOPS\nconst int VV_SIZE_N = 6;\nfloat getVVStopsSize(float sizeValue, float fallback) {\n if (isNan(sizeValue)) {\n return fallback;\n }\n if (sizeValue <= u_vvSizeFieldStopsValues[0]) {\n return u_vvSizeFieldStopsSizes[0];\n }\n for (int i = 1; i < VV_SIZE_N; ++i) {\n if (u_vvSizeFieldStopsValues[i] >= sizeValue) {\n float f = (sizeValue - u_vvSizeFieldStopsValues[i-1]) / (u_vvSizeFieldStopsValues[i] - u_vvSizeFieldStopsValues[i-1]);\n return mix(u_vvSizeFieldStopsSizes[i-1], u_vvSizeFieldStopsSizes[i], f);\n }\n }\n return u_vvSizeFieldStopsSizes[VV_SIZE_N - 1];\n}\n#endif\n#ifdef VV_SIZE_UNIT_VALUE\nfloat getVVUnitValue(float sizeValue, float fallback) {\n if (isNan(sizeValue)) {\n return fallback;\n }\n return u_vvSizeUnitValueWorldToPixelsRatio * sizeValue;\n}\n#endif\n#ifdef VV_OPACITY\nconst int VV_OPACITY_N = 8;\nfloat getVVOpacity(float opacityValue) {\n if (isNan(opacityValue)) {\n return 1.0;\n }\n if (opacityValue <= u_vvOpacityValues[0]) {\n return u_vvOpacities[0];\n }\n for (int i = 1; i < VV_OPACITY_N; ++i) {\n if (u_vvOpacityValues[i] >= opacityValue) {\n float f = (opacityValue - u_vvOpacityValues[i-1]) / (u_vvOpacityValues[i] - u_vvOpacityValues[i-1]);\n return mix(u_vvOpacities[i-1], u_vvOpacities[i], f);\n }\n }\n return u_vvOpacities[VV_OPACITY_N - 1];\n}\n#endif\n#ifdef VV_ROTATION\nmat4 getVVRotation(float rotationValue) {\n if (isNan(rotationValue)) {\n return mat4(1, 0, 0, 0,\n 0, 1, 0, 0,\n 0, 0, 1, 0,\n 0, 0, 0, 1);\n }\n float rotation = rotationValue;\n if (u_vvRotationType == 1.0) {\n rotation = 90.0 - rotation;\n }\n float angle = C_DEG_TO_RAD * rotation;\n float sinA = sin(angle);\n float cosA = cos(angle);\n return mat4(cosA, sinA, 0, 0,\n -sinA, cosA, 0, 0,\n 0, 0, 1, 0,\n 0, 0, 0, 1);\n}\nmat3 getVVRotationMat3(float rotationValue) {\n if (isNan(rotationValue)) {\n return mat3(1, 0, 0,\n 0, 1, 0,\n 0, 0, 1);\n }\n float rotation = rotationValue;\n if (u_vvRotationType == 1.0) {\n rotation = 90.0 - rotation;\n }\n float angle = C_DEG_TO_RAD * -rotation;\n float sinA = sin(angle);\n float cosA = cos(angle);\n return mat3(cosA, -sinA, 0,\n sinA, cosA, 0,\n 0, 0, 1);\n}\n#endif\n#ifdef VV_COLOR\nconst int VV_COLOR_N = 8;\nvec4 getVVColor(float colorValue, vec4 fallback, float isColorLocked) {\n if (isNan(colorValue) || isColorLocked == 1.0) {\n return fallback;\n }\n if (colorValue <= u_vvColorValues[0]) {\n return u_vvColors[0];\n }\n for (int i = 1; i < VV_COLOR_N; ++i) {\n if (u_vvColorValues[i] >= colorValue) {\n float f = (colorValue - u_vvColorValues[i-1]) / (u_vvColorValues[i] - u_vvColorValues[i-1]);\n return mix(u_vvColors[i-1], u_vvColors[i], f);\n }\n }\n return u_vvColors[VV_COLOR_N - 1];\n}\n#endif\nfloat getVVSize(in float size, in float vvSize) {\n#ifdef VV_SIZE_MIN_MAX_VALUE\n return getVVMinMaxSize(vvSize, size);\n#elif defined(VV_SIZE_SCALE_STOPS)\n return u_vvSizeScaleStopsValue;\n#elif defined(VV_SIZE_FIELD_STOPS)\n float outSize = getVVStopsSize(vvSize, size);\n return isNan(outSize) ? size : outSize;\n#elif defined(VV_SIZE_UNIT_VALUE)\n return getVVUnitValue(vvSize, size);\n#else\n return size;\n#endif\n}"},raster:{bitmap:{"bitmap.frag":"precision mediump float;\nvarying highp vec2 v_texcoord;\nuniform sampler2D u_texture;\nuniform highp vec2 u_coordScale;\n#include <filtering/bicubic.glsl>\nvoid main() {\n#ifdef BICUBIC\n vec4 color = sampleBicubicBSpline(u_texture, v_texcoord, u_coordScale);\n#else\n vec4 color = texture2D(u_texture, v_texcoord);\n#endif\n gl_FragColor = vec4(color.rgb * color.a, color.a);\n}","bitmap.vert":"precision mediump float;\nattribute vec2 a_pos;\nuniform highp mat3 u_dvsMat3;\nuniform highp vec2 u_coordScale;\nvarying highp vec2 v_texcoord;\nvoid main()\n{\n v_texcoord = a_pos;\n gl_Position = vec4(u_dvsMat3 * vec3(a_pos * u_coordScale, 1.0), 1.0);\n}"},common:{"common.glsl":"uniform sampler2D u_image;\nuniform int u_bandCount;\nuniform bool u_isFloatTexture;\nuniform bool u_flipY;\nuniform float u_opacity;\nuniform int u_resampling;\nuniform vec2 u_srcImageSize;\n#ifdef APPLY_PROJECTION\n#include <raster/common/projection.glsl>\n#endif\n#ifdef BICUBIC\n#include <filtering/bicubic.glsl>\n#endif\nvec2 getPixelLocation(vec2 coords) {\n vec2 targetLocation = u_flipY ? vec2(coords.s, 1.0 - coords.t) : coords;\n#ifdef APPLY_PROJECTION\n targetLocation = projectPixelLocation(targetLocation);\n#endif\n return targetLocation;\n}\nbool isOutside(vec2 coords){\n if (coords.t>1.00001 ||coords.t<-0.00001 || coords.s>1.00001 ||coords.s<-0.00001) {\n return true;\n } else {\n return false;\n }\n}\nvec4 getPixel(vec2 pixelLocation) {\n#ifdef BICUBIC\n vec4 color = sampleBicubicBSpline(u_image, pixelLocation, u_srcImageSize);\n#else\n vec4 color = texture2D(u_image, pixelLocation);\n#endif\n return color;\n}","contrastBrightness.glsl":"uniform float u_contrastOffset;\nuniform float u_brightnessOffset;\nvec4 adjustContrastBrightness(vec4 currentPixel, bool isFloat) {\n vec4 pixelValue = isFloat ? currentPixel * 255.0 : currentPixel;\n float maxI = 255.0;\n float mid = 128.0;\n float c = u_contrastOffset;\n float b = u_brightnessOffset;\n vec4 v;\n if (c > 0.0 && c < 100.0) {\n v = (200.0 * pixelValue - 100.0 * maxI + 2.0 * maxI * b) / (2.0 * (100.0 - c)) + mid;\n } else if (c <= 0.0 && c > -100.0) {\n v = (200.0 * pixelValue - 100.0 * maxI + 2.0 * maxI * b) * (100.0 + c) / 20000.0 + mid;\n } else if (c == 100.0) {\n v = (200.0 * pixelValue - 100.0 * maxI + (maxI + 1.0) * (100.0 - c) + 2.0 * maxI * b);\n v = (sign(v) + 1.0) / 2.0;\n } else if (c == -100.0) {\n v = vec4(mid, mid, mid, currentPixel.a);\n }\n return vec4(v.r / 255.0, v.g / 255.0, v.b / 255.0, currentPixel.a);\n}","projection.glsl":"uniform sampler2D u_transformGrid;\nuniform vec2 u_transformSpacing;\nuniform vec2 u_transformGridSize;\nuniform vec2 u_targetImageSize;\nvec2 projectPixelLocation(vec2 coords) {\n vec2 index_image = floor(coords * u_targetImageSize);\n vec2 oneTransformPixel = vec2(0.25 / u_transformGridSize.s, 1.0 / u_transformGridSize.t);\n vec2 index_transform = floor(index_image / u_transformSpacing) / u_transformGridSize;\n vec2 pos = fract((index_image + vec2(0.5, 0.5)) / u_transformSpacing);\n vec2 srcLocation;\n vec2 transform_location = index_transform + oneTransformPixel * 0.5;\n if (pos.s <= pos.t) {\n vec4 ll_abc = texture2D(u_transformGrid, vec2(transform_location.s, transform_location.t));\n vec4 ll_def = texture2D(u_transformGrid, vec2(transform_location.s + oneTransformPixel.s, transform_location.t));\n srcLocation.s = dot(ll_abc.rgb, vec3(pos, 1.0));\n srcLocation.t = dot(ll_def.rgb, vec3(pos, 1.0));\n } else {\n vec4 ur_abc = texture2D(u_transformGrid, vec2(transform_location.s + 2.0 * oneTransformPixel.s, transform_location.t));\n vec4 ur_def = texture2D(u_transformGrid, vec2(transform_location.s + 3.0 * oneTransformPixel.s, transform_location.t));\n srcLocation.s = dot(ur_abc.rgb, vec3(pos, 1.0));\n srcLocation.t = dot(ur_def.rgb, vec3(pos, 1.0));\n }\n return srcLocation;\n}"},hillshade:{"hillshade.frag":"precision mediump float;\nvarying highp vec2 v_texcoord;\n#include <raster/common/common.glsl>\nuniform int u_hillshadeType;\nuniform float u_sinZcosAs[6];\nuniform float u_sinZsinAs[6];\nuniform float u_cosZs[6];\nuniform float u_weights[6];\nuniform vec2 u_factor;\nuniform float u_minValue;\nuniform float u_maxValue;\n#include <raster/lut/colorize.glsl>\nfloat getNeighborHoodAlpha(float a, float b, float c, float d, float e, float f, float g, float h, float i){\n if (a == 0.0 || a == 0.0 || a==0.0 || a == 0.0 || a == 0.0 || a==0.0 || a == 0.0 || a == 0.0 || a==0.0) {\n return 0.0;\n }\n else {\n return e;\n }\n}\nvec3 rgb2hsv(vec3 c) {\n vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n vec4 p = c.g < c.b ? vec4(c.bg, K.wz) : vec4(c.gb, K.xy);\n vec4 q = c.r < p.x ? vec4(p.xyw, c.r) : vec4(c.r, p.yzx);\n float d = q.x - min(q.w, q.y);\n float e = 1.0e-10;\n return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), min(d / (q.x + e), 1.0), q.x);\n}\nvec3 hsv2rgb(vec3 c) {\n vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\nvec4 overlay(float val, float minValue, float maxValue, float hillshade, float alpha) {\n val = clamp((val - minValue) / (maxValue - minValue), 0.0, 1.0);\n vec4 rgb = colorize(vec4(val, val, val, 1.0), false);\n vec3 hsv = rgb2hsv(rgb.xyz);\n hsv.z = hillshade;\n return vec4(hsv2rgb(hsv) * alpha, alpha);\n}\nvoid main() {\n vec2 pixelLocation = getPixelLocation(v_texcoord);\n if (isOutside(pixelLocation)) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n return;\n }\n vec4 currentPixel = getPixel(pixelLocation);\n if (currentPixel.a == 0.0) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n return;\n }\n vec2 axy = vec2(-1.0, -1.0);\n vec2 bxy = vec2(0.0, -1.0);\n vec2 cxy = vec2(1.0, -1.0);\n vec2 dxy = vec2(-1.0, 0.0);\n vec2 fxy = vec2(1.0, 0.0);\n vec2 gxy = vec2(-1.0, 1.0);\n vec2 hxy = vec2(0.0, 1.0);\n vec2 ixy = vec2(1.0, 1.0);\n vec2 onePixel = 1.0 / u_srcImageSize;\n if (pixelLocation.s < onePixel.s) {\n axy[0] = 1.0;\n dxy[0] = 1.0;\n gxy[0] = 1.0;\n }\n if (pixelLocation.t < onePixel.t) {\n axy[1] = 1.0;\n bxy[1] = 1.0;\n cxy[1] = 1.0;\n }\n if (pixelLocation.s > 1.0 - onePixel.s) {\n cxy[0] = -1.0;\n fxy[0] = -1.0;\n ixy[0] = -1.0;\n }\n if (pixelLocation.t > 1.0 - onePixel.t) {\n gxy[1] = -1.0;\n hxy[1] = -1.0;\n ixy[1] = -1.0;\n }\n vec4 va = texture2D(u_image, pixelLocation + onePixel * axy);\n vec4 vb = texture2D(u_image, pixelLocation + onePixel * bxy);\n vec4 vc = texture2D(u_image, pixelLocation + onePixel * cxy);\n vec4 vd = texture2D(u_image, pixelLocation + onePixel * dxy);\n vec4 ve = texture2D(u_image, pixelLocation);\n vec4 vf = texture2D(u_image, pixelLocation + onePixel * fxy);\n vec4 vg = texture2D(u_image, pixelLocation + onePixel * gxy);\n vec4 vh = texture2D(u_image, pixelLocation + onePixel * hxy);\n vec4 vi = texture2D(u_image, pixelLocation + onePixel * ixy);\n float dzx = (vc + 2.0 * vf + vi - va - 2.0 * vd - vg).r * u_factor.s;\n float dzy = (vg + 2.0 * vh + vi - va - 2.0 * vb - vc).r * u_factor.t;\n float dzd = sqrt(1.0 + dzx * dzx + dzy * dzy);\n float hillshade = 0.0;\n if (u_hillshadeType == 0){\n\t float cosDelta = u_sinZsinAs[0] * dzy - u_sinZcosAs[0] * dzx;\n float z = (u_cosZs[0] + cosDelta) / dzd;\n if (z < 0.0) z = 0.0;\n\t hillshade = z;\n } else {\n\t for (int k = 0; k < 6; k++) {\n\t\t float cosDelta = u_sinZsinAs[k] * dzy - u_sinZcosAs[k] * dzx;\n\t\t float z = (u_cosZs[k] + cosDelta) / dzd;\n\t\t if (z < 0.0) z = 0.0;\n hillshade = hillshade + z * u_weights[k];\n\t\t if (k == 5) break;\n }\n }\n float alpha = getNeighborHoodAlpha(va.a, vb.a, vc.a, vd.a, ve.a, vf.a, vg.a, vh.a, vi.a);\n#ifdef APPLY_COLORMAP\n gl_FragColor = overlay(ve.r, u_minValue, u_maxValue, hillshade, alpha);\n#else\n hillshade *= alpha;\n gl_FragColor = vec4(hillshade, hillshade, hillshade, alpha);\n#endif\n}","hillshade.vert":"precision mediump float;\nattribute vec2 a_pos;\nuniform highp mat3 u_dvsMat3;\nuniform highp vec2 u_coordScale;\nvarying highp vec2 v_texcoord;\nvoid main()\n{\n v_texcoord = a_pos;\n gl_Position = vec4(u_dvsMat3 * vec3(a_pos * u_coordScale, 1.0), 1.0);\n}"},lut:{"colorize.glsl":"uniform sampler2D u_colormap;\nuniform float u_colormapOffset;\nuniform float u_colormapMaxIndex;\nvec4 colorize(vec4 currentPixel, bool isFloat) {\n float clrIndex = isFloat ? currentPixel.r - u_colormapOffset : currentPixel.r * 255.0 - u_colormapOffset;\n vec4 result;\n if (currentPixel.a == 0.0 || clrIndex > u_colormapMaxIndex) {\n result = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n vec2 clrPosition = vec2((clrIndex + 0.5) / (u_colormapMaxIndex + 1.0), 0.0);\n vec4 color = texture2D(u_colormap, clrPosition);\n result = vec4(color.rgb, 1.0) * color.a * u_opacity;\n }\n return result;\n}","lut.frag":"precision mediump float;\nvarying highp vec2 v_texcoord;\n#include <raster/common/common.glsl>\n#include <raster/lut/colorize.glsl>\nvoid main() {\n vec2 pixelLocation = getPixelLocation(v_texcoord);\n if (isOutside(pixelLocation)) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n return;\n }\n vec4 currentPixel = getPixel(pixelLocation);\n gl_FragColor = colorize(currentPixel, true);\n}","lut.vert":"precision mediump float;\nattribute vec2 a_pos;\nuniform highp mat3 u_dvsMat3;\nuniform highp vec2 u_coordScale;\nuniform highp float u_scale;\nuniform highp vec2 u_offset;\nvarying highp vec2 v_texcoord;\nvoid main()\n{\n v_texcoord = a_pos * u_scale + u_offset;\n gl_Position = vec4(u_dvsMat3 * vec3(a_pos * u_coordScale, 1.0), 1.0);\n}"},stretch:{"stretch.frag":"precision mediump float;\nvarying highp vec2 v_texcoord;\n#include <raster/common/common.glsl>\nuniform float u_minCutOff[3];\nuniform float u_maxCutOff[3];\nuniform float u_minOutput;\nuniform float u_maxOutput;\nuniform float u_factor[3];\nuniform bool u_useGamma;\nuniform float u_gamma[3];\nuniform float u_gammaCorrection[3];\n#include <raster/lut/colorize.glsl>\nfloat stretchOneValue(float val, float minCutOff, float maxCutOff, float minOutput, float maxOutput, float factor, bool useGamma, float gamma, float gammaCorrection) {\n if (val >= maxCutOff) {\n return maxOutput;\n } else if (val <= minCutOff) {\n return minOutput;\n }\n float stretchedVal;\n if (useGamma) {\n \tfloat tempf = 1.0;\n\t float outRange = maxOutput - minOutput;\n\t float relativeVal = (val - minCutOff) / (maxCutOff - minCutOff);\n\t if (gamma > 1.0) {\n tempf -= pow(1.0 / outRange, relativeVal * gammaCorrection);\n }\n stretchedVal = (tempf * outRange * pow(relativeVal, 1.0 / gamma) + minOutput) / 255.0;\n } else {\n stretchedVal = minOutput + (val - minCutOff) * factor;\n }\n return stretchedVal;\n}\nvoid main() {\n vec2 pixelLocation = getPixelLocation(v_texcoord);\n if (isOutside(pixelLocation)) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n return;\n }\n vec4 currentPixel = getPixel(pixelLocation);\n if (currentPixel.a == 0.0) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n return;\n }\n if (u_bandCount == 1) {\n float grayVal = stretchOneValue(currentPixel.r, u_minCutOff[0], u_maxCutOff[0], u_minOutput, u_maxOutput, u_factor[0], u_useGamma, u_gamma[0], u_gammaCorrection[0]);\n#ifdef APPLY_COLORMAP\n gl_FragColor = colorize(vec4(grayVal, grayVal, grayVal, currentPixel.a * u_opacity), !u_useGamma);\n#else\n gl_FragColor = vec4(grayVal, grayVal, grayVal, 1.0) * currentPixel.a * u_opacity;\n#endif\n } else {\n float redVal = stretchOneValue(currentPixel.r, u_minCutOff[0], u_maxCutOff[0], u_minOutput, u_maxOutput, u_factor[0], u_useGamma, u_gamma[0], u_gammaCorrection[0]);\n float greenVal = stretchOneValue(currentPixel.g, u_minCutOff[1], u_maxCutOff[1], u_minOutput, u_maxOutput, u_factor[1], u_useGamma, u_gamma[1], u_gammaCorrection[1]);\n float blueVal = stretchOneValue(currentPixel.b, u_minCutOff[2], u_maxCutOff[2], u_minOutput, u_maxOutput, u_factor[2], u_useGamma, u_gamma[2], u_gammaCorrection[2]);\n gl_FragColor = vec4(redVal, greenVal, blueVal, 1.0) * currentPixel.a * u_opacity;\n }\n}","stretch.vert":"precision mediump float;\nattribute vec2 a_pos;\nuniform highp mat3 u_dvsMat3;\nuniform highp vec2 u_coordScale;\nuniform highp float u_scale;\nuniform highp vec2 u_offset;\nvarying highp vec2 v_texcoord;\nvoid main()\n{\n v_texcoord = a_pos * u_scale + u_offset;\n gl_Position = vec4(u_dvsMat3 * vec3(a_pos * u_coordScale, 1.0), 1.0);\n}"}},stencil:{"stencil.frag":"void main() {\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n}","stencil.vert":"attribute vec2 a_pos;\nvoid main() {\n gl_Position = vec4(a_pos, 0.0, 1.0);\n}"},tileInfo:{"tileInfo.frag":"uniform mediump sampler2D u_texture;\nvarying mediump vec2 v_tex;\nvoid main(void) {\n lowp vec4 color = texture2D(u_texture, v_tex);\n gl_FragColor = 0.75 * color;\n}","tileInfo.vert":"attribute vec2 a_pos;\nuniform highp mat3 u_dvsMat3;\nuniform mediump float u_depth;\nuniform mediump vec2 u_coord_ratio;\nuniform mediump vec2 u_delta;\nuniform mediump vec2 u_dimensions;\nvarying mediump vec2 v_tex;\nvoid main() {\n mediump vec2 offset = u_coord_ratio * vec2(u_delta + a_pos * u_dimensions);\n vec3 v_pos = u_dvsMat3 * vec3(offset, 1.0);\n gl_Position = vec4(v_pos.xy, 0.0, 1.0);\n v_tex = a_pos;\n}"},util:{"encoding.glsl":"const vec4 rgba2float_factors = vec4(\n 255.0 / (256.0),\n 255.0 / (256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0 * 256.0)\n );\nfloat rgba2float(vec4 rgba) {\n return dot(rgba, rgba2float_factors);\n}"}}}).apply(null,r))||(e.exports=n)},V5jM:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("j2SP"),i("apbF"),i("3+7H"),i("TQvW"),i("U+8K")],n=(function(e,t,i,r,n,o,a,s){Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._color=r.vec4f32.fromValues(0,1,0,1),t}return i.__extends(t,e),t.prototype.dispose=function(){this._program&&this._program.dispose()},t.prototype.prepareState=function(e){var t=e.context;t.setStencilTestEnabled(!0),t.setBlendingEnabled(!1),t.setFaceCullingEnabled(!1),t.setColorMask(!1,!1,!1,!1),t.setStencilOp(7680,7680,7681),t.setStencilWriteMask(255),t.setStencilFunction(519,0,255)},t.prototype.draw=function(e,t){var i=e.context,r=e.state;this._program||(this._program=s.createProgram(i,a.background));var o=this._program,l=n.createProgramDescriptor("clip",{geometry:[{location:0,name:"a_pos",count:2,type:5122}]}),u=t.getVAO(i,r,l.attributes,l.bufferLayouts);i.bindProgram(this._program),o.setUniform2fv("u_coord_range",[1,1]),o.setUniform4fv("u_color",this._color),o.setUniformMatrix3fv("u_dvsMat3",r.displayMat3),i.bindVAO(u),i.drawElements(4,u.indexBuffer.size,5125,0),i.bindVAO()},t}(o.default);t.default=l}).apply(null,r),void 0===n||(e.exports=n)},W14q:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("qsST"),i("LxLY"),i("DJpR"),i("Nwkb")],void 0===(n=(function(e,t,i,r,n,o){Object.defineProperty(t,"__esModule",{value:!0});var a=i.getLogger("esri.views.2d.engine.webgl.WebGLDriverTest"),s=function(){function e(e){this._ignoresSamplerPrecision=null,this._context=e}return Object.defineProperty(e.prototype,"ignoresSamplerPrecision",{get:function(){return r.isNone(this._ignoresSamplerPrecision)&&(this._ignoresSamplerPrecision=t.testSamplerPrecision(this._context)),this._ignoresSamplerPrecision},enumerable:!0,configurable:!0}),e}();t.testWebGLDriver=function(e){return new s(e)},t.testSamplerPrecision=function(e){var t=new n.FramebufferObject(e,{colorTarget:0,depthStencilTarget:0},{target:3553,wrapMode:33071,pixelFormat:6408,dataType:5121,samplingMode:9728,width:1,height:1}),i=new Uint8Array(4),r=new o(e,[0,0,1,0,0,1,1,1]),s=new n.Program(e,"\nprecision highp float;\n\nattribute vec2 a_pos;\n\nuniform highp sampler2D u_texture;\nvarying vec4 v_color;\n\nfloat getBit(in float bitset, in int bitIndex) {\n float offset = pow(2.0, float(bitIndex));\n\n return mod(floor(bitset / offset), 2.0);\n}\n\nvoid main() {\n vec4 value = texture2D(u_texture, vec2(0.0));\n\n float bit = getBit(value.x * 255.0, 1);\n\n v_color = bit * vec4(1.0);\n\n gl_Position = vec4(a_pos * 2.0 - 1.0, 0.0, 1.0);\n}\n","\nprecision highp float;\n\nvarying vec4 v_color;\n\nvoid main() {\n gl_FragColor = v_color;\n}\n",{a_pos:0}),l=new n.Texture(e,{target:3553,wrapMode:33071,pixelFormat:6408,dataType:5121,samplingMode:9728,width:1,height:1},new Uint8Array([2,255,0,0]));s.setUniform1i("u_texture",0),e.bindTexture(l,0),e.bindFramebuffer(t),e.bindProgram(s);var u=e.getViewport(),c=u.x,f=u.y,d=u.width,h=u.height;e.setViewport(0,0,1,1),r.draw(),e.setViewport(c,f,d,h),t.readPixels(0,0,1,1,6408,5121,i),s.dispose(),r.dispose(),t.dispose();var p=255!==i[0]||255!==i[1]||255!==i[2]||255!==i[3];return p&&a.warn("A problem was detected with your graphics driver. Your driver does not appear to honor sampler precision specifiers, which may result in rendering issues due to numerical instability. We recommend ensuring that your drivers have been updated to the latest version. Applying lowp sampler workaround. ["+i[0]+"."+i[1]+"."+i[2]+"."+i[3]+"]"),p}}).apply(null,r))||(e.exports=n)},XCks:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("qMld"),i("qMld"),i("qdig")],void 0===(n=(function(e,t,i,r,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this.size=e,this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=e,this.context=this.canvas.getContext("2d"),this._gridOuter=new Float64Array(e*e),this._gridInner=new Float64Array(e*e),this._f=new Float64Array(e),this._d=new Float64Array(e),this._z=new Float64Array(e+1),this._v=new Int16Array(e)}return e.prototype.draw=function(e,t,o){var a=this;void 0===o&&(o=31),this._initSVG();var s=this._createSVGString(e);return i.create((function(e,i){var l=new Image;l.src="data:image/svg+xml; charset=utf8, "+encodeURIComponent(s),l.onload=function(){a.context.clearRect(0,0,a.size,a.size),a.context.drawImage(l,0,0,a.size,a.size);for(var t=a.context.getImageData(0,0,a.size,a.size),i=new Uint8Array(a.size*a.size*4),r=0;r<a.size*a.size;r++){var s=t.data[4*r+3]/255;a._gridOuter[r]=1===s?0:0===s?1e20:Math.pow(Math.max(0,.5-s),2),a._gridInner[r]=1===s?1e20:0===s?0:Math.pow(Math.max(0,s-.5),2)}for(a._edt(a._gridOuter,a.size,a.size),a._edt(a._gridInner,a.size,a.size),r=0;r<a.size*a.size;r++)n.packFloatRGBA(.5-(a._gridOuter[r]-a._gridInner[r])/(2*o),i,4*r);e(i)};var u=t&&t.signal;u&&r.onAbort(u,(function(){return i(r.createAbortError())}))}))},e.prototype._initSVG=function(){if(!this._svg){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("style","position: absolute;"),e.setAttribute("width","0"),e.setAttribute("height","0"),e.setAttribute("aria-hidden","true"),e.setAttribute("role","presentation"),document.body.appendChild(e),this._svg=e}},e.prototype._createSVGString=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","path");t.setAttribute("d",e),this._svg.appendChild(t);var i,r,n,o,a=t.getBBox(),s=a.width/a.height,l=this.size/2;s>1?(r=i=l/a.width,n=this.size/4,o=l-l*(1/s)/2):(i=r=l/a.height,n=l-l*s/2,o=this.size/4),t.setAttribute("style","transform: matrix("+i+", 0, 0, "+r+", "+(-a.x*i+n)+", "+(-a.y*r+o)+")");var u='<svg style="fill:red;" height="'+this.size+'" width="'+this.size+'" xmlns="http://www.w3.org/2000/svg">'+this._svg.innerHTML+"</svg>";return this._svg.removeChild(t),u},e.prototype._edt=function(e,t,i){for(var r=this._f,n=this._d,o=this._v,a=this._z,s=0;s<t;s++){for(var l=0;l<i;l++)r[l]=e[l*t+s];for(this._edt1d(r,n,o,a,i),l=0;l<i;l++)e[l*t+s]=n[l]}for(l=0;l<i;l++){for(s=0;s<t;s++)r[s]=e[l*t+s];for(this._edt1d(r,n,o,a,t),s=0;s<t;s++)e[l*t+s]=Math.sqrt(n[s])}},e.prototype._edt1d=function(e,t,i,r,n){i[0]=0,r[0]=-1e20,r[1]=1e20;for(var o=1,a=0;o<n;o++){for(var s=(e[o]+o*o-(e[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);s<=r[a];)a--,s=(e[o]+o*o-(e[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);i[++a]=o,r[a]=s,r[a+1]=1e20}for(o=0,a=0;o<n;o++){for(;r[a+1]<o;)a++;t[o]=(o-i[a])*(o-i[a])+e[i[a]]}},e}();t.default=o}).apply(null,r))||(e.exports=n)},YIDE:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("DJpR"),i("hPTP")],void 0===(n=(function(e,t,i,r){Object.defineProperty(t,"__esModule",{value:!0}),t.magnifier={name:"magnifier",shaders:{vertexShader:r.resolveIncludes("magnifier/magnifier.vert"),fragmentShader:r.resolveIncludes("magnifier/magnifier.frag")},attributes:{a_pos:0}},t.createMagnifierProgram=function(e){return i.createProgram(e,t.magnifier)}}).apply(null,r))||(e.exports=n)},YaB4:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("ge+T"),i("bOAX"),i("6h7w"),i("1Mg+"),i("wUCb"),i("Brhx"),i("3SpT"),i("M8xM"),i("LN/d"),i("+4HP"),i("Tauk"),i("gm1X"),i("eFQu"),i("6+ni"),i("B+Jm"),i("4F/P"),i("tI6k"),i("JNkf"),i("0XPR"),i("apbF"),i("kmbk"),i("V5jM"),i("66cO"),i("p2sx"),i("oBAw"),i("jEV9"),i("Rpsm"),i("a08a"),i("zbL2"),i("PDSL"),i("8fgo"),i("f93k"),i("gvME"),i("2pwJ"),i("3u8V"),i("oUUG"),i("AbdV"),i("vsbv"),i("GDRe"),i("tBzM"),i("bLBh"),i("LCdb"),i("cF6f"),i("MGRT"),i("OO/B"),i("rYkQ"),i("2Gaw"),i("CX95"),i("MtZC"),i("G59t"),i("oDRR"),i("AP+j"),i("+P5t"),i("YIDE"),i("Ahpp"),i("6cAc"),i("8Lwu"),i("hAHX"),i("gi5q"),i("DvfX"),i("NoUk")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c,f,d,h,p,_,m,v,g,y,b,x,w,T,S,C,L,O,M,D,E,I,P,A,V,R,F,z,B,G,U,N,k,j,W,H,q,X,Z,Y,K,J,Q,$,ee,te,ie,re,ne,oe,ae,se,le){Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmap=i.Bitmap,t.BitmapContainer=r.BitmapContainer,t.BitmapTile=n.BitmapTile,t.Container=o.Container,t.TileContainer=a.default,t.DisplayObject=s.DisplayObject,t.RasterTile=l.RasterTile,t.RasterTileContainer=u.RasterTileContainer,t.Stage=c.Stage,t.AttributeStoreView=f.AttributeStoreView,t.CollisionGrid=d.CollisionGrid,t.CollisionEngine=h.CollisionEngine,t.LayerViewSorter=p.LayerViewSorter,t.Point=_.Point,t.alignmentUtils=m,t.color=v,t.definitions=g,t.enums=y,t.fontUtils=b,t.Utils=x,t.debug=B,t.ShapedGlyph=G.ShapedGlyph,t.shapeGlyphs=G.shapeGlyphs,t.ShapingInfo=G.ShapingInfo,t.TileClipper=U.TileClipper,t.SimpleBuilder=U.SimpleBuilder,t.tessellate=N.tessellate,t.TessellationState=N.TessellationState,t.splitVertex=N.splitVertex,t.createMatcher=k.createMatcher,t.WGLMeshFactory=j.WGLMeshFactory,t.MeshData=W.MeshData,t.WGLTemplateStore=H.WGLTemplateStore,t.Painter=q.default,t.PainterOptions=q.PainterOptions,t.TileData=X.TileData,t.bidiText=Z.bidiText,t.FeatureMatcher=Y.FeatureMatcher,t.getVVFlags=K.getVVFlags,t.getTypeOfSizeVisualVariable=J.getTypeOfSizeVisualVariable,t.WGLRendererInfo=Q.WGLRendererInfo,t.WGLTile=$.WGLTile,t.BitBlitRenderer=ee.BitBlitRenderer,t.createMagnifierProgram=te.createMagnifierProgram,t.magnifier=te.magnifier,t.CIMSymbolHelper=ie.CIMSymbolHelper,t.Rect=re.default,t.getLimitCosine=ne.getLimitCosine,function(e){e.Geometry=I.default,e.Marker=R.default,e.Line=V.default,e.Fill=P.default,e.Text=F.default,e.Label=A.default,e.Clip=T.default,e.Stencil=C.default,e.Bitmap=w.default,e.Raster=z.default,e.TileInfo=S.default,e.VTLBackground=L.WGLBrushVTLBackground,e.VTLFill=M.WGLBrushVTLFill,e.VTLLine=D.WGLBrushVTLLine,e.VTLCircle=O.WGLBrushVTLCircle,e.VTLSymbol=E.WGLBrushVTLSymbol}(t.brushes||(t.brushes={})),t.RenderPass=oe.default,t.TiledDisplayObject=ae.TiledDisplayObject,t.BitmapTileContainer=se.BitmapTileContainer,t.LevelDependentSizeVariable=le.LevelDependentSizeVariable}).apply(null,r))||(e.exports=n)},ZOLT:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("qsST"),i("LxLY"),i("jBNx"),i("aMdW"),i("Zx0K"),i("W9tT"),i("ab6c"),i("3KXq"),i("JNkf"),i("Dos2"),i("hNI9"),i("8Lwu")],n=(function(e,t,i,r,n,o,a,s,l,u,c,f,d,h,p){Object.defineProperty(t,"__esModule",{value:!0});var _=r.getLogger("esri.views.2d.engine.webgl.WGLMarkerTemplateBase");t.default=function(e){return function(e){function t(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var r=e.apply(this,t)||this;return r.angle=0,r.xOffset=0,r.yOffset=0,r.width=0,r.height=0,r.boundsType="square",r._anchorX=0,r._anchorY=0,r._computedWidth=0,r._computedHeight=0,r.geometryType=f.WGLGeometryType.MARKER,r}return i.__extends(t,e),t.prototype.writeMeshWithGeometry=function(e,t,i,r,n,o){var a=t.indexVector,s=t.get("geometry"),l=new h(r,this.geometryType,this._materialKey),u=t.getVector("geometry").vertexCount;if(e.push(l),l.vertexFrom=u,l.indexFrom=a.length,this._markerPlacement)this._writePlacedMarkers(l,s,a,u,r,n,o);else{if(p.isPoint(o)){var c=o.x,f=o.y;return this._writeVertices(l,s,r,this._getPos(c,f)),void this._writeIndices(l,a,u)}if(p.isPolyline(o))this._writeMany(l,a,s,u,r,o.paths[0]);else if(p.isPolygon(o)){var d=n.centroid;d?(this._writeVertices(l,s,r,this._getPos(c=d.x,f=d.y)),this._writeIndices(l,a,u)):_.error("Tried to render polygon geometries as markers, but found no centroid!")}else p.isMultipoint(o)&&this._writeMany(l,a,s,u,r,o.points)}},t.prototype._applyTransformation=function(e,t,i){void 0===i&&(i=0),a.mat2d.identity(e),a.mat2d.translate(e,e,u.vec2f32.fromValues(this.xOffset,-this.yOffset)),this.angle+i!==0&&a.mat2d.rotate(e,e,3.14159265359/180*(this.angle+i));var r=this._computedWidth,n=this._computedHeight,o=(this._anchorX-.5)*r,s=(this._anchorY-.5)*n;l.vec2.set(t,o,s),l.vec2.transformMat2d(t,t,e),this._offsetUpperLeft=d.i1616to32(16*t[0],16*t[1]),l.vec2.set(t,o+r,s),l.vec2.transformMat2d(t,t,e),this._offsetUpperRight=d.i1616to32(16*t[0],16*t[1]),l.vec2.set(t,o,s+n),l.vec2.transformMat2d(t,t,e),this._offsetBottomLeft=d.i1616to32(16*t[0],16*t[1]),l.vec2.set(t,o+r,s+n),l.vec2.transformMat2d(t,t,e),this._offsetBottomRight=d.i1616to32(16*t[0],16*t[1])},t.prototype._writePlacedMarkers=function(e,t,i,r,a,l,f){var d=c.CIMMarkerPlacementHelper.getPlacement(f,n.unwrap(this._markerPlacement),o.pt2px(1));if(d)for(var h=u.vec2f32.create(),p=s.mat2df32.create(),_=0,m=d.next();null!=m;)m.tx>=-128&&m.tx<=640&&m.ty>=-128&&m.ty<=640&&(this._applyTransformation(p,h,m.getAngle()/(3.14159265359/180)),this._writeVertices(e,t,a,this._getPos(m.tx,m.ty)),this._writeIndices(e,i,r+_),_+=4),m=d.next()},t.prototype._getPos=function(e,t){return d.i1616to32(Math.round(8*e),Math.round(8*t))},t.prototype._writeMany=function(e,t,i,r,n,o){for(var a=0,s=0,l=0,u=0,c=o;u<c.length;u++){var f=c[u],d=f[0],h=f[1],p=this._getPos(d+a,h+s);this._writeVertices(e,i,n,p),this._writeIndices(e,t,r+l),a+=d,s+=h,l+=4}},t.prototype._writeVertices=function(e,t,i,r){t.push(r),t.push(this._offsetUpperLeft),t.push(this._texUpperLeft),t.push(this._bitestAndDistRatio),t.push(i),t.push(this._fillColor),t.push(this._outlineColor),t.push(this._sizeOutlineWidth),t.push(r),t.push(this._offsetUpperRight),t.push(this._texUpperRight),t.push(this._bitestAndDistRatio),t.push(i),t.push(this._fillColor),t.push(this._outlineColor),t.push(this._sizeOutlineWidth),t.push(r),t.push(this._offsetBottomLeft),t.push(this._texBottomLeft),t.push(this._bitestAndDistRatio),t.push(i),t.push(this._fillColor),t.push(this._outlineColor),t.push(this._sizeOutlineWidth),t.push(r),t.push(this._offsetBottomRight),t.push(this._texBottomRight),t.push(this._bitestAndDistRatio),t.push(i),t.push(this._fillColor),t.push(this._outlineColor),t.push(this._sizeOutlineWidth),e.vertexCount+=4},t.prototype._writeIndices=function(e,t,i){var r=i;t.push(r+0),t.push(r+1),t.push(r+2),t.push(r+1),t.push(r+3),t.push(r+2),e.indexCount+=6},t}(e)}}).apply(null,r),void 0===n||(e.exports=n)},Zry2:function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this._largestRange=null,this._parent=e,this._updateLargestRange()}return Object.defineProperty(e.prototype,"largestRange",{get:function(){return this._largestRange},enumerable:!0,configurable:!0}),e.prototype.rangeCreated=function(e){(!this._largestRange||e.count>this._largestRange.count)&&(this._largestRange=e)},e.prototype.rangeResized=function(e,t){e===this._largestRange?e.count<t&&this._updateLargestRange():(!this._largestRange||e.count>this._largestRange.count)&&(this._largestRange=e)},e.prototype.findBestRange=function(e){for(var t=this._parent._freeHead,i=null;null!==t;)t.count>=e&&(!i||t.count-e<i.count-e)&&(i=t),t=t.next;return i},e.prototype.findAdjacentRanges=function(e,t){for(var i=!0,r=!1,n=null,o=this._parent._freeHead;i&&!r;)e>=(null!==n?n.from+n.count:0)&&e+t<=(null!==o?o.from:this._parent._size)?(i=!1,r=!0):null!==o?(n=o,o=o.next):i=!1;return[n,o]},e.prototype._updateLargestRange=function(){for(var e=null,t=this._parent._freeHead;null!==t;)(!e||t.count>e.count)&&(e=t),t=t.next;this._largestRange=e},e}(),r=function(){function e(e,t){this._allocated=0,this._size=e,this._freeHead=e>0?{from:0,count:e,prev:null,next:null}:null,this._bookKeeper=t||new i(this),this._freeHead&&this._bookKeeper.rangeCreated(this._freeHead)}return e.prototype.allocate=function(t){var i=this._bookKeeper.findBestRange(t);if(null===i)return-1;var r=i.from,n=i.count;if(i.from+=t,i.count-=t,this._bookKeeper.rangeResized(i,r,n),this._allocated+=t,0===i.count){var o=null!==i.prev?this._freeHead:i.next;e._removeRange(i),this._freeHead=o}return r},e.prototype.free=function(t,i){var r=this._bookKeeper.findAdjacentRanges(t,i),n=r[0],o=r[1],a={from:t,count:i,prev:n,next:o};if(null!==n&&(n.next=a),null!==o&&(o.prev=a),this._bookKeeper.rangeCreated(a),this._allocated-=i,null!==o&&a.from+a.count===o.from){var s=a.from,l=a.count;e._fuse(a,o),e._removeRange(o),this._bookKeeper.rangeResized(a,s,l),this._bookKeeper.rangeResized(o,void 0,0)}null!==n&&n.from+n.count===a.from&&(s=n.from,l=n.count,e._fuse(n,a),e._removeRange(a),this._bookKeeper.rangeResized(n,s,l),this._bookKeeper.rangeResized(a,void 0,0)),this._freeHead=null!==a.prev?this._freeHead:a},Object.defineProperty(e.prototype,"fragmentation",{get:function(){var e=this._size-this._allocated;return 0===e?0:1-this._bookKeeper.largestRange.count/e},enumerable:!0,configurable:!0}),e._removeRange=function(e){null!==e.prev?null!==e.next?(e.prev.next=e.next,e.next.prev=e.prev):e.prev.next=null:null!==e.next&&(e.next.prev=null)},e._fuse=function(e,t){e.count+=t.count,e.next=t.next,t.from+=t.count,t.count=0,null!==t.next&&(t.next.prev=e)},e}();t.FreeList=r}).apply(null,r))||(e.exports=n)},a08a:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("ab6c"),i("j2SP"),i("DJpR"),i("tI6k"),i("JNkf"),i("Dos2"),i("3+7H")],n=(function(e,t,i,r,n,o,a,s,l,u){Object.defineProperty(t,"__esModule",{value:!0}),t.C_DEG_TO_RAD=Math.PI/180;var c=[1,1,1,1],f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._color=n.vec4f32.create(),t._dashArray=r.vec2f32.create(),t._programOptions={id:!1,dd:!1,pattern:!1},t._vertexAttributes={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:12,normalized:!1,divisor:0},{name:"a_offsetAndNormal",count:4,type:5120,offset:4,stride:12,normalized:!1,divisor:0},{name:"a_accumulatedDistance",count:2,type:5123,offset:8,stride:12,normalized:!1,divisor:0}]},t._vertexAttributesDD={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:20,normalized:!1,divisor:0},{name:"a_offsetAndNormal",count:4,type:5120,offset:4,stride:20,normalized:!1,divisor:0},{name:"a_accumulatedDistance",count:2,type:5122,offset:8,stride:20,normalized:!1,divisor:0},{name:"a_color",count:4,type:5121,offset:12,stride:20,normalized:!0,divisor:0},{name:"a_width",count:1,type:5126,offset:16,stride:20,normalized:!1,divisor:0}]},t}return i.__extends(t,e),t.prototype.dispose=function(){},t.prototype.drawMany=function(e,t){var i=e.context,r=e.displayLevel,n=e.state,o=e.drawPhase,u=e.styleLayerId,f=e.styleLayer,d=e.painter.getVectorTileProgramCach(),h=f.getPaintValue("line-translate",r),p=f.getPaintValue("line-translate-anchor",r),_=f.getPaintValue("line-pattern",r),m=void 0!==_,v=1/e.pixelRatio,g=f.getPaintValue("line-blur",r),y=f.hasDataDrivenColor?c:f.getPaintValue("line-color",r),b=f.hasDataDrivenOpacity?1:f.getPaintValue("line-opacity",r),x=f.hasDataDrivenWidth?1:f.getPaintValue("line-width",r),w=b*y[3];this._color[0]=w*y[0],this._color[1]=w*y[1],this._color[2]=w*y[2],this._color[3]=w;var T,S=f.hasDataDrivenLine,C=o===s.WGLDrawPhase.HITTEST;C&&(T=l.u32to4Xu8(u+1));var L=(C?1:0)<<2|(S?1:0)<<1|(m?1:0),O=this._programOptions;O.id=C,O.dd=S,O.pattern=m;var M=d.getProgram(3,L,O);if(i.bindProgram(M),M.setUniformMatrix3fv("u_displayViewMat3",n.displayViewMat3),M.setUniformMatrix3fv("u_displayMat3",1===p?n.displayMat3:n.displayViewMat3),M.setUniform2fv("u_lineTranslation",h),M.setUniform1f("u_depth",f.z),M.setUniform1f("u_blur",g),M.setUniform1f("u_antialiasing",v),M.setUniform4fv("u_color",this._color),M.setUniform1f("u_width",x),C&&M.setUniform4fv("u_id",T),m){var D=e.spriteMosaic,E=D.getMosaicItemPosition(_,!0);E&&(D.bind(i,9729,E.page,a.VTL_TEXTURE_BINDING_UNIT_SPRITES),M.setUniform2f("u_pattern_tl",E.tl[0],E.br[1]),M.setUniform2f("u_pattern_br",E.br[0],E.tl[1]),M.setUniform2f("u_spriteSize",8*E.size[0],E.size[1]),M.setUniform1i("u_texture",a.VTL_TEXTURE_BINDING_UNIT_SPRITES))}else{var I=f.getPaintValue("line-dasharray",r);I.length<2&&(I=[1,-1]),this._dashArray[0]=8*I[0],this._dashArray[1]=8*I[1],M.setUniform2fv("u_dasharray",this._dashArray)}for(var P=0,A=t;P<A.length;P++){var V=A[P];if(V.layerData[u]){var R=V.layerData[u],F=this._getLineVAO(i,V,S,d);F&&(i.bindVAO(F),M.setUniformMatrix3fv("u_dvsMat3",V.transforms.dvs),i.setStencilFunction(514,V.stencilRef,255),i.drawElements(4,R.triangleElementCount,5125,12*R.triangleElementStart),V.triangleCount+=R.triangleElementCount/3)}}},t.prototype._getLineVAO=function(e,t,i,r){if(i){if(t.lineDDVertexArrayObject)return t.lineDDVertexArrayObject;var n=t.lineDDVertexBuffer,a=t.lineIndexBuffer;return n&&a?(t.lineDDVertexArrayObject=new o.VertexArrayObject(e,r.getProgramAttributes(3),this._vertexAttributesDD,{geometry:n},a),t.lineDDVertexArrayObject):null}if(t.lineVertexArrayObject)return t.lineVertexArrayObject;var s=t.lineVertexBuffer,l=t.lineIndexBuffer;return s&&l?(t.lineVertexArrayObject=new o.VertexArrayObject(e,r.getProgramAttributes(3),this._vertexAttributes,{geometry:s},l),t.lineVertexArrayObject):null},t}(u.default);t.WGLBrushVTLLine=f}).apply(null,r),void 0===n||(e.exports=n)},apbF:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("ma1f"),i("qsST"),i("xoE+"),i("jBNx"),i("DJpR"),i("4F/P"),i("JNkf"),i("7AYJ")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c){var f;Object.defineProperty(t,"__esModule",{value:!0});var d=n.getLogger("esri.views.2d.engine.webgl.Utils");function h(e){for(var t={},i=0,r=e;i<r.length;i++){var n=r[i];t[n.name]=n.strideInBytes}return t}t.C_VBO_GEOMETRY="geometry",t.C_VBO_PERINSTANCE="per_instance",t.C_VBO_PERINSTANCE_VV="per_instance_vv",t.C_ICON_VERTEX_DEF=[{name:t.C_VBO_GEOMETRY,strideInBytes:32,divisor:0}],t.C_FILL_VERTEX_DEF=[{name:t.C_VBO_GEOMETRY,strideInBytes:32,divisor:0}],t.C_FILL_VERTEX_DEF_DD=[{name:t.C_VBO_GEOMETRY,strideInBytes:12,divisor:0}],t.C_LINE_VERTEX_DEF=[{name:t.C_VBO_GEOMETRY,strideInBytes:36,divisor:0}],t.C_TEXT_VERTEX_DEF=[{name:t.C_VBO_GEOMETRY,strideInBytes:32,divisor:0}],t.C_LABEL_VERTEX_DEF=[{name:t.C_VBO_GEOMETRY,strideInBytes:36,divisor:0}],t.C_ICON_STRIDE_SPEC=h(t.C_ICON_VERTEX_DEF),t.C_FILL_STRIDE_SPEC=h(t.C_FILL_VERTEX_DEF),t.C_FILL_STRIDE_SPEC_DD=h(t.C_FILL_VERTEX_DEF_DD),t.C_LINE_STRIDE_SPEC=h(t.C_LINE_VERTEX_DEF),t.C_TEXT_STRIDE_SPEC=h(t.C_TEXT_VERTEX_DEF),t.C_LABEL_STRIDE_SPEC=h(t.C_LABEL_VERTEX_DEF),t.getStrides=function(e,i){switch(e){case u.WGLGeometryType.MARKER:return t.C_ICON_STRIDE_SPEC;case u.WGLGeometryType.FILL:return i?t.C_FILL_STRIDE_SPEC_DD:t.C_FILL_STRIDE_SPEC;case u.WGLGeometryType.LINE:return t.C_LINE_STRIDE_SPEC;case u.WGLGeometryType.TEXT:return t.C_TEXT_STRIDE_SPEC;case u.WGLGeometryType.LABEL:return t.C_LABEL_STRIDE_SPEC}};var p=[t.C_VBO_GEOMETRY],_=[t.C_VBO_GEOMETRY],m=[t.C_VBO_GEOMETRY],v=[t.C_VBO_GEOMETRY],g=[t.C_VBO_GEOMETRY];function y(e){switch(e){case u.WGLGeometryType.MARKER:return p;case u.WGLGeometryType.FILL:return _;case u.WGLGeometryType.LINE:return m;case u.WGLGeometryType.TEXT:return v;case u.WGLGeometryType.LABEL:return g}}function b(e){switch(e%4){case 0:case 2:return 4;case 1:case 3:return 1}}function x(e){return"string"==typeof e}function w(e){switch(e){case 5120:case 5121:return 1;case 5122:case 5123:return 2;case 5126:case 5124:case 5125:return 4}}t.getNamedBuffers=y,t.strideToPackingFactor=b,t.allocateTypedArrayBuffer=function(e,t){switch(t%4){case 0:case 2:return new Uint32Array(Math.floor(e*t/4));case 1:case 3:return new Uint8Array(e*t)}},t.allocateTypedArrayBufferwithData=function(e,t){switch(t%4){case 0:case 2:return new Uint32Array(e);case 1:case 3:return new Uint8Array(e)}},t.getTextProperties=function(e){return c.TextProperties.pool.acquire(e.color?l.copyAndPremultiply(e.color):[255,255,255,255],e.haloColor?l.copyAndPremultiply(e.haloColor):[255,255,255,255],a.pt2px(e.haloSize),a.pt2px(e.font.size),e.angle*Math.PI/180,e.xoffset/e.font.size,e.yoffset/e.font.size,"left"===e.horizontalAlignment?0:"right"===e.horizontalAlignment?1:.5,"top"===e.verticalAlignment?0:"bottom"===e.verticalAlignment?1:.5)},t.isDefined=function(e){return null!=e},t.isNumber=function(e){return"number"==typeof e},t.isString=x,t.isStringOrNull=function(e){return null==e||x(e)},t.getCapType=function(e,t){switch(e){case"butt":return 0;case"round":return t?2:1;case"square":return 2;default:return d.error(new r("mapview-invalid-type","Cap type "+e+" is not a valid option. Defaulting to round")),1}},t.getJoinType=function(e){switch(e){case"miter":return 2;case"bevel":return 0;case"round":return 1;default:return d.error(new r("mapview-invalid-type","Join type "+e+" is not a valid option. Defaulting to round")),1}},t.getVVType=function(e){switch(e){case"opacity":return u.VVType.OPACITY;case"color":return u.VVType.COLOR;case"rotation":return u.VVType.ROTATION;case"size":return u.VVType.SIZE;default:return d.error("Cannot interpret unknown vv: "+e),null}},t.getTransformParams=function(e){return{transform:e.transform,hasZ:e.hasZ,hasM:e.hasM}},t.copyMeshData=function(e,t,i,r,n,o,a){for(var s in o)for(var l=o[s].stride,u=b(l),c=o[s].data,f=i[s].data,d=l*n.vertexCount/u,h=l*e/u,p=l*n.vertexFrom/u,_=0;_<d;++_)f[_+h]=c[_+p];var m=n.indexCount;for(_=0;_<m;++_)r[_+t]=a[_+n.indexFrom]-n.vertexFrom+e},t.C_VBO_INFO=((f={})[t.C_VBO_GEOMETRY]=35044,f),t.createGeometryData=function(e,t){for(var i=[],r=0;r<5;++r){for(var n={},o=0,a=y(r);o<a.length;o++){var s=a[o];n[s]={data:t(r,s)}}i.push({data:e(r),buffers:n})}return i},t.createTextureFromTexelData=function(e,t){var i,r;return o.isPowerOfTwo(t.width)&&o.isPowerOfTwo(t.height)?(i=!0,r=9987):(i=!1,r=9729),new s.Texture(e,{target:3553,pixelFormat:6408,internalFormat:6408,dataType:5121,hasMipmap:i,samplingMode:r,wrapMode:33071,flipped:!0},t)},t.geometryToMappedGeometry=function(e){return{vertexFrom:void 0,vertexTo:void 0,geometry:e}},t.getBytes=w,t.getPixelBytes=function(e){switch(e){case 5121:return 1;case 32819:return 2;case 5126:return 4;default:return void d.error(new r("webgl-utils","Unable to handle type "+e))}},t.getPixelArrayCtor=function(e){switch(e){case 5121:return Uint8Array;case 32819:return Uint16Array;case 5126:return Float32Array;default:return void d.error(new r("webgl-utils","Unable to handle type "+e))}};var T=new Map;t.createProgramDescriptor=function(e,t){if(!T.has(e)){var r=function(e){var t={},r=function(r){var n=0;t[r]=e[r].map((function(e){var t=i.__assign(i.__assign({},e),{normalized:e.normalized||!1,divisor:e.divisor||0,offset:n,stride:0});return n+=e.count*w(e.type),t})),t[r].forEach((function(e){return e.stride=n}))};for(var n in e)r(n);return t}(t),n={strides:function(e){var t={};for(var i in e){var r=e[i];t[i]=r.length?r[0].stride:0}return t}(r),bufferLayouts:r,attributes:function(e){var t={};for(var i in e)for(var r=0,n=e[i];r<n.length;r++){var o=n[r];t[o.name]=o.location}return t}(t)};T.set(e,n)}return T.get(e)}}).apply(null,r))||(e.exports=n)},azm3:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("hNI9"),i("fVTS"),i("flWe")],void 0===(n=(function(e,t,i,r,n){return function(){function e(e){this.insertAfter=null,this.id=e,this.displayRecords=[],this.metrics=[]}return e.prototype.copy=function(){var t=new e(this.id);return t.set(this),t},e.prototype.clone=function(){var t=new e(this.id);return t.displayRecords=this.displayRecords.map((function(e){return e.clone()})),t.metrics=this.metrics.map((function(e){return e.clone()})),t.insertAfter=this.insertAfter,t},e.prototype.set=function(e){this.id=e.id,this.displayRecords=e.displayRecords,this.metrics=e.metrics,this.insertAfter=e.insertAfter},e.prototype.serialize=function(e){return e.push(this.id),n.serializeList(e,this.metrics),n.serializeList(e,this.displayRecords),e},e.deserialize=function(t){var o=t.readInt32(),a=new e(o),s={id:o},l=n.deserializeList(t,r.default);return l.length&&(a.metrics=l),a.displayRecords=n.deserializeList(t,i,s),a},e}()}).apply(null,r))||(e.exports=n)},bLBh:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("ma1f"),i("qsST"),i("CX95")],void 0===(n=(function(e,t,i,r,n,o){Object.defineProperty(t,"__esModule",{value:!0});var a=n.getLogger("esri/views/2d/engine/webgl/mesh/factories/matcherUtils");t.createMatcher=function(e,t,n){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(i){if(!n)return[2,new o.GraphicMatcher(e)];switch(n.type){case"simple":case"dot-density":return[2,o.FeatureMatcher.fromBasicRenderer(n,e,t)];case"unique-value":return[2,o.MapMatcher.fromUVRenderer(n,e,t)];case"class-breaks":return[2,o.IntervalMatcher.fromCBRenderer(n,e,t)];case"dictionary":return[2,o.DictionaryMatcher.fromDictionaryRenderer(n,e,t)];default:return a.error(new r("mapview-mesh:invalid-renderer","Unable to handle unknown renderer type")),[2,null]}return[2]}))}))}}).apply(null,r))||(e.exports=n)},bOAX:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("YaB4"),i("/U66")],n=(function(e,t,i,r,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.prepareRenderPasses=function(t){var n=this,o=t.registerRenderPass({name:"bitmap",brushes:[r.brushes.Bitmap],target:function(){return n.children}});return i.__spreadArrays(e.prototype.prepareRenderPasses.call(this,t),[o])},t.prototype.createRenderParams=function(t){return i.__assign(i.__assign({},e.prototype.createRenderParams.call(this,t)),{blendMode:this.blendMode})},t}(n.default);t.BitmapContainer=o}).apply(null,r),void 0===n||(e.exports=n)},bePc:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("jBNx"),i("4F/P"),i("Dos2"),i("m87x"),i("8Lwu"),i("O6Ih"),i("yVlQ"),i("PlK1")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c){Object.defineProperty(t,"__esModule",{value:!0});var f=function(e){function t(t,i){var o=e.call(this,i)||this;o._cimLineLayer=i;var l=0;if(s.isFunction(i.width)||(l=.5*r.pt2px(i.width)),o._dynamicPropertyMap.set("_halfWidth",(function(e,t,n){return s.isFunction(i.width)?.5*r.pt2px(i.width(e,t,n)):l})),s.isFunction(i.cap)?o._dynamicPropertyMap.set("_capType",i.cap):o._capType=i.cap,s.isFunction(i.join)?o._dynamicPropertyMap.set("_joinType",i.join):o._joinType=i.join,s.isFunction(i.color))o._dynamicPropertyMap.set("_fillColor",(function(e,t,r){var o=i.color(e,t,r);return o&&n.premultiplyAlphaRGBA(o)||0}));else{var u=i.color;o._fillColor=u&&n.premultiplyAlphaRGBA(u)||0}return s.isFunction(i.miterLimit)?o._dynamicPropertyMap.set("_miterLimitCosine",(function(e,t,r){return s.getLimitCosine(i.miterLimit(e,t,r))})):o._miterLimitCosine=s.getLimitCosine(i.miterLimit),o._scaleFactor=i.scaleFactor||1,o._isDashed=i.isDashed,o.effects=i.effects,o.tessellationProperties._bitset=i.colorLocked?1:0,o._materialKey=a.createMaterialKey(o.geometryType,t,i.isOutline),o._initializeTessellator(!0),o}return i.__extends(t,e),t.fromCIMLine=function(e,i){return new t(e,i)},t.prototype.bindFeature=function(e,t,i){var r=this;this._dynamicPropertyMap.forEach((function(n,o){r[o]=n(e,t,i)})),this._halfWidth*=this._scaleFactor;var n=this._materialCache,s=(0,this._cimLineLayer.materialHash)(e,t,i),l=n.get(s),u=null;if(l&&c.ok(l.spriteMosaicItem)&&(u=l.spriteMosaicItem),u){this._hasPattern=!0;var f=u.rect,d=f.x+1+u.width,h=f.y+1+u.height;this.tessellationProperties._tl=o.i1616to32(f.x+1,f.y+1),this.tessellationProperties._br=o.i1616to32(d,h)}else this._hasPattern=!1,this.tessellationProperties._tl=0,this.tessellationProperties._br=0;this.tessellationProperties._fillColor=this._fillColor,this.tessellationProperties._halfWidth=this._halfWidth,this.tessellationProperties._halfReferenceWidth=this.tessellationProperties._halfWidth;var p=a.LineMaterialKey.load(this._materialKey);u&&(p.sdf=u.sdf,p.pattern=!0,p.textureBinding=u.textureBinding),this._materialKey=p.data},t}(l.default(u.default));t.default=f}).apply(null,r))||(e.exports=n)},bqoF:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("hPTP")],void 0===(n=(function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.tileInfo={name:"tileInfo",shaders:{vertexShader:i.resolveIncludes("tileInfo/tileInfo.vert"),fragmentShader:i.resolveIncludes("tileInfo/tileInfo.frag")},attributes:{a_pos:0}}}).apply(null,r))||(e.exports=n)},cF6f:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("flWe"),i("3vQA")],void 0===(n=(function(e,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.displayObjects=e,this.vertexVectorsMap=t}return Object.defineProperty(e.prototype,"vertexBuffersMap",{get:function(){if(!this._vertexBuffersMap){this._vertexBuffersMap={};for(var e=0;e<this.vertexVectorsMap.length;e++)this._vertexBuffersMap[e]=this.vertexVectorsMap[e].intoBuffers();this.vertexVectorsMap=null}return this._vertexBuffersMap},enumerable:!0,configurable:!0}),e.prototype.get=function(e){return this.vertexVectorsMap[e]},e.prototype.pushDisplayObject=function(e){this.displayObjects.push(e)},e.prototype.encode=function(e,t){var n=i.serializeList(new r.default(Uint32Array,this._guessSize()),this.displayObjects).buffer(),o={};t.push(n);for(var a=0;a<this.vertexVectorsMap.length;a++){var s=this.vertexVectorsMap[a];o[a]={},s.transfer(o[a],t)}e.displayObjects=n,e.vertexBuffersMap=o,this.destroy()},e.prototype.destroy=function(){this.vertexVectorsMap=null,this.displayObjects=null},e.prototype._guessSize=function(){for(var e=this.displayObjects,t=Math.min(e.length,4),i=0,r=0;r<t;r++)i=Math.max(i,e[r].displayRecords.length);return 2*(12*e.length+e.length*i*40)},e}();t.MeshData=n}).apply(null,r))||(e.exports=n)},cjzh:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("LxLY"),i("jBNx"),i("Zx0K"),i("ab6c"),i("4F/P"),i("tI6k"),i("Dos2"),i("m87x"),i("ZOLT"),i("MzWl")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c,f,d){Object.defineProperty(t,"__esModule",{value:!0});var h=function(e){function t(t,i,r,n,s,l,f,d,h,p,_,m,v,g,y,b,x,w,T,S,C){var L=e.call(this)||this;L.angle=n,L.height=f,L.width=l,L.xOffset=i*T,L.yOffset=r*T,L._markerPlacement=S,L.effects=C,L._anchorX=.5-((.5+b)*y.width+1)/y.rect.width,L._anchorY=.5-((.5+x)*y.height+1)/y.rect.height;var O=(1===g?1:0)|(_?1:0)<<1|(v?1:0)<<2|(m?1:0)<<3,M=y&&y.sdf,D=c.MarkerMaterialKey.load(c.createMaterialKey(L.geometryType,t,!1));D.sdf=M,D.pattern=!0,D.textureBinding=y.textureBinding,L._materialKey=D.data,L._fillColor=s,L._outlineColor=h,L._sizeOutlineWidth=u.i8888to32(Math.round(Math.min(Math.sqrt(128*l),255)),Math.round(Math.min(Math.sqrt(128*f),255)),Math.round(Math.min(Math.sqrt(128*p),255)),Math.round(Math.min(Math.sqrt(128*d),255)));var E=y.rect.x,I=y.rect.y,P=E+y.rect.width,A=I+y.rect.height;L._texUpperLeft=u.i1616to32(E,I),L._texUpperRight=u.i1616to32(P,I),L._texBottomLeft=u.i1616to32(E,A),L._texBottomRight=u.i1616to32(P,A),l*=w,f*=w,l*=T,f*=T;var V=Math.round(Math.min(64*w,255));L._bitestAndDistRatio=u.i8888to32(0,0,O,V),f*=y.rect.height/y.height,L._computedWidth=l*=y.rect.width/y.width,L._computedHeight=f;var R=a.vec2f32.create(),F=o.mat2df32.create();return L._applyTransformation(F,R),L}return i.__extends(t,e),t.fromCIMMarker=function(e,i,o){var a=i.size,l=(o&&o.width||1)/(o&&o.height||1)*i.scaleX,u=i.scaleSymbolsProportionally&&i.frameHeight?a/i.frameHeight:1,c=s.premultiplyAlphaRGBA(i.color),f=s.premultiplyAlphaRGBA(i.outlineColor),d=n.pt2px(a),h=d*l,p=n.pt2px(i.offsetX||0),_=n.pt2px(i.offsetY||0),m=n.pt2px(i.outlineWidth||0)*u,v=i.alignment||0,g=n.pt2px(i.referenceSize),y=i.rotation||0;i.rotateClockwise||(y=-y);var b=0,x=0,w=i.anchorPoint;return w&&(i.isAbsoluteAnchorPoint?a&&(b=-w.x/(a*l),x=w.y/a):(b=w.x,x=w.y)),new t(e,p,_,y,c,h,d,g,f,m,i.colorLocked,i.scaleSymbolsProportionally,!1,v,o,b,x,i.sizeRatio,r.unwrapOr(i.scaleFactor,1),i.markerPlacement,i.effects)},t.fromPictureMarker=function(e,i,r){var o=Math.round(n.pt2px(i.width)),a=Math.round(n.pt2px(i.height)),s=l.PICTURE_FILL_COLOR;return new t(e,Math.round(n.pt2px(i.xoffset||0)),Math.round(n.pt2px(i.yoffset||0)),i.angle,s,o,a,a,0,0,!1,!1,!1,0,r,0,0,1,1,null,null)},t.fromSimpleMarker=function(e,i,r){var o=s.premultiplyAlphaRGBA(i.color),a=Math.round(n.pt2px(i.size)),l=a,u=Math.round(n.pt2px(i.xoffset||0)),c=Math.round(n.pt2px(i.yoffset||0)),f=i.style,d=i.outline,h=0|(d&&d.color&&s.premultiplyAlphaRGBA(d.color)),p=0|(d&&d.width&&Math.round(n.pt2px(d.width))),_=new t(e,u,c,i.angle,o,a,l,l,h,p,!1,!1,"cross"===f||"x"===f,0,r,0,0,126/64,1,null,null);return _.boundsType="circle"===f?"circle":"square",_},t.fromLineSymbolMarker=function(e,i,r){var o,a=i.marker,l=s.premultiplyAlphaRGBA(a.color?a.color:i.color),u=Math.round(n.pt2px(6*i.width)),c=u,f=a.style,d="cross"===f||"x"===f;switch(a.placement){case"begin-end":o="Both";break;case"begin":o="JustBegin";break;case"end":o="JustEnd";break;default:o="None"}var h={type:"CIMMarkerPlacementAtExtremities",angleToLine:!0,offset:0,extremityPlacement:o,offsetAlongLine:0},p=new t(e,0,0,0,l,u,c,c/6,l,d?Math.round(n.pt2px(i.width)):0,!1,!1,d,1,r,0,0,126/64,1,h,null);return p.boundsType="circle"===f?"circle":"square",p},t}(f.default(d.default));t.default=h}).apply(null,r))||(e.exports=n)},"dEz+":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("ma1f"),i("qMld")],void 0===(n=(function(e,t,i,r,n){Object.defineProperty(t,"__esModule",{value:!0});for(var o=new Uint32Array(256),a=0;a<256;a++){for(var s=a,l=0;l<8;l++)s=0!=(1&s)?3988292384^s>>>1:s>>>1;o[a]=s}var u=new r("Not a PNG"),c=new r("Not an animated PNG"),f=new Uint8Array([137,80,78,71,13,10,26,10]);function d(e){var t=e.constructor===Uint8Array?e:new Uint8Array(e);return!f.some((function(e,i){return e!==t[i]}))}t.isPNG=d,t.getPNGSize=function(e){var t,i;return _(new Uint8Array(e),(function(e,r,n){var o=new DataView(r.buffer);"IHDR"===e&&(t=o.getUint32(n+8),i=o.getUint32(n+12))})),[t,i]},t.isAnimatedPNG=function(e){var t=new Uint8Array(e);if(!d(t))return!1;var i=!1;return _(t,(function(e){return!(i="acTL"===e)})),i};var h=function(){function e(){this.width=0,this.height=0,this.numPlays=0,this.playTime=0,this.frames=[],this.paused=!1,this.playing=!1,this.playSpeed=1,this.currentFrameNumber=0,this._lastUsedFrame=-1}return e.create=function(t,o){return i.__awaiter(this,void 0,void 0,(function(){var a,s;return i.__generator(this,(function(i){switch(i.label){case 0:a=new e,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,a._load(t,o)];case 2:return i.sent(),[3,4];case 3:return s=i.sent(),n.isAbortError(s)?[3,4]:[2,new r("invalid-resource","Could not load PNG: "+s.message)];case 4:return[2,a]}}))}))},e.prototype.play=function(){this.playing||(this.paused=!1,this.playing=!0,this._play())},e.prototype.pause=function(){this.paused=!0,this.playing=!1,clearTimeout(this.timerID)},e.prototype.togglePlay=function(){this.paused||!this.playing?this.play():this.pause()},e.prototype.bindFrame=function(e,t,i){e.bindTexture(t,i);var r=this.frameChanged();if(!r)return!1;var n=this.currentFrame,o=n.frameData,a=t.descriptor;return(n.left||n.top||n.width!==a.width||n.height!==a.height)&&t.setData(null),t.updateData(0,n.left,n.top,n.width,n.height,o),this.updateUsedFrame(),r},e.prototype.frameChanged=function(){return this._lastUsedFrame!==this.currentFrameNumber},e.prototype.updateUsedFrame=function(){this._lastUsedFrame=this.currentFrameNumber},e.prototype._load=function(e,t){return i.__awaiter(this,void 0,void 0,(function(){var t,o,a=this;return i.__generator(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),(t=function(e,t){var i=new Uint8Array(t);if(f.some((function(e,t){return e!==i[t]})))return u;var r=!1;if(_(i,(function(e){return!(r="acTL"===e)})),!r)return c;var n=[],o=[],a=null,s=null,l=0;if(_(i,(function(t,i,r,u){var c=new DataView(i.buffer);switch(t){case"IHDR":a=i.subarray(r+8,r+8+u),e.width=c.getUint32(r+8),e.height=c.getUint32(r+12);break;case"acTL":e.numPlays=c.getUint32(r+8+4);break;case"fcTL":s&&(e.frames.push(s),l++),(s=new p).width=c.getUint32(r+8+4),s.height=c.getUint32(r+8+8),s.left=c.getUint32(r+8+12),s.top=c.getUint32(r+8+16);var f=c.getUint16(r+8+20),d=c.getUint16(r+8+22);0===d&&(d=100),s.delay=1e3*f/d,s.delay<=10&&(s.delay=100),e.playTime+=s.delay,s.disposeOp=c.getUint8(r+8+24),s.blendOp=c.getUint8(r+8+25),s.dataParts=[],0===l&&2===s.disposeOp&&(s.disposeOp=1);break;case"fdAT":s&&s.dataParts.push(i.subarray(r+8+4,r+8+u));break;case"IDAT":s&&s.dataParts.push(i.subarray(r+8,r+8+u));break;case"IEND":o.push(v(i,r,12+u));break;default:n.push(v(i,r,12+u))}})),0===e.frames.length)return c;e.frameCount=e.frames.length;var d=new Blob(n),h=new Blob(o);return e.frames.forEach((function(e){var t=[];t.push(f),a.set(y(e.width),0),a.set(y(e.height),4),t.push(g("IHDR",a)),t.push(d),e.dataParts.forEach((function(e){return t.push(g("IDAT",e))})),t.push(h),e.data=new Blob(t,{type:"image/png"}),delete e.dataParts,t=null})),e}(this,e))!==this?[2,t]:(this._resizeCanvas=document.createElement("canvas"),this._resizeCanvas.width=this.width,this._resizeCanvas.height=this.height,[4,n.all(this.frames.map((function(e){return e.createImage(a._resizeCanvas)})))]);case 1:return i.sent(),[3,3];case 2:return o=i.sent(),n.isAbortError(o)?[3,3]:[2,new r("invalid-resource","Could not parse PNG")];case 3:return this.play(),[2]}}))}))},e.prototype._play=function(){var e,t,i=this;if(0!==this.playSpeed){this.playSpeed<0?(this.currentFrameNumber-=1,this.currentFrameNumber<0&&(this.currentFrameNumber=this.frames.length-1),t=this.currentFrameNumber,(t-=1)<0&&(t=this.frames.length-1),e=1*-this.frames[t].delay/this.playSpeed):(this.currentFrameNumber+=1,this.currentFrameNumber%=this.frames.length,e=1*this.frames[this.currentFrameNumber].delay/this.playSpeed);var r=this.frames[this.currentFrameNumber];this.currentFrame={frameData:r.imageData,top:r.top,left:r.left,width:r.width,height:r.height},this.timerID=window.setTimeout((function(){return i._play()}),e)}else this.pause()},e}();t.default=h;var p=function(){function e(){this.left=0,this.top=0,this.width=0,this.height=0,this.delay=0,this.disposeOp=0,this.blendOp=0,this.data=null,this.imageData=null}return e.prototype.createImage=function(e){return i.__awaiter(this,void 0,void 0,(function(){var t=this;return i.__generator(this,(function(i){return null!==this.imageData?[2]:[2,n.create((function(i,r){var n=URL.createObjectURL(t.data),o=document.createElement("img");o.onload=function(){URL.revokeObjectURL(n),t.imageData=function(e,t){t.width=e.width,t.height=e.height;var i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);for(var r,n=i.getImageData(0,0,e.width,e.height),o=new Uint8Array(n.data),a=0;a<o.length;a+=4)o[a]=o[a]*(r=o[a+3]/255),o[a+1]=o[a+1]*r,o[a+2]=o[a+2]*r;return new ImageData(new Uint8ClampedArray(o.buffer),e.width,e.height)}(o,e),i()},o.onerror=function(){URL.revokeObjectURL(n),t.imageData=null,r(new Error("Image creation error"))},o.src=n}))]}))}))},e}();function _(e,t){var i,r,n,o=new DataView(e.buffer),a=8;do{r=o.getUint32(a),n=t(i=m(e,a+4,4),e,a,r),a+=12+r}while(!1!==n&&"IEND"!==i&&a<e.length)}function m(e,t,i){var r=Array.prototype.slice.call(e.subarray(t,t+i));return String.fromCharCode.apply(String,r)}function v(e,t,i){var r=new Uint8Array(i);return r.set(e.subarray(t,t+i)),r}function g(e,t){var i=e.length+t.length,r=new Uint8Array(i+8),n=new DataView(r.buffer);n.setUint32(0,t.length),r.set(function(e){for(var t=new Uint8Array(e.length),i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t}(e),4),r.set(t,8);var a=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=e.length-t);for(var r=-1,n=t,a=t+i;n<a;n++)r=r>>>8^o[255&(r^e[n])];return-1^r}(r,4,i);return n.setUint32(i+4,a),r}function y(e){return new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e])}}).apply(null,r))||(e.exports=n)},dtJe:function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.keyFromSymbol=function(e){switch(e.type){case"esriSMS":return e.style+"."+e.path;case"esriSLS":return e.style+"."+e.cap;case"esriSFS":return""+e.style;case"esriPFS":case"esriPMS":return e.imageData?e.imageData:""+e.url+e.width+e.height;default:return e.mosaicHash?e.mosaicHash:JSON.stringify(e)}}}).apply(null,r))||(e.exports=n)},eFQu:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("ma1f"),i("qsST")],void 0===(n=(function(e,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r.getLogger("esri.views.2d.engine.collisions.LayerViewSorter");function o(e){return"esri.views.2d.layers.FeatureLayerView2D"===e.declaredClass||"esri.views.2d.layers.StreamLayerView2D"===e.declaredClass}function a(e){if(!e.layer||!e.layer.renderer)return!1;switch(e.layer.renderer.type){case"class-breaks":case"simple":case"unique-value":case"dictionary":case"dot-density":return!0;default:return n.error(new i("mapview-labeling","Renderer of type "+e.layer.renderer.type+" does not currently support labeling")),!1}}var s=function(){function e(e,t){this.registerLayer=e,this.unregisterLayer=t,this._layerViewState=new Map}return e.prototype.findIndex=function(e){return e.view.allLayerViews.findIndex((function(t){return t.uid===e.uid}))},e.prototype.update=function(e){for(var t=e.added,i=0,r=e.removed;i<r.length;i++)o(l=r[i])&&this._layerViewState.has(l)&&this._deleteState(l);for(var n=0,s=t;n<s.length;n++){var l;o(l=s[n])&&a(l)&&!this._layerViewState.has(l)&&this._createState(l)}this._recomputeOrder()},e.prototype.destroy=function(){this._layerViewState.forEach((function(e){return e.handles.forEach((function(e){return e.remove()}))}))},e.prototype._createState=function(e){var t={priority:-1,handles:null};return t.handles=[e.layer.watch("visible",this._recomputeOrder.bind(this)),e.layer.watch("labelsVisible",this._recomputeOrder.bind(this)),e.layer.watch("labelingInfo",this._recomputeOrder.bind(this)),e.layer.watch("featureReduction",this._recomputeOrder.bind(this))],this._layerViewState.set(e,t),t},e.prototype._deleteState=function(e){if(this._layerViewState.has(e)){var t=this._layerViewState.get(e);t.handles.forEach((function(e){return e.remove()})),-1!==t.priority&&this.unregisterLayer(e),this._layerViewState.delete(e)}},e.prototype._recomputeOrder=function(){var e=this;this._layerViewState.forEach((function(t,i){var r=i.view.map.allLayers.findIndex((function(e){return e.uid===i.layer.uid})),n=i.layer,o=n.featureReduction,a=n.visible&&n.labelsVisible&&(n.labelingInfo&&n.labelingInfo.length||o&&"cluster"===o.type&&o.labelsVisible&&o.labelingInfo&&o.labelingInfo.length)?4294967295-r:-1;a!==t.priority&&(t.priority=a,e.unregisterLayer(i),-1!==a&&e.registerLayer(i,a))}))},e}();t.LayerViewSorter=s}).apply(null,r))||(e.exports=n)},eprR:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("0J3i"),i("zp6E"),i("ma1f"),i("qsST"),i("LxLY"),i("qMld"),i("jBNx"),i("W9tT"),i("ab6c"),i("C+up"),i("tI6k"),i("JNkf"),i("0XPR"),i("3pdx"),i("Hoc/"),i("XCks"),i("1ZJt"),i("dEz+"),i("MUu6"),i("2Gaw"),i("PlK1"),i("dtJe")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c,f,d,h,p,_,m,v,g,y,b,x,w,T,S){var C=f.vec2f32.create(),L=a.getLogger("esri.views.2d.engine.webgl.TextureManager");function O(e){switch(e.type){case"esriSMS":case"esriPMS":case"CIMPointSymbol":case"CIMVectorMarker":case"CIMPictureMarker":case"CIMCharacterMarker":return!1;default:return!0}}function M(e){return i.__awaiter(this,void 0,void 0,(function(){var t,r;return i.__generator(this,(function(i){switch(i.label){case 0:t=window.URL.createObjectURL(e),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,n(t,{responseType:"image"})];case 2:return r=i.sent().data,window.URL.revokeObjectURL(t),[2,r];case 3:return i.sent(),window.URL.revokeObjectURL(t),[2,new o("mapview-invalid-resource","Could not fetch requested resource at "+t)];case 4:return[2]}}))}))}function D(e,t){return i.__awaiter(this,void 0,void 0,(function(){var r,a,s,u,c,f,d,h,p;return i.__generator(this,(function(_){switch(_.label){case 0:if(-1===(r=e.imageData?"data:"+e.contentType+";base64,"+e.imageData:e.url).indexOf(";base64,"))return[3,1];for(s=r.indexOf(";base64,")+8,u=r.substring(s),c=atob(u),f=new Uint8Array(c.length),d=0;d<c.length;d++)f[d]=c.charCodeAt(d);return a=f.buffer,[3,4];case 1:return _.trys.push([1,3,,4]),[4,n(r,i.__assign({responseType:"array-buffer"},t))];case 2:return h=_.sent().data,a=h,[3,4];case 3:return p=_.sent(),l.isAbortError(p)?[3,4]:[2,new o("mapview-invalid-resource","Could not fetch requested resource at "+r)];case 4:return[2,a]}}))}))}var E=function(e,t,i){return L.error(new o(e,t,i))},I=function(){function e(e,t,i){this.mosaicType=e,this.page=t,this.sdf=i}return e.fromMosaic=function(t,i){return new e(t,i.page,i.sdf)},e}();return function(){function e(e){this._invalidFontsMap=new Map,this._sdfConverter=new g.default(126),this._bindingInfos=new Array,this._hashToBindingIndex=new Map,this._rasterizer=new d.default,this._spriteMosaic=new y(e,2048,2048,500),this._glyphSource=new v(r.fontsUrl+"/{fontstack}/{range}.pbf"),this._glyphMosaic=new m(1024,1024,this._glyphSource)}return e.prototype.dispose=function(){this._spriteMosaic.dispose(),this._glyphMosaic.dispose(),this._rasterizer.dispose(),this._spriteMosaic=null,this._glyphMosaic=null,this._rasterizer=null},Object.defineProperty(e.prototype,"sprites",{get:function(){return this._spriteMosaic},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"glyphs",{get:function(){return this._glyphMosaic},enumerable:!0,configurable:!0}),e.prototype.rasterizeItem=function(e,t,r){return i.__awaiter(this,void 0,void 0,(function(){var n,o,a=this;return i.__generator(this,(function(i){switch(i.label){case 0:if(s.isNone(e))return E("mapview-null-resource","Unable to rasterize null resource"),[2,null];switch(e.type){case"CIMTextSymbol":case"esriTS":return[3,1];case"esriSMS":case"esriPMS":case"esriSFS":case"esriPFS":case"esriSLS":return[3,3]}return[3,3];case 1:return[4,this._rasterizeText(e,t,r)];case 2:return(n=i.sent()).forEach((function(e){return a._setTextureBinding(p.MosaicType.GLYPH,e)})),[2,{glyphMosaicItems:n}];case 3:return(l=e).type&&-1!==l.type.toLowerCase().indexOf("3d")?(E("mapview-invalid-type","MapView does not support symbol type: "+e.type,e),[2,null]):[4,this._rasterizeSpriteSymbol(e,r)];case 4:return o=i.sent(),T.ok(o)&&o&&this._setTextureBinding(p.MosaicType.SPRITE,o),[2,{spriteMosaicItem:o}]}var l}))}))},e.prototype.bindTextures=function(e,t,i){if(0!==i.textureBinding){var r=this._bindingInfos[i.textureBinding-1],n=r.page;switch(r.mosaicType){case p.MosaicType.SPRITE:var o=this.sprites.getWidth(n),a=this.sprites.getHeight(n),s=c.vec2.set(C,o,a);return this._spriteMosaic.bind(e,9729,n,h.TEXTURE_BINDING_SPRITE_ATLAS),t.setUniform1i("u_texture",h.TEXTURE_BINDING_SPRITE_ATLAS),void t.setUniform2fv("u_mosaicSize",s);case p.MosaicType.GLYPH:return s=c.vec2.set(C,o=this.glyphs.width,a=this.glyphs.height),this._glyphMosaic.bind(e,9729,n,h.TEXTURE_BINDING_GLYPH_ATLAS),t.setUniform1i("u_texture",h.TEXTURE_BINDING_GLYPH_ATLAS),void t.setUniform2fv("u_mosaicSize",s);default:L.error("mapview-texture-manager","Cannot handle unknown type "+r.mosaicType)}}},e.prototype._hashMosaic=function(e,t){return 1|e<<1|(t.sdf?1:0)<<2|t.page<<3},e.prototype._setTextureBinding=function(e,t){var i=this._hashMosaic(e,t);if(!this._hashToBindingIndex.has(i)){var r=I.fromMosaic(e,t);this._hashToBindingIndex.set(i,this._bindingInfos.length+1),this._bindingInfos.push(r)}t.textureBinding=this._hashToBindingIndex.get(i)},e.prototype._rasterizeText=function(e,t,r){return i.__awaiter(this,void 0,void 0,(function(){var n,o,a;return i.__generator(this,(function(i){switch(i.label){case 0:n=_.getFullyQualifiedFontName(e.font),o=this._invalidFontsMap.has(n),a=t||function(e){for(var t=[],i=0;i<e.length;i++)t.push(e.charCodeAt(i));return t}(w.bidiText(e.text)[0]),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this._glyphMosaic.getGlyphItems(o?"arial-unicode-ms-regular":n,a,r)];case 2:return[2,i.sent()];case 3:return i.sent(),E("mapview-invalid-resource","Couldn't find font "+n+". Falling back to Arial Unicode MS Regular"),this._invalidFontsMap.set(n,!0),[2,this._glyphMosaic.getGlyphItems("arial-unicode-ms-regular",a,r)];case 4:return[2]}}))}))},e.prototype._rasterizeSpriteSymbol=function(e,t){return i.__awaiter(this,void 0,void 0,(function(){var r,n,a,s;return i.__generator(this,(function(i){return function(e){switch(e.type){case"CIMSolidStroke":case"CIMSolidFill":return!0;case"esriSFS":return"esriSFSSolid"===e.style||"esriSFSNull"===e.style;case"esriSLS":return"esriSLSSolid"===e.style||"esriSLSNull"===e.style;default:return!1}}(e)?[2,null]:(r=S.keyFromSymbol(e),this._spriteMosaic.has(r)?[2,this._spriteMosaic.getSpriteItem(r)]:function(e){return"esriSMS"===e.type&&e.path}(e)?[2,this._handleSVG(e,r,t)]:function(e){return e.url||e.imageData}(e)?[2,this._handleImage(e,r,t)]:(n=this._rasterizer.rasterizeJSONResource(e))?(a=n.sdf,s=n.simplePattern,[2,this._addItemToMosaic(r,n.size,{type:"static",data:n.image},O(e),a,s)]):[2,new o("TextureManager","unrecognized or null rasterized image")])}))}))},e.prototype._handleSVG=function(e,t,r){return i.__awaiter(this,void 0,void 0,(function(){var n,o;return i.__generator(this,(function(i){switch(i.label){case 0:return n=[126,126],[4,this._sdfConverter.draw(e.path,r)];case 1:return o=i.sent(),[2,this._addItemToMosaic(t,n,{type:"static",data:new Uint32Array(o.buffer)},!1,!0,!0)]}}))}))},e.prototype._handleGIFOrPNG=function(e,t,r){return i.__awaiter(this,void 0,void 0,(function(){var n,a,s,u,c,f,d,h;return i.__generator(this,(function(i){switch(i.label){case 0:return[4,D(e,r)];case 1:if(n=i.sent(),!T.ok(n))return[3,10];if(a=x.isGIF(n),s=b.isPNG(n),!a&&!s)return[2,new o("mapview-invalid-resource","Image data is neither GIF nor PNG!")];u=void 0,i.label=2;case 2:return i.trys.push([2,7,,8]),a&&x.isAnimatedGIF(n)?[4,x.default.create(n,r)]:[3,4];case 3:return u=i.sent(),[3,6];case 4:return s&&b.isAnimatedPNG(n)?[4,b.default.create(n,r)]:[3,6];case 5:u=i.sent(),i.label=6;case 6:return[3,8];case 7:return c=i.sent(),l.isAbortError(c)?[3,8]:[2,new o("mapview-invalid-resource","Could not fetch requested resource!")];case 8:return u&&T.ok(u)?[2,this._addItemToMosaic(t,[u.width,u.height],{type:"animated",data:u},O(e),!1,!1)]:[4,M(new Blob([n],{type:a?"image/gif":"image/png"}))];case 9:if((f=i.sent())&&f instanceof HTMLImageElement)return d=this._rasterizer.rasterizeImageResource(f,e.colorSubstitutions),h=d.sdf,[2,this._addItemToMosaic(t,d.size,{type:"static",data:d.image},O(e),h,!1)];i.label=10;case 10:return[2,new o("mapview-invalid-resource","Could not handle resource!")]}}))}))},e.prototype._handleImage=function(e,t,r){return i.__awaiter(this,void 0,void 0,(function(){var a,s,c,f,d;return i.__generator(this,(function(h){switch(h.label){case 0:if(function(e){return e.url&&-1!==e.url.indexOf(".gif")||e.contentType&&"image/gif"===e.contentType||e.imageData&&-1!==e.imageData.indexOf("data:image/gif")}(e)||function(e){return e.url&&-1!==e.url.indexOf(".png")||e.contentType&&"image/png"===e.contentType||e.imageData&&-1!==e.imageData.indexOf("data:image/png")}(e))return[2,this._handleGIFOrPNG(e,t,r)];a=e.imageData?"data:"+e.contentType+";base64,"+e.imageData:e.url,h.label=1;case 1:return h.trys.push([1,3,,4]),[4,n(a,i.__assign({responseType:"image"},r))];case 2:return s=h.sent().data,-1!==a.indexOf("data:image/svg+xml")&&(s.width=u.pt2px(e.width),s.height=u.pt2px(e.height)),c=this._rasterizer.rasterizeImageResource(s,e.colorSubstitutions),f=c.sdf,[2,this._addItemToMosaic(t,c.size,{type:"static",data:c.image},O(e),f,!1)];case 3:return d=h.sent(),l.isAbortError(d)?[3,4]:[2,new o("mapview-invalid-resource","Could not fetch requested resource at "+a)];case 4:return[2,void 0]}}))}))},e.prototype._addItemToMosaic=function(e,t,i,r,n,o){return this._spriteMosaic.addSpriteItem(e,t,i,r,n,o)},e}()}).apply(null,r))||(e.exports=n)},f93k:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("JNkf"),i("apbF"),i("PDSL"),i("m87x")],n=(function(e,t,i,r,n,o,a){Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.dispose=function(){},t.prototype.getGeometryType=function(){return r.WGLGeometryType.LABEL},t.prototype.drawGeometry=function(e,t,i,r,o){var s=e.context,l=e.painter,u=e.state,c=e.rendererInfo,f=i.indexCount,d=i.indexFrom,h=a.LabelMaterialKey.load(i.materialKey),p=h.mapAligned?1:0;if(p||!(Math.abs(t.key.level-Math.round(100*e.displayLevel)/100)>=1)){var _=function(e){return n.createProgramDescriptor(e.data,{geometry:[{location:0,name:"a_pos",count:2,type:5122},{location:1,name:"a_id",count:4,type:5121},{location:2,name:"a_color",count:4,type:5121,normalized:!0},{location:3,name:"a_haloColor",count:4,type:5121,normalized:!0},{location:4,name:"a_texAndSize",count:4,type:5121},{location:5,name:"a_refSymbolAndPlacementOffset",count:4,type:5121},{location:6,name:"a_glyphData",count:4,type:5121},{location:7,name:"a_vertexOffset",count:2,type:5122},{location:8,name:"a_texCoords",count:2,type:5123}]})}(h),m=_.bufferLayouts,v=_.attributes,g=l.materialManager.getMaterialProgram(e,h,"materials/label",v,o),y=this._getVAO(s,m,v,r);e.context.setStencilFunction(514,0,255),s.bindProgram(g),s.bindVAO(y),this._setSharedUniforms(g,e,t),l.textureManager.bindTextures(s,g,h);var b=1===p?u.displayViewMat3:u.displayMat3;if(h.vvSizeMinMaxValue&&g.setUniform4fv("u_vvSizeMinMaxValue",c.vvSizeMinMaxValue),h.vvSizeScaleStops&&g.setUniform1f("u_vvSizeScaleStopsValue",c.vvSizeScaleStopsValue),h.vvSizeFieldStops){var x=c.getSizeVVFieldStops(t.key.level);g.setUniform1fv("u_vvSizeFieldStopsValues",x.values),g.setUniform1fv("u_vvSizeFieldStopsSizes",x.sizes)}h.vvSizeUnitValue&&g.setUniform1f("u_vvSizeUnitValueWorldToPixelsRatio",c.vvSizeUnitValueToPixelsRatio),g.setUniform1f("u_mapRotation",Math.floor(u.rotation/360*254)),g.setUniform1f("u_mapAligned",p),g.setUniformMatrix3fv("u_displayMat3",b),g.setUniform1f("u_opacity",1),g.setUniform1f("u_zoomLevel",Math.round(10*e.displayLevel)),g.setUniform2fv("u_screenSize",e.state.size),g.setUniform1f("u_isHalo",1),s.drawElements(4,f,5125,4*d),g.setUniform1f("u_isHalo",0),s.drawElements(4,f,5125,4*d),s.bindVAO(null),s.setStencilTestEnabled(!0),s.setBlendingEnabled(!0)}},t}(o.default);t.default=s}).apply(null,r),void 0===n||(e.exports=n)},fVTS:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("qsST"),i("ab6c"),i("tI6k"),i("x84Q"),i("flWe")],void 0===(n=(function(e,t,i,r,n,o,a){Object.defineProperty(t,"__esModule",{value:!0});var s=i.getLogger("esri/views/2d/engine/webgl/collisions/Metric"),l=function(){function e(e,t,i,n,o){this.id=e,this.range=t,this.boxes=null,this.minZoom=-1,this.size=0,this.directionX=0,this.directionY=0,this.offsetX=0,this.offsetY=0,this.placementPadding=0,this.anchor=r.vec2f32.fromValues(i,n),this.baseZoom=o}return e.prototype.add=function(e,t,i){e.x=e.x+t,e.y=e.y+i,this.bounds?this.boxes?(this.boxes.push(e),this.bounds.extend(e)):(this.boxes=[this.bounds,e],this.bounds=this.bounds.clone(),this.bounds.extend(e)):this.bounds=e},e.prototype.computeIndex=function(){var e=this.anchor[1],t=Math.floor(this.anchor[0]/n.COLLISION_BUCKET_SIZE),i=Math.floor(e/n.COLLISION_BUCKET_SIZE);this.xBucket=t,this.yBucket=i;var r=n.TILE_SIZE/n.COLLISION_BUCKET_SIZE;if(this.hasVV)return this.xOverflow=r,void(this.yOverflow=r);this.xOverflow=Math.min(r,Math.ceil(2*this.bounds.width/n.COLLISION_BUCKET_SIZE)),this.yOverflow=Math.min(r,Math.ceil(2*this.bounds.height/n.COLLISION_BUCKET_SIZE))},e.prototype.findCollisionDelta=function(e){var t=this.bounds.findCollisionDelta(e.bounds),i=this.boxes&&this.boxes.length,r=e.boxes&&e.boxes.length;return Math.abs(t)>n.COLLISION_MAX_ZOOM_DELTA||!i&&!r?t:i&&r?this._boxesToBoxes(e):i?this._boxesToBox(e):this._boxToBoxes(e)},e.prototype.computeVVOffset=function(e,t){t||s.error("mapview-labeling","Unable to compute label offset. Expected an evaluator function but found "+t);var i=this.size;if(this.hasVV){var r=t(e);i=isNaN(r)||null==r||r===1/0?this.size:r}this._computeOffset(i)},e.prototype.setPlacementOffset=function(e,t,i,r,n){this.hasVV=e,this.size=t,this.placementPadding=Math.round(i),this.directionX=r,this.directionY=n},e.prototype.clone=function(){var t=new e(this.id,this.range,this.anchor[0],this.anchor[1],this.baseZoom);return t.minZoom=this.minZoom,this.bounds&&(t.bounds=this.bounds.clone()),this.boxes&&(t.boxes=this.boxes.map((function(e){return e.clone()}))),t.xBucket=this.xBucket,t.yBucket=this.yBucket,t.xOverflow=this.xOverflow,t.yOverflow=this.yOverflow,t.hasVV=this.hasVV,t.size=this.size,t.directionX=this.directionX,t.directionY=this.directionY,t.offsetX=this.offsetX,t.offsetY=this.offsetY,t},e.prototype._boxToBoxes=function(e){for(var t=-1/0,i=0,r=e.boxes;i<r.length;i++){var n=this.bounds.findCollisionDelta(r[i]);t=Math.max(n,t)}return t},e.prototype._boxesToBox=function(e){for(var t=this.boxes[0].findCollisionDelta(e.bounds),i=1;i<this.boxes.length;i++){var r=this.boxes[i].findCollisionDelta(e.bounds);t=Math.max(r,t)}return t},e.prototype._boxesToBoxes=function(e){for(var t=-1/0,i=0;i<this.boxes.length;i++)for(var r=this.boxes[i],n=0,o=e.boxes;n<o.length;n++){var a=r.findCollisionDelta(o[n]);t=Math.max(a,t)}return t},e.prototype._computeOffset=function(e){this.offsetX=this.directionX*(e/2+this.placementPadding),this.offsetY=this.directionY*(e/2+this.placementPadding)},e.prototype.serialize=function(e){return e.push(this.id),this.bounds.serialize(e),e.push(this.range.from),e.push(this.range.count),e.push(this.anchor[0]),e.push(this.anchor[1]),e.push(this.baseZoom),e.push(this.hasVV?1:0),e.push(this.size),e.writeF32(this.directionX),e.writeF32(this.directionY),e.push(this.offsetX),e.push(this.offsetY),e.push(this.placementPadding),a.serializeList(e,this.boxes),e},e.deserialize=function(t){var i=t.readInt32(),r=o.default.deserialize(t),n={from:t.readInt32(),count:t.readInt32()},s=t.readInt32(),l=t.readInt32(),u=t.readInt32(),c=t.readInt32(),f=t.readInt32(),d=t.readF32(),h=t.readF32(),p=t.readInt32(),_=t.readInt32(),m=t.readInt32(),v=a.deserializeList(t,o.default),g=new e(i,n,s,l,u);return g.bounds=r,g.boxes=v,g.setPlacementOffset(!!c,f,m,d,h),g.offsetX=p,g.offsetY=_,g.computeIndex(),c||g._computeOffset(f),g},e}();t.default=l}).apply(null,r))||(e.exports=n)},flWe:function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeList=function(e,t){if(null!==t){e.push(t.length);for(var i=0,r=t;i<r.length;i++)r[i].serialize(e);return e}e.push(0)},t.deserializeList=function(e,t,i){for(var r=e.readInt32(),n=new Array(r),o=0;o<n.length;o++)n[o]=t.deserialize(e,i);return n}}).apply(null,r))||(e.exports=n)},"ge+T":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("YX1r"),i("lgZd"),i("ab6c"),i("DJpR"),i("Brhx"),i("Ob6M")],void 0===(n=(function(e,t,i,r,n,o,a,s,l){function u(e,t,i){var r={target:3553,pixelFormat:6408,internalFormat:6408,dataType:5121,wrapMode:33071};return t&&i&&(r.width=t,r.height=i),new a.Texture(e,r)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(t,i){void 0===t&&(t=null),void 0===i&&(i=!0);var r=e.call(this)||this;return r.requestRenderOnSourceChangedEnabled=i,r.stencilRef=0,r.coordScale=[1,1],r._height=void 0,r.pixelRatio=1,r.resolution=0,r.rotation=0,r._source=null,r._width=void 0,r.x=0,r.y=0,r.transforms={dvs:n.mat3f32.create()},r.source=t,r.requestRender=r.requestRender.bind(r),r}return i.__extends(t,e),Object.defineProperty(t.prototype,"isSourceScaled",{get:function(){return this.width!==this.sourceWidth||this.height!==this.sourceHeight},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return void 0!==this._height?this._height:this.sourceHeight},set:function(e){this._height=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return this._source},set:function(e){this._source=e,this.invalidateTexture()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sourceHeight",{get:function(){return this._source instanceof HTMLImageElement?this._source.naturalHeight:this._source.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sourceWidth",{get:function(){return this._source instanceof HTMLImageElement?this._source.naturalWidth:this._source.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return void 0!==this._width?this._width:this.sourceWidth},set:function(e){this._width=e},enumerable:!0,configurable:!0}),t.prototype.invalidateTexture=function(){this._updateTexture()},t.prototype.setTransform=function(e){var t=r.mat3.identity(this.transforms.dvs),i=e.toScreenNoRotation([0,0],this.x,this.y),n=this.resolution/this.pixelRatio/e.resolution,a=n*this.width,s=n*this.height,l=Math.PI*this.rotation/180;r.mat3.translate(t,t,o.vec2f32.fromValues(i[0],i[1])),r.mat3.translate(t,t,o.vec2f32.fromValues(a/2,s/2)),r.mat3.rotate(t,t,-l),r.mat3.translate(t,t,o.vec2f32.fromValues(-a/2,-s/2)),r.mat3.scaleByVec2(t,t,o.vec2f32.fromValues(a,s)),r.mat3.multiply(this.transforms.dvs,e.displayViewMat3,t)},t.prototype.setSamplingProfile=function(e){this._texture&&(e.mips&&!this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._texture.setSamplingMode(e.samplingMode))},t.prototype.bind=function(e){this._texture&&this.stage.context.bindTexture(this._texture,e)},t.prototype.onAttach=function(){this.invalidateTexture()},t.prototype.onDetach=function(){this.invalidateTexture()},t.prototype._updateTexture=function(){var e;if(!this.stage)return null===(e=this._texture)||void 0===e||e.dispose(),void(this._texture=null);this._texture||(this._texture=this.source?u(this.stage.context,this.sourceWidth,this.sourceHeight):u(this.stage.context));var t=this.source;if(t){if(this._texture.resize(this.sourceWidth,this.sourceHeight),function(e){return e&&"render"in e}(t))if(t instanceof l.default){var i=t.getRenderedRasterPixels();this._texture.setData(i.renderedRasterPixels)}else this._texture.setData(function(e){var t=document.createElement("canvas");return t.width=e.width,t.height=e.height,e.render(t.getContext("2d")),t}(t));else(function(e){return e&&!("render"in e)})(t)&&this._texture.setData(t);this.ready(),this.requestRenderOnSourceChangedEnabled&&this.requestRender()}else this._texture.setData(null)},t}(s.DisplayObject);t.Bitmap=c}).apply(null,r))||(e.exports=n)},gi5q:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("H1tY"),i("YX1r"),i("lgZd"),i("Brhx"),i("f3JK")],void 0===(n=(function(e,t,i,r,n,o,a,s){Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(t,i,r,n){void 0===n&&(n=r);var a=e.call(this)||this;return a.transforms={dvs:o.mat3f32.create(),tileMat3:o.mat3f32.create()},a.triangleCount=0,a.key=s.pool.acquire(t),a.bounds=i,a.size=r,a.coordRange=n,a}return i.__extends(t,e),t.prototype.destroy=function(){s.pool.release(this.key),this.key=null,this.texture&&(this.texture.dispose(),this.texture=null)},Object.defineProperty(t.prototype,"coords",{get:function(){return this._coords},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bounds",{get:function(){return this._bounds},set:function(e){this._coords=[e[0],e[3]],this._bounds=e},enumerable:!0,configurable:!0}),t.prototype.setTransform=function(e,t){r("esri-2d-debug")&&null==t&&console.debug("Tried to set tile transform but lod resolution was null");var i=t/(e.resolution*e.pixelRatio),o=this.transforms.tileMat3,a=e.toScreenNoRotation([0,0],this.coords);n.mat3.set(o,this.size[0]/this.coordRange[0]*i,0,0,0,this.size[1]/this.coordRange[1]*i,0,a[0],a[1],1),n.mat3.multiply(this.transforms.dvs,e.displayViewMat3,o)},t}(a.DisplayObject);t.TiledDisplayObject=l}).apply(null,r))||(e.exports=n)},gm1X:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("ma1f"),i("qsST"),i("R2Zq"),i("xoE+"),i("tI6k"),i("TF9k"),i("S0eh")],void 0===(n=(function(e,t,i,r,n,o,a,s,l){Object.defineProperty(t,"__esModule",{value:!0});var u=a.TILE_SIZE/a.COLLISION_BUCKET_SIZE,c=u,f=r.getLogger("esri.views.2d.engine.webgl.collisions.CollisionEngine"),d=function(){function e(e){this._layers=new Map,this._collisionBuckets=new Map,this._didError=!1,this._tilingScheme=e}return Object.defineProperty(e.prototype,"collisionInfos",{get:function(){return n.valuesOfMap(this._layers)},enumerable:!0,configurable:!0}),e.prototype.registerLayerView=function(e,t){if(!this._layers.has(e)){var i=l.default.create(e,t,this.collisionInfos,this._tilingScheme);this._layers.set(e,i),this._collisionBuckets.forEach((function(e){return e.onRegisterLayer(i.index)}))}},e.prototype.unregisterLayerView=function(e){var t=this;if(this._layers.has(e)){var i=this._layers.get(e);l.default.delete(i.index,this.collisionInfos),this._layers.delete(e),this._collisionBuckets.forEach((function(e,r){var n=e.getTile(i.index);n&&(e.onUnregisterLayer(i.index),e.canDelete()&&t._collisionBuckets.delete(r),n.reference&&(n.reference.isDirty=!1))}))}},e.prototype.addTile=function(e,t){var i=t.key.id;if(this._layers.has(e)){this._collisionBuckets.has(i)||this._collisionBuckets.set(i,new s.default(t.key,this._layers.size));var r=this._getIndex(e);this._collisionBuckets.get(i).getTile(r).reference=t}},e.prototype.removeTile=function(e,t){if(this._layers.has(e)&&this._collisionBuckets.has(t)){var i=this._getIndex(e),r=this._collisionBuckets.get(t).getTile(i);r.dirty=!1,r.reference=null}},e.prototype.run=function(e,t){var r=n.valuesOfMap(this._collisionBuckets).sort((function(e,t){return e.key.compareRowMajor(t.key)})),o=!0,a=e.renderingOptions.labelCollisionsEnabled&&!this._didError,s=this.collisionInfos;try{for(var u=0,c=r;u<c.length;u++){var d=c[u];o=o||d.isDirty,d.computeNeighbors(this._collisionBuckets);for(var h=0;h<this._layers.size;h++){var p=l.default.find(h,s);d.reset(e,o,p)}}for(var _=0;_<this._layers.size;_++){p=l.default.find(_,s);for(var m=0,v=r;m<v.length;m++)this._run(a,d=v[m],p,t)}}catch(e){f.error(new i("mapview-labeling","Encountered an error during decluttering. Disabling collisions",e)),this._didError=!0}for(var g=0,y=r;g<y.length;g++)(d=y[g]).ready()},e.prototype._run=function(e,t,i,r){var n=t.getReference(i.index);n&&n.hasData&&(n.key.level!==r?this._resetLabelsMinZoom(t,i):this._runVisibility(e,t,n,i,r))},e.prototype._resetLabelsMinZoom=function(e,t){if(e&&"polyline"!==t.geometryType){var i=e.getReference(t.index);if(i&&i.hasData)for(var r=t.layerView.tileRenderer.featuresView.attributeView,n=0,o=i.displayObjects;n<o.length;n++)r.setLabelMinZoom(o[n].id,255)}},e.prototype._checkLabelsVisible=function(e,t){return(!t.filter||!!(e&a.FILTER_FLAG_0))&&(!t.effect||t.effect.excludedLabelsVisible||!!(e&a.EFFECT_FLAG_0))},e.prototype._runVisibility=function(e,t,i,r,n){for(var o=r.layerView.tileRenderer.featuresView.attributeView,a=i.displayObjects.sort((function(e,t){return o.getLabelMinZoom(e.id)-o.getLabelMinZoom(t.id)})),s=r.zoomRanges.some((function(e){return"none"===e.deconflictionStrategy})),l=0,u=a;l<u.length;l++){var c=u[l];if(c.metrics.length){var f="polyline"===r.geometryType?0:10*(n-1),d=o.getFilterFlags(c.id),h=this._checkLabelsVisible(d,r.layerView);if(e&&!s)for(var p=0;p<c.metrics.length;p++){var _=c.metrics[p],m=h?-1!==_.minZoom?_.minZoom:this._computeLabelVisibility(c,_,r.index,t,_.baseZoom,n):255;f=Math.max(m,f)}f=Math.max(f,0),o.setLabelMinZoom(c.id,f);for(var v=0,g=c.metrics;v<g.length;v++)(_=g[v]).minZoom=f}}},e.prototype._computeLabelVisibility=function(e,t,i,r,n,o){for(var a=n,s=t.xBucket,l=t.yBucket,f=t.xOverflow,d=t.yOverflow,h=s-f,p=s+f+1,_=l+d+1,m=l-d;m<_;m++)for(var v=h;v<p;v++)if(!(v<-u||m<-c||v>u||m>c))for(var g=0;g<=i;g++){var y=this._getRelativeSubBucket(g,r,v,m);if(y)for(var b=0,x=y;b<x.length;b++){var w=x[b];if(g!==i||w.id!==e.id){var T=this._compareLabels(t,w,a,o);a=Math.max(T,a)}}}return a},e.prototype._compareLabels=function(e,t,i,r){if(-1===t.minZoom||t.minZoom>10*(r+1))return i;var n=e.findCollisionDelta(t),a=o.clamp(Math.ceil(10*(n+r)),0,255);return t.minZoom>=a?i:Math.max(i,a)},e.prototype._getNeighboringTile=function(e,t,i,r){var n=t.neighbors[3*(1+r)+(1+i)];return n&&n.getTile(e)},e.prototype._getRelativeSubBucket=function(e,t,i,r){var n=o.sign(Math.floor(i/4)),a=o.sign(Math.floor(r/4)),s=this._getNeighboringTile(e,t,n,a);return s&&s.reference&&s.index&&s.reference.hasData?s.index[r-4*a][i-4*n]:null},e.prototype._getIndex=function(e){return this._layers.get(e).index},e}();t.CollisionEngine=d}).apply(null,r))||(e.exports=n)},gn2p:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("LxLY"),i("YX1r"),i("lgZd"),i("ab6c"),i("SAwq"),i("Brhx"),i("A97r")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u){Object.defineProperty(t,"__esModule",{value:!0});var c={bandCount:3,outMin:0,outMax:1,minCutOff:[0,0,0],maxCutOff:[255,255,255],factor:[1/255,1/255,1/255],useGamma:!1,gamma:[1,1,1],gammaCorrection:[1,1,1],colormap:null,colormapOffset:null,type:"stretch"},f=function(e){function t(t,i,r){void 0===t&&(t=null),void 0===i&&(i=null),void 0===r&&(r=null);var n=e.call(this)||this;return n._memoryUsed=null,n.stencilRef=0,n.coordScale=[1,1],n._symbolizerParameters=null,n.height=null,n.pixelRatio=1,n.resolution=0,n.rotation=0,n._source=null,n.rawPixelData=null,n._suspended=!1,n._bandIds=null,n._interpolation=null,n._transformGrid=null,n.width=null,n.x=0,n.y=0,n.transforms={dvs:o.mat3f32.create()},n.source=t,n.transformGrid=i,n.interpolation=r,n}return i.__extends(t,e),Object.defineProperty(t.prototype,"symbolizerParameters",{get:function(){return this._symbolizerParameters||c},set:function(e){this._symbolizerParameters=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return this._source},set:function(e){this._source=e,this._rasterTexture&&(this._rasterTexture.dispose(),this._rasterTexture=null,this._memoryUsed=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"suspended",{get:function(){return this._suspended},set:function(e){this._suspended&&!e&&this.stage&&(this.ready(),this.requestRender()),this._suspended=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bandIds",{get:function(){return this._bandIds},set:function(e){this.stage&&this._updateRasterTexture(e),this._bandIds=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"interpolation",{get:function(){return this._interpolation},set:function(e){this._interpolation=e,this._rasterTexture&&this._rasterTexture.setSamplingMode("bilinear"===e||"cubic"===e?9729:9728)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"transformGrid",{get:function(){return this._transformGrid},set:function(e){this._transformGrid=e,this._transformGridTexture&&(this._transformGridTexture.dispose(),this._transformGridTexture=null,this._memoryUsed=null)},enumerable:!0,configurable:!0}),t.prototype.invalidateTexture=function(){this._updateTexture()},t.prototype.setTransform=function(e){var t=n.mat3.identity(this.transforms.dvs),i=e.toScreenNoRotation([0,0],this.x,this.y),r=this.resolution/this.pixelRatio/e.resolution,o=r*this.width,s=r*this.height,l=Math.PI*this.rotation/180;n.mat3.translate(t,t,a.vec2f32.fromValues(i[0],i[1])),n.mat3.translate(t,t,a.vec2f32.fromValues(o/2,s/2)),n.mat3.rotate(t,t,-l),n.mat3.translate(t,t,a.vec2f32.fromValues(-o/2,-s/2)),n.mat3.scaleByVec2(t,t,a.vec2f32.fromValues(o,s)),n.mat3.multiply(this.transforms.dvs,e.displayViewMat3,t)},t.prototype.getTextures=function(){if(!this._rasterTexture)return null;var e=[],t=[];return this._transformGridTexture&&(t.push(this._transformGridTexture),e.push("u_transformGrid")),this._rasterTexture&&(t.push(this._rasterTexture),e.push("u_image")),this._colormapTexture&&(t.push(this._colormapTexture),e.push("u_colormap")),{names:e,textures:t}},t.prototype.getMemoryUsage=function(){if(r.isNone(this._memoryUsed)){var e=this.getTextures();if(null==e)return 0;this._memoryUsed=e.textures.map((function(e){return e.descriptor.width*e.descriptor.height*4})).reduce((function(e,t){return e+t}))}return this._memoryUsed},t.prototype.onAttach=function(){this.invalidateTexture()},t.prototype.onDetach=function(){this.invalidateTexture()},t.prototype._updateTexture=function(){var e,t,i;if(!this.stage)return null===(e=this._rasterTexture)||void 0===e||e.dispose(),null===(t=this._transformGridTexture)||void 0===t||t.dispose(),null===(i=this._colormapTexture)||void 0===i||i.dispose(),this._rasterTexture=null,this._transformGridTexture=null,void(this._colormapTexture=null);var r=this.stage.context,n=this.source,o=n&&n.pixels&&n.pixels.length>0;!this._rasterTexture&&o&&this._updateRasterTexture(this.bandIds),this._rasterTexture&&o&&(this._updateColormapTexture(),this.transformGrid&&!this._transformGridTexture&&(this._transformGridTexture=u.createTransformTexture(r,this.transformGrid))),this._rasterTexture&&!o&&this._rasterTexture.setData(null),this.suspended||(this.ready(),this.requestRender())},t.prototype._updateRasterTexture=function(e){var t=this.source?s.extractBands(this.source,e):null;if(t&&t.pixels&&t.pixels.length>0){var i=null==e&&null==this.bandIds||e&&this.bandIds&&e.join("")===this.bandIds.join("");if(this._rasterTexture){if(i)return;this._rasterTexture.dispose(),this._rasterTexture=null}this._rasterTexture=u.createRasterTexture(this.stage.context,t,this.interpolation||"nearest")}else this._rasterTexture&&(this._rasterTexture.dispose(),this._rasterTexture=null)},t.prototype._updateColormapTexture=function(){var e=this._colormap,t=this.symbolizerParameters.colormap;if(!t)return this._colormapTexture&&(this._colormapTexture.dispose(),this._colormapTexture=null),void(this._colormap=null);var i=this.stage.context;return e?t.length!==e.length||t.some((function(t,i){return t!==e[i]}))?(this._colormapTexture&&(this._colormapTexture.dispose(),this._colormapTexture=null),this._colormapTexture=u.createColormapTexture(i,t),void(this._colormap=t)):void 0:(this._colormapTexture=u.createColormapTexture(i,t),void(this._colormap=t))},t}(l.DisplayObject);t.RasterBitmap=f}).apply(null,r))||(e.exports=n)},gvME:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("JNkf"),i("apbF"),i("PDSL"),i("m87x")],n=(function(e,t,i,r,n,o,a){Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.dispose=function(){},t.prototype.getGeometryType=function(){return r.WGLGeometryType.LINE},t.prototype.drawGeometry=function(e,t,i,r,o){var s=e.context,l=e.painter,u=e.rendererInfo,c=e.requiredLevel,f=i.indexFrom,d=i.indexCount,h=a.LineMaterialKey.load(i.materialKey),p=function(e){return n.createProgramDescriptor(e.data,{geometry:[{location:0,name:"a_pos",count:2,type:5122},{location:1,name:"a_id",count:4,type:5121},{location:2,name:"a_color",count:4,type:5121,normalized:!0},{location:3,name:"a_offsetAndNormal",count:4,type:5120},{location:4,name:"a_accumulatedDistanceAndHalfWidth",count:2,type:5123},{location:5,name:"a_tlbr",count:4,type:5123},{location:6,name:"a_segmentDirection",count:4,type:5120},{location:7,name:"a_aux",count:2,type:5123}]})}(h),_=p.bufferLayouts,m=p.attributes,v=l.materialManager.getMaterialProgram(e,h,"materials/line",m,o),g=this._getVAO(s,_,m,r),y=1/e.pixelRatio;s.bindProgram(v),s.bindVAO(g),this._setSharedUniforms(v,e,t),h.textureBinding&&l.textureManager.bindTextures(s,v,h);var b=Math.pow(2,c-t.key.level)/e.pixelRatio;if(v.setUniform1f("u_zoomFactor",b),v.setUniform1f("u_blur",0+y),v.setUniform1f("u_antialiasing",y),h.vvSizeMinMaxValue&&v.setUniform4fv("u_vvSizeMinMaxValue",u.vvSizeMinMaxValue),h.vvSizeScaleStops&&v.setUniform1f("u_vvSizeScaleStopsValue",u.vvSizeScaleStopsValue),h.vvSizeFieldStops){var x=u.getSizeVVFieldStops(t.key.level);v.setUniform1fv("u_vvSizeFieldStopsValues",x.values),v.setUniform1fv("u_vvSizeFieldStopsSizes",x.sizes)}h.vvSizeUnitValue&&v.setUniform1f("u_vvSizeUnitValueWorldToPixelsRatio",u.vvSizeUnitValueToPixelsRatio),h.vvColor&&(v.setUniform1fv("u_vvColorValues",u.vvColorValues),v.setUniform4fv("u_vvColors",u.vvColors)),h.vvOpacity&&(v.setUniform1fv("u_vvOpacityValues",u.vvOpacityValues),v.setUniform1fv("u_vvOpacities",u.vvOpacities)),s.setFaceCullingEnabled(!0),s.setFrontFace(2305),s.setCullFace(1029),s.drawElements(4,d,5125,4*f),s.setFaceCullingEnabled(!1),s.bindVAO(null)},t}(o.default);t.default=s}).apply(null,r),void 0===n||(e.exports=n)},hAHX:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("hf04"),i("H1tY"),i("LxLY"),i("JNkf")],void 0===(n=(function(e,t,i,r,n,o){Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){this.brushes=e,this.name=t.name,this.drawPhase=t.drawPhase||o.WGLDrawPhase.MAP,this._targetFn=t.target,this.effects=t.effects||[],this.has=t.has}return e.prototype.render=function(e){var t=e.context,i=e.profiler,n=this._targetFn(),o=this.drawPhase&e.drawPhase;if(i.recordPassStart(this.name),o&&(!this.has||r(this.has))){this._doRender(e,n),i.recordPassEnd();for(var a=0,s=this.effects;a<s.length;a++){var l=s[a];if(l.enable()){var u=l.apply;i.recordPassStart(this.name+"."+u.name),i.recordBrushStart(u.name);var c=l.args&&l.args(),f=t.getViewport(),d=f.x,h=f.y,p=f.width,_=f.height,m=t.getBoundFramebufferObject();u.bind(e,c),this._doRender(e,n,u.defines),u.draw(e,c),u.unbind(e,c),t.bindFramebuffer(m),t.setViewport(d,h,p,_),i.recordBrushEnd(),i.recordPassEnd()}}}},e.prototype._doRender=function(e,t,r){if(!n.isNone(t))if(i.isArrayLike(t))for(var o=0,a=t;o<a.length;o++){var s=a[o];if(s.isReady&&s.visible)for(var l=0,u=this.brushes;l<u.length;l++){var c=u[l];e.profiler.recordBrushStart(c.name),c.prepareState(e,s,r),c.draw(e,s,r),e.profiler.recordBrushEnd()}}else for(var f=0,d=this.brushes;f<d.length;f++)e.profiler.recordBrushStart((c=d[f]).name),c.prepareState(e,t,r),c.draw(e,t,r),e.profiler.recordBrushEnd()},e}();t.default=a}).apply(null,r))||(e.exports=n)},hNI9:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("yai7"),i("apbF")],void 0===(n=(function(e,t,i,r){return function(){function e(e,t,i,r,n){void 0===r&&(r=0),void 0===n&&(n=0),this.id=e,this.geometryType=t,this.materialKey=i,this.minZoom=r,this.maxZoom=n,this.meshData=null,this.symbolLevel=0,this.zOrder=0,this.vertexFrom=0,this.vertexCount=0,this.indexFrom=0,this.indexCount=0}return Object.defineProperty(e.prototype,"sortKey",{get:function(){return void 0===this._sortKey&&this._computeSortKey(),this._sortKey},enumerable:!0,configurable:!0}),e.prototype.clone=function(){return this.copy()},e.prototype.copy=function(){var t=new e(this.id,this.geometryType,this.materialKey);return t.vertexFrom=this.vertexFrom,t.vertexCount=this.vertexCount,t.indexFrom=this.indexFrom,t.indexCount=this.indexCount,t.zOrder=this.zOrder,t.symbolLevel=this.symbolLevel,t.meshData=this.meshData,t.minZoom=this.minZoom,t.maxZoom=this.maxZoom,t},e.prototype.setMeshDataFromBuffers=function(e,t,n){var o=new i;for(var a in t){for(var s=t[a].stride,l=t[a].data,u=[],c=r.strideToPackingFactor(s),f=0;f<s*e.vertexCount/c;++f)u[f]=l[f+s*e.vertexFrom/c];o.vertexData.set(a,u)}for(o.indexData.length=0,f=0;f<e.indexCount;++f)o.indexData[f]=n[f+e.indexFrom]-e.vertexFrom;o.vertexCount=e.vertexCount,this.meshData=o},e.prototype.readMeshDataFromBuffers=function(e,t){for(var n in this.meshData?this.meshData.clear():this.meshData=new i,e){for(var o=e[n].stride,a=e[n].data,s=[],l=r.strideToPackingFactor(o),u=0;u<o*this.vertexCount/l;++u)s[u]=a[u+o*this.vertexFrom/l];this.meshData.vertexData.set(n,s)}for(this.meshData.indexData.length=0,u=0;u<this.indexCount;++u)this.meshData.indexData[u]=t[u+this.indexFrom]-this.vertexFrom;this.meshData.vertexCount=this.vertexCount},e.prototype.writeMeshDataToBuffers=function(e,t,i,n){for(var o in t)for(var a=t[o].stride,s=this.meshData.vertexData.get(o),l=t[o].data,u=r.strideToPackingFactor(a),c=0;c<a*this.meshData.vertexCount/u;++c)l[c+a*e/u]=s[c];for(c=0;c<this.meshData.indexData.length;++c)n[c+i]=this.meshData.indexData[c]+e;this.vertexFrom=e,this.vertexCount=this.meshData.vertexCount,this.indexFrom=i,this.indexCount=this.meshData.indexData.length},e.writeAllMeshDataToBuffers=function(e,t,i){for(var r=0,n=0,o=0,a=e;o<a.length;o++){var s=a[o];s.writeMeshDataToBuffers(r,t,n,i),r+=s.vertexCount,n+=s.indexCount}},e.prototype._computeSortKey=function(){this._sortKey=(31&this.symbolLevel)<<12|(127&this.zOrder)<<4|7&this.geometryType},e.prototype.serialize=function(e){return e.push(this.geometryType),e.push(this.materialKey),e.push(this.symbolLevel),e.push(this.zOrder),e.push(this.vertexFrom),e.push(this.vertexCount),e.push(this.indexFrom),e.push(this.indexCount),e.push(this.minZoom),e.push(this.maxZoom),e},e.deserialize=function(t,i){var r=t.readInt32(),n=t.readInt32(),o=new e(i.id,r,n);return o.symbolLevel=t.readInt32(),o.zOrder=t.readInt32(),o.vertexFrom=t.readInt32(),o.vertexCount=t.readInt32(),o.indexFrom=t.readInt32(),o.indexCount=t.readInt32(),o.minZoom=t.readInt32(),o.maxZoom=t.readInt32(),o},e}()}).apply(null,r))||(e.exports=n)},hPTP:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("DJpR"),i("Uu9s")],void 0===(n=(function(e,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var n=new i.ShaderCompiler((function(e){var t=r.default;return e.split("/").forEach((function(e){t&&(t=t[e])})),t}));t.resolveIncludes=function(e){return n.resolveIncludes(e)}}).apply(null,r))||(e.exports=n)},j2SP:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("3gjc")],void 0===(n=(function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.vec4f32=i}).apply(null,r))||(e.exports=n)},jEV9:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("j2SP"),i("DJpR"),i("JNkf"),i("Dos2"),i("3+7H")],n=(function(e,t,i,r,n,o,a,s){Object.defineProperty(t,"__esModule",{value:!0});var l=[1,1,1,1],u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._color=r.vec4f32.create(),t._strokeColor=r.vec4f32.create(),t._programOptions={id:!1},t._vertexAttributes={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:16,normalized:!1,divisor:0},{name:"a_color",count:4,type:5121,offset:4,stride:16,normalized:!0,divisor:0},{name:"a_stroke_color",count:4,type:5121,offset:8,stride:16,normalized:!0,divisor:0},{name:"a_data",count:4,type:5121,offset:12,stride:16,normalized:!1,divisor:0}]},t}return i.__extends(t,e),t.prototype.dispose=function(){},t.prototype.drawMany=function(e,t){var i=e.context,r=e.state,n=e.drawPhase,s=e.styleLayerId,u=e.displayLevel,c=e.styleLayer,f=e.painter.getVectorTileProgramCach(),d=c.hasDataDrivenRadius?1:c.getPaintValue("circle-radius",u),h=c.hasDataDrivenColor?l:c.getPaintValue("circle-color",u),p=c.hasDataDrivenOpacity?1:c.getPaintValue("circle-opacity",u),_=c.hasDataDrivenStrokeWidth?1:c.getPaintValue("circle-stroke-width",u),m=c.hasDataDrivenStrokeColor?l:c.getPaintValue("circle-stroke-color",u),v=c.hasDataDrivenStrokeOpacity?1:c.getPaintValue("circle-stroke-opacity",u),g=c.hasDataDrivenBlur?0:c.getPaintValue("circle-blur",u),y=p*h[3];this._color[0]=y*h[0],this._color[1]=y*h[1],this._color[2]=y*h[2],this._color[3]=y,this._strokeColor[0]=(y=v*m[3])*m[0],this._strokeColor[1]=y*m[1],this._strokeColor[2]=y*m[2],this._strokeColor[3]=y;var b=c.getPaintValue("circle-translate",u),x=c.getPaintValue("circle-translate-anchor",u),w=n===o.WGLDrawPhase.HITTEST,T=w?1:0,S=this._programOptions;S.id=w;var C=f.getProgram(5,T,S);if(i.bindProgram(C),C.setUniformMatrix3fv("u_displayMat3",1===x?r.displayMat3:r.displayViewMat3),C.setUniform2fv("u_circleTranslation",b),C.setUniform1f("u_depth",c.z),C.setUniform1f("u_radius",d),C.setUniform4fv("u_color",this._color),C.setUniform1f("u_blur",g),C.setUniform1f("u_stroke_width",_),C.setUniform4fv("u_stroke_color",this._strokeColor),C.setUniform1f("u_antialiasingWidth",1.2),w){var L=a.u32to4Xu8(s+1);C.setUniform4fv("u_id",L)}for(var O=0,M=t;O<M.length;O++){var D=M[O];if(D.layerData[s]){var E=D.layerData[s],I=this._getCircleVAO(i,D,f);I&&(i.bindVAO(I),C.setUniformMatrix3fv("u_dvsMat3",D.transforms.dvs),i.setStencilFunction(514,D.stencilRef,255),i.drawElements(4,E.triangleElementCount,5125,12*E.triangleElementStart),D.triangleCount+=E.triangleElementCount/3)}}},t.prototype._getCircleVAO=function(e,t,i){if(t.circleVertexArrayObject)return t.circleVertexArrayObject;var r=t.circleVertexBuffer,o=t.circleIndexBuffer;return r&&o?(t.circleVertexArrayObject=new n.VertexArrayObject(e,i.getProgramAttributes(5),this._vertexAttributes,{geometry:r},o),t.circleVertexArrayObject):null},t}(s.default);t.WGLBrushVTLCircle=u}).apply(null,r),void 0===n||(e.exports=n)},kNAO:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("qsST"),i("1E+e"),i("tI6k"),i("JNkf"),i("Dos2"),i("GDRe"),i("hNI9"),i("m87x"),i("v3M4")],n=(function(e,t,i,r,n,o,a,s,l,u,c,f){Object.defineProperty(t,"__esModule",{value:!0});var d=r.getLogger("esri.views.2d.engine.webgl.mesh.templates.WGLBaseFillTemplate"),h=[],p=[];t.default=function(e){return function(e){function t(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var r=e.apply(this,t)||this;return r.forceLibtess=!1,r.geometryType=a.WGLGeometryType.FILL,r._tesselator=new f.default,r._tileClipper=new l.TileClipper(0,0,0,1,8),r._tileClipper.setExtent(o.TILE_SIZE),r}return i.__extends(t,e),t.prototype.writeMeshWithGeometry=function(e,t,i,r,n,o){if(h.length=0,"esriGeometryPolygon"===i){var a=o,s=c.FillMaterialKey.load(this._materialKey),l=this._isClippingRequired(a),u=l?this._clip(a,!1):a.rings,f=s.dotDensity?function(e){for(var t=0,i=0;i<e.length;i++)for(var r=e[i],n=r[0],o=n[0],a=n[1],s=1;s<r.length;s++){var l=r[s],u=o+l[0],c=a+l[1];t-=(u-o)*(c+a)/2,o=u,a=c}return t}(a.rings):0;this.forceLibtess?this._writeMeshLibtess(e,t,r,u,l,s,f):this._writeMeshEarcut(e,t,r,u,l,s,f)||this._writeMeshLibtess(e,t,r,u,l,s,f)}else"esriGeometryPolyline"!==i&&d.error("Unable to handle geometryType: "+i)},t.prototype._isClippingRequired=function(e){for(var t=o.TILE_SIZE+8,i=0,r=e.rings;i<r.length;i++){var n=r[i],a=n.length;if(!(a<3)){var s=n[0][0],l=n[0][1];if(s<-8||s>t||l<-8||l>t)return!0;for(var u=1;u<a;++u)if(l+=n[u][1],(s+=n[u][0])<-8||s>t||l<-8||l>t)return!0}}return!1},t.prototype._clip=function(e,t){var i,r;this._tileClipper.reset(3);for(var n=0,o=e.rings;n<o.length;n++){var a=o[n],s=a.length;if(!(s<3)){this._tileClipper.moveTo(i=a[0][0],r=a[0][1]);for(var l=1;l<s;++l)this._tileClipper.lineTo(i+=a[l][0],r+=a[l][1]);this._tileClipper.close()}}return this._tileClipper.result(t)},t.prototype._writeMeshLibtess=function(e,t,i,r,n,o,a){if(r&&r.length){var s=[],l=t.indexVector,c=t.getVector("geometry"),f=new u(i,this.geometryType,this._materialKey),d=c.vertexCount;f.vertexFrom=d,f.indexFrom=l.length,this._tesselator.beginPolygon(h,s);for(var p=0,_=r;p<_.length;p++){var m=_[p];if(!(m.length<3)){this._tesselator.beginContour();var v=void 0,g=void 0;n?(v=m[0].x,g=m[0].y):(v=m[0][0],g=m[0][1]);var y=[v,g,0];this._tesselator.addVertex(y,y);for(var b=1;b<m.length-1;b++){n?(v=m[b].x,g=m[b].y):(v+=m[b][0],g+=m[b][1]);var x=[v,g,0];this._tesselator.addVertex(x,x)}this._tesselator.endContour()}}this._tesselator.endPolygon(),this._writeVerticesLibTess(f,c,i,h,o,a),this._writeIndicesLibTess(f,l,d,s),f.indexCount>0&&e.push(f)}},t.prototype._writeMeshEarcut=function(e,t,i,r,n,o,a){if(r&&r.length){var s=t.indexVector,l=t.getVector("geometry"),c=new u(i,this.geometryType,this._materialKey),f=s.length,d=l.data.length;c.vertexFrom=l.vertexCount,c.indexFrom=s.length;for(var _=0,m=0,v=0,g=r;v<g.length;v++){var y=g[v],b=m,x=void 0,w=void 0;n?(x=y[0].x,w=y[0].y):(x=y[0][0],w=y[0][1]),h[m++]=x,h[m++]=w;for(var T=0,S=1;S<y.length;++S){var C=void 0,L=void 0;if(n){var O=x,M=w;C=(x=y[S].x)-O,L=(w=y[S].y)-M}else x+=C=y[S][0],w+=L=y[S][1];T-=C*(w+w-L),h[m++]=x,h[m++]=w}if(T>0){if(b-_>0){if(!this._write(c,s,l,i,h,p,_,b,o,a))return s.seek(f),l.data.seek(d),h.length=p.length=0,!1;_=b}p.length=0}else T<0&&b-_>0?p.push(.5*(b-_)):m=b}return m-_>0&&!this._write(c,s,l,i,h,p,_,m,o,a)?(s.seek(f),l.data.seek(d),h.length=p.length=0,!1):(h.length=p.length=0,e.push(c),!0)}},t.prototype._write=function(e,t,i,r,o,a,s,l,u,c){var f=o.slice(s,l),d=n.earcut(f,a,2);if(n.deviation(f,a,2,d)>0)return!1;if(d.length){var h=i.vertexCount;return this._writeVertices(e,i,r,f,u,c),this._writeIndices(e,t,h,d),!0}},t.prototype._writeVertices=function(e,t,i,r,n,o){for(var a=0;a<r.length;a+=2){var l=s.i1616to32(8*r[a],8*r[a+1]);t.data.push(l),t.data.push(i),n.dotDensity?t.data.writeF32(1/o):(t.data.push(this.fillColor),t.data.push(this.tl),t.data.push(this.br),t.data.push(this.aux1),t.data.push(this.aux2),t.data.push(this.aux3)),e.vertexCount++}},t.prototype._writeIndices=function(e,t,i,r){for(var n=i,o=0;o<r.length;o+=3)t.push(n+r[o]),t.push(n+r[o+1]),t.push(n+r[o+2]),e.indexCount+=3},t.prototype._writeVerticesLibTess=function(e,t,i,r,n,o){for(var a=0;a<r.length;a+=2){var l=s.i1616to32(8*r[a],8*r[a+1]);t.data.push(l),t.data.push(i),n.dotDensity?t.data.writeF32(1/o):(t.data.push(this.fillColor),t.data.push(this.tl),t.data.push(this.br),t.data.push(this.aux1),t.data.push(this.aux2),t.data.push(this.aux3)),e.vertexCount++}},t.prototype._writeIndicesLibTess=function(e,t,i,r){for(var n=i,o=0;o<r.length;o++)t.push(n+r[o]),e.indexCount++},t}(e)}}).apply(null,r),void 0===n||(e.exports=n)},kmbk:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("tI6k"),i("Nwkb"),i("3+7H")],n=(function(e,t,i,r,n,o){Object.defineProperty(t,"__esModule",{value:!0});var a={nearest:{defines:[],samplingMode:9728,mips:!1},bilinear:{defines:[],samplingMode:9729,mips:!1},bicubic:{defines:["bicubic"],samplingMode:9729,mips:!1},trilinear:{defines:[],samplingMode:9987,mips:!0}},s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._desc={path:"raster/bitmap",attributes:{a_position:0,a_texcoord:1}},t}return i.__extends(t,e),t.prototype.dispose=function(){this._quad&&this._quad.dispose()},t.prototype.prepareState=function(e,t){var i=e.context;i.setBlendingEnabled(!0),i.setBlendFunctionSeparate(1,771,1,771),i.setColorMask(!0,!0,!0,!0),i.setStencilWriteMask(0),i.setStencilTestEnabled(!0),i.setStencilFunction(514,t.stencilRef,255)},t.prototype.draw=function(e,t){var i=e.context,o=e.renderingOptions,s=e.painter;if(t.source){e.timeline.begin(this.name),this._quad||(this._quad=new n(i,[0,0,1,0,0,1,1,1]));var l=function(e,t,i){if("dynamic"===i.samplingMode){var r=e.state,n=t.resolution/t.pixelRatio/r.resolution,o=Math.round(e.pixelRatio)!==e.pixelRatio;return r.rotation||n>1.05||n<.95||o||t.isSourceScaled||t.rotation?a.bilinear:a.nearest}return a[i.samplingMode]}(e,t,o),u=s.materialManager.getProgram(e,this._desc,l.defines);t.setSamplingProfile(l),t.bind(r.TEXTURE_BINDING_BITMAP),i.bindProgram(u),u.setUniformMatrix3fv("u_dvsMat3",t.transforms.dvs),u.setUniform1i("u_texture",r.TEXTURE_BINDING_BITMAP),u.setUniform2fv("u_coordScale",t.coordScale),this._quad.draw(),e.timeline.end(this.name)}},t}(o.default);t.default=s}).apply(null,r),void 0===n||(e.exports=n)},lUvf:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("DJpR"),i("8HLi")],void 0===(n=(function(e,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return i.glslifyDefineMap({ID:e.id,PATTERN:e.pattern})};t.background={name:"background",shaders:function(e){return{vertexShader:n(e)+r.resolveIncludes("background/background.vert"),fragmentShader:n(e)+r.resolveIncludes("background/background.frag")}},attributes:{a_pos:0}};var o=function(e){return i.glslifyDefineMap({ID:e.id})};t.circle={name:"circle",shaders:function(e){return{vertexShader:o(e)+r.resolveIncludes("circle/circle.vert"),fragmentShader:o(e)+r.resolveIncludes("circle/circle.frag")}},attributes:{a_pos:0,a_color:1,a_stroke_color:2,a_data:3}};var a=function(e){return i.glslifyDefineMap({ID:e.id,DD:e.dd,PATTERN:e.pattern})};t.fill={name:"fill",shaders:function(e){return{vertexShader:a(e)+r.resolveIncludes("fill/fill.vert"),fragmentShader:a(e)+r.resolveIncludes("fill/fill.frag")}},attributes:{a_pos:0,a_color:1}};var s=function(e){return i.glslifyDefineMap({ID:e.id,DD:e.dd})};t.outline={name:"outline",shaders:function(e){return{vertexShader:s(e)+r.resolveIncludes("outline/outline.vert"),fragmentShader:s(e)+r.resolveIncludes("outline/outline.frag")}},attributes:{a_pos:0,a_offset:1,a_xnormal:2,a_color:3}};var l=function(e){return i.glslifyDefineMap({ID:e.id,DD:e.dd,SDF:e.sdf})};t.icon={name:"icon",shaders:function(e){return{vertexShader:l(e)+r.resolveIncludes("icon/icon.vert"),fragmentShader:l(e)+r.resolveIncludes("icon/icon.frag")}},attributes:{a_pos:0,a_vertexOffset:1,a_tex:2,a_levelInfo:3,a_visInfo:4,a_color:5,a_size:6}};var u=function(e){return i.glslifyDefineMap({ID:e.id,DD:e.dd,PATTERN:e.pattern})};t.line={name:"line",shaders:function(e){return{vertexShader:u(e)+r.resolveIncludes("line/line.vert"),fragmentShader:u(e)+r.resolveIncludes("line/line.frag")}},attributes:{a_pos:0,a_offsetAndNormal:1,a_accumulatedDistance:2,a_color:3,a_width:4}};var c=function(e){return i.glslifyDefineMap({ID:e.id,DD:e.dd})};t.text={name:"text",shaders:function(e){return{vertexShader:c(e)+r.resolveIncludes("text/text.vert"),fragmentShader:c(e)+r.resolveIncludes("text/text.frag")}},attributes:{a_pos:0,a_vertexOffset:1,a_tex:2,a_levelInfo:3,a_visInfo:4,a_color:5,a_size:6}}}).apply(null,r))||(e.exports=n)},lnyn:function(e,t,i){var r;void 0===(r=(function(){"use strict";var e={DEBUG:!1,assert:function(t,i){if(e.DEBUG&&!t)throw new Error("Assertion failed"+(i?": "+i:""))},GLU_TESS_MAX_COORD:1e150,TRUE_PROJECT:!1,GLU_TESS_DEFAULT_TOLERANCE:0,windingRule:{GLU_TESS_WINDING_ODD:100130,GLU_TESS_WINDING_NONZERO:100131,GLU_TESS_WINDING_POSITIVE:100132,GLU_TESS_WINDING_NEGATIVE:100133,GLU_TESS_WINDING_ABS_GEQ_TWO:100134},primitiveType:{GL_LINE_LOOP:2,GL_TRIANGLES:4,GL_TRIANGLE_STRIP:5,GL_TRIANGLE_FAN:6},errorType:{GLU_TESS_MISSING_BEGIN_POLYGON:100151,GLU_TESS_MISSING_END_POLYGON:100153,GLU_TESS_MISSING_BEGIN_CONTOUR:100152,GLU_TESS_MISSING_END_CONTOUR:100154,GLU_TESS_COORD_TOO_LARGE:100155,GLU_TESS_NEED_COMBINE_CALLBACK:100156},gluEnum:{GLU_TESS_BEGIN:100100,GLU_TESS_VERTEX:100101,GLU_TESS_END:100102,GLU_TESS_ERROR:100103,GLU_TESS_EDGE_FLAG:100104,GLU_TESS_COMBINE:100105,GLU_TESS_BEGIN_DATA:100106,GLU_TESS_VERTEX_DATA:100107,GLU_TESS_END_DATA:100108,GLU_TESS_ERROR_DATA:100109,GLU_TESS_EDGE_FLAG_DATA:100110,GLU_TESS_COMBINE_DATA:100111,GLU_TESS_MESH:100112,GLU_TESS_TOLERANCE:100142,GLU_TESS_WINDING_RULE:100140,GLU_TESS_BOUNDARY_ONLY:100141,GLU_INVALID_ENUM:100900,GLU_INVALID_VALUE:100901},geom:{}};return e.geom.vertEq=function(e,t){return e.s===t.s&&e.t===t.t},e.geom.vertLeq=function(e,t){return e.s<t.s||e.s===t.s&&e.t<=t.t},e.geom.edgeEval=function(t,i,r){e.assert(e.geom.vertLeq(t,i)&&e.geom.vertLeq(i,r));var n=i.s-t.s,o=r.s-i.s;return n+o>0?n<o?i.t-t.t+n/(n+o)*(t.t-r.t):i.t-r.t+o/(n+o)*(r.t-t.t):0},e.geom.edgeSign=function(t,i,r){e.assert(e.geom.vertLeq(t,i)&&e.geom.vertLeq(i,r));var n=i.s-t.s,o=r.s-i.s;return n+o>0?(i.t-r.t)*n+(i.t-t.t)*o:0},e.geom.transLeq=function(e,t){return e.t<t.t||e.t===t.t&&e.s<=t.s},e.geom.transEval=function(t,i,r){e.assert(e.geom.transLeq(t,i)&&e.geom.transLeq(i,r));var n=i.t-t.t,o=r.t-i.t;return n+o>0?n<o?i.s-t.s+n/(n+o)*(t.s-r.s):i.s-r.s+o/(n+o)*(r.s-t.s):0},e.geom.transSign=function(t,i,r){e.assert(e.geom.transLeq(t,i)&&e.geom.transLeq(i,r));var n=i.t-t.t,o=r.t-i.t;return n+o>0?(i.s-r.s)*n+(i.s-t.s)*o:0},e.geom.edgeGoesLeft=function(t){return e.geom.vertLeq(t.dst(),t.org)},e.geom.edgeGoesRight=function(t){return e.geom.vertLeq(t.org,t.dst())},e.geom.vertL1dist=function(e,t){return Math.abs(e.s-t.s)+Math.abs(e.t-t.t)},e.geom.vertCCW=function(e,t,i){return e.s*(t.t-i.t)+t.s*(i.t-e.t)+i.s*(e.t-t.t)>=0},e.geom.interpolate_=function(e,t,i,r){return(e=e<0?0:e)<=(i=i<0?0:i)?0===i?(t+r)/2:t+e/(e+i)*(r-t):r+i/(e+i)*(t-r)},e.geom.edgeIntersect=function(t,i,r,n,o){var a,s,l;e.geom.vertLeq(t,i)||(l=t,t=i,i=l),e.geom.vertLeq(r,n)||(l=r,r=n,n=l),e.geom.vertLeq(t,r)||(l=t,t=r,r=l,l=i,i=n,n=l),e.geom.vertLeq(r,i)?e.geom.vertLeq(i,n)?((a=e.geom.edgeEval(t,r,i))+(s=e.geom.edgeEval(r,i,n))<0&&(a=-a,s=-s),o.s=e.geom.interpolate_(a,r.s,s,i.s)):((a=e.geom.edgeSign(t,r,i))+(s=-e.geom.edgeSign(t,n,i))<0&&(a=-a,s=-s),o.s=e.geom.interpolate_(a,r.s,s,n.s)):o.s=(r.s+i.s)/2,e.geom.transLeq(t,i)||(l=t,t=i,i=l),e.geom.transLeq(r,n)||(l=r,r=n,n=l),e.geom.transLeq(t,r)||(l=t,t=r,r=l,l=i,i=n,n=l),e.geom.transLeq(r,i)?e.geom.transLeq(i,n)?((a=e.geom.transEval(t,r,i))+(s=e.geom.transEval(r,i,n))<0&&(a=-a,s=-s),o.t=e.geom.interpolate_(a,r.t,s,i.t)):((a=e.geom.transSign(t,r,i))+(s=-e.geom.transSign(t,n,i))<0&&(a=-a,s=-s),o.t=e.geom.interpolate_(a,r.t,s,n.t)):o.t=(r.t+i.t)/2},e.mesh={},e.mesh.makeEdge=function(t){var i=e.mesh.makeEdgePair_(t.eHead);return e.mesh.makeVertex_(i,t.vHead),e.mesh.makeVertex_(i.sym,t.vHead),e.mesh.makeFace_(i,t.fHead),i},e.mesh.meshSplice=function(t,i){var r=!1,n=!1;t!==i&&(i.org!==t.org&&(n=!0,e.mesh.killVertex_(i.org,t.org)),i.lFace!==t.lFace&&(r=!0,e.mesh.killFace_(i.lFace,t.lFace)),e.mesh.splice_(i,t),n||(e.mesh.makeVertex_(i,t.org),t.org.anEdge=t),r||(e.mesh.makeFace_(i,t.lFace),t.lFace.anEdge=t))},e.mesh.deleteEdge=function(t){var i=t.sym,r=!1;t.lFace!==t.rFace()&&(r=!0,e.mesh.killFace_(t.lFace,t.rFace())),t.oNext===t?e.mesh.killVertex_(t.org,null):(t.rFace().anEdge=t.oPrev(),t.org.anEdge=t.oNext,e.mesh.splice_(t,t.oPrev()),r||e.mesh.makeFace_(t,t.lFace)),i.oNext===i?(e.mesh.killVertex_(i.org,null),e.mesh.killFace_(i.lFace,null)):(t.lFace.anEdge=i.oPrev(),i.org.anEdge=i.oNext,e.mesh.splice_(i,i.oPrev())),e.mesh.killEdge_(t)},e.mesh.addEdgeVertex=function(t){var i=e.mesh.makeEdgePair_(t),r=i.sym;return e.mesh.splice_(i,t.lNext),i.org=t.dst(),e.mesh.makeVertex_(r,i.org),i.lFace=r.lFace=t.lFace,i},e.mesh.splitEdge=function(t){var i=e.mesh.addEdgeVertex(t).sym;return e.mesh.splice_(t.sym,t.sym.oPrev()),e.mesh.splice_(t.sym,i),t.sym.org=i.org,i.dst().anEdge=i.sym,i.sym.lFace=t.rFace(),i.winding=t.winding,i.sym.winding=t.sym.winding,i},e.mesh.connect=function(t,i){var r=!1,n=e.mesh.makeEdgePair_(t),o=n.sym;return i.lFace!==t.lFace&&(r=!0,e.mesh.killFace_(i.lFace,t.lFace)),e.mesh.splice_(n,t.lNext),e.mesh.splice_(o,i),n.org=t.dst(),o.org=i.org,n.lFace=o.lFace=t.lFace,t.lFace.anEdge=o,r||e.mesh.makeFace_(n,t.lFace),n},e.mesh.zapFace=function(t){var i,r=t.anEdge,n=r.lNext;do{if(n=(i=n).lNext,i.lFace=null,null===i.rFace()){i.oNext===i?e.mesh.killVertex_(i.org,null):(i.org.anEdge=i.oNext,e.mesh.splice_(i,i.oPrev()));var o=i.sym;o.oNext===o?e.mesh.killVertex_(o.org,null):(o.org.anEdge=o.oNext,e.mesh.splice_(o,o.oPrev())),e.mesh.killEdge_(i)}}while(i!==r);var a=t.prev,s=t.next;s.prev=a,a.next=s},e.mesh.meshUnion=function(e,t){var i=e.fHead,r=e.vHead,n=e.eHead,o=t.fHead,a=t.vHead,s=t.eHead;return o.next!==o&&(i.prev.next=o.next,o.next.prev=i.prev,o.prev.next=i,i.prev=o.prev),a.next!==a&&(r.prev.next=a.next,a.next.prev=r.prev,a.prev.next=r,r.prev=a.prev),s.next!==s&&(n.sym.next.sym.next=s.next,s.next.sym.next=n.sym.next,s.sym.next.sym.next=n,n.sym.next=s.sym.next),e},e.mesh.deleteMesh=function(e){},e.mesh.makeEdgePair_=function(t){var i=new e.GluHalfEdge,r=new e.GluHalfEdge,n=t.sym.next;return r.next=n,n.sym.next=i,i.next=t,t.sym.next=r,i.sym=r,i.oNext=i,i.lNext=r,r.sym=i,r.oNext=r,r.lNext=i,i},e.mesh.splice_=function(e,t){var i=e.oNext,r=t.oNext;i.sym.lNext=t,r.sym.lNext=e,e.oNext=r,t.oNext=i},e.mesh.makeVertex_=function(t,i){var r=i.prev,n=new e.GluVertex(i,r);r.next=n,i.prev=n,n.anEdge=t;var o=t;do{o.org=n,o=o.oNext}while(o!==t)},e.mesh.makeFace_=function(t,i){var r=i.prev,n=new e.GluFace(i,r);r.next=n,i.prev=n,n.anEdge=t,n.inside=i.inside;var o=t;do{o.lFace=n,o=o.lNext}while(o!==t)},e.mesh.killEdge_=function(e){var t=e.next,i=e.sym.next;t.sym.next=i,i.sym.next=t},e.mesh.killVertex_=function(e,t){var i=e.anEdge,r=i;do{r.org=t,r=r.oNext}while(r!==i);var n=e.prev,o=e.next;o.prev=n,n.next=o},e.mesh.killFace_=function(e,t){var i=e.anEdge,r=i;do{r.lFace=t,r=r.lNext}while(r!==i);var n=e.prev,o=e.next;o.prev=n,n.next=o},e.normal={},e.normal.S_UNIT_X_=1,e.normal.S_UNIT_Y_=0,e.normal.projectPolygon=function(t,i,r,n){var o=!1,a=[i,r,n];0===i&&0===r&&0===n&&(e.normal.computeNormal_(t,a),o=!0);var s,l=e.normal.longAxis_(a),u=t.mesh.vHead;if(e.TRUE_PROJECT){e.normal.normalize_(a);var c=[0,0,0],f=[0,0,0];c[l]=0,c[(l+1)%3]=e.normal.S_UNIT_X_,c[(l+2)%3]=e.normal.S_UNIT_Y_;var d=e.normal.dot_(c,a);for(c[0]-=d*a[0],c[1]-=d*a[1],c[2]-=d*a[2],e.normal.normalize_(c),f[0]=a[1]*c[2]-a[2]*c[1],f[1]=a[2]*c[0]-a[0]*c[2],f[2]=a[0]*c[1]-a[1]*c[0],e.normal.normalize_(f),s=u.next;s!==u;s=s.next)s.s=e.normal.dot_(s.coords,c),s.t=e.normal.dot_(s.coords,f)}else{var h=(l+1)%3,p=(l+2)%3,_=a[l]>0?1:-1;for(s=u.next;s!==u;s=s.next)s.s=s.coords[h],s.t=_*s.coords[p]}o&&e.normal.checkOrientation_(t)},e.normal.dot_=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},e.normal.normalize_=function(t){var i=t[0]*t[0]+t[1]*t[1]+t[2]*t[2];e.assert(i>0),i=Math.sqrt(i),t[0]/=i,t[1]/=i,t[2]/=i},e.normal.longAxis_=function(e){var t=0;return Math.abs(e[1])>Math.abs(e[0])&&(t=1),Math.abs(e[2])>Math.abs(e[t])&&(t=2),t},e.normal.computeNormal_=function(t,i){var r,n=[-2*e.GLU_TESS_MAX_COORD,-2*e.GLU_TESS_MAX_COORD,-2*e.GLU_TESS_MAX_COORD],o=[2*e.GLU_TESS_MAX_COORD,2*e.GLU_TESS_MAX_COORD,2*e.GLU_TESS_MAX_COORD],a=[],s=[],l=t.mesh.vHead;for(r=l.next;r!==l;r=r.next)for(var u=0;u<3;++u){var c=r.coords[u];c<o[u]&&(o[u]=c,s[u]=r),c>n[u]&&(n[u]=c,a[u]=r)}var f=0;if(n[1]-o[1]>n[0]-o[0]&&(f=1),n[2]-o[2]>n[f]-o[f]&&(f=2),o[f]>=n[f])return i[0]=0,i[1]=0,void(i[2]=1);var d=0,h=s[f],p=a[f],_=[0,0,0],m=[h.coords[0]-p.coords[0],h.coords[1]-p.coords[1],h.coords[2]-p.coords[2]],v=[0,0,0];for(r=l.next;r!==l;r=r.next){v[0]=r.coords[0]-p.coords[0],v[1]=r.coords[1]-p.coords[1],v[2]=r.coords[2]-p.coords[2],_[0]=m[1]*v[2]-m[2]*v[1],_[1]=m[2]*v[0]-m[0]*v[2],_[2]=m[0]*v[1]-m[1]*v[0];var g=_[0]*_[0]+_[1]*_[1]+_[2]*_[2];g>d&&(d=g,i[0]=_[0],i[1]=_[1],i[2]=_[2])}d<=0&&(i[0]=i[1]=i[2]=0,i[e.normal.longAxis_(m)]=1)},e.normal.checkOrientation_=function(e){for(var t=0,i=e.mesh.fHead,r=i.next;r!==i;r=r.next){var n=r.anEdge;if(!(n.winding<=0))do{t+=(n.org.s-n.dst().s)*(n.org.t+n.dst().t),n=n.lNext}while(n!==r.anEdge)}if(t<0)for(var o=e.mesh.vHead,a=o.next;a!==o;a=a.next)a.t=-a.t},e.render={},e.render.renderMesh=function(t,i,r){for(var n=!1,o=-1,a=i.fHead.prev;a!==i.fHead;a=a.prev)if(a.inside){n||(t.callBeginCallback(e.primitiveType.GL_TRIANGLES),n=!0);var s=a.anEdge;e.assert(s.lNext.lNext.lNext===s,"renderMesh called with non-triangulated mesh");do{if(r){var l=s.rFace().inside?0:1;o!==l&&t.callEdgeFlagCallback(!!(o=l))}t.callVertexCallback(s.org.data),s=s.lNext}while(s!==a.anEdge)}n&&t.callEndCallback()},e.render.renderBoundary=function(t,i){for(var r=i.fHead.next;r!==i.fHead;r=r.next)if(r.inside){t.callBeginCallback(e.primitiveType.GL_LINE_LOOP);var n=r.anEdge;do{t.callVertexCallback(n.org.data),n=n.lNext}while(n!==r.anEdge);t.callEndCallback()}},e.sweep={},e.sweep.SENTINEL_COORD_=4*e.GLU_TESS_MAX_COORD,e.sweep.TOLERANCE_NONZERO_=!1,e.sweep.computeInterior=function(t){var i;for(t.fatalError=!1,e.sweep.removeDegenerateEdges_(t),e.sweep.initPriorityQ_(t),e.sweep.initEdgeDict_(t);null!==(i=t.pq.extractMin());){for(;;){var r=t.pq.minimum();if(null===r||!e.geom.vertEq(r,i))break;r=t.pq.extractMin(),e.sweep.spliceMergeVertices_(t,i.anEdge,r.anEdge)}e.sweep.sweepEvent_(t,i)}var n=t.dict.getMin().getKey();t.event=n.eUp.org,e.sweep.doneEdgeDict_(t),e.sweep.donePriorityQ_(t),e.sweep.removeDegenerateFaces_(t.mesh),t.mesh.checkMesh()},e.sweep.addWinding_=function(e,t){e.winding+=t.winding,e.sym.winding+=t.sym.winding},e.sweep.edgeLeq_=function(t,i,r){var n=t.event,o=i.eUp,a=r.eUp;return o.dst()===n?a.dst()===n?e.geom.vertLeq(o.org,a.org)?e.geom.edgeSign(a.dst(),o.org,a.org)<=0:e.geom.edgeSign(o.dst(),a.org,o.org)>=0:e.geom.edgeSign(a.dst(),n,a.org)<=0:a.dst()===n?e.geom.edgeSign(o.dst(),n,o.org)>=0:e.geom.edgeEval(o.dst(),n,o.org)>=e.geom.edgeEval(a.dst(),n,a.org)},e.sweep.deleteRegion_=function(t,i){i.fixUpperEdge&&e.assert(0===i.eUp.winding),i.eUp.activeRegion=null,t.dict.deleteNode(i.nodeUp),i.nodeUp=null},e.sweep.fixUpperEdge_=function(t,i){e.assert(t.fixUpperEdge),e.mesh.deleteEdge(t.eUp),t.fixUpperEdge=!1,t.eUp=i,i.activeRegion=t},e.sweep.topLeftRegion_=function(t){var i=t.eUp.org;do{t=t.regionAbove()}while(t.eUp.org===i);if(t.fixUpperEdge){var r=e.mesh.connect(t.regionBelow().eUp.sym,t.eUp.lNext);e.sweep.fixUpperEdge_(t,r),t=t.regionAbove()}return t},e.sweep.topRightRegion_=function(e){var t=e.eUp.dst();do{e=e.regionAbove()}while(e.eUp.dst()===t);return e},e.sweep.addRegionBelow_=function(t,i,r){var n=new e.ActiveRegion;return n.eUp=r,n.nodeUp=t.dict.insertBefore(i.nodeUp,n),r.activeRegion=n,n},e.sweep.isWindingInside_=function(t,i){switch(t.windingRule){case e.windingRule.GLU_TESS_WINDING_ODD:return 0!=(1&i);case e.windingRule.GLU_TESS_WINDING_NONZERO:return 0!==i;case e.windingRule.GLU_TESS_WINDING_POSITIVE:return i>0;case e.windingRule.GLU_TESS_WINDING_NEGATIVE:return i<0;case e.windingRule.GLU_TESS_WINDING_ABS_GEQ_TWO:return i>=2||i<=-2}return e.assert(!1),!1},e.sweep.computeWinding_=function(t,i){i.windingNumber=i.regionAbove().windingNumber+i.eUp.winding,i.inside=e.sweep.isWindingInside_(t,i.windingNumber)},e.sweep.finishRegion_=function(t,i){var r=i.eUp,n=r.lFace;n.inside=i.inside,n.anEdge=r,e.sweep.deleteRegion_(t,i)},e.sweep.finishLeftRegions_=function(t,i,r){for(var n=i,o=i.eUp;n!==r;){n.fixUpperEdge=!1;var a=n.regionBelow(),s=a.eUp;if(s.org!==o.org){if(!a.fixUpperEdge){e.sweep.finishRegion_(t,n);break}s=e.mesh.connect(o.lPrev(),s.sym),e.sweep.fixUpperEdge_(a,s)}o.oNext!==s&&(e.mesh.meshSplice(s.oPrev(),s),e.mesh.meshSplice(o,s)),e.sweep.finishRegion_(t,n),o=a.eUp,n=a}return o},e.sweep.addRightEdges_=function(t,i,r,n,o,a){var s=!0,l=r;do{e.assert(e.geom.vertLeq(l.org,l.dst())),e.sweep.addRegionBelow_(t,i,l.sym),l=l.oNext}while(l!==n);null===o&&(o=i.regionBelow().eUp.rPrev());for(var u,c=i,f=o;(l=(u=c.regionBelow()).eUp.sym).org===f.org;)l.oNext!==f&&(e.mesh.meshSplice(l.oPrev(),l),e.mesh.meshSplice(f.oPrev(),l)),u.windingNumber=c.windingNumber-l.winding,u.inside=e.sweep.isWindingInside_(t,u.windingNumber),c.dirty=!0,!s&&e.sweep.checkForRightSplice_(t,c)&&(e.sweep.addWinding_(l,f),e.sweep.deleteRegion_(t,c),e.mesh.deleteEdge(f)),s=!1,c=u,f=l;c.dirty=!0,e.assert(c.windingNumber-l.winding===u.windingNumber),a&&e.sweep.walkDirtyRegions_(t,c)},e.sweep.callCombine_=function(t,i,r,n,o){var a=[i.coords[0],i.coords[1],i.coords[2]];i.data=null,i.data=t.callCombineCallback(a,r,n),null===i.data&&(o?t.fatalError||(t.callErrorCallback(e.errorType.GLU_TESS_NEED_COMBINE_CALLBACK),t.fatalError=!0):i.data=r[0])},e.sweep.spliceMergeVertices_=function(t,i,r){var n=[null,null,null,null];n[0]=i.org.data,n[1]=r.org.data,e.sweep.callCombine_(t,i.org,n,[.5,.5,0,0],!1),e.mesh.meshSplice(i,r)},e.sweep.vertexWeights_=function(t,i,r,n,o){var a=e.geom.vertL1dist(i,t),s=e.geom.vertL1dist(r,t),l=o,u=o+1;n[l]=.5*s/(a+s),n[u]=.5*a/(a+s),t.coords[0]+=n[l]*i.coords[0]+n[u]*r.coords[0],t.coords[1]+=n[l]*i.coords[1]+n[u]*r.coords[1],t.coords[2]+=n[l]*i.coords[2]+n[u]*r.coords[2]},e.sweep.getIntersectData_=function(t,i,r,n,o,a){var s=[0,0,0,0],l=[r.data,n.data,o.data,a.data];i.coords[0]=i.coords[1]=i.coords[2]=0,e.sweep.vertexWeights_(i,r,n,s,0),e.sweep.vertexWeights_(i,o,a,s,2),e.sweep.callCombine_(t,i,l,s,!0)},e.sweep.checkForRightSplice_=function(t,i){var r=i.regionBelow(),n=i.eUp,o=r.eUp;if(e.geom.vertLeq(n.org,o.org)){if(e.geom.edgeSign(o.dst(),n.org,o.org)>0)return!1;e.geom.vertEq(n.org,o.org)?n.org!==o.org&&(t.pq.remove(n.org.pqHandle),e.sweep.spliceMergeVertices_(t,o.oPrev(),n)):(e.mesh.splitEdge(o.sym),e.mesh.meshSplice(n,o.oPrev()),i.dirty=r.dirty=!0)}else{if(e.geom.edgeSign(n.dst(),o.org,n.org)<0)return!1;i.regionAbove().dirty=i.dirty=!0,e.mesh.splitEdge(n.sym),e.mesh.meshSplice(o.oPrev(),n)}return!0},e.sweep.checkForLeftSplice_=function(t,i){var r,n=i.regionBelow(),o=i.eUp,a=n.eUp;if(e.assert(!e.geom.vertEq(o.dst(),a.dst())),e.geom.vertLeq(o.dst(),a.dst())){if(e.geom.edgeSign(o.dst(),a.dst(),o.org)<0)return!1;i.regionAbove().dirty=i.dirty=!0,r=e.mesh.splitEdge(o),e.mesh.meshSplice(a.sym,r),r.lFace.inside=i.inside}else{if(e.geom.edgeSign(a.dst(),o.dst(),a.org)>0)return!1;i.dirty=n.dirty=!0,r=e.mesh.splitEdge(a),e.mesh.meshSplice(o.lNext,a.sym),r.rFace().inside=i.inside}return!0},e.sweep.checkForIntersect_=function(t,i){var r=i.regionBelow(),n=i.eUp,o=r.eUp,a=n.org,s=o.org,l=n.dst(),u=o.dst(),c=new e.GluVertex;if(e.assert(!e.geom.vertEq(u,l)),e.assert(e.geom.edgeSign(l,t.event,a)<=0),e.assert(e.geom.edgeSign(u,t.event,s)>=0),e.assert(a!==t.event&&s!==t.event),e.assert(!i.fixUpperEdge&&!r.fixUpperEdge),a===s)return!1;if(Math.min(a.t,l.t)>Math.max(s.t,u.t))return!1;if(e.geom.vertLeq(a,s)){if(e.geom.edgeSign(u,a,s)>0)return!1}else if(e.geom.edgeSign(l,s,a)<0)return!1;e.geom.edgeIntersect(l,a,u,s,c),e.assert(Math.min(a.t,l.t)<=c.t),e.assert(c.t<=Math.max(s.t,u.t)),e.assert(Math.min(u.s,l.s)<=c.s),e.assert(c.s<=Math.max(s.s,a.s)),e.geom.vertLeq(c,t.event)&&(c.s=t.event.s,c.t=t.event.t);var f=e.geom.vertLeq(a,s)?a:s;if(e.geom.vertLeq(f,c)&&(c.s=f.s,c.t=f.t),e.geom.vertEq(c,a)||e.geom.vertEq(c,s))return e.sweep.checkForRightSplice_(t,i),!1;if(!e.geom.vertEq(l,t.event)&&e.geom.edgeSign(l,t.event,c)>=0||!e.geom.vertEq(u,t.event)&&e.geom.edgeSign(u,t.event,c)<=0){if(u===t.event)return e.mesh.splitEdge(n.sym),e.mesh.meshSplice(o.sym,n),n=(i=e.sweep.topLeftRegion_(i)).regionBelow().eUp,e.sweep.finishLeftRegions_(t,i.regionBelow(),r),e.sweep.addRightEdges_(t,i,n.oPrev(),n,n,!0),!0;if(l===t.event){e.mesh.splitEdge(o.sym),e.mesh.meshSplice(n.lNext,o.oPrev()),r=i;var d=(i=e.sweep.topRightRegion_(i)).regionBelow().eUp.rPrev();return r.eUp=o.oPrev(),o=e.sweep.finishLeftRegions_(t,r,null),e.sweep.addRightEdges_(t,i,o.oNext,n.rPrev(),d,!0),!0}return e.geom.edgeSign(l,t.event,c)>=0&&(i.regionAbove().dirty=i.dirty=!0,e.mesh.splitEdge(n.sym),n.org.s=t.event.s,n.org.t=t.event.t),e.geom.edgeSign(u,t.event,c)<=0&&(i.dirty=r.dirty=!0,e.mesh.splitEdge(o.sym),o.org.s=t.event.s,o.org.t=t.event.t),!1}return e.mesh.splitEdge(n.sym),e.mesh.splitEdge(o.sym),e.mesh.meshSplice(o.oPrev(),n),n.org.s=c.s,n.org.t=c.t,n.org.pqHandle=t.pq.insert(n.org),e.sweep.getIntersectData_(t,n.org,a,l,s,u),i.regionAbove().dirty=i.dirty=r.dirty=!0,!1},e.sweep.walkDirtyRegions_=function(t,i){for(var r=i.regionBelow();;){for(;r.dirty;)i=r,r=r.regionBelow();if(!i.dirty&&(r=i,null===(i=i.regionAbove())||!i.dirty))return;i.dirty=!1;var n=i.eUp,o=r.eUp;if(n.dst()!==o.dst()&&e.sweep.checkForLeftSplice_(t,i)&&(r.fixUpperEdge?(e.sweep.deleteRegion_(t,r),e.mesh.deleteEdge(o),o=(r=i.regionBelow()).eUp):i.fixUpperEdge&&(e.sweep.deleteRegion_(t,i),e.mesh.deleteEdge(n),n=(i=r.regionAbove()).eUp)),n.org!==o.org)if(n.dst()===o.dst()||i.fixUpperEdge||r.fixUpperEdge||n.dst()!==t.event&&o.dst()!==t.event)e.sweep.checkForRightSplice_(t,i);else if(e.sweep.checkForIntersect_(t,i))return;n.org===o.org&&n.dst()===o.dst()&&(e.sweep.addWinding_(o,n),e.sweep.deleteRegion_(t,i),e.mesh.deleteEdge(n),i=r.regionAbove())}},e.sweep.connectRightVertex_=function(t,i,r){var n,o=r.oNext,a=i.regionBelow(),s=i.eUp,l=a.eUp,u=!1;s.dst()!==l.dst()&&e.sweep.checkForIntersect_(t,i),e.geom.vertEq(s.org,t.event)&&(e.mesh.meshSplice(o.oPrev(),s),o=(i=e.sweep.topLeftRegion_(i)).regionBelow().eUp,e.sweep.finishLeftRegions_(t,i.regionBelow(),a),u=!0),e.geom.vertEq(l.org,t.event)&&(e.mesh.meshSplice(r,l.oPrev()),r=e.sweep.finishLeftRegions_(t,a,null),u=!0),u?e.sweep.addRightEdges_(t,i,r.oNext,o,o,!0):(n=e.geom.vertLeq(l.org,s.org)?l.oPrev():s,n=e.mesh.connect(r.lPrev(),n),e.sweep.addRightEdges_(t,i,n,n.oNext,n.oNext,!1),n.sym.activeRegion.fixUpperEdge=!0,e.sweep.walkDirtyRegions_(t,i))},e.sweep.connectLeftDegenerate_=function(t,i,r){var n=i.eUp;if(e.geom.vertEq(n.org,r))return e.assert(e.sweep.TOLERANCE_NONZERO_),void(e.sweep.TOLERANCE_NONZERO_&&e.sweep.spliceMergeVertices_(t,n,r.anEdge));if(!e.geom.vertEq(n.dst(),r))return e.mesh.splitEdge(n.sym),i.fixUpperEdge&&(e.mesh.deleteEdge(n.oNext),i.fixUpperEdge=!1),e.mesh.meshSplice(r.anEdge,n),void e.sweep.sweepEvent_(t,r);if(e.assert(e.sweep.TOLERANCE_NONZERO_),e.sweep.TOLERANCE_NONZERO_){var o=(i=e.sweep.topRightRegion_(i)).regionBelow(),a=o.eUp.sym,s=a.oNext,l=s;o.fixUpperEdge&&(e.assert(s!==a),e.sweep.deleteRegion_(t,o),e.mesh.deleteEdge(a),a=s.oPrev()),e.mesh.meshSplice(r.anEdge,a),e.geom.edgeGoesLeft(s)||(s=null),e.sweep.addRightEdges_(t,i,a.oNext,l,s,!0)}},e.sweep.connectLeftVertex_=function(t,i){var r=new e.ActiveRegion;r.eUp=i.anEdge.sym;var n=t.dict.search(r).getKey(),o=n.regionBelow(),a=n.eUp,s=o.eUp;if(0!==e.geom.edgeSign(a.dst(),i,a.org)){var l,u=e.geom.vertLeq(s.dst(),a.dst())?n:o;n.inside||u.fixUpperEdge?(l=u===n?e.mesh.connect(i.anEdge.sym,a.lNext):e.mesh.connect(s.dNext(),i.anEdge).sym,u.fixUpperEdge?e.sweep.fixUpperEdge_(u,l):e.sweep.computeWinding_(t,e.sweep.addRegionBelow_(t,n,l)),e.sweep.sweepEvent_(t,i)):e.sweep.addRightEdges_(t,n,i.anEdge,i.anEdge,null,!0)}else e.sweep.connectLeftDegenerate_(t,n,i)},e.sweep.sweepEvent_=function(t,i){t.event=i;for(var r=i.anEdge;null===r.activeRegion;)if((r=r.oNext)===i.anEdge)return void e.sweep.connectLeftVertex_(t,i);var n=e.sweep.topLeftRegion_(r.activeRegion),o=n.regionBelow(),a=o.eUp,s=e.sweep.finishLeftRegions_(t,o,null);s.oNext===a?e.sweep.connectRightVertex_(t,n,s):e.sweep.addRightEdges_(t,n,s.oNext,a,a,!0)},e.sweep.addSentinel_=function(t,i){var r=new e.ActiveRegion,n=e.mesh.makeEdge(t.mesh);n.org.s=e.sweep.SENTINEL_COORD_,n.org.t=i,n.dst().s=-e.sweep.SENTINEL_COORD_,n.dst().t=i,t.event=n.dst(),r.eUp=n,r.windingNumber=0,r.inside=!1,r.fixUpperEdge=!1,r.sentinel=!0,r.dirty=!1,r.nodeUp=t.dict.insert(r)},e.sweep.initEdgeDict_=function(t){t.dict=new e.Dict(t,e.sweep.edgeLeq_),e.sweep.addSentinel_(t,-e.sweep.SENTINEL_COORD_),e.sweep.addSentinel_(t,e.sweep.SENTINEL_COORD_)},e.sweep.doneEdgeDict_=function(t){for(var i,r=0;null!==(i=t.dict.getMin().getKey());)i.sentinel||(e.assert(i.fixUpperEdge),e.assert(1==++r)),e.assert(0===i.windingNumber),e.sweep.deleteRegion_(t,i);t.dict=null},e.sweep.removeDegenerateEdges_=function(t){for(var i,r=t.mesh.eHead,n=r.next;n!==r;n=i){i=n.next;var o=n.lNext;e.geom.vertEq(n.org,n.dst())&&n.lNext.lNext!==n&&(e.sweep.spliceMergeVertices_(t,o,n),e.mesh.deleteEdge(n),o=(n=o).lNext),o.lNext===n&&(o!==n&&(o!==i&&o!==i.sym||(i=i.next),e.mesh.deleteEdge(o)),n!==i&&n!==i.sym||(i=i.next),e.mesh.deleteEdge(n))}},e.sweep.initPriorityQ_=function(t){var i=new e.PriorityQ;t.pq=i;var r,n=t.mesh.vHead;for(r=n.next;r!==n;r=r.next)r.pqHandle=i.insert(r);i.init()},e.sweep.donePriorityQ_=function(e){e.pq.deleteQ(),e.pq=null},e.sweep.removeDegenerateFaces_=function(t){for(var i,r=t.fHead.next;r!==t.fHead;r=i){i=r.next;var n=r.anEdge;e.assert(n.lNext!==n),n.lNext.lNext===n&&(e.sweep.addWinding_(n.oNext,n),e.mesh.deleteEdge(n))}},e.tessmono={},e.tessmono.tessellateMonoRegion_=function(t){var i=t.anEdge;for(e.assert(i.lNext!==i&&i.lNext.lNext!==i);e.geom.vertLeq(i.dst(),i.org);i=i.lPrev());for(;e.geom.vertLeq(i.org,i.dst());i=i.lNext);for(var r,n=i.lPrev();i.lNext!==n;)if(e.geom.vertLeq(i.dst(),n.org)){for(;n.lNext!==i&&(e.geom.edgeGoesLeft(n.lNext)||e.geom.edgeSign(n.org,n.dst(),n.lNext.dst())<=0);)n=(r=e.mesh.connect(n.lNext,n)).sym;n=n.lPrev()}else{for(;n.lNext!==i&&(e.geom.edgeGoesRight(i.lPrev())||e.geom.edgeSign(i.dst(),i.org,i.lPrev().org)>=0);)r=e.mesh.connect(i,i.lPrev()),i=r.sym;i=i.lNext}for(e.assert(n.lNext!==i);n.lNext.lNext!==i;)n=(r=e.mesh.connect(n.lNext,n)).sym},e.tessmono.tessellateInterior=function(t){for(var i,r=t.fHead.next;r!==t.fHead;r=i)i=r.next,r.inside&&e.tessmono.tessellateMonoRegion_(r)},e.tessmono.discardExterior=function(t){for(var i,r=t.fHead.next;r!==t.fHead;r=i)i=r.next,r.inside||e.mesh.zapFace(r)},e.tessmono.setWindingNumber=function(t,i,r){for(var n,o=t.eHead.next;o!==t.eHead;o=n)n=o.next,o.rFace().inside!==o.lFace.inside?o.winding=o.lFace.inside?i:-i:r?e.mesh.deleteEdge(o):o.winding=0},e.Dict=function(t,i){this.head_=new e.DictNode,this.frame_=t,this.leq_=i},e.Dict.prototype.deleteDict_=function(){},e.Dict.prototype.insertBefore=function(t,i){do{t=t.prev}while(null!==t.key&&!this.leq_(this.frame_,t.key,i));var r=new e.DictNode(i,t.next,t);return t.next.prev=r,t.next=r,r},e.Dict.prototype.insert=function(e){return this.insertBefore(this.head_,e)},e.Dict.prototype.deleteNode=function(e){e.next.prev=e.prev,e.prev.next=e.next},e.Dict.prototype.search=function(e){var t=this.head_;do{t=t.next}while(null!==t.key&&!this.leq_(this.frame_,e,t.key));return t},e.Dict.prototype.getMin=function(){return this.head_.next},e.Dict.prototype.getMax=function(){return this.head_.prev},e.DictNode=function(e,t,i){this.key=e||null,this.next=t||this,this.prev=i||this},e.DictNode.prototype.getKey=function(){return this.key},e.DictNode.prototype.getSuccessor=function(){return this.next},e.DictNode.prototype.getPredecessor=function(){return this.prev},e.GluTesselator=function(){this.state_=e.GluTesselator.tessState_.T_DORMANT,this.lastEdge_=null,this.mesh=null,this.errorCallback_=null,this.normal_=[0,0,0],this.windingRule=e.windingRule.GLU_TESS_WINDING_ODD,this.fatalError=!1,this.dict=null,this.pq=null,this.event=null,this.combineCallback_=null,this.boundaryOnly_=!1,this.beginCallback_=null,this.edgeFlagCallback_=null,this.vertexCallback_=null,this.endCallback_=null,this.meshCallback_=null,this.polygonData_=null},e.GluTesselator.tessState_={T_DORMANT:0,T_IN_POLYGON:1,T_IN_CONTOUR:2},e.GluTesselator.prototype.gluDeleteTess=function(){this.requireState_(e.GluTesselator.tessState_.T_DORMANT)},e.GluTesselator.prototype.gluTessProperty=function(t,i){switch(t){case e.gluEnum.GLU_TESS_TOLERANCE:return;case e.gluEnum.GLU_TESS_WINDING_RULE:var r=i;switch(r){case e.windingRule.GLU_TESS_WINDING_ODD:case e.windingRule.GLU_TESS_WINDING_NONZERO:case e.windingRule.GLU_TESS_WINDING_POSITIVE:case e.windingRule.GLU_TESS_WINDING_NEGATIVE:case e.windingRule.GLU_TESS_WINDING_ABS_GEQ_TWO:return void(this.windingRule=r)}break;case e.gluEnum.GLU_TESS_BOUNDARY_ONLY:return void(this.boundaryOnly_=!!i);default:return void this.callErrorCallback(e.gluEnum.GLU_INVALID_ENUM)}this.callErrorCallback(e.gluEnum.GLU_INVALID_VALUE)},e.GluTesselator.prototype.gluGetTessProperty=function(t){switch(t){case e.gluEnum.GLU_TESS_TOLERANCE:return 0;case e.gluEnum.GLU_TESS_WINDING_RULE:var i=this.windingRule;return e.assert(i===e.windingRule.GLU_TESS_WINDING_ODD||i===e.windingRule.GLU_TESS_WINDING_NONZERO||i===e.windingRule.GLU_TESS_WINDING_POSITIVE||i===e.windingRule.GLU_TESS_WINDING_NEGATIVE||i===e.windingRule.GLU_TESS_WINDING_ABS_GEQ_TWO),i;case e.gluEnum.GLU_TESS_BOUNDARY_ONLY:return e.assert(!0===this.boundaryOnly_||!1===this.boundaryOnly_),this.boundaryOnly_;default:this.callErrorCallback(e.gluEnum.GLU_INVALID_ENUM)}return!1},e.GluTesselator.prototype.gluTessNormal=function(e,t,i){this.normal_[0]=e,this.normal_[1]=t,this.normal_[2]=i},e.GluTesselator.prototype.gluTessCallback=function(t,i){var r=i||null;switch(t){case e.gluEnum.GLU_TESS_BEGIN:case e.gluEnum.GLU_TESS_BEGIN_DATA:return void(this.beginCallback_=r);case e.gluEnum.GLU_TESS_EDGE_FLAG:case e.gluEnum.GLU_TESS_EDGE_FLAG_DATA:return void(this.edgeFlagCallback_=r);case e.gluEnum.GLU_TESS_VERTEX:case e.gluEnum.GLU_TESS_VERTEX_DATA:return void(this.vertexCallback_=r);case e.gluEnum.GLU_TESS_END:case e.gluEnum.GLU_TESS_END_DATA:return void(this.endCallback_=r);case e.gluEnum.GLU_TESS_ERROR:case e.gluEnum.GLU_TESS_ERROR_DATA:return void(this.errorCallback_=r);case e.gluEnum.GLU_TESS_COMBINE:case e.gluEnum.GLU_TESS_COMBINE_DATA:return void(this.combineCallback_=r);case e.gluEnum.GLU_TESS_MESH:return void(this.meshCallback_=r);default:return void this.callErrorCallback(e.gluEnum.GLU_INVALID_ENUM)}},e.GluTesselator.prototype.gluTessVertex=function(t,i){var r=!1,n=[0,0,0];this.requireState_(e.GluTesselator.tessState_.T_IN_CONTOUR);for(var o=0;o<3;++o){var a=t[o];a<-e.GLU_TESS_MAX_COORD&&(a=-e.GLU_TESS_MAX_COORD,r=!0),a>e.GLU_TESS_MAX_COORD&&(a=e.GLU_TESS_MAX_COORD,r=!0),n[o]=a}r&&this.callErrorCallback(e.errorType.GLU_TESS_COORD_TOO_LARGE),this.addVertex_(n,i)},e.GluTesselator.prototype.gluTessBeginPolygon=function(t){this.requireState_(e.GluTesselator.tessState_.T_DORMANT),this.state_=e.GluTesselator.tessState_.T_IN_POLYGON,this.mesh=new e.GluMesh,this.polygonData_=t},e.GluTesselator.prototype.gluTessBeginContour=function(){this.requireState_(e.GluTesselator.tessState_.T_IN_POLYGON),this.state_=e.GluTesselator.tessState_.T_IN_CONTOUR,this.lastEdge_=null},e.GluTesselator.prototype.gluTessEndContour=function(){this.requireState_(e.GluTesselator.tessState_.T_IN_CONTOUR),this.state_=e.GluTesselator.tessState_.T_IN_POLYGON},e.GluTesselator.prototype.gluTessEndPolygon=function(){if(this.requireState_(e.GluTesselator.tessState_.T_IN_POLYGON),this.state_=e.GluTesselator.tessState_.T_DORMANT,e.normal.projectPolygon(this,this.normal_[0],this.normal_[1],this.normal_[2]),e.sweep.computeInterior(this),!this.fatalError){var t=this.mesh;if(this.boundaryOnly_?e.tessmono.setWindingNumber(t,1,!0):e.tessmono.tessellateInterior(t),this.mesh.checkMesh(),(this.beginCallback_||this.endCallback_||this.vertexCallback_||this.edgeFlagCallback_)&&(this.boundaryOnly_?e.render.renderBoundary(this,this.mesh):e.render.renderMesh(this,this.mesh,!!this.edgeFlagCallback_)),this.meshCallback_)return e.tessmono.discardExterior(this.mesh),this.meshCallback_(this.mesh),this.mesh=null,void(this.polygonData_=null)}e.mesh.deleteMesh(this.mesh),this.polygonData_=null,this.mesh=null},e.GluTesselator.prototype.requireState_=function(e){this.state_!==e&&this.gotoState_(e)},e.GluTesselator.prototype.gotoState_=function(t){for(;this.state_!==t;)if(this.state_<t)switch(this.state_){case e.GluTesselator.tessState_.T_DORMANT:this.callErrorCallback(e.errorType.GLU_TESS_MISSING_BEGIN_POLYGON),this.gluTessBeginPolygon(null);break;case e.GluTesselator.tessState_.T_IN_POLYGON:this.callErrorCallback(e.errorType.GLU_TESS_MISSING_BEGIN_CONTOUR),this.gluTessBeginContour()}else switch(this.state_){case e.GluTesselator.tessState_.T_IN_CONTOUR:this.callErrorCallback(e.errorType.GLU_TESS_MISSING_END_CONTOUR),this.gluTessEndContour();break;case e.GluTesselator.tessState_.T_IN_POLYGON:this.callErrorCallback(e.errorType.GLU_TESS_MISSING_END_POLYGON),this.gluTessEndPolygon()}},e.GluTesselator.prototype.addVertex_=function(t,i){var r=this.lastEdge_;null===r?(r=e.mesh.makeEdge(this.mesh),e.mesh.meshSplice(r,r.sym)):(e.mesh.splitEdge(r),r=r.lNext),r.org.data=i,r.org.coords[0]=t[0],r.org.coords[1]=t[1],r.org.coords[2]=t[2],r.winding=1,r.sym.winding=-1,this.lastEdge_=r},e.GluTesselator.prototype.callBeginCallback=function(e){this.beginCallback_&&this.beginCallback_(e,this.polygonData_)},e.GluTesselator.prototype.callVertexCallback=function(e){this.vertexCallback_&&this.vertexCallback_(e,this.polygonData_)},e.GluTesselator.prototype.callEdgeFlagCallback=function(e){this.edgeFlagCallback_&&this.edgeFlagCallback_(e,this.polygonData_)},e.GluTesselator.prototype.callEndCallback=function(){this.endCallback_&&this.endCallback_(this.polygonData_)},e.GluTesselator.prototype.callCombineCallback=function(e,t,i){return this.combineCallback_&&this.combineCallback_(e,t,i,this.polygonData_)||null},e.GluTesselator.prototype.callErrorCallback=function(e){this.errorCallback_&&this.errorCallback_(e,this.polygonData_)},e.GluFace=function(e,t){this.next=e||this,this.prev=t||this,this.anEdge=null,this.inside=!1},e.GluHalfEdge=function(e){this.next=e||this,this.sym=null,this.oNext=null,this.lNext=null,this.org=null,this.lFace=null,this.activeRegion=null,this.winding=0},e.GluHalfEdge.prototype.rFace=function(){return this.sym.lFace},e.GluHalfEdge.prototype.dst=function(){return this.sym.org},e.GluHalfEdge.prototype.oPrev=function(){return this.sym.lNext},e.GluHalfEdge.prototype.lPrev=function(){return this.oNext.sym},e.GluHalfEdge.prototype.dPrev=function(){return this.lNext.sym},e.GluHalfEdge.prototype.rPrev=function(){return this.sym.oNext},e.GluHalfEdge.prototype.dNext=function(){return this.rPrev().sym},e.GluHalfEdge.prototype.rNext=function(){return this.oPrev().sym},e.GluMesh=function(){this.vHead=new e.GluVertex,this.fHead=new e.GluFace,this.eHead=new e.GluHalfEdge,this.eHeadSym=new e.GluHalfEdge,this.eHead.sym=this.eHeadSym,this.eHeadSym.sym=this.eHead},e.GluMesh.prototype.checkMesh=function(){if(e.DEBUG){var t,i,r,n=this.fHead,o=this.vHead,a=this.eHead,s=n;for(s=n;(i=s.next)!==n;s=i){e.assert(i.prev===s),t=i.anEdge;do{e.assert(t.sym!==t),e.assert(t.sym.sym===t),e.assert(t.lNext.oNext.sym===t),e.assert(t.oNext.sym.lNext===t),e.assert(t.lFace===i),t=t.lNext}while(t!==i.anEdge)}e.assert(i.prev===s&&null===i.anEdge);var l=o;for(l=o;(r=l.next)!==o;l=r){e.assert(r.prev===l),t=r.anEdge;do{e.assert(t.sym!==t),e.assert(t.sym.sym===t),e.assert(t.lNext.oNext.sym===t),e.assert(t.oNext.sym.lNext===t),e.assert(t.org===r),t=t.oNext}while(t!==r.anEdge)}e.assert(r.prev===l&&null===r.anEdge&&null===r.data);var u=a;for(u=a;(t=u.next)!==a;u=t)e.assert(t.sym.next===u.sym),e.assert(t.sym!==t),e.assert(t.sym.sym===t),e.assert(null!==t.org),e.assert(null!==t.dst()),e.assert(t.lNext.oNext.sym===t),e.assert(t.oNext.sym.lNext===t);e.assert(t.sym.next===u.sym&&t.sym===this.eHeadSym&&t.sym.sym===t&&null===t.org&&null===t.dst()&&null===t.lFace&&null===t.rFace())}},e.GluVertex=function(e,t){this.next=e||this,this.prev=t||this,this.anEdge=null,this.data=null,this.coords=[0,0,0],this.s=0,this.t=0,this.pqHandle=0},e.PriorityQ=function(){this.verts_=[],this.order_=null,this.size_=0,this.initialized_=!1,this.heap_=new e.PriorityQHeap},e.PriorityQ.prototype.deleteQ=function(){this.heap_=null,this.order_=null,this.verts_=null},e.PriorityQ.prototype.init=function(){this.order_=[];for(var t=0;t<this.size_;t++)this.order_[t]=t;var i,r=(i=this.verts_,function(t,r){return e.geom.vertLeq(i[t],i[r])?1:-1});if(this.order_.sort(r),this.initialized_=!0,this.heap_.init(),e.DEBUG){var n=0+this.size_-1;for(t=0;t<n;++t)e.assert(e.geom.vertLeq(this.verts_[this.order_[t+1]],this.verts_[this.order_[t]]))}},e.PriorityQ.prototype.insert=function(e){if(this.initialized_)return this.heap_.insert(e);var t=this.size_++;return this.verts_[t]=e,-(t+1)},e.PriorityQ.prototype.extractMin=function(){if(0===this.size_)return this.heap_.extractMin();var t=this.verts_[this.order_[this.size_-1]];if(!this.heap_.isEmpty()){var i=this.heap_.minimum();if(e.geom.vertLeq(i,t))return this.heap_.extractMin()}do{--this.size_}while(this.size_>0&&null===this.verts_[this.order_[this.size_-1]]);return t},e.PriorityQ.prototype.minimum=function(){if(0===this.size_)return this.heap_.minimum();var t=this.verts_[this.order_[this.size_-1]];if(!this.heap_.isEmpty()){var i=this.heap_.minimum();if(e.geom.vertLeq(i,t))return i}return t},e.PriorityQ.prototype.remove=function(t){if(t>=0)this.heap_.remove(t);else for(e.assert((t=-(t+1))<this.verts_.length&&null!==this.verts_[t]),this.verts_[t]=null;this.size_>0&&null===this.verts_[this.order_[this.size_-1]];)--this.size_},e.PriorityQHeap=function(){this.heap_=e.PriorityQHeap.reallocNumeric_([0],e.PriorityQHeap.INIT_SIZE_+1),this.verts_=[null,null],this.handles_=[0,0],this.size_=0,this.max_=e.PriorityQHeap.INIT_SIZE_,this.freeList_=0,this.initialized_=!1,this.heap_[1]=1},e.PriorityQHeap.INIT_SIZE_=32,e.PriorityQHeap.reallocNumeric_=function(e,t){for(var i=new Array(t),r=0;r<e.length;r++)i[r]=e[r];for(;r<t;r++)i[r]=0;return i},e.PriorityQHeap.prototype.init=function(){for(var e=this.size_;e>=1;--e)this.floatDown_(e);this.initialized_=!0},e.PriorityQHeap.prototype.insert=function(t){var i,r=++this.size_;return 2*r>this.max_&&(this.max_*=2,this.handles_=e.PriorityQHeap.reallocNumeric_(this.handles_,this.max_+1)),0===this.freeList_?i=r:(i=this.freeList_,this.freeList_=this.handles_[this.freeList_]),this.verts_[i]=t,this.handles_[i]=r,this.heap_[r]=i,this.initialized_&&this.floatUp_(r),i},e.PriorityQHeap.prototype.isEmpty=function(){return 0===this.size_},e.PriorityQHeap.prototype.minimum=function(){return this.verts_[this.heap_[1]]},e.PriorityQHeap.prototype.extractMin=function(){var e=this.heap_,t=this.verts_,i=this.handles_,r=e[1],n=t[r];return this.size_>0&&(e[1]=e[this.size_],i[e[1]]=1,t[r]=null,i[r]=this.freeList_,this.freeList_=r,--this.size_>0&&this.floatDown_(1)),n},e.PriorityQHeap.prototype.remove=function(t){var i=this.heap_,r=this.verts_,n=this.handles_;e.assert(t>=1&&t<=this.max_&&null!==r[t]);var o=n[t];i[o]=i[this.size_],n[i[o]]=o,o<=--this.size_&&(o<=1||e.geom.vertLeq(r[i[o>>1]],r[i[o]])?this.floatDown_(o):this.floatUp_(o)),r[t]=null,n[t]=this.freeList_,this.freeList_=t},e.PriorityQHeap.prototype.floatDown_=function(t){for(var i=this.heap_,r=this.verts_,n=this.handles_,o=t,a=i[o];;){var s=o<<1;s<this.size_&&e.geom.vertLeq(r[i[s+1]],r[i[s]])&&(s+=1),e.assert(s<=this.max_);var l=i[s];if(s>this.size_||e.geom.vertLeq(r[a],r[l]))return i[o]=a,void(n[a]=o);i[o]=l,n[l]=o,o=s}},e.PriorityQHeap.prototype.floatUp_=function(t){for(var i=this.heap_,r=this.verts_,n=this.handles_,o=t,a=i[o];;){var s=o>>1,l=i[s];if(0===s||e.geom.vertLeq(r[l],r[a]))return i[o]=a,void(n[a]=o);i[o]=l,n[l]=o,o=s}},e.ActiveRegion=function(){this.eUp=null,this.nodeUp=null,this.windingNumber=0,this.inside=!1,this.sentinel=!1,this.dirty=!1,this.fixUpperEdge=!1},e.ActiveRegion.prototype.regionBelow=function(){return this.nodeUp.getPredecessor().getKey()},e.ActiveRegion.prototype.regionAbove=function(){return this.nodeUp.getSuccessor().getKey()},e}).apply(null,[]))||(e.exports=r)},m87x:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("OXG3"),i("ma1f"),i("LxLY"),i("JNkf"),i("AKDC"),i("MtZC")],n=(function(e,t,i,r,n,o,a,s,l){Object.defineProperty(t,"__esModule",{value:!0}),t.createMaterialKey=function(e,t,i,r){if(o.isSome(t))return function(e,t,i,r){if("heatmap"===i.type)throw new Error("Symbol processor does not support heatmap renderer");switch(e){case a.WGLGeometryType.FILL:return p.from(i);case a.WGLGeometryType.LINE:return m.from(i,t);case a.WGLGeometryType.MARKER:if("dot-density"===i.type)throw new Error("Dot Density renderer does not support Marker GeometryTypes");return _.from(i);case a.WGLGeometryType.TEXT:return v.from(i);case a.WGLGeometryType.LABEL:return g.from(i,r);default:throw new Error("Unable to createMaterialKey for unknown geometryType "+e)}}(e,i,t,r);switch(e){case a.WGLGeometryType.FILL:return p.from(null);case a.WGLGeometryType.LINE:return m.from(null,i);case a.WGLGeometryType.MARKER:return _.from(null);case a.WGLGeometryType.TEXT:return v.from(null);case a.WGLGeometryType.LABEL:return g.from(null,r);default:throw new Error("Unable to createMaterialKey for unknown geometryType "+e)}};var u=function(){function e(e){this._data=0,this._data=e}return e.load=function(e){var t=this.shared;return t.data=e,t},Object.defineProperty(e.prototype,"data",{get:function(){return this._data},set:function(e){this._data=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"geometryType",{get:function(){return this.bits(8,11)},set:function(e){this.setBits(e,8,11)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mapAligned",{get:function(){return!!this.bit(20)},set:function(e){this.setBit(20,e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sdf",{get:function(){return!!this.bit(11)},set:function(e){this.setBit(11,e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pattern",{get:function(){return!!this.bit(12)},set:function(e){this.setBit(12,e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textureBinding",{get:function(){return this.bits(0,8)},set:function(e){this.setBits(e,0,8)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"geometryTypeString",{get:function(){switch(this.geometryType){case a.WGLGeometryType.FILL:return"fill";case a.WGLGeometryType.MARKER:return"marker";case a.WGLGeometryType.LINE:return"line";case a.WGLGeometryType.TEXT:return"text";case a.WGLGeometryType.LABEL:return"label";default:throw new n("Unable to handle unknown geometryType: "+this.geometryType)}},enumerable:!0,configurable:!0}),e.prototype.setBit=function(e,t){var i=1<<e;t?this._data|=i:this._data&=~i},e.prototype.bit=function(e){return(this._data&1<<e)>>e},e.prototype.setBits=function(e,t,i){for(var r=t,n=0;r<i;r++,n++)this.setBit(r,0!=(e&1<<n))},e.prototype.bits=function(e,t){for(var i=0,r=e,n=0;r<t;r++,n++)i|=this.bit(r)<<n;return i},e.prototype.hasVV=function(){return!1},e.prototype.setVV=function(e,t){},e.prototype.getVariation=function(){var e={};for(var t in this)"boolean"==typeof this[t]&&(e[t]=this[t]);return e},e.prototype.getVariationHash=function(){return this._data&~(7&this.textureBinding)},e.shared=new e(0),e}();t.MaterialKeyBase=u;var c=function(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),Object.defineProperty(t.prototype,"vvSizeMinMaxValue",{get:function(){return 0!==this.bit(16)},set:function(e){this.setBit(16,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"vvSizeScaleStops",{get:function(){return 0!==this.bit(17)},set:function(e){this.setBit(17,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"vvSizeFieldStops",{get:function(){return 0!==this.bit(18)},set:function(e){this.setBit(18,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"vvSizeUnitValue",{get:function(){return 0!==this.bit(19)},set:function(e){this.setBit(19,e)},enumerable:!0,configurable:!0}),t.prototype.hasVV=function(){return e.prototype.hasVV.call(this)||this.vvSizeMinMaxValue||this.vvSizeScaleStops||this.vvSizeFieldStops||this.vvSizeUnitValue},t.prototype.setVV=function(t,i){e.prototype.setVV.call(this,t,i);var r=l.getSizeFlagsMask(t,i)&t;this.vvSizeMinMaxValue=!!(r&a.WGLVVFlag.SIZE_MINMAX_VALUE),this.vvSizeFieldStops=!!(r&a.WGLVVFlag.SIZE_FIELD_STOPS),this.vvSizeUnitValue=!!(r&a.WGLVVFlag.SIZE_UNIT_VALUE),this.vvSizeScaleStops=!!(r&a.WGLVVFlag.SIZE_SCALE_STOPS)},t}(e)},f=function(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),Object.defineProperty(t.prototype,"vvRotation",{get:function(){return 0!==this.bit(15)},set:function(e){this.setBit(15,e)},enumerable:!0,configurable:!0}),t.prototype.hasVV=function(){return e.prototype.hasVV.call(this)||this.vvRotation},t.prototype.setVV=function(t,i){e.prototype.setVV.call(this,t,i),this.vvRotation=!i&&!!(t&a.WGLVVFlag.ROTATION)},t}(e)},d=function(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),Object.defineProperty(t.prototype,"vvColor",{get:function(){return 0!==this.bit(13)},set:function(e){this.setBit(13,e)},enumerable:!0,configurable:!0}),t.prototype.hasVV=function(){return e.prototype.hasVV.call(this)||this.vvColor},t.prototype.setVV=function(t,i){e.prototype.setVV.call(this,t,i),this.vvColor=!i&&!!(t&a.WGLVVFlag.COLOR)},t}(e)},h=function(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),Object.defineProperty(t.prototype,"vvOpacity",{get:function(){return 0!==this.bit(14)},set:function(e){this.setBit(14,e)},enumerable:!0,configurable:!0}),t.prototype.hasVV=function(){return e.prototype.hasVV.call(this)||this.vvOpacity},t.prototype.setVV=function(t,i){e.prototype.setVV.call(this,t,i),this.vvOpacity=!i&&!!(t&a.WGLVVFlag.OPACITY)},t}(e)},p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.load=function(e){var t=this.shared;return t.data=e,t},t.from=function(e){var t=this.load(0);if(t.geometryType=a.WGLGeometryType.FILL,o.isSome(e))if(e instanceof r.DotDensityRenderer)t.dotDensity=!0;else{var i=l.getVVFlags(e.visualVariables);t.setVV(i,!1)}return t.data},t.prototype.getVariation=function(){return e.prototype.getVariation.call(this)},Object.defineProperty(t.prototype,"dotDensity",{get:function(){return!!this.bit(15)},set:function(e){this.setBit(15,e)},enumerable:!0,configurable:!0}),t.shared=new t(0),t}(d(h(u)));t.FillMaterialKey=p;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.load=function(e){var t=this.shared;return t.data=e,t},t.from=function(e){var t=this.load(0);if(t.geometryType=a.WGLGeometryType.MARKER,o.isSome(e)){var i=l.getVVFlags(e.visualVariables);t.setVV(i,!1)}return t.data},t.prototype.getVariation=function(){return e.prototype.getVariation.call(this)},t.shared=new t(0),t}(d(h(f(c(u)))));t.MarkerMaterialKey=_;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.load=function(e){var t=this.shared;return t.data=e,t},t.from=function(e,t){var i=this.load(0);if(i.geometryType=a.WGLGeometryType.LINE,o.isSome(e)){var r=l.getVVFlags(e.visualVariables);i.setVV(r,t)}return i.data},t.prototype.getVariation=function(){return e.prototype.getVariation.call(this)},t.shared=new t(0),t}(d(h(c(u))));t.LineMaterialKey=m;var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.load=function(e){var t=this.shared;return t.data=e,t},t.from=function(e){var t=this.load(0);if(t.geometryType=a.WGLGeometryType.TEXT,o.isSome(e)){var i=l.getVVFlags(e.visualVariables);t.setVV(i,!1)}return t.data},t.prototype.getVariation=function(){return e.prototype.getVariation.call(this)},t.shared=new t(0),t}(d(h(f(c(u)))));t.TextMaterialKey=v;var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.load=function(e){var t=this.shared;return t.data=e,t},t.from=function(e,t){var i=this.load(0);if(i.geometryType=a.WGLGeometryType.LABEL,o.isSome(e)){var r=l.getVVFlags(e.visualVariables);i.setVV(r,!1)}return i.mapAligned=!!s.isMapAligned(t.labelPlacement),i.data},t.prototype.getVariation=function(){return e.prototype.getVariation.call(this)},t.shared=new t(0),t}(c(u));t.LabelMaterialKey=g}).apply(null,r),void 0===n||(e.exports=n)},mvc2:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("qsST"),i("DJpR"),i("tI6k"),i("n4XV")],void 0===(n=(function(e,t,i,r,n,o){Object.defineProperty(t,"__esModule",{value:!0});var a=i.getLogger("esri.views.2d.engine.webgl.painter.highlight.HighlightGradient"),s=[0,0,0,0],l=function(){function e(){this._convertedHighlightOptions={fillColor:[.2*.75,.6*.75,.675,.75],outlineColor:[.2*.9,.54,.81,.9],outlinePosition:o.HIGHLIGHT_SIZING.outlinePosition,outlineWidth:o.HIGHLIGHT_SIZING.outlineWidth,innerHaloWidth:o.HIGHLIGHT_SIZING.innerHaloWidth,outerHaloWidth:o.HIGHLIGHT_SIZING.outerHaloWidth},this.shadeTexChanged=!0,this.texelData=new Uint8Array(4*o.SHADE_TEXTURE_SIZE),this.minMaxDistance=[0,0]}return e.prototype.setHighlightOptions=function(e){var t,i,r,n,l=this._convertedHighlightOptions;(n=l).fillColor[0]=(r=e).color.r/255,n.fillColor[1]=r.color.g/255,n.fillColor[2]=r.color.b/255,n.fillColor[3]=r.color.a,r.haloColor?(n.outlineColor[0]=r.haloColor.r/255,n.outlineColor[1]=r.haloColor.g/255,n.outlineColor[2]=r.haloColor.b/255,n.outlineColor[3]=r.haloColor.a):(n.outlineColor[0]=n.fillColor[0],n.outlineColor[1]=n.fillColor[1],n.outlineColor[2]=n.fillColor[2],n.outlineColor[3]=n.fillColor[3]),n.fillColor[3]*=r.fillOpacity,n.outlineColor[3]*=r.haloOpacity,n.fillColor[0]*=n.fillColor[3],n.fillColor[1]*=n.fillColor[3],n.fillColor[2]*=n.fillColor[3],n.outlineColor[0]*=n.outlineColor[3],n.outlineColor[1]*=n.outlineColor[3],n.outlineColor[2]*=n.outlineColor[3],n.outlineWidth=o.HIGHLIGHT_SIZING.outlineWidth,n.outerHaloWidth=o.HIGHLIGHT_SIZING.outerHaloWidth,n.innerHaloWidth=o.HIGHLIGHT_SIZING.innerHaloWidth,n.outlinePosition=o.HIGHLIGHT_SIZING.outlinePosition;var u,c=l.outlinePosition-l.outlineWidth/2-l.outerHaloWidth,f=l.outlinePosition-l.outlineWidth/2,d=l.outlinePosition+l.outlineWidth/2,h=l.outlinePosition+l.outlineWidth/2+l.innerHaloWidth,p=Math.sqrt(Math.PI/2)*o.SIGMAS[3],_=Math.abs(c)>p?Math.round(10*(Math.abs(c)-p))/10:0,m=Math.abs(h)>p?Math.round(10*(Math.abs(h)-p))/10:0;_&&!m?a.error("The outer rim of the highlight is "+_+"px away from the edge of the feature; consider reducing some width values or shifting the outline position towards positive values (inwards)."):!_&&m?a.error("The inner rim of the highlight is "+m+"px away from the edge of the feature; consider reducing some width values or shifting the outline position towards negative values (outwards)."):_&&m&&a.error("The highlight is "+Math.max(_,m)+"px away from the edge of the feature; consider reducing some width values.");var v=[void 0,void 0,void 0,void 0];function g(e,t,i){v[0]=(1-i)*e[0]+i*t[0],v[1]=(1-i)*e[1]+i*t[1],v[2]=(1-i)*e[2]+i*t[2],v[3]=(1-i)*e[3]+i*t[3]}for(var y=this.texelData,b=0;b<o.SHADE_TEXTURE_SIZE;++b)(u=c+b/(o.SHADE_TEXTURE_SIZE-1)*(h-c))<c?(v[4*b+0]=0,v[4*b+1]=0,v[4*b+2]=0,v[4*b+3]=0):u<f?g(s,l.outlineColor,(u-c)/(f-c)):u<d?(v[0]=(t=l.outlineColor)[0],v[1]=t[1],v[2]=t[2],v[3]=t[3]):u<h?g(l.outlineColor,l.fillColor,(u-d)/(h-d)):(v[4*b+0]=(i=l.fillColor)[0],v[4*b+1]=i[1],v[4*b+2]=i[2],v[4*b+3]=i[3]),y[4*b+0]=255*v[0],y[4*b+1]=255*v[1],y[4*b+2]=255*v[2],y[4*b+3]=255*v[3];this.minMaxDistance[0]=c,this.minMaxDistance[1]=h,this.shadeTexChanged=!0},e.prototype.applyHighlightOptions=function(e,t){this.shadeTex||(this.shadeTex=new r.Texture(e,{target:3553,pixelFormat:6408,dataType:5121,wrapMode:33071,width:o.SHADE_TEXTURE_SIZE,height:1,samplingMode:9729})),this.shadeTexChanged&&(this.shadeTex.updateData(0,0,0,o.SHADE_TEXTURE_SIZE,1,this.texelData),this.shadeTexChanged=!1),e.bindTexture(this.shadeTex,n.TEXTURE_BINDING_HIGHLIGHT_1),t.setUniform2fv("u_minMaxDistance",this.minMaxDistance)},e.prototype.destroy=function(){this.shadeTex&&(this.shadeTex.dispose(),this.shadeTex=null)},e}();t.default=l}).apply(null,r))||(e.exports=n)},n4XV:function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.SIGMAS=[void 0,void 0,void 0,1],t.ALPHA_TO_RGBA_CHANNEL_SELECTOR_MATRIX=[0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1],t.RGBA_TO_RGBA_CHANNEL_SELECTOR_MATRIX=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t.SHADE_TEXTURE_SIZE=256,t.HIGHLIGHT_SIZING={outlineWidth:.7,outerHaloWidth:.7,innerHaloWidth:.7,outlinePosition:0}}).apply(null,r))||(e.exports=n)},nOTS:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("H1tY"),i("+P5t"),i("3ikD"),i("mvc2"),i("RyYO"),i("3o6C")],n=(function(e,t,i,r,n,o,a,s,l){Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.defines=["highlight"],t._hlRenderer=new s.default,t._hlGradient=new a.default,t._width=void 0,t._height=void 0,t._hlSurfaces=new l.default,t._adjustedWidth=void 0,t._adjustedHeight=void 0,t._blitRenderer=new n.BitBlitRenderer,t}return i.__extends(t,e),t.prototype.dispose=function(){this._hlSurfaces&&this._hlSurfaces.dispose(),this._hlRenderer&&this._hlRenderer.dispose(),this._hlGradient&&this._hlGradient.destroy(),this._boundFBO=null},t.prototype.bind=function(e){var t=e.context,i=e.painter,r=t.getViewport(),n=r.width,o=r.height,a=i.getFbos(n,o).effect0;this.setup(e,n,o),t.bindFramebuffer(a),t.setClearColor(0,0,0,0),t.clear(t.gl.COLOR_BUFFER_BIT)},t.prototype.unbind=function(){},t.prototype.setup=function(e,t,i){var r=e.context;this._width=t,this._height=i;var n=t%4,o=i%4;i+=o<2?-o:4-o,this._adjustedWidth=t+=n<2?-n:4-n,this._adjustedHeight=i,this._boundFBO=r.getBoundFramebufferObject();var a=Math.round(.75*t),s=Math.round(.75*i);this._hlRenderer.setup(r,a,s),this._hlSurfaces.setup(r,a,s)},t.prototype.draw=function(e){var t=e.context,i=t.getBoundFramebufferObject();t.setViewport(0,0,.75*this._adjustedWidth,.75*this._adjustedHeight),t.bindFramebuffer(this._hlSurfaces.sharedBlur1Fbo),t.setStencilTestEnabled(!1),t.setClearColor(0,0,0,0),t.clear(t.gl.COLOR_BUFFER_BIT),this._blitRenderer.render(t,i.colorTexture,9728,1),t.setStencilTestEnabled(!1),t.setBlendingEnabled(!1),t.bindFramebuffer(this._hlSurfaces.sharedBlur2Fbo),t.setClearColor(0,0,0,0),t.clear(t.gl.COLOR_BUFFER_BIT),this._hlRenderer.preBlur(t,this._hlSurfaces.sharedBlur1Tex),r("esri-feature-highlight-debug")?(t.bindFramebuffer(null),t.clear(t.gl.COLOR_BUFFER_BIT),this._hlRenderer.finalBlur(t,this._hlSurfaces.sharedBlur2Tex)):(t.bindFramebuffer(this._hlSurfaces.sharedBlur1Fbo),t.setClearColor(0,0,0,0),t.clear(t.gl.COLOR_BUFFER_BIT),this._hlRenderer.finalBlur(t,this._hlSurfaces.sharedBlur2Tex),t.bindFramebuffer(this._boundFBO),t.setBlendingEnabled(!0),t.setViewport(0,0,this._width,this._height),this._hlRenderer.renderHighlight(t,this._hlSurfaces.sharedBlur1Tex,this._hlGradient),this._boundFBO=null)},t.prototype.setHighlightOptions=function(e){this._hlGradient.setHighlightOptions(e)},t}(o.Effect);t.default=u}).apply(null,r),void 0===n||(e.exports=n)},nzKn:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("ma1f"),i("qsST"),i("DJpR"),i("Nwkb"),i("ORRN")],void 0===(n=(function(e,t,i,r,n,o,a){Object.defineProperty(t,"__esModule",{value:!0});var s=r.getLogger("esri.views.2d.engine.webgl.effects.blendEffects.BlendEffect"),l=function(){function e(){this._size=[0,0]}return e.prototype.dispose=function(e){this._backBufferTexture&&(this._backBufferTexture.dispose(),this._backBufferTexture=null),this._programCache&&(this._programCache.dispose(),this._programCache=null),this._quad&&(this._quad.dispose(),this._quad=null)},e.prototype.draw=function(e,t,r,n,o){var l=e.context;if(this._setupShader(l),n&&"normal"!==n)this._drawBlended(e,t,r,n,o);else{var u=this._programCache.getProgram(a.blend,"normal");if(u){l.bindProgram(u),t.setSamplingMode(r),l.bindTexture(t,0),u.setUniform1i("u_layerTexture",0),u.setUniform1f("u_opacity",o),l.setBlendingEnabled(!0),l.setBlendFunction(1,771);var c=this._quad;c.draw(),c.unbind()}else s.error(new i("mapview-BlendEffect",'Error creating shader program for blend mode "normal"'))}},e.prototype._drawBlended=function(e,t,r,n,o){var l=e.context,u=e.pixelRatio,c=e.state.size;this._createOrResizeTexture(e);var f=u*c[0],d=u*c[1],h=l.getBoundFramebufferObject(),p=this._backBufferTexture;h.copyToTexture(0,0,f,d,0,0,p),l.setStencilTestEnabled(!1),l.setStencilWriteMask(0),l.setBlendingEnabled(!0),l.setDepthTestEnabled(!1),l.setDepthWriteEnabled(!1);var _=this._programCache.getProgram(a.blend,n);if(_){l.bindProgram(_),p.setSamplingMode(r),l.bindTexture(p,0),_.setUniform1i("u_backbufferTexture",0),t.setSamplingMode(r),l.bindTexture(t,1),_.setUniform1i("u_layerTexture",1),_.setUniform1f("u_opacity",o),l.setBlendFunction(1,0);var m=this._quad;m.draw(),m.unbind(),l.setBlendFunction(1,771)}else s.error(new i("mapview-BlendEffect","Error creating shader program for blend mode "+n))},e.prototype._setupShader=function(e){this._programCache||(this._programCache=new n.ProgramCache(e),this._quad||(this._quad=new o(e,[-1,-1,1,-1,-1,1,1,1])))},e.prototype._createOrResizeTexture=function(e){var t=e.context,i=e.pixelRatio,r=e.state.size,o=i*r[0],a=i*r[1];null!==this._backBufferTexture&&o===this._size[0]&&a===this._size[1]||(this._backBufferTexture?this._backBufferTexture.resize(o,a):this._backBufferTexture=new n.Texture(t,{target:3553,pixelFormat:6408,internalFormat:6408,dataType:5121,wrapMode:33071,samplingMode:9729,flipped:!1,width:o,height:a}),this._size[0]=o,this._size[1]=a)},e}();t.BlendEffect=l}).apply(null,r))||(e.exports=n)},oBAw:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("lgZd"),i("j2SP"),i("DJpR"),i("lUvf"),i("tI6k"),i("JNkf"),i("Dos2"),i("3+7H")],n=(function(e,t,i,r,n,o,a,s,l,u,c){Object.defineProperty(t,"__esModule",{value:!0});var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._color=n.vec4f32.fromValues(1,0,0,1),t._patternMatrix=r.mat3f32.create(),t._programOptions={id:!1,pattern:!1},t}return i.__extends(t,e),t.prototype.dispose=function(){this._program&&(this._program.dispose(),this._program=null),this._vao&&(this._vao.dispose(),this._vao=null)},t.prototype.drawMany=function(e,t){var i=e.context,r=e.styleLayerId;this._loadWGLResources(i);var n,o=e.displayLevel,a=e.styleLayer,c=e.painter.getVectorTileProgramCach(),f=a.getPaintValue("background-color",o),d=a.getPaintValue("background-opacity",o),h=a.getPaintValue("background-pattern",o),p=void 0!==h,_=f[3]*d,m=1|window.devicePixelRatio,v=e.spriteMosaic,g=m>s.VTL_HIGH_RES_CUTOFF?2:1,y=e.drawPhase===l.WGLDrawPhase.HITTEST,b=(y?1:0)<<1|(p?1:0),x=this._programOptions;x.id=y,x.pattern=p;var w=c.getProgram(0,b,x);if(i.bindVAO(this._vao),i.bindProgram(w),p){if(!(n=v.getMosaicItemPosition(h,!0)))return;w.setUniform1f("u_opacity",d),w.setUniform2f("u_pattern_tl",n.tl[0],n.tl[1]),w.setUniform2f("u_pattern_br",n.br[0],n.br[1]),w.setUniform1i("u_texture",s.VTL_TEXTURE_BINDING_UNIT_SPRITES),v.bind(i,9729,n.page,s.VTL_TEXTURE_BINDING_UNIT_SPRITES)}else this._color[0]=_*f[0],this._color[1]=_*f[1],this._color[2]=_*f[2],this._color[3]=_,w.setUniform4fv("u_color",this._color);if(w.setUniform1f("u_depth",a.z||0),y){var T=u.u32to4Xu8(r+1);w.setUniform4fv("u_id",T)}for(var S=0,C=t;S<C.length;S++){var L=C[S];if(w.setUniform1f("u_coord_range",L.coordRange[0]),w.setUniformMatrix3fv("u_dvsMat3",L.transforms.dvs),p){var O=Math.max(Math.pow(2,Math.round(o)-L.key.level),1),M=g*L.size[0]*O,D=M/n.size[1];this._patternMatrix[0]=M/n.size[0],this._patternMatrix[4]=D,w.setUniformMatrix3fv("u_pattern_matrix",this._patternMatrix)}i.setStencilFunction(514,L.stencilRef,255),i.drawArrays(5,0,4)}},t.prototype._loadWGLResources=function(e){if(!this._program||!this._vao){var t=o.createProgram(e,a.background);if(t){var i=new Int8Array([0,0,1,0,0,1,1,1]),r=o.BufferObject.createVertex(e,35044,i),n=new o.VertexArrayObject(e,a.background.attributes,{geometry:[{name:"a_pos",count:2,type:5120,offset:0,stride:2,normalized:!1,divisor:0}]},{geometry:r});this._program=t,this._vao=n}}},t}(c.default);t.WGLBrushVTLBackground=f}).apply(null,r),void 0===n||(e.exports=n)},oDRR:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("QDcU"),i("H1tY"),i("LxLY"),i("jBNx"),i("8uEs"),i("oZZu"),i("4oaH"),i("tI6k"),i("apbF")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c){function f(e,t){var i=t.length;if(e<t[0].value||1===i)return t[0].size;for(var r=1;r<i;r++)if(e<t[r].value)return t[r-1].size+(e-t[r-1].value)/(t[r].value-t[r-1].value)*(t[r].size-t[r-1].size);return t[i-1].size}function d(e,t,i){if(void 0===i&&(i=0),n.isNone(t))return e[i+0]=0,e[i+1]=0,e[i+2]=0,void(e[i+3]=0);var r=t.g,o=t.b,a=t.a;e[i+0]=t.r*a/255,e[i+1]=r*a/255,e[i+2]=o*a/255,e[i+3]=a}Object.defineProperty(t,"__esModule",{value:!0});var h=function(e,t,i){for(var r=16*i,n=r,o=0;n<Math.min(r+16,e.length);n++,o++)e[n]=t[o]},p=s.mat4f32.create(),_=function(){function e(){this.symbolLevels=[],this.vvColorValues=new Float32Array(8),this.vvColors=new Float32Array(32),this.vvOpacityValues=new Float32Array(8),this.vvOpacities=new Float32Array(8),this.vvSizeMinMaxValue=new Float32Array(4),this.ddColors=new Float32Array(32),this.ddBackgroundColor=new Float32Array(4),this.ddActiveDots=new Float32Array(8),this.insideEffect=new Float32Array(16*u.MAX_FILTERS),this.insideOpacity=1,this.outsideEffect=new Float32Array(16*u.MAX_FILTERS),this.outsideOpacity=1,this.effectCount=0,this._vvMaterialParameters={vvSizeEnabled:!1,vvColorEnabled:!1,vvRotationEnabled:!1,vvRotationType:"geographic",vvOpacityEnabled:!1},this._buf0=new Float32Array(2),this._buf1=new Float32Array(2),this.symbolLevels.push(0);for(var e=0;e<u.MAX_FILTERS;e++)h(this.insideEffect,p,e),h(this.outsideEffect,p,e)}return Object.defineProperty(e.prototype,"insideOpacities",{get:function(){return this._buf0[0]=1,this._buf0[1]=this.insideOpacity,this._buf0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outsideOpacities",{get:function(){return this._buf1[0]=0,this._buf1[1]=this.outsideOpacity,this._buf1},enumerable:!0,configurable:!0}),e.prototype.getSizeVVFieldStops=function(e){var t=this._vvSizeFieldStops;switch(t.type){case"static":return t;case"level-dependent":return n.unwrapOr(t.levels[e],(function(){var i=1/0,r=0;for(var o in t.levels){var a=parseFloat(o),s=Math.abs(e-a);s<i&&(i=s,r=a)}if(i===1/0)return{sizes:new Float32Array([0,0,0,0,0,0]),values:new Float32Array([0,0,0,0,0,0])};var l=Math.pow(2,(e-r)/2),u=n.unwrap(t.levels[r]),c=new Float32Array(u.values);return c[2]*=l,c[3]*=l,{sizes:n.unwrap(u.sizes),values:c}}))}},Object.defineProperty(e.prototype,"vvMaterialParameters",{get:function(){return this._vvMaterialParameters},enumerable:!0,configurable:!0}),e.prototype.update=function(e){n.isSome(this._vvInfo)&&this._updateVisualVariables(this._vvInfo.vvRanges,e)},e.prototype.setInfo=function(e,t,i){var r=this;"dot-density"===(n.isSome(i)?(i.forEach((function(e,t){return r._updateEffects(t,e)})),this.effectCount=i.length):this.effectCount=0,this._vvInfo=t,e.type)&&this._updateDotDensityInfo(e)},e.prototype.getVariation=function(){return{ddDotBlending:this.ddDotBlending,outsideLabelsVisible:this.outsideLabelsVisible,effectCount:this.effectCount,oesTextureFloat:r("esri-webgl-texture-float")}},e.prototype.getVariationHash=function(){return(this.ddDotBlending?1:0)|(this.outsideLabelsVisible?1:0)<<1|this.effectCount<<2},e.prototype._updateEffects=function(e,t){var i=e+1;if(n.isSome(t)&&t.filter&&t.filter.enabled){this.outsideLabelsVisible=t.excludedLabelsVisible;var r=t.parsedIncludedEffect,o=t.parsedExcludedEffect;n.isSome(r)?(h(this.insideEffect,r.getColorMatrix(),i),this.insideOpacity=r.getOpacity()):(h(this.insideEffect,p,i),this.insideOpacity=1),n.isSome(o)?(h(this.outsideEffect,o.getColorMatrix(),i),this.outsideOpacity=o.getOpacity()):(h(this.outsideEffect,p,i),this.outsideOpacity=1)}else h(this.insideEffect,p,i),h(this.outsideEffect,p,i),this.insideOpacity=1,this.outsideOpacity=1},e.prototype._updateVisualVariables=function(e,t){var i=this._vvMaterialParameters;if(i.vvOpacityEnabled=!1,i.vvSizeEnabled=!1,i.vvColorEnabled=!1,i.vvRotationEnabled=!1,e){var r=e.size;if(r){if(i.vvSizeEnabled=!0,r.minMaxValue){var n=r.minMaxValue,s=void 0,u=void 0;if(c.isDefined(n.minSize)&&c.isDefined(n.maxSize))if(c.isNumber(n.minSize)&&c.isNumber(n.maxSize))s=o.pt2px(n.minSize),u=o.pt2px(n.maxSize);else{var d=t.scale;s=o.pt2px(f(d,n.minSize.stops)),u=o.pt2px(f(d,n.maxSize.stops))}this.vvSizeMinMaxValue.set([n.minDataValue,n.maxDataValue,s,u])}if(r.scaleStops&&(this.vvSizeScaleStopsValue=o.pt2px(f(t.scale,r.scaleStops.stops))),r.unitValue){var h=a.getMetersPerUnitForSR(t.spatialReference)/l.meterIn[r.unitValue.unit];this.vvSizeUnitValueToPixelsRatio=h/t.resolution}r.fieldStops&&(this._vvSizeFieldStops=r.fieldStops)}var p=e.color;p&&(i.vvColorEnabled=!0,this.vvColorValues.set(p.values),this.vvColors.set(p.colors));var _=e.opacity;_&&(i.vvOpacityEnabled=!0,this.vvOpacityValues.set(_.values),this.vvOpacities.set(_.opacities));var m=e.rotation;m&&(i.vvRotationEnabled=!0,i.vvRotationType=m.type)}},e.prototype._updateDotDensityInfo=function(e){var t=e.attributes;this.ddDotValue=e.dotValue,this.ddDotScale=e.referenceScale,this.ddDotSize=e.dotSize,this.ddDotBlending=e.dotBlendingEnabled,this.ddSeed=e.seed;for(var r=0;r<u.DOT_DENSITY_MAX_FIELDS;r++){var n=r>=t.length?new i([0,0,0,0]):t[r].color;d(this.ddColors,n,4*r)}for(r=0;r<8;r++)this.ddActiveDots[r]=r<e.attributes.length?1:0;d(this.ddBackgroundColor,e.backgroundColor)},e}();t.WGLRendererInfo=_}).apply(null,r))||(e.exports=n)},oUUG:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("Nwkb"),i("3+7H"),i("A97r")],n=(function(e,t,i,r,n,o){Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._desc={lut:{path:"raster/lut",attributes:{a_position:0,a_texcoord:1}},stretch:{path:"raster/stretch",attributes:{a_position:0,a_texcoord:1}},hillshade:{path:"raster/hillshade",attributes:{a_position:0,a_texcoord:1}}},t._rendererUniformInfos=new Map,t}return i.__extends(t,e),t.prototype.dispose=function(){this._quad&&this._quad.dispose()},t.prototype.prepareState=function(e,t){var i=e.context;i.setBlendingEnabled(!0),i.setBlendFunctionSeparate(1,771,1,771),i.setColorMask(!0,!0,!0,!0),i.setStencilWriteMask(0),i.setStencilTestEnabled(!0),i.setStencilFunction(514,t.stencilRef,255)},t.prototype.draw=function(e,t){if(t.source&&!t.suspended){e.timeline.begin(this.name);var i=e.context,r=this.getShaderVariations(t),n=e.painter.materialManager.getProgram(e,this._desc[t.symbolizerParameters.type],r);this.drawWithProgram(i,n,t),e.timeline.end(this.name)}},t.prototype.drawWithProgram=function(e,t,n,a,s,l){void 0===a&&(a=1),void 0===s&&(s=[0,0]),void 0===l&&(l=!1),this._quad||(this._quad=new r(e,[0,0,1,0,0,1,1,1]));var u=n.symbolizerParameters,c=n.transformGrid,f=n.width,d=n.height,h=n.opacity,p=u.type;e.bindProgram(t);var _=this.getShaderVariations(n),m=this.getUniformInfos(p,e,t,_),v=n.getTextures();o.setTextures(e,t,v.names,v.textures);var g=o.getBasicGridUniforms(a,s),y=o.getCommonUniforms(c,[f,d],[n.source.width,n.source.height],h,l);if(o.setUniforms(t,m,i.__assign(i.__assign({u_coordScale:n.coordScale,u_dvsMat3:n.transforms.dvs},g),y)),u.colormap){var b=o.getColormapUniforms(u.colormap,u.colormapOffset);o.setUniforms(t,m,b)}if("stretch"===u.type){var x=o.getStretchUniforms(u);o.setUniforms(t,m,x)}else if("hillshade"===u.type){var w=o.getShadedReliefUniforms(u);o.setUniforms(t,m,w)}this._quad.draw()},t.prototype.getUniformInfos=function(e,t,i,r){var n=r.length>0?e+"-"+r.join("-"):e;if(this._rendererUniformInfos.has(n))return this._rendererUniformInfos.get(n);var a=o.getUniformLocationInfos(t,i);return this._rendererUniformInfos.set(n,a),a},t.prototype.getShaderVariations=function(e){var t=[];return"cubic"===e.interpolation&&t.push("bicubic"),e.symbolizerParameters.colormap&&t.push("applyColormap"),e.transformGrid&&t.push("applyProjection"),t},t}(n.default);t.default=a}).apply(null,r),void 0===n||(e.exports=n)},oZZu:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("7Yqx")],void 0===(n=(function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.mat4f32=i}).apply(null,r))||(e.exports=n)},p2sx:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("j2SP"),i("DJpR"),i("3+7H"),i("TQvW")],n=(function(e,t,i,r,n,o,a){Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._color=r.vec4f32.fromValues(1,0,0,1),t._initialized=!1,t}return i.__extends(t,e),t.prototype.dispose=function(){this._solidProgram&&(this._solidProgram.dispose(),this._solidProgram=null),this._solidVertexArrayObject&&(this._solidVertexArrayObject.dispose(),this._solidVertexArrayObject=null)},t.prototype.prepareState=function(e,t){var i=e.context;i.setDepthWriteEnabled(!1),i.setDepthTestEnabled(!1),i.setStencilTestEnabled(!0),i.setBlendingEnabled(!1),i.setColorMask(!1,!1,!1,!1),i.setStencilOp(7680,7680,7681),i.setStencilWriteMask(255),i.setStencilFunctionSeparate(1032,516,t.stencilRef,255)},t.prototype.draw=function(e,t){var i=e.context;this._initialized||this._initialize(i),i.bindVAO(this._solidVertexArrayObject),i.bindProgram(this._solidProgram),this._solidProgram.setUniformMatrix3fv("u_dvsMat3",t.transforms.dvs),this._solidProgram.setUniform2fv("u_coord_range",t.coordRange),this._solidProgram.setUniform1f("u_depth",0),this._solidProgram.setUniform4fv("u_color",this._color),i.drawArrays(5,0,4),i.bindVAO()},t.prototype._initialize=function(e){if(this._initialized)return!0;var t=n.createProgram(e,a.background);if(!t)return!1;var i=new Int8Array([0,0,1,0,0,1,1,1]),r=n.BufferObject.createVertex(e,35044,i),o=new n.VertexArrayObject(e,a.background.attributes,{geometry:[{name:"a_pos",count:2,type:5120,offset:0,stride:2,normalized:!1,divisor:0}]},{geometry:r});return this._solidProgram=t,this._solidVertexArrayObject=o,this._initialized=!0,!0},t}(o.default);t.default=s}).apply(null,r),void 0===n||(e.exports=n)},ph8t:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("apbF")],void 0===(n=(function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,i){this.data=e,this.stride=t,this.vertexCount=i}return e.decode=function(t){return new e(i.allocateTypedArrayBufferwithData(t.data,t.stride),t.stride,t.vertexCount)},e.fromVertexVector=function(t){return new e(i.allocateTypedArrayBufferwithData(t.data.buffer(),t.stride),t.stride,t.vertexCount)},e}();t.default=r;var n=function(){function e(e,t,i){this.geometryType=e,this.indexBuffer=new Uint32Array(t),this.namedBuffers=i}return e.decode=function(t){var i=t.geometryType,n=t.indexBuffer,o={};for(var a in t.namedBuffers)o[a]=r.decode(t.namedBuffers[a]);return new e(i,n,o)},e.fromVertexVectors=function(t){var i=t.geometryType,n=t.indexVector.buffer(),o={};for(var a in t.namedVectors)o[a]=r.fromVertexVector(t.namedVectors[a]);return new e(i,n,o)},e}();t.VertexBuffers=n}).apply(null,r))||(e.exports=n)},pvXx:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("LxLY"),i("DJpR"),i("JNkf"),i("wdp+")],void 0===(n=(function(e,t,i,r,n,o,a){var s=function(e){return e===o.WGLDrawPhase.HITTEST||e===o.WGLDrawPhase.LABEL_ALPHA};return function(){function e(e){this._programByKey=new Map,this._programCache=new n.ProgramCache(e)}return e.prototype.dispose=function(){this._programCache&&this._programCache.dispose()},e.prototype.getProgram=function(e,t,r,n){void 0===r&&(r=[]),void 0===n&&(n=[]);var o=t.path+r.join(".")+n.join(".");if(this._programByKey.has(o))return this._programByKey.get(o);var s=n.reduce((function(t,r){var n;return i.__assign(i.__assign({},t),((n={})[r]=e.driverTestResult[r],n))}),{}),l=i.__assign(i.__assign({},r.reduce((function(e,t){var r;return i.__assign(i.__assign({},e),((r={})[t]=!0,r))}),{})),s),u=this._programCache.getProgram(a.createProgramTemplate(t.path,t.attributes),l);if(!u)throw new Error("Unable to get program for key: ${key}");return this._programByKey.set(o,u),u},e.prototype.getMaterialProgram=function(e,t,n,l,u,c){void 0===c&&(c=["ignoresSamplerPrecision"]);var f=function(e,t,i,n){var a=e.rendererInfo,l=e.drawPhase;return t.getVariationHash()+"-"+n.join(".")+"-"+function(e){return(s(e)?1:0)|(e===o.WGLDrawPhase.HIGHLIGHT?2:0)}(l)+"-"+a.getVariationHash()+"-"+(r.isSome(i)&&i.join("."))}(e,t,u,c);if(this._programByKey.has(f))return this._programByKey.get(f);var d=function(e,t,n,a){var l=a.reduce((function(t,r){var n;return i.__assign(i.__assign({},t),((n={})[r]=e.driverTestResult[r],n))}),{}),u=i.__assign(i.__assign(i.__assign(i.__assign({},t.getVariation()),e.rendererInfo.getVariation()),{highlight:e.drawPhase===o.WGLDrawPhase.HIGHLIGHT,id:s(e.drawPhase)}),l);if(r.isSome(n))for(var c=0,f=n;c<f.length;c++)u[f[c]]=!0;return u}(e,t,u,c),h=this._programCache.getProgram(a.createProgramTemplate(n,l),d);if(!h)throw new Error("Unable to get program for key: ${key}");return this._programByKey.set(f,h),h},e}()}).apply(null,r))||(e.exports=n)},qdig:function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var i=[1,256,65536,16777216],r=[1/256,1/65536,1/16777216,1/4294967296],n=function(e,t){void 0===t&&(t=0);for(var i=0,n=0;n<4;n++)i+=e[t+n]*r[n];return i}(new Uint8ClampedArray([255,255,255,255]));t.packFloatRGBA=function(e,t,r){void 0===r&&(r=0);for(var o,a=function(e,t,i){return e<0?0:e>i?i:e}(e,0,n),s=0;s<4;s++)t[r+s]=Math.floor(256*((o=a*i[s])-Math.floor(o)))}}).apply(null,r))||(e.exports=n)},qe2g:function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){void 0===e&&(e=400),this.duration=e,this._lastTime=0,this._elapsed=0,this._value=0,this._finished=!1}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e.prototype.reset=function(){this._lastTime=0,this._elapsed=0,this._value=0},e.prototype.step=function(){var e=performance.now();return 0===this._lastTime?(this._lastTime=e,this._value=0,!0):this._elapsed>=this.duration||(this._elapsed+=e-this._lastTime,this._lastTime=e,this._value=Math.min(this._elapsed/this.duration,1),!1)},e}();t.default=i}).apply(null,r))||(e.exports=n)},rAGl:function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.codepoints=function(e){for(var t=new Array(e.length),i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t}}).apply(null,r))||(e.exports=n)},rYkQ:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("AwqN"),i("PwbG"),i("tTR7"),i("apbF"),i("apbF"),i("azm3"),i("hNI9"),i("ph8t"),i("Ed/z"),i("flWe"),i("3vQA")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c,f,d){Object.defineProperty(t,"__esModule",{value:!0});var h=new i.default,p=new i.default;function _(e,t){var i={};for(var r in e){var n={data:a.allocateTypedArrayBuffer(t,e[r]),stride:e[r]};i[r]=n}return i}var m=function(){function e(){this.tileDisplayData=null,this.tileBufferData=null}return e.prototype.reshuffle=function(){h.reset();for(var t=n.groupRecordsByGeometryType(this.tileDisplayData.displayObjects),i=0,s=t;i<s.length;i++)for(var l=0,u=w=s[i];l<u.length;l++)(C=u[l])&&h.needMore(C.geometryType,C.meshData?C.meshData.vertexCount:C.vertexCount,C.meshData?C.meshData.indexData.length:C.indexCount);for(var c=t.length,f=new r,d=0;d<c;++d){f.geometries[d].indexBuffer=new Uint32Array(Math.round(1.15*h.indicesFor(d)));var _=[];for(var m in this.tileBufferData.geometries[d].vertexBuffer)_.push(this.tileBufferData.geometries[d].vertexBuffer[m].stride);var v=e._computeVertexAlignment(_),g=Math.round(1.15*h.verticesFor(d)),y=e._align(g,v);for(var b in this.tileBufferData.geometries[d].vertexBuffer){var x=this.tileBufferData.geometries[d].vertexBuffer[b].stride;f.geometries[d].vertexBuffer[b]={stride:x,data:a.allocateTypedArrayBuffer(y,x)}}}for(p.reset(),this.tileDisplayData.displayList.clear(),d=0;d<c;++d){for(var w,T=0,S=w=t[d];T<S.length;T++){var C;if((C=S[T]).meshData)C.writeMeshDataToBuffers(p.verticesFor(d),f.geometries[d].vertexBuffer,p.indicesFor(d),f.geometries[d].indexBuffer),C.meshData=null;else{var L=this.tileBufferData.geometries[d].vertexBuffer,O=this.tileBufferData.geometries[d].indexBuffer,M=f.geometries[d].vertexBuffer,D=f.geometries[d].indexBuffer,E=p.verticesFor(d),I=p.indicesFor(d);o.copyMeshData(E,I,M,D,C,L,O),C.vertexFrom=E,C.indexFrom=I}p.needMore(d,C.vertexCount,C.indexCount)}this.tileDisplayData.displayList.unified||this.tileDisplayData.displayList.addToList(w)}if(this.tileDisplayData.displayList.unified)for(var P=0,A=this.tileDisplayData.displayObjects;P<A.length;P++)this.tileDisplayData.displayList.addToList(A[P].displayRecords);this.tileBufferData=f},e.prototype.getStrides=function(){for(var e=[],t=0;t<this.tileBufferData.geometries.length;++t){var i=this.tileBufferData.geometries[t];for(var r in e[t]={},i.vertexBuffer)e[t][r]=i.vertexBuffer[r].stride}return e},e.prototype.clone=function(){var t=new e;return t.tileBufferData=this.tileBufferData.clone(),t.tileDisplayData=this.tileDisplayData.clone(),t},e.prototype._guessSize=function(){for(var e=this.tileDisplayData.displayObjects,t=Math.min(e.length,4),i=0,r=0;r<t;r++)i=Math.max(i,e[r].displayRecords.length);return 2*(12*e.length+e.length*i*40)},e.prototype.serialize=function(){var e=this.tileBufferData.serialize(),t=this.tileBufferData.getBuffers(),i=this.tileDisplayData.serialize(new d.default(Int32Array,this._guessSize())).buffer();return t.push(i),{result:{displayData:i,bufferData:e},transferList:t}},e.decode=function(t){var i=f.deserializeList(new c.default(t.displayObjects),s),r={};for(var n in t.vertexBuffersMap)r[n]=u.VertexBuffers.decode(t.vertexBuffersMap[n]);return e.fromMeshData({displayObjects:i,vertexBuffersMap:r})},e.fromMeshData=function(t){var i=new e,o=new n.default,a=new r;for(var s in o.displayObjects=t.displayObjects,t.vertexBuffersMap){var l=t.vertexBuffersMap[s];a.geometries[s].indexBuffer=l.indexBuffer,a.geometries[s].vertexBuffer=l.namedBuffers}return i.tileDisplayData=o,i.tileBufferData=a,i},e.bind=function(t,i){var r=new e;return r.tileDisplayData=t,r.tileBufferData=i,r},e.create=function(t,i){var o=new e;o.tileDisplayData=new n.default,o.tileDisplayData.displayObjects=t;for(var a=[0,0,0,0,0],s=[0,0,0,0,0],u=[[],[],[],[],[]],c=0,f=t;c<f.length;c++)for(var d=0,h=f[c].displayRecords;d<h.length;d++){var p=h[d];u[p.geometryType].push(p),a[p.geometryType]+=p.meshData.vertexCount,s[p.geometryType]+=p.meshData.indexData.length}for(var m=new r,v=function(e){return[e.fill||{},e.line||{},e.icon||{},e.text||{},e.label||{}]}(i),g=0;g<5;g++){var y=new Uint32Array(s[g]),b=_(v[g],a[g]);l.writeAllMeshDataToBuffers(u[g],b,y),m.geometries[g]={indexBuffer:y,vertexBuffer:b}}return o.tileBufferData=m,o},e._align=function(e,t){var i=e%t;return 0===i?e:e+(t-i)},e._computeVertexAlignment=function(e){for(var t=!1,i=!1,r=0,n=e;r<n.length;r++){var o=n[r];o%4==2?t=!0:o%4!=0&&(i=!0)}return i?4:t?2:1},e}();t.TileData=m}).apply(null,r))||(e.exports=n)},sbqO:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("ma1f"),i("qsST"),i("LxLY"),i("1E+e"),i("W9tT"),i("DIqE"),i("+6sX"),i("Jvs9"),i("Dos2"),i("QFi0")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u,c,f,d){Object.defineProperty(t,"__esModule",{value:!0});var h=n.getLogger("esri.views.2d.engine.webgl.Mesh2D"),p=function(e,t,i,r){for(var n=0,o=1;o<i;o++)n+=(e[2*(t+o)]-e[2*(t+o-1)])*(e[2*(t+o)+1]+e[2*(t+o-1)+1]);return r?n>0:n<0},_=function(e,t){for(var i=e.coords,r=e.lengths,n=[],o=0,s=0;o<r.length;s+=r[o],o+=1){for(var l=s,u=[];o<r.length-1&&p(i,s+r[o],r[o+1],t);s+=r[o+=1])u.push(s+r[o]-l);for(var c=i.slice(2*l,2*(s+r[o])),f=0,d=a.earcut(c,u,2);f<d.length;f++)n.push(d[f]+l)}return n},m=function(){function e(e,t,i,r){void 0===r&&(r=!1),this._cache={},this.vertices=e,this.indices=t,this.primitiveType=i,this.isMapSpace=r}return e.fromRect=function(t){var i=t.x,r=t.y;return e.fromScreenExtent({xmin:i,ymin:r,xmax:i+t.width,ymax:r+t.height})},e.fromPath=function(t){for(var i=u.convertFromNestedArray(new c.default,t.path,!1,!1),r=i.coords,n=new Uint32Array(_(i,!0)),o=new Uint32Array(r.length/2),a=0;a<o.length;a++)o[a]=f.i1616to32(Math.floor(r[2*a]),Math.floor(r[2*a+1]));return new e({geometry:o},n,4)},e.fromGeometry=function(t,i){var n=i.geometry.type;switch(n){case"polygon":return e.fromPolygon(t,i.geometry);case"extent":return e.fromMapExtent(t,i.geometry);default:return h.error(new r("mapview-bad-type","Unable to create a mesh from type "+n,i)),e.fromRect({x:0,y:0,width:1,height:1})}},e.fromPolygon=function(t,i){for(var r=u.convertFromPolygon(new c.default,i,!1,!1),n=r.coords,o=new Uint32Array(_(r,!1)),a=new Uint32Array(n.length/2),d=l.vec2f64.create(),h=l.vec2f64.create(),p=0;p<a.length;p++)s.vec2.set(d,n[2*p],n[2*p+1]),t.toScreen(h,d),a[p]=f.i1616to32(Math.floor(h[0]),Math.floor(h[1]));return new e({geometry:a},o,4,!0)},e.fromScreenExtent=function(t){var i=t.xmin,r=t.xmax,n=t.ymin,o=t.ymax;return new e({geometry:new Uint32Array([f.i1616to32(i,n),f.i1616to32(r,n),f.i1616to32(i,o),f.i1616to32(i,o),f.i1616to32(r,n),f.i1616to32(r,o)])},new Uint32Array([0,1,2,3,4,5]),4)},e.fromMapExtent=function(t,i){var r=t.toScreen([0,0],[i.xmin,i.ymin]),n=r[0],o=r[1],a=t.toScreen([0,0],[i.xmax,i.ymax]),s=a[0],l=a[1];return new e({geometry:new Uint32Array([f.i1616to32(n,o),f.i1616to32(s,o),f.i1616to32(n,l),f.i1616to32(n,l),f.i1616to32(s,o),f.i1616to32(s,l)])},new Uint32Array([0,1,2,3,4,5]),4)},e.prototype.destroy=function(){for(var e in o.isSome(this._cache.indexBuffer)&&this._cache.indexBuffer.dispose(),this._cache.vertexBuffers)o.isSome(this._cache.vertexBuffers[e])&&this._cache.vertexBuffers[e].dispose()},Object.defineProperty(e.prototype,"elementType",{get:function(){return function(e){switch(e.BYTES_PER_ELEMENT){case 1:return 5121;case 2:return 5123;case 4:return 5125;default:throw new r("Cannot get DataType of array")}}(this.indices)},enumerable:!0,configurable:!0}),e.prototype.getIndexBuffer=function(e,t){return void 0===t&&(t=35044),this._cache.indexBuffer||(this._cache.indexBuffer=d.createIndex(e,t,this.indices)),this._cache.indexBuffer},e.prototype.getVertexBuffers=function(e,t){var r=this;return void 0===t&&(t=35044),this._cache.vertexBuffers||(this._cache.vertexBuffers=Object.keys(this.vertices).reduce((function(n,o){var a;return i.__assign(i.__assign({},n),((a={})[o]=d.createVertex(e,t,r.vertices[o]),a))}),{})),this._cache.vertexBuffers},e}();t.default=m}).apply(null,r))||(e.exports=n)},t1uL:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("jBNx"),i("B+Jm"),i("4F/P"),i("m87x"),i("IWfl"),i("MzWl"),i("2Gaw")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u){Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(t,i,o,s,l,u,c,f,d,h,p,_,m,v,g,y,b,x,w){void 0===w&&(w=!1);var T=e.call(this)||this;T._xOffset=r.pt2px(_),T._yOffset=r.pt2px(m),T._decoration=d||"none",T._color=s,T._haloColor=l,T._haloSize=Math.min(Math.floor(5*r.pt2px(r.toPt(o))),127),T._size=Math.min(Math.round(r.pt2px(i)),127);var S=Math.min(Math.round(r.pt2px(i)),127);T._referenceSize=Math.round(Math.sqrt(256*S)),T._scale=T._size/24,T._angle=p,T._justify=n.getJustification(u||"center"),T._xAlignD=n.getXAnchorDirection(u||"center"),T._yAlignD=n.getYAnchorDirection(c||"baseline"),T._baseline="baseline"===(c||"baseline"),T._bitset=(1===f?1:0)|(h?1:0)<<1;var C=a.MaterialKeyBase.load(a.createMaterialKey(T.geometryType,t,!1));return C.sdf=!0,T._materialKey=C.data,T.symbolId=v,T._lineWidth=r.pt2px(g)||512,T._lineHeight=y||1,T._textPlacement=b,T.effects=x,T._isCIM=w,T}return i.__extends(t,e),t.fromText=function(e,i,r){var n=new t(e,i.font.size,i.haloSize||0,i.color&&o.premultiplyAlphaRGBA(i.color)||0,i.haloColor&&o.premultiplyAlphaRGBA(i.haloColor)||0,i.horizontalAlignment,i.verticalAlignment,0,i.font.decoration,!1,i.angle||0,i.xoffset,i.yoffset,i.id,i.lineWidth,i.lineHeight,null,null,!1),a=u.bidiText(i.text)[1];return n.bindTextInfo(r,a),n},t.fromCIMText=function(e,i,r){var n=i.scaleFactor||1,a=new t(e,i.size*i.sizeRatio*n,i.outlineSize*i.sizeRatio,o.premultiplyAlphaRGBA(i.color),o.premultiplyAlphaRGBA(i.outlineColor),i.horizontalAlignment,i.verticalAlignment,i.alignment,i.decoration,i.colorLocked,i.angle,i.offsetX*i.sizeRatio*n,i.offsetY*i.sizeRatio*n,i.materialHash,512,1,i.markerPlacement,i.effects,!0),s=u.bidiText(i.text)[1];return a.bindTextInfo(r,s),a},t}(s.default(l.default));t.default=c}).apply(null,r))||(e.exports=n)},tTR7:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("Dikz"),i("azm3"),i("flWe")],void 0===(n=(function(e,t,i,r,n){function o(e){for(var t=[[],[],[],[],[]],i=0,r=e;i<r.length;i++)for(var n=0,o=r[i].displayRecords;n<o.length;n++){var a=o[n];t[a.geometryType].push(a)}return t}Object.defineProperty(t,"__esModule",{value:!0}),t.groupRecordsByGeometryType=o;var a=function(){function e(){}return Object.defineProperty(e.prototype,"displayObjectRegistry",{get:function(){if(!this._displayObjectRegistry){this._displayObjectRegistry=new Map;for(var e=0,t=this.displayObjects;e<t.length;e++){var i=t[e];this._displayObjectRegistry.set(i.id,i)}}return this._displayObjectRegistry},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"displayList",{get:function(){return this._displayList},enumerable:!0,configurable:!0}),e.prototype.computeDisplayList=function(e){if(this._displayList=new i(e),e)for(var t=0,r=this.displayObjects;t<r.length;t++)for(var n=0,a=r[t].displayRecords;n<a.length;n++)this._displayList.addToList(a[n]);else for(var s=o(this.displayObjects),l=s.length,u=0;u<l;++u)this._displayList.addToList(s[u])},e.prototype.clone=function(){var t=new e;return this.displayObjects&&(t.displayObjects=this.displayObjects.map((function(e){return e.clone()}))),t},e.prototype.serialize=function(e){return n.serializeList(e,this.displayObjects),e},e.prototype._deserializeObjects=function(e){for(var t=e.readInt32(),i=new Array(t),n=new Map,o=0;o<i.length;++o){var a=r.deserialize(e);i[o]=a,n.set(a.id,a)}this.displayObjects=i,this._displayList=null,this._displayObjectRegistry=n},e.deserialize=function(t){var i=new e;return i._deserializeObjects(t),i},e}();t.default=a}).apply(null,r))||(e.exports=n)},v3M4:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("qsST"),i("lnyn")],void 0===(n=(function(e,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var n=i.getLogger("esri.views.2d.engine.webgl.mesh.templates.Tesselator"),o=function(){function e(){this._currentVertexIndex=0,this._indexCounter=0,this._triangleIndices=[-1,-1,-1],this.glu=new r.GluTesselator,this.glu.gluTessCallback(r.gluEnum.GLU_TESS_BEGIN,this._begincallback.bind(this)),this.glu.gluTessCallback(r.gluEnum.GLU_TESS_VERTEX_DATA,this._vertexCallback.bind(this)),this.glu.gluTessCallback(r.gluEnum.GLU_TESS_END,this._endcallback.bind(this)),this.glu.gluTessCallback(r.gluEnum.GLU_TESS_COMBINE,this._combinecallback.bind(this)),this.glu.gluTessCallback(r.gluEnum.GLU_TESS_ERROR,this._errorcallback.bind(this)),this.glu.gluTessCallback(r.gluEnum.GLU_TESS_EDGE_FLAG,this._edgeCallback.bind(this)),this.glu.gluTessProperty(r.gluEnum.GLU_TESS_WINDING_RULE,r.windingRule.GLU_TESS_WINDING_ODD)}return e.prototype.beginPolygon=function(e,t){this._triangleIndices[0]=-1,this._triangleIndices[1]=-1,this._triangleIndices[2]=-1,this._currentVertexIndex=0,this._indexCounter=0,this.glu.gluTessBeginPolygon(e),this._indices=t},e.prototype.endPolygon=function(){this.glu.gluTessEndPolygon()},e.prototype.beginContour=function(){this.glu.gluTessBeginContour()},e.prototype.endContour=function(){this.glu.gluTessEndContour()},e.prototype.addVertex=function(e,t){this.glu.gluTessVertex(e,t)},e.prototype._vertexCallback=function(e,t){if(t[t.length]=e[0],t[t.length]=e[1],this._triangleIndices[this._currentVertexIndex]=-1,this._currentVertexIndex>=2){for(var i=0;i<3;i++)-1===this._triangleIndices[i]&&(this._triangleIndices[i]=this._indexCounter++),this._indices[this._indices.length]=this._triangleIndices[i];this._currentVertexIndex=0}else this._currentVertexIndex++},e.prototype._begincallback=function(){this._triangleIndices[0]=-1,this._triangleIndices[1]=-1,this._triangleIndices[2]=-1,this._currentVertexIndex=0},e.prototype._endcallback=function(){this._currentVertexIndex=0},e.prototype._errorcallback=function(e){n.error("Encountered error during tesselation: "+e)},e.prototype._combinecallback=function(e){return[e[0],e[1],e[2]]},e.prototype._edgeCallback=function(){},e}();t.default=o}).apply(null,r))||(e.exports=n)},vsbv:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("aMdW"),i("Zx0K"),i("W9tT"),i("ab6c"),i("YaB4"),i("B+Jm"),i("Dos2"),i("x84Q")],void 0===(n=(function(e,t,i,r,n,o,a,s,l,u){Object.defineProperty(t,"__esModule",{value:!0});var c=Math.PI/180,f=function(){function e(e,t,i,n){this._rotationT=r.mat2df32.create(),this._xBounds=0,this._yBounds=0,this.minZoom=0,this.maxZoom=255;var o=i.rect,a=new Float32Array(8);t*=n;var s=i.code?o.width*n:i.metrics.width,l=i.code?o.height*n:i.metrics.height;a[0]=e*=n,a[1]=t,a[2]=e+s,a[3]=t,a[4]=e,a[5]=t+l,a[6]=e+s,a[7]=t+l,this._data=a,this._setTextureCoords(o),this._scale=n,this._mosaic=i,this.x=e,this.y=t}return Object.defineProperty(e.prototype,"width",{get:function(){return this._mosaic.metrics.width*this._scale},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mosaic",{get:function(){return this._mosaic},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,i.mat2d.identity(this._rotationT),i.mat2d.rotate(this._rotationT,this._rotationT,-e),this._setOffsets(this._data)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"xTopLeft",{get:function(){return this._data[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yTopLeft",{get:function(){return this._data[1]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"xBottomRight",{get:function(){return this._data[6]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yBottomRight",{get:function(){return this._data[7]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"texcoords",{get:function(){return this._texcoords},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textureBinding",{get:function(){return this._mosaic.textureBinding},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"offsets",{get:function(){return this._offsets||this._setOffsets(this._data),this._offsets},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"char",{get:function(){return String.fromCharCode(this._mosaic.code)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"code",{get:function(){return this._mosaic.code},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bounds",{get:function(){var e=this._mosaic.metrics,t=e.width*this._scale,n=Math.abs(e.height)*this._scale,o=new Float32Array(8);o[0]=this.x,o[1]=this.y,o[2]=this.x+t,o[3]=this.y,o[4]=this.x,o[5]=this.y+n,o[6]=this.x+t,o[7]=this.y+n;var a=i.mat2d.multiply(r.mat2df32.create(),this._rotationT,this._T);r.mat2df32.transformMany(o,o,a);for(var s=1/0,l=1/0,c=0,f=0,d=0;d<4;d++){var h=o[2*d],p=o[2*d+1];s=Math.min(s,h),l=Math.min(l,p),c=Math.max(c,h),f=Math.max(f,p)}var _=c-s,m=f-l;return new u.default(s+_/2,l+m/2,_,m)},enumerable:!0,configurable:!0}),e.prototype.setTransform=function(e){this._T=e,this._offsets=null},e.prototype._setOffsets=function(e){this._offsets||(this._offsets={upperLeft:0,upperRight:0,lowerLeft:0,lowerRight:0});var t=this._offsets,n=new Float32Array(8),o=i.mat2d.multiply(r.mat2df32.create(),this._rotationT,this._T);r.mat2df32.transformMany(n,e,o),t.upperLeft=l.i1616to32(8*n[0],8*n[1]),t.upperRight=l.i1616to32(8*n[2],8*n[3]),t.lowerLeft=l.i1616to32(8*n[4],8*n[5]),t.lowerRight=l.i1616to32(8*n[6],8*n[7])},e.prototype._setTextureCoords=function(e){var t=e.x,i=e.y,r=e.width,n=e.height;this._texcoords={upperLeft:l.i1616to32(t,i),upperRight:l.i1616to32(t+r,i),lowerLeft:l.i1616to32(t,i+n),lowerRight:l.i1616to32(t+r,i+n)}},e}();t.ShapedGlyph=f;var d=function(e,t){return{code:0,page:0,sdf:!0,rect:new a.Rect(0,0,11,8),textureBinding:t,metrics:{advance:0,height:4,width:e,left:0,top:0}}},h=function(){function e(e,t,i){this._rotation=0,this._decorate(e,t,i),this.glyphs=e,this.bounds=this._createBounds(e),this.isMultiline=t.length>1,this._hasRotation=0!==i.angle,this._T=this._createGlyphTransform(this.bounds,i);for(var r=0,n=e;r<n.length;r++)n[r].setTransform(this._T)}return e.prototype.setRotation=function(e){if(0!==e||0!==this._rotation){this._rotation=e;var t=this._T;i.mat2d.rotate(t,t,e);for(var r=0,n=this.glyphs;r<n.length;r++)n[r].setTransform(this._T)}},e.prototype._decorate=function(e,t,i){if(i.decoration&&"none"!==i.decoration&&e.length)for(var r=i.scale,n="underline"===i.decoration?30:20,o=e[0].textureBinding,a=0,s=t;a<s.length;a++){var l=s[a];e.push(new f(l.startX*r,l.startY*r+n*r,d((l.width+l.glyphWidthEnd)*r,o),1))}},Object.defineProperty(e.prototype,"boundsT",{get:function(){var e=this.bounds,t=n.vec2.set(o.vec2f32.create(),e.x,e.y);if(n.vec2.transformMat2d(t,t,this._T),this._hasRotation){var i=Math.max(e.width,e.height);return new u.default(t[0],t[1],i,i)}return new u.default(t[0],t[1],e.width,e.height)},enumerable:!0,configurable:!0}),e.prototype._createBounds=function(e){for(var t=1/0,i=1/0,r=0,n=0,o=0,a=e;o<a.length;o++){var s=a[o];t=Math.min(t,s.xTopLeft),i=Math.min(i,s.yTopLeft),r=Math.max(r,s.xTopLeft+s.width),n=Math.max(n,s.yBottomRight)}var l=r-t,c=n-i;return new u.default(t+l/2,i+c/2,l,c)},e.prototype._createGlyphTransform=function(e,t){var a=c*t.angle,s=r.mat2df32.create(),l=o.vec2f32.create();return i.mat2d.translate(s,s,n.vec2.set(l,t.xOffset,-t.yOffset)),t.isCIM?i.mat2d.rotate(s,s,a):(i.mat2d.translate(s,s,n.vec2.set(l,e.x,e.y)),i.mat2d.rotate(s,s,a),i.mat2d.translate(s,s,n.vec2.set(l,-e.x,-e.y))),s},e}();t.ShapingInfo=h;var p=function(e,t,i,r,n,o){this.glyphWidthEnd=0,this.startX=0,this.startY=0,this.start=Math.max(0,Math.min(t,i)),this.end=Math.max(0,Math.max(t,i)),this.end<e.length&&(this.glyphWidthEnd=e[this.end].metrics.width),this.width=r,this.yMin=n,this.yMax=o},_=function(e){return 10===e},m=function(e){return 32===e};t.shapeGlyphs=function(e,t,i){for(var r=i.scale,n=new Array,o=function(e,t,i){for(var r=new Array,n=i.maxLineWidth*(1/i.scale),o=t?e.length-1:0,a=t?-1:e.length,s=t?-1:1,l=o,u=0,c=0,f=l,d=f,h=0,v=1/0,g=0;l!==a;){var y=e[l],b=y.code,x=y.metrics,w=Math.abs(x.top);_(b)||m(b)||(v=Math.min(v,w),g=Math.max(g,w+x.height)),_(b)?(l!==o&&(r.push(new p(e,f,l-s,u,v,g)),v=1/0,g=0),u=0,f=l+s,d=l+s,c=0):m(b)?(d=l+s,c=0,h=x.advance,u+=x.advance):u>n?(d!==f?(r.push(new p(e,f,d-2*s,(u-=h)-c,v,g)),v=1/0,g=0,f=d,u=c):(r.push(new p(e,f,l-s,u,v,g)),v=1/0,g=0,f=l,d=l,u=0),u+=x.advance,c+=x.advance):(u+=x.advance,c+=x.advance),l+=s}var T=new p(e,f,l-s,u,v,g);return T.start>=0&&T.end<e.length&&r.push(T),r}(e,t,i),a=function(e,t){for(var i=0,r=0;r<e.length;r++)i=Math.max(e[r].width,i);var n=e[0].yMin;return{x:0,y:n,height:e[e.length-1].yMax+t.lineHeight*(e.length-1)+("underline"===t.decoration?4:0)-n,width:i}}(o,i),l=i.vAlign,u=i.hAlign,c=l===s.VAlign.Baseline?1:0,d=(1-c)*-a.y+a.height/2*(c?0:l-1)+-26*(c?1:0),v=0;v<o.length;v++){var g=o[v],y=g.start,b=g.end,x=-1*(u+1)*(g.width/2)-3,w=v*i.lineHeight+d-3;o[v].startX=x,o[v].startY=w;for(var T=y;T<=b;T++){var S=e[T];if(!_(S.code)){var C=new f(x+S.metrics.left,w-S.metrics.top,S,r);x+=S.metrics.advance,n.push(C)}}}return new h(n,o,i)}}).apply(null,r))||(e.exports=n)},wUCb:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("JNkf"),i("/U66"),i("66cO"),i("p2sx")],void 0===(n=(function(e,t,i,r,n,o,a){Object.defineProperty(t,"__esModule",{value:!0}),t.sortByLevel=function(e,t){return e.key.level-t.key.level!=0?e.key.level-t.key.level:e.key.row-t.key.row!=0?e.key.row-t.key.row:e.key.col-t.key.col};var s=function(e){function n(t){var i=e.call(this)||this;return i._tileInfoView=t,i}return i.__extends(n,e),n.prototype.renderChildren=function(i){this.sortChildren(t.sortByLevel),this.setStencilReference(),e.prototype.renderChildren.call(this,i)},n.prototype.createRenderParams=function(t){var r=t.state;return i.__assign(i.__assign({},e.prototype.createRenderParams.call(this,t)),{requiredLevel:this._tileInfoView.getClosestInfoForScale(r.scale).level,displayLevel:this._tileInfoView.tileInfo.scaleToZoom(r.scale)})},n.prototype.prepareRenderPasses=function(t){var n=this,s=t.registerRenderPass({name:"stencil",brushes:[a.default],drawPhase:r.WGLDrawPhase.DEBUG|r.WGLDrawPhase.MAP,target:function(){return n.children}}),l=t.registerRenderPass({name:"tileInfo",brushes:[o.default],drawPhase:r.WGLDrawPhase.DEBUG,target:function(){return n.children},has:"esri-tiles-debug"});return i.__spreadArrays(e.prototype.prepareRenderPasses.call(this,t),[s,l])},n.prototype.updateTransforms=function(e){for(var t=0,i=this.children;t<i.length;t++){var r=i[t],n=this._tileInfoView.getTileResolution(r.key);r.setTransform(e,n)}},n.prototype.setStencilReference=function(){for(var e=1,t=0,i=this.children;t<i.length;t++)i[t].stencilRef=e++},n}(n.default);t.default=s}).apply(null,r))||(e.exports=n)},"wdp+":function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("DJpR"),i("hPTP")],void 0===(n=(function(e,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){var t="";t+=e[0].toUpperCase();for(var i=1;i<e.length;i++){var r=e[i];r===r.toUpperCase()?(t+="_",t+=r):t+=r.toUpperCase()}return t},o=function(e){var t={};for(var r in e)t[n(r)]=e[r];return i.glslifyDefineMap(t)};t.createProgramTemplate=function(e,t){var i=e+e.substring(e.lastIndexOf("/"));return{name:name,attributes:t,shaders:function(e){return{vertexShader:o(e)+r.resolveIncludes(i+".vert"),fragmentShader:o(e)+r.resolveIncludes(i+".frag")}}}}}).apply(null,r))||(e.exports=n)},x84Q:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("xoE+"),i("ab6c")],void 0===(n=(function(e,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,i,n){this.center=r.vec2f32.fromValues(e,t),this.centerT=r.vec2f32.create(),this.halfWidth=i/2,this.halfHeight=n/2,this.width=i,this.height=n}return Object.defineProperty(e.prototype,"x",{get:function(){return this.center[0]},set:function(e){this.center[0]=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.center[1]},set:function(e){this.center[1]=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blX",{get:function(){return this.center[0]+this.halfWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blY",{get:function(){return this.center[1]+this.halfHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trX",{get:function(){return this.center[0]-this.halfWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trY",{get:function(){return this.center[1]-this.halfHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"xmin",{get:function(){return this.x-this.halfWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"xmax",{get:function(){return this.x+this.halfWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ymin",{get:function(){return this.y-this.halfHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ymax",{get:function(){return this.y+this.halfHeight},enumerable:!0,configurable:!0}),e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.serialize=function(e){return e.writeF32(this.center[0]),e.writeF32(this.center[1]),e.push(this.width),e.push(this.height),e},e.prototype.findCollisionDelta=function(e,t){void 0===t&&(t=4);var r=Math.abs(e.centerT[0]-this.centerT[0]),n=Math.abs(e.centerT[1]-this.centerT[1]),o=Math.min((e.halfWidth+this.halfWidth+t)/r,(e.halfHeight+this.halfHeight+t)/n);return i.log2(o)},e.prototype.extend=function(e){var t=Math.min(this.xmin,e.xmin),i=Math.min(this.ymin,e.ymin),r=Math.max(this.xmax,e.xmax)-t,n=Math.max(this.ymax,e.ymax)-i,o=t+r/2,a=i+n/2;this.width=r,this.height=n,this.halfWidth=r/2,this.halfHeight=n/2,this.x=o,this.y=a},e.deserialize=function(t){return new e(t.readF32(),t.readF32(),t.readInt32(),t.readInt32())},e}();t.default=n}).apply(null,r))||(e.exports=n)},xxo4:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("DJpR"),i("apbF")],void 0===(n=(function(e,t,i,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.geometryMap=r.createGeometryData((function(){return{indexBuffer:i.BufferObject.createIndex(e,35044),vao:null}}),(function(t,n){return{vertexBuffer:i.BufferObject.createVertex(e,r.C_VBO_INFO[n])}}))}return e.prototype.dispose=function(){for(var e=0;e<5;e++){var t=this.geometryMap[e];if(t)for(var i in t.data.vao&&t.data.vao.dispose(!1),t.data.indexBuffer&&t.data.indexBuffer.dispose(),t.buffers)t.buffers[i]&&t.buffers[i].data.vertexBuffer.dispose()}},e.prototype.get=function(e){var t=this.geometryMap[e],i={};for(var r in t.buffers)i[r]=t.buffers[r].data.vertexBuffer;return{indexBuffer:t.data.indexBuffer,get vao(){return t.data.vao},set vao(e){t.data.vao=e},vertexBufferMap:i}},e.prototype.has=function(e){return null!=this.geometryMap[e]},e.prototype.upload=function(e,t){var i=this;t.forEach((function(t,r){i._upload(t,r,e)}))},e.prototype._upload=function(e,t,i){if(e.indices&&(e.indices.allDirty?this._uploadIndices(i,t):null!=e.indices.from&&null!=e.indices.count&&this._uploadIndices(i,t,e.indices.from,e.indices.count)),e.vertices){var r=e.vertices;for(var n in r){var o=r[n];o.allDirty?this._uploadVertices(i,t,n):null!=o.from&&null!=o.count&&this._uploadVertices(i,t,n,o.from,o.count)}}},e.prototype._uploadVertices=function(e,t,i,r,n){var o=this.geometryMap[t];if(o){var a=e.geometries[t].vertexBuffer[i];if(a){var s=a.stride,l=a.data.buffer;o.buffers[i]&&l.byteLength>0&&(null!=r&&null!=n?o.buffers[i].data.vertexBuffer.setSubData(l,r*s,r*s,(r+n)*s):o.buffers[i].data.vertexBuffer.setData(l))}}},e.prototype._uploadIndices=function(e,t,i,r){var n=this.geometryMap[t];if(n){var o=e.geometries[t].indexBuffer.buffer;n.data.indexBuffer&&o.byteLength>0&&(null!=i&&null!=r?n.data.indexBuffer.setSubData(o,4*i,4*i,4*(i+r)):n.data.indexBuffer.setData(o))}},e}();t.default=n}).apply(null,r))||(e.exports=n)},yVlQ:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("qsST"),i("qMld"),i("4DEr"),i("MzWl")],void 0===(n=(function(e,t,i,r,n,o,a){Object.defineProperty(t,"__esModule",{value:!0});var s=r.getLogger("esri.views.2d.engine.webgl.WGLDynamicMeshTemplate"),l=function(e){function t(t){var i=e.call(this)||this;return i._ongoingMaterialRequestMap=new Map,i._materialCache=new Map,i._dynamicPropertyMap=new Map,i._cimLayer=t,i}return i.__extends(t,e),t.prototype.analyze=function(e,t,i,r){var a=this,l=this._materialCache,u=this._cimLayer.materialHash;if(!u)return s.error("A Dynamic mesh template must have a material hash value or function!"),n.reject(null);var c="function"==typeof u?u(t,i,r):u;if(l.has(c)){var f=l.get(c);return n.resolve(f)}if(this._ongoingMaterialRequestMap.has(c))return this._ongoingMaterialRequestMap.get(c);var d=o.analyzeCIMResource(this._cimLayer.cim,this._cimLayer.materialOverrides);d.mosaicHash=c;var h=e.getMosaicItem(d,!1).then((function(e){return a._ongoingMaterialRequestMap.delete(c),l.set(c,e),e})).catch((function(e){return a._ongoingMaterialRequestMap.delete(c),s.error(".analyze()",e.message),null}));return this._ongoingMaterialRequestMap.set(c,h),h},t}(a.default);t.default=l}).apply(null,r))||(e.exports=n)},yai7:function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){return function(){function e(){this.vertexData=new Map,this.vertexCount=0,this.indexData=[]}return e.prototype.clear=function(){this.vertexData.clear(),this.vertexCount=0,this.indexData=[]},e.prototype.update=function(e,t,i){for(var r in e)this.vertexData.set(r,e[r]);for(var r in this.vertexData)null===e[r]&&this.vertexData.delete(r);this.vertexCount=t,this.indexData=i},e}()}).apply(null,r))||(e.exports=n)},zIqJ:function(e,t,i){var r,n;r=[i.dj.c(e.i),t],void 0===(n=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.size=0,this._start=0,this.maxSize=e,this._buffer=isFinite(e)?new Array(e):[]}return Object.defineProperty(e.prototype,"entries",{get:function(){return this._buffer},enumerable:!0,configurable:!0}),e.prototype.enqueue=function(e){if(this.size===this.maxSize){var t=this._buffer[this._start];return this._buffer[this._start]=e,this._start=(this._start+1)%this.maxSize,t}return isFinite(this.maxSize)?this._buffer[(this._start+this.size++)%this.maxSize]=e:this._buffer[this._start+this.size++]=e,null},e.prototype.dequeue=function(){if(0===this.size)return null;var e=this._buffer[this._start];return this._buffer[this._start]=null,this.size--,this._start=(this._start+1)%this.maxSize,e},e}();t.default=i}).apply(null,r))||(e.exports=n)},zbL2:function(e,t,i){var r,n;r=[i.dj.c(e.i),t,i("zOht"),i("ab6c"),i("j2SP"),i("DJpR"),i("tI6k"),i("JNkf"),i("VY6u"),i("Dos2"),i("3+7H")],n=(function(e,t,i,r,n,o,a,s,l,u,c){Object.defineProperty(t,"__esModule",{value:!0});var f=[1,1,1,1],d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._vertexAttributes={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:20,normalized:!1,divisor:0},{name:"a_vertexOffset",count:2,type:5122,offset:4,stride:20,normalized:!1,divisor:0},{name:"a_tex",count:4,type:5121,offset:8,stride:20,normalized:!1,divisor:0},{name:"a_levelInfo",count:4,type:5121,offset:12,stride:20,normalized:!1,divisor:0},{name:"a_visInfo",count:4,type:5121,offset:16,stride:20,normalized:!1,divisor:0}]},t._vertexAttributesDD={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:28,normalized:!1,divisor:0},{name:"a_vertexOffset",count:2,type:5122,offset:4,stride:28,normalized:!1,divisor:0},{name:"a_tex",count:4,type:5121,offset:8,stride:28,normalized:!1,divisor:0},{name:"a_levelInfo",count:4,type:5121,offset:12,stride:28,normalized:!1,divisor:0},{name:"a_visInfo",count:4,type:5121,offset:16,stride:28,normalized:!1,divisor:0},{name:"a_color",count:4,type:5121,offset:20,stride:28,normalized:!0,divisor:0},{name:"a_size",count:1,type:5126,offset:24,stride:28,normalized:!1,divisor:0}]},t._iconProgramOptions={id:!1,dd:!1,sdf:!1},t._sdfProgramOptions={id:!1,dd:!1},t._spritesTextureSize=r.vec2f32.create(),t._haloColor=n.vec4f32.create(),t._sdfColor=n.vec4f32.create(),t._color=n.vec4f32.create(),t}return i.__extends(t,e),t.prototype.dispose=function(){},t.prototype.drawMany=function(e,t){var i,r=e.drawPhase,n=e.styleLayerId,o=e.styleLayer,a=e.fadeRecorder.getFadeValues();r===s.WGLDrawPhase.HITTEST&&(i=u.u32to4Xu8(n+1)),this._drawIcons(e,o,t,a,i),this._drawText(e,o,t,a,i)},t.prototype._drawIcons=function(e,t,i,r,n){for(var o,u=this,c=e.context,d=e.displayLevel,h=e.drawPhase,p=e.painter,_=e.state,m=e.styleLayerId,v=!1,g=0,y=i;g<y.length;g++)if((U=y[g]).layerData[m]&&(o=U.layerData[m]).iconPerPageElementsMap.size>0){v=!0;break}if(v){var b=t.hasDataDrivenIconSize?1:t.getLayoutValue("icon-size",d),x=t.hasDataDrivenIconColor?f:t.getPaintValue("icon-color",d),w=t.hasDataDrivenIconOpacity?1:t.getPaintValue("icon-opacity",d),T=t.getPaintValue("icon-translate",d),S=t.getPaintValue("icon-translate-anchor",d),C=p.getVectorTileProgramCach(),L=x[3]*w;this._color[0]=L*x[0],this._color[1]=L*x[1],this._color[2]=L*x[2],this._color[3]=L;var O=t.getLayoutValue("icon-rotation-alignment",d);2===O&&(O=1===t.getLayoutValue("symbol-placement",d)?0:1);var M=o.isSDF,D=t.hasDataDrivenIcon,E=h===s.WGLDrawPhase.HITTEST,I=(E?1:0)<<2|(D?1:0)<<1|(M?1:0),P=this._iconProgramOptions;P.id=E,P.dd=D,P.sdf=M;var A=C.getProgram(4,I,P);if(c.bindProgram(A),M){var V=t.getPaintValue("icon-halo-color",d),R=t.getPaintValue("icon-halo-width",d);A.setUniform4f("u_outlineColor",V[0],V[1],V[2],V[3]),A.setUniform1f("u_outlineSize",R)}A.setUniformMatrix3fv("u_displayViewMat3",0===O?_.displayViewMat3:_.displayMat3),A.setUniformMatrix3fv("u_displayMat3",1===S?_.displayMat3:_.displayViewMat3),A.setUniform2fv("u_iconTranslation",T),A.setUniform1f("u_depth",t.z),A.setUniform1f("u_mapRotation",l.degToByte(_.rotation)),A.setUniform1f("u_keepUpright",0),A.setUniform1f("u_level",10*d),A.setUniform1f("u_fadeSpeed",10*r.fadeSpeed),A.setUniform1f("u_minfadeLevel",10*r.minfadeLevel),A.setUniform1f("u_maxfadeLevel",10*r.maxfadeLevel),A.setUniform1f("u_fadeChange",10*(d+r.fadeChange)),A.setUniform1i("u_texture",a.VTL_TEXTURE_BINDING_UNIT_SPRITES),A.setUniform1f("u_size",b),A.setUniform4fv("u_color",this._color),E&&A.setUniform4fv("u_id",n);for(var F=function(t){if(!t.layerData[m])return"continue";if(0===(o=t.layerData[m]).iconPerPageElementsMap.size)return"continue";var i=z._getIconVAO(c,t,D,C);if(!i)return"continue";c.bindVAO(i),A.setUniformMatrix3fv("u_dvsMat3",t.transforms.dvs),o.iconPerPageElementsMap.forEach((function(i,r){u._renderIconRange(e,A,i,r,t)}))},z=this,B=0,G=i;B<G.length;B++){var U;F(U=G[B])}}},t.prototype._renderIconRange=function(e,t,i,r,n){var o=e.context,s=e.hasClipping,l=e.requiredLevel,u=e.spriteMosaic;this._spritesTextureSize[0]=u.getWidth(r)/4,this._spritesTextureSize[1]=u.getHeight(r)/4,t.setUniform2fv("u_mosaicSize",this._spritesTextureSize),u.bind(o,9729,r,a.VTL_TEXTURE_BINDING_UNIT_SPRITES);var c=!0;l!==n.key.level||s?o.setStencilFunction(514,n.stencilRef,255):c=!1,o.setStencilTestEnabled(c),o.drawElements(4,i[1],5125,12*i[0]),n.triangleCount+=i[1]/3},t.prototype._drawText=function(e,t,i,n,o){for(var u,c=this,d=e.context,h=e.displayLevel,p=e.drawPhase,_=e.glyphMosaic,m=e.hasClipping,v=e.painter,g=e.pixelRatio,y=e.requiredLevel,b=e.state,x=e.styleLayerId,w=!1,T=0,S=i;T<S.length;T++)if((K=S[T]).layerData[x]&&(u=K.layerData[x]).glyphPerPageElementsMap.size>0){w=!0;break}if(w){var C=t.getLayoutValue("text-rotation-alignment",h);2===C&&(C=1===t.getLayoutValue("symbol-placement",h)?0:1);var L=0===C,O=t.getLayoutValue("text-keep-upright",h)&&L,M=p===s.WGLDrawPhase.HITTEST,D=.8*3/g,E=t.hasDataDrivenTextSize?1:t.getLayoutValue("text-size",h),I=t.hasDataDrivenTextColor?f:t.getPaintValue("text-color",h),P=t.hasDataDrivenTextOpacity?1:t.getPaintValue("text-opacity",h),A=t.getPaintValue("text-halo-color",h),V=t.getPaintValue("text-halo-width",h),R=3*t.getPaintValue("text-halo-blur",h),F=3*V,z=v.getVectorTileProgramCach(),B=I[3]*P;this._sdfColor[0]=B*I[0],this._sdfColor[1]=B*I[1],this._sdfColor[2]=B*I[2],this._sdfColor[3]=B;var G=A[3]*P;this._haloColor[0]=G*A[0],this._haloColor[1]=G*A[1],this._haloColor[2]=G*A[2],this._haloColor[3]=G,this._glyphTextureSize||(this._glyphTextureSize=r.vec2f32.fromValues(_.width/4,_.height/4));var U=t.getPaintValue("text-translate",h),N=t.getPaintValue("text-translate-anchor",h),k=t.hasDataDrivenText,j=(M?1:0)<<1|(k?1:0),W=this._sdfProgramOptions;W.id=M,W.dd=k;var H=z.getProgram(6,j,W);d.bindProgram(H),H.setUniformMatrix3fv("u_displayViewMat3",0===C?b.displayViewMat3:b.displayMat3),H.setUniformMatrix3fv("u_displayMat3",1===N?b.displayMat3:b.displayViewMat3),H.setUniform2fv("u_textTranslation",U),H.setUniform1f("u_depth",t.z+1/65536),H.setUniform2fv("u_mosaicSize",this._glyphTextureSize),H.setUniform1f("u_mapRotation",l.degToByte(b.rotation)),H.setUniform1f("u_keepUpright",O?1:0),H.setUniform1f("u_level",10*h),H.setUniform1f("u_fadeSpeed",10*n.fadeSpeed),H.setUniform1f("u_minfadeLevel",10*n.minfadeLevel),H.setUniform1f("u_maxfadeLevel",10*n.maxfadeLevel),H.setUniform1f("u_fadeChange",10*(h+n.fadeChange)),H.setUniform1i("u_texture",a.VTL_TEXTURE_BINDING_UNIT_GLYPHS),H.setUniform1f("u_size",E),H.setUniform1f("u_antialiasingWidth",D),M&&H.setUniform4fv("u_id",o);for(var q=function(e){if(!e.layerData[x])return"continue";if(0===(u=e.layerData[x]).glyphPerPageElementsMap.size)return"continue";var t=X._getSDFVAO(d,e,k,z);if(!t)return"continue";d.bindVAO(t),H.setUniformMatrix3fv("u_dvsMat3",e.transforms.dvs);var i=!0;y!==e.key.level||m?d.setStencilFunction(514,e.stencilRef,255):i=!1,d.setStencilTestEnabled(i),u.glyphPerPageElementsMap.forEach((function(t,i){c._renderGlyphRange(d,t,i,_,H,A[3],V,R,F,e)}))},X=this,Z=0,Y=i;Z<Y.length;Z++){var K;q(K=Y[Z])}}},t.prototype._renderGlyphRange=function(e,t,i,r,n,o,s,l,u,c){r.bind(e,9729,i,a.VTL_TEXTURE_BINDING_UNIT_GLYPHS),o>0&&s>0&&(n.setUniform4fv("u_color",this._haloColor),n.setUniform1f("u_halo",1),n.setUniform1f("u_edgeDistance",u),n.setUniform1f("u_edgeBlur",l),e.drawElements(4,t[1],5125,12*t[0]),c.triangleCount+=t[1]/3),this._sdfColor[3]>0&&(n.setUniform4fv("u_color",this._sdfColor),n.setUniform1f("u_halo",0),n.setUniform1f("u_edgeDistance",0),n.setUniform1f("u_edgeBlur",0),e.drawElements(4,t[1],5125,12*t[0]),c.triangleCount+=t[1]/3)},t.prototype._getIconVAO=function(e,t,i,r){if(i){if(t.iconDDVertexArrayObject)return t.iconDDVertexArrayObject;var n=t.iconDDVertexBuffer,a=t.iconIndexBuffer;return n&&a?(t.iconDDVertexArrayObject=new o.VertexArrayObject(e,r.getProgramAttributes(4),this._vertexAttributesDD,{geometry:n},a),t.iconDDVertexArrayObject):null}if(t.iconVertexArrayObject)return t.iconVertexArrayObject;var s=t.iconVertexBuffer,l=t.iconIndexBuffer;return s&&l?(t.iconVertexArrayObject=new o.VertexArrayObject(e,r.getProgramAttributes(4),this._vertexAttributes,{geometry:s},l),t.iconVertexArrayObject):null},t.prototype._getSDFVAO=function(e,t,i,r){if(i){if(t.textDDVertexArrayObject)return t.textDDVertexArrayObject;var n=t.textDDVertexBuffer,a=t.textIndexBuffer;return n&&a?(t.textDDVertexArrayObject=new o.VertexArrayObject(e,r.getProgramAttributes(6),this._vertexAttributesDD,{geometry:n},a),t.textDDVertexArrayObject):null}if(t.textVertexArrayObject)return t.textVertexArrayObject;var s=t.textVertexBuffer,l=t.textIndexBuffer;return s&&l?(t.textVertexArrayObject=new o.VertexArrayObject(e,r.getProgramAttributes(6),this._vertexAttributes,{geometry:s},l),t.textVertexArrayObject):null},t}(c.default);t.WGLBrushVTLSymbol=d}).apply(null,r),void 0===n||(e.exports=n)}}]);