@arcgis/core 4.28.0-next.20230921 → 4.28.0-next.20230923

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 (415) hide show
  1. package/Graphic.js +1 -1
  2. package/PopupTemplate.js +1 -1
  3. package/TimeExtent.js +1 -1
  4. package/arcade/ArcadeDate.js +1 -1
  5. package/arcade/Feature.js +1 -1
  6. package/arcade/featureSetUtils.js +1 -1
  7. package/arcade/featureset/actions/Adapted.js +1 -1
  8. package/arcade/featureset/actions/GroupBy.js +1 -1
  9. package/arcade/featureset/support/FeatureSet.js +1 -1
  10. package/arcade/featureset/support/FeatureSetIterator.js +1 -1
  11. package/arcade/featureset/support/StatsField.js +1 -1
  12. package/arcade/featureset/support/sqlUtils.js +1 -1
  13. package/arcade/functions/convertdirection.js +1 -1
  14. package/arcade/functions/date.js +1 -1
  15. package/arcade/functions/featuresetbase.js +1 -1
  16. package/arcade/functions/featuresetstats.js +1 -1
  17. package/arcade/treeAnalysis.js +1 -1
  18. package/arcade.js +1 -1
  19. package/assets/esri/core/workers/RemoteClient.js +1 -1
  20. package/assets/esri/core/workers/chunks/02156fd04279f4d0fd3f.js +1 -0
  21. package/assets/esri/core/workers/chunks/07f6175b52366b2c28bd.js +1 -0
  22. package/assets/esri/core/workers/chunks/098073c3b2849f56dad8.js +1 -0
  23. package/assets/esri/core/workers/chunks/1186ba1947bd0c32f148.js +1 -0
  24. package/assets/esri/core/workers/chunks/186445b9fbedd261f684.js +1 -0
  25. package/assets/esri/core/workers/chunks/{580039dd491854ca325c.js → 21fc02f0d5716c4a7acd.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{dff1c3c38dda2bd1a9d6.js → 246a954347fe9318190e.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{c9dfb145f0c1d93e0fbd.js → 250bb6ae6f1992b5b4f9.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{314c307e30f308a40a28.js → 25b09e9c0511c8e1cf8a.js} +1 -1
  29. package/assets/esri/core/workers/chunks/2a0b3b52ecd787a613bc.js +1 -0
  30. package/assets/esri/core/workers/chunks/2bc9b55e655968229ef4.js +1 -0
  31. package/assets/esri/core/workers/chunks/2f0924e7aa89e689da4a.js +1 -0
  32. package/assets/esri/core/workers/chunks/3f218d65ec451b2a1027.js +1 -0
  33. package/assets/esri/core/workers/chunks/425b5733bb88e6efe242.js +1 -0
  34. package/assets/esri/core/workers/chunks/45d6b942cdccca2ce44a.js +1 -0
  35. package/assets/esri/core/workers/chunks/4bf1a7e82a68ccee0ee1.js +1 -0
  36. package/assets/esri/core/workers/chunks/4c110c7f4f940ec58010.js +1 -0
  37. package/assets/esri/core/workers/chunks/{bde89b2684b6185992ef.js → 4ed77097e69fa3096ce4.js} +1 -1
  38. package/assets/esri/core/workers/chunks/4fe5bac782a742d5b1c0.js +1 -0
  39. package/assets/esri/core/workers/chunks/{1cbaba30f55f00f7498b.js → 51324d042f469f3b8914.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{3f4e9b1663ec521bfe00.js → 542ce10e1872399790b4.js} +1 -1
  41. package/assets/esri/core/workers/chunks/54d2b7e2ac4ba883bee8.js +1 -0
  42. package/assets/esri/core/workers/chunks/54ecb6cae310818d1aa2.js +1 -0
  43. package/assets/esri/core/workers/chunks/57c932e289d89d97da4b.js +1 -0
  44. package/assets/esri/core/workers/chunks/{6403de6fc067cf8f7436.js → 592c1fb531f2be928e8a.js} +1 -1
  45. package/assets/esri/core/workers/chunks/59a807220d6f0dd18776.js +1 -0
  46. package/assets/esri/core/workers/chunks/59dff10d7ad2b1bf469e.js +1 -0
  47. package/assets/esri/core/workers/chunks/609a475ab395f2ce63e2.js +1 -0
  48. package/assets/esri/core/workers/chunks/612c485c5aad1548d708.js +1 -0
  49. package/assets/esri/core/workers/chunks/{2bb69d76a13564e8e455.js → 645ba2d5c10184632d23.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{332689bf60d246485993.js → 65186e168dd112ac6221.js} +1 -1
  51. package/assets/esri/core/workers/chunks/6b9248fb2d6aadbce7bb.js +1 -0
  52. package/assets/esri/core/workers/chunks/709465832d306e02df52.js +1 -0
  53. package/assets/esri/core/workers/chunks/72c5bd6f7b8541b8d69e.js +1 -0
  54. package/assets/esri/core/workers/chunks/{bbc0dcd316c5598bc9ad.js → 74368a5213def6c200a2.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{94188fe381239d48a975.js → 76483c9a8848f3106126.js} +1 -1
  56. package/assets/esri/core/workers/chunks/7aa58c96798447ce5907.js +1 -0
  57. package/assets/esri/core/workers/chunks/7d078b8b9997b5300c0a.js +1 -0
  58. package/assets/esri/core/workers/chunks/7fe641cf1467496e670a.js +1 -0
  59. package/assets/esri/core/workers/chunks/{df8f62beb36fb9d2ac81.js → 810c8d6ff19976fd1366.js} +1 -1
  60. package/assets/esri/core/workers/chunks/8458ed96f3e72814cef2.js +1 -0
  61. package/assets/esri/core/workers/chunks/{243a4eed107d363dfad8.js → 887652bbdb3b71d0a089.js} +1 -1
  62. package/assets/esri/core/workers/chunks/896bfda379cf620b63ec.js +1 -0
  63. package/assets/esri/core/workers/chunks/91c9f0d59eaed7a735ce.js +1 -0
  64. package/assets/esri/core/workers/chunks/{1f7e041140088f8ac489.js → 97073a60f0ea2a397165.js} +1 -1
  65. package/assets/esri/core/workers/chunks/97658ac749664a07c92d.js +1 -0
  66. package/assets/esri/core/workers/chunks/{1da74a306aa5b4eacaae.js → 9866bbaeaf885c2dcca9.js} +1 -1
  67. package/assets/esri/core/workers/chunks/a39ae87298ac674f129d.js +1 -0
  68. package/assets/esri/core/workers/chunks/a7b3048c19348540e004.js +1 -0
  69. package/assets/esri/core/workers/chunks/a8ca4b116909e47722f9.js +1 -0
  70. package/assets/esri/core/workers/chunks/{101f776316a85b708927.js → a99070ec4c06c435b744.js} +1 -1
  71. package/assets/esri/core/workers/chunks/ab145d13932d87dd7bf9.js +1 -0
  72. package/assets/esri/core/workers/chunks/{77c15b1c2729c780f75a.js → aeeeb386134b341d7ad2.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{3ca759f72d3bb29e9ea9.js → af54b233f6d6ad70b4a3.js} +2 -2
  74. package/assets/esri/core/workers/chunks/b9146daae8457224fd08.js +1 -0
  75. package/assets/esri/core/workers/chunks/bcdd2e8841abcb4df6da.js +1 -0
  76. package/assets/esri/core/workers/chunks/be05cc0cdabd5e051045.js +1 -0
  77. package/assets/esri/core/workers/chunks/c5f5f37bef11c6fbdc40.js +1 -0
  78. package/assets/esri/core/workers/chunks/d414dba3179bcf75bc6b.js +1 -0
  79. package/assets/esri/core/workers/chunks/{b449d6bd5851187d419f.js → d6e5408f9fa6b4bcd118.js} +1 -1
  80. package/assets/esri/core/workers/chunks/d9fb500cbd0f04d219a3.js +1 -0
  81. package/assets/esri/core/workers/chunks/e0dd6789fb797e9b7206.js +1 -0
  82. package/assets/esri/core/workers/chunks/{6f271249e042086d5a16.js → e4e49deae8da74f629db.js} +1 -1
  83. package/assets/esri/core/workers/chunks/e5dcff7a4fa84ba09670.js +1 -0
  84. package/assets/esri/core/workers/chunks/{f508ccfde6425dabe9ac.js → ee0bf611d191103a7046.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{ed1fbc1bc8d50453e2f5.js → f793cd41fcd022baeea2.js} +1 -1
  86. package/assets/esri/core/workers/chunks/fad6a7bb82a0a2df726f.js +1 -0
  87. package/assets/esri/themes/base/widgets/_FeatureForm.scss +2 -84
  88. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +2 -0
  89. package/assets/esri/themes/dark/main.css +1 -1
  90. package/assets/esri/themes/light/main.css +1 -1
  91. package/assets/esri/themes/light/view.css +1 -1
  92. package/chunks/arcade.js +1 -1
  93. package/config.js +1 -1
  94. package/core/Accessor.js +1 -1
  95. package/core/accessorSupport/diffUtils.js +1 -1
  96. package/core/has.js +1 -1
  97. package/core/number.js +1 -1
  98. package/core/reactiveUtils.js +1 -1
  99. package/core/sql/DateOnly.js +1 -1
  100. package/core/sql/WhereClause.js +1 -1
  101. package/core/sql.js +1 -1
  102. package/core/timeUtils.js +1 -1
  103. package/identity/IdentityForm.js +1 -1
  104. package/identity/IdentityModal.js +1 -1
  105. package/interfaces.d.ts +48 -203
  106. package/layers/LinkChartLayer.js +1 -1
  107. package/layers/OrientedImageryLayer.js +1 -1
  108. package/layers/SceneLayer.js +1 -1
  109. package/layers/graphics/applyEditsUtils.js +5 -0
  110. package/layers/graphics/editingSupport.js +1 -1
  111. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  112. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  113. package/layers/mixins/ArcGISImageService.js +1 -1
  114. package/layers/mixins/EditBusLayer.js +1 -1
  115. package/layers/orientedImagery/core/CameraOrientationLTP.js +1 -1
  116. package/layers/orientedImagery/core/ElevationSourceDefinitions.js +5 -0
  117. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  118. package/layers/orientedImagery/core/cameraOrientationFactory.js +1 -1
  119. package/layers/orientedImagery/core/utils.js +5 -0
  120. package/layers/orientedImagery/transformations/groundToImageUtils.js +1 -1
  121. package/layers/support/fieldProperties.js +1 -1
  122. package/layers/support/fieldUtils.js +1 -1
  123. package/layers/support/imageryRendererUtils.js +1 -1
  124. package/layers/support/kmlUtils.js +1 -1
  125. package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
  126. package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +1 -1
  127. package/networks/Network.js +1 -1
  128. package/package.json +1 -1
  129. package/request.js +1 -1
  130. package/rest/featureService/FeatureService.js +1 -1
  131. package/rest/support/DirectionsFeatureSet.js +1 -1
  132. package/smartMapping/renderers/pieChart.js +1 -1
  133. package/smartMapping/renderers/relationship.js +1 -1
  134. package/smartMapping/renderers/support/utils.js +1 -1
  135. package/smartMapping/statistics/support/ageUtils.js +1 -1
  136. package/smartMapping/support/adapters/support/utils.js +1 -1
  137. package/smartMapping/support/utils.js +1 -1
  138. package/support/apiKeyUtils.js +1 -1
  139. package/support/arcadeUtils.js +1 -1
  140. package/support/revision.js +1 -1
  141. package/symbols/cim/cimAnalyzer.js +1 -1
  142. package/symbols/support/svgUtils.js +1 -1
  143. package/time/TimeReference.js +1 -1
  144. package/time/timeReferenceUtils.js +1 -1
  145. package/versionManagement/VersionManagementService.js +1 -1
  146. package/versionManagement/support/EditMomentStack.js +5 -0
  147. package/versionManagement/support/versionManagementUtils.js +1 -1
  148. package/views/2d/engine/Container.js +1 -1
  149. package/views/2d/engine/DisplayObject.js +1 -1
  150. package/views/2d/engine/ManagedCanvas.js +5 -0
  151. package/views/2d/engine/Stage.js +1 -1
  152. package/views/2d/engine/webgl/GroupContainer.js +1 -1
  153. package/views/2d/engine/webgl/Painter.js +1 -1
  154. package/views/2d/engine/webgl/WGLContainer.js +1 -1
  155. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  156. package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
  157. package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
  158. package/views/2d/engine/webgl/effects/HittestEffectVTL.js +1 -1
  159. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  160. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  161. package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
  162. package/views/2d/layers/MediaLayerView2D.js +1 -1
  163. package/views/2d/layers/TileLayerView2D.js +1 -1
  164. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  165. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  166. package/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js +1 -1
  167. package/views/2d/layers/graphics/BaseGraphicContainer.js +1 -1
  168. package/views/2d/layers/graphics/GraphicContainer.js +1 -1
  169. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  170. package/views/2d/layers/graphics/HighlightGraphicContainer.js +1 -1
  171. package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
  172. package/views/2d/layers/support/DisplayGL.js +1 -1
  173. package/views/2d/webglDeps.js +1 -1
  174. package/views/3d/glTF/loader.js +1 -1
  175. package/views/3d/interactive/editingTools/manipulations/MoveManipulation.js +1 -1
  176. package/views/3d/interactive/editingTools/transformGraphic/isSupportedGraphic.js +1 -1
  177. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  178. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  179. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  180. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  181. package/views/3d/layers/SceneLayerView3D.js +1 -1
  182. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  183. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  184. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  185. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  186. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  187. package/views/3d/layers/graphics/Labeler.js +1 -1
  188. package/views/3d/layers/graphics/graphicUtils.js +1 -1
  189. package/views/3d/layers/i3s/featureEditing.js +1 -1
  190. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  191. package/views/3d/state/ViewStateManager.js +1 -1
  192. package/views/3d/support/buffer/glUtil.js +1 -1
  193. package/views/3d/support/engineContent/line.js +1 -1
  194. package/views/3d/support/viewpointUtils.js +1 -1
  195. package/views/3d/webgl-engine/Stage.js +1 -1
  196. package/views/3d/webgl-engine/effects/RenderPluginInput.js +1 -1
  197. package/views/3d/webgl-engine/effects/blit/Blit.js +5 -0
  198. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  199. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  200. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  201. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  202. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  203. package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
  204. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  205. package/views/3d/webgl-engine/lib/RenderSlot.js +1 -1
  206. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  207. package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
  208. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  209. package/views/3d/webgl-engine/lib/TextTextureFactory.js +1 -1
  210. package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
  211. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  212. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  213. package/views/3d/webgl-engine/lib/edgeRendering/edgeProcessing.js +1 -1
  214. package/views/View.js +1 -1
  215. package/views/interactive/tooltip/TooltipContentWithHelpMessage.js +1 -1
  216. package/views/interactive/tooltip/TooltipEditableField.js +1 -1
  217. package/views/interactive/tooltip/constraintUtils.js +1 -1
  218. package/views/interactive/tooltip/content/Fields.js +1 -1
  219. package/views/interactive/tooltip/content/TooltipContentDrawCircle.js +1 -1
  220. package/views/interactive/tooltip/content/TooltipContentDrawMesh.js +1 -1
  221. package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
  222. package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
  223. package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
  224. package/views/interactive/tooltip/content/TooltipContentDrawRectangle.js +1 -1
  225. package/views/interactive/tooltip/content/TooltipContentExtentRotate.js +1 -1
  226. package/views/interactive/tooltip/content/TooltipContentExtentScale.js +1 -1
  227. package/views/interactive/tooltip/content/TooltipContentReshapeEdgeOffset.js +1 -1
  228. package/views/interactive/tooltip/content/TooltipContentTransformAbsolute.js +1 -1
  229. package/views/interactive/tooltip/content/TooltipContentTransformRotate.js +1 -1
  230. package/views/interactive/tooltip/content/TooltipContentTransformScale.js +1 -1
  231. package/views/interactive/tooltip/content/TooltipContentTranslateGraphic.js +1 -1
  232. package/views/interactive/tooltip/content/TooltipContentTranslateGraphicXY.js +1 -1
  233. package/views/interactive/tooltip/content/TooltipContentTranslateGraphicZ.js +1 -1
  234. package/views/interactive/tooltip/content/TooltipContentTranslateVertex.js +1 -1
  235. package/views/interactive/tooltip/content/TooltipContentTranslateVertexXY.js +1 -1
  236. package/views/interactive/tooltip/content/TooltipContentTranslateVertexZ.js +1 -1
  237. package/views/support/angularMeasurementUtils.js +1 -1
  238. package/views/ui/UI.js +1 -1
  239. package/views/webgl/ShaderTranspiler.js +1 -1
  240. package/views/webgl/Texture.js +1 -1
  241. package/views/webgl/contextUtils.js +1 -1
  242. package/webmap/InitialViewProperties.js +1 -1
  243. package/widgets/AreaMeasurement2D.js +1 -1
  244. package/widgets/AreaMeasurement3D.js +1 -1
  245. package/widgets/Attachments/AttachmentsViewModel.js +1 -1
  246. package/widgets/Attachments.js +1 -1
  247. package/widgets/Attribution.js +1 -1
  248. package/widgets/BasemapGallery.js +1 -1
  249. package/widgets/BasemapLayerList.js +1 -1
  250. package/widgets/BasemapToggle.js +1 -1
  251. package/widgets/Bookmarks.js +1 -1
  252. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesNode.js +1 -1
  253. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesTree.js +1 -1
  254. package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
  255. package/widgets/BuildingExplorer/BuildingLevelPicker/Label.js +1 -1
  256. package/widgets/BuildingExplorer/BuildingLevelPicker/LevelItem.js +1 -1
  257. package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
  258. package/widgets/BuildingExplorer.js +1 -1
  259. package/widgets/Compass.js +1 -1
  260. package/widgets/CoordinateConversion.js +1 -1
  261. package/widgets/Daylight/support/SliderWithDropdown.js +1 -1
  262. package/widgets/Daylight.js +1 -1
  263. package/widgets/DirectLineMeasurement3D.js +1 -1
  264. package/widgets/DirectionalPad.js +1 -1
  265. package/widgets/Directions/components/SaveLayer.js +1 -1
  266. package/widgets/Directions.js +1 -1
  267. package/widgets/DistanceMeasurement2D.js +1 -1
  268. package/widgets/Editor/components/FooterActions.js +1 -1
  269. package/widgets/Editor/components/Notices.js +1 -1
  270. package/widgets/Editor/components/PanelContent.js +1 -1
  271. package/widgets/Editor/components/PanelToolbar.js +1 -1
  272. package/widgets/Editor/components/Prompt.js +1 -1
  273. package/widgets/Editor/components/Settings.js +1 -1
  274. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  275. package/widgets/Editor/components/UploadDetails.js +1 -1
  276. package/widgets/Editor.js +1 -1
  277. package/widgets/ElevationProfile/components/LegendItem.js +1 -1
  278. package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
  279. package/widgets/ElevationProfile/components/Statistics.js +1 -1
  280. package/widgets/ElevationProfile.js +1 -1
  281. package/widgets/Expand.js +1 -1
  282. package/widgets/Feature/FeatureContent.js +1 -1
  283. package/widgets/Feature/FeatureExpression.js +1 -1
  284. package/widgets/Feature/FeatureFields.js +1 -1
  285. package/widgets/Feature/FeatureMedia.js +1 -1
  286. package/widgets/Feature/FeatureRelationship.js +1 -1
  287. package/widgets/Feature/FeatureViewModel.js +1 -1
  288. package/widgets/Feature/support/FeatureContentMixin.js +1 -1
  289. package/widgets/Feature/support/FeatureElementInfo.js +1 -1
  290. package/widgets/Feature.js +1 -1
  291. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  292. package/widgets/FeatureForm/GroupInput.js +1 -1
  293. package/widgets/FeatureForm/css.js +1 -1
  294. package/widgets/FeatureForm.js +1 -1
  295. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  296. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  297. package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
  298. package/widgets/FeatureTable.js +1 -1
  299. package/widgets/FeatureTemplates/ItemList.js +1 -1
  300. package/widgets/FeatureTemplates.js +1 -1
  301. package/widgets/Features/FeaturesRelatedRecords.js +1 -1
  302. package/widgets/Features.js +1 -1
  303. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  304. package/widgets/FloorFilter.js +1 -1
  305. package/widgets/Fullscreen.js +1 -1
  306. package/widgets/Histogram.js +1 -1
  307. package/widgets/HistogramRangeSlider.js +1 -1
  308. package/widgets/Home.js +1 -1
  309. package/widgets/LayerList/ListItemPanel.js +1 -1
  310. package/widgets/LayerList.js +1 -1
  311. package/widgets/Legend/LegendViewModel.js +1 -1
  312. package/widgets/Legend/styles/Card.js +1 -1
  313. package/widgets/Legend/styles/Classic.js +1 -1
  314. package/widgets/Legend/styles/support/relationshipUtils.js +1 -1
  315. package/widgets/Legend/styles/support/univariateUtils.js +1 -1
  316. package/widgets/LineOfSight.js +1 -1
  317. package/widgets/Locate.js +1 -1
  318. package/widgets/NavigationToggle.js +1 -1
  319. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  320. package/widgets/OrientedImageryViewer.js +1 -1
  321. package/widgets/Popup.js +1 -1
  322. package/widgets/Print.js +1 -1
  323. package/widgets/ScaleRangeSlider/scalePreviewUtils.js +1 -1
  324. package/widgets/ScaleRangeSlider.js +1 -1
  325. package/widgets/Search/SearchResultRenderer.js +1 -1
  326. package/widgets/Search.js +1 -1
  327. package/widgets/ShadowCast/components/DiscreteConfigurator.js +1 -1
  328. package/widgets/ShadowCast/components/DurationConfigurator.js +1 -1
  329. package/widgets/ShadowCast/components/ShadowTooltipContent.js +1 -1
  330. package/widgets/ShadowCast/components/ThresholdConfigurator.js +1 -1
  331. package/widgets/ShadowCast.js +1 -1
  332. package/widgets/Sketch.js +1 -1
  333. package/widgets/Slice.js +1 -1
  334. package/widgets/Slider.js +1 -1
  335. package/widgets/Swipe.js +1 -1
  336. package/widgets/TableList.js +1 -1
  337. package/widgets/TimeSlider.js +1 -1
  338. package/widgets/Track.js +1 -1
  339. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsLineSymbolPicker.js +1 -1
  340. package/widgets/UtilityNetworkAssociations.js +1 -1
  341. package/widgets/UtilityNetworkTrace.js +1 -1
  342. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  343. package/widgets/ValuePicker.js +1 -1
  344. package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
  345. package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
  346. package/widgets/VideoPlayer.js +1 -1
  347. package/widgets/Weather/LabeledSlider.js +1 -1
  348. package/widgets/Weather.js +1 -1
  349. package/widgets/Zoom/IconButton.js +1 -1
  350. package/widgets/smartMapping/BinaryColorSizeSlider.js +1 -1
  351. package/widgets/smartMapping/ClassedColorSlider.js +1 -1
  352. package/widgets/smartMapping/ClassedSizeSlider.js +1 -1
  353. package/widgets/smartMapping/ColorSizeSlider.js +1 -1
  354. package/widgets/smartMapping/ColorSlider.js +1 -1
  355. package/widgets/smartMapping/HeatmapSlider.js +1 -1
  356. package/widgets/smartMapping/OpacitySlider.js +1 -1
  357. package/widgets/smartMapping/SizeSlider.js +1 -1
  358. package/widgets/smartMapping/SmartMappingSliderBase.js +1 -1
  359. package/widgets/support/ColorPicker.js +1 -1
  360. package/widgets/support/DatePicker.js +1 -1
  361. package/widgets/support/Heading.js +1 -1
  362. package/widgets/support/LabeledSwitch.js +1 -1
  363. package/widgets/support/MeasurementWidgetContent.js +1 -1
  364. package/widgets/support/Popover.js +1 -1
  365. package/widgets/support/SelectionToolbar.js +1 -1
  366. package/widgets/support/SketchTooltipControls.js +1 -1
  367. package/widgets/support/SnappingControls.js +1 -1
  368. package/widgets/support/TimePicker.js +1 -1
  369. package/widgets/support/TimezonePicker.js +1 -1
  370. package/widgets/support/UnitSelect.js +1 -1
  371. package/widgets/support/dateUtils.js +1 -1
  372. package/assets/esri/core/workers/chunks/072b4e041b8630c513a0.js +0 -1
  373. package/assets/esri/core/workers/chunks/092920c25cac89c038ee.js +0 -1
  374. package/assets/esri/core/workers/chunks/114269dda1d296893908.js +0 -1
  375. package/assets/esri/core/workers/chunks/126df6237fc80608344e.js +0 -1
  376. package/assets/esri/core/workers/chunks/1b3655f5bf5d90fa8730.js +0 -1
  377. package/assets/esri/core/workers/chunks/1c83f47d446f2bca1721.js +0 -1
  378. package/assets/esri/core/workers/chunks/1cf7bb514e7eefc3e9c6.js +0 -1
  379. package/assets/esri/core/workers/chunks/21a9c8aa2a9e9990df41.js +0 -1
  380. package/assets/esri/core/workers/chunks/24629402c647ef6b5f6b.js +0 -1
  381. package/assets/esri/core/workers/chunks/2a1c1be9c202462cf54d.js +0 -1
  382. package/assets/esri/core/workers/chunks/2cb36f9686693234991a.js +0 -1
  383. package/assets/esri/core/workers/chunks/2d0d03cbea83c868edba.js +0 -1
  384. package/assets/esri/core/workers/chunks/2e130cb2f1038055c07b.js +0 -1
  385. package/assets/esri/core/workers/chunks/3619e04cbb6691549014.js +0 -1
  386. package/assets/esri/core/workers/chunks/3dbfb4f370a874393822.js +0 -1
  387. package/assets/esri/core/workers/chunks/406db5c90271a3a203d4.js +0 -1
  388. package/assets/esri/core/workers/chunks/4369a6c1e0a82ab4db6a.js +0 -1
  389. package/assets/esri/core/workers/chunks/4f4a424d1747d04501df.js +0 -1
  390. package/assets/esri/core/workers/chunks/59c00d6fba0fd1c03d01.js +0 -1
  391. package/assets/esri/core/workers/chunks/5a5720caa64a46daadf9.js +0 -1
  392. package/assets/esri/core/workers/chunks/5edb99b58549cd66b394.js +0 -1
  393. package/assets/esri/core/workers/chunks/6203ddf6caad3d356327.js +0 -1
  394. package/assets/esri/core/workers/chunks/650a317b6dc245a7060f.js +0 -1
  395. package/assets/esri/core/workers/chunks/7a358b1fd0c0cce59e9b.js +0 -1
  396. package/assets/esri/core/workers/chunks/83d1a1b3d371c991cc4c.js +0 -1
  397. package/assets/esri/core/workers/chunks/846b7a81b870c8b238a1.js +0 -1
  398. package/assets/esri/core/workers/chunks/8ab832468300cc4feb5a.js +0 -1
  399. package/assets/esri/core/workers/chunks/bc1dc6383e60e7e61d50.js +0 -1
  400. package/assets/esri/core/workers/chunks/bc6323bdc98013da6fe5.js +0 -1
  401. package/assets/esri/core/workers/chunks/c4bb67150ccd01ea6014.js +0 -1
  402. package/assets/esri/core/workers/chunks/c60cf62f374e71e562fc.js +0 -1
  403. package/assets/esri/core/workers/chunks/c6ea5aac232d1eca04dd.js +0 -1
  404. package/assets/esri/core/workers/chunks/c8438c2d9ac48afe4033.js +0 -1
  405. package/assets/esri/core/workers/chunks/c8f239c25fe864f0e47a.js +0 -1
  406. package/assets/esri/core/workers/chunks/cad260881653567bc8f9.js +0 -1
  407. package/assets/esri/core/workers/chunks/d824f4b405a72cd2fa74.js +0 -1
  408. package/assets/esri/core/workers/chunks/dd7508d4016715371e0c.js +0 -1
  409. package/assets/esri/core/workers/chunks/e55f7fc7eff0074ce0fc.js +0 -1
  410. package/assets/esri/core/workers/chunks/eef27d305023034084a4.js +0 -1
  411. package/assets/esri/core/workers/chunks/f38c54ada9e7012a2960.js +0 -1
  412. package/assets/esri/core/workers/chunks/f5e0ff5292b9fd18fc92.js +0 -1
  413. package/assets/esri/core/workers/chunks/f5eb8b5021620be7538e.js +0 -1
  414. package/core/watchUtils.d.ts +0 -4
  415. package/core/watchUtils.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.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../chunks/tslib.es6.js";import"../../../geometry.js";import{ClonableMixin as e}from"../../../core/Clonable.js";import r from"../../../core/Error.js";import{JSONSupport as a}from"../../../core/JSONSupport.js";import o from"../../../core/Logger.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import{cast as n}from"../../../core/accessorSupport/decorators/cast.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{reader as s}from"../../../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import u from"./cameraOrientationFactory.js";import{CameraOrientationType as l}from"../enums/CameraOrientationType.js";import m from"../../../geometry/Point.js";function c(t){throw new r("exposure-point:missing-default-value",`a value for ${t} is missing in default properties`)}function d(t,e){throw new r("exposure-point:missing-attribute-value",`a value for ${t} is missing in attribute table`,{exposurePoint:e})}let y=class extends(e(a)){constructor(t){super(t),this.cameraOrientation=null,this.elevation=null,this.elevationSource=null,this.name=null}read(t,e){const r={},{attributes:a}=t;for(const o in a)r[o.toLowerCase()]=a[o];super.read({...t,attributes:r},e)}readCameraHeading(t,e){const{attributes:r,layer:a}=e;return r.cameraheading??r.camheading??a.cameraHeading}readCameraHeight(t,e){const{attributes:r,layer:a}=e;return r.cameraheight??r.avghtag??a.cameraHeight}readCamOffset(t,e){const{attributes:r}=e;return r.cameraoffset?.split(";").map(Number)??r.camoffset?.split(";").map(Number)??null}readCameraOrientation(t,e){const{attributes:r}=e;return r.cameraorientation??r.camori}readCameraPitch(t,e){const{attributes:r,layer:a}=e;return r.camerapitch??r.campitch??a.cameraPitch}readCameraRoll(t,e){const{attributes:r,layer:a}=e;return r.cameraroll??r.camroll??a.cameraRoll}readDepthImage(t,e){const{attributes:r,layer:a}=e;let o=r.depthimage??r.depthimg??null;if(!o)return null;const{depthImagePathPrefix:i,depthImagePathSuffix:n}=a,s=i?.trim();s&&(o=`${s}/${o}`);const p=n?.trim();return p&&(o=`${o}/${p}`),o}readElevationSource(t,e){const{attributes:r,layer:a}=e;if(r.elevationsource){const t=this._parseIfJSON(r.elevationsource);if(!t)return null;let{url:e}=t;if(e){const{demPathSuffix:r,demPathPrefix:o}=a;return o?.trim()&&(e=o?.trim()+"/"+e),r?.trim()&&(e=e+"/"+r?.trim()),{...t,url:e}}return t}if(r.dem){let t=r.dem.trim();if(t){const{demPathSuffix:r,demPathPrefix:a}=e.layer;return a?.trim()&&(t=a?.trim()+"/"+t),r?.trim()&&(t=t+"/"+r?.trim()),{url:t}}}return a.effectiveElevationSource}readFarDistance(t,e){const{attributes:r,layer:a}=e;return r.fardistance??r.fardist??a.farDistance}readHFOV(t,e){const{attributes:r,layer:a}=e;return r.horizontalfieldofview??r.hfov??a.horizontalFieldOfView}readImageURL(t,e){const{attributes:r,layer:a}=e,{image:o}=r;o||d("image",this);const{imagePathPrefix:i,imagePathSuffix:n}=a;let s=o;const p=i?.trim();p&&(s=`${p.trim()}/${s}`);const u=n?.trim();return u&&(s=`${s}/${u.trim()}`),s}readImageRotation(t,e){const{attributes:r,layer:a}=e;return r.imagerotation??r.imgrot??a.imageRotation}get isHorizontal(){return"horizontal"===this.orientedImageryType}get isInspection(){return"inspection"===this.orientedImageryType}get isNadir(){return"nadir"===this.orientedImageryType}get isOblique(){return"oblique"===this.orientedImageryType}get isSpherical(){return"360"===this.orientedImageryType}get location(){const{cameraOrientation:t,geometry:e,cameraHeight:r,elevation:a}=this;if(t){const{type:e,x:r,y:a,z:o,horizontalWKID:i}=t;return new m({x:r,y:a,z:o,spatialReference:{wkid:e===l.LTP?4326:i}})}if(!r)throw c("cameraHeight");return e.z=(a??0)+r,e}readName(t,e){const{attributes:r}=e;return r.name}readNearDistance(t,e){const{attributes:r,layer:a}=e;return r.neardistance??r.neardist??a.nearDistance}readOrientationAccuracy(t,e){return e.attributes.orientationaccuracy?.split(";").map(Number)??e.attributes.accuracy?.split(";").map(Number)??null}readOIType(t,e){const{attributes:r,layer:a}=e,o=r.orientedimagerytype??r.oitype??a.orientedImageryType,i=r.camerapitch??r.campitch??a.cameraPitch,n=o.toLowerCase();return"oblique"===n?i<10?"nadir":"oblique":n}readSortOrder(t,e){return e.attributes.sortorder}readVFOV(t,e){const{attributes:r,layer:a}=e;return r.verticalfieldofview??r.vfov??a.verticalFieldOfView}_parseIfJSON(t){let e=null;try{e=JSON.parse(t)}catch(r){o.getLogger(this).error("couldn't parse the given elevation source JSON",t,r)}return e}};t([i({type:Date,json:{write:!0,name:"attributes.acquisitiondate"}})],y.prototype,"acquisitionDate",void 0),t([i({type:Number,json:{write:!0}})],y.prototype,"cameraHeading",void 0),t([s("cameraHeading",["attributes"])],y.prototype,"readCameraHeading",null),t([i({type:Number,json:{write:!0}})],y.prototype,"cameraHeight",void 0),t([s("cameraHeight",["attributes"])],y.prototype,"readCameraHeight",null),t([i({json:{write:!0}})],y.prototype,"cameraOffset",void 0),t([s("cameraOffset",["attributes"])],y.prototype,"readCamOffset",null),t([i({json:{write:!0}}),n((t=>t?u.getCameraOrientation(t):null))],y.prototype,"cameraOrientation",void 0),t([s("cameraOrientation",["attributes"])],y.prototype,"readCameraOrientation",null),t([i({type:Number,json:{write:!0}})],y.prototype,"cameraPitch",void 0),t([s("cameraPitch",["attributes"])],y.prototype,"readCameraPitch",null),t([i({type:Number,json:{write:!0}})],y.prototype,"cameraRoll",void 0),t([s("cameraRoll",["attributes"])],y.prototype,"readCameraRoll",null),t([i({json:{write:!0}})],y.prototype,"depthImage",void 0),t([s("depthImage",["attributes"])],y.prototype,"readDepthImage",null),t([i({type:Number,json:{write:!0}})],y.prototype,"elevation",void 0),t([i({json:{write:!0}})],y.prototype,"elevationSource",void 0),t([s("elevationSource",["attributes"])],y.prototype,"readElevationSource",null),t([i({json:{write:!0,name:"attributes.exposurestationid"}})],y.prototype,"exposureStationId",void 0),t([i({type:Number,json:{write:!0}})],y.prototype,"farDistance",void 0),t([s("farDistance",["attributes"])],y.prototype,"readFarDistance",null),t([i({type:m})],y.prototype,"geometry",void 0),t([i({type:Number,json:{write:!0}})],y.prototype,"horizontalFieldOfView",void 0),t([s("horizontalFieldOfView",["attributes"])],y.prototype,"readHFOV",null),t([i({json:{write:!0}})],y.prototype,"image",void 0),t([s("image",["attributes"])],y.prototype,"readImageURL",null),t([i({type:Number,json:{write:!0}})],y.prototype,"imageRotation",void 0),t([s("imageRotation",["attributes"])],y.prototype,"readImageRotation",null),t([i()],y.prototype,"isHorizontal",null),t([i()],y.prototype,"isInspection",null),t([i()],y.prototype,"isNadir",null),t([i()],y.prototype,"isOblique",null),t([i()],y.prototype,"isSpherical",null),t([i({json:{write:!0}})],y.prototype,"location",null),t([i({json:{write:!0}})],y.prototype,"name",void 0),t([s("name",["attributes"])],y.prototype,"readName",null),t([i({type:Number,json:{write:!0}})],y.prototype,"nearDistance",void 0),t([s("nearDistance",["attributes"])],y.prototype,"readNearDistance",null),t([i({json:{write:!0,name:"attributes.objectid"}})],y.prototype,"objectId",void 0),t([i({json:{write:!0}})],y.prototype,"orientationAccuracy",void 0),t([s("orientationAccuracy",["attributes"])],y.prototype,"readOrientationAccuracy",null),t([i({json:{write:!0}})],y.prototype,"orientedImageryType",void 0),t([s("orientedImageryType",["attributes"])],y.prototype,"readOIType",null),t([i({type:Number,json:{write:!0}})],y.prototype,"sortOrder",void 0),t([s("sortOrder",["attributes"])],y.prototype,"readSortOrder",null),t([i({type:Number,json:{write:!0}})],y.prototype,"verticalFieldOfView",void 0),t([s("verticalFieldOfView",["attributes"])],y.prototype,"readVFOV",null),y=t([p("esri.layers.orientedImagery.core.ExposurePoint")],y);const f=y;export{f as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../geometry.js";import{ClonableMixin as r}from"../../../core/Clonable.js";import t from"../../../core/Error.js";import{JSONSupport as a}from"../../../core/JSONSupport.js";import o from"../../../core/Logger.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import{cast as n}from"../../../core/accessorSupport/decorators/cast.js";import{enumeration as p}from"../../../core/accessorSupport/decorators/enumeration.js";import{reader as c}from"../../../core/accessorSupport/decorators/reader.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{writer as l}from"../../../core/accessorSupport/decorators/writer.js";import m from"./CameraOrientation.js";import y from"./cameraOrientationFactory.js";import{appendPrefixAndSuffix as u,getEffectiveElevationSource as d,orientedImageryTypeMap as f}from"./utils.js";import{CameraOrientationType as g}from"../enums/CameraOrientationType.js";import h from"../../../geometry/Point.js";function v(e){throw new t("exposure-point:missing-default-value",`a value for ${e} is missing in default properties`)}function O(e,r){throw new t("exposure-point:missing-attribute-value",`a value for ${e} is missing in attribute table`,{exposurePoint:r})}let w=class extends(r(a)){constructor(e){super(e),this.cameraOrientation=null,this.elevation=null,this.elevationSource=null,this.name=null}read(e,r){const t={},{attributes:a,layer:o,geometry:i}=e;for(const n in a)t[n.toLowerCase()]=a[n];super.read({geometry:i,layer:o??{},...t},r)}readCameraHeading(e,r){const{cameraheading:t,camheading:a,layer:o}=r;return t??a??o.cameraHeading}readCameraHeight(e,r){const{cameraheight:t,avghtag:a,layer:o}=r;return t??a??o.cameraHeight}readCamOffset(e,r){const{cameraoffset:t,camoffset:a}=r;return t?.split(";").map(Number)??a?.split(";").map(Number)??null}writeCameraOffset(e,r){e&&(r.cameraOffset=e.join(";"))}readCameraOrientation(e,r){const{cameraorientation:t,camori:a}=r;return t??a}readCameraPitch(e,r){const{camerapitch:t,campitch:a,layer:o}=r;return t??a??o.cameraPitch}readCameraRoll(e,r){const{cameraroll:t,camroll:a,layer:o}=r;return t??a??o.cameraRoll}readDepthImage(e,r){const{depthimage:t,depthimg:a,layer:o}=r,i=t??a??null,{depthImagePathPrefix:n,depthImagePathSuffix:p}=o??{};return u(i,n,p)}readElevationSource(e,r){const{elevationsource:t,layer:a}=r,{demPathSuffix:o,demPathPrefix:i}=a;if(t){const e=this._parseIfJSON(t);return d(e,i,o)}return a.effectiveElevationSource}readFarDistance(e,r){const{fardistance:t,fardist:a,layer:o}=r;return t??a??o.farDistance}readHFOV(e,r){const{horizontalfieldofview:t,hfov:a,layer:o}=r;return t??a??o.horizontalFieldOfView}readImageURL(e,r){const{imagepath:t,layer:a}=r;t||O("imagePath",this);const{imagePathPrefix:o,imagePathSuffix:i}=a;return u(t,o,i)}readImageRotation(e,r){const{imagerotation:t,imgrot:a,layer:o}=r;return t??a??o.imageRotation}get isHorizontal(){return"horizontal"===this.orientedImageryType}get isInspection(){return"inspection"===this.orientedImageryType}get isNadir(){return"nadir"===this.orientedImageryType}get isOblique(){return"oblique"===this.orientedImageryType}get isSpherical(){return"360"===this.orientedImageryType}get location(){const{cameraOrientation:e,geometry:r,cameraHeight:t,elevation:a}=this;if(e){const{type:r,x:t,y:a,z:o,horizontalWKID:i}=e;return new h({x:t,y:a,z:o,spatialReference:{wkid:r===g.LTP?4326:i}})}if("number"!=typeof t)throw v("cameraHeight");return r.z=(a??0)+t,r}readNearDistance(e,r){const{neardistance:t,neardist:a,layer:o}=r;return t??a??o.nearDistance}readOrientationAccuracy(e,r){const{accuracy:t,orientationaccuracy:a}=r;return a?.split(";").map(Number)??t?.split(";").map(Number)??null}writeOrientationAccuracy(e,r){e&&(r.orientationAccuracy=e.join(";"))}readOIType(e,r){const{orientedimagerytype:t,oitype:a,camerapitch:o,campitch:i,layer:n}=r,p=f.read(t??a??n.orientedImageryType),c=o??i??n.cameraPitch;return"oblique"===p?c<10?"nadir":"oblique":p}readVFOV(e,r){const{verticalfieldofview:t,vfov:a,layer:o}=r;return t??a??o.verticalFieldOfView}_parseIfJSON(e){let r=null;try{r=JSON.parse(e)}catch(t){o.getLogger(this).error("couldn't parse the given elevation source JSON",e,t)}return r}};e([i({type:Date,json:{write:{enabled:!0,target:"aquisitionDate"},name:"acquisitiondate"}})],w.prototype,"acquisitionDate",void 0),e([i({type:Number,json:{write:!0,read:{source:["cameraheading","camheading","layer.cameraHeading"]}}})],w.prototype,"cameraHeading",void 0),e([c("cameraHeading")],w.prototype,"readCameraHeading",null),e([i({type:Number,json:{write:!0}})],w.prototype,"cameraHeight",void 0),e([c("cameraHeight",["cameraheight","avghtag","layer.cameraHeight"])],w.prototype,"readCameraHeight",null),e([i()],w.prototype,"cameraOffset",void 0),e([c("cameraOffset",["cameraoffset","camoffset"])],w.prototype,"readCamOffset",null),e([l("cameraOffset")],w.prototype,"writeCameraOffset",null),e([i({json:{write:!0},type:m}),n((e=>e?y.getCameraOrientation(e):null))],w.prototype,"cameraOrientation",void 0),e([c("cameraOrientation",["cameraorientation","camori"])],w.prototype,"readCameraOrientation",null),e([i({type:Number,json:{write:!0}})],w.prototype,"cameraPitch",void 0),e([c("cameraPitch",["camerapitch","campitch","layer.cameraPitch"])],w.prototype,"readCameraPitch",null),e([i({type:Number,json:{write:!0}})],w.prototype,"cameraRoll",void 0),e([c("cameraRoll",["cameraroll","camroll","layer.cameraRoll"])],w.prototype,"readCameraRoll",null),e([i({json:{write:!0},type:String})],w.prototype,"depthImage",void 0),e([c("depthImage",["depthimage","depthimg"])],w.prototype,"readDepthImage",null),e([i({type:Number,json:{write:!0}})],w.prototype,"elevation",void 0),e([i({json:{write:!0}})],w.prototype,"elevationSource",void 0),e([c("elevationSource",["elevationsource","layer.effectiveElevationSource"])],w.prototype,"readElevationSource",null),e([i({json:{name:"exposurestationid",write:{target:"exposureStationId"}},type:String})],w.prototype,"exposureStationId",void 0),e([i({type:Number,json:{write:!0}})],w.prototype,"farDistance",void 0),e([c("farDistance",["fardistance","fardist","layer.farDistance"])],w.prototype,"readFarDistance",null),e([i({type:h,json:{name:"geometry"}})],w.prototype,"geometry",void 0),e([i({type:Number,json:{write:!0}})],w.prototype,"horizontalFieldOfView",void 0),e([c("horizontalFieldOfView",["horizontalfieldofview","hfov","layer.horizontalFieldOfView"])],w.prototype,"readHFOV",null),e([i({json:{write:!0},type:String})],w.prototype,"imagePath",void 0),e([c("imagePath",["imagepath"])],w.prototype,"readImageURL",null),e([i({type:Number,json:{write:!0}})],w.prototype,"imageRotation",void 0),e([c("imageRotation",["imagerotation","imgrot","layer.imageRotation"])],w.prototype,"readImageRotation",null),e([i()],w.prototype,"isHorizontal",null),e([i()],w.prototype,"isInspection",null),e([i()],w.prototype,"isNadir",null),e([i()],w.prototype,"isOblique",null),e([i()],w.prototype,"isSpherical",null),e([i()],w.prototype,"location",null),e([i({json:{write:!0},type:String})],w.prototype,"name",void 0),e([i({type:Number,json:{write:!0}})],w.prototype,"nearDistance",void 0),e([c("nearDistance",["neardistance","neardist","layer.nearDistance"])],w.prototype,"readNearDistance",null),e([i({json:{write:!0,name:"objectid"},type:Number})],w.prototype,"objectId",void 0),e([i()],w.prototype,"orientationAccuracy",void 0),e([c("orientationAccuracy",["accuracy","orientationaccuracy"])],w.prototype,"readOrientationAccuracy",null),e([l("orientationAccuracy")],w.prototype,"writeOrientationAccuracy",null),e([p(f)],w.prototype,"orientedImageryType",void 0),e([c("orientedImageryType",["orientedimagerytype","oitype","layer.orientedImageryType"])],w.prototype,"readOIType",null),e([i({type:Number,json:{name:"sortorder",write:{target:"sortOrder"}}})],w.prototype,"sortOrder",void 0),e([i({type:Number,json:{write:!0}})],w.prototype,"verticalFieldOfView",void 0),e([c("verticalFieldOfView",["verticalfieldofview","vfov","layer.verticalFieldOfView"])],w.prototype,"readVFOV",null),w=e([s("esri.layers.orientedImagery.core.ExposurePoint")],w);const j=w;export{j 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.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../chunks/tslib.es6.js";import"../../../core/Logger.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/Error.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import e from"./CameraOrientationHPR.js";import i from"./CameraOrientationLTP.js";import o from"./CameraOrientationOPK.js";import n from"./CameraOrientationYPR.js";import{CameraOrientationType as s}from"../enums/CameraOrientationType.js";const a=new Map;a.set(`${s.OPK}`,{desc:"Using Omega Phi Kappa",constructor:o}),a.set(`${s.HPR}`,{desc:"Using Heading, Pitch and Roll",constructor:e}),a.set(`${s.YPR}`,{desc:"Using Yaw, Pitch and Roll",constructor:n}),a.set(`${s.LTP}`,{desc:"Using Latitude and Longitude",constructor:i});const c=new Map;function l(t){const[r,e,i,o,n,s,a,c,l,f,p,u,m,g,d,P,h,y,O,j,C,D,K]=t;return{type:r,horizontalWKID:e,verticalWKID:i,x:o,y:n,z:s,omega:a,phi:c,kappa:l,affineTransformations:[f,p,u,m,g,d],focalLength:P,principalOffsetPoint:[h,y],radialDistortionCoefficients:[O,j,C],tangentialDistortionCoefficients:[D,K]}}function f(t){const[r,e,i,o,n,s,a,c,l,f,p,u,m,g,d,P,h,y,O,j,C,D,K]=t;return{type:r,horizontalWKID:e,verticalWKID:i,x:o,y:n,z:s,heading:a,pitch:c,roll:l,affineTransformations:[f,p,u,m,g,d],focalLength:P,principalOffsetPoint:[h,y],radialDistortionCoefficients:[O,j,C],tangentialDistortionCoefficients:[D,K]}}function p(t){const[r,e,i,o,n,s,a,c,l,f,p,u,m,g,d,P,h,y,O,j,C,D,K]=t;return{type:r,horizontalWKID:e,verticalWKID:i,x:o,y:n,z:s,yaw:a,pitch:c,roll:l,affineTransformations:[f,p,u,m,g,d],focalLength:P,principalOffsetPoint:[h,y],radialDistortionCoefficients:[O,j,C],tangentialDistortionCoefficients:[D,K]}}function u(t){const[r,e,i,o,n,s,...a]=t,l=c.get(s);if(!l)return null;return{type:r,latitude:e,longitude:i,ellipsoidRadius:o,squaredEccentricity:n,properties:l([s,"",...a])}}c.set(`${s.HPR}`,f),c.set(`${s.YPR}`,p),c.set(`${s.OPK}`,l),c.set(`${s.LTP}`,u);let m=class{static getCameraOrientation(t){if(!t)return null;const r=t.split("|");if(0===r.length)return null;const e=a.get(r[0]);if(!e)return null;const i=e.constructor,o=c.get(r[0]);return o?new i(o(r)):null}static register(t,r,e){a.set(t,{desc:r,constructor:e})}};m=t([r("esri.layers.orientedImagery.core.cameraOrientationFactory")],m);const g=m;export{g as default};
5
+ import{_ as r}from"../../../chunks/tslib.es6.js";import"../../../core/Logger.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/Error.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{createCameraOrientation as o,cameraOrientationRegistry as t}from"./utils.js";let e=class{static getCameraOrientation(r){return o(r)}static register(r,s,o){t.set(r,{desc:s,constructor:o})}};e=r([s("esri.layers.orientedImagery.core.cameraOrientationFactory")],e);const c=e;export{c as default};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
+ */
5
+ import{JSONMap as t}from"../../../core/jsonMap.js";import n from"./CameraOrientationHPR.js";import i from"./CameraOrientationOPK.js";import e from"./CameraOrientationYPR.js";import{ElevationSource as o,isConstantElevation as r,ConstantElevation as s}from"./ElevationSourceDefinitions.js";import{CameraOrientationType as a}from"../enums/CameraOrientationType.js";function c(t,n,i){return n&&(t=`${n}/${t}`),i&&(t+=`/${i}`),t}function l(t,n,i){let{url:e}=t;return e?(e=c(e,n,i),new o({...t,url:e})):null}function f(t,n,i){return t?r(t)?new s(t):l(t,n,i):t}const u=new t({Minutes:"minutes",Hours:"hours",Days:"days",Weeks:"weeks",Months:"months",Years:"years"}),p=new t({360:"360",Horizontal:"horizontal",Inspection:"inspection",Nadir:"nadir",Oblique:"oblique","":null}),m=new Map;m.set(`${a.OPK}`,{desc:"Using Omega Phi Kappa",constructor:i}),m.set(`${a.HPR}`,{desc:"Using Heading, Pitch and Roll",constructor:n}),m.set(`${a.YPR}`,{desc:"Using Yaw, Pitch and Roll",constructor:e});const d=new Map;function g(t){const[n,i,e,o,r,s,a,c,l,f,u,p,m,d,g,h,P,D,y,O,$,w,C]=t;return{type:n,horizontalWKID:i,verticalWKID:e,x:o,y:r,z:s,omega:a,phi:c,kappa:l,affineTransformations:[f,u,p,m,d,g],focalLength:h,principalOffsetPoint:[P,D],radialDistortionCoefficients:[y,O,$],tangentialDistortionCoefficients:[w,C]}}function h(t){const[n,i,e,o,r,s,a,c,l,f,u,p,m,d,g,h,P,D,y,O,$,w,C]=t;return{type:n,horizontalWKID:i,verticalWKID:e,x:o,y:r,z:s,heading:a,pitch:c,roll:l,affineTransformations:[f,u,p,m,d,g],focalLength:h,principalOffsetPoint:[P,D],radialDistortionCoefficients:[y,O,$],tangentialDistortionCoefficients:[w,C]}}function P(t){const[n,i,e,o,r,s,a,c,l,f,u,p,m,d,g,h,P,D,y,O,$,w,C]=t;return{type:n,horizontalWKID:i,verticalWKID:e,x:o,y:r,z:s,yaw:a,pitch:c,roll:l,affineTransformations:[f,u,p,m,d,g],focalLength:h,principalOffsetPoint:[P,D],radialDistortionCoefficients:[y,O,$],tangentialDistortionCoefficients:[w,C]}}function D(t){const[n,i,e,o,r,s,...a]=t,c=d.get(s);if(!c)return null;return{type:n,latitude:i,longitude:e,ellipsoidRadius:o,squaredEccentricity:r,properties:c([s,"",...a])}}function y(t){if(!t)return null;const n=`${t}`.split("|");if(0===n.length)return null;const i=m.get(n[0]);if(!i)return null;const e=d.get(n[0]);if(!e)return null;return new(0,i.constructor)(e(n))}d.set(`${a.HPR}`,h),d.set(`${a.YPR}`,P),d.set(`${a.OPK}`,g),d.set(`${a.LTP}`,D);export{c as appendPrefixAndSuffix,m as cameraOrientationRegistry,y as createCameraOrientation,f as getEffectiveElevationSource,p as orientedImageryTypeMap,l as processElevationSource,u as timeIntervalUnitTypeMap,d as transformersRegistry};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Error.js";import{j as t}from"../../../chunks/mat3.js";import a from"../../../geometry/Point.js";import{project as r}from"../../../geometry/projection.js";import{geographicToWebMercator as i}from"../../../geometry/support/webMercatorUtils.js";import n from"../../ElevationLayer.js";import{calculateRotationMatrix as o,geographicToLTP as s}from"./utils.js";function c(e){return"esri.Graphic"===e?.declaredClass}const l=Math.PI/180;async function m(e,t,r=!1){if(!e)return[];e=e.map((e=>"esri.geometry.Point"===e.declaredClass?e:a.fromJSON(e)));const{feature:i}=t,{attributes:n}=i;if(isNaN(parseFloat(n.elevation))){const e=await u([i.geometry],t);i.attributes.elevation=e[0].z}return u(e,t,r).then((e=>p(e,t)))}async function u(e,t,a=!1){if(a)return e;const{feature:i,options:o,currentCoveragePolygon:s}=t,l=i.attributes.elevationSource;if(!l?.url&&!l?.constantElevation)return e;const{url:m,constantElevation:u}=l;if(u)return f(e,u);if(!i.elevationSample){const e=c(s)?s.geometry?.extent:s.extent;if(e){const t=e.clone(),a=new n(m);t.xmin/=2,t.xmax*=2,t.ymin/=2,t.ymax*=2,i.elevationSample=await a.createElevationSampler(t,o),a.destroy()}}return Promise.all(e.map((async e=>{e.z=1;const t=i.elevationSample?.queryElevation(r(e,i.elevationSample.spatialReference));return t?.z&&(e.z=t.z),e})))}function f(e,t){return e.map((e=>(e.z=t,e)))}function p(e,t){const{attributes:a}=t.feature;return a.isSpherical||360===a.horizontalFieldOfView?{}:a.cameraOrientation?.isAdvanced?d(e,t):Promise.resolve(y(e,t))}function y(e,r){const{feature:n,imageProperties:c}=r,{width:m,height:u}=c,{attributes:f}=n,p=o("HPR",[f.cameraHeading,f.cameraPitch,f.cameraRoll]),y=Math.sin(f.imageRotation??0*l),d=Math.cos(f.imageRotation??0*l),h=m??1,g=u??1,v=[Math.abs(d*h+y*g),Math.abs(d*g-y*h)],w={horizontal:1/(2*Math.tan(f.horizontalFieldOfView*l/2)),vertical:1/(2*Math.tan(f.verticalFieldOfView*l/2))},x=[-w.horizontal,0,.5,0,w.vertical,.5,0,0,1];let M=new a(f.geometry);M.spatialReference.isWGS84&&4!==f.cameraOrientation?.type&&(M=i(M));const P=M.spatialReference.isWebMercator?1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*M.y/6378137))):1,R=t(new Array(9),p,x);return e.map((e=>{let t=new a(e);if(t.spatialReference.isWGS84)if(4===f.cameraOrientation?.type){const e=f.cameraOrientation;t=new a(s(t,[e.latitude,e.longitude,e.ellipsoidRadius,e.squaredEccentricity]))}else t=new a(i(t));const r=(t.z??0)-(M.z??0),n=(t.x-M.x)/P,o=(t.y-M.y)/P,c=(R[0]*n+R[1]*o+R[2]*r)/(R[6]*n+R[7]*o+R[8]*r),l=(R[3]*n+R[4]*o+R[5]*r)/(R[6]*n+R[7]*o+R[8]*r),m={x:c*v[0],y:l*v[1]};return{x:d*(m.x-v[0]/2)+y*(m.y-v[1]/2)+h/2,y:-y*(m.x-v[0]/2)+d*(m.y-v[1]/2)+g/2}}))}function d(t,n){const{feature:c}=n,{attributes:l}=c,m=l.cameraOrientation;if(!m)throw new e("groundToImageUtils:missing-camera-orientation-parameters","CameraOrientation Parameters are required to perform advanced transformations");let u=new a(l.location);u.spatialReference.isWGS84&&4!==l.cameraOrientation?.type&&(u=i(u));const f=u.spatialReference.isWebMercator?1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*u.y/6378137))):1;let p;if("esri.layers.orientedImagery.core.CameraOrientationOPK"===m.declaredClass){const{omega:e,phi:t,kappa:a}=m;p=o("OPK",[e,t,a])}else{const{cameraHeading:e,cameraPitch:t,cameraRoll:a}=l;p=o("HPR",[e,t,a])}const{principalOffsetPoint:y,focalLength:d,radialDistortionCoefficients:h,affineTransformations:g,tangentialDistortionCoefficients:v}=m;return Promise.all(t.map((e=>{let t;return e.spatialReference.equals(u.spatialReference)?(t=new a(e),n(t)):(t=r(e,u.spatialReference),t?n(t):null);function n(e){if(e.spatialReference.isWGS84)if(4===l.cameraOrientation?.type){const t=l.cameraOrientation;e=new a(s(e,[t.latitude,t.longitude,t.ellipsoidRadius,t.squaredEccentricity]))}else e=new a(i(e));const t=(e.z??0)-(u.z??0),r=(e.x-u.x)/f,n=(e.y-u.y)/f,o=(p[0]*r+p[1]*n+p[2]*t)/(p[6]*r+p[7]*n+p[8]*t),c=(p[3]*r+p[4]*n+p[5]*t)/(p[6]*r+p[7]*n+p[8]*t),m=o**2+c**2;let w=0,x=0,M=0,P=0,R=0,b=0,O=0;h&&(w=h[0]??0,x=h[1]??0,M=h[2]??0),v&&(P=v[0],R=v[1]),y&&(b=y[0]??0,O=y[1]??0);const z=1+(w||0)*m+(x||0)*m*m+(M||0)*m*m*m;let S=o*z+(P||0)*(m+2*o**2)+2*(R||0)*o*c,j=c*z+(R||0)*(m+2*c**2)+2*(P||0)*o*c;S=-(d??0)*S+b,j=-(d??0)*j+O;return{x:Number(g[0])+Number(g[1])*S+Number(g[2])*j,y:Number(g[3])+Number(g[4])*S+Number(g[5])*j}}})))}export{m as transformPoints,u as updateElevation};
5
+ import e from"../../../core/Error.js";import t from"../../../core/Logger.js";import{isAbortError as a}from"../../../core/promiseUtils.js";import{j as r}from"../../../chunks/mat3.js";import i from"../../../geometry/Point.js";import{project as n}from"../../../geometry/projection.js";import{geographicToWebMercator as o}from"../../../geometry/support/webMercatorUtils.js";import s from"../../ElevationLayer.js";import{isConstantElevation as c}from"../core/ElevationSourceDefinitions.js";import{calculateRotationMatrix as l,geographicToLTP as m}from"./utils.js";function u(e){return"esri.Graphic"===e?.declaredClass}const f=Math.PI/180;async function p(e,t,a=!1){if(!e)return[];e=e.map((e=>"esri.geometry.Point"===e.declaredClass?e:i.fromJSON(e)));const{feature:r}=t,{attributes:n}=r;if(isNaN(parseFloat(n.elevation))){const e=await d([r.geometry],t);r.attributes.elevation=e[0].z}return d(e,t,a).then((e=>h(e,t)))}async function d(e,r,i=!1){if(i)return e;const{feature:n,options:o,currentCoveragePolygon:l}=r,m=n.attributes.elevationSource;if(!m)return e;if(c(m)){const{constantElevation:t}=m;return"number"!=typeof t?e:g(e,t)}const{url:f}=m;if(!f)return e;const{elevationSample:p}=n;if(!p){const r=u(l)?l.geometry?.extent:l.extent;if(!r)return e;const i=r.clone();i.xmin/=2,i.xmax*=2,i.ymin/=2,i.ymax*=2;const c=new s(f);let m=e;try{await c.load(),n.elevationSample=await c.createElevationSampler(i,o),m=e.map(y(n.elevationSample))}catch(d){a(d)||t.getLogger("esri.layers.orientedImagery.transformations.groundToImageUtils").warn(`#updateElevation() failed to update elevation using the provided elevation source URL: ${f}. Please provide a valid elevation source url.`,d)}finally{c.destroy()}return m}return e.map(y(p))}function y(e){return t=>{t.z=1;const a=e.queryElevation(n(t,e.spatialReference));return a?.z&&(t.z=a.z),t}}function g(e,t){return e.map((e=>(e.z=t,e)))}function h(e,t){const{attributes:a}=t.feature;return a.isSpherical||360===a.horizontalFieldOfView?{}:a.cameraOrientation?.isAdvanced?w(e,t):Promise.resolve(v(e,t))}function v(e,t){const{feature:a,imageProperties:n}=t,{width:s,height:c}=n,{attributes:u}=a,p=l("HPR",[u.cameraHeading,u.cameraPitch,u.cameraRoll]),d=Math.sin(u.imageRotation??0*f),y=Math.cos(u.imageRotation??0*f),g=s??1,h=c??1,v=[Math.abs(y*g+d*h),Math.abs(y*h-d*g)],w={horizontal:1/(2*Math.tan(u.horizontalFieldOfView*f/2)),vertical:1/(2*Math.tan(u.verticalFieldOfView*f/2))},R=[-w.horizontal,0,.5,0,w.vertical,.5,0,0,1];let b=new i(u.geometry);b.spatialReference.isWGS84&&4!==u.cameraOrientation?.type&&(b=o(b));const x=b.spatialReference.isWebMercator?1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*b.y/6378137))):1,M=r(new Array(9),p,R);return e.map((e=>{let t=new i(e);if(t.spatialReference.isWGS84)if(4===u.cameraOrientation?.type){const e=u.cameraOrientation;t=new i(m(t,[e.latitude,e.longitude,e.ellipsoidRadius,e.squaredEccentricity]))}else t=new i(o(t));const a=(t.z??0)-(b.z??0),r=(t.x-b.x)/x,n=(t.y-b.y)/x,s=(M[0]*r+M[1]*n+M[2]*a)/(M[6]*r+M[7]*n+M[8]*a),c=(M[3]*r+M[4]*n+M[5]*a)/(M[6]*r+M[7]*n+M[8]*a),l={x:s*v[0],y:c*v[1]};return{x:y*(l.x-v[0]/2)+d*(l.y-v[1]/2)+g/2,y:-d*(l.x-v[0]/2)+y*(l.y-v[1]/2)+h/2}}))}function w(t,a){const{feature:r}=a,{attributes:s}=r,c=s.cameraOrientation;if(!c)throw new e("groundToImageUtils:missing-camera-orientation-parameters","CameraOrientation Parameters are required to perform advanced transformations");let u=new i(s.location);u.spatialReference.isWGS84&&4!==s.cameraOrientation?.type&&(u=o(u));const f=u.spatialReference.isWebMercator?1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*u.y/6378137))):1;let p;if("esri.layers.orientedImagery.core.CameraOrientationOPK"===c.declaredClass){const{omega:e,phi:t,kappa:a}=c;p=l("OPK",[e,t,a])}else{const{cameraHeading:e,cameraPitch:t,cameraRoll:a}=s;p=l("HPR",[e,t,a])}const{principalOffsetPoint:d,focalLength:y,radialDistortionCoefficients:g,affineTransformations:h,tangentialDistortionCoefficients:v}=c;return Promise.all(t.map((e=>{let t;return e.spatialReference.equals(u.spatialReference)?(t=new i(e),a(t)):(t=n(e,u.spatialReference),t?a(t):null);function a(e){if(e.spatialReference.isWGS84)if(4===s.cameraOrientation?.type){const t=s.cameraOrientation;e=new i(m(e,[t.latitude,t.longitude,t.ellipsoidRadius,t.squaredEccentricity]))}else e=new i(o(e));const t=(e.z??0)-(u.z??0),a=(e.x-u.x)/f,r=(e.y-u.y)/f,n=(p[0]*a+p[1]*r+p[2]*t)/(p[6]*a+p[7]*r+p[8]*t),c=(p[3]*a+p[4]*r+p[5]*t)/(p[6]*a+p[7]*r+p[8]*t),l=n**2+c**2;let w=0,R=0,b=0,x=0,M=0,P=0,O=0;g&&(w=g[0]??0,R=g[1]??0,b=g[2]??0),v&&(x=v[0],M=v[1]),d&&(P=d[0]??0,O=d[1]??0);const z=1+(w||0)*l+(R||0)*l*l+(b||0)*l*l*l;let j=n*z+(x||0)*(l+2*n**2)+2*(M||0)*n*c,S=c*z+(M||0)*(l+2*c**2)+2*(x||0)*n*c;j=-(y??0)*j+P,S=-(y??0)*S+O;return{x:Number(h[0])+Number(h[1])*j+Number(h[2])*S,y:Number(h[3])+Number(h[4])*j+Number(h[5])*S}}})))}export{p as transformPoints,d as updateElevation};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../core/Logger.js";import i from"./Field.js";import t from"./FieldsIndex.js";import{fixFields as r}from"./fieldUtils.js";function s(){return{fields:{type:[i],value:null},fieldsIndex:{readOnly:!0,get(){return new t(this.fields||[])}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const i=this._userOutFields;if(!i||!i.length)return null;if(i.includes("*"))return["*"];if(!this.fields)return i;for(const t of i){const r=this.fieldsIndex?.has(t);r||e.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:i})}return r(this.fieldsIndex,i)}}}}export{s as defineFieldProperties};
5
+ import has from"../../core/has.js";import e from"../../core/Logger.js";import i from"./Field.js";import r from"./FieldsIndex.js";import{fixFields as t}from"./fieldUtils.js";function s(){return{fields:{type:[i],value:null,set:function(i){if(has("big-integer-warning-enabled"))for(const r of i??[])("big-integer"===r.type||"oid"===r.type&&r.length>=8)&&e.getLogger("esri.layers.support.fieldProperties").warnOnce("field-attributes-layer:big-integer-field",`Layer references a big-integer field '${r.name}', support for which is currently experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} are supported. Integers larger than this value may result in degraded performance or broken functionality. Disable this warning message by setting the esriConfig flag big-integer-warning-enabled to false.`,{layer:this,field:r});this._set("fields",i)}},fieldsIndex:{readOnly:!0,get(){return new r(this.fields??[])}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const i=this._userOutFields;if(!i||!i.length)return null;if(i.includes("*"))return["*"];if(!this.fields)return i;for(const r of i){const t=this.fieldsIndex?.has(r);t||e.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${r} found in outFields`,{layer:this,outFields:i})}return t(this.fieldsIndex,i)}}}}export{s as defineFieldProperties};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../core/Error.js";import{getDeepValue as n,setDeepValue as i}from"../../core/object.js";import{union as t}from"../../core/SetUtils.js";import{parseWhereClause as r}from"../../core/sql.js";import{validateDomainValue as l,getDomainRange as o,DomainValidationError as s}from"./domainUtils.js";import{loadArcade as a}from"../../support/arcadeOnDemand.js";const u=/^([0-9_])/,f=/[^a-z0-9_\u0080-\uffff]+/gi;function d(e){if(null==e)return null;return e.trim().replaceAll(f,"_").replace(u,"F$1")||null}const c=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],m=["field","normalizationField"];function p(e,n){if(null!=e&&null!=n)for(const i of Array.isArray(e)?e:[e])if(y(c,i,n),"visualVariables"in i&&i.visualVariables)for(const e of i.visualVariables)y(m,e,n)}function y(e,t,r){if(e)for(const l of e){const e=n(l,t),o=e&&"function"!=typeof e&&r.get(e);o&&i(l,o.name,t)}}function g(e,n){if(null!=e&&n?.fields?.length)if("startField"in e){const i=n.get(e.startField),t=n.get(e.endField);e.startField=i?.name??null,e.endField=t?.name??null}else{const i=n.get(e.startTimeField),t=n.get(e.endTimeField);e.startTimeField=i?.name??null,e.endTimeField=t?.name??null}}const F=new Set;function I(e,n){return e&&n?(F.clear(),b(F,e,n),Array.from(F).sort()):[]}function b(e,n,i){if(i)if(n?.fields?.length)if(i.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const t of i)x(e,n,t);else{if(i.includes("*"))return e.clear(),void e.add("*");for(const n of i)null!=n&&e.add(n)}}function x(e,n,i){if("string"==typeof i)if(n){const t=n.get(i);t&&e.add(t.name)}else e.add(i)}function T(e,n){return null==n||null==e?[]:n.includes("*")?(e.fields??[]).map((e=>e.name)):n}function w(e,n,i=1){if(!n||!e)return[];if(n.includes("*"))return["*"];const t=I(e,n);return t.length/e.fields.length>=i?["*"]:t}async function h(e,n,i){if(!i)return;const{arcadeUtils:t}=await a(),r=t.extractFieldNames(i,n?.fields?.map((e=>e.name)));for(const l of r)x(e,n,l)}async function _(n,i,t){if(t&&"1=1"!==t){const l=await r(t,i);if(!l.isStandardized)throw new e("fieldUtils:collectFilterFields","Where clause is not standardized",{where:t});b(n,i,l.fieldNames)}}function E({displayField:e,fields:n}){return e||(n&&n.length?A(n,"name-or-title")||A(n,"unique-identifier")||A(n,"type-or-category")||S(n):null)}function S(e){for(const n of e){if(!n||!n.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}function A(e,n){for(const i of e)if(i&&i.valueType&&i.valueType===n)return i.name;return null}async function v(e){if(!e)return[];const n=new Set;return await $(n,e),Array.from(n).sort()}async function $(e,n){if(!n)return;const i=n.elevationInfo?.featureExpressionInfo;return i?i.collectRequiredFields(e,n.fieldsIndex):void 0}function N(e,n,i){i.onStatisticExpression?h(e,n,i.onStatisticExpression.expression):e.add(i.onStatisticField)}async function L(e,n,i){if(!n||!i||!("fields"in i))return;const t=[],r=i.popupTemplate;t.push(D(e,n,r)),i.fields&&t.push(...i.fields.map((async i=>N(e,n.fieldsIndex,i)))),await Promise.all(t)}async function D(e,n,i){const t=[];i?.expressionInfos&&t.push(...i.expressionInfos.map((i=>h(e,n.fieldsIndex,i.expression))));const r=i?.content;if(Array.isArray(r))for(const l of r)"expression"===l.type&&l.expressionInfo&&t.push(h(e,n.fieldsIndex,l.expressionInfo.expression));await Promise.all(t)}async function O(e,n,i){n&&(n.timeInfo&&null!=i&&i.timeExtent&&b(e,n.fieldsIndex,[n.timeInfo.startField,n.timeInfo.endField]),n.floorInfo&&b(e,n.fieldsIndex,[n.floorInfo.floorField]),null!=i&&null!=i.where&&await _(e,n.fieldsIndex,i.where))}async function V(e,n,i){n&&i&&await Promise.all(i.map((i=>j(e,n,i))))}async function j(e,n,i){n&&i&&(i.valueExpression?await h(e,n.fieldsIndex,i.valueExpression):i.field&&x(e,n.fieldsIndex,i.field))}async function U(e){if(!e)return[];const n="timeInfo"in e&&e.timeInfo;return n?I(e.fieldsIndex,[e.trackIdField,n.startField,n.endField]):[]}function C(e){return e?I(e.fieldsIndex,M(e)):[]}function R(e){if(!e)return[];const n=e.geometryFieldsInfo;return n?I(e.fieldsIndex,[n.shapeAreaField,n.shapeLengthField]):[]}const k=["oid","global-id","guid"],z=["oid","global-id"],P=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i];function G(e){const n=new Set;B(e).forEach((e=>n.add(e))),R(e).forEach((e=>n.add(e.toLowerCase())));const i=e&&"infoFor3D"in e?e.infoFor3D:void 0;return i&&(Object.values(i.assetMapFieldRoles).forEach((e=>n.add(e.toLowerCase()))),Object.values(i.transformFieldRoles).forEach((e=>n.add(e.toLowerCase())))),Array.from(n)}function M(e){if(!e)return[];const n="editFieldsInfo"in e&&e.editFieldsInfo;if(!n)return[];const{creationDateField:i,creatorField:t,editDateField:r,editorField:l}=n;return[i,t,r,l].filter(Boolean)}function B(e){return M(e).map((e=>e.toLowerCase()))}function X(e,n){return e.editable&&!k.includes(e.type)&&!B(n).includes(e.name?.toLowerCase()??"")}function q(e,n){const i=e.name?.toLowerCase()??"";return!(null!=n?.objectIdField&&i===n.objectIdField.toLowerCase()||null!=n?.globalIdField&&i===n.globalIdField.toLowerCase()||G(n).includes(i)||z.includes(e.type)||P.some((e=>e.test(i))))}async function Y(e){if(!e)return[];const n=new Set;return await J(n,e),Array.from(n).sort()}async function J(e,n){const{labelingInfo:i,fieldsIndex:t}=n;i&&i.length&&await Promise.all(i.map((n=>W(e,t,n))))}async function W(e,n,i){if(!i)return;const t=i.getLabelExpression(),r=i.where;if("arcade"===t.type)await h(e,n,t.expression);else{const i=t.expression.match(/{[^}]*}/g);i&&i.forEach((i=>{x(e,n,i.slice(1,-1))}))}await _(e,n,r)}function H(e){const n=e.defaultValue;return void 0!==n&&re(e,n)?n:e.nullable?null:void 0}function K(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function Q(e){return null===e||K(e)}const Z="isInteger"in Number?Number.isInteger:e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e;function ee(e){return null===e||Z(e)}function ne(e){return null!=e&&"string"==typeof e}function ie(e){return null===e||ne(e)}function te(){return!0}function re(e,n){let i;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":i=e.nullable?ee:Z;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":i=e.nullable?Q:K;break;case"string":case"esriFieldTypeString":i=e.nullable?ie:ne;break;default:i=te}return 1===arguments.length?i:i(n)}const le=["integer","small-integer","big-integer"],oe=["single","double"],se=[...le,...oe],ae=["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger"],ue=["esriFieldTypeSingle","esriFieldTypeDouble"],fe=new Set([...le,...ae]),de=new Set([...oe,...ue]),ce=t(fe,de),me=["date","date-only","timestamp-offset"],pe=new Set([...me,"esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimestampOffset"]);function ye(e){return null!=e&&fe.has(e.type)}function ge(e){return null!=e&&ce.has(e.type)}function Fe(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function Ie(e){return null!=e&&pe.has(e.type)}function be(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function xe(e,n){return null===_e(e,n)}var Te,we;function he(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function _e(e,n){return null==e||e.nullable&&null===n?null:ge(e)&&!Ee(e.type,Number(n))?Te.OUT_OF_RANGE:re(e,n)?e.domain?l(e.domain,n):null:we.INVALID_TYPE}function Ee(e,n){const i="string"==typeof e?Ae(e):e;if(!i)return!1;const t=i.min,r=i.max;return i.isInteger?Z(n)&&n>=t&&n<=r:n>=t&&n<=r}function Se(e){const n=o(e.domain);return n||(ge(e)?Ae(e.type):void 0)}function Ae(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return $e;case"esriFieldTypeInteger":case"integer":return Ne;case"esriFieldTypeBigInteger":case"big-integer":return Le;case"esriFieldTypeSingle":case"single":return De;case"esriFieldTypeDouble":case"double":return Oe}}function ve(e){if(!K(e))return null;if(Z(e)){if(e>=$e.min&&e<=$e.max)return"esriFieldTypeSmallInteger";if(e>=Ne.min&&e<=Ne.max)return"esriFieldTypeInteger";if(e>=Le.min&&e<=Le.max)return"esriFieldTypeBigInteger"}return e>=De.min&&e<=De.max?"esriFieldTypeSingle":"esriFieldTypeDouble"}!function(e){e.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"}(Te||(Te={})),function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(we||(we={}));const $e={min:-32768,max:32767,isInteger:!0},Ne={min:-2147483648,max:2147483647,isInteger:!0},Le={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0},De={min:-34e37,max:12e37,isInteger:!1},Oe={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1};function Ve(e,n,i){switch(e){case s.INVALID_CODED_VALUE:return`Value ${i} is not in the coded domain - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case s.VALUE_OUT_OF_RANGE:return`Value ${i} is out of the range of valid values - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case we.INVALID_TYPE:return`Value ${i} is not a valid value for the field type - field: ${n.name}, type: ${n.type}, nullable: ${n.nullable}`;case Te.OUT_OF_RANGE:{const{min:e,max:t}=Ae(n.type);return`Value ${i} is out of range for the number type - field: ${n.name}, type: ${n.type}, value range is ${e} to ${t}`}}}function je(e,n){return!Ue(e,n,null)}function Ue(e,n,i){if(!n||!n.attributes||!e){if(null!=i)for(const n of e??[])i.add(n);return!0}const t=new Set(Object.keys(n.attributes));let r=!1;for(const l of e)if(!t.has(l)){if(r=!0,null==i)break;i.add(l)}return r}async function Ce(e,n){const i=new Set;for(const t of n)await h(i,e.fieldsIndex,t);return Array.from(i).sort()}function Re(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some((n=>e.toLowerCase().startsWith(n)))}export{Te as NumericRangeValidationError,we as TypeValidationError,Le as bigIntegerRange,h as collectArcadeFieldNames,$ as collectElevationFields,L as collectFeatureReductionFields,x as collectField,b as collectFields,O as collectFilterFields,J as collectLabelingFields,V as collectOrderByInfos,D as collectPopupTemplateFields,me as dateTypes,Oe as doubleRange,je as featureHasFields,I as fixFields,p as fixRendererFields,g as fixTimeInfoFields,ue as floatJSONTypes,oe as floatTypes,E as getDisplayFieldName,M as getEditTrackingFields,v as getElevationFields,Ce as getExpressionFields,C as getFeatureEditFields,R as getFeatureGeometryFields,H as getFieldDefaultValue,Se as getFieldRange,Y as getLabelingFields,G as getLowerCaseDefaultHiddenFields,B as getLowerCaseEditTrackingFields,ve as getNumericTypeForValue,U as getTimeFields,ae as integerJSONTypes,Ne as integerRange,le as integerTypes,Ie as isDateField,X as isFieldEditable,q as isFieldVisibleByDefault,ye as isIntegerField,Ee as isNumberInRange,ge as isNumericField,Re as isRasterPixelValueField,Fe as isStringField,be as isTimeOnlyField,xe as isValidFieldValue,re as isValueMatchingFieldType,d as normalizeFieldName,se as numericTypes,w as packFields,Ue as populateMissingFields,c as rendererFields,he as sanitizeNullFieldValue,De as singleRange,$e as smallIntegerRange,T as unpackFieldNames,_e as validateFieldValue,Ve as validationErrorToString,m as visualVariableFields};
5
+ import e from"../../core/Error.js";import{getDeepValue as n,setDeepValue as i}from"../../core/object.js";import{union as t}from"../../core/SetUtils.js";import{parseWhereClause as r}from"../../core/sql.js";import{validateDomainValue as l,getDomainRange as o,DomainValidationError as s}from"./domainUtils.js";import{loadArcade as a}from"../../support/arcadeOnDemand.js";const u=/^([0-9_])/,f=/[^a-z0-9_\u0080-\uffff]+/gi;function d(e){if(null==e)return null;return e.trim().replaceAll(f,"_").replace(u,"F$1")||null}const c=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],m=["field","normalizationField"];function p(e,n){if(null!=e&&null!=n)for(const i of Array.isArray(e)?e:[e])if(y(c,i,n),"visualVariables"in i&&i.visualVariables)for(const e of i.visualVariables)y(m,e,n)}function y(e,t,r){if(e)for(const l of e){const e=n(l,t),o=e&&"function"!=typeof e&&r.get(e);o&&i(l,o.name,t)}}function g(e,n){if(null!=e&&n?.fields?.length)if("startField"in e){const i=n.get(e.startField),t=n.get(e.endField);e.startField=i?.name??null,e.endField=t?.name??null}else{const i=n.get(e.startTimeField),t=n.get(e.endTimeField);e.startTimeField=i?.name??null,e.endTimeField=t?.name??null}}const F=new Set;function I(e,n){return e&&n?(F.clear(),b(F,e,n),Array.from(F).sort()):[]}function b(e,n,i){if(i)if(n?.fields?.length)if(i.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const t of i)x(e,n,t);else{if(i.includes("*"))return e.clear(),void e.add("*");for(const n of i)null!=n&&e.add(n)}}function x(e,n,i){if("string"==typeof i)if(n){const t=n.get(i);t&&e.add(t.name)}else e.add(i)}function T(e,n){return null==n||null==e?[]:n.includes("*")?(e.fields??[]).map((e=>e.name)):n}function w(e,n,i=1){if(!n||!e)return[];if(n.includes("*"))return["*"];const t=I(e,n);return t.length/e.fields.length>=i?["*"]:t}async function h(e,n,i){if(!i)return;const{arcadeUtils:t}=await a(),r=t.extractFieldNames(i,n?.fields?.map((e=>e.name)));for(const l of r)x(e,n,l)}async function S(n,i,t){if(t&&"1=1"!==t){const l=await r(t,i);if(!l.isStandardized)throw new e("fieldUtils:collectFilterFields","Where clause is not standardized",{where:t});b(n,i,l.fieldNames)}}function _({displayField:e,fields:n}){return e||(n&&n.length?A(n,"name-or-title")||A(n,"unique-identifier")||A(n,"type-or-category")||E(n):null)}function E(e){for(const n of e){if(!n||!n.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}function A(e,n){for(const i of e)if(i&&i.valueType&&i.valueType===n)return i.name;return null}async function v(e){if(!e)return[];const n=new Set;return await $(n,e),Array.from(n).sort()}async function $(e,n){if(!n)return;const i=n.elevationInfo?.featureExpressionInfo;return i?i.collectRequiredFields(e,n.fieldsIndex):void 0}function N(e,n,i){i.onStatisticExpression?h(e,n,i.onStatisticExpression.expression):e.add(i.onStatisticField)}async function L(e,n,i){if(!n||!i||!("fields"in i))return;const t=[],r=i.popupTemplate;t.push(D(e,n,r)),i.fields&&t.push(...i.fields.map((async i=>N(e,n.fieldsIndex,i)))),await Promise.all(t)}async function D(e,n,i){const t=[];i?.expressionInfos&&t.push(...i.expressionInfos.map((i=>h(e,n.fieldsIndex,i.expression))));const r=i?.content;if(Array.isArray(r))for(const l of r)"expression"===l.type&&l.expressionInfo&&t.push(h(e,n.fieldsIndex,l.expressionInfo.expression));await Promise.all(t)}async function O(e,n,i){n&&(n.timeInfo&&null!=i&&i.timeExtent&&b(e,n.fieldsIndex,[n.timeInfo.startField,n.timeInfo.endField]),n.floorInfo&&b(e,n.fieldsIndex,[n.floorInfo.floorField]),null!=i&&null!=i.where&&await S(e,n.fieldsIndex,i.where))}async function V(e,n,i){n&&i&&await Promise.all(i.map((i=>j(e,n,i))))}async function j(e,n,i){n&&i&&(i.valueExpression?await h(e,n.fieldsIndex,i.valueExpression):i.field&&x(e,n.fieldsIndex,i.field))}async function U(e){if(!e)return[];const n="timeInfo"in e&&e.timeInfo;return n?I(e.fieldsIndex,[e.trackIdField,n.startField,n.endField]):[]}function C(e){return e?I(e.fieldsIndex,M(e)):[]}function R(e){if(!e)return[];const n=e.geometryFieldsInfo;return n?I(e.fieldsIndex,[n.shapeAreaField,n.shapeLengthField]):[]}const k=new Set(["oid","global-id","guid"]),z=new Set(["oid","global-id"]),P=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i];function G(e){const n=new Set;B(e).forEach((e=>n.add(e))),R(e).forEach((e=>n.add(e.toLowerCase())));const i=e&&"infoFor3D"in e?e.infoFor3D:void 0;return i&&(Object.values(i.assetMapFieldRoles).forEach((e=>n.add(e.toLowerCase()))),Object.values(i.transformFieldRoles).forEach((e=>n.add(e.toLowerCase())))),Array.from(n)}function M(e){if(!e)return[];const n="editFieldsInfo"in e&&e.editFieldsInfo;if(!n)return[];const{creationDateField:i,creatorField:t,editDateField:r,editorField:l}=n;return[i,t,r,l].filter(Boolean)}function B(e){return M(e).map((e=>e.toLowerCase()))}function X(e,n){return e.editable&&!k.has(e.type)&&!B(n).includes(e.name?.toLowerCase()??"")}function q(e,n){const i=e.name?.toLowerCase()??"";return!(null!=n?.objectIdField&&i===n.objectIdField.toLowerCase()||null!=n?.globalIdField&&i===n.globalIdField.toLowerCase()||G(n).includes(i)||z.has(e.type)||P.some((e=>e.test(i))))}async function Y(e){if(!e)return[];const n=new Set;return await J(n,e),Array.from(n).sort()}async function J(e,n){const{labelingInfo:i,fieldsIndex:t}=n;i&&i.length&&await Promise.all(i.map((n=>W(e,t,n))))}async function W(e,n,i){if(!i)return;const t=i.getLabelExpression(),r=i.where;if("arcade"===t.type)await h(e,n,t.expression);else{const i=t.expression.match(/{[^}]*}/g);i&&i.forEach((i=>{x(e,n,i.slice(1,-1))}))}await S(e,n,r)}function H(e){const n=e.defaultValue;return void 0!==n&&re(e,n)?n:e.nullable?null:void 0}function K(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function Q(e){return null===e||K(e)}const Z="isInteger"in Number?Number.isInteger:e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e;function ee(e){return null===e||Z(e)}function ne(e){return null!=e&&"string"==typeof e}function ie(e){return null===e||ne(e)}function te(){return!0}function re(e,n){let i;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":i=e.nullable?ee:Z;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":i=e.nullable?Q:K;break;case"string":case"esriFieldTypeString":i=e.nullable?ie:ne;break;default:i=te}return 1===arguments.length?i:i(n)}const le=["integer","small-integer","big-integer"],oe=["single","double"],se=[...le,...oe],ae=["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger"],ue=["esriFieldTypeSingle","esriFieldTypeDouble"],fe=new Set([...le,...ae]),de=new Set([...oe,...ue]),ce=t(fe,de),me=["date","date-only","timestamp-offset"],pe=new Set([...me,"esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimestampOffset"]);function ye(e){return null!=e&&fe.has(e.type)}function ge(e){return null!=e&&ce.has(e.type)}function Fe(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function Ie(e){return null!=e&&pe.has(e.type)}function be(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function xe(e,n){return null===Se(e,n)}var Te,we;function he(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function Se(e,n){return null==e||e.nullable&&null===n?null:ge(e)&&!_e(e.type,Number(n))?Te.OUT_OF_RANGE:re(e,n)?e.domain?l(e.domain,n):null:we.INVALID_TYPE}function _e(e,n){const i="string"==typeof e?Ae(e):e;if(!i)return!1;const t=i.min,r=i.max;return i.isInteger?Z(n)&&n>=t&&n<=r:n>=t&&n<=r}function Ee(e){const n=o(e.domain);return n||(ge(e)?Ae(e.type):void 0)}function Ae(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return $e;case"esriFieldTypeInteger":case"integer":return Ne;case"esriFieldTypeBigInteger":case"big-integer":return Le;case"esriFieldTypeSingle":case"single":return De;case"esriFieldTypeDouble":case"double":return Oe}}function ve(e){if(!K(e))return null;if(Z(e)){if(e>=$e.min&&e<=$e.max)return"esriFieldTypeSmallInteger";if(e>=Ne.min&&e<=Ne.max)return"esriFieldTypeInteger";if(e>=Le.min&&e<=Le.max)return"esriFieldTypeBigInteger"}return e>=De.min&&e<=De.max?"esriFieldTypeSingle":"esriFieldTypeDouble"}!function(e){e.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"}(Te||(Te={})),function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(we||(we={}));const $e={min:-32768,max:32767,isInteger:!0},Ne={min:-2147483648,max:2147483647,isInteger:!0},Le={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0},De={min:-34e37,max:12e37,isInteger:!1},Oe={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1};function Ve(e,n,i){switch(e){case s.INVALID_CODED_VALUE:return`Value ${i} is not in the coded domain - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case s.VALUE_OUT_OF_RANGE:return`Value ${i} is out of the range of valid values - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case we.INVALID_TYPE:return`Value ${i} is not a valid value for the field type - field: ${n.name}, type: ${n.type}, nullable: ${n.nullable}`;case Te.OUT_OF_RANGE:{const{min:e,max:t}=Ae(n.type);return`Value ${i} is out of range for the number type - field: ${n.name}, type: ${n.type}, value range is ${e} to ${t}`}}}function je(e,n){return!Ue(e,n,null)}function Ue(e,n,i){if(!n||!n.attributes||!e){if(null!=i)for(const n of e??[])i.add(n);return!0}const t=new Set(Object.keys(n.attributes));let r=!1;for(const l of e)if(!t.has(l)){if(r=!0,null==i)break;i.add(l)}return r}async function Ce(e,n){const i=new Set;for(const t of n)await h(i,e.fieldsIndex,t);return Array.from(i).sort()}function Re(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some((n=>e.toLowerCase().startsWith(n)))}export{Te as NumericRangeValidationError,we as TypeValidationError,Le as bigIntegerRange,h as collectArcadeFieldNames,$ as collectElevationFields,L as collectFeatureReductionFields,x as collectField,b as collectFields,O as collectFilterFields,J as collectLabelingFields,V as collectOrderByInfos,D as collectPopupTemplateFields,me as dateTypes,Oe as doubleRange,je as featureHasFields,I as fixFields,p as fixRendererFields,g as fixTimeInfoFields,ue as floatJSONTypes,oe as floatTypes,_ as getDisplayFieldName,M as getEditTrackingFields,v as getElevationFields,Ce as getExpressionFields,C as getFeatureEditFields,R as getFeatureGeometryFields,H as getFieldDefaultValue,Ee as getFieldRange,Y as getLabelingFields,G as getLowerCaseDefaultHiddenFields,B as getLowerCaseEditTrackingFields,ve as getNumericTypeForValue,U as getTimeFields,ae as integerJSONTypes,Ne as integerRange,le as integerTypes,Ie as isDateField,X as isFieldEditable,q as isFieldVisibleByDefault,ye as isIntegerField,_e as isNumberInRange,ge as isNumericField,Re as isRasterPixelValueField,Fe as isStringField,be as isTimeOnlyField,xe as isValidFieldValue,re as isValueMatchingFieldType,d as normalizeFieldName,se as numericTypes,w as packFields,Ue as populateMissingFields,c as rendererFields,he as sanitizeNullFieldValue,De as singleRange,$e as smallIntegerRange,T as unpackFieldNames,Se as validateFieldValue,Ve as validationErrorToString,m as visualVariableFields};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{clone as e}from"../../core/lang.js";import n from"./RasterFunction.js";import{getPixelValueRange as t}from"./rasterFormats/pixelRangeUtils.js";import{schema as r}from"./rasterFunctions/rasterFunctionSchema.js";import{getRFxArgColorRampValue as o,convertColorRampToColormap as a,getColorRampName as i,convertRGBATo32Bit as s}from"../../renderers/support/colorRampUtils.js";import{stretchTypeJSONDict as u}from"../../renderers/support/stretchRendererUtils.js";import l from"../../renderers/visualVariables/SizeVariable.js";const c=new Set(["u1","u2","u4","u8","s8","u16","s16"]),m={simple_scalar:"Simple Scalar",wind_barb:"Wind Barb",single_arrow:"Single Arrow",beaufort_kn:"Beaufort Wind (Knots)",beaufort_m:"Beaufort Wind (MetersPerSecond)",ocean_current_m:"Ocean Current (MetersPerSecond)",ocean_current_kn:"Ocean Current (Knots)"},f=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function p(e){return f.has(e.type)}function g(n,t){if(!n||!t)return e(n||t);const r=e(n);if(r.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),d(r.functionDefinition.arguments,t),r.rasterFunctionDefinition=r.functionDefinition.toJSON()}else if("none"!==t.functionName?.toLowerCase()){b(r.functionArguments).Raster=t}return r}function d(e,n){for(const t in e)"raster"===t.toLowerCase()&&("RasterFunctionVariable"===e[t].type?(e[t]=n.rasterFunctionDefinition,e[t].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[t].type&&d(e[t].arguments,n))}function h(n){const t=e(r[n.functionName+"Function"]),o=n.functionArguments;for(const e in o)"raster"===e.toLowerCase()?(t.arguments[e]=h(o[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=V(o[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=o[e];return t}function y(e,n){switch(n=n||{},e.type){case"raster-stretch":return w(e,n);case"class-breaks":return S(e,n);case"unique-value":return F(e,n);case"raster-colormap":return A(e,n);case"vector-field":return T(e,n);case"raster-shaded-relief":return v(e,n);case"flow":throw new Error("Unsupported rendering rule.")}}function b(e){const n=e?.Raster;return n&&"esri.layers.support.RasterFunction"===n.declaredClass?b(n.functionArguments):e}const R={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function T(e,t){const r=new n;r.functionName="VectorFieldRenderer";const{dataType:o,bandNames:a}=t,i="vector-uv"===o;let s,u;if(a&&2===a.length){const e=a.map((e=>e.toLowerCase()));s=e.indexOf("magnitude"),u=e.indexOf("direction")}-1!==s&&null!==s||(s=0,u=1);const c="arithmetic"===e.rotationType?1:2,f="flow-from"===e.flowRepresentation?0:1,p=e.visualVariables?e.visualVariables.find((e=>"Magnitude"===e.field)):new l,g={magnitudeBandID:s,directionBandID:u,isUVComponents:i,referenceSystem:c,massFlowAngleRepresentation:f,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:m[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};r.functionArguments=g;const d=h(r);return t.convertToRFT?n.fromJSON({rasterFunctionDefinition:d}):r}function v(e,t){const r=t.convertToRFT;if("elevation"!==t.dataType&&("generic"!==t.dataType||1!==t.bandCount||"s16"!==t.pixelType&&"s32"!==t.pixelType&&"f32"!==t.pixelType&&"f64"!==t.pixelType))return new n;const i=new n;i.functionName="Hillshade";const s="traditional"===e.hillshadeType?0:1,u="none"===e.scalingType?1:3,l={HillshadeType:s,SlopeType:u,ZFactor:e.zFactor};return 0===s&&(l.Azimuth=e.azimuth,l.Altitude=e.altitude),3===u&&(l.PSPower=e.pixelSizePower,l.PSZFactor=e.pixelSizeFactor),i.functionArguments=l,i.variableName="Raster",e.colorRamp&&(i.functionName="ShadedRelief",r?l.ColorRamp=o(e.colorRamp):l.Colormap=a(e.colorRamp)),r?new n({rasterFunctionDefinition:h(i)}):i}function w(e,t){const r=t.convertToRFT,s=new n;s.functionName="Stretch";const l=R[u.toJSON(e.stretchType)],c="u8",m={StretchType:l,Statistics:N(e.statistics??[]),DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(m.Min=e.outputMin),null!=e.outputMax&&(m.Max=e.outputMax),l===R.standardDeviation?(m.NumberOfStandardDeviations=e.numberOfStandardDeviations,s.outputPixelType=c):l===R.percentClip?(m.MinPercent=e.minPercent,m.MaxPercent=e.maxPercent,s.outputPixelType=c):l===R.minMax?s.outputPixelType=c:l===R.sigmoid&&(m.SigmoidStrengthLevel=e.sigmoidStrengthLevel),s.functionArguments=m,s.variableName="Raster",e.colorRamp){const u=e.colorRamp,l=new n;if(r)l.functionArguments={ColorRamp:o(u)};else{const n=i(u,!0);if(n)l.functionArguments={colorRamp:n};else if(!t.convertColorRampToColormap||"algorithmic"!==u.type&&"multipart"!==u.type){const n=e.colorRamp.toJSON();"algorithmic"===n.type?n.algorithm=n.algorithm||"esriCIELabAlgorithm":"multipart"===n.type&&n.colorRamps?.length&&n.colorRamps.forEach((e=>e.algorithm=e.algorithm||"esriCIELabAlgorithm")),l.functionArguments={colorRamp:n}}else l.functionArguments={Colormap:a(u)}}return l.variableName="Raster",l.functionName="Colormap",l.functionArguments.Raster=s,r?new n({rasterFunctionDefinition:h(l)}):l}return r?new n({rasterFunctionDefinition:h(s)}):s}function S(e,t){const r=[],o=[],a=[],i=[],s=1e-6,{pixelType:u,rasterAttributeTable:l}=t,c=null==l?null:l.features,m=C(l);if(m&&c&&Array.isArray(c)&&e.classBreakInfos){e.classBreakInfos.forEach(((n,t)=>{const r=n.symbol?.color;let o;r?.a&&null!=n.minValue&&null!=n.maxValue&&c.forEach((a=>{null!=n.minValue&&null!=n.maxValue&&(o=a.attributes[e.field],(o>=n.minValue&&o<n.maxValue||t===e.classBreakInfos.length-1&&o>=n.minValue)&&i.push([a.attributes[m],r.r,r.g,r.b]))}))}));const r=u?x(i,u):i,o=new n;return o.functionName="Colormap",o.functionArguments={},o.functionArguments.Colormap=r,o.variableName="Raster",t.convertToRFT?new n({rasterFunctionDefinition:h(o)}):o}e.classBreakInfos.forEach(((e,n)=>{if(null==e.minValue||null==e.maxValue)return;const t=e.symbol&&e.symbol.color;t?.a?(0===n?r.push(e.minValue,e.maxValue+s):r.push(e.minValue+s,e.maxValue+s),o.push(n),i.push([n,t.r,t.g,t.b])):a.push(e.minValue,e.maxValue)}));const f=u?x(i,u):i,p=new n;p.functionName="Remap",p.functionArguments={InputRanges:r,OutputValues:o,NoDataRanges:a},p.variableName="Raster";const g=new n;return g.functionName="Colormap",g.functionArguments={Colormap:f,Raster:p},t.convertToRFT?new n({rasterFunctionDefinition:h(g)}):g}function x(e,n){const r=c.has(n)?t(n):null;return r&&e.push([Math.floor(r[0]-1),0,0,0],[Math.ceil(r[1]+1),0,0,0]),e}function C(e){if(null==e)return;const{fields:n}=e,t=n&&n.find((e=>e&&e.name&&"value"===e.name.toLowerCase()));return t&&t.name}function F(e,t){const r=[],{pixelType:o,rasterAttributeTable:a}=t,i=null==a?null:a.features,s=C(a),u=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(i){if(s){const n=new Map;l.forEach((e=>{const t=e.value,r=e.symbol?.color;null!=t&&r&&r.a&&n.set(String(t),r.toRgb())}));const t=e.field;i.forEach((({attributes:e})=>{const o=String(e[t]),a=e[s],i=n.get(o);i?r.push([a,...i]):u&&r.push([a,...u])}))}}else for(let n=0;n<l.length;n++){const e=l[n],t=e.symbol?.color,o=+e.value;if(t?.a){if(isNaN(o))return null;r.push([o,t.r,t.g,t.b])}}const c=o&&r.length>0?x(r,o):r,m=new n;return m.functionName="Colormap",m.functionArguments={},m.functionArguments.Colormap=c,m.variableName="Raster",t.convertToRFT?new n({rasterFunctionDefinition:h(m)}):m}function A(e,t){const r=e.extractColormap();if(!r||0===r.length)return null;const{pixelType:o}=t,a=o?x(r,o):r,i=new n;return i.functionName="Colormap",i.functionArguments={},i.functionArguments.Colormap=a,t.convertToRFT?new n({rasterFunctionDefinition:h(i)}):i}function N(e){const n=[];return e?.forEach((e=>{const t=e;if(Array.isArray(t))n.push(t);else{if(null==t.min||null==t.max)return;const e=[t.min,t.max,t.avg||0,t.stddev||0];n.push(e)}})),n}function V(e){const n=[],t=[];return e.forEach((e=>{n.push(e[0]),t.push(s([...e.slice(1),255]))})),{type:"RasterColormap",values:n,colors:t}}export{g as combineRenderingRules,y as convertRendererToRenderingRule,h as convertRenderingRuleToRFT,p as isSupportedRendererType};
5
+ import{clone as e}from"../../core/lang.js";import n from"./RasterFunction.js";import{getPixelValueRange as t}from"./rasterFormats/pixelRangeUtils.js";import{schema as r}from"./rasterFunctions/rasterFunctionSchema.js";import{getRFxArgColorRampValue as o,convertColorRampToColormap as a,getColorRampName as i,convertRGBATo32Bit as s}from"../../renderers/support/colorRampUtils.js";import{stretchTypeJSONDict as u}from"../../renderers/support/stretchRendererUtils.js";import l from"../../renderers/visualVariables/SizeVariable.js";const c=new Set(["u1","u2","u4","u8","s8","u16","s16"]),m={simple_scalar:"Simple Scalar",wind_barb:"Wind Barb",single_arrow:"Single Arrow",beaufort_kn:"Beaufort Wind (Knots)",beaufort_m:"Beaufort Wind (MetersPerSecond)",ocean_current_m:"Ocean Current (MetersPerSecond)",ocean_current_kn:"Ocean Current (Knots)"},f=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function p(e){return f.has(e.type)}function g(n,t){if(!n||!t)return e(n||t);const r=e(n);if(r.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),d(r.functionDefinition.arguments,t),r.rasterFunctionDefinition=r.functionDefinition.toJSON()}else if("none"!==t.functionName?.toLowerCase()){b(r.functionArguments).Raster=t}return r}function d(e,n){for(const t in e)"raster"===t.toLowerCase()&&("RasterFunctionVariable"===e[t].type?(e[t]=n.rasterFunctionDefinition,e[t].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[t].type&&d(e[t].arguments,n))}function h(n){const t=e(r[n.functionName+"Function"]),o=n.functionArguments;for(const e in o)"raster"===e.toLowerCase()?(t.arguments[e]=h(o[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=V(o[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=o[e];return t}function y(e,n){switch(n=n||{},e.type){case"raster-stretch":return w(e,n);case"class-breaks":return S(e,n);case"unique-value":return F(e,n);case"raster-colormap":return A(e,n);case"vector-field":return T(e,n);case"raster-shaded-relief":return v(e,n);case"flow":throw new Error("Unsupported rendering rule.")}}function b(e){const n=e?.Raster;return n&&"esri.layers.support.RasterFunction"===n.declaredClass?b(n.functionArguments):e}const R={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function T(e,t){const r=new n;r.functionName="VectorFieldRenderer";const{dataType:o,bandNames:a}=t,i="vector-uv"===o;let s,u;if(a&&2===a.length){const e=a.map((e=>e.toLowerCase()));s=e.indexOf("magnitude"),u=e.indexOf("direction")}-1!==s&&null!==s||(s=0,u=1);const c="arithmetic"===e.rotationType?1:2,f="flow-from"===e.flowRepresentation?0:1,p=e.visualVariables?e.visualVariables.find((e=>"Magnitude"===e.field)):new l,g={magnitudeBandID:s,directionBandID:u,isUVComponents:i,referenceSystem:c,massFlowAngleRepresentation:f,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:m[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};r.functionArguments=g;const d=h(r);return t.convertToRFT?n.fromJSON({rasterFunctionDefinition:d}):r}function v(e,t){const r=t.convertToRFT;if("elevation"!==t.dataType&&("generic"!==t.dataType||1!==t.bandCount||"s16"!==t.pixelType&&"s32"!==t.pixelType&&"f32"!==t.pixelType&&"f64"!==t.pixelType))return new n;const i=new n;i.functionName="Hillshade";const s="traditional"===e.hillshadeType?0:1,u="none"===e.scalingType?1:3,l={HillshadeType:s,SlopeType:u,ZFactor:e.zFactor};return 0===s&&(l.Azimuth=e.azimuth,l.Altitude=e.altitude),3===u&&(l.PSPower=e.pixelSizePower,l.PSZFactor=e.pixelSizeFactor),i.functionArguments=l,i.variableName="Raster",e.colorRamp&&(i.functionName="ShadedRelief",r?l.ColorRamp=o(e.colorRamp):l.Colormap=a(e.colorRamp)),r?new n({rasterFunctionDefinition:h(i)}):i}function w(e,t){const r=t.convertToRFT,s=new n;s.functionName="Stretch";const l=R[u.toJSON(e.stretchType)],c="u8",m={StretchType:l,Statistics:N(e.statistics??[]),DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(m.Min=e.outputMin),null!=e.outputMax&&(m.Max=e.outputMax),l===R.standardDeviation?(m.NumberOfStandardDeviations=e.numberOfStandardDeviations,s.outputPixelType=c):l===R.percentClip?(m.MinPercent=e.minPercent,m.MaxPercent=e.maxPercent,s.outputPixelType=c):l===R.minMax?s.outputPixelType=c:l===R.sigmoid&&(m.SigmoidStrengthLevel=e.sigmoidStrengthLevel),s.functionArguments=m,s.variableName="Raster",e.colorRamp){const u=e.colorRamp,l=new n;if(r)l.functionArguments={ColorRamp:o(u)};else{const n=i(u,!0);if(n)l.functionArguments={colorRampName:n};else if(!t.convertColorRampToColormap||"algorithmic"!==u.type&&"multipart"!==u.type){const n=e.colorRamp.toJSON();"algorithmic"===n.type?n.algorithm=n.algorithm||"esriCIELabAlgorithm":"multipart"===n.type&&n.colorRamps?.length&&n.colorRamps.forEach((e=>e.algorithm=e.algorithm||"esriCIELabAlgorithm")),l.functionArguments={colorRamp:n}}else l.functionArguments={Colormap:a(u)}}return l.variableName="Raster",l.functionName="Colormap",l.functionArguments.Raster=s,r?new n({rasterFunctionDefinition:h(l)}):l}return r?new n({rasterFunctionDefinition:h(s)}):s}function S(e,t){const r=[],o=[],a=[],i=[],s=1e-6,{pixelType:u,rasterAttributeTable:l}=t,c=null==l?null:l.features,m=C(l);if(m&&c&&Array.isArray(c)&&e.classBreakInfos){e.classBreakInfos.forEach(((n,t)=>{const r=n.symbol?.color;let o;r?.a&&null!=n.minValue&&null!=n.maxValue&&c.forEach((a=>{null!=n.minValue&&null!=n.maxValue&&(o=a.attributes[e.field],(o>=n.minValue&&o<n.maxValue||t===e.classBreakInfos.length-1&&o>=n.minValue)&&i.push([a.attributes[m],r.r,r.g,r.b]))}))}));const r=u?x(i,u):i,o=new n;return o.functionName="Colormap",o.functionArguments={},o.functionArguments.Colormap=r,o.variableName="Raster",t.convertToRFT?new n({rasterFunctionDefinition:h(o)}):o}e.classBreakInfos.forEach(((e,n)=>{if(null==e.minValue||null==e.maxValue)return;const t=e.symbol&&e.symbol.color;t?.a?(0===n?r.push(e.minValue,e.maxValue+s):r.push(e.minValue+s,e.maxValue+s),o.push(n),i.push([n,t.r,t.g,t.b])):a.push(e.minValue,e.maxValue)}));const f=u?x(i,u):i,p=new n;p.functionName="Remap",p.functionArguments={InputRanges:r,OutputValues:o,NoDataRanges:a},p.variableName="Raster";const g=new n;return g.functionName="Colormap",g.functionArguments={Colormap:f,Raster:p},t.convertToRFT?new n({rasterFunctionDefinition:h(g)}):g}function x(e,n){const r=c.has(n)?t(n):null;return r&&e.push([Math.floor(r[0]-1),0,0,0],[Math.ceil(r[1]+1),0,0,0]),e}function C(e){if(null==e)return;const{fields:n}=e,t=n&&n.find((e=>e&&e.name&&"value"===e.name.toLowerCase()));return t&&t.name}function F(e,t){const r=[],{pixelType:o,rasterAttributeTable:a}=t,i=null==a?null:a.features,s=C(a),u=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(i){if(s){const n=new Map;l.forEach((e=>{const t=e.value,r=e.symbol?.color;null!=t&&r&&r.a&&n.set(String(t),r.toRgb())}));const t=e.field;i.forEach((({attributes:e})=>{const o=String(e[t]),a=e[s],i=n.get(o);i?r.push([a,...i]):u&&r.push([a,...u])}))}}else for(let n=0;n<l.length;n++){const e=l[n],t=e.symbol?.color,o=+e.value;if(t?.a){if(isNaN(o))return null;r.push([o,t.r,t.g,t.b])}}const c=o&&r.length>0?x(r,o):r,m=new n;return m.functionName="Colormap",m.functionArguments={},m.functionArguments.Colormap=c,m.variableName="Raster",t.convertToRFT?new n({rasterFunctionDefinition:h(m)}):m}function A(e,t){const r=e.extractColormap();if(!r||0===r.length)return null;const{pixelType:o}=t,a=o?x(r,o):r,i=new n;return i.functionName="Colormap",i.functionArguments={},i.functionArguments.Colormap=a,t.convertToRFT?new n({rasterFunctionDefinition:h(i)}):i}function N(e){const n=[];return e?.forEach((e=>{const t=e;if(Array.isArray(t))n.push(t);else{if(null==t.min||null==t.max)return;const e=[t.min,t.max,t.avg||0,t.stddev||0];n.push(e)}})),n}function V(e){const n=[],t=[];return e.forEach((e=>{n.push(e[0]),t.push(s([...e.slice(1),255]))})),{type:"RasterColormap",values:n,colors:t}}export{g as combineRenderingRules,y as convertRendererToRenderingRule,h as convertRenderingRuleToRFT,p as isSupportedRendererType};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../config.js";import{id as o}from"../../kernel.js";import t from"../../PopupTemplate.js";import r from"../../request.js";import{clone as s}from"../../core/lang.js";import{addQueryParameters as n}from"../../core/urlUtils.js";import i from"../../geometry/SpatialReference.js";import{create as f,negativeInfinity as a,expandWithAABB as l,equals as u}from"../../geometry/support/aaBoundingBox.js";import{getBoundsXYZ as p}from"../../geometry/support/boundsUtils.js";import{fromJSON as m}from"../../renderers/support/jsonUtils.js";import y from"../../rest/support/FeatureSet.js";const c={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function d(e){const o=e.folders||[],t=o.slice(),r=new Map,n=new Map,i=new Map,f=new Map,a=new Map,l={esriGeometryPoint:n,esriGeometryPolyline:i,esriGeometryPolygon:f};(e.featureCollection&&e.featureCollection.layers||[]).forEach((e=>{const o=s(e);o.featureSet.features=[];const t=e.featureSet.geometryType;r.set(t,o);const a=e.layerDefinition.objectIdField;"esriGeometryPoint"===t?G(n,a,e.featureSet.features):"esriGeometryPolyline"===t?G(i,a,e.featureSet.features):"esriGeometryPolygon"===t&&G(f,a,e.featureSet.features)})),e.groundOverlays&&e.groundOverlays.forEach((e=>{a.set(e.id,e)})),o.forEach((o=>{o.networkLinkIds.forEach((r=>{const s=P(r,o.id,e.networkLinks);s&&t.push(s)}))})),t.forEach((e=>{if(e.featureInfos){e.points=s(r.get("esriGeometryPoint")),e.polylines=s(r.get("esriGeometryPolyline")),e.polygons=s(r.get("esriGeometryPolygon")),e.mapImages=[];for(const o of e.featureInfos)switch(o.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":{const t=l[o.type].get(o.id);t&&e[c[o.type]]?.featureSet.features.push(t);break}case"GroundOverlay":{const t=a.get(o.id);t&&e.mapImages.push(t);break}}e.fullExtent=j([e])}}));const u=j(t);return{folders:o,sublayers:t,extent:u}}function g(t,s,i,f){const a=o&&o.findCredential(t);t=n(t,{token:a&&a.token});const l=e.kmlServiceUrl;return r(l,{query:{url:t,model:"simple",folders:"",refresh:0!==i||void 0,outSR:JSON.stringify(s)},responseType:"json",signal:f})}function S(e,o,t=null,r=[]){const s=[],n={},i=o.sublayers,f=o.folders.map((e=>e.id));return i.forEach((o=>{const i=new e;if(t?i.read(o,t):i.read(o),r.length&&f.includes(i.id)&&(i.visible=r.includes(i.id)),n[o.id]=i,null!=o.parentFolderId&&-1!==o.parentFolderId){const e=n[o.parentFolderId];e.sublayers||(e.sublayers=[]),e.sublayers?.unshift(i)}else s.unshift(i)})),s}function G(e,o,t){t.forEach((t=>{e.set(t.attributes[o],t)}))}function h(e,o){let t;return o.some((o=>o.id===e&&(t=o,!0))),t}function P(e,o,t){const r=h(e,t);return r&&(r.parentFolderId=o,r.networkLink=r),r}async function b(e){const o=y.fromJSON(e.featureSet).features,r=e.layerDefinition,s=m(r.drawingInfo.renderer),n=t.fromJSON(e.popupInfo),i=[];for(const t of o){const e=await s.getSymbolAsync(t);t.symbol=e,t.popupTemplate=n,t.visible=!0,i.push(t)}return i}function j(e){const o=f(a),t=f(a);for(const r of e){if(r.polygons&&r.polygons.featureSet&&r.polygons.featureSet.features)for(const e of r.polygons.featureSet.features)p(o,e.geometry),l(t,o);if(r.polylines&&r.polylines.featureSet&&r.polylines.featureSet.features)for(const e of r.polylines.featureSet.features)p(o,e.geometry),l(t,o);if(r.points&&r.points.featureSet&&r.points.featureSet.features)for(const e of r.points.featureSet.features)p(o,e.geometry),l(t,o);if(r.mapImages)for(const e of r.mapImages)p(o,e.extent),l(t,o)}return u(t,a)?void 0:{xmin:t[0],ymin:t[1],zmin:t[2],xmax:t[3],ymax:t[4],zmax:t[5],spatialReference:i.WGS84}}export{j as computeExtent,g as fetchService,b as getGraphics,d as parseKML,S as sublayersFromJSON};
5
+ import e from"../../config.js";import{id as o}from"../../kernel.js";import t from"../../PopupTemplate.js";import r from"../../request.js";import{clone as s}from"../../core/lang.js";import{addQueryParameters as n}from"../../core/urlUtils.js";import i from"../../geometry/SpatialReference.js";import{create as f,negativeInfinity as a,expandWithAABB as l,equals as u}from"../../geometry/support/aaBoundingBox.js";import{getBoundsXYZ as p}from"../../geometry/support/boundsUtils.js";import{fromJSON as m}from"../../renderers/support/jsonUtils.js";import y from"../../rest/support/FeatureSet.js";const c={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function d(e){const o=e.folders||[],t=o.slice(),r=new Map,n=new Map,i=new Map,f=new Map,a=new Map,l={esriGeometryPoint:n,esriGeometryPolyline:i,esriGeometryPolygon:f};(e.featureCollection&&e.featureCollection.layers||[]).forEach((e=>{const o=s(e);o.featureSet.features=[];const t=e.featureSet.geometryType;r.set(t,o);const a=e.layerDefinition.objectIdField;"esriGeometryPoint"===t?h(n,a,e.featureSet.features):"esriGeometryPolyline"===t?h(i,a,e.featureSet.features):"esriGeometryPolygon"===t&&h(f,a,e.featureSet.features)})),e.groundOverlays&&e.groundOverlays.forEach((e=>{a.set(e.id,e)})),o.forEach((o=>{o.networkLinkIds.forEach((r=>{const s=P(r,o.id,e.networkLinks);s&&t.push(s)}))})),t.forEach((e=>{if(e.featureInfos){e.points=s(r.get("esriGeometryPoint")),e.polylines=s(r.get("esriGeometryPolyline")),e.polygons=s(r.get("esriGeometryPolygon")),e.mapImages=[];for(const o of e.featureInfos)switch(o.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":{const t=l[o.type].get(o.id);t&&e[c[o.type]]?.featureSet.features.push(t);break}case"GroundOverlay":{const t=a.get(o.id);t&&e.mapImages.push(t);break}}e.fullExtent=j([e])}}));const u=j(t);return{folders:o,sublayers:t,extent:u}}function g(t,s,i,f){const a=o&&o.findCredential(t);t=n(t,{token:a&&a.token});const l=e.kmlServiceUrl;return r(l,{query:{url:t,model:"simple",folders:"",refresh:0!==i||void 0,outSR:JSON.stringify(s)},responseType:"json",signal:f})}function S(e,o,t=null,r=[]){const s=[],n={},i=o.sublayers,f=new Set(o.folders.map((e=>e.id)));return i.forEach((o=>{const i=new e;if(t?i.read(o,t):i.read(o),r.length&&f.has(i.id)&&(i.visible=r.includes(i.id)),n[o.id]=i,null!=o.parentFolderId&&-1!==o.parentFolderId){const e=n[o.parentFolderId];e.sublayers||(e.sublayers=[]),e.sublayers?.unshift(i)}else s.unshift(i)})),s}function h(e,o,t){t.forEach((t=>{e.set(t.attributes[o],t)}))}function G(e,o){let t;return o.some((o=>o.id===e&&(t=o,!0))),t}function P(e,o,t){const r=G(e,t);return r&&(r.parentFolderId=o,r.networkLink=r),r}async function b(e){const o=y.fromJSON(e.featureSet).features,r=e.layerDefinition,s=m(r.drawingInfo.renderer),n=t.fromJSON(e.popupInfo),i=[];for(const t of o){const e=await s.getSymbolAsync(t);t.symbol=e,t.popupTemplate=n,t.visible=!0,i.push(t)}return i}function j(e){const o=f(a),t=f(a);for(const r of e){if(r.polygons&&r.polygons.featureSet&&r.polygons.featureSet.features)for(const e of r.polygons.featureSet.features)p(o,e.geometry),l(t,o);if(r.polylines&&r.polylines.featureSet&&r.polylines.featureSet.features)for(const e of r.polylines.featureSet.features)p(o,e.geometry),l(t,o);if(r.points&&r.points.featureSet&&r.points.featureSet.features)for(const e of r.points.featureSet.features)p(o,e.geometry),l(t,o);if(r.mapImages)for(const e of r.mapImages)p(o,e.extent),l(t,o)}return u(t,a)?void 0:{xmin:t[0],ymin:t[1],zmin:t[2],xmax:t[3],ymax:t[4],zmax:t[5],spatialReference:i.WGS84}}export{j as computeExtent,g as fetchService,b as getGraphics,d as parseKML,S as sublayersFromJSON};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../chunks/tslib.es6.js";import{JSONSupport as s}from"../../../core/JSONSupport.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import{cast as r}from"../../../core/accessorSupport/decorators/cast.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import i from"../PixelBlock.js";import o from"../RasterInfo.js";const a=new Set(["slope","aspect","curvature","hillshade","shadedrelief","statistics"]);let u=class extends s{constructor(){super(...arguments),this.functionArguments=null,this.readingBufferSize=0,this.id=-1,this.isNoopProcess=!1,this.rawInputBandIds=[],this.isInputBandIdsSwizzled=!1,this.swizzledBandSelection=[],this.isBranch=!1,this._bindingResult=null}get supportsGPU(){return this._bindingResult.supportsGPU}get flatWebGLFunctionChain(){const t=this.getWebGLProcessorDefinition();if(!t)return null;const s=[t],{parameters:e}=t;let r=e.rasters||e.raster&&[e.raster];for(;r?.length;){s.unshift(...r);const t=[];for(let s=0;s<r.length;s++){const{parameters:e}=r[s],n=e.rasters||e.raster&&[e.raster];n?.length&&t.push(...n)}r=t}for(let o=s.length-1;o>=0;o--)s[o].isNoopProcess&&s.splice(o,1);let n=!1;for(let o=0;o<s.length;o++){const t=s[o];t.id=s.length-o-1;const{rasters:e}=t.parameters;n=n||null!=e&&e.length>1}const i=s.some((({name:t})=>a.has(t.toLowerCase())));return{functions:s,hasBranches:n,hasFocalFunction:i}}bind(t,s=!1,e=-1){this.id=e+1;const r=this._getRasterValues();let n=!0;for(let i=0;i<r.length;i++){const e=r[i];if(null!=e&&this._isRasterFunctionValue(e)){const r=e.bind(t,s,this.id+i);if(!r.success)return this._bindingResult=r,r;n=n&&r.supportsGPU}}return!this.rasterInfo||s?(this.sourceRasterInfos=this._getSourceRasterInfos(t),this._bindingResult=this._bindSourceRasters(),this._bindingResult.success&&this._patchRasterInfo(),this._bindingResult.supportsGPU=n&&this._bindingResult.supportsGPU,this.processInputBandIds(),this._bindingResult):(this._bindingResult={success:!0,supportsGPU:!0},this.processInputBandIds(),this._bindingResult)}process(t){const s=this._getRasterValues(),e=0===s.length?t.pixelBlocks??t.primaryPixelBlocks:s.map((s=>this._readRasterValue(s,t)));return this._processPixels({...t,pixelBlocks:e})}processInputBandIds(){const t=this._getRasterValues().filter(this._isRasterFunctionValue);let s;if(t.length>1){const s=t.map((t=>t.processInputBandIds()[0]));this.rawInputBandIds=s,this.isInputBandIdsSwizzled=this.rawInputBandIds.some(((t,s)=>t!==s));const e=t.filter((t=>"ExtractBand"===t.functionName));return e.length&&e.forEach(((t,s)=>{t.isInputBandIdsSwizzled=!0,t.swizzledBandSelection=[s,s,s]})),this.rawInputBandIds}const e=t[0];if(e){if(s=e.processInputBandIds(),e.isInputBandIdsSwizzled)return this.rawInputBandIds=s,s}else{s=[];const{bandCount:t}=this.sourceRasterInfos[0];for(let e=0;e<t;e++)s.push(e)}const r=this._getInputBandIds(s);return this.isInputBandIdsSwizzled=r.some(((t,s)=>t!==s)),this.rawInputBandIds=r,this.rawInputBandIds}getPrimaryRasters(){const t=[],s=[];return this._getPrimaryRasters(this,t,s),{rasters:t,rasterIds:s}}getWebGLProcessorDefinition(){const t=this._getWebGLParameters(),{raster:s,rasters:e}=this.functionArguments;return e&&Array.isArray(e)&&e.length?(t.rasters=e.map((t=>this._isRasterFunctionValue(t)?t.getWebGLProcessorDefinition():"number"==typeof t?{name:"Constant",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1}:{name:"Identity",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1})),t.rasters.some((t=>null!=t))||(t.rasters=null)):this._isRasterFunctionValue(s)&&(t.raster=s.getWebGLProcessorDefinition()),{name:this.functionName,parameters:t,pixelType:this.outputPixelType,id:this.id,isNoopProcess:this.isNoopProcess}}_getOutputPixelType(t){return"unknown"===this.outputPixelType?t:this.outputPixelType??t}_getWebGLParameters(){return{}}_getInputBandIds(t){return t}_isOutputRoundingNeeded(){const{outputPixelType:t}=this;return(t?.startsWith("u")||t?.startsWith("s"))??!1}_getRasterValues(){const{rasterArgumentNames:t}=this;return"rasters"===t[0]?this.functionArguments.rasters??[]:t.map((t=>this.functionArguments[t])).flat()}_getSourceRasterInfos(t){const s=this._getRasterValues(),{rasterInfos:e,rasterIds:r}=t;if(0===s.length)return e;const n=s.map((t=>t&&"object"==typeof t&&"bind"in t&&t.rasterInfo?t.rasterInfo:"string"==typeof t&&r.includes(t)?e[r.indexOf(t)]:"number"!=typeof t?e[0]:void 0)),i=n.find((t=>t))??e[0];return n.forEach(((t,s)=>{void 0===t&&(n[s]=i)})),n}_getPrimaryRasterId(t){return t?.url}_getPrimaryRasters(t,s=[],e=[]){for(let r=0;r<t.sourceRasters.length;r++){const n=t.sourceRasters[r];if("number"!=typeof n)if("bind"in n)this._getPrimaryRasters(n,s,e);else{const t=n,r=this._getPrimaryRasterId(t);if(null==r)continue;e.includes(r)||(this.mainPrimaryRasterId===r?(s.unshift(t),e.unshift(r)):(s.push(t),e.push(r)))}}}_isRasterFunctionValue(t){return null!=t&&"object"==typeof t&&"getWebGLProcessorDefinition"in t}_readRasterValue(t,s){const{primaryPixelBlocks:e}=s;if(null==t||"$$"===t){const t=e[0];return null==t?null:t.clone()}if("string"==typeof t){const r=s.primaryRasterIds.indexOf(t);return-1===r?null:e[r]}if("number"==typeof t){const s=e[0];if(null==s)return null;const{width:r,height:n,pixelType:o,mask:a}=s,u=a?new Uint8Array(a):null,p=new Float32Array(r*n);p.fill(t);const l=this.sourceRasterInfos[0].bandCount,c=new Array(l).fill(p);return new i({width:r,height:n,pixelType:o,pixels:c,mask:u})}return t.process(s)}_patchRasterInfo(){const{rasterInfo:t}=this;if(!t?.keyProperties)return;const{bandCount:s,keyProperties:e,statistics:r,histograms:n}=t,i=e.BandProperties;i&&i.length!==s&&(t.keyProperties={...e,BandProperties:void 0}),r&&r.length!==s&&(t.statistics=r.length>s?r.slice(0,s):null),n&&n.length!==s&&(t.histograms=n.length>s?n.slice(0,s):null),e.BAND_COUNT&&Number(e.BAND_COUNT)!==s&&(t.keyProperties={...e,BAND_COUNT:"string"==typeof e.BAND_COUNT?String(s):s})}};t([e({json:{write:!0}})],u.prototype,"functionName",void 0),t([e({json:{write:!0}})],u.prototype,"functionArguments",void 0),t([e()],u.prototype,"rasterArgumentNames",void 0),t([e({json:{write:!0}}),r((t=>t?.toLowerCase()))],u.prototype,"outputPixelType",void 0),t([e({json:{write:!0}})],u.prototype,"mainPrimaryRasterId",void 0),t([e()],u.prototype,"sourceRasters",void 0),t([e({type:[o],json:{write:!0}})],u.prototype,"sourceRasterInfos",void 0),t([e({json:{write:!0}})],u.prototype,"rasterInfo",void 0),t([e({json:{write:!0}})],u.prototype,"readingBufferSize",void 0),t([e({json:{write:!0}})],u.prototype,"id",void 0),t([e()],u.prototype,"isNoopProcess",void 0),t([e()],u.prototype,"supportsGPU",null),t([e()],u.prototype,"rawInputBandIds",void 0),t([e()],u.prototype,"isInputBandIdsSwizzled",void 0),t([e()],u.prototype,"swizzledBandSelection",void 0),t([e()],u.prototype,"isBranch",void 0),t([e()],u.prototype,"flatWebGLFunctionChain",null),t([e()],u.prototype,"_bindingResult",void 0),u=t([n("esri.layers.support.rasterFunctions.BaseRasterFunction")],u);const p=u;export{p as default};
5
+ import{_ as t}from"../../../chunks/tslib.es6.js";import{JSONSupport as s}from"../../../core/JSONSupport.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import{cast as r}from"../../../core/accessorSupport/decorators/cast.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import i from"../PixelBlock.js";import o from"../RasterInfo.js";const a=new Set(["slope","aspect","curvature","hillshade","shadedrelief","statistics"]);let u=class extends s{constructor(){super(...arguments),this.functionArguments=null,this.readingBufferSize=0,this.id=-1,this.isNoopProcess=!1,this.rawInputBandIds=[],this.isInputBandIdsSwizzled=!1,this.swizzledBandSelection=[],this.isBranch=!1,this._bindingResult=null}get supportsGPU(){return this._bindingResult.supportsGPU}get flatWebGLFunctionChain(){const t=this.getWebGLProcessorDefinition();if(!t)return null;const s=[t],{parameters:e}=t;let r=e.rasters||e.raster&&[e.raster];for(;r?.length;){s.unshift(...r);const t=[];for(let s=0;s<r.length;s++){const{parameters:e}=r[s],n=e.rasters||e.raster&&[e.raster];n?.length&&t.push(...n)}r=t}for(let o=s.length-1;o>=0;o--)s[o].isNoopProcess&&s.splice(o,1);let n=!1;for(let o=0;o<s.length;o++){const t=s[o];t.id=s.length-o-1;const{rasters:e}=t.parameters;n=n||null!=e&&e.length>1}const i=s.some((({name:t})=>a.has(t.toLowerCase())));return{functions:s,hasBranches:n,hasFocalFunction:i}}bind(t,s=!1,e=-1){this.id=e+1;const r=this._getRasterValues();let n=!0;for(let i=0;i<r.length;i++){const e=r[i];if(null!=e&&this._isRasterFunctionValue(e)){const r=e.bind(t,s,this.id+i);if(!r.success)return this._bindingResult=r,r;n=n&&r.supportsGPU}}return!this.rasterInfo||s?(this.sourceRasterInfos=this._getSourceRasterInfos(t),this._bindingResult=this._bindSourceRasters(),this._bindingResult.success&&this._patchRasterInfo(),this._bindingResult.supportsGPU=n&&this._bindingResult.supportsGPU,this.processInputBandIds(),this._bindingResult):(this._bindingResult={success:!0,supportsGPU:!0},this.processInputBandIds(),this._bindingResult)}process(t){const s=this._getRasterValues(),e=0===s.length?t.pixelBlocks??t.primaryPixelBlocks:s.map((s=>this._readRasterValue(s,t)));return this._processPixels({...t,pixelBlocks:e})}processInputBandIds(){const t=this._getRasterValues().filter(this._isRasterFunctionValue);let s;if(t.length>1){const s=t.map((t=>t.processInputBandIds()[0]));this.rawInputBandIds=s,this.isInputBandIdsSwizzled=this.rawInputBandIds.some(((t,s)=>t!==s));const e=t.filter((t=>"ExtractBand"===t.functionName));return e.length&&e.forEach(((t,s)=>{t.isInputBandIdsSwizzled=!0,t.swizzledBandSelection=[s,s,s]})),this.rawInputBandIds}const e=t[0];if(e){if(s=e.processInputBandIds(),e.isInputBandIdsSwizzled)return this.rawInputBandIds=s,s}else{s=[];const{bandCount:t}=this.sourceRasterInfos[0];for(let e=0;e<t;e++)s.push(e)}const r=this._getInputBandIds(s);return this.isInputBandIdsSwizzled=r.some(((t,s)=>t!==s)),this.rawInputBandIds=r,this.rawInputBandIds}getPrimaryRasters(){const t=[],s=[];return this._getPrimaryRasters(this,t,s),{rasters:t,rasterIds:s}}getWebGLProcessorDefinition(){const t=this._getWebGLParameters(),{raster:s,rasters:e}=this.functionArguments;return e&&Array.isArray(e)&&e.length?(t.rasters=e.map((t=>this._isRasterFunctionValue(t)?t.getWebGLProcessorDefinition():"number"==typeof t?{name:"Constant",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1}:{name:"Identity",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1})),t.rasters.some((t=>null!=t))||(t.rasters=null)):this._isRasterFunctionValue(s)&&(t.raster=s.getWebGLProcessorDefinition()),{name:this.functionName,parameters:t,pixelType:this.outputPixelType,id:this.id,isNoopProcess:this.isNoopProcess}}_getOutputPixelType(t){return"unknown"===this.outputPixelType?t:this.outputPixelType??t}_getWebGLParameters(){return{}}_getInputBandIds(t){return t}_isOutputRoundingNeeded(){const{outputPixelType:t}=this;return(t?.startsWith("u")||t?.startsWith("s"))??!1}_getRasterValues(){const{rasterArgumentNames:t}=this;return"rasters"===t[0]?this.functionArguments.rasters??[]:t.flatMap((t=>this.functionArguments[t]))}_getSourceRasterInfos(t){const s=this._getRasterValues(),{rasterInfos:e,rasterIds:r}=t;if(0===s.length)return e;const n=s.map((t=>t&&"object"==typeof t&&"bind"in t&&t.rasterInfo?t.rasterInfo:"string"==typeof t&&r.includes(t)?e[r.indexOf(t)]:"number"!=typeof t?e[0]:void 0)),i=n.find((t=>t))??e[0];return n.forEach(((t,s)=>{void 0===t&&(n[s]=i)})),n}_getPrimaryRasterId(t){return t?.url}_getPrimaryRasters(t,s=[],e=[]){for(let r=0;r<t.sourceRasters.length;r++){const n=t.sourceRasters[r];if("number"!=typeof n)if("bind"in n)this._getPrimaryRasters(n,s,e);else{const t=n,r=this._getPrimaryRasterId(t);if(null==r)continue;e.includes(r)||(this.mainPrimaryRasterId===r?(s.unshift(t),e.unshift(r)):(s.push(t),e.push(r)))}}}_isRasterFunctionValue(t){return null!=t&&"object"==typeof t&&"getWebGLProcessorDefinition"in t}_readRasterValue(t,s){const{primaryPixelBlocks:e}=s;if(null==t||"$$"===t){const t=e[0];return null==t?null:t.clone()}if("string"==typeof t){const r=s.primaryRasterIds.indexOf(t);return-1===r?null:e[r]}if("number"==typeof t){const s=e[0];if(null==s)return null;const{width:r,height:n,pixelType:o,mask:a}=s,u=a?new Uint8Array(a):null,p=new Float32Array(r*n);p.fill(t);const l=this.sourceRasterInfos[0].bandCount,c=new Array(l).fill(p);return new i({width:r,height:n,pixelType:o,pixels:c,mask:u})}return t.process(s)}_patchRasterInfo(){const{rasterInfo:t}=this;if(!t?.keyProperties)return;const{bandCount:s,keyProperties:e,statistics:r,histograms:n}=t,i=e.BandProperties;i&&i.length!==s&&(t.keyProperties={...e,BandProperties:void 0}),r&&r.length!==s&&(t.statistics=r.length>s?r.slice(0,s):null),n&&n.length!==s&&(t.histograms=n.length>s?n.slice(0,s):null),e.BAND_COUNT&&Number(e.BAND_COUNT)!==s&&(t.keyProperties={...e,BAND_COUNT:"string"==typeof e.BAND_COUNT?String(s):s})}};t([e({json:{write:!0}})],u.prototype,"functionName",void 0),t([e({json:{write:!0}})],u.prototype,"functionArguments",void 0),t([e()],u.prototype,"rasterArgumentNames",void 0),t([e({json:{write:!0}}),r((t=>t?.toLowerCase()))],u.prototype,"outputPixelType",void 0),t([e({json:{write:!0}})],u.prototype,"mainPrimaryRasterId",void 0),t([e()],u.prototype,"sourceRasters",void 0),t([e({type:[o],json:{write:!0}})],u.prototype,"sourceRasterInfos",void 0),t([e({json:{write:!0}})],u.prototype,"rasterInfo",void 0),t([e({json:{write:!0}})],u.prototype,"readingBufferSize",void 0),t([e({json:{write:!0}})],u.prototype,"id",void 0),t([e()],u.prototype,"isNoopProcess",void 0),t([e()],u.prototype,"supportsGPU",null),t([e()],u.prototype,"rawInputBandIds",void 0),t([e()],u.prototype,"isInputBandIdsSwizzled",void 0),t([e()],u.prototype,"swizzledBandSelection",void 0),t([e()],u.prototype,"isBranch",void 0),t([e()],u.prototype,"flatWebGLFunctionChain",null),t([e()],u.prototype,"_bindingResult",void 0),u=t([n("esri.layers.support.rasterFunctions.BaseRasterFunction")],u);const p=u;export{p 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.28/esri/copyright.txt for details.
4
4
  */
5
- import{getNamedColor as t,hex2rgba as a}from"../../../../colorUtils.js";import{colormapName as n}from"../../rasterFunctionConstants.js";import{createRasterFunction as o}from"./utils.js";import{colorRampDict as r}from"../../../../renderers/support/colorRampUtils.js";function e(t){return"colormap"in t?s(t):"colorRamp"in t?i(t):u(t)}function s(n){const r=n.colormap.map((n=>{if("value"in n){const o="string"==typeof n.color?t(n.color)??a(n.color):n.color;(n=[n.value,...o])[4]&&n[4]<=1&&(n[4]=Math.round(255*n[4]))}return n})),{raster:e,outputPixelType:s}=n;return o("Colormap",{colormap:r,raster:e},s)}function i(t){const{raster:a,colorRamp:n,outputPixelType:r}=t,e={colorRamp:"toJSON"in n?n.toJSON():n,raster:a};return o("Colormap",e,r)}function u(t){const{colormapName:a}=t,e=Object.values(n).find((t=>t.toLowerCase()===a?.toLowerCase())),s=r.toJSON(a),{raster:i,outputPixelType:u="unknown"}=t;return o("Colormap",e?{colormapName:e,raster:i}:{colorRampName:s,raster:i},u)}function l(t){const{raster:a,histograms:n,outputPixelType:r}=t,e=t.statistics?.map((t=>({min:t.min,max:t.max,mean:t.avg,standardDeviation:t.stddev})));return o("StatisticsHistograms",{raster:a,statistics:e,histograms:n},r)}function p(t){const{raster:a,attributeTable:n,outputPixelType:r="unknown"}=t,e="toJSON"in n?n.toJSON():n;return o("Table",{raster:a,attributeTableAsRecordSet:e},r)}function c(t){const{raster:a,outputPixelType:n="unknown"}=t,r={raster:a,missingBandAction:"fail"===t.missingBandAction?1:0};return"bandIds"in t?r.bandIds=t.bandIds:"bandNames"in t?r.bandNames=t.bandNames:"bandWavelengths"in t&&(r.bandWavelengths=t.bandWavelengths),o("ExtractBand",r,n)}function m(t){const{rasters:a,outputPixelType:n}=t;return o("CompositeBand",{rasters:a},n)}function d(t){const{allowUnmatched:a,raster:n,rangeMaps:r,outputPixelType:e}=t,s=r?.filter((({output:t})=>null!=t)),i=s?.flatMap((({range:t})=>t)),u=s?.map((({output:t})=>t)),l=r?.filter((t=>null==t.output))?.flatMap((({range:t})=>t));return o("Remap",{allowUnmatched:a,raster:n,inputRanges:i,outputValues:u,noDataRanges:l},e)}function f(t){const{raster:a,outputPixelType:n="unknown"}=t,r=t.includedRanges?.flatMap((t=>t)),e=t.noDataValues?.map((t=>t.join(" "))),s="match-all"===t.noDataInterpretation?1:0;return o("Mask",{raster:a,includedRanges:r,noDataInterpretation:s,noDataValues:e},n)}export{e as colormap,m as compositeBands,c as extractBand,f as mask,d as remap,l as statisticsHistogram,p as table};
5
+ import{getNamedColor as t,hex2rgba as a}from"../../../../colorUtils.js";import{colormapName as n}from"../../rasterFunctionConstants.js";import{createRasterFunction as o}from"./utils.js";import{colorRampDict as r}from"../../../../renderers/support/colorRampUtils.js";function e(t){return"colormap"in t?s(t):"colorRamp"in t?i(t):u(t)}function s(n){const r=n.colormap.map((n=>{if("value"in n){const o="string"==typeof n.color?t(n.color)??a(n.color):n.color;(n=[n.value,...o])[4]&&n[4]<=1&&(n[4]=Math.round(255*n[4]))}return n})),{raster:e,outputPixelType:s}=n;return o("Colormap",{colormap:r,raster:e},s)}function i(t){const{raster:a,colorRamp:n,outputPixelType:r}=t,e={colorRamp:"toJSON"in n?n.toJSON():n,raster:a};return o("Colormap",e,r)}function u(t){const{colorRampName:a}=t,e=Object.values(n).find((t=>t.toLowerCase()===a?.toLowerCase())),s=r.toJSON(a),{raster:i,outputPixelType:u="unknown"}=t;return o("Colormap",e?{colormapName:e,raster:i}:{colorRampName:s,raster:i},u)}function l(t){const{raster:a,histograms:n,outputPixelType:r}=t,e=t.statistics?.map((t=>({min:t.min,max:t.max,mean:t.avg,standardDeviation:t.stddev})));return o("StatisticsHistograms",{raster:a,statistics:e,histograms:n},r)}function p(t){const{raster:a,attributeTable:n,outputPixelType:r="unknown"}=t,e="toJSON"in n?n.toJSON():n;return o("Table",{raster:a,attributeTableAsRecordSet:e},r)}function c(t){const{raster:a,outputPixelType:n="unknown"}=t,r={raster:a,missingBandAction:"fail"===t.missingBandAction?1:0};return"bandIds"in t?r.bandIds=t.bandIds:"bandNames"in t?r.bandNames=t.bandNames:"bandWavelengths"in t&&(r.bandWavelengths=t.bandWavelengths),o("ExtractBand",r,n)}function m(t){const{rasters:a,outputPixelType:n}=t;return o("CompositeBand",{rasters:a},n)}function d(t){const{allowUnmatched:a,raster:n,rangeMaps:r,outputPixelType:e}=t,s=r?.filter((({output:t})=>null!=t)),i=s?.flatMap((({range:t})=>t)),u=s?.map((({output:t})=>t)),l=r?.filter((t=>null==t.output))?.flatMap((({range:t})=>t));return o("Remap",{allowUnmatched:a,raster:n,inputRanges:i,outputValues:u,noDataRanges:l},e)}function f(t){const{raster:a,outputPixelType:n="unknown"}=t,r=t.includedRanges?.flatMap((t=>t)),e=t.noDataValues?.map((t=>t.join(" "))),s="match-all"===t.noDataInterpretation?1:0;return o("Mask",{raster:a,includedRanges:r,noDataInterpretation:s,noDataValues:e},n)}export{e as colormap,m as compositeBands,c as extractBand,f as mask,d as remap,l as statisticsHistogram,p as table};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import"../geometry.js";import t from"../Graphic.js";import r from"../request.js";import o from"../core/Error.js";import i from"../core/Loadable.js";import s from"../core/Logger.js";import{MultiOriginJSONMixin as a}from"../core/MultiOriginJSONSupport.js";import{isAbortError as n}from"../core/promiseUtils.js";import{urlToObject as l}from"../core/urlUtils.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import p from"../geometry/Extent.js";import{fromJSON as c}from"../geometry/support/jsonUtils.js";import{versionMatches as m,onApplyEditsEvent as y,onUpdateMomentEvent as h,emitApplyEditsEvent as f}from"../layers/mixins/EditBusLayer.js";import{parse as g}from"../layers/support/arcgisLayerUrl.js";import v from"./support/TopologyValidationJobInfo.js";import{networkFromPortalItem as w}from"./support/utils.js";import j from"../geometry/SpatialReference.js";let S=class extends(a(i)){static fromPortalItem(e){return w(e)}constructor(e){super(e),this.id=null,this.title=null,this.layerUrl=null,this.dataElement=null,this.fullExtent=null,this.spatialReference=null,this.type=null,this.sourceJSON=null,this.gdbVersion=null,this.historicMoment=null,this._applyEditsHandler=e=>{const{serviceUrl:t,gdbVersion:r,result:o}=e,i=t===this.featureServiceUrl,s=m(t,r,this.gdbVersion);i&&s&&o.then((e=>{this.historicMoment=e.historicMoment}))},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:r,moment:o}=e,i=t===this.featureServiceUrl,s=m(t,r,this.gdbVersion);i&&s&&(this.historicMoment=o)},this.when().then((()=>{this.addHandles([y(this._applyEditsHandler),h(this._updateMomentHandler)])}),(()=>{}))}initialize(){this.when().catch((e=>{n(e)||s.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}get datasetName(){return this.dataElement?.name??null}get owner(){return this.dataElement?.userIdentity??null}get schemaGeneration(){return this.dataElement?.schemaGeneration??null}get parsedUrl(){return l(this.layerUrl)}get featureServiceUrl(){return g(this.parsedUrl.path).url.path}get networkServiceUrl(){return this.featureServiceUrl.replace(/\/FeatureServer/i,"/UtilityNetworkServer")}get layerId(){return g(this.parsedUrl.path).sublayer}get networkSystemLayers(){return null}async load(e){return this.addResolvingPromise(this._fetchDataElement(this.featureServiceUrl,this.layerId.toString(),e)),this.addResolvingPromise(this._fetchLayerMetaData(this.layerUrl,e)),this}getLayerIdBySourceId(e){if(this.dataElement){const t=this.dataElement.domainNetworks;for(const r of t){for(const t of r.edgeSources??[])if(t.sourceId===e)return t.layerId;for(const t of r.junctionSources??[])if(t.sourceId===e)return t.layerId}return null}return null}async queryNamedTraceConfigurations(e,t){const[{queryNamedTraceConfigurations:r},{default:o}]=await Promise.all([import("../rest/networks/queryNamedTraceConfigurations.js"),import("../rest/networks/support/QueryNamedTraceConfigurationsParameters.js")]),i=this.networkServiceUrl,s=o.from(e);return(await r(i,s,{...t}))?.namedTraceConfigurations}async validateTopology(e,t){if(!e.validateArea)throw new o("network:undefined-validateArea","the network must have validateArea defined in the validate network topology parameters.");const[{validateNetworkTopology:r},{default:i}]=await Promise.all([import("../rest/networks/validateNetworkTopology.js"),import("../rest/networks/support/ValidateNetworkTopologyParameters.js")]),s=i.from(e);s.gdbVersion=this.gdbVersion;const a=this.networkServiceUrl,n=this.featureServiceUrl,l=f(n,null,null,!0),d=await r(a,s,{...t});if(d?.serviceEdits){const e=[];for(const t of d.serviceEdits){const{editedFeatures:r}=t,o=r?.spatialReference?new j(r.spatialReference):null;e.push({layerId:t.layerId,editedFeatures:{adds:r?.adds?.map((e=>this._createEditedFeature(e,o)))||[],updates:r?.updates?.map((e=>({original:this._createEditedFeature(e[0],o),current:this._createEditedFeature(e[1],o)})))||[],deletes:r?.deletes?.map((e=>this._createEditedFeature(e,o)))||[],spatialReference:o}})}l.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],editedFeatures:e,exceededTransferLimit:!1,historicMoment:d.moment})}return d}async submitTopologyValidationJob(e,t){if(!e.validateArea)throw new o("network:undefined-validateArea","the network must have validateArea defined in the validate network topology parameters.");if(!this.gdbVersion)throw new o("network:undefined-gdb-version","version must be defined");const[{submitValidateNetworkTopologyJob:r},{default:i}]=await Promise.all([import("../rest/networks/validateNetworkTopology.js"),import("../rest/networks/support/ValidateNetworkTopologyParameters.js")]),s=i.from(e);s.gdbVersion=this.gdbVersion;const a=this.networkServiceUrl,n=this.featureServiceUrl?f(this.featureServiceUrl,null,null,!0):void 0,l=await r(a,s,{...t});return new v({statusUrl:l,editsResolver:n})}_createEditedFeature(e,r){return new t({attributes:e.attributes,geometry:c({...e.geometry,spatialReference:r})})}async _fetchLayerMetaData(e,t){const o=await r(e,{responseType:"json",query:{f:"json"},...t});this.sourceJSON=o.data,this.read(o.data,{origin:"service"})}async _fetchDataElement(e,t,o){if(this.dataElement)return;const i=await r(`${e}/queryDataElements`,{responseType:"json",query:{layers:JSON.stringify([t]),f:"json"},...o}).then((e=>e.data.layerDataElements?.[0]));i&&this.read(i,{origin:"service"})}};e([d({type:String,nonNullable:!0,json:{origins:{"web-map":{read:!0,write:{isRequired:!0}},service:{read:!0}},read:!1}})],S.prototype,"id",void 0),e([d({type:String,nonNullable:!0,json:{origins:{"web-map":{read:!0,write:{isRequired:!0}},service:{read:{source:"name"}}},read:!1}})],S.prototype,"title",void 0),e([d({type:String,nonNullable:!0,json:{origins:{"web-map":{read:{source:"url"},write:{target:"url",isRequired:!0}}},read:!1}})],S.prototype,"layerUrl",void 0),e([d({type:Object,json:{origins:{service:{read:!0}},read:!1}})],S.prototype,"dataElement",void 0),e([d({type:p,json:{origins:{service:{read:{source:"extent"}}},read:!1}})],S.prototype,"fullExtent",void 0),e([d({type:j,json:{origins:{service:{read:{source:"extent.spatialReference"}}},read:!1}})],S.prototype,"spatialReference",void 0),e([d({type:["utility","trace"],readOnly:!0,json:{read:!1,write:!1}})],S.prototype,"type",void 0),e([d({readOnly:!0})],S.prototype,"datasetName",null),e([d({readOnly:!0})],S.prototype,"owner",null),e([d({readOnly:!0})],S.prototype,"schemaGeneration",null),e([d({readOnly:!0})],S.prototype,"parsedUrl",null),e([d({readOnly:!0})],S.prototype,"featureServiceUrl",null),e([d({readOnly:!0})],S.prototype,"networkServiceUrl",null),e([d({readOnly:!0})],S.prototype,"layerId",null),e([d()],S.prototype,"sourceJSON",void 0),e([d({readOnly:!0})],S.prototype,"networkSystemLayers",null),e([d()],S.prototype,"gdbVersion",void 0),e([d({type:Date})],S.prototype,"historicMoment",void 0),S=e([u("esri.networks.Network")],S);const b=S;export{b as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import"../geometry.js";import t from"../Graphic.js";import r from"../request.js";import o from"../core/Error.js";import s from"../core/Loadable.js";import i from"../core/Logger.js";import{MultiOriginJSONMixin as a}from"../core/MultiOriginJSONSupport.js";import{isAbortError as n}from"../core/promiseUtils.js";import{urlToObject as l}from"../core/urlUtils.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import u from"../geometry/Extent.js";import{fromJSON as c}from"../geometry/support/jsonUtils.js";import{versionMatches as m,onApplyEditsEvent as y,onUpdateMomentEvent as h,emitApplyEditsEvent as f}from"../layers/mixins/EditBusLayer.js";import{parse as g}from"../layers/support/arcgisLayerUrl.js";import v from"./support/TopologyValidationJobInfo.js";import{networkFromPortalItem as w}from"./support/utils.js";import{isVersionInEditSession as j}from"../versionManagement/support/versionManagementUtils.js";import S from"../geometry/SpatialReference.js";let U=class extends(a(s)){static fromPortalItem(e){return w(e)}constructor(e){super(e),this.id=null,this.title=null,this.layerUrl=null,this.dataElement=null,this.fullExtent=null,this.spatialReference=null,this.type=null,this.sourceJSON=null,this.gdbVersion=null,this.historicMoment=null,this._applyEditsHandler=e=>{const{serviceUrl:t,gdbVersion:r,result:o}=e,s=t===this.featureServiceUrl,i=m(t,r,this.gdbVersion);s&&i&&o.then((e=>{j(t,r)&&(this.historicMoment=e.historicMoment)}))},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:r,moment:o}=e,s=t===this.featureServiceUrl,i=m(t,r,this.gdbVersion);s&&i&&(this.historicMoment=o)},this.when().then((()=>{this.addHandles([y(this._applyEditsHandler),h(this._updateMomentHandler)])}),(()=>{}))}initialize(){this.when().catch((e=>{n(e)||i.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}get datasetName(){return this.dataElement?.name??null}get owner(){return this.dataElement?.userIdentity??null}get schemaGeneration(){return this.dataElement?.schemaGeneration??null}get parsedUrl(){return l(this.layerUrl)}get featureServiceUrl(){return g(this.parsedUrl.path).url.path}get networkServiceUrl(){return this.featureServiceUrl.replace(/\/FeatureServer/i,"/UtilityNetworkServer")}get layerId(){return g(this.parsedUrl.path).sublayer}get networkSystemLayers(){return null}async load(e){return this.addResolvingPromise(this._fetchDataElement(this.featureServiceUrl,this.layerId.toString(),e)),this.addResolvingPromise(this._fetchLayerMetaData(this.layerUrl,e)),this}getLayerIdBySourceId(e){if(this.dataElement){const t=this.dataElement.domainNetworks;for(const r of t){for(const t of r.edgeSources??[])if(t.sourceId===e)return t.layerId;for(const t of r.junctionSources??[])if(t.sourceId===e)return t.layerId}return null}return null}async queryNamedTraceConfigurations(e,t){const[{queryNamedTraceConfigurations:r},{default:o}]=await Promise.all([import("../rest/networks/queryNamedTraceConfigurations.js"),import("../rest/networks/support/QueryNamedTraceConfigurationsParameters.js")]),s=this.networkServiceUrl,i=o.from(e);return(await r(s,i,{...t}))?.namedTraceConfigurations}async validateTopology(e,t){if(!e.validateArea)throw new o("network:undefined-validateArea","the network must have validateArea defined in the validate network topology parameters.");const[{validateNetworkTopology:r},{default:s}]=await Promise.all([import("../rest/networks/validateNetworkTopology.js"),import("../rest/networks/support/ValidateNetworkTopologyParameters.js")]),i=s.from(e);i.gdbVersion=this.gdbVersion;const a=this.networkServiceUrl,n=this.featureServiceUrl,l=f(n,null,null,!0),d=await r(a,i,{...t});if(d?.serviceEdits){const e=[];for(const t of d.serviceEdits){const{editedFeatures:r}=t,o=r?.spatialReference?new S(r.spatialReference):null;e.push({layerId:t.layerId,editedFeatures:{adds:r?.adds?.map((e=>this._createEditedFeature(e,o)))||[],updates:r?.updates?.map((e=>({original:this._createEditedFeature(e[0],o),current:this._createEditedFeature(e[1],o)})))||[],deletes:r?.deletes?.map((e=>this._createEditedFeature(e,o)))||[],spatialReference:o}})}l.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],editedFeatures:e,exceededTransferLimit:!1,historicMoment:d.moment})}return d}async submitTopologyValidationJob(e,t){if(!e.validateArea)throw new o("network:undefined-validateArea","the network must have validateArea defined in the validate network topology parameters.");if(!this.gdbVersion)throw new o("network:undefined-gdb-version","version must be defined");const[{submitValidateNetworkTopologyJob:r},{default:s}]=await Promise.all([import("../rest/networks/validateNetworkTopology.js"),import("../rest/networks/support/ValidateNetworkTopologyParameters.js")]),i=s.from(e);i.gdbVersion=this.gdbVersion;const a=this.networkServiceUrl,n=this.featureServiceUrl?f(this.featureServiceUrl,null,null,!0):void 0,l=await r(a,i,{...t});return new v({statusUrl:l,editsResolver:n})}_createEditedFeature(e,r){return new t({attributes:e.attributes,geometry:c({...e.geometry,spatialReference:r})})}async _fetchLayerMetaData(e,t){const o=await r(e,{responseType:"json",query:{f:"json"},...t});this.sourceJSON=o.data,this.read(o.data,{origin:"service"})}async _fetchDataElement(e,t,o){if(this.dataElement)return;const s=await r(`${e}/queryDataElements`,{responseType:"json",query:{layers:JSON.stringify([t]),f:"json"},...o}).then((e=>e.data.layerDataElements?.[0]));s&&this.read(s,{origin:"service"})}};e([d({type:String,nonNullable:!0,json:{origins:{"web-map":{read:!0,write:{isRequired:!0}},service:{read:!0}},read:!1}})],U.prototype,"id",void 0),e([d({type:String,nonNullable:!0,json:{origins:{"web-map":{read:!0,write:{isRequired:!0}},service:{read:{source:"name"}}},read:!1}})],U.prototype,"title",void 0),e([d({type:String,nonNullable:!0,json:{origins:{"web-map":{read:{source:"url"},write:{target:"url",isRequired:!0}}},read:!1}})],U.prototype,"layerUrl",void 0),e([d({type:Object,json:{origins:{service:{read:!0}},read:!1}})],U.prototype,"dataElement",void 0),e([d({type:u,json:{origins:{service:{read:{source:"extent"}}},read:!1}})],U.prototype,"fullExtent",void 0),e([d({type:S,json:{origins:{service:{read:{source:"extent.spatialReference"}}},read:!1}})],U.prototype,"spatialReference",void 0),e([d({type:["utility","trace"],readOnly:!0,json:{read:!1,write:!1}})],U.prototype,"type",void 0),e([d({readOnly:!0})],U.prototype,"datasetName",null),e([d({readOnly:!0})],U.prototype,"owner",null),e([d({readOnly:!0})],U.prototype,"schemaGeneration",null),e([d({readOnly:!0})],U.prototype,"parsedUrl",null),e([d({readOnly:!0})],U.prototype,"featureServiceUrl",null),e([d({readOnly:!0})],U.prototype,"networkServiceUrl",null),e([d({readOnly:!0})],U.prototype,"layerId",null),e([d()],U.prototype,"sourceJSON",void 0),e([d({readOnly:!0})],U.prototype,"networkSystemLayers",null),e([d()],U.prototype,"gdbVersion",void 0),e([d({type:Date})],U.prototype,"historicMoment",void 0),U=e([p("esri.networks.Network")],U);const b=U;export{b as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.28.0-next.20230921",
3
+ "version": "4.28.0-next.20230923",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
package/request.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import e from"./config.js";import{id as t}from"./kernel.js";import r from"./core/Error.js";import has from"./core/has.js";import{clone as s}from"./core/lang.js";import{onAbort as o,isAbortError as a,createAbortError as n,isAborted as i}from"./core/promiseUtils.js";import{queryToObject as l,isDataProtocol as u,isBlobProtocol as c,normalize as d,getInterceptor as p,isTrustedServer as h,getOrigin as m,toHTTPS as f,addQueryParameter as y,objectToQuery as w,getProxyRule as g,getProxyUrl as b,addQueryParameters as q,hasSameOrigin as T,getAppUrl as k,addProxyRule as S}from"./core/urlUtils.js";import{isSecureProxyService as O}from"./portal/support/urlUtils.js";import{supportsApiKey as C}from"./support/apiKeyUtils.js";import{registerNoCorsDomains as v,isNoCorsRequestRequired as x,sendNoCorsRequest as L,createTimeoutError as E,loadImageAsync as U}from"./support/requestUtils.js";async function j(e,t){e instanceof URL&&(e=e.toString()),t?.query instanceof URLSearchParams&&(t.query=l(t.query.toString().replaceAll("+"," ")));const r=u(e),s=c(e);s||r||(e=d(e));const a={url:e,requestOptions:{...t}};let n=p(e);if(n){const e=await J(n,a);if(null!=e)return{data:e,getHeader:R,httpStatus:200,requestOptions:a.requestOptions,url:a.url};n.after||n.error||(n=null)}if(e=a.url,"image"===(t=a.requestOptions).responseType&&(has("host-webworker")||has("host-node")))throw B("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),a);if("head"===t.method){if(t.body)throw B("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),a);if(r||s)throw B("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),a)}if(await $(),P)return P.execute(e,t);const i=new AbortController;o(t,(()=>i.abort()));const h={controller:i,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:n,params:a,redoRequest:!1,useIdentity:D.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},m=await V(h);return n?.after?.(m),m}let P;const D=e.request,_="FormData"in globalThis,A=[499,498,403,401],F=["COM_0056","COM_0057","SB_0008"],I=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],R=()=>null,M=Symbol();function H(e){const t=m(e);t&&!j._corsServers.includes(t)&&j._corsServers.push(t)}function N(e){const t=m(e);return!t||t.endsWith(".arcgis.com")||j._corsServers.includes(t)||h(t)}function B(e,t,o,i){let l="Error";const u={url:o.url,requestOptions:o.requestOptions,getHeader:R,ssl:!1};if(t instanceof r)return t.details?(t.details=s(t.details),t.details.url=o.url,t.details.requestOptions=o.requestOptions):t.details=u,t;if(t){const e=i&&(e=>i.headers.get(e)),r=i?.status,s=t.message;s&&(l=s),e&&(u.getHeader=e),u.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||r||0,u.subCode=t.subcode,u.messageCode=t.messageCode,"string"==typeof t.details?u.messages=[t.details]:u.messages=t.details,u.raw=M in t?t[M]:t}return a(t)?n():new r(e,l,u)}async function $(){has("host-webworker")?P||(P=await import("./core/workers/request.js")):j._abortableFetch||(j._abortableFetch=globalThis.fetch.bind(globalThis))}async function z(){t||await import("./identity/IdentityManager.js")}async function K(r){const s=r.params.url,o=r.params.requestOptions,a=r.controller.signal,n=o.body;let l=null,u=null;if(_&&"HTMLFormElement"in globalThis&&(n instanceof FormData?l=n:n instanceof HTMLFormElement&&(l=new FormData(n))),"string"==typeof n&&(u=n),r.fetchOptions={cache:o.cacheBust&&!("polyfill"in j._abortableFetch)?"no-cache":"default",credentials:"same-origin",headers:o.headers||{},method:"head"===o.method?"HEAD":"GET",mode:"cors",priority:D.priority,redirect:"follow",signal:a},(l||u)&&(r.fetchOptions.body=l||u),"anonymous"===o.authMode&&(r.useIdentity=!1),r.hasToken=!!(/token=/i.test(s)||o.query?.token||l?.get("token")),!r.hasToken&&e.apiKey&&C(s)&&(o.query||(o.query={}),o.query.token=e.apiKey,r.hasToken=!0),r.useIdentity&&!r.hasToken&&!r.credentialToken&&!W(s)&&!i(a)){let e;"immediate"===o.authMode?(await z(),e=await t.getCredential(s,{signal:a}),r.credential=e):"no-prompt"===o.authMode?(await z(),e=await t.getCredential(s,{prompt:!1,signal:a}).catch((()=>{})),r.credential=e):t&&(e=t.findCredential(s)),e&&(r.credentialToken=e.token,r.useSSL=!!e.ssl)}}function W(e){return I.some((t=>t.test(e)))}async function G(e){let r=e.params.url;const s=e.params.requestOptions,o=e.fetchOptions??{},a=c(r)||u(r),i=s.responseType||"json",l=a?0:null!=s.timeout?s.timeout:D.timeout;let d=!1;if(!a){e.useSSL&&(r=f(r)),s.cacheBust&&"default"===o.cache&&(r=y(r,"request.preventCache",Date.now()));let a={...s.query};e.credentialToken&&(a.token=e.credentialToken);let n=w(a);has("esri-url-encodes-apostrophe")&&(n=n.replaceAll("'","%27"));const i=r.length+1+n.length;let l;d="delete"===s.method||"post"===s.method||"put"===s.method||!!s.body||i>D.maxUrlLength;const u=s.useProxy||!!g(r);if(u){const e=b(r);l=e.path,!d&&l.length+1+i>D.maxUrlLength&&(d=!0),e.query&&(a={...e.query,...a})}if("HEAD"===o.method&&(d||u)){if(d){if(i>D.maxUrlLength)throw B("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw B("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(u)throw B("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(d?(o.method="delete"===s.method?"DELETE":"put"===s.method?"PUT":"POST",s.body?r=q(r,a):(o.body=w(a),o.headers||(o.headers={}),o.headers["Content-Type"]="application/x-www-form-urlencoded")):r=q(r,a),u&&(e.useProxy=!0,r=`${l}?${r}`),a.token&&_&&o.body instanceof FormData&&!O(r)&&o.body.set("token",a.token),s.hasOwnProperty("withCredentials"))e.withCredentials=s.withCredentials;else if(!T(r,k()))if(h(r))e.withCredentials=!0;else if(t){const s=t.findServerInfo(r);s?.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(o.credentials="include",x(r)&&await L(d?q(r,a):r))}let p,C,v=0,U=!1;l>0&&(v=setTimeout((()=>{U=!0,e.controller.abort()}),l));try{if("native-request-init"===s.responseType)C=o,C.url=r;else if("image"!==s.responseType||"default"!==o.cache||"GET"!==o.method||d||X(s.headers)||!a&&!e.useProxy&&D.proxyUrl&&!N(r)){if(p=await j._abortableFetch(r,o),e.useProxy||H(r),"native"===s.responseType)C=p;else if("HEAD"!==o.method)if(p.ok){switch(i){case"array-buffer":C=await p.arrayBuffer();break;case"blob":case"image":C=await p.blob();break;default:C=await p.text()}if(v&&(clearTimeout(v),v=0),"json"===i||"xml"===i||"document"===i)if(C)switch(i){case"json":C=JSON.parse(C);break;case"xml":C=Q(C,"application/xml");break;case"document":C=Q(C,"text/html")}else C=null;if(C){if("array-buffer"===i||"blob"===i){const e=p.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&C["blob"===i?"size":"byteLength"]<=750)try{const e=await new Response(C).json();e.error&&(C=e)}catch{}}"image"===i&&C instanceof Blob&&(C=await Z(URL.createObjectURL(C),e,!0))}}else{C=await p.text();try{C=JSON.parse(C)}catch{}}}else C=await Z(r,e)}catch(P){if("AbortError"===P.name){if(U)throw E();throw n("Request canceled")}if(!(!p&&P instanceof TypeError&&D.proxyUrl)||s.body||"delete"===s.method||"head"===s.method||"post"===s.method||"put"===s.method||e.useProxy||N(r))throw P;e.redoRequest=!0,S({proxyUrl:D.proxyUrl,urlPrefix:m(r)??""})}finally{v&&clearTimeout(v)}return[p,C]}async function J(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let o,a;try{a=await e.before(t)}catch(s){o=B("request:interceptor",s,t)}if((a instanceof Error||a instanceof r)&&(o=B("request:interceptor",a,t)),o)throw e.error&&e.error(o),o;return a}}function X(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}function Q(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function V(e){let r,s;await K(e);try{do{[r,s]=await G(e)}while(!await Y(e,r,s))}catch(n){const t=B("request:server",n,e.params,r);throw t.details.ssl=e.useSSL,e.interceptor?.error&&e.interceptor.error(t),t}const o=e.params.url;if(s&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(o)){if(!e.hasToken&&!e.credentialToken&&s.user?.username&&!h(o)){const e=m(o,!0);e&&D.trustedServers.push(e)}Array.isArray(s.authorizedCrossOriginNoCorsDomains)&&v(s.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&t){const e=t.findServerInfo(a.server);let r=e?.owningSystemUrl;if(r){r=r.replace(/\/?$/,"/sharing");const e=t.findCredential(r,a.userId);e&&-1===t._getIdenticalSvcIdx(r,e)&&e.resources.unshift(r)}}return{data:s,getHeader:r?e=>r?.headers.get(e):R,httpStatus:r?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}async function Y(e,r,s){if(e.redoRequest)return e.redoRequest=!1,!1;const o=e.params.requestOptions;if(!r||"native"===o.responseType||"native-request-init"===o.responseType)return!0;let a,n;if(s&&(s.error?a=s.error:"error"===s.status&&Array.isArray(s.messages)&&(a={...s},a[M]=s,a.details=s.messages)),!a&&!r.ok)throw a=new Error(`Unable to load ${r.url} status: ${r.status}`),a[M]=s,a;let i,l=null;a&&(n=Number(a.code),l=a.hasOwnProperty("subcode")?Number(a.subcode):null,i=a.messageCode,i=i?.toUpperCase());const u=o.authMode;if(403===n&&(4===l||a.message?.toLowerCase().includes("ssl")&&!a.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==u||498===n)&&void 0!==n&&A.includes(n)&&!W(e.params.url)&&(403!==n||i&&!F.includes(i)&&(null==l||2===l&&e.credentialToken))){await z();try{const r=await t.getCredential(e.params.url,{error:B("request:server",a,e.params),prompt:"no-prompt"!==u,signal:e.controller.signal,token:e.credentialToken});return e.credential=r,e.credentialToken=r.token,e.useSSL=e.useSSL||r.ssl,!1}catch(c){if("no-prompt"===u)return e.credential=void 0,e.credentialToken=void 0,!1;a=c}}if(a)throw a;return!0}function Z(e,t,r=!1){const s=t.controller.signal,o=new Image;return t.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.fetchPriority=D.priority,o.src=e,U(o,e,r,s)}j._abortableFetch=null,j._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"];export{j as default};
5
+ import e from"./config.js";import{id as t}from"./kernel.js";import r from"./core/Error.js";import has from"./core/has.js";import{clone as s}from"./core/lang.js";import{onAbort as o,isAbortError as a,createAbortError as n,isAborted as i}from"./core/promiseUtils.js";import{queryToObject as l,isDataProtocol as u,isBlobProtocol as c,normalize as d,getInterceptor as p,isTrustedServer as h,getOrigin as m,toHTTPS as f,addQueryParameter as y,objectToQuery as w,getProxyRule as g,getProxyUrl as b,addQueryParameters as q,hasSameOrigin as T,getAppUrl as S,addProxyRule as k}from"./core/urlUtils.js";import{isSecureProxyService as O}from"./portal/support/urlUtils.js";import{supportsApiKey as C}from"./support/apiKeyUtils.js";import{registerNoCorsDomains as v,isNoCorsRequestRequired as x,sendNoCorsRequest as L,createTimeoutError as E,loadImageAsync as U}from"./support/requestUtils.js";async function j(e,t){e instanceof URL&&(e=e.toString()),t?.query instanceof URLSearchParams&&(t.query=l(t.query.toString().replaceAll("+"," ")));const r=u(e),s=c(e);s||r||(e=d(e));const a={url:e,requestOptions:{...t}};let n=p(e);if(n){const e=await J(n,a);if(null!=e)return{data:e,getHeader:R,httpStatus:200,requestOptions:a.requestOptions,url:a.url};n.after||n.error||(n=null)}if(e=a.url,"image"===(t=a.requestOptions).responseType&&(has("host-webworker")||has("host-node")))throw B("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),a);if("head"===t.method){if(t.body)throw B("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),a);if(r||s)throw B("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),a)}if(await $(),P)return P.execute(e,t);const i=new AbortController;o(t,(()=>i.abort()));const h={controller:i,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:n,params:a,redoRequest:!1,useIdentity:D.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},m=await V(h);return n?.after?.(m),m}let P;const D=e.request,_="FormData"in globalThis,A=new Set([499,498,403,401]),F=new Set(["COM_0056","COM_0057","SB_0008"]),I=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],R=()=>null,M=Symbol();function H(e){const t=m(e);t&&!j._corsServers.includes(t)&&j._corsServers.push(t)}function N(e){const t=m(e);return!t||t.endsWith(".arcgis.com")||j._corsServers.includes(t)||h(t)}function B(e,t,o,i){let l="Error";const u={url:o.url,requestOptions:o.requestOptions,getHeader:R,ssl:!1};if(t instanceof r)return t.details?(t.details=s(t.details),t.details.url=o.url,t.details.requestOptions=o.requestOptions):t.details=u,t;if(t){const e=i&&(e=>i.headers.get(e)),r=i?.status,s=t.message;s&&(l=s),e&&(u.getHeader=e),u.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||r||0,u.subCode=t.subcode,u.messageCode=t.messageCode,"string"==typeof t.details?u.messages=[t.details]:u.messages=t.details,u.raw=M in t?t[M]:t}return a(t)?n():new r(e,l,u)}async function $(){has("host-webworker")?P||(P=await import("./core/workers/request.js")):j._abortableFetch||(j._abortableFetch=globalThis.fetch.bind(globalThis))}async function z(){t||await import("./identity/IdentityManager.js")}async function K(r){const s=r.params.url,o=r.params.requestOptions,a=r.controller.signal,n=o.body;let l=null,u=null;if(_&&"HTMLFormElement"in globalThis&&(n instanceof FormData?l=n:n instanceof HTMLFormElement&&(l=new FormData(n))),"string"==typeof n&&(u=n),r.fetchOptions={cache:o.cacheBust&&!("polyfill"in j._abortableFetch)?"no-cache":"default",credentials:"same-origin",headers:o.headers||{},method:"head"===o.method?"HEAD":"GET",mode:"cors",priority:D.priority,redirect:"follow",signal:a},(l||u)&&(r.fetchOptions.body=l||u),"anonymous"===o.authMode&&(r.useIdentity=!1),r.hasToken=!!(/token=/i.test(s)||o.query?.token||l?.get("token")),!r.hasToken&&e.apiKey&&C(s)&&(o.query||(o.query={}),o.query.token=e.apiKey,r.hasToken=!0),r.useIdentity&&!r.hasToken&&!r.credentialToken&&!W(s)&&!i(a)){let e;"immediate"===o.authMode?(await z(),e=await t.getCredential(s,{signal:a}),r.credential=e):"no-prompt"===o.authMode?(await z(),e=await t.getCredential(s,{prompt:!1,signal:a}).catch((()=>{})),r.credential=e):t&&(e=t.findCredential(s)),e&&(r.credentialToken=e.token,r.useSSL=!!e.ssl)}}function W(e){return I.some((t=>t.test(e)))}async function G(e){let r=e.params.url;const s=e.params.requestOptions,o=e.fetchOptions??{},a=c(r)||u(r),i=s.responseType||"json",l=a?0:null!=s.timeout?s.timeout:D.timeout;let d=!1;if(!a){e.useSSL&&(r=f(r)),s.cacheBust&&"default"===o.cache&&(r=y(r,"request.preventCache",Date.now()));let a={...s.query};e.credentialToken&&(a.token=e.credentialToken);let n=w(a);has("esri-url-encodes-apostrophe")&&(n=n.replaceAll("'","%27"));const i=r.length+1+n.length;let l;d="delete"===s.method||"post"===s.method||"put"===s.method||!!s.body||i>D.maxUrlLength;const u=s.useProxy||!!g(r);if(u){const e=b(r);l=e.path,!d&&l.length+1+i>D.maxUrlLength&&(d=!0),e.query&&(a={...e.query,...a})}if("HEAD"===o.method&&(d||u)){if(d){if(i>D.maxUrlLength)throw B("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw B("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(u)throw B("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(d?(o.method="delete"===s.method?"DELETE":"put"===s.method?"PUT":"POST",s.body?r=q(r,a):(o.body=w(a),o.headers||(o.headers={}),o.headers["Content-Type"]="application/x-www-form-urlencoded")):r=q(r,a),u&&(e.useProxy=!0,r=`${l}?${r}`),a.token&&_&&o.body instanceof FormData&&!O(r)&&o.body.set("token",a.token),s.hasOwnProperty("withCredentials"))e.withCredentials=s.withCredentials;else if(!T(r,S()))if(h(r))e.withCredentials=!0;else if(t){const s=t.findServerInfo(r);s?.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(o.credentials="include",x(r)&&await L(d?q(r,a):r))}let p,C,v=0,U=!1;l>0&&(v=setTimeout((()=>{U=!0,e.controller.abort()}),l));try{if("native-request-init"===s.responseType)C=o,C.url=r;else if("image"!==s.responseType||"default"!==o.cache||"GET"!==o.method||d||X(s.headers)||!a&&!e.useProxy&&D.proxyUrl&&!N(r)){if(p=await j._abortableFetch(r,o),e.useProxy||H(r),"native"===s.responseType)C=p;else if("HEAD"!==o.method)if(p.ok){switch(i){case"array-buffer":C=await p.arrayBuffer();break;case"blob":case"image":C=await p.blob();break;default:C=await p.text()}if(v&&(clearTimeout(v),v=0),"json"===i||"xml"===i||"document"===i)if(C)switch(i){case"json":C=JSON.parse(C);break;case"xml":C=Q(C,"application/xml");break;case"document":C=Q(C,"text/html")}else C=null;if(C){if("array-buffer"===i||"blob"===i){const e=p.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&C["blob"===i?"size":"byteLength"]<=750)try{const e=await new Response(C).json();e.error&&(C=e)}catch{}}"image"===i&&C instanceof Blob&&(C=await Z(URL.createObjectURL(C),e,!0))}}else{C=await p.text();try{C=JSON.parse(C)}catch{}}}else C=await Z(r,e)}catch(P){if("AbortError"===P.name){if(U)throw E();throw n("Request canceled")}if(!(!p&&P instanceof TypeError&&D.proxyUrl)||s.body||"delete"===s.method||"head"===s.method||"post"===s.method||"put"===s.method||e.useProxy||N(r))throw P;e.redoRequest=!0,k({proxyUrl:D.proxyUrl,urlPrefix:m(r)??""})}finally{v&&clearTimeout(v)}return[p,C]}async function J(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let o,a;try{a=await e.before(t)}catch(s){o=B("request:interceptor",s,t)}if((a instanceof Error||a instanceof r)&&(o=B("request:interceptor",a,t)),o)throw e.error&&e.error(o),o;return a}}function X(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}function Q(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function V(e){let r,s;await K(e);try{do{[r,s]=await G(e)}while(!await Y(e,r,s))}catch(n){const t=B("request:server",n,e.params,r);throw t.details.ssl=e.useSSL,e.interceptor?.error&&e.interceptor.error(t),t}const o=e.params.url;if(s&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(o)){if(!e.hasToken&&!e.credentialToken&&s.user?.username&&!h(o)){const e=m(o,!0);e&&D.trustedServers.push(e)}Array.isArray(s.authorizedCrossOriginNoCorsDomains)&&v(s.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&t){const e=t.findServerInfo(a.server);let r=e?.owningSystemUrl;if(r){r=r.replace(/\/?$/,"/sharing");const e=t.findCredential(r,a.userId);e&&-1===t._getIdenticalSvcIdx(r,e)&&e.resources.unshift(r)}}return{data:s,getHeader:r?e=>r?.headers.get(e):R,httpStatus:r?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}async function Y(e,r,s){if(e.redoRequest)return e.redoRequest=!1,!1;const o=e.params.requestOptions;if(!r||"native"===o.responseType||"native-request-init"===o.responseType)return!0;let a,n;if(s&&(s.error?a=s.error:"error"===s.status&&Array.isArray(s.messages)&&(a={...s},a[M]=s,a.details=s.messages)),!a&&!r.ok)throw a=new Error(`Unable to load ${r.url} status: ${r.status}`),a[M]=s,a;let i,l=null;a&&(n=Number(a.code),l=a.hasOwnProperty("subcode")?Number(a.subcode):null,i=a.messageCode,i=i?.toUpperCase());const u=o.authMode;if(403===n&&(4===l||a.message?.toLowerCase().includes("ssl")&&!a.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==u||498===n)&&void 0!==n&&A.has(n)&&!W(e.params.url)&&(403!==n||i&&!F.has(i)&&(null==l||2===l&&e.credentialToken))){await z();try{const r=await t.getCredential(e.params.url,{error:B("request:server",a,e.params),prompt:"no-prompt"!==u,signal:e.controller.signal,token:e.credentialToken});return e.credential=r,e.credentialToken=r.token,e.useSSL=e.useSSL||r.ssl,!1}catch(c){if("no-prompt"===u)return e.credential=void 0,e.credentialToken=void 0,!1;a=c}}if(a)throw a;return!0}function Z(e,t,r=!1){const s=t.controller.signal,o=new Image;return t.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.fetchPriority=D.priority,o.src=e,U(o,e,r,s)}j._abortableFetch=null,j._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"];export{j 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.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import s from"../../request.js";import{IdentifiableMixin as t}from"../../core/Identifiable.js";import{JSONSupportMixin as r}from"../../core/JSONSupport.js";import o from"../../core/Loadable.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{reader as n}from"../../core/accessorSupport/decorators/reader.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{parseUrl as p}from"../utils.js";import{readBoolean as u,readNumber as c}from"../support/jsonUtils.js";function l(e){return{data:d(e),sync:f(e),operations:y(e.capabilities,e),query:m(e),editing:S(e)}}function d(e){return{isDataVersioned:u(e,"hasVersionedData",!1)}}function y(e,s){const t=e?e.toLowerCase().split(",").map((e=>e.trim())):[],r=t.includes("query"),o=t.includes("editing")&&!s.datesInUnknownTimezone;let i=o&&t.includes("create"),n=o&&t.includes("delete"),a=o&&t.includes("update");return o&&!(i||n||a)&&(i=n=a=!0),{supportsAdd:i,supportsDelete:n,supportsEditing:o,supportsChangeTracking:t.includes("changetracking"),supportsQuery:r,supportsQueryDataElements:u(s,"supportsQueryDataElements",!1),supportsQueryDomains:u(s,"supportsQueryDomains",!1),supportsQueryContingentValues:u(s,"supportsQueryContingentValues",!1),supportsSync:t.includes("sync"),supportsUpdate:a}}function m(e){return{maxRecordCountFactor:c(e,"maxRecordCountFactor",void 0),maxRecordCount:c(e,"maxRecordCount",void 0)}}function S(e){const s=e?.advancedEditingCapabilities;return{supportsGlobalId:u(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:u(s,"supportsReturnServiceEditsInSourceSR",!1),supportsSplit:u(s,"supportsSplit",!1),supportsAsyncApplyEdits:u(s,"supportsAsyncApplyEdits",!1)}}function f(e){const s=e?.syncCapabilities,t=s?.supportedSyncDataOptions;return{supportsAsync:u(s,"supportsAsync",!1),supportedSyncDataOptions:{annotations:1==(1&t),dimensions:2==(2&t),contingentValues:4==(4&t),attributeRules:8==(8&t),utilityNetworkSystem:16==(16&t),annotationFullModel:32==(32&t),include3DObjects:64==(64&t),utilityNetworkMissingLayers:128==(128&t),preserveTrueCurves:256==(256&t)}}}let h=class extends(r(t(o))){constructor(e){super(e),this.sourceJSON=null,this.userTypeExtensions=[],this.layerInfos=[],this.tableInfos=[],this.capabilities=null}read(e,s){this.sourceJSON=e,super.read(e,s)}get utilityNetworkUrl(){for(const e of this.sourceJSON.layers)if("Utility Network Layer"===e.type)return`${this.url}/${e.id}`;return null}get versionManagementServiceUrl(){return this.sourceJSON.hasBranchVersionedData?this.url.replace(/\/FeatureServer/i,"/VersionManagementServer"):null}readCapabilities(e,s){return l(s)}load(e){return this.addResolvingPromise(this._fetchService(this.url,e)),Promise.resolve(this)}async _fetchService(e,t){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:p(e)});const r=await s(e,{responseType:"json",query:{f:"json"},...t});this.read(r.data)}};e([i()],h.prototype,"url",void 0),e([i()],h.prototype,"sourceJSON",void 0),e([i({readOnly:!0})],h.prototype,"utilityNetworkUrl",null),e([i({readOnly:!0})],h.prototype,"versionManagementServiceUrl",null),e([i()],h.prototype,"userTypeExtensions",void 0),e([i({json:{read:{source:"layers"}}})],h.prototype,"layerInfos",void 0),e([i({json:{read:{source:"tables"}}})],h.prototype,"tableInfos",void 0),e([i({readOnly:!0,json:{read:{source:["hasVersionedData","capabilities","supportsQueryDataElements","supportsQueryDomains","supportsQueryContingentValues","maxRecordCountFactor","maxRecordCount","advancedEditingCapabilities","supportsApplyEditsWithGlobalIds","syncCapabilities","datesInUnknownTimezone"]}}})],h.prototype,"capabilities",void 0),e([n("service","capabilities")],h.prototype,"readCapabilities",null),h=e([a("esri.services.FeatureService")],h);const v=h;export{v as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../request.js";import{isSome as s}from"../../core/arrayUtils.js";import r from"../../core/Error.js";import{IdentifiableMixin as i}from"../../core/Identifiable.js";import{JSONSupportMixin as a}from"../../core/JSONSupport.js";import{clone as o}from"../../core/lang.js";import n from"../../core/Loadable.js";import{property as u}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import{reader as d}from"../../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import l from"../../geometry/SpatialReference.js";import{getFeatureJSON as c,getFeatureIds as m,getAttachmentEditsJSON as y,unpackEditResultData as f,createEditedFeatures as h}from"../../layers/graphics/applyEditsUtils.js";import{checkEditingCapabilities as S,normalizeEdits as v,normalizeGeometries as g}from"../../layers/graphics/editingSupport.js";import{emitApplyEditsEvent as R}from"../../layers/mixins/EditBusLayer.js";import{parseUrl as b,asValidOptions as E,encode as F}from"../utils.js";import{unapplyEditsZUnitScaling as j}from"../query/operations/editsZScale.js";import{readBoolean as w,readNumber as A}from"../support/jsonUtils.js";import{isVersionInEditSession as k,currentSessionId as O}from"../../versionManagement/support/versionManagementUtils.js";function C(e){return{data:V(e),sync:N(e),operations:I(e.capabilities,e),query:D(e),editing:M(e)}}function V(e){return{isDataVersioned:w(e,"hasVersionedData",!1)}}function I(e,t){const s=e?e.toLowerCase().split(",").map((e=>e.trim())):[],r=s.includes("query"),i=s.includes("editing")&&!t.datesInUnknownTimezone;let a=i&&s.includes("create"),o=i&&s.includes("delete"),n=i&&s.includes("update");return i&&!(a||o||n)&&(a=o=n=!0),{supportsAdd:a,supportsDelete:o,supportsEditing:i,supportsChangeTracking:s.includes("changetracking"),supportsQuery:r,supportsQueryDataElements:w(t,"supportsQueryDataElements",!1),supportsQueryDomains:w(t,"supportsQueryDomains",!1),supportsQueryContingentValues:w(t,"supportsQueryContingentValues",!1),supportsSync:s.includes("sync"),supportsUpdate:n}}function D(e){return{maxRecordCountFactor:A(e,"maxRecordCountFactor",void 0),maxRecordCount:A(e,"maxRecordCount",void 0)}}function M(e){const t=e?.advancedEditingCapabilities;return{supportsGlobalId:w(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:w(t,"supportsReturnServiceEditsInSourceSR",!1),supportsSplit:w(t,"supportsSplit",!1),supportsAsyncApplyEdits:w(t,"supportsAsyncApplyEdits",!1)}}function N(e){const t=e?.syncCapabilities,s=t?.supportedSyncDataOptions;return{supportsAsync:w(t,"supportsAsync",!1),supportedSyncDataOptions:{annotations:1==(1&s),dimensions:2==(2&s),contingentValues:4==(4&s),attributeRules:8==(8&s),utilityNetworkSystem:16==(16&s),annotationFullModel:32==(32&s),include3DObjects:64==(64&s),utilityNetworkMissingLayers:128==(128&s),preserveTrueCurves:256==(256&s)}}}let U=class extends(a(i(n))){constructor(e){super(e),this.sourceJSON=null,this.userTypeExtensions=[],this.layerInfos=[],this.tableInfos=[],this.capabilities=null}read(e,t){this.sourceJSON=e,super.read(e,t)}get utilityNetworkUrl(){for(const e of this.sourceJSON.layers)if("Utility Network Layer"===e.type)return`${this.url}/${e.id}`;return null}get versionManagementServiceUrl(){return this.sourceJSON.hasBranchVersionedData?this.url.replace(/\/FeatureServer/i,"/VersionManagementServer"):null}readCapabilities(e,t){return C(t)}load(e){return this.addResolvingPromise(this._fetchService(this.url,e)),Promise.resolve(this)}async applyEdits(e,t){let s=null;try{const{results:r,edits:i,editedFeatures:a}=await this._internalApplyEdits(e,t),n=e=>e.filter((e=>!e.error)).map(o);let u=0;return r.map((e=>{s=R(this.url,null,t?.gdbVersion,!0);const r={edits:i[u],addedFeatures:n(e.addFeatureResults),updatedFeatures:n(e.updateFeatureResults),deletedFeatures:n(e.deleteFeatureResults),addedAttachments:n(e.addAttachmentResults),updatedAttachments:n(e.updateAttachmentResults),deletedAttachments:n(e.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:e.editMoment?new Date(e.editMoment):null};u+=1,a.length>0&&(r.editedFeatures=a),s.resolve(r),s=null})),r}catch(r){throw s&&s.reject(r),r}}async _internalApplyEdits(e,r){const i=r?.globalIdUsed??!1,a=l.fromJSON(this.sourceJSON.spatialReference),{edits:o,options:n}=await this._processApplyEditsParams(e,r),u=await Promise.all(o.map((async e=>{const t=e.addFeatures?.map((e=>c({spatialReference:a},e,null)))??[],r=(await Promise.all(t)).filter(s),o=e.updateFeatures?.map((e=>c({spatialReference:a},e,null)))??[],n=(await Promise.all(o)).filter(s),u=m(e.identifierFields,e.deleteFeatures,i);j(r,n,a);const d=await y(e.identifierFields,e);return{id:e.id,adds:r,updates:n,deletes:u,attachments:d}}))),d={gdbVersion:n?.gdbVersion,rollbackOnFailure:!0,useGlobalIds:i,returnEditMoment:!0,honorSequenceOfEdits:n?.honorSequenceOfEdits,usePreviousEditMoment:n?.usePreviousEditMoment,returnServiceEditsInSourceSR:n?.returnServiceEditsInSourceSR,returnServiceEditOption:"originalAndCurrentFeatures",async:!1},p=await k(this.url,r?.gdbVersion||null);p&&(d.sessionId=O),d.edits=JSON.stringify(u);const f=b(this.url),h=E(f.query,{query:F({...d,f:"json"}),method:"post"});p&&(h.authMode="immediate");const S=await t(this.url+"/applyEdits",h);return{...this._createServiceEditsResult(S),edits:o}}_createServiceEditsResult(e){const t=e.data,s=[];return{results:t.map((e=>{const t={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment},r=f(t),i=e.editedFeatures,a=i?.spatialReference?new l({wkid:i?.spatialReference.wkid,wkt:i?.spatialReference.wkt,latestWkid:i?.spatialReference.latestWkid,latestVcsWkid:i?.spatialReference.latestVcsWkid,vcsWkid:i?.spatialReference.vcsWkid}):null,o=h(i,a);return s.push({layerId:e.id,editedFeatures:o}),{id:e.id,editedFeatures:o,...r}})),editedFeatures:s}}async _processApplyEditsParams(e,t){const s={...t};return{edits:await Promise.all(e.map((async e=>{const s=this.capabilities,i=e&&(e.addFeatures||e.updateFeatures||e.deleteFeatures),a=e&&(e.addAttachments||e.updateAttachments||e.deleteAttachments);if(S(e,s,t,!!i,!!a,"feature-service"),!s.data.isDataVersioned&&t?.gdbVersion)throw new r("feature-service:invalid-parameter","'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");const o=v(e,s,"feature-service");return{...await g(o),id:e.id,identifierFields:e.identifierFields}}))),options:s}}async _fetchService(e,s){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:b(e)});const r=await t(e,{responseType:"json",query:{f:"json"},...s});this.read(r.data)}};e([u()],U.prototype,"url",void 0),e([u()],U.prototype,"sourceJSON",void 0),e([u({readOnly:!0})],U.prototype,"utilityNetworkUrl",null),e([u({readOnly:!0})],U.prototype,"versionManagementServiceUrl",null),e([u()],U.prototype,"userTypeExtensions",void 0),e([u({json:{read:{source:"layers"}}})],U.prototype,"layerInfos",void 0),e([u({json:{read:{source:"tables"}}})],U.prototype,"tableInfos",void 0),e([u({readOnly:!0,json:{read:{source:["hasVersionedData","capabilities","supportsQueryDataElements","supportsQueryDomains","supportsQueryContingentValues","maxRecordCountFactor","maxRecordCount","advancedEditingCapabilities","supportsApplyEditsWithGlobalIds","syncCapabilities","datesInUnknownTimezone"]}}})],U.prototype,"capabilities",void 0),e([d("service","capabilities")],U.prototype,"readCapabilities",null),U=e([p("esri.services.FeatureService")],U);const x=U;export{x 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.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import"../../geometry.js";import{isSome as t}from"../../core/arrayUtils.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import{reader as o}from"../../core/accessorSupport/decorators/reader.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import a from"./DirectionsFeature.js";import n from"./FeatureSet.js";import p from"../../geometry/SpatialReference.js";import i from"../../geometry/Extent.js";import l from"../../geometry/Polyline.js";function u(e,t){if(0===e.length)return new l({spatialReference:t});const r=[];for(const n of e)for(const e of n.paths)r.push(...e);const o=[];r.forEach(((e,t)=>{0!==t&&e[0]===r[t-1][0]&&e[1]===r[t-1][1]||o.push(e)}));const{hasM:s,hasZ:a}=e[0];return new l({hasM:s,hasZ:a,paths:[o],spatialReference:t})}let m=class extends n{constructor(e){super(e),this.extent=null,this.features=[],this.geometryType="polyline",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,t){if(!e)return[];const r=t.summary.envelope.spatialReference??t.spatialReference,o=r&&p.fromJSON(r);return e.map((e=>{const t=a.fromJSON(e);if(null!=t.geometry&&(t.geometry.spatialReference=o),null!=t.events)for(const r of t.events)null!=r.geometry&&(r.geometry.spatialReference=o);return t}))}get mergedGeometry(){if(!this.features)return null;return u(this.features.map((({geometry:e})=>e)),this.extent.spatialReference)}get strings(){return this.features.map((({strings:e})=>e)).flat().filter(t)}};e([r({type:i,json:{read:{source:"summary.envelope"}}})],m.prototype,"extent",void 0),e([r({nonNullable:!0})],m.prototype,"features",void 0),e([o("features")],m.prototype,"readFeatures",null),e([r()],m.prototype,"geometryType",void 0),e([r({readOnly:!0})],m.prototype,"mergedGeometry",null),e([r()],m.prototype,"routeId",void 0),e([r()],m.prototype,"routeName",void 0),e([r({value:null,readOnly:!0})],m.prototype,"strings",null),e([r({json:{read:{source:"summary.totalDriveTime"}}})],m.prototype,"totalDriveTime",void 0),e([r({json:{read:{source:"summary.totalLength"}}})],m.prototype,"totalLength",void 0),e([r({json:{read:{source:"summary.totalTime"}}})],m.prototype,"totalTime",void 0),m=e([s("esri.rest.support.DirectionsFeatureSet")],m);const c=m;export{c as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import"../../geometry.js";import{isSome as t}from"../../core/arrayUtils.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import{reader as o}from"../../core/accessorSupport/decorators/reader.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import a from"./DirectionsFeature.js";import n from"./FeatureSet.js";import p from"../../geometry/SpatialReference.js";import i from"../../geometry/Extent.js";import l from"../../geometry/Polyline.js";function u(e,t){if(0===e.length)return new l({spatialReference:t});const r=[];for(const n of e)for(const e of n.paths)r.push(...e);const o=[];r.forEach(((e,t)=>{0!==t&&e[0]===r[t-1][0]&&e[1]===r[t-1][1]||o.push(e)}));const{hasM:s,hasZ:a}=e[0];return new l({hasM:s,hasZ:a,paths:[o],spatialReference:t})}let m=class extends n{constructor(e){super(e),this.extent=null,this.features=[],this.geometryType="polyline",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,t){if(!e)return[];const r=t.summary.envelope.spatialReference??t.spatialReference,o=r&&p.fromJSON(r);return e.map((e=>{const t=a.fromJSON(e);if(null!=t.geometry&&(t.geometry.spatialReference=o),null!=t.events)for(const r of t.events)null!=r.geometry&&(r.geometry.spatialReference=o);return t}))}get mergedGeometry(){if(!this.features)return null;return u(this.features.map((({geometry:e})=>e)),this.extent.spatialReference)}get strings(){return this.features.flatMap((({strings:e})=>e)).filter(t)}};e([r({type:i,json:{read:{source:"summary.envelope"}}})],m.prototype,"extent",void 0),e([r({nonNullable:!0})],m.prototype,"features",void 0),e([o("features")],m.prototype,"readFeatures",null),e([r()],m.prototype,"geometryType",void 0),e([r({readOnly:!0})],m.prototype,"mergedGeometry",null),e([r()],m.prototype,"routeId",void 0),e([r()],m.prototype,"routeName",void 0),e([r({value:null,readOnly:!0})],m.prototype,"strings",null),e([r({json:{read:{source:"summary.totalDriveTime"}}})],m.prototype,"totalDriveTime",void 0),e([r({json:{read:{source:"summary.totalLength"}}})],m.prototype,"totalLength",void 0),e([r({json:{read:{source:"summary.totalTime"}}})],m.prototype,"totalTime",void 0),m=e([s("esri.rest.support.DirectionsFeatureSet")],m);const c=m;export{c as default};