@arcgis/core 6.0.0-next.48 → 6.0.0-next.49

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 (228) hide show
  1. package/Ground.js +1 -1
  2. package/analysis/AreaMeasurementAnalysis.d.ts +12 -10
  3. package/analysis/AreaMeasurementAnalysis.js +1 -1
  4. package/applications/Components/formatUtils.d.ts +3 -2
  5. package/applications/MapViewer/templateUtils.d.ts +4 -1
  6. package/applications/SceneViewer/sceneViewerUtils.d.ts +12 -1
  7. package/applications/SceneViewer/sceneViewerUtils.js +1 -1
  8. package/arcade/featureset/actions/SpatialFilter.js +1 -1
  9. package/arcade/functions/featuresetgeom.js +1 -1
  10. package/arcade/functions/geomasync.js +1 -1
  11. package/arcade/geometry/operatorsWorker.js +1 -1
  12. package/arcade/geometry/operatorsWorkerConnection.js +1 -1
  13. package/arcgisGlobal.d.ts +4 -0
  14. package/assets/esri/core/workers/RemoteClient.js +1 -1
  15. package/assets/esri/core/workers/chunks/063cc462524646cd45e8.js +1 -0
  16. package/assets/esri/core/workers/chunks/119c62e9c9c7440a6129.js +1 -0
  17. package/assets/esri/core/workers/chunks/14c04fde8d33b739b415.js +1 -0
  18. package/assets/esri/core/workers/chunks/27a91b52d1bee92b6f20.js +1 -0
  19. package/assets/esri/core/workers/chunks/31eb09e96f31bced71ad.js +1 -0
  20. package/assets/esri/core/workers/chunks/{056a815273653271bf75.js → 3236e18921955450fc0d.js} +5 -5
  21. package/assets/esri/core/workers/chunks/3ce7120056040af3bab1.js +1 -0
  22. package/assets/esri/core/workers/chunks/435dacf493aec07ff6e3.js +1 -0
  23. package/assets/esri/core/workers/chunks/4c26d6408ee7a3b9d163.js +1 -0
  24. package/assets/esri/core/workers/chunks/{73bf76a3a0418edb26a5.js → 506954fb374ea528d020.js} +1 -1
  25. package/assets/esri/core/workers/chunks/55db28616f810ca063b7.js +1 -0
  26. package/assets/esri/core/workers/chunks/59ae5bd0ee1bae7a9fb3.js +1 -0
  27. package/assets/esri/core/workers/chunks/630a36c4817f33f4cad2.js +1 -0
  28. package/assets/esri/core/workers/chunks/6779afc2d6ee46c301b5.js +1 -0
  29. package/assets/esri/core/workers/chunks/6a509ffb4852d694a097.js +1 -0
  30. package/assets/esri/core/workers/chunks/6d25a7071fceb707858a.js +1 -0
  31. package/assets/esri/core/workers/chunks/7a97eec9823941fd210f.js +29 -0
  32. package/assets/esri/core/workers/chunks/82bbf0c5e18fc1c795f4.js +1 -0
  33. package/assets/esri/core/workers/chunks/91019e9dff63107f8cb4.js +1 -0
  34. package/assets/esri/core/workers/chunks/{1345413ec0b4128849b1.js → 954f9854a9bf4a852b81.js} +1 -1
  35. package/assets/esri/core/workers/chunks/9846abf2d3991a15b2b5.js +1 -0
  36. package/assets/esri/core/workers/chunks/9f74b3f0f453bc957e3a.js +1 -0
  37. package/assets/esri/core/workers/chunks/a0e2a1c6f37454547193.js +1 -0
  38. package/assets/esri/core/workers/chunks/a1c45e8f5bba471b3905.js +1 -0
  39. package/assets/esri/core/workers/chunks/a2825285d46f8cd5d814.js +1 -0
  40. package/assets/esri/core/workers/chunks/{d4f6be8290ad0243e1b8.js → b511b5c68defefccde0b.js} +1 -1
  41. package/assets/esri/core/workers/chunks/bf81b3670b5323621e2d.js +1 -0
  42. package/assets/esri/core/workers/chunks/c4794d692934098988e7.js +1 -0
  43. package/assets/esri/core/workers/chunks/d0900a901197948bd7df.js +1 -0
  44. package/assets/esri/core/workers/chunks/d2ed93bbfa98395bbed7.js +1 -0
  45. package/assets/esri/core/workers/chunks/d486a8a61ff993f8202a.js +1 -0
  46. package/assets/esri/core/workers/chunks/e06036392a982dbf3ae3.js +1 -0
  47. package/assets/esri/core/workers/chunks/{773ba0909ccd3a034c31.js → ed1db6571b0c61fe4f91.js} +1 -1
  48. package/chunks/BlendWeights.glsl.js +4 -5
  49. package/chunks/Blur.glsl.js +10 -7
  50. package/chunks/BlurEmission.glsl.js +27 -7
  51. package/chunks/Clouds.glsl.js +2 -2
  52. package/chunks/Component.glsl.js +1 -1
  53. package/chunks/EdgeDetect.glsl.js +1 -1
  54. package/chunks/EdgeShader.glsl.js +1 -1
  55. package/chunks/EmissionComposite.glsl.js +2 -2
  56. package/chunks/Fog.glsl.js +4 -4
  57. package/chunks/GlobalIlluminationBlur.glsl.js +1 -1
  58. package/chunks/HighlightSharpApply.glsl.js +4 -1
  59. package/chunks/LineMarker.glsl.js +4 -4
  60. package/chunks/Magnifier.glsl.js +1 -1
  61. package/chunks/NoiseTextureAtlas.glsl.js +3 -3
  62. package/chunks/Pattern.glsl.js +35 -32
  63. package/chunks/{ChapmanAtmosphere.glsl.js → RealisticAtmosphere.glsl.js} +18 -9
  64. package/chunks/RealisticAtmosphereCompositing.glsl.js +35 -0
  65. package/chunks/SSAO.glsl.js +2 -2
  66. package/chunks/SimpleAtmosphere.glsl.js +1 -1
  67. package/config.js +1 -1
  68. package/core/accessorSupport/ObservableBase.js +1 -1
  69. package/core/accessorSupport/tracking/ObservationHandle.js +1 -1
  70. package/core/accessorSupport/tracking/SimpleObservable.js +1 -1
  71. package/core/accessorSupport/tracking/SimpleTrackingTarget.js +1 -1
  72. package/core/accessorSupport/tracking/TrackingTarget.js +1 -1
  73. package/core/quantity.js +1 -1
  74. package/core/timeUtils.js +1 -1
  75. package/geometry/coordinateConversion/CoordinateConversionModel.d.ts +258 -0
  76. package/geometry/coordinateConversion/CoordinateConversionModel.js +2 -0
  77. package/geometry/coordinateConversion/support/Conversion.d.ts +73 -0
  78. package/geometry/coordinateConversion/support/Conversion.js +2 -0
  79. package/geometry/coordinateConversion/support/Format.d.ts +131 -0
  80. package/geometry/coordinateConversion/support/Format.js +2 -0
  81. package/geometry/coordinateConversion/support/coordinateConversionUtils.js +2 -0
  82. package/geometry/coordinateConversion/support/formatUtils.js +2 -0
  83. package/geometry/coordinateConversion/types.d.ts +116 -0
  84. package/kernel.js +1 -1
  85. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  86. package/layers/IntegratedMeshLayer.js +1 -1
  87. package/layers/catalog/CatalogFootprintLayer.d.ts +2 -2
  88. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  89. package/layers/knowledgeGraph/cypherUtils.js +1 -1
  90. package/layers/mixins/FeatureLayerBase.d.ts +2 -2
  91. package/layers/raster/formats/Lzw.js +1 -1
  92. package/layers/raster/formats/TiffDecoder.js +1 -1
  93. package/layers/raster/formats/tiffParser.js +1 -1
  94. package/layers/raster/formats/tiffTag.js +1 -1
  95. package/layers/support/IntegratedMeshSemantics.js +2 -0
  96. package/layers/support/VideoElement.js +1 -1
  97. package/legend/ActiveLayerInfo.js +1 -1
  98. package/package.json +2 -2
  99. package/symbols/FillSymbol3DLayer.d.ts +1 -4
  100. package/time/daylightUtils.d.ts +29 -0
  101. package/time/daylightUtils.js +2 -0
  102. package/time/timeZoneUtils.js +1 -1
  103. package/time/types.d.ts +57 -1
  104. package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
  105. package/views/2d/analysis/AreaMeasurementAnalysisView2D.js +1 -1
  106. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  107. package/views/2d/layers/GeospatialPDFLayerView2D.js +1 -1
  108. package/views/2d/layers/MediaLayerView2D.js +1 -1
  109. package/views/2d/layers/TileLayerView2D.js +1 -1
  110. package/views/3d/GroundView3D.js +1 -1
  111. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  112. package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
  113. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  114. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  115. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementController.js +1 -1
  116. package/views/3d/interactive/Manipulator3D.js +1 -1
  117. package/views/3d/interactive/Manipulator3DBase.js +2 -0
  118. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  119. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  120. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  121. package/views/3d/layers/I3SMeshView3D.js +1 -1
  122. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  123. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  124. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  125. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  126. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  127. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  128. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  129. package/views/3d/layers/graphics/SymbolComplexity.js +1 -1
  130. package/views/3d/layers/graphics/webStyleUtils.js +1 -1
  131. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  132. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  133. package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
  134. package/views/3d/layers/support/patternUtils.js +1 -1
  135. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  136. package/views/3d/support/GroundAndIMSurface.js +1 -1
  137. package/views/3d/support/engineContent/line.js +1 -1
  138. package/views/3d/support/hitTest.js +1 -1
  139. package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
  140. package/views/3d/terrain/OverlayRenderer.js +1 -1
  141. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  142. package/views/3d/terrain/PatchRenderDataWaterproofness.js +1 -1
  143. package/views/3d/terrain/SphericalPatch.js +1 -1
  144. package/views/3d/terrain/TerrainSurface.js +1 -1
  145. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  146. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  147. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialInitParameters.js +1 -1
  148. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
  149. package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
  150. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  151. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +2 -2
  152. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js +1 -1
  153. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +6 -4
  154. package/views/3d/webgl-engine/core/shaderLibrary/util/BlendModes.glsl.js +1 -1
  155. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +10 -9
  156. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js +1 -1
  157. package/views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js +1 -1
  158. package/views/3d/webgl-engine/effects/WeatherFader.js +1 -1
  159. package/views/3d/webgl-engine/effects/atmosphere/ChapmanApproximation.glsl.js +3 -3
  160. package/views/3d/webgl-engine/effects/atmosphere/{ChapmanAtmosphere.glsl.js → RealisticAtmosphere.glsl.js} +1 -1
  161. package/views/3d/webgl-engine/effects/atmosphere/RealisticAtmosphere.js +2 -0
  162. package/views/3d/webgl-engine/effects/atmosphere/RealisticAtmosphereCompositing.glsl.js +2 -0
  163. package/views/3d/webgl-engine/effects/atmosphere/RealisticAtmosphereCompositingTechnique.js +2 -0
  164. package/views/3d/webgl-engine/effects/atmosphere/RealisticAtmosphereTechnique.js +2 -0
  165. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  166. package/views/3d/webgl-engine/effects/glow/BlurEmission.glsl.js +1 -1
  167. package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +87 -41
  168. package/views/3d/webgl-engine/effects/precipitation/Precipitation.js +1 -1
  169. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  170. package/views/3d/webgl-engine/lib/EmissionComposite.glsl.js +1 -1
  171. package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
  172. package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
  173. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  174. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  175. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  176. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  177. package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
  178. package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
  179. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  180. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  181. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  182. package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
  183. package/views/3d/webgl-engine/shaders/PatternLayouts.js +1 -1
  184. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  185. package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
  186. package/views/SceneView.js +1 -1
  187. package/views/VideoView.js +1 -1
  188. package/views/interactive/Tooltip.js +1 -1
  189. package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
  190. package/views/interactive/snapping/SnappingAlgorithm.js +1 -1
  191. package/views/interactive/tooltip/content/TooltipContent.js +1 -1
  192. package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +3 -0
  193. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  194. package/widgets/CoordinateConversion.js +1 -1
  195. package/widgets/Sketch/SketchViewModel.js +1 -1
  196. package/assets/esri/core/workers/chunks/022565ef98a702ab952f.js +0 -1
  197. package/assets/esri/core/workers/chunks/163e97987e1f75610009.js +0 -1
  198. package/assets/esri/core/workers/chunks/1d57b1445afec89a7941.js +0 -1
  199. package/assets/esri/core/workers/chunks/3654672d772d11484883.js +0 -1
  200. package/assets/esri/core/workers/chunks/3af0ff5a0b82872aac38.js +0 -1
  201. package/assets/esri/core/workers/chunks/3b9415dfd7546aeec261.js +0 -1
  202. package/assets/esri/core/workers/chunks/5109b48666138df14038.js +0 -1
  203. package/assets/esri/core/workers/chunks/6b73dfc9252b32f1eae2.js +0 -1
  204. package/assets/esri/core/workers/chunks/6e4698879e7d8fbc4d12.js +0 -1
  205. package/assets/esri/core/workers/chunks/71295afd21fc5bc5ddbc.js +0 -1
  206. package/assets/esri/core/workers/chunks/794a9f116c4700bb1210.js +0 -1
  207. package/assets/esri/core/workers/chunks/8e0ecc7f55dd8bf2cf16.js +0 -1
  208. package/assets/esri/core/workers/chunks/9dece842ada6278c33ef.js +0 -1
  209. package/assets/esri/core/workers/chunks/a12e29f2cb78fdaa0753.js +0 -1
  210. package/assets/esri/core/workers/chunks/b70af9fb974ef9836efd.js +0 -1
  211. package/assets/esri/core/workers/chunks/c0f2b6a10bcc766318f5.js +0 -1
  212. package/assets/esri/core/workers/chunks/c248db5e4d92cfb3c4d1.js +0 -1
  213. package/assets/esri/core/workers/chunks/ce02adb527389b90223d.js +0 -1
  214. package/assets/esri/core/workers/chunks/d8eea5ffe05c620fac9e.js +0 -1
  215. package/assets/esri/core/workers/chunks/d997d81d0965c05447d4.js +0 -1
  216. package/assets/esri/core/workers/chunks/e1645882f54818c4036a.js +0 -1
  217. package/assets/esri/core/workers/chunks/e44679a0d271c1efb60d.js +0 -1
  218. package/assets/esri/core/workers/chunks/f11f40017ec97a2a6b5f.js +0 -29
  219. package/assets/esri/core/workers/chunks/f7f5d8256e63d303cbcb.js +0 -1
  220. package/assets/esri/core/workers/chunks/f87d5450190896e61ff8.js +0 -1
  221. package/assets/esri/core/workers/chunks/fdee2255f49b43056e9d.js +0 -1
  222. package/assets/esri/core/workers/chunks/ff1e614fde01781360fa.js +0 -1
  223. package/chunks/AtmosphereCompositing.glsl.js +0 -25
  224. package/views/3d/analysis/ShadowCast/sunlightUtils.js +0 -2
  225. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +0 -2
  226. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphereTechnique.js +0 -2
  227. package/views/3d/webgl-engine/shaders/AtmosphereCompositing.glsl.js +0 -2
  228. package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +0 -2
@@ -1 +0,0 @@
1
- "use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[9284],{61294(e,t,r){r.d(t,{J:()=>i});var n=function(){function e(e){this.message="JPEG error: "+e}return e.prototype=Error(),e.prototype.name="JpegError",e.constructor=e,e}(),i=function(){if(!self||!self.Uint8ClampedArray)return null;var e=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),t=4017,r=799,i=3406,l=2276,o=1567,a=3784,s=5793,u=2896;function h(){this.decodeTransform=null,this.colorTransform=-1}function f(e,t){for(var r,n,i=0,l=[],o=16;o>0&&!e[o-1];)o--;l.push({children:[],index:0});var a,s=l[0];for(r=0;r<o;r++){for(n=0;n<e[r];n++){for((s=l.pop()).children[s.index]=t[i];s.index>0;)s=l.pop();for(s.index++,l.push(s);l.length<=r;)l.push(a={children:[],index:0}),s.children[s.index]=a.children,s=a;i++}r+1<o&&(l.push(a={children:[],index:0}),s.children[s.index]=a.children,s=a)}return l[0].children}function c(e,t,r){return 64*((e.blocksPerLine+1)*t+r)}function p(t,r,i,l,o,a,s,u,h){var f=i.mcusPerLine,p=i.progressive,d=r,m=0,y=0;function x(){if(y>0)return y--,m>>y&1;if(255===(m=t[r++])){var e=t[r++];if(e)throw new n("unexpected marker "+(m<<8|e).toString(16))}return y=7,m>>>7}function w(e){for(var t=e;;){if("number"==typeof(t=t[x()]))return t;if("object"!=typeof t)throw new n("invalid huffman sequence")}}function C(e){for(var t=0;e>0;)t=t<<1|x(),e--;return t}function M(e){if(1===e)return 1===x()?1:-1;var t=C(e);return t>=1<<e-1?t:t+(-1<<e)+1}var b,A=0,v=0;function k(e,t,r,n,i){var l=r%f;t(e,c(e,(r/f|0)*e.v+n,l*e.h+i))}function T(e,t,r){t(e,c(e,r/e.blocksPerLine|0,r%e.blocksPerLine))}for(var S,I,P,E,R,L,U,O,D=l.length,G=p?0===a?0===u?function(e,t){var r=w(e.huffmanTableDC),n=0===r?0:M(r)<<h;e.blockData[t]=e.pred+=n}:function(e,t){e.blockData[t]|=x()<<h}:0===u?function(t,r){if(A>0)A--;else for(var n=a,i=s;n<=i;){var l=w(t.huffmanTableAC),o=15&l,u=l>>4;if(0===o){if(u<15){A=C(u)+(1<<u)-1;break}n+=16}else{var f=e[n+=u];t.blockData[r+f]=M(o)*(1<<h),n++}}}:function(t,r){for(var i,l,o=a,u=s,f=0;o<=u;){var c=e[o];switch(v){case 0:if(f=(l=w(t.huffmanTableAC))>>4,0==(i=15&l))f<15?(A=C(f)+(1<<f),v=4):(f=16,v=1);else{if(1!==i)throw new n("invalid ACn encoding");b=M(i),v=f?2:3}continue;case 1:case 2:t.blockData[r+c]?t.blockData[r+c]+=x()<<h:0===--f&&(v=2===v?3:0);break;case 3:t.blockData[r+c]?t.blockData[r+c]+=x()<<h:(t.blockData[r+c]=b<<h,v=0);break;case 4:t.blockData[r+c]&&(t.blockData[r+c]+=x()<<h)}o++}4===v&&0===--A&&(v=0)}:function(t,r){var n=w(t.huffmanTableDC),i=0===n?0:M(n);t.blockData[r]=t.pred+=i;for(var l=1;l<64;){var o=w(t.huffmanTableAC),a=15&o,s=o>>4;if(0===a){if(s<15)break;l+=16}else{var u=e[l+=s];t.blockData[r+u]=M(a),l++}}},B=0,N=1===D?l[0].blocksPerLine*l[0].blocksPerColumn:f*i.mcusPerColumn;B<N;){var F=o?Math.min(N-B,o):N;for(I=0;I<D;I++)l[I].pred=0;if(A=0,1===D)for(S=l[0],R=0;R<F;R++)T(S,G,B),B++;else for(R=0;R<F;R++){for(I=0;I<D;I++)for(U=(S=l[I]).h,O=S.v,P=0;P<O;P++)for(E=0;E<U;E++)k(S,G,B,P,E);B++}y=0,(L=g(t,r))&&L.invalid&&(console.log("decodeScan - unexpected MCU data, next marker is: "+L.invalid),r=L.offset);var z=L&&L.marker;if(!z||z<=65280)throw new n("marker was not found");if(!(z>=65488&&z<=65495))break;r+=2}return(L=g(t,r))&&L.invalid&&(console.log("decodeScan - unexpected Scan data, next marker is: "+L.invalid),r=L.offset),r-d}function d(e,h,f){var c,p,d,m,g,y,x,w,C,M,b,A,v,k,T,S,I,P=e.quantizationTable,E=e.blockData;if(!P)throw new n("missing required Quantization Table.");for(var R=0;R<64;R+=8)C=E[h+R],M=E[h+R+1],b=E[h+R+2],A=E[h+R+3],v=E[h+R+4],k=E[h+R+5],T=E[h+R+6],S=E[h+R+7],C*=P[R],0===(M|b|A|v|k|T|S)?(I=s*C+512>>10,f[R]=I,f[R+1]=I,f[R+2]=I,f[R+3]=I,f[R+4]=I,f[R+5]=I,f[R+6]=I,f[R+7]=I):(M*=P[R+1],b*=P[R+2],A*=P[R+3],v*=P[R+4],k*=P[R+5],T*=P[R+6],S*=P[R+7],p=(c=(c=s*C+128>>8)+(p=s*v+128>>8)+1>>1)-p,I=(d=b)*a+(m=T)*o+128>>8,d=d*o-m*a+128>>8,x=(g=(g=u*(M-S)+128>>8)+(x=k<<4)+1>>1)-x,y=(w=(w=u*(M+S)+128>>8)+(y=A<<4)+1>>1)-y,m=(c=c+(m=I)+1>>1)-m,d=(p=p+d+1>>1)-d,I=g*l+w*i+2048>>12,g=g*i-w*l+2048>>12,w=I,I=y*r+x*t+2048>>12,y=y*t-x*r+2048>>12,x=I,f[R]=c+w,f[R+7]=c-w,f[R+1]=p+x,f[R+6]=p-x,f[R+2]=d+y,f[R+5]=d-y,f[R+3]=m+g,f[R+4]=m-g);for(var L=0;L<8;++L)C=f[L],0===((M=f[L+8])|(b=f[L+16])|(A=f[L+24])|(v=f[L+32])|(k=f[L+40])|(T=f[L+48])|(S=f[L+56]))?(I=(I=s*C+8192>>14)<-2040?0:I>=2024?255:I+2056>>4,E[h+L]=I,E[h+L+8]=I,E[h+L+16]=I,E[h+L+24]=I,E[h+L+32]=I,E[h+L+40]=I,E[h+L+48]=I,E[h+L+56]=I):(p=(c=4112+((c=s*C+2048>>12)+(p=s*v+2048>>12)+1>>1))-p,I=(d=b)*a+(m=T)*o+2048>>12,d=d*o-m*a+2048>>12,m=I,x=(g=(g=u*(M-S)+2048>>12)+(x=k)+1>>1)-x,y=(w=(w=u*(M+S)+2048>>12)+(y=A)+1>>1)-y,I=g*l+w*i+2048>>12,g=g*i-w*l+2048>>12,w=I,I=y*r+x*t+2048>>12,y=y*t-x*r+2048>>12,C=(C=(c=c+m+1>>1)+w)<16?0:C>=4080?255:C>>4,M=(M=(p=p+d+1>>1)+(x=I))<16?0:M>=4080?255:M>>4,b=(b=(d=p-d)+y)<16?0:b>=4080?255:b>>4,A=(A=(m=c-m)+g)<16?0:A>=4080?255:A>>4,v=(v=m-g)<16?0:v>=4080?255:v>>4,k=(k=d-y)<16?0:k>=4080?255:k>>4,T=(T=p-x)<16?0:T>=4080?255:T>>4,S=(S=c-w)<16?0:S>=4080?255:S>>4,E[h+L]=C,E[h+L+8]=M,E[h+L+16]=b,E[h+L+24]=A,E[h+L+32]=v,E[h+L+40]=k,E[h+L+48]=T,E[h+L+56]=S)}function m(e,t){for(var r=t.blocksPerLine,n=t.blocksPerColumn,i=new Int16Array(64),l=0;l<n;l++)for(var o=0;o<r;o++)d(t,c(t,l,o),i);return t.blockData}function g(e,t,r){function n(t){return e[t]<<8|e[t+1]}var i=e.length-1,l=r<t?r:t;if(t>=i)return null;var o=n(t);if(o>=65472&&o<=65534)return{invalid:null,marker:o,offset:t};for(var a=n(l);!(a>=65472&&a<=65534);){if(++l>=i)return null;a=n(l)}return{invalid:o.toString(16),marker:a,offset:l}}return h.prototype={parse:function(t){function r(){var e=t[s]<<8|t[s+1];return s+=2,e}function i(){var e=r(),n=s+e-2,i=g(t,n,s);i&&i.invalid&&(console.log("readDataBlock - incorrect length, next marker is: "+i.invalid),n=i.offset);var l=t.subarray(s,n);return s+=l.length,l}function l(e){for(var t=Math.ceil(e.samplesPerLine/8/e.maxH),r=Math.ceil(e.scanLines/8/e.maxV),n=0;n<e.components.length;n++){N=e.components[n];var i=Math.ceil(Math.ceil(e.samplesPerLine/8)*N.h/e.maxH),l=Math.ceil(Math.ceil(e.scanLines/8)*N.v/e.maxV),o=t*N.h,a=r*N.v*64*(o+1);N.blockData=new Int16Array(a),N.blocksPerLine=i,N.blocksPerColumn=l}e.mcusPerLine=t,e.mcusPerColumn=r}var o,a,s=0,u=null,h=null,c=[],d=[],y=[],x=r();if(65496!==x)throw new n("SOI not found");for(x=r();65497!==x;){var w,C,M;switch(x){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var b=i();65504===x&&74===b[0]&&70===b[1]&&73===b[2]&&70===b[3]&&0===b[4]&&(u={version:{major:b[5],minor:b[6]},densityUnits:b[7],xDensity:b[8]<<8|b[9],yDensity:b[10]<<8|b[11],thumbWidth:b[12],thumbHeight:b[13],thumbData:b.subarray(14,14+3*b[12]*b[13])}),65518===x&&65===b[0]&&100===b[1]&&111===b[2]&&98===b[3]&&101===b[4]&&(h={version:b[5]<<8|b[6],flags0:b[7]<<8|b[8],flags1:b[9]<<8|b[10],transformCode:b[11]});break;case 65499:for(var A=r()+s-2;s<A;){var v=t[s++],k=new Uint16Array(64);if(v>>4){if(v>>4!=1)throw new n("DQT - invalid table spec");for(C=0;C<64;C++)k[e[C]]=r()}else for(C=0;C<64;C++)k[e[C]]=t[s++];c[15&v]=k}break;case 65472:case 65473:case 65474:if(o)throw new n("Only single frame JPEGs supported");r(),(o={}).extended=65473===x,o.progressive=65474===x,o.precision=t[s++],o.scanLines=r(),o.samplesPerLine=r(),o.components=[],o.componentIds={};var T,S=t[s++],I=0,P=0;for(w=0;w<S;w++){T=t[s];var E=t[s+1]>>4,R=15&t[s+1];I<E&&(I=E),P<R&&(P=R);var L=t[s+2];M=o.components.push({h:E,v:R,quantizationId:L,quantizationTable:null}),o.componentIds[T]=M-1,s+=3}o.maxH=I,o.maxV=P,l(o);break;case 65476:var U=r();for(w=2;w<U;){var O=t[s++],D=new Uint8Array(16),G=0;for(C=0;C<16;C++,s++)G+=D[C]=t[s];var B=new Uint8Array(G);for(C=0;C<G;C++,s++)B[C]=t[s];w+=17+G,(O>>4?d:y)[15&O]=f(D,B)}break;case 65501:r(),a=r();break;case 65498:r();var N,F=t[s++],z=[];for(w=0;w<F;w++){var V=o.componentIds[t[s++]];N=o.components[V];var _=t[s++];N.huffmanTableDC=y[_>>4],N.huffmanTableAC=d[15&_],z.push(N)}var j=t[s++],Z=t[s++],W=t[s++],q=p(t,s,o,z,a,j,Z,W>>4,15&W);s+=q;break;case 65535:255!==t[s]&&s--;break;default:if(255===t[s-3]&&t[s-2]>=192&&t[s-2]<=254){s-=3;break}throw new n("unknown marker "+x.toString(16))}x=r()}for(this.width=o.samplesPerLine,this.height=o.scanLines,this.jfif=u,this.eof=s,this.adobe=h,this.components=[],w=0;w<o.components.length;w++){var H=c[(N=o.components[w]).quantizationId];H&&(N.quantizationTable=H),this.components.push({output:m(0,N),scaleX:N.h/o.maxH,scaleY:N.v/o.maxV,blocksPerLine:N.blocksPerLine,blocksPerColumn:N.blocksPerColumn})}this.numComponents=this.components.length},_getLinearizedBlockData:function(e,t){var r,n,i,l,o,a,s,u,h,f,c,p=this.width/e,d=this.height/t,m=0,g=this.components.length,y=e*t*g,x=new Uint8ClampedArray(y),w=new Uint32Array(e),C=4294967288;for(s=0;s<g;s++){for(n=(r=this.components[s]).scaleX*p,i=r.scaleY*d,m=s,c=r.output,l=r.blocksPerLine+1<<3,o=0;o<e;o++)u=0|o*n,w[o]=(u&C)<<3|7&u;for(a=0;a<t;a++)for(f=l*((u=0|a*i)&C)|(7&u)<<3,o=0;o<e;o++)x[m]=c[f+w[o]],m+=g}var M=this.decodeTransform;if(M)for(s=0;s<y;)for(u=0,h=0;u<g;u++,s++,h+=2)x[s]=(x[s]*M[h]>>8)+M[h+1];return x},_isColorConversionNeeded:function(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this.colorTransform:1===this.colorTransform},_convertYccToRgb:function(e){for(var t,r,n,i=0,l=e.length;i<l;i+=3)t=e[i],r=e[i+1],n=e[i+2],e[i]=t-179.456+1.402*n,e[i+1]=t+135.459-.344*r-.714*n,e[i+2]=t-226.816+1.772*r;return e},_convertYcckToRgb:function(e){for(var t,r,n,i,l=0,o=0,a=e.length;o<a;o+=4)t=e[o],r=e[o+1],n=e[o+2],i=e[o+3],e[l++]=r*(-660635669420364e-19*r+.000437130475926232*n-54080610064599e-18*t+.00048449797120281*i-.154362151871126)-122.67195406894+n*(-.000957964378445773*n+.000817076911346625*t-.00477271405408747*i+1.53380253221734)+t*(.000961250184130688*t-.00266257332283933*i+.48357088451265)+i*(-.000336197177618394*i+.484791561490776),e[l++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*n+.000659397001245577*t+.000426105652938837*i-.176491792462875)+n*(-.000778269941513683*n+.00130872261408275*t+.000770482631801132*i-.151051492775562)+t*(.00126935368114843*t-.00265090189010898*i+.25802910206845)+i*(-.000318913117588328*i-.213742400323665),e[l++]=r*(-.000570115196973677*r-263409051004589e-19*n+.0020741088115012*t-.00288260236853442*i+.814272968359295)-20.810012546947+n*(-153496057440975e-19*n-.000132689043961446*t+.000560833691242812*i-.195152027534049)+t*(.00174418132927582*t-.00255243321439347*i+.116935020465145)+i*(-.000343531996510555*i+.24165260232407);return e},_convertYcckToCmyk:function(e){for(var t,r,n,i=0,l=e.length;i<l;i+=4)t=e[i],r=e[i+1],n=e[i+2],e[i]=434.456-t-1.402*n,e[i+1]=119.541-t+.344*r+.714*n,e[i+2]=481.816-t-1.772*r;return e},_convertCmykToRgb:function(e){for(var t,r,n,i,l=0,o=1/255,a=0,s=e.length;a<s;a+=4)t=e[a]*o,r=e[a+1]*o,n=e[a+2]*o,i=e[a+3]*o,e[l++]=255+t*(-4.387332384609988*t+54.48615194189176*r+18.82290502165302*n+212.25662451639585*i-285.2331026137004)+r*(1.7149763477362134*r-5.6096736904047315*n-17.873870861415444*i-5.497006427196366)+n*(-2.5217340131683033*n-21.248923337353073*i+17.5119270841813)-i*(21.86122147463605*i+189.48180835922747),e[l++]=255+t*(8.841041422036149*t+60.118027045597366*r+6.871425592049007*n+31.159100130055922*i-79.2970844816548)+r*(-15.310361306967817*r+17.575251261109482*n+131.35250912493976*i-190.9453302588951)+n*(4.444339102852739*n+9.8632861493405*i-24.86741582555878)-i*(20.737325471181034*i+187.80453709719578),e[l++]=255+t*(.8842522430003296*t+8.078677503112928*r+30.89978309703729*n-.23883238689178934*i-14.183576799673286)+r*(10.49593273432072*r+63.02378494754052*n+50.606957656360734*i-112.23884253719248)+n*(.03296041114873217*n+115.60384449646641*i-193.58209356861505)-i*(22.33816807309886*i+180.12613974708367);return e},getData:function(e,t,r){if(this.numComponents>4)throw new n("Unsupported color mode");var i=this._getLinearizedBlockData(e,t);if(1===this.numComponents&&r){for(var l=i.length,o=new Uint8ClampedArray(3*l),a=0,s=0;s<l;s++){var u=i[s];o[a++]=u,o[a++]=u,o[a++]=u}return o}if(3===this.numComponents&&this._isColorConversionNeeded())return this._convertYccToRgb(i);if(4===this.numComponents){if(this._isColorConversionNeeded())return r?this._convertYcckToRgb(i):this._convertYcckToCmyk(i);if(r)return this._convertCmykToRgb(i)}return i}},h}()},85334(e,t,r){r.d(t,{$:()=>x,IB:()=>a,Iy:()=>v,KV:()=>b,N2:()=>w,RH:()=>M,ZD:()=>C,sn:()=>A});var n=r(68197),i=r(4576),l=r(4718),o=r(34727);function a(e){return"r"in e&&"g"in e&&"b"in e}function s(e){return"h"in e&&"s"in e&&"v"in e}function u(e){return"l"in e&&"a"in e&&"b"in e}function h(e){return"l"in e&&"c"in e&&"h"in e}r(78955),r(91829);const f=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],c=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function p(e,t){let r,n,i=[];if(e[0].length!==t.length)throw Error("dimensions do not match");let l=e.length,o=e[0].length,a=0;for(r=0;r<l;r++){for(a=0,n=0;n<o;n++)a+=e[r][n]*t[n];i.push(a)}return i}function d(e){let t=[e.r/255,e.g/255,e.b/255].map(e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4),r=p(f,t);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function m(e){let t=p(c,[e.x/100,e.y/100,e.z/100]).map(e=>{let t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.min(1,Math.max(t,0))});return{r:Math.round(255*t[0]),g:Math.round(255*t[1]),b:Math.round(255*t[2])}}function g(e){let t=[e.x/95.047,e.y/100,e.z/108.883].map(e=>e>(6/29)**3?e**(1/3):1/3*(29/6)**2*e+4/29);return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function y(e){let t=e.l,r=[(t+16)/116+e.a/500,(t+16)/116,(t+16)/116-e.b/200].map(e=>e>6/29?e**3:3*(6/29)**2*(e-4/29));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function x(e){return a(e)?e:h(e)?function(e){return m(y(function(e){let t=e.l,r=e.c,n=e.h;return{l:t,a:r*Math.cos(n),b:r*Math.sin(n)}}(e)))}(e):u(e)?function(e){return m(y(e))}(e):function(e){return"x"in e&&"y"in e&&"z"in e}(e)?m(e):s(e)?function(e){let t,r=(e.h+360)%360/60,n=e.s/100,i=e.v/100*255,l=i*n,o=l*(1-Math.abs(r%2-1));switch(Math.floor(r)){case 0:t={r:l,g:o,b:0};break;case 1:t={r:o,g:l,b:0};break;case 2:t={r:0,g:l,b:o};break;case 3:t={r:0,g:o,b:l};break;case 4:t={r:o,g:0,b:l};break;case 5:case 6:t={r:l,g:0,b:o};break;default:t={r:0,g:0,b:0}}return t.r=Math.round(t.r+i-l),t.g=Math.round(t.g+i-l),t.b=Math.round(t.b+i-l),t}(e):e}function w(e){return s(e)?e:function(e){let{r:t,g:r,b:n}=e,i=Math.max(t,r,n),l=i-Math.min(t,r,n),o=i,a=0===l?0:i===t?(r-n)/l%6:i===r?(n-t)/l+2:(t-r)/l+4,s=0===l?0:l/o;return a<0&&(a+=6),a*=60,s*=100,o*=100/255,{h:a,s,v:o}}(x(e))}function C(e){return u(e)?e:function(e){return g(d(e))}(x(e))}function M(e){return h(e)?e:function(e){return function(e){let t=e.l,r=e.a,n=e.b,i=Math.sqrt(r*r+n*n),l=Math.atan2(n,r);return l=l>0?l:l+2*Math.PI,{l:t,c:i,h:l}}(g(d(e)))}(x(e))}function b(e){return e[0]??=0,e[1]??=0,e[2]??=0,e}function A(e){return e.length=4,b(e),e[3]??=1,(0,o.qE)(e[3],0,1),e}function v(e,t,r={}){if(0===e.length||t<=0)return[];if(1===(e=e.map(e=>"string"==typeof e?new n.A(e):e)).length||1===t){let r=[],n=e[0];for(let e=0;e<t;e++)r.push(n.clone());return r}if(r.shuffle&&(e=(0,i.k4)((0,l.o8)(e),r.seed)),e.length>=t){let r=[],n=(e.length-1)/(t-1);for(let i=0;i<t;i++){let t=Math.round(i*n);r.push(e[t].clone())}return r}return function(e,t,r={}){let n=[],l=e.length-1,o=Math.ceil((t-e.length)/l);e:for(let i=0;i<l;i++){let l=e[i],a=e[i+1];for(let i=1;i<=o;i++){let s=i/(o+1);if(n.push(T(l,a,s,r)),n.length+e.length===t)break e}}return[...e.map(e=>e.clone()),...(0,i.k4)(n,r.seed??1)]}(e,t,r)}const k=(e,t)=>{let r=Math.floor(10*t())-5;return Math.min(255,Math.max(0,e+r))};function T(e,t,r,l={}){let o=e.r,a=e.g,s=e.b,u=t.r,h=t.g,f=t.b,c=Math.round(o+(u-o)*r),p=Math.round(a+(h-a)*r),d=Math.round(s+(f-s)*r);if(!l.offset)return new n.A([c,p,d]);let m=(0,i.Mo)(l.seed);return new n.A([k(c,m),k(p,m),k(d,m)])}},91829(e,t,r){function n(){return[0,0,0,0]}function i(e,t,r,n){return[e,t,r,n]}function l(){return i(1,1,1,1)}function o(){return i(1,0,0,0)}function a(){return i(0,1,0,0)}function s(){return i(0,0,1,0)}function u(){return i(0,0,0,1)}r.d(t,{Un:()=>f,_Y:()=>u,fA:()=>i,uY:()=>h,vt:()=>n});const h=[0,0,0,0],f=l(),c=o(),p=a(),d=s(),m=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:f,UNIT_W:m,UNIT_X:c,UNIT_Y:p,UNIT_Z:d,ZEROS:h,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:n,freeze:function(e,t,r,n){return[e,t,r,n]},fromArray:function(e,t=[0,0,0,0]){let r=Math.min(4,e.length);for(let n=0;n<r;++n)t[n]=e[n];return t},fromValues:i,ones:l,unitW:u,unitX:o,unitY:a,unitZ:s,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},78955(e,t,r){r.d(t,{Bw:()=>g,C:()=>i,Cc:()=>C,LI:()=>c,Om:()=>w,S8:()=>x,T9:()=>f,WQ:()=>o,Z0:()=>M,aI:()=>A,hG:()=>m,hZ:()=>l,hs:()=>p,jk:()=>h,m3:()=>y,t2:()=>b});var n=r(34304);function i(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function l(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function o(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function a(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function s(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function u(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function h(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function f(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function c(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function p(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function d(e,t){let r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],l=t[3]-e[3];return Math.sqrt(r*r+n*n+i*i+l*l)}function m(e,t){let r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],l=t[3]-e[3];return r*r+n*n+i*i+l*l}function g(e){let t=e[0],r=e[1],n=e[2],i=e[3];return Math.sqrt(t*t+r*r+n*n+i*i)}function y(e){let t=e[0],r=e[1],n=e[2],i=e[3];return t*t+r*r+n*n+i*i}function x(e,t){let r=t[0],n=t[1],i=t[2],l=t[3],o=r*r+n*n+i*i+l*l;return o>0&&(o=1/Math.sqrt(o),e[0]=r*o,e[1]=n*o,e[2]=i*o,e[3]=l*o),e}function w(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function C(e,t,r,n){let i=t[0],l=t[1],o=t[2],a=t[3];return e[0]=i+n*(r[0]-i),e[1]=l+n*(r[1]-l),e[2]=o+n*(r[2]-o),e[3]=a+n*(r[3]-a),e}function M(e,t,r){let n=t[0],i=t[1],l=t[2],o=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*l+r[12]*o,e[1]=r[1]*n+r[5]*i+r[9]*l+r[13]*o,e[2]=r[2]*n+r[6]*i+r[10]*l+r[14]*o,e[3]=r[3]*n+r[7]*i+r[11]*l+r[15]*o,e}function b(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function A(e,t){let r=e[0],i=e[1],l=e[2],o=e[3],a=t[0],s=t[1],u=t[2],h=t[3],f=(0,n.FD)();return Math.abs(r-a)<=f*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=f*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(l-u)<=f*Math.max(1,Math.abs(l),Math.abs(u))&&Math.abs(o-h)<=f*Math.max(1,Math.abs(o),Math.abs(h))}const v=a,k=s,T=u,S=d,I=m,P=g,E=y;Object.freeze(Object.defineProperty({__proto__:null,add:o,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:i,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:S,distance:d,div:T,divide:u,dot:w,equals:A,exactEquals:b,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:P,length:g,lerp:C,max:f,min:h,mul:k,multiply:s,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:x,random:function(e,t=1){let r,i,l,o,a,s,u=n.Ov;do{r=2*u()-1,i=2*u()-1,a=r*r+i*i}while(a>=1);do{l=2*u()-1,o=2*u()-1,s=l*l+o*o}while(s>=1);let h=Math.sqrt((1-a)/s);return e[0]=t*r,e[1]=t*i,e[2]=t*l*h,e[3]=t*o*h,e},round:c,scale:p,scaleAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e},set:l,sqrDist:I,sqrLen:E,squaredDistance:m,squaredLength:y,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:v,subtract:a,transformMat4:M,transformQuat:function(e,t,r){let n=t[0],i=t[1],l=t[2],o=r[0],a=r[1],s=r[2],u=r[3],h=u*n+a*l-s*i,f=u*i+s*n-o*l,c=u*l+o*i-a*n,p=-o*n-a*i-s*l;return e[0]=h*u+p*-o+f*-s-c*-a,e[1]=f*u+p*-a+c*-o-h*-s,e[2]=c*u+p*-s+h*-a-f*-o,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},9334(e,t,r){function n(e,t){let r=0,n="",i=0,l=0,o=e.length;for(;r<o;)l=e[r++],i=l>>4,i<8?i=1:15===i?(i=4,l=(7&l)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++]):14===i?(i=3,l=(15&l)<<12|(63&e[r++])<<6|63&e[r++]):(i=2,l=(31&l)<<6|63&e[r++]),(0!==l||t)&&(n+=String.fromCodePoint(l));return n}r.d(t,{w:()=>n})},53593(e,t,r){r.d(t,{D:()=>o,E:()=>p});var n=r(49186),i=r(17676),l=r(8003);async function o(e,t,r){if(!e||e.byteLength<10)throw new n.A("imagecanvasdecoder: decode","required a valid encoded data as input.");let{width:l,height:o,format:h}=t,{applyJpegMask:p}=t;if(p&&(!l||!o))throw new n.A("imagecanvasdecoder: decode","image width and height are needed to apply jpeg mask directly to canvas");let d=null;"jpg"===h&&p&&l&&o&&(d=await c(e,{width:l,height:o}));try{let n=new Blob([new Uint8Array(e)],{type:f(h)}),l=await createImageBitmap(n);(0,i.Te)(r);let{useTiledDecoding:o,tileIndex:c,tileSize:p}=t;if(o&&null==c)return s(l,d,p);if(null!=c&&null!=p)return u(l,c,p);try{return a(l,d)}catch(e){if((0,i.QP)(e),l.width>4096||l.height>4096)return s(l,d);throw e}}catch(e){throw(0,i.QP)(e),new n.A("imagecanvasdecoder: decode","cannot load image")}}function a(e,t){let{width:r,height:i}=e,l=new OffscreenCanvas(r,i),o=l.getContext("2d");if(!o)throw new n.A("imagecanvasdecoder: decode","cannot create canvas context");o.drawImage(e,0,0,r,i);let a=h(o.getImageData(0,0,r,i),r,i,t);return l.width=0,l.height=0,a}function s(e,t,r=[2048,2048]){let[i,l]=r,o=new OffscreenCanvas(i,l),a=o.getContext("2d",{willReadFrequently:!0});if(!a)throw new n.A("imagecanvasdecoder: decode","cannot create canvas context");let{width:s,height:u}=e,h=s*u,f=new Uint8Array(h),c=new Uint8Array(h),p=new Uint8Array(h),d=null==t;t||=new Uint8Array(h);for(let r=0;r<u;r+=l){let n=Math.min(l,u-r);for(let l=0;l<s;l+=i){let o=Math.min(i,s-l);a.clearRect(0,0,o,n),a.drawImage(e,l,r,o,n,0,0,o,n);let{data:u}=a.getImageData(0,0,o,n);for(let e=0;e<n;e++){let n=e*o*4,i=(r+e)*s+l;for(let e=0;e<o;e++,n+=4,i++)f[i]=u[n],c[i]=u[n+1],p[i]=u[n+2],d&&(t[i]=u[n+3])}}}let m={width:s,height:u,pixels:[f,c,p],mask:t,pixelType:"u8"};return o.width=0,o.height=0,console.log(`decodeFullImageTiled: ${s}x${u} using tile ${i}x${l}`,m),m}function u(e,t,r){let[i,l,o]=t,[a,s]=r,u=Math.ceil(e.width/2**i),f=Math.ceil(e.height/2**i),c=Math.ceil(f/s),p=Math.ceil(u/a);if(l>=c||o>=p)return null;let d=new OffscreenCanvas(u,f),m=d.getContext("2d");if(!m)throw new n.A("imagecanvasdecoder: decode","cannot create canvas context");m.drawImage(e,0,0,u,f);let g=o*a,y=l*s,x=Math.min(a,u-g),w=Math.min(s,f-y),C=h(m.getImageData(g,y,x,w),a,s);return d.width=0,d.height=0,C}function h(e,t,r,n){let i=t*r,l=new Uint8Array(i),o=new Uint8Array(i),a=new Uint8Array(i),s=null==n;n||=new Uint8Array(i);let u={width:t,height:r,pixels:[l,o,a],mask:n,pixelType:"u8"},{width:h,height:f,data:c}=e;if(h===t&&f===r){for(let e=0,t=0;e<i;e++,t+=4)l[e]=c[t],o[e]=c[t+1],a[e]=c[t+2],s&&(n[e]=c[t+3]);return u}for(let e=0;e<f;e++){let r=e*h*4;for(let i=0;i<h;i++){let u=e*t+i;l[u]=c[r+4*i],o[u]=c[r+4*i+1],a[u]=c[r+4*i+2],s&&(n[u]=c[r+4*i+3])}}return u}function f(e){return`image/${"jpg"===e?"jpeg":e}`}async function c(e,t){try{let r=new Uint8Array(e),n=Math.ceil(r.length/2),i=r.length-2;for(;n<i&&(255!==r[n]||217!==r[n+1]);n++);n+=2;let l=null;return n<r.length-1&&(l=await p(r.subarray(n,-4),t.width*t.height)),l}catch{return null}}async function p(e,t,r){try{let n=await(0,l.U)(e,void 0,r),i=new Uint8Array(t);for(let e=0,t=0;e<n.length;e++)for(let r=7;r>=0;r--)i[t++]=n[e]>>r&1;return i}catch{return null}}},85951(e,t,r){r.d(t,{D:()=>o,R:()=>l});var n=r(53593),i=r(61294);function l(e){let t=new Uint8Array(e),r=t.length;if(255!==t[0]||216!==t[1])return null;let n=2;for(;n<r&&255===t[n++];){for(;255===t[n];)n++;if(n>=r)break;let e=t[n++];if(217===e||218===e)break;if(e>=208&&e<=215||1===e)continue;let i=t[n]<<8|t[n+1];if(e>=192&&e<=207&&196!==e&&200!==e&&204!==e&&i>=8){let e=n+2,r=t[e+1]<<8|t[e+2];return{width:t[e+3]<<8|t[e+4],height:r,planes:t[e+5]}}n+=i}return null}async function o(e,t={}){let r=new Uint8Array(e),l=new i.J;l.parse(r);let{width:o,height:a,numComponents:s,eof:u}=l,h=t.decodeJpegAsRgb??1!==s,f=l.getData(o,a,h),c=o*a,p=null,{applyJpegMask:d=!1}=t;d&&u<r.length-1&&(p=await(0,n.E)(r.subarray(u,-4),c));let m,g=h?3:s;if(1===g&&f.length===o*a){let e=new Uint8Array(f.buffer);m=[e,e,e]}else{m=[];for(let e=0;e<g;e++)m.push(new Uint8Array(c));for(let e=0,t=0;e<c;e++)for(let r=0;r<g;r++)m[r][e]=f[t++]}return{width:o,height:a,pixels:m,mask:p}}},43946(e,t,r){r.d(t,{D4:()=>h,Hh:()=>o});var n=r(2741);const i=[{pixelType:"S8",size:1,ctor:Int8Array,range:[-128,127]},{pixelType:"U8",size:1,ctor:Uint8Array,range:[0,255]},{pixelType:"S16",size:2,ctor:Int16Array,range:[-32768,32767]},{pixelType:"U16",size:2,ctor:Uint16Array,range:[0,65535]},{pixelType:"S32",size:4,ctor:Int32Array,range:[-2147483648,2147483647]},{pixelType:"U32",size:4,ctor:Uint32Array,range:[0,4294967295]},{pixelType:"F32",size:4,ctor:Float32Array,range:[-34028234663852886e22,34028234663852886e22]},{pixelType:"F64",size:8,ctor:Float64Array,range:[-17976931348623157e292,17976931348623157e292]}];let l=null;function o(){return l||(l=r.e(382).then(()=>r(30382)).then(({default:e})=>e({locateFile:e=>(0,n.s)(`esri/layers/raster/formats/${e}`)})).then(e=>{!function(e){let t,{_malloc:r,_free:n,memory:l,_lerc_getBlobInfo:o,_lerc_getDataRanges:u,_lerc_decode_4D:h}=e,f=e=>{let n=e.map(e=>function(e){return 16+(e>>3<<3)}(e)),i=n.reduce((e,t)=>e+t),o=r(i);if(0===o)throw Error("Lerc WASM memory allocation failed");t=new Uint8Array(l.buffer);let a=n[0];n[0]=o;for(let e=1;e<n.length;e++){let t=n[e];n[e]=n[e-1]+a,a=t}return n};a.getBlobInfo=e=>{let r=new Uint8Array(48),i=new Uint8Array(24),[a,h,c]=f([e.length,r.length,i.length]),p=0;try{t.set(e,a),t.set(r,h),t.set(i,c);let n=o(a,e.length,h,c,12,3);if(n)throw Error(`lerc-getBlobInfo: error code is ${n}`);t=new Uint8Array(l.buffer),s(t,h,r),s(t,c,i);let d=new Uint32Array(r.buffer),m=new Float64Array(i.buffer),[g,y,,x,w,C,M,b,A,v,k]=d,T=0===M,S={version:g,depthCount:v,width:x,height:w,validPixelCount:M,bandCount:C,blobSize:b,maskCount:A,dataType:y,minValue:m[0],maxValue:m[1],maxZerror:m[2],statistics:[],bandCountWithNoData:k};if(k&&v>1)return S;if(1===v&&1===C){let e=T?0:m[0],t=T?0:m[1];return S.statistics.push({minValue:e,maxValue:t}),S}let I=v*C*8,P=new Uint8Array(I),E=new Uint8Array(I),[R,L]=f([I,I]);if(p=R,t.set(P,R),t.set(E,L),n=u(a,e.length,v,C,R,L),n)throw Error(`lerc-getDataRanges: error code is ${n}`);t=new Uint8Array(l.buffer),s(t,R,P),s(t,L,E);let U=new Float64Array(P.buffer),O=new Float64Array(E.buffer),D=S.statistics;for(let e=0;e<C;e++)if(v>1){let t=U.slice(e*v,(e+1)*v),r=O.slice(e*v,(e+1)*v),n=T?0:Math.min.apply(null,t),i=T?0:Math.max.apply(null,r);D.push({minValue:n,maxValue:i,depthStats:{minValues:t,maxValues:r}})}else D.push({minValue:T?0:U[e],maxValue:T?0:O[e]});return S}finally{n(a),p&&n(p)}},a.decode=(e,r)=>{let{maskCount:o,depthCount:a,bandCount:u,width:c,height:p,dataType:d,bandCountWithNoData:m,validPixelCount:g}=r,y=i[d],x=c*p,w=new Uint8Array(x*u),C=x*a*u*y.size,M=new Uint8Array(C),b=new Uint8Array(u),A=new Uint8Array(8*u);if(0===g)return{data:M,maskData:w,noDataValues:null};let[v,k,T,S,I]=f([e.length,w.length,M.length,b.length,A.length]);try{t.set(e,v),t.set(w,k),t.set(M,T),t.set(b,S),t.set(A,I);let r=h(v,e.length,o,k,a,c,p,u,d,T,S,I);if(r)throw Error(`lerc-decode: error code is ${r}`);t=new Uint8Array(l.buffer),s(t,T,M),s(t,k,w);let n=null;if(m){s(t,S,b),s(t,I,A),n=[];let e=new Float64Array(A.buffer);for(let t=0;t<b.length;t++)n.push(b[t]?e[t]:null)}return{data:M,maskData:w,noDataValues:n}}finally{n(v)}}}(e)}),l)}const a={getBlobInfo:null,decode:null};function s(e,t,r){r.set(e.slice(t,t+r.length))}function u(e,t,r,n,i){if(r<2)return e;let l=new n(t*r);for(let n=0,i=0;n<t;n++)for(let o=0,a=n;o<r;o++,a+=t)l[a]=e[i++];return l}function h(e,t={}){let r=t.inputOffset??0,n=e instanceof Uint8Array?e.subarray(r):new Uint8Array(e,r),l=a.getBlobInfo(n),{data:o,maskData:s,noDataValues:h}=a.decode(n,l),{width:f,height:c,bandCount:p,depthCount:d,dataType:m,maskCount:g,statistics:y}=l,x=i[m],w=new x.ctor(o.buffer),C=[],M=[],b=f*c,A=b*d,v=i.find(e=>e.pixelType===t.outputPixelType)??x,k=v.pixelType!==x.pixelType;for(let e=0;e<p;e++){let r=e*A,n=r+A,i=w.subarray(r,n),l=k?new v.ctor(i):i;if(t.returnInterleaved)C.push(l);else{let e=u(l,b,d,v.ctor);C.push(e)}let o=e*b;M.push(s.subarray(o,o+b))}let T=0===g?null:1===g?M[0]:new Uint8Array(b);if(g>1){T.set(M[0]);for(let e=1;e<M.length;e++){let t=M[e];for(let e=0;e<b;e++)T[e]=T[e]&t[e]}}let{noDataValue:S}=t,I=null!=S&&v.range[0]<=S&&v.range[1]>=S,{validPixelCount:P}=l;if(g>0&&I)for(let e=0;e<p;e++){let r=C[e];if(0===P)r.fill(S);else{let n=M[1===g?0:e];for(let e=0;e<b;e++)if(0===n[e])if(d>1)for(let n=0;n<d;n++)r[t.returnInterleaved?e*d+n:n*b+e]=S;else r[e]=S}}let E=g===p&&p>1?M:null;return{width:f,height:c,bandCount:p,pixelType:v.pixelType,depthCount:d,statistics:y,pixels:C,mask:T,validPixelCount:P,bandMasks:E,noDataValues:h}}},40951(e,t,r){r.d(t,{D:()=>H,g:()=>q});var n=r(49186),i=r(97768),l=r(17676),o=r(53593),a=r(85951),s=r(43946);function u(){let e=[];for(let t=0;t<=257;t++)e[t]=[t];return e}function h(e,t){for(let r=0;r<t.length;r++)e.push(t[r])}const f=new Set;function c(e,t,r,n=!0){let i=function(e,t,r,n=!0){if(t%4!=0||r%4!=0){let i=new ArrayBuffer(4*Math.ceil(r/4)),l=new Uint8Array(i),o=new Uint8Array(e,t,r);if(n)for(let e=0;e<l.length;e+=4)l[e]=o[e+3],l[e+1]=o[e+2],l[e+2]=o[e+1],l[e+3]=o[e];else l.set(o);return new Uint32Array(l.buffer)}if(n){let n=new Uint8Array(e,t,r),i=new Uint8Array(n.length);for(let e=0;e<i.length;e+=4)i[e]=n[e+3],i[e+1]=n[e+2],i[e+2]=n[e+1],i[e+3]=n[e];return new Uint32Array(i.buffer)}return new Uint32Array(e,t,r/4)}(e,t,r,n),l=9,o=u(),a=32,s=o.length,c=[],p=1,d=i[0],m=0,g=i.length,y=8*(4*g-r),x=[];for(;null!=d;){if(a>=l)a-=l,m=d>>>32-l,d<<=l;else{m=d>>>32-a,d=i[p++];let e=l-a;a=32-e,m=(m<<e)+(d>>>a),d<<=e}if(257===m)break;if(256===m){l=9,o=u(),s=o.length,c=[];continue}let e=o[m];if(null==e){if(m>o.length)throw Error("data integrity issue: code does not exist on code page");c.push(c[0]),o[s++]=c.slice(),h(x,c)}else h(x,e),c.push(e[0]),c.length>1&&(o[s++]=c.slice()),c=e.slice();if(f.has(s)&&l++,0===a&&(d=i[p++],a=32),p>g||p===g&&a<=y)break}return new Uint8Array(x)}f.add(511),f.add(1023),f.add(2047),f.add(4095),f.add(8191);var p=r(94778),d=r(2741);const m=new Set(["uint8","int8","uint16","int16","uint32","int32","int64","uint64"]),g=new Map([["uint8",{byteCount:1,pixelType:"u8",ctor:Uint8Array}],["int8",{byteCount:1,pixelType:"s8",ctor:Int8Array}],["uint16",{byteCount:2,pixelType:"u16",ctor:Uint16Array}],["int16",{byteCount:2,pixelType:"s16",ctor:Int16Array}],["uint32",{byteCount:4,pixelType:"u32",ctor:Uint32Array}],["int32",{byteCount:4,pixelType:"s32",ctor:Int32Array}],["uint64",{byteCount:8,pixelType:"f64",ctor:BigUint64Array}],["int64",{byteCount:8,pixelType:"f64",ctor:BigInt64Array}]]);let y;function x(){return y??=r.e(6154).then(()=>r(56154)).then(({default:e})=>e({locateFile:e=>(0,d.s)(`esri/layers/raster/formats/${e}`)})).then(e=>{!function(e){let{_GetInfo:t,_decode:r,_malloc:n,_free:i,writeArrayToMemory:l,UTF8ToString:o}=e;w.getBlobInfo=e=>{e.length>1e3&&(e=e.slice(0,1e3));let r=n(e.length);l(e,r);let a=t(r,e.length);if(i(r),!a)return null;let s=o(a);i(a);try{let e=JSON.parse(s);return{width:e.xsize,height:e.ysize,bandCount:e.nbands,dataType:e.dtype,mode:e.mode,bandMap:e.bandmap}}catch{return null}},w.decode=(t,n)=>{let{dataType:i,width:l,height:o,bandCount:a}=n;if(!m.has(i))throw Error("Unsupported data type: "+i);let{_malloc:s,_free:u}=e,h=s(t.length);e.writeArrayToMemory(t,h);let{ctor:f,byteCount:c}=C(i),p=l*o*a*c,d=s(p),g=s(1024);if(0===r(h,t.length,d,g))throw u(h),u(d),u(g),Error("Decoding failed: "+e.UTF8ToString(g));let y=new f(e.HEAPU8.slice(d,d+p).buffer);if(u(h),u(d),u(g),y instanceof BigInt64Array||y instanceof BigUint64Array){let e=new Float64Array(y.length);for(let t=0;t<y.length;t++)e[t]=Number(y[t]);return e}return y}}(e)}),y}const w={getBlobInfo:null,decode:null};function C(e){if(!g.has(e))throw Error("Unsupported data type: "+e);return g.get(e)}function M(e){let t=new Uint8Array(e),r=w.getBlobInfo(t);if(!r)return null;let n=w.decode(t,r);if(!n)return null;let{width:i,height:l,bandCount:o,dataType:a}=r,{ctor:s,pixelType:u}=C(a),h=s===BigInt64Array||s===BigUint64Array?Float64Array:s,f=Array.from({length:o},()=>new h(i*l));for(let e=0,t=0;e<i*l;e++)for(let r=0;r<o;r++)f[r][e]=n[t++];return{width:i,height:l,pixelType:u,pixels:f}}const b=(e,t)=>{let r=t.width*t.height,n=t.pixelType;return Math.floor(e.byteLength/(r*n.BYTES_PER_ELEMENT))},A=(e,t)=>{if(8*e.byteLength<t)return null;let r=new Uint8Array(e,0,Math.ceil(t/8)),n=new Uint8Array(t),i=0,l=0;for(let e=0;e<r.length-1;e++){l=r[e];for(let e=7;e>=0;e--)n[i++]=l>>e&1}let o=7;for(;i<t;)l=r[r.length-1],n[i++]=l>>o&1,o--;return n};r(44208);var v=r(61294),k=r(44094),T=r(10713),S=r(8003);function I(e,t){let r="unknown";return 3===e?r=64===t?"f64":"f32":1===e?1===t?r="u1":2===t?r="u2":4===t?r="u4":t<=8?r="u8":t<=16?r="u16":t<=32&&(r="u32"):2===e&&(t<=8?r="s8":t<=16?r="s16":t<=32&&(r="s32")),r}function P(e){let t=null;switch(e?e.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":t=Uint8Array;break;case"u16":t=Uint16Array;break;case"u32":t=Uint32Array;break;case"s8":t=Int8Array;break;case"s16":t=Int16Array;break;case"s32":t=Int32Array;break;case"f64":t=Float64Array;break;default:t=Float32Array}return t}function E(e,t){if(t%8==0)return e;let r=t>16?32:t>8?16:8;r>8&&(e=L(e,32===r?4:2));let n=32===r?Uint32Array:16===r?Uint16Array:Uint8Array,i=new n(e),l=Math.floor(8*e.byteLength/t+1e-6),o=new n(l),a=(1<<t)-1,s=0,u=0,h=0;for(let e=0;e<l;e++)if(0===u&&(h=i[s++],u=r),u>=t)o[e]=h>>>u-t&a,u-=t;else{let n=t-u,l=(h&a)<<n&a;h=i[s++],u=r-n,l+=h>>>u,o[e]=l}return o.buffer}function R(e,t,r){let n=new v.J;n.parse(e),n.colorTransform=6===r?-1:0;let i=n.getData(n.width,n.height,1!==t&&4!==t);return new Uint8Array(i.buffer)}function L(e,t){let r=new Uint8Array(e),n=new Uint8Array(r.length);if(2===t)for(let e=0;e<r.length;e+=2)n[e]=r[e+1],n[e+1]=r[e];else if(4===t)for(let e=0;e<r.length;e+=4)n[e]=r[e+3],n[e+1]=r[e+2],n[e+2]=r[e+1],n[e+3]=r[e];else for(let e=0;e<r.length;e+=8)n[e]=r[e+7],n[e+1]=r[e+6],n[e+2]=r[e+5],n[e+3]=r[e+4],n[e+4]=r[e+3],n[e+5]=r[e+2],n[e+6]=r[e+1],n[e+7]=r[e];return n.buffer}async function U(e,t){let{input:r,isTiffLittleEndian:i,ifd:l,offset:o,size:a}=e,u=T.Z===i,h=(0,k.LZ)(l,"BITSPERSAMPLE"),f=(0,k.LZ)(l,"SAMPLESPERPIXEL")??1,p=(0,k.LZ)(l,"PHOTOMETRICINTERPRETATION"),d=(0,k.LZ)(l,"SAMPLEFORMAT")??1,m=I(d,h),g=(0,k.ni)(l);if(34887===g)return await async function(e,t){return await(0,s.Hh)(),(0,s.D4)(e,{inputOffset:t}).pixels[0]}(r,o);let y,x,w,C=P(m);switch(g){case 1:y=r.slice(o,o+a),x=new Uint8Array(y);break;case 8:case 32946:x=await(0,S.U)(new Uint8Array(r,o,a),void 0,t),y=x.buffer;break;case 6:x=R(new Uint8Array(r,o,a),f,p),y=x.buffer;break;case 7:{let e=l.get("JPEGTABLES").values,t=e.length-2,n=new Uint8Array(t+a-2);for(let r=0;r<t;r++)n[r]=e[r];let i=new Uint8Array(r,o+2,a-2);for(let e=0;e<i.length;e++)n[t+e]=i[e];x=R(n,f,p),y=x.buffer}break;case 5:x=c(r,o,a,i),y=x.buffer;break;default:throw new n.A("tiff-reader:decode-data","unsupported compression "+g)}if(y=E(y,h),u||h<=8)w=new C(y);else{let e=h>32?8:h>16?4:2;w=new C(L(x.buffer,e))}let M=(0,k.LZ)(l,"PREDICTOR")??1,b=(0,k.LZ)(l,"TILEWIDTH"),A=(0,k.LZ)(l,"TILELENGTH");if(M>1&&(5===g||8===g||32946===g)&&b&&A){let e=(0,k.XO)(l),t=new C(w.length);t.set(w),w=function(e,t,r,n,i){let l=n?4:1,o=r*l*i;n&&(e=new Uint8Array(e.buffer));for(let r=0;r<t;r++){let t=r*o;for(let r=i;r<o;r++)e[t+r]+=e[t+r-i]}if(!n)return e;let a=new Uint8Array(e.length),s=r*i;for(let r=0;r<t;r++){let t=r*o;for(let r=0;r<s;r++)for(let n=0;n<l;n++)a[t+r*l+n]=e[t+r+(l-n-1)*s]}return new Float32Array(a.buffer)}(t,A,b,3===d&&3===M,e?1:f)}return w}async function O(e,t,r,n){let i=T.Z===t.littleEndian,l=(0,k.wc)(r,"STRIPOFFSETS"),o=(0,k.wc)(r,"STRIPBYTECOUNTS");if(null==l||null==o)return null;let a,s,u,h,{width:f,height:p,pixelType:d}=(0,k.uc)([r]),m=(0,k.LZ)(r,"SAMPLESPERPIXEL")||t.planes,g=(0,k.LZ)(r,"PHOTOMETRICINTERPRETATION"),y=f*p,x=(0,k.LZ)(r,"BITSPERSAMPLE"),w=P(d),C=new w(y*m),M=(0,k.LZ)(r,"ROWSPERSTRIP"),b=(0,k.ni)(r);if(x%8==0)for(let r=0;r<l.length;r++){let p=M*f*r*m;if("u8"===d||"s8"===d||i)8===b||32946===b?(u=new Uint8Array(e,l[r],o[r]),u=await(0,S.U)(u,void 0,n),s=u.buffer):6===b?(u=new Uint8Array(e,l[r],o[r]),u=R(u,m,g),s=u.buffer):5===b?(u=c(e,l[r],o[r],t.littleEndian),s=u.buffer):s=e.slice(l[r],l[r]+o[r]),s=E(s,x),a=new w(s);else{switch(6===b||8===b||32946===b?(u=new Uint8Array(e,l[r],o[r]),h=await(0,S.U)(u,void 0,n),s=h.buffer):(s=new ArrayBuffer(o[r]),u=new Uint8Array(e,l[r],o[r]),h=new Uint8Array(s)),d){case"u16":case"s16":for(let e=0;e<u.length;e+=2)h[e]=u[e+1],h[e+1]=u[e];break;case"u32":case"s32":case"f32":for(let e=0;e<u.length;e+=4)h[e]=u[e+3],h[e+1]=u[e+2],h[e+2]=u[e+1],h[e+3]=u[e]}s=E(s,x),a=new w(s)}C.set(a,p)}let A=[];if(1===m)A.push(C);else for(let e=0;e<m;e++){let t=new w(y);for(let r=0;r<y;r++)t[r]=C[r*m+e];A.push(t)}return{width:f,height:p,pixelType:d,pixels:A}}var D=r(14140),G=r(4151);async function B(e,t){if(!T.Z)throw new n.A("rasterCoded:decode","lerc decoder is not supported on big endian platform");await(0,s.Hh)();let{width:r,height:i,pixelType:l,statistics:o,depthCount:a,noDataValues:u,bandMasks:h,pixels:f,mask:c,validPixelCount:p}=(0,s.D4)(e,{inputOffset:t.offset,returnInterleaved:t.returnInterleaved});return new D.A({width:r,height:i,pixelType:l.toLowerCase(),pixels:f,mask:c,validPixelCount:p,statistics:o.map(({minValue:e,maxValue:t})=>new G.A(e,t)),bandMasks:h,depthCount:a,noDataValues:u})}async function N(e,t){await x();let r=M(e);if(!r)throw new n.A("rasterCodec:decode","failed to decode the input data.");let{width:i,height:l,pixels:o,pixelType:a}=r;return new D.A({width:i,height:l,pixelType:a,pixels:o})}async function F(e,t,r){let l=await async function(e,t={},r){let i=t.pyramidLevel||0,l=t.headerInfo||(0,k.RW)(e),{ifds:o,noData:a}=l;if(0===o.length)throw new n.A("tiff-reader:decode","no valid image file directory");let s=(0,k._J)(l);if(s)throw new n.A("tiff-reader:decode",s);let u=-1===i?o[o.length-1]:o[i],h=a??t.noDataValue,f=l.tileWidth?await async function(e,t,r,n){let i=(0,k.wc)(r,"TILEOFFSETS"),l=(0,k.wc)(r,"TILEBYTECOUNTS");if(null==i||null==l)return null;let{width:o,height:a,pixelType:s,tileWidth:u,tileHeight:h}=(0,k.uc)([r]),f=(0,k.XO)(r,t),c=(0,k.LZ)(r,"SAMPLESPERPIXEL")||t.planes,p=o*a,d=(0,k.LZ)(r,"BITSPERSAMPLE"),m=34887===(0,k.ni)(r),g=P(s),y=[];for(let e=0;e<c;e++)y.push(new g(p));let x=Math.ceil(o/u),w=new Uint8Array(p).fill(255),C=null,M=!1;if(d%8==0)if(m&&f&&c>1){let s=Math.round(i.length/c);for(let f=0;f<s;f++){let s=Math.floor(f/x)*h,p=f%x*u,d=s*o+p;for(let m=0;m<c;m++){let g=f*c+m;0===l[g]?(C=null,M=!0):C=await U({input:e,isTiffLittleEndian:t.littleEndian,ifd:r,offset:i[g],size:l[g]},n);let x=Math.min(u,o-p),b=Math.min(h,a-s),A=y[m];for(let e=0;e<b;e++){let t=d+e*o,r=e*u;for(let e=0;e<x;e++,t++,r++)C?A[t]=C[r]:w[t]=0}}}}else for(let s=0;s<i.length;s++){let p=Math.floor(s/x)*h,d=s%x*u,g=p*o+d;0===l[s]?(C=null,M=!0):C=await U({input:e,isTiffLittleEndian:t.littleEndian,ifd:r,offset:i[s],size:l[s]},n);let b=Math.min(u,o-d),A=Math.min(h,a-p);for(let e=0;e<c;e++){let t=y[e];if(f||m)for(let r=0;r<A;r++){let n=g+r*o,i=u*h*e+r*u;for(let e=0;e<b;e++,n++,i++)C?t[n]=C[i]:w[n]=0}else for(let r=0;r<A;r++){let n=g+r*o,i=r*u*c+e;for(let e=0;e<b;e++,n++,i+=c)C?t[n]=C[i]:w[n]=0}}}return{width:o,height:a,pixelType:s,pixels:y,mask:M?w:void 0}}(e,l,u,r):await O(e,l,u,r);if(!f)return f;if(null!=h){let e=null==a&&t?.matchAllNoData;(0,p.Sp)(f,h,{matchAllNoData:e})}return f}(e,{...t,noDataValue:t.tiffNoDataValue,matchAllNoData:t.matchAllNoData},r);return(0,i.Lw)(l),new D.A({width:l.width,height:l.height,pixels:l.pixels,pixelType:l.pixelType.toLowerCase(),mask:l.mask,bandMasks:l.bandMasks})}function z(e,t){let r=t.pixelType||"u8",n=D.A.getPixelArrayConstructor(r),i="u8"===r?e:new n(e.buffer),l=[],o=t.planes||1;if(1===o)l.push(i);else for(let r=0;r<o;r++){let a=(t.width||1)*(t.height||e.length),s=new n(a);for(let e=0;e<a;e++)s[e]=i[e*o+r];l.push(s)}return new D.A({width:t.width||1,height:t.height||e.length,pixels:l,pixelType:r})}async function V(e,t,r){return z(await(0,S.U)(new Uint8Array(e),void 0,r),t)}function _(e,t){return z(c(e,t.offset,t.eof,!t.isInputBigEndian),t)}function j(e,t){let r=t.format,{pixelTypeCtor:n}=function(e){let t=null,r=null;switch(e?e.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":r=255,t=Uint8Array;break;case"u16":r||=65535,t=Uint16Array;break;case"u32":r||=2**32-1,t=Uint32Array;break;case"s8":r||=-128,t=Int8Array;break;case"s16":r||=-32768,t=Int16Array;break;case"s32":r||=0-2**31,t=Int32Array;break;default:t=Float32Array}return{pixelTypeCtor:t,noDataValue:r}}(t.pixelType),i=function(e,t){let r=t.pixelType,n=[],i=t.width*t.height,l=b(e,t),{bandIds:o,format:a}=t,s=o?.length||b(e,t),u=e.byteLength-e.byteLength%(i*r.BYTES_PER_ELEMENT),h=new r(e,0,i*l);if("bip"===a)for(let e=0;e<s;e++){let t=new r(i),a=o?o[e]:e;for(let e=0;e<i;e++)t[e]=h[e*l+a];n.push(t)}else if("bsq"===a)for(let e=0;e<s;e++){let t=o?o[e]:e;n.push(h.subarray(t*i,(t+1)*i))}return{pixels:n,mask:u<e.byteLength?A(e.slice(u),i):null}}(e,{width:t.width,height:t.height,pixelType:n,format:r});return new D.A({width:t.width,height:t.height,pixels:i.pixels,pixelType:t.pixelType,mask:i.mask})}async function Z(e,t,r){let n=await(0,o.D)(e,t,r);return new D.A(n)}async function W(e,t,r){let i=t.format||q(e),o={...t,format:i},{canvasUsage:s}=t;if("no-canvas"!==s||"png"===i)try{return await Z(e,o,r)}catch(e){if((0,l.zf)(e))throw e;if("canvas-only"===s)throw new n.A("rasterCodec:decode",`failed to decode the input data with canvas for format ${i}`)}return await async function(e,t){let r=await(0,a.D)(e,t);return new D.A({width:r.width,height:r.height,pixels:r.pixels,pixelType:"u8",mask:r.mask})}(e,o)}function q(e){if(!e)return;let t,r=new Uint8Array(e,0,10);return 255===r[0]&&216===r[1]?t="jpg":137===r[0]&&80===r[1]&&78===r[2]&&71===r[3]?t="png":67===r[0]&&110===r[1]&&116===r[2]&&90===r[3]&&73===r[4]&&109===r[5]&&97===r[6]&&103===r[7]&&101===r[8]&&32===r[9]||76===r[0]&&101===r[1]&&114===r[2]&&99===r[3]&&50===r[4]&&32===r[5]?t="lerc":73===r[0]&&73===r[1]&&42===r[2]&&0===r[3]||77===r[0]&&77===r[1]&&0===r[2]&&42===r[3]||73===r[0]&&73===r[1]&&43===r[2]&&0===r[3]||77===r[0]&&77===r[1]&&0===r[2]&&43===r[3]?t="tiff":71===r[0]&&73===r[1]&&70===r[2]?t="gif":66===r[0]&&77===r[1]?t="bmp":81===r[0]&&66===r[1]&&51===r[2]&&(t="qb3"),t}async function H(e,t={},r){if(null==e)throw new n.A("rasterCodec:decode","missing encodeddata parameter.");let i=t.format?.toLowerCase();if(!("bsq"!==i&&"bip"!==i||null!=t.width&&null!=t.height))throw new n.A("rasterCodec:decode","requires width and height in options parameter.");if("tiff"===i&&t.customOptions)return async function(e,t,r){let n=await async function(e,t,r){let{headerInfo:n,ifd:i,offsets:l,sizes:o}=t,a=[];for(let t=0;t<l.length;t++){o[t];let s=await U({input:e,isTiffLittleEndian:n.littleEndian,ifd:i,offset:l[t],size:o[t]||e.byteLength},r);a.push(s)}let s,u=(0,k.XO)(i,n),h=(0,k.LZ)(i,"BITSPERSAMPLE"),f=I((0,k.LZ)(i,"SAMPLEFORMAT")??1,h),c=(0,k.LZ)(i,"SAMPLESPERPIXEL")||n.planes,d=P(f),m=(0,k.LZ)(i,"TILEWIDTH"),g=(0,k.LZ)(i,"TILELENGTH"),y=34887===(0,k.ni)(i),x=m*g,w=[],C=a[0];for(let e=0;e<c;e++){if(s=new d(x),a.length===c)C=a[e],C.length===x&&(s=C);else if(C.length)if(u||y)s=C.length===x?C:C.slice(x*e,x*(e+1));else for(let t=0;t<x;t++)s[t]=C[t*c+e];w.push(s)}let M=n.noData?n.noData[0]:t.noDataValue,b=n.metadata?n.metadata.statistics:null,A=b?b.map(e=>e.min):null,v=b?b.map(e=>e.max):null,T={pixelType:f,width:m,height:g,pixels:w,noDataValue:M};return null==M?A&&v&&t.applyMinMaxConstraint&&(T.mask=function(e,t,r){if(!(e&&e.length>0&&t&&r))return null;let n,i,l,o=e[0].length,a=e.length,s=new Uint8Array(o);for(let u=0;u<a;u++)if(n=e[u],i=t[u],l=r[u],0===u)for(let e=0;e<o;e++)s[e]=n[e]<i||n[e]>l?0:1;else for(let e=0;e<o;e++)s[e]&&(s[e]=n[e]<i||n[e]>l?0:1);return s}(w,A,v)):(0,p.Sp)(T,M,{matchAllNoData:t?.matchAllNoData}),T}(e,t.customOptions,r),i=new D.A({width:n.width,height:n.height,pixels:n.pixels,pixelType:n.pixelType.toLowerCase(),mask:n.mask});return t.skipStatistics||i.updateStatistics(),i}(e,t,r);if(!i||"bsq"!==i&&"bip"!==i&&"deflate"!==i&&"lzw"!==i){if(i=q(e),!i)throw String.fromCharCode.apply(null,[...new Uint8Array(e,0,10)]).toLowerCase().includes("error")?new n.A("rasterCodec:decode","input data contains error"):new n.A("rasterCodec:decode","unsupported raster format");t={...t,format:i}}let o=function(e){let t=null;switch(e){case"lerc":t=B;break;case"jpg":case"png":t=W;break;case"bmp":case"gif":t=Z;break;case"bsq":case"bip":t=j;break;case"tiff":t=F;break;case"deflate":t=V;break;case"lzw":t=_;break;case"qb3":t=N;break;default:t=()=>{throw new n.A("rasterCodec:decode",`unsupported raster format ${e}`)}}return t}(i);t.isPoint&&(null!=(t={...t}).width&&t.width++,null!=t.height&&t.height++);let a,{offsets:s}=t;if(s&&s.length>1){let n=s.map((n,i)=>o(e.slice(n,s[i+1]),t,r)),i=await Promise.all(n);a=i[0],a.pixels=i.map(e=>e.pixels[0]);let l=i.map(e=>e.mask);l.some(e=>null!=e)&&(l.forEach((e,t)=>{l[t]??=new Uint8Array(a.width*a.height).fill(255)}),a.bandMasks=l,a.mask=D.A.combineBandMasks(l))}else a=await o(e,{...t,offset:s?.[0]??t.offset},r);return(0,l.Te)(r),"jpg"!==i&&null!=t.noDataValue&&1===a.depthCount&&(0,p.Sp)(a,t.noDataValue,{customFloatTolerance:t.tolerance}),t.isPoint&&function(e,t="bilinear"){if(!e)return;let{pixels:r,width:n,height:i,mask:l}=e;if(!r||0===r.length)return;let o=n-1,a=i-1,s=[],u=null,h=D.A.getPixelArrayConstructor(e.pixelType);if("nearest"===t){for(let e of r){let t=new h(o*a);for(let r=0;r<a;r++){let i=r*n;for(let n=0;n<o;n++)t[r*o+n]=e[i+n]}s.push(t)}if(null!=l){u=new Uint8Array(o*a);for(let e=0;e<a;e++){let t=e*n;for(let r=0;r<o;r++)u[e*o+r]=l[t+r]}}}else{for(let e of r){let t=new h(o*a);for(let r=0;r<a;r++){let i=r*n;for(let l=0;l<o;l++)t[r*o+l]=(e[i+l]+e[i+l+1]+e[i+n+l]+e[i+n+l+1])/4}s.push(t)}if(l){u=new Uint8Array(o*a);for(let e=0;e<a;e++){let t=e*n;for(let r=0;r<o;r++)u[e*o+r]=Math.min.apply(null,[l[t+r],l[t+r+1],l[t+n+r],l[t+n+r+1]])}}}e.width=o,e.height=a,e.mask=u,e.pixels=s}(a),!a.statistics?.length&&!t.skipStatistics&&a.updateStatistics(),a}},8003(e,t,r){async function n(e,t,r){t??=function(e){return(t=e).length>=2&&31===t[0]&&139===t[1]?"gzip":function(e){if(e.length<2)return!1;let[t,r]=e.subarray(0,2);return!(8!=(15&t)||t>>4>7)&&(65535&(t<<8|r))%31==0}(e)?"deflate":null;var t}(e)??"deflate-raw";let n=new Response(e).body,i={signal:r?.signal??void 0},l=n.pipeThrough(new DecompressionStream(t),i),o=await new Response(l).arrayBuffer();return new Uint8Array(o)}r.d(t,{U:()=>n})},94778(e,t,r){r.d(t,{$p:()=>h,Qd:()=>o,Sp:()=>f,X1:()=>a,hP:()=>i,yM:()=>u,zw:()=>s});const n={u1:[0,1],u2:[0,3],u4:[0,15],u8:[0,255],s8:[-128,127],u16:[0,65535],s16:[-32768,32767],u32:[0,4294967295],s32:[-2147483648,2147483647],f16:[-65504,65504],f32:[-34028234663852886e22,34028234663852886e22],f64:[-Number.MAX_VALUE,Number.MAX_VALUE],unknown:void 0,c64:void 0,c128:void 0};function i(e){return n[e]??[-34028234663852886e22,34028234663852886e22]}const l={u1:1,u2:1,u4:1,u8:1,s8:1,u16:2,s16:2,u32:4,s32:4,f32:4,f64:8,unknown:4,c64:16,c128:32};function o(e){return l[e]}function a(e,t){return null==e||null==t?"s32":e<0?e>=-128&&t<128?"s8":e>=-32768&&t<32768?"s16":"s32":t<256?"u8":t<65536?"u16":"u32"}function s(e){return(e?.startsWith("s")||e?.startsWith("u"))??!1}function u(e,t,r,n){let[l,o]=i(r),a=s(r);return a&&(l-=1e-5,o+=1e-5),a?r.startsWith("u")?function(e,t,r,n){let[i,l]=n;for(let n=0;n<t.length;n++)if(t[n]){let o=e[n];o<i||o>l?t[n]=0:r[n]=o+.5|0}}(e,t,n,[l,o]):function(e,t,r,n){let[i,l]=n;for(let n=0;n<t.length;n++)if(t[n]){let o=e[n];o<i||o>l?t[n]=0:r[n]=o+(o>0?.5:-.5)|0}}(e,t,n,[l,o]):function(e,t,r,n){let[i,l]=n;for(let n=0;n<t.length;n++)if(t[n]){let o=e[n];o<i||o>l?t[n]=0:r[n]=o}}(e,t,n,[l,o])}function h(e,t){for(let r=0;r<t.length;r++)t[r]&&isNaN(e[r])&&(t[r]=0,e[r]=0)}function f(e,t,r){if(e.depthCount&&e.depthCount>1)return;let{pixels:n,statistics:l,pixelType:o}=e,a=n[0].length,s=e.bandMasks??[],u=e.mask??new Uint8Array(a).fill(255),h="f32"===o||"f64"===o,f=i(o),c=!1;for(let e=0;e<n.length;e++){let i="number"==typeof t?t:t[e];if(null==i)continue;let a=l?.[e]?.minValue??f[0],p=l?.[e]?.maxValue??f[1];if(a>i+2**-52||p<i-2**-52)continue;let d=s[e]||u.slice(),m=n[e],g=r?.customFloatTolerance;if(h&&0!==g){let e=g;e||=Math.abs(i)>=9999999e31?2e-7*Math.abs(i):"f32"===o?2**-23:2**-52;for(let t=0;t<m.length;t++)d[t]&&Math.abs(m[t]-i)<e&&(m[t]=0,d[t]=0,u[t]=0,c=!0)}else for(let e=0;e<m.length;e++)d[e]&&m[e]===i&&(m[e]=0,d[e]=0,u[e]=0,c=!0);s[e]=d}if(c){let t=e.bandMasks||e.pixels.length>1?s:null;r?.matchAllNoData?e.mask=t&&t.length>1?function(e){if(e.length<2)return e[0];let t=e[0].length,r=new Uint8Array(t).fill(0);for(let n=0;n<e.length;n++){let i=e[n];for(let e=0;e<t;e++)i[e]&&(r[e]=255)}return r}(t):u:(e.bandMasks=t,e.mask=u)}c&&"updateStatistics"in e&&e.updateStatistics()}},44094(e,t,r){r.d(t,{Cr:()=>w,JM:()=>E,LZ:()=>p,RW:()=>L,XO:()=>v,_J:()=>A,fM:()=>d,h_:()=>C,ni:()=>k,r9:()=>P,uT:()=>R,uc:()=>S,wc:()=>f,zS:()=>I});var n=r(49186),i=r(9334),l=r(94213);const o=[0,1,1,2,4,8,1,1,2,4,8,4,8,-1,-1,-1,8,8,8],a=4294967296,s=new Map([[1,(e,t)=>e.getUint8(t)],[2,(e,t)=>e.getUint8(t)],[3,(e,t,r)=>e.getUint16(t,r)],[4,(e,t,r)=>e.getUint32(t,r)],[5,(e,t,r)=>e.getUint32(t,r)/e.getUint32(t+4,r)],[6,(e,t)=>e.getInt8(t)],[7,(e,t)=>e.getUint8(t)],[8,(e,t,r)=>e.getInt16(t,r)],[9,(e,t,r)=>e.getInt32(t,r)],[10,(e,t,r)=>e.getInt32(t,r)/e.getInt32(t+4,r)],[11,(e,t,r)=>e.getFloat32(t,r)],[12,(e,t,r)=>e.getFloat64(t,r)],[13,(e,t,r)=>e.getUint32(t,r)],[16,(e,t,r)=>u(e,t,r)],[17,(e,t,r)=>function(e,t,r){let n=r?e.getInt32(t,r):e.getUint32(t,r),i=r?e.getUint32(t+4,r):e.getInt32(t+4,r),l=(r?n:i)>=0?1:-1;return r?n*=l:i*=l,l*(r?i*a+n:n*a+i)}(e,t,r)],[18,(e,t,r)=>u(e,t,r)]]);function u(e,t,r){let n=e.getUint32(t,r),i=e.getUint32(t+4,r);return r?i*a+n:n*a+i}function h(e,t){return{x:t[0]*e.x+t[1]*e.y+t[2],y:t[3]*e.x+t[4]*e.y+t[5]}}function f(e,t){return e.get(t)?.values}function c(e,t){return e.get(t)?.values?.[0]}function p(e,t){return e.get(t)?.values?.[0]}function d(e){let t=e.get("GEOKEYDIRECTORY"),r=t?.values;if(!r||"number"!=typeof r[0]||r.length<4)return;let n=r,o=n.slice(0,3).join("."),a=n[3];if(n.length<4+4*a)return;let s=new Map;s.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[o]});for(let t=0;t<a;t++){let r=4+4*t,o=n[r],a=n[r+1],u=n[r+2],h=n[r+3],f={id:o,type:a,valueCount:u,valueOffset:h,values:null};if(0===a)f.values=[h];else{let t=e.get((0,l.kq)(a)),r=t?.values;if(null==r&&null!=t?.offlineOffsetSize)return;if(null!=r){let e=h+u;t?.asciiBytes?e<=t.asciiBytes.length&&(f.values=[(0,i.w)(t.asciiBytes.subarray(h,e)).replace(/\|$/,"")]):"string"==typeof r[0]?e<=r[0].length&&(f.values=[r[0].slice(h,e).replace(/\|$/,"")]):e<=r.length&&(f.values=r.slice(h,e))}}let c=(0,l.kq)(o,l.YC);s.set(c,f)}t.data=s}function m(e,t,r,n){return n?u(e,t,r):e.getUint32(t,r)}function g(e,t,r,n=0,i=l.NB,o=4){let a=8===o,s=a?8:2;if(r<0||r+s>e.byteLength)return{success:!1,ifd:null,nextIFD:null,requiredBufferSize:s};let h=a?u(new DataView(e,r,8),0,t):new DataView(e,r,2).getUint16(0,t),f=4+2*o,c=o,p=s+h*f+c;if(r+p>e.byteLength)return{success:!1,ifd:null,nextIFD:null,requiredBufferSize:p};let d=m(new DataView(e,r+p-c,c),0,t,a),g=r+s,y=new Map;for(let r=0;r<h;r++){let a=new DataView(e,g+f*r,f),s=a.getUint16(0,t),u=a.getUint16(2,t),h=(0,l.kq)(s,i),c=[],p=0,d=0;4===o?(p=a.getUint32(4,t),d=a.getUint32(8,t)):8===o&&(p=m(a,4,t,!0),d=m(a,12,t,!0),c.push(a.getUint32(12,t)),c.push(a.getUint32(16,t)));let x={id:s,type:u,valueCount:p,valueOffset:d,valueOffsets:c,values:null};w(e,t,x,n,!1,o),y.set(h,x)}return{success:!0,ifd:y,nextIFD:d,requiredBufferSize:p}}function y(e,t,r,n){let{type:i,valueCount:l}=t,a=o[i];if(null==a||a<=0)return[];let u=l*a,h=u/a,f=new DataView(e,r,u),c=[],p=s.get(i);if(!p)return[];for(let e=0,t=0;e<h;e++,t+=a)c.push(p(f,t,n));return c}function x(e,t,r=4){let{type:n,valueCount:i,valueOffsets:l}=e,s=o[n];if(null==s||s<=0)return[];let u=8*s,h=i*u,{valueOffset:f}=e,c=8===r?64:32;if(!t)if(c<=32)f>>>=32-h;else{let e=l?.length?l[0]:f>>>0,t=l?.length?l[1]:Math.round((f-e)/a);h<=32?(f=e>>>32-h,l[0]=f):(f=e*2**(32-h)+(t>>>32-h),l[0]=e,l[1]=t>>>32-h)}if(1===i&&u===c)return[f];let p=[];if(64===c){let e=l?.length?l[0]:f>>>0,t=l?.length?l[1]:Math.round((f-e)/a),r=e,n=32;for(let e=1;e<=i;e++){let i=32-u*e%32;if(n<u){let e=r<<i>>>32-n,l=t<<32-n>>>32-n;r=t,p.push(e+l*2**(u-n)),n-=32-(u-n)}else p.push(r<<i>>>32-u),n-=u;0===n&&(n=32,r=t)}return p}for(let e=1;e<=i;e++){let t=32-u*e;p.push(f<<t>>>32-u)}return p}function w(e,t,r,n=0,l=!1,a=4){if(r.values)return!0;let{type:s,valueCount:u}=r,h=r.valueOffset,f=o[s];if(null==f||f<=0)return r.values=[],!0;let c,p=u*f;if(u*o[s]*8<=(8===a?64:32))c=x(r,t,a);else{let i=l?e.byteLength:e.byteLength-h+n;if(h-=n,l&&(h=0),h<0||p>i)return r.offlineOffsetSize=[r.valueOffset,p],r.values=null,!1;c=y(e,r,h,t)}if(2===s){let e=c instanceof Uint8Array?c:new Uint8Array(c);34737===r.id&&(r.asciiBytes=e),r.values=[e.length?(0,i.w)(e):""]}else r.values=c;return!0}function C(e){if(!e.has("XMP"))return;let t=e.get("XMP"),r=t.values;r&&"number"==typeof r[0]&&7===t.type&&(t.values=[(0,i.w)(new Uint8Array(r))])}function M(e){let t=p(e,"PHOTOMETRICINTERPRETATION"),r=f(e,"COLORMAP");if(null!=t&&t<=3&&r?.length&&r.length%3==0){let e=[],t=r.length/3;for(let n=0;n<t;n++)e.push([n,r[n]>>>8,r[n+t]>>>8,r[n+2*t]>>>8]);return e}}function b(e){let t,r=f(e,"GEOTIEPOINTS"),n=f(e,"GEOPIXELSCALE"),i=f(e,"GEOTRANSMATRIX"),l=e.get("GEOKEYDIRECTORY")?.data,o=!!l&&2===p(l,"GTRasterTypeGeoKey"),{spatialReference:a,isPseudoGeographic:s}=function(e){let t=c(e,"GEOASCIIPARAMS"),r=null;if(t){let e=t.split("|").find(e=>e.includes("ESRI PE String = ")),n=e?e.replace("ESRI PE String = ",""):"";r=n.startsWith("COMPD_CS")||n.startsWith("PROJCS")||n.startsWith("GEOGCS")?{wkid:null,wkt:n}:null}let n=!1,i=e.get("GEOKEYDIRECTORY")?.data;if(i){let e=p(i,"GTModelTypeGeoKey");if(2===e){let e=p(i,"GeographicTypeGeoKey");e>=1024&&e<=32766&&(r={wkid:e}),!r&&32767===e&&(n=!0,r={wkid:4326})}else if(1===e){let e=p(i,"ProjectedCSTypeGeoKey");e>=1024&&e<=32766&&(r={wkid:e})}}return{spatialReference:r,isPseudoGeographic:n}}(e);n&&r&&r.length>=6?(t=[n[0],0,r[3]-r[0]*n[0],0,-Math.abs(n[1]),r[4]-r[1]*n[1]],o&&(t[2]-=.5*t[0]+.5*t[1],t[5]-=.5*t[3]+.5*t[4])):16===i?.length&&(t=o?[i[0],i[1],i[3]-.5*i[0],i[4],i[5],i[7]-.5*i[5]]:[i[0],i[1],i[3],i[4],i[5],i[7]]);let u,d=p(e,"IMAGEWIDTH"),m=p(e,"IMAGELENGTH");if(t){let e,r=[{x:0,y:m},{x:0,y:0},{x:d,y:m},{x:d,y:0}],n=1/0,i=1/0,l=-1/0,o=-1/0;for(let a=0;a<r.length;a++)e=h(r[a],t),n=e.x>n?n:e.x,l=e.x<l?l:e.x,i=e.y>i?i:e.y,o=e.y<o?o:e.y;u={xmin:n,xmax:l,ymin:i,ymax:o,spatialReference:a}}else u={xmin:-.5,ymin:.5-m,xmax:d-.5,ymax:.5,spatialReference:a};return s&&(u.xmax-u.xmin>400||Math.max(Math.abs(u.xmin),Math.abs(u.xmax))>361)&&(u.spatialReference=null),{extent:u,isPseudoGeographic:s,affine:n?void 0:t}}function A(e){let{width:t,height:r,tileHeight:n,tileWidth:i}=e,l=e.planes,o=i?i*n:t*r,a=p(e.ifds[0],"BITSPERSAMPLE"),s="";return o*l>2**30/(a>8?a/8:1)&&(s=i?"tiled tiff exceeding 1 gigabits per tile is not supported":"scanline tiff exceeding 1 gigabits is not supported"),s}function v(e,t){let r=p(e,"PLANARCONFIGURATION");return null==r?!!t&&t.isBSQ:2===r}function k(e){return p(e,"COMPRESSION")??1}function T(e){let t,r=k(e),n=!1;switch(r){case 1:t="NONE",n=!0;break;case 2:case 3:case 4:case 32771:t="CCITT";break;case 5:t="LZW",n=!0;break;case 6:case 7:t="JPEG",n=!0;break;case 32773:t="PACKBITS";break;case 8:case 32946:t="DEFLATE",n=!0;break;case 34712:t="JPEG2000";break;case 34887:t="LERC",n=!0;break;default:t=String(r)}return{compression:t,supported:n}}function S(e){let t=e[0],r=p(t,"TILEWIDTH"),n=p(t,"TILELENGTH"),i=p(t,"IMAGEWIDTH"),l=p(t,"IMAGELENGTH"),o=p(t,"BITSPERSAMPLE"),a=p(t,"SAMPLESPERPIXEL"),s=p(t,"SAMPLEFORMAT")??1,u=function(e,t){let r="unknown";return 3===e?r=64===t?"f64":"f32":1===e?1===t?r="u1":2===t?r="u2":4===t?r="u4":t<=8?r="u8":t<=16?r="u16":t<=32&&(r="u32"):2===e&&(t<=8?r="s8":t<=16?r="s16":t<=32&&(r="s32")),r}(s,o),h=v(t),f=function(e){return e.get("GDAL_NODATA")?.values}(t),d=null;f?.length&&(d=f.map(e=>parseFloat(e)),d.some(e=>isNaN(e))&&(d=null));let m=!0,g="",{compression:y,supported:x}=T(t);x||(m=!1,g+="unsupported tag compression "+y),s>3&&(m=!1,g+="unsupported tag sampleFormat "+s),o>32&&64!==o&&(m=!1,g+="unsupported tag bitsPerSample "+o);let w,C,k,S,E,{extent:R,isPseudoGeographic:L,affine:U}=b(t),O=I(e);if(O.length>0){k=Math.round(Math.log(i/p(O[0],"IMAGEWIDTH"))/Math.LN2);let e=O[O.length-1];S=O.length,w=p(e,"TILEWIDTH"),C=p(e,"TILELENGTH")}w=null!=S&&S>0?w||r:null,C=null!=S&&S>0?C||n:null,r&&(E=[{maxCol:Math.ceil(i/r)-1,maxRow:Math.ceil(l/n)-1,minRow:0,minCol:0}],O.forEach(e=>{E.push({maxCol:Math.ceil(p(e,"IMAGEWIDTH")/p(e,"TILEWIDTH"))-1,maxRow:Math.ceil(p(e,"IMAGELENGTH")/p(e,"TILELENGTH"))-1,minRow:0,minCol:0})}));let D=function(e){if(!e)return null;let t=e.match(/<Item(.*?)Item>/gi);if(!t||0===t.length)return null;let r=new Map;for(let e=0;e<t.length;e++){let n=t[e],i=n.indexOf("sample="),l=i>-1?n.slice(i+8,n.indexOf('"',i+8)):null;i=n.indexOf("name=");let o=i>-1?n.slice(i+6,n.indexOf('"',i+6)):n.slice(6,n.indexOf(">"));if(o){let e=n.slice(n.indexOf(">")+1,n.indexOf("</Item>")).trim();null==l?r.set(o,e):r.has(o)?r.get(o)[l]=e:r.set(o,[e])}}let n=r.get("STATISTICS_MINIMUM"),i=r.get("STATISTICS_MAXIMUM"),l=r.get("STATISTICS_MEAN"),o=r.get("STATISTICS_STDDEV"),a=r.get("STATISTICS_COUNT"),s=r.get("STATISTICS_MEDIAN"),u=r.get("STATISTICS_COVARIANCES"),h=null;if(n&&i){h=[];for(let e=0;e<n.length;e++){let t={min:parseFloat(n[e]),max:parseFloat(i[e]),avg:l&&parseFloat(l[e]),stddev:o&&parseFloat(o[e])};a&&(t.count=parseFloat(a[e])),s&&(t.median=parseFloat(s[e])),u&&(t.covariances=u[e].split(",").map(e=>parseFloat(e))),h.push(t)}}let f=r.get("BandName"),c=r.get("WavelengthMin"),p=r.get("WavelengthMax"),d=null;if(f){d=[];for(let e=0;e<f.length;e++)d.push({BandName:f[e],WavelengthMin:c&&parseFloat(c[e]),WavelengthMax:p&&parseFloat(p[e])})}return{statistics:h,bandProperties:d,dataType:r.get("DataType"),rawMetadata:r}}(c(e[0],"GDAL_METADATA"));g+=" "+A({width:i,height:l,tileWidth:r,tileHeight:n,planes:a,ifds:e});let G=P(e).length===O.length+1,B=O?.length?O.map(e=>({x:i/p(e,"IMAGEWIDTH"),y:l/p(e,"IMAGELENGTH")})):void 0,N=M(t);return{width:i,height:l,tileWidth:r,tileHeight:n,planes:a,isBSQ:h,pixelType:u,compression:y,noData:d,hasMaskBand:G,isSupported:m,pyramidResolutions:B,message:g,extent:R,isPseudoGeographic:L,affine:U,firstPyramidLevel:k,maximumPyramidLevel:S,pyramidBlockWidth:w,pyramidBlockHeight:C,tileBoundary:E,metadata:D,colormap:N}}function I(e){return e.filter(e=>1===p(e,"NEWSUBFILETYPE"))}function P(e){return e.filter(e=>{let t=!(4&~(p(e,"NEWSUBFILETYPE")??0)),r=4===p(e,"PHOTOMETRICINTERPRETATION");return t&&r})}function E(e,t,r,n=0,i=l.NB,o=4){let a,s=g(e,t,r,n,i,o),u=s.ifd;return u&&(l.RR.forEach((r,i)=>{u.has(i)&&(a=u.get(i),a.data=g(e,t,a.valueOffset-n,n,r).ifd)}),d(u),C(u)),s}function R(e){let t=new DataView(e,0,16),r=t.getUint16(0,!1),i=null;if(18761===r)i=!0;else{if(19789!==r)throw new n.A("tiff-reader:parse-signature","unexpected endianness byte");i=!1}let l=t.getUint16(2,i);if(42!==l&&43!==l)throw new n.A("tiff-reader:parse-signature","unexpected tiff identifier");let o=4,a=43===l;if(a){let e=t.getUint16(o,i);if(o+=2,8!==e||0!==t.getUint16(o,i))throw new n.A("tiff-reader:parse-signature","unsupported bigtiff version");o+=2}return{littleEndian:i,isBigTiff:a,firstIFDPos:m(t,o,i,a)}}function L(e){let{littleEndian:t,isBigTiff:r,firstIFDPos:n}=R(e),i=n,o=[];do{let n=E(e,t,i,0,l.NB,r?8:4);if(!n.success)break;o.push(n.ifd),i=n.nextIFD}while(i>0);return{...S(o),littleEndian:t,isBigTiff:r,ifds:o,pyramidIFDs:I(o),maskIFDs:P(o)}}},94213(e,t,r){const n=(()=>{let e=[];return e[254]="NEWSUBFILETYPE",e[255]="SUBFILETYPE",e[256]="IMAGEWIDTH",e[257]="IMAGELENGTH",e[258]="BITSPERSAMPLE",e[259]="COMPRESSION",e[262]="PHOTOMETRICINTERPRETATION",e[263]="THRESHHOLDING",e[264]="CELLWIDTH",e[265]="CELLLENGTH",e[266]="FILLORDER",e[269]="DOCUMENTNAME",e[270]="IMAGEDESCRIPTION",e[271]="MAKE",e[272]="MODEL",e[273]="STRIPOFFSETS",e[274]="ORIENTATION",e[277]="SAMPLESPERPIXEL",e[278]="ROWSPERSTRIP",e[279]="STRIPBYTECOUNTS",e[280]="MINSAMPLEVALUE",e[281]="MAXSAMPLEVALUE",e[282]="XRESOLUTION",e[283]="YRESOLUTION",e[284]="PLANARCONFIGURATION",e[285]="PAGENAME",e[286]="XPOSITION",e[287]="YPOSITION",e[288]="FREEOFFSETS",e[289]="FREEBYTECOUNTS",e[290]="GRAYRESPONSEUNIT",e[291]="GRAYRESPONSECURVE",e[292]="T4OPTIONS",e[293]="T6OPTIONS",e[296]="RESOLUTIONUNIT",e[297]="PAGENUMBER",e[300]="COLORRESPONSEUNIT",e[301]="TRANSFERFUNCTION",e[305]="SOFTWARE",e[306]="DATETIME",e[315]="ARTIST",e[316]="HOSTCOMPUTER",e[317]="PREDICTOR",e[318]="WHITEPOINT",e[319]="PRIMARYCHROMATICITIES",e[320]="COLORMAP",e[321]="HALFTONEHINTS",e[322]="TILEWIDTH",e[323]="TILELENGTH",e[324]="TILEOFFSETS",e[325]="TILEBYTECOUNTS",e[326]="BADFAXLINES",e[327]="CLEANFAXDATA",e[328]="CONSECUTIVEBADFAXLINES",e[330]="SUBIFD",e[332]="INKSET",e[333]="INKNAMES",e[334]="NUMBEROFINKS",e[336]="DOTRANGE",e[337]="TARGETPRINTER",e[338]="EXTRASAMPLES",e[339]="SAMPLEFORMAT",e[340]="SMINSAMPLEVALUE",e[341]="SMAXSAMPLEVALUE",e[342]="TRANSFERRANGE",e[347]="JPEGTABLES",e[512]="JPEGPROC",e[513]="JPEGIFOFFSET",e[514]="JPEGIFBYTECOUNT",e[515]="JPEGRESTARTINTERVAL",e[517]="JPEGLOSSLESSPREDICTORS",e[518]="JPEGPOINTTRANSFORM",e[519]="JPEGQTABLES",e[520]="JPEGDCTABLES",e[521]="JPEGACTABLES",e[529]="YCBCRCOEFFICIENTS",e[530]="YCBCRSUBSAMPLING",e[531]="YCBCRPOSITIONING",e[532]="REFERENCEBLACKWHITE",e[700]="XMP",e[33550]="GEOPIXELSCALE",e[33922]="GEOTIEPOINTS",e[33432]="COPYRIGHT",e[42112]="GDAL_METADATA",e[42113]="GDAL_NODATA",e[50844]="RPCCOEFFICIENT",e[34264]="GEOTRANSMATRIX",e[34735]="GEOKEYDIRECTORY",e[34736]="GEODOUBLEPARAMS",e[34737]="GEOASCIIPARAMS",e[34665]="EXIFIFD",e[34853]="GPSIFD",e[40965]="INTEROPERABILITYIFD",e})(),i=(()=>{let e=n.slice();return e[36864]="ExifVersion",e[40960]="FlashpixVersion",e[40961]="ColorSpace",e[42240]="Gamma",e[37121]="ComponentsConfiguration",e[37122]="CompressedBitsPerPixel",e[40962]="PixelXDimension",e[40963]="PixelYDimension",e[37500]="MakerNote",e[37510]="UserComment",e[40964]="RelatedSoundFile",e[36867]="DateTimeOriginal",e[36868]="DateTimeDigitized",e[36880]="OffsetTime",e[36881]="OffsetTimeOriginal",e[36882]="OffsetTimeDigitized",e[37520]="SubSecTime",e[37521]="SubSecTimeOriginal",e[37522]="SubSecTimeDigitized",e[37888]="Temperature",e[37889]="Humidity",e[37890]="Pressure",e[37891]="WaterDepth",e[37892]="Acceleration",e[37893]="CameraElevationAngle",e[42016]="ImageUniqueID",e[42032]="CameraOwnerName",e[42033]="BodySerialNumber",e[42034]="LensSpecification",e[42035]="LensMake",e[42036]="LensModel",e[42037]="LensSerialNumber",e[33434]="ExposureTime",e[33437]="FNumber",e[34850]="ExposureProgram",e[34852]="SpectralSensitivity",e[34855]="PhotographicSensitivity",e[34856]="OECF",e[34864]="SensitivityType",e[34865]="StandardOutputSensitivity",e[34866]="RecommendedExposureIndex",e[34867]="ISOSpeed",e[34868]="ISOSpeedLatitudeyyy",e[34869]="ISOSpeedLatitudezzz",e[37377]="ShutterSpeedValue",e[37378]="ApertureValue",e[37379]="BrightnessValue",e[37380]="ExposureBiasValue",e[37381]="MaxApertureValue",e[37382]="SubjectDistance",e[37383]="MeteringMode",e[37384]="LightSource",e[37385]="Flash",e[37386]="FocalLength",e[37396]="SubjectArea",e[41483]="FlashEnergy",e[41484]="SpatialFrequencyResponse",e[41486]="FocalPlaneXResolution",e[41487]="FocalPlaneYResolution",e[41488]="FocalPlaneResolutionUnit",e[41492]="SubjectLocation",e[41493]="ExposureIndex",e[41495]="SensingMethod",e[41728]="FileSource",e[41729]="SceneType",e[41730]="CFAPattern",e[41985]="CustomRendered",e[41986]="ExposureMode",e[41987]="WhiteBalance",e[41988]="DigitalZoomRatio",e[41989]="FocalLengthIn35mmFilm",e[41990]="SceneCaptureType",e[41991]="GainControl",e[41992]="Contrast",e[41993]="Saturation",e[41994]="Sharpness",e[41995]="DeviceSettingDescription",e[41996]="SubjectDistanceRange",e})(),l="GPSVersionID.GPSLatitudeRef.GPSLatitude.GPSLongitudeRef.GPSLongitude.GPSAltitudeRef.GPSAltitude.GPSTimeStamp.GPSSatellites.GPSStatus.GPSMeasureMode.GPSDOP.GPSSpeedRef.GPSSpeed.GPSTrackRef.GPSTrack.GPSImgDirectionRef.GPSImgDirection.GPSMapDatum.GPSDestLatitudeRef.GPSDestLatitude.GPSDestLongitudeRef.GPSDestLongitude.GPSDestBearingRef.GPSDestBearing.GPSDestDistanceRef.GPSDestDistance.GPSProcessingMethod.GPSAreaInformation.GPSDateStamp.GPSDifferential.GPSHPositioningError".split("."),o=(()=>{let e=[];return e[1024]="GTModelTypeGeoKey",e[1025]="GTRasterTypeGeoKey",e[1026]="GTCitationGeoKey",e[2048]="GeographicTypeGeoKey",e[2049]="GeogCitationGeoKey",e[2050]="GeogGeodeticDatumGeoKey",e[2051]="GeogPrimeMeridianGeoKey",e[2052]="GeogLinearUnitsGeoKey",e[2053]="GeogLinearUnitSizeGeoKey",e[2054]="GeogAngularUnitsGeoKey",e[2055]="GeogAngularUnitSizeGeoKey",e[2056]="GeogEllipsoidGeoKey",e[2057]="GeogSemiMajorAxisGeoKey",e[2058]="GeogSemiMinorAxisGeoKey",e[2059]="GeogInvFlatteningGeoKey",e[2061]="GeogPrimeMeridianLongGeoKey",e[2060]="GeogAzimuthUnitsGeoKey",e[3072]="ProjectedCSTypeGeoKey",e[3073]="PCSCitationGeoKey",e[3074]="ProjectionGeoKey",e[3075]="ProjCoordTransGeoKey",e[3076]="ProjLinearUnitsGeoKey",e[3077]="ProjLinearUnitSizeGeoKey",e[3078]="ProjStdParallel1GeoKey",e[3079]="ProjStdParallel2GeoKey",e[3080]="ProjNatOriginLongGeoKey",e[3081]="ProjNatOriginLatGeoKey",e[3082]="ProjFalseEastingGeoKey",e[3083]="ProjFalseNorthingGeoKey",e[3084]="ProjFalseOriginLongGeoKey",e[3085]="ProjFalseOriginLatGeoKey",e[3086]="ProjFalseOriginEastingGeoKey",e[3087]="ProjFalseOriginNorthingGeoKey",e[3088]="ProjCenterLongGeoKey",e[3090]="ProjCenterEastingGeoKey",e[3091]="ProjCenterNorthingGeoKey",e[3092]="ProjScaleAtNatOriginGeoKey",e[3093]="ProjScaleAtCenterGeoKey",e[3094]="ProjAzimuthAngleGeoKey",e[3095]="ProjStraightVertPoleLongGeoKey",e[4096]="VerticalCSTypeGeoKey",e[4097]="VerticalCitationGeoKey",e[4098]="VerticalDatumGeoKey",e[4099]="VerticalUnitsGeoKey",e})(),a=new Map([["EXIFIFD",i],["GPSIFD",l]]);r.d(t,["NB",0,n,"RR",0,a,"YC",0,o,"kq",0,(e,t)=>{let r=(t||n)[e];return void 0===r&&(r="unknown"+String(e)),r}])},10713(e,t,r){const n=(()=>{let e=new ArrayBuffer(4),t=new Uint8Array(e);return new Uint32Array(e)[0]=1,1===t[0]})();r.d(t,["Z",0,n])},34930(e,t,r){r.d(t,{$Q:()=>s,Sd:()=>f,T5:()=>a,b7:()=>c});var n=r(86211),i=r(5443),l=r(86738),o=r(14140);function a(e,t){if(e.spatialReference.equals(t))return e;let r=(0,n.GA)(e.spatialReference),i=(0,n.GA)(t);if(r===i)return e;let l=r/i;return{x:e.x*l,y:e.y*l}}async function s(e,t,n,i){if("extent"===n.type)return function(e,t,r){let{width:n,height:i}=e,l=new Uint8Array(n*i),a=t.width/n,s=t.height/i;if(r.width/a<.5||r.height/s<.5)return new o.A({pixelType:e.pixelType,width:n,height:i,mask:l,pixels:[...e.pixels]});let{xmin:u,xmax:h,ymin:f,ymax:c}=t,{xmin:p,xmax:d,ymin:m,ymax:g}=r,y=Math.max(u,p),x=Math.min(h,d),w=Math.max(f,m),C=Math.min(c,g),M=.5*a,b=.5*s;if(x-y<M||C-w<b||x<u+M||y>h-M||w>c-b||C<f+b)return new o.A({pixelType:e.pixelType,width:n,height:i,mask:l,pixels:[...e.pixels]});let A=Math.max(0,(y-u)/a),v=Math.min(n,Math.max(0,(x-u)/a)),k=Math.max(0,(c-C)/s),T=Math.min(i,Math.max(0,(c-w)/s)),S=Math.round(A),I=Math.round(v)-1,P=Math.round(k),E=Math.round(T)-1;if(S===I&&A%1>.5&&v%1<.5||P===E&&k%1>.5&&T%1<.5)return new o.A({pixelType:e.pixelType,width:n,height:i,mask:l,pixels:[...e.pixels]});if(0===S&&0===P&&I===n&&E===i)return e;let R=e.mask;for(let e=P;e<=E;e++)for(let t=S;t<=I;t++){let r=e*n+t;l[r]=R?R[r]:255}return new o.A({pixelType:e.pixelType,width:n,height:i,mask:l,pixels:[...e.pixels]})}(e,t,n);let{width:l,height:a}=e,s=new Uint8Array(l*a),{intersectsExecute:u}=await Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1132)]).then(()=>r(25275));if(!u(t,n))return new o.A({pixelType:e.pixelType,width:l,height:a,mask:s,maskIsAlpha:!1,pixels:[...e.pixels]});if("polyline"===n.type)return i?.thinPolyline?h(e,t,n):function(e,t,r){let{width:n,height:i}=e,l=new Uint8Array(n*i),a=t.width/n,s=t.height/i,{xmin:u,ymax:h}=t,{paths:f}=r,c=e.mask;for(let e=0;e<f.length;e++){let t=f[e];for(let e=0;e<t.length-1;e++){let[r,o]=t[e],[f,p]=t[e+1],d=Math.min(o,p),m=Math.max(o,p),g=Math.max(0,Math.floor((h-m)/s)),y=Math.min(i-1,Math.floor((h-d)/s));if(!(y<g))if(o===p){let e=Math.min(r,f),t=Math.max(r,f),i=Math.max(0,Math.floor((e-u)/a)),o=Math.min(n-1,Math.floor((t-u)/a));if(o<i)continue;let s=g*n;for(let e=s+i;e<=s+o;e++)l[e]=c?c[e]:255}else{let e=(r-u)/a,t=(f-r)/(p-o)/a;for(let r=g;r<=y;r++){let i=t*(Math.min(m,h-r*s)-o)+e,a=t*(Math.max(d,h-(r+1)*s)-o)+e,u=Math.max(0,Math.floor(Math.min(i,a))),f=Math.min(n-1,Math.floor(Math.max(i,a)));if(f<u)continue;let p=r*n;for(let e=p+u;e<=p+f;e++)l[e]=c?c[e]:255}}}}return new o.A({pixelType:e.pixelType,width:n,height:i,mask:l,maskIsAlpha:e.maskIsAlpha,pixels:[...e.pixels]})}(e,t,n);let{containsExecute:f}=await Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(6671)]).then(()=>r(30912));return f(n,t)?e:function(e,t,r){if(!e)return e;let{width:n,height:i}=e,l=function(e){let t,{geometry:r,size:n,srcExtent:i,srcMask:l}=e,[o,a]=n,s=i.width/o,u=i.height/a,{xmin:h,ymax:f}=i;if("extent"===r.type){let e=(r.xmin-h)/s,n=(r.xmax-h)/s,i=(f-r.ymax)/u,l=(f-r.ymin)/u;t=[[[e,i],[e,l],[n,l],[n,i],[e,i]]]}else t=r.rings.map(e=>e.map(([e,t])=>[(e-h)/s,(f-t)/u]));return function(e,t,r){let[n,i]=t,l=new OffscreenCanvas(n,i).getContext("2d");l.fillStyle="#f00",l.beginPath(),e.forEach(e=>{l.moveTo(e[0][0],e[0][1]);for(let t=0;t<e.length;t++)l.lineTo(e[t][0],e[t][1]);l.closePath()}),l.fill();let o=l.getImageData(0,0,n,i).data,a=n*i,s=new Uint8Array(a),u=!1;for(let e=0;e<a;e++)(!r||r[e])&&(o[4*e+3]>127?s[e]=255:u=!0);return u||r?s:void 0}(t,n,l)}({geometry:r,size:[n,i],srcExtent:t,srcMask:e.mask});return new o.A({pixelType:e.pixelType,width:n,height:i,mask:l,maskIsAlpha:!1,pixels:[...e.pixels]})}(e,t,n)}function u(e){let{size:t,start:r,end:n,outMask:i,srcMask:l}=e,[o,a]=t,[s,u]=r,[h,f]=n;if(Math.max(s,h)<=0||Math.min(s,h)>=o||Math.max(u,f)<=0||Math.min(u,f)>=a)return;let c=Math.abs(h-s),p=Math.abs(f-u);if(0===c&&0===p){let e=Math.floor(s),t=Math.floor(u)*o+e;return void(i[t]=l?l[t]:255)}let d=p>c;d&&([s,u]=[u,s],[h,f]=[f,h],[c,p]=[p,c],[o,a]=[a,o]),s>h&&([s,h]=[h,s],[u,f]=[f,u]);let m=Math.max(0,Math.floor(s)),g=Math.min(o-1,Math.floor(h)),y=u<=f?1:-1,x=Math.floor(Math.min(u,f)),w=Math.floor(Math.max(u,f)),C=p/c,M=u+(m+.5-s)*y*C,b=y>0?Math.floor(M):Math.ceil(M)-1,A=y>0?M-b:b+1-M;for(let e=m;e<=g;e++){let t=Math.max(x,Math.min(w,b));if(t>=0&&t<a){let r=d?e*a+t:t*o+e;i[r]=l?l[r]:255}A+=C,A>=1&&(b+=y,--A)}}function h(e,t,r){let{width:n,height:i,mask:l}=e,a=new Uint8Array(n*i),s=t.width/n,h=t.height/i,{xmin:f,ymax:c}=t,p=[n,i];for(let e of r.paths)for(let t=0;t<e.length-1;t++){let[r,n]=e[t],[i,o]=e[t+1];u({size:p,start:[(r-f)/s,(c-n)/h],end:[(i-f)/s,(c-o)/h],srcMask:l,outMask:a})}return new o.A({pixelType:e.pixelType,width:n,height:i,mask:a,maskIsAlpha:e.maskIsAlpha,pixels:[...e.pixels]})}function f(e,t){let{extent:r}=c(e,t,new l.A({x:e.pixelSize.x,y:e.pixelSize.y,spatialReference:e.spatialReference})),{extent:n}=e.extent;if(r.xmax=Math.min(r.xmax,n.xmax),r.ymax=Math.min(r.ymax,n.ymax),r.xmin<r.xmax&&r.ymin<r.ymax){let{x:t,y:n}=e.pixelSize,i=Math.round(r.width/t),l=Math.round(r.height/n);e.extent=r,e.width=i,e.height=l}}function c(e,t,r,n=!0){let l,o,s,{spatialReference:u}=e,{x:h,y:f}=a(r,u),{xmin:c,xmax:p,ymax:d,ymin:m}="extent"===t.type?t:t.extent,{xmin:g,ymax:y}=e.extent;return n?(c=g+(c>g?h*Math.round((c-g)/h):0),d=y-(d<y?f*Math.round((y-d)/f):0),p=g+(p>g?h*Math.round((p-g)/h):0),m=y-(m<y?f*Math.round((y-m)/f):0),l=new i.A({xmin:c,ymax:d,xmax:p,ymin:m,spatialReference:u}),o=Math.round(l.width/h),s=Math.round(l.height/f)):(o=Math.floor((p-c)/h+.8),s=Math.floor((d-m)/f+.8),c=g+(c>g?h*Math.floor((c-g)/h+.1):0),d=y-(d<y?f*Math.floor((y-d)/f+.1):0),p=c+o*h,m=d-s*f,l=new i.A({xmin:c,ymax:d,xmax:p,ymin:m,spatialReference:u})),{extent:l,width:o,height:s}}},47520(e,t,r){r.d(t,{$Q:()=>U,$i:()=>F,AB:()=>a,Ew:()=>x,Hx:()=>g,J$:()=>G,L:()=>z,LY:()=>k,QF:()=>N,UK:()=>c,Wt:()=>v,Wy:()=>s,XU:()=>A,YD:()=>M,_F:()=>m,bL:()=>y,dK:()=>b,eH:()=>f,lD:()=>D,qL:()=>h,z$:()=>I,z7:()=>S,zg:()=>u});var n=r(34727),i=r(94778),l=r(14140);const o="PixelID";function a(e){return null!=e&&e.pixels?.length>0}function s(e){if(!e?.length||e.some(e=>!a(e)))return null;if(1===e.length)return e[0]?.clone()??null;let t=e,{width:r,height:n,pixelType:i}=t[0];if(t.some(e=>e.width!==r||e.height!==n))return null;let o=t.map(({mask:e})=>e).filter(e=>null!=e),s=null;o.length&&(s=new Uint8Array(r*n),s.set(o[0]),o.length>1&&M(o.slice(1),s));let u=[];t.forEach(({pixels:e})=>u.push(...e));let h=null!=s&&u.length===t.length?t.map(({width:e,height:t,mask:r})=>r??new Uint8Array(e*t).fill(255)):null,f=t.map(({statistics:e})=>e).filter(e=>e?.length),c=[];return f.forEach(e=>c.push(...e)),new l.A({pixelType:i,width:r,height:n,mask:s,bandMasks:h,pixels:u,statistics:c.length?c:null})}function u(e){if(!e)return;let t=e.colormap;if(!t||0===t.length)return;let r=t.sort((e,t)=>e[0]-t[0]),n=r[0][0]<0?r[0][0]:0,i=Math.max(256,r[r.length-1][0]-n+1),l=new Uint8Array(4*i),o=[],a=5===r[0].length;if(i>65536)return r.forEach(e=>{o[e[0]-n]=a?e.slice(1):e.slice(1).concat([255])}),{indexed2DColormap:o,offset:n,alphaSpecified:a};if(e.fillUnspecified){let e=r[0];for(let t=e[0]-n,o=0;t<i;t++)l[4*t]=e[1],l[4*t+1]=e[2],l[4*t+2]=e[3],l[4*t+3]=a?e[4]:255,t===e[0]-n&&(e=o===r.length-1?e:r[++o])}else for(let e=0;e<r.length;e++){let t=r[e],i=4*(t[0]-n);l[i]=t[1],l[i+1]=t[2],l[i+2]=t[3],l[i+3]=a?t[4]:255}return{indexedColormap:l,offset:n,alphaSpecified:a}}function h(e,t){if(!a(e)||!t||!t.indexedColormap&&!t.indexed2DColormap)return e;let r=e.clone(),n=r.pixels,i=r.mask,l=r.width*r.height;if(1!==n.length)return e;let o,{indexedColormap:s,indexed2DColormap:u,offset:h,alphaSpecified:f}=t,c=n[0],p=new Uint8Array(c.length),d=new Uint8Array(c.length),m=new Uint8Array(c.length),g=0;if(s){let e=s.length-1;if(null!=i)for(let t=0;t<l;t++)i[t]&&(g=4*(c[t]-h),g<h||g>e?i[t]=0:(p[t]=s[g],d[t]=s[g+1],m[t]=s[g+2],i[t]=s[g+3]));else{i=new Uint8Array(l);for(let t=0;t<l;t++)g=4*(c[t]-h),g<h||g>e?i[t]=0:(p[t]=s[g],d[t]=s[g+1],m[t]=s[g+2],i[t]=s[g+3]);r.mask=i}}else if(u)if(null!=i)for(let e=0;e<l;e++)i[e]&&(o=u[c[e]],p[e]=o[0],d[e]=o[1],m[e]=o[2],i[e]=o[3]);else{i=new Uint8Array(l);for(let e=0;e<l;e++)o=u[c[e]],p[e]=o[0],d[e]=o[1],m[e]=o[2],i[e]=o[3];r.mask=i}return r.pixels=[p,d,m],r.statistics=null,r.pixelType="u8",r.maskIsAlpha=f,r}function f(e,t){if(!a(e))return null;let{pixels:r,mask:n}=e,i=r.length,o=t.lut,{offset:s}=t;o&&1===o[0].length&&(o=r.map(()=>o));let u=[],h=t.outputPixelType||"u8";for(let e=0;e<i;e++){let t=c(r[e],n,o[e],s||0,h);u.push(t)}let f=new l.A({width:e.width,height:e.height,pixels:u,mask:n,pixelType:h});return f.updateStatistics(),f}function c(e,t,r,n,i){let o=e.length,a=l.A.createEmptyBand(i,o);if(t)for(let i=0;i<o;i++)t[i]&&(a[i]=r[e[i]-n]);else for(let t=0;t<o;t++)a[t]=r[e[t]-n];return a}function p(e,t,r,n){let{width:i,height:l,pixels:o,mask:a}=e,s=i*l,{bandId:u,ranges:h}=r,f=o[u];if(!f)return;let c=1===h.length,[p,d]=h[0];for(let e=0;e<s;e++)if(!a||a[e]){let r=f[e];if(c)r>=p&&r<=d&&(t[e]=n);else for(let i=0;i<h.length;i++){let[l,o]=h[i];if(r>=l&&r<=o){t[e]=n;break}}}}function d(e,t,r,n){let{width:i,height:l,xyMask:o,xBandId:a,yBandId:s,xBandRange:u,yBandRange:h}=r,{pixels:f,mask:c}=e,p=f[a],d=f[s],[m,g]=u,[y,x]=h,w=(g-m)/i,C=(x-y)/l;for(let e=0;e<p.length;e++)if(!c||c[e]){let r=p[e],a=d[e];if(r<m||r>g||a<y||a>x)continue;o?(r=(r-m)*w,r=r>i-1?i-1:r<0?0:255&r,a=(x-a)*C,a=a>l-1?l-1:a<0?0:255&a,o[a*i+r]&&(t[e]=n)):t[e]=n}}function m(e){let{pixelBlock:t,renderedPixelBlock:r,highlightOptions:n}=e;if(!a(t))return;let{width:i,height:l}=t,o=i*l,s=new Uint8Array(o);for(let e=1;e<=n.length;e++){let r=n[e-1];"bandId"in r?p(t,s,r,e):d(t,s,r,e)}let{pixels:u}=r;1===u.length&&(u[1]=u[0].slice(),u[2]=u[0].slice());let h=n.map(e=>e.color),[f,c,m]=u;if(r.mask){let e=r.mask;for(let t=0;t<o;t++)if(e[t]){e[t]=255;let r=s[t];if(r){let n=h[r-1];f[t]=n[0],c[t]=n[1],m[t]=n[2],e[t]=n[3]}}}else{let e=new Uint8Array(o).fill(255);for(let t=0;t<o;t++){let r=s[t];if(r){let n=h[r-1];f[t]=n[0],c[t]=n[1],m[t]=n[2],e[t]=n[3]}}r.mask=e}r.maskIsAlpha=!0}function g(e,t){if(!a(e))return null;let r=e.clone(),{pixels:n}=r,i=r.width*r.height,l=t.length,o=Math.floor(l/2),s=t[Math.floor(o)],u=n[0],h=new Uint8Array(i),f=new Uint8Array(i),c=new Uint8Array(i),p=r.mask,d=4===t[0].mappedColor.length;p||(p=new Uint8Array(i),p.fill(d?255:1),r.mask=p);for(let e=0;e<i;e++)if(p[e]){let r=u[e],n=!1,i=o,a=s,d=0,m=l-1;for(;m-d>1;){if(r===a.value){n=!0;break}r>a.value?d=i:m=i,i=Math.floor((d+m)/2),a=t[Math.floor(i)]}n||(r===t[d].value?(a=t[d],n=!0):r===t[m].value?(a=t[m],n=!0):r<t[d].value?n=!1:r>t[d].value&&(r<t[m].value?(a=t[d],n=!0):m===l-1?n=!1:(a=t[m],n=!0))),n?(h[e]=a.mappedColor[0],f[e]=a.mappedColor[1],c[e]=a.mappedColor[2],p[e]=a.mappedColor[3]):h[e]=f[e]=c[e]=p[e]=0}return r.pixels=[h,f,c],r.mask=p,r.pixelType="u8",r.maskIsAlpha=d,r}function y(e,t,r=!1){let i=1e-5,l=new Float32Array(27),o=t.length;for(let a=0;a<9;a++)l[3*a]=e[2*a]??n.pq-1,l[3*a+1]=e[2*a+1]??n.pq,l[3*a+2]=t[a]??0,a<o&&(a>0&&(l[3*a]-=i),e[2*a+1]!==e[2*a]&&(a<o-1||!r)&&(l[3*a+1]-=i));return l}function x(e,t){if(!a(e))return null;let{width:r,height:n}=e,{inputRanges:o,outputValues:s,outputPixelType:u,noDataRanges:h,allowUnmatched:f,replacementValue:c,isLastInputRangeInclusive:p}=t,d=e.pixels[0],m=l.A.createEmptyBand(u,d.length),g=e.mask,y=new Uint8Array(r*n);g?y.set(g):y.fill(255);let x=e.pixelType.startsWith("f")?1e-6:0,w=o.map(e=>e-x);w[0]=o[0],w[w.length-1]=o[o.length-1]+(p?1e-6:0);let C=o.length/2,[M,b]=(0,i.hP)(u);for(let e=0;e<n;e++)for(let t=0;t<r;t++){let n=e*r+t;if(y[n]){let e=d[n],t=!1;for(let r=C-1;r>=0;r--)if(e===o[2*r]||e>w[2*r]&&e<w[2*r+1]){m[n]=s[r],t=!0;break}t||(f?m[n]=e>b?b:e<M?M:c??e:y[n]=0)}}let A=h?.length;if(A)for(let e=0;e<n;e++)for(let t=0;t<r;t++){let n=e*r+t;if(!g||g[n]){let e=d[n];for(let t=0;t<A;t+=2)if(e>=h[t]&&e<=h[t+1]){m[n]=0,y[n]=0;break}}}return new l.A({width:r,height:n,pixelType:u,pixels:[m],mask:y})}function w(e,t,r,n){let i=null!=r&&r.length>=2?new Set(r):null,l=1===r?.length?r[0]:null,o=!!t?.length;for(let r=0;r<e.length;r++)if(n[r]){let a=e[r];if(o){let e=!1;for(let r=0;r<t.length;r+=2)if(a>=t[r]&&a<=t[r+1]){e=!0;break}e||(n[r]=0)}n[r]&&(a===l||i?.has(a))&&(n[r]=0)}}function C(e,t){let r=e[0].length;t??=new Uint8Array(r).fill(255);for(let n=0;n<r;n++)if(t[n]){let r=!1;for(let t=0;t<e.length;t++)if(e[t][n]){r=!0;break}r||(t[n]=0)}return t}function M(e,t){let r=e[0].length;t??=new Uint8Array(r).fill(255);for(let n=0;n<r;n++)if(t[n]){let r=!1;for(let t=0;t<e.length;t++)if(0===e[t][n]){r=!0;break}r&&(t[n]=0)}return t}function b(e,t){if(!a(e))return null;let{width:r,height:n,pixels:i}=e,o=r*n,s=new Uint8Array(o);e.mask?s.set(e.mask):s.fill(255);let u=i.length,{includedRanges:h,noDataValues:f,outputPixelType:p,matchAll:d,lookups:m}=t;if(m){let e=[];for(let t=0;t<u;t++){let r=m[t],n=c(i[t],s,r.lut,r.offset||0,"u8");e.push(n)}1===e.length?s.set(e[0]):d?C(e,s):M(e,s)}else if(d){let e=[];for(let t=0;t<u;t++){let r=new Uint8Array(o);r.set(s),w(i[t],h?.slice(2*t,2*t+2),f?.[t],r),e.push(r)}1===e.length?s.set(e[0]):C(e,s)}else for(let e=0;e<u;e++)w(i[e],h?.slice(2*e,2*e+2),f?.[e],s);return new l.A({width:r,height:n,pixelType:p,pixels:i,mask:s})}function A(e){let{srcPixelType:t,inputRanges:r,outputValues:n,allowUnmatched:o,noDataRanges:a,isLastInputRangeInclusive:s,outputPixelType:u}=e;if("u8"!==t&&"s8"!==t&&"u16"!==t&&"s16"!==t)return null;let h=t.includes("16")?65536:256,f=t.includes("s")?-h/2:0,c=l.A.createEmptyBand(u,h),p=new Uint8Array(h);o&&p.fill(255);let[d,m]=(0,i.hP)(u);if(r?.length&&n?.length){let e=r.map(e=>e-1e-6);e[0]=r[0],s&&(e[e.length-1]=r[r.length-1]);for(let t=0;t<e.length;t++){let i=n[t]>m?m:n[t]<d?d:n[t],l=Math.ceil(e[2*t]-f),o=r[2*t+1]===r[2*t]?l:Math.floor(e[2*t+1]-f);for(let e=l;e<=o;e++)c[e]=i,p[e]=255}}if(a?.length)for(let e=0;e<a.length;e++){let t=Math.ceil(a[2*e]-f),r=Math.floor(a[2*e+1]-f);for(let e=t;e<=r;e++)p[e]=0}return{lut:c,offset:f,mask:p}}function v(e,t,r){if("u8"!==e&&"s8"!==e&&"u16"!==e&&"s16"!==e)return null;let n=e.includes("16")?65536:256,i=e.includes("s")?-n/2:0,l=new Uint8Array(n);if(t)for(let e=0;e<t.length;e++){let r=Math.ceil(t[2*e]-i),n=Math.floor(t[2*e+1]-i);for(let e=r;e<=n;e++)l[e]=255}else l.fill(255);if(r)for(let e=0;e<r.length;e++)l[r[e]-i]=0;return{lut:l,offset:i}}function k(e,t){if(!e||0===e.length)return null;let r=e.find(e=>e.pixelBlock);if(null==r?.pixelBlock)return null;let n=(r.extent.xmax-r.extent.xmin)/r.pixelBlock.width,i=(r.extent.ymax-r.extent.ymin)/r.pixelBlock.height,l=.01*Math.min(n,i),o=e.sort((e,t)=>Math.abs(e.extent.ymax-t.extent.ymax)>l?t.extent.ymax-e.extent.ymax:Math.abs(e.extent.xmin-t.extent.xmin)>l?e.extent.xmin-t.extent.xmin:0),a=Math.min.apply(null,o.map(e=>e.extent.xmin)),s=Math.min.apply(null,o.map(e=>e.extent.ymin)),u=Math.max.apply(null,o.map(e=>e.extent.xmax)),h=Math.max.apply(null,o.map(e=>e.extent.ymax)),f={x:Math.round((t.xmin-a)/n),y:Math.round((h-t.ymax)/i)},c={width:Math.round((u-a)/n),height:Math.round((h-s)/i)},p={width:Math.round((t.xmax-t.xmin)/n),height:Math.round((t.ymax-t.ymin)/i)};return Math.round(c.width/r.pixelBlock.width)*Math.round(c.height/r.pixelBlock.height)!==o.length||f.x<0||f.y<0||c.width<p.width||c.height<p.height?null:{extent:t,pixelBlock:S(o.map(e=>e.pixelBlock),c,{clipOffset:f,clipSize:p})}}function T(e,t,r,n,i,l){let{width:o,height:a}=r.block,{x:s,y:u}=r.offset,{width:h,height:f}=r.mosaic,c=function(e,t,r,n,i,l,o,a){return{xmin:i<=r*e?0:i<r*e+e?i-r*e:e,ymin:l<=n*t?0:l<n*t+t?l-n*t:t,xmax:i+o<=r*e?0:i+o<r*e+e?i+o-r*e:e,ymax:l+a<=n*t?0:l+a<n*t+t?l+a-n*t:t}}(o,a,n,i,s,u,h,f),p=0,d=0;if(l){let e=l.hasGCSSShiftTransform?360:l.halfWorldWidth??0,t=o*l.resolutionX,r=l.startX+n*t;r<e&&r+t>e?d=l.rightPadding:r>=e&&(p=l.leftMargin-l.rightPadding,d=0)}if(c.xmax-=d,"number"==typeof t)for(let r=c.ymin;r<c.ymax;r++){let l=(i*a+r-u)*h+(n*o-s)+p;for(let r=c.xmin;r<c.xmax;r++)e[l+r]=t}else for(let r=c.ymin;r<c.ymax;r++){let l=(i*a+r-u)*h+(n*o-s)+p,f=r*o;for(let r=c.xmin;r<c.xmax;r++)e[l+r]=t[f+r]}}function S(e,t,r={}){let{clipOffset:n,clipSize:i,alignmentInfo:o,blockWidths:s}=r;if(s)return function(e,t,r){let n=e.find(e=>null!=e);if(null==n)return null;let i=e.some(e=>null==e||!!e.mask),{width:o,height:s}=t,u=i?new Uint8Array(o*s):null,{blockWidths:h}=r,f=[],c=n.getPlaneCount(),p=l.A.getPixelArrayConstructor(n.pixelType);if(i)for(let t=0,r=0;t<e.length;r+=h[t],t++){let n=e[t];if(!a(n))continue;let i=n.mask;for(let e=0;e<s;e++)for(let l=0;l<h[t];l++)u[e*o+l+r]=null==i?255:i[e*n.width+l]}let d=e.some(e=>e?.bandMasks&&e.bandMasks.length>1),m=d?[]:void 0,g=o*s;for(let t=0;t<c;t++){let r=new p(g),n=d?new Uint8Array(g):void 0;for(let i=0,l=0;i<e.length;l+=h[i],i++){let u=e[i];if(!a(u))continue;let f=u.pixels[t];if(null!=f){for(let e=0;e<s;e++)for(let t=0;t<h[i];t++)r[e*o+t+l]=f[e*u.width+t];if(n){let e=u.bandMasks?.[t]??u.mask;for(let t=0;t<s;t++)for(let r=0;r<h[i];r++)n[t*o+r+l]=e?e[t*u.width+r]:255}}}f.push(r),m&&n&&m.push(n)}let y=new l.A({width:o,height:s,mask:u,bandMasks:m,pixels:f,pixelType:n.pixelType});return y.updateStatistics(),y}(e,t,{blockWidths:s});let u=e.find(e=>a(e));if(null==u)return null;let h,f,c=i?i.width:t.width,p=i?i.height:t.height,d=u.width,m=u.height,g=t.width/d,y=t.height/m,x={offset:n||{x:0,y:0},mosaic:i||t,block:{width:d,height:m}},w=u.pixelType,C=l.A.getPixelArrayConstructor(w),M=u.pixels.length,b=[];for(let t=0;t<M;t++){f=new C(c*p);for(let r=0;r<y;r++)for(let n=0;n<g;n++){let i=e[r*g+n];a(i)&&(h=i.pixels[t],T(f,h,x,n,r,o))}b.push(f)}let A=e.some(e=>null==e||null!=e.mask&&e.mask.length>0),v=e.some(e=>e?.bandMasks&&e.bandMasks.length>1),k=A?new Uint8Array(c*p):void 0,S=v?[]:void 0;if(k){for(let t=0;t<y;t++)for(let r=0;r<g;r++){let n=e[t*g+r];T(k,(null==n?null:n.mask)??(n?255:0),x,r,t,o)}if(S)for(let t=0;t<M;t++){let r=new Uint8Array(c*p);for(let n=0;n<y;n++)for(let i=0;i<g;i++){let l=e[n*g+i];T(r,l?.bandMasks?.[t]??l?.mask??(l?255:0),x,i,n,o)}S.push(r)}}let I=new l.A({width:c,height:p,pixels:b,pixelType:w,bandMasks:S,mask:k});return I.updateStatistics(),I}function I(e,t,r){if(!a(e))return null;let{width:n,height:i}=e,l=t.x,o=t.y,s=r.width+l,u=r.height+o;if(l<0||o<0||s>n||u>i||0===l&&0===o&&s===n&&u===i)return e;e.mask||=new Uint8Array(n*i);let h=e.mask;for(let e=0;e<i;e++){let t=e*n;for(let r=0;r<n;r++)h[t+r]=e<o||e>=u||r<l||r>=s?0:1}return e.updateStatistics(),e}function P(e){if(!a(e))return null;let t=e.clone(),{width:r,height:n,pixels:i}=e,l=i[0],o=t.pixels[0],s=e.mask;for(let e=2;e<n-1;e++){let t=new Map;for(let n=e-2;n<e+2;n++)for(let e=0;e<4;e++){let i=n*r+e;L(t,l[i],s?s[i]:1)}o[e*r]=E(t),o[e*r+1]=o[e*r+2]=o[e*r];let n=3;for(;n<r-1;n++){let i=(e-2)*r+n+1;L(t,l[i],s?s[i]:1),i=(e-1)*r+n+1,L(t,l[i],s?s[i]:1),i=e*r+n+1,L(t,l[i],s?s[i]:1),i=(e+1)*r+n+1,L(t,l[i],s?s[i]:1),i=(e-2)*r+n-3,R(t,l[i],s?s[i]:1),i=(e-1)*r+n-3,R(t,l[i],s?s[i]:1),i=e*r+n-3,R(t,l[i],s?s[i]:1),i=(e+1)*r+n-3,R(t,l[i],s?s[i]:1),o[e*r+n]=E(t)}o[e*r+n+1]=o[e*r+n]}for(let e=0;e<r;e++)o[e]=o[r+e]=o[2*r+e],o[(n-1)*r+e]=o[(n-2)*r+e];return t.updateStatistics(),t}function E(e){if(0===e.size)return 0;let t=0,r=-1,n=0,i=e.keys(),l=i.next();for(;!l.done;)n=e.get(l.value),n>t&&(r=l.value,t=n),l=i.next();return r}function R(e,t,r){if(0===r)return;let n=e.get(t);1===n?e.delete(t):e.set(t,n-1)}function L(e,t,r){0!==r&&e.set(t,e.has(t)?e.get(t)+1:1)}function U(e,t,r){let{x:n,y:i}=t,{width:o,height:s}=r;if(0===n&&0===i&&s===e.height&&o===e.width)return e;let{width:u,height:h}=e,f=Math.max(0,i),c=Math.max(0,n),p=Math.min(n+o,u),d=Math.min(i+s,h);if(p<0||d<0||!a(e))return null;n=Math.max(0,-n),i=Math.max(0,-i);let{pixels:m}=e,g=o*s,y=m.length,x=[];for(let t=0;t<y;t++){let r=m[t],a=l.A.createEmptyBand(e.pixelType,g);for(let e=f;e<d;e++){let t=e*u,l=(e+i-f)*o+n;for(let e=c;e<p;e++)a[l++]=r[t+e]}x.push(a)}let w=new Uint8Array(g),C=e.mask;for(let e=f;e<d;e++){let t=e*u,r=(e+i-f)*o+n;for(let e=c;e<p;e++)w[r++]=C?C[t+e]:1}let M=new l.A({width:r.width,height:r.height,pixelType:e.pixelType,pixels:x,mask:w});return M.updateStatistics(),M}function O(e,t=!0){if(!a(e))return null;let{pixels:r,width:n,height:i,mask:o,pixelType:s}=e,u=[],h=Math.round(n/2),f=Math.round(i/2),c=i-1,p=n-1;for(let e=0;e<r.length;e++){let o=r[e],a=l.A.createEmptyBand(s,h*f),d=0;for(let e=0;e<i;e+=2)for(let r=0;r<n;r+=2){let i=o[e*n+r];if(t){let t=r===p?i:o[e*n+r+1],l=e===c?i:o[e*n+r+n],s=r===p?l:e===c?t:o[e*n+r+n+1];a[d++]=(i+t+l+s)/4}else a[d++]=i}u.push(a)}let d=null;if(null!=o){d=new Uint8Array(h*f);let e=0;for(let r=0;r<i;r+=2)for(let i=0;i<n;i+=2){let l=o[r*n+i];if(t){let t=i===p?l:o[r*n+i+1],a=r===c?l:o[r*n+i+n],s=i===p?a:r===c?t:o[r*n+i+n+1];d[e++]=l*t*a*s?1:0}else d[e++]=l}}return new l.A({width:h,height:f,pixelType:s,pixels:u,mask:d})}function D(e,t,r=0,n=!0){if(!a(e))return null;let{width:i,height:l}=t,{width:o,height:s}=e,u=new Map,h={x:0,y:0},f=1+r,c=e;for(let e=0;e<f;e++){let r=Math.ceil(o/i),a=Math.ceil(s/l);for(let n=0;n<a;n++){h.y=n*l;for(let l=0;l<r;l++){h.x=l*i;let r=U(c,h,t);u.set(`${e}/${n}/${l}`,r)}}e<f-1&&(c=O(c,n)),o=Math.round(o/2),s=Math.round(s/2)}return u}function G(e){let{pixelBlock:t,tileSize:r,level:n,row:i,col:l,useBilinear:o}=e;if(!a(t))return null;let{width:s,height:u}=r,h=2**n,f=h*s,c=h*u,p=U(t,{y:i*c,x:l*f},{width:f,height:c});if(!p)return null;for(let e=n;e>0;e--)p=O(p,o);return p}function B(e,t,r,n,i=0){let l,o,a,s,u,h,f,c,p,{width:d,height:m}=e,{width:g,height:y}=t,x=n.cols,w=n.rows,C=Math.ceil(g/x-.1/x),M=Math.ceil(y/w-.1/w),b=C*x,A=b*M*w,v=new Float32Array(A),k=new Float32Array(A),T=new Uint32Array(A),S=new Uint32Array(A),I=0;for(let e=0;e<M;e++)for(let t=0;t<C;t++){l=12*(e*C+t),o=r[l],a=r[l+1],s=r[l+2],u=r[l+3],h=r[l+4],f=r[l+5];for(let r=0;r<w;r++){I=(e*w+r)*b+t*x,p=(r+.5)/w;for(let e=0;e<r;e++)c=(e+.5)/x,v[I+e]=(o*c+a*p+s)*d+i,k[I+e]=(u*c+h*p+f)*m+i,T[I+e]=Math.floor(v[I+e]),S[I+e]=Math.floor(k[I+e])}l+=6,o=r[l],a=r[l+1],s=r[l+2],u=r[l+3],h=r[l+4],f=r[l+5];for(let r=0;r<w;r++){I=(e*w+r)*b+t*x,p=(r+.5)/w;for(let e=r;e<x;e++)c=(e+.5)/x,v[I+e]=(o*c+a*p+s)*d+i,k[I+e]=(u*c+h*p+f)*m+i,T[I+e]=Math.floor(v[I+e]),S[I+e]=Math.floor(k[I+e])}}return{offsets_x:v,offsets_y:k,offsets_xi:T,offsets_yi:S,gridWidth:b}}function N(e,t){let{coefficients:r,spacing:n}=t,{offsets_x:i,offsets_y:l,gridWidth:o}=B(e,e,r,{rows:n[0],cols:n[1]}),{width:a,height:s}=e,u=new Float32Array(a*s),h=180/Math.PI;for(let e=0;e<s;e++)for(let t=0;t<a;t++){let r=e*o+t,n=0===e?r:r-o,f=e===s-1?r:r+o,c=i[n]-i[f],p=l[f]-l[n];if(isNaN(c)||isNaN(p))u[e*a+t]=90;else{let r=Math.atan2(p,c)*h;r=(360+r)%360,u[e*a+t]=r}}return u}function F(e,t,r,n,i="nearest"){if(!a(e))return null;"majority"===i&&(e=P(e));let{pixels:o,mask:s,bandMasks:u,pixelType:h}=e,f=e.width,c=e.height,p=l.A.getPixelArrayConstructor(h),d=o.length,{width:m,height:g}=t,y=!1;for(let e=0;e<r.length;e+=3)-1===r[e]&&-1===r[e+1]&&-1===r[e+2]&&(y=!0);let x,w,{offsets_x:C,offsets_y:M,offsets_xi:b,offsets_yi:A,gridWidth:v}=B({width:f,height:c},t,r,n,"majority"===i?.5:0),k=(e,t,r,n)=>{let i=e instanceof Float32Array||e instanceof Float64Array?0:.5;for(let l=0;l<g;l++){x=l*v;for(let o=0;o<m;o++){if(C[x]<0||M[x]<0)e[l*m+o]=0;else if(n)e[l*m+o]=t[b[x]+A[x]*f];else{let n=Math.floor(C[x]),a=Math.floor(M[x]),s=Math.ceil(C[x]),u=Math.ceil(M[x]),h=C[x]-n,c=M[x]-a;if(!r||r[n+a*f]&&r[s+a*f]&&r[n+u*f]&&r[s+u*f]){let r=(1-h)*t[n+a*f]+h*t[s+a*f],p=(1-h)*t[n+u*f]+h*t[s+u*f];e[l*m+o]=(1-c)*r+c*p+i}else e[l*m+o]=t[b[x]+A[x]*f]}x++}}},T=[],S=u?.length===d,I=[];for(let e=0;e<d;e++){if(S){let t=new Uint8Array(m*g);k(t,u[e],u[e],!0),I.push(t)}w=new p(m*g),k(w,o[e],S?u[e]:s,"nearest"===i||"majority"===i),T.push(w)}let E=new l.A({width:m,height:g,pixelType:h,pixels:T,bandMasks:S?I:void 0});if(null!=s)E.mask=new Uint8Array(m*g),k(E.mask,s,s,!0);else if(y){E.mask=new Uint8Array(m*g);for(let e=0;e<m*g;e++)E.mask[e]=C[e]<0||M[e]<0?0:1}return E.updateStatistics(),E}function z(e){let{pixelBlock:t,extent:r,fieldNames:n,skipFactor:i,skipSpatialReference:l=!1,pixelIdOffset:a=0}=e,s=[],{width:u,height:h,pixels:f,mask:c}=t,p=e.imageRowSize??u,d=r.width/u,m=r.height/h,g=f.length,y=Math.floor(i/2),{xmin:x,ymax:w}=r,C=l?void 0:r.spatialReference.toJSON();for(let e=y;e<h;e+=i)for(let t=y;t<u;t+=i){let r=e*u+t;if(!c||c[r]){let i={x:x+(t+.5)*d,y:w-(e+.5)*m,spatialReference:C},l={[o]:a+e*p+t};for(let e=0;e<g;e++)l[n[e+1]]=f[e][r];s.push({geometry:i,attributes:l})}}return s}},51927(e,t,r){r.d(t,{DP:()=>w,Nh:()=>C,Pg:()=>x,RP:()=>h,WF:()=>u,_N:()=>M,eH:()=>g,f4:()=>y,fP:()=>c,zj:()=>f,zt:()=>s});var n=r(97768),i=r(94778),l=r(14140),o=r(70274);const a=[.299,.587,.114];function s(e){if(null==e)return!1;let{max:t,min:r,size:n}=e;return(t-r)/n===1&&r>=-.5&&.5===Math.abs(r%1)&&t<=255.5}function u(e,t=256){t=Math.min(t,256);let{size:r,counts:n}=e,i=new Float64Array(r);i[0]=n[0]/t;for(let e=1;e<r;e++)i[e]=i[e-1]+n[e]/t;let l=new Uint8Array(t),o=t/i[i.length-1];if(r<=t){let n=s(e)?Math.max(0,Math.round(e.min+.5)):0;for(let e=n;e<t;e++)l[e]=e>=r+n?255:Math.min(255,Math.trunc(i[e-n]*o))}else{let e=i.map(e=>Math.min(255,Math.trunc(e*o)));for(let n=0;n<t;n++)l[n]=e[Math.round(r/t)];l[t-1]=255}return l}function h(e){let{minCutOff:t,maxCutOff:r,gamma:n,pixelType:i,rounding:l}=e;if(!["u8","u16","s8","s16"].includes(i))return null;let o=t.length,a="s8"===i?-127:"s16"===i?-32767:0,s=["u16","s16"].includes(i)?65536:256,u=[],h=[],{minOutput:c=0,maxOutput:p=255}=e,d=p-c;for(let e=0;e<o;e++)h[e]=r[e]-t[e],u[e]=0===h[e]?0:d/h[e];let m=[];if(n&&n.length>=o){let e=C(o,n);for(let i=0;i<o;i++){let o=[];for(let u=0;u<s;u++){if(0===h[i]){o[u]=c;continue}let s=u+a,f=(s-t[i])/h[i],m=1;if(n[i]>1&&(m-=(1/d)**(f*e[i])),s<r[i]&&s>t[i]){let e=m*d*f**(1/n[i])+c;o[u]="floor"===l?Math.floor(e):"round"===l?Math.round(e):e}else s>=r[i]?o[u]=p:o[u]=c}m[i]=o}}else for(let e=0;e<o;e++){let n=[];for(let i=0;i<s;i++){let o=i+a;if(o<=t[e])n[i]=c;else if(o>=r[e])n[i]=p;else{let r=(o-t[e])*u[e]+c;n[i]="floor"===l?Math.floor(r):"round"===l?Math.round(r):r}}m[e]=n}if(null!=e.contrastOffset){let t=f(e.contrastOffset,e.brightnessOffset);for(let e=0;e<o;e++){let r=m[e];for(let e=0;e<s;e++)r[e]=t[r[e]]}}return{lut:m,offset:a}}function f(e,t){let r=Math.min(Math.max(e,-100),100),n=Math.min(Math.max(t??0,-100),100),i=new Uint8Array(256);for(let e=0;e<256;e++){let t=0;r>0&&r<100?t=(200*e-25500+510*n)/(2*(100-r))+128:r<=0&&r>-100?t=(200*e-25500+510*n)*(100+r)/2e4+128:100===r?(t=200*e-25500+256*(100-r)+510*n,t=t>0?255:0):-100===r&&(t=128),i[e]=t>255?255:t<0?0:t}return i}function c(e,t,r){let n=[];for(let i=0;i<t.length;i++){let l=0,o=0,s=0;"min"in t[i]?({min:l,max:o,avg:s}=t[i]):[l,o,s]=t[i];let u=s??0;"u8"!==e&&(u=255*(u-l)/(o-l)),r&&(u*=a[i]),n.push(p(u))}return n}function p(e){if(e<=0||e>=255)return 1;let t=e+(150===e?0:e<150?45*Math.cos(.01047*e):17*Math.sin(.021*e)),r=Math.log(e/255),n=Math.log(t/255);if(0===n)return 1;let i=r/n;return isNaN(i)?1:Math.min(9.9,Math.max(.01,i))}function d(e,t,r){let{min:n,max:i,count:l,avg:o,mode:a,median:s}=function(e,t,r=!1,n=!1){let i=1/0,l=-1/0,o=0,a=0,s=0,u=0,h=e.length,f=new Map;for(let r=0;r<h;r++){let n=e[r];if(!t||t[r]){let e=(f.get(n)??0)+1;f.set(n,e),e>u&&(u=e,s=n),i=n<i?n:i,l=n>l?n:l,o+=n,a++}}let c=a>0?o/a:0,p=i===l?i:void 0,d=i===l?i:void 0,m=i===l?i:void 0;if(r&&a>0&&a<2**24){let r=e.slice();if(t){let n=0;for(let i=0;i<h;i++){let l=e[i];t[i]&&(r[n++]=l)}}r=r.slice(0,a),r.sort((e,t)=>e-t);let i=a>>>1;p=a%2?r[Math.floor(i)]:(r[i-1]+r[i])/2,n&&(d=r[Math.floor(.25*a)],m=r[Math.floor(.75*a)])}return{min:i,max:l,count:a,avg:c,mode:s,median:p,quartile1:d,quartile3:m}}(e,t,!0);if(0===l)return{statistics:{min:0,max:0,avg:0,stddev:0,count:l,mode:0,median:0},histogram:null};let u={min:n,max:i,avg:o,mode:a,count:l,median:s},h=function(e,t,r,n=!1,i=!1){let l=0,o=0,a=0,s=0;for(let i=0;i<e.length;i++)if(!t||t[i]){let t=e[i]-r,u=t*t;if(l+=u,!n){let e=u*t;o+=e,a+=e*t}s++}if(s<2)return null;l/=s-1;let u=Math.sqrt(l);return n?{stddev:u}:(a/=s,{stddev:u,skewness:i?o*(s/((s-1)*(s-2)))/l**1.5:o/s/l**1.5,kurtosis:a/(l*l)})}(e,t,o,!r.includeSkewnessKurtosis);h&&(u.stddev=h.stddev,r.includeSkewnessKurtosis&&(u.skewness=h.skewness,u.kurtosis=h.kurtosis));let f=r?.histogramSize??256,c=!!r?.pixelType&&["u8","s8","u4","u2","u1"].includes(r.pixelType),p=!r?.skipHistograms;if(null==s){let r=m({band:e,mask:t,min:n,max:i,size:1e4,use8BitHistogram:c});if(s=function(e,t,r,n=50){let{counts:i,min:l,max:o,size:a}=r,s=i.reduce((e,t)=>e+t),u=s*(n/=100),h=0,f=0;for(;f<i.length&&(h+=i[f],!(h>=u+1));f++);let c=(o-l)/a,p=l+c*f,d=l+c*(f+1);if(1===c&&.5===Math.abs(l%1))return p+.5;let m=e.slice(0,i[f]).fill(0);for(let r=0,n=0;r<e.length;r++)if(!t||t[r]){let t=e[r];t>=p&&t<d&&(m[n++]=t)}m.sort((e,t)=>e-t);let g=h-Math.floor(u)-1;return m[Math.max(0,m.length-1-g)]}(e,t,r,50),p&&c&&256===f)return{statistics:u,histogram:r}}return p?{statistics:u,histogram:m({band:e,mask:t,min:n,max:i,size:f,use8BitHistogram:c&&256===f})}:{statistics:u,histogram:null}}function m(e){let{band:t,mask:r,min:n,max:i,use8BitHistogram:l}=e;if(l){let e=i-n+1,l=new Uint32Array(e);for(let e=0;e<t.length;e++)(!r||r[e])&&l[t[e]-n]++;return{min:n-.5,max:i+.5,size:e,counts:l}}let o=e.size??256,a=new Uint32Array(o),s=(i-n)/o;if(0===s){let e=r?r.reduce((e,t)=>e+ +!!t,0):t.length;return{min:n,max:i,size:1,counts:new Uint32Array(1).fill(e)}}let u=new Uint32Array(o+1),h=1/s;for(let e=0;e<t.length;e++)(!r||r[e])&&u[Math.floor((t[e]-n)*h)]++;for(let e=0;e<o-1;e++)a[e]=u[e];return a[o-1]=u[o-1]+u[o],{min:n,max:i,size:o,counts:a}}function g(e,t){let{pixels:r,mask:n,pixelType:i,bandMasks:l}=e,o=r.map((e,r)=>d(e,l?.[r]??n,{pixelType:i,...t}));return{statistics:o.map(({statistics:e})=>e),histograms:o.map(({histogram:e})=>e)}}function y(e){if(!e?.pixels?.length)return null;let t,r,{pixels:n,mask:i,bandMasks:l,pixelType:o}=e,a=e.width*e.height,s=n.length,u=[],h=[];for(let f=0;f<s;f++){let s=new Uint32Array(256),c=n[f],p=l?.[f]??i;if("u8"===o){if(t=255,r=0,p){for(let e=0;e<a;e++)if(p[e]){let n=c[e];t=n<t?n:t,r=n>r?n:r,s[n]++}}else for(let e=0;e<a;e++){let n=c[e];t=n<t?n:t,r=n>r?n:r,s[n]++}s=s.slice(t,r+1)}else{let n=!1;e.statistics||(e.updateStatistics(),n=!0);let i=e.statistics;t=i[f].minValue,r=i[f].maxValue;let l=(r-t)/256;if(0===l){i&&!e.validPixelCount&&!n&&e.updateStatistics();let t=(e.validPixelCount||e.width*e.height)/256;for(let e=0;e<256;e++)s[e]=Math.round(t*(e+1))-Math.round(t*e)}else{let e=new Uint32Array(257);for(let r=0;r<a;r++)(!p||p[r])&&e[Math.floor((c[r]-t)/l)]++;for(let t=0;t<255;t++)s[t]=e[t];s[255]=e[255]+e[256]}}let d="u8"===o?t-.5:t,m="u8"===o?r+.5:r;u.push({min:d,max:m,size:s.length,counts:s});let g=0,y=0,x=0;for(let e=0;e<s.length;e++)g+=s[e],y+=e*s[e];let w=y/g;for(let e=0;e<s.length;e++)x+=s[e]*(e-w)**2;let C=Math.sqrt(x/(g-1)),M=(m-d)/s.length,b=(w+("u8"===o?0:.5))*M+t,A=C*M;h.push({min:t,max:r,avg:b,stddev:A})}return{statistics:h,histograms:u}}function x(e){let t=[];for(let r=0;r<e.length;r++){let{min:n,max:i,size:l,counts:o}=e[r],a=0,s=0;for(let e=0;e<l;e++)a+=o[e],s+=e*o[e];let u=s/a,h=0;for(let e=0;e<l;e++)h+=o[e]*(e-u)**2;let f=(i-n)/l,c=(u+.5)*f+n,p=Math.sqrt(h/(a-1))*f;t.push({min:n,max:i,avg:c,stddev:p})}return t}function w(e,t){let{pixelBlock:r,bandIds:l,returnHistogramLut:a,rasterInfo:s}=t,h=null,f=null,c=e.stretchType;if("number"==typeof c&&(c=o.x[c]),e.dra)if("minMax"===c&&r?.statistics)h=r.statistics.map(e=>[e.minValue,e.maxValue,0,0]);else{let e=y(r);h=null==e?null:e.statistics,f=null==e?null:e.histograms}else h=e.statistics?.length?e.statistics:s.statistics,f="histograms"in e?e.histograms:void 0,f||=s.histograms;"percentClip"!==c&&"histogramEqualization"!==c||f?.length||(c="minMax");let p=h?.length||f?.length||s.bandCount,d=[],m=[];h&&!Array.isArray(h[0])&&(h=h.map(e=>[e.min,e.max,e.avg,e.stddev]));let g,x,w,[C,M]=(0,i.hP)(s.pixelType);if(!h?.length){h=[];for(let e=0;e<p;e++)h.push([C,M,1,1]);"standardDeviation"===c&&(c="minMax")}switch(c){case"none":for(let e=0;e<p;e++)d[e]=C,m[e]=M;break;case"minMax":for(let e=0;e<p;e++){let t=h[e];d[e]=t[0],m[e]=t[1]}break;case"standardDeviation":{let{numberOfStandardDeviations:t=2}=e;for(let e=0;e<p;e++){let r=h[e];d[e]=r[2]-t*r[3],m[e]=r[2]+t*r[3],d[e]<r[0]&&(d[e]=r[0]),m[e]>r[1]&&(m[e]=r[1])}}break;case"histogramEqualization":(0,n.Lw)(f);for(let e=0;e<p;e++)d[e]=f[e].min,m[e]=f[e].max;break;case"percentClip":(0,n.Lw)(f);for(let t=0;t<f.length;t++){let r=f[t],n=new Uint32Array(r.size),i=[...r.counts];i.length>=20&&(i[0]=i[1]=i[2]=i[i.length-1]=i[i.length-2]=0);let l=0,o=(r.max-r.min)/r.size,a=-.5===r.min&&1===o?.5:0;for(let e=0;e<r.size;e++)l+=i[e],n[e]=l;let s=(e.minPercent||0)*l/100;d[t]=r.min+a;for(let e=0;e<r.size;e++)if(n[e]>s){d[t]=r.min+o*(e+a);break}s=(1-(e.maxPercent||0)/100)*l,m[t]=r.max+a;for(let e=r.size-2;e>=0;e--)if(n[e]<s){m[t]=r.min+o*(e+2-a);break}if(m[t]<d[t]){let e=d[t];d[t]=m[t],m[t]=e}}break;default:for(let e=0;e<p;e++){let t=h[e];d[e]=t[0],m[e]=t[1]}}return"histogramEqualization"===c?((0,n.Lw)(f),x=f[0].size||256,g=0,a&&(w=f.map(e=>u(e)))):(x=e.max||255,g=e.min||0),function(e,t){if(null==t||0===t.length)return e;let r=Math.max.apply(null,t),{minCutOff:n,maxCutOff:i,minOutput:l,maxOutput:o,histogramLut:a}=e;return n.length===t.length||n.length<=r?e:{minCutOff:t.map(e=>n[e]),maxCutOff:t.map(e=>i[e]),histogramLut:a?t.map(e=>a[e]):null,minOutput:l,maxOutput:o}}({minCutOff:d,maxCutOff:m,maxOutput:x,minOutput:g,histogramLut:w},l)}function C(e,t){let r=new Float32Array(e);for(let n=0;n<e;n++)t[n]>1?t[n]>2?r[n]=6.5+(t[n]-2)**2.5:r[n]=6.5+100*(2-t[n])**4:r[n]=1;return r}function M(e,t){if(!e?.pixels?.length)return e;let{mask:r,bandMasks:n,width:i,height:o,pixels:a}=e,{minCutOff:s,maxCutOff:u,minOutput:h,maxOutput:f,gamma:c}=t,p=i*o,d=t.outputPixelType||"u8",m=e.pixels.map(()=>l.A.createEmptyBand(d,p)),g=m.length,y=f-h,x=[],w=[];for(let e=0;e<g;e++)w[e]=u[e]-s[e],x[e]=0===w[e]?0:y/w[e];let M=d.startsWith("u")||d.startsWith("s"),b=c&&c.length>=g,A=!!t.isRenderer;if(b){let e=C(g,c);for(let t=0;t<g;t++){let i=n?.[t]??r;for(let r=0;r<p;r++)if(null==i||i[r]){if(0===w[t]){m[t][r]=h;continue}let n=a[t][r],i=(n-s[t])/w[t],l=1;if(c[t]>1&&(l-=(1/y)**(i*e[t])),n<u[t]&&n>s[t]){let e=l*y*i**(1/c[t])+h;m[t][r]=A?Math.floor(e):M?Math.round(e):e}else n>=u[t]?m[t][r]=f:m[t][r]=h}}}else for(let e=0;e<g;e++){let t=n?.[e]??r;for(let r=0;r<p;r++)if(null==t||t[r]){let t=a[e][r];if(t<u[e]&&t>s[e]){let n=(t-s[e])*x[e]+h;m[e][r]=A?Math.floor(n):M?Math.round(n):n}else t>=u[e]?m[e][r]=f:m[e][r]=h}}let v=new l.A({width:i,height:o,mask:r,bandMasks:n,pixels:m,pixelType:d});return v.updateStatistics(),v}},51181(e,t,r){r.d(t,{E0:()=>d,PP:()=>m,SC:()=>f,di:()=>p,fw:()=>h,ng:()=>a,rk:()=>o,yy:()=>c});var n=r(47520),i=r(14140),l=r(4151);const o=1/111e3;function a(e){let{altitude:t,azimuth:r}=e,{hillshadeType:n,pixelSizePower:i=1,pixelSizeFactor:l=1,scalingType:a,isGCS:s,resolution:u}=e,h="multi-directional"===n?2*e.zFactor:e.zFactor,{x:f,y:c}=u,p=h/(8*f),d=h/(8*c);if(s&&h>.001&&(p/=o,d/=o),"adjusted"===a)if(s){let e=f*o,t=c*o;p=(h+e**i*l)/(8*e),d=(h+t**i*l)/(8*t)}else p=(h+f**i*l)/(8*f),d=(h+c**i*l)/(8*c);let m=(90-t)*Math.PI/180,g=Math.cos(m),y=(360-r+90)*Math.PI/180,x=Math.sin(m)*Math.cos(y),w=Math.sin(m)*Math.sin(y),C=[315,270,225,360,180,0],M=[60,60,60,60,60,90],b=new Float32Array([3,5,3,2,1,4]),A=b.reduce((e,t)=>e+t),v=b.map(e=>e/A),k="multi-directional"===n?C.length:1,T=new Float32Array(6),S=new Float32Array(6),I=new Float32Array(6);if("multi-directional"===n)for(let e=0;e<k;e++)t=M[e],r=C[e],m=(90-t)*Math.PI/180,g=Math.cos(m),y=(360-r+90)*Math.PI/180,x=Math.sin(m)*Math.cos(y),w=Math.sin(m)*Math.sin(y),T[e]=g,S[e]=x,I[e]=w;else T.fill(g),S.fill(x),I.fill(w);return{resolution:u,factor:[p,d],sinZcosA:x,sinZsinA:w,cosZ:g,sinZcosAs:[...S],sinZsinAs:[...I],cosZs:[...T],weights:[...v],hillshadeType:["traditional","multi-directional"].indexOf(n)}}function s(e,t){let r,{width:n,height:i}=e,l=n*i,o=new Uint8Array(l),a=null!=e.mask;if(a){r=new Uint8Array(e.mask);for(let e=0;e<r.length;e++)r[e]&&(o[e]=1,r[e]=1)}let s,u=e.pixels[0],h=new Float32Array(l),f=new Float32Array(l),c=0;if(t){let{resolution:e}=t,r=e?(e.x+e.y)/2:1;c=200*t.zFactor/(r*r),s=new Float32Array(l)}let p,d,m,g,y,x,w,C,M=t?.curvatureType;for(let e=1;e<i-1;e++){let t=e*n;for(let e=1;e<n-1;e++){let i=t+e;if(0!==r?.[i]){if(r){if(r[i-n-1]+r[i-n]+r[i-n+1]+r[i-1]+r[i+1]+r[i+n-1]+r[i+n]+r[i+n+1]<7){o[i]=0;continue}p=r[i-n-1]?u[i-n-1]:u[i],d=r[i-n]?u[i-n]:u[i],m=r[i-n+1]?u[i-n+1]:u[i],g=r[i-1]?u[i-1]:u[i],y=r[i+1]?u[i+1]:u[i],x=r[i+n-1]?u[i+n-1]:u[i],w=r[i+n]?u[i+n]:u[i],C=r[i+n+1]?u[i+n+1]:u[i]}else p=u[i-n-1],d=u[i-n],m=u[i-n+1],g=u[i-1],y=u[i+1],x=u[i+n-1],w=u[i+n],C=u[i+n+1];if(h[i]=m+y+y+C-(p+g+g+x),f[i]=x+w+w+C-(p+d+d+m),null!=s){let e=u[i],t=.5*(g+y)-e,r=.5*(d+w)-e;if("standard"===M)s[i]=-c*(t+r);else{let e=(-p+m+x-C)/4,n=(-g+y)/2,l=(d-w)/2,o=n*n,a=l*l,u=o+a;u&&(s[i]="profile"===M?c*(t*o+r*a+e*n*l)/u:-c*(t*a+r*o-e*n*l)/u)}}}}}return{outMask:a?o:null,dzxs:h,dzys:f,curvatures:s}}function u(e,t,r){for(let n=0;n<r;n++)e[n*t]=e[n*t+1],e[(n+1)*t-1]=e[(n+1)*t-2];for(let n=1;n<t-1;n++)e[n]=e[n+t],e[n+(r-1)*t]=e[n+(r-2)*t]}function h(e,t){if(!(0,n.AB)(e))return e;let{factor:r,sinZcosA:o,sinZsinA:h,cosZ:f,sinZcosAs:c,sinZsinAs:p,cosZs:d,weights:m}=a(t),[g,y]=r,x="traditional"===t.hillshadeType,{width:w,height:C}=e,M=new Uint8Array(w*C),{dzxs:b,dzys:A,outMask:v}=s(e);for(let e=1;e<C-1;e++){let t=e*w;for(let e=1;e<w-1;e++){let r=t+e;if(!v||v[r]){let e=b[r]*g,t=A[r]*y,n=Math.sqrt(1+e*e+t*t),i=0;if(x){let r=255*(f+h*t-o*e)/n;r<0&&(r=0),i=r}else{let r=p.length;for(let l=0;l<r;l++){let r=255*(d[l]+p[l]*t-c[l]*e)/n;r<0&&(r=0),i+=r*m[l]}}M[r]=255&i}}}return u(M,w,C),new i.A({width:w,height:C,pixels:[M],mask:v,pixelType:"u8",validPixelCount:e.validPixelCount,statistics:[new l.A(0,255)]})}function f(e,t,r,i){if(!(0,n.AB)(e)||!(0,n.AB)(t))return;let{min:l,max:o}=i,a=e.pixels[0],{pixels:s,mask:u}=t,h=s[0],f=255.00001/(o-l),c=new Uint8ClampedArray(h.length),p=new Uint8ClampedArray(h.length),d=new Uint8ClampedArray(h.length),m=r.length-1;for(let e=0;e<h.length;e++){if(0===u?.[e])continue;let t=Math.floor((h[e]-l)*f),[n,i]=r[t<0?0:t>m?m:t],o=a[e],s=o*i,g=s*(1-Math.abs(n%2-1)),y=o-s;switch(Math.floor(n)){case 0:c[e]=s+y,p[e]=g+y,d[e]=y;break;case 1:c[e]=g+y,p[e]=s+y,d[e]=y;break;case 2:c[e]=y,p[e]=s+y,d[e]=g+y;break;case 3:c[e]=y,p[e]=g+y,d[e]=s+y;break;case 4:c[e]=g+y,p[e]=y,d[e]=s+y;break;case 5:case 6:c[e]=s+y,p[e]=y,d[e]=g+y}}e.pixels=[c,p,d],e.updateStatistics()}function c(e,t){if(!(0,n.AB)(e))return e;let r=t.zFactor,l=t.pixelSizePower??1,a=t.pixelSizeFactor??1,h=t.slopeType,f=t.isGCS,{x:c,y:p}=t.resolution,d=r/(8*c),m=r/(8*p);f&&Math.abs(r-1)<1e-4&&(d/=o,m/=o),"adjusted"===h&&(d=(r+c**l*a)/(8*c),m=(r+p**l*a)/(8*p));let{dzxs:g,dzys:y,outMask:x}=s(e),{width:w,height:C}=e,M=new Float32Array(w*C);for(let e=1;e<C-1;e++){let t=e*w;for(let e=1;e<w-1;e++){let r=t+e;if(!x||x[r]){let n=g[r]*d,i=y[r]*m,l=Math.sqrt(n*n+i*i);M[t+e]="percent-rise"===h?100*l:57.2957795*Math.atan(l)}}}u(M,w,C);let b=new i.A({width:w,height:C,pixels:[M],mask:x,pixelType:"f32",validPixelCount:e.validPixelCount});return b.updateStatistics(),b}function p(e,t={}){if(!(0,n.AB)(e))return e;let{resolution:r}=t,o=r?1/r.x:1,a=r?1/r.y:1,{dzxs:h,dzys:f,outMask:c}=s(e),{width:p,height:d}=e,m=new Float32Array(p*d);for(let e=1;e<d-1;e++){let t=e*p;for(let e=1;e<p-1;e++){let r=t+e;if(!c||c[r]){let n=h[r]*o,i=f[r]*a,l=-1;(0!==n||0!==i)&&(l=90-57.29578*Math.atan2(i,-n),l<0&&(l+=360),360===l?l=0:l>360&&(l%=360)),m[t+e]=l}}}return u(m,p,d),new i.A({width:p,height:d,pixels:[m],mask:c,pixelType:"f32",validPixelCount:e.validPixelCount,statistics:[new l.A(-1,360)]})}function d(e,t){if(!(0,n.AB)(e))return e;let{curvatures:r,outMask:l}=s(e,t),{width:o,height:a}=e;u(r,o,a);let h=new i.A({width:o,height:a,pixels:[r],mask:l,pixelType:"f32",validPixelCount:e.validPixelCount});return h.updateStatistics(),h}function m(e,t,r){let{hillshadeType:n,altitude:i,azimuth:l,zFactor:o,pixelSizeFactor:a,pixelSizePower:s,slopeType:u}=e;return{hillshadeType:n,altitude:i,azimuth:l,zFactor:o,pixelSizePower:s,pixelSizeFactor:a,scalingType:"scaled"===u?"adjusted":"none",resolution:t,isGCS:r}}},34251(e,t,r){r.d(t,{FI:()=>d,KL:()=>u,Lu:()=>f,MD:()=>s,Rn:()=>m,Wu:()=>y,Y2:()=>p});var n=r(66552),i=r(47520),l=r(14140);const o=new Map;o.set("meter-per-second",1),o.set("kilometer-per-hour",.277778),o.set("knots",.514444),o.set("feet-per-second",.3048),o.set("mile-per-hour",.44704);const a=180/Math.PI,s=new n.J({esriMetersPerSecond:"meter-per-second",esriKilometersPerHour:"kilometer-per-hour",esriKnots:"knots",esriFeetPerSecond:"feet-per-second",esriMilesPerHour:"mile-per-hour"});function u(e,t){return o.get(e)/o.get(t)||1}function h(e){return(450-e)%360}function f(e,t="geographic"){let[r,n]=e,i=Math.sqrt(r*r+n*n),l=Math.atan2(n,r)*a;return l=(360+l)%360,"geographic"===t&&(l=h(l)),[i,l]}function c(e,t="geographic"){let r=e[1];"geographic"===t&&(r=h(r)),r%=360;let n=e[0];return[n*Math.cos(r/a),n*Math.sin(r/a)]}function p(e,t,r,n="geographic"){if(!(0,i.AB)(e)||null==r)return e;let l="vector-magdir"===t?e.clone():d(e,t),o=l.pixels[1];for(let e=0;e<o.length;e++)o[e]="geographic"===n?(o[e]+r[e]+270)%360:(o[e]+360-r[e])%360;return"vector-magdir"===t?l:d(l,"vector-magdir")}function d(e,t,r="geographic",n=1){if(!(0,i.AB)(e))return e;let{pixels:o,width:a,height:s}=e,u=a*s,h=o[0],p=o[1],d=e.pixelType.startsWith("f")?e.pixelType:"f32",m=l.A.createEmptyBand(d,u),g=l.A.createEmptyBand(d,u),y=0;for(let e=0;e<s;e++)for(let e=0;e<a;e++)"vector-uv"===t?([m[y],g[y]]=f([h[y],p[y]],r),m[y]*=n):([m[y],g[y]]=c([h[y],p[y]],r),m[y]*=n,g[y]*=n),y++;let x=new l.A({pixelType:d,width:e.width,height:e.height,mask:e.mask,validPixelCount:e.validPixelCount,maskIsAlpha:e.maskIsAlpha,pixels:[m,g]});return x.updateStatistics(),x}function m(e,t,r=1){if(1===r||!(0,i.AB)(e))return e;let n=e.clone(),{pixels:l,width:o,height:a}=n,s=l[0],u=l[1],h=0;for(let e=0;e<a;e++)for(let e=0;e<o;e++)"vector-uv"===t?(s[h]*=r,u[h]*=r):s[h]*=r,h++;return n.updateStatistics(),n}function g(e,t,r,n=1){let i=Math.sqrt(e*e+t*t)/n,l=(2*Math.PI+Math.atan2(t,e))%(2*Math.PI);return[i,(2*Math.PI+l-r)%(2*Math.PI)]}function y(e,t,r,n=[0,0],i=.5){let{width:o,height:a,mask:s}=e,[u,h]=e.pixels,[p,d]=n,m=Math.round((o-p)/r),g=Math.round((a-d)/r),y=m*g,x=new Float32Array(y),w=new Float32Array(y),C=new Uint8Array(y),M="vector-uv"===t;for(let e=0;e<g;e++)for(let t=0;t<m;t++){let n=0,l=e*m+t,g=Math.max(0,e*r+d),y=Math.max(0,t*r+p),b=Math.min(a,g+r),A=Math.min(o,y+r);for(let e=g;e<b;e++)for(let t=y;t<A;t++){let r=e*o+t;if(!s||s[r]){n++;let e=M?[u[r],h[r]]:[u[r],(360+h[r])%360],[t,i]=M?e:c(e);x[l]+=t,w[l]+=i}}if(n>=(b-g)*(A-y)*(1-i)){C[l]=1;let[e,t]=f([x[l]/n,w[l]/n]);x[l]=e,w[l]=t}else C[l]=0,x[l]=0,w[l]=0}let b=new l.A({width:m,height:g,pixels:[x,w],mask:C});return b.updateStatistics(),b}!function(e=0,t=0,r=Math.PI,n=!0){n&&(r=(2*Math.PI-r)%(2*Math.PI));let i=n?-1:1,l=13*i,o=-7*i,a=-2*i,s=-16*i,u=21.75,[h,f]=g(0,t+l,r,u),[c,p]=g(e-5.5,t+o,r,u),[d,m]=g(e+5.5,t+o,r,u),[y,x]=g(e-1.5,t+a,r,u),[w,C]=g(e+1.5,t+a,r,u),[M,b]=g(e-1.5,t+s,r,u),[A,v]=g(e+1.5,t+s,r,u)}(0,0,0)},10333(e,t,r){r.d(t,{A:()=>o});var n=r(32198),i=r(25482),l=r(91429);let o=class extends i.o{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,n.Cg)([(0,l.MZ)()],o.prototype,"affectsPixelSize",null),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],o.prototype,"spatialReference",void 0),o=(0,n.Cg)([(0,l.$K)("esri.layers.raster.transforms.BaseRasterTransform")],o)},75414(e,t,r){r.d(t,{A:()=>s});var n,i=r(32198),l=r(91429),o=r(10333),a=r(93223);let s=n=class extends o.A{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}clone(){return new n({tolerance:this.tolerance})}};(0,i.Cg)([(0,a.e)({GCSShiftXform:"gcs-shift"})],s.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)()],s.prototype,"tolerance",void 0),s=n=(0,i.Cg)([(0,l.$K)("esri.layers.raster.transforms.GCSShiftTransform")],s)},14140(e,t,r){r.d(t,{A:()=>c});var n,i=r(32198),l=r(49186),o=r(25482),a=r(4718),s=r(53966),u=r(91429),h=r(94778),f=r(4151);let c=class extends o.o{static{n=this}static createEmptyBand(e,t){return new(n.getPixelArrayConstructor(e))(t)}static combineBandMasks(e){if(e.length<2)return e[0];let t=e[0].length,r=new Uint8Array(t).fill(255);for(let n=0;n<e.length;n++){let i=e[n];for(let e=0;e<t;e++)i[e]||(r[e]=0)}return r}static getPixelArrayConstructor(e){let t;switch(e){case"u1":case"u2":case"u4":case"u8":t=Uint8Array;break;case"u16":t=Uint16Array;break;case"u32":t=Uint32Array;break;case"s8":t=Int8Array;break;case"s16":t=Int16Array;break;case"s32":t=Int32Array;break;case"f32":case"c64":case"c128":case"unknown":t=Float32Array;break;case"f64":t=Float64Array}return t}constructor(e){super(e),this.width=null,this.height=null,this.pixelType="f32",this.validPixelCount=null,this.mask=null,this.maskIsAlpha=!1,this.premultiplyAlpha=!1,this.statistics=null,this.depthCount=1}castPixelType(e){if(!e)return"f32";let t=e.toLowerCase();return["u1","u2","u4"].includes(t)?t="u8":["unknown","u8","s8","u16","s16","u32","s32","f32","f64"].includes(t)||(t="f32"),t}getPlaneCount(){return this.pixels?.length}addData(e){if(!e.pixels||e.pixels.length!==this.width*this.height)throw new l.A("pixelblock:invalid-or-missing-pixels","add data requires valid pixels array that has same length defined by pixel block width * height");this.pixels||=[],this.statistics||=[],this.pixels.push(e.pixels),this.statistics.push(e.statistics??new f.A)}getAsRGBA(){let e=new ArrayBuffer(this.width*this.height*4);switch(this.pixelType){case"s8":case"s16":case"u16":case"s32":case"u32":case"f32":case"f64":this._fillFromNon8Bit(e);break;default:this._fillFrom8Bit(e)}return new Uint8ClampedArray(e)}getAsRGBAFloat(){let e=new Float32Array(this.width*this.height*4);return this._fillFrom32Bit(e),e}updateStatistics(){if(!this.pixels)return;this.statistics=this.pixels.map(e=>function(e,t){let r,n=1/0,i=-1/0,l=e.length,o=0;if(null!=t)for(r=0;r<l;r++)t[r]&&(o=e[r],n=o<n?o:n,i=o>i?o:i);else for(r=0;r<l;r++)o=e[r],n=o<n?o:n,i=o>i?o:i;return new f.A(n,i)}(e,this.mask));let e=this.mask,t=0;if(null!=e)for(let r=0;r<e.length;r++)e[r]&&t++;else t=this.width*this.height;this.validPixelCount=t}clamp(e){if(!e||"f64"===e||"f32"===e||!this.pixels)return;let t,r,i,[l,o]=(0,h.hP)(e),a=this.pixels,s=this.width*this.height,u=a.length,f=[];for(let h=0;h<u;h++){i=n.createEmptyBand(e,s),t=a[h];for(let e=0;e<s;e++)r=t[e],i[e]=r>o?o:r<l?l:r;f.push(i)}this.pixels=f,this.pixelType=e}extractBands(e){let{pixels:t,statistics:r}=this;if(null==e||0===e.length||!t||0===t.length)return this;let i=t.length,l=e.some(e=>e>=t.length),o=i===e.length&&!e.some((e,t)=>e!==t);if(l||o)return this;let a=this.bandMasks?.length===i?e.map(e=>this.bandMasks[e]):void 0,{mask:s,validPixelCount:u}=this,{width:h,height:f}=this;return a?.length&&(s=n.combineBandMasks(a),u=s.filter(e=>!!e).length),new n({pixelType:this.pixelType,width:h,height:f,mask:s,bandMasks:a,validPixelCount:u,maskIsAlpha:this.maskIsAlpha,pixels:e.map(e=>t[e]),statistics:r&&e.map(e=>r[e])})}clone(){let e=new n({width:this.width,height:this.height,pixelType:this.pixelType,maskIsAlpha:this.maskIsAlpha,validPixelCount:this.validPixelCount,premultiplyAlpha:this.premultiplyAlpha,depthCount:this.depthCount});null!=this.mask&&(e.mask=new Uint8Array(this.mask)),this.noDataValues&&(e.noDataValues=[...this.noDataValues]),this.bandMasks&&(e.bandMasks=this.bandMasks.map(e=>new Uint8Array(e)));let t,r=n.getPixelArrayConstructor(this.pixelType);if(this.pixels&&this.pixels.length>0){e.pixels=[];let n=!!this.pixels[0].slice;for(t=0;t<this.pixels.length;t++)e.pixels[t]=n?this.pixels[t].slice():new r(this.pixels[t])}if(this.statistics)for(e.statistics=[],t=0;t<this.statistics.length;t++)e.statistics[t]=(0,a.o8)(this.statistics[t]);return e}getTransferableObject(){let{pixels:e,bandMasks:t,mask:r}=this;this.pixels=[],this.bandMasks=void 0,this.mask=void 0;let n=this.toJSON();this.pixels=e,this.bandMasks=t,this.mask=r,n.pixels=e&&[...e],n.bandMasks=t&&[...t],n.mask=r;let i=[];return[...e??[],r,...t??[]].filter(e=>null!=e&&ArrayBuffer.isView(e)).forEach(e=>{e&&!i.includes(e.buffer)&&i.push(e.buffer)}),{pixelBlock:n,transferList:i}}_fillFrom8Bit(e){let t,r,n,i,{mask:l,maskIsAlpha:o,premultiplyAlpha:a,pixels:u}=this;if(!e||!u?.length)return void s.A.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");t=r=n=u[0],u.length>=3?(r=u[1],n=u[2]):2===u.length&&(r=u[1]);let h=new Uint32Array(e),f=this.width*this.height;if(t.length!==f)s.A.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.");else if(null!=l&&l.length===f)if(o)for(i=0;i<f;i++){let e=l[i];if(e){let l=e/255;h[i]=a?e<<24|n[i]*l<<16|r[i]*l<<8|t[i]*l:e<<24|n[i]<<16|r[i]<<8|t[i]}}else for(i=0;i<f;i++)l[i]&&(h[i]=255<<24|n[i]<<16|r[i]<<8|t[i]);else for(i=0;i<f;i++)h[i]=255<<24|n[i]<<16|r[i]<<8|t[i]}_fillFromNon8Bit(e){let{pixels:t,mask:r,statistics:n}=this;if(!e||!t?.length)return void s.A.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");let i=this.pixelType,l=1,o=0,a=1;if(n&&n.length>0){for(let e of n)if(null!=e.minValue&&(o=Math.min(o,e.minValue)),null!=e.maxValue&&null!=e.minValue){let t=e.maxValue-e.minValue;a=Math.max(a,t)}l=255/a}else{let e=255;"s8"===i?(o=-128,e=127):"u16"===i?e=65535:"s16"===i?(o=-32768,e=32767):"u32"===i?e=4294967295:"s32"===i?(o=-2147483648,e=2147483647):"f32"===i?(o=-34e38,e=34e38):"f64"===i&&(o=-Number.MAX_VALUE,e=Number.MAX_VALUE),l=255/(e-o)}let u,h,f,c,p,d=new Uint32Array(e),m=this.width*this.height;if(u=h=f=t[0],u.length!==m)return s.A.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.");if(t.length>=2)if(h=t[1],t.length>=3&&(f=t[2]),null!=r&&r.length===m)for(c=0;c<m;c++)r[c]&&(d[c]=255<<24|(f[c]-o)*l<<16|(h[c]-o)*l<<8|(u[c]-o)*l);else for(c=0;c<m;c++)d[c]=255<<24|(f[c]-o)*l<<16|(h[c]-o)*l<<8|(u[c]-o)*l;else if(null!=r&&r.length===m)for(c=0;c<m;c++)p=(u[c]-o)*l,r[c]&&(d[c]=255<<24|p<<16|p<<8|p);else for(c=0;c<m;c++)p=(u[c]-o)*l,d[c]=255<<24|p<<16|p<<8|p}_fillFrom32Bit(e){let t,r,n,i,{pixels:l,mask:o}=this;if(!e||!l?.length)return s.A.getLogger(this).error("getAsRGBAFloat()","Unable to convert to RGBA. The input pixel block is empty.");t=r=n=l[0],l.length>=3?(r=l[1],n=l[2]):2===l.length&&(r=l[1]);let a=this.width*this.height;if(t.length!==a)return s.A.getLogger(this).error("getAsRGBAFloat()","Unable to convert to RGBA. The pixelblock is invalid.");let u=0;if(null!=o&&o.length===a)for(i=0;i<a;i++)e[u++]=t[i],e[u++]=r[i],e[u++]=n[i],e[u++]=1&o[i];else for(i=0;i<a;i++)e[u++]=t[i],e[u++]=r[i],e[u++]=n[i],e[u++]=1}};(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"width",void 0),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"height",void 0),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"pixelType",void 0),(0,i.Cg)([(0,u.wg)("pixelType")],c.prototype,"castPixelType",null),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"validPixelCount",void 0),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"mask",void 0),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"maskIsAlpha",void 0),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"pixels",void 0),(0,i.Cg)([(0,u.MZ)()],c.prototype,"premultiplyAlpha",void 0),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"statistics",void 0),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"depthCount",void 0),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"noDataValues",void 0),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"bandMasks",void 0),c=n=(0,i.Cg)([(0,u.$K)("esri.layers.support.PixelBlock")],c)},87186(e,t,r){r.d(t,{A:()=>A});var n,i=r(32198),l=r(25482),o=r(4718),a=r(91429),s=r(5443),u=r(16930);function h(e){return e=Number(e),isNaN(e)?void 0:e}let f=class extends l.o{static{n=this}constructor(e){super(e),this.name=null,this.minWavelength=void 0,this.maxWavelength=void 0,this.radianceBias=void 0,this.radianceGain=void 0,this.reflectanceBias=void 0,this.reflectanceGain=void 0,this.solarIrradiance=void 0}clone(){return new n({name:this.name,minWavelength:this.minWavelength,maxWavelength:this.maxWavelength,radianceBias:this.radianceBias,radianceGain:this.radianceGain,reflectanceBias:this.reflectanceBias,reflectanceGain:this.reflectanceGain,solarIrradiance:this.solarIrradiance})}};(0,i.Cg)([(0,a.MZ)({json:{name:"BandName",write:!0}})],f.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:{source:["WavelengthMin","Wavelength","WAVELENGTH"],reader:(e,t)=>h(t.WavelengthMin??t.Wavelength??t.WAVELENGTH)},write:{target:"WavelengthMin"}}})],f.prototype,"minWavelength",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"WavelengthMax",read:{reader:h},write:!0}})],f.prototype,"maxWavelength",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"RadianceBias",read:{reader:h},write:!0}})],f.prototype,"radianceBias",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"RadianceGain",read:{reader:h},write:!0}})],f.prototype,"radianceGain",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"ReflectanceBias",read:{reader:h},write:!0}})],f.prototype,"reflectanceBias",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"ReflectanceGain",read:{reader:h},write:!0}})],f.prototype,"reflectanceGain",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"SolarIrradiance",read:{reader:h},write:!0}})],f.prototype,"solarIrradiance",void 0),f=n=(0,i.Cg)([(0,a.$K)("esri.layers.support.RasterBandInfo")],f);const c=f;var p,d=r(13868),m=r(36005),g=r(43937);function y(e){return e=Number(e),isNaN(e)?void 0:e}let x=class extends l.o{static{p=this}constructor(e){super(e),this.acquisitionDate=void 0,this.cloudCover=void 0,this.productName=void 0,this.sensorName=null,this.sensorAzimuth=void 0,this.sensorElevation=void 0,this.sunAzimuth=void 0,this.sunElevation=void 0}readAcquisitionDate(e){return new Date(e)}writeAcquisitionDate(e,t){t.AcquisitionDate=e.getTime()}clone(){return new p({acquisitionDate:this.acquisitionDate,cloudCover:this.cloudCover,productName:this.productName,sensorName:this.sensorName,sensorAzimuth:this.sensorAzimuth,sensorElevation:this.sensorElevation,sunAzimuth:this.sunAzimuth,sunElevation:this.sunElevation})}};(0,i.Cg)([(0,a.MZ)({type:Date,json:{name:"AcquisitionDate",write:!0}})],x.prototype,"acquisitionDate",void 0),(0,i.Cg)([(0,m.w)("acquisitionDate")],x.prototype,"readAcquisitionDate",null),(0,i.Cg)([(0,g.K)("acquisitionDate")],x.prototype,"writeAcquisitionDate",null),(0,i.Cg)([(0,a.MZ)({json:{name:"CloudCover",read:{reader:y},write:!0}})],x.prototype,"cloudCover",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"ProductName",write:!0}})],x.prototype,"productName",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"SensorName",write:!0}})],x.prototype,"sensorName",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"SensorAzimuth",read:{reader:y},write:!0}})],x.prototype,"sensorAzimuth",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"SensorElevation",read:{reader:y},write:!0}})],x.prototype,"sensorElevation",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"SunAzimuth",read:{reader:y},write:!0}})],x.prototype,"sunAzimuth",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"SunElevation",read:{reader:y},write:!0}})],x.prototype,"sunElevation",void 0),x=p=(0,i.Cg)([(0,a.$K)("esri.layers.support.RasterSensorInfo")],x);const w=x;var C,M=r(20223);let b=class extends l.o{static{C=this}constructor(e){super(e),this.attributeTable=null,this.bandCount=null,this.colormap=null,this.extent=null,this.format=void 0,this.height=null,this.width=null,this.histograms=null,this.keyProperties={},this.multidimensionalInfo=null,this.noDataValue=null,this.pixelSize=null,this.pixelType=null,this.isPseudoSpatialReference=!1,this.spatialReference=null,this.statistics=null,this.storageInfo=null,this.transform=null}get bandInfos(){let e=this.keyProperties.BandProperties,{bandCount:t}=this;if(!e?.length||e.length<t){let e=[];for(let r=1;r<=t;r++)e.push(new c({name:"band_"+r}));return e}let r=e.map(e=>c.fromJSON(e));for(let e=0;e<r.length;e++)r[e].name=r[e].name||"band_"+(e+1);return r}get dataType(){let e=this.keyProperties?.DataType?.toLowerCase()??"generic";return"stdtime"===e?"standard-time":e}get nativeExtent(){return this._get("nativeExtent")||this.extent}set nativeExtent(e){e&&this._set("nativeExtent",e)}get nativePixelSize(){if(null==this.transform||!this.transform.affectsPixelSize)return this.pixelSize;let e=this.nativeExtent;return{x:e.width/this.width,y:e.height/this.height}}get hasMultidimensionalTranspose(){return!!this.storageInfo?.transposeInfo}get sensorInfo(){if(this.keyProperties?.SensorName)return w.fromJSON(this.keyProperties)}clone(){return new C({attributeTable:(0,o.o8)(this.attributeTable),bandCount:this.bandCount,colormap:(0,o.o8)(this.colormap),extent:(0,o.o8)(this.extent),format:this.format,height:this.height,width:this.width,histograms:(0,o.o8)(this.histograms),keyProperties:(0,o.o8)(this.keyProperties),multidimensionalInfo:(0,o.o8)(this.multidimensionalInfo),noDataValue:this.noDataValue,pixelSize:(0,o.o8)(this.pixelSize),pixelType:this.pixelType,isPseudoSpatialReference:this.isPseudoSpatialReference,spatialReference:(0,o.o8)(this.spatialReference),statistics:(0,o.o8)(this.statistics),storageInfo:(0,o.o8)(this.storageInfo),transform:(0,o.o8)(this.transform)})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],b.prototype,"attributeTable",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],b.prototype,"bandCount",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],b.prototype,"bandInfos",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],b.prototype,"colormap",void 0),(0,i.Cg)([(0,a.MZ)({type:String,readOnly:!0})],b.prototype,"dataType",null),(0,i.Cg)([(0,a.MZ)({type:s.A,json:{write:!0}})],b.prototype,"extent",void 0),(0,i.Cg)([(0,a.MZ)({type:s.A,json:{write:!0}})],b.prototype,"nativeExtent",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],b.prototype,"nativePixelSize",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],b.prototype,"format",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],b.prototype,"height",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],b.prototype,"width",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],b.prototype,"hasMultidimensionalTranspose",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],b.prototype,"histograms",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],b.prototype,"keyProperties",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],b.prototype,"multidimensionalInfo",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],b.prototype,"noDataValue",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],b.prototype,"pixelSize",void 0),(0,i.Cg)([(0,a.MZ)({type:d.e8.apiValues,json:{write:!0}})],b.prototype,"pixelType",void 0),(0,i.Cg)([(0,a.MZ)()],b.prototype,"isPseudoSpatialReference",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],b.prototype,"sensorInfo",null),(0,i.Cg)([(0,a.MZ)({type:u.A,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],b.prototype,"statistics",void 0),(0,i.Cg)([(0,a.MZ)({type:M.A,json:{write:!0}})],b.prototype,"storageInfo",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],b.prototype,"transform",void 0),b=C=(0,i.Cg)([(0,a.$K)("esri.layers.support.RasterInfo")],b);const A=b},20223(e,t,r){var n,i=r(32198),l=r(25482),o=r(4718),a=r(91429),s=r(86738);let u=class extends l.o{constructor(){super(...arguments),this.blockWidth=void 0,this.blockHeight=void 0,this.compression=null,this.origin=null,this.firstPyramidLevel=null,this.maximumPyramidLevel=null,this.pyramidScalingFactor=2,this.pyramidBlockWidth=null,this.pyramidBlockHeight=null,this.isBsqTile=!1,this.isVirtualTileInfo=!1,this.tileInfo=null,this.transposeInfo=null,this.blockBoundary=null}static{n=this}clone(){return new n({blockWidth:this.blockWidth,blockHeight:this.blockHeight,compression:this.compression,origin:(0,o.o8)(this.origin),firstPyramidLevel:this.firstPyramidLevel,maximumPyramidLevel:this.maximumPyramidLevel,pyramidResolutions:(0,o.o8)(this.pyramidResolutions),pyramidScalingFactor:this.pyramidScalingFactor,pyramidBlockWidth:this.pyramidBlockWidth,pyramidBlockHeight:this.pyramidBlockHeight,isBsqTile:this.isBsqTile,isVirtualTileInfo:this.isVirtualTileInfo,tileInfo:(0,o.o8)(this.tileInfo),transposeInfo:(0,o.o8)(this.transposeInfo),blockBoundary:(0,o.o8)(this.blockBoundary)})}};(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],u.prototype,"blockWidth",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],u.prototype,"blockHeight",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],u.prototype,"compression",void 0),(0,i.Cg)([(0,a.MZ)({type:s.A,json:{write:!0}})],u.prototype,"origin",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],u.prototype,"firstPyramidLevel",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],u.prototype,"maximumPyramidLevel",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"pyramidResolutions",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],u.prototype,"pyramidScalingFactor",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],u.prototype,"pyramidBlockWidth",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],u.prototype,"pyramidBlockHeight",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"isBsqTile",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],u.prototype,"isVirtualTileInfo",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"tileInfo",void 0),(0,i.Cg)([(0,a.MZ)()],u.prototype,"transposeInfo",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"blockBoundary",void 0),u=n=(0,i.Cg)([(0,a.$K)("esri.layers.support.RasterStorageInfo")],u);const h=u;r.d(t,["A",0,h])},4151(e,t,r){r.d(t,{A:()=>n});class n{constructor(e=null,t=null,r=null){this.minValue=e,this.maxValue=t,this.noDataValue=r}}},13868(e,t,r){var n=r(66552);const i=(0,n.O)()({RSP_NearestNeighbor:"nearest",RSP_BilinearInterpolation:"bilinear",RSP_CubicConvolution:"cubic",RSP_Majority:"majority"}),l=(0,n.O)()({esriNoDataMatchAny:"any",esriNoDataMatchAll:"all"}),o=(0,n.O)()({U1:"u1",U2:"u2",U4:"u4",U8:"u8",S8:"s8",U16:"u16",S16:"s16",U32:"u32",S32:"s32",F32:"f32",F64:"f64",C64:"c64",C128:"c128",UNKNOWN:"unknown"});r.d(t,["SZ",0,i,"e8",0,o,"hm",0,l])},85676(e,t,r){r.d(t,{A:()=>d});var n=r(32198),i=r(25482),l=r(53966),o=r(91429),a=r(94778),s=r(47520),u=r(51927),h=r(51181),f=r(87186),c=r(67369),p=r(88178);let d=class extends i.o{constructor(e){super(e),this.lookup={rendererJSON:{}},this.canRenderInWebGL=!1}bind(){let e,{rendererJSON:t}=this;if(!t)return{success:!1};switch(this.lookup={rendererJSON:{}},t.type){case"uniqueValue":e=this._updateUVRenderer(t);break;case"rasterColormap":e=this._updateColormapRenderer(t);break;case"rasterStretch":e=this._updateStretchRenderer(t);break;case"classBreaks":e=this._updateClassBreaksRenderer(t);break;case"rasterShadedRelief":e=this._updateShadedReliefRenderer(t);break;case"vectorField":e=this._updateVectorFieldRenderer();break;case"flowRenderer":e=this._updateFlowRenderer()}return e}symbolize(e){let t=e?.pixelBlock;if(!m(t))return t;if(e.simpleStretchParams&&"rasterStretch"===this.rendererJSON.type)return this.simpleStretch(t,e.simpleStretchParams);try{let r;switch(t.pixels.length>3&&(t=t.extractBands(e.bandIds??[0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":r=this._symbolizeColormap(t);break;case"classBreaks":r=this._symbolizeClassBreaks(t);break;case"rasterStretch":r=this._symbolizeStretch(t,e.bandIds);break;case"rasterShadedRelief":{let n=e.extent,i=n.spatialReference.isGeographic,l={x:(n.xmax-n.xmin)/t.width,y:(n.ymax-n.ymin)/t.height};r=this._symbolizeShadedRelief(t,{isGCS:i,resolution:l});break}}return r}catch(e){return l.A.getLogger(this).error("symbolize",e.message),t}}simpleStretch(e,t){if(!m(e))return e;try{return e.pixels.length>3&&(e=e.extractBands([0,1,2])),(0,u._N)(e,{...t,isRenderer:!0})}catch(t){return l.A.getLogger(this).error("symbolize",t.message),e}}generateWebGLParameters(e){let{rendererJSON:t}=this;switch(t.type){case"uniqueValue":case"rasterColormap":case"classBreaks":return this._generateColormapWebGLParams("classBreaks"===t.type);case"rasterStretch":return this._generateStretchWebGLParams(e.pixelBlock,t,e.bandIds);case"rasterShadedRelief":return this._generateShadedReliefWebGLParams(t,e.isGCS,e.resolution??void 0);case"vectorField":return this._generateVectorFieldWebGLParams(t);default:return null}}_isLUTChanged(e){let t=this.lookup.rendererJSON;if(!t)return!0;let{rendererJSON:r}=this;if("colorRamp"in r&&r.colorRamp){let n=r.colorRamp;if(e)return JSON.stringify(n)!==JSON.stringify(t.colorRamp)}return JSON.stringify(r)!==JSON.stringify(t)}_symbolizeColormap(e){return this._isLUTChanged()&&!this.bind().success?e:(0,s.qL)(e,this.lookup.colormapLut)}_symbolizeClassBreaks(e){let{canUseIndexedLUT:t}=this._analyzeClassBreaks(this.rendererJSON);return this._isLUTChanged()&&!this.bind().success?e:t?(0,s.qL)(e,this.lookup.colormapLut):(0,s.Hx)(e,this.lookup.remapLut??[])}_symbolizeStretch(e,t){if(!e)return null;let r,{rasterInfo:n,lookup:i}=this,{pixelType:l,bandCount:o}=n,a=this.rendererJSON,h=["u8","u16","s8","s16"].includes(l),{dra:f}=a,{gamma:c}=i;if(f&&(t=null),"histogramEqualization"===a.stretchType){let l=f?null:i.histogramLut,o=(0,u.DP)(a,{rasterInfo:n,pixelBlock:e,bandIds:t,returnHistogramLut:!l}),h="u8"===n.pixelType&&!f&&(0,u.zt)(n.histograms?.[0])?e:(0,u._N)(e,{...o,gamma:c,isRenderer:!0});r=(0,s.eH)(h,{lut:f?o.histogramLut:t?.length?t.map(e=>l[e]):l,offset:0})}else if(h){let h;if(f){let r=(0,u.DP)(a,{rasterInfo:n,pixelBlock:e,bandIds:t});h=(0,u.RP)({pixelType:l,...r,gamma:c,rounding:"floor"})}else{if(this._isLUTChanged()&&!this.bind().success)return e;h=i.stretchLut}if(!h)return e;o>1&&null!=t&&t.length===e?.pixels.length&&h.lut.length===o&&(h={lut:t.map(e=>h.lut[e]),offset:h.offset}),r=(0,s.eH)(e,h)}else{let i=(0,u.DP)(a,{rasterInfo:n,pixelBlock:e,bandIds:t});r=(0,u._N)(e,{...i,gamma:c,isRenderer:!0})}if(a.colorRamp){if(this._isLUTChanged(!0)&&!this.bind().success)return e;r=(0,s.qL)(r,i.colormapLut)}return r}_symbolizeShadedRelief(e,t){let r=this.rendererJSON,n={...r,...t},i=(0,h.fw)(e,n);if(!r.colorRamp||this._isLUTChanged(!0)&&!this.bind().success)return i;let{hsvMap:l}=this.lookup;if(!l)return i;let o=this.rasterInfo.statistics?.[0]??{min:0,max:8e3};return(0,h.SC)(i,e,l,o),i}_isVectorFieldData(){let{bandCount:e,dataType:t}=this.rasterInfo;return 2===e&&("vector-magdir"===t||"vector-uv"===t)}_updateVectorFieldRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; VectorFieldRenderer only supports "vector-magdir" and "vector-uv".`}}_updateFlowRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; FlowRenderer only supports "vector-magdir" and "vector-uv".`}}_updateUVRenderer(e){let{bandCount:t,attributeTable:r,pixelType:n}=this.rasterInfo,i=e.field1;if(!i)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};let l=e.defaultSymbol,o=1===t&&["u8","s8"].includes(n);if(!(0,p.hu)(this.rasterInfo,i)&&!o)return{success:!1,error:"Unsupported data; UniqueValueRenderer is only supported on single band data with a valid raster attribute table."};let a=[];if(null!=r){let t=r.fields.find(e=>"value"===e.name.toLowerCase());if(!t)return{success:!1,error:"Unsupported data; the data's raster attribute table does not have a value field."};r.features.forEach(r=>{let n=(e.uniqueValueInfos?.find(e=>String(e.value)===String(r.attributes[i])))?.symbol?.color;n?a.push([r.attributes[t.name]].concat(n)):l&&a.push([r.attributes[t.name]].concat(l.color))})}else{if("value"!==i.toLowerCase())return{success:!1,error:'Unsupported renderer; UniqueValueRenderer.field must be "Value" when raster attribute table is not available.'};e.uniqueValueInfos?.forEach(e=>{let t=e?.symbol?.color;t?a.push([parseInt(""+e.value,10)].concat(t)):l&&a.push([parseInt(""+e.value,10)].concat(l?.color))})}if(0===a.length)return{success:!1,error:"Invalid UniqueValueRenderer. Cannot find matching records in the raster attribute table."};let u=(0,s.zg)({colormap:a});return this.lookup={rendererJSON:e,colormapLut:u},this.canRenderInWebGL=(0,p.WN)(u?.indexedColormap),{success:!0}}_updateColormapRenderer(e){if(!(0,p.FA)(this.rasterInfo))return{success:!1,error:"Unsupported data; the data source does not have a colormap."};let t=e.colormapInfos.map(e=>[e.value].concat(e.color)).sort((e,t)=>e[0]-t[0]);if(!t||0===t.length)return{success:!1,error:"Unsupported renderer; ColormapRenderer must have meaningful colormapInfos."};let r=(0,s.zg)({colormap:t});return this.lookup={rendererJSON:e,colormapLut:r},this.canRenderInWebGL=(0,p.WN)(r?.indexedColormap),{success:!0}}_updateShadedReliefRenderer(e){if(!(0,p.iL)(this.rasterInfo))return{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation", or single band float/s16 data.`};if(e.colorRamp){let t=(0,c.R8)(e.colorRamp,{interpolateAlpha:!0}),r=(0,s.zg)({colormap:t}),n=(0,c.S2)(r.indexedColormap);this.lookup={rendererJSON:e,colormapLut:r,hsvMap:n}}else this.lookup={rendererJSON:e};return this.canRenderInWebGL=!0,{success:!0}}_analyzeClassBreaks(e){let{attributeTable:t,pixelType:r}=this.rasterInfo,n=t?.fields.find(e=>"value"===e.name.toLowerCase()),i=t?.fields.find(t=>t.name.toLowerCase()===e.field.toLowerCase()),l=null!=n&&null!==i;return{canUseIndexedLUT:["u8","u16","s8","s16"].includes(r)||l,tableValueField:n,tableBreakField:i}}_updateClassBreaksRenderer(e){let{attributeTable:t}=this.rasterInfo,{canUseIndexedLUT:r,tableValueField:n,tableBreakField:i}=this._analyzeClassBreaks(e),l=e.classBreakInfos;if(!l?.length)return{success:!1,error:"Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos."};let o=l.sort((e,t)=>e.classMaxValue-t.classMaxValue),u=o[o.length-1],h=e.minValue;if(!r){let t=[];for(let e=0;e<o.length;e++)t.push({value:o[e].classMinValue??h,mappedColor:o[e].symbol.color}),h=o[e].classMaxValue;return t.push({value:u.classMaxValue,mappedColor:u.symbol.color}),this.lookup={rendererJSON:e,remapLut:t},this.canRenderInWebGL=!1,{success:!0}}let f=[];if(null!=t&&null!=n&&null!==i&&n!==i){let r=n.name,l=i.name,a=o[o.length-1],{classMaxValue:s}=a;h=e.minValue;for(let e of t.features){let t=e.attributes[r],n=e.attributes[l],i=n===s?a:n<h?null:o.find(({classMaxValue:e})=>e>n);i&&f.push([t].concat(i.symbol.color))}}else{let[t,r]=(0,a.hP)(this.rasterInfo.pixelType);h=Math.max(t,Math.floor(e.minValue));for(let e=0;e<o.length;e++){let t=o[e],n=Math.min(r,Math.ceil(t.classMaxValue));for(let e=h;e<n;e++)f.push([e].concat(t.symbol.color));h=n}(u.classMaxValue===h||h===r)&&f.push([h].concat(u.symbol.color))}let c=(0,s.zg)({colormap:f,fillUnspecified:!1});return this.lookup={rendererJSON:e,colormapLut:c},this.canRenderInWebGL=(0,p.WN)(c?.indexedColormap),{success:!0}}_updateStretchRenderer(e){let{stretchType:t,dra:r}=e;if(!("none"===t||e.statistics?.length||function(e){return null!=e&&e.length>0&&null!=e[0].min&&null!=e[0].max}(this.rasterInfo.statistics)||r))return{success:!1,error:"Unsupported renderer; StretchRenderer.customStatistics is required when dynamic range adjustment is not used."};let n=e.histograms||this.rasterInfo.histograms;(function(e){return"percentClip"===e||"histogramEqualization"===e})(e.stretchType)&&!n?.length&&!r&&(t="minMax");let{computeGamma:i,useGamma:l,colorRamp:o}=e,{gamma:a}=e;if(l&&i&&!a?.length){let t=e.statistics?.length?e.statistics:this.rasterInfo.statistics;a=(0,u.fP)(this.rasterInfo.pixelType,t)}let h=this.rasterInfo.pixelType,f=!r&&["u8","u16","s8","s16"].includes(h);if("histogramEqualization"===t){let t=n.map(e=>(0,u.WF)(e));this.lookup={rendererJSON:e,histogramLut:t}}else if(f){let t=(0,u.DP)(e,{rasterInfo:this.rasterInfo}),r=(0,u.RP)({pixelType:h,...t,gamma:l?a:null,rounding:"floor"});this.lookup={rendererJSON:e,stretchLut:r}}else this.lookup={rendererJSON:e};if(o&&!function(e){return"algorithmic"===e.type&&["0,0,0,255","0,0,0"].includes(e.fromColor.join(","))&&["255,255,255,255","255,255,255"].includes(e.toColor.join(","))}(o)){let t=(0,c.R8)(o,{interpolateAlpha:!0});this.lookup.colormapLut=(0,s.zg)({colormap:t}),this.lookup.rendererJSON=e}return this.lookup.gamma=l&&a?.length?a:null,this.canRenderInWebGL="histogramEqualization"!==t,{success:!0}}_generateColormapWebGLParams(e){let{indexedColormap:t,offset:r}=this.lookup.colormapLut||{};return{colormap:t,colormapOffset:r,isClassBreaks:e,type:"lut"}}_generateStretchWebGLParams(e,t,r){let{colormapLut:n}=this.lookup,i=t.colorRamp?n?.indexedColormap:null,l=t.colorRamp?n?.offset:null;"histogramEqualization"===t.stretchType&&(t={...t,stretchType:"minMax"});let{gamma:o}=this.lookup,a=!(!t.useGamma||!o?.some(e=>1!==e)),s=0;null!=e&&(s=e.getPlaneCount(),2===s&&((e=e.clone()).statistics=[e.statistics[0]],e.pixels=[e.pixels[0]]));let{bandCount:h}=this.rasterInfo,f=Math.min(3,r?.length||s||h,h),c=i||a?1:255,p=new Float32Array(f);if(a&&o)for(let e=0;e<f;e++)o[e]>1?o[e]>2?p[e]=6.5+(o[e]-2)**2.5:p[e]=6.5+100*(2-o[e])**4:p[e]=1;let d=a&&o?[o[0],o[1]??o[0],o[2]??o[0]]:[1,1,1],m=a?[p[0],p[1]??p[0],p[2]??p[0]]:[1,1,1];if(t.dra&&null==e&&("minMax"===t.stretchType||"standardDeviation"===t.stretchType))return{bandCount:f,minOutput:(t.min??0)/c,maxOutput:(t.max??255)/c,minCutOff:[0,0,0],maxCutOff:[1,1,1],factor:[1,1,1],useGamma:a,gamma:d,gammaCorrection:m,colormap:i,colormapOffset:l,stretchType:t.stretchType,dynamicRangeAdjustment:t.dra,numberOfStandardDeviations:t.numberOfStandardDeviations??2,type:"stretch"};let{minCutOff:g,maxCutOff:y,minOutput:x,maxOutput:w}=(0,u.DP)(t,{rasterInfo:this.rasterInfo,pixelBlock:e,bandIds:r});1===g.length&&(g[2]=g[1]=g[0]),1===y.length&&(y[2]=y[1]=y[0]);let C=y.map((e,t)=>y[t]===g[t]?0:(w-x)/(y[t]-g[t])/c);return{bandCount:f,minOutput:x/c,maxOutput:w/c,minCutOff:g,maxCutOff:y,factor:C,useGamma:a,gamma:d,gammaCorrection:m,colormap:i,colormapOffset:l,stretchType:t.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(e,t=!1,r={x:0,y:0}){let{colormapLut:n}=this.lookup,i=e.colorRamp?n?.indexedColormap:null,l=e.colorRamp?n?.offset:null,o={...e,isGCS:t,resolution:r},a=(0,h.ng)(o),s=this.rasterInfo.statistics?.[0];return{...a,minValue:s?.min??0,maxValue:s?.max??8e3,hillshadeType:"traditional"===e.hillshadeType?0:1,type:"hillshade",colormap:i,colormapOffset:l}}_generateVectorFieldWebGLParams(e){let{style:t,inputUnit:r,outputUnit:n,visualVariables:i,symbolTileSize:l,flowRepresentation:o}=e,a=this.rasterInfo.statistics?.[0].min??0,s=this.rasterInfo.statistics?.[0].max??50,u=i?.find(e=>"sizeInfo"===e.type)??{maxDataValue:s,maxSize:.8*l,minDataValue:a,minSize:.2*l},h=u.minDataValue??a,f=u.maxDataValue??s,c=null!=u.maxSize&&null!=u.minSize?[u.minSize/l,u.maxSize/l]:[.2,.8];"wind_speed"===t&&(c[0]=c[1]=(c[0]+c[1])/2);let p=null!=h&&null!=f?[h,f]:null,d=null;if("classified_arrow"===t)if(null!=h&&null!=f&&null!=u){d=[];let e=(u.maxDataValue-u.minDataValue)/5;for(let t=0;t<6;t++)d.push(u.minDataValue+e*t)}else d=[0,1e-6,3.5,7,10.5,14];let m="flow_to"===o==("ocean_current_kn"===t||"ocean_current_m"===t)?0:Math.PI,g=i?.find(e=>"rotationInfo"===e.type);return{breakValues:d,dataRange:p,inputUnit:r,outputUnit:n,symbolTileSize:l,symbolPercentRange:c,style:t||"single_arrow",rotation:m,rotationType:this.rasterInfo.storageInfo?.tileInfo&&"vector-uv"===this.rasterInfo.dataType?"geographic":g?.rotationType||e.rotationType,type:"vectorField"}}};function m(e){return(0,s.AB)(e)&&0!==e.validPixelCount}(0,n.Cg)([(0,o.MZ)({json:{write:!0}})],d.prototype,"rendererJSON",void 0),(0,n.Cg)([(0,o.MZ)({type:f.A,json:{write:!0}})],d.prototype,"rasterInfo",void 0),(0,n.Cg)([(0,o.MZ)({json:{write:!0}})],d.prototype,"lookup",void 0),(0,n.Cg)([(0,o.MZ)()],d.prototype,"canRenderInWebGL",void 0),d=(0,n.Cg)([(0,o.$K)("esri.renderers.support.RasterSymbolizer")],d)},67369(e,t,r){r.d(t,{L7:()=>o,M5:()=>p,R8:()=>y,S2:()=>x,hf:()=>M,hs:()=>c,iv:()=>g,kH:()=>s,vL:()=>b});var n=r(85334),i=r(66552),l=r(12195);const o=["random","ndvi","ndvi2","ndvi3","elevation","gray","hillshade"],a=[{id:"aspect",type:"multipart",colorRamps:[{fromColor:[190,190,190],toColor:[255,45,8]},{fromColor:[255,45,8],toColor:[255,181,61]},{fromColor:[255,181,61],toColor:[255,254,52]},{fromColor:[255,254,52],toColor:[0,251,50]},{fromColor:[0,251,50],toColor:[255,254,52]},{fromColor:[0,253,255],toColor:[0,181,255]},{fromColor:[0,181,255],toColor:[26,35,253]},{fromColor:[26,35,253],toColor:[255,57,251]},{fromColor:[255,57,251],toColor:[255,45,8]}]},{id:"black-to-white",fromColor:[0,0,0],toColor:[255,255,255]},{id:"blue-bright",fromColor:[204,204,255],toColor:[0,0,224]},{id:"blue-light-to-dark",fromColor:[211,229,232],toColor:[46,100,140]},{id:"blue-green-bright",fromColor:[203,245,234],toColor:[48,207,146]},{id:"blue-green-light-to-dark",fromColor:[216,242,237],toColor:[21,79,74]},{id:"brown-light-to-dark",fromColor:[240,236,170],toColor:[102,72,48]},{id:"brown-to-blue-green-diverging-right",type:"multipart",colorRamps:[{fromColor:[156,85,31],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[33,130,145]}]},{id:"brown-to-blue-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[110,70,45],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[48,100,102]}]},{id:"coefficient-bias",fromColor:[214,214,255],toColor:[0,57,148]},{id:"cold-to-hot-diverging",type:"multipart",colorRamps:[{fromColor:[69,117,181],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[214,47,39]}]},{id:"condition-number",type:"multipart",colorRamps:[{fromColor:[0,97,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,34,0]}]},{id:"cyan-to-purple",type:"multipart",colorRamps:[{fromColor:[0,245,245],toColor:[0,0,245]},{fromColor:[0,0,245],toColor:[245,0,245]}]},{id:"cyan-light-to-blue-dark",type:"multipart",colorRamps:[{fromColor:[182,237,240],toColor:[31,131,224]},{fromColor:[31,131,224],toColor:[9,9,145]}]},{id:"distance",fromColor:[255,200,0],toColor:[0,0,255]},{id:"elevation1",type:"multipart",colorRamps:[{fromColor:[175,240,233],toColor:[255,255,179]},{fromColor:[255,255,179],toColor:[0,128,64]},{fromColor:[0,128,64],toColor:[252,186,3]},{fromColor:[252,186,3],toColor:[128,0,0]},{fromColor:[120,0,0],toColor:[105,48,13]},{fromColor:[105,48,13],toColor:[171,171,171]},{fromColor:[171,171,171],toColor:[255,252,255]}]},{id:"elevation2",type:"multipart",colorRamps:[{fromColor:[118,219,211],toColor:[255,255,199]},{fromColor:[255,255,199],toColor:[255,255,128]},{fromColor:[255,255,128],toColor:[217,194,121]},{fromColor:[217,194,121],toColor:[135,96,38]},{fromColor:[135,96,38],toColor:[150,150,181]},{fromColor:[150,150,181],toColor:[181,150,181]},{fromColor:[181,150,181],toColor:[255,252,255]}]},{id:"errors",fromColor:[255,235,214],toColor:[196,10,10]},{id:"gray-light-to-dark",fromColor:[219,219,219],toColor:[69,69,69]},{id:"green-bright",fromColor:[204,255,204],toColor:[14,204,14]},{id:"green-light-to-dark",fromColor:[220,245,233],toColor:[34,102,51]},{id:"green-to-blue",type:"multipart",colorRamps:[{fromColor:[32,204,16],toColor:[0,242,242]},{fromColor:[0,242,242],toColor:[2,33,227]}]},{id:"orange-bright",fromColor:[255,235,204],toColor:[240,118,5]},{id:"orange-light-to-dark",fromColor:[250,233,212],toColor:[171,65,36]},{id:"partial-spectrum",type:"multipart",colorRamps:[{fromColor:[242,241,162],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]},{fromColor:[252,3,69],toColor:[176,7,237]},{fromColor:[176,7,237],toColor:[2,29,173]}]},{id:"partial-spectrum-1-diverging",type:"multipart",colorRamps:[{fromColor:[135,38,38],toColor:[240,149,12]},{fromColor:[240,149,12],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[74,80,181]},{fromColor:[74,80,181],toColor:[39,32,122]}]},{id:"partial-spectrum-2-diverging",type:"multipart",colorRamps:[{fromColor:[115,77,42],toColor:[201,137,52]},{fromColor:[201,137,52],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[91,63,176]},{fromColor:[91,63,176],toColor:[81,13,97]}]},{id:"pink-to-yellow-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[158,30,113],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[99,110,45]}]},{id:"pink-to-yellow-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,47,73],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[22,59,15]}]},{id:"precipitation",type:"multipart",colorRamps:[{fromColor:[194,82,60],toColor:[237,161,19]},{fromColor:[237,161,19],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,219,0]},{fromColor:[0,219,0],toColor:[32,153,143]},{fromColor:[32,153,143],toColor:[11,44,122]}]},{id:"prediction",type:"multipart",colorRamps:[{fromColor:[40,146,199],toColor:[250,250,100]},{fromColor:[250,250,100],toColor:[232,16,20]}]},{id:"purple-bright",fromColor:[255,204,255],toColor:[199,0,199]},{id:"purple-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[77,32,150],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[20,122,11]}]},{id:"purple-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[67,14,89],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[24,79,15]}]},{id:"purple-blue-bright",fromColor:[223,184,230],toColor:[112,12,242]},{id:"purple-blue-light-to-dark",fromColor:[229,213,242],toColor:[93,44,112]},{id:"purple-red-bright",fromColor:[255,204,225],toColor:[199,0,99]},{id:"purple-red-light-to-dark",fromColor:[250,215,246],toColor:[143,17,57]},{id:"red-bright",fromColor:[255,204,204],toColor:[219,0,0]},{id:"red-light-to-dark",fromColor:[255,224,224],toColor:[143,10,10]},{id:"red-to-blue-diverging-bright",type:"multipart",colorRamps:[{fromColor:[196,69,57],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[48,95,207]}]},{id:"red-to-blue-diverging-dark",type:"multipart",colorRamps:[{fromColor:[107,13,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[13,53,97]}]},{id:"red-to-green",type:"multipart",colorRamps:[{fromColor:[245,0,0],toColor:[245,245,0]},{fromColor:[245,245,0],toColor:[0,245,0]}]},{id:"red-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[186,20,20],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[54,145,33]}]},{id:"red-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,21,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[16,69,16]}]},{id:"slope",type:"multipart",colorRamps:[{fromColor:[56,168,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]},{id:"spectrum-full-bright",type:"multipart",colorRamps:[{fromColor:[255,0,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,0,255]}]},{id:"spectrum-full-dark",type:"multipart",colorRamps:[{fromColor:[153,0,0],toColor:[153,153,0]},{fromColor:[153,153,0],toColor:[0,153,153]},{fromColor:[0,153,153],toColor:[0,0,153]}]},{id:"spectrum-full-light",type:"multipart",colorRamps:[{fromColor:[255,153,153],toColor:[255,255,153]},{fromColor:[255,255,153],toColor:[153,255,255]},{fromColor:[153,255,255],toColor:[153,153,255]}]},{id:"surface",type:"multipart",colorRamps:[{fromColor:[112,153,89],toColor:[242,238,162]},{fromColor:[242,238,162],toColor:[242,206,133]},{fromColor:[242,206,133],toColor:[194,140,124]},{fromColor:[194,140,124],toColor:[255,242,255]}]},{id:"temperature",type:"multipart",colorRamps:[{fromColor:[255,252,255],toColor:[255,0,255]},{fromColor:[255,0,255],toColor:[0,0,255]},{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,255,0]},{fromColor:[0,255,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,128,0]},{fromColor:[255,128,0],toColor:[128,0,0]}]},{id:"white-to-black",fromColor:[255,255,255],toColor:[0,0,0]},{id:"yellow-to-dark-red",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[242,167,46]},{fromColor:[242,167,46],toColor:[107,0,0]}]},{id:"yellow-to-green-to-dark-blue",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[56,224,9]},{fromColor:[56,224,9],toColor:[26,147,171]},{fromColor:[26,147,171],toColor:[12,16,120]}]},{id:"yellow-to-red",fromColor:[245,245,0],toColor:[255,0,0]},{id:"yellow-green-bright",fromColor:[236,252,204],toColor:[157,204,16]},{id:"yellow-green-light-to-dark",fromColor:[215,240,175],toColor:[96,107,45]}],s=new i.J({Aspect:"aspect","Black to White":"black-to-white","Blue Bright":"blue-bright","Blue Light to Dark":"blue-light-to-dark","Blue-Green Bright":"blue-green-bright","Blue-Green Light to Dark":"blue-green-light-to-dark","Brown Light to Dark":"brown-light-to-dark","Brown to Blue Green Diverging, Bright":"brown-to-blue-green-diverging-right","Brown to Blue Green Diverging, Dark":"brown-to-blue-green-diverging-dark","Coefficient Bias":"coefficient-bias","Cold to Hot Diverging":"cold-to-hot-diverging","Condition Number":"condition-number","Cyan to Purple":"cyan-to-purple","Cyan-Light to Blue-Dark":"cyan-light-to-blue-dark",Distance:"distance","Elevation #1":"elevation1","Elevation #2":"elevation2",Errors:"errors","Gray Light to Dark":"gray-light-to-dark","Green Bright":"green-bright","Green Light to Dark":"green-light-to-dark","Green to Blue":"green-to-blue","Orange Bright":"orange-bright","Orange Light to Dark":"orange-light-to-dark","Partial Spectrum":"partial-spectrum","Partial Spectrum 1 Diverging":"partial-spectrum-1-diverging","Partial Spectrum 2 Diverging":"partial-spectrum-2-diverging","Pink to YellowGreen Diverging, Bright":"pink-to-yellow-green-diverging-bright","Pink to YellowGreen Diverging, Dark":"pink-to-yellow-green-diverging-dark",Precipitation:"precipitation",Prediction:"prediction","Purple Bright":"purple-bright","Purple to Green Diverging, Bright":"purple-to-green-diverging-bright","Purple to Green Diverging, Dark":"purple-to-green-diverging-dark","Purple-Blue Bright":"purple-blue-bright","Purple-Blue Light to Dark":"purple-blue-light-to-dark","Purple-Red Bright":"purple-red-bright","Purple-Red Light to Dark":"purple-red-light-to-dark","Red Bright":"red-bright","Red Light to Dark":"red-light-to-dark","Red to Blue Diverging, Bright":"red-to-blue-diverging-bright","Red to Blue Diverging, Dark":"red-to-blue-diverging-dark","Red to Green":"red-to-green","Red to Green Diverging, Bright":"red-to-green-diverging-bright","Red to Green Diverging, Dark":"red-to-green-diverging-dark",Slope:"slope","Spectrum-Full Bright":"spectrum-full-bright","Spectrum-Full Dark":"spectrum-full-dark","Spectrum-Full Light":"spectrum-full-light",Surface:"surface",Temperature:"temperature","White to Black":"white-to-black","Yellow to Dark Red":"yellow-to-dark-red","Yellow to Green to Dark Blue":"yellow-to-green-to-dark-blue","Yellow to Red":"yellow-to-red","Yellow-Green Bright":"yellow-green-bright","Yellow-Green Light to Dark":"yellow-green-light-to-dark"});function u(e,t){if(!e||!t||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]>t[r]+2||e[r]<t[r]-2)return!1;return!0}function h(e){let t=e.clone();return t.fromColor=e.toColor,t.toColor=e.fromColor,t}function f(e,t){let r=t??a;if("algorithmic"===e.type){let t=e.fromColor.toRgb(),n=e.toColor.toRgb();return r.find(e=>u(t,e.fromColor)&&u(n,e.toColor))?.id}if(e.weights?.length)return;let n=e.colorRamps?.map(e=>({fromColor:e.fromColor.toRgb(),toColor:e.toColor.toRgb()}));return r.find(e=>{let t=e.colorRamps;return!(!n||n.length!==t?.length)&&t.every((e,t)=>u(n[t].fromColor,e.fromColor)&&u(n[t].toColor,e.toColor))})?.id}function c(e,t=!1){let r="string"==typeof e?e:function(e,t,r=!1){if(!e)return;let n=!1,i=f(e,t);return null==i&&!r&&(n=!0,e=function(e){if("multipart"===e.type){let t=e.clone();return t.colorRamps?.length&&(t.colorRamps=t.colorRamps.reverse().map(e=>h(e))),t}return h(e)}(e),i=f(e,t)),i?{id:i,inverted:n}:void 0}(e,void 0,t)?.id;return r?s.toJSON(r):null}function p(e,t="esriCIELabAlgorithm"){let r=a.find(({id:t})=>t===e);return r?r.colorRamps?{type:"multipart",colorRamps:r.colorRamps.map(e=>({type:"algorithmic",algorithm:t,fromColor:[...e.fromColor],toColor:[...e.toColor]}))}:{type:"algorithmic",algorithm:t,fromColor:[...r.fromColor],toColor:[...r.toColor]}:null}function d(e){e??={};let t=e.numColors||256,r=e.distanceOffset||0,n=null==e.isCustomInterval?null!==e.distanceInterval&&e.distanceInterval!==1/(t-1):e.isCustomInterval,i=e.distanceInterval||1/(t-1);return{...e,numColors:t,distanceOffset:r,interpolateAlpha:!!e.interpolateAlpha,distanceInterval:i,isCustomInterval:n,weights:e.weights}}function m(e,t){let{fromColor:r,toColor:i}=e,l=3===r.length?[...r,255]:[...r],o=3===i.length?[...i,255]:[...i],a=e.algorithm||"esriCIELabAlgorithm",s=d(t),{numColors:u,distanceOffset:h,isCustomInterval:f,interpolateAlpha:c}=s;if(1===u&&0===h)return[l];if(2===u&&0===h&&!f)return[l,o];let p={r:l[0],g:l[1],b:l[2]},m={r:o[0],g:o[1],b:o[2]},g="esriCIELabAlgorithm"===a?function(e,t,r){let{numColors:n,distanceOffset:i,distanceInterval:l,isCustomInterval:o}=r,{l:a,a:s,b:u}=e,h=(t.l-a)*l,f=(t.a-s)*l,c=(t.b-u)*l,p=[];if(i){let e=i/l;a+=e*h,s+=e*f,u+=e*c}for(let e=0;e<n-1;e++)p.push({l:a,a:s,b:u}),a+=h,s+=f,u+=c;return p.push(o?{l:a,a:s,b:u}:t),p}((0,n.ZD)(p),(0,n.ZD)(m),s):"esriHSVAlgorithm"===a?function(e,t,r){let{numColors:n,distanceOffset:i,distanceInterval:l,isCustomInterval:o}=r,a=0===e.s,s=0===t.s,u=e.h,h=t.h;a&&!s?u=h:s&&!a&&(t={...t,h:u},h=u);let f=Math.abs(h-u),c=0;f<180?c=(h-u)*l:(f=360-f,c=u>h?f*l:-f*l);let p=(t.s-e.s)*l,d=(t.v-e.v)*l,{s:m,v:g}=e,y=u;if(i){let e=i/l;y=(y+e*c+360)%360,m+=e*p,g+=e*d}let x=[];for(let e=0;e<n-1;e++)x.push({h:y,s:m,v:g}),y=(y+c+360)%360,m+=p,g+=d;return x.push(o?{h:y,s:m,v:g}:t),x}((0,n.N2)(p),(0,n.N2)(m),s):function(e,t,r){let{numColors:n,distanceOffset:i,distanceInterval:l,isCustomInterval:o}=r,a=e.h,s=t.h,u=2*Math.PI,h=0;if(a<=s){let e=s-a,t=s-a-u;h=Math.abs(t)<Math.abs(e)?t:e}else{let e=s+u-a,t=s-a;h=Math.abs(t)<Math.abs(e)?t:e}let f=h*l,c=(t.l-e.l)*l,p=(t.c-e.c)*l,{l:d,c:m,h:g}=e;if(i){let e=i/l;d+=e*c,m+=e*p,g=(g+e*f+u)%u}let y=[];for(let e=0;e<n-1;e++)y.push({l:d,c:m,h:g}),d+=c,m+=p,g=(g+f+u)%u;return y.push(o?{l:d,c:m,h:g}:t),y}((0,n.RH)(p),(0,n.RH)(m),s),y=[],x=l[3]??255,w=((o[3]??255)-x)/(u-1);for(let e=0;e<u;e++){let{r:t,g:r,b:i}=(0,n.$)(g[e]),l=c?Math.round(x+w*e):255;y.push([t,r,i,l])}return y}function g(e,t){let r=(0,l.W)(e)?e.toJSON():e;return"multipart"===r.type?function(e,t){let{numColors:r,interpolateAlpha:n}=d(t),i=function(e,t){let{colorRamps:r}=e;if(t??=r.map(({start:e,stop:t})=>null==e||null==t?-1:t-e),t.length!==r.length||t.some(e=>e<0))return Array.from({length:r.length},()=>1/r.length);let n=t.reduce((e,t)=>e+t);return t.map(e=>e/n)}(e,t?.weights),{colorRamps:l}=e,o=[],a=1/(r-1),s=0,u=!1;for(let e=0;e<l.length;e++){let t=o.length,h=u?0:t*a-s;s+=i[e];let f=e===l.length-1?r-1-t:(i[e]-h)/a;if(u=Math.ceil(f)===f,f=Math.ceil(f),0===f)continue;let c=m(l[e],{numColors:f,interpolateAlpha:n,distanceOffset:h/i[e],distanceInterval:a/i[e]});o.push(...c)}let h=[...l[l.length-1].toColor];return 3===h.length&&h.push(255),o.push(h),o}(r,t):m(r,t)}function y(e,t){let r=g(e,t),n=t?.interpolateAlpha;return r.forEach((e,t)=>{e.unshift(t),n||e.pop()}),r}function x(e){let t=[];for(let r=0;r<e.length;r+=4){let i=(0,n.N2)({r:e[r],g:e[r+1],b:e[r+2]});t.push([i.h/60,i.s/100,255*i.v/100])}return t}function w(e){let t=(0,n.N2)(e);return{type:"HsvColor",Hue:t.h,Saturation:t.s,Value:t.v,AlphaValue:255}}function C(e){return{Algorithm:e.toJSON()?.Algorithm||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:w(e.fromColor),ToColor:w(e.toColor)}}function M(e){let t=c(e);if(!t)return null;if("algorithmic"===e.type)return{...C(e),Name:t};if(e.colorRamps){let r=e.colorRamps.map(C);return{type:"MultiPartColorRamp",NumColorRamps:r.length,ArrayOfColorRamp:r,Name:t}}return null}function b(e){let t=[...e].reverse().map(e=>{let t=e.toString(16);return t.length<2?"0"+t:t});return 0|Number.parseInt(t.join(""),16)}r.d(t,["vj",0,a])},88178(e,t,r){function n(e,t){let{attributeTable:r,bandCount:n}=e;return!(null!=r||(i=e,!["u8","s8"].includes(i.pixelType)||null==i.statistics?.[0]?.min||null==i.statistics[0]?.max||1!==i.bandCount))||!(null==r||n>1||t&&null==r.fields.find(e=>e.name.toLowerCase()===t.toLowerCase()));var i}function i(e){let{bandCount:t,dataType:r,pixelType:n}=e;return"elevation"===r||"generic"===r&&1===t&&("s16"===n||"s32"===n||"f32"===n||"f64"===n)}function l(e,t=!1){let{bandCount:r,colormap:n,pixelType:i}=e;return 1===r&&(!!n?.length||!t&&"u8"===i)}function o(e,t=!1){let{attributeTable:r,bandCount:n}=e;return 1===n&&(!t||null!=r||null!=e.histograms)}function a(e){let{dataType:t}=e;return"vector-uv"===t||"vector-magdir"===t}function s(e){let{dataType:t}=e;return"vector-uv"===t||"vector-magdir"===t}function u(e){return!!e?.length&&e.length<=16384}r.d(t,{FA:()=>l,QJ:()=>s,WN:()=>u,hu:()=>n,iL:()=>i,rd:()=>a,xX:()=>o})},70274(e,t,r){const n=new(r(66552).J)({none:"none",standardDeviation:"standard-deviation",histogramEqualization:"histogram-equalization",minMax:"min-max",percentClip:"percent-clip",sigmoid:"sigmoid"});r.d(t,["u",0,n,"x",0,{0:"none",3:"standardDeviation",4:"histogramEqualization",5:"minMax",6:"percentClip",9:"sigmoid"}])},491(e,t,r){r.d(t,{CW:()=>c});var n=r(44208),i=r(53966),l=r(17676);function o(e){let t=new Float32Array(a(e));return a(e,t),t}function a(e,t){let r=0;t&&(t[r]=e.length),r++;for(let n of e){t&&(t[r]=n.stage),r++,t&&(t[r]=n.vertices.length),r++;for(let e of n.vertices)t&&(t[r]=e.x,t[r+1]=e.y,t[r+2]=e.time,t[r+3]=e.speed),r+=4}return r}const s=[1,2],u=[1,2,3,4];var h=r(97441);const f=()=>i.A.getLogger("esri.views.2d.engine.flow.dataUtils");async function c(e,t,r,i,a){let c=performance.now();(0,h.dF)(r);let p=function(e,t){let{perturb:r}=t;if(r){let{rotation:t}=r;null!=t&&(e=function(e,t){let r=Math.cos(t),n=Math.sin(t);return(t,i)=>{let[l,o]=e(t,i);return[r*l+n*o,-n*l+r*o]}}(e,t));let{scale:n}=r;null!=n&&(e=function(e,t){return(r,n)=>{let[i,l]=e(r,n);return[i*t,l*t]}}(e,n))}return e}((0,h.DE)(t,r),t),d=performance.now(),m=(0,h.S1)(t,p,r.width,r.height,i),g=performance.now(),y=function(e){let t=e.reduce((e,t)=>e+t.vertices.length,0),r=new Float32Array(4*t),n=Array(e.length),i=0,l=0;for(let{vertices:t}of e){let e=i;for(let e of t)r[4*i]=e.x,r[4*i+1]=e.y,r[4*i+2]=e.time,r[4*i+3]=e.speed,i++;n[l++]={startVertex:e,numberOfVertices:t.length,firstTime:t[0].time,lastTime:t[t.length-1].time}}return{lineVertices:r,lineDescriptors:n}}(m),x=performance.now(),w="Streamlines"===e?function(e,t,r){let{lineVertices:n,lineDescriptors:i}=e,l=0,a=0;for(let e of i)l+=2*e.numberOfVertices,a+=6*(e.numberOfVertices-1);let s=new Float32Array(9*l),u=new Uint32Array(a),h=0,f=0;function c(){u[f++]=h-2,u[f++]=h,u[f++]=h-1,u[f++]=h,u[f++]=h+1,u[f++]=h-1}function p(e,t,r,n,i,l,o,a){let u=9*h,f=0;s[u+f++]=e,s[u+f++]=t,s[u+f++]=1,s[u+f++]=r,s[u+f++]=l,s[u+f++]=o,s[u+f++]=n/2,s[u+f++]=i/2,s[u+f++]=a,h++,s[u+f++]=e,s[u+f++]=t,s[u+f++]=-1,s[u+f++]=r,s[u+f++]=l,s[u+f++]=o,s[u+f++]=-n/2,s[u+f++]=-i/2,s[u+f++]=a,h++}for(let e of i){let{firstTime:t,lastTime:r}=e,i=null,l=null,o=null,a=null,s=null,u=null;for(let h=0;h<e.numberOfVertices;h++){let f=n[4*(e.startVertex+h)],d=n[4*(e.startVertex+h)+1],m=n[4*(e.startVertex+h)+2],g=n[4*(e.startVertex+h)+3],y=null,x=null,w=null,C=null;if(h>0){y=f-i,x=d-l;let e=Math.sqrt(y*y+x*x);if(y/=e,x/=e,h>1){let e=y+s,t=x+u,r=Math.sqrt(e*e+t*t);e/=r,t/=r;let n=Math.min(1/(e*y+t*x),10);e*=n,t*=n,w=-t,C=e}else w=-x,C=y;null!==w&&null!==C&&(p(i,l,o,w,C,t,r,g),c())}i=f,l=d,o=m,s=y,u=x,a=g}p(i,l,o,-u,s,t,r,a)}return{vertexData:s,indexData:u,pathData:o(r)}}(y,0,m):function(e,t){let{lineVertices:r,lineDescriptors:n}=e,i=0,l=0;for(let e of n){let t=e.numberOfVertices-1;i+=4*t*2,l+=6*t*2}let a,h,f,c,p,d,m,g,y,x,w,C,M,b,A=new Float32Array(16*i),v=new Uint32Array(l),k=0,T=0;function S(e,t,r,n,i,l,o,a,h,f,c,p,d,m){let g=16*k,y=0;for(let x of s)for(let s of u)A[g+y++]=e,A[g+y++]=t,A[g+y++]=r,A[g+y++]=n,A[g+y++]=o,A[g+y++]=a,A[g+y++]=h,A[g+y++]=f,A[g+y++]=x,A[g+y++]=s,A[g+y++]=d,A[g+y++]=m,A[g+y++]=i/2,A[g+y++]=l/2,A[g+y++]=c/2,A[g+y++]=p/2,k++}function I(e,t){let r=y+w,n=x+C,i=Math.sqrt(r*r+n*n);r/=i,n/=i;let l=y*r+x*n;r/=l,n/=l;let o=w+M,s=C+b,u=Math.sqrt(o*o+s*s);o/=u,s/=u;let A=w*o+C*s;o/=A,s/=A,S(a,h,f,c,-n,r,p,d,m,g,-s,o,e,t),v[T++]=k-8,v[T++]=k-7,v[T++]=k-6,v[T++]=k-7,v[T++]=k-5,v[T++]=k-6,v[T++]=k-4,v[T++]=k-3,v[T++]=k-2,v[T++]=k-3,v[T++]=k-1,v[T++]=k-2}function P(e,t,r,n,i,l){if(y=w,x=C,w=M,C=b,null==y&&null==x&&(y=w,x=C),null!=p&&null!=d){M=e-p,b=t-d;let r=Math.sqrt(M*M+b*b);M/=r,b/=r}null!=y&&null!=x&&I(i,l),a=p,h=d,f=m,c=g,p=e,d=t,m=r,g=n}function E(e,t){y=w,x=C,w=M,C=b,null==y&&null==x&&(y=w,x=C),null!=y&&null!=x&&I(e,t)}for(let e of n){a=null,h=null,f=null,c=null,p=null,d=null,m=null,g=null,y=null,x=null,w=null,C=null,M=null,b=null;let{firstTime:t,lastTime:n}=e;for(let i=0;i<e.numberOfVertices;i++)P(r[4*(e.startVertex+i)],r[4*(e.startVertex+i)+1],r[4*(e.startVertex+i)+2],r[4*(e.startVertex+i)+3],t,n);E(t,n)}return{vertexData:A,indexData:v,pathData:o(t)}}(y,m),C=performance.now();return(0,n.A)("esri-2d-profiler")&&(f().info("I.1","_createFlowFieldFromData (ms)",Math.round(d-c)),f().info("I.2","_getStreamlines (ms)",Math.round(g-d)),f().info("I.3","createAnimatedLinesData (ms)",Math.round(x-g)),f().info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(C-x)),f().info("I.5","createFlowMesh (ms)",Math.round(C-c)),f().info("I.6","Mesh size (bytes)",w.vertexData.buffer.byteLength+w.indexData.buffer.byteLength)),await Promise.resolve(),(0,l.Te)(a),w}},97441(e,t,r){r.d(t,{DE:()=>s,S1:()=>o,dF:()=>a}),r(44208),r(53966);var n=r(34727),i=r(87811),l=r(78659);function o(e,t,r,n,l){if(e.density<=0)return[];let{positions:o}=l,a=[],s=new i.A,f=1/Math.max(e.lineCollisionWidth,1),c=Math.round(r*f),p=Math.round(n*f),d=new Int32Array(c*p);for(let e=0;e<d.length;e++)d[e]=-1;let m={raster:d,width:c,height:p,resolutionFactor:f},g={},y=e.lineSpacing/Math.sqrt(e.density),x=Math.floor(n/y),w=Math.floor(r/y);for(let e=0;e<x;e++){let t=e*y;for(let r=0;r<w;r++){let n=r*y;g[`${r}-${e}`]={x:n,y:t,positions:[]}}}for(let{x:e,y:t}of o){let r=g[`${Math.floor(e/y)}-${Math.floor(t/y)}`];r&&r.positions.push([e,t])}let C=[];for(let e in g){let t=g[e];if(0===t.positions.length)C.push({x:t.x+y/2,y:t.y+y/2,sort:.66+.33*s.getFloat(),stage:0});else{let[e]=t.positions.splice(0,1);C.push({x:e[0],y:e[1],sort:.33*s.getFloat(),stage:1});for(let[e,r]of t.positions)C.push({x:e,y:r,sort:.33+.33*s.getFloat(),stage:2})}}C.sort((e,t)=>e.sort-t.sort);for(let{x:i,y:l,stage:o}of C){if(a.length>=e.maxNumberOfStreamlines)break;let f=e.onlyForwardTracing?u(1,e,t,i,l,[r,n],a.length,m):h(e,t,i,l,[r,n],a.length,s,m);f.length<2||a.push({stage:o,vertices:f})}return a}function a(e){for(let t=0;t<e.mask.length;t++)0===e.mask[t]&&(e.data[2*t]=0,e.data[2*t+1]=0)}function s(e,t){let r=function(e,t,r,n){if(0===n)return e;let i=Math.round(3*n),l=Array(2*i+1),o=0;for(let e=-i;e<=i;e++){let t=Math.exp(-e*e/(n*n));l[e+i]=t,o+=t}for(let e=-i;e<=i;e++)l[e+i]/=o;let a=new Float32Array(e.length);for(let n=0;n<r;n++)for(let r=0;r<t;r++){let o=0,s=0;for(let a=-i;a<=i;a++){if(r+a<0||r+a>=t)continue;let u=l[a+i];o+=u*e[2*(n*t+(r+a))],s+=u*e[2*(n*t+(r+a))+1]}a[2*(n*t+r)]=o,a[2*(n*t+r)+1]=s}let s=new Float32Array(e.length);for(let e=0;e<t;e++)for(let n=0;n<r;n++){let o=0,u=0;for(let s=-i;s<=i;s++){if(n+s<0||n+s>=r)continue;let h=l[s+i];o+=h*a[2*((n+s)*t+e)],u+=h*a[2*((n+s)*t+e)+1]}s[2*(n*t+e)]=o,s[2*(n*t+e)+1]=u}return s}(t.data,t.width,t.height,e.smoothing);return e.interpolate?(e,n)=>{let i=Math.floor(e),l=Math.floor(n);if(i<0||i>=t.width||l<0||l>=t.height)return[0,0];let o=e-i,a=n-l,s=i,u=l,h=i<t.width-1?i+1:i,f=l<t.height-1?l+1:l,c=r[2*(u*t.width+s)],p=r[2*(u*t.width+h)],d=r[2*(f*t.width+s)],m=r[2*(f*t.width+h)],g=r[2*(u*t.width+s)+1],y=r[2*(u*t.width+h)+1];return[(c*(1-a)+d*a)*(1-o)+(p*(1-a)+m*a)*o,(g*(1-a)+r[2*(f*t.width+s)+1]*a)*(1-o)+(y*(1-a)+r[2*(f*t.width+h)+1]*a)*o]}:(e,n)=>{let i=Math.round(e),l=Math.round(n);return i<0||i>=t.width||l<0||l>=t.height?[0,0]:[r[2*(l*t.width+i)],r[2*(l*t.width+i)+1]]}}function u(e,t,r,i,o,a,s,u){let h=[],{raster:f,width:c,height:p,resolutionFactor:d}=u,m=i,g=o,y=(0,l.Kp)(0),[x,w]=r(m,g);x*=t.velocityScale,w*=t.velocityScale;let C,M,b=Math.sqrt(x*x+w*w);h.push({x:m,y:g,time:y,speed:b});for(let i=0;i<t.verticesPerLine;i++){let[i,o]=r(m,g);i*=t.velocityScale,o*=t.velocityScale;let u=Math.sqrt(i*i+o*o);if(u<t.minSpeedThreshold)return h;let x=e*i/u,w=e*o/u;m+=x*t.segmentLength,g+=w*t.segmentLength,t.wrapAround&&(m=(0,n.OS)(m,a[0]));let b=e*t.segmentLength/u;if(y=(0,l.Kp)(y+b),Math.acos(x*C+w*M)>t.maxTurnAngle)return h;if(t.collisions){let e=Math.round(m*d),r=Math.round(g*d);if(t.wrapAround&&(e=(0,n.OS)(e,c)),e<0||e>c-1||r<0||r>p-1)return h;let i=f[r*c+e];if(-1!==i&&i!==s)return h;f[r*c+e]=s}h.push({x:m,y:g,time:y,speed:u}),C=x,M=w}return h}function h(e,t,r,n,i,l,o,a){let s=Math.round((.2+.6*o.getFloat())*e.verticesPerLine),h=e.verticesPerLine-s,f=u(-1,{...e,verticesPerLine:h},t,r,n,i,l,a),c=u(1,{...e,verticesPerLine:s},t,r,n,i,l,a),p=f.reverse();return p.splice(-1,1),p.concat(c)}r(5443),r(21325)}}]);
@@ -1 +0,0 @@
1
- "use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[2772,9940],{80200(e,t,i){i.d(t,{T:()=>n,d:()=>u});const n={Base64:0,Hex:1,String:2,Raw:3};function s(e,t){let i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function r(e,t,i,n,r,o){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(n,o)),r),i)}function o(e,t,i,n,s,o,l){return r(t&i|~t&n,e,t,s,o,l)}function l(e,t,i,n,s,o,l){return r(t&n|i&~n,e,t,s,o,l)}function a(e,t,i,n,s,o,l){return r(t^i^n,e,t,s,o,l)}function h(e,t,i,n,s,o,l){return r(i^(t|~n),e,t,s,o,l)}function c(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let i=1732584193,n=-271733879,r=-1732584194,c=271733878;for(let t=0;t<e.length;t+=16){let u=i,p=n,f=r,m=c;i=o(i,n,r,c,e[t],7,-680876936),c=o(c,i,n,r,e[t+1],12,-389564586),r=o(r,c,i,n,e[t+2],17,606105819),n=o(n,r,c,i,e[t+3],22,-1044525330),i=o(i,n,r,c,e[t+4],7,-176418897),c=o(c,i,n,r,e[t+5],12,1200080426),r=o(r,c,i,n,e[t+6],17,-1473231341),n=o(n,r,c,i,e[t+7],22,-45705983),i=o(i,n,r,c,e[t+8],7,1770035416),c=o(c,i,n,r,e[t+9],12,-1958414417),r=o(r,c,i,n,e[t+10],17,-42063),n=o(n,r,c,i,e[t+11],22,-1990404162),i=o(i,n,r,c,e[t+12],7,1804603682),c=o(c,i,n,r,e[t+13],12,-40341101),r=o(r,c,i,n,e[t+14],17,-1502002290),n=o(n,r,c,i,e[t+15],22,1236535329),i=l(i,n,r,c,e[t+1],5,-165796510),c=l(c,i,n,r,e[t+6],9,-1069501632),r=l(r,c,i,n,e[t+11],14,643717713),n=l(n,r,c,i,e[t],20,-373897302),i=l(i,n,r,c,e[t+5],5,-701558691),c=l(c,i,n,r,e[t+10],9,38016083),r=l(r,c,i,n,e[t+15],14,-660478335),n=l(n,r,c,i,e[t+4],20,-405537848),i=l(i,n,r,c,e[t+9],5,568446438),c=l(c,i,n,r,e[t+14],9,-1019803690),r=l(r,c,i,n,e[t+3],14,-187363961),n=l(n,r,c,i,e[t+8],20,1163531501),i=l(i,n,r,c,e[t+13],5,-1444681467),c=l(c,i,n,r,e[t+2],9,-51403784),r=l(r,c,i,n,e[t+7],14,1735328473),n=l(n,r,c,i,e[t+12],20,-1926607734),i=a(i,n,r,c,e[t+5],4,-378558),c=a(c,i,n,r,e[t+8],11,-2022574463),r=a(r,c,i,n,e[t+11],16,1839030562),n=a(n,r,c,i,e[t+14],23,-35309556),i=a(i,n,r,c,e[t+1],4,-1530992060),c=a(c,i,n,r,e[t+4],11,1272893353),r=a(r,c,i,n,e[t+7],16,-155497632),n=a(n,r,c,i,e[t+10],23,-1094730640),i=a(i,n,r,c,e[t+13],4,681279174),c=a(c,i,n,r,e[t],11,-358537222),r=a(r,c,i,n,e[t+3],16,-722521979),n=a(n,r,c,i,e[t+6],23,76029189),i=a(i,n,r,c,e[t+9],4,-640364487),c=a(c,i,n,r,e[t+12],11,-421815835),r=a(r,c,i,n,e[t+15],16,530742520),n=a(n,r,c,i,e[t+2],23,-995338651),i=h(i,n,r,c,e[t],6,-198630844),c=h(c,i,n,r,e[t+7],10,1126891415),r=h(r,c,i,n,e[t+14],15,-1416354905),n=h(n,r,c,i,e[t+5],21,-57434055),i=h(i,n,r,c,e[t+12],6,1700485571),c=h(c,i,n,r,e[t+3],10,-1894986606),r=h(r,c,i,n,e[t+10],15,-1051523),n=h(n,r,c,i,e[t+1],21,-2054922799),i=h(i,n,r,c,e[t+8],6,1873313359),c=h(c,i,n,r,e[t+15],10,-30611744),r=h(r,c,i,n,e[t+6],15,-1560198380),n=h(n,r,c,i,e[t+13],21,1309151649),i=h(i,n,r,c,e[t+4],6,-145523070),c=h(c,i,n,r,e[t+11],10,-1120210379),r=h(r,c,i,n,e[t+2],15,718787259),n=h(n,r,c,i,e[t+9],21,-343485551),i=s(i,u),n=s(n,p),r=s(r,f),c=s(c,m)}return[i,n,r,c]}function u(e,t=n.Hex){let i=t||n.Base64,s=c(function(e){let t=[];for(let i=0,n=8*e.length;i<n;i+=8)t[i>>5]|=(255&e.charCodeAt(i/8))<<i%32;return t}(e),8*e.length);switch(i){case n.Raw:return s;case n.Hex:return function(e){let t="0123456789abcdef",i=[];for(let n=0,s=4*e.length;n<s;n++)i.push(t.charAt(e[n>>2]>>n%4*8+4&15)+t.charAt(e[n>>2]>>n%4*8&15));return i.join("")}(s);case n.String:return function(e){let t=[];for(let i=0,n=32*e.length;i<n;i+=8)t.push(String.fromCharCode(e[i>>5]>>>i%32&255));return t.join("")}(s);case n.Base64:return function(e){let t=[];for(let i=0,n=4*e.length;i<n;i+=3){let n=(e[i>>2]>>i%4*8&255)<<16|(e[i+1>>2]>>(i+1)%4*8&255)<<8|e[i+2>>2]>>(i+2)%4*8&255;for(let s=0;s<4;s++)8*i+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n>>6*(3-s)&63))}return t.join("")}(s)}}},87024(e,t,i){i.d(t,{P:()=>f});var n=i(49186),s=i(80200),r=i(76553),o=i(84952),l=i(13069),a=i(96156),h=i(35666),c=i(10107),u=i(85648),p=i(97159);function f(e){let t=e?.origins??[void 0];return(i,n)=>{let s=function(e,t,i){if("resource"===e?.type)return function(e,t,i){let n=(0,a.z4)(t,i);return{type:String,read:(e,t,i)=>{let s=(0,p.r)(e,t,i);return n.type===String?s:"function"==typeof n.type?new n.type({url:s}):void 0},write:{isRequired:n.json?.write?.isRequired,writer(t,s,l,a){if(!a?.resources)return"string"==typeof t?void(s[l]=(0,p.t)(t,a)):void(s[l]=t.write({},a));let c=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),f=(0,p.t)(c,{...a,verifyItemRelativeUrls:a?.verifyItemRelativeUrls?{writtenUrls:a.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1),g=n.type!==String&&(!(0,r.H)(this)||a?.origin&&this.originIdOf(i)>(0,h.aB)(a.origin)),_={object:this,propertyName:i,value:t,targetUrl:f,dest:s,targetPropertyName:l,context:a,params:e};a?.portalItem&&f&&!(0,o.oP)(f)?g&&e?.contentAddressed?m(_):g?function(e){let{context:t,targetUrl:i,params:n,value:s,dest:r,targetPropertyName:l}=e;if(!t.portalItem)return;let a=t.portalItem.resourceFromPath(i),h=y(s,i,t),c=(0,u.n)(h),p=(0,o.Zo)(a.path),f=n?.compress??!1;c===p?(t.resources&&d({...e,resource:a,content:h,compress:f,updates:t.resources.toUpdate}),r[l]=i):m(e)}(_):function({context:e,targetUrl:t,dest:i,targetPropertyName:n}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),i[n]=t)}(_):a?.portalItem&&(null==f||null!=(0,p.i)(f)||(0,o.w8)(f)||g)?m(_):s[l]=f}}}}(e,t,i);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{let{read:e,write:t}=p.b;return{read:e,write:t}}}}(e,i,n);for(let e of t){let t=(0,c.rM)(i,e,n);for(let e in s)t[e]=s[e]}}}function m(e){let{targetUrl:t,params:i,value:r,context:a,dest:h,targetPropertyName:c}=e;if(!a.portalItem)return;let f=(0,p.p)(t),m=y(r,t,a);if(i?.contentAddressed&&"json"!==m.type)return void a.messages?.push(new n.A("persistable:contentAddressingUnsupported",`Property "${c}" is trying to serializing a resource with content of type ${m.type} with content addressing. Content addressing is only supported for json resources.`,{content:m}));let g=i?.contentAddressed&&"json"===m.type?(0,s.d)(m.jsonString):f?.filename??(0,l.lk)(),_=i?.prefix??f?.prefix,x=(0,o.fj)(_,g),w=`${x}.${(0,u.n)(m)}`;if(i?.contentAddressed&&a.resources&&"json"===m.type){let e=a.resources.toKeep.find(({resource:e})=>e.path===w)??a.resources.toAdd.find(({resource:e})=>e.path===w);if(e)return void(h[c]=e.resource.itemRelativeUrl)}let v=a.portalItem.resourceFromPath(w);(0,o.w8)(t)&&a.resources&&a.resources.pendingOperations.push((0,o.tk)(t).then(e=>{v.path=`${x}.${(0,u.n)({type:"blob",blob:e})}`,h[c]=v.itemRelativeUrl}).catch(()=>{}));let C=i?.compress??!1;a.resources&&d({...e,resource:v,content:m,compress:C,updates:a.resources.toAdd}),h[c]=v.itemRelativeUrl}function d({object:e,propertyName:t,updates:i,resource:n,content:s,compress:r}){i.push({resource:n,content:s,compress:r,finish:i=>{!function(e,t,i){"string"==typeof e[t]?e[t]=i.url:e[t].url=i.url}(e,t,i)}})}function y(e,t,i){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(i))}}},83027(e,t,i){const n=i(29953).ho;i.d(t,["h",0,n])},35982(e,t,i){i.d(t,{B:()=>c});var n=i(4576),s=i(71511),r=i(36563),o=i(53966),l=i(97768),a=i(17676),h=i(83027);class c{constructor(e,t,i,n,s={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._onClientConnectedHandle=null,this._destroyed=!1,this._promise=(0,h.h)(e,{...s,schedule:n}).then(e=>{null!=this._thread||this._destroyed?e.close():(this._thread=e,this._promise=null,this._onClientConnectedHandle=this._thread.onClientConnected(e=>{s.hasInitialize&&e.invoke("initialize",{}).catch(()=>{});for(let t of this._listeners)this._connectListenerToClient(t,e);this._onClientConnected(e)}))}),this._promise.catch(t=>o.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){let i=new u(e,t);return this._listeners.push(i),this._connectListener(i),(0,r.hA)(()=>{(0,n.TF)(this._listeners,i),i.destroy()})}[Symbol.dispose](){this.destroy()}destroy(){this._onClientConnectedHandle=(0,l.xt)(this._onClientConnectedHandle),this._thread&&=(this._thread.close(),null),this._promise=null;for(let e of this._listeners)e.destroy();this._listeners.length=0,this._transferLists={},this._destroyed=!0}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,n){return this._invokeMethod(e,[t],i,n)}invokeMethodWithArgs(e,t,i,n){return this._invokeMethod(e,t,i,n)}_invokeMethod(e,t,i,n){if(this._thread){let s=this._transferLists[e],r=s?s(...t):[];return this._thread.apply(e,t,{transferList:r,signal:i,jobPriority:n})}return this._promise?this._promise.then(()=>((0,a.Te)(i),this._invokeMethod(e,t,i,n))):Promise.reject((0,a.NK)())}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(p):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject((0,a.NK)())}get promise(){return this._promise}_onClientConnected(e){}_connectListener(e){this._thread&&e.add(this._thread.on(e.eventName,e.callback))}_connectListenerToClient(e,t){e.add(t.on(e.eventName,e.callback))}}class u{constructor(e,t){this.eventName=e,this.callback=t,this._handles=new s.A}add(e){this._handles.add(e)}destroy(){this._handles.destroy()}}function p(){}},89056(e,t,i){i.d(t,{b3:()=>u,jZ:()=>c});var n=i(12195),s=i(19419),r=i(537),o=i(95108),l=i(60408),a=i(80754),h=i(21325);function c(e){return p(e,!0)}function u(e){return p(e,!1)}function p(e,t){if(null==e)return null;let i=e.spatialReference,s=(0,h.Vp)(i),o=(0,n.W)(e)?e.toJSON():e;if(!s)return o;let c=(0,h.K8)(i)?102100:4326,u=a.j7[c].maxX,p=a.j7[c].minX;if((0,l.fT)(o))return m(o,u,p);if((0,l.U9)(o))return o.points=o.points.map(e=>m(e,u,p)),o;if((0,l.ZC)(o))return f(o,s);if((0,l.Bi)(o)||(0,l.Rg)(o)){let e=(0,r.Rg)(w,o),i={xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]},n=(0,a.kd)(i.xmin,p),s=2*u*n,l=0===s?o:(0,a.kS)(o,s);return i.xmin+=s,i.xmax+=s,i.xmax>u?_(l,u,t):i.xmin<p?_(l,p,t):l}return o}function f(e,t){if(!t)return e;let i=function(e,t){let i=[],{ymin:n,ymax:s,xmin:r,xmax:o}=e,l=e.xmax-e.xmin,[a,h]=t.valid,{x:c,frameId:u}=d(e.xmin,t),{x:p,frameId:f}=d(e.xmax,t),m=c===p&&l>0;if(l>2*h){let e={xmin:r<o?c:p,ymin:n,xmax:h,ymax:s},t={xmin:a,ymin:n,xmax:r<o?p:c,ymax:s},l={xmin:0,ymin:n,xmax:h,ymax:s},m={xmin:a,ymin:n,xmax:0,ymax:s},d=[],g=[];y(e,l)&&d.push(u),y(e,m)&&g.push(u),y(t,l)&&d.push(f),y(t,m)&&g.push(f);for(let e=u+1;e<f;e++)d.push(e),g.push(e);i.push(new x(e,[u]),new x(t,[f]),new x(l,d),new x(m,g))}else c>p||m?i.push(new x({xmin:c,ymin:n,xmax:h,ymax:s},[u]),new x({xmin:a,ymin:n,xmax:p,ymax:s},[f])):i.push(new x({xmin:c,ymin:n,xmax:p,ymax:s},[u]));return i}(e,t).map(e=>e.extent);return i.length<2?i[0]||e:i.length>2?(e.xmin=t.valid[0],e.xmax=t.valid[1],e):{rings:i.map(e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]])}}function m(e,t,i){if(Array.isArray(e)){let n=e[0];if(n>t){let i=(0,a.kd)(n,t);e[0]=n+-2*t*i}else if(n<i){let t=(0,a.kd)(n,i);e[0]=n+-2*i*t}}else{let n=e.x;if(n>t){let i=(0,a.kd)(n,t);e.x+=-2*t*i}else if(n<i){let t=(0,a.kd)(n,i);e.x+=-2*i*t}}return e}function d(e,t){let i,[n,s]=t.valid,r=2*s,o=0;return e>s?(i=Math.ceil(Math.abs(e-s)/r),e-=i*r,o=i):e<n&&(i=Math.ceil(Math.abs(e-n)/r),e+=i*r,o=-i),{x:e,frameId:o}}function y(e,t){let{xmin:i,ymin:n,xmax:s,ymax:r}=t;return g(e,i,n)&&g(e,i,r)&&g(e,s,r)&&g(e,s,n)}function g(e,t,i){return t>=e.xmin&&t<=e.xmax&&i>=e.ymin&&i<=e.ymax}function _(e,t,i=!0){let n=!(0,l.Rg)(e);if(n&&(0,o.m3)(e),i)return(new v).cut(e,t);let s=n?e.rings:e.paths,r=n?4:2,a=s.length,h=-2*t;for(let e=0;e<a;e++){let t=s[e];if(t&&t.length>=r){let e=[];for(let[i,...n]of t)e.push([i+h,...n]);s.push(e)}}return n?e.rings=s:e.paths=s,e}class x{constructor(e,t){this.extent=e,this.frameIds=t}}const w=(0,s.vt)();class v{constructor(){this._linesIn=[],this._linesOut=[]}cut(e,t){let i;if(this._xCut=t,e.rings)this._closed=!0,i=e.rings,this._minPts=4;else{if(!e.paths)return null;this._closed=!1,i=e.paths,this._minPts=2}for(let e of i){if(!e||e.length<this._minPts)continue;let t=!0;for(let i of e)t?(this.moveTo(i),t=!1):this.lineTo(i);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),i=[];for(let e of this._linesIn)e&&e.length>=this._minPts&&i.push(e);let n=-2*this._xCut;for(let e of this._linesOut)if(e&&e.length>=this._minPts){for(let t of e)t[0]+=n;i.push(e)}return this._closed?e.rings=i:e.paths=i,e}moveTo(e){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(e[0]),this._moveTo(e,this._prevSide),this._prevPt=e,this._firstPt=e}lineTo(e){let t=this._side(e[0]);if(t*this._prevSide===-1){let i=this._intersect(this._prevPt,e);this._lineTo(i,0),this._prevSide=0,this._lineTo(e,t)}else this._lineTo(e,t);this._prevSide=t,this._prevPt=e}close(){let e=this._firstPt,t=this._prevPt;(e[0]!==t[0]||e[1]!==t[1])&&this.lineTo(e),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(e,t){this._closed?(this._lineIn.push(C(e,t<=0?e[0]:this._xCut)),this._lineOut.push(C(e,t>=0?e[0]:this._xCut))):(t<=0&&this._lineIn.push(e.slice()),t>=0&&this._lineOut.push(e.slice()))}_lineTo(e,t){this._closed?(S(this._lineIn,e,t<=0?e[0]:this._xCut),S(this._lineOut,e,t>=0?e[0]:this._xCut)):t<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push(e.slice())):t>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push(e.slice())):this._prevSide<0?(this._lineIn.push(e.slice()),this._lineOut.push(e.slice())):this._prevSide>0&&(this._lineOut.push(e.slice()),this._lineIn.push(e.slice()))}_checkClosingPt(e){let t=e.length;t>3&&e[0][0]===this._xCut&&e[t-2][0]===this._xCut&&e[1][0]===this._xCut&&(e[0]=e[t-2].slice(),e.pop())}_side(e){return e<this._xCut?-1:+(e>this._xCut)}_intersect(e,t){let i=(this._xCut-e[0])/(t[0]-e[0]),n=[this._xCut,e[1]+i*(t[1]-e[1])],s=Math.min(e.length,t.length);for(let r=2;r<s;r++)n.push(e[r]+i*(t[r]-e[r]));return n}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function C(e,t){let i=e.slice();return i[0]=t,i}function S(e,t,i){let n=e.length;n>1&&e[n-1][0]===i&&e[n-2][0]===i?e[n-1]=C(t,i):e.push(C(t,i))}},10292(e,t,i){i.d(t,{q:()=>l});var n=i(48526),s=i(86738),r=i(82799),o=i(99917);class l{constructor(e){this.geometry=e,this.spatialReference=e.spatialReference}export(){return this._exporter(this.coordinates,this.spatialReference)}clone(e){let t=new l(this.geometry);return t.spatialReference=this.spatialReference,t.coordinates=e??this.coordinates.map(e=>e.clone()),t._exporter=this._exporter,t}async project(e,t){if(this.spatialReference.equals(e))return this.clone();await(0,o.initializeProjection)([{source:this.spatialReference,dest:e}],{signal:t});let i=new n.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),s=(0,o.project)(i,e);if(!s)return null;let r=this.coordinates.map((e,t)=>{let i=e.clone(),n=s.points[t];return i.x=n[0],i.y=n[1],i}),l=this.clone(r);return l.spatialReference=e,l}projectSync(e){if(this.spatialReference.equals(e))return this.clone();let t=new n.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),i=(0,o.project)(t,e);if(!i)return null;let s=this.coordinates.map((e,t)=>{let n=e.clone(),s=i.points[t];return n.x=s[0],n.y=s[1],n}),r=this.clone(s);return r.spatialReference=e,r}static fromGeometry(e){let t=new l(e);if(e instanceof l)return t.coordinates=e.coordinates.map(e=>e.clone()),t._exporter=(t,i)=>{let n=e.clone(t);return n.spatialReference=i,n},t;switch(e.type){case"point":{let i=e,{hasZ:n,hasM:r}=i;return t.coordinates=n&&r?[new a(i.x,i.y,i.z,i.m)]:n?[new a(i.x,i.y,i.z)]:r?[new a(i.x,i.y,null,i.m)]:[new a(i.x,i.y)],t._exporter=(t,i)=>e.hasM?new s.A({x:t[0].x,y:t[0].y,z:t[0].z,m:t[0].m,spatialReference:i}):new s.A({x:t[0].x,y:t[0].y,z:t[0].z,spatialReference:i}),t}case"multipoint":{let i=e,{hasZ:s,hasM:r}=i;return t.coordinates=s&&r?i.points.map(e=>new a(e[0],e[1],e[2],e[3])):s?i.points.map(e=>new a(e[0],e[1],e[2])):r?i.points.map(e=>new a(e[0],e[1],null,e[2])):i.points.map(e=>new a(e[0],e[1])),t._exporter=(t,i)=>e.hasM?new n.A({points:t.map(e=>[e.x,e.y,e.z??0,e.m??0]),hasZ:!0,hasM:!0,spatialReference:i}):new n.A({points:t.map(e=>[e.x,e.y,e.z??0]),spatialReference:i}),t}case"polyline":{let i=e,n=[],s=[],{hasZ:o,hasM:l}=e,h=0;for(let e of i.paths)if(s.push([h,h+e.length]),h+=e.length,o&&l)for(let t of e)n.push(new a(t[0],t[1],t[2],t[3]));else if(o)for(let t of e)n.push(new a(t[0],t[1],t[2]));else if(l)for(let t of e)n.push(new a(t[0],t[1],null,t[2]));else for(let t of e)n.push(new a(t[0],t[1]));return t.coordinates=n,t._exporter=(t,i)=>{let n=e.hasM?t.map(e=>[e.x,e.y,e.z??0,e.m??0]):t.map(e=>[e.x,e.y,e.z??0]),o=s.map(e=>n.slice(e[0],e[1]));return new r.A({paths:o,hasM:e.hasM,hasZ:!0,spatialReference:i})},t}}}}class a{constructor(e,t,i=null,n=null,s=null,r=null){this.x=e,this.y=t,this.z=i,this.m=n,this.tile=s,this.elevationTile=r}clone(){return new a(this.x,this.y,this.z,this.m)}}},58325(e,t,i){i.d(t,{A:()=>S});var n,s=i(32198),r=i(56507),o=i(7762),l=i(25482),a=i(84952),h=i(91429),c=i(4718),u=i(67076),p=i(87024),f=i(39829),m=i(99917),d=i(16930),y=i(21325),g=i(88546),_=i(72772),x=i(98697),w=i(43937);let v=n=class extends l.o{constructor(e){super(e),this.geometry=null,this.type="clip"}writeGeometry(e,t,i,n){if(this._needWGS84Conversion(n))this._doWGS84Conversion(t,i,n);else if(n.layer?.spatialReference&&!n.layer.spatialReference.equals(this.geometry.spatialReference)){if(!(0,m.canProjectWithoutEngine)(e.spatialReference,n.layer.spatialReference))return void(n?.messages&&n.messages.push(new u.A("scenemodification:unsupported","Scene modifications with incompatible spatial references are not supported",{modification:this,spatialReference:n.layer.spatialReference,context:n})));let s=new f.A;(0,m.projectPolygon)(e,s,n.layer.spatialReference),t[i]=s.toJSON(n)}else t[i]=e.toJSON(n)}_needWGS84Conversion(e){if("integrated-mesh-3dtiles"===e.layer?.type){let t=e.layer;return!t.esriCrsSpatialReference||!(0,y.aI)(t.esriCrsSpatialReference,this.geometry.spatialReference)}return!1}_doWGS84Conversion(e,t,i){let n=!0;if((0,_.isInitialized)()){let s=[this],r=(0,x.Ir)(null,s,d.A.WGS84);if(r.length>1){let s=(0,_.switchMeshModificationPolygonVCSSync)({modifications:r,inVCS:5773});if(s.success&&s.modifications){let r=[this.clone()];(0,x.H1)(s.modifications,r),1===r.length&&r[0].geometry&&(r[0].geometry.spatialReference=g.Zx,e[t]=r[0].geometry.toJSON(i),n=!1)}}}n&&i?.messages&&i.messages.push(new u.A("scenemodification:unsupported","Scene modifications with incompatible spatial references are not supported",{modification:this,spatialReference:this.geometry.spatialReference,context:i}))}clone(){return new n({geometry:(0,c.o8)(this.geometry),type:this.type})}};var C;(0,s.Cg)([(0,h.MZ)({type:f.A}),(0,p.P)()],v.prototype,"geometry",void 0),(0,s.Cg)([(0,w.K)(["web-scene","portal-item"],"geometry")],v.prototype,"writeGeometry",null),(0,s.Cg)([(0,h.MZ)({type:["clip","mask","replace"],nonNullable:!0}),(0,p.P)()],v.prototype,"type",void 0),v=n=(0,s.Cg)([(0,h.$K)("esri.layers.support.SceneModification")],v);let S=C=class extends((0,l.T)(o.A.ofType(v))){constructor(e){super(e),this.url=null}clone(){let e=new C(this.items.map(e=>e.clone()));return e.url=this.url,e}toJSON(e){return this.toArray().map(t=>t.toJSON(e)).filter(e=>!!e.geometry)}static fromJSON(e,t){let i=new C;for(let n of e)i.add(v.fromJSON(n,t));return i}static async fromUrl(e,t,i,n=!1){let s={url:(0,a.An)(e),origin:"service"},o=await(0,r.A)(e,{responseType:"json",signal:i?.signal}),l=t.toJSON(),h=[];for(let e of o.data){let t=l;n&&e.geometry.spatialReference&&(t=e.geometry.spatialReference),h.push(v.fromJSON({...e,geometry:{spatialReference:t,...e.geometry}},s))}let c=new C(h);return c.url=e,c}};(0,s.Cg)([(0,h.MZ)({type:String})],S.prototype,"url",void 0),S=C=(0,s.Cg)([(0,h.$K)("esri.layers.support.SceneModifications")],S)},85648(e,t,i){i.d(t,{n:()=>s});var n=i(84952);function s(e){return r[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){let t=(0,n.Zo)(e);return a[t]||o}(e.url)}(e)]||l}const r={},o="text/plain",l=r[o],a={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(let e in a)r[a[e]]=e},80215(e,t,i){i.d(t,{Q:()=>s});const n=Symbol("GroundInstance");function s(e){return"object"==typeof e&&!!e&&n in e}},72772(e,t,i){i.r(t),i.d(t,{addSpatialReferenceInfo:()=>a,destroyWasm:()=>c,initialize:()=>u,isInitialized:()=>p,process:()=>l,switchMeshModificationPolygonVCSSync:()=>h});var n=i(2741);function s(e){return(0,n.s)(`esri/libs/lyr3d/${e}`)}i(49186),new Map;let r,o=null;async function l(e){await u();let t={status:1,error:"",jobDescJson:"",data:new Uint8Array,missingInputs:[]};if(e.inputs.length<1)return{result:t,transferList:[]};let i={ptrs:[],sizes:[]};for(let t of e.inputs){let e=o._malloc(t.byteLength);new Uint8Array(o.HEAPU8.buffer,e,t.byteLength).set(new Uint8Array(t)),i.ptrs.push(e),i.sizes.push(t.byteLength)}let n=o.process(e.jobDescJson,e.id,i,e.isMissingResourceCase);t.status=n.status,t.missingInputs=n.missingInputs.slice();let s=0===n.status&&n.data,r=2===t.status&&t.missingInputs.length>0;t.jobDescJson=n.jobDescJson.slice(),t.error=n.error.slice(),s?t.data=n.data.slice():r&&(t.originalInputs=e.inputs.slice());for(let e=0;e<i.ptrs.length;++e)o._free(i.ptrs[e]);let l=[];if(s)l.push(t.data.buffer);else if(r)for(let t of e.inputs)l.push(t);return{result:t,transferList:l}}async function a(e){await u(),o.add_spatial_reference_info(e.sr,e.isGCS,e.toMetersXY,e.toMetersZ)}function h(e){if(!o)return{success:!1,modifications:null};let t=o._malloc(8*e.modifications.length),i=new Float64Array(o.HEAPF64.buffer,t,e.modifications.length);i.set(e.modifications);let n=o.switch_mesh_modification_polygon_vcs(t,e.modifications.length,e.inVCS),s=null;return n&&(s=i.slice()),o._free(t),{success:n,modifications:s}}function c(){o&&=(o.uninitialize_lyr3d_worker_wasm(),null)}function u(){return p()?Promise.resolve():(r||=async function(){let{default:e}=await i.e(2343).then(()=>i(2343));return async function(e,t){return t({locateFile:s})}(0,e)}().then(e=>{o=e,o.initialize_lyr3d_worker_wasm(),r=null}),r)}function p(){return null!==o}},98697(e,t,i){i.d(t,{Cm:()=>f,H1:()=>x,Ir:()=>y,_b:()=>u,sQ:()=>p});var n=i(53966),s=i(15142),r=i(51850),o=i(35982),l=i(39829),a=i(99917),h=i(27993),c=i(89056);class u{constructor(e,t,i,n,s,r){this.layout=e,this.interleavedVertexData=t,this.indices=i,this.hasColors=n,this.hasModifications=s,this.positionData=r}}class p{constructor(e,t,i,n,s,r,o,l,a){this.componentOffsets=e,this.featureIds=t,this.anchorIds=i,this.anchors=n,this.transformedGeometry=s,this.globalTrafo=r,this.obb=o,this.geometryMinElevation=l,this.geometryMaxElevation=a}}class f extends o.B{constructor(e){super("SceneLayerWorker","process",{process:e=>[e.geometryBuffer],project:e=>[e.positions.buffer],transformNormals:e=>[e.normals.buffer]},e,{hasInitialize:!0}),this._schemasByContext=new Map,this._modificationsByContext=new Map}_onClientConnected(e){for(let[t,i]of this._schemasByContext)e.invoke("setLegacySchema",{context:t,jsonSchema:i}).catch(()=>{});for(let t of this._modificationsByContext.values())e.invoke("setModifications",t).catch(()=>{})}setModifications(e,t,i){let n={context:e,modifications:t,isGeodetic:i};return this._modificationsByContext.set(e,n),this.broadcast(n,"setModifications")}setLegacySchema(e,t){let i=JSON.stringify(t);return this._schemasByContext.set(e,i),this.broadcast({context:e,jsonSchema:i},"setLegacySchema")}destroyContext(e){return this._schemasByContext.delete(e),this._modificationsByContext.delete(e),this.broadcast(e,"destroyContext")}async destroyContextAndSelf(e){await this.destroyContext(e),this.destroy()}project(e,t){return this.invokeMethod("project",e,t)}transformNormals(e,t){return this.invokeMethod("transformNormals",e,t)}}const m=new s.A({deallocator:null}),d=(0,r.vt)();function y(e,t,i,s=!1){m.clear();let r=1/0,o=1/0,h=-1/0,u=-1/0,p=!1;for(let e of t){let t="clip"===e.type?2:+("mask"===e.type),f=e.geometry,d=f.spatialReference??i;if(d!==i&&!(0,a.canProjectWithoutEngine)(d,i)){n.A.getLogger("esri.views.3d.layers.SceneLayerWorkerHandle").warn("im-modification-projection-failed","Can't project modification polygon into layer spatial reference, ignoring modification",{polygon:f});continue}let y=f.rings;if(d!==i){let e=g(f.rings,d,i);if(null==e){n.A.getLogger("esri.views.3d.layers.SceneLayerWorkerHandle").warn("im-modification-projection-failed","Can't project modification polygon into layer spatial reference, ignoring modification",{polygon:f});continue}y=e}let x=y;if(s){let e=(0,c.jZ)(new l.A({rings:y,spatialReference:i}));null!=e&&(y=e.rings)}let w=1===x.length&&y.length>1?[...y.map(e=>[e]),x]:[y];if(w.some(e=>0===e.length||e.some(e=>e.length<3||e.some(e=>!_(e)))))n.A.getLogger("esri.views.3d.layers.SceneLayerWorkerHandle").warn("im-modification-invalid-polygon","Ignoring invalid modification polygon (empty ring, fewer than 3 vertices, or non-finite coordinates).",{polygon:f});else{p||=1===t;for(let e of w){m.push(t),m.push(e.length);for(let t of e){m.push(t.length);for(let e of t){let t=e[2]??0;m.push(e[0]),m.push(e[1]),m.push(t),r=Math.min(r,e[0]),o=Math.min(o,e[1]),h=Math.max(h,e[0]),u=Math.max(u,e[1])}}}}}if(null!=e)if(p){let t=1e-4;m.push(2),m.push(2),m.push(4),m.push(r-t),m.push(o-t),m.push(0),m.push(h+t),m.push(o-t),m.push(0),m.push(h+t),m.push(u+t),m.push(0),m.push(r-t),m.push(u+t),m.push(0),m.push(4),m.push(e[0]),m.push(e[1]),m.push(0),m.push(e[2]),m.push(e[1]),m.push(0),m.push(e[2]),m.push(e[3]),m.push(0),m.push(e[0]),m.push(e[3]),m.push(0)}else m.push(1),m.push(1),m.push(4),m.push(e[0]),m.push(e[1]),m.push(0),m.push(e[2]),m.push(e[1]),m.push(0),m.push(e[2]),m.push(e[3]),m.push(0),m.push(e[0]),m.push(e[3]),m.push(0);m.push(3);let f=new Float64Array(m.length);for(let e=0;e<m.length;++e)f[e]=m.at(e);return f}function g(e,t,i){let n=[];for(let s of e){let e=[];for(let n of s){if(!(0,h.F)(n,t,d,i)||!_(d))return null;e.push([d[0],d[1],d[2]])}n.push(e)}return n}function _(e){return Number.isFinite(e[0])&&Number.isFinite(e[1])&&(null==e[2]||Number.isFinite(e[2]))}function x(e,t){let i=0;for(let n of t){let t=n.geometry,s=t.rings.length,r=t.rings.some(e=>e.length<3);if(0!==s&&!r){i+=1,i+=1;for(let n=0;n<t.rings.length;++n){let s=t.rings[n];i+=1;for(let r=0;r<s.length;++r){let s=[e[i+0],e[i+1],e[i+2]];i+=3,t.setPoint(n,r,s)}}}}}}}]);