(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4efe1192"],{"18c6":function(e,t,i){"use strict";i.d(t,"a",(function(){return A})),i.d(t,"b",(function(){return N})),i.d(t,"c",(function(){return E})),i.d(t,"d",(function(){return M})),i.d(t,"e",(function(){return I})),i.d(t,"f",(function(){return D})),i.d(t,"g",(function(){return C}));var n=i("ce50"),r=i("32dd"),o=i("c84e");function s(e,t){const i=o["e"].SIZE_FIELD_STOPS|o["e"].SIZE_MINMAX_VALUE|o["e"].SIZE_SCALE_STOPS|o["e"].SIZE_UNIT_VALUE,n=(e&(o["f"].FIELD_TARGETS_OUTLINE|o["f"].MINMAX_TARGETS_OUTLINE|o["f"].SCALE_TARGETS_OUTLINE|o["f"].UNIT_TARGETS_OUTLINE))>>>4;return t.isOutline||t.isOutlinedFill?i&n:i&~n}const a=0,l=8,c=7,u=8,d=11,h=11,f=12,_=13,p=14,m=15,g=15,v=16,y=17,S=18,b=19,w=20,T=21,x=22;function C(e,t){switch(e){case o["d"].FILL:return A.from(t);case o["d"].LINE:return E.from(t);case o["d"].MARKER:return M.from(t);case o["d"].TEXT:return D.from(t);case o["d"].LABEL:return N.from(t);default:throw new Error("Unable to createMaterialKey for unknown geometryType "+e)}}class I{constructor(e){this._data=0,this._data=e}static load(e){const t=this.shared;return t.data=e,t}set data(e){this._data=e}get data(){return this._data}get geometryType(){return this.bits(u,d)}set geometryType(e){this.setBits(e,u,d)}get mapAligned(){return!!this.bit(w)}set mapAligned(e){this.setBit(w,e)}get sdf(){return!!this.bit(h)}set sdf(e){this.setBit(h,e)}get pattern(){return!!this.bit(f)}set pattern(e){this.setBit(f,e)}get textureBinding(){return this.bits(a,l)}set textureBinding(e){this.setBits(e,a,l)}get geometryTypeString(){switch(this.geometryType){case o["d"].FILL:return"fill";case o["d"].MARKER:return"marker";case o["d"].LINE:return"line";case o["d"].TEXT:return"text";case o["d"].LABEL:return"label";default:throw new n["a"]("Unable to handle unknown geometryType: "+this.geometryType)}}setBit(e,t){const i=1<>e}setBits(e,t,i){for(let n=t,r=0;nclass extends e{get vvSizeMinMaxValue(){return 0!==this.bit(v)}set vvSizeMinMaxValue(e){this.setBit(v,e)}get vvSizeScaleStops(){return 0!==this.bit(y)}set vvSizeScaleStops(e){this.setBit(y,e)}get vvSizeFieldStops(){return 0!==this.bit(S)}set vvSizeFieldStops(e){this.setBit(S,e)}get vvSizeUnitValue(){return 0!==this.bit(b)}set vvSizeUnitValue(e){this.setBit(b,e)}hasVV(){return super.hasVV()||this.vvSizeMinMaxValue||this.vvSizeScaleStops||this.vvSizeFieldStops||this.vvSizeUnitValue}setVV(e,t){super.setVV(e,t);const i=s(e,t)&e;this.vvSizeMinMaxValue=!!(i&o["e"].SIZE_MINMAX_VALUE),this.vvSizeFieldStops=!!(i&o["e"].SIZE_FIELD_STOPS),this.vvSizeUnitValue=!!(i&o["e"].SIZE_UNIT_VALUE),this.vvSizeScaleStops=!!(i&o["e"].SIZE_SCALE_STOPS)}},P=e=>class extends e{get vvRotation(){return 0!==this.bit(m)}set vvRotation(e){this.setBit(m,e)}hasVV(){return super.hasVV()||this.vvRotation}setVV(e,t){super.setVV(e,t),this.vvRotation=!t.isOutline&&!!(e&o["e"].ROTATION)}},L=e=>class extends e{get vvColor(){return 0!==this.bit(_)}set vvColor(e){this.setBit(_,e)}hasVV(){return super.hasVV()||this.vvColor}setVV(e,t){super.setVV(e,t),this.vvColor=!t.isOutline&&!!(e&o["e"].COLOR)}},O=e=>class extends e{get vvOpacity(){return 0!==this.bit(p)}set vvOpacity(e){this.setBit(p,e)}hasVV(){return super.hasVV()||this.vvOpacity}setVV(e,t){super.setVV(e,t),this.vvOpacity=!t.isOutline&&!!(e&o["e"].OPACITY)}};class A extends(L(O(R(I)))){static load(e){const t=this.shared;return t.data=e,t}static from(e){const t=this.load(0);return t.geometryType=o["d"].FILL,t.dotDensity="dot-density"===e.stride.fill,t.simple="simple"===e.stride.fill,t.outlinedFill=e.isOutlinedFill,t.dotDensity||t.setVV(e.vvFlags,e),t.data}getVariation(){return{...super.getVariation(),dotDensity:this.dotDensity,outlinedFill:this.outlinedFill,simple:this.simple,vvColor:this.vvColor,vvOpacity:this.vvOpacity,vvSizeFieldStops:this.vvSizeFieldStops,vvSizeMinMaxValue:this.vvSizeMinMaxValue,vvSizeScaleStops:this.vvSizeScaleStops,vvSizeUnitValue:this.vvSizeUnitValue}}get dotDensity(){return!!this.bit(g)}set dotDensity(e){this.setBit(g,e)}get simple(){return!!this.bit(x)}set simple(e){this.setBit(x,e)}get outlinedFill(){return!!this.bit(T)}set outlinedFill(e){this.setBit(T,e)}}A.shared=new A(0);class M extends(L(O(P(R(I))))){static load(e){const t=this.shared;return t.data=e,t}static from(e){const t=this.load(0);return t.geometryType=o["d"].MARKER,t.setVV(e.vvFlags,e),t.data}getVariation(){return{...super.getVariation(),vvColor:this.vvColor,vvRotation:this.vvRotation,vvOpacity:this.vvOpacity,vvSizeFieldStops:this.vvSizeFieldStops,vvSizeMinMaxValue:this.vvSizeMinMaxValue,vvSizeScaleStops:this.vvSizeScaleStops,vvSizeUnitValue:this.vvSizeUnitValue}}}M.shared=new M(0);class E extends(L(O(R(I)))){static load(e){const t=this.shared;return t.data=e,t}static from(e){const t=this.load(0);return t.geometryType=o["d"].LINE,t.setVV(e.vvFlags,e),t.data}getVariation(){return{...super.getVariation(),vvColor:this.vvColor,vvOpacity:this.vvOpacity,vvSizeFieldStops:this.vvSizeFieldStops,vvSizeMinMaxValue:this.vvSizeMinMaxValue,vvSizeScaleStops:this.vvSizeScaleStops,vvSizeUnitValue:this.vvSizeUnitValue}}}E.shared=new E(0);class D extends(L(O(P(R(I))))){static load(e){const t=this.shared;return t.data=e,t}static from(e){const t=this.load(0);return t.geometryType=o["d"].TEXT,t.setVV(e.vvFlags,e),t.data}getVariation(){return{...super.getVariation(),vvColor:this.vvColor,vvOpacity:this.vvOpacity,vvRotation:this.vvRotation,vvSizeFieldStops:this.vvSizeFieldStops,vvSizeMinMaxValue:this.vvSizeMinMaxValue,vvSizeScaleStops:this.vvSizeScaleStops,vvSizeUnitValue:this.vvSizeUnitValue}}}D.shared=new D(0);class N extends(R(I)){static load(e){const t=this.shared;return t.data=e,t}static from(e){const t=this.load(0);return t.geometryType=o["d"].LABEL,t.setVV(e.vvFlags,e),t.mapAligned=Object(r["i"])(e.placement),t.data}getVariation(){return{...super.getVariation(),vvSizeFieldStops:this.vvSizeFieldStops,vvSizeMinMaxValue:this.vvSizeMinMaxValue,vvSizeScaleStops:this.vvSizeScaleStops,vvSizeUnitValue:this.vvSizeUnitValue}}}N.shared=new N(0)},"32dd":function(e,t,i){"use strict";var n,r;function o(e){switch(e){case"left":return n.Left;case"right":return n.Right;case"center":case"justify":return n.Center}}function s(e){switch(e){case"top":return r.Top;case"middle":return r.Center;case"baseline":return r.Baseline;case"bottom":return r.Bottom}}function a(e){switch(e){case"above-left":case"esriServerPointLabelPlacementAboveLeft":return[n.Right,r.Bottom];case"above-center":case"above-along":case"esriServerPointLabelPlacementAboveCenter":case"esriServerLinePlacementAboveAlong":return[n.Center,r.Bottom];case"above-right":case"esriServerPointLabelPlacementAboveRight":return[n.Left,r.Bottom];case"center-left":case"esriServerPointLabelPlacementCenterLeft":return[n.Right,r.Center];case"center-center":case"center-along":case"esriServerPointLabelPlacementCenterCenter":case"esriServerLinePlacementCenterAlong":case"always-horizontal":case"esriServerPolygonPlacementAlwaysHorizontal":return[n.Center,r.Center];case"center-right":case"esriServerPointLabelPlacementCenterRight":return[n.Left,r.Center];case"below-left":case"esriServerPointLabelPlacementBelowLeft":return[n.Right,r.Top];case"below-center":case"below-along":case"esriServerPointLabelPlacementBelowCenter":case"esriServerLinePlacementBelowAlong":return[n.Center,r.Top];case"below-right":case"esriServerPointLabelPlacementBelowRight":return[n.Left,r.Top];default:return console.debug("Found invalid placement type "+e),[n.Center,r.Center]}}function l(e){switch(e){case n.Right:return-1;case n.Center:return 0;case n.Left:return 1;default:return console.debug("Found invalid horizontal alignment "+e),0}}function c(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}}function u(e){switch(e){case"left":return n.Left;case"right":return n.Right;case"center":case"justify":return n.Center}}function d(e){switch(e){case"above-along":case"below-along":case"center-along":case"esriServerLinePlacementAboveAlong":case"esriServerLinePlacementBelowAlong":case"esriServerLinePlacementCenterAlong":return!0;default:return!1}}i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return a})),i.d(t,"d",(function(){return u})),i.d(t,"e",(function(){return o})),i.d(t,"f",(function(){return l})),i.d(t,"g",(function(){return s})),i.d(t,"h",(function(){return c})),i.d(t,"i",(function(){return d})),function(e){e[e.Left=-1]="Left",e[e.Center=0]="Center",e[e.Right=1]="Right"}(n||(n={})),function(e){e[e.Top=1]="Top",e[e.Center=0]="Center",e[e.Bottom=-1]="Bottom",e[e.Baseline=2]="Baseline"}(r||(r={}))},"361b":function(e,t,i){"use strict";i.d(t,"a",(function(){return x}));var n=i("ff93");const r={background:{"background.frag":"#ifdef PATTERN\nuniform lowp float u_opacity;\nuniform lowp sampler2D u_texture;\nvarying mediump vec4 v_tlbr;\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\nmediump vec2 normalizedTextureCoord = mod(v_tileTextureCoord, 1.0);\nmediump vec2 samplePos = mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);\nlowp vec4 color = texture2D(u_texture, samplePos);\ngl_FragColor = u_opacity * color;\n#else\ngl_FragColor = u_color;\n#endif\n#ifdef ID\nif (gl_FragColor.a < 1.0 / 255.0) {\ndiscard;\n}\ngl_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;\nuniform mediump vec4 u_tlbr;\nuniform mediump vec2 u_mosaicSize;\nvarying mediump vec4 v_tlbr;\n#endif\nvoid main() {\ngl_Position = vec4((u_dvsMat3 * vec3(u_coord_range * a_pos, 1.0)).xy, u_depth, 1.0);\n#ifdef PATTERN\nv_tileTextureCoord = (u_pattern_matrix * vec3(a_pos, 1.0)).xy;\nv_tlbr = u_tlbr / u_mosaicSize.xyxy;\n#endif\n#ifdef ID\nv_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{\nmediump float dist = length(v_offset);\nmediump float alpha = smoothstep(0.0, -v_blur, dist - 1.0);\nlowp float color_mix_ratio = v_stroke_width < 0.01 ? 0.0 : smoothstep(-v_blur, 0.0, dist - v_radius / (v_radius + v_stroke_width));\ngl_FragColor = alpha * mix(v_color, v_stroke_color, color_mix_ratio);\n#ifdef ID\nif (gl_FragColor.a < 1.0 / 255.0) {\ndiscard;\n}\ngl_FragColor = v_id;\n#endif\n}","circle.vert":"precision mediump float;\nattribute vec2 a_pos;\n#pragma header\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_antialiasingWidth;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\nv_stroke_color = stroke_color * stroke_opacity;\nv_stroke_width = stroke_width;\nv_radius = radius;\nv_blur = max(blur, u_antialiasingWidth / (radius + stroke_width));\nmediump vec2 offset = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\nv_offset = offset;\n#ifdef ID\nv_id = u_id / 255.0;\n#endif\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos * 0.5, 1.0) + u_displayMat3 * vec3((v_radius + v_stroke_width) * offset + u_circleTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n}"},fill:{"fill.frag":"precision lowp float;\n#ifdef PATTERN\nuniform lowp sampler2D u_texture;\nvarying mediump vec2 v_tileTextureCoord;\nvarying mediump vec4 v_tlbr;\n#endif\n#ifdef ID\nvarying mediump vec4 v_id;\n#endif\nvarying lowp vec4 v_color;\nvec4 mixColors(vec4 color1, vec4 color2) {\nfloat compositeAlpha = color2.a + color1.a * (1.0 - color2.a);\nvec3 compositeColor = color2.rgb + color1.rgb * (1.0 - color2.a);\nreturn vec4(compositeColor, compositeAlpha);\n}\nvoid main()\n{\n#ifdef PATTERN\nmediump vec2 normalizedTextureCoord = fract(v_tileTextureCoord);\nmediump vec2 samplePos = mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);\nlowp vec4 color = texture2D(u_texture, samplePos);\ngl_FragColor = v_color[3] * color;\n#else\ngl_FragColor = v_color;\n#endif\n#ifdef ID\nif (gl_FragColor.a < 1.0 / 255.0) {\ndiscard;\n}\ngl_FragColor = v_id;\n#endif\n}","fill.vert":"precision mediump float;\nattribute vec2 a_pos;\n#pragma header\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump float u_depth;\nuniform mediump vec2 u_fillTranslation;\n#ifdef PATTERN\n#include \nuniform mediump vec2 u_mosaicSize;\nuniform mediump float u_patternFactor;\nvarying mediump vec2 v_tileTextureCoord;\nvarying mediump vec4 v_tlbr;\n#endif\n#ifdef ID\nuniform mediump vec4 u_id;\nvarying mediump vec4 v_id;\n#endif\nvarying lowp vec4 v_color;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\n#ifdef ID\nv_id = u_id / 255.0;\n#endif\n#ifdef PATTERN\nfloat patternWidth = nextPOT(tlbr.z - tlbr.x);\nfloat patternHeight = nextPOT(tlbr.w - tlbr.y);\nfloat scaleX = 1.0 / (patternWidth * u_patternFactor);\nfloat scaleY = 1.0 / (patternHeight * u_patternFactor);\nmat3 patterMat = mat3(scaleX, 0.0, 0.0,\n0.0, -scaleY, 0.0,\n0.0, 0.0, 1.0);\nv_tileTextureCoord = (patterMat * vec3(a_pos, 1.0)).xy;\nv_tlbr = tlbr / u_mosaicSize.xyxy;\n#endif\nvec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayMat3 * vec3(u_fillTranslation, 0.0);\ngl_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;\n#endif\nvarying mediump vec2 v_tex;\nvarying lowp float v_opacity;\nvarying mediump vec2 v_size;\nvarying lowp vec4 v_color;\n#ifdef SDF\nvarying mediump flaot v_halo_width;\n#endif\n#ifdef ID\nvarying mediump vec4 v_id;\n#endif\n#include \nvec4 mixColors(vec4 color1, vec4 color2) {\nfloat compositeAlpha = color2.a + color1.a * (1.0 - color2.a);\nvec3 compositeColor = color2.rgb + color1.rgb * (1.0 - color2.a);\nreturn vec4(compositeColor, compositeAlpha);\n}\nvoid main()\n{\n#ifdef SDF\nlowp vec4 fillPixelColor = v_color;\nfloat d = rgba2float(texture2D(u_texture, v_tex)) - 0.5;\nconst float softEdgeRatio = 0.248062016;\nfloat size = max(v_size.x, v_size.y);\nfloat dist = d * softEdgeRatio * size;\nfillPixelColor *= clamp(0.5 - dist, 0.0, 1.0);\nif (v_halo_width > 0.25) {\nlowp vec4 outlinePixelColor = u_outlineColor;\nconst float outlineLimitRatio = (16.0 / 86.0);\nfloat clampedOutlineSize = softEdgeRatio * min(v_halo_width, outlineLimitRatio * max(v_size.x, v_size.y));\noutlinePixelColor *= clamp(0.5 - (abs(dist) - clampedOutlineSize), 0.0, 1.0);\ngl_FragColor = v_opacity * mixColors(fillPixelColor, outlinePixelColor);\n}\nelse {\ngl_FragColor = v_opacity * fillPixelColor;\n}\n#else\nlowp vec4 texColor = texture2D(u_texture, v_tex);\ngl_FragColor = v_opacity * texColor;\n#endif\n#ifdef ID\nif (gl_FragColor.a < 1.0 / 255.0) {\ndiscard;\n}\ngl_FragColor = v_id;\n#endif\n}","icon.vert":"attribute vec2 a_pos;\nattribute vec2 a_vertexOffset;\nattribute vec4 a_texAngleRange;\nattribute vec4 a_levelInfo;\nattribute float a_opacityInfo;\n#pragma header\n#ifdef ID\nuniform mediump vec4 u_id;\nvarying mediump vec4 v_id;\n#endif\nvarying lowp vec4 v_color;\n#ifdef SDF\nvarying mediump float v_halo_width;\n#endif\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_fadeDuration;\nvarying mediump vec2 v_tex;\nvarying lowp float v_opacity;\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;\nuniform highp float u_time;\nvoid main()\n{\n#pragma main\nv_color = color;\nv_opacity = opacity;\n#ifdef SDF\nv_halo_width = halo_width;\n#endif\nfloat modded = mod(a_opacityInfo, 128.0);\nfloat targetOpacity = (a_opacityInfo - modded) / 128.0;\nfloat startOpacity = modded / 127.0;\nfloat interpolatedOpacity = clamp(startOpacity + 2.0 * (targetOpacity - 0.5) * u_time / u_fadeDuration, 0.0, 1.0);\nv_opacity *= interpolatedOpacity;\nmediump float a_angle = a_levelInfo[1];\nmediump float a_minLevel = a_levelInfo[2];\nmediump float a_maxLevel = a_levelInfo[3];\nmediump vec2 a_tex = a_texAngleRange.xy;\nmediump float delta_z = 0.0;\nmediump float rotated = mod(a_angle + u_mapRotation, 256.0);\ndelta_z += (1.0 - step(u_keepUpright, 0.0)) * step(64.0, rotated) * (1.0 - step(192.0, rotated));\ndelta_z += 1.0 - step(a_minLevel, u_level);\ndelta_z += step(a_maxLevel, u_level);\ndelta_z += step(v_opacity, 0.0);\nvec2 offset = C_OFFSET_PRECISION * a_vertexOffset;\nv_size = abs(offset);\n#ifdef SDF\noffset = (120.0 / 86.0) * offset;\n#endif\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayViewMat3 * vec3(size * offset, 0.0) + u_displayMat3 * vec3(u_iconTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth + delta_z, 1.0);\n#ifdef ID\nv_id = u_id / 255.0;\n#endif\nv_tex = a_tex.xy / u_mosaicSize;\n}"},line:{"line.frag":"precision lowp float;\nvarying 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#if defined (PATTERN) || defined(SDF)\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_patternSize;\nvarying mediump float v_widthRatio;\nuniform sampler2D u_texture;\nuniform mediump float u_antialiasing;\n#endif\n#ifdef SDF\n#include \n#endif\n#ifdef ID\nvarying mediump vec4 v_id;\n#endif\nvoid main()\n{\nmediump float fragDist = length(v_normal) * v_lineHalfWidth;\nlowp float alpha = clamp((v_lineHalfWidth - fragDist) / v_blur, 0.0, 1.0);\n#ifdef PATTERN\nmediump float relativeTexX = fract(v_accumulatedDistance / (v_patternSize.x * v_widthRatio));\nmediump float relativeTexY = 0.5 + v_normal.y * v_lineHalfWidth / (v_patternSize.y * v_widthRatio);\nmediump vec2 texCoord = mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));\nlowp vec4 color = texture2D(u_texture, texCoord);\ngl_FragColor = alpha * v_color[3] * color;\n#elif defined(SDF)\nmediump float relativeTexX = fract((v_accumulatedDistance * 0.5) / (v_patternSize.x * v_widthRatio));\nmediump float relativeTexY = 0.5 + 0.25 * v_normal.y;\nmediump vec2 texCoord = mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));\nmediump float d = rgba2float(texture2D(u_texture, texCoord)) - 0.5;\nfloat dist = d * (v_lineHalfWidth + u_antialiasing / 2.0);\ngl_FragColor = alpha * clamp(0.5 - dist, 0.0, 1.0) * v_color;\n#else\ngl_FragColor = alpha * v_color;\n#endif\n#ifdef ID\nif (gl_FragColor.a < 1.0 / 255.0) {\ndiscard;\n}\ngl_FragColor = v_id;\n#endif\n}","line.vert":"precision mediump float;\nattribute vec2 a_pos;\nattribute vec4 a_extrude_offset;\nattribute vec4 a_dir_normal;\nattribute vec2 a_accumulatedDistance;\n#pragma header\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump float u_zoomFactor;\nuniform mediump vec2 u_lineTranslation;\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;\nconst mediump float tileCoordRatio = 8.0;\n#if defined (SDF)\nconst mediump float sdfPatternHalfWidth = 15.5;\n#endif\n#if defined (PATTERN) || defined(SDF)\nuniform mediump vec2 u_mosaicSize;\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_patternSize;\nvarying mediump float v_widthRatio;\n#endif\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;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\nv_blur = blur + u_antialiasing;\nv_normal = a_dir_normal.zw * scale;\n#if defined (PATTERN) || defined(SDF)\nv_tlbr = tlbr / u_mosaicSize.xyxy;\nv_patternSize = vec2(tlbr.z - tlbr.x, tlbr.y - tlbr.w);\n#if defined (PATTERN)\nv_widthRatio = width / v_patternSize.y;\n#else\nv_widthRatio = width / sdfPatternHalfWidth / 2.0;\n#endif\n#endif\nv_lineHalfWidth = (width + u_antialiasing) * 0.5;\nmediump vec2 dir = a_dir_normal.xy * scale;\nmediump vec2 offset_ = a_extrude_offset.zw * scale * offset;\nmediump vec2 dist = v_lineHalfWidth * scale * a_extrude_offset.xy;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos + offset_ * tileCoordRatio / u_zoomFactor, 1.0) + u_displayViewMat3 * vec3(dist, 0.0) + u_displayMat3 * vec3(u_lineTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n#if defined (PATTERN) || defined(SDF)\nv_accumulatedDistance = a_accumulatedDistance.x * u_zoomFactor / tileCoordRatio + dot(dir, dist + offset_);\n#endif\n#ifdef ID\nv_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{\nlowp float dist = abs(v_normal.y);\nlowp float alpha = smoothstep(1.0, 0.0, dist);\ngl_FragColor = alpha * v_color;\n#ifdef ID\nif (gl_FragColor.a < 1.0 / 255.0) {\ndiscard;\n}\ngl_FragColor = v_id;\n#endif\n}","outline.vert":"attribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_xnormal;\n#pragma header\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#pragma main\nv_color = color * opacity;\n#ifdef ID\nv_id = u_id / 255.0;\n#endif\nv_normal = a_xnormal;\nmediump vec2 dist = u_outline_width * scale * a_offset;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayMat3 * vec3(dist + u_fillTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n}"},text:{"text.frag":"uniform lowp sampler2D u_texture;\nvarying lowp vec2 v_tex;\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{\nlowp float dist = texture2D(u_texture, v_tex).a;\nmediump float alpha = smoothstep(v_edgeDistance - v_edgeWidth, v_edgeDistance + v_edgeWidth, dist);\ngl_FragColor = alpha * v_color;\n#ifdef ID\nif (gl_FragColor.a < 1.0 / 255.0) {\ndiscard;\n}\ngl_FragColor = v_id;\n#endif\n}","text.vert":"attribute vec2 a_pos;\nattribute vec2 a_vertexOffset;\nattribute vec4 a_texAngleRange;\nattribute vec4 a_levelInfo;\nattribute float a_opacityInfo;\n#pragma header\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 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_fadeDuration;\nvarying lowp vec2 v_tex;\nconst float offsetPrecision = 1.0 / 8.0;\nconst mediump float edgePos = 0.75;\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;\nconst float sdfPixel = 3.0;\nuniform highp float u_time;\nvoid main()\n{\n#pragma main\nif (u_halo > 0.5)\n{\nv_color = halo_color * opacity;\nhalo_width *= sdfPixel;\nhalo_blur *= sdfPixel;\n}\nelse\n{\nv_color = color * opacity;\nhalo_width = 0.0;\nhalo_blur = 0.0;\n}\nfloat modded = mod(a_opacityInfo, 128.0);\nfloat targetOpacity = (a_opacityInfo - modded) / 128.0;\nfloat startOpacity = modded / 127.0;\nfloat interpolatedOpacity = clamp(startOpacity + 2.0 * (targetOpacity - 0.5) * u_time / u_fadeDuration, 0.0, 1.0);\nv_color *= interpolatedOpacity;\nmediump float a_angle = a_levelInfo[1];\nmediump float a_minLevel = a_levelInfo[2];\nmediump float a_maxLevel = a_levelInfo[3];\nmediump vec2 a_tex = a_texAngleRange.xy;\nmediump float a_visMinAngle = a_texAngleRange.z;\nmediump float a_visMaxAngle = a_texAngleRange.w;\nmediump float delta_z = 0.0;\nmediump float angle = mod(a_angle + u_mapRotation, 256.0);\nif (a_visMinAngle < a_visMaxAngle)\n{\ndelta_z += (1.0 - step(u_keepUpright, 0.0)) * (step(a_visMaxAngle, angle) + (1.0 - step(a_visMinAngle, angle)));\n}\nelse\n{\ndelta_z += (1.0 - step(u_keepUpright, 0.0)) * (step(a_visMaxAngle, angle) * (1.0 - step(a_visMinAngle, angle)));\n}\ndelta_z += 1.0 - step(a_minLevel, u_level);\ndelta_z += step(a_maxLevel, u_level);\ndelta_z += step(v_color[3], 0.0);\nv_tex = a_tex.xy / u_mosaicSize;\n#ifdef ID\nv_id = u_id / 255.0;\n#endif\nv_edgeDistance = edgePos - halo_width / size;\nv_edgeWidth = (u_antialiasingWidth + halo_blur) / size;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + sdfFontScale * u_displayViewMat3 * vec3(offsetPrecision * size * a_vertexOffset, 0.0) + u_displayMat3 * vec3(u_textTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth + delta_z, 1.0);\n}"},util:{"encoding.glsl":"const vec4 rgba2float_factors = vec4(\n255.0 / (256.0),\n255.0 / (256.0 * 256.0),\n255.0 / (256.0 * 256.0 * 256.0),\n255.0 / (256.0 * 256.0 * 256.0 * 256.0)\n);\nfloat rgba2float(vec4 rgba) {\nreturn dot(rgba, rgba2float_factors);\n}","util.glsl":"float nextPOT(in float x) {\nreturn pow(2.0, ceil(log2(abs(x))));\n}"}};var o=i("49f0");function s(e){let t=r;return e.split("/").forEach(e=>{t&&(t=t[e])}),t}const a=new o["a"](s);function l(e){return a.resolveIncludes(e)}var c=i("d45f");const u=e=>Object(c["a"])({ID:e.id,PATTERN:e.pattern}),d={shaders:e=>({vertexShader:u(e)+l("background/background.vert"),fragmentShader:u(e)+l("background/background.frag")})},h=e=>Object(c["a"])({ID:e.id}),f={shaders:e=>({vertexShader:h(e)+l("circle/circle.vert"),fragmentShader:h(e)+l("circle/circle.frag")})},_=e=>Object(c["a"])({ID:e.id,PATTERN:e.pattern}),p={shaders:e=>({vertexShader:_(e)+l("fill/fill.vert"),fragmentShader:_(e)+l("fill/fill.frag")})},m=e=>Object(c["a"])({ID:e.id}),g={shaders:e=>({vertexShader:m(e)+l("outline/outline.vert"),fragmentShader:m(e)+l("outline/outline.frag")})},v=e=>Object(c["a"])({ID:e.id,SDF:e.sdf}),y={shaders:e=>({vertexShader:v(e)+l("icon/icon.vert"),fragmentShader:v(e)+l("icon/icon.frag")})},S=e=>Object(c["a"])({ID:e.id,PATTERN:e.pattern,SDF:e.sdf}),b={shaders:e=>({vertexShader:S(e)+l("line/line.vert"),fragmentShader:S(e)+l("line/line.frag")})},w=e=>Object(c["a"])({ID:e.id}),T={shaders:e=>({vertexShader:w(e)+l("text/text.vert"),fragmentShader:w(e)+l("text/text.frag")})};class x{constructor(){this._programByKey=new Map}dispose(){this._programByKey.forEach(e=>e.dispose()),this._programByKey.clear()}getMaterialProgram(e,t,i){const n=t.key<<3|this._getMaterialOptionsValue(t.type,i);if(this._programByKey.has(n))return this._programByKey.get(n);const r=this._getProgramTemplate(t.type),{shaders:o}=r,{vertexShader:s,fragmentShader:a}=o(i),l=t.getShaderHeader(),c=t.getShaderMain(),u=s.replace("#pragma header",l).replace("#pragma main",c),d=e.programCache.acquire(u,a,t.getAttributeLocations());return this._programByKey.set(n,d),d}_getMaterialOptionsValue(e,t){switch(e){case n["b"].BACKGROUND:{const e=t;return(e.pattern?1:0)<<1|(e.id?1:0)}case n["b"].FILL:{const e=t;return(e.pattern?1:0)<<1|(e.id?1:0)}case n["b"].OUTLINE:return t.id?1:0;case n["b"].LINE:{const e=t;return(e.sdf?1:0)<<2|(e.pattern?1:0)<<1|(e.id?1:0)}case n["b"].ICON:{const e=t;return(e.sdf?1:0)<<1|(e.id?1:0)}case n["b"].CIRCLE:return t.id?1:0;case n["b"].TEXT:return t.id?1:0;default:return 0}}_getProgramTemplate(e){switch(e){case n["b"].BACKGROUND:return d;case n["b"].CIRCLE:return f;case n["b"].FILL:return p;case n["b"].ICON:return y;case n["b"].LINE:return b;case n["b"].OUTLINE:return g;case n["b"].TEXT:return T;default:return null}}}},"51b2":function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var n=i("8c71"),r=i("db21"),o=i("bc05"),s=i("ef89");function a(e,t,i,n,r,o){const{iconRotationAlignment:a,textRotationAlignment:l,iconTranslate:c,iconTranslateAnchor:u,textTranslate:d,textTranslateAnchor:h}=n;let f=0;for(const _ of e.colliders){const[e,n]=0===_.partIndex?c:d,p=0===_.partIndex?u:h,m=_.minLod<=o&&o<=_.maxLod;f+=m?0:1,_.enabled=m,_.xScreen=_.xTile*r[0]+_.yTile*r[3]+r[6],_.yScreen=_.xTile*r[1]+_.yTile*r[4]+r[7],p===s["i"].MAP?(_.xScreen+=i*e-t*n,_.yScreen+=t*e+i*n):(_.xScreen+=e,_.yScreen+=n),s["a"].VIEWPORT===(0===_.partIndex?a:l)?(_.dxScreen=_.dxPixels,_.dyScreen=_.dyPixels):(_.dxScreen=i*(_.dxPixels+_.width/2)-t*(_.dyPixels+_.height/2)-_.width/2,_.dyScreen=t*(_.dxPixels+_.width/2)+i*(_.dyPixels+_.height/2)-_.height/2)}e.colliders.length>0&&f===e.colliders.length&&(e.unique.show=!1)}class l{constructor(e,t,i,s,a,l){this._symbols=e,this._styleRepository=s,this._zoom=a,this._currentLayerCursor=0,this._currentSymbolCursor=0,this._styleProps=new Map,this._allNeededMatrices=new Map,this._gridIndex=new o["a"](t,i,r["a"]),this._si=Math.sin(Math.PI*l/180),this._co=Math.cos(Math.PI*l/180);for(const r of e)for(const e of r.symbols)this._allNeededMatrices.has(e.tile)||this._allNeededMatrices.set(e.tile,Object(n["a"])(e.tile.transforms.tileUnitsToPixels))}work(e){const t=this._gridIndex;function i(e){const i=e.xScreen+e.dxScreen,n=e.yScreen+e.dyScreen,r=i+e.width,o=n+e.height,[s,a,l,c]=t.getCellSpan(i,n,r,o);for(let u=a;u<=c;u++)for(let e=s;e<=l;e++){const s=t.cells[u][e];for(const e of s){const t=e.xScreen+e.dxScreen,s=e.yScreen+e.dyScreen,a=t+e.width,l=s+e.height;if(!(ra||ol))return!0}}return!1}const n=performance.now();for(;this._currentLayerCursore)return!1;const o=t.symbols[this._currentSymbolCursor];if(!o.unique.show)continue;a(o,this._si,this._co,r,this._allNeededMatrices.get(o.tile),this._zoom);const s=o.unique;if(!s.show)continue;const{iconAllowOverlap:l,iconIgnorePlacement:c,textAllowOverlap:u,textIgnorePlacement:d}=r;for(const e of o.colliders){if(!e.enabled)continue;const t=s.parts[e.partIndex];t.show&&(!(e.partIndex?u:l)&&i(e)&&(e.hard?s.show=!1:t.show=!1))}if(s.show)for(const e of o.colliders){if(!e.enabled)continue;if(e.partIndex?d:c)continue;if(!s.parts[e.partIndex].show)continue;const t=e.xScreen+e.dxScreen,i=e.yScreen+e.dyScreen,n=t+e.width,r=i+e.height,[o,a,l,u]=this._gridIndex.getCellSpan(t,i,n,r);for(let s=a;s<=u;s++)for(let t=o;t<=l;t++)this._gridIndex.cells[s][t].push(e)}}}return!0}_getProperties(e){const t=this._styleProps.get(e);if(t)return t;const i=this._zoom,n=this._styleRepository.getStyleLayerByUID(e),r=n.getLayoutValue("symbol-placement",i)!==s["e"].POINT;let o=n.getLayoutValue("icon-rotation-alignment",i);o===s["a"].AUTO&&(o=r?s["a"].MAP:s["a"].VIEWPORT);let a=n.getLayoutValue("text-rotation-alignment",i);a===s["a"].AUTO&&(a=r?s["a"].MAP:s["a"].VIEWPORT);const l=n.getPaintValue("icon-translate",i),c=n.getPaintValue("icon-translate-anchor",i),u=n.getPaintValue("text-translate",i),d=n.getPaintValue("text-translate-anchor",i),h={iconAllowOverlap:n.getLayoutValue("icon-allow-overlap",i),iconIgnorePlacement:n.getLayoutValue("icon-ignore-placement",i),textAllowOverlap:n.getLayoutValue("text-allow-overlap",i),textIgnorePlacement:n.getLayoutValue("text-ignore-placement",i),iconRotationAlignment:o,textRotationAlignment:a,iconTranslateAnchor:c,iconTranslate:l,textTranslateAnchor:d,textTranslate:u};return this._styleProps.set(e,h),h}}},"81af":function(e,t,i){"use strict";i.d(t,"a",(function(){return b}));var n=i("f4cc"),r=i("e041"),o=i("dfa0"),s=i("a9c0");class a{constructor(e,t){this._width=0,this._height=0,this._free=[],this._width=e,this._height=t,this._free.push(new s["a"](0,0,e,t))}get width(){return this._width}get height(){return this._height}allocate(e,t){if(e>this._width||t>this._height)return new s["a"];let i=null,n=-1;for(let r=0;re&&this._free.push(new s["a"](i.x+e,i.y,i.width-e,t)),i.height>t&&this._free.push(new s["a"](i.x,i.y+t,i.width,i.height-t))):(i.width>e&&this._free.push(new s["a"](i.x+e,i.y,i.width-e,i.height)),i.height>t&&this._free.push(new s["a"](i.x,i.y+t,e,i.height-t))),new s["a"](i.x,i.y,e,t))}release(e){for(let t=0;t{if(t<=256){const i=e+t;if(this._rangePromises.has(i))l.push(this._rangePromises.get(i));else{const r=n.getRange(e,t).then(()=>{this._rangePromises.delete(i)},()=>{this._rangePromises.delete(i)});this._rangePromises.set(i,r),l.push(r)}}}),Promise.all(l).then(()=>{let r=this._glyphIndex[e];r||(r={},this._glyphIndex[e]=r);for(const o of t){const t=r[o];if(t){i[o]={sdf:!0,rect:t.rect,metrics:t.metrics,page:t.page,code:o};continue}const l=n.getGlyph(e,o);if(!l||!l.metrics)continue;const c=l.metrics;let u;if(0===c.width)u=new s["a"](0,0,0,0);else{const e=3,t=c.width+2*e,i=c.height+2*e;let n=t%4?4-t%4:4,r=i%4?4-i%4:4;1===n&&(n=5),1===r&&(r=5),u=this._binPack.allocate(t+n,i+r),u.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(void 0),this._binPack=new a(this.width-4,this.height-4),u=this._binPack.allocate(t+n,i+r));const o=this._glyphData[this._currentPage],s=l.bitmap;let d,h;if(s)for(let a=0;a{i.addRange(t,new f(new h["a"](new Uint8Array(e.data),new DataView(e.data))))}).catch(()=>{i.addRange(t,new f)})}getGlyph(e,t){const i=this._getFontStack(e);if(!i)return;const n=Math.floor(t/256);if(n>256)return;const r=i.getRange(n);return r?{metrics:r.getMetrics(t),bitmap:r.getBitmap(t)}:void 0}_getFontStack(e){let t=this._glyphInfo[e];return t||(t=this._glyphInfo[e]=new _),t}}var m=i("793f");const g="dasharray-";class v{constructor(e,t,i=0){this._size=[],this._mosaicsData=[],this._textures=[],this._dirties=[],this._maxItemSize=0,this._currentPage=0,this._pageWidth=0,this._pageHeight=0,this._mosaicRects={},this.pixelRatio=1,(e<=0||t<=0)&&console.error("Sprites mosaic defaultWidth and defaultHeight must be greater than zero!"),this._pageWidth=e,this._pageHeight=t,i>0&&(this._maxItemSize=i),this._binPack=new a(e-4,t-4)}dispose(){this._binPack=null,this._mosaicRects={};for(const e of this._textures)e&&e.dispose();this._textures.length=0}getWidth(e){return e>=this._size.length?-1:this._size[e][0]}getHeight(e){return e>=this._size.length?-1:this._size[e][1]}getPageSize(e){return e>=this._size.length?null:this._size[e]}setSpriteSource(e){if(this.dispose(),this.pixelRatio=e.devicePixelRatio,0===this._mosaicsData.length){this._binPack=new a(this._pageWidth-4,this._pageHeight-4);const e=Math.floor(this._pageWidth),t=Math.floor(this._pageHeight),i=new Uint32Array(e*t);this._mosaicsData[0]=i,this._dirties.push(!0),this._size.push([this._pageWidth,this._pageHeight]),this._textures.push(void 0)}this._sprites=e}getSpriteItem(e,t=!1){let i,n,r=this._mosaicRects[e];if(r)return r;if(!this._sprites||"loaded"!==this._sprites.loadStatus)return null;if(e&&e.startsWith(g)?([i,n]=this._rasterizeDash(e),t=!0):i=this._sprites.getSpriteInfo(e),!i||!i.width||!i.height||i.width<0||i.height<0)return null;const o=i.width,s=i.height,[a,l,c]=this._allocateImage(o,s);return a.width<=0?null:(this._copy(a,i,l,c,t,n),r={rect:a,width:o,height:s,sdf:i.sdf,simplePattern:!1,pixelRatio:i.pixelRatio,page:l},this._mosaicRects[e]=r,r)}getSpriteItems(e){const t={};for(const i of e)t[i.name]=this.getSpriteItem(i.name,i.repeat);return t}getMosaicItemPosition(e,t){const i=this.getSpriteItem(e,t),n=i&&i.rect;if(!n)return null;n.width=i.width,n.height=i.height;const r=i.width,o=i.height,s=2;return{tl:[n.x+s,n.y+s],br:[n.x+s+r,n.y+s+o],page:i.page}}bind(e,t,i=0,n=0){this._textures[i]||(this._textures[i]=new c["a"](e,{pixelFormat:l["p"].RGBA,dataType:l["q"].UNSIGNED_BYTE,wrapMode:l["B"].CLAMP_TO_EDGE,width:this._size[i][0],height:this._size[i][1]},new Uint8Array(this._mosaicsData[i].buffer)));const r=this._textures[i];r.setSamplingMode(t),this._dirties[i]&&r.setData(new Uint8Array(this._mosaicsData[i].buffer)),e.bindTexture(r,n),this._dirties[i]=!1}static _copyBits(e,t,i,n,r,o,s,a,l,c,u){let d=n*t+i,h=a*o+s;if(u){h-=o;for(let s=-1;s<=c;s++,d=((s+c)%c+n)*t+i,h+=o)for(let t=-1;t<=l;t++)r[h+t]=e[d+(t+l)%l]}else for(let f=0;f=this._mosaicsData.length)return;const s=new Uint32Array(o?o.buffer:this._sprites.image.buffer),a=this._mosaicsData[i];a&&s||console.error("Source or target images are uninitialized!");const l=2,c=o?t.width:this._sprites.width;v._copyBits(s,c,t.x,t.y,a,n[0],e.x+l,e.y+l,t.width,t.height,r),this._dirties[i]=!0}_allocateImage(e,t){e+=2,t+=2;const i=Math.max(e,t);if(this._maxItemSize&&this._maxItemSizethis._spriteMosaic)}get glyphMosaic(){return this._glyphMosaic}async start(e){this._spriteSourcePromise=this._layer.loadSpriteSource(this.devicePixelRatio,e),this._spriteSourcePromise.then(e=>{this._spriteMosaic=new v(1024,1024,250),this._spriteMosaic.setSpriteSource(e)});const t=new p(this._layer.currentStyleInfo.glyphsUrl?Object(r["e"])(this._layer.currentStyleInfo.glyphsUrl,{...this._layer.customParameters,token:this._layer.apiKey}):null);this._glyphMosaic=new u(1024,1024,t),this._broadcastPromise=Object(o["b"])("WorkerTileHandler",{client:this,schedule:e.schedule,signal:e.signal}).then(t=>(this._connection=t,Promise.all(this._connection.broadcast("setStyle",this._layer.currentStyleInfo.style,e))))}async updateStyle(e){return await this._broadcastPromise,this._broadcastPromise=Promise.all(this._connection.broadcast("updateStyle",e)),this._broadcastPromise}setSpriteSource(e){const t=new v(1024,1024,250);return t.setSpriteSource(e),this._spriteMosaic=t,this._spriteSourcePromise=Promise.resolve(e),t}async setStyle(e,t){await this._broadcastPromise,this._styleRepository=e,this._spriteSourcePromise=this._layer.loadSpriteSource(this.devicePixelRatio,null),this._spriteSourcePromise.then(e=>{this._spriteMosaic=new v(1024,1024,250),this._spriteMosaic.setSpriteSource(e)});const i=new p(this._layer.currentStyleInfo.glyphsUrl?Object(r["e"])(this._layer.currentStyleInfo.glyphsUrl,{...this._layer.customParameters,token:this._layer.apiKey}):null);return this._glyphMosaic=new u(1024,1024,i),this._broadcastPromise=Promise.all(this._connection.broadcast("setStyle",t)),this._broadcastPromise}fetchTileData(e,t){return this._getRefKeys(e,t).then(e=>{const i=this._layer.sourceNameToSource,n=[];for(const t in i)n.push(t);return this._getSourcesData(n,e,t)})}parseTileData(e,t){const i=e&&e.data;if(!i)return Promise.resolve(null);const{sourceName2DataAndRefKey:n,transferList:r}=i;return 0===Object.keys(n).length?Promise.resolve(null):this._broadcastPromise.then(()=>this._connection.getAvailableClient().then(i=>i.invoke("createTileAndParse",{key:e.key.id,sourceName2DataAndRefKey:n,styleLayerUIDs:e.styleLayerUIDs},{...t,transferList:r})))}async getSprites(e){return await this._spriteSourcePromise,this._spriteMosaic.getSpriteItems(e)}getGlyphs(e){return this._glyphMosaic.getGlyphItems(e.font,e.codePoints)}perfReport({key:e,milliseconds:t}){Object(y["b"])(e,t,"ms")}async _getTilePayload(e,t,i){const r=S["a"].pool.acquire(e.id),o=this._layer.sourceNameToSource[t],{level:s,row:a,col:l}=r;S["a"].pool.release(r);try{return{protobuff:await o.requestTile(s,a,l,i),sourceName:t}}catch(c){if(Object(n["m"])(c))throw c;return{protobuff:null,sourceName:t}}}_getRefKeys(e,t){const i=this._layer.sourceNameToSource,r=new Array;for(const n in i){const o=i[n].getRefKey(e,t);r.push(o)}return Object(n["j"])(r)}_getSourcesData(e,t,i){const r=[];for(let n=0;n{const i={},n=[];for(let r=0;r0){const o=t[r].value.id;i[e[r].value.sourceName]={refKey:o,protobuff:e[r].value.protobuff},n.push(e[r].value.protobuff)}return{sourceName2DataAndRefKey:i,transferList:n}})}}},"8c81":function(e,t,i){"use strict";i.d(t,"a",(function(){return x})),i.d(t,"b",(function(){return R})),i.d(t,"c",(function(){return T})),i.d(t,"d",(function(){return C})),i.d(t,"e",(function(){return I})),i.d(t,"f",(function(){return u})),i.d(t,"g",(function(){return V})),i.d(t,"h",(function(){return j})),i.d(t,"i",(function(){return q})),i.d(t,"j",(function(){return H})),i.d(t,"k",(function(){return W})),i.d(t,"l",(function(){return G})),i.d(t,"m",(function(){return J})),i.d(t,"n",(function(){return k})),i.d(t,"o",(function(){return s})),i.d(t,"p",(function(){return A})),i.d(t,"q",(function(){return O})),i.d(t,"r",(function(){return l})),i.d(t,"s",(function(){return L})),i.d(t,"t",(function(){return E})),i.d(t,"u",(function(){return a})),i.d(t,"v",(function(){return P})),i.d(t,"w",(function(){return U})),i.d(t,"x",(function(){return n})),i.d(t,"y",(function(){return B})),i.d(t,"z",(function(){return r})),i.d(t,"A",(function(){return F})),i.d(t,"B",(function(){return _})),i.d(t,"C",(function(){return p})),i.d(t,"D",(function(){return m})),i.d(t,"E",(function(){return g})),i.d(t,"F",(function(){return f})),i.d(t,"G",(function(){return h})),i.d(t,"H",(function(){return v})),i.d(t,"I",(function(){return y})),i.d(t,"J",(function(){return S})),i.d(t,"K",(function(){return b})),i.d(t,"L",(function(){return w})),i.d(t,"M",(function(){return d})),i.d(t,"N",(function(){return c})),i.d(t,"O",(function(){return M})),i.d(t,"P",(function(){return o})),i.d(t,"Q",(function(){return z})),i.d(t,"R",(function(){return N})),i.d(t,"S",(function(){return D}));const n=1e-30,r=4294967295,o=512,s=8,a=29,l=24,c=8,u={metrics:{width:15,height:17,left:0,top:-7,advance:14}},d=0,h=0,f=0,_=1,p=2,m=3,g=4,v=12,y=5,S=6,b=5,w=6,T=0,x=1,C=2,I=3,R=4,P=2,L=1,O=2,A=4,M=1.05,E=3,D=5,N=6,z=1.15,F=2,k=8,B=500,U=10,V=2,H=0,q=1,W=4,G=8,j=4,J=1},a9a2:function(e,t,i){"use strict";i.d(t,"a",(function(){return s})),i.d(t,"b",(function(){return o})),i.d(t,"c",(function(){return a})),i.d(t,"d",(function(){return l}));var n=i("d114");function r(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=0,i=!1){const n=e[t+3];return e[t+0]*=n,e[t+1]*=n,e[t+2]*=n,i||(e[t+3]*=255),e}function s(e){return o(r([],e))}function a(e){if(!e)return 0;const{r:t,g:i,b:r,a:o}=e;return Object(n["b"])(t*o,i*o,r*o,255*o)}function l(e){if(!e)return 0;const[t,i,r,o]=e;return Object(n["b"])(t*(o/255),i*(o/255),r*(o/255),o)}},ab39:function(e,t,i){"use strict";var n,r,o,s,a,l,c,u,d,h,f,_,p,m,g,v,y,S,b,w,T,x,C,I,R,P,L,O,A,M,E,D,N,z,F,k,B,U,V,H,q,W,G,j,J,X,Y,K,Z,$,Q,ee,te,ie,ne,re,oe,se,ae,le;i.d(t,"a",(function(){return o})),i.d(t,"b",(function(){return v})),i.d(t,"c",(function(){return g})),i.d(t,"d",(function(){return n})),i.d(t,"e",(function(){return a})),i.d(t,"f",(function(){return c})),i.d(t,"g",(function(){return u})),i.d(t,"h",(function(){return d})),i.d(t,"i",(function(){return b})),i.d(t,"j",(function(){return w})),i.d(t,"k",(function(){return T})),i.d(t,"l",(function(){return I})),i.d(t,"m",(function(){return L})),i.d(t,"n",(function(){return O})),i.d(t,"o",(function(){return r})),i.d(t,"p",(function(){return F})),i.d(t,"q",(function(){return k})),i.d(t,"r",(function(){return V})),i.d(t,"s",(function(){return j})),i.d(t,"t",(function(){return J})),i.d(t,"u",(function(){return X})),i.d(t,"v",(function(){return Y})),i.d(t,"w",(function(){return ne})),i.d(t,"x",(function(){return re})),i.d(t,"y",(function(){return se})),function(e){e[e.BUTT=0]="BUTT",e[e.ROUND=1]="ROUND",e[e.SQUARE=2]="SQUARE",e[e.UNKNOWN=4]="UNKNOWN"}(n||(n={})),function(e){e[e.BEVEL=0]="BEVEL",e[e.ROUND=1]="ROUND",e[e.MITER=2]="MITER",e[e.UNKNOWN=4]="UNKNOWN"}(r||(r={})),function(e){e[e.SCREEN=0]="SCREEN",e[e.MAP=1]="MAP"}(o||(o={})),function(e){e[e.Tint=0]="Tint",e[e.Ignore=1]="Ignore",e[e.Multiply=99]="Multiply"}(s||(s={})),function(e){e.Both="Both",e.JustBegin="JustBegin",e.JustEnd="JustEnd",e.None="None"}(a||(a={})),function(e){e[e.Mosaic=0]="Mosaic",e[e.Centered=1]="Centered"}(l||(l={})),function(e){e[e.Normal=0]="Normal",e[e.Superscript=1]="Superscript",e[e.Subscript=2]="Subscript"}(c||(c={})),function(e){e[e.MSSymbol=0]="MSSymbol",e[e.Unicode=1]="Unicode"}(u||(u={})),function(e){e[e.Unspecified=0]="Unspecified",e[e.TrueType=1]="TrueType",e[e.PSOpenType=2]="PSOpenType",e[e.TTOpenType=3]="TTOpenType",e[e.Type1=4]="Type1"}(d||(d={})),function(e){e[e.Display=0]="Display",e[e.Map=1]="Map"}(h||(h={})),function(e){e[e.Z=0]="Z",e[e.X=1]="X",e[e.Y=2]="Y"}(f||(f={})),function(e){e[e.XYZ=0]="XYZ",e[e.ZXY=1]="ZXY",e[e.YXZ=2]="YXZ"}(_||(_={})),function(e){e[e.Rectangle=0]="Rectangle",e[e.RoundedRectangle=1]="RoundedRectangle",e[e.Oval=2]="Oval"}(p||(p={})),function(e){e[e.None=0]="None",e[e.Alpha=1]="Alpha",e[e.Screen=2]="Screen",e[e.Multiply=3]="Multiply",e[e.Add=4]="Add"}(m||(m={})),function(e){e[e.TTB=0]="TTB",e[e.RTL=1]="RTL",e[e.BTT=2]="BTT"}(g||(g={})),function(e){e[e.None=0]="None",e[e.SignPost=1]="SignPost",e[e.FaceNearPlane=2]="FaceNearPlane"}(v||(v={})),function(e){e[e.Float=0]="Float",e[e.String=1]="String",e[e.Boolean=2]="Boolean"}(y||(y={})),function(e){e[e.Intersect=0]="Intersect",e[e.Subtract=1]="Subtract"}(S||(S={})),function(e){e.OpenEnded="OpenEnded",e.Block="Block",e.Crossed="Crossed"}(b||(b={})),function(e){e.FullGeometry="FullGeometry",e.PerpendicularFromFirstSegment="PerpendicularFromFirstSegment",e.ReversedFirstSegment="ReversedFirstSegment",e.PerpendicularToSecondSegment="PerpendicularToSecondSegment",e.SecondSegmentWithTicks="SecondSegmentWithTicks",e.DoublePerpendicular="DoublePerpendicular",e.OppositeToFirstSegment="OppositeToFirstSegment",e.TriplePerpendicular="TriplePerpendicular",e.HalfCircleFirstSegment="HalfCircleFirstSegment",e.HalfCircleSecondSegment="HalfCircleSecondSegment",e.HalfCircleExtended="HalfCircleExtended",e.OpenCircle="OpenCircle",e.CoverageEdgesWithTicks="CoverageEdgesWithTicks",e.GapExtentWithDoubleTicks="GapExtentWithDoubleTicks",e.GapExtentMidline="GapExtentMidline",e.Chevron="Chevron",e.PerpendicularWithArc="PerpendicularWithArc",e.ClosedHalfCircle="ClosedHalfCircle",e.TripleParallelExtended="TripleParallelExtended",e.ParallelWithTicks="ParallelWithTicks",e.Parallel="Parallel",e.PerpendicularToFirstSegment="PerpendicularToFirstSegment",e.ParallelOffset="ParallelOffset",e.OffsetOpposite="OffsetOpposite",e.OffsetSame="OffsetSame",e.CircleWithArc="CircleWithArc",e.DoubleJog="DoubleJog",e.PerpendicularOffset="PerpendicularOffset",e.LineExcludingLastSegment="LineExcludingLastSegment",e.MultivertexArrow="MultivertexArrow",e.CrossedArrow="CrossedArrow",e.ChevronArrow="ChevronArrow",e.ChevronArrowOffset="ChevronArrowOffset",e.PartialFirstSegment="PartialFirstSegment",e.Arch="Arch",e.CurvedParallelTicks="CurvedParallelTicks",e.Arc90Degrees="Arc90Degrees"}(w||(w={})),function(e){e.Mitered="Mitered",e.Bevelled="Bevelled",e.Rounded="Rounded",e.Square="Square",e.TrueBuffer="TrueBuffer"}(T||(T={})),function(e){e.ClosePath="ClosePath",e.ConvexHull="ConvexHull",e.RectangularBox="RectangularBox"}(x||(x={})),function(e){e.BeginningOfLine="BeginningOfLine",e.EndOfLine="EndOfLine"}(C||(C={})),function(e){e.Mitered="Mitered",e.Bevelled="Bevelled",e.Rounded="Rounded",e.Square="Square"}(I||(I={})),function(e){e.Fast="Fast",e.Accurate="Accurate"}(R||(R={})),function(e){e.BeginningOfLine="BeginningOfLine",e.EndOfLine="EndOfLine"}(P||(P={})),function(e){e.Sinus="Sinus",e.Square="Square",e.Triangle="Triangle",e.Random="Random"}(L||(L={})),function(e){e[e.None=0]="None",e[e.Default=1]="Default",e[e.Force=2]="Force"}(O||(O={})),function(e){e[e.Buffered=0]="Buffered",e[e.Left=1]="Left",e[e.Right=2]="Right",e[e.AlongLine=3]="AlongLine"}(A||(A={})),function(e){e[e.Linear=0]="Linear",e[e.Rectangular=1]="Rectangular",e[e.Circular=2]="Circular",e[e.Buffered=3]="Buffered"}(M||(M={})),function(e){e[e.Discrete=0]="Discrete",e[e.Continuous=1]="Continuous"}(E||(E={})),function(e){e[e.AcrossLine=0]="AcrossLine",e[e.AloneLine=1]="AloneLine"}(D||(D={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Center=2]="Center",e[e.Justify=3]="Justify"}(N||(N={})),function(e){e[e.Base=0]="Base",e[e.MidPoint=1]="MidPoint",e[e.ThreePoint=2]="ThreePoint",e[e.FourPoint=3]="FourPoint",e[e.Underline=4]="Underline",e[e.CircularCW=5]="CircularCW",e[e.CircularCCW=6]="CircularCCW"}(z||(z={})),function(e){e.Butt="Butt",e.Round="Round",e.Square="Square"}(F||(F={})),function(e){e.NoConstraint="NoConstraint",e.HalfPattern="HalfPattern",e.HalfGap="HalfGap",e.FullPattern="FullPattern",e.FullGap="FullGap",e.Custom="Custom"}(k||(k={})),function(e){e[e.None=-1]="None",e[e.Custom=0]="Custom",e[e.Circle=1]="Circle",e[e.OpenArrow=2]="OpenArrow",e[e.ClosedArrow=3]="ClosedArrow",e[e.Diamond=4]="Diamond"}(B||(B={})),function(e){e[e.ExtraLeading=0]="ExtraLeading",e[e.Multiple=1]="Multiple",e[e.Exact=2]="Exact"}(U||(U={})),function(e){e.Bevel="Bevel",e.Round="Round",e.Miter="Miter"}(V||(V={})),function(e){e[e.Default=0]="Default",e[e.String=1]="String",e[e.Numeric=2]="Numeric"}(H||(H={})),function(e){e[e.InsidePolygon=0]="InsidePolygon",e[e.PolygonCenter=1]="PolygonCenter",e[e.RandomlyInsidePolygon=2]="RandomlyInsidePolygon"}(q||(q={})),function(e){e[e.Tint=0]="Tint",e[e.Replace=1]="Replace",e[e.Multiply=2]="Multiply"}(W||(W={})),function(e){e[e.ClipAtBoundary=0]="ClipAtBoundary",e[e.RemoveIfCenterOutsideBoundary=1]="RemoveIfCenterOutsideBoundary",e[e.DoNotTouchBoundary=2]="DoNotTouchBoundary",e[e.DoNotClip=3]="DoNotClip"}(G||(G={})),function(e){e.NoConstraint="NoConstraint",e.WithMarkers="WithMarkers",e.WithFullGap="WithFullGap",e.WithHalfGap="WithHalfGap",e.Custom="Custom"}(j||(j={})),function(e){e.Fixed="Fixed",e.Random="Random",e.RandomFixedQuantity="RandomFixedQuantity"}(J||(J={})),function(e){e.LineMiddle="LineMiddle",e.LineBeginning="LineBeginning",e.LineEnd="LineEnd",e.SegmentMidpoint="SegmentMidpoint"}(X||(X={})),function(e){e.OnPolygon="OnPolygon",e.CenterOfMass="CenterOfMass",e.BoundingBoxCenter="BoundingBoxCenter"}(Y||(Y={})),function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High"}(K||(K={})),function(e){e[e.MarkerCenter=0]="MarkerCenter",e[e.MarkerBounds=1]="MarkerBounds"}(Z||(Z={})),function(e){e[e.None=0]="None",e[e.PropUniform=1]="PropUniform",e[e.PropNonuniform=2]="PropNonuniform",e[e.DifUniform=3]="DifUniform",e[e.DifNonuniform=4]="DifNonuniform"}($||($={})),function(e){e.Tube="Tube",e.Strip="Strip",e.Wall="Wall"}(Q||(Q={})),function(e){e[e.Random=0]="Random",e[e.Increasing=1]="Increasing",e[e.Decreasing=2]="Decreasing",e[e.IncreasingThenDecreasing=3]="IncreasingThenDecreasing"}(ee||(ee={})),function(e){e[e.Relative=0]="Relative",e[e.Absolute=1]="Absolute"}(te||(te={})),function(e){e[e.Normal=0]="Normal",e[e.LowerCase=1]="LowerCase",e[e.Allcaps=2]="Allcaps"}(ie||(ie={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(ne||(ne={})),function(e){e.Draft="Draft",e.Picture="Picture",e.Text="Text"}(re||(re={})),function(e){e[e.Top=0]="Top",e[e.Center=1]="Center",e[e.Baseline=2]="Baseline",e[e.Bottom=3]="Bottom"}(oe||(oe={})),function(e){e[e.Right=0]="Right",e[e.Upright=1]="Upright"}(se||(se={})),function(e){e[e.Small=0]="Small",e[e.Medium=1]="Medium",e[e.Large=2]="Large"}(ae||(ae={})),function(e){e[e.Calm=0]="Calm",e[e.Rippled=1]="Rippled",e[e.Slight=2]="Slight",e[e.Moderate=3]="Moderate"}(le||(le={}))},ac41f:function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=i("b2b2"),r=i("db21");function o(e,t){if(e.priority-t.priority)return e.priority-t.priority;const i=e.tile.key,n=t.tile.key;return i.world-n.world?i.world-n.world:i.level-n.level?i.level-n.level:i.row-n.row?i.row-n.row:i.col-n.col?i.col-n.col:e.xTile-t.xTile?e.xTile-t.xTile:e.yTile-t.yTile}class s{constructor(e,t,i,n,r,o){this._visibleTiles=e,this._symbolRepository=t,this._createCollisionJob=i,this._assignTileSymbolsOpacity=n,this._symbolLayerSorter=r,this._isLayerVisible=o,this._selectionJob=null,this._selectionJobCompleted=!1,this._collisionJob=null,this._collisionJobCompleted=!1,this._opacityJob=null,this._opacityJobCompleted=!1,this._running=!0}get running(){return this._running}setScreenSize(e,t){this._screenWidth===e&&this._screenHeight===t||this.restart(),this._screenWidth=e,this._screenHeight=t}restart(){this._selectionJob=null,this._selectionJobCompleted=!1,this._collisionJob=null,this._collisionJobCompleted=!1,this._opacityJob=null,this._opacityJobCompleted=!1,this._running=!0}continue(e){if(this._selectionJob||(this._selectionJob=this._createSelectionJob()),!this._selectionJobCompleted){const t=performance.now();if(!this._selectionJob.work(e))return!1;if(this._selectionJobCompleted=!0,0===(e=Math.max(0,e-(performance.now()-t))))return!1}if(this._collisionJob||(this._collisionJob=this._createCollisionJob(this._selectionJob.sortedSymbols,this._screenWidth,this._screenHeight)),!this._collisionJobCompleted){const t=performance.now();if(!this._collisionJob.work(e))return!1;if(this._collisionJobCompleted=!0,0===(e=Math.max(0,e-(performance.now()-t))))return!1}if(this._opacityJob||(this._opacityJob=this._createOpacityJob()),!this._opacityJobCompleted){const t=performance.now();if(!this._opacityJob.work(e))return!1;if(this._opacityJobCompleted=!0,0===(e=Math.max(0,e-(performance.now()-t))))return!1}return this._running=!1,!0}_createSelectionJob(){const e=this._symbolRepository.uniqueSymbols;for(let o=0;os)return!1;let e=null,t=!1,n=!1;for(const i of a.tileSymbols)if(!n||!t){const r=i.tile;(!e||r.isCoverage||r.neededForCoverage&&!t)&&(e=i,(r.neededForCoverage||r.isCoverage)&&(n=!0),r.isCoverage&&(t=!0))}if(e.selectedForRendering=!0,n){u.symbols.push(e),a.show=!0;for(const e of a.parts)e.show=!0}else a.show=!1}}for(const e of t)e.symbols.sort(o);return!0}const a=this._symbolLayerSorter;return{work:s,get sortedSymbols(){return t.sort(a)}}}_createOpacityJob(){const e=this._assignTileSymbolsOpacity,t=this._visibleTiles;let i=0;function r(t,i){const n=t.symbols;for(const[e,r]of n)a(r,i);e(t,i);for(const e of t.childrenTiles)r(e,i)}return{work(e){const o=performance.now();for(;ie)return!1;const s=t[i];Object(n["k"])(s.parentTile)||r(s,performance.now())}return!0}}}}function a(e,t){for(const i of e){const e=i.unique;for(const i of e.parts){const n=i.targetOpacity>.5?1:-1;i.startOpacity+=n*((t-i.startTime)/r["d"]),i.startOpacity=Math.min(Math.max(i.startOpacity,0),1),i.startTime=t,i.targetOpacity=e.show&&i.show?1:0}}}},bf7f:function(e,t,i){"use strict";function n(e,t,i,n,r,o){e.fillStyle=t,e.fillRect(i,n,r,o)}function r(e,t,i,n,r,o){e.strokeStyle=t,e.strokeRect(i,n,r,o)}function o(e,t){const i=window.COLLISION_XRAY;for(let o=0;or[e].max)&&(r[e].max=t)}i.d(t,"a",(function(){return o})),i.d(t,"b",(function(){return s}))},c84e:function(e,t,i){"use strict";var n,r,o,s,a,l,c;i.d(t,"a",(function(){return c})),i.d(t,"b",(function(){return s})),i.d(t,"c",(function(){return o})),i.d(t,"d",(function(){return n})),i.d(t,"e",(function(){return a})),i.d(t,"f",(function(){return l})),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"}(n||(n={})),function(e){e[e.SUCCEEDED=0]="SUCCEEDED",e[e.FAILED_OUT_OF_MEMORY=1]="FAILED_OUT_OF_MEMORY"}(r||(r={})),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"}(o||(o={})),function(e){e[e.SIZE=0]="SIZE",e[e.COLOR=1]="COLOR",e[e.OPACITY=2]="OPACITY",e[e.ROTATION=3]="ROTATION"}(s||(s={})),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"}(a||(a={})),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"}(l||(l={})),function(e){e[e.SPRITE=0]="SPRITE",e[e.GLYPH=1]="GLYPH"}(c||(c={}))},c8dd:function(e,t,i){"use strict";i.d(t,"a",(function(){return W})),i.d(t,"b",(function(){return z})),i.d(t,"c",(function(){return F})),i.d(t,"d",(function(){return de})),i.d(t,"e",(function(){return q})),i.d(t,"f",(function(){return G})),i.d(t,"g",(function(){return Q})),i.d(t,"h",(function(){return ee})),i.d(t,"i",(function(){return U})),i.d(t,"j",(function(){return V})),i.d(t,"k",(function(){return ue})),i.d(t,"l",(function(){return X})),i.d(t,"m",(function(){return J})),i.d(t,"n",(function(){return P})),i.d(t,"o",(function(){return ne})),i.d(t,"p",(function(){return H})),i.d(t,"q",(function(){return se})),i.d(t,"r",(function(){return k})),i.d(t,"s",(function(){return re})),i.d(t,"t",(function(){return ie})),i.d(t,"u",(function(){return B})),i.d(t,"v",(function(){return oe})),i.d(t,"w",(function(){return le})),i.d(t,"x",(function(){return te})),i.d(t,"y",(function(){return ae})),i.d(t,"z",(function(){return ce})),i.d(t,"A",(function(){return N}));var n=i("ce50"),r=i("e92d"),o=(i("38a4"),i("a915"),i("ab39")),s=(i("a9a2"),i("c84e")),a=i("ecd7");class l{constructor(){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}acquire(e,t,i,n,r,o,s,a,l){this.color=e,this.haloColor=t,this.haloSize=i,this.size=n,this.angle=r,this.offsetX=o,this.offsetY=s,this.hAnchor=a,this.vAnchor=l}release(){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}}l.pool=new a["a"](l);var c=i("d17d"),u=(i("a1ff"),i("3f3e"));const d=r["a"].getLogger("esri.views.2d.engine.webgl.Utils"),h="geometry",f=[{name:h,strideInBytes:36}],_=[{name:h,strideInBytes:32}],p=[{name:h,strideInBytes:20}],m=[{name:h,strideInBytes:12}],g=[{name:h,strideInBytes:40}],v=[{name:h,strideInBytes:36}],y=[{name:h,strideInBytes:36}];function S(e){const t={};for(const i of e)t[i.name]=i.strideInBytes;return t}const b=S(f),w=S(_),T=S(p),x=S(m),C=S(g),I=S(v),R=S(y);function P(e,{fill:t}){switch(e){case s["d"].MARKER:return b;case s["d"].FILL:return"dot-density"===t?x:"simple"===t?T:w;case s["d"].LINE:return C;case s["d"].TEXT:return I;case s["d"].LABEL:return R}}const L=[h],O=[h],A=[h],M=[h],E=[h];function D(e){switch(e){case s["d"].MARKER:return L;case s["d"].FILL:return O;case s["d"].LINE:return A;case s["d"].TEXT:return M;case s["d"].LABEL:return E}}function N(e){switch(e%4){case 0:case 2:return 4;case 1:case 3:return 1}}function z(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)}}function F(e,t){switch(t%4){case 0:case 2:return new Uint32Array(e);case 1:case 3:return new Uint8Array(e)}}function k(e){return null!=e}function B(e){return"number"==typeof e}function U(e){switch(e){case"butt":return o["d"].BUTT;case"round":return o["d"].ROUND;case"square":return o["d"].SQUARE;default:return d.error(new n["a"]("mapview-invalid-type",`Cap type ${e} is not a valid option. Defaulting to round`)),o["d"].ROUND}}function V(e){switch(e){case"miter":return o["o"].MITER;case"bevel":return o["o"].BEVEL;case"round":return o["o"].ROUND;default:return d.error(new n["a"]("mapview-invalid-type",`Join type ${e} is not a valid option. Defaulting to round`)),o["o"].ROUND}}function H(e){switch(e){case"opacity":return s["b"].OPACITY;case"color":return s["b"].COLOR;case"rotation":return s["b"].ROTATION;case"size":return s["b"].SIZE;default:return d.error("Cannot interpret unknown vv: "+e),null}}function q(e,t,i,n,r,o,s){for(const l in o){const t=o[l].stride,n=N(t),s=o[l].data,a=i[l].data,c=t*r.vertexCount/n,u=t*e/n,d=t*r.vertexFrom/n;for(let e=0;e{const t=new u["a"](e.name,e.count,e.type,r,0,e.normalized||!1);return r+=e.count*j(e.type),t}),t[i].forEach(e=>e.stride=r)}return t}const K=e=>{const t=new Map;for(const i in e)for(const n of e[i])t.set(n.name,n.location);return t},Z=e=>{const t={};for(const i in e){const n=e[i];t[i]=n.length?n[0].stride:0}return t},$=new Map,Q=(e,t)=>{if(!$.has(e)){const i=Y(t),n={strides:Z(i),bufferLayouts:i,attributes:K(t)};$.set(e,n)}return $.get(e)};function ee(e){e(s["d"].FILL),e(s["d"].LINE),e(s["d"].MARKER),e(s["d"].TEXT),e(s["d"].LABEL)}const te=e=>"path"in e&&he(e.path),ie=e=>"url"in e&&e.url||"imageData"in e&&e.imageData,ne=e=>"imageData"in e&&e.imageData&&"contentType"in e&&e.contentType?`data:${e.contentType};base64,${e.imageData}`:"url"in e?e.url:null,re=e=>"url"in e&&e.url&&e.url.includes(".gif")||"contentType"in e&&"image/gif"===e.contentType||"imageData"in e&&e.imageData.includes("data:image/gif"),oe=e=>"url"in e&&e.url&&e.url.includes(".png")||"contentType"in e&&"image/png"===e.contentType||"imageData"in e&&e.imageData.includes("data:image/png"),se=e=>e.type&&-1!==e.type.toLowerCase().indexOf("3d");function ae(e){switch(e.type){case"line":{const t=e;return"CIMSolidStroke"===t.cim.type&&!t.dashTemplate}case"fill":return"CIMSolidFill"===e.cim.type;case"esriSFS":return"esriSFSSolid"===e.style||"esriSFSNull"===e.style;case"esriSLS":return"esriSLSSolid"===e.style||"esriSLSNull"===e.style;default:return!1}}const le=e=>e.includes("data:image/svg+xml");function ce(e){switch("cim"in e?e.cim.type:e.type){case"esriSMS":case"esriPMS":case"CIMPointSymbol":case"CIMVectorMarker":case"CIMPictureMarker":case"CIMCharacterMarker":return!1;default:return!0}}function ue(e){const t="maxVVSize"in e&&e.maxVVSize,i="width"in e&&e.width||"size"in e&&e.size||0;return t||i}function de(e){const t=[];for(let i=0;i!!e&&(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4))},ce88:function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return z}));var n=i("a4ee"),r=i("ce50"),o=i("b2b2"),s=i("f4cc"),a=i("3795"),l=i("59b2"),c=(i("b50f"),i("c120"),i("cea0"),i("d386"));class u{constructor(e,t){this.lockedSchemaPixelSize=e,this.isGCS=t}getLevelRowColumn(e){return this.isGCS?[e[0],e[1]>>1,e[2]>>1]:256===this.lockedSchemaPixelSize&&e[0]>0?[e[0]-1,e[1]>>1,e[2]>>1]:e}adjustLevel(e){return this.isGCS?e:256===this.lockedSchemaPixelSize?e>0?e-1:0:e}getShift(e,t){let i=0,n=0;return(256===this.lockedSchemaPixelSize||this.isGCS)&&(e[2]%2&&(i=t),e[1]%2&&(n=t)),[i,n]}getScale(e){if(this.isGCS){if(512===this.lockedSchemaPixelSize)return 4}else if(256===this.lockedSchemaPixelSize&&0===e)return 1;return 2}}var d=i("aefa"),h=i("8c71"),f=i("9180"),_=i("66b9"),p=i("81af"),m=i("cba1"),g=i("51b2"),v=i("ac41f"),y=i("d5e4"),S=i("bc05"),b=i("ef89");function w(e,t){const i=[],n=new y["a"](4096,i,()=>{const e=new m["b"];return e.show=!1,e.parts.push({startTime:0,startOpacity:0,targetOpacity:0,show:!1}),e.parts.push({startTime:0,startOpacity:0,targetOpacity:0,show:!1}),e}),r=new v["a"](i,n,(t,i,n)=>new g["a"](t,i,n,e.styleRepository,e.key.level,0),(e,t)=>{Object(S["d"])(e,t,!1)},()=>0,e=>{const i=t.getStyleLayerByUID(e).getLayoutProperty("visibility");return!i||i.getValue()!==b["j"].NONE});i.push(e),n.add(e),r.setScreenSize(512,512),r.continue(1/0)}var T=i("ae54");class x extends p["a"]{constructor(e,t,i,n,r){super(e,t,i),this._memCache=n,this._loader=r,this._ongoingTileRequests=new Map,this._ongoingRequestToController=new Map}destroy(){this._ongoingRequestToController.forEach(e=>e.abort()),this._ongoingRequestToController.clear(),this._ongoingTileRequests.clear()}async getVectorTile(e,t,i,n){const r=new T["a"](e,t,i,0);let a=this._memCache.get(r.id);if(Object(o["k"])(a))return a.retain(),a;const l=await this._getVectorTileData(r);if(Object(s["v"])(n),!this._layer)return null;if(a=this._memCache.get(r.id),Object(o["k"])(a))return a.retain(),a;const c=this._layer.tileInfo.getTileBounds(Object(f["l"])(),r);return a=new _["a"](r,c[0],c[3],512,512,this._styleRepository,this._memCache),Object(o["k"])(l)?(a.setData(l),a.retain(),this._memCache.put(r.id,a,a.memoryUsage*a.referenced,d["a"])):a.setData(null),a.neededForCoverage=!0,a.transforms.tileUnitsToPixels=Object(h["c"])(1/8,0,0,0,1/8,0,0,0,1),w(a,this._styleRepository),a}_getVectorTileData(e){const t=e.id;if(this._ongoingTileRequests.has(t))return this._ongoingTileRequests.get(t);const i=new AbortController,n={signal:i.signal},r=this._getParsedVectorTileData(e,n).then(e=>(this._ongoingTileRequests.delete(t),this._ongoingRequestToController.delete(t),e)).catch(()=>(this._ongoingTileRequests.delete(t),this._ongoingRequestToController.delete(t),null));return this._ongoingTileRequests.set(t,r),this._ongoingRequestToController.set(t,i),r}_getParsedVectorTileData(e,t){return this.fetchTileData(e,t).then(i=>this.parseTileData({key:e,data:i},t))}request(e,t){return this._loader.request(e,"binary",t)}}var C=i("3b1a"),I=i("361b"),R=i("d17d");const P=1e-6;class L{constructor(e,t){this.spriteMosaic=e,this.glyphMosaic=t,this._brushCache=new Map,this._vtlMaterialManager=new I["a"]}dispose(){this._brushCache&&(this._brushCache.forEach(e=>e.dispose()),this._brushCache=null),this._vtlMaterialManager=Object(o["e"])(this._vtlMaterialManager),this.spriteMosaic.dispose(),this.glyphMosaic.dispose()}get vectorTilesMaterialManager(){return this._vtlMaterialManager}drawTile(e,t,i){const{context:n}=e,r=i.layers;i.backgroundBucketIds.length>0&&(e.renderPass="background",i.backgroundBucketIds.forEach(n=>this._renderStyleLayer(i.getLayerById(n),e,t,!0))),n.setBlendingEnabled(!1),n.setDepthTestEnabled(!0),n.setDepthWriteEnabled(!0),n.setDepthFunction(R["h"].LEQUAL),e.renderPass="opaque";for(let o=r.length-1;o>=0;o--)this._renderStyleLayer(r[o],e,t,!1);n.setDepthWriteEnabled(!1),n.setBlendingEnabled(!0),n.setBlendFunctionSeparate(R["b"].ONE,R["b"].ONE_MINUS_SRC_ALPHA,R["b"].ONE,R["b"].ONE_MINUS_SRC_ALPHA),e.renderPass="translucent";for(let o=0;oa+P||void 0!==e.maxzoom&&e.maxzoom<=a-P||(t.styleLayerUID=e.uid,t.styleLayer=e,this._drawWithBrush(t,i,s))}_drawWithBrush(e,t,i){if(!this._brushCache.has(i)){const e=C["b"][i];this._brushCache.set(i,new e)}this._brushCache.get(i).drawMany(e,[t])}}var O=i("901e"),A=i("66af"),M=i("45e3"),E=i("8b9d"),D=i("365a");let N=class extends(Object(M["a"])(Object(A["a"])(D["a"]))){constructor(){super(...arguments),this.type="vector-tile-3d"}initialize(){if(Object(o["j"])(this.layer.fullExtent))return void this.addResolvingPromise(Promise.reject(new r["a"]("vectortilelayerview:full-extent-undefined","This layer view's layer does not define a fullExtent.")));const{basemapTerrain:e,spatialReference:t,pixelRatio:i,viewingMode:n}=this.view,l="local"===n&&!Object(E["s"])(t)||E["q"].force512VTL,c=this.layer.tileInfo.spatialReference.isGeographic,d=l?this.layer.tileInfo:this.layer.tileInfo.getOrCreateCompatible(256,c?1:2),h=this._getTileInfoSupportError(d,this.layer.fullExtent);if(Object(o["k"])(h))return this.addResolvingPromise(Promise.reject(h));const f=Object(a["l"])(this.view,"basemapTerrain.tilingSchemeLocked").then(()=>{const t=e.tilingScheme,i=t.pixelSize;let n;if(this.schemaHelper=new u(i,e.spatialReference.isGeographic),256===i){const e=this.layer.tileInfo.spatialReference.isGeographic;n=this.layer.tileInfo.getOrCreateCompatible(256,e?1:2)}else n=this.view.spatialReference.isGeographic?this.layer.tileInfo.getOrCreateCompatible(512,.5):this.layer.tileInfo;const r=this._getTileInfoCompatibilityError(n,t);if(r)throw r;this.tileInfo=n});this._tileHandlerController=new AbortController;const _=this.view.resourceController;this._memCache=_.memoryController.newCache(this.layer.uid,e=>{e.release()});const{style:p}=this.layer.currentStyleInfo,m=new O["a"](p),g=e.mapTileRequester;this._tileHandler=new x(this.layer,m,i,this._memCache,g);const v=this._tileHandlerController.signal,y=e=>_.schedule(e),S=this._tileHandler.start({signal:v,schedule:y}),b=this._tileHandler.spriteMosaic;b.then(e=>{!Object(s["n"])(v)&&this._tileHandler&&(this.painter=new L(e,this._tileHandler.glyphMosaic))}),S.then(()=>this._tileHandlerController=null);const w=()=>{this._tileHandlerController&&this._tileHandlerController.abort(),this._tileHandlerController=new AbortController,this._memCache.clear();const{style:e}=this.layer.currentStyleInfo,t=new O["a"](e),n=new x(this.layer,t,i,this._memCache,g),r=n.start({signal:this._tileHandlerController.signal,schedule:y}),o=n.spriteMosaic;r.then(()=>this._tileHandlerController=null),this.updatingHandles.addPromise(Promise.all([r,o]).then(([,e])=>{const t=this._tileHandler,i=this.painter;this.painter=new L(e,n.glyphMosaic),this._tileHandler=n,this.emit("data-changed"),t.destroy(),i&&i.dispose()}))};this.updatingHandles.add(()=>[this.layer.currentStyleInfo,this.view.pixelRatio],w);const T=Promise.all([f,S,b]);this.addResolvingPromise(T)}destroy(){this.painter=Object(o["e"])(this.painter),this._tileHandlerController&&(this._tileHandlerController.abort(),this._tileHandlerController=null),Object(o["d"])(this._tileHandler),this._memCache=Object(o["d"])(this._memCache),this._tileHandler=null}get dataLevelRange(){const e=this.tileInfo.lods,t=e[0].scale,i=e[e.length-1].scale,n=this.levelRangeFromScaleRange(t,i);return 1===n.minLevel&&256===this.tileInfo.size[0]&&(n.minLevel=0),n}async fetchTile(e,t,i,n){return this._tileHandler.getVectorTile(e,t,i,n)}};Object(n["a"])([Object(l["b"])()],N.prototype,"layer",void 0),Object(n["a"])([Object(l["b"])()],N.prototype,"dataLevelRange",null),Object(n["a"])([Object(l["b"])()],N.prototype,"updatingProgressValue",void 0),N=Object(n["a"])([Object(c["a"])("esri.views.3d.layers.VectorTileLayerView3D")],N);const z=N},d114:function(e,t,i){"use strict";i.d(t,"a",(function(){return o})),i.d(t,"b",(function(){return s})),i.d(t,"c",(function(){return r}));const n=new Float32Array(1);new Uint32Array(n.buffer);function r(e){return[255&e,(65280&e)>>>8,(16711680&e)>>>16,(4278190080&e)>>>24]}function o(e,t){return 65535&e|t<<16}function s(e,t,i,n){return 255&e|(255&t)<<8|(255&i)<<16|n<<24}},d45f:function(e,t,i){"use strict";function n(e){let t="";for(const i in e){const n=e[i];if("boolean"==typeof n)n&&(t+=`#define ${i}\n`);else if("number"==typeof n)t+=`#define ${i} ${n.toFixed()}\n`;else if("object"==typeof n){const e=n.options;let r=0;for(const i in e)t+=`#define ${e[i]} ${(r++).toFixed()}\n`;t+=`#define ${i} ${e[n.value]}\n`}}return t}i.d(t,"a",(function(){return n}))},d5e4:function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var n=i("b2b2"),r=i("bc05");const o=32,s=8,a=64;class l{constructor(e,t,i){this.tileCoordRange=e,this._visibleTiles=t,this._createUnique=i,this._tiles=new Map,this._uniqueSymbolsReferences=new Map}get uniqueSymbols(){return Object(n["j"])(this._uniqueSymbolLayerArray)&&(this._uniqueSymbolLayerArray=this._createUniqueSymbolLayerArray()),this._uniqueSymbolLayerArray}add(e,t){this._uniqueSymbolLayerArray=null;let i=this._tiles.get(e.id);i||(i={symbols:new Map},this._tiles.set(e.id,i));const n=new Map;if(t)for(const r of t)i.symbols.has(r)&&(n.set(r,i.symbols.get(r)),i.symbols.delete(r));else for(const[r,o]of e.layerData)i.symbols.has(r)&&(n.set(r,i.symbols.get(r)),i.symbols.delete(r));this._removeSymbols(n);const l=e.symbols,c=new Map;for(const[u,d]of l){let e=d.length;if(e>=o){let t=this.tileCoordRange;do{t/=2,e/=4}while(e>s&&t>a);const n=new r["a"](this.tileCoordRange,this.tileCoordRange,t);c.set(u,{flat:d,index:n}),i.symbols.set(u,{flat:d,index:n});for(const e of d)n.getCell(e.xTile,e.yTile).push(e)}else c.set(u,{flat:d}),i.symbols.set(u,{flat:d})}this._addSymbols(e.key,l)}deleteStyleLayers(e){this._uniqueSymbolLayerArray=null;for(const[t,i]of this._tiles){const n=new Map;for(const t of e)i.symbols.has(t)&&(n.set(t,i.symbols.get(t)),i.symbols.delete(t));this._removeSymbols(n),0===i.symbols.size&&this._tiles.delete(t)}}removeTile(e){this._uniqueSymbolLayerArray=null;const t=this._tiles.get(e.id);if(!t)return;const i=new Map;for(const[n,r]of e.symbols)t.symbols.has(n)&&(i.set(n,t.symbols.get(n)),t.symbols.delete(n));this._removeSymbols(i),0===t.symbols.size&&this._tiles.delete(e.id)}_removeSymbols(e){for(const[t,{flat:i}]of e)for(const e of i){const i=e.unique,n=i.tileSymbols,r=n.length-1;for(let t=0;tt.level){const i=e.key.level-t.level;if(e.key.row>>i!==t.row||e.key.col>>i!==t.col)return}if(t.level>e.key.level){const i=t.level-e.key.level;if(t.row>>i!==e.key.row||t.col>>i!==e.key.col)return}if(t.equals(e.key)){for(const n of e.childrenTiles)this._matchSymbols(n,t,i);return}const o=new Map;for(const[s,a]of i){const i=[];for(const n of a){const o=Object(r["c"])(this.tileCoordRange,n.xTile,t.level,t.col,e.key.level,e.key.col),s=Object(r["c"])(this.tileCoordRange,n.yTile,t.level,t.row,e.key.level,e.key.row);o>=0&&o=0&&s0&&o.set(s,l)}for(const n of e.childrenTiles)this._matchSymbols(n,t,o)}_createUniqueSymbolLayerArray(){const e=this._uniqueSymbolsReferences,t=new Array(e.size);let i,n=0;for(const[r,o]of e){const e=new Array(o.size);i=0;for(const t of o)e[i++]=t;t[n]={styleLayerUID:r,uniqueSymbols:e},n++}return t}}}}]); //# sourceMappingURL=chunk-4efe1192.3d6ac362.js.map