@arcgis/core 4.34.0-next.23 → 4.34.0-next.25

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 (438) hide show
  1. package/Basemap.js +1 -1
  2. package/analysis/VolumeMeasurement/CutFillOptions.d.ts +4 -0
  3. package/analysis/VolumeMeasurement/CutFillOptions.js +1 -1
  4. package/analysis/VolumeMeasurementAnalysis.js +1 -1
  5. package/applications/Components/imageryUtils.d.ts +4 -0
  6. package/applications/Components/imageryUtils.js +5 -0
  7. package/arcade/parser.js +1 -1
  8. package/arcade/validation/arcadeValidator.js +1 -1
  9. package/assets/esri/core/workers/RemoteClient.js +1 -1
  10. package/assets/esri/core/workers/chunks/026fbeb0ff5b9e6c74df.js +1 -0
  11. package/assets/esri/core/workers/chunks/{0867aa688fa8938906da.js → 03bef3f4b6b09b1e864b.js} +1 -1
  12. package/assets/esri/core/workers/chunks/06cdbccc9f325dcc303d.js +1 -0
  13. package/assets/esri/core/workers/chunks/07613c89255bdab6b7c6.js +1 -0
  14. package/assets/esri/core/workers/chunks/09618761df5c4fdd52a0.js +1 -0
  15. package/assets/esri/core/workers/chunks/0ae00339991f5387203e.js +1 -0
  16. package/assets/esri/core/workers/chunks/0b4b294f3ce74fde5620.js +1 -0
  17. package/assets/esri/core/workers/chunks/{146520d263b910b5bdc7.js → 0e96a3b7228f1ff8e6c5.js} +1 -1
  18. package/assets/esri/core/workers/chunks/109ef17dd4f9430bb686.js +1 -0
  19. package/assets/esri/core/workers/chunks/1597aca21334cab3b802.js +1 -0
  20. package/assets/esri/core/workers/chunks/196564ad230bef6b59cf.js +1 -0
  21. package/assets/esri/core/workers/chunks/19f8d551cbebc11db1eb.js +1 -0
  22. package/assets/esri/core/workers/chunks/1ceee047e3fa617b0600.js +1 -0
  23. package/assets/esri/core/workers/chunks/1d27701832ea139fcc20.js +1 -0
  24. package/assets/esri/core/workers/chunks/1f296f85becf1ca6714d.js +1 -0
  25. package/assets/esri/core/workers/chunks/1f8d7bd44d53c30df383.js +1 -0
  26. package/assets/esri/core/workers/chunks/1fabb5ec59da698c1618.js +1 -0
  27. package/assets/esri/core/workers/chunks/{919d2fd7ebc0c840a759.js → 219b2911668db120452b.js} +1 -1
  28. package/assets/esri/core/workers/chunks/234cbc290b074eeb5dd6.js +1 -0
  29. package/assets/esri/core/workers/chunks/29ae5723fa35aa73ff9b.js +1 -0
  30. package/assets/esri/core/workers/chunks/2b4b073254fe8b6a081c.js +1 -0
  31. package/assets/esri/core/workers/chunks/30293b88501b5d6162fc.js +1 -0
  32. package/assets/esri/core/workers/chunks/31533f5e8b76b307f61c.js +1 -0
  33. package/assets/esri/core/workers/chunks/347117e61e1c6edd074f.js +1 -0
  34. package/assets/esri/core/workers/chunks/3616eb2607843524483f.js +1 -0
  35. package/assets/esri/core/workers/chunks/36648facd56ee91afc7c.js +1 -0
  36. package/assets/esri/core/workers/chunks/394477e88be0c6790f02.js +1 -0
  37. package/assets/esri/core/workers/chunks/3b80b01551d124534a1b.js +1 -0
  38. package/assets/esri/core/workers/chunks/{89d91ce2f566dd3f57f7.js → 3be9ec0503a669bcfce6.js} +1 -1
  39. package/assets/esri/core/workers/chunks/3c9cf06ac6aa1db6c4f6.js +1 -0
  40. package/assets/esri/core/workers/chunks/40fc7c43feaeef8b814d.js +1 -0
  41. package/assets/esri/core/workers/chunks/42cddc8f8c8d73e22ee2.js +1 -0
  42. package/assets/esri/core/workers/chunks/437a4100a837ee16df7c.js +1 -0
  43. package/assets/esri/core/workers/chunks/{63cc4647b7775ff8aedf.js → 44d28849e59f62616e72.js} +1 -1
  44. package/assets/esri/core/workers/chunks/453e536f566d80a9863b.js +1 -0
  45. package/assets/esri/core/workers/chunks/472c677a74d779ce62d7.js +1 -0
  46. package/assets/esri/core/workers/chunks/4b68b6985430c42316b7.js +1 -0
  47. package/assets/esri/core/workers/chunks/{6bb1ecaa0afc2c7de79e.js → 4cc3eeb0b824c53793d0.js} +1 -1
  48. package/assets/esri/core/workers/chunks/4ce671bc4d36387b55fa.js +1 -0
  49. package/assets/esri/core/workers/chunks/51cfa2f70ec222e1582b.js +1 -0
  50. package/assets/esri/core/workers/chunks/5284d46aecd6fe0345b8.js +1 -0
  51. package/assets/esri/core/workers/chunks/567385709e18ace93b1e.js +1 -0
  52. package/assets/esri/core/workers/chunks/5a9b27f2b343cd5b0852.js +1 -0
  53. package/assets/esri/core/workers/chunks/{4c2f3e43992a918e4c2d.js → 5ef3256c32c4b622bd11.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{5ce62d9fff80d014d186.js → 60aeb7a5ccd8bc71be02.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{55e9b02d70812f7cdac2.js → 63966066a963e9a1fb14.js} +1 -1
  56. package/assets/esri/core/workers/chunks/63f50ff2ae94f684d56b.js +1 -0
  57. package/assets/esri/core/workers/chunks/{8bf04be4052bf148777a.js → 6a1cf6b0ffdf6080b5c4.js} +1 -1
  58. package/assets/esri/core/workers/chunks/6deaa08e3a61a455e564.js +1 -0
  59. package/assets/esri/core/workers/chunks/6e9b4bfe2a1497c96100.js +1 -0
  60. package/assets/esri/core/workers/chunks/6efc3d120c9c2c09cb06.js +1 -0
  61. package/assets/esri/core/workers/chunks/7338ce95bceb2c7fab87.js +1 -0
  62. package/assets/esri/core/workers/chunks/{c64fa94cba71ba2794e2.js → 771012f129890f9a089c.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{d1b363c418a67b087306.js → 780ff9314f26ae62f75f.js} +1 -1
  64. package/assets/esri/core/workers/chunks/820cf4337b248a0cb63c.js +1 -0
  65. package/assets/esri/core/workers/chunks/{b57c0ef7bc57e3c91257.js → 865fccacf44ae5b70eba.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{fedbf639a0788417a70f.js → 86abfce1f2ac93cc4d54.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{c94cc026c4ed330408fb.js → 8894483b91bcda845b6f.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{f050ab9d100012b77bb9.js → 8c5b1114cc2a58305a81.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{6ca764b4baadef5c1515.js → 92737419b66894799a34.js} +1 -1
  70. package/assets/esri/core/workers/chunks/9511e55e4fabb3235eac.js +1 -0
  71. package/assets/esri/core/workers/chunks/{f43110391f124b8a179c.js → 9a78cb291c966f8ddda6.js} +2 -2
  72. package/assets/esri/core/workers/chunks/9f8341caab3b1d02f387.js +1 -0
  73. package/assets/esri/core/workers/chunks/a08d018d8c137fc4ca17.js +1 -0
  74. package/assets/esri/core/workers/chunks/{7051bcc178eb512819f6.js → a55338add265d330124b.js} +1 -1
  75. package/assets/esri/core/workers/chunks/afe4fd3b1b3521712edd.js +1 -0
  76. package/assets/esri/core/workers/chunks/{9991bd3c7991bffd8260.js → b37f3c416cefc1a6ea2c.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{6782114a752b9cc59168.js → b6b8272a74a5c24a6b86.js} +1 -1
  78. package/assets/esri/core/workers/chunks/b9f66d735a7e63417b3d.js +1 -0
  79. package/assets/esri/core/workers/chunks/bb50b4a3af627f91d789.js +1 -0
  80. package/assets/esri/core/workers/chunks/{f42155b7a4e6c5e80757.js → bbc2a4976d044b990193.js} +1 -1
  81. package/assets/esri/core/workers/chunks/bbf2c31d217de1b8ba6e.js +1 -0
  82. package/assets/esri/core/workers/chunks/be3977f7fe0c46a1b493.js +1 -0
  83. package/assets/esri/core/workers/chunks/befba7ceeb26a38732c1.js +1 -0
  84. package/assets/esri/core/workers/chunks/bf3fc71881aa559fc931.js +1 -0
  85. package/assets/esri/core/workers/chunks/c19421707257fc93acb9.js +1 -0
  86. package/assets/esri/core/workers/chunks/c1fb5290e0e259b74389.js +1 -0
  87. package/assets/esri/core/workers/chunks/c361bf4d41a1843d4640.js +1 -0
  88. package/assets/esri/core/workers/chunks/c51099eab5a99c88e5de.js +1 -0
  89. package/assets/esri/core/workers/chunks/c56b05a8be498b6f3ee7.js +1 -0
  90. package/assets/esri/core/workers/chunks/c82e78590c2fabc67609.js +1 -0
  91. package/assets/esri/core/workers/chunks/{cab1a1067f44ce374673.js → c9e580867f7ac17be329.js} +1 -1
  92. package/assets/esri/core/workers/chunks/{92ad9098006568358550.js → cafcb46d723d38b377a9.js} +1 -1
  93. package/assets/esri/core/workers/chunks/{1d75cb1747ffb7b8b050.js → cb81d448ed6bad205346.js} +1 -1
  94. package/assets/esri/core/workers/chunks/{0f6203ae32663b2b52db.js → d08a523b548e892e1222.js} +1 -1
  95. package/assets/esri/core/workers/chunks/d29ae64703a947bfb83b.js +1 -0
  96. package/assets/esri/core/workers/chunks/d2ce360961ca4b58666c.js +1 -0
  97. package/assets/esri/core/workers/chunks/{04c17957c15234ca0321.js → d81260303a11d3fbe940.js} +1 -1
  98. package/assets/esri/core/workers/chunks/de1457b07f4e263f1524.js +1 -0
  99. package/assets/esri/core/workers/chunks/{6bf43bc3714d7b3878fa.js → e547318638c8f496c1a0.js} +1 -1
  100. package/assets/esri/core/workers/chunks/e8e993fb8697b8f3e0c7.js +346 -0
  101. package/assets/esri/core/workers/chunks/{53781ccca16e53d4a8c3.js → f291ccf9da6aa7d7ae23.js} +1 -1
  102. package/assets/esri/core/workers/chunks/f61a8cc7e2b198e521ba.js +1 -0
  103. package/assets/esri/core/workers/chunks/f9442a281cb91c64c7cd.js +1 -0
  104. package/assets/esri/core/workers/chunks/fb785bc38323cce6e549.js +1 -0
  105. package/assets/esri/core/workers/chunks/{c3213b487c11076985af.js → fbf3240b36718fa5dc76.js} +1 -1
  106. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  107. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  108. package/chunks/Bufferer-Dw9Qi4T1.js +1 -1
  109. package/chunks/ComponentShader.glsl.js +36 -36
  110. package/chunks/Envelope.js +1 -1
  111. package/chunks/MultiPathImpl.js +1 -1
  112. package/chunks/OperatorClip.js +1 -1
  113. package/chunks/ProjectionTransformation.js +1 -1
  114. package/chunks/RibbonLine.glsl.js +40 -33
  115. package/chunks/index.js +1 -1
  116. package/chunks/persistableUrlUtils.js +1 -1
  117. package/config.js +1 -1
  118. package/core/AsyncUpdate.js +1 -1
  119. package/core/Clonable.js +1 -1
  120. package/core/Evented.js +1 -1
  121. package/core/Identifiable.js +1 -1
  122. package/core/JSONSupport.js +1 -1
  123. package/core/Loadable.js +1 -1
  124. package/core/MapUtils.js +1 -1
  125. package/core/MemCache.js +1 -1
  126. package/core/MemCachePool.js +1 -1
  127. package/core/MultiOriginJSONSupport.js +1 -1
  128. package/core/ObjectPool.js +1 -1
  129. package/core/Promise.js +1 -1
  130. package/core/ReadOnlyMultiOriginJSONSupport.js +1 -1
  131. package/core/accessorSupport/overrideDefaultsFrom.js +1 -1
  132. package/core/quantity.d.ts +1 -0
  133. package/geometry/operators/gx/operatorOffset.js +1 -1
  134. package/geometry/operators/support/jsonConverter.js +1 -1
  135. package/geometry/support/buffer/BufferPool.js +1 -1
  136. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  137. package/interfaces.d.ts +211 -8
  138. package/kernel.js +1 -1
  139. package/layers/CatalogLayer.js +1 -1
  140. package/layers/FeatureLayer.js +1 -1
  141. package/layers/GeoJSONLayer.js +1 -1
  142. package/layers/SubtypeGroupLayer.js +1 -1
  143. package/layers/knowledgeGraph/KnowledgeGraphSublayerBase.js +1 -1
  144. package/layers/mixins/APIKeyMixin.js +1 -1
  145. package/layers/mixins/ArcGISCachedService.js +1 -1
  146. package/layers/mixins/ArcGISImageService.js +1 -1
  147. package/layers/mixins/ArcGISMapService.js +1 -1
  148. package/layers/mixins/ArcGISService.js +1 -1
  149. package/layers/mixins/BlendLayer.js +1 -1
  150. package/layers/mixins/CustomParametersMixin.js +1 -1
  151. package/layers/mixins/DisplayFilteredLayer.js +1 -1
  152. package/layers/mixins/EditBusLayer.js +1 -1
  153. package/layers/mixins/FeatureEffectLayer.js +1 -1
  154. package/layers/mixins/FeatureLayerBase.js +1 -1
  155. package/layers/mixins/FeatureReductionLayer.js +1 -1
  156. package/layers/mixins/ImageryTileMixin.js +1 -1
  157. package/layers/mixins/OperationalLayer.js +1 -1
  158. package/layers/mixins/OrderedLayer.js +1 -1
  159. package/layers/mixins/PortalLayer.js +1 -1
  160. package/layers/mixins/PublishableLayer.js +1 -1
  161. package/layers/mixins/RasterJobHandlerMixin.js +1 -1
  162. package/layers/mixins/RasterPresetRendererMixin.js +1 -1
  163. package/layers/mixins/RefreshableLayer.js +1 -1
  164. package/layers/mixins/ScaleRangeLayer.js +1 -1
  165. package/layers/mixins/SceneService.js +1 -1
  166. package/layers/mixins/SublayersOwner.js +1 -1
  167. package/layers/mixins/TemporalLayer.js +1 -1
  168. package/layers/mixins/TemporalSceneLayer.js +1 -1
  169. package/layers/mixins/TrackableLayer.js +1 -1
  170. package/layers/ogc/wfsUtils.js +1 -1
  171. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  172. package/layers/orientedImagery/core/bestImageUtils.js +1 -1
  173. package/layers/support/ControlPointsGeoreference.js +1 -1
  174. package/layers/support/PixelBlock.js +1 -1
  175. package/layers/support/RasterJobHandler.js +1 -1
  176. package/layers/support/RasterWorker.js +1 -1
  177. package/layers/support/Sublayer.js +1 -1
  178. package/layers/support/arcgisLayerUrl.js +1 -1
  179. package/layers/support/multiLayerServiceUtils.js +1 -1
  180. package/layers/support/rasterDatasets/pixelReader.js +5 -0
  181. package/layers/support/rasterFormats/pixelRangeUtils.js +1 -1
  182. package/layers/support/rasterFunctions/clipUtils.js +1 -1
  183. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  184. package/layers/support/rasterFunctions/rasterFunctionHelper.js +1 -1
  185. package/layers/video/VideoController.js +1 -1
  186. package/networks/support/UtilityNetworkLookupHelper.js +1 -1
  187. package/package.json +1 -1
  188. package/renderers/mixins/VisualVariablesMixin.js +1 -1
  189. package/renderers/support/DictionaryControlString.js +1 -1
  190. package/rest/support/CameraInfoMixin.js +1 -1
  191. package/rest/support/NormalizationBinParametersMixin.js +1 -1
  192. package/smartMapping/renderers/color.js +1 -1
  193. package/smartMapping/renderers/heatmap.js +1 -1
  194. package/smartMapping/renderers/pieChart.js +1 -1
  195. package/smartMapping/renderers/size.js +1 -1
  196. package/smartMapping/renderers/support/regenerateUtils.js +1 -1
  197. package/smartMapping/renderers/support/rendererUtils.js +1 -1
  198. package/smartMapping/renderers/type.js +1 -1
  199. package/smartMapping/symbology/color.js +1 -1
  200. package/smartMapping/symbology/support/utils.js +1 -1
  201. package/support/LayersMixin.js +1 -1
  202. package/support/TablesMixin.js +1 -1
  203. package/support/revision.js +1 -1
  204. package/symbols/cim/cimAnalyzer.js +1 -1
  205. package/symbols/support/utils.js +1 -1
  206. package/views/2d/engine/ParentChildStage.js +1 -1
  207. package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
  208. package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
  209. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterInputEvaluator.js +1 -1
  210. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MultiRasterMixin.js +1 -1
  211. package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
  212. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  213. package/views/2d/engine/webgl/textureUtils.js +1 -1
  214. package/views/2d/layers/BitmapTileLayerView2D.js +1 -1
  215. package/views/2d/layers/LayerView2D.js +1 -1
  216. package/views/2d/layers/MediaLayerView2D.js +1 -1
  217. package/views/2d/layers/TileLayerView2D.js +1 -1
  218. package/views/2d/layers/features/FeatureContainer.js +1 -1
  219. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  220. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  221. package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
  222. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  223. package/views/2d/layers/features/support/FeatureFilterEvaluator.js +1 -1
  224. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  225. package/views/2d/layers/support/DebugOverlay.js +1 -1
  226. package/views/3d/analysis/AnalysisView3D.js +1 -1
  227. package/views/3d/analysis/VolumeMeasurement/CutFillVolumeMeasurementController.js +5 -0
  228. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  229. package/views/3d/analysis/images/heading-rotate-svg.js +1 -1
  230. package/views/3d/analysis/images/tilt-rotate-svg.js +1 -1
  231. package/views/3d/glTF/DefaultLoadingContext.js +1 -1
  232. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  233. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  234. package/views/3d/layers/BuildingSublayerView3D.js +1 -1
  235. package/views/3d/layers/ElevationLayerView3D.js +1 -1
  236. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  237. package/views/3d/layers/FlowSubView3D.js +1 -1
  238. package/views/3d/layers/I3SMeshView3D.js +1 -1
  239. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  240. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  241. package/views/3d/layers/LayerView3D.js +1 -1
  242. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  243. package/views/3d/layers/StreamLayerView3D.js +1 -1
  244. package/views/3d/layers/TiledLayerView3D.js +1 -1
  245. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  246. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  247. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  248. package/views/3d/layers/graphics/Labeler.js +1 -1
  249. package/views/3d/layers/graphics/StreamController.js +5 -0
  250. package/views/3d/layers/graphics/StreamGraphics3DGraphicsPipeline.js +1 -1
  251. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  252. package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
  253. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  254. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  255. package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
  256. package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
  257. package/views/3d/layers/support/PopupSceneLayerView.js +1 -1
  258. package/views/3d/layers/support/TemporalSceneLayerView.js +1 -1
  259. package/views/3d/layers/support/fetchTile.js +1 -1
  260. package/views/3d/state/ViewStateManager.js +1 -1
  261. package/views/3d/support/MemoryController.js +1 -1
  262. package/views/3d/support/ResourceController.js +1 -1
  263. package/views/3d/support/StreamDataLoader.js +1 -1
  264. package/views/3d/support/StreamDataRequester.js +5 -0
  265. package/views/3d/support/StreamTextureCollection.js +1 -1
  266. package/views/3d/support/engineContent/line.js +1 -1
  267. package/views/3d/support/flow/FlowSubViewExtent3D.js +1 -1
  268. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  269. package/views/3d/support/flow/StreamlinesResources3D.js +1 -1
  270. package/views/3d/support/flow/geometryUtils.js +1 -1
  271. package/views/3d/support/index.js +1 -1
  272. package/views/3d/terrain/OverlayRenderer.js +1 -1
  273. package/views/3d/terrain/TerrainRenderer.js +1 -1
  274. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  275. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  276. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +3 -3
  277. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  278. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  279. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  280. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  281. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  282. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  283. package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
  284. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  285. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  286. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  287. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  288. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  289. package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +17 -0
  290. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  291. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  292. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  293. package/views/BreakpointsOwner.js +1 -1
  294. package/views/DOMContainer.js +1 -1
  295. package/views/PopupView.js +1 -1
  296. package/views/VideoView.js +1 -1
  297. package/views/Viewport2DBaseMixin.js +1 -1
  298. package/views/Viewport2DMixin.js +1 -1
  299. package/views/draw/DrawGraphicTool.js +1 -1
  300. package/views/draw/DrawScreenTool.js +1 -1
  301. package/views/draw/DrawTool.js +1 -1
  302. package/views/draw/MultipointDrawAction.js +1 -1
  303. package/views/draw/PointDrawAction.js +1 -1
  304. package/views/draw/PolygonDrawAction.js +1 -1
  305. package/views/draw/PolylineDrawAction.js +1 -1
  306. package/views/interactive/tooltip/infos/TooltipInfoWithCoordinates.js +1 -1
  307. package/views/layers/CatalogDynamicGroupLayerView.js +1 -1
  308. package/views/layers/CatalogFootprintLayerView.js +1 -1
  309. package/views/layers/CatalogLayerView.js +1 -1
  310. package/views/layers/DimensionLayerView.js +1 -1
  311. package/views/layers/FeatureLayerView.js +1 -1
  312. package/views/layers/ImageryLayerView.js +1 -1
  313. package/views/layers/ImageryTileLayerView.js +1 -1
  314. package/views/layers/LineOfSightLayerView.js +1 -1
  315. package/views/layers/MapImageLayerView.js +1 -1
  316. package/views/layers/MediaLayerView.js +1 -1
  317. package/views/layers/OGCFeatureLayerView.js +1 -1
  318. package/views/layers/PointCloudLayerView.js +1 -1
  319. package/views/layers/RefreshableLayerView.js +1 -1
  320. package/views/layers/StreamLayerView.js +1 -1
  321. package/views/layers/ViewshedLayerView.js +1 -1
  322. package/views/layers/WMSLayerView.js +1 -1
  323. package/views/magnifier/mask-svg.js +1 -1
  324. package/views/magnifier/overlay-svg.js +1 -1
  325. package/views/support/Scheduler.js +1 -1
  326. package/views/video/VideoOperationalDataView.js +1 -1
  327. package/views/webgl/BufferObject.js +1 -1
  328. package/views/webgl/Program.js +1 -1
  329. package/views/webgl/Renderbuffer.js +1 -1
  330. package/views/webgl/Texture.js +1 -1
  331. package/views/webgl/Util.js +1 -1
  332. package/webmap/Bookmark.js +1 -1
  333. package/webscene/SunLighting.js +1 -1
  334. package/webscene/VirtualLighting.js +1 -1
  335. package/webscene/spec-certification/spec.js +1 -1
  336. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  337. package/widgets/BasemapLayerList.js +1 -1
  338. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  339. package/widgets/Directions/DirectionsSearchTool.js +1 -1
  340. package/widgets/Editor/EditorViewModel.js +1 -1
  341. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  342. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  343. package/widgets/Editor/support/SketchController.js +1 -1
  344. package/widgets/Editor/workflowUtils.js +1 -1
  345. package/widgets/Editor.js +1 -1
  346. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  347. package/widgets/Feature/support/FeatureContentMixin.js +1 -1
  348. package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
  349. package/widgets/FeatureTable/support/EditableColumnTemplateMixin.js +1 -1
  350. package/widgets/LayerList.js +1 -1
  351. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  352. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  353. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  354. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  355. package/widgets/OrientedImageryViewer/mixins/ImageMeasurementMixin.js +1 -1
  356. package/widgets/OrientedImageryViewer/mixins/SketchHandlerMixin.js +1 -1
  357. package/widgets/OrientedImageryViewer/mixins/TriangulatedImageMeasurementMixin.js +1 -1
  358. package/widgets/OrientedImageryViewer/mixins/TriangulatedSketchHandlerMixin.js +1 -1
  359. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
  360. package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
  361. package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
  362. package/widgets/OrientedImageryViewer.js +1 -1
  363. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  364. package/widgets/PanoramicViewer/PanoramicZoomConditions.js +1 -1
  365. package/widgets/PanoramicViewer.js +1 -1
  366. package/widgets/Print.js +1 -1
  367. package/widgets/Sketch/SketchViewModel.js +1 -1
  368. package/widgets/Sketch/support/ResponsiveToolbar/ToolbarGroupBase.js +1 -1
  369. package/widgets/Slider/SliderViewModel.js +1 -1
  370. package/widgets/support/GoTo.js +1 -1
  371. package/widgets/support/SelectionList.js +1 -1
  372. package/assets/esri/core/workers/chunks/00eef04fd026adaf0df8.js +0 -1
  373. package/assets/esri/core/workers/chunks/0202c2ac73354e3970b2.js +0 -1
  374. package/assets/esri/core/workers/chunks/02dc6e31b1244e5bb785.js +0 -1
  375. package/assets/esri/core/workers/chunks/080c79d6caca3b6a2db2.js +0 -1
  376. package/assets/esri/core/workers/chunks/084236ca316aad980192.js +0 -1
  377. package/assets/esri/core/workers/chunks/0b484224a92b52c34330.js +0 -1
  378. package/assets/esri/core/workers/chunks/0ba6177ba118a0f032e2.js +0 -1
  379. package/assets/esri/core/workers/chunks/16a78f5a82f5ca163816.js +0 -1
  380. package/assets/esri/core/workers/chunks/19ae76283a0cb0fe4dee.js +0 -346
  381. package/assets/esri/core/workers/chunks/1cc30073f8200b67cff6.js +0 -1
  382. package/assets/esri/core/workers/chunks/242b216d61940aebe8e1.js +0 -1
  383. package/assets/esri/core/workers/chunks/32756905bcf11699b3f7.js +0 -1
  384. package/assets/esri/core/workers/chunks/35d238a5a6501f89bed7.js +0 -1
  385. package/assets/esri/core/workers/chunks/3fcd73ba832cb53d3a07.js +0 -1
  386. package/assets/esri/core/workers/chunks/40c1d65039c8f1d6afa0.js +0 -1
  387. package/assets/esri/core/workers/chunks/496e02cfe3d84010f675.js +0 -1
  388. package/assets/esri/core/workers/chunks/49dce142ad1ea4c01d00.js +0 -1
  389. package/assets/esri/core/workers/chunks/4b89d5b9e35bf79b321e.js +0 -1
  390. package/assets/esri/core/workers/chunks/54a49a25845897a15ab1.js +0 -1
  391. package/assets/esri/core/workers/chunks/573a8393bec916dcf16f.js +0 -1
  392. package/assets/esri/core/workers/chunks/576e408fb0834f3948e8.js +0 -1
  393. package/assets/esri/core/workers/chunks/5e805c9e9012dd39ec86.js +0 -1
  394. package/assets/esri/core/workers/chunks/6136bf09950adc46bc33.js +0 -1
  395. package/assets/esri/core/workers/chunks/666afe669866c44830bd.js +0 -1
  396. package/assets/esri/core/workers/chunks/6a0fbc54638f7de138c1.js +0 -1
  397. package/assets/esri/core/workers/chunks/81006d9eed65bbb82962.js +0 -1
  398. package/assets/esri/core/workers/chunks/843b6029d4c13115e1ac.js +0 -1
  399. package/assets/esri/core/workers/chunks/86d6007c45f2aa643ac8.js +0 -1
  400. package/assets/esri/core/workers/chunks/8ea34878a1ef24b4ded3.js +0 -1
  401. package/assets/esri/core/workers/chunks/8eea6251aa09725e654e.js +0 -1
  402. package/assets/esri/core/workers/chunks/90145d49a0cec902435c.js +0 -1
  403. package/assets/esri/core/workers/chunks/916691122d7fb38497d6.js +0 -1
  404. package/assets/esri/core/workers/chunks/9ae18a17f62d91167202.js +0 -1
  405. package/assets/esri/core/workers/chunks/9c510df592befb9ff892.js +0 -1
  406. package/assets/esri/core/workers/chunks/9f91d519da67714f915f.js +0 -1
  407. package/assets/esri/core/workers/chunks/a6a7279b09d7962147ec.js +0 -1
  408. package/assets/esri/core/workers/chunks/aba520714efc01bead36.js +0 -1
  409. package/assets/esri/core/workers/chunks/acb9c166259872828646.js +0 -1
  410. package/assets/esri/core/workers/chunks/accff253af360c34e8a8.js +0 -1
  411. package/assets/esri/core/workers/chunks/ad3871f497ecea1a08c9.js +0 -1
  412. package/assets/esri/core/workers/chunks/ae6eed26fc932bc08356.js +0 -1
  413. package/assets/esri/core/workers/chunks/b4bb461955a4c2bce072.js +0 -1
  414. package/assets/esri/core/workers/chunks/b98279213f45a0c27600.js +0 -1
  415. package/assets/esri/core/workers/chunks/ba5b24beebeb703b5919.js +0 -1
  416. package/assets/esri/core/workers/chunks/bd7d19ba0c7d9143a455.js +0 -1
  417. package/assets/esri/core/workers/chunks/bffaf1f20f18c75fad4e.js +0 -1
  418. package/assets/esri/core/workers/chunks/c4f8da6c238eb5e91f91.js +0 -1
  419. package/assets/esri/core/workers/chunks/cd64181298d82c8d0e9d.js +0 -1
  420. package/assets/esri/core/workers/chunks/cdabea4718a7e7d34cb8.js +0 -1
  421. package/assets/esri/core/workers/chunks/ce7155ae63e7bb74be00.js +0 -1
  422. package/assets/esri/core/workers/chunks/d45383d76ba99718b6d9.js +0 -1
  423. package/assets/esri/core/workers/chunks/d915d0a30d9beb24bd3a.js +0 -1
  424. package/assets/esri/core/workers/chunks/dc6538a2d5a1e60d0209.js +0 -1
  425. package/assets/esri/core/workers/chunks/dca633ae3bfd4a3f9bb3.js +0 -1
  426. package/assets/esri/core/workers/chunks/def8a854a05f17d3538e.js +0 -1
  427. package/assets/esri/core/workers/chunks/dfa7976085f7408a366c.js +0 -1
  428. package/assets/esri/core/workers/chunks/e0a5b499b3ae38c21278.js +0 -1
  429. package/assets/esri/core/workers/chunks/e1a20ba7d6279f59adc0.js +0 -1
  430. package/assets/esri/core/workers/chunks/e49a135a2933306a6105.js +0 -1
  431. package/assets/esri/core/workers/chunks/e9a9174c4d1a0a9effb6.js +0 -1
  432. package/assets/esri/core/workers/chunks/edead1a123860cc74b1b.js +0 -1
  433. package/assets/esri/core/workers/chunks/f3d5d92e0aefc2593208.js +0 -1
  434. package/assets/esri/core/workers/chunks/f90573c9dc36e51cd588.js +0 -1
  435. package/assets/esri/core/workers/chunks/fa9658dbfb921f9c13af.js +0 -1
  436. package/assets/esri/core/workers/chunks/fb5e2b1ced03eef28e96.js +0 -1
  437. package/assets/esri/core/workers/chunks/fd8f4eabb8bbc593dd9c.js +0 -1
  438. package/layers/graphics/controllers/StreamController.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../PopupTemplate.js";import{MultiOriginJSONMixin as r}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as i}from"../core/promiseUtils.js";import{urlToObject as o}from"../core/urlUtils.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import n from"../geometry/Extent.js";import a from"../geometry/SpatialReference.js";import{featureGeometryTypeKebabDictionary as l}from"../geometry/support/typeUtils.js";import u from"./Layer.js";import{GeoJSONSource as d}from"./graphics/sources/GeoJSONSource.js";import{BlendLayer as m}from"./mixins/BlendLayer.js";import{CustomParametersMixin as y}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as c}from"./mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as h}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as f}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as j}from"./mixins/OperationalLayer.js";import{OrderedLayer as g}from"./mixins/OrderedLayer.js";import{PortalLayer as v}from"./mixins/PortalLayer.js";import{RefreshableLayer as b}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as x}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as I}from"./mixins/TemporalLayer.js";import{TrackableLayer as F}from"./mixins/TrackableLayer.js";import{attributeTableTemplate as O,elevationInfo as T,id as E,labelsVisible as S,legendEnabled as w,opacity as L,popupEnabled as P,screenSizePerspectiveEnabled as q,url as U}from"./support/commonProperties.js";import{validateBinsQuery as D}from"./support/featureLayerUtils.js";import J from"./support/FeatureTemplate.js";import N from"./support/Field.js";import{defineFieldProperties as R}from"./support/fieldProperties.js";import{fixRendererFields as G,fixTimeInfoFields as Q}from"./support/fieldUtils.js";import B from"./support/LabelClass.js";import{reader as C}from"./support/labelingInfo.js";import{webSceneRendererTypes as Z,rendererTypes as V}from"../renderers/support/typeUtils.js";import _ from"../rest/support/Query.js";import{createPopupTemplate as A}from"../support/popupUtils.js";import{timeZoneProperty as M}from"../time/timeZoneUtils.js";const k=R();let z=class extends(g(c(y(f(h(m(I(F(x(b(j(v(r(u)))))))))))))){constructor(e){super(e),this.attributeTableTemplate=null,this.copyright=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.editingEnabled=!1,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="GeoJSON",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new d({layer:this}),this.spatialReference=a.WGS84,this.templates=null,this.title="GeoJSON",this.type="geojson"}destroy(){this.source?.destroy()}load(e){const t=this.loadFromPortal({supportedTypes:["GeoJson"],supportsData:!1},e).catch(i).then(()=>this.source.load(e)).then(()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo"],"service"),G(this.renderer,this.fieldsIndex),Q(this.timeInfo,this.fieldsIndex)});return this.addResolvingPromise(t),Promise.resolve(this)}get capabilities(){return this.source?this.source.capabilities:null}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return this.loaded&&null==this.geometryType}get parsedUrl(){return this.url?o(this.url):null}set renderer(e){G(e,this.fieldsIndex),this._set("renderer",e)}set url(e){if(!e)return void this._set("url",e);const t=o(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");await this.load();const i=await r(this,this.source,e,t);return this.read({extent:this.source.sourceJSON.extent,timeInfo:this.source.sourceJSON.timeInfo},{origin:"service",ignoreDefaults:!0}),i}on(e,t){return super.on(e,t)}createPopupTemplate(e){return A(this,e)}createQuery(){const e=new _,t=this.capabilities?.data;e.returnGeometry=!0,t&&t.supportsZ&&(e.returnZ=!0),e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:r,timeExtent:i}=this;return e.timeExtent=null!=r&&null!=i?i.offset(-r.value,r.unit):i||null,e}getFieldDomain(e,t){return this.getField(e)?.domain}getField(e){return this.fieldsIndex.get(e)}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(_.from(e)||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e})}queryObjectIds(e,t){return this.load().then(()=>this.source.queryObjectIds(_.from(e)||this.createQuery(),t))}queryFeatureCount(e,t){return this.load().then(()=>this.source.queryFeatureCount(_.from(e)||this.createQuery(),t))}queryExtent(e,t){return this.load().then(()=>this.source.queryExtent(_.from(e)||this.createQuery(),t))}async queryAttributeBins(e,t){const{source:r,capabilities:i}=await this.load();D(e,i,"GeoJSONLayer");const o=await import("../rest/support/AttributeBinsQuery.js"),s=await r.queryAttributeBins(o.default.from(e),t);if(s.features)for(const p of s.features)p.layer=p.sourceLayer=this;return s}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};e([s(O)],z.prototype,"attributeTableTemplate",void 0),e([s({readOnly:!0,json:{read:!1,write:!1}})],z.prototype,"capabilities",null),e([s({type:String})],z.prototype,"copyright",void 0),e([s({readOnly:!0})],z.prototype,"createQueryVersion",null),e([s(M("dateFieldsTimeReference"))],z.prototype,"dateFieldsTimeZone",void 0),e([s({readOnly:!0})],z.prototype,"defaultPopupTemplate",null),e([s({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],z.prototype,"definitionExpression",void 0),e([s({type:String})],z.prototype,"displayField",void 0),e([s({type:Boolean})],z.prototype,"editingEnabled",void 0),e([s(T)],z.prototype,"elevationInfo",void 0),e([s({type:[N],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],z.prototype,"fields",void 0),e([s(k.fieldsIndex)],z.prototype,"fieldsIndex",void 0),e([s({type:n,json:{name:"extent"}})],z.prototype,"fullExtent",void 0),e([s({type:["point","polygon","polyline","multipoint"],json:{read:{reader:l.read}}})],z.prototype,"geometryType",void 0),e([s({type:Boolean})],z.prototype,"hasZ",void 0),e([s(E)],z.prototype,"id",void 0),e([s({type:Boolean,readOnly:!0})],z.prototype,"isTable",null),e([s(S)],z.prototype,"labelsVisible",void 0),e([s({type:[B],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:C},write:!0}})],z.prototype,"labelingInfo",void 0),e([s(w)],z.prototype,"legendEnabled",void 0),e([s({type:["show","hide"]})],z.prototype,"listMode",void 0),e([s({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],z.prototype,"objectIdField",void 0),e([s(L)],z.prototype,"opacity",void 0),e([s({type:["GeoJSON"]})],z.prototype,"operationalLayerType",void 0),e([s(k.outFields)],z.prototype,"outFields",void 0),e([s({readOnly:!0})],z.prototype,"parsedUrl",null),e([s(P)],z.prototype,"popupEnabled",void 0),e([s({type:t,json:{name:"popupInfo",write:!0}})],z.prototype,"popupTemplate",void 0),e([s({types:V,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:Z}}}})],z.prototype,"renderer",null),e([s(q)],z.prototype,"screenSizePerspectiveEnabled",void 0),e([s({readOnly:!0})],z.prototype,"source",void 0),e([s({type:a})],z.prototype,"spatialReference",void 0),e([s({type:[J]})],z.prototype,"templates",void 0),e([s()],z.prototype,"title",void 0),e([s({json:{read:!1},readOnly:!0})],z.prototype,"type",void 0),e([s(U)],z.prototype,"url",null),z=e([p("esri.layers.GeoJSONLayer")],z);const W=z;export{W as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../PopupTemplate.js";import{MultiOriginJSONMixin as r}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as o}from"../core/promiseUtils.js";import{urlToObject as i}from"../core/urlUtils.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import n from"../geometry/Extent.js";import a from"../geometry/SpatialReference.js";import{featureGeometryTypeKebabDictionary as l}from"../geometry/support/typeUtils.js";import u from"./Layer.js";import{GeoJSONSource as d}from"./graphics/sources/GeoJSONSource.js";import{BlendLayer as m}from"./mixins/BlendLayer.js";import{CustomParametersMixin as y}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as c}from"./mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as h}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as f}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as j}from"./mixins/OperationalLayer.js";import{OrderedLayer as g}from"./mixins/OrderedLayer.js";import{PortalLayer as v}from"./mixins/PortalLayer.js";import{RefreshableLayer as b}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as x}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as I}from"./mixins/TemporalLayer.js";import{TrackableLayer as F}from"./mixins/TrackableLayer.js";import{attributeTableTemplate as O,elevationInfo as T,id as E,labelsVisible as S,legendEnabled as w,opacity as L,popupEnabled as P,screenSizePerspectiveEnabled as q,url as U}from"./support/commonProperties.js";import{validateBinsQuery as D}from"./support/featureLayerUtils.js";import J from"./support/FeatureTemplate.js";import N from"./support/Field.js";import{defineFieldProperties as R}from"./support/fieldProperties.js";import{fixRendererFields as G,fixTimeInfoFields as Q}from"./support/fieldUtils.js";import B from"./support/LabelClass.js";import{reader as C}from"./support/labelingInfo.js";import{webSceneRendererTypes as Z,rendererTypes as V}from"../renderers/support/typeUtils.js";import _ from"../rest/support/Query.js";import{createPopupTemplate as A}from"../support/popupUtils.js";import{timeZoneProperty as M}from"../time/timeZoneUtils.js";const k=R();let z=class extends(g(c(y(f(h(m(I(F(x(b(j(v(r(u)))))))))))))){constructor(e){super(e),this.attributeTableTemplate=null,this.copyright=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.editingEnabled=!1,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="GeoJSON",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new d({layer:this}),this.spatialReference=a.WGS84,this.templates=null,this.title="GeoJSON",this.type="geojson"}destroy(){this.source?.destroy()}load(e){const t=this.loadFromPortal({supportedTypes:["GeoJson"],supportsData:!1},e).catch(o).then(()=>this.source.load(e)).then(()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo"],"service"),G(this.renderer,this.fieldsIndex),Q(this.timeInfo,this.fieldsIndex)});return this.addResolvingPromise(t),Promise.resolve(this)}get capabilities(){return this.source?this.source.capabilities:null}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return this.loaded&&null==this.geometryType}get parsedUrl(){return i(this.url)}set renderer(e){G(e,this.fieldsIndex),this._set("renderer",e)}set url(e){if(!e)return void this._set("url",e);const t=i(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");await this.load();const o=await r(this,this.source,e,t);return this.read({extent:this.source.sourceJSON.extent,timeInfo:this.source.sourceJSON.timeInfo},{origin:"service",ignoreDefaults:!0}),o}on(e,t){return super.on(e,t)}createPopupTemplate(e){return A(this,e)}createQuery(){const e=new _,t=this.capabilities?.data;e.returnGeometry=!0,t&&t.supportsZ&&(e.returnZ=!0),e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:r,timeExtent:o}=this;return e.timeExtent=null!=r&&null!=o?o.offset(-r.value,r.unit):o||null,e}getFieldDomain(e,t){return this.getField(e)?.domain}getField(e){return this.fieldsIndex.get(e)}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(_.from(e)||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e})}queryObjectIds(e,t){return this.load().then(()=>this.source.queryObjectIds(_.from(e)||this.createQuery(),t))}queryFeatureCount(e,t){return this.load().then(()=>this.source.queryFeatureCount(_.from(e)||this.createQuery(),t))}queryExtent(e,t){return this.load().then(()=>this.source.queryExtent(_.from(e)||this.createQuery(),t))}async queryAttributeBins(e,t){const{source:r,capabilities:o}=await this.load();D(e,o,"GeoJSONLayer");const i=await import("../rest/support/AttributeBinsQuery.js"),s=await r.queryAttributeBins(i.default.from(e),t);if(s.features)for(const p of s.features)p.layer=p.sourceLayer=this;return s}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};e([s(O)],z.prototype,"attributeTableTemplate",void 0),e([s({readOnly:!0,json:{read:!1,write:!1}})],z.prototype,"capabilities",null),e([s({type:String})],z.prototype,"copyright",void 0),e([s({readOnly:!0})],z.prototype,"createQueryVersion",null),e([s(M("dateFieldsTimeReference"))],z.prototype,"dateFieldsTimeZone",void 0),e([s({readOnly:!0})],z.prototype,"defaultPopupTemplate",null),e([s({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],z.prototype,"definitionExpression",void 0),e([s({type:String})],z.prototype,"displayField",void 0),e([s({type:Boolean})],z.prototype,"editingEnabled",void 0),e([s(T)],z.prototype,"elevationInfo",void 0),e([s({type:[N],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],z.prototype,"fields",void 0),e([s(k.fieldsIndex)],z.prototype,"fieldsIndex",void 0),e([s({type:n,json:{name:"extent"}})],z.prototype,"fullExtent",void 0),e([s({type:["point","polygon","polyline","multipoint"],json:{read:{reader:l.read}}})],z.prototype,"geometryType",void 0),e([s({type:Boolean})],z.prototype,"hasZ",void 0),e([s(E)],z.prototype,"id",void 0),e([s({type:Boolean,readOnly:!0})],z.prototype,"isTable",null),e([s(S)],z.prototype,"labelsVisible",void 0),e([s({type:[B],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:C},write:!0}})],z.prototype,"labelingInfo",void 0),e([s(w)],z.prototype,"legendEnabled",void 0),e([s({type:["show","hide"]})],z.prototype,"listMode",void 0),e([s({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],z.prototype,"objectIdField",void 0),e([s(L)],z.prototype,"opacity",void 0),e([s({type:["GeoJSON"]})],z.prototype,"operationalLayerType",void 0),e([s(k.outFields)],z.prototype,"outFields",void 0),e([s({readOnly:!0})],z.prototype,"parsedUrl",null),e([s(P)],z.prototype,"popupEnabled",void 0),e([s({type:t,json:{name:"popupInfo",write:!0}})],z.prototype,"popupTemplate",void 0),e([s({types:V,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:Z}}}})],z.prototype,"renderer",null),e([s(q)],z.prototype,"screenSizePerspectiveEnabled",void 0),e([s({readOnly:!0})],z.prototype,"source",void 0),e([s({type:a})],z.prototype,"spatialReference",void 0),e([s({type:[J]})],z.prototype,"templates",void 0),e([s()],z.prototype,"title",void 0),e([s({json:{read:!1},readOnly:!0})],z.prototype,"type",void 0),e([s(U)],z.prototype,"url",null),z=e([p("esri.layers.GeoJSONLayer")],z);const W=z;export{W as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Clonable.js";import r from"../core/Collection.js";import s from"../core/Error.js";import{loadAll as i}from"../core/loadAll.js";import{getOrCreateMapValue as o}from"../core/MapUtils.js";import{MultiOriginJSONMixin as a}from"../core/MultiOriginJSONSupport.js";import{debounce as n,throwIfAbortError as u,whenOrAbort as l}from"../core/promiseUtils.js";import{watch as p,sync as y}from"../core/reactiveUtils.js";import{sqlAnd as d}from"../core/sql.js";import{urlToObject as c,join as h}from"../core/urlUtils.js";import{property as m}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{reader as f}from"../core/accessorSupport/decorators/reader.js";import{subclass as b}from"../core/accessorSupport/decorators/subclass.js";import g from"./Layer.js";import{APIKeyMixin as w}from"./mixins/APIKeyMixin.js";import{ArcGISService as S}from"./mixins/ArcGISService.js";import{BlendLayer as j}from"./mixins/BlendLayer.js";import{CustomParametersMixin as F}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as v}from"./mixins/DisplayFilteredLayer.js";import{EditBusLayer as L}from"./mixins/EditBusLayer.js";import{FeatureLayerBase as T}from"./mixins/FeatureLayerBase.js";import{OperationalLayer as E}from"./mixins/OperationalLayer.js";import{PortalLayer as x}from"./mixins/PortalLayer.js";import{RefreshableLayer as I}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as _}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as C}from"./mixins/TemporalLayer.js";import{titleFromUrlAndName as O}from"./support/arcgisLayerUrl.js";import{id as P}from"./support/commonProperties.js";import{ensureLayerCredential as U,computeEffectiveEditingEnabled as A,addAttachment as G,updateAttachment as q,applyEdits as D,createQuery as M,deleteAttachments as k,fetchRecomputedExtents as R,computeDomainFromSubtypes as $,getFeatureSubtype as V,queryAttachments as N,queryObjectIds as Q,queryFeatureCount as H,queryExtent as J,queryRelatedFeatures as B,queryRelatedFeaturesCount as z,hasDataChanged as K}from"./support/featureLayerUtils.js";import{defineFieldProperties as Z}from"./support/fieldProperties.js";import{fixTimeInfoFields as W}from"./support/fieldUtils.js";import{getSymbolWithColorSupport as X,createSimpleRenderersWithUniqueColors as Y}from"./support/subtypeGroupLayerUtils.js";import ee from"./support/SubtypeSublayer.js";import te from"./support/TimeInfo.js";import{serviceSupportsSpatialReference as re}from"./support/versionUtils.js";import se from"../rest/support/Query.js";import{isNumber as ie}from"../support/guards.js";import{SaveOperationType as oe}from"../webdoc/interfaces.js";const ae="SubtypeGroupLayer";function ne(e,t){return new s("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function ue(e,t){const r=[];for(const s of e){const e=new ee;e.read(s,t),r.push(e)}return r}const le=Z();function pe(){return{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0}}}let ye=class extends(T(v(L(j(C(_(I(S(E(x(a(F(w(t.ClonableMixin(g))))))))))))))){constructor(...e){super(...e),this._sublayerLookup=new Map,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.sublayers=new(r.ofType(ee)),this.useUniqueColorsForSublayers=!0,this.supportedSourceTypes=new Set(["Feature Layer","Table"]),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this._debouncedSaveOperations=n(async(e,t,r)=>{const{save:s,saveAs:i}=await import("./save/featureLayerUtils.js");switch(e){case oe.SAVE:return s(this,t);case oe.SAVE_AS:return i(this,r,t)}}),this.addHandles(p(()=>this.sublayers,(e,t)=>this._handleSublayersChange(e,t),y))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(u).then(async()=>{if(!this.url)throw new s("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(null==this.layerId)throw new s("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");return this._initLayerProperties(await this.createGraphicsSource(t))}).then(()=>U(this,"load",e));return this.addResolvingPromise(r),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return A(this)}get operationalLayerType(){return this.isTable?"SubtypeGroupTable":"SubtypeGroupLayer"}get parsedUrl(){const e=c(this.url);return null!=e&&null!=this.layerId&&(e.path=h(e.path,this.layerId.toString())),e}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:t}){return this.url?O(this.url,t):t}async addAttachment(e,t){const r=await G(this,e,t,ae);return this.lastEditsEventDate=new Date,r}async updateAttachment(e,t,r){const s=await q(this,e,t,r,ae);return this.lastEditsEventDate=new Date,s}async applyEdits(e,t){return D(this,e,t)}on(e,t){return super.on(e,t)}async createGraphicsSource(e){const{default:t}=await l(import("./graphics/sources/FeatureLayerSource.js"),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=M(this),t=this.sublayers.map(e=>e.subtypeCode);return e.where=d(`${this.subtypeField} IN (${t.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,t){const r=await k(this,e,t,ae);return this.lastEditsEventDate=new Date,r}async fetchRecomputedExtents(e){return R(this,e,ae)}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains){const t=$(this,e);if(t)return t}const r=V(this,t?.feature);if(r){const t=r.domains?.[e];return"inherited"===t?.type?this._getLayerDomain(e):t}return this._getLayerDomain(e)}loadAll(){return i(this,e=>{e(this.sublayers)})}async queryAttachments(e,t){return N(this,e,t,ae)}async queryFeatures(e,t){const r=await this.load(),s=se.from(e)??r.createQuery(),i=s.outFields??[];i.includes(this.subtypeField)||(i.push(this.subtypeField),s.outFields=i);const o=await r.source.queryFeatures(s,t);if(o?.features)for(const a of o.features)a.layer=a.sourceLayer=this.findSublayerForFeature(a);return o}async queryObjectIds(e,t){return(await Q(this,e,t,ae)).filter(ie)}async queryFeatureCount(e,t){return H(this,e,t,ae)}async queryExtent(e,t){return J(this,e,t,ae)}async queryRelatedFeatures(e,t){return B(this,e,t,ae)}async queryRelatedFeaturesCount(e,t){return z(this,e,t,ae)}async save(e){return this._debouncedSaveOperations(oe.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(oe.SAVE_AS,t,e)}write(e,t){const{origin:r,layerContainerType:i,messages:o}=t;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==i)return o?.push(ne(this,"using a table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===i)return o?.push(ne(this,"using a non-table source cannot be written to tables in web maps")),null;return this.sublayers?.length?super.write(e,t):(o?.push(new s("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&re(this,e)}async getFeatureTitle(e,t){const r=this.findSublayerForFeature(e);return r?await r.getFeatureTitle(e,t):this._getFeatureTitleForUnknownSublayer(e)}async getFeatureTitles(e,t){const r=new Map,s=new Map,i=[s];e.forEach(e=>{const t=this.findSublayerForFeature(e);if(t)o(r,t,()=>[]).push(e);else{const t=e.getObjectId()??e.attributes[this.objectIdField];s.set(t,this._getFeatureTitleForUnknownSublayer(e))}});const a=await Promise.all(Array.from(r).map(([e,r])=>e.getFeatureTitles(r,t)));return a.forEach(e=>i.push(e)),new Map(i.flatMap(e=>[...e]))}get featureTitleFields(){const e=new Set;for(const t of this.sublayers){const r=t.featureTitleFields;for(const t of r)e.add(t)}return[...e]}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}async _initLayerProperties(e){this._set("source",e);const{sourceJSON:t}=e;if(t&&(this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})),!this.subtypes?.length)throw new s("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),W(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return K(this)}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some(e=>"geometry"===e.type)||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach(e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),e.on("after-remove",({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)})],"sublayers-owner"))}_getFeatureTitleForUnknownSublayer(e){const{displayField:t,fieldsIndex:r,objectIdField:s}=this;if(t&&r.has(t))return e.attributes[r.get(t).name]??"";const i=e.getObjectId();return null!=i?i.toString():s&&r.has(s)?e.attributes[r.get(s).name]??"":""}};e([m({readOnly:!0})],ye.prototype,"createQueryVersion",null),e([m({readOnly:!0})],ye.prototype,"editingEnabled",null),e([m({readOnly:!0})],ye.prototype,"effectiveEditingEnabled",null),e([m({...le.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],ye.prototype,"fields",void 0),e([m(le.fieldsIndex)],ye.prototype,"fieldsIndex",void 0),e([m(P)],ye.prototype,"id",void 0),e([m({type:["show","hide","hide-children"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],ye.prototype,"listMode",void 0),e([m({type:["SubtypeGroupLayer","SubtypeGroupTable"],json:{...pe(),origins:{"web-document":pe(),"portal-item":pe()}}})],ye.prototype,"operationalLayerType",null),e([m(le.outFields)],ye.prototype,"outFields",void 0),e([m({readOnly:!0})],ye.prototype,"parsedUrl",null),e([m({clonable:!1})],ye.prototype,"source",null),e([m({type:r.ofType(ee),json:{origins:{service:{read:{source:"subtypes",reader(e,t,s){let i=null;if(this.useUniqueColorsForSublayers){const r=X(t,s);i=r?Y(e.length,r):null}const o=e.map(({code:e},r)=>{const o=new ee({subtypeCode:e});o.read(t,s);const a=i?.[r];return a&&o.read({drawingInfo:{renderer:a.toJSON()}},s),o});return new(r.ofType(ee))(o)}}}},read:{source:["layers","tables"],reader(e,t,s){let i;return"SubtypeGroupLayer"===t.layerType&&t.layers?.length?i=ue(t.layers,s):"SubtypeGroupTable"===t.layerType&&t.tables?.length&&(i=ue(t.tables,s)),new(r.ofType(ee))(i)}},write:{ignoreOrigin:!0,writer(e,t,r,s){const i=[];for(const o of e){const e=o.write({},s);i.push(e)}this.isTable?t.tables=i:t.layers=i}}}})],ye.prototype,"sublayers",void 0),e([m()],ye.prototype,"useUniqueColorsForSublayers",void 0),e([m({type:te})],ye.prototype,"timeInfo",void 0),e([m({json:{origins:{"portal-item":{write:{enabled:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],ye.prototype,"title",void 0),e([f("service","title",["name"])],ye.prototype,"readTitleFromService",null),e([m({json:{read:!1}})],ye.prototype,"type",void 0),e([m({clonable:!1,readOnly:!0})],ye.prototype,"featureTitleFields",null),ye=e([b("esri.layers.SubtypeGroupLayer")],ye);const de=ye;export{de as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Clonable.js";import r from"../core/Collection.js";import s from"../core/Error.js";import{loadAll as i}from"../core/loadAll.js";import{getOrCreateMapValue as o}from"../core/MapUtils.js";import{MultiOriginJSONMixin as a}from"../core/MultiOriginJSONSupport.js";import{debounce as n,throwIfAbortError as u,whenOrAbort as l}from"../core/promiseUtils.js";import{watch as p,sync as y}from"../core/reactiveUtils.js";import{sqlAnd as d}from"../core/sql.js";import{property as c}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{reader as h}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import f from"./Layer.js";import{APIKeyMixin as b}from"./mixins/APIKeyMixin.js";import{ArcGISService as g}from"./mixins/ArcGISService.js";import{BlendLayer as w}from"./mixins/BlendLayer.js";import{CustomParametersMixin as S}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as j}from"./mixins/DisplayFilteredLayer.js";import{EditBusLayer as F}from"./mixins/EditBusLayer.js";import{FeatureLayerBase as v}from"./mixins/FeatureLayerBase.js";import{OperationalLayer as L}from"./mixins/OperationalLayer.js";import{PortalLayer as T}from"./mixins/PortalLayer.js";import{RefreshableLayer as E}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as x}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as _}from"./mixins/TemporalLayer.js";import{titleFromUrlAndName as I}from"./support/arcgisLayerUrl.js";import{id as C}from"./support/commonProperties.js";import{ensureLayerCredential as O,computeEffectiveEditingEnabled as P,addAttachment as A,updateAttachment as G,applyEdits as U,createQuery as q,deleteAttachments as D,fetchRecomputedExtents as M,computeDomainFromSubtypes as k,getFeatureSubtype as R,queryAttachments as $,queryObjectIds as V,queryFeatureCount as N,queryExtent as Q,queryRelatedFeatures as H,queryRelatedFeaturesCount as J,hasDataChanged as B}from"./support/featureLayerUtils.js";import{defineFieldProperties as z}from"./support/fieldProperties.js";import{fixTimeInfoFields as K}from"./support/fieldUtils.js";import{getSymbolWithColorSupport as Z,createSimpleRenderersWithUniqueColors as W}from"./support/subtypeGroupLayerUtils.js";import X from"./support/SubtypeSublayer.js";import Y from"./support/TimeInfo.js";import{serviceSupportsSpatialReference as ee}from"./support/versionUtils.js";import te from"../rest/support/Query.js";import{isNumber as re}from"../support/guards.js";import{SaveOperationType as se}from"../webdoc/interfaces.js";const ie="SubtypeGroupLayer";function oe(e,t){return new s("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function ae(e,t){const r=[];for(const s of e){const e=new X;e.read(s,t),r.push(e)}return r}const ne=z();function ue(){return{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0}}}let le=class extends(v(j(F(w(_(x(E(g(L(T(a(S(b(t.ClonableMixin(f))))))))))))))){constructor(...e){super(...e),this._sublayerLookup=new Map,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.sublayers=new(r.ofType(X)),this.useUniqueColorsForSublayers=!0,this.supportedSourceTypes=new Set(["Feature Layer","Table"]),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this._debouncedSaveOperations=n(async(e,t,r)=>{const{save:s,saveAs:i}=await import("./save/featureLayerUtils.js");switch(e){case se.SAVE:return s(this,t);case se.SAVE_AS:return i(this,r,t)}}),this.addHandles(p(()=>this.sublayers,(e,t)=>this._handleSublayersChange(e,t),y))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(u).then(async()=>{if(!this.url)throw new s("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(null==this.layerId)throw new s("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");return this._initLayerProperties(await this.createGraphicsSource(t))}).then(()=>O(this,"load",e));return this.addResolvingPromise(r),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return P(this)}get operationalLayerType(){return this.isTable?"SubtypeGroupTable":"SubtypeGroupLayer"}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:t}){return this.url?I(this.url,t):t}async addAttachment(e,t){const r=await A(this,e,t,ie);return this.lastEditsEventDate=new Date,r}async updateAttachment(e,t,r){const s=await G(this,e,t,r,ie);return this.lastEditsEventDate=new Date,s}async applyEdits(e,t){return U(this,e,t)}on(e,t){return super.on(e,t)}async createGraphicsSource(e){const{default:t}=await l(import("./graphics/sources/FeatureLayerSource.js"),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=q(this),t=this.sublayers.map(e=>e.subtypeCode);return e.where=d(`${this.subtypeField} IN (${t.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,t){const r=await D(this,e,t,ie);return this.lastEditsEventDate=new Date,r}async fetchRecomputedExtents(e){return M(this,e,ie)}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains){const t=k(this,e);if(t)return t}const r=R(this,t?.feature);if(r){const t=r.domains?.[e];return"inherited"===t?.type?this._getLayerDomain(e):t}return this._getLayerDomain(e)}loadAll(){return i(this,e=>{e(this.sublayers)})}async queryAttachments(e,t){return $(this,e,t,ie)}async queryFeatures(e,t){const r=await this.load(),s=te.from(e)??r.createQuery(),i=s.outFields??[];i.includes(this.subtypeField)||(i.push(this.subtypeField),s.outFields=i);const o=await r.source.queryFeatures(s,t);if(o?.features)for(const a of o.features)a.layer=a.sourceLayer=this.findSublayerForFeature(a);return o}async queryObjectIds(e,t){return(await V(this,e,t,ie)).filter(re)}async queryFeatureCount(e,t){return N(this,e,t,ie)}async queryExtent(e,t){return Q(this,e,t,ie)}async queryRelatedFeatures(e,t){return H(this,e,t,ie)}async queryRelatedFeaturesCount(e,t){return J(this,e,t,ie)}async save(e){return this._debouncedSaveOperations(se.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(se.SAVE_AS,t,e)}write(e,t){const{origin:r,layerContainerType:i,messages:o}=t;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==i)return o?.push(oe(this,"using a table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===i)return o?.push(oe(this,"using a non-table source cannot be written to tables in web maps")),null;return this.sublayers?.length?super.write(e,t):(o?.push(new s("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&ee(this,e)}async getFeatureTitle(e,t){const r=this.findSublayerForFeature(e);return r?await r.getFeatureTitle(e,t):this._getFeatureTitleForUnknownSublayer(e)}async getFeatureTitles(e,t){const r=new Map,s=new Map,i=[s];e.forEach(e=>{const t=this.findSublayerForFeature(e);if(t)o(r,t,()=>[]).push(e);else{const t=e.getObjectId()??e.attributes[this.objectIdField];s.set(t,this._getFeatureTitleForUnknownSublayer(e))}});const a=await Promise.all(Array.from(r).map(([e,r])=>e.getFeatureTitles(r,t)));return a.forEach(e=>i.push(e)),new Map(i.flatMap(e=>[...e]))}get featureTitleFields(){const e=new Set;for(const t of this.sublayers){const r=t.featureTitleFields;for(const t of r)e.add(t)}return[...e]}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}async _initLayerProperties(e){this._set("source",e);const{sourceJSON:t}=e;if(t&&(this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})),!this.subtypes?.length)throw new s("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),K(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return B(this)}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some(e=>"geometry"===e.type)||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach(e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),e.on("after-remove",({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)})],"sublayers-owner"))}_getFeatureTitleForUnknownSublayer(e){const{displayField:t,fieldsIndex:r,objectIdField:s}=this;if(t&&r.has(t))return e.attributes[r.get(t).name]??"";const i=e.getObjectId();return null!=i?i.toString():s&&r.has(s)?e.attributes[r.get(s).name]??"":""}};e([c({readOnly:!0})],le.prototype,"createQueryVersion",null),e([c({readOnly:!0})],le.prototype,"editingEnabled",null),e([c({readOnly:!0})],le.prototype,"effectiveEditingEnabled",null),e([c({...ne.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],le.prototype,"fields",void 0),e([c(ne.fieldsIndex)],le.prototype,"fieldsIndex",void 0),e([c(C)],le.prototype,"id",void 0),e([c({type:["show","hide","hide-children"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],le.prototype,"listMode",void 0),e([c({type:["SubtypeGroupLayer","SubtypeGroupTable"],json:{...ue(),origins:{"web-document":ue(),"portal-item":ue()}}})],le.prototype,"operationalLayerType",null),e([c(ne.outFields)],le.prototype,"outFields",void 0),e([c({clonable:!1})],le.prototype,"source",null),e([c({type:r.ofType(X),json:{origins:{service:{read:{source:"subtypes",reader(e,t,s){let i=null;if(this.useUniqueColorsForSublayers){const r=Z(t,s);i=r?W(e.length,r):null}const o=e.map(({code:e},r)=>{const o=new X({subtypeCode:e});o.read(t,s);const a=i?.[r];return a&&o.read({drawingInfo:{renderer:a.toJSON()}},s),o});return new(r.ofType(X))(o)}}}},read:{source:["layers","tables"],reader(e,t,s){let i;return"SubtypeGroupLayer"===t.layerType&&t.layers?.length?i=ae(t.layers,s):"SubtypeGroupTable"===t.layerType&&t.tables?.length&&(i=ae(t.tables,s)),new(r.ofType(X))(i)}},write:{ignoreOrigin:!0,writer(e,t,r,s){const i=[];for(const o of e){const e=o.write({},s);i.push(e)}this.isTable?t.tables=i:t.layers=i}}}})],le.prototype,"sublayers",void 0),e([c()],le.prototype,"useUniqueColorsForSublayers",void 0),e([c({type:Y})],le.prototype,"timeInfo",void 0),e([c({json:{origins:{"portal-item":{write:{enabled:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],le.prototype,"title",void 0),e([h("service","title",["name"])],le.prototype,"readTitleFromService",null),e([c({json:{read:!1}})],le.prototype,"type",void 0),e([c({clonable:!1,readOnly:!0})],le.prototype,"featureTitleFields",null),le=e([m("esri.layers.SubtypeGroupLayer")],le);const pe=le;export{pe as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../chunks/tslib.es6.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import{defineFieldProperties as s}from"../support/fieldProperties.js";const t=s(),p=s=>{let p=class extends s{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return r([o(t.fields)],p.prototype,"fields",void 0),r([o(t.fieldsIndex)],p.prototype,"fieldsIndex",void 0),p=r([e("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],p),p};export{p as KnowledgeGraphSublayerBase};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{defineFieldProperties as e}from"../support/fieldProperties.js";const t=e(),p=e=>{const p=e;let i=class extends p{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return r([o(t.fields)],i.prototype,"fields",void 0),r([o(t.fieldsIndex)],i.prototype,"fieldsIndex",void 0),i=r([s("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],i),i};export{p as KnowledgeGraphSublayerBase};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";function s(e){return"portalItem"in e}const i=i=>{let o=class extends i{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):s(this)?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return e([r({type:String})],o.prototype,"apiKey",null),o=e([t("esri.layers.mixins.APIKeyMixin")],o),o};export{i as APIKeyMixin};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";function s(e){return"portalItem"in e}const i=i=>{const o=i;let p=class extends o{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):s(this)?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return e([r({type:String})],p.prototype,"apiKey",null),p=e([t("esri.layers.mixins.APIKeyMixin")],p),p};export{i as APIKeyMixin};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{reader as r}from"../../core/accessorSupport/decorators/reader.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";import l from"../../geometry/SpatialReference.js";import i from"../support/TileInfo.js";import a from"../support/TileInfoTilemapCache.js";import{TilemapCache as s}from"../support/TilemapCache.js";const p=p=>{let n=class extends p{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,o){return null!=o.minLOD&&null!=o.maxLOD?e:0}readMaxScale(e,o){return null!=o.minLOD&&null!=o.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,o,r){const t=o.capabilities?.includes("Tilemap");let{minLOD:l,maxLOD:p,minScale:n,maxScale:c}=o;if(null==l&&null==p&&(0!==n||0!==c)){const e=e=>Math.round(1e4*e)/1e4;n=e(n||o.tileInfo.lods[0].scale),c=e(c||o.tileInfo.lods[o.tileInfo.lods.length-1].scale);for(const r of o.tileInfo.lods){const o=e(r.scale);l=o>=n?r.level:l,p=o>=c?r.level:p}}if(t)return new s({layer:this,minLOD:l,maxLOD:p});if(o.tileInfo){const e=new i;return e.read(o.tileInfo,r),new a(e,l,p)}return null}};return e([o({json:{read:{source:"copyrightText"}}})],n.prototype,"copyright",void 0),e([o()],n.prototype,"minScale",void 0),e([r("service","minScale")],n.prototype,"readMinScale",null),e([o()],n.prototype,"maxScale",void 0),e([r("service","maxScale")],n.prototype,"readMaxScale",null),e([o({type:l})],n.prototype,"spatialReference",void 0),e([o({readOnly:!0})],n.prototype,"supportsBlankTile",null),e([o({type:i})],n.prototype,"tileInfo",void 0),e([o()],n.prototype,"tilemapCache",void 0),e([r("service","tilemapCache",["capabilities","tileInfo"])],n.prototype,"readTilemapCache",null),e([o()],n.prototype,"version",void 0),n=e([t("esri.layers.mixins.ArcGISCachedService")],n),n};export{p as ArcGISCachedService};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{reader as r}from"../../core/accessorSupport/decorators/reader.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";import l from"../../geometry/SpatialReference.js";import i from"../support/TileInfo.js";import s from"../support/TileInfoTilemapCache.js";import{TilemapCache as a}from"../support/TilemapCache.js";const p=p=>{const n=p;let c=class extends n{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,o){return null!=o.minLOD&&null!=o.maxLOD?e:0}readMaxScale(e,o){return null!=o.minLOD&&null!=o.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,o,r){const t=o.capabilities?.includes("Tilemap");let{minLOD:l,maxLOD:p,minScale:n,maxScale:c}=o;if(null==l&&null==p&&(0!==n||0!==c)){const e=e=>Math.round(1e4*e)/1e4;n=e(n||o.tileInfo.lods[0].scale),c=e(c||o.tileInfo.lods[o.tileInfo.lods.length-1].scale);for(const r of o.tileInfo.lods){const o=e(r.scale);l=o>=n?r.level:l,p=o>=c?r.level:p}}if(t)return new a({layer:this,minLOD:l,maxLOD:p});if(o.tileInfo){const e=new i;return e.read(o.tileInfo,r),new s(e,l,p)}return null}};return e([o({json:{read:{source:"copyrightText"}}})],c.prototype,"copyright",void 0),e([o()],c.prototype,"minScale",void 0),e([r("service","minScale")],c.prototype,"readMinScale",null),e([o()],c.prototype,"maxScale",void 0),e([r("service","maxScale")],c.prototype,"readMaxScale",null),e([o({type:l})],c.prototype,"spatialReference",void 0),e([o({readOnly:!0})],c.prototype,"supportsBlankTile",null),e([o({type:i})],c.prototype,"tileInfo",void 0),e([o()],c.prototype,"tilemapCache",void 0),e([r("service","tilemapCache",["capabilities","tileInfo"])],c.prototype,"readTilemapCache",null),e([o()],c.prototype,"version",void 0),c=e([t("esri.layers.mixins.ArcGISCachedService")],c),c};export{p as ArcGISCachedService};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import i from"../../request.js";import{deprecatedFunction as r}from"../../core/deprecate.js";import s from"../../core/Error.js";import{clone as n}from"../../core/lang.js";import a from"../../core/Logger.js";import{watch as o}from"../../core/reactiveUtils.js";import{urlToObject as l}from"../../core/urlUtils.js";import{property as u}from"../../core/accessorSupport/decorators/property.js";import{Integer as p,ensureRange as m,ensureClass as c,ensureNumber as h}from"../../core/accessorSupport/ensureType.js";import{reader as d}from"../../core/accessorSupport/decorators/reader.js";import{subclass as f}from"../../core/accessorSupport/decorators/subclass.js";import{writer as y}from"../../core/accessorSupport/decorators/writer.js";import g from"../../geometry/Extent.js";import R from"../../geometry/Polygon.js";import I from"../../geometry/SpatialReference.js";import{srToRESTValue as v}from"../../geometry/support/spatialReferenceUtils.js";import{opacity as w,url as b}from"../support/commonProperties.js";import S from"../support/DimensionalDefinition.js";import{ExportImageServiceParameters as x}from"../support/ExportImageServiceParameters.js";import _ from"../support/Field.js";import F from"../support/FieldsIndex.js";import{createBitmap as D}from"../support/imageBitmapUtils.js";import{isSupportedRendererType as T}from"../support/imageryRendererUtils.js";import O from"../support/MosaicRule.js";import C from"../support/MultidimensionalSubset.js";import M from"../support/PixelBlock.js";import{interpolationKebab as P,noDataInterpretationKebab as N,pixelTypeKebabDict as q}from"../support/rasterEnums.js";import{getServicePixelValueField as j,getItemPixelValueField as A,getRawServicePixelValueField as E,getProcessedServicePixelValueField as V,getMagnitudeField as Q,getDirectionField as U,getMultidimensionalFields as J,getRasterAttributeTableFields as B,commonRasterFieldNames as L,addMultidimensionalFieldValues as z,rasterFieldPrefix as H}from"../support/rasterFieldUtils.js";import G from"../support/RasterFunction.js";import k from"../support/RasterInfo.js";import{intersectMultimensionalSubset as W,getEffectiveMultidimensionalDefinition as $,getSubsetVariablesFromMdInfo as X,getDefaultMultidimensionalDefinition as K}from"../support/rasterDatasets/multidimensionalUtils.js";import{decode as Y,getFormat as Z}from"../support/rasterFormats/RasterCodec.js";import{uvComponentToVector as ee}from"../support/rasterFunctions/vectorFieldUtils.js";import{getSupportedRendererTypes as te,matchPresetRenderer as ie,getDefaultBandCombination as re,createDefaultRenderer as se,normalizeRendererJSON as ne}from"../../renderers/support/rasterRendererHelper.js";import ae from"../../renderers/support/RasterSymbolizer.js";import{websceneRasterRendererTypes as oe,rasterRendererTypes as le,read as ue}from"../../renderers/support/rasterTypeUtils.js";import{calculateVolume as pe,computeAngles as me,computePixelSpaceLocations as ce,computeHistograms as he,computeStatisticsHistograms as de,measureHeight as fe,measureAreaAndPerimeter as ye,measureDistanceAndAngle as ge,measurePointOrCentroid as Re,measureLengthFromImage as Ie,measureAreaFromImage as ve,getImageSpatialReferenceQueryParameter as we,getSamples as be,identify as Se,imageToMap as xe,imageToMapMultiray as _e,mapToImage as Fe,findImages as De,getImageUrl as Te,queryBoundary as Oe,queryGPSInfo as Ce}from"../../rest/imageService.js";import{fetchServiceRasterInfo as Me,generateRasterInfo as Pe,patchServiceInfo as Ne}from"../../rest/imageService/fetchRasterInfo.js";import{getCatalogItemRasterInfo as qe}from"../../rest/imageService/getCatalogItemRasterInfo.js";import{executeForCount as je}from"../../rest/query/executeForCount.js";import{executeForIds as Ae}from"../../rest/query/executeForIds.js";import{executeQueryJSON as Ee}from"../../rest/query/executeQueryJSON.js";import Ve from"../../rest/support/FeatureSet.js";import Qe from"../../rest/support/ImageIdentifyParameters.js";import Ue from"../../rest/support/Query.js";const Je=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),Be=m(h,{min:0,max:255});function Le(e){const t=JSON.stringify(e),i=t.includes('"rasterFunctionDefinition":{'),r=i?t.match(/"type":"(.*?FunctionArguments")/gi):t.match(/"rasterFunction":"(.*?")/gi),s=r?.map(e=>i?e.slice(8,-18):e.slice(18,-1));return s?s.join("/"):null}const ze=m=>{let h=class extends m{constructor(){super(...arguments),this._functionRasterInfos={},this._serviceSupportsMosaicRule=null,this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new x({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.length<1||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.forEach(t=>{e.set(t.name.toLowerCase().replaceAll(/ /gi,"_"),t.name)}),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every(e=>"number"==typeof e))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,i){null!=e&&"lerc"!==this.format&&(t[i]=e)}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?O.fromJSON(t):null}get fieldsIndex(){return this.fields?new F(this.fields):null}set format(e){e&&Je.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=O.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const i=e||t.mosaicRule;return i?O.fromJSON(i):this._isMosaicRuleSupported(t)?O.fromJSON(t):null}writeMosaicRule(e,t,i){const{mosaicRule:r}=this;this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=Be(e))}readObjectIdField(e,t){if(!e){const i=t.fields.find(e=>"esriFieldTypeOID"===e.type||"oid"===e.type);e=i?.name}return e}get parsedUrl(){return l(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}get renderer(){const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const i=t?.find(({name:t})=>t===e);return i?.renderer.clone()}return this.internalRenderer}set renderer(e){this.activePresetRendererName=null,this.internalRenderer=e}set internalRenderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("internalRenderer",e)}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer,s=ue(r,i);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!r.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),T(s)||a.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,i){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this.fields?.map(e=>e.clone())??[];e.push(j()),"mosaic-dataset"===this.sourceType&&this.fields?.length&&e.push(A()),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some(({name:e})=>"none"===e.toLowerCase())&&e.push(E()),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter(({name:e})=>"none"!==e.toLowerCase()).forEach(({name:t})=>e.push(V(t)));const{rasterInfo:t}=this;if(this._isVectorDataSet()){const i=t?.multidimensionalInfo?.variables[0].unit?.trim(),r=Q(i),s=U();e.push(r,s)}if(t?.multidimensionalInfo&&"raster-dataset"===this.sourceType){const i=J(t.multidimensionalInfo);e.push(...i)}const i=t?.attributeTable;if(null!=i){const t=B(i);e.push(...t)}return e}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=G.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const i=t.rasterFunctionInfos;return t.renderingRule||i?.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?G.fromJSON({rasterFunctionDefinition:t.renderingRule}):G.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?I.fromJSON(i):null}writePixelType(e,t,i){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[i]=q.toJSON(e))}readVersion(e,t){let i=t.currentVersion;return i||(i=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),i}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let i=e;const{renderer:r,symbolizer:s,pixelFilter:n}=this;if(!this._isPicture()&&r&&s&&!n){await this._updateSymbolizer(s,r);const{bandIds:n}=this;i=await this._symbolize({pixelData:e,bandIds:n,symbolizer:s},t)}return i}destroy(){this._shutdownJobHandler()}async calculateVolume(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsCalculateVolume)throw new s("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=n(e),this.mosaicRule&&null==e.mosaicRule&&(e.mosaicRule=this.mosaicRule),pe(this.url,e,this._getRequestOptions(t))}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new s("imagery-layer:compute-angles","this operation is not supported on the input image service");return me(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new s("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return ce(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new s("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=n(e),this._applyMosaicAndRenderingRules(e),he(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new s("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=n(e),this._applyMosaicAndRenderingRules(e),de(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const i=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?i.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?i.mensuration.supportsHeightFromBaseAndTopShadow:i.mensuration.supportsHeightFromTopAndTopShadow))throw new s("imagery-layer:measure-height","this operation is not supported on the input image service");return e=n(e),this._applyMosaicRule(e),fe(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const i=await this._fetchCapabilities(t?.signal);if(!(i.mensuration.supportsAreaAndPerimeter&&(!e.is3D||i.mensuration.supports3D)))throw new s("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=n(e),this._applyMosaicRule(e),ye(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const i=await this._fetchCapabilities(t?.signal);if(!(i.mensuration.supportsDistanceAndAngle&&(!e.is3D||i.mensuration.supports3D)))throw new s("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=n(e),this._applyMosaicRule(e),ge(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const i=await this._fetchCapabilities(t?.signal);if(!(i.mensuration.supportsPointOrCentroid&&(!e.is3D||i.mensuration.supports3D)))throw new s("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=n(e),this._applyMosaicRule(e),Re(this.url,e,this._getRequestOptions(t))}async measureLengthFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new s("imagery-layer:measure-length-from-image","this operation is not supported on the input image service");if("polyline"!==e.geometry.type)throw new s("imagery-layer:measure-length-from-image","this input geometry must be a polyline");return Ie(this.url,e,this._getRequestOptions(t))}async measureAreaFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new s("imagery-layer:measure-area-from-image","this operation is not supported on the input image service");if("polygon"!==e.geometry.type)throw new s("imagery-layer:measure-area-from-image","this input geometry must be a polygon");return ve(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const i=this.getField(e);return i?i.domain:null}fetchImage(e,t,i,n={}){if(r(a.getLogger(this),"`ImageryLayer.fetchImage` is deprecated in favor of 'ImageryLayer.fetchPixels'.",{replacement:"ImageryLayer.fetchPixels",version:"4.33",warnOnce:!0}),null==e||null==t||null==i)throw new s("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");return this.internalFetchImage(e,t,i,n)}async internalFetchImage(e,t,i,r={}){this._updateCurrentRasterInfo();const s=this.getExportImageServiceParameters(e,t,i,r.timeExtent);if(null==s){if(r.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");if(e.width=t,e.height=i,r.returnImageBitmap){return{imageBitmap:await D(e,`${ze(this.parsedUrl)}/exportImage`,r.signal)}}return{imageOrCanvasElement:e}}const{bandIds:s,rasterInfo:n}=this,a=(s?.length||n.bandCount)??0,o=t*i,l=n.pixelType,u=[];for(let e=0;e<a;e++)u.push(M.createEmptyBand(l,o));return{pixelData:{pixelBlock:new M({width:t,height:i,pixels:u,mask:new Uint8Array(o),pixelType:l}),extent:e}}}const n=!!r.requestAsImageElement&&!this.pixelFilter,a=n&&!!r.returnImageBitmap,o={imageServiceParameters:s,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:n,returnImageBitmap:a,signal:r.signal};return this._requestArrayBuffer(o)}async fetchPixels(e,t,i,r={}){await this._initJobHandler(),r.applyRendering&&this._updateCurrentRasterInfo();const s=r.applyRendering?void 0:new x({layer:this,requestRawData:!0,interpolation:r.interpolation??"nearest",bandIds:r.bandIds??[]}),n=this.getExportImageServiceParameters(e,t,i,r.timeExtent,s);if(null==n)return{extent:e,pixelBlock:null};delete n.pixelType,delete n.bandIds,delete n.compressionQuality;const a={imageServiceParameters:n,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:!1,returnImageBitmap:!1,signal:r.signal},{pixelData:o}=await this._requestArrayBuffer(a);return o??{extent:e,pixelBlock:null}}fetchKeyProperties(e){return i(ze(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>e.data)}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new s("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):i(ze(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>Ve.fromJSON(e.data))}getCatalogItemRasterInfo(e,t){const i={...t,query:this._getQueryParams()};return qe(ze(this.parsedUrl),e,i)}async getCatalogItemICSInfo(e,t){const{data:r}=await i(ze(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=r?.ics;if(!s)return;let n=null;try{n=(await i(ze(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n?.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};const a=this.version>=10.7?i(ze(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then(e=>e.data).catch(()=>({})):{},o=n.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[n]}),inSR:v(o),outSR:"0:"+e},u=i(ze(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then(e=>e.data).catch(()=>({})),p=5,m=(n.xmin+n.xmax)/2,c=(n.ymax-n.ymin)/(p+1),h=n.ymin+c,d=[];for(let i=0;i<p;i++)d.push({x:m,y:h+c*i});const f={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:d}),inSR:v(o),outSR:"0:"+e},y=i(ze(this.parsedUrl)+"/project",{query:this._getQueryParams(f),...t}).then(e=>e.data).catch(()=>({})),R=await Promise.all([a,u,y]);let w=R[0].ipxf;if(null==w){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(w={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const b=g.fromJSON(R[1]?.geometries?.[0]);b&&(b.spatialReference=new I({wkid:0,imageCoordinateSystem:s}));const S=R[2].geometries?R[2].geometries.filter(e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y):[],x=S.length;if(x<3)return{ics:s,icsToPixelTransform:w,icsExtent:b,northDirection:null};let _=0,F=0,D=0,T=0;for(let i=0;i<x;i++)_+=S[i].x,F+=S[i].y,D+=S[i].x*S[i].x,T+=S[i].x*S[i].y;const O=(x*T-_*F)/(x*D-_*_);let C=0;const M=S[p-1].x>S[0].x,P=S[p-1].y>S[0].y;return O===1/0?C=P?90:270:0===O?C=M?0:180:O>0?C=M?180*Math.atan(O)/Math.PI:180*Math.atan(O)/Math.PI+180:O<0&&(C=P?180+180*Math.atan(O)/Math.PI:360+180*Math.atan(O)/Math.PI),{ics:s,icsToPixelTransform:w,icsExtent:b,northDirection:C}}async generateRasterInfo(e,t){e=c(G,e);const i={...t,query:this._getQueryParams()};if(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e))return this.serviceRasterInfo??Me(ze(this.parsedUrl),this.sourceJSON,i);const r=Le(e);if(!r)throw new s("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[r])return this._functionRasterInfos[r];const n=Pe(ze(this.parsedUrl),e,i);this._functionRasterInfos[r]=n;try{return await n}catch(a){throw this._functionRasterInfos[r]=null,a}}getExportImageServiceParameters(e,t,i,r,s){e=e.clone().shiftCentralMeridian();const n=we(e.spatialReference,ze(this.parsedUrl));s??=this.exportImageServiceParameters;const a=s.toJSON(),{bandIds:o,noData:l}=a;let{renderingRule:u}=a;const p=this.rasterFunction?.rasterFunctionDefinition,m=this.renderer?.type,c=!m||"raster-stretch"===m||"raster-colormap"===m||"unique-value"===m||"class-breaks"===m||"raster-shaded-relief"===m;if(o?.length&&this._hasRasterFunction(this.rasterFunction)&&!p&&c){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:o}};if("Stretch"===u.rasterFunction)e.rasterFunctionArguments.Raster=u.rasterFunctionArguments.Raster,u.rasterFunctionArguments.Raster=e;else if("Colormap"===u.rasterFunction){const t=u.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,u.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=u,u=e;a.bandIds=void 0}else a.bandIds=o?.join(",");Array.isArray(l)&&l.length>0&&(a.noData=l.join(","));const h=this._processMultidimensionalIntersection(null,r,s.mosaicRule);if(h.isOutSide)return null;a.mosaicRule=null!=h.mosaicRule?JSON.stringify(h.mosaicRule):null,r=h.timeExtent,a.renderingRule=this._getRenderingRuleString(G.fromJSON(u));const d={};if(null!=r){const{start:e,end:t}=r.toJSON();e&&t&&e===t?d.time=""+e:null==e&&null==t||(d.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:n,imageSR:n,size:t+","+i,...a,...d}}async getSamples(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i?.operations.supportsGetSamples)throw new s("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=n(e);const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),be(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new s("imagery-layer:identify","identify operation is not supported on the input image service");e=n(e),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=R.fromExtent(e.geometry));const i=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(i.isOutSide)throw new s("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=i.timeExtent,e.mosaicRule=i.mosaicRule;const{raster:r,rasterFunction:a}=this;return a&&null==e.rasterFunction&&(e.rasterFunction=a),r&&null==e.raster&&(e.raster=r),Se(this.url,e,this._getRequestOptions(t))}async imageToMap(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMap)throw new s("imagery-layer:image-to-map","imageToMap operation is not supported on the input image service");return xe(ze(this.parsedUrl),e,this._getRequestOptions(t))}async imageToMapMultiray(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMapMultiray)throw new s("imagery-layer:image-to-map-multiray","imageToMapMultiray operation is not supported on the input image service");return _e(ze(this.parsedUrl),e,this._getRequestOptions(t))}async mapToImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMapToImage)throw new s("imagery-layer:map-to-image","mapToImage operation is not supported on the input image service");return Fe(ze(this.parsedUrl),e,this._getRequestOptions(t))}async findImages(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsFindImages)throw new s("imagery-layer:find-images","findImages operation is not supported on the input image service");return De(ze(this.parsedUrl),e,this._getRequestOptions(t))}async getImageUrl(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsGetImageUrl)throw new s("imagery-layer:get-image-url","getImageUrl operation is not supported on the input image service");return Te(ze(this.parsedUrl),e,this._getRequestOptions(t))}createQuery(){return new Ue({outFields:["*"],returnGeometry:!0,where:this.definitionExpression||"1=1"})}async queryBoundary(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryBoundary)throw new s("imagery-layer:query-boundary","queryBoundary operation is not supported on the input image service");return e=e??{outSpatialReference:this.spatialReference},Oe(ze(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),Ee(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),Ae(this.url,e,t)}async queryGPSInfo(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryGPSInfo)throw new s("imagery-layer:query-gps-info","queryGPSInfo operation is not supported on the input image service");return e=e??{where:"1=1"},Ce(ze(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),je(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new s("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:i,returnDomainValues:r,returnTopmostRaster:n,showNoDataRecords:a}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let o=!1,l=null,u=null;const p=L.servicePixelValue.toLowerCase(),m=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(o=e.outFields.some(e=>!e.toLowerCase().startsWith(p)),this.version>=10.4)){const t=e.outFields.filter(e=>e.toLowerCase().startsWith(p)&&e.length>p.length).map(e=>{const t=e.slice(p.length+1);return[this._updateRenderingRulesFunctionName(t,m),t]});l=t.map(e=>new G({functionName:e[0]})),u=t.map(e=>e[1]);const{rasterFunction:i}=this;0===l.length?i?.functionName?(l.push(i),u.push(i.functionName)):l=null:i?.functionName&&!l.some(e=>e.functionName===i.functionName)&&(l.push(i),u.push(i.functionName))}const c=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:h}=this;let d=e.timeExtent||this.timeExtent;if(h){const{isOutside:t,intersection:i}=W(h,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new s("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=i?.timeExtent&&(d=i.timeExtent)}const f=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,d);let y=e.geometry;this.version<10.91&&"extent"===y?.type&&(y=R.fromExtent(y));const g=this._getQueryParams({geometry:y,timeExtent:d,mosaicRule:f,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:l,pixelSize:i,returnCatalogItems:o,returnGeometry:c,raster:this.raster,maxItemCount:n?1:null});delete g.f;const I=new Qe(g);try{await this._generateRasterInfo(this.rasterFunction);const i=await Se(this.url,I,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,n=null!=i.value&&i.value.toLowerCase().includes("nodata"),l=o&&!c&&i?.catalogItems?.features.length&&(a||!n),p=this.multidimensionalInfo&&"raster-dataset"===this.sourceType?$({rasterInfo:this.rasterInfo,multidimensionalDefinition:f?.multidimensionalDefinition,timeExtent:d,multidimensionalSubset:this.multidimensionalSubset}):null;if(!l)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:a,templateFields:s,effectiveMultidimensionalDefinition:p});const m=this.objectIdField||"ObjectId",h=i.catalogItems?.features??[],y=h.map(e=>e.attributes?.[m]),g=new Ue({objectIds:y,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[m]}),R=await this.queryRasters(g);return R?.features?.length&&R.features.forEach(t=>{h.forEach(i=>{i.attributes[m]===t.attributes[m]&&t.geometry&&(i.geometry=t.geometry.clone(),null!=e.outSpatialReference&&(i.geometry.spatialReference=e.outSpatialReference))})}),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:a,templateFields:s,effectiveMultidimensionalDefinition:p})}catch{throw new s("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=i(ze(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.statistics),s=i(ze(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.histograms),n=await Promise.all([r,s]);return n[0]&&n[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),{statistics:n[0]||null,histograms:n[1]||null}}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return X(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,i=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):Me(ze(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then(e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),Ne(e,t),e)),r=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,s=this._getRasterFunctionInfos();return Promise.all([i,r,s]).then(e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.internalRenderer&&!this._isSupportedRenderer(this.internalRenderer)&&(this._set("internalRenderer",null),a.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("internalRenderer",this._configRenderer(this.renderer)),this.addHandles([o(()=>this.rasterFunction,e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then(e=>{e&&(this.rasterInfo=e)})})]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)})}_combineMosaicRuleWithTimeExtent(e,t){const i=this.timeInfo,{multidimensionalInfo:r}=this.serviceRasterInfo;if(null==e||null==r||null==t||null==i?.startField)return e;const{startField:s}=i,n=r.variables.some(e=>e.dimensions.some(e=>e.name===s))?s:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter(e=>e.dimensionName!==n),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const a=e.multidimensionalDefinition.filter(e=>e.dimensionName===n),o=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==o||null==l||o===l,p=u?[o||l]:[[o,l]],m=this.version>=10.8;if(a.length)a.forEach(e=>{e.dimensionName===n&&(m?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(e.isSlice=u,e.values=p))});else if(!m){const t=e.multidimensionalDefinition.filter(e=>null!=e.variableName&&null==e.dimensionName);t.length?t.forEach(e=>{e.dimensionName=n,e.isSlice=u,e.values=p}):e.multidimensionalDefinition.push(new S({variableName:"",dimensionName:n,isSlice:u,values:p}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return null==e?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter(e=>!(!e.variableName&&!e.dimensionName)),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this.sourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQuery)throw new s("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?c(Ue,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:i}=this;return"unique-value"===e.type&&this._hasRasterFunction(i)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&te(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){const{data:r,ssl:s}=await i(ze(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=r,this.sourceJSON=t,s&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map(e=>e.trim()).indexOf("tilesonly")>-1)throw new s("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||i}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:i}=e,r="resample"===t?.toLowerCase(),s=i?.ResampleType||i?.resampleType;return r&&(7===s||10===s)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:i}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){const t=this.mosaicRule?.multidimensionalDefinition?.[0].variableName,r=ie({variableName:t,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&i.bandCount>=3){const e=r?.bandIds??re(i);!e||3===i.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=r?.renderer??se(i,{bandIds:this.bandIds,variableName:this.rasterFunction?null:t}));const s=ne(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=s,this.symbolizer.rasterInfo=i):this.symbolizer=new ae({rendererJSON:s,rasterInfo:i}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){null!=e?.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:i}=this;return{raster:t,viewId:i,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,i){return this._rasterJobHandler?this._rasterJobHandler.decode({data:e,options:t}):Y(e,t,i)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const r=await i(ze(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return r.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:r,returnImageBitmap:n,signal:a}=e;if(r&&this._canRequestImageElement(t.format)){const r=`${ze(this.parsedUrl)}/exportImage`,{data:s}=await i(r,{responseType:n?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:a});if(s instanceof Blob){return{imageBitmap:await D(s,r,a),params:t}}return{imageOrCanvasElement:s,params:t}}const o=this._initJobHandler(),l=i(ze(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:a}),u=(await Promise.all([l,o]))[0].data,p=t.format||"jpgpng";let m=p;if("bsq"!==m&&"bip"!==m&&(m=Z(u)),!m)throw new s("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(u)));const c={signal:a},h="gif"===p||"bmp"===p||p.includes("png")&&("png"===m||"jpg"===m)?Y(u,{useCanvas:!0,...t},c):this._decodePixelBlock(u,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:p},c);return{pixelData:{pixelBlock:await h,extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch(()=>null)}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=K(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new O;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach(e=>e.variableName=""),t=t.filter(({variableName:e,dimensionName:t})=>e&&"*"!==e||t),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,i){i=i||{};const r=e.value,{templateRRFunctionNames:s,showNoDataRecords:n,returnDomainValues:a,templateFields:o}=i,l=e.processedValues;let u=e.catalogItems?.features,p=e.properties?.Values?.map(e=>e.replaceAll(/ /gi,", "))||[];const m=this.objectIdField||"ObjectId",c="string"==typeof r&&r.toLowerCase().includes("nodata"),h=[];if(r&&!u&&(!c||n)){const e={};e[m]=0;p=[r],u=[new t({geometry:this.fullExtent,attributes:e})],this.multidimensionalInfo&&"raster-dataset"===this.sourceType&&z(this.rasterFields,e,i.effectiveMultidimensionalDefinition)}if(!u)return[];this._updateResponseFieldNames(u,o),c&&!n&&(u=[]);const{itemPixelValue:d,servicePixelValue:f}=L,y=this.rasterFields.some(e=>e.name===d);for(let t=0;t<u.length;t++){const e=u[t];if(null!=r){const i=p[t],a=this.rasterFunction&&l&&l.length>0&&s&&s.length>0&&s.includes(this.rasterFunction.functionName)?l[s.indexOf(this.rasterFunction.functionName)]:r;if("nodata"===i.toLowerCase()&&!n)continue;y&&(e.attributes[d]=i),e.attributes[f]=a,this._updateFeatureWithMagDirValues(e,i);const o=this.fields&&this.fields.length>0;let u=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?o?i:r:a;this.rasterFunction||(u=o?i:r),this._updateFeatureWithRasterAttributeTableValues(e,u)}if(e.sourceLayer=e.layer=this,a&&this._updateFeatureWithDomainValues(e),s&&l&&s.length===l.length)for(let t=0;t<s.length;t++){const i=`${L.servicePixelValue}.${s[t]}`;e.attributes[i]=l[t]}h.push(u[t])}return h}_processMultidimensionalIntersection(e,t,i){const{multidimensionalSubset:r}=this;if(!r)return{isOutSide:!1,timeExtent:t,mosaicRule:i=this._combineMosaicRuleWithTimeExtent(i,t)};if(r){const{isOutside:i,intersection:s}=W(r,{geometry:e,timeExtent:t});if(i)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=s?.timeExtent&&(t=s.timeExtent)}if(i=this._combineMosaicRuleWithTimeExtent(i,t),i?.multidimensionalDefinition){const{isOutside:e}=W(r,{multidimensionalDefinition:i.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:i}}_updateFeatureWithRasterAttributeTableValues(e,t){const i=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==i)return;const{features:r,fields:s}=i,n=s.map(e=>e.name).find(e=>"value"===e.toLowerCase());if(!n)return;const a=r.filter(e=>e.attributes[n]===(null!=t?parseInt(t,10):null));a&&a[0]&&s.forEach(t=>{const i=H+t.name;e.attributes[i]=a[0].attributes[t.name]})}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const i=t.split(/,\s*/).map(e=>parseFloat(e)),r=i.map(e=>[e]),s=i.map(e=>({minValue:e,maxValue:e,noDataValue:null})),n=new M({height:1,width:1,pixelType:"f32",pixels:r,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new g(0,0,0,0,this.spatialReference)});const a="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:ee([n.pixels[0][0],n.pixels[1][0]]);e.attributes[L.magnitude]=a[0],e.attributes[L.direction]=a[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter(e=>e.domain&&"coded-value"===e.domain.type);null!=t&&t.forEach(t=>{const i=e.attributes[t.name];if(null!=i){const r=t.domain.codedValues.find(e=>e.code===i);r&&(e.attributes[t.name]=r.name)}})}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const i=this.fieldsIndex;null!=i&&e.forEach(e=>{if(e?.attributes)for(const r of t){const t=i.get(r)?.name;t&&t!==r&&(e.attributes[r]=e.attributes[t],delete e.attributes[t])}})}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e?.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const i=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(i)?t.get(i):e}_isRFTJson(e){return e?.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:i,rasterFunction:r}=this;r&&null==e.rasterFunction&&(e.rasterFunction=r),i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}async _updateCurrentRasterInfo(e){if(this.renderer||this.symbolizer){const t=await this._generateRasterInfo(this.rasterFunction,{signal:e});t&&(this.rasterInfo=t)}}_applyMosaicRule(e){const{raster:t,mosaicRule:i}=this;i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map(e=>e.trim()):["image","catalog"],{currentVersion:i,maxRecordCount:r}=e,s=t.includes("image"),n="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!(!e.spatialReference&&!e.extent?.spatialReference),o=t.includes("edit"),l=t.includes("mensuration")&&a,u=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map(e=>e.trim()),p=l&&u.includes("basic"),m=this._isMosaicDataset(e)&&t.includes("catalog"),c=t.includes("download"),h=i>=10.7&&n||i>=11.4&&(n||l&&u.includes("3d")),d=m&&e.fields&&e.fields.length>0,f=d&&e.supportsAdvancedQueries?e.advancedQueryCapabilities:void 0;return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:s,supportsExportImage:s,supportsIdentify:s,supportsImageToMap:i>=11.2&&m,supportsImageToMapMultiray:i>=11.2&&m,supportsMapToImage:i>=11.2&&m,supportsFindImages:i>=11.2&&m,supportsGetImageUrl:i>=11.3&&c,supportsMeasure:l,supportsMeasureFromImage:i>=11.2,supportsDownload:c,supportsQuery:d,supportsGetSamples:i>=10.2&&s,supportsProject:i>=10.3&&s,supportsComputeStatisticsHistograms:i>=10.4&&s,supportsQueryBoundary:i>=10.6&&s,supportsCalculateVolume:h,supportsComputePixelLocation:i>=10.7&&m,supportsComputeAngles:i>=10.91,supportsQueryGPSInfo:i>=11.2&&m,supportsAdd:o,supportsDelete:o,supportsEditing:o,supportsUpdate:o,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:r,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,supportsStatistics:!!f?.supportsStatistics,supportsOrderBy:!!f?.supportsOrderBy,supportsDistinct:!!f?.supportsDistinct,supportsPagination:!!f?.supportsPagination,supportsPaginationOnAggregatedQueries:!!f?.supportsPaginationOnAggregatedQueries,supportsStandardizedQueriesOnly:!!f?.useStandardizedQueries,supportsPercentileStatistics:!!f?.supportsPercentileStatistics,supportsCentroid:!!f?.supportsReturningGeometryCentroid,supportsCurrentUser:!1,supportsDistance:!!f?.supportsQueryWithDistance,supportsExtent:!!f?.supportsReturningQueryExtent,supportsGeometryProperties:!!f?.supportsReturningGeometryProperties,supportsHavingClause:!!f?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:f?.supportsSqlExpression??!!f,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!f?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},mensuration:{supportsDistanceAndAngle:p,supportsAreaAndPerimeter:p,supportsPointOrCentroid:p,supportsHeightFromBaseAndTop:l&&u.includes("base-top height"),supportsHeightFromBaseAndTopShadow:l&&u.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:l&&u.includes("top-top shadow height"),supports3D:l&&u.includes("3d")}}}};function ze(e){return e?.path??""}return e([u({clonable:!1})],h.prototype,"_functionRasterInfos",void 0),e([u({readOnly:!0})],h.prototype,"_serviceSupportsMosaicRule",void 0),e([d("_serviceSupportsMosaicRule",["currentVersion","fields"])],h.prototype,"readServiceSupportsMosaicRule",null),e([u({readOnly:!0})],h.prototype,"_rasterFunctionNamesIndex",null),e([u()],h.prototype,"adjustAspectRatio",void 0),e([u({type:[p],json:{write:!0}})],h.prototype,"bandIds",void 0),e([d("bandIds")],h.prototype,"readBandIds",null),e([u({readOnly:!0,json:{read:!1}})],h.prototype,"capabilities",void 0),e([d("service","capabilities",["capabilities","currentVersion","serviceDataType"])],h.prototype,"readCapabilities",null),e([u({type:Number})],h.prototype,"compressionQuality",void 0),e([y("compressionQuality")],h.prototype,"writeCompressionQuality",null),e([u({type:Number})],h.prototype,"compressionTolerance",void 0),e([y("compressionTolerance")],h.prototype,"writeCompressionTolerance",null),e([u({json:{read:{source:"copyrightText"}}})],h.prototype,"copyright",void 0),e([u({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],h.prototype,"defaultMosaicRule",void 0),e([d("defaultMosaicRule",["defaultMosaicMethod"])],h.prototype,"readDefaultMosaicRule",null),e([u({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],h.prototype,"definitionExpression",void 0),e([u({readOnly:!0,constructOnly:!0})],h.prototype,"exportImageServiceParameters",void 0),e([u()],h.prototype,"rasterInfo",void 0),e([u({readOnly:!0,type:[_]})],h.prototype,"fields",void 0),e([u({readOnly:!0})],h.prototype,"fieldsIndex",null),e([u({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff","bip","bsq"],json:{write:!0}})],h.prototype,"format",null),e([d("service","format",["serviceDataType"])],h.prototype,"readFormat",null),e([u({type:g})],h.prototype,"fullExtent",void 0),e([u({readOnly:!0})],h.prototype,"hasMultidimensions",void 0),e([u({json:{read:{source:"maxImageHeight"}}})],h.prototype,"imageMaxHeight",void 0),e([u({json:{read:{source:"maxImageWidth"}}})],h.prototype,"imageMaxWidth",void 0),e([u({type:String,json:{type:P.jsonValues,read:P.read,write:P.write}})],h.prototype,"interpolation",void 0),e([u()],h.prototype,"minScale",void 0),e([d("service","minScale")],h.prototype,"readMinScale",null),e([u()],h.prototype,"maxScale",void 0),e([d("service","maxScale")],h.prototype,"readMaxScale",null),e([u({type:O})],h.prototype,"mosaicRule",null),e([d("mosaicRule",["mosaicRule","defaultMosaicMethod"])],h.prototype,"readMosaicRule",null),e([y("mosaicRule")],h.prototype,"writeMosaicRule",null),e([u()],h.prototype,"multidimensionalInfo",void 0),e([u({type:C,json:{write:!0}})],h.prototype,"multidimensionalSubset",void 0),e([u({json:{type:p}})],h.prototype,"noData",void 0),e([y("noData")],h.prototype,"writeNoData",null),e([u({type:String,json:{type:N.jsonValues,read:N.read,write:N.write}})],h.prototype,"noDataInterpretation",void 0),e([u({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],h.prototype,"objectIdField",void 0),e([d("objectIdField")],h.prototype,"readObjectIdField",null),e([u({readOnly:!0})],h.prototype,"geometryType",void 0),e([u({})],h.prototype,"typeIdField",void 0),e([u({})],h.prototype,"types",void 0),e([u({readOnly:!0})],h.prototype,"parsedUrl",null),e([u({type:Function})],h.prototype,"pixelFilter",void 0),e([u()],h.prototype,"raster",void 0),e([u({readOnly:!0})],h.prototype,"sourceType",void 0),e([d("sourceType",["serviceSourceType","fields"])],h.prototype,"readSourceType",null),e([u()],h.prototype,"viewId",void 0),e([u()],h.prototype,"renderer",null),e([u({types:le,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:oe,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],h.prototype,"internalRenderer",null),e([d("internalRenderer")],h.prototype,"readRenderer",null),e([y("internalRenderer")],h.prototype,"writeRenderer",null),e([u({clonable:!1})],h.prototype,"symbolizer",void 0),e([u(w)],h.prototype,"opacity",void 0),e([u({readOnly:!0})],h.prototype,"rasterFields",null),e([u({constructOnly:!0})],h.prototype,"rasterFunctionInfos",void 0),e([u({type:G,json:{name:"renderingRule"}})],h.prototype,"rasterFunction",null),e([d("rasterFunction",["renderingRule","rasterFunctionInfos"])],h.prototype,"readRasterFunction",null),e([u({readOnly:!0})],h.prototype,"serviceDataType",void 0),e([u({readOnly:!0,type:I})],h.prototype,"spatialReference",void 0),e([d("spatialReference",["spatialReference","extent"])],h.prototype,"readSpatialReference",null),e([u({type:q.apiValues,json:{read:q.read,type:q.jsonValues}})],h.prototype,"pixelType",void 0),e([y("pixelType")],h.prototype,"writePixelType",null),e([u({constructOnly:!0,type:k})],h.prototype,"serviceRasterInfo",void 0),e([u()],h.prototype,"sourceJSON",void 0),e([u(b)],h.prototype,"url",void 0),e([u({readOnly:!0})],h.prototype,"version",void 0),e([d("version",["currentVersion","fields","timeInfo"])],h.prototype,"readVersion",null),h=e([f("esri.layers.mixins.ArcGISImageService")],h),h};export{ze as ArcGISImageService};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import i from"../../request.js";import{deprecatedFunction as r}from"../../core/deprecate.js";import s from"../../core/Error.js";import{clone as n}from"../../core/lang.js";import a from"../../core/Logger.js";import{watch as o}from"../../core/reactiveUtils.js";import{urlToObject as l}from"../../core/urlUtils.js";import{property as u}from"../../core/accessorSupport/decorators/property.js";import{Integer as p,ensureRange as m,ensureClass as c,ensureNumber as h}from"../../core/accessorSupport/ensureType.js";import{reader as d}from"../../core/accessorSupport/decorators/reader.js";import{subclass as f}from"../../core/accessorSupport/decorators/subclass.js";import{writer as y}from"../../core/accessorSupport/decorators/writer.js";import g from"../../geometry/Extent.js";import R from"../../geometry/Polygon.js";import I from"../../geometry/SpatialReference.js";import{srToRESTValue as v}from"../../geometry/support/spatialReferenceUtils.js";import{opacity as w,url as b}from"../support/commonProperties.js";import S from"../support/DimensionalDefinition.js";import{ExportImageServiceParameters as x}from"../support/ExportImageServiceParameters.js";import _ from"../support/Field.js";import F from"../support/FieldsIndex.js";import{createBitmap as D}from"../support/imageBitmapUtils.js";import{isSupportedRendererType as T}from"../support/imageryRendererUtils.js";import O from"../support/MosaicRule.js";import C from"../support/MultidimensionalSubset.js";import M from"../support/PixelBlock.js";import{interpolationKebab as P,noDataInterpretationKebab as N,pixelTypeKebabDict as q}from"../support/rasterEnums.js";import{getServicePixelValueField as j,getItemPixelValueField as A,getRawServicePixelValueField as E,getProcessedServicePixelValueField as V,getMagnitudeField as Q,getDirectionField as U,getMultidimensionalFields as J,getRasterAttributeTableFields as B,commonRasterFieldNames as L,addMultidimensionalFieldValues as z,rasterFieldPrefix as H}from"../support/rasterFieldUtils.js";import G from"../support/RasterFunction.js";import k from"../support/RasterInfo.js";import{intersectMultimensionalSubset as W,getEffectiveMultidimensionalDefinition as $,getSubsetVariablesFromMdInfo as X,getDefaultMultidimensionalDefinition as K}from"../support/rasterDatasets/multidimensionalUtils.js";import{decode as Y,getFormat as Z}from"../support/rasterFormats/RasterCodec.js";import{uvComponentToVector as ee}from"../support/rasterFunctions/vectorFieldUtils.js";import{getSupportedRendererTypes as te,matchPresetRenderer as ie,getDefaultBandCombination as re,createDefaultRenderer as se,normalizeRendererJSON as ne}from"../../renderers/support/rasterRendererHelper.js";import ae from"../../renderers/support/RasterSymbolizer.js";import{websceneRasterRendererTypes as oe,rasterRendererTypes as le,read as ue}from"../../renderers/support/rasterTypeUtils.js";import{calculateVolume as pe,computeAngles as me,computePixelSpaceLocations as ce,computeHistograms as he,computeStatisticsHistograms as de,measureHeight as fe,measureAreaAndPerimeter as ye,measureDistanceAndAngle as ge,measurePointOrCentroid as Re,measureLengthFromImage as Ie,measureAreaFromImage as ve,getImageSpatialReferenceQueryParameter as we,getSamples as be,identify as Se,imageToMap as xe,imageToMapMultiray as _e,mapToImage as Fe,findImages as De,getImageUrl as Te,queryBoundary as Oe,queryGPSInfo as Ce}from"../../rest/imageService.js";import{fetchServiceRasterInfo as Me,generateRasterInfo as Pe,patchServiceInfo as Ne}from"../../rest/imageService/fetchRasterInfo.js";import{getCatalogItemRasterInfo as qe}from"../../rest/imageService/getCatalogItemRasterInfo.js";import{executeForCount as je}from"../../rest/query/executeForCount.js";import{executeForIds as Ae}from"../../rest/query/executeForIds.js";import{executeQueryJSON as Ee}from"../../rest/query/executeQueryJSON.js";import Ve from"../../rest/support/FeatureSet.js";import Qe from"../../rest/support/ImageIdentifyParameters.js";import Ue from"../../rest/support/Query.js";const Je=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),Be=m(h,{min:0,max:255});function Le(e){const t=JSON.stringify(e),i=t.includes('"rasterFunctionDefinition":{'),r=i?t.match(/"type":"(.*?FunctionArguments")/gi):t.match(/"rasterFunction":"(.*?")/gi),s=r?.map(e=>i?e.slice(8,-18):e.slice(18,-1));return s?s.join("/"):null}const ze=m=>{const h=m;let ze=class extends h{constructor(){super(...arguments),this._functionRasterInfos={},this._serviceSupportsMosaicRule=null,this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new x({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.length<1||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.forEach(t=>{e.set(t.name.toLowerCase().replaceAll(/ /gi,"_"),t.name)}),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every(e=>"number"==typeof e))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,i){null!=e&&"lerc"!==this.format&&(t[i]=e)}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?O.fromJSON(t):null}get fieldsIndex(){return this.fields?new F(this.fields):null}set format(e){e&&Je.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=O.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const i=e||t.mosaicRule;return i?O.fromJSON(i):this._isMosaicRuleSupported(t)?O.fromJSON(t):null}writeMosaicRule(e,t,i){const{mosaicRule:r}=this;this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=Be(e))}readObjectIdField(e,t){if(!e){const i=t.fields.find(e=>"esriFieldTypeOID"===e.type||"oid"===e.type);e=i?.name}return e}get parsedUrl(){return l(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}get renderer(){const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const i=t?.find(({name:t})=>t===e);return i?.renderer.clone()}return this.internalRenderer}set renderer(e){this.activePresetRendererName=null,this.internalRenderer=e}set internalRenderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("internalRenderer",e)}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer,s=ue(r,i);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!r.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),T(s)||a.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,i){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this.fields?.map(e=>e.clone())??[];e.push(j()),"mosaic-dataset"===this.sourceType&&this.fields?.length&&e.push(A()),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some(({name:e})=>"none"===e.toLowerCase())&&e.push(E()),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter(({name:e})=>"none"!==e.toLowerCase()).forEach(({name:t})=>e.push(V(t)));const{rasterInfo:t}=this;if(this._isVectorDataSet()){const i=t?.multidimensionalInfo?.variables[0].unit?.trim(),r=Q(i),s=U();e.push(r,s)}if(t?.multidimensionalInfo&&"raster-dataset"===this.sourceType){const i=J(t.multidimensionalInfo);e.push(...i)}const i=t?.attributeTable;if(null!=i){const t=B(i);e.push(...t)}return e}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=G.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const i=t.rasterFunctionInfos;return t.renderingRule||i?.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?G.fromJSON({rasterFunctionDefinition:t.renderingRule}):G.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?I.fromJSON(i):null}writePixelType(e,t,i){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[i]=q.toJSON(e))}readVersion(e,t){let i=t.currentVersion;return i||(i=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),i}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let i=e;const{renderer:r,symbolizer:s,pixelFilter:n}=this;if(!this._isPicture()&&r&&s&&!n){await this._updateSymbolizer(s,r);const{bandIds:n}=this;i=await this._symbolize({pixelData:e,bandIds:n,symbolizer:s},t)}return i}destroy(){this._shutdownJobHandler()}async calculateVolume(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsCalculateVolume)throw new s("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=n(e),this.mosaicRule&&null==e.mosaicRule&&(e.mosaicRule=this.mosaicRule),pe(this.url,e,this._getRequestOptions(t))}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new s("imagery-layer:compute-angles","this operation is not supported on the input image service");return me(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new s("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return ce(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new s("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=n(e),this._applyMosaicAndRenderingRules(e),he(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new s("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=n(e),this._applyMosaicAndRenderingRules(e),de(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const i=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?i.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?i.mensuration.supportsHeightFromBaseAndTopShadow:i.mensuration.supportsHeightFromTopAndTopShadow))throw new s("imagery-layer:measure-height","this operation is not supported on the input image service");return e=n(e),this._applyMosaicRule(e),fe(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const i=await this._fetchCapabilities(t?.signal);if(!(i.mensuration.supportsAreaAndPerimeter&&(!e.is3D||i.mensuration.supports3D)))throw new s("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=n(e),this._applyMosaicRule(e),ye(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const i=await this._fetchCapabilities(t?.signal);if(!(i.mensuration.supportsDistanceAndAngle&&(!e.is3D||i.mensuration.supports3D)))throw new s("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=n(e),this._applyMosaicRule(e),ge(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const i=await this._fetchCapabilities(t?.signal);if(!(i.mensuration.supportsPointOrCentroid&&(!e.is3D||i.mensuration.supports3D)))throw new s("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=n(e),this._applyMosaicRule(e),Re(this.url,e,this._getRequestOptions(t))}async measureLengthFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new s("imagery-layer:measure-length-from-image","this operation is not supported on the input image service");if("polyline"!==e.geometry.type)throw new s("imagery-layer:measure-length-from-image","this input geometry must be a polyline");return Ie(this.url,e,this._getRequestOptions(t))}async measureAreaFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new s("imagery-layer:measure-area-from-image","this operation is not supported on the input image service");if("polygon"!==e.geometry.type)throw new s("imagery-layer:measure-area-from-image","this input geometry must be a polygon");return ve(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const i=this.getField(e);return i?i.domain:null}fetchImage(e,t,i,n={}){if(r(a.getLogger(this),"`ImageryLayer.fetchImage` is deprecated in favor of 'ImageryLayer.fetchPixels'.",{replacement:"ImageryLayer.fetchPixels",version:"4.33",warnOnce:!0}),null==e||null==t||null==i)throw new s("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");return this.internalFetchImage(e,t,i,n)}async internalFetchImage(e,t,i,r={}){this._updateCurrentRasterInfo();const s=this.getExportImageServiceParameters(e,t,i,r.timeExtent);if(null==s){if(r.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");if(e.width=t,e.height=i,r.returnImageBitmap){return{imageBitmap:await D(e,`${He(this.parsedUrl)}/exportImage`,r.signal)}}return{imageOrCanvasElement:e}}const{bandIds:s,rasterInfo:n}=this,a=(s?.length||n.bandCount)??0,o=t*i,l=n.pixelType,u=[];for(let e=0;e<a;e++)u.push(M.createEmptyBand(l,o));return{pixelData:{pixelBlock:new M({width:t,height:i,pixels:u,mask:new Uint8Array(o),pixelType:l}),extent:e}}}const n=!!r.requestAsImageElement&&!this.pixelFilter,a=n&&!!r.returnImageBitmap,o={imageServiceParameters:s,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:n,returnImageBitmap:a,signal:r.signal};return this._requestArrayBuffer(o)}async fetchPixels(e,t,i,r={}){await this._initJobHandler(),r.applyRendering&&this._updateCurrentRasterInfo();const s=r.applyRendering?void 0:new x({layer:this,requestRawData:!0,interpolation:r.interpolation??"nearest",bandIds:r.bandIds??[]}),n=this.getExportImageServiceParameters(e,t,i,r.timeExtent,s);if(null==n)return{extent:e,pixelBlock:null};delete n.pixelType,delete n.bandIds,delete n.compressionQuality;const a={imageServiceParameters:n,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:!1,returnImageBitmap:!1,signal:r.signal},{pixelData:o}=await this._requestArrayBuffer(a);return o??{extent:e,pixelBlock:null}}fetchKeyProperties(e){return i(He(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>e.data)}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new s("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):i(He(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>Ve.fromJSON(e.data))}getCatalogItemRasterInfo(e,t){const i={...t,query:this._getQueryParams()};return qe(He(this.parsedUrl),e,i)}async getCatalogItemICSInfo(e,t){const{data:r}=await i(He(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=r?.ics;if(!s)return;let n=null;try{n=(await i(He(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n?.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};const a=this.version>=10.7?i(He(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then(e=>e.data).catch(()=>({})):{},o=n.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[n]}),inSR:v(o),outSR:"0:"+e},u=i(He(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then(e=>e.data).catch(()=>({})),p=5,m=(n.xmin+n.xmax)/2,c=(n.ymax-n.ymin)/(p+1),h=n.ymin+c,d=[];for(let i=0;i<p;i++)d.push({x:m,y:h+c*i});const f={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:d}),inSR:v(o),outSR:"0:"+e},y=i(He(this.parsedUrl)+"/project",{query:this._getQueryParams(f),...t}).then(e=>e.data).catch(()=>({})),R=await Promise.all([a,u,y]);let w=R[0].ipxf;if(null==w){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(w={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const b=g.fromJSON(R[1]?.geometries?.[0]);b&&(b.spatialReference=new I({wkid:0,imageCoordinateSystem:s}));const S=R[2].geometries?R[2].geometries.filter(e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y):[],x=S.length;if(x<3)return{ics:s,icsToPixelTransform:w,icsExtent:b,northDirection:null};let _=0,F=0,D=0,T=0;for(let i=0;i<x;i++)_+=S[i].x,F+=S[i].y,D+=S[i].x*S[i].x,T+=S[i].x*S[i].y;const O=(x*T-_*F)/(x*D-_*_);let C=0;const M=S[p-1].x>S[0].x,P=S[p-1].y>S[0].y;return O===1/0?C=P?90:270:0===O?C=M?0:180:O>0?C=M?180*Math.atan(O)/Math.PI:180*Math.atan(O)/Math.PI+180:O<0&&(C=P?180+180*Math.atan(O)/Math.PI:360+180*Math.atan(O)/Math.PI),{ics:s,icsToPixelTransform:w,icsExtent:b,northDirection:C}}async generateRasterInfo(e,t){e=c(G,e);const i={...t,query:this._getQueryParams()};if(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e))return this.serviceRasterInfo??Me(He(this.parsedUrl),this.sourceJSON,i);const r=Le(e);if(!r)throw new s("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[r])return this._functionRasterInfos[r];const n=Pe(He(this.parsedUrl),e,i);this._functionRasterInfos[r]=n;try{return await n}catch(a){throw this._functionRasterInfos[r]=null,a}}getExportImageServiceParameters(e,t,i,r,s){e=e.clone().shiftCentralMeridian();const n=we(e.spatialReference,He(this.parsedUrl));s??=this.exportImageServiceParameters;const a=s.toJSON(),{bandIds:o,noData:l}=a;let{renderingRule:u}=a;const p=this.rasterFunction?.rasterFunctionDefinition,m=this.renderer?.type,c=!m||"raster-stretch"===m||"raster-colormap"===m||"unique-value"===m||"class-breaks"===m||"raster-shaded-relief"===m;if(o?.length&&this._hasRasterFunction(this.rasterFunction)&&!p&&c){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:o}};if("Stretch"===u.rasterFunction)e.rasterFunctionArguments.Raster=u.rasterFunctionArguments.Raster,u.rasterFunctionArguments.Raster=e;else if("Colormap"===u.rasterFunction){const t=u.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,u.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=u,u=e;a.bandIds=void 0}else a.bandIds=o?.join(",");Array.isArray(l)&&l.length>0&&(a.noData=l.join(","));const h=this._processMultidimensionalIntersection(null,r,s.mosaicRule);if(h.isOutSide)return null;a.mosaicRule=null!=h.mosaicRule?JSON.stringify(h.mosaicRule):null,r=h.timeExtent,a.renderingRule=this._getRenderingRuleString(G.fromJSON(u));const d={};if(null!=r){const{start:e,end:t}=r.toJSON();e&&t&&e===t?d.time=""+e:null==e&&null==t||(d.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:n,imageSR:n,size:t+","+i,...a,...d}}async getSamples(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i?.operations.supportsGetSamples)throw new s("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=n(e);const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),be(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new s("imagery-layer:identify","identify operation is not supported on the input image service");e=n(e),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=R.fromExtent(e.geometry));const i=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(i.isOutSide)throw new s("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=i.timeExtent,e.mosaicRule=i.mosaicRule;const{raster:r,rasterFunction:a}=this;return a&&null==e.rasterFunction&&(e.rasterFunction=a),r&&null==e.raster&&(e.raster=r),Se(this.url,e,this._getRequestOptions(t))}async imageToMap(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMap)throw new s("imagery-layer:image-to-map","imageToMap operation is not supported on the input image service");return xe(He(this.parsedUrl),e,this._getRequestOptions(t))}async imageToMapMultiray(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMapMultiray)throw new s("imagery-layer:image-to-map-multiray","imageToMapMultiray operation is not supported on the input image service");return _e(He(this.parsedUrl),e,this._getRequestOptions(t))}async mapToImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMapToImage)throw new s("imagery-layer:map-to-image","mapToImage operation is not supported on the input image service");return Fe(He(this.parsedUrl),e,this._getRequestOptions(t))}async findImages(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsFindImages)throw new s("imagery-layer:find-images","findImages operation is not supported on the input image service");return De(He(this.parsedUrl),e,this._getRequestOptions(t))}async getImageUrl(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsGetImageUrl)throw new s("imagery-layer:get-image-url","getImageUrl operation is not supported on the input image service");return Te(He(this.parsedUrl),e,this._getRequestOptions(t))}createQuery(){return new Ue({outFields:["*"],returnGeometry:!0,where:this.definitionExpression||"1=1"})}async queryBoundary(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryBoundary)throw new s("imagery-layer:query-boundary","queryBoundary operation is not supported on the input image service");return e=e??{outSpatialReference:this.spatialReference},Oe(He(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),Ee(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),Ae(this.url,e,t)}async queryGPSInfo(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryGPSInfo)throw new s("imagery-layer:query-gps-info","queryGPSInfo operation is not supported on the input image service");return e=e??{where:"1=1"},Ce(He(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),je(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new s("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:i,returnDomainValues:r,returnTopmostRaster:n,showNoDataRecords:a}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let o=!1,l=null,u=null;const p=L.servicePixelValue.toLowerCase(),m=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(o=e.outFields.some(e=>!e.toLowerCase().startsWith(p)),this.version>=10.4)){const t=e.outFields.filter(e=>e.toLowerCase().startsWith(p)&&e.length>p.length).map(e=>{const t=e.slice(p.length+1);return[this._updateRenderingRulesFunctionName(t,m),t]});l=t.map(e=>new G({functionName:e[0]})),u=t.map(e=>e[1]);const{rasterFunction:i}=this;0===l.length?i?.functionName?(l.push(i),u.push(i.functionName)):l=null:i?.functionName&&!l.some(e=>e.functionName===i.functionName)&&(l.push(i),u.push(i.functionName))}const c=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:h}=this;let d=e.timeExtent||this.timeExtent;if(h){const{isOutside:t,intersection:i}=W(h,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new s("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=i?.timeExtent&&(d=i.timeExtent)}const f=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,d);let y=e.geometry;this.version<10.91&&"extent"===y?.type&&(y=R.fromExtent(y));const g=this._getQueryParams({geometry:y,timeExtent:d,mosaicRule:f,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:l,pixelSize:i,returnCatalogItems:o,returnGeometry:c,raster:this.raster,maxItemCount:n?1:null});delete g.f;const I=new Qe(g);try{await this._generateRasterInfo(this.rasterFunction);const i=await Se(this.url,I,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,n=null!=i.value&&i.value.toLowerCase().includes("nodata"),l=o&&!c&&i?.catalogItems?.features.length&&(a||!n),p=this.multidimensionalInfo&&"raster-dataset"===this.sourceType?$({rasterInfo:this.rasterInfo,multidimensionalDefinition:f?.multidimensionalDefinition,timeExtent:d,multidimensionalSubset:this.multidimensionalSubset}):null;if(!l)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:a,templateFields:s,effectiveMultidimensionalDefinition:p});const m=this.objectIdField||"ObjectId",h=i.catalogItems?.features??[],y=h.map(e=>e.attributes?.[m]),g=new Ue({objectIds:y,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[m]}),R=await this.queryRasters(g);return R?.features?.length&&R.features.forEach(t=>{h.forEach(i=>{i.attributes[m]===t.attributes[m]&&t.geometry&&(i.geometry=t.geometry.clone(),null!=e.outSpatialReference&&(i.geometry.spatialReference=e.outSpatialReference))})}),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:a,templateFields:s,effectiveMultidimensionalDefinition:p})}catch{throw new s("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=i(He(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.statistics),s=i(He(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.histograms),n=await Promise.all([r,s]);return n[0]&&n[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),{statistics:n[0]||null,histograms:n[1]||null}}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return X(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,i=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):Me(He(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then(e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),Ne(e,t),e)),r=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,s=this._getRasterFunctionInfos();return Promise.all([i,r,s]).then(e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.internalRenderer&&!this._isSupportedRenderer(this.internalRenderer)&&(this._set("internalRenderer",null),a.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("internalRenderer",this._configRenderer(this.renderer)),this.addHandles([o(()=>this.rasterFunction,e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then(e=>{e&&(this.rasterInfo=e)})})]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)})}_combineMosaicRuleWithTimeExtent(e,t){const i=this.timeInfo,{multidimensionalInfo:r}=this.serviceRasterInfo;if(null==e||null==r||null==t||null==i?.startField)return e;const{startField:s}=i,n=r.variables.some(e=>e.dimensions.some(e=>e.name===s))?s:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter(e=>e.dimensionName!==n),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const a=e.multidimensionalDefinition.filter(e=>e.dimensionName===n),o=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==o||null==l||o===l,p=u?[o||l]:[[o,l]],m=this.version>=10.8;if(a.length)a.forEach(e=>{e.dimensionName===n&&(m?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(e.isSlice=u,e.values=p))});else if(!m){const t=e.multidimensionalDefinition.filter(e=>null!=e.variableName&&null==e.dimensionName);t.length?t.forEach(e=>{e.dimensionName=n,e.isSlice=u,e.values=p}):e.multidimensionalDefinition.push(new S({variableName:"",dimensionName:n,isSlice:u,values:p}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return null==e?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter(e=>!(!e.variableName&&!e.dimensionName)),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this.sourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQuery)throw new s("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?c(Ue,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:i}=this;return"unique-value"===e.type&&this._hasRasterFunction(i)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&te(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){const{data:r,ssl:s}=await i(He(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=r,this.sourceJSON=t,s&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map(e=>e.trim()).indexOf("tilesonly")>-1)throw new s("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||i}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:i}=e,r="resample"===t?.toLowerCase(),s=i?.ResampleType||i?.resampleType;return r&&(7===s||10===s)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:i}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){const t=this.mosaicRule?.multidimensionalDefinition?.[0].variableName,r=ie({variableName:t,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&i.bandCount>=3){const e=r?.bandIds??re(i);!e||3===i.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=r?.renderer??se(i,{bandIds:this.bandIds,variableName:this.rasterFunction?null:t}));const s=ne(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=s,this.symbolizer.rasterInfo=i):this.symbolizer=new ae({rendererJSON:s,rasterInfo:i}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){null!=e?.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:i}=this;return{raster:t,viewId:i,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,i){return this._rasterJobHandler?this._rasterJobHandler.decode({data:e,options:t}):Y(e,t,i)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const r=await i(He(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return r.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:r,returnImageBitmap:n,signal:a}=e;if(r&&this._canRequestImageElement(t.format)){const r=`${He(this.parsedUrl)}/exportImage`,{data:s}=await i(r,{responseType:n?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:a});if(s instanceof Blob){return{imageBitmap:await D(s,r,a),params:t}}return{imageOrCanvasElement:s,params:t}}const o=this._initJobHandler(),l=i(He(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:a}),u=(await Promise.all([l,o]))[0].data,p=t.format||"jpgpng";let m=p;if("bsq"!==m&&"bip"!==m&&(m=Z(u)),!m)throw new s("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(u)));const c={signal:a},h="gif"===p||"bmp"===p||p.includes("png")&&("png"===m||"jpg"===m)?Y(u,{useCanvas:!0,...t},c):this._decodePixelBlock(u,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:p},c);return{pixelData:{pixelBlock:await h,extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch(()=>null)}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=K(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new O;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach(e=>e.variableName=""),t=t.filter(({variableName:e,dimensionName:t})=>e&&"*"!==e||t),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,i){i=i||{};const r=e.value,{templateRRFunctionNames:s,showNoDataRecords:n,returnDomainValues:a,templateFields:o}=i,l=e.processedValues;let u=e.catalogItems?.features,p=e.properties?.Values?.map(e=>e.replaceAll(/ /gi,", "))||[];const m=this.objectIdField||"ObjectId",c="string"==typeof r&&r.toLowerCase().includes("nodata"),h=[];if(r&&!u&&(!c||n)){const e={};e[m]=0;p=[r],u=[new t({geometry:this.fullExtent,attributes:e})],this.multidimensionalInfo&&"raster-dataset"===this.sourceType&&z(this.rasterFields,e,i.effectiveMultidimensionalDefinition)}if(!u)return[];this._updateResponseFieldNames(u,o),c&&!n&&(u=[]);const{itemPixelValue:d,servicePixelValue:f}=L,y=this.rasterFields.some(e=>e.name===d);for(let t=0;t<u.length;t++){const e=u[t];if(null!=r){const i=p[t],a=this.rasterFunction&&l&&l.length>0&&s&&s.length>0&&s.includes(this.rasterFunction.functionName)?l[s.indexOf(this.rasterFunction.functionName)]:r;if("nodata"===i.toLowerCase()&&!n)continue;y&&(e.attributes[d]=i),e.attributes[f]=a,this._updateFeatureWithMagDirValues(e,i);const o=this.fields&&this.fields.length>0;let u=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?o?i:r:a;this.rasterFunction||(u=o?i:r),this._updateFeatureWithRasterAttributeTableValues(e,u)}if(e.sourceLayer=e.layer=this,a&&this._updateFeatureWithDomainValues(e),s&&l&&s.length===l.length)for(let t=0;t<s.length;t++){const i=`${L.servicePixelValue}.${s[t]}`;e.attributes[i]=l[t]}h.push(u[t])}return h}_processMultidimensionalIntersection(e,t,i){const{multidimensionalSubset:r}=this;if(!r)return{isOutSide:!1,timeExtent:t,mosaicRule:i=this._combineMosaicRuleWithTimeExtent(i,t)};if(r){const{isOutside:i,intersection:s}=W(r,{geometry:e,timeExtent:t});if(i)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=s?.timeExtent&&(t=s.timeExtent)}if(i=this._combineMosaicRuleWithTimeExtent(i,t),i?.multidimensionalDefinition){const{isOutside:e}=W(r,{multidimensionalDefinition:i.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:i}}_updateFeatureWithRasterAttributeTableValues(e,t){const i=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==i)return;const{features:r,fields:s}=i,n=s.map(e=>e.name).find(e=>"value"===e.toLowerCase());if(!n)return;const a=r.filter(e=>e.attributes[n]===(null!=t?parseInt(t,10):null));a&&a[0]&&s.forEach(t=>{const i=H+t.name;e.attributes[i]=a[0].attributes[t.name]})}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const i=t.split(/,\s*/).map(e=>parseFloat(e)),r=i.map(e=>[e]),s=i.map(e=>({minValue:e,maxValue:e,noDataValue:null})),n=new M({height:1,width:1,pixelType:"f32",pixels:r,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new g(0,0,0,0,this.spatialReference)});const a="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:ee([n.pixels[0][0],n.pixels[1][0]]);e.attributes[L.magnitude]=a[0],e.attributes[L.direction]=a[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter(e=>e.domain&&"coded-value"===e.domain.type);null!=t&&t.forEach(t=>{const i=e.attributes[t.name];if(null!=i){const r=t.domain.codedValues.find(e=>e.code===i);r&&(e.attributes[t.name]=r.name)}})}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const i=this.fieldsIndex;null!=i&&e.forEach(e=>{if(e?.attributes)for(const r of t){const t=i.get(r)?.name;t&&t!==r&&(e.attributes[r]=e.attributes[t],delete e.attributes[t])}})}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e?.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const i=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(i)?t.get(i):e}_isRFTJson(e){return e?.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:i,rasterFunction:r}=this;r&&null==e.rasterFunction&&(e.rasterFunction=r),i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}async _updateCurrentRasterInfo(e){if(this.renderer||this.symbolizer){const t=await this._generateRasterInfo(this.rasterFunction,{signal:e});t&&(this.rasterInfo=t)}}_applyMosaicRule(e){const{raster:t,mosaicRule:i}=this;i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map(e=>e.trim()):["image","catalog"],{currentVersion:i,maxRecordCount:r}=e,s=t.includes("image"),n="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!(!e.spatialReference&&!e.extent?.spatialReference),o=t.includes("edit"),l=t.includes("mensuration")&&a,u=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map(e=>e.trim()),p=l&&u.includes("basic"),m=this._isMosaicDataset(e)&&t.includes("catalog"),c=t.includes("download"),h=i>=10.7&&n||i>=11.4&&(n||l&&u.includes("3d")),d=m&&e.fields&&e.fields.length>0,f=d&&e.supportsAdvancedQueries?e.advancedQueryCapabilities:void 0;return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:s,supportsExportImage:s,supportsIdentify:s,supportsImageToMap:i>=11.2&&m,supportsImageToMapMultiray:i>=11.2&&m,supportsMapToImage:i>=11.2&&m,supportsFindImages:i>=11.2&&m,supportsGetImageUrl:i>=11.3&&c,supportsMeasure:l,supportsMeasureFromImage:i>=11.2,supportsDownload:c,supportsQuery:d,supportsGetSamples:i>=10.2&&s,supportsProject:i>=10.3&&s,supportsComputeStatisticsHistograms:i>=10.4&&s,supportsQueryBoundary:i>=10.6&&s,supportsCalculateVolume:h,supportsComputePixelLocation:i>=10.7&&m,supportsComputeAngles:i>=10.91,supportsQueryGPSInfo:i>=11.2&&m,supportsAdd:o,supportsDelete:o,supportsEditing:o,supportsUpdate:o,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:r,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,supportsStatistics:!!f?.supportsStatistics,supportsOrderBy:!!f?.supportsOrderBy,supportsDistinct:!!f?.supportsDistinct,supportsPagination:!!f?.supportsPagination,supportsPaginationOnAggregatedQueries:!!f?.supportsPaginationOnAggregatedQueries,supportsStandardizedQueriesOnly:!!f?.useStandardizedQueries,supportsPercentileStatistics:!!f?.supportsPercentileStatistics,supportsCentroid:!!f?.supportsReturningGeometryCentroid,supportsCurrentUser:!1,supportsDistance:!!f?.supportsQueryWithDistance,supportsExtent:!!f?.supportsReturningQueryExtent,supportsGeometryProperties:!!f?.supportsReturningGeometryProperties,supportsHavingClause:!!f?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:f?.supportsSqlExpression??!!f,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!f?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},mensuration:{supportsDistanceAndAngle:p,supportsAreaAndPerimeter:p,supportsPointOrCentroid:p,supportsHeightFromBaseAndTop:l&&u.includes("base-top height"),supportsHeightFromBaseAndTopShadow:l&&u.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:l&&u.includes("top-top shadow height"),supports3D:l&&u.includes("3d")}}}};function He(e){return e?.path??""}return e([u({clonable:!1})],ze.prototype,"_functionRasterInfos",void 0),e([u({readOnly:!0})],ze.prototype,"_serviceSupportsMosaicRule",void 0),e([d("_serviceSupportsMosaicRule",["currentVersion","fields"])],ze.prototype,"readServiceSupportsMosaicRule",null),e([u({readOnly:!0})],ze.prototype,"_rasterFunctionNamesIndex",null),e([u()],ze.prototype,"adjustAspectRatio",void 0),e([u({type:[p],json:{write:!0}})],ze.prototype,"bandIds",void 0),e([d("bandIds")],ze.prototype,"readBandIds",null),e([u({readOnly:!0,json:{read:!1}})],ze.prototype,"capabilities",void 0),e([d("service","capabilities",["capabilities","currentVersion","serviceDataType"])],ze.prototype,"readCapabilities",null),e([u({type:Number})],ze.prototype,"compressionQuality",void 0),e([y("compressionQuality")],ze.prototype,"writeCompressionQuality",null),e([u({type:Number})],ze.prototype,"compressionTolerance",void 0),e([y("compressionTolerance")],ze.prototype,"writeCompressionTolerance",null),e([u({json:{read:{source:"copyrightText"}}})],ze.prototype,"copyright",void 0),e([u({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],ze.prototype,"defaultMosaicRule",void 0),e([d("defaultMosaicRule",["defaultMosaicMethod"])],ze.prototype,"readDefaultMosaicRule",null),e([u({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ze.prototype,"definitionExpression",void 0),e([u({readOnly:!0,constructOnly:!0})],ze.prototype,"exportImageServiceParameters",void 0),e([u()],ze.prototype,"rasterInfo",void 0),e([u({readOnly:!0,type:[_]})],ze.prototype,"fields",void 0),e([u({readOnly:!0})],ze.prototype,"fieldsIndex",null),e([u({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff","bip","bsq"],json:{write:!0}})],ze.prototype,"format",null),e([d("service","format",["serviceDataType"])],ze.prototype,"readFormat",null),e([u({type:g})],ze.prototype,"fullExtent",void 0),e([u({readOnly:!0})],ze.prototype,"hasMultidimensions",void 0),e([u({json:{read:{source:"maxImageHeight"}}})],ze.prototype,"imageMaxHeight",void 0),e([u({json:{read:{source:"maxImageWidth"}}})],ze.prototype,"imageMaxWidth",void 0),e([u({type:String,json:{type:P.jsonValues,read:P.read,write:P.write}})],ze.prototype,"interpolation",void 0),e([u()],ze.prototype,"minScale",void 0),e([d("service","minScale")],ze.prototype,"readMinScale",null),e([u()],ze.prototype,"maxScale",void 0),e([d("service","maxScale")],ze.prototype,"readMaxScale",null),e([u({type:O})],ze.prototype,"mosaicRule",null),e([d("mosaicRule",["mosaicRule","defaultMosaicMethod"])],ze.prototype,"readMosaicRule",null),e([y("mosaicRule")],ze.prototype,"writeMosaicRule",null),e([u()],ze.prototype,"multidimensionalInfo",void 0),e([u({type:C,json:{write:!0}})],ze.prototype,"multidimensionalSubset",void 0),e([u({json:{type:p}})],ze.prototype,"noData",void 0),e([y("noData")],ze.prototype,"writeNoData",null),e([u({type:String,json:{type:N.jsonValues,read:N.read,write:N.write}})],ze.prototype,"noDataInterpretation",void 0),e([u({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],ze.prototype,"objectIdField",void 0),e([d("objectIdField")],ze.prototype,"readObjectIdField",null),e([u({readOnly:!0})],ze.prototype,"geometryType",void 0),e([u({})],ze.prototype,"typeIdField",void 0),e([u({})],ze.prototype,"types",void 0),e([u({readOnly:!0})],ze.prototype,"parsedUrl",null),e([u({type:Function})],ze.prototype,"pixelFilter",void 0),e([u()],ze.prototype,"raster",void 0),e([u({readOnly:!0})],ze.prototype,"sourceType",void 0),e([d("sourceType",["serviceSourceType","fields"])],ze.prototype,"readSourceType",null),e([u()],ze.prototype,"viewId",void 0),e([u()],ze.prototype,"renderer",null),e([u({types:le,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:oe,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],ze.prototype,"internalRenderer",null),e([d("internalRenderer")],ze.prototype,"readRenderer",null),e([y("internalRenderer")],ze.prototype,"writeRenderer",null),e([u({clonable:!1})],ze.prototype,"symbolizer",void 0),e([u(w)],ze.prototype,"opacity",void 0),e([u({readOnly:!0})],ze.prototype,"rasterFields",null),e([u({constructOnly:!0})],ze.prototype,"rasterFunctionInfos",void 0),e([u({type:G,json:{name:"renderingRule"}})],ze.prototype,"rasterFunction",null),e([d("rasterFunction",["renderingRule","rasterFunctionInfos"])],ze.prototype,"readRasterFunction",null),e([u({readOnly:!0})],ze.prototype,"serviceDataType",void 0),e([u({readOnly:!0,type:I})],ze.prototype,"spatialReference",void 0),e([d("spatialReference",["spatialReference","extent"])],ze.prototype,"readSpatialReference",null),e([u({type:q.apiValues,json:{read:q.read,type:q.jsonValues}})],ze.prototype,"pixelType",void 0),e([y("pixelType")],ze.prototype,"writePixelType",null),e([u({constructOnly:!0,type:k})],ze.prototype,"serviceRasterInfo",void 0),e([u()],ze.prototype,"sourceJSON",void 0),e([u(b)],ze.prototype,"url",void 0),e([u({readOnly:!0})],ze.prototype,"version",void 0),e([d("version",["currentVersion","fields","timeInfo"])],ze.prototype,"readVersion",null),ze=e([f("esri.layers.mixins.ArcGISImageService")],ze),ze};export{ze as ArcGISImageService};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../request.js";import{getOrCreateMapValue as t}from"../../core/MapUtils.js";import{throwIfAborted as s}from"../../core/promiseUtils.js";import{join as o}from"../../core/urlUtils.js";import{Version as i}from"../../core/Version.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{reader as p}from"../../core/accessorSupport/decorators/reader.js";import{subclass as l}from"../../core/accessorSupport/decorators/subclass.js";import{OriginId as n}from"../../core/accessorSupport/PropertyOrigin.js";import c from"../../geometry/Extent.js";import u from"../../geometry/SpatialReference.js";import{parse as y}from"../support/arcgisLayerUrl.js";import{id as m,popupEnabled as d}from"../support/commonProperties.js";import{isHostedLayer as h}from"../../portal/support/portalItemUtils.js";const f=f=>{let b=class extends f{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0,this._allLayersAndTablesMap=null}readCapabilities(e,r){const t=r.capabilities&&r.capabilities.split(",").map(e=>e.toLowerCase().trim());if(!t)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const s=this.type,o="tile"!==s&&!!r.supportsDynamicLayers,a=t.includes("query"),p=t.includes("map"),l=!!r.exportTilesAllowed,n=t.includes("tilemap"),c=t.includes("data"),u="tile"!==s&&(!r.tileInfo||o),y="tile"!==s&&(!r.tileInfo||o),m="tile"!==s,d="tile"!==s&&o&&r.currentVersion>=11.1,h=r.cimVersion?i.parse(r.cimVersion):null,f=h?.greaterEqual(1,4)??!1,b=h?.greaterEqual(2,0)??!1;return{operations:{supportsExportMap:p,supportsExportTiles:l,supportsIdentify:a,supportsQuery:c,supportsTileMap:n},exportMap:p?{supportsArcadeExpressionForLabeling:f,supportsCIMSymbols:b,supportsDynamicLayers:o,supportsSublayerOrderBy:d,supportsSublayerDefinitionExpression:y,supportsSublayerVisibility:u,supportsSublayersChanges:m}:null,exportTiles:l?{maxExportTilesCount:+r.maxExportTilesCount}:null}}readVersion(e,r){let t=r.currentVersion;return t||(t=r.hasOwnProperty("capabilities")||r.hasOwnProperty("tables")?10:r.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),t}async fetchRelatedService(e){const r=this.portalItem;if(!r||!h(r))return null;this._relatedFeatureServicePromise||(this._relatedFeatureServicePromise=r.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},e).then(e=>e.find(e=>"Feature Service"===e.type)??null,()=>null));const t=await this._relatedFeatureServicePromise;return s(e),t?{itemId:t.id,url:t.url}:null}async fetchSublayerInfo(e,t){const{source:s}=e;if(this?.portalItem&&"tile"===this.type&&"map-layer"===s?.type&&h(this.portalItem)&&e.originIdOf("url")<n.SERVICE){const r=await this.fetchRelatedService(t);r&&(e.url=o(r.url,s.mapLayerId.toString()),e.layerItemId=r.itemId)}const{url:i}=e;let a;if("data-layer"===s.type){a=(await r(i,{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey},...t})).data}else if(i&&e.originIdOf("url")>n.SERVICE)try{const e=await this._fetchAllLayersAndTablesFromService(i),r=y(i)?.sublayer??s.mapLayerId;a=e.get(r)}catch{}else{let r=e.id;"map-layer"===s?.type&&(r=s.mapLayerId);try{a=(await this.fetchAllLayersAndTables(t)).get(r)}catch{}}return a}async fetchAllLayersAndTables(e){return this._fetchAllLayersAndTablesFromService(this.parsedUrl?.path,e)}async _fetchAllLayersAndTablesFromService(e,i){await this.load(i),this._allLayersAndTablesMap||=new Map;const a=y(e),p=t(this._allLayersAndTablesMap,a?.url.path,()=>r(o(a?.url.path,"/layers"),{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey}}).then(e=>{const r=new Map,{layers:t,tables:s}=e.data,o=[...t??[],...s??[]];for(const i of o)r.set(i.id,i);return{result:r}},e=>({error:e}))),l=await p;if(s(i),"result"in l)return l.result;throw l.error}};return e([a({readOnly:!0})],b.prototype,"capabilities",void 0),e([p("service","capabilities",["capabilities","cimVersion","currentVersion","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],b.prototype,"readCapabilities",null),e([a({json:{read:{source:"copyrightText"}}})],b.prototype,"copyright",void 0),e([a({type:c})],b.prototype,"fullExtent",void 0),e([a(m)],b.prototype,"id",void 0),e([a({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],b.prototype,"legendEnabled",void 0),e([a(d)],b.prototype,"popupEnabled",void 0),e([a({type:u})],b.prototype,"spatialReference",void 0),e([a({readOnly:!0})],b.prototype,"version",void 0),e([p("service","version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],b.prototype,"readVersion",null),b=e([l("esri.layers.mixins.ArcGISMapService")],b),b};export{f as ArcGISMapService};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../request.js";import{getOrCreateMapValue as t}from"../../core/MapUtils.js";import{throwIfAborted as s}from"../../core/promiseUtils.js";import{join as o}from"../../core/urlUtils.js";import{Version as i}from"../../core/Version.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{reader as p}from"../../core/accessorSupport/decorators/reader.js";import{subclass as l}from"../../core/accessorSupport/decorators/subclass.js";import{OriginId as n}from"../../core/accessorSupport/PropertyOrigin.js";import c from"../../geometry/Extent.js";import u from"../../geometry/SpatialReference.js";import{parse as y}from"../support/arcgisLayerUrl.js";import{id as m,popupEnabled as d}from"../support/commonProperties.js";import{isHostedLayer as h}from"../../portal/support/portalItemUtils.js";const f=f=>{const b=f;let v=class extends b{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0,this._allLayersAndTablesMap=null}readCapabilities(e,r){const t=r.capabilities&&r.capabilities.split(",").map(e=>e.toLowerCase().trim());if(!t)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const s=this.type,o="tile"!==s&&!!r.supportsDynamicLayers,a=t.includes("query"),p=t.includes("map"),l=!!r.exportTilesAllowed,n=t.includes("tilemap"),c=t.includes("data"),u="tile"!==s&&(!r.tileInfo||o),y="tile"!==s&&(!r.tileInfo||o),m="tile"!==s,d="tile"!==s&&o&&r.currentVersion>=11.1,h=r.cimVersion?i.parse(r.cimVersion):null,f=h?.greaterEqual(1,4)??!1,b=h?.greaterEqual(2,0)??!1;return{operations:{supportsExportMap:p,supportsExportTiles:l,supportsIdentify:a,supportsQuery:c,supportsTileMap:n},exportMap:p?{supportsArcadeExpressionForLabeling:f,supportsCIMSymbols:b,supportsDynamicLayers:o,supportsSublayerOrderBy:d,supportsSublayerDefinitionExpression:y,supportsSublayerVisibility:u,supportsSublayersChanges:m}:null,exportTiles:l?{maxExportTilesCount:+r.maxExportTilesCount}:null}}readVersion(e,r){let t=r.currentVersion;return t||(t=r.hasOwnProperty("capabilities")||r.hasOwnProperty("tables")?10:r.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),t}async fetchRelatedService(e){const r=this.portalItem;if(!r||!h(r))return null;this._relatedFeatureServicePromise||(this._relatedFeatureServicePromise=r.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},e).then(e=>e.find(e=>"Feature Service"===e.type)??null,()=>null));const t=await this._relatedFeatureServicePromise;return s(e),t?{itemId:t.id,url:t.url}:null}async fetchSublayerInfo(e,t){const{source:s}=e;if(this?.portalItem&&"tile"===this.type&&"map-layer"===s?.type&&h(this.portalItem)&&e.originIdOf("url")<n.SERVICE){const r=await this.fetchRelatedService(t);r&&(e.url=o(r.url,s.mapLayerId.toString()),e.layerItemId=r.itemId)}const{url:i}=e;let a;if("data-layer"===s.type){a=(await r(i,{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey},...t})).data}else if(i&&e.originIdOf("url")>n.SERVICE)try{const e=await this._fetchAllLayersAndTablesFromService(i),r=y(i)?.sublayer??s.mapLayerId;a=e.get(r)}catch{}else{let r=e.id;"map-layer"===s?.type&&(r=s.mapLayerId);try{a=(await this.fetchAllLayersAndTables(t)).get(r)}catch{}}return a}async fetchAllLayersAndTables(e){return this._fetchAllLayersAndTablesFromService(this.parsedUrl?.path,e)}async _fetchAllLayersAndTablesFromService(e,i){await this.load(i),this._allLayersAndTablesMap||=new Map;const a=y(e),p=t(this._allLayersAndTablesMap,a?.url.path,()=>r(o(a?.url.path,"/layers"),{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey}}).then(e=>{const r=new Map,{layers:t,tables:s}=e.data,o=[...t??[],...s??[]];for(const i of o)r.set(i.id,i);return{result:r}},e=>({error:e}))),l=await p;if(s(i),"result"in l)return l.result;throw l.error}};return e([a({readOnly:!0})],v.prototype,"capabilities",void 0),e([p("service","capabilities",["capabilities","cimVersion","currentVersion","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],v.prototype,"readCapabilities",null),e([a({json:{read:{source:"copyrightText"}}})],v.prototype,"copyright",void 0),e([a({type:c})],v.prototype,"fullExtent",void 0),e([a(m)],v.prototype,"id",void 0),e([a({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],v.prototype,"legendEnabled",void 0),e([a(d)],v.prototype,"popupEnabled",void 0),e([a({type:u})],v.prototype,"spatialReference",void 0),e([a({readOnly:!0})],v.prototype,"version",void 0),e([p("service","version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],v.prototype,"readVersion",null),v=e([l("esri.layers.mixins.ArcGISMapService")],v),v};export{f as ArcGISMapService};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import r from"../../core/Logger.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{parse as i,sanitizeUrl as o}from"../support/arcgisLayerUrl.js";const l=l=>{let p=class extends l{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const t=i(this.url);if(t?.title)return t.title}return this._get("title")||""}set title(t){this._set("title",t)}set url(t){this._set("url",o(t,r.getLogger(this)))}};return t([e()],p.prototype,"title",null),t([e({type:String})],p.prototype,"url",null),p=t([s("esri.layers.mixins.ArcGISService")],p),p};export{l as ArcGISService};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import r from"../../core/Logger.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{parse as o,sanitizeUrl as i}from"../support/arcgisLayerUrl.js";const l=l=>{const p=l;let c=class extends p{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const t=o(this.url);if(t?.title)return t.title}return this._get("title")||""}set title(t){this._set("title",t)}set url(t){this._set("url",i(t,r.getLogger(this)))}};return t([e()],c.prototype,"title",null),t([e({type:String})],c.prototype,"url",null),c=t([s("esri.layers.mixins.ArcGISService")],c),c};export{l as ArcGISService};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{excludeTables as t}from"../../core/accessorSupport/layerContainerType.js";import{write as s,read as i}from"../effects/jsonUtils.js";const n={type:["average","color-burn","color-dodge","color","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","invert","lighten","lighter","luminosity","minus","multiply","normal","overlay","plus","reflect","saturation","screen","soft-light","source-atop","source-in","source-out","vivid-light","xor"],nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:{layerContainerTypes:t}},"portal-item":{read:!0,write:{layerContainerTypes:t}}}}},a={read:{reader:i},write:{allowNull:!0,writer:s,layerContainerTypes:t}},l={json:{read:!1,write:!1,origins:{"web-map":a,"portal-item":a}}},p=t=>{let s=class extends t{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return e([r(n)],s.prototype,"blendMode",void 0),e([r(l)],s.prototype,"effect",void 0),s=e([o("esri.layers.mixins.BlendLayer")],s),s};export{p as BlendLayer,n as blendModeProperty,l as effectProperty};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{excludeTables as t}from"../../core/accessorSupport/layerContainerType.js";import{write as s,read as i}from"../effects/jsonUtils.js";const n={type:["average","color-burn","color-dodge","color","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","invert","lighten","lighter","luminosity","minus","multiply","normal","overlay","plus","reflect","saturation","screen","soft-light","source-atop","source-in","source-out","vivid-light","xor"],nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:{layerContainerTypes:t}},"portal-item":{read:!0,write:{layerContainerTypes:t}}}}},a={read:{reader:i},write:{allowNull:!0,writer:s,layerContainerTypes:t}},l={json:{read:!1,write:!1,origins:{"web-map":a,"portal-item":a}}},p=t=>{const s=t;let i=class extends s{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return e([r(n)],i.prototype,"blendMode",void 0),e([r(l)],i.prototype,"effect",void 0),i=e([o("esri.layers.mixins.BlendLayer")],i),i};export{p as BlendLayer,n as blendModeProperty,l as effectProperty};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../chunks/tslib.es6.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";const e=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return r([o({type:Object,json:{write:{overridePolicy:r=>({enabled:!!(r&&Object.keys(r).length>0)})}}})],t.prototype,"customParameters",void 0),t=r([s("esri.layers.mixins.CustomParametersMixin")],t),t};export{e as CustomParametersMixin};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";const e=e=>{const t=e;let c=class extends t{constructor(){super(...arguments),this.customParameters=null}};return r([o({type:Object,json:{write:{overridePolicy:r=>({enabled:!!(r&&Object.keys(r).length>0)})}}})],c.prototype,"customParameters",void 0),c=r([s("esri.layers.mixins.CustomParametersMixin")],c),c};export{e as CustomParametersMixin};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../chunks/tslib.es6.js";import{setDeepValue as e}from"../../core/object.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{excludeTables as i}from"../../core/accessorSupport/layerContainerType.js";import t from"../support/DisplayFilterInfo.js";const a=e=>{let i=class extends e{constructor(){super(...arguments),this.displayFilterEnabled=!0,this.displayFilterInfo=null}};return r([o(p)],i.prototype,"displayFilterEnabled",void 0),r([o(l)],i.prototype,"displayFilterInfo",void 0),i=r([s("esri.layers.mixins.DisplayFilteredLayer")],i),i},p={type:Boolean,json:{name:"layerDefinition.disableDisplayFilter",read:{reader:r=>!r},write:{layerContainerTypes:i,writer(r,o,s){e(s,!r,o)}},origins:{"web-scene":{write:!1,read:!1}}}},l={type:t,json:{name:"layerDefinition.displayFilterInfo",write:{enabled:!0,allowNull:!0,layerContainerTypes:i},origins:{"web-scene":{write:!1,read:!1}}}};export{a as DisplayFilteredLayer,p as displayFilterEnabledProperty,l as displayFilterInfoProperty};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import{setDeepValue as e}from"../../core/object.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{excludeTables as i}from"../../core/accessorSupport/layerContainerType.js";import t from"../support/DisplayFilterInfo.js";const a=e=>{const i=e;let t=class extends i{constructor(){super(...arguments),this.displayFilterEnabled=!0,this.displayFilterInfo=null}};return r([o(p)],t.prototype,"displayFilterEnabled",void 0),r([o(l)],t.prototype,"displayFilterInfo",void 0),t=r([s("esri.layers.mixins.DisplayFilteredLayer")],t),t},p={type:Boolean,json:{name:"layerDefinition.disableDisplayFilter",read:{reader:r=>!r},write:{layerContainerTypes:i,writer(r,o,s){e(s,!r,o)}},origins:{"web-scene":{write:!1,read:!1}}}},l={type:t,json:{name:"layerDefinition.displayFilterInfo",write:{enabled:!0,allowNull:!0,layerContainerTypes:i},origins:{"web-scene":{write:!1,read:!1}}}};export{a as DisplayFilteredLayer,p as displayFilterEnabledProperty,l as displayFilterInfoProperty};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Evented.js";import{clone as i}from"../../core/lang.js";import{createResolver as s}from"../../core/promiseUtils.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import{isVersionInEditSession as o,defaultVersionNameLookup as n}from"../../versionManagement/support/versionManagementUtils.js";const a=new e.EventEmitter;function l(t){return a.on("apply-edits",new WeakRef(t))}function h(t){return a.on("update-moment",new WeakRef(t))}function c(t,e,i=null,r=!1){const d=s();return r=null==e||r,a.emit("apply-edits",{serviceUrl:t,layerId:e,gdbVersion:i,mayReceiveServiceEdits:r,result:d.promise}),d}function u(t,e,i=null,s){a.emit("update-moment",{serviceUrl:t,layerId:e,gdbVersion:i,moment:s})}const m=Symbol();function p(t){return null!=t&&"object"==typeof t&&m in t}function b(t){return null!=t&&"object"==typeof t&&"gdbVersion"in t}function g(t,e,i){const s=new URL(t).host,r=n.get(s),d=t=>!t||t===r;return d(e)&&d(i)||e===i}const F=e=>{var s;let n=class extends e{static{s=m}constructor(...t){super(...t),this[s]=!0,this._applyEditsHandler=t=>{const{serviceUrl:e,layerId:s,gdbVersion:r,mayReceiveServiceEdits:d,result:o}=t,n=e===this.url,a=null!=s&&null!=this.layerId&&s===this.layerId,l=b(this),h=b(this)&&g(e,r,this.gdbVersion);if(!n||l&&!h||!a&&!d)return;const c=o.then(t=>{if(this.lastEditsEventDate=new Date,a&&(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length))return this.emit("edits",i(t)),t;const s=t.editedFeatures?.find(({layerId:t})=>t===this.layerId);if(s){const{adds:e,updates:r,deletes:d}=s.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:e?e.map(({attributes:t})=>({objectId:this.objectIdField&&t[this.objectIdField],globalId:this.globalIdField&&t[this.globalIdField]})):[],deletedFeatures:d?d.map(({attributes:t})=>({objectId:this.objectIdField&&t[this.objectIdField],globalId:this.globalIdField&&t[this.globalIdField]})):[],updatedFeatures:r?r.map(({current:{attributes:t}})=>({objectId:this.objectIdField&&t[this.objectIdField],globalId:this.globalIdField&&t[this.globalIdField]})):[],editedFeatures:i(t.editedFeatures),exceededTransferLimit:!1,historicMoment:i(t.historicMoment)};return this.emit("edits",o),o}const d={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:i(t.editedFeatures),exceededTransferLimit:!1,historicMoment:i(t.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(e,r,d.historicMoment)&&this.emit("edits",d),d}).then(t=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(e,r,t.historicMoment)&&(this.historicMoment=t.historicMoment),t));this.emit("apply-edits",{result:c})},this._updateMomentHandler=t=>{const{serviceUrl:e,gdbVersion:i,moment:s}=t,r=e===this.url,d=b(this),o=b(this)&&g(e,i,this.gdbVersion),n=b(this)&&!g(e,this.gdbVersion,null);r&&d&&o&&n&&"historicMoment"in this&&this.historicMoment!==s&&(this.historicMoment=s)},this.when().then(()=>{this.addHandles(l(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(h(this._updateMomentHandler))},()=>{})}_shouldUpdateHistoricMoment(t,e,i){return"historicMoment"in this&&this.historicMoment!==i&&o(t,e)}};return t([r()],n.prototype,"lastEditsEventDate",void 0),n=t([d("esri.layers.mixins.EditBusLayer")],n),n};export{F as EditBusLayer,c as emitApplyEditsEvent,u as emitUpdateMomentEvent,p as isEditBusLayer,b as isLayerWithGDBVersion,l as onApplyEditsEvent,h as onUpdateMomentEvent,g as versionMatches};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Evented.js";import{clone as i}from"../../core/lang.js";import{createResolver as s}from"../../core/promiseUtils.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import{isVersionInEditSession as o,defaultVersionNameLookup as n}from"../../versionManagement/support/versionManagementUtils.js";const a=new e.EventEmitter;function l(t){return a.on("apply-edits",new WeakRef(t))}function h(t){return a.on("update-moment",new WeakRef(t))}function c(t,e,i=null,r=!1){const d=s();return r=null==e||r,a.emit("apply-edits",{serviceUrl:t,layerId:e,gdbVersion:i,mayReceiveServiceEdits:r,result:d.promise}),d}function u(t,e,i=null,s){a.emit("update-moment",{serviceUrl:t,layerId:e,gdbVersion:i,moment:s})}const m=Symbol();function p(t){return null!=t&&"object"==typeof t&&m in t}function b(t){return null!=t&&"object"==typeof t&&"gdbVersion"in t}function g(t,e,i){const s=new URL(t).host,r=n.get(s),d=t=>!t||t===r;return d(e)&&d(i)||e===i}const F=e=>{var s;const n=e;let a=class extends n{static{s=m}constructor(...t){super(...t),this[s]=!0,this._applyEditsHandler=t=>{const{serviceUrl:e,layerId:s,gdbVersion:r,mayReceiveServiceEdits:d,result:o}=t,n=e===this.url,a=null!=s&&null!=this.layerId&&s===this.layerId,l=b(this),h=b(this)&&g(e,r,this.gdbVersion);if(!n||l&&!h||!a&&!d)return;const c=o.then(t=>{if(this.lastEditsEventDate=new Date,a&&(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length))return this.emit("edits",i(t)),t;const s=t.editedFeatures?.find(({layerId:t})=>t===this.layerId);if(s){const{adds:e,updates:r,deletes:d}=s.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:e?e.map(({attributes:t})=>({objectId:this.objectIdField&&t[this.objectIdField],globalId:this.globalIdField&&t[this.globalIdField]})):[],deletedFeatures:d?d.map(({attributes:t})=>({objectId:this.objectIdField&&t[this.objectIdField],globalId:this.globalIdField&&t[this.globalIdField]})):[],updatedFeatures:r?r.map(({current:{attributes:t}})=>({objectId:this.objectIdField&&t[this.objectIdField],globalId:this.globalIdField&&t[this.globalIdField]})):[],editedFeatures:i(t.editedFeatures),exceededTransferLimit:!1,historicMoment:i(t.historicMoment)};return this.emit("edits",o),o}const d={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:i(t.editedFeatures),exceededTransferLimit:!1,historicMoment:i(t.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(e,r,d.historicMoment)&&this.emit("edits",d),d}).then(t=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(e,r,t.historicMoment)&&(this.historicMoment=t.historicMoment),t));this.emit("apply-edits",{result:c})},this._updateMomentHandler=t=>{const{serviceUrl:e,gdbVersion:i,moment:s}=t,r=e===this.url,d=b(this),o=b(this)&&g(e,i,this.gdbVersion),n=b(this)&&!g(e,this.gdbVersion,null);r&&d&&o&&n&&"historicMoment"in this&&this.historicMoment!==s&&(this.historicMoment=s)},this.when().then(()=>{this.addHandles(l(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(h(this._updateMomentHandler))},()=>{})}_shouldUpdateHistoricMoment(t,e,i){return"historicMoment"in this&&this.historicMoment!==i&&o(t,e)}};return t([r()],a.prototype,"lastEditsEventDate",void 0),a=t([d("esri.layers.mixins.EditBusLayer")],a),a};export{F as EditBusLayer,c as emitApplyEditsEvent,u as emitUpdateMomentEvent,p as isEditBusLayer,b as isLayerWithGDBVersion,l as onApplyEditsEvent,h as onUpdateMomentEvent,g as versionMatches};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../chunks/tslib.es6.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import t from"../support/FeatureEffect.js";const s={write:{allowNull:!0}},p={type:t,json:{origins:{"web-map":s,"portal-item":s}}},c=t=>{let s=class extends t{constructor(){super(...arguments),this.featureEffect=null}};return r([o(p)],s.prototype,"featureEffect",void 0),s=r([e("esri.layers.mixins.FeatureEffectLayer")],s),s};export{c as FeatureEffectLayer,p as featureEffectProperty};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import t from"../support/FeatureEffect.js";const s={write:{allowNull:!0}},c={type:t,json:{origins:{"web-map":s,"portal-item":s}}},p=t=>{const s=t;let p=class extends s{constructor(){super(...arguments),this.featureEffect=null}};return r([o(c)],p.prototype,"featureEffect",void 0),p=r([e("esri.layers.mixins.FeatureEffectLayer")],p),p};export{p as FeatureEffectLayer,c as featureEffectProperty};