@arcgis/core 4.33.0-next.20250324 → 4.33.0-next.20250326

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/arcade/arcadeAsyncRuntime.js +1 -1
  2. package/arcade/arcadeCompiler.js +1 -1
  3. package/arcade/arcadeRuntime.js +1 -1
  4. package/arcade/containerUtils.js +1 -1
  5. package/arcade/functions/date.js +1 -1
  6. package/arcade/functions/feature.js +1 -1
  7. package/arcade/functions/featuresetbase.js +1 -1
  8. package/arcade/functions/featuresetgeom.js +1 -1
  9. package/arcade/functions/featuresetstats.js +1 -1
  10. package/arcade/functions/featuresetstring.js +1 -1
  11. package/arcade/functions/fieldStats.js +1 -1
  12. package/arcade/functions/geomasync.js +1 -1
  13. package/arcade/functions/geometry.js +1 -1
  14. package/arcade/functions/geomsync.js +1 -1
  15. package/arcade/functions/knowledgegraph.js +1 -1
  16. package/arcade/functions/maths.js +1 -1
  17. package/arcade/functions/stats.js +1 -1
  18. package/arcade/functions/string.js +1 -1
  19. package/arcade/geometry/functions.js +1 -1
  20. package/arcade/languageUtils.js +1 -1
  21. package/assets/esri/core/workers/RemoteClient.js +1 -1
  22. package/assets/esri/core/workers/chunks/0059295780fa4a090f30.js +319 -0
  23. package/assets/esri/core/workers/chunks/{8f4bcca8b0525e19374f.js → 042771b4e56355924140.js} +1 -1
  24. package/assets/esri/core/workers/chunks/09c9e4e94f09ba9f4c22.js +1 -0
  25. package/assets/esri/core/workers/chunks/{3bea1400160042dca9f3.js → 0e82365be7d9257e7cb2.js} +1 -1
  26. package/assets/esri/core/workers/chunks/1dd6d68d23ba07587ae4.js +1 -0
  27. package/assets/esri/core/workers/chunks/{fef46b841e8369b30227.js → 2873cb727c59328074db.js} +1 -1
  28. package/assets/esri/core/workers/chunks/3808f10747cecc8a1a9b.js +1 -0
  29. package/assets/esri/core/workers/chunks/{9cfce9414b874878d761.js → 4dc1e7d7ac2a4b0144c4.js} +96 -96
  30. package/assets/esri/core/workers/chunks/{e5e1f8ac53c70427a60b.js → 59e4e780dcdfed555ca5.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{33005043f7084048296d.js → 6ab96eaaad0aaad46db9.js} +1 -1
  32. package/assets/esri/core/workers/chunks/705c1ebb327f680f8519.js +1 -0
  33. package/assets/esri/core/workers/chunks/{bd2dcc55ac3418421ee5.js → 726e3f413824f02fe689.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{4c9160e3d596fe75392d.js → 75ec4d2ae9d427a1434f.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{11f9d7cd95891596b716.js → 77199b4b39ee8b4303de.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{74c01de62ccaed0666e0.js → 81f2f1614ea27f4c2e65.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{d787474e78360c925fd9.js → a59ad50d932da1e28c8f.js} +1 -1
  38. package/assets/esri/core/workers/chunks/afe94e351b4a50d7bc53.js +1 -0
  39. package/assets/esri/core/workers/chunks/{47c04980098dc0c228d7.js → b02ac03503bfff1ff922.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{cbbbaccc0d3683e1c0fe.js → b8a4352f83502449ff95.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{605eddec7aac891ed141.js → ba47e43ef039fe4b8c5c.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{3ee000c92e4d5d21e22d.js → bc3f42401131a12fce9b.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{2cedf4222238c86a98e8.js → c6bcfa99fb222894fa0e.js} +1 -1
  44. package/assets/esri/core/workers/chunks/cb386923200272cf26a9.js +1 -0
  45. package/assets/esri/core/workers/chunks/{a2377969f76640f1d6fe.js → d5d2a4e8e19898d86c6d.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{5f8028928ae8e5d27dda.js → e088edb9ffbaa1ed12eb.js} +1 -1
  47. package/assets/esri/core/workers/chunks/ed831e51c2a03ee95879.js +1 -0
  48. package/assets/esri/core/workers/chunks/{3e9cd82325c473ddbf1f.js → edcc0fefd57323d2cb67.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{065ae931b5891847a06f.js → f28eaf1d3a7f12788bcf.js} +1 -1
  50. package/assets/esri/core/workers/chunks/f9396af9cbfd165e72e2.js +1 -0
  51. package/assets/esri/core/workers/chunks/{f86736a60856ef7fdacb.js → fa3eeb40e2d732c184d8.js} +1 -1
  52. package/chunks/BloomBlur.glsl.js +1 -1
  53. package/chunks/BloomComposition.glsl.js +2 -2
  54. package/chunks/ComponentShader.glsl.js +24 -25
  55. package/chunks/HighlightApply.glsl.js +1 -1
  56. package/chunks/HighlightDownsample.glsl.js +1 -1
  57. package/chunks/HighlightToSingle.glsl.js +1 -1
  58. package/chunks/LineSeries.js +1 -1
  59. package/chunks/ShadowHighlight.glsl.js +1 -1
  60. package/chunks/Theme.js +1 -1
  61. package/chunks/Tick.js +1 -1
  62. package/chunks/WaterSurface.glsl.js +1 -1
  63. package/chunks/aiServices.js +1 -1
  64. package/chunks/array.js +1 -1
  65. package/chunks/chartUtilsAm5.js +1 -1
  66. package/chunks/languageUtils.js +1 -1
  67. package/chunks/nl_NL.js +1 -1
  68. package/chunks/vec32.js +1 -1
  69. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  70. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  71. package/geometry/operators/projectOperator.js +1 -1
  72. package/geometry/operators/shapePreservingProjectOperator.js +1 -1
  73. package/geometry/support/buffer/BufferView.js +1 -1
  74. package/geometry/support/meshUtils/merge.js +1 -1
  75. package/interfaces.d.ts +17 -17
  76. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  77. package/package.json +1 -1
  78. package/rest/support/DirectionLine.js +1 -1
  79. package/rest/support/DirectionPoint.js +1 -1
  80. package/rest/support/PointBarrier.js +1 -1
  81. package/rest/support/PolygonBarrier.js +1 -1
  82. package/rest/support/PolylineBarrier.js +1 -1
  83. package/rest/support/RasterData.js +1 -1
  84. package/rest/support/RouteInfo.js +1 -1
  85. package/rest/support/Stop.js +1 -1
  86. package/support/revision.js +1 -1
  87. package/views/2d/LabelManager.js +1 -1
  88. package/views/2d/engine/vectorTiles/Placement.js +1 -1
  89. package/views/2d/engine/vectorTiles/SourceLayerData.js +1 -1
  90. package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
  91. package/views/2d/engine/vectorTiles/TileManager.js +1 -1
  92. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  93. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  94. package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
  95. package/views/2d/engine/vectorTiles/VectorTileRendererHelper3D.js +1 -1
  96. package/views/2d/engine/vectorTiles/buckets/BaseBucket.js +1 -1
  97. package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +1 -1
  98. package/views/2d/engine/vectorTiles/constants.js +5 -0
  99. package/views/2d/engine/vectorTiles/decluttering/CollisionJob.js +5 -0
  100. package/views/2d/engine/vectorTiles/decluttering/SymbolDeclutterer.js +1 -1
  101. package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
  102. package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
  103. package/views/2d/engine/vectorTiles/decluttering/core.js +1 -1
  104. package/views/2d/engine/vectorTiles/decluttering/jobsUtil.js +1 -1
  105. package/views/2d/engine/vectorTiles/decluttering/util.js +1 -1
  106. package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
  107. package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
  108. package/views/2d/engine/webgl/AFeatureTile.js +1 -1
  109. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  110. package/views/2d/engine/webgl/FeatureTile.js +1 -1
  111. package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
  112. package/views/2d/engine/webgl/cpuMapped/Buffer.js +1 -1
  113. package/views/2d/engine/webgl/cpuMapped/MappedMesh.js +1 -1
  114. package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
  115. package/views/2d/engine/webgl/mesh/MultiTileMeshData.js +1 -1
  116. package/views/2d/engine/webgl/mesh/meshDebugUtils.js +1 -1
  117. package/views/2d/engine/webgl/mesh/templates/segmentUtils.js +1 -1
  118. package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
  119. package/views/2d/engine/webgl/shaderGraph/techniques/GraphicInstanceStore.js +1 -1
  120. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  121. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
  122. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/AlignedVertexSpec.js +1 -1
  123. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  124. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  125. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  126. package/views/2d/layers/MediaLayerView2D.js +1 -1
  127. package/views/2d/layers/RouteLayerView2D.js +1 -1
  128. package/views/2d/layers/TileLayerView2D.js +1 -1
  129. package/views/2d/layers/features/FeatureContainer.js +1 -1
  130. package/views/2d/layers/features/RenderState.js +1 -1
  131. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  132. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  133. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  134. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  135. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  136. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  137. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  138. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
  139. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  140. package/views/2d/layers/features/schema/processor/LabelMatcherSchema.js +1 -1
  141. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  142. package/views/2d/layers/features/schema/processor/SubtypeProcessorSchema.js +1 -1
  143. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  144. package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
  145. package/views/2d/layers/support/vectorTileDebugUtils.js +1 -1
  146. package/views/2d/tiling/FeatureTileSubscriptionManager.js +1 -1
  147. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  148. package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
  149. package/views/3d/analysis/Viewshed/ScaleOrientManipulation.js +1 -1
  150. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  151. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  152. package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
  153. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  154. package/views/3d/layers/I3SMeshView3D.js +1 -1
  155. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  156. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  157. package/views/3d/layers/graphics/LabelDeconflictor.js +1 -1
  158. package/views/3d/layers/graphics/Labeler.js +1 -1
  159. package/views/3d/layers/graphics/deconflictorDebug.js +1 -1
  160. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  161. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  162. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  163. package/views/3d/support/QualitySettings.js +1 -1
  164. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  165. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  166. package/views/3d/terrain/OverlayRenderer.js +1 -1
  167. package/views/3d/terrain/PatchRenderData.js +1 -1
  168. package/views/3d/terrain/SphericalPatch.js +1 -1
  169. package/views/3d/terrain/TerrainRenderer.js +1 -1
  170. package/views/3d/terrain/TileCompositor.js +1 -1
  171. package/views/3d/webgl-engine/core/shaderLibrary/HighlightCellGridScreenSpacePass.glsl.js +1 -1
  172. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoubleConfiguration.js +1 -1
  173. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +4 -4
  174. package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +1 -1
  175. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +9 -9
  176. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +2 -2
  177. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +2 -2
  178. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +3 -3
  179. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +6 -6
  180. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js +1 -1
  181. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +1 -1
  182. package/views/3d/webgl-engine/core/shaderModules/{UintTexture2DBindUniform.js → Texture2DUintBindUniform.js} +1 -1
  183. package/views/3d/webgl-engine/core/shaderModules/{UintTexture2DPassUniform.js → Texture2DUintPassUniform.js} +1 -1
  184. package/views/3d/webgl-engine/effects/bloom/BloomBlur.glsl.js +1 -1
  185. package/views/3d/webgl-engine/effects/bloom/BloomBlurTechnique.js +1 -1
  186. package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +1 -1
  187. package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechnique.js +1 -1
  188. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  189. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  190. package/views/3d/webgl-engine/lib/Program.js +1 -1
  191. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  192. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  193. package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
  194. package/views/3d/webgl-engine/lib/triangleIntersectionUtils.js +1 -1
  195. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  196. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  197. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  198. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  199. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  200. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  201. package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
  202. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  203. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  204. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  205. package/views/3d/webgl-engine/shaders/HighlightApply.glsl.js +1 -1
  206. package/views/3d/webgl-engine/shaders/HighlightDownsample.glsl.js +1 -1
  207. package/views/3d/webgl-engine/shaders/HighlightToSingle.glsl.js +1 -1
  208. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  209. package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
  210. package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
  211. package/views/VideoView.js +1 -1
  212. package/views/interactive/SegmentLabels.js +1 -1
  213. package/views/interactive/coordinateHelper.js +1 -1
  214. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  215. package/views/interactive/sketch/constraints.js +1 -1
  216. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  217. package/views/support/geometry3dUtils.js +1 -1
  218. package/views/webgl/ShaderBuilder.js +1 -1
  219. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  220. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  221. package/assets/esri/core/workers/chunks/0e164b19e4ea3aa73843.js +0 -1
  222. package/assets/esri/core/workers/chunks/1034155c525d2b7baaa1.js +0 -1
  223. package/assets/esri/core/workers/chunks/2b9ce6648823f6962f58.js +0 -1
  224. package/assets/esri/core/workers/chunks/88a7780b1c689afff8bd.js +0 -1
  225. package/assets/esri/core/workers/chunks/ac6b582ca180210e596c.js +0 -1
  226. package/assets/esri/core/workers/chunks/accd0661a6dd297fab6b.js +0 -1
  227. package/assets/esri/core/workers/chunks/b5f44cf03c4e5cc07bc4.js +0 -1
  228. package/assets/esri/core/workers/chunks/bfbb118ae3b4a4ce1c74.js +0 -319
  229. package/assets/esri/core/workers/chunks/fa7ddf3c89cdb8052b26.js +0 -1
  230. package/chunks/BloomDepthAdjust.glsl.js +0 -14
  231. package/views/2d/engine/vectorTiles/decluttering/jobs.js +0 -5
  232. package/views/2d/engine/webgl/collisions/CollisionEngine.js +0 -5
  233. package/views/2d/engine/webgl/collisions/CollisionGrid.js +0 -5
  234. package/views/3d/webgl-engine/core/shaderModules/TextureCubeBindUniform.js +0 -5
  235. package/views/3d/webgl-engine/core/shaderModules/UintTexture2DDrawUniform.js +0 -5
  236. package/views/3d/webgl-engine/effects/bloom/BloomDepthAdjust.glsl.js +0 -5
  237. package/views/3d/webgl-engine/effects/bloom/BloomDepthAdjustTechnique.js +0 -5
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5013],{3057:(t,e,r)=>{r.d(e,{lf:()=>St,L:()=>Ut,A4:()=>xt,aR:()=>Ct,tU:()=>Ot,V1:()=>Bt,uU:()=>Gt});var n,i,a=r(19419),o=r(89640),s=r(13195),l=r(80081);!function(t){t[t.R8_SIGNED=0]="R8_SIGNED",t[t.R8_UNSIGNED=1]="R8_UNSIGNED",t[t.R16_SIGNED=2]="R16_SIGNED",t[t.R16_UNSIGNED=3]="R16_UNSIGNED",t[t.R8G8_SIGNED=4]="R8G8_SIGNED",t[t.R8G8_UNSIGNED=5]="R8G8_UNSIGNED",t[t.R16G16_SIGNED=6]="R16G16_SIGNED",t[t.R16G16_UNSIGNED=7]="R16G16_UNSIGNED",t[t.R8G8B8A8_SIGNED=8]="R8G8B8A8_SIGNED",t[t.R8G8B8A8_UNSIGNED=9]="R8G8B8A8_UNSIGNED",t[t.R8G8B8A8_COLOR=10]="R8G8B8A8_COLOR",t[t.R16G16B16A16_DASHARRAY=11]="R16G16B16A16_DASHARRAY",t[t.R16G16B16A16_PATTERN=12]="R16G16B16A16_PATTERN"}(n||(n={})),function(t){t[t.UNIFORM=0]="UNIFORM",t[t.DATA_DRIVEN=1]="DATA_DRIVEN",t[t.INTERPOLATED_DATA_DRIVEN=2]="INTERPOLATED_DATA_DRIVEN",t[t.UNUSED=3]="UNUSED"}(i||(i={}));var u=r(63907),c=r(74038);class h{constructor(t){this._locations=new Map,this._key=t}get key(){return this._key}get type(){return 7&this._key}defines(){return[]}getStride(){return this._layout||this._buildAttributesInfo(),this._stride}getAttributeLocations(){return 0===this._locations.size&&this._buildAttributesInfo(),this._locations}getLayoutInfo(){return this._layout||this._buildAttributesInfo(),this._layout}getEncodingInfos(){return this._propertyEncodingInfo||this._buildAttributesInfo(),this._propertyEncodingInfo}getUniforms(){return this._uniforms||this._buildAttributesInfo(),this._uniforms}getShaderHeader(){return this._shaderHeader||this._buildAttributesInfo(),this._shaderHeader}getShaderMain(){return this._shaderMain||this._buildAttributesInfo(),this._shaderMain}setDataUniforms(t,e,r,n,i){const a=this.getUniforms();for(const o of a){const{name:a,type:s,getValue:l}=o,u=l(r,e,n,i);if(null!==u)switch(s){case"float":t.setUniform1f(a,u);break;case"vec2":t.setUniform2fv(a,u);break;case"vec4":t.setUniform4fv(a,u)}}}encodeAttributes(t,e,r,i){const a=this.attributesInfo(),o=this.getEncodingInfos(),s=[];let l=0,u=0;for(const c of Object.keys(o)){const h=o[c],{type:p,precisionFactor:f,isLayout:y}=a[c],g=y?r.getLayoutProperty(c):r.getPaintProperty(c),d=g.interpolator?.getInterpolationRange(e);let m=0;for(const r of h){const{offset:a,bufferElementsToAdd:o}=r;if(o>0){for(let t=0;t<o;t++)s.push(0);l+=u,u=r.bufferElementsToAdd}const c=i??g.getValue(d?d[m]:e,t);switch(p){case n.R8_SIGNED:case n.R8_UNSIGNED:s[l]|=this._encodeByte(c*(f||1),8*a);break;case n.R16_SIGNED:case n.R16_UNSIGNED:s[l]|=this._encodeShort(c*(f||1),8*a);break;case n.R8G8_SIGNED:case n.R8G8_UNSIGNED:s[l]|=this._encodeByte(c*(f||1),8*a),s[l]|=this._encodeByte(c*(f||1),8*a+8);break;case n.R16G16_SIGNED:case n.R16G16_UNSIGNED:s[l]|=this._encodeShort(c*(f||1),8*a),s[l]|=this._encodeShort(c*(f||1),8*a+16);break;case n.R8G8B8A8_SIGNED:case n.R8G8B8A8_UNSIGNED:s[l]|=this._encodeByte(c*(f||1),8*a),s[l]|=this._encodeByte(c*(f||1),8*a+8),s[l]|=this._encodeByte(c*(f||1),8*a+16),s[l]|=this._encodeByte(c*(f||1),8*a+24);break;case n.R8G8B8A8_COLOR:s[l]=this._encodeColor(c);break;case n.R16G16B16A16_DASHARRAY:case n.R16G16B16A16_PATTERN:this._encodePattern(l,s,c);break;default:throw new Error("Unsupported encoding type")}m++}}return s}getAtributeState(t){let e=0;const r=3+2*t;return e|=this._bit(r),e|=this._bit(r+1)<<1,e}static{this._encodingInfo={[n.R8_SIGNED]:{dataType:u.pe.BYTE,bytesPerElement:1,count:1,normalized:!1},[n.R8_UNSIGNED]:{dataType:u.pe.UNSIGNED_BYTE,bytesPerElement:1,count:1,normalized:!1},[n.R16_SIGNED]:{dataType:u.pe.SHORT,bytesPerElement:2,count:1,normalized:!1},[n.R16_UNSIGNED]:{dataType:u.pe.UNSIGNED_SHORT,bytesPerElement:2,count:1,normalized:!1},[n.R8G8_SIGNED]:{dataType:u.pe.BYTE,bytesPerElement:1,count:2,normalized:!1},[n.R8G8_UNSIGNED]:{dataType:u.pe.UNSIGNED_BYTE,bytesPerElement:1,count:2,normalized:!1},[n.R16G16_SIGNED]:{dataType:u.pe.SHORT,bytesPerElement:2,count:2,normalized:!1},[n.R16G16_UNSIGNED]:{dataType:u.pe.UNSIGNED_SHORT,bytesPerElement:2,count:2,normalized:!1},[n.R8G8B8A8_SIGNED]:{dataType:u.pe.BYTE,bytesPerElement:1,count:4,normalized:!1},[n.R8G8B8A8_UNSIGNED]:{dataType:u.pe.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!1},[n.R8G8B8A8_COLOR]:{dataType:u.pe.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!0},[n.R16G16B16A16_DASHARRAY]:{dataType:u.pe.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1},[n.R16G16B16A16_PATTERN]:{dataType:u.pe.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1}}}_buildAttributesInfo(){const t=[],e={},r={};let n=-1;const a=this.attributesInfo(),o=this.attributes();let s=-1;for(const l of o){s++;const o=this.getAtributeState(s);if(o===i.UNIFORM||o===i.UNUSED)continue;const u=a[l],c=[];e[l]=c;const p=u.type;for(let e=0;e<o;e++){const{dataType:e,bytesPerElement:i,count:a,normalized:o}=h._encodingInfo[p],s=i*a,l=`${e}-${!0===o}`;let u=r[l],f=0;if(!u||u.count+a>4)n++,u={dataIndex:n,count:0,offset:0},4!==a&&(r[l]=u),t.push({location:-1,name:"a_data_"+n,count:a,type:e,normalized:o}),f=Math.ceil(Math.max(s/4,1));else{const e=t[u.dataIndex];e.count+=a,f=Math.ceil(Math.max(e.count*i/4,1))-Math.ceil(Math.max(u.offset/4,1))}c.push({dataIndex:u.dataIndex,offset:u.offset,bufferElementsToAdd:f}),u.offset+=s,u.count+=a}}for(const e of t)switch(e.type){case u.pe.BYTE:case u.pe.UNSIGNED_BYTE:e.count=4;break;case u.pe.SHORT:case u.pe.UNSIGNED_SHORT:e.count+=e.count%2}this._buildVertexBufferLayout(t);let l=0;const c=this._layout.get("geometry");for(const t of c)this._locations.set(t.name,l++);const p=this._layout.get("opacity");if(p)for(const t of p)this._locations.set(t.name,l++);this._buildShaderInfo(t,e),this._propertyEncodingInfo=e}_buildVertexBufferLayout(t){const e=new Map,r=this.geometryInfo();let n=r[0].stride;if(0===t.length)e.set("geometry",r);else{const i=[];let a=n;for(const e of t)n+=p(e.type)*e.count;for(const t of r)i.push(new c._(t.name,t.count,t.type,t.offset,n,t.normalized));for(const e of t)i.push(new c._(e.name,e.count,e.type,a,n,e.normalized)),a+=p(e.type)*e.count;e.set("geometry",i)}const i=this.opacityInfo();i&&e.set("opacity",i),this._layout=e,this._stride=n}_buildShaderInfo(t,e){let r="\n",a="\n";const o=[];for(const e of t)r+=`attribute ${this._getType(e.count)} ${e.name};\n`;const s=this.attributes(),l=this.attributesInfo();let u=-1;for(const t of s){u++;const{name:s,type:c,precisionFactor:p,isLayout:y}=l[t],g=p&&1!==p?" * "+1/p:"",{bytesPerElement:d,count:m}=h._encodingInfo[c],_=t=>`a_data_${t.dataIndex}${f(m,t.offset,d)}`;switch(this.getAtributeState(u)){case i.UNIFORM:{const e=this._getType(m),i=`u_${s}`;o.push({name:i,type:e,getValue:(e,r,i,a)=>{const o=y?e.getLayoutValue(t,r):e.getPaintValue(t,r);if(c===n.R16G16B16A16_DASHARRAY){const t=e.getDashKey(o,e.getLayoutValue("line-cap",r)),n=a.getMosaicItemPosition(t,!1);if(null==n)return null;const{tl:i,br:s}=n;return[i[0],s[1],s[0],i[1]]}if(c===n.R16G16B16A16_PATTERN){const e=a.getMosaicItemPosition(o,!t.includes("line-"));if(null==e)return null;const{tl:r,br:n}=e;return[r[0],n[1],n[0],r[1]]}if(c===n.R8G8B8A8_COLOR){const t=o[3];return[t*o[0],t*o[1],t*o[2],t]}return o}}),r+=`uniform ${e} ${i};\n`,a+=`${e} ${s} = ${i};\n`}break;case i.DATA_DRIVEN:{const r=_(e[t][0]);a+=`${this._getType(m)} ${s} = ${r}${g};\n`}break;case i.INTERPOLATED_DATA_DRIVEN:{const n=`u_t_${s}`;o.push({name:n,type:"float",getValue:(e,r,n,i)=>(y?e.getLayoutProperty(t):e.getPaintProperty(t)).interpolator.interpolationUniformValue(n,r)}),r+=`uniform float ${n};\n`;const i=_(e[t][0]),l=_(e[t][1]);a+=`${this._getType(m)} ${s} = mix(${i}${g}, ${l}${g}, ${n});\n`}}}this._shaderHeader=r,this._shaderMain=a,this._uniforms=o}_bit(t){return(this._key&1<<t)>>t}_getType(t){switch(t){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4"}throw new Error("Invalid count")}_encodeColor(t){const e=255*t[3];return l.A.i8888to32(t[0]*e,t[1]*e,t[2]*e,e)}_encodePattern(t,e,r){if(!r?.rect)return;const n=r.rect,i=r.width,a=r.height;e[t]=this._encodeShort(n.x+2,0),e[t]|=this._encodeShort(n.y+2+a,16),e[t+1]=this._encodeShort(n.x+2+i,0),e[t+1]|=this._encodeShort(n.y+2,16)}_encodeByte(t,e){return(255&t)<<e}_encodeShort(t,e){return(65535&t)<<e}}const p=t=>{switch(t){case u.pe.FLOAT:case u.pe.INT:case u.pe.UNSIGNED_INT:return 4;case u.pe.SHORT:case u.pe.UNSIGNED_SHORT:case u.pe.HALF_FLOAT:return 2;case u.pe.BYTE:case u.pe.UNSIGNED_BYTE:return 1}},f=(t,e,r)=>{const n=e/r;if(1===t)switch(n){case 0:return".x";case 1:return".y";case 2:return".z";case 3:return".w"}else if(2===t)switch(n){case 0:return".xy";case 1:return".yz";case 2:return".zw"}else if(3===t)switch(n){case 0:return".xyz";case 1:return".yzw"}return""};class y extends h{static{this.ATTRIBUTES=[]}static{this.GEOMETRY_LAYOUT=[new c._("a_pos",2,u.pe.BYTE,0,2)]}static{this.ATTRIBUTES_INFO={}}constructor(t){super(t)}geometryInfo(){return y.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return y.ATTRIBUTES}attributesInfo(){return y.ATTRIBUTES_INFO}}class g extends h{static{this.ATTRIBUTES=["circle-radius","circle-color","circle-opacity","circle-stroke-width","circle-stroke-color","circle-stroke-opacity","circle-blur"]}static{this.GEOMETRY_LAYOUT=[new c._("a_pos",2,u.pe.SHORT,0,4)]}static{this.ATTRIBUTES_INFO={"circle-radius":{name:"radius",type:n.R8_UNSIGNED},"circle-color":{name:"color",type:n.R8G8B8A8_COLOR},"circle-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"circle-stroke-width":{name:"stroke_width",type:n.R8_UNSIGNED,precisionFactor:4},"circle-stroke-color":{name:"stroke_color",type:n.R8G8B8A8_COLOR},"circle-stroke-opacity":{name:"stroke_opacity",type:n.R8_UNSIGNED,precisionFactor:100},"circle-blur":{name:"blur",type:n.R8_UNSIGNED,precisionFactor:32}}}constructor(t){super(t)}geometryInfo(){return g.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return g.ATTRIBUTES}attributesInfo(){return g.ATTRIBUTES_INFO}}class d extends h{static{this.ATTRIBUTES=["fill-color","fill-opacity","fill-pattern"]}static{this.GEOMETRY_LAYOUT=[new c._("a_pos",2,u.pe.SHORT,0,4)]}static{this.ATTRIBUTES_INFO={"fill-color":{name:"color",type:n.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"fill-pattern":{name:"tlbr",type:n.R16G16B16A16_PATTERN,isOptional:!0}}}constructor(t){super(t)}geometryInfo(){return d.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return d.ATTRIBUTES}attributesInfo(){return d.ATTRIBUTES_INFO}}class m extends h{static{this.ATTRIBUTES_OUTLINE=["fill-outline-color","fill-opacity"]}static{this.ATTRIBUTES_FILL=["fill-color","fill-opacity"]}static{this.GEOMETRY_LAYOUT=[new c._("a_pos",2,u.pe.SHORT,0,8),new c._("a_offset",2,u.pe.BYTE,4,8),new c._("a_xnormal",2,u.pe.BYTE,6,8)]}static{this.ATTRIBUTES_INFO_OUTLINE={"fill-outline-color":{name:"color",type:n.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100}}}static{this.ATTRIBUTES_INFO_FILL={"fill-color":{name:"color",type:n.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100}}}constructor(t,e){super(t),this._usefillColor=e}geometryInfo(){return m.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return this._usefillColor?m.ATTRIBUTES_FILL:m.ATTRIBUTES_OUTLINE}attributesInfo(){return this._usefillColor?m.ATTRIBUTES_INFO_FILL:m.ATTRIBUTES_INFO_OUTLINE}}class _ extends h{static{this.ATTRIBUTES=["line-blur","line-color","line-gap-width","line-offset","line-opacity","line-width","line-pattern","line-dasharray"]}static{this.GEOMETRY_LAYOUT=[new c._("a_pos",2,u.pe.SHORT,0,16),new c._("a_extrude_offset",4,u.pe.BYTE,4,16),new c._("a_dir_normal",4,u.pe.BYTE,8,16),new c._("a_accumulatedDistance",2,u.pe.UNSIGNED_SHORT,12,16)]}static{this.ATTRIBUTES_INFO={"line-width":{name:"width",type:n.R8_UNSIGNED,precisionFactor:2},"line-gap-width":{name:"gap_width",type:n.R8_UNSIGNED,precisionFactor:2},"line-offset":{name:"offset",type:n.R8_SIGNED,precisionFactor:2},"line-color":{name:"color",type:n.R8G8B8A8_COLOR},"line-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"line-blur":{name:"blur",type:n.R8_UNSIGNED,precisionFactor:4},"line-pattern":{name:"tlbr",type:n.R16G16B16A16_PATTERN,isOptional:!0},"line-dasharray":{name:"tlbr",type:n.R16G16B16A16_DASHARRAY,isOptional:!0}}}constructor(t){super(t)}geometryInfo(){return _.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return _.ATTRIBUTES}attributesInfo(){return _.ATTRIBUTES_INFO}}const b=[new c._("a_pos",2,u.pe.SHORT,0,16),new c._("a_vertexOffset",2,u.pe.SHORT,4,16),new c._("a_texAngleRange",4,u.pe.UNSIGNED_BYTE,8,16),new c._("a_levelInfo",4,u.pe.UNSIGNED_BYTE,12,16)],E=[new c._("a_opacityInfo",1,u.pe.UNSIGNED_BYTE,0,1)];class T extends h{static{this.ATTRIBUTES=["icon-color","icon-opacity","icon-halo-blur","icon-halo-color","icon-halo-width","icon-size"]}static{this.ATTRIBUTES_INFO={"icon-color":{name:"color",type:n.R8G8B8A8_COLOR},"icon-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"icon-halo-color":{name:"halo_color",type:n.R8G8B8A8_COLOR},"icon-halo-width":{name:"halo_width",type:n.R8_UNSIGNED,precisionFactor:4},"icon-halo-blur":{name:"halo_blur",type:n.R8_UNSIGNED,precisionFactor:4},"icon-size":{name:"size",type:n.R8_UNSIGNED,precisionFactor:32,isLayout:!0}}}constructor(t){super(t)}geometryInfo(){return b}opacityInfo(){return E}attributes(){return T.ATTRIBUTES}attributesInfo(){return T.ATTRIBUTES_INFO}}class I extends h{static{this.ATTRIBUTES=["text-color","text-opacity","text-halo-blur","text-halo-color","text-halo-width","text-size"]}static{this.ATTRIBUTES_INFO={"text-color":{name:"color",type:n.R8G8B8A8_COLOR},"text-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"text-halo-color":{name:"halo_color",type:n.R8G8B8A8_COLOR},"text-halo-width":{name:"halo_width",type:n.R8_UNSIGNED,precisionFactor:4},"text-halo-blur":{name:"halo_blur",type:n.R8_UNSIGNED,precisionFactor:4},"text-size":{name:"size",type:n.R8_UNSIGNED,isLayout:!0}}}constructor(t){super(t)}geometryInfo(){return b}opacityInfo(){return E}attributes(){return I.ATTRIBUTES}attributesInfo(){return I.ATTRIBUTES_INFO}}var w=r(68197),R=r(85334),v=r(6774);function N(t,e,r,n){const i=3*t,a=3*(r-t)-i,o=1-i-a,s=3*e,l=3*(n-e)-s,u=1-s-l;function c(t){return((o*t+a)*t+i)*t}function h(t){return(3*o*t+2*a)*t+i}return function(t,e=1e-6){return function(t){return((u*t+l)*t+s)*t}(function(t,e){let r,n,i,a,o,s;for(i=t,s=0;s<8;s++){if(a=c(i)-t,Math.abs(a)<e)return i;if(o=h(i),Math.abs(o)<1e-6)break;i-=a/o}if(r=0,n=1,i=t,i<r)return r;if(i>n)return n;for(;r<n;){if(a=c(i),Math.abs(a-t)<e)return i;t>a?r=i:n=i,i=.5*(n-r)+r}return i}(t,e))}}const A={};A.ease=N(.25,.1,.25,1),A.linear=N(0,0,1,1),A.easeIn=A["ease-in"]=N(.42,0,1,1),A.easeOut=A["ease-out"]=N(0,0,.58,1),A.easeInOut=A["ease-in-out"]=N(.42,0,.58,1);const D={kind:"null"},L={kind:"number"},P={kind:"string"},S={kind:"boolean"},x={kind:"color"},O={kind:"object"},B={kind:"value"};function U(t,e){return{kind:"array",itemType:t,n:e}}const C=[D,L,P,S,x,O,U(B)];function G(t){if("array"===t.kind){const e=G(t.itemType);return"number"==typeof t.n?`array<${e}, ${t.n}>`:"value"===t.itemType.kind?"array":`array<${e}>`}return t.kind}function M(t){if(null===t)return D;if("string"==typeof t)return P;if("boolean"==typeof t)return S;if("number"==typeof t)return L;if(t instanceof w.A)return x;if(Array.isArray(t)){let e;for(const r of t){const t=M(r);if(e){if(e!==t){e=B;break}}else e=t}return U(e||B,t.length)}return"object"==typeof t?O:B}function k(t,e){if("array"===e.kind)return"array"===t.kind&&(0===t.n&&"value"===t.itemType.kind||k(t.itemType,e.itemType))&&("number"!=typeof e.n||e.n===t.n);if("value"===e.kind)for(const e of C)if(k(t,e))return!0;return e.kind===t.kind}function F(t){if(null===t)return"";const e=typeof t;return"string"===e?t:"number"===e||"boolean"===e?String(t):t instanceof w.A?t.toString():JSON.stringify(t)}class V{constructor(t){this._parent=t,this._vars={}}add(t,e){this._vars[t]=e}get(t){return this._vars[t]?this._vars[t]:this._parent?this._parent.get(t):null}}class z{constructor(){this.type=B}static parse(t){if(t.length>1)throw new Error('"id" does not expect arguments');return new z}evaluate(t,e){return t?.id}}class ${constructor(){this.type=P}static parse(t){if(t.length>1)throw new Error('"geometry-type" does not expect arguments');return new $}evaluate(t,e){if(!t)return null;switch(t.type){case v.dC.Point:return"Point";case v.dC.LineString:return"LineString";case v.dC.Polygon:return"Polygon";default:return null}}}class H{constructor(){this.type=O}static parse(t){if(t.length>1)throw new Error('"properties" does not expect arguments');return new H}evaluate(t,e){return t?.values}}class Y{constructor(){this.type=L}static parse(t){if(t.length>1)throw new Error('"zoom" does not expect arguments');return new Y}evaluate(t,e){return e}}class W{constructor(t,e,r){this._lhs=t,this._rhs=e,this._compare=r,this.type=S}static parse(t,e,r){if(3!==t.length&&4!==t.length)throw new Error(`"${t[0]}" expects 2 or 3 arguments`);if(4===t.length)throw new Error(`"${t[0]}" collator not supported`);return new W(wt(t[1],e),wt(t[2],e),r)}evaluate(t,e){return this._compare(this._lhs.evaluate(t,e),this._rhs.evaluate(t,e))}}class q{constructor(t){this._arg=t,this.type=S}static parse(t,e){if(2!==t.length)throw new Error('"!" expects 1 argument');return new q(wt(t[1],e))}evaluate(t,e){return!this._arg.evaluate(t,e)}}class K{constructor(t){this._args=t,this.type=S}static parse(t,e){const r=[];for(let n=1;n<t.length;n++)r.push(wt(t[n],e));return new K(r)}evaluate(t,e){for(const r of this._args)if(!r.evaluate(t,e))return!1;return!0}}class j{constructor(t){this._args=t,this.type=S}static parse(t,e){const r=[];for(let n=1;n<t.length;n++)r.push(wt(t[n],e));return new j(r)}evaluate(t,e){for(const r of this._args)if(r.evaluate(t,e))return!0;return!1}}class Z{constructor(t){this._args=t,this.type=S}static parse(t,e){const r=[];for(let n=1;n<t.length;n++)r.push(wt(t[n],e));return new Z(r)}evaluate(t,e){for(const r of this._args)if(r.evaluate(t,e))return!1;return!0}}class J{constructor(t,e,r){this.type=t,this._args=e,this._fallback=r}static parse(t,e,r){if(t.length<4)throw new Error('"case" expects at least 3 arguments');if(t.length%2==1)throw new Error('"case" expects an odd number of arguments');let n;const i=[];for(let a=1;a<t.length-1;a+=2){const o=wt(t[a],e),s=wt(t[a+1],e,r);n||(n=s.type),i.push({condition:o,output:s})}const a=wt(t[t.length-1],e,r);return n||(n=a.type),new J(n,i,a)}evaluate(t,e){for(const r of this._args)if(r.condition.evaluate(t,e))return r.output.evaluate(t,e);return this._fallback.evaluate(t,e)}}class X{constructor(t,e){this.type=t,this._args=e}static parse(t,e){if(t.length<2)throw new Error('"coalesce" expects at least 1 argument');let r;const n=[];for(let i=1;i<t.length;i++){const a=wt(t[i],e);r||(r=a.type),n.push(a)}return new X(r,n)}evaluate(t,e){for(const r of this._args){const n=r.evaluate(t,e);if(null!==n)return n}return null}}class Q{constructor(t,e,r,n,i){this.type=t,this._input=e,this._labels=r,this._outputs=n,this._fallback=i}static parse(t,e){if(t.length<3)throw new Error('"match" expects at least 3 arguments');if(t.length%2==0)throw new Error('"case" expects an even number of arguments');let r;const n=wt(t[1],e),i=[],a={};let o;for(let n=2;n<t.length-1;n+=2){let s=t[n];Array.isArray(s)||(s=[s]);for(const t of s){const e=typeof t;if("string"!==e&&"number"!==e)throw new Error('"match" requires string or number literal as labels');if(o){if(e!==o)throw new Error('"match" requires labels to have the same type')}else o=e;a[t]=i.length}const l=wt(t[n+1],e);r||(r=l.type),i.push(l)}return new Q(r,n,a,i,wt(t[t.length-1],e))}evaluate(t,e){const r=this._input.evaluate(t,e);return(this._outputs[this._labels[r]]||this._fallback).evaluate(t,e)}}class tt{constructor(t,e,r,n,i){this._operator=t,this.type=e,this.interpolation=r,this.input=n,this._stops=i}static parse(t,e,r){const n=t[0];if(t.length<5)throw new Error(`"${n}" expects at least 4 arguments`);const i=t[1];if(!Array.isArray(i)||0===i.length)throw new Error(`"${i}" is not a valid interpolation`);switch(i[0]){case"linear":if(1!==i.length)throw new Error("Linear interpolation cannot have parameters");break;case"exponential":if(2!==i.length||"number"!=typeof i[1])throw new Error("Exponential interpolation requires one numeric argument");break;case"cubic-bezier":if(5!==i.length)throw new Error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1");for(let t=1;t<5;t++){const e=i[t];if("number"!=typeof e||e<0||e>1)throw new Error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1")}break;default:throw new Error(`"${t[0]}" unknown interpolation type "${i[0]}"`)}if(t.length%2!=1)throw new Error(`"${n}" expects an even number of arguments`);const a=wt(t[2],e,L);let o;"interpolate-hcl"===n||"interpolate-lab"===n?o=x:r&&"value"!==r.kind&&(o=r);const s=[];for(let r=3;r<t.length;r+=2){const i=t[r];if("number"!=typeof i)throw new Error(`"${n}" requires stop inputs as literal numbers`);if(s.length&&s[s.length-1][0]>=i)throw new Error(`"${n}" requires strictly ascending stop inputs`);const a=wt(t[r+1],e,o);o||(o=a.type),s.push([i,a])}if(o&&o!==x&&o!==L&&("array"!==o.kind||o.itemType!==L))throw new Error(`"${n}" cannot interpolate type ${G(o)}`);return new tt(n,o,i,a,s)}evaluate(t,e){const r=this._stops;if(1===r.length)return r[0][1].evaluate(t,e);const n=this.input.evaluate(t,e);if(n<=r[0][0])return r[0][1].evaluate(t,e);if(n>=r[r.length-1][0])return r[r.length-1][1].evaluate(t,e);let i=0;for(;++i<r.length&&!(n<r[i][0]););const a=r[i-1][0],o=r[i][0],l=tt.interpolationRatio(this.interpolation,n,a,o),u=r[i-1][1].evaluate(t,e),c=r[i][1].evaluate(t,e);if("interpolate"===this._operator){if("array"===this.type.kind&&Array.isArray(u)&&Array.isArray(c))return u.map(((t,e)=>(0,s.GW)(t,c[e],l)));if("color"===this.type.kind&&u instanceof w.A&&c instanceof w.A){const t=new w.A(u),e=new w.A(c);return new w.A([(0,s.GW)(t.r,e.r,l),(0,s.GW)(t.g,e.g,l),(0,s.GW)(t.b,e.b,l),(0,s.GW)(t.a,e.a,l)])}if("number"===this.type.kind&&"number"==typeof u&&"number"==typeof c)return(0,s.GW)(u,c,l);throw new Error(`"${this._operator}" cannot interpolate type ${G(this.type)}`)}if("interpolate-hcl"===this._operator){const t=(0,R.RH)(u),e=(0,R.RH)(c),r=e.h-t.h,n=(0,R.$)({h:t.h+l*(r>180||r<-180?r-360*Math.round(r/360):r),c:(0,s.GW)(t.c,e.c,l),l:(0,s.GW)(t.l,e.l,l)});return new w.A({a:(0,s.GW)(u.a,c.a,l),...n})}if("interpolate-lab"===this._operator){const t=(0,R.ZD)(u),e=(0,R.ZD)(c),r=(0,R.$)({l:(0,s.GW)(t.l,e.l,l),a:(0,s.GW)(t.a,e.a,l),b:(0,s.GW)(t.b,e.b,l)});return new w.A({a:(0,s.GW)(u.a,c.a,l),...r})}throw new Error(`Unexpected operator "${this._operator}"`)}interpolationUniformValue(t,e){const r=this._stops;if(1===r.length)return 0;if(t>=r[r.length-1][0])return 0;let n=0;for(;++n<r.length&&!(t<r[n][0]););const i=r[n-1][0],a=r[n][0];return tt.interpolationRatio(this.interpolation,e,i,a)}getInterpolationRange(t){const e=this._stops;if(1===e.length){const t=e[0][0];return[t,t]}const r=e[e.length-1][0];if(t>=r)return[r,r];let n=0;for(;++n<e.length&&!(t<e[n][0]););return[e[n-1][0],e[n][0]]}static interpolationRatio(t,e,r,n){let i=0;return"linear"===t[0]?i=tt._exponentialInterpolationRatio(e,1,r,n):"exponential"===t[0]?i=tt._exponentialInterpolationRatio(e,t[1],r,n):"cubic-bezier"===t[0]&&(i=N(t[1],t[2],t[3],t[4])(tt._exponentialInterpolationRatio(e,1,r,n),1e-5)),i<0?i=0:i>1&&(i=1),i}static _exponentialInterpolationRatio(t,e,r,n){const i=n-r;if(0===i)return 0;const a=t-r;return 1===e?a/i:(e**a-1)/(e**i-1)}}class et{constructor(t,e,r){this.type=t,this._input=e,this._stops=r}static parse(t,e){if(t.length<5)throw new Error('"step" expects at least 4 arguments');if(t.length%2!=1)throw new Error('"step" expects an even number of arguments');const r=wt(t[1],e,L);let n;const i=[];i.push([-1/0,wt(t[2],e)]);for(let r=3;r<t.length;r+=2){const a=t[r];if("number"!=typeof a)throw new Error('"step" requires stop inputs as literal numbers');if(i.length&&i[i.length-1][0]>=a)throw new Error('"step" requires strictly ascending stop inputs');const o=wt(t[r+1],e);n||(n=o.type),i.push([a,o])}return new et(n,r,i)}evaluate(t,e){const r=this._stops;if(1===r.length)return r[0][1].evaluate(t,e);const n=this._input.evaluate(t,e);let i=0;for(;++i<r.length&&!(n<r[i][0]););return this._stops[i-1][1].evaluate(t,e)}}class rt{constructor(t,e){this.type=t,this._output=e}static parse(t,e,r){if(t.length<4)throw new Error('"let" expects at least 3 arguments');if(t.length%2==1)throw new Error('"let" expects an odd number of arguments');const n=new V(e);for(let r=1;r<t.length-1;r+=2){const i=t[r];if("string"!=typeof i)throw new Error(`"let" requires a string to define variable names - found ${i}`);n.add(i,wt(t[r+1],e))}const i=wt(t[t.length-1],n,r);return new rt(i.type,i)}evaluate(t,e){return this._output.evaluate(t,e)}}class nt{constructor(t,e){this.type=t,this.output=e}static parse(t,e,r){if(2!==t.length||"string"!=typeof t[1])throw new Error('"var" requires just one literal string argument');const n=e.get(t[1]);if(!n)throw new Error(`${t[1]} must be defined before being used in a "var" expression`);return new nt(r||B,n)}evaluate(t,e){return this.output.evaluate(t,e)}}class it{constructor(t,e,r){this.type=t,this._index=e,this._array=r}static parse(t,e){if(3!==t.length)throw new Error('"at" expects 2 arguments');const r=wt(t[1],e,L),n=wt(t[2],e);return new it(n.type.itemType,r,n)}evaluate(t,e){const r=this._index.evaluate(t,e),n=this._array.evaluate(t,e);if(r<0||r>=n.length)throw new Error('"at" index out of bounds');if(r!==Math.floor(r))throw new Error('"at" index must be an integer');return n[r]}}class at{constructor(t,e){this._key=t,this._obj=e,this.type=B}static parse(t,e){let r,n;switch(t.length){case 2:return r=wt(t[1],e),new at(r);case 3:return r=wt(t[1],e),n=wt(t[2],e),new at(r,n);default:throw new Error('"get" expects 1 or 2 arguments')}}evaluate(t,e){const r=this._key.evaluate(t,e);return this._obj?this._obj.evaluate(t,e)[r]:t?.values[r]}}class ot{constructor(t,e){this._key=t,this._obj=e,this.type=S}static parse(t,e){let r,n;switch(t.length){case 2:return r=wt(t[1],e),new ot(r);case 3:return r=wt(t[1],e),n=wt(t[2],e),new ot(r,n);default:throw new Error('"has" expects 1 or 2 arguments')}}evaluate(t,e){const r=this._key.evaluate(t,e);return this._obj?r in this._obj.evaluate(t,e):!!t?.values[r]}}class st{constructor(t,e){this._key=t,this._vals=e,this.type=S}static parse(t,e){if(3!==t.length)throw new Error('"in" expects 2 arguments');return new st(wt(t[1],e),wt(t[2],e))}evaluate(t,e){const r=this._key.evaluate(t,e);return this._vals.evaluate(t,e).includes(r)}}class lt{constructor(t,e,r){this._item=t,this._array=e,this._from=r,this.type=L}static parse(t,e){if(t.length<3||t.length>4)throw new Error('"index-of" expects 3 or 4 arguments');const r=wt(t[1],e),n=wt(t[2],e);if(4===t.length){const i=wt(t[3],e,L);return new lt(r,n,i)}return new lt(r,n)}evaluate(t,e){const r=this._item.evaluate(t,e),n=this._array.evaluate(t,e);if(this._from){const i=this._from.evaluate(t,e);if(i!==Math.floor(i))throw new Error('"index-of" index must be an integer');return n.indexOf(r,i)}return n.indexOf(r)}}class ut{constructor(t){this._arg=t,this.type=L}static parse(t,e){if(2!==t.length)throw new Error('"length" expects 2 arguments');const r=wt(t[1],e);return new ut(r)}evaluate(t,e){const r=this._arg.evaluate(t,e);if("string"==typeof r)return r.length;if(Array.isArray(r))return r.length;throw new Error('"length" expects string or array')}}class ct{constructor(t,e,r,n){this.type=t,this._array=e,this._from=r,this._to=n}static parse(t,e){if(t.length<3||t.length>4)throw new Error('"slice" expects 2 or 3 arguments');const r=wt(t[1],e),n=wt(t[2],e,L);if(n.type!==L)throw new Error('"slice" index must return a number');if(4===t.length){const i=wt(t[3],e,L);if(i.type!==L)throw new Error('"slice" index must return a number');return new ct(r.type,r,n,i)}return new ct(r.type,r,n)}evaluate(t,e){const r=this._array.evaluate(t,e);if(!Array.isArray(r)&&"string"!=typeof r)throw new Error('"slice" input must be an array or a string');const n=this._from.evaluate(t,e);if(n<0||n>=r.length)throw new Error('"slice" index out of bounds');if(n!==Math.floor(n))throw new Error('"slice" index must be an integer');if(this._to){const i=this._to.evaluate(t,e);if(i<0||i>=r.length)throw new Error('"slice" index out of bounds');if(i!==Math.floor(i))throw new Error('"slice" index must be an integer');return r.slice(n,i)}return r.slice(n)}}class ht{constructor(){this.type=S}static parse(t){if(1!==t.length)throw new Error('"has-id" expects no arguments');return new ht}evaluate(t,e){return void 0!==t?.id}}class pt{constructor(t,e){this._args=t,this._calculate=e,this.type=L}static parse(t,e,r){const n=t.slice(1).map((t=>wt(t,e)));return new pt(n,r)}evaluate(t,e){let r;return this._args&&(r=this._args.map((r=>r.evaluate(t,e)))),this._calculate(r)}}class ft{constructor(t,e){this._args=t,this._calculate=e,this.type=L}static{this.ops={abs:t=>Math.abs(t[0]),acos:t=>Math.acos(t[0]),asin:t=>Math.asin(t[0]),atan:t=>Math.atan(t[0]),ceil:t=>Math.ceil(t[0]),cos:t=>Math.cos(t[0]),e:()=>Math.E,floor:t=>Math.floor(t[0]),ln:t=>Math.log(t[0]),ln2:()=>Math.LN2,log10:t=>Math.log(t[0])/Math.LN10,log2:t=>Math.log(t[0])/Math.LN2,max:t=>Math.max(...t),min:t=>Math.min(...t),pi:()=>Math.PI,round:t=>Math.round(t[0]),sin:t=>Math.sin(t[0]),sqrt:t=>Math.sqrt(t[0]),tan:t=>Math.tan(t[0])}}static parse(t,e){const r=t.slice(1).map((t=>wt(t,e)));return new ft(r,ft.ops[t[0]])}evaluate(t,e){let r;return this._args&&(r=this._args.map((r=>r.evaluate(t,e)))),this._calculate(r)}}class yt{constructor(t){this._args=t,this.type=P}static parse(t,e){return new yt(t.slice(1).map((t=>wt(t,e))))}evaluate(t,e){return this._args.map((r=>r.evaluate(t,e))).join("")}}class gt{constructor(t,e){this._arg=t,this._calculate=e,this.type=P}static{this.ops={downcase:t=>t.toLowerCase(),upcase:t=>t.toUpperCase()}}static parse(t,e){if(2!==t.length)throw new Error(`${t[0]} expects 1 argument`);const r=wt(t[1],e);return new gt(r,gt.ops[t[0]])}evaluate(t,e){return this._calculate(this._arg.evaluate(t,e))}}class dt{constructor(t){this._args=t,this.type=x}static parse(t,e){if(4!==t.length)throw new Error('"rgb" expects 3 arguments');const r=t.slice(1).map((t=>wt(t,e)));return new dt(r)}evaluate(t,e){const r=this._validate(this._args[0].evaluate(t,e)),n=this._validate(this._args[1].evaluate(t,e)),i=this._validate(this._args[2].evaluate(t,e));return new w.A({r,g:n,b:i})}_validate(t){if("number"!=typeof t||t<0||t>255)throw new Error(`${t}: invalid color component`);return Math.round(t)}}class mt{constructor(t){this._args=t,this.type=x}static parse(t,e){if(5!==t.length)throw new Error('"rgba" expects 4 arguments');const r=t.slice(1).map((t=>wt(t,e)));return new mt(r)}evaluate(t,e){const r=this._validate(this._args[0].evaluate(t,e)),n=this._validate(this._args[1].evaluate(t,e)),i=this._validate(this._args[2].evaluate(t,e)),a=this._validateAlpha(this._args[3].evaluate(t,e));return new w.A({r,g:n,b:i,a})}_validate(t){if("number"!=typeof t||t<0||t>255)throw new Error(`${t}: invalid color component`);return Math.round(t)}_validateAlpha(t){if("number"!=typeof t||t<0||t>1)throw new Error(`${t}: invalid alpha color component`);return t}}class _t{constructor(t){this._color=t,this.type=U(L,4)}static parse(t,e){if(2!==t.length)throw new Error('"to-rgba" expects 1 argument');const r=wt(t[1],e);return new _t(r)}evaluate(t,e){return new w.A(this._color.evaluate(t,e)).toRgba()}}class bt{constructor(t,e){this.type=t,this._args=e}static parse(t,e){const r=t[0];if(t.length<2)throw new Error(`${r} expects at least one argument`);let n,i=1;if("array"===r){if(t.length>2){switch(t[1]){case"string":n=P;break;case"number":n=L;break;case"boolean":n=S;break;default:throw new Error('"array" type argument must be string, number or boolean')}i++}else n=B;let e;if(t.length>3){if(e=t[2],null!==e&&("number"!=typeof e||e<0||e!==Math.floor(e)))throw new Error('"array" length argument must be a positive integer literal');i++}n=U(n,e)}else switch(r){case"string":n=P;break;case"number":n=L;break;case"boolean":n=S;break;case"object":n=O}const a=[];for(;i<t.length;i++){const r=wt(t[i],e);a.push(r)}return new bt(n,a)}evaluate(t,e){let r;for(const n of this._args){const i=n.evaluate(t,e);if(r=M(i),k(r,this.type))return i}throw new Error(`Expected ${G(this.type)} but got ${G(r)}`)}}class Et{static{this.types={"to-boolean":S,"to-color":x,"to-number":L,"to-string":P}}constructor(t,e){this.type=t,this._args=e}static parse(t,e){const r=t[0],n=Et.types[r];if(n===S||n===P){if(2!==t.length)throw new Error(`${r} expects one argument`)}else if(t.length<2)throw new Error(`${r} expects at least one argument`);const i=[];for(let r=1;r<t.length;r++){const n=wt(t[r],e);i.push(n)}return new Et(n,i)}evaluate(t,e){if(this.type===S)return Boolean(this._args[0].evaluate(t,e));if(this.type===P)return F(this._args[0].evaluate(t,e));if(this.type===L){for(const r of this._args){const n=Number(r.evaluate(t,e));if(!isNaN(n))return n}return null}if(this.type===x){for(const r of this._args)try{const n=Et.toColor(r.evaluate(t,e));if(n instanceof w.A)return n}catch{}return null}}static toBoolean(t){return Boolean(t)}static toString(t){return F(t)}static toNumber(t){const e=Number(t);if(isNaN(e))throw new Error(`"${t}" is not a number`);return e}static toColor(t){if(t instanceof w.A)return t;if("string"==typeof t){const e=w.A.fromString(t);if(e)return e;throw new Error(`"${t}" is not a color`)}if(Array.isArray(t))return w.A.fromArray(t);throw new Error(`"${t}" is not a color`)}}class Tt{constructor(t){this._val=t,this.type=M(t)}static parse(t){if(2!==t.length)throw new Error('"literal" expects 1 argument');return new Tt(t[1])}evaluate(t,e){return this._val}}class It{constructor(t){this._arg=t,this.type=P}static parse(t,e){if(2!==t.length)throw new Error('"typeof" expects 1 argument');return new It(wt(t[1],e))}evaluate(t,e){return G(M(this._arg.evaluate(t,e)))}}function wt(t,e,r){const n=typeof t;if("string"===n||"boolean"===n||"number"===n||null===t){if(r)switch(r.kind){case"string":"string"!==n&&(t=Et.toString(t));break;case"number":"number"!==n&&(t=Et.toNumber(t));break;case"color":t=Et.toColor(t)}t=["literal",t]}if(!Array.isArray(t)||0===t.length)throw new Error("Expression must be a non empty array");const i=t[0];if("string"!=typeof i)throw new Error("First element of expression must be a string");const a=Rt[i];if(void 0===a)throw new Error(`Invalid expression operator "${i}"`);if(!a)throw new Error(`Unimplemented expression operator "${i}"`);return a.parse(t,e,r)}const Rt={array:bt,boolean:bt,collator:null,format:null,image:null,literal:Tt,number:bt,"number-format":null,object:bt,string:bt,"to-boolean":Et,"to-color":Et,"to-number":Et,"to-string":Et,typeof:It,accumulated:null,"feature-state":null,"geometry-type":$,id:z,"line-progress":null,properties:H,at:it,get:at,has:ot,in:st,"index-of":lt,length:ut,slice:ct,"!":q,"!=":class extends W{static parse(t,e){return W.parse(t,e,((t,e)=>t!==e))}},"<":class extends W{static parse(t,e){return W.parse(t,e,((t,e)=>t<e))}},"<=":class extends W{static parse(t,e){return W.parse(t,e,((t,e)=>t<=e))}},"==":class extends W{static parse(t,e){return W.parse(t,e,((t,e)=>t===e))}},">":class extends W{static parse(t,e){return W.parse(t,e,((t,e)=>t>e))}},">=":class extends W{static parse(t,e){return W.parse(t,e,((t,e)=>t>=e))}},all:K,any:j,case:J,coalesce:X,match:Q,within:null,interpolate:tt,"interpolate-hcl":tt,"interpolate-lab":tt,step:et,let:rt,var:nt,concat:yt,downcase:gt,"is-supported-script":null,"resolved-locale":null,upcase:gt,rgb:dt,rgba:mt,"to-rgba":_t,"-":class extends pt{static parse(t,e){switch(t.length){case 2:return pt.parse(t,e,(t=>-t[0]));case 3:return pt.parse(t,e,(t=>t[0]-t[1]));default:throw new Error('"-" expects 1 or 2 arguments')}}},"*":class extends pt{static parse(t,e){return pt.parse(t,e,(t=>{let e=1;for(const r of t)e*=r;return e}))}},"/":class extends pt{static parse(t,e){if(3===t.length)return pt.parse(t,e,(t=>t[0]/t[1]));throw new Error('"/" expects 2 arguments')}},"%":class extends pt{static parse(t,e){if(3===t.length)return pt.parse(t,e,(t=>t[0]%t[1]));throw new Error('"%" expects 2 arguments')}},"^":class extends pt{static parse(t,e){if(3===t.length)return pt.parse(t,e,(t=>t[0]**t[1]));throw new Error('"^" expects 1 or 2 arguments')}},"+":class extends pt{static parse(t,e){return pt.parse(t,e,(t=>{let e=0;for(const r of t)e+=r;return e}))}},abs:ft,acos:ft,asin:ft,atan:ft,ceil:ft,cos:ft,e:ft,floor:ft,ln:ft,ln2:ft,log10:ft,log2:ft,max:ft,min:ft,pi:ft,round:ft,sin:ft,sqrt:ft,tan:ft,zoom:Y,"heatmap-density":null,"has-id":ht,none:Z};class vt{constructor(t){this._expression=t}filter(t,e){if(!this._expression)return!0;try{return this._expression.evaluate(t,e)}catch(t){return console.log(t.message),!0}}static createFilter(t){if(!t)return null;this.isLegacyFilter(t)&&(t=this.convertLegacyFilter(t));try{const e=wt(t,null,S);return new vt(e)}catch(t){return console.log(t.message),null}}static isLegacyFilter(t){if(!Array.isArray(t))return!0;if(0===t.length)return!0;switch(t[0]){case"==":case"!=":case">":case"<":case">=":case"<=":return 3===t.length&&"string"==typeof t[1]&&!Array.isArray(t[2]);case"in":return t.length>=3&&"string"==typeof t[1]&&!Array.isArray(t[2]);case"!in":case"none":case"!has":return!0;case"any":case"all":for(let e=1;e<t.length;e++)if(this.isLegacyFilter(t[e]))return!0;return!1;case"has":return 2===t.length&&("$id"===t[1]||"$type"===t[1]);default:return!1}}static convertLegacyFilter(t){if(!Array.isArray(t)||0===t.length)return!0;const e=t[0];if(1===t.length)return"any"!==e;switch(e){case"==":return vt.convertComparison("==",t[1],t[2]);case"!=":return vt.negate(vt.convertComparison("==",t[1],t[2]));case">":case"<":case">=":case"<=":return vt.convertComparison(e,t[1],t[2]);case"in":return vt.convertIn(t[1],t.slice(2));case"!in":return vt.negate(vt.convertIn(t[1],t.slice(2)));case"any":case"all":case"none":return vt.convertCombining(e,t.slice(1));case"has":return vt.convertHas(t[1]);case"!has":return vt.negate(vt.convertHas(t[1]));default:throw new Error("Unexpected legacy filter.")}}static convertComparison(t,e,r){switch(e){case"$type":return[t,["geometry-type"],r];case"$id":return[t,["id"],r];default:return[t,["get",e],r]}}static convertIn(t,e){switch(t){case"$type":return["in",["geometry-type"],["literal",e]];case"$id":return["in",["id"],["literal",e]];default:return["in",["get",t],["literal",e]]}}static convertHas(t){switch(t){case"$type":return!0;case"$id":return["has-id"];default:return["has",t]}}static convertCombining(t,e){return[t].concat(e.map(this.convertLegacyFilter))}static negate(t){return["!",t]}}var Nt=r(4272);class At{constructor(t,e){let r;switch(this.isDataDriven=!1,this.interpolator=null,t.type){case"number":case"color":r=!0;break;case"array":r="number"===t.value;break;default:r=!1}if(null==e&&(e=t.default),Array.isArray(e)&&e.length>0&&Rt[e[0]]){const r={number:L,color:x,string:P,boolean:S,enum:P};try{const n=wt(e,null,"array"===t.type?U(r[t.value]||B,t.length):r[t.type]);this.getValue=this._buildExpression(n,t),this.isDataDriven=!0,n instanceof tt&&n.input instanceof Y&&(this.interpolator=n)}catch(e){console.log(e.message),this.getValue=this._buildSimple(t.default)}return}r&&"interval"===e.type&&(r=!1);const n=e?.stops&&e.stops.length>0;if(n)for(const r of e.stops)r[1]=this._validate(r[1],t);if(this.isDataDriven=!!e&&!!e.property,this.isDataDriven)if(void 0!==e.default&&(e.default=this._validate(e.default,t)),n)switch(e.type){case"identity":this.getValue=this._buildIdentity(e,t);break;case"categorical":this.getValue=this._buildCategorical(e,t);break;default:this.getValue=r?this._buildInterpolate(e,t):this._buildInterval(e,t)}else this.getValue=this._buildIdentity(e,t);else n?this.getValue=r?this._buildZoomInterpolate(e):this._buildZoomInterval(e):(e=this._validate(e,t),this.getValue=this._buildSimple(e))}_validate(t,e){if("number"===e.type){if(null!=e.minimum&&t<e.minimum)return e.minimum;if(null!=e.maximum&&t>e.maximum)return e.maximum}else"color"===e.type?t=At._parseColor(t):"enum"===e.type?"string"==typeof t&&(t=e.values.indexOf(t)):"array"===e.type&&"enum"===e.value?t=t.map((t=>"string"==typeof t?e.values.indexOf(t):t)):"string"===e.type&&(t=F(t));return t}_buildSimple(t){return()=>t}_buildExpression(t,e){return(r,n)=>{try{const i=t.evaluate(n,r);return void 0===i?e.default:this._validate(i,e)}catch(t){return console.log(t.message),e.default}}}_buildIdentity(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),void 0!==i&&(i=this._validate(i,e)),null!=i?i:void 0!==t.default?t.default:e.default}}_buildCategorical(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),i=this._categorical(i,t.stops),void 0!==i?i:void 0!==t.default?t.default:e.default}}_buildInterval(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),"number"==typeof i?this._interval(i,t.stops):void 0!==t.default?t.default:e.default}}_buildInterpolate(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),"number"==typeof i?this._interpolate(i,t.stops,t.base||1):void 0!==t.default?t.default:e.default}}_buildZoomInterpolate(t){return e=>this._interpolate(e,t.stops,t.base||1)}_buildZoomInterval(t){return e=>this._interval(e,t.stops)}_categorical(t,e){const r=e.length;for(let n=0;n<r;n++)if(e[n][0]===t)return e[n][1]}_interval(t,e){const r=e.length;let n=0;for(let i=0;i<r&&e[i][0]<=t;i++)n=i;return e[n][1]}_interpolate(t,e,r){let n,i;const a=e.length;for(let r=0;r<a;r++){const a=e[r];if(!(a[0]<=t)){i=a;break}n=a}if(n&&i){const e=i[0]-n[0],a=t-n[0],o=1===r?a/e:(r**a-1)/(r**e-1);if(Array.isArray(n[1])){const t=n[1],e=i[1],r=[];for(let n=0;n<t.length;n++)r.push((0,s.GW)(t[n],e[n],o));return r}return(0,s.GW)(n[1],i[1],o)}return n?n[1]:i?i[1]:void 0}static _isEmpty(t){for(const e in t)if(t.hasOwnProperty(e))return!1;return!0}static _parseColor(t){return Array.isArray(t)?t:("string"==typeof t&&(t=new w.A(t)),t instanceof w.A&&!this._isEmpty(t)?w.A.toUnitRGBA(t):void 0)}}var Dt,Lt=r(76213);!function(t){t[t.BUTT=0]="BUTT",t[t.ROUND=1]="ROUND",t[t.SQUARE=2]="SQUARE",t[t.UNKNOWN=4]="UNKNOWN"}(Dt||(Dt={}));class Pt{constructor(t,e,r,n){switch(this.type=t,this.typeName=e.type,this.id=e.id,this.source=e.source,this.sourceLayer=e["source-layer"],this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,this.filter=e.filter,this.layout=e.layout,this.paint=e.paint,this.z=r,this.uid=n,t){case Nt.Dc.BACKGROUND:this._layoutDefinition=Nt.$u.backgroundLayoutDefinition,this._paintDefinition=Nt.$u.backgroundPaintDefinition;break;case Nt.Dc.FILL:this._layoutDefinition=Nt.$u.fillLayoutDefinition,this._paintDefinition=Nt.$u.fillPaintDefinition;break;case Nt.Dc.LINE:this._layoutDefinition=Nt.$u.lineLayoutDefinition,this._paintDefinition=Nt.$u.linePaintDefinition;break;case Nt.Dc.SYMBOL:this._layoutDefinition=Nt.$u.symbolLayoutDefinition,this._paintDefinition=Nt.$u.symbolPaintDefinition;break;case Nt.Dc.CIRCLE:this._layoutDefinition=Nt.$u.circleLayoutDefinition,this._paintDefinition=Nt.$u.circlePaintDefinition}this._layoutProperties=this._parseLayout(this.layout),this._paintProperties=this._parsePaint(this.paint)}getFeatureFilter(){return void 0!==this._featureFilter?this._featureFilter:this._featureFilter=vt.createFilter(this.filter)}getLayoutProperty(t){return this._layoutProperties[t]}getPaintProperty(t){return this._paintProperties[t]}getLayoutValue(t,e,r){let n;const i=this._layoutProperties[t];return i&&(n=i.getValue(e,r)),void 0===n&&(n=this._layoutDefinition[t].default),n}getPaintValue(t,e,r){let n;const i=this._paintProperties[t];return i&&(n=i.getValue(e,r)),void 0===n&&(n=this._paintDefinition[t].default),n}isPainterDataDriven(){const t=this._paintProperties;if(t)for(const e in t)if(t[e].isDataDriven)return!0;return!1}isIntersectingFeature(t,e,r,n,i,a,o){return!1}getFeatureInflatedBounds(t,e,r,n){return null}_parseLayout(t){const e={};for(const r in t){const n=this._layoutDefinition[r];n&&(e[r]=new At(n,t[r]))}return e}_parsePaint(t){const e={};for(const r in t){const n=this._paintDefinition[r];n&&(e[r]=new At(n,t[r]))}return e}computeAttributesKey(t,e,r,n){let i=0,a=0;for(const t of e){let e=3;if(!t||t!==n){const n=r[t],{isLayout:i,isOptional:a}=n,o=i?this.getLayoutProperty(t):this.getPaintProperty(t);e=o?.interpolator?2:o?.isDataDriven?1:a&&!o?3:0}a|=e<<i,i+=2}return a<<3|t}}class St extends Pt{constructor(t,e,r,n){super(t,e,r,n),this.backgroundMaterial=new y(this.computeAttributesKey(o.kh.BACKGROUND,y.ATTRIBUTES,y.ATTRIBUTES_INFO))}}class xt extends Pt{constructor(t,e,r,n){super(t,e,r,n);const i=this.getPaintProperty("fill-color"),a=this.getPaintProperty("fill-opacity"),s=this.getPaintProperty("fill-pattern");this.hasDataDrivenColor=i?.isDataDriven,this.hasDataDrivenOpacity=a?.isDataDriven,this.hasDataDrivenFill=this.hasDataDrivenColor||this.hasDataDrivenOpacity||s?.isDataDriven;const l=this.getPaintProperty("fill-outline-color");this.outlineUsesFillColor=!l,this.hasDataDrivenOutlineColor=l?.isDataDriven,this.hasDataDrivenOutline=l?l.isDataDriven:!!i&&i.isDataDriven,this.hasDataDrivenOutline=(l?this.hasDataDrivenOutlineColor:this.hasDataDrivenColor)||this.hasDataDrivenOpacity,this.fillMaterial=new d(this.computeAttributesKey(o.kh.FILL,d.ATTRIBUTES,d.ATTRIBUTES_INFO)),this.outlineMaterial=new m(this.computeAttributesKey(o.kh.OUTLINE,this.outlineUsesFillColor?m.ATTRIBUTES_FILL:m.ATTRIBUTES_OUTLINE,this.outlineUsesFillColor?m.ATTRIBUTES_INFO_FILL:m.ATTRIBUTES_INFO_OUTLINE),this.outlineUsesFillColor)}getFeatureInflatedBounds(t,e,r,n){const i=Mt(t);if(!i)return null;const a=this.getPaintValue("fill-translate",e,t),o=n*Math.max(a[0],a[1]);return i[0]-=o,i[2]-=o,i[1]+=o,i[3]+=o,i}isIntersectingFeature(t,e,r,n,i,a,o){const l=n.getGeometry();if(!l)return!1;const u=8/o.normalizationRatio;t=t/o.normalizationRatio+o.normalizationOffsetX,e=e/o.normalizationRatio+o.normalizationOffsetY;const c=(0,s.yM)(this.getPaintValue("fill-translate",i,n),this.getPaintValue("fill-translate-anchor",i,n),a,8);return t-=u*c.x,e-=u*c.y,!!(0,s.s3)(t,e,l)||(0,s.ru)(t,e,l,u*r)}}class Ot extends Pt{constructor(t,e,r,n){super(t,e,r,n);const i=this.getPaintProperty("line-pattern");if(this.lineMaterial=new _(this.computeAttributesKey(o.kh.LINE,_.ATTRIBUTES,_.ATTRIBUTES_INFO,i?"line-dasharray":"")),this.hasDataDrivenLine=this.getPaintProperty("line-blur")?.isDataDriven||this.getPaintProperty("line-color")?.isDataDriven||this.getPaintProperty("line-gap-width")?.isDataDriven||this.getPaintProperty("line-offset")?.isDataDriven||this.getPaintProperty("line-opacity")?.isDataDriven||this.getPaintProperty("line-pattern")?.isDataDriven||this.getPaintProperty("line-dasharray")?.isDataDriven||this.getLayoutProperty("line-cap")?.isDataDriven||this.getPaintProperty("line-width")?.isDataDriven,this.canUseThinTessellation=!1,!this.hasDataDrivenLine){const t=this.getPaintProperty("line-width");if(!t||"number"==typeof t&&.5*t<Lt.Gh){const t=this.getPaintProperty("line-offset");(!t||"number"==typeof t&&0===t)&&(this.canUseThinTessellation=!0)}}}getDashKey(t,e){let r;switch(e){case Dt.BUTT:r="Butt";break;case Dt.ROUND:r="Round";break;case Dt.SQUARE:r="Square";break;default:r="Butt"}return`dasharray-[${t.toString()}]-${r}`}getFeatureInflatedBounds(t,e,r,n){const i=Mt(t);if(!i)return null;const a=this.getPaintValue("line-translate",e,t),o=n*Math.max(a[0],a[1]);i[0]-=o,i[2]-=o,i[1]+=o,i[3]+=o;const s=n*Math.abs(this.getPaintValue("line-offset",e,t)||0),l=n*(this.getPaintValue("line-width",e,t)/2);return i[0]-=s+l,i[1]-=s+l,i[2]+=s+l,i[3]+=s+l,i}isIntersectingFeature(t,e,r,n,i,a,o){let l=n.getGeometry();if(!l)return!1;const u=8/o.normalizationRatio;t=t/o.normalizationRatio+o.normalizationOffsetX,e=e/o.normalizationRatio+o.normalizationOffsetY;const c=(0,s.yM)(this.getPaintValue("line-translate",i,n),this.getPaintValue("line-translate-anchor",i,n),a,8);t-=u*c.x,e-=u*c.y;const h=u*this.getPaintValue("line-offset",i,n)||0;0!==h&&(l=(0,s.cP)(l,-h));const p=this.getPaintValue("line-width",i,n);return(0,s.ru)(t,e,l,u*(r+p/2))}}class Bt extends Pt{constructor(t,e,r,n){super(t,e,r,n),this.iconMaterial=new T(this.computeAttributesKey(o.kh.ICON,T.ATTRIBUTES,T.ATTRIBUTES_INFO)),this.textMaterial=new I(this.computeAttributesKey(o.kh.TEXT,I.ATTRIBUTES,I.ATTRIBUTES_INFO)),this.hasDataDrivenIcon=this.getPaintProperty("icon-color")?.isDataDriven||this.getPaintProperty("icon-halo-blur")?.isDataDriven||this.getPaintProperty("icon-halo-color")?.isDataDriven||this.getPaintProperty("icon-halo-width")?.isDataDriven||this.getPaintProperty("icon-opacity")?.isDataDriven||this.getLayoutProperty("icon-size")?.isDataDriven,this.hasDataDrivenText=this.getPaintProperty("text-color")?.isDataDriven||this.getPaintProperty("text-halo-blur")?.isDataDriven||this.getPaintProperty("text-halo-color")?.isDataDriven||this.getPaintProperty("text-halo-width")?.isDataDriven||this.getPaintProperty("text-opacity")?.isDataDriven||this.getLayoutProperty("text-size")?.isDataDriven}}class Ut extends Pt{constructor(t,e,r,n){super(t,e,r,n),this.circleMaterial=new g(this.computeAttributesKey(o.kh.CIRCLE,g.ATTRIBUTES,g.ATTRIBUTES_INFO))}getFeatureInflatedBounds(t,e,r,n){const i=Mt(t);if(!i)return null;const a=this.getPaintValue("circle-translate",e,t),o=Math.max(a[0],a[1]);i[0]-=o,i[2]-=o,i[1]+=o,i[3]+=o;const s=n*(8*(this.getPaintValue("circle-radius",e,t)+this.getPaintValue("circle-stroke-width",e,t))/2);return i[0]-=s,i[1]-=s,i[2]+=s,i[3]+=s,i}isIntersectingFeature(t,e,r,n,i,a,o){const l=n.getGeometry();if(!l)return!1;const u=8/o.normalizationRatio;t=t/o.normalizationRatio+o.normalizationOffsetX,e=e/o.normalizationRatio+o.normalizationOffsetY,r*=u;const c=(0,s.yM)(this.getPaintValue("circle-translate",i,n),this.getPaintValue("circle-translate-anchor",i,n),a,u),h=u*(this.getPaintValue("circle-radius",i,n)+this.getPaintValue("circle-stroke-width",i,n));let p,f;for(const n of l)if(n)for(const i of n)if(p=i.x+c.x,f=i.y+c.y,Math.sqrt((t-p)*(t-p)+(e-f)*(e-f))-r<=h)return!0;return!1}}class Ct{constructor(t,e,r){let n;this.allowOverlap=t.getLayoutValue("icon-allow-overlap",e),this.ignorePlacement=t.getLayoutValue("icon-ignore-placement",e),this.keepUpright=t.getLayoutValue("icon-keep-upright",e),this.optional=t.getLayoutValue("icon-optional",e),this.rotationAlignment=t.getLayoutValue("icon-rotation-alignment",e),this.rotationAlignment===Nt.I5.AUTO&&(this.rotationAlignment=r?Nt.I5.MAP:Nt.I5.VIEWPORT),n=t.getLayoutProperty("icon-anchor"),n?.isDataDriven?this._anchorProp=n:this.anchor=t.getLayoutValue("icon-anchor",e),n=t.getLayoutProperty("icon-offset"),n?.isDataDriven?this._offsetProp=n:this.offset=t.getLayoutValue("icon-offset",e),n=t.getLayoutProperty("icon-padding"),n?.isDataDriven?this._paddingProp=n:this.padding=t.getLayoutValue("icon-padding",e),n=t.getLayoutProperty("icon-rotate"),n?.isDataDriven?this._rotateProp=n:this.rotate=t.getLayoutValue("icon-rotate",e),n=t.getLayoutProperty("icon-size"),n?.isDataDriven?this._sizeProp=n:this.size=t.getLayoutValue("icon-size",e)}update(t,e){this._anchorProp&&(this.anchor=this._anchorProp.getValue(t,e)),this._offsetProp&&(this.offset=this._offsetProp.getValue(t,e)),this._paddingProp&&(this.padding=this._paddingProp.getValue(t,e)),this._rotateProp&&(this.rotate=this._rotateProp.getValue(t,e)),this._sizeProp&&(this.size=this._sizeProp.getValue(t,e))}}class Gt{constructor(t,e,r){let n;this.allowOverlap=t.getLayoutValue("text-allow-overlap",e),this.ignorePlacement=t.getLayoutValue("text-ignore-placement",e),this.keepUpright=t.getLayoutValue("text-keep-upright",e),this.optional=t.getLayoutValue("text-optional",e),this.rotationAlignment=t.getLayoutValue("text-rotation-alignment",e),this.rotationAlignment===Nt.I5.AUTO&&(this.rotationAlignment=r?Nt.I5.MAP:Nt.I5.VIEWPORT),n=t.getLayoutProperty("text-anchor"),n?.isDataDriven?this._anchorProp=n:this.anchor=t.getLayoutValue("text-anchor",e),n=t.getLayoutProperty("text-justify"),n?.isDataDriven?this._justifyProp=n:this.justify=t.getLayoutValue("text-justify",e),n=t.getLayoutProperty("text-letter-spacing"),n?.isDataDriven?this._letterSpacingProp=n:this.letterSpacing=t.getLayoutValue("text-letter-spacing",e),n=t.getLayoutProperty("text-line-height"),n?.isDataDriven?this._lineHeightProp=n:this.lineHeight=t.getLayoutValue("text-line-height",e),n=t.getLayoutProperty("text-max-angle"),n?.isDataDriven?this._maxAngleProp=n:this.maxAngle=t.getLayoutValue("text-max-angle",e),n=t.getLayoutProperty("text-max-width"),n?.isDataDriven?this._maxWidthProp=n:this.maxWidth=t.getLayoutValue("text-max-width",e),n=t.getLayoutProperty("text-offset"),n?.isDataDriven?this._offsetProp=n:this.offset=t.getLayoutValue("text-offset",e),n=t.getLayoutProperty("text-padding"),n?.isDataDriven?this._paddingProp=n:this.padding=t.getLayoutValue("text-padding",e),n=t.getLayoutProperty("text-rotate"),n?.isDataDriven?this._rotateProp=n:this.rotate=t.getLayoutValue("text-rotate",e),n=t.getLayoutProperty("text-size"),n?.isDataDriven?this._sizeProp=n:this.size=t.getLayoutValue("text-size",e),n=t.getLayoutProperty("text-writing-mode"),n?.isDataDriven?this._writingModeProp=n:this.writingMode=t.getLayoutValue("text-writing-mode",e)}update(t,e){this._anchorProp&&(this.anchor=this._anchorProp.getValue(t,e)),this._justifyProp&&(this.justify=this._justifyProp.getValue(t,e)),this._letterSpacingProp&&(this.letterSpacing=this._letterSpacingProp.getValue(t,e)),this._lineHeightProp&&(this.lineHeight=this._lineHeightProp.getValue(t,e)),this._maxAngleProp&&(this.maxAngle=this._maxAngleProp.getValue(t,e)),this._maxWidthProp&&(this.maxWidth=this._maxWidthProp.getValue(t,e)),this._offsetProp&&(this.offset=this._offsetProp.getValue(t,e)),this._paddingProp&&(this.padding=this._paddingProp.getValue(t,e)),this._rotateProp&&(this.rotate=this._rotateProp.getValue(t,e)),this._sizeProp&&(this.size=this._sizeProp.getValue(t,e)),this._writingModeProp&&(this.writingMode=this._writingModeProp.getValue(t,e))}}function Mt(t){const e=t?.getGeometry();if(null==e)return null;let r=1/0,n=1/0,i=-1/0,o=-1/0;for(const t of e)if(t)for(const e of t)r=Math.min(r,e.x),n=Math.min(n,e.y),i=Math.max(i,e.x),o=Math.max(o,e.y);return(0,a.fA)(r,n,i,o)}},4272:(t,e,r)=>{r.d(e,{$u:()=>y,Dc:()=>n,I5:()=>o,KI:()=>l,Ms:()=>u,O6:()=>s,kt:()=>a,v9:()=>h});var n,i,a,o,s,l,u,c,h,p,f=r(15294);(p=n||(n={}))[p.BACKGROUND=0]="BACKGROUND",p[p.FILL=1]="FILL",p[p.LINE=2]="LINE",p[p.SYMBOL=3]="SYMBOL",p[p.CIRCLE=4]="CIRCLE",function(t){t[t.VISIBLE=0]="VISIBLE",t[t.NONE=1]="NONE"}(i||(i={})),function(t){t[t.POINT=0]="POINT",t[t.LINE=1]="LINE",t[t.LINE_CENTER=2]="LINE_CENTER"}(a||(a={})),function(t){t[t.MAP=0]="MAP",t[t.VIEWPORT=1]="VIEWPORT",t[t.AUTO=2]="AUTO"}(o||(o={})),function(t){t[t.AUTO=0]="AUTO",t[t.LEFT=1]="LEFT",t[t.CENTER=2]="CENTER",t[t.RIGHT=3]="RIGHT"}(s||(s={})),function(t){t[t.CENTER=0]="CENTER",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t[t.TOP=3]="TOP",t[t.BOTTOM=4]="BOTTOM",t[t.TOP_LEFT=5]="TOP_LEFT",t[t.TOP_RIGHT=6]="TOP_RIGHT",t[t.BOTTOM_LEFT=7]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=8]="BOTTOM_RIGHT"}(l||(l={})),function(t){t[t.NONE=0]="NONE",t[t.UPPERCASE=1]="UPPERCASE",t[t.LOWERCASE=2]="LOWERCASE"}(u||(u={})),function(t){t[t.MAP=0]="MAP",t[t.VIEWPORT=1]="VIEWPORT"}(c||(c={})),function(t){t[t.HORIZONTAL=0]="HORIZONTAL",t[t.VERTICAL=1]="VERTICAL"}(h||(h={}));class y{static{this.backgroundLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE}}}static{this.fillLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE}}}static{this.lineLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE},"line-cap":{type:"enum",values:["butt","round","square"],default:f.xR.BUTT},"line-join":{type:"enum",values:["bevel","round","miter"],default:f.JO.MITER},"line-miter-limit":{type:"number",default:2},"line-round-limit":{type:"number",default:1.05}}}static{this.symbolLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE},"symbol-avoid-edges":{type:"boolean",default:!1},"symbol-placement":{type:"enum",values:["point","line","line-center"],default:a.POINT},"symbol-sort-key":{type:"number",default:-1},"symbol-spacing":{type:"number",minimum:1,default:250},"icon-allow-overlap":{type:"boolean",default:!1},"icon-anchor":{type:"enum",values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:l.CENTER},"icon-ignore-placement":{type:"boolean",default:!1},"icon-image":{type:"string"},"icon-keep-upright":{type:"boolean",default:!1},"icon-offset":{type:"array",value:"number",length:2,default:[0,0]},"icon-optional":{type:"boolean",default:!1},"icon-padding":{type:"number",minimum:0,default:2},"icon-rotate":{type:"number",default:0},"icon-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:o.AUTO},"icon-size":{type:"number",minimum:0,default:1},"text-allow-overlap":{type:"boolean",default:!1},"text-anchor":{type:"enum",values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:l.CENTER},"text-field":{type:"string"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"]},"text-ignore-placement":{type:"boolean",default:!1},"text-justify":{type:"enum",values:["auto","left","center","right"],default:s.CENTER},"text-keep-upright":{type:"boolean",default:!0},"text-letter-spacing":{type:"number",default:0},"text-line-height":{type:"number",default:1.2},"text-max-angle":{type:"number",minimum:0,default:45},"text-max-width":{type:"number",minimum:0,default:10},"text-offset":{type:"array",value:"number",length:2,default:[0,0]},"text-optional":{type:"boolean",default:!1},"text-padding":{type:"number",minimum:0,default:2},"text-rotate":{type:"number",default:0},"text-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:o.AUTO},"text-size":{type:"number",minimum:0,default:16},"text-transform":{type:"enum",values:["none","uppercase","lowercase"],default:u.NONE},"text-writing-mode":{type:"array",value:"enum",values:["horizontal","vertical"],default:[h.HORIZONTAL]}}}static{this.circleLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE}}}static{this.backgroundPaintDefinition={"background-color":{type:"color",default:[0,0,0,1]},"background-opacity":{type:"number",minimum:0,maximum:1,default:1},"background-pattern":{type:"string"}}}static{this.fillPaintDefinition={"fill-antialias":{type:"boolean",default:!0},"fill-color":{type:"color",default:[0,0,0,1]},"fill-opacity":{type:"number",minimum:0,maximum:1,default:1},"fill-outline-color":{type:"color",default:[0,0,0,0]},"fill-pattern":{type:"string"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0]},"fill-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP}}}static{this.linePaintDefinition={"line-blur":{type:"number",minimum:0,default:0},"line-color":{type:"color",default:[0,0,0,1]},"line-dasharray":{type:"array",value:"number",default:[]},"line-gap-width":{type:"number",minimum:0,default:0},"line-offset":{type:"number",default:0},"line-opacity":{type:"number",minimum:0,maximum:1,default:1},"line-pattern":{type:"string"},"line-translate":{type:"array",value:"number",length:2,default:[0,0]},"line-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP},"line-width":{type:"number",minimum:0,default:1}}}static{this.symbolPaintDefinition={"icon-color":{type:"color",default:[0,0,0,1]},"icon-halo-blur":{type:"number",minimum:0,default:0},"icon-halo-color":{type:"color",default:[0,0,0,0]},"icon-halo-width":{type:"number",minimum:0,default:0},"icon-opacity":{type:"number",minimum:0,maximum:1,default:1},"icon-translate":{type:"array",value:"number",length:2,default:[0,0]},"icon-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP},"text-color":{type:"color",default:[0,0,0,1]},"text-halo-blur":{type:"number",minimum:0,default:0},"text-halo-color":{type:"color",default:[0,0,0,0]},"text-halo-width":{type:"number",minimum:0,default:0},"text-opacity":{type:"number",minimum:0,maximum:1,default:1},"text-translate":{type:"array",value:"number",length:2,default:[0,0]},"text-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP}}}static{this.rasterPaintDefinition={"raster-opacity":{type:"number",minimum:0,maximum:1,default:1},"raster-hue-rotate":{type:"number",default:0},"raster-brightness-min":{type:"number",minimum:0,maximum:1,default:0},"raster-brightness-max":{type:"number",minimum:0,maximum:1,default:1},"raster-saturation":{type:"number",minimum:-1,maximum:1,default:0},"raster-contrast":{type:"number",minimum:-1,maximum:1,default:0},"raster-fade-duration":{type:"number",minimum:0,default:300}}}static{this.circlePaintDefinition={"circle-blur":{type:"number",minimum:0,default:0},"circle-color":{type:"color",default:[0,0,0,1]},"circle-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-radius":{type:"number",minimum:0,default:5},"circle-stroke-color":{type:"color",default:[0,0,0,1]},"circle-stroke-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-stroke-width":{type:"number",minimum:0,default:0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0]},"circle-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP}}}}},15294:(t,e,r)=>{var n,i,a,o,s,l,u,c,h,p,f,y,g,d,m,_,b,E,T,I,w,R,v,N,A,D,L,P,S,x,O,B,U,C,G,M,k,F,V,z,$,H,Y,W,q,K,j,Z,J,X,Q,tt,et,rt,nt,it,at,ot,st,lt,ut,ct,ht;r.d(e,{$2:()=>s,Ao:()=>N,C1:()=>a,Hz:()=>y,JO:()=>i,M1:()=>v,OW:()=>it,Q1:()=>Z,WE:()=>S,YI:()=>X,e_:()=>j,fu:()=>f,ip:()=>J,oF:()=>w,uQ:()=>R,uT:()=>F,wd:()=>H,xR:()=>n,xw:()=>D,yS:()=>V}),function(t){t[t.BUTT=0]="BUTT",t[t.ROUND=1]="ROUND",t[t.SQUARE=2]="SQUARE",t[t.UNKNOWN=4]="UNKNOWN"}(n||(n={})),function(t){t[t.BEVEL=0]="BEVEL",t[t.ROUND=1]="ROUND",t[t.MITER=2]="MITER",t[t.UNKNOWN=4]="UNKNOWN"}(i||(i={})),function(t){t[t.SCREEN=0]="SCREEN",t[t.MAP=1]="MAP"}(a||(a={})),function(t){t[t.Tint=0]="Tint",t[t.Ignore=1]="Ignore",t[t.Multiply=99]="Multiply"}(o||(o={})),function(t){t.Both="Both",t.JustBegin="JustBegin",t.JustEnd="JustEnd",t.None="None"}(s||(s={})),function(t){t[t.Mosaic=0]="Mosaic",t[t.Centered=1]="Centered"}(l||(l={})),function(t){t[t.Normal=0]="Normal",t[t.Superscript=1]="Superscript",t[t.Subscript=2]="Subscript"}(u||(u={})),function(t){t[t.MSSymbol=0]="MSSymbol",t[t.Unicode=1]="Unicode"}(c||(c={})),function(t){t[t.Unspecified=0]="Unspecified",t[t.TrueType=1]="TrueType",t[t.PSOpenType=2]="PSOpenType",t[t.TTOpenType=3]="TTOpenType",t[t.Type1=4]="Type1"}(h||(h={})),function(t){t[t.Display=0]="Display",t[t.Map=1]="Map"}(p||(p={})),function(t){t.None="None",t.Loop="Loop",t.Oscillate="Oscillate"}(f||(f={})),function(t){t.Linear="Linear",t.EaseIn="EaseIn",t.EaseOut="EaseOut",t.EaseInOut="EaseInOut"}(y||(y={})),function(t){t[t.Z=0]="Z",t[t.X=1]="X",t[t.Y=2]="Y"}(g||(g={})),function(t){t[t.XYZ=0]="XYZ",t[t.ZXY=1]="ZXY",t[t.YXZ=2]="YXZ"}(d||(d={})),function(t){t[t.Rectangle=0]="Rectangle",t[t.RoundedRectangle=1]="RoundedRectangle",t[t.Oval=2]="Oval"}(m||(m={})),function(t){t[t.None=0]="None",t[t.Alpha=1]="Alpha",t[t.Screen=2]="Screen",t[t.Multiply=3]="Multiply",t[t.Add=4]="Add"}(_||(_={})),function(t){t[t.TTB=0]="TTB",t[t.RTL=1]="RTL",t[t.BTT=2]="BTT"}(b||(b={})),function(t){t[t.None=0]="None",t[t.SignPost=1]="SignPost",t[t.FaceNearPlane=2]="FaceNearPlane"}(E||(E={})),function(t){t[t.Float=0]="Float",t[t.String=1]="String",t[t.Boolean=2]="Boolean"}(T||(T={})),function(t){t[t.Intersect=0]="Intersect",t[t.Subtract=1]="Subtract"}(I||(I={})),function(t){t.OpenEnded="OpenEnded",t.Block="Block",t.Crossed="Crossed"}(w||(w={})),function(t){t.FullGeometry="FullGeometry",t.PerpendicularFromFirstSegment="PerpendicularFromFirstSegment",t.ReversedFirstSegment="ReversedFirstSegment",t.PerpendicularToSecondSegment="PerpendicularToSecondSegment",t.SecondSegmentWithTicks="SecondSegmentWithTicks",t.DoublePerpendicular="DoublePerpendicular",t.OppositeToFirstSegment="OppositeToFirstSegment",t.TriplePerpendicular="TriplePerpendicular",t.HalfCircleFirstSegment="HalfCircleFirstSegment",t.HalfCircleSecondSegment="HalfCircleSecondSegment",t.HalfCircleExtended="HalfCircleExtended",t.OpenCircle="OpenCircle",t.CoverageEdgesWithTicks="CoverageEdgesWithTicks",t.GapExtentWithDoubleTicks="GapExtentWithDoubleTicks",t.GapExtentMidline="GapExtentMidline",t.Chevron="Chevron",t.PerpendicularWithArc="PerpendicularWithArc",t.ClosedHalfCircle="ClosedHalfCircle",t.TripleParallelExtended="TripleParallelExtended",t.ParallelWithTicks="ParallelWithTicks",t.Parallel="Parallel",t.PerpendicularToFirstSegment="PerpendicularToFirstSegment",t.ParallelOffset="ParallelOffset",t.OffsetOpposite="OffsetOpposite",t.OffsetSame="OffsetSame",t.CircleWithArc="CircleWithArc",t.DoubleJog="DoubleJog",t.PerpendicularOffset="PerpendicularOffset",t.LineExcludingLastSegment="LineExcludingLastSegment",t.MultivertexArrow="MultivertexArrow",t.CrossedArrow="CrossedArrow",t.ChevronArrow="ChevronArrow",t.ChevronArrowOffset="ChevronArrowOffset",t.PartialFirstSegment="PartialFirstSegment",t.Arch="Arch",t.CurvedParallelTicks="CurvedParallelTicks",t.Arc90Degrees="Arc90Degrees",t.TipWithPerpendicularAndTicks="TipWithPerpendicularAndTicks",t.ConcentricCircles="ConcentricCircles",t.DoubleJogArrow="DoubleJogArrow",t.LinkedChevrons="LinkedChevrons",t.SegmentThenHalfCircle="SegmentThenHalfCircle",t.LineWithStraightTicks="LineWithStraightTicks",t.DoubleCurve="DoubleCurve",t.ParallelWithTicksByWidth="ParallelWithTicksByWidth",t.EnclosingRoundedRectangle="EnclosingRoundedRectangle"}(R||(R={})),function(t){t.Mitered="Mitered",t.Bevelled="Bevelled",t.Rounded="Rounded",t.Square="Square",t.TrueBuffer="TrueBuffer"}(v||(v={})),function(t){t.ClosePath="ClosePath",t.ConvexHull="ConvexHull",t.RectangularBox="RectangularBox"}(N||(N={})),function(t){t.BeginningOfLine="BeginningOfLine",t.EndOfLine="EndOfLine"}(A||(A={})),function(t){t.Mitered="Mitered",t.Bevelled="Bevelled",t.Rounded="Rounded",t.Square="Square"}(D||(D={})),function(t){t.Fast="Fast",t.Accurate="Accurate"}(L||(L={})),function(t){t.BeginningOfLine="BeginningOfLine",t.EndOfLine="EndOfLine"}(P||(P={})),function(t){t.Sinus="Sinus",t.Square="Square",t.Triangle="Triangle",t.Random="Random"}(S||(S={})),function(t){t[t.None=0]="None",t[t.Default=1]="Default",t[t.Force=2]="Force"}(x||(x={})),function(t){t[t.Buffered=0]="Buffered",t[t.Left=1]="Left",t[t.Right=2]="Right",t[t.AlongLine=3]="AlongLine"}(O||(O={})),function(t){t[t.Linear=0]="Linear",t[t.Rectangular=1]="Rectangular",t[t.Circular=2]="Circular",t[t.Buffered=3]="Buffered"}(B||(B={})),function(t){t[t.Discrete=0]="Discrete",t[t.Continuous=1]="Continuous"}(U||(U={})),function(t){t[t.AcrossLine=0]="AcrossLine",t[t.AlongLine=1]="AlongLine"}(C||(C={})),function(t){t[t.Auto=0]="Auto",t[t.Clockwise=1]="Clockwise",t[t.Counterclockwise=2]="Counterclockwise"}(G||(G={})),function(t){t[t.Left=0]="Left",t[t.Right=1]="Right",t[t.Center=2]="Center",t[t.Justify=3]="Justify"}(M||(M={})),function(t){t[t.Base=0]="Base",t[t.MidPoint=1]="MidPoint",t[t.ThreePoint=2]="ThreePoint",t[t.FourPoint=3]="FourPoint",t[t.Underline=4]="Underline",t[t.CircularCW=5]="CircularCW",t[t.CircularCCW=6]="CircularCCW"}(k||(k={})),function(t){t.Butt="Butt",t.Round="Round",t.Square="Square"}(F||(F={})),function(t){t.NoConstraint="NoConstraint",t.HalfPattern="HalfPattern",t.HalfGap="HalfGap",t.FullPattern="FullPattern",t.FullGap="FullGap",t.Custom="Custom"}(V||(V={})),function(t){t[t.None=-1]="None",t[t.Custom=0]="Custom",t[t.Circle=1]="Circle",t[t.OpenArrow=2]="OpenArrow",t[t.ClosedArrow=3]="ClosedArrow",t[t.Diamond=4]="Diamond"}(z||(z={})),function(t){t[t.ExtraLeading=0]="ExtraLeading",t[t.Multiple=1]="Multiple",t[t.Exact=2]="Exact"}($||($={})),function(t){t.Bevel="Bevel",t.Round="Round",t.Miter="Miter"}(H||(H={})),function(t){t[t.Default=0]="Default",t[t.String=1]="String",t[t.Numeric=2]="Numeric"}(Y||(Y={})),function(t){t[t.InsidePolygon=0]="InsidePolygon",t[t.PolygonCenter=1]="PolygonCenter",t[t.RandomlyInsidePolygon=2]="RandomlyInsidePolygon"}(W||(W={})),function(t){t[t.Tint=0]="Tint",t[t.Replace=1]="Replace",t[t.Multiply=2]="Multiply"}(q||(q={})),function(t){t[t.ClipAtBoundary=0]="ClipAtBoundary",t[t.RemoveIfCenterOutsideBoundary=1]="RemoveIfCenterOutsideBoundary",t[t.DoNotTouchBoundary=2]="DoNotTouchBoundary",t[t.DoNotClip=3]="DoNotClip"}(K||(K={})),function(t){t.NoConstraint="NoConstraint",t.WithMarkers="WithMarkers",t.WithFullGap="WithFullGap",t.WithHalfGap="WithHalfGap",t.Custom="Custom"}(j||(j={})),function(t){t.Fixed="Fixed",t.Random="Random",t.RandomFixedQuantity="RandomFixedQuantity"}(Z||(Z={})),function(t){t.LineMiddle="LineMiddle",t.LineBeginning="LineBeginning",t.LineEnd="LineEnd",t.SegmentMidpoint="SegmentMidpoint"}(J||(J={})),function(t){t.OnPolygon="OnPolygon",t.CenterOfMass="CenterOfMass",t.BoundingBoxCenter="BoundingBoxCenter"}(X||(X={})),function(t){t[t.Low=0]="Low",t[t.Medium=1]="Medium",t[t.High=2]="High"}(Q||(Q={})),function(t){t[t.MarkerCenter=0]="MarkerCenter",t[t.MarkerBounds=1]="MarkerBounds"}(tt||(tt={})),function(t){t[t.None=0]="None",t[t.PropUniform=1]="PropUniform",t[t.PropNonuniform=2]="PropNonuniform",t[t.DifUniform=3]="DifUniform",t[t.DifNonuniform=4]="DifNonuniform"}(et||(et={})),function(t){t.Tube="Tube",t.Strip="Strip",t.Wall="Wall"}(rt||(rt={})),function(t){t[t.Random=0]="Random",t[t.Increasing=1]="Increasing",t[t.Decreasing=2]="Decreasing",t[t.IncreasingThenDecreasing=3]="IncreasingThenDecreasing"}(nt||(nt={})),function(t){t[t.Relative=0]="Relative",t[t.Absolute=1]="Absolute"}(it||(it={})),function(t){t[t.Normal=0]="Normal",t[t.LowerCase=1]="LowerCase",t[t.Allcaps=2]="Allcaps"}(at||(at={})),function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"}(ot||(ot={})),function(t){t.Draft="Draft",t.Picture="Picture",t.Text="Text"}(st||(st={})),function(t){t[t.Top=0]="Top",t[t.Center=1]="Center",t[t.Baseline=2]="Baseline",t[t.Bottom=3]="Bottom"}(lt||(lt={})),function(t){t[t.Right=0]="Right",t[t.Upright=1]="Upright"}(ut||(ut={})),function(t){t[t.Small=0]="Small",t[t.Medium=1]="Medium",t[t.Large=2]="Large"}(ct||(ct={})),function(t){t[t.Calm=0]="Calm",t[t.Rippled=1]="Rippled",t[t.Slight=2]="Slight",t[t.Moderate=3]="Moderate"}(ht||(ht={}))},45013:(t,e,r)=>{r.d(e,{A:()=>a});var n=r(4272),i=r(3057);class a{constructor(t){if(this._style=t,this.backgroundBucketIds=[],this._uidToLayer=new Map,this._layerByName={},this._runningId=0,t.layers||(t.layers=[]),this.version=parseFloat(t.version),this.layers=t.layers.map(((t,e,r)=>this._create(t,e,r))).filter((t=>!!t)),this.layers)for(let t=0;t<this.layers.length;t++){const e=this.layers[t];this._layerByName[e.id]=e,this._uidToLayer.set(e.uid,e),e.type===n.Dc.BACKGROUND&&this.backgroundBucketIds.push(e.id)}this._identifyRefLayers()}isPainterDataDriven(t){const e=this._layerByName[t];return!!e&&e.isPainterDataDriven()}getStyleLayerId(t){return t>=this.layers.length?null:this.layers[t].id}getStyleLayerByUID(t){return this._uidToLayer.get(t)??null}getStyleLayerIndex(t){const e=this._layerByName[t];return e?this.layers.indexOf(e):-1}setStyleLayer(t,e){if(!t?.id)return;const r=this._style;null!=e&&e>=this.layers.length&&(e=this.layers.length-1);let n,i=!0;const o=this._layerByName[t.id];if(o){const s=this.layers.indexOf(o);e||(e=s),e===s?(i=!1,n=a._recreateLayer(t,o),this.layers[e]=n,r.layers[e]=t):(this.layers.splice(s,1),r.layers.splice(s,1),n=this._create(t,e,this.layers),this.layers.splice(e,0,n),r.layers.splice(e,0,t))}else n=this._create(t,e,this.layers),!e||e>=this.layers.length?(this.layers.push(n),r.layers.push(t)):(this.layers.splice(e,0,n),r.layers.splice(e,0,t));this._layerByName[t.id]=n,this._uidToLayer.set(n.uid,n),i&&this._recomputeZValues(),this._identifyRefLayers()}getStyleLayer(t){const e=this._layerByName[t];return e?{type:e.typeName,id:e.id,source:e.source,"source-layer":e.sourceLayer,minzoom:e.minzoom,maxzoom:e.maxzoom,filter:e.filter,layout:e.layout,paint:e.paint}:null}deleteStyleLayer(t){const e=this._layerByName[t];if(e){delete this._layerByName[t],this._uidToLayer.delete(e.uid);const r=this.layers.indexOf(e);this.layers.splice(r,1),this._style.layers.splice(r,1),this._recomputeZValues(),this._identifyRefLayers()}}getLayerById(t){return this._layerByName[t]}getLayoutProperties(t){const e=this._layerByName[t];return e?e.layout:null}getPaintProperties(t){const e=this._layerByName[t];return e?e.paint:null}setPaintProperties(t,e){const r=this._layerByName[t];if(!r)return;const n={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:r.layout,paint:e},i=a._recreateLayer(n,r),o=this.layers.indexOf(r);this.layers[o]=i,this._style.layers[o].paint=e,this._layerByName[r.id]=i,this._uidToLayer.set(r.uid,i)}setLayoutProperties(t,e){const r=this._layerByName[t];if(!r)return;const n={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:e,paint:r.paint},i=a._recreateLayer(n,r),o=this.layers.indexOf(r);this.layers[o]=i,this._style.layers[o].layout=e,this._layerByName[r.id]=i,this._uidToLayer.set(r.uid,i)}setStyleLayerVisibility(t,e){const r=this._layerByName[t];if(!r)return;const n=r.layout||{};n.visibility=e;const i={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:n,paint:r.paint},o=a._recreateLayer(i,r),s=this.layers.indexOf(r);this.layers[s]=o,this._style.layers[s].layout=n,this._layerByName[r.id]=o,this._uidToLayer.set(r.uid,o)}getStyleLayerVisibility(t){const e=this._layerByName[t];if(!e)return"none";const r=e.layout;return r?.visibility??"visible"}_recomputeZValues(){const t=this.layers,e=1/(t.length+1);for(let r=0;r<t.length;r++)t[r].z=1-(1+r)*e}_identifyRefLayers(){const t=[],e=[];let r=0;for(const i of this.layers){const a=i.layout;if(i.type===n.Dc.FILL){const e=i;let n=i.source+"|"+i.sourceLayer;n+="|"+(a?.visibility??""),n+="|"+i.minzoom,n+="|"+i.maxzoom,n+="|"+JSON.stringify(i.filter),(e.hasDataDrivenFill||e.hasDataDrivenOutline)&&(n+="|"+r),t.push({key:n,layer:i})}else if(i.type===n.Dc.LINE){const t=i,n=i.paint,o=null!=n&&(null!=n["line-pattern"]||null!=n["line-dasharray"]);let s=i.source+"|"+i.sourceLayer;s+="|"+(a?.visibility??""),s+="|"+i.minzoom,s+="|"+i.maxzoom,s+="|"+JSON.stringify(i.filter),s+="|"+(void 0!==a?a["line-cap"]:""),s+="|"+(void 0!==a?a["line-join"]:""),(t.hasDataDrivenLine||o)&&(s+="|"+r),e.push({key:s,layer:i})}++r}this._assignRefLayers(t),this._assignRefLayers(e)}_assignRefLayers(t){let e,r;t.sort(((t,e)=>t.key<e.key?-1:t.key>e.key?1:0));const i=t.length;for(let a=0;a<i;a++){const o=t[a];if(o.key===e)o.layer.refLayerId=r;else if(e=o.key,r=o.layer.id,o.layer.type===n.Dc.FILL){if(!o.layer.getPaintProperty("fill-outline-color"))for(let n=a+1;n<i;n++){const i=t[n];if(i.key!==e)break;if(i.layer.getPaintProperty("fill-outline-color")){t[a]=i,t[n]=o,r=i.layer.id;break}}}else if(o.layer.type===n.Dc.LINE){let n=o.layer;for(let s=a+1;s<i;s++){const i=t[s];if(i.key!==e)break;const l=i.layer;(n.canUseThinTessellation&&!l.canUseThinTessellation||!n.canUseThinTessellation&&(l.getPaintProperty("line-pattern")||l.getPaintProperty("line-dasharray")))&&(n=l,t[a]=i,t[s]=o,r=i.layer.id)}}}}_create(t,e,r){const a=1-(1+e)*(1/(r.length+1)),o=this._runningId++;switch(t.type){case"background":return new i.lf(n.Dc.BACKGROUND,t,a,o);case"fill":return new i.A4(n.Dc.FILL,t,a,o);case"line":return new i.tU(n.Dc.LINE,t,a,o);case"symbol":return new i.V1(n.Dc.SYMBOL,t,a,o);case"raster":return console.warn(`Unsupported vector tile raster layer ${t.id}`),null;case"circle":return new i.L(n.Dc.CIRCLE,t,a,o)}return null}static _recreateLayer(t,e){switch(t.type){case"background":return new i.lf(n.Dc.BACKGROUND,t,e.z,e.uid);case"fill":return new i.A4(n.Dc.FILL,t,e.z,e.uid);case"line":return new i.tU(n.Dc.LINE,t,e.z,e.uid);case"symbol":return new i.V1(n.Dc.SYMBOL,t,e.z,e.uid);case"raster":return console.warn(`Unsupported vector tile raster layer ${t.id}`),null;case"circle":return new i.L(n.Dc.CIRCLE,t,e.z,e.uid)}return null}}},68197:(t,e,r)=>{r.d(e,{A:()=>h});var n,i,a=r(40876),o=r(34727),s=r(56507);function l(t){return(0,o.qE)((0,s.Vr)(t),0,255)}function u(t,e,r){return t=Number(t),isNaN(t)?r:t<e?e:t>r?r:t}function c(t,e){const r=t.toString(16).padStart(2,"0");return e?r.slice(0,1):r}class h{static blendColors(t,e,r,n=new h){return n.r=Math.round(t.r+(e.r-t.r)*r),n.g=Math.round(t.g+(e.g-t.g)*r),n.b=Math.round(t.b+(e.b-t.b)*r),n.a=t.a+(e.a-t.a)*r,n._sanitize()}static fromRgb(t,e){const r=t.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(r){const t=r[2].split(/\s*,\s*/),n=r[1];if("rgb"===n&&3===t.length||"rgba"===n&&4===t.length){const r=t[0];if("%"===r.charAt(r.length-1)){const r=t.map((t=>2.56*parseFloat(t)));return 4===t.length&&(r[3]=parseFloat(t[3])),h.fromArray(r,e)}return h.fromArray(t.map((t=>parseFloat(t))),e)}if("hsl"===n&&3===t.length||"hsla"===n&&4===t.length)return h.fromArray((0,a.z$)(parseFloat(t[0]),parseFloat(t[1])/100,parseFloat(t[2])/100,parseFloat(t[3])),e)}return null}static fromHex(t,e=new h){if("#"!==t[0]||isNaN(Number(`0x${t.slice(1)}`)))return null;switch(t.length){case 4:case 5:{const r=parseInt(t.slice(1,2),16),n=parseInt(t.slice(2,3),16),i=parseInt(t.slice(3,4),16),a=5===t.length?15:parseInt(t.slice(4),16);return h.fromArray([r+16*r,n+16*n,i+16*i,(a+16*a)/255],e)}case 7:case 9:{const r=parseInt(t.slice(1,3),16),n=parseInt(t.slice(3,5),16),i=parseInt(t.slice(5,7),16),a=7===t.length?255:parseInt(t.slice(7),16);return h.fromArray([r,n,i,a/255],e)}default:return null}}static fromArray(t,e=new h){return e._set(Number(t[0]),Number(t[1]),Number(t[2]),Number(t[3])),isNaN(e.a)&&(e.a=1),e._sanitize()}static fromString(t,e){const r=(0,a.V6)(t)?(0,a.TS)(t):null;return r&&h.fromArray(r,e)||h.fromRgb(t,e)||h.fromHex(t,e)}static fromJSON(t){return null!=t?new h([t[0],t[1],t[2],(t[3]??255)/255]):void 0}static toUnitRGB(t){return null!=t?[t.r/255,t.g/255,t.b/255]:null}static toUnitRGBA(t){return null!=t?[t.r/255,t.g/255,t.b/255,null!=t.a?t.a:1]:null}constructor(t){this.r=255,this.g=255,this.b=255,this.a=1,t&&this.setColor(t)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(t){return"string"==typeof t?h.fromString(t,this):Array.isArray(t)?h.fromArray(t,this):(this._set(t.r??0,t.g??0,t.b??0,t.a??1),t instanceof h||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(t){const e=t?.capitalize??!1,r=t?.digits??6,n=3===r||4===r,i=4===r||8===r,a=`#${c(this.r,n)}${c(this.g,n)}${c(this.b,n)}${i?c(Math.round(255*this.a),n):""}`;return e?a.toUpperCase():a}toCss(t=!1){const e=this.r+", "+this.g+", "+this.b;return t?`rgba(${e}, ${this.a})`:`rgb(${e})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(t=h.AlphaMode.ALWAYS){const e=l(this.r),r=l(this.g),n=l(this.b);return t===h.AlphaMode.ALWAYS||1!==this.a?[e,r,n,l(255*this.a)]:[e,r,n]}clone(){return new h(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(t){return null!=t&&t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}_sanitize(){return this.r=Math.round(u(this.r,0,255)),this.g=Math.round(u(this.g,0,255)),this.b=Math.round(u(this.b,0,255)),this.a=u(this.a,0,1),this}_set(t,e,r,n){this.r=t,this.g=e,this.b=r,this.a=n}}h.prototype.declaredClass="esri.Color",(i=(n=h).AlphaMode||(n.AlphaMode={}))[i.ALWAYS=0]="ALWAYS",i[i.UNLESS_OPAQUE=1]="UNLESS_OPAQUE"},74038:(t,e,r)=>{r.d(e,{_:()=>n});class n{constructor(t,e,r,n,i,a=!1,o=0){this.name=t,this.count=e,this.type=r,this.offset=n,this.stride=i,this.normalized=a,this.divisor=o}}},80081:(t,e,r)=>{r.d(e,{A:()=>n}),r(44208);class n{constructor(t){this._array=[],this._stride=t}get array(){return this._array}get index(){return 4*this._array.length/this._stride}get itemSize(){return this._stride}get sizeInBytes(){return 4*this._array.length}reset(){this.array.length=0}toBuffer(){return new Uint32Array(this._array).buffer}static i1616to32(t,e){return 65535&t|e<<16}static i8888to32(t,e,r,n){return 255&t|(255&e)<<8|(255&r)<<16|n<<24}static i8816to32(t,e,r){return 255&t|(255&e)<<8|r<<16}}},85334:(t,e,r)=>{r.d(e,{$:()=>m,IB:()=>o,Iy:()=>w,N2:()=>_,RH:()=>E,ZD:()=>b});var n=r(68197),i=r(4576),a=r(4718);function o(t){return"r"in t&&"g"in t&&"b"in t}function s(t){return"h"in t&&"s"in t&&"v"in t}function l(t){return"l"in t&&"a"in t&&"b"in t}function u(t){return"l"in t&&"c"in t&&"h"in t}r(34727),r(87317),r(91829);const c=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],h=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function p(t,e){const r=[];let n,i;if(t[0].length!==e.length)throw new Error("dimensions do not match");const a=t.length,o=t[0].length;let s=0;for(n=0;n<a;n++){for(s=0,i=0;i<o;i++)s+=t[n][i]*e[i];r.push(s)}return r}function f(t){const e=[t.r/255,t.g/255,t.b/255].map((t=>t<=.04045?t/12.92:((t+.055)/1.055)**2.4)),r=p(c,e);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function y(t){const e=p(h,[t.x/100,t.y/100,t.z/100]).map((t=>{const e=t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055;return Math.min(1,Math.max(e,0))}));return{r:Math.round(255*e[0]),g:Math.round(255*e[1]),b:Math.round(255*e[2])}}function g(t){const e=[t.x/95.047,t.y/100,t.z/108.883].map((t=>t>(6/29)**3?t**(1/3):1/3*(29/6)**2*t+4/29));return{l:116*e[1]-16,a:500*(e[0]-e[1]),b:200*(e[1]-e[2])}}function d(t){const e=t.l,r=[(e+16)/116+t.a/500,(e+16)/116,(e+16)/116-t.b/200].map((t=>t>6/29?t**3:3*(6/29)**2*(t-4/29)));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function m(t){return o(t)?t:u(t)?function(t){return y(d(function(t){const e=t.l,r=t.c,n=t.h;return{l:e,a:r*Math.cos(n),b:r*Math.sin(n)}}(t)))}(t):l(t)?function(t){return y(d(t))}(t):function(t){return"x"in t&&"y"in t&&"z"in t}(t)?y(t):s(t)?function(t){const e=(t.h+360)%360/60,r=t.s/100,n=t.v/100*255,i=n*r,a=i*(1-Math.abs(e%2-1));let o;switch(Math.floor(e)){case 0:o={r:i,g:a,b:0};break;case 1:o={r:a,g:i,b:0};break;case 2:o={r:0,g:i,b:a};break;case 3:o={r:0,g:a,b:i};break;case 4:o={r:a,g:0,b:i};break;case 5:case 6:o={r:i,g:0,b:a};break;default:o={r:0,g:0,b:0}}return o.r=Math.round(o.r+n-i),o.g=Math.round(o.g+n-i),o.b=Math.round(o.b+n-i),o}(t):t}function _(t){return s(t)?t:function(t){const e=t.r,r=t.g,n=t.b,i=Math.max(e,r,n),a=i-Math.min(e,r,n);let o=i,s=0===a?0:i===e?(r-n)/a%6:i===r?(n-e)/a+2:(e-r)/a+4,l=0===a?0:a/o;return s<0&&(s+=6),s*=60,l*=100,o*=100/255,{h:s,s:l,v:o}}(m(t))}function b(t){return l(t)?t:function(t){return g(f(t))}(m(t))}function E(t){return u(t)?t:function(t){return function(t){const e=t.l,r=t.a,n=t.b,i=Math.sqrt(r*r+n*n);let a=Math.atan2(n,r);return a=a>0?a:a+2*Math.PI,{l:e,c:i,h:a}}(g(f(t)))}(m(t))}var T,I;function w(t,e,r={}){if(0===t.length||e<=0)return[];if(1===(t=t.map((t=>"string"==typeof t?new n.A(t):t))).length||1===e){const r=[],n=t[0];for(let t=0;t<e;t++)r.push(n.clone());return r}if(r.shuffle&&(t=(0,i.k4)((0,a.o8)(t),r.seed)),t.length>=e){const r=[],n=(t.length-1)/(e-1);for(let i=0;i<e;i++){const e=Math.round(i*n);r.push(t[e].clone())}return r}return function(t,e,r={}){const n=[],a=t.length-1,o=Math.ceil((e-t.length)/a);t:for(let i=0;i<a;i++){const a=t[i],s=t[i+1];for(let i=1;i<=o;i++){const l=i/(o+1);if(n.push(v(a,s,l,r)),n.length+t.length===e)break t}}return[...t.map((t=>t.clone())),...(0,i.k4)(n,r.seed??1)]}(t,e,r)}(I=T||(T={}))[I.Low=160]="Low",I[I.High=225]="High";const R=(t,e)=>{const r=Math.floor(10*e())-5;return Math.min(255,Math.max(0,t+r))};function v(t,e,r,a={}){const o=t.r,s=t.g,l=t.b,u=e.r,c=e.g,h=e.b,p=Math.round(o+(u-o)*r),f=Math.round(s+(c-s)*r),y=Math.round(l+(h-l)*r);if(!a.offset)return new n.A([p,f,y]);const g=(0,i.Mo)(a.seed);return new n.A([R(p,g),R(f,g),R(y,g)])}},89640:(t,e,r)=>{var n,i,a;r.d(e,{$q:()=>a,NP:()=>n,kh:()=>i}),function(t){t[t.FILL=1]="FILL",t[t.LINE=2]="LINE",t[t.SYMBOL=3]="SYMBOL",t[t.CIRCLE=4]="CIRCLE"}(n||(n={})),function(t){t[t.BACKGROUND=0]="BACKGROUND",t[t.FILL=1]="FILL",t[t.OUTLINE=2]="OUTLINE",t[t.LINE=3]="LINE",t[t.ICON=4]="ICON",t[t.CIRCLE=5]="CIRCLE",t[t.TEXT=6]="TEXT",t[t.TILEINFO=7]="TILEINFO"}(i||(i={})),function(t){t[t.PAINTER_CHANGED=0]="PAINTER_CHANGED",t[t.LAYOUT_CHANGED=1]="LAYOUT_CHANGED",t[t.LAYER_CHANGED=2]="LAYER_CHANGED",t[t.LAYER_REMOVED=3]="LAYER_REMOVED",t[t.SPRITES_CHANGED=4]="SPRITES_CHANGED"}(a||(a={}))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8613],{2073:(e,t,r)=>{r.d(t,{$n:()=>b,$r:()=>m,EM:()=>f,Ec:()=>I,JJ:()=>h,Mm:()=>A,OC:()=>P,Sr:()=>p,UO:()=>a,Vj:()=>G,WU:()=>E,Y8:()=>s,Z7:()=>l,_6:()=>v,aJ:()=>d,dd:()=>M,dn:()=>u,et:()=>S,fe:()=>w,gD:()=>T,hE:()=>c,hY:()=>o,iM:()=>_,mt:()=>g,ow:()=>y,vS:()=>R});var i=r(66552);const n={esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"},o=(0,i.O)()(n),s=(0,i.O)()({...n,esriIntFeet:"international-feet",esriIntInches:"international-inches",esriIntMiles:"international-miles",esriIntNauticalMiles:"international-nautical-miles",esriIntYards:"international-yards"}),a=(0,i.O)()({esriAcres:"international-acres",esriAcresUS:"us-acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-international-feet",esriSquareFeetUS:"square-us-feet",esriSquareInches:"square-international-inches",esriSquareInchesUS:"square-us-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-international-miles",esriSquareMilesUS:"square-us-miles",esriSquareMillimeters:"square-millimeters",esriSquareYards:"square-international-yards",esriSquareYardsUS:"square-us-yards",esriUnknownAreaUnits:"unknown"}),l=(0,i.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"}),u=(0,i.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"}),d=(0,i.O)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),p=(0,i.O)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),c=((0,i.O)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,i.O)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),y=((0,i.O)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,i.O)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,i.O)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),h=(0,i.O)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),f=(0,i.O)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),m=(0,i.O)()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),g=(0,i.O)()({1:"right",2:"left"},{useNumericKeys:!0}),_=(0,i.O)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),w=(0,i.O)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),v=(0,i.O)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation",1007:"lane"},{useNumericKeys:!0}),T=(0,i.O)()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),b=(0,i.O)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),M=(0,i.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),A=(0,i.O)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),S=(0,i.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),P=(0,i.O)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),R=(0,i.O)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),G=(0,i.O)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),E=(0,i.O)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),I=(0,i.O)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"})},22671:(e,t,r)=>{r.d(t,{A:()=>w});var i,n=r(90237),o=r(52106),s=r(66552),a=r(25482),l=r(4718),u=r(10107),d=(r(44208),r(53966),r(36005)),p=r(40608),c=r(43937),y=r(16930),h=r(65864),f=r(50498),m=r(20437);const g=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=i=class extends a.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,h.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=y.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[o,s]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>n-e*s),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=y.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const o=e[t],s=r.fromJSON(o),a=o.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=i);const l=o.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],n=r?.spatialReference;null==t||n||(t.spatialReference=i)}n.push(s)}return n}_quantizePoints(e,t,r){let i,n;const o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=r(a[1]);e===i&&s===n||(o.push([e-i,s-n]),i=e,n=s)}else i=t(a[0]),n=r(a[1]),o.push([i,n])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,h.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],s=this._quantizePoints(o,t,r);s&&n.push(s)}return n.length>0?((0,h.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,h.Bi)(e)?e.rings:e.paths;let s,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],a+=n[1]):(s=n[0],a=n[1]),n[0]=t(s),n[1]=r(a)}}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=r(a)}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,u.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,u.MZ)({type:[o.A],json:{write:!0}})],_.prototype,"features",void 0),(0,n._)([(0,d.w)("features")],_.prototype,"readFeatures",null),(0,n._)([(0,u.MZ)({type:[m.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,n._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,n._)([(0,c.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,n._)([(0,u.MZ)({types:f.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,n._)([(0,d.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,n._)([(0,u.MZ)({type:y.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,n._)([(0,c.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,n._)([(0,u.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=i=(0,n._)([(0,p.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0;const w=_},35448:(e,t,r)=>{var i,n,o,s,a,l,u;r.d(t,{Eq:()=>i,bV:()=>o,nP:()=>a,r5:()=>n,ti:()=>l,vy:()=>u,wr:()=>s}),function(e){e[e.Regular=0]="Regular",e[e.Provenance=1]="Provenance",e[e.Document=2]="Document"}(i||(i={})),function(e){e[e.esriFieldTypeSmallInteger=0]="esriFieldTypeSmallInteger",e[e.esriFieldTypeInteger=1]="esriFieldTypeInteger",e[e.esriFieldTypeSingle=2]="esriFieldTypeSingle",e[e.esriFieldTypeDouble=3]="esriFieldTypeDouble",e[e.esriFieldTypeString=4]="esriFieldTypeString",e[e.esriFieldTypeDate=5]="esriFieldTypeDate",e[e.esriFieldTypeOID=6]="esriFieldTypeOID",e[e.esriFieldTypeGeometry=7]="esriFieldTypeGeometry",e[e.esriFieldTypeBlob=8]="esriFieldTypeBlob",e[e.esriFieldTypeRaster=9]="esriFieldTypeRaster",e[e.esriFieldTypeGUID=10]="esriFieldTypeGUID",e[e.esriFieldTypeGlobalID=11]="esriFieldTypeGlobalID",e[e.esriFieldTypeXML=12]="esriFieldTypeXML",e[e.esriFieldTypeBigInteger=13]="esriFieldTypeBigInteger",e[e.esriFieldTypeDateOnly=14]="esriFieldTypeDateOnly",e[e.esriFieldTypeTimeOnly=15]="esriFieldTypeTimeOnly",e[e.esriFieldTypeTimestampOffset=16]="esriFieldTypeTimestampOffset"}(n||(n={})),function(e){e[e.esriGeometryNull=0]="esriGeometryNull",e[e.esriGeometryPoint=1]="esriGeometryPoint",e[e.esriGeometryMultipoint=2]="esriGeometryMultipoint",e[e.esriGeometryPolyline=3]="esriGeometryPolyline",e[e.esriGeometryPolygon=4]="esriGeometryPolygon",e[e.esriGeometryEnvelope=5]="esriGeometryEnvelope",e[e.esriGeometryAny=6]="esriGeometryAny",e[e.esriGeometryMultiPatch=7]="esriGeometryMultiPatch"}(o||(o={})),function(e){e[e.esriMethodHintUNSPECIFIED=0]="esriMethodHintUNSPECIFIED",e[e.esriUUIDESRI=1]="esriUUIDESRI",e[e.esriUUIDRFC4122=2]="esriUUIDRFC4122"}(s||(s={})),function(e){e[e.esriTypeUNSPECIFIED=0]="esriTypeUNSPECIFIED",e[e.esriTypeEntity=1]="esriTypeEntity",e[e.esriTypeRelationship=2]="esriTypeRelationship",e[e.esriTypeBoth=4]="esriTypeBoth"}(a||(a={})),function(e){e[e.esriGraphPropertyUNSPECIFIED=0]="esriGraphPropertyUNSPECIFIED",e[e.esriGraphPropertyRegular=1]="esriGraphPropertyRegular",e[e.esriGraphPropertyDocumentName=2]="esriGraphPropertyDocumentName",e[e.esriGraphPropertyDocumentTitle=3]="esriGraphPropertyDocumentTitle",e[e.esriGraphPropertyDocumentUrl=4]="esriGraphPropertyDocumentUrl",e[e.esriGraphPropertyDocumentText=5]="esriGraphPropertyDocumentText",e[e.esriGraphPropertyDocumentKeywords=6]="esriGraphPropertyDocumentKeywords",e[e.esriGraphPropertyDocumentContentType=7]="esriGraphPropertyDocumentContentType",e[e.esriGraphPropertyDocumentMetadata=8]="esriGraphPropertyDocumentMetadata",e[e.esriGraphPropertyDocumentFileExtension=9]="esriGraphPropertyDocumentFileExtension",e[e.esriGraphPropertyProvenanceInstanceId=10]="esriGraphPropertyProvenanceInstanceId",e[e.esriGraphPropertyProvenanceSourceType=11]="esriGraphPropertyProvenanceSourceType",e[e.esriGraphPropertyProvenanceSourceName=12]="esriGraphPropertyProvenanceSourceName",e[e.esriGraphPropertyProvenanceSource=13]="esriGraphPropertyProvenanceSource",e[e.esriGraphPropertyProvenanceComment=14]="esriGraphPropertyProvenanceComment",e[e.esriGraphPropertyProvenanceTypeName=15]="esriGraphPropertyProvenanceTypeName",e[e.esriGraphPropertyProvenancePropertyName=16]="esriGraphPropertyProvenancePropertyName"}(l||(l={})),function(e){e[e.esriIdentifierInfoTypeUNSPECIFIED=0]="esriIdentifierInfoTypeUNSPECIFIED",e[e.esriIdentifierInfoTypeDatabaseNative=1]="esriIdentifierInfoTypeDatabaseNative",e[e.esriIdentifierInfoTypeUniformProperty=2]="esriIdentifierInfoTypeUniformProperty"}(u||(u={}))},37807:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(90237),n=r(66552),o=r(25482),s=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const l=new n.J({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let u=class extends o.A{constructor(e){super(e),this.description=null,this.type=null}};(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],u.prototype,"description",void 0),(0,i._)([(0,s.MZ)({type:String,json:{read:l.read,write:l.write}})],u.prototype,"type",void 0),u=(0,i._)([(0,a.$)("esri.rest.support.GPMessage")],u);const d=u},45724:(e,t,r)=>{r.d(t,{I:()=>l});var i=r(2741),n=r(44208);const o="esri/rest/knowledgeGraph/wasmInterface/";let s,a=null;async function l(){const e=a??s;if(e)return e;const t=!!(0,n.A)("wasm-simd");return s=u(t),s}async function u(e){if(e){const{default:e}=await r.e(5367).then(r.bind(r,15367)).then((e=>e.a));return e({locateFile:e=>(0,i.s)(o+e)})}const{default:t}=await r.e(9013).then(r.bind(r,29013)).then((e=>e.a));return t({locateFile:e=>(0,i.s)(o+e)})}},88613:(e,t,r)=>{r.r(t),r.d(t,{_esriRequestWrapper:()=>Ct,_fetchWrapper:()=>Ot,_getClientDataCacheCopy:()=>wt,_setMaxQueryParsingDurationForTesting:()=>Lt,_submitJobWrapper:()=>jt,clearClientDataCache:()=>xt,clientDataCache:()=>_t,executeApplyEdits:()=>Tt,executeFindPaths:()=>Dt,executeFindPathsAsynchronous:()=>Nt,executeQuery:()=>bt,executeQueryStreaming:()=>Mt,executeSearch:()=>At,executeSearchStreaming:()=>St,fetchAllClientDataKeys:()=>Pt,fetchAsynchronousFindPathsResultData:()=>kt,fetchClientDataAtKeys:()=>Rt,fetchKnowledgeGraph:()=>Gt,kgRestServices:()=>vt,refreshDataModel:()=>Et,refreshServiceDefinition:()=>It});var i,n=r(70333),o=r(78888),s=r(49186),a=r(53966),l=r(74887),u=r(91075),d=r(16930),p=r(90237),c=r(69622),y=r(10107),h=r(56507),f=(r(44208),r(87811),r(40608)),m=r(5443);let g=i=class extends c.A{constructor(e){super(e),this.outSpatialReference=null,this.processExtent=null,this.processSpatialReference=null,this.returnColumnName=!1,this.returnFeatureCollection=!1,this.returnM=!1,this.returnZ=!1}static from(e){return(0,h.PZ)(i,e)}};(0,p._)([(0,y.MZ)({type:d.A})],g.prototype,"outSpatialReference",void 0),(0,p._)([(0,y.MZ)({type:m.A})],g.prototype,"processExtent",void 0),(0,p._)([(0,y.MZ)({type:d.A})],g.prototype,"processSpatialReference",void 0),(0,p._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnColumnName",void 0),(0,p._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnFeatureCollection",void 0),(0,p._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnM",void 0),(0,p._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnZ",void 0),g=i=(0,p._)([(0,f.$)("esri.rest.geoprocessor.GPOptions")],g);const _=g;var w=r(17136),v=r(20437),T=r(25482);let b=class extends T.A{constructor(){super(...arguments),this.extent=null,this.height=null,this.href=null,this.opacity=1,this.rotation=0,this.scale=null,this.visible=!0,this.width=null}};(0,p._)([(0,y.MZ)({type:m.A})],b.prototype,"extent",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"height",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"href",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"opacity",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"rotation",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"scale",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"visible",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"width",void 0),b=(0,p._)([(0,f.$)("esri.layers.support.MapImage")],b);const M=b;var A=r(2272),S=r(93223),P=r(2073);let R=class extends T.A{constructor(e){super(e),this.area=0,this.units=null}};(0,p._)([(0,y.MZ)({json:{write:!0}})],R.prototype,"area",void 0),(0,p._)([(0,S.e)(P.UO)],R.prototype,"units",void 0),R=(0,p._)([(0,f.$)("esri.rest.support.ArealUnit")],R);const G=R;let E=class extends T.A{constructor(e){super(e),this.itemId=null,this.url=null}};(0,p._)([(0,y.MZ)({type:String,json:{read:{source:"itemID"},write:{target:"itemID"}}})],E.prototype,"itemId",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],E.prototype,"url",void 0),E=(0,p._)([(0,f.$)("esri.rest.support.DataFile")],E);const I=E;var N=r(22671);let D=class extends T.A{constructor(e){super(e),this.distance=0,this.units=null}};(0,p._)([(0,y.MZ)({json:{write:!0}})],D.prototype,"distance",void 0),(0,p._)([(0,S.e)(P.Y8)],D.prototype,"units",void 0),D=(0,p._)([(0,f.$)("esri.rest.support.LinearUnit")],D);const k=D;var x=r(66552);const O="multi-value-",j=new x.J({GPArealUnit:"areal-unit",GPBoolean:"boolean",GPComposite:"composite",GPDataFile:"data-file",GPDate:"date",GPDouble:"double",GPFeatureRecordSetLayer:"feature-record-set-layer",Field:"field",GPLinearUnit:"linear-unit",GPLong:"long",GPRasterData:"raster-data",GPRasterDataLayer:"raster-data-layer",GPRecordSet:"record-set",GPString:"string",GPValueTable:"value-table","GPMultiValue:GPArealUnit":`${O}areal-unit`,"GPMultiValue:GPBoolean":`${O}boolean`,"GPMultiValue:GPComposite":`${O}composite`,"GPMultiValue:GPDataFile":`${O}data-file`,"GPMultiValue:GPDate":`${O}date`,"GPMultiValue:GPDouble":`${O}double`,"GPMultiValue:GPFeatureRecordSetLayer":`${O}feature-record-set-layer`,"GPMultiValue:Field":`${O}field`,"GPMultiValue:GPLinearUnit":`${O}linear-unit`,"GPMultiValue:GPLong":`${O}long`,"GPMultiValue:GPRasterData":`${O}raster-data`,"GPMultiValue:GPRasterDataLayer":`${O}raster-data-layer`,"GPMultiValue:GPRecordSet":`${O}record-set`,"GPMultiValue:GPString":`${O}string`});let C=class extends T.A{constructor(e){super(e),this.dataType=null,this.paramName=null,this.value=null}};(0,p._)([(0,S.e)(j,{ignoreUnknown:!1})],C.prototype,"dataType",void 0),(0,p._)([(0,y.MZ)()],C.prototype,"paramName",void 0),(0,p._)([(0,y.MZ)()],C.prototype,"value",void 0),C=(0,p._)([(0,f.$)("esri.rest.support.ParameterValue")],C);const F=C;let U=class extends T.A{constructor(e){super(e),this.format=null,this.itemId=null,this.url=null}};(0,p._)([(0,y.MZ)()],U.prototype,"format",void 0),(0,p._)([(0,y.MZ)({json:{read:{source:"itemID"},write:{target:"itemID"}}})],U.prototype,"itemId",void 0),(0,p._)([(0,y.MZ)()],U.prototype,"url",void 0),U=(0,p._)([(0,f.$)("esri.rest.support.RasterData")],U);const Z=U;async function q(e,t){switch(e){case"areal-unit":return G.fromJSON(t);case"boolean":case"double":case"long":case"string":case"value-table":return t;case"date":return new Date(t);case"data-file":return I.fromJSON(t);case"linear-unit":return k.fromJSON(t);case"feature-record-set-layer":if("url"in t)return I.fromJSON(t);if("layerDefinition"in t){const e=new(0,(await Promise.all([r.e(6131),r.e(8219),r.e(13),r.e(5055),r.e(1214),r.e(1956),r.e(9953),r.e(4796),r.e(3029),r.e(4111),r.e(8506),r.e(3600),r.e(3353)]).then(r.bind(r,13600))).default),{layerDefinition:i,featureSet:n}=t;return e.read({layerDefinition:i,featureSet:n},{origin:"portal-item"}),e.spatialReference=d.A.fromJSON(n.spatialReference??i.spatialReference??i.extent.spatialReference),e}return N.A.fromJSON(t);case"record-set":return"url"in t?I.fromJSON(t):N.A.fromJSON(t);case"raster-data":case"raster-data-layer":return"mapImage"in t?M.fromJSON(t.mapImage):Z.fromJSON(t);case"field":return v.A.fromJSON(t)}}async function L(e){const t=j.fromJSON(e.dataType),{paramName:r}=e,i=function(e){return e.startsWith(O)}(t)?await async function(e,t){const r=function(e){return e.replace(O,"")}(e),i="composite"===r?t.map((e=>q(j.fromJSON(e.dataType),e.value))):t.map((e=>q(r,e)));return Promise.all(i)}(t,e.value):await q(t,e.value);return new F({dataType:t,paramName:r,value:i})}function z(e,t,r){for(const t in e){const r=e[t];Array.isArray(r)?e[t]=JSON.stringify(r.map((e=>z({item:e},!0).item))):r instanceof Date&&(e[t]=r.getTime())}return(0,A.lF)(e,t,r)}var J,K=r(37807);const $=(0,x.O)()({esriJobCancelled:"job-cancelled",esriJobCancelling:"job-cancelling",esriJobDeleted:"job-deleted",esriJobDeleting:"job-deleting",esriJobTimedOut:"job-timed-out",esriJobExecuting:"job-executing",esriJobFailed:"job-failed",esriJobNew:"job-new",esriJobSubmitted:"job-submitted",esriJobSucceeded:"job-succeeded",esriJobWaiting:"job-waiting"},{ignoreUnknown:!1}),B=1e3;let Y=class extends T.A{static{J=this}constructor(e){super(e),this.jobId=null,this.jobStatus=null,this.messages=null,this.progress=null,this.requestOptions=null,this.sourceUrl=null,this._cancelJobTimer=void 0,this._jobCompletionTimer=void 0}async cancelJob(e){const{jobId:t,sourceUrl:r}=this,{path:i}=(0,A.Dl)(r),n={...this.requestOptions,...e,query:{f:"json"}},s=`${i}/jobs/${t}/cancel`,{data:a}=await(0,o.A)(s,n),{messages:u,jobStatus:d,progress:p}=J.fromJSON(a);return this.set({messages:u,jobStatus:d,progress:p}),"job-cancelled"===d?this:new Promise(((t,r)=>{(0,l.u7)(n.signal,(()=>{this.clearCancelJobTimer(),r((0,l.NK)())})),this.clearCancelJobTimer();const i=()=>{this._cancelJobTimer||r((0,l.NK)()),this.checkJobStatus(e).then((({jobStatus:e})=>{switch(e){case"job-cancelling":default:this._cancelJobTimer=setTimeout(i,B);break;case"job-deleted":case"job-deleting":case"job-executing":case"job-failed":case"job-new":case"job-submitted":case"job-succeeded":case"job-timed-out":case"job-waiting":r(this);break;case"job-cancelled":t(this)}}))};this._cancelJobTimer=setTimeout(i,B)}))}destroy(){clearInterval(this._cancelJobTimer),clearInterval(this._jobCompletionTimer)}async checkJobStatus(e){const{path:t}=(0,A.Dl)(this.sourceUrl),r={...this.requestOptions,...e,query:{f:"json"}},i=`${t}/jobs/${this.jobId}`,{data:n}=await(0,o.A)(i,r),{messages:s,jobStatus:a,progress:l}=J.fromJSON(n);return this.set({messages:s,jobStatus:a,progress:l}),this}async fetchResultData(e,t,r){t=_.from(t||{});const{returnColumnName:i,returnFeatureCollection:n,returnM:s,returnZ:a,outSpatialReference:l}=t,{path:u}=(0,A.Dl)(this.sourceUrl),d=z({returnColumnName:i||null,returnFeatureCollection:n||null,returnM:s||null,returnZ:a||null,outSR:l,returnType:"data",f:"json"},null),p={...this.requestOptions,...r,query:d},c=`${u}/jobs/${this.jobId}/results/${e}`,{data:y}=await(0,o.A)(c,p);return L(y)}async fetchResultImage(e,t,r){const{path:i}=(0,A.Dl)(this.sourceUrl),n=z({...t.toJSON(),f:"json"}),s={...this.requestOptions,...r,query:n},a=`${i}/jobs/${this.jobId}/results/${e}`,{data:l}=await(0,o.A)(a,s);return L(l)}async fetchResultMapImageLayer(){const{path:e}=(0,A.Dl)(this.sourceUrl),t=e.indexOf("/GPServer/"),i=`${e.slice(0,Math.max(0,t))}/MapServer/jobs/${this.jobId}`;return new(0,(await Promise.all([r.e(6131),r.e(8219),r.e(13),r.e(5055),r.e(1214),r.e(1956),r.e(4796),r.e(4111),r.e(364),r.e(4341),r.e(7656),r.e(6911)]).then(r.bind(r,7656))).default)({url:i})}async waitForJobCompletion(e={}){const{interval:t=B,signal:r,statusCallback:i}=e;return new Promise(((e,n)=>{(0,l.u7)(r,(()=>{this.clearJobCompletionTimer(),n((0,l.NK)())})),this.clearJobCompletionTimer();const o=()=>{this._jobCompletionTimer||n((0,l.NK)()),this.checkJobStatus().then((({jobStatus:r})=>{switch(r){case"job-succeeded":e(this);break;case"job-executing":case"job-new":case"job-submitted":case"job-waiting":i&&i(this),this._jobCompletionTimer=setTimeout(o,t);break;case"job-cancelled":case"job-cancelling":case"job-deleted":case"job-deleting":case"job-failed":case"job-timed-out":n(this);break;default:this._jobCompletionTimer=setTimeout(o,t)}})).catch((e=>{n(e)}))};this._jobCompletionTimer=setTimeout(o,t)}))}clearCancelJobTimer(){clearTimeout(this._cancelJobTimer),this._cancelJobTimer=void 0}clearJobCompletionTimer(){clearTimeout(this._jobCompletionTimer),this._jobCompletionTimer=void 0}};(0,p._)([(0,y.MZ)()],Y.prototype,"jobId",void 0),(0,p._)([(0,S.e)($,{ignoreUnknown:!1})],Y.prototype,"jobStatus",void 0),(0,p._)([(0,y.MZ)({type:[K.A]})],Y.prototype,"messages",void 0),(0,p._)([(0,y.MZ)()],Y.prototype,"progress",void 0),(0,p._)([(0,y.MZ)()],Y.prototype,"requestOptions",void 0),(0,p._)([(0,y.MZ)({json:{write:!0}})],Y.prototype,"sourceUrl",void 0),Y=J=(0,p._)([(0,f.$)("esri.rest.support.JobInfo")],Y);const V=Y;let H=class extends c.A{constructor(e){super(e),this.headerKeys=[],this.outSpatialReference=null,this.exceededTransferLimit=!1}};(0,p._)([(0,y.MZ)()],H.prototype,"headerKeys",void 0),(0,p._)([(0,y.MZ)()],H.prototype,"outSpatialReference",void 0),(0,p._)([(0,y.MZ)()],H.prototype,"exceededTransferLimit",void 0),H=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryResultHeader")],H);const Q=H;let W=class extends c.A{constructor(e){super(e),this.resultRows=[],this.resultHeader=new Q}};(0,p._)([(0,y.MZ)()],W.prototype,"resultRows",void 0),(0,p._)([(0,y.MZ)()],W.prototype,"resultHeader",void 0),W=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryResult")],W);const X=W;let ee=class extends c.A{constructor(e){super(e),this.resultRowsStream=new ReadableStream,this.resultHeader=new Q}};(0,p._)([(0,y.MZ)()],ee.prototype,"resultRowsStream",void 0),(0,p._)([(0,y.MZ)()],ee.prototype,"resultHeader",void 0),ee=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryStreamingResult")],ee);const te=ee;let re=class extends T.A{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=!0,this.description="",this.fieldNames=[]}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],re.prototype,"name",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],re.prototype,"unique",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],re.prototype,"ascending",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],re.prototype,"description",void 0),(0,p._)([(0,y.MZ)({type:[String],json:{write:!0}})],re.prototype,"fieldNames",void 0),re=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.FieldIndex")],re);const ie=re;let ne=class extends T.A{constructor(e){super(e),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=!0,this.required=!1,this.defaultVisibility=!0,this.systemMaintained=null,this.role="esriGraphPropertyUNSPECIFIED",this.defaultValue=null}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"name",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"alias",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"fieldType",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"geometryType",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"hasM",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"hasZ",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"nullable",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"editable",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"required",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"defaultVisibility",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"systemMaintained",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"role",void 0),(0,p._)([(0,y.MZ)({json:{write:!0}})],ne.prototype,"defaultValue",void 0),ne=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphProperty")],ne);const oe=ne;let se=class extends T.A{constructor(e){super(e),this.name=null,this.alias=null,this.role="Regular",this.strict=null,this.properties=[],this.fieldIndexes=[],this.type=null}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],se.prototype,"name",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],se.prototype,"alias",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],se.prototype,"role",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],se.prototype,"strict",void 0),(0,p._)([(0,y.MZ)({type:[oe],json:{write:!0}})],se.prototype,"properties",void 0),(0,p._)([(0,y.MZ)({type:[ie],json:{write:!0}})],se.prototype,"fieldIndexes",void 0),se=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphObjectType")],se);const ae=se;let le=class extends ae{constructor(e){super(e),this.type="entity"}};le=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.EntityType")],le);const ue=le;let de=class extends ae{constructor(e){super(e),this.endPoints=[],this.type="relationship"}};(0,p._)([(0,y.MZ)({json:{write:!0}})],de.prototype,"endPoints",void 0),de=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.RelationshipType")],de);const pe=de;let ce=class extends T.A{constructor(e){super(e),this.value=null,this.behavior=null}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ce.prototype,"value",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ce.prototype,"behavior",void 0),ce=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.SourceTypeValueBehavior")],ce);const ye=ce;let he=class extends T.A{constructor(e){super(e),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=[],this.entityTypes=[],this.relationshipTypes=[],this.metaEntityTypes=[],this.provenanceSourceTypeValues=[]}};(0,p._)([(0,y.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],he.prototype,"timestamp",void 0),(0,p._)([(0,y.MZ)({type:d.A,json:{write:!0}})],he.prototype,"spatialReference",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],he.prototype,"strict",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],he.prototype,"objectIdField",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],he.prototype,"globalIdField",void 0),(0,p._)([(0,y.MZ)()],he.prototype,"arcgisManaged",void 0),(0,p._)([(0,y.MZ)()],he.prototype,"identifierInfo",void 0),(0,p._)([(0,y.MZ)()],he.prototype,"searchIndexes",void 0),(0,p._)([(0,y.MZ)({type:[ue],json:{write:!0}})],he.prototype,"entityTypes",void 0),(0,p._)([(0,y.MZ)({type:[pe],json:{write:!0}})],he.prototype,"relationshipTypes",void 0),(0,p._)([(0,y.MZ)({type:[ue],json:{write:!0}})],he.prototype,"metaEntityTypes",void 0),(0,p._)([(0,y.MZ)({type:[ye],json:{write:!0}})],he.prototype,"provenanceSourceTypeValues",void 0),he=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.DataModel")],he);const fe=he;let me=class extends T.A{constructor(e){super(e),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1,this.supportsProvenance=!1}};(0,p._)([(0,y.MZ)({type:[String],json:{write:!0}})],me.prototype,"capabilities",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],me.prototype,"supportsSearch",void 0),(0,p._)([(0,y.MZ)({type:[String],json:{write:!0}})],me.prototype,"supportedQueryFormats",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],me.prototype,"allowGeometryUpdates",void 0),(0,p._)([(0,y.MZ)({type:Number,json:{write:!0}})],me.prototype,"searchMaxRecordCount",void 0),(0,p._)([(0,y.MZ)({type:Object,json:{write:!0}})],me.prototype,"serviceCapabilities",void 0),(0,p._)([(0,y.MZ)({type:Number,json:{write:!0}})],me.prototype,"maxRecordCount",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],me.prototype,"description",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],me.prototype,"copyrightText",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],me.prototype,"units",void 0),(0,p._)([(0,y.MZ)({type:d.A,json:{write:!0}})],me.prototype,"spatialReference",void 0),(0,p._)([(0,y.MZ)({type:Number,json:{write:!0}})],me.prototype,"currentVersion",void 0),(0,p._)([(0,y.MZ)({type:Object,json:{write:!0}})],me.prototype,"dateFieldsTimeReference",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],me.prototype,"serviceItemId",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],me.prototype,"supportsDocuments",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],me.prototype,"dataEditingNotSupported",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],me.prototype,"schemaEditingNotSupported",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],me.prototype,"supportsProvenance",void 0),me=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.ServiceDefinition")],me);const ge=me;let _e=class extends T.A{constructor(e){super(e),this.url=null,this.dataModel=null,this.serviceDefinition=null}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],_e.prototype,"url",void 0),(0,p._)([(0,y.MZ)({type:fe,json:{write:!0}})],_e.prototype,"dataModel",void 0),(0,p._)([(0,y.MZ)({type:ge,json:{write:!0}})],_e.prototype,"serviceDefinition",void 0),_e=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.KnowledgeGraph")],_e);const we=_e;function ve(e,t,r){if(0!==e.error_code)throw new s.A(t,r,{errorCode:e.error_code,errorMessage:e.error_message})}function Te(e,t,r,i){const n=new r.ClientDataKey;n.deleteLater(),n.key_string=e;const o=new r.ClientDataFetchRequestParameter;o.deleteLater(),o.set_key(n);const s=t.get(e);return s&&!i&&(o.v_tag={v_tag:s.version}),o}var be,Me,Ae,Se,Pe,Re,Ge,Ee=r(45724),Ie=r(48526),Ne=r(86738),De=r(39829),ke=r(82799);function xe(e,t){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(Ce(e,t))})),r}function Oe(e,t){const r=new t.ObjectValue;r.deleteLater();for(const[i,n]of Object.entries(e))r.set_key_value(i,Ce(n,t));return r}function je(e,t){if(e instanceof Ie.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=r.geometry_type=t.esriGeometryType.esriGeometryMultipoint,r.has_z=e.hasZ,r.has_m=e.hasM;const i=[],n=[];n[0]=e.points.length;let o=0;return e.points.forEach((e=>{e.forEach((e=>{i[o]=e,o++}))})),r.coords=new Float64Array(i),r.lengths=new Uint32Array(n),r}(e,t);if(e instanceof Ne.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=t.esriGeometryType.esriGeometryPoint,r.has_z=e.hasZ,r.has_m=e.hasM;const i=[],n=[];n[0]=1,i[0]=e.x,i[1]=e.y;let o=2;return e.hasZ&&(i[o]=e.z,o++),e.hasM&&(i[o]=e.m,o++),r.coords=new Float64Array(i),r.lengths=new Uint32Array(n),r}(e,t);if(e instanceof ke.A||e instanceof De.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.has_z=e.hasZ,r.has_m=e.hasM;const i=[],n=[];let o=[];e instanceof ke.A?(r.geometry_type=t.esriGeometryType.esriGeometryPolyline,o=e.paths):e instanceof De.A&&(r.geometry_type=t.esriGeometryType.esriGeometryPolygon,o=e.rings);let s=0,a=0;return o.forEach((e=>{let t=0;e.forEach((e=>{t++,e.forEach((e=>{i[a]=e,a++}))})),n[s]=t,s++})),r.coords=new Float64Array(i),r.lengths=new Uint32Array(n),r}(e,t);throw new s.A("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function Ce(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof u.A)return je(e,t);if(Array.isArray(e)){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(Ce(e,t))})),r}return Oe(e,t)}function Fe(e,t){if(!e.typeName)throw new s.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(!("originId"in e)){const r=new t.EntityValue;r.deleteLater(),r.type_name=e.typeName;for(const[i,n]of Object.entries(e.properties))r.set_key_value(i,Ue(n,t));return e.id&&r.set_id(e.id),r}if("originId"in e&&"destinationId"in e){const r=new t.RelationshipValue;r.deleteLater(),r.type_name=e.typeName;for(const[i,n]of Object.entries(e.properties))r.set_key_value(i,Ue(n,t));return e.id&&r.set_id(e.id),e.originId&&e.destinationId&&r.set_related_entity_ids(e.originId,e.destinationId),r}throw new s.A("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function Ue(e,t){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof u.A?je(e,t):null}!function(e){e[e.OBJECT=0]="OBJECT",e[e.ENTITY=1]="ENTITY",e[e.RELATIONSHIP=2]="RELATIONSHIP",e[e.PATH=3]="PATH",e[e.ARRAY=4]="ARRAY"}(be||(be={})),function(e){e[e.view=0]="view",e[e.edit=1]="edit"}(Me||(Me={})),function(e){e[e.exclude=0]="exclude",e[e.include=1]="include"}(Ae||(Ae={})),function(e){e[e.ClientDataKeyTypeUNSPECIFIED=0]="ClientDataKeyTypeUNSPECIFIED",e[e.ClientDataKeyTypeString=1]="ClientDataKeyTypeString"}(Se||(Se={})),function(e){e[e.ClientDataTypeUNSPECIFIED=0]="ClientDataTypeUNSPECIFIED",e[e.ClientDataTypeString=1]="ClientDataTypeString"}(Pe||(Pe={})),function(e){e[e.Unspecified=0]="Unspecified",e[e.ClientData=1]="ClientData",e[e.NotModified=2]="NotModified"}(Re||(Re={})),function(e){e[e.Unspecified=0]="Unspecified",e[e.Error=1]="Error",e[e.ClientDataValue=2]="ClientDataValue"}(Ge||(Ge={}));let Ze=class extends c.A{constructor(e){super(e),this.name=null,this.supportedCategory="esriTypeUNSPECIFIED",this.analyzers=[],this.searchProperties=new Map}};(0,p._)([(0,y.MZ)()],Ze.prototype,"name",void 0),(0,p._)([(0,y.MZ)()],Ze.prototype,"supportedCategory",void 0),(0,p._)([(0,y.MZ)()],Ze.prototype,"analyzers",void 0),(0,p._)([(0,y.MZ)()],Ze.prototype,"searchProperties",void 0),Ze=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.SearchIndex")],Ze);const qe=Ze;var Le=r(35448);let ze=!1;function Je(e){return e.deleteLater(),new ue($e(e))}function Ke(e){return e.deleteLater(),new ie({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:Qe(e.fields)})}function $e(e){return{name:e.name,alias:e.alias,role:Le.Eq[e.role.value],strict:e.strict,properties:We(e.properties),fieldIndexes:Xe(e.field_indexes)}}function Be(e){return e.deleteLater(),new oe({alias:e.alias,name:e.name,fieldType:Le.r5[e.field_type.value]?Le.r5[e.field_type.value]:void 0,geometryType:Le.bV[e.geometry_type.value]?Le.bV[e.geometry_type.value]:null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibility:e.default_visibility,systemMaintained:e.system_maintained,role:Le.ti[e.role.value],defaultValue:e.default_value})}function Ye(e){e.deleteLater();const t=$e(e),r=[];for(let t=0;t<e.end_points.size();t++){const i=e.end_points.get(t);r.push({originEntityType:i.origin_entity_type,destinationEntityType:i.dest_entity_type})}return e.end_points.delete(),new pe(Object.assign({endPoints:r},t))}function Ve(e){return new ye({behavior:e.behavior,value:e.value})}function He(e){const t=[];for(let r=0;r<e.size();r++)t.push(Je(e.get(r)));return e.delete(),t}function Qe(e){const t=[];for(let r=0;r<e.size();r++)t.push(e.get(r));return e.delete(),t}function We(e){const t=[];for(let r=0;r<e.size();r++){const i=Be(e.get(r));"esriFieldTypeBigInteger"===i.fieldType&&(ze=!0),t.push(i)}return e.delete(),t}function Xe(e){const t=[];for(let r=0;r<e.size();r++)t.push(Ke(e.get(r)));return e.delete(),t}function et(e){const t=[];for(let r=0;r<e.size();r++)t.push(Ye(e.get(r)));return e.delete(),t}function tt(e){const t=[];for(let r=0;r<e.size();r++){const i=e.get(r);i.deleteLater(),t.push(Ve(i))}return e.delete(),t}function rt(e){const t=[];for(let r=0;r<e.size();r++){const r=new qe,i=e.get(0);r.name=i.name,r.supportedCategory=Le.nP[i.supported_category.value];const n=i.analyzers.size();for(let e=0;e<n;e++)r.analyzers.push({name:i.analyzers.get(e).name});i.analyzers.delete();for(let e=0;e<i.search_properties.keys().size();e++){const t=i.search_properties.keys().get(e),n=i.search_properties.get(t),o=[];for(let e=0;e<n.property_names.size();e++)o.push(n.property_names.get(e));r.searchProperties.set(t,{propertyNames:o})}t.push(r)}return e.delete(),t}var it,nt=r(25927),ot=(r(77901),r(40662)),st=r(42095),at=r(23150);function lt(e,t){const r={paths:[],hasM:!1,hasZ:!1},i=ut(e,r),{coords:n,geometry_type:o,lengths:a}=e;if(o.value!==t)throw new s.A("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");let l=0;return a.forEach((e=>{const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<i;t++)e[t]=n[l],l++;t.push(e)}r.paths.push(t)})),r}function ut(e,t){let r=2;return e.has_z?(t.hasZ=e.has_z,r++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,r++):t.hasM=!1,r}!function(e){e[e.ESRI_GEOMETRY_NULL=0]="ESRI_GEOMETRY_NULL",e[e.ESRI_GEOMETRY_POINT=1]="ESRI_GEOMETRY_POINT",e[e.ESRI_GEOMETRY_MULTIPOINT=2]="ESRI_GEOMETRY_MULTIPOINT",e[e.ESRI_GEOMETRY_POLYLINE=3]="ESRI_GEOMETRY_POLYLINE",e[e.ESRI_GEOMETRY_POLYGON=4]="ESRI_GEOMETRY_POLYGON",e[e.ESRI_GEOMETRY_ENVELOPE=5]="ESRI_GEOMETRY_ENVELOPE",e[e.ESRI_GEOMETRY_ANY=6]="ESRI_GEOMETRY_ANY",e[e.ESRI_GEOMETRY_MULTI_PATCH=7]="ESRI_GEOMETRY_MULTI_PATCH"}(it||(it={}));const dt=()=>a.A.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors");function pt(e,t,r){return((e,t,r)=>{if(null==e)return null;if("object"!=typeof e)return e;if("getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case it.ESRI_GEOMETRY_POINT:return function(e,t){const r={spatialReference:t};let i=2;ut(e,r);const n=e.coords;return r.x=n[0],r.y=n[1],e.has_z&&(r.z=n[i],i++),e.has_m&&(r.m=n[i]),new Ne.A(r)}(e,r);case it.ESRI_GEOMETRY_MULTIPOINT:return function(e,t){const r={spatialReference:t},i=ut(e,r),n=e.lengths,o=e.coords,s=n[0];r.points=[];let a=0;for(let e=0;e<s;e++){const e=[];for(let t=0;t<i;t++)e[t]=o[a],a++;r.points.push(e)}return new Ie.A(r)}(e,r);case it.ESRI_GEOMETRY_POLYLINE:return function(e,t){const{paths:r,hasM:i,hasZ:n}=lt(e,it.ESRI_GEOMETRY_POLYLINE);return new ke.A({paths:r,hasM:i,hasZ:n,spatialReference:t})}(e,r);case it.ESRI_GEOMETRY_POLYGON:return function(e,t){const{paths:r,hasM:i,hasZ:n}=lt(e,it.ESRI_GEOMETRY_POLYGON);return new De.A({rings:r,hasM:i,hasZ:n,spatialReference:t})}(e,r);case it.ESRI_GEOMETRY_ENVELOPE:case it.ESRI_GEOMETRY_MULTI_PATCH:return dt().warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;case it.ESRI_GEOMETRY_NULL:case it.ESRI_GEOMETRY_ANY:default:return dt().warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return dt().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case be.OBJECT:return function(e,t,r){return new ot.A(yt(e,t,r))}(e,t,r);case be.ENTITY:return ct(e,t,r);case be.RELATIONSHIP:return ht(e,t,r);case be.PATH:return function(e,t,r){const i=e.entity_count(),n=e.relationship_count(),o=[];for(let s=0;s<i;s++)o.push(ct(e.get_entity_at(s),t,r)),s<n&&o.push(ht(e.get_relationship_at(s),t,r));return new st.A({path:o})}(e,t,r);case be.ARRAY:return function(e,t,r){const i=[],n=e.count();for(let o=0;o<n;o++){const n=e.get_value_at(o);i.push(pt(n,t,r))}return i}(e,t,r);default:return dt().warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}})(e,t,r)}function ct(e,t,r){const i=e.type_name,n=yt(e,t,r),o=e.get_id();return new nt.A(Object.assign({typeName:i,id:o},n))}function yt(e,t,r){const i={},n=e.key_count();for(let o=0;o<n;o++)i[e.get_key_at(o)]=pt(e.get_value_at(o),t,r);return{properties:i}}function ht(e,t,r){const i=e.type_name,n=yt(e,t,r);return new at.A(Object.assign({typeName:i,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},n))}function ft(e){const t=[];for(let r=0;r<e.get_header_keys().size();r++)t.push(e.get_header_keys().get(r));const r=new d.A(e.get_out_sr());return new Q({headerKeys:t,outSpatialReference:r,exceededTransferLimit:e.exceeded_transfer_limit()})}let mt=class extends c.A{constructor(e){super(e),this.hasError=!1,this.error=null,this.editResults=[]}};(0,p._)([(0,y.MZ)()],mt.prototype,"hasError",void 0),(0,p._)([(0,y.MZ)()],mt.prototype,"error",void 0),(0,p._)([(0,y.MZ)()],mt.prototype,"editResults",void 0),mt=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphApplyEditsResult")],mt);const gt=mt,_t=new Map,wt=()=>new Map(_t.entries()),vt={fetchKnowledgeGraph:async e=>{const t=new we({url:e}),r=[];return r.push(Et(t)),r.push(It(t)),await Promise.all(r),t},refreshDataModel:async e=>{e.dataModel=await Kt(e)},refreshServiceDefinition:async e=>{const t=(await(0,o.A)(e.url,{query:{f:"json"}})).data;return t.capabilities=t?.capabilities?.split(","),t.supportedQueryFormats=t?.supportedQueryFormats?.split(","),e.serviceDefinition=new ge(t),e.serviceDefinition},executeFindPathsAsynchronous:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new s.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /reset/services/");const i=r[0];return await jt(`${i}/rest/services/System/KnowledgeGraphServerToolsAsync/GPServer/ServerFilteredFindPaths`,{in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:e.config.toJSON(),result_type:"STRING"},{},t)},executeFindPaths:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new s.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /reset/services/");const i=r[0],n=await Ct(`${i}/rest/services/System/KnowledgeGraphServerTools/GPServer/ServerFilteredFindPaths/execute`,{method:"post",query:{f:"pjson",in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:JSON.stringify(e.config),result_type:"STRING"},...t});if(n.data.results.length<1)throw new s.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results returned",n);let o;for(const e of n.data.results)if("out_results_string"===e.paramName){o=e.value;break}if(!o)throw new s.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results were returned on the expected paramater out_results_string",n);return o},fetchAsynchronousFindPathsResultData:async(e,t)=>(await e.fetchResultData("out_results_string",null,t)).value,executeQueryStreaming:async(e,t,r)=>{const i=`${e.url}/graph/query`;await Ft(e);const n=await Zt(i,r);if(!e.serviceDefinition?.supportsProvenance&&"include"===t.provenanceBehavior)throw new s.A("knowledge-graph:provenance-not-supported","The Knowledge Graph Service definition indicated that provenance is not supported");n.data.body=await async function(e,t){const r=await(0,Ee.I)(),i=new r.GraphQueryRequestEncoder;if(i.deleteLater(),e.outputSpatialReference?i.output_spatial_reference={wkid:e.outputSpatialReference.wkid,latestWkid:e.outputSpatialReference.latestWkid,vcsWkid:e.outputSpatialReference.vcsWkid,latestVcsWkid:e.outputSpatialReference.latestVcsWkid,wkt:e.outputSpatialReference.wkt??""}:i.output_spatial_reference=r.SpatialReferenceUtil.WGS84(),i.open_cypher_query=e.openCypherQuery,e.bindParameters)for(const[t,n]of Object.entries(e.bindParameters))Ut(t,n,i,r);if(e.bindGeometryQuantizationParameters)!function(e,t){t.input_quantization_parameters={xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.bindGeometryQuantizationParameters,i);else{if(t.dataModel||await Et(t),4326!==t.dataModel?.spatialReference?.wkid)throw new s.A("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");i.input_quantization_parameters=r.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&function(e,t,r){if(!e.extent)throw new s.A("knowledge-graph:illegal-output-quantization","The Output quantization provided to the encoder had an illegal value as part of its extent",e.extent);if(!e.quantizeMode)throw new s.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new s.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal tolerance setting",e.quantizeMode);t.output_quantization_parameters={extent:{xmax:e.extent.xmax,ymax:e.extent.ymax,xmin:e.extent.xmin,ymin:e.extent.ymin},quantize_mode:r.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}(e.outputQuantizationParameters,i,r),e.provenanceBehavior&&function(e,t){t.provenance_behavior={value:Ae[e]}}(e.provenanceBehavior,i);try{i.encode()}catch(e){throw new s.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const n=i.get_encoding_result();if(0!==n.error.error_code)throw new s.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:n.error.error_code,errorMessage:n.error.error_message});return structuredClone(n.get_byte_buffer())}(t,e);const o=await Ot(n.data.url,n.data);if(e.dataModel){const t=await Jt(o,e.dataModel);return new te({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new s.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,r)=>{if(e.serviceDefinition?.dataEditingNotSupported)throw new s.A("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");const i=`${e.url}/graph/applyEdits`;await Ft(e);const n=await Zt(i,r);return n.data.body=await async function(e,t){if(t.dataModel||await Et(t),!t.dataModel)throw new s.A("knowledge-graph:data-model-undefined","Encoding could not proceed because a data model was not provided and it could not be determined from the service");const r=await(0,Ee.I)(),i=!!e.options?.cascadeDelete,n=new r.GraphApplyEditsEncoder(r.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?function(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.options?.inputQuantizationParameters):r.InputQuantizationUtil.WGS84_lossless());n.deleteLater(),n.cascade_delete=i;try{let t;e.entityAdds?.forEach((e=>{t=n.add_entity(Fe(e,r)),ve(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipAdds?.forEach((e=>{if(!e.originId||!e.destinationId)throw new s.A("knowledge-graph:relationship-origin-destination-missing","When adding a new relationship, you must provide both an origin and destination id on the appropriate class property");t=n.add_relationship(Fe(e,r)),ve(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityUpdates?.forEach((e=>{if(!e.id)throw new s.A("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=n.update_entity(Fe(e,r)),ve(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipUpdates?.forEach((e=>{if(!e.id)throw new s.A("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=n.update_relationship(Fe(e,r)),ve(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityDeletes?.forEach((e=>{if(!e.typeName)throw new s.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=n.make_delete_helper(e.typeName,!0);t.deleteLater(),e.ids?.forEach((e=>{t.delete_by_id(e)}))})),e.relationshipDeletes?.forEach((e=>{if(!e.typeName)throw new s.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=n.make_delete_helper(e.typeName,!1);e.ids?.forEach((e=>{t.delete_by_id(e)}))})),n.encode()}catch(e){throw new s.A("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const o=n.get_encoding_result();return ve(o.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),structuredClone(o.get_byte_buffer())}(t,e),async function(e){const t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){const t=await e.arrayBuffer(),r=new((await(0,Ee.I)()).GraphApplyEditsDecoder);return r.deleteLater(),r.decode(new Uint8Array(t)),function(e){const t=e.has_error(),r=new gt({hasError:t,error:t?{errorCode:e.error.error_code,errorMessage:e.error.error_message}:null}),i=e.get_edit_results_count();for(let t=0;t<i;t++){const i=e.get_edit_results_at(t),n=e.get_edit_results_type_name_at(t),o=[],s=[],a=[],l=i.get_add_results_count(),u=i.get_update_results_count(),d=i.get_delete_results_count();for(let e=0;e<l;e++){const t=i.get_add_result_at(e);o.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<u;e++){const t=i.get_update_result_at(e);s.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<d;e++){const t=i.get_delete_result_at(e);a.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}r.editResults.push({typeName:n,adds:o,updates:s,deletes:a})}return r}(r)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:t,data:e.text()})}(await Ot(n.data.url,n.data))},executeQuery:async(e,t,r)=>{const i=`${e.url}/graph/query`,n=await(0,o.A)(i,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...r?.query},signal:r?.signal,timeout:r?.timeout}),a=n.getHeader?.("content-type"),l=n.data;if(a?.includes("application/x-protobuf")){const t=new((await(0,Ee.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=zt({wasmQueryDecoder:t,newArrayBufferToParse:l,dataModel:e.dataModel});return new X({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new s.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:a,data:n.data})},executeSearch:async(e,t,r)=>{const i=t.typeCategoryFilter,n=`${e.url}/graph/search`,a=await(0,o.A)(n,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:i,...r?.query},signal:r?.signal,timeout:r?.timeout}),l=a.getHeader?.("content-type"),u=a.data;if(l?.includes("application/x-protobuf")){const t=new((await(0,Ee.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=zt({wasmQueryDecoder:t,newArrayBufferToParse:u,dataModel:e.dataModel});return new X({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new s.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:l,data:a.data})},executeSearchStreaming:async(e,t,r)=>{const i=`${e.url}/graph/search`;await Ft(e);const n=await Zt(i,r);n.data.body=await async function(e){const t=await(0,Ee.I)(),r=new t.GraphSearchRequestEncoder;if(r.deleteLater(),r.search_query=e.searchQuery,r.type_category_filter=t.esriNamedTypeCategory[e.typeCategoryFilter],!0===e.returnSearchContext&&(r.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(r.start_index=e.start),null!=e.num&&(r.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{r.set_ids_filter(xe(e.idsFilter,t))}catch(e){throw new s.A("knowledge-graph:ids-format-error","Attempting to set ids filter failed. This is usually caused by an incorrectly formatted UUID string",{error:e})}e.namedTypesFilter?.forEach((e=>{r.add_named_type_filter(e)}));try{r.encode()}catch(e){throw new s.A("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const i=r.get_encoding_result();if(0!==i.error.error_code)throw new s.A("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:i.error.error_code,errorMessage:i.error.error_message});return structuredClone(i.get_byte_buffer())}(t);const o=await Ot(n.data.url,n.data);if(e.dataModel){const t=await Jt(o,e.dataModel);return new te({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new s.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},fetchClientDataAtKeys:async(e,t,r={ignoreCache:!1})=>{if(!t.length)return new Map;let i=_t.get(e.url||"");i||(i=new Map,_t.set(e.url||"",i));const n=new Map(i.entries()),o=`${e.url}/clientData/fetch`;t=Array.from(new Set(t));const a=await(0,Ee.I)(),l=function(e,t,r,i=!1){const n=new r.ClientDataFetchRequestEncoder;n.deleteLater();for(const o of e){const e=Te(o,t,r,i);n.add_client_data_fetch_request_parameter(e)}n.encode();const o=n.get_encoding_result();return ve(o.error,"knowledge-graph:fetchClientDataAtKeys-encoding-failed","Attempting to encode the fetchClientDataAtKeys failed"),structuredClone(o.get_byte_buffer())}(t,i,a,r.ignoreCache),u=await Zt(o,r.requestOptions);u.data.body=l;const d=await Ot(u.data.url,u.data),p=d.headers.get("content-type");if(p?.includes("application/x-protobuf")){const e=new a.ClientDataFetchResponseDecoder;e.deleteLater();const t=await d.arrayBuffer();return e.decode(new Uint8Array(t)),e.has_error()&&ve(e.error,"knowledge-graph:fetchClientDataAtKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e,t,r,i=!1){const n=new Map;for(let o=0;o<e.get_results_count();o++){const s=e.get_result_at(o);if(s.get_fetch_result_case().value!==Ge.ClientDataValue||0!==s.error().error_code){const e=s.get_key().key_string;r.has(e)&&t.delete(e);continue}const a=s.get_value(),l=s.get_key().key_string,u=r.get(l);let d;if(a.get_data_case().value===Re.NotModified&&u)d=u.value;else{if(a.get_data_case().value!==Re.ClientData)continue;{d=a.get_data().client_data_string;const e=s.get_value().get_v_tag().v_tag;i||t.set(l,{key:l,version:e,value:d})}}n.set(l,d)}return n}(e,i,n,r.ignoreCache)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching client data",{responseType:p,data:d})},fetchAllClientDataKeys:async(e,t)=>{const r=`${e.url}/clientData`,i=await(0,o.A)(r,{responseType:"array-buffer",query:{f:"pbf"},signal:t?.signal,timeout:t?.timeout}),n=i.getHeader?.("content-type"),a=i.data;if(n?.includes("application/x-protobuf")){const e=new((await(0,Ee.I)()).ClientDataKeysResponseDecoder);return e.deleteLater(),e.decode(new Uint8Array(a)),e.has_error()&&ve(e.error,"knowledge-graph:fetchAllClientDataKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e){const t=e.get_keys(),r=new Array;for(let e=0;e<t.get_keys_count();e++){const i=t.get_key_at(e);i.get_client_data_key_type().value===Se.ClientDataKeyTypeString&&r.push(i.key_string)}return r}(e)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:i.data})},clearClientDataCache:()=>_t.clear(),_fetchWrapper:async(e,t)=>fetch(e,t),_submitJobWrapper:async(e,t,r,i)=>async function(e,t,r,i){return r=_.from(r||{}),async function(e,t,r,i,n){const s={},a={},l=[];return function(e,t,r){for(const i in e){const n=e[i];if(n&&"object"==typeof n&&n instanceof N.A){const{features:e}=n;r[i]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}}}(i,l,s),(0,w.el)(l).then((l=>{const{outSpatialReference:u,processExtent:d,processSpatialReference:p,returnColumnName:c,returnFeatureCollection:y,returnM:h,returnZ:f}=r,{path:m}=(0,A.Dl)(e);for(const e in s){const[t,r]=s[e];a[e]=l.slice(t,r)}const g=u?u.wkid||u:null,_=p?p.wkid||p:null,w="execute"===t?{returnColumnName:c||void 0,returnFeatureCollection:y||void 0,returnM:h||void 0,returnZ:f||void 0}:null,v=z({...d?{context:{extent:d,outSR:g,processSR:_}}:{"env:outSR":g,"env:processSR":_},...i,...w,f:"json"},null,a),T={...n,query:v};return(0,o.A)(`${m}/${t}`,T)}))}(e,"submitJob",r,t??{},i).then((({data:t})=>{const r=V.fromJSON(t);return r.sourceUrl=e,r}))}(e,t,r,i),_esriRequestWrapper:async(e,t)=>(0,o.A)(e,t)};async function Tt(e,t,r){return vt.executeApplyEdits(e,t,r)}async function bt(e,t,r){return vt.executeQuery(e,t,r)}async function Mt(e,t,r){return vt.executeQueryStreaming(e,t,r)}async function At(e,t,r){return vt.executeSearch(e,t,r)}async function St(e,t,r){return vt.executeSearchStreaming(e,t,r)}function Pt(e,t){return vt.fetchAllClientDataKeys(e,t)}function Rt(e,t,r){return vt.fetchClientDataAtKeys(e,t,r)}async function Gt(e){return vt.fetchKnowledgeGraph(e)}async function Et(e){return vt.refreshDataModel(e)}async function It(e){return vt.refreshServiceDefinition(e)}async function Nt(e,t){return vt.executeFindPathsAsynchronous(e,t)}async function Dt(e,t){return vt.executeFindPaths(e,t)}async function kt(e,t){return vt.fetchAsynchronousFindPathsResultData(e,t)}function xt(){return vt.clearClientDataCache()}async function Ot(e,t){return vt._fetchWrapper(e,t)}async function jt(e,t,r,i){return vt._submitJobWrapper(e,t,r,i)}async function Ct(e,t){return vt._esriRequestWrapper(e,t)}async function Ft(e){const t=n.id?.findCredential(e.url);t||(e.dataModel?await Kt(e):await Et(e))}function Ut(e,t,r,i){null==t?r.set_param_key_value(e,""):"object"!=typeof t||t instanceof Date?r.set_param_key_value(e,t):t instanceof u.A?r.set_param_key_value(e,je(t,i)):Array.isArray(t)?r.set_param_key_value(e,xe(t,i)):r.set_param_key_value(e,Oe(t,i))}async function Zt(e,t){return(0,o.A)(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...t?.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:t?.signal,timeout:t?.timeout})}let qt=50;function Lt(e){qt=e}function zt({wasmQueryDecoder:e,newArrayBufferToParse:t,dataModel:r,decodedHeader:i,limitMaxProcessingTime:n=!1}){t&&e.push_buffer(new Uint8Array(t));const o=[];let a,l,u=0;const p=Date.now();let c=!0;for(;e.next_row();){a&&l||(a=i??ft(e),l=a.outSpatialReference??new d.A({wkid:4326})),u||(u=e.get_header_keys().size());const t=new Array(u);for(let i=0;i<u;i++){const n=e.get_value(i);t[i]=pt(n,r,l)}if(o.push(t),n&&Date.now()-p>qt){c=!1;break}}if(e.has_error())throw new s.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - inner row decoding",{errorCode:e.error.error_code,errorMessage:e.error.error_message});return{resultHeader:a,resultRows:o,parsedAllResultsFromBuffer:c}}async function Jt(e,t){const r=e.headers.get("content-type");if(e.headers.get("content-length")&&a.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("Found `Content-Length` header when expecting a streaming HTTP response! Please investigate whether all intermediate HTTP proxies and/or load balancers are configured such that they don't forcefully buffer the entire response before returning it to the client. A valid HTTP streaming response should use Chunked Transfer Encoding and not have a Content Length defined."),r?.includes("application/x-protobuf")){const r=e.body?.getReader(),i=new((await(0,Ee.I)()).GraphQueryDecoder);let n,o,u;i.deleteLater();const d=new Promise(((e,t)=>{o=e,u=t}));let p=!1,c=null;const y=new ReadableStream({pull:async function e(d){if(!r){const e=new s.A("knowledge-graph:stream-decoding-error","Error reading from stream - reader is undefined");throw u(e),e}const{done:y,value:h}=c?{done:!1,value:null}:await r.read().catch((e=>{throw u(e),r.releaseLock(),e}));h&&(c=h);try{if(y){let e;if(i.has_error()?e=new s.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - query stream done",{errorCode:i.error.error_code,errorMessage:i.error.error_message}):p||o(new Q),r.releaseLock(),e)throw d.error(e),u(e),e;return void d.close()}const{resultHeader:a,resultRows:l,parsedAllResultsFromBuffer:f}=zt({wasmQueryDecoder:i,newArrayBufferToParse:h,dataModel:t,decodedHeader:n,limitMaxProcessingTime:!0});return f&&(c=null),!n&&a&&(n=a,o(a),p=!0),l.length>0?void d.enqueue(l):await e(d)}catch(e){throw a.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").error(e),u(e),r.releaseLock(),(0,l.zf)(e)?e:new s.A("knowledge-graph:unexpected-server-response","Error inside streaming data return parsing",{error:e})}}});return{readableStream:y,resultHeader:await d}}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}async function Kt(e){const t=`${e.url}/dataModel/queryDataModel`,r=await(0,o.A)(t,{responseType:"array-buffer",query:{f:"pbf"}}),i=r.getHeader?.("content-type"),n=r.data;if(i?.includes("application/x-protobuf")){const e=(await(0,Ee.I)()).decode_data_model_from_protocol_buffer(new Uint8Array(n));if(!e)throw new s.A("knowledge-graph:data-model-decode-failure","The server responded to the data model query, but the response failed to be decoded. This typically occurs when the Knowledge JS API (4.26 or later) is used with an unsupported backend (11.0 or earlier)");return function(e){e.deleteLater(),ze=!1;const t=new fe({timestamp:e.timestamp,spatialReference:new d.A(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:Le.vy[e.identifier_info?.identifier_mapping_info?.identifier_info_type?.value],databaseNativeIdentifier:e.identifier_info?.identifier_mapping_info?.database_native_identifier,uniformPropertyIdentifier:{identifierPropertyName:e.identifier_info?.identifier_mapping_info?.uniform_property_identifier?.identifier_property_name}},identifierGenerationInfo:{uuidMethodHint:Le.wr[e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value]}},searchIndexes:rt(e.search_indexes),entityTypes:He(e.entity_types),relationshipTypes:et(e.relationship_types),metaEntityTypes:He(e.meta_entity_types),provenanceSourceTypeValues:tt(e.provenance_source_type_values.value_behavior_array)});return ze&&a.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("A big integer field was detected in the retrieved data model. The `big-integer` field type is not fully supported in web clients. Please see https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#type"),t}(e)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:i,data:r.data})}}}]);