@arcgis/core 5.1.0-next.63 → 5.1.0-next.65

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 (346) hide show
  1. package/Camera.d.ts +1 -1
  2. package/Ground.d.ts +7 -7
  3. package/PopupTemplate.d.ts +8 -8
  4. package/WebDocument2D.js +1 -1
  5. package/WebScene.d.ts +1 -1
  6. package/WebScene.js +1 -1
  7. package/analysis/AreaMeasurementAnalysis.d.ts +1 -1
  8. package/analysis/DirectLineMeasurementAnalysis.d.ts +1 -1
  9. package/analysis/LengthDimension.d.ts +4 -4
  10. package/analysis/ShadowCastAnalysis.d.ts +3 -3
  11. package/analysis/SliceAnalysis.d.ts +1 -1
  12. package/analysis/SlicePlane.d.ts +1 -1
  13. package/applications/Components/featureUtils.d.ts +24 -0
  14. package/applications/Components/featureUtils.js +1 -1
  15. package/arcade/geometry/wkt.js +1 -1
  16. package/assets/esri/core/workers/RemoteClient.js +1 -1
  17. package/assets/esri/core/workers/chunks/{8166ad6bbd7d7a8f91cf.js → 0f3b8a08f843a080af0d.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{354351ab3fc79dedf9a8.js → 4eca871ca51a59f6540a.js} +1 -1
  19. package/assets/esri/core/workers/chunks/7e97684e851274efd11f.js +1 -0
  20. package/assets/esri/core/workers/chunks/86f1aa2c108f5224d8b5.js +1 -0
  21. package/assets/esri/core/workers/chunks/b8acb6c2538053c01cc6.js +1 -0
  22. package/assets/esri/core/workers/chunks/d9d69cf2496ebe76eade.js +1 -0
  23. package/assets/esri/core/workers/chunks/{6c72dbd5275bffde1583.js → e622a23034f055de8b55.js} +1 -1
  24. package/assets/esri/core/workers/chunks/ec9d5dcf2a0a11c85341.js +1 -0
  25. package/config.js +1 -1
  26. package/effects/FocusAreas.d.ts +1 -1
  27. package/form/elements/FieldElement.d.ts +1 -1
  28. package/form/elements/GroupElement.d.ts +1 -1
  29. package/form/elements/TextElement.d.ts +1 -1
  30. package/form/elements/inputs/ComboBoxInput.d.ts +1 -1
  31. package/form/elements/inputs/RadioButtonsInput.d.ts +1 -1
  32. package/form/elements/inputs/SwitchInput.d.ts +1 -1
  33. package/geometry/Mesh.d.ts +7 -7
  34. package/geometry/operators/alphaShapeOperator.d.ts +1 -1
  35. package/geometry/operators/areaOperator.d.ts +1 -1
  36. package/geometry/operators/bufferOperator.d.ts +1 -1
  37. package/geometry/operators/centroidOperator.d.ts +1 -1
  38. package/geometry/operators/clipOperator.d.ts +1 -1
  39. package/geometry/operators/containsOperator.d.ts +1 -1
  40. package/geometry/operators/convexHullOperator.d.ts +1 -1
  41. package/geometry/operators/crossesOperator.d.ts +1 -1
  42. package/geometry/operators/cutOperator.d.ts +1 -1
  43. package/geometry/operators/densifyOperator.d.ts +1 -1
  44. package/geometry/operators/differenceOperator.d.ts +1 -1
  45. package/geometry/operators/disjointOperator.d.ts +1 -1
  46. package/geometry/operators/distanceOperator.d.ts +1 -1
  47. package/geometry/operators/generalizeOperator.d.ts +1 -1
  48. package/geometry/operators/geodesicProximityOperator.d.ts +1 -1
  49. package/geometry/operators/geodeticDistanceOperator.d.ts +1 -1
  50. package/geometry/operators/geodeticUtilsOperator.d.ts +2 -2
  51. package/geometry/operators/graphicBufferOperator.d.ts +1 -1
  52. package/geometry/operators/intersectionOperator.d.ts +1 -1
  53. package/geometry/operators/intersectsOperator.d.ts +1 -1
  54. package/geometry/operators/isNearOperator.d.ts +1 -1
  55. package/geometry/operators/lengthOperator.d.ts +1 -1
  56. package/geometry/operators/locateBetweenOperator.d.ts +1 -1
  57. package/geometry/operators/multiPartToSinglePartOperator.d.ts +1 -1
  58. package/geometry/operators/offsetOperator.d.ts +5 -5
  59. package/geometry/operators/overlapsOperator.d.ts +1 -1
  60. package/geometry/operators/proximityOperator.d.ts +1 -1
  61. package/geometry/operators/simplifyOGCOperator.d.ts +1 -1
  62. package/geometry/operators/simplifyOperator.d.ts +1 -1
  63. package/geometry/operators/support/Transformation.d.ts +6 -6
  64. package/geometry/operators/symmetricDifferenceOperator.d.ts +1 -1
  65. package/geometry/operators/touchesOperator.d.ts +1 -1
  66. package/geometry/operators/unionOperator.d.ts +1 -1
  67. package/geometry/operators/withinOperator.d.ts +1 -1
  68. package/geometry/support/MeshMaterialMetallicRoughness.d.ts +1 -1
  69. package/geometry/support/vcsData.js +2 -0
  70. package/geometry/support/vcsLookup.js +2 -0
  71. package/kernel.js +1 -1
  72. package/layers/BuildingSceneLayer.d.ts +4 -4
  73. package/layers/CSVLayer.d.ts +2 -2
  74. package/layers/CatalogLayer.d.ts +2 -2
  75. package/layers/ElevationLayer.d.ts +1 -1
  76. package/layers/FeatureLayer.d.ts +2 -2
  77. package/layers/GeoJSONLayer.d.ts +2 -2
  78. package/layers/GeoRSSLayer.d.ts +1 -1
  79. package/layers/GraphicsLayer.d.ts +2 -2
  80. package/layers/ImageryLayer.d.ts +3 -3
  81. package/layers/ImageryTileLayer.d.ts +2 -2
  82. package/layers/IntegratedMesh3DTilesLayer.d.ts +6 -6
  83. package/layers/IntegratedMeshLayer.d.ts +7 -7
  84. package/layers/MapImageLayer.d.ts +1 -1
  85. package/layers/MediaLayer.d.ts +1 -1
  86. package/layers/OGCFeatureLayer.d.ts +2 -2
  87. package/layers/PointCloudLayer.d.ts +1 -1
  88. package/layers/SceneLayer.d.ts +9 -9
  89. package/layers/StreamLayer.d.ts +2 -2
  90. package/layers/VectorTileLayer.d.ts +2 -2
  91. package/layers/VideoLayer.d.ts +1 -1
  92. package/layers/VoxelLayer.d.ts +8 -8
  93. package/layers/WFSLayer.d.ts +6 -6
  94. package/layers/catalog/CatalogFootprintLayer.d.ts +1 -1
  95. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  96. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  97. package/layers/mixins/ArcGISImageService.js +1 -1
  98. package/layers/mixins/BlendLayer.d.ts +6 -6
  99. package/layers/pointCloudFilters/PointCloudReturnFilter.d.ts +1 -1
  100. package/layers/pointCloudFilters/PointCloudValueFilter.d.ts +1 -1
  101. package/layers/support/DimensionalDefinition.d.ts +2 -2
  102. package/layers/support/FeatureEffect.d.ts +4 -4
  103. package/layers/support/FeatureFilter.d.ts +17 -17
  104. package/layers/support/FeatureReductionBinning.d.ts +1 -1
  105. package/layers/support/FeatureReductionCluster.d.ts +9 -9
  106. package/layers/support/FeatureReductionSelection.d.ts +1 -1
  107. package/layers/support/LabelClass.d.ts +2 -2
  108. package/layers/support/RasterFunction.d.ts +1 -1
  109. package/layers/support/SceneFilter.d.ts +2 -2
  110. package/layers/support/SceneModification.d.ts +3 -3
  111. package/layers/support/capabilities.js +1 -1
  112. package/layers/support/featureLayerUtils.js +1 -1
  113. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  114. package/layers/types.d.ts +6 -0
  115. package/package.json +1 -1
  116. package/popup/Feature.d.ts +6 -6
  117. package/popup/Feature.js +1 -1
  118. package/popup/Features.d.ts +3 -14
  119. package/popup/Features.js +1 -1
  120. package/popup/content/AttachmentsContent.d.ts +1 -1
  121. package/popup/content/BarChartMediaInfo.d.ts +1 -1
  122. package/popup/content/ColumnChartMediaInfo.d.ts +1 -1
  123. package/popup/content/FieldsContent.d.ts +1 -1
  124. package/popup/content/ImageMediaInfo.d.ts +1 -1
  125. package/popup/content/LineChartMediaInfo.d.ts +1 -1
  126. package/popup/content/MediaContent.d.ts +1 -1
  127. package/popup/content/PieChartMediaInfo.d.ts +1 -1
  128. package/popup/content/RelationshipContent.d.ts +1 -1
  129. package/popup/content/TextContent.d.ts +1 -1
  130. package/popup/support/featureUtils.js +1 -1
  131. package/popup/types.d.ts +193 -8
  132. package/portal/schemas/definitions.js +1 -1
  133. package/renderers/ClassBreaksRenderer.d.ts +1 -1
  134. package/renderers/DictionaryRenderer.d.ts +1 -1
  135. package/renderers/DotDensityRenderer.d.ts +3 -3
  136. package/renderers/FlowRenderer.d.ts +5 -5
  137. package/renderers/HeatmapRenderer.d.ts +3 -3
  138. package/renderers/PieChartRenderer.d.ts +1 -1
  139. package/renderers/RasterShadedReliefRenderer.d.ts +1 -1
  140. package/renderers/Renderer.d.ts +4 -4
  141. package/renderers/SimpleRenderer.d.ts +2 -2
  142. package/renderers/UniqueValueRenderer.d.ts +2 -2
  143. package/renderers/VectorFieldRenderer.d.ts +1 -1
  144. package/renderers/mixins/VisualVariablesMixin.d.ts +12 -12
  145. package/renderers/visualVariables/ColorVariable.d.ts +1 -1
  146. package/renderers/visualVariables/OpacityVariable.d.ts +1 -1
  147. package/renderers/visualVariables/RotationVariable.d.ts +1 -1
  148. package/renderers/visualVariables/SizeVariable.d.ts +1 -1
  149. package/renderers/visualVariables/VisualVariable.d.ts +1 -1
  150. package/rest/query/support/AttachmentInfo.d.ts +1 -1
  151. package/rest/support/AttributeBinsQuery.d.ts +8 -8
  152. package/rest/support/AutoIntervalBinParameters.d.ts +1 -1
  153. package/rest/support/DateBinParameters.d.ts +1 -1
  154. package/rest/support/FixedBoundariesBinParameters.d.ts +1 -1
  155. package/rest/support/FixedIntervalBinParameters.d.ts +1 -1
  156. package/rest/support/Query.d.ts +8 -8
  157. package/rest/support/TopFeaturesQuery.d.ts +8 -8
  158. package/smartMapping/labels/clusters.d.ts +1 -1
  159. package/smartMapping/popup/clusters.d.ts +2 -2
  160. package/smartMapping/popup/templates.d.ts +1 -1
  161. package/smartMapping/raster/renderers/flow.d.ts +2 -2
  162. package/smartMapping/renderers/color.d.ts +12 -12
  163. package/smartMapping/renderers/predominance.d.ts +3 -3
  164. package/smartMapping/renderers/relationship.d.ts +15 -15
  165. package/smartMapping/renderers/univariateColorSize.d.ts +4 -4
  166. package/smartMapping/symbology/color.d.ts +4 -4
  167. package/smartMapping/symbology/flow.d.ts +2 -2
  168. package/smartMapping/symbology/types.d.ts +18 -18
  169. package/support/actions/ActionButton.d.ts +1 -1
  170. package/support/revision.js +1 -1
  171. package/symbols/CIMSymbol.d.ts +1 -1
  172. package/symbols/ExtrudeSymbol3DLayer.d.ts +1 -1
  173. package/symbols/FillSymbol3DLayer.d.ts +3 -3
  174. package/symbols/IconSymbol3DLayer.d.ts +1 -1
  175. package/symbols/LabelSymbol3D.d.ts +2 -2
  176. package/symbols/LineStyleMarker3D.d.ts +7 -7
  177. package/symbols/LineSymbol3D.d.ts +2 -2
  178. package/symbols/LineSymbol3DLayer.d.ts +7 -7
  179. package/symbols/LineSymbolMarker.d.ts +6 -6
  180. package/symbols/MarkerSymbol.d.ts +1 -1
  181. package/symbols/MeshSymbol3D.d.ts +2 -2
  182. package/symbols/ObjectSymbol3DLayer.d.ts +1 -1
  183. package/symbols/PathSymbol3DLayer.d.ts +14 -14
  184. package/symbols/PictureFillSymbol.d.ts +1 -1
  185. package/symbols/PictureMarkerSymbol.d.ts +1 -1
  186. package/symbols/PointSymbol3D.d.ts +3 -3
  187. package/symbols/PolygonSymbol3D.d.ts +5 -5
  188. package/symbols/SimpleFillSymbol.d.ts +8 -8
  189. package/symbols/SimpleLineSymbol.d.ts +20 -20
  190. package/symbols/SimpleMarkerSymbol.d.ts +7 -7
  191. package/symbols/Symbol3DLayer.d.ts +16 -16
  192. package/symbols/TextSymbol.d.ts +1 -1
  193. package/symbols/TextSymbol3DLayer.d.ts +1 -1
  194. package/symbols/WaterSymbol3DLayer.d.ts +3 -3
  195. package/symbols/WebStyleSymbol.d.ts +12 -12
  196. package/symbols/callouts/Callout3D.d.ts +1 -1
  197. package/symbols/callouts/LineCallout3D.d.ts +3 -3
  198. package/symbols/cim/types.d.ts +23 -23
  199. package/symbols/edges/Edges3D.d.ts +1 -1
  200. package/symbols/edges/SolidEdges3D.d.ts +1 -1
  201. package/symbols/patterns/LineStylePattern3D.d.ts +11 -11
  202. package/symbols/patterns/StylePattern3D.d.ts +8 -8
  203. package/symbols/support/ElevationInfo.d.ts +2 -2
  204. package/symbols/support/IconSymbol3DLayerResource.d.ts +6 -6
  205. package/symbols/support/ObjectSymbol3DLayerResource.d.ts +7 -7
  206. package/symbols/support/Symbol3DEmissive.d.ts +2 -2
  207. package/symbols/support/Symbol3DVerticalOffset.d.ts +2 -2
  208. package/views/2d/engine/flow/FlowStrategy.js +1 -1
  209. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  210. package/views/2d/engine/flow/styles/Particles.js +1 -1
  211. package/views/2d/engine/flow/styles/Stack.js +1 -1
  212. package/views/2d/engine/flow/styles/Streamlines.js +1 -1
  213. package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
  214. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  215. package/views/2d/layers/BaseLayerViewGL2D.d.ts +1 -1
  216. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  217. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  218. package/views/2d/types.d.ts +3 -3
  219. package/views/3d/FocusAreasView.js +1 -1
  220. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  221. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  222. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  223. package/views/3d/environment/CloudyWeather.d.ts +1 -1
  224. package/views/3d/environment/Environment.d.ts +4 -4
  225. package/views/3d/environment/FoggyWeather.d.ts +1 -1
  226. package/views/3d/environment/RainyWeather.d.ts +1 -1
  227. package/views/3d/environment/SnowyWeather.d.ts +1 -1
  228. package/views/3d/environment/SunLighting.d.ts +1 -1
  229. package/views/3d/environment/SunnyWeather.d.ts +1 -1
  230. package/views/3d/environment/VirtualLighting.d.ts +1 -1
  231. package/views/3d/layers/graphics/extrudeUtils.js +1 -1
  232. package/views/3d/support/renderInfoUtils/polygon.js +1 -1
  233. package/views/3d/webgl/RenderNode.d.ts +2 -2
  234. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  235. package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
  236. package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
  237. package/views/3d/webgl.d.ts +1 -1
  238. package/views/Magnifier.d.ts +3 -3
  239. package/views/MapView.d.ts +7 -7
  240. package/views/SceneView.d.ts +16 -16
  241. package/views/View.d.ts +17 -3
  242. package/views/View.js +1 -1
  243. package/views/interactive/sketch/SketchLabelOptions.d.ts +1 -1
  244. package/views/interactive/sketch/SketchTooltipOptions.d.ts +1 -1
  245. package/views/interactive/snapping/SnappingOptions.d.ts +7 -7
  246. package/views/layers/LineOfSightLayerView.d.ts +3 -2
  247. package/views/support/HighlightOptions.d.ts +1 -1
  248. package/views/types.d.ts +59 -2
  249. package/views/ui/DefaultUI.d.ts +2 -2
  250. package/webscene/Environment.d.ts +10 -10
  251. package/webscene/Glow.d.ts +1 -1
  252. package/webscene/background/ColorBackground.d.ts +1 -1
  253. package/widgets/AreaMeasurement2D.d.ts +1 -1
  254. package/widgets/AreaMeasurement3D.d.ts +2 -2
  255. package/widgets/Attachments.d.ts +1 -1
  256. package/widgets/Attribution.d.ts +1 -1
  257. package/widgets/BasemapGallery.d.ts +1 -1
  258. package/widgets/BasemapLayerList.d.ts +3 -3
  259. package/widgets/BasemapToggle.d.ts +1 -1
  260. package/widgets/Bookmarks/BookmarksVisibleElements.d.ts +1 -1
  261. package/widgets/Bookmarks.d.ts +2 -2
  262. package/widgets/BuildingExplorer.d.ts +1 -1
  263. package/widgets/CatalogLayerList.d.ts +3 -3
  264. package/widgets/Compass.d.ts +2 -2
  265. package/widgets/CoordinateConversion.d.ts +1 -1
  266. package/widgets/Daylight.d.ts +5 -5
  267. package/widgets/DirectLineMeasurement3D.d.ts +2 -2
  268. package/widgets/Directions.d.ts +4 -4
  269. package/widgets/DistanceMeasurement2D.d.ts +1 -1
  270. package/widgets/Editor/CreateFeaturesWorkflow.d.ts +1 -1
  271. package/widgets/Editor.d.ts +8 -8
  272. package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +1 -1
  273. package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +1 -1
  274. package/widgets/ElevationProfile/ElevationProfileLineView.d.ts +1 -1
  275. package/widgets/ElevationProfile.d.ts +3 -3
  276. package/widgets/Expand.d.ts +1 -1
  277. package/widgets/FeatureForm.d.ts +1 -1
  278. package/widgets/FeatureTable/ActionColumn.d.ts +2 -2
  279. package/widgets/FeatureTable/AttachmentsColumn.d.ts +1 -1
  280. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +3 -3
  281. package/widgets/FeatureTable/Grid/GroupColumn.d.ts +1 -1
  282. package/widgets/FeatureTable/RelationshipColumn.d.ts +1 -1
  283. package/widgets/FeatureTable/VisibleElements.d.ts +1 -1
  284. package/widgets/FeatureTable.d.ts +10 -10
  285. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.d.ts +5 -5
  286. package/widgets/FeatureTemplates.d.ts +8 -8
  287. package/widgets/Features/FeaturesViewModel.d.ts +2 -2
  288. package/widgets/Features/FeaturesVisibleElements.d.ts +2 -2
  289. package/widgets/Features.d.ts +1 -1
  290. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  291. package/widgets/FloorFilter.d.ts +2 -2
  292. package/widgets/Histogram.d.ts +2 -2
  293. package/widgets/HistogramRangeSlider.d.ts +1 -1
  294. package/widgets/Home.d.ts +1 -1
  295. package/widgets/LayerList/ListItemPanel.d.ts +1 -1
  296. package/widgets/LayerList.d.ts +4 -4
  297. package/widgets/Legend.d.ts +8 -8
  298. package/widgets/LineOfSight.d.ts +1 -1
  299. package/widgets/Locate.d.ts +2 -2
  300. package/widgets/Measurement.d.ts +1 -1
  301. package/widgets/NavigationToggle/NavigationToggleViewModel.d.ts +1 -1
  302. package/widgets/NavigationToggle.d.ts +3 -3
  303. package/widgets/Popup/PopupVisibleElements.d.ts +2 -2
  304. package/widgets/Popup.d.ts +5 -5
  305. package/widgets/Print/CustomTemplate.d.ts +1 -1
  306. package/widgets/Print/TemplateOptions.d.ts +4 -4
  307. package/widgets/ScaleRangeSlider.d.ts +1 -1
  308. package/widgets/Search/SearchViewModel.d.ts +4 -4
  309. package/widgets/Search.d.ts +5 -5
  310. package/widgets/ShadowCast.d.ts +3 -3
  311. package/widgets/Sketch/SketchViewModel.d.ts +39 -39
  312. package/widgets/Sketch.d.ts +43 -43
  313. package/widgets/Slice.d.ts +2 -2
  314. package/widgets/Slider/SliderViewModel.d.ts +2 -2
  315. package/widgets/Slider.d.ts +9 -9
  316. package/widgets/Swipe/SwipeViewModel.d.ts +1 -1
  317. package/widgets/Swipe.d.ts +2 -2
  318. package/widgets/TableList/ListItemPanel.d.ts +1 -1
  319. package/widgets/TableList.d.ts +1 -1
  320. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +10 -10
  321. package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
  322. package/widgets/TimeSlider/types.d.ts +1 -1
  323. package/widgets/TimeSlider.d.ts +13 -13
  324. package/widgets/Track.d.ts +2 -2
  325. package/widgets/UtilityNetworkAssociations.d.ts +3 -3
  326. package/widgets/UtilityNetworkTrace.d.ts +4 -4
  327. package/widgets/UtilityNetworkValidateTopology.d.ts +1 -1
  328. package/widgets/ValuePicker.d.ts +5 -5
  329. package/widgets/VideoPlayer.d.ts +1 -1
  330. package/widgets/smartMapping/ClassedColorSlider.d.ts +1 -1
  331. package/widgets/smartMapping/ClassedSizeSlider.d.ts +1 -1
  332. package/widgets/smartMapping/ColorSizeSlider.d.ts +2 -2
  333. package/widgets/smartMapping/ColorSlider.d.ts +1 -1
  334. package/widgets/smartMapping/HeatmapSlider.d.ts +1 -1
  335. package/widgets/smartMapping/OpacitySlider.d.ts +1 -1
  336. package/widgets/smartMapping/SizeSlider.d.ts +1 -1
  337. package/widgets/smartMapping/SmartMappingSliderBase.d.ts +4 -4
  338. package/widgets/smartMapping/SmartMappingSliderViewModel.d.ts +6 -6
  339. package/widgets/support/GridControls.d.ts +1 -1
  340. package/widgets/support/SnappingControls/VisibleElements.d.ts +1 -1
  341. package/widgets/support/SnappingControls.d.ts +6 -6
  342. package/assets/esri/core/workers/chunks/2aaeaf022af8493281dc.js +0 -1
  343. package/assets/esri/core/workers/chunks/2d92ba11781a3cfc3a78.js +0 -1
  344. package/assets/esri/core/workers/chunks/5c6e5f22450dd0583074.js +0 -1
  345. package/assets/esri/core/workers/chunks/75f7c1f600c4051bc905.js +0 -1
  346. package/assets/esri/core/workers/chunks/ee8cd91c27e9cdfc3b2e.js +0 -1
package/Camera.d.ts CHANGED
@@ -59,7 +59,7 @@ export default class Camera extends CameraSuperclass {
59
59
  * where smaller fov angles mimic a telephoto lens zooming in, and larger fov angles mimic a fish-eye lens
60
60
  * zooming out. The default angle is 55 degrees.
61
61
  *
62
- * ![camera field of view examples](https://developers.arcgis.com/javascript/latest/assets/references/core/views/3d/camera-fov.png)
62
+ * ![camera field of view examples](https://developers.arcgis.com/javascript/latest/assets/references/core/views/3d/camera-fov.avif)
63
63
  *
64
64
  * @default 55
65
65
  */
package/Ground.d.ts CHANGED
@@ -20,11 +20,11 @@ export interface GroundProperties extends LoadableMixinProperties, Partial<Pick<
20
20
  * that makes up the ground surface. When elevation layers are added to the ground, the topographical variations of
21
21
  * the surface are rendered in 3D as they would appear in the real world.
22
22
  *
23
- * ![elev-default](https://developers.arcgis.com/javascript/latest/assets/references/core/ground/elev-default.png)
23
+ * ![elev-default](https://developers.arcgis.com/javascript/latest/assets/references/core/ground/elev-default.avif)
24
24
  *
25
25
  * When the layers collection is empty, the ground surface is flat.
26
26
  *
27
- * ![no-elev](https://developers.arcgis.com/javascript/latest/assets/references/core/ground/no-elev.png)
27
+ * ![no-elev](https://developers.arcgis.com/javascript/latest/assets/references/core/ground/no-elev.avif)
28
28
  *
29
29
  * @example
30
30
  * // Adds the esri world elevation service to the ground
@@ -79,7 +79,7 @@ export interface GroundProperties extends LoadableMixinProperties, Partial<Pick<
79
79
  *
80
80
  * When no basemap is available, the Ground displays a grid by default:
81
81
  *
82
- * ![ground-grid](https://developers.arcgis.com/javascript/latest/assets/references/core/ground/ground-grid.png)
82
+ * ![ground-grid](https://developers.arcgis.com/javascript/latest/assets/references/core/ground/ground-grid.avif)
83
83
  *
84
84
  * That can be changed by setting a color on the [surfaceColor](https://developers.arcgis.com/javascript/latest/references/core/Ground/#surfaceColor) property:
85
85
  *
@@ -87,7 +87,7 @@ export interface GroundProperties extends LoadableMixinProperties, Partial<Pick<
87
87
  * map.ground.surfaceColor = '#004c73';
88
88
  * ```
89
89
  *
90
- * ![ground-color](https://developers.arcgis.com/javascript/latest/assets/references/core/ground/ground-color.png)
90
+ * ![ground-color](https://developers.arcgis.com/javascript/latest/assets/references/core/ground/ground-color.avif)
91
91
  *
92
92
  * If the scene contains underground data, reduce the [opacity](https://developers.arcgis.com/javascript/latest/references/core/Ground/#opacity) of the ground to be able to see through the ground:
93
93
  *
@@ -95,7 +95,7 @@ export interface GroundProperties extends LoadableMixinProperties, Partial<Pick<
95
95
  * map.ground.opacity = 0.4;
96
96
  * ```
97
97
  *
98
- * [![underground-global](https://developers.arcgis.com/javascript/latest/assets/references/core/ground/underground-global.png)](https://developers.arcgis.com/javascript/latest/sample-code/sceneview-underground/)
98
+ * [![underground-global](https://developers.arcgis.com/javascript/latest/assets/references/core/ground/underground-global.avif)](https://developers.arcgis.com/javascript/latest/sample-code/sceneview-underground/)
99
99
  *
100
100
  * @since 4.0
101
101
  * @see [Map.ground](https://developers.arcgis.com/javascript/latest/references/core/Map/#ground)
@@ -109,11 +109,11 @@ export default class Ground extends GroundSuperclass {
109
109
  * that makes up the ground surface. When elevation layers are added to the ground, the topographical variations of
110
110
  * the surface are rendered in 3D as they would appear in the real world.
111
111
  *
112
- * ![elev-default](https://developers.arcgis.com/javascript/latest/assets/references/core/ground/elev-default.png)
112
+ * ![elev-default](https://developers.arcgis.com/javascript/latest/assets/references/core/ground/elev-default.avif)
113
113
  *
114
114
  * When the layers collection is empty, the ground surface is flat.
115
115
  *
116
- * ![no-elev](https://developers.arcgis.com/javascript/latest/assets/references/core/ground/no-elev.png)
116
+ * ![no-elev](https://developers.arcgis.com/javascript/latest/assets/references/core/ground/no-elev.avif)
117
117
  *
118
118
  * @example
119
119
  * // Adds the esri world elevation service to the ground
@@ -20,7 +20,7 @@ export interface PopupTemplateProperties extends Partial<Pick<PopupTemplate, "la
20
20
  * Each object represents an action or function that may be executed by clicking the icon
21
21
  * or image symbolizing them in the [Popup](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/). By default, every
22
22
  * [Popup](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/) has a `zoom-to` action styled with a magnifying glass icon
23
- * ![popupTemplate-zoom-action](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/popuptemplate-zoom-action.png).
23
+ * ![popupTemplate-zoom-action](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/popuptemplate-zoom-action.avif).
24
24
  * When this icon is clicked, the view zooms in four LODs and centers on the selected feature.
25
25
  *
26
26
  * PopupTemplates do not have default actions. To override actions on the
@@ -95,7 +95,7 @@ export interface PopupTemplateProperties extends Partial<Pick<PopupTemplate, "la
95
95
  * that provides descriptive text as content.
96
96
  * - **media** - A [media content element](https://developers.arcgis.com/javascript/latest/references/core/popup/content/MediaContent/)
97
97
  * that is used to display media such as charts/images.
98
- * - **fields** - A [fields content element](https://developers.arcgis.com/javascript/latest/references/core/popup/content/FieldsContent/).
98
+ * - **fields** - A [fields content element](https://developers.arcgis.com/javascript/latest/references/core/popup/content/FieldsContent/)
99
99
  * that contains the fields to display within the content. If this is not set
100
100
  * directly within the `content` property, the popup will display whatever is set in the
101
101
  * [fieldInfos](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#fieldInfos) property.
@@ -321,7 +321,7 @@ export interface PopupTemplateProperties extends Partial<Pick<PopupTemplate, "la
321
321
  *
322
322
  * | **Content set using 'fields' type** | **Content referenced from fields set within fieldInfo** |
323
323
  * | -------------------------- | --------------------------- |
324
- * | ![popuptemplate-fields](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/popuptemplate-fields.png) | ![popuptemplate-fieldinfocontent](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/popuptemplate-fieldinfocontent.png) |
324
+ * | ![popuptemplate-fields](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/popuptemplate-fields.avif) | ![popuptemplate-fieldinfocontent](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/popuptemplate-fieldinfocontent.avif) |
325
325
  *
326
326
  * @example
327
327
  * // This snippet demonstrates how to show only a subset of fields.
@@ -401,7 +401,7 @@ export interface PopupTemplateProperties extends Partial<Pick<PopupTemplate, "la
401
401
  * the ability to perform actions related to the feature, such as zooming to it or performing a Query based on
402
402
  * the feature's location or attributes.
403
403
  *
404
- * [![popupTemplate-example](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/popup-basic.png)](https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=intro-popuptemplate)
404
+ * [![popupTemplate-example](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/popup-basic.avif)](https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=intro-popuptemplate)
405
405
  *
406
406
  * In the image above, the initial text **Marriage in Nassau County Census Tract 5177.01** is set in the [title](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#title)
407
407
  * property of the PopupTemplate where `CENSUS_TRACT` is the name of the field containing census tract numbers.
@@ -449,7 +449,7 @@ export default class PopupTemplate extends PopupTemplateSuperclass {
449
449
  * Each object represents an action or function that may be executed by clicking the icon
450
450
  * or image symbolizing them in the [Popup](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/). By default, every
451
451
  * [Popup](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/) has a `zoom-to` action styled with a magnifying glass icon
452
- * ![popupTemplate-zoom-action](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/popuptemplate-zoom-action.png).
452
+ * ![popupTemplate-zoom-action](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/popuptemplate-zoom-action.avif).
453
453
  * When this icon is clicked, the view zooms in four LODs and centers on the selected feature.
454
454
  *
455
455
  * PopupTemplates do not have default actions. To override actions on the
@@ -525,7 +525,7 @@ export default class PopupTemplate extends PopupTemplateSuperclass {
525
525
  * that provides descriptive text as content.
526
526
  * - **media** - A [media content element](https://developers.arcgis.com/javascript/latest/references/core/popup/content/MediaContent/)
527
527
  * that is used to display media such as charts/images.
528
- * - **fields** - A [fields content element](https://developers.arcgis.com/javascript/latest/references/core/popup/content/FieldsContent/).
528
+ * - **fields** - A [fields content element](https://developers.arcgis.com/javascript/latest/references/core/popup/content/FieldsContent/)
529
529
  * that contains the fields to display within the content. If this is not set
530
530
  * directly within the `content` property, the popup will display whatever is set in the
531
531
  * [fieldInfos](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#fieldInfos) property.
@@ -753,7 +753,7 @@ export default class PopupTemplate extends PopupTemplateSuperclass {
753
753
  *
754
754
  * | **Content set using 'fields' type** | **Content referenced from fields set within fieldInfo** |
755
755
  * | -------------------------- | --------------------------- |
756
- * | ![popuptemplate-fields](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/popuptemplate-fields.png) | ![popuptemplate-fieldinfocontent](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/popuptemplate-fieldinfocontent.png) |
756
+ * | ![popuptemplate-fields](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/popuptemplate-fields.avif) | ![popuptemplate-fieldinfocontent](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/popuptemplate-fieldinfocontent.avif) |
757
757
  *
758
758
  * @example
759
759
  * // This snippet demonstrates how to show only a subset of fields.
@@ -806,7 +806,7 @@ export default class PopupTemplate extends PopupTemplateSuperclass {
806
806
  /**
807
807
  * Indicates whether or not editor tracking should display.
808
808
  *
809
- * ![popupTemplate-showLastEditInfo](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/showlasteditinfo.png)
809
+ * ![popupTemplate-showLastEditInfo](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/showlasteditinfo.avif)
810
810
  *
811
811
  * @default true
812
812
  * @since 4.10
package/WebDocument2D.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{version as t}from"./kernel.js";import i from"./Map.js";import r from"./Viewpoint.js";import{isSome as o}from"./core/arrayUtils.js";import s from"./core/Collection.js";import n from"./core/Error.js";import{LoadableMixin as a}from"./core/Loadable.js";import{loadAll as p}from"./core/loadAll.js";import l from"./core/Logger.js";import{destroyMaybe as u}from"./core/maybe.js";import{MultiOriginJSONSupportMixin as m}from"./core/MultiOriginJSONSupport.js";import{EsriPromiseMixin as h}from"./core/Promise.js";import{debounce as c}from"./core/promiseUtils.js";import{whenOnce as d}from"./core/reactiveUtils.js";import{addQueryParameter as g,isDataProtocol as f,dataComponents as b}from"./core/urlUtils.js";import y from"./core/Version.js";import{property as w,subclass as A}from"./core/accessorSupport/decorators.js";import{readLoadable as S}from"./core/accessorSupport/read.js";import _ from"./geometry/SpatialReference.js";import v from"./portal/PortalItem.js";import{typeKeyword as V}from"./portal/support/portalItemUtils.js";import j from"./support/MapFloorInfo.js";import I from"./time/TimeExtent.js";import U from"./webdoc/RangeInfo.js";import P from"./webdoc/Widgets.js";import{getOptimalThumbnailSize as O}from"./webdoc/support/thumbnailUtils.js";import{loadFromSource as x}from"./webdoc/support/webdocLoadUtils.js";import{getLayerJSON as F}from"./webdoc/support/writeUtils.js";import L from"./webmap/ApplicationProperties.js";import R from"./webmap/Bookmark.js";import k from"./webmap/InitialViewProperties.js";import T from"./webmap/background/ColorBackground.js";import{writer as E}from"./core/accessorSupport/decorators/writer.js";import{reader as B}from"./core/accessorSupport/decorators/reader.js";const N=s.ofType(R),J=new Map([["image/jpeg","jpeg"],["image/jpg","jpg"],["image/png","png"],["image/gif","gif"]]),M="ArcGIS Pro",Z=V.JSAPI;let W=class extends(m(a(h(i)))){constructor(e){super(e),this._isAuthoringAppSetByUser=!1,this._isAuthoringAppVersionSetByUser=!1,this._thumbnailFilename=null,this._updateFromPromise=null,this.resourceReferences={portalItem:null,paths:[]},this.applicationProperties=null,this.bookmarks=new N,this.floorInfo=null,this.initialViewProperties=new k,this.portalItem=null,this.sourceVersion=null,this.widgets=null,this._debouncedSaveOperations=c(async(e,t,i)=>{const{save:r,saveAs:o}=await import("./webdoc/support/webdocSaveUtils.js");switch(e){case 0:return r(this.context,this,t);case 1:return o(this.context,this,i,t)}}),this.authoringApp=this.authoringAppVersion=null,this._isAuthoringAppSetByUser=this._isAuthoringAppVersionSetByUser=!1}destroy(){this.portalItem=u(this.portalItem)}initialize(){if(this.when().catch(e=>{l.getLogger(this).error("#load()","Failed to load web map",e)}),this.resourceInfo){let t;try{t=this._validateJSON(this.resourceInfo)}catch(e){return void this.addResolvingPromise(Promise.reject(e))}this.read(t)}}set authoringApp(e){this._isAuthoringAppSetByUser=!0,this._set("authoringApp",e)}writeAuthoringApp(e,t){e&&this._isAuthoringAppSetByUser?t.authoringApp=e:t.authoringApp=Z}set authoringAppVersion(e){this._isAuthoringAppVersionSetByUser=!0,this._set("authoringAppVersion",e)}writeAuthoringAppVersion(e,i){e&&this._isAuthoringAppVersionSetByUser?i.authoringAppVersion=e:i.authoringAppVersion=t}readInitialViewProperties(e,t){const i=new k;t.background&&(i.background=T.fromJSON(t.background));const o=t.initialState?.timeExtent;o&&(i.timeExtent=I.fromArray(o));const s=t.initialState?.viewpoint;if(s){if(s.rotation){y.parse(t.version||"","webmap").lessThan(2,20)&&t.authoringApp===M&&(s.rotation*=-1)}i.viewpoint=r.fromJSON(s)}return t.mapRangeInfo&&(i.rangeInfo=U.fromJSON(t.mapRangeInfo)),t.spatialReference&&(i.spatialReference=_.fromJSON(t.spatialReference)),t.timeZone&&(i.timeZone=t.timeZone),i}writeInitialViewProperties(e,t,i,r){if(!e)return;e.background?.color&&(t.background=e.background.write({},r));const{timeExtent:o,viewpoint:s}=e;if(s||o){const e={};s&&(e.viewpoint=s.write({},r)),o&&(e.timeExtent=o.toArray()),t.initialState=e}e.rangeInfo&&(t.mapRangeInfo=e.rangeInfo.toJSON(r)),e.spatialReference&&(t.spatialReference=e.spatialReference.write({},r)),t.timeZone=e.timeZone}writeLayers(e,t,i,r){t[i]=this._writeLayers(e,r,"operational-layers")}get loaded(){return super.loaded}readSourceVersion(e,t){const[i,r]=t.version.split(".");return new y(parseInt(i,10),parseInt(r,10),"webmap")}writeSourceVersion(e,t,i){t[i]=`${this.context.currentVersion.major}.${this.context.currentVersion.minor}`}writeTables(e,t,i,r){const o=this._writeLayers(e,r,"tables");o.length&&(t[i]=o)}get thumbnailUrl(){return this.portalItem?.thumbnailUrl||null}set thumbnailUrl(e){e?(this._override("thumbnailUrl",e),this._thumbnailFilename=this._generateCustomThumbnailFilename(e)):this._clearThumbnailOverride()}get updatingFromView(){return!!this._updateFromPromise}load(e){return this.addResolvingPromise(x(this.context,this)),Promise.resolve(this)}loadAll(){return p(this,e=>{e(this.ground,this.basemap,this.layers,this.tables)})}read(e,t){t={...t,origin:this.context.origin};const i=this._getAuthoringPropsState();S(this,e,t=>super.read(e,t),t),this._restoreAuthoringPropsFromState(i)}write(e,t){if("loaded"!==this.loadStatus){const e=new n("webmap:not-loaded","Web map must be loaded before it can be serialized");throw l.getLogger(this).error("#toJSON()","Web map must be loaded before it can be serialized",this.loadError||this.loadStatus),e}return this._removeDanglingLayerRefs(),t={...t,origin:this.context.origin,restrictedWebMapWriting:!0,webmap:this},super.write(e,t)}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}async updateFrom(e,t){const i=this._updateFromInternal(e,t);this._updateFromPromise=i,await i;i===this._updateFromPromise&&(this._updateFromPromise=null)}getLayerJSONFromResourceInfo(e){const t=this.resourceInfo;return this._collectAllLayersJSON([...t?.baseMap?.baseMapLayers||[],...t?.operationalLayers||[],...this.basemap?.resourceInfo?.data?.baseMapLayers||[]]).find(t=>t.id===e.id)}async updateItemThumbnail(){this.thumbnailUrl&&this._isOverridden("thumbnailUrl")&&(await(this.portalItem?.updateThumbnail({thumbnail:this.thumbnailUrl,filename:this._thumbnailFilename})),this._clearThumbnailOverride())}getThumbnailState(){let e=this.thumbnailUrl;return e&&(e=this._isOverridden("thumbnailUrl")?e:g(e,"w","8192")),{thumbnailUrl:e,filename:this._thumbnailFilename}}restoreThumbnailFromState(e){this.thumbnailUrl=e.thumbnailUrl,this._thumbnailFilename=e.filename}_collectAllLayersJSON(e){return e.reduce((e,t)=>(e.push(t),"GroupLayer"===t.layerType&&(e=e.concat(this._collectAllLayersJSON(t.layers||[]))),e),[])}_writeLayers(e,t,i){t={...t,layerContainerType:i};return e.map(e=>F(e,"tables"===i?null:this.getLayerJSONFromResourceInfo(e),t)).filter(o).toArray()}_validateJSON(e){const t=y.parse(e.version||"","webmap");return this.context.currentVersion.validate(t),e.version=`${t.major}.${t.minor}`,e}_removeDanglingLayerRefs(){const e=this.applicationProperties,t=e?.viewing?.search,i=e=>this.allLayers.some(t=>t.id===e);if(t?.layers&&(t.layers=t.layers.filter(e=>i(e.id))),t?.tables&&(t.tables=t.tables.filter(e=>this.tables.some(t=>t.id===e.id))),e){const t=e.editing?.locationTracking;t?.info&&!i(t.info.layerId)&&(e.editing=null)}const r="presentation"in this?this.presentation:null,o=r?.slides;o&&o.forEach(e=>{e.visibleLayers&&(e.visibleLayers=e.visibleLayers.filter(e=>i(e.id)))})}async _updateFromInternal(e,t){if(t??={},await d(()=>e.ready),this._updateInitialViewProperties(e,t),e.map===this)for(const i of e.allLayerViews)"visible"in i&&"visible"in i.layer&&i._isOverridden("visible")&&(i.layer.visible=i.visible),"featureEffect"in i&&"featureEffect"in i.layer&&i._isOverridden("featureEffect")&&(i.layer.featureEffect=i.featureEffect);await this._updateThumbnailUrl(e,t)}_updateInitialViewProperties(e,t){if(t.backgroundExcluded||(this.initialViewProperties.background=e.background?.clone()),this.initialViewProperties.spatialReference=e.spatialReference?.clone(),this.initialViewProperties.timeZone=e.timeZone,t.viewpointExcluded||(this.initialViewProperties.viewpoint=new r({rotation:e.rotation,scale:t.scalePreserved?e.scale:null,targetGeometry:this._getViewExtent(e)})),!t.widgetsExcluded)for(const i of e.persistableViewModels)i.updateWebDocument(this)}_getViewExtent(e){const t=e.center.clone().normalize(),i=e.extent.clone(),r=i.width/2;return i.xmin=t.x-r,i.xmax=t.x+r,i}async _updateThumbnailUrl(e,t){if(t.thumbnailExcluded)return;const i=O(e,t.thumbnailSize),r=await e.takeScreenshot({format:"png",width:i.width,height:i.height});this._setAutoGeneratedThumbnail(r.dataUrl)}_setAutoGeneratedThumbnail(e){this.thumbnailUrl=e,this._thumbnailFilename=null}_clearThumbnailOverride(){this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"),this._thumbnailFilename=null}_generateCustomThumbnailFilename(e){if(f(e)){const t=b(e),i=t?.mediaType,r=i&&J.get(i.toLowerCase())||null,o=`thumbnail${Date.now()}`;return r?`${o}.${r}`:o}return null}_getAuthoringPropsState(){return{authoringApp:this.authoringApp,authoringAppVersion:this.authoringAppVersion,isAuthoringAppSetByUser:this._isAuthoringAppSetByUser,isAuthoringAppVersionSetByUser:this._isAuthoringAppVersionSetByUser}}_restoreAuthoringPropsFromState(e){e.isAuthoringAppSetByUser?this.authoringApp=e.authoringApp:this._isAuthoringAppSetByUser=!1,e.isAuthoringAppVersionSetByUser?this.authoringAppVersion=e.authoringAppVersion:this._isAuthoringAppVersionSetByUser=!1}};e([w()],W.prototype,"_updateFromPromise",void 0),e([w({type:L,json:{write:!0}})],W.prototype,"applicationProperties",void 0),e([w({type:String,json:{write:{allowNull:!0,ignoreOrigin:!0}}})],W.prototype,"authoringApp",null),e([E("authoringApp")],W.prototype,"writeAuthoringApp",null),e([w({type:String,json:{write:{allowNull:!0,ignoreOrigin:!0}}})],W.prototype,"authoringAppVersion",null),e([E("authoringAppVersion")],W.prototype,"writeAuthoringAppVersion",null),e([w({type:N,json:{write:{overridePolicy:e=>({enabled:!!(e&&e.length>0),ignoreOrigin:!0})}}})],W.prototype,"bookmarks",void 0),e([w({type:j,json:{name:"mapFloorInfo",write:!0}})],W.prototype,"floorInfo",void 0),e([w({type:k,nonNullable:!0,json:{read:{source:["background","initialState.timeExtent","initialState.viewpoint","mapRangeInfo","spatialReference","timeZone"]},write:{ignoreOrigin:!0,target:{background:{type:T},"initialState.timeExtent":{type:I},"initialState.viewpoint":{type:r},mapRangeInfo:{type:U},spatialReference:{type:_},"timeZone:":{type:String}}}}})],W.prototype,"initialViewProperties",void 0),e([B("initialViewProperties")],W.prototype,"readInitialViewProperties",null),e([E("initialViewProperties")],W.prototype,"writeInitialViewProperties",null),e([w({json:{read:!1,write:{target:"operationalLayers",ignoreOrigin:!0}}})],W.prototype,"layers",void 0),e([E("layers")],W.prototype,"writeLayers",null),e([w({type:v})],W.prototype,"portalItem",void 0),e([w()],W.prototype,"resourceInfo",void 0),e([w({readOnly:!0,type:y,json:{read:{source:"version"},write:{allowNull:!0,ignoreOrigin:!0,target:"version",isRequired:!0}}})],W.prototype,"sourceVersion",void 0),e([B("sourceVersion")],W.prototype,"readSourceVersion",null),e([E("sourceVersion")],W.prototype,"writeSourceVersion",null),e([w({json:{read:!1,write:{ignoreOrigin:!0}}})],W.prototype,"tables",void 0),e([E("tables")],W.prototype,"writeTables",null),e([w()],W.prototype,"thumbnailUrl",null),e([w()],W.prototype,"updatingFromView",null),e([w({type:P,json:{write:!0}})],W.prototype,"widgets",void 0),W=e([A("esri.WebDocument2D")],W);const $=W;export{$ as default};
2
+ import{__decorate as e}from"tslib";import{version as t}from"./kernel.js";import r from"./Map.js";import i from"./Viewpoint.js";import{isSome as o}from"./core/arrayUtils.js";import s from"./core/Collection.js";import n from"./core/Error.js";import{LoadableMixin as a}from"./core/Loadable.js";import{loadAll as p}from"./core/loadAll.js";import l from"./core/Logger.js";import{destroyMaybe as u}from"./core/maybe.js";import{MultiOriginJSONSupportMixin as m}from"./core/MultiOriginJSONSupport.js";import{EsriPromiseMixin as h}from"./core/Promise.js";import{debounce as c}from"./core/promiseUtils.js";import{whenOnce as d}from"./core/reactiveUtils.js";import{addQueryParameter as g,isDataProtocol as f,dataComponents as b}from"./core/urlUtils.js";import y from"./core/Version.js";import{property as w,subclass as A}from"./core/accessorSupport/decorators.js";import{readLoadable as S}from"./core/accessorSupport/read.js";import _ from"./geometry/SpatialReference.js";import v from"./portal/PortalItem.js";import{typeKeyword as V}from"./portal/support/portalItemUtils.js";import j from"./support/MapFloorInfo.js";import I from"./time/TimeExtent.js";import U from"./webdoc/RangeInfo.js";import P from"./webdoc/Widgets.js";import{getOptimalThumbnailSize as O}from"./webdoc/support/thumbnailUtils.js";import{loadFromSource as x}from"./webdoc/support/webdocLoadUtils.js";import{getLayerJSON as F}from"./webdoc/support/writeUtils.js";import L from"./webmap/ApplicationProperties.js";import R from"./webmap/Bookmark.js";import k from"./webmap/InitialViewProperties.js";import T from"./webmap/background/ColorBackground.js";import{writer as E}from"./core/accessorSupport/decorators/writer.js";import{reader as B}from"./core/accessorSupport/decorators/reader.js";const N=s.ofType(R),J=new Map([["image/jpeg","jpeg"],["image/jpg","jpg"],["image/png","png"],["image/gif","gif"]]),Z="ArcGIS Pro",M=V.JSAPI;let C=class extends(m(a(h(r)))){constructor(e){super(e),this._isAuthoringAppSetByUser=!1,this._isAuthoringAppVersionSetByUser=!1,this._thumbnailFilename=null,this._updateFromPromise=null,this.resourceReferences={portalItem:null,paths:[]},this.applicationProperties=null,this.bookmarks=new N,this.floorInfo=null,this.initialViewProperties=new k,this.portalItem=null,this.sourceVersion=null,this.widgets=null,this._debouncedSaveOperations=c(async(e,t,r)=>{const{save:i,saveAs:o}=await import("./webdoc/support/webdocSaveUtils.js");switch(e){case 0:return i(this.context,this,t);case 1:return o(this.context,this,r,t)}}),this.authoringApp=this.authoringAppVersion=null,this._isAuthoringAppSetByUser=this._isAuthoringAppVersionSetByUser=!1}destroy(){this.portalItem=u(this.portalItem)}initialize(){if(this.when().catch(e=>{l.getLogger(this).error("#load()","Failed to load web map",e)}),this.resourceInfo){let t;try{t=this._validateJSON(this.resourceInfo)}catch(e){return void this.addResolvingPromise(Promise.reject(e))}this.read(t)}}set authoringApp(e){this._isAuthoringAppSetByUser=!0,this._set("authoringApp",e)}writeAuthoringApp(e,t){e&&this._isAuthoringAppSetByUser?t.authoringApp=e:t.authoringApp=M}set authoringAppVersion(e){this._isAuthoringAppVersionSetByUser=!0,this._set("authoringAppVersion",e)}writeAuthoringAppVersion(e,r){e&&this._isAuthoringAppVersionSetByUser?r.authoringAppVersion=e:r.authoringAppVersion=t}readInitialViewProperties(e,t){const r=new k;t.background&&(r.background=T.fromJSON(t.background));const o=t.initialState?.timeExtent;o&&(r.timeExtent=I.fromArray(o));const s=t.initialState?.viewpoint;if(s){if(s.rotation){y.parse(t.version||"","webmap").lessThan(2,20)&&t.authoringApp===Z&&(s.rotation*=-1)}r.viewpoint=i.fromJSON(s)}return t.mapRangeInfo&&(r.rangeInfo=U.fromJSON(t.mapRangeInfo)),t.spatialReference&&(r.spatialReference=_.fromJSON(t.spatialReference)),t.timeZone&&(r.timeZone=t.timeZone),r}writeInitialViewProperties(e,t,r,i){if(!e)return;e.background?.color&&(t.background=e.background.write({},i));const{timeExtent:o,viewpoint:s}=e;if(s||o){const e={};s&&(e.viewpoint=s.write({},i)),o&&(e.timeExtent=o.toArray()),t.initialState=e}e.rangeInfo&&(t.mapRangeInfo=e.rangeInfo.toJSON(i)),e.spatialReference&&(t.spatialReference=e.spatialReference.write({},i)),t.timeZone=e.timeZone}writeLayers(e,t,r,i){t[r]=this._writeLayers(e,i,"operational-layers")}get loaded(){return super.loaded}readSourceVersion(e,t){const[r,i]=t.version.split(".");return new y(parseInt(r,10),parseInt(i,10),"webmap")}writeSourceVersion(e,t,r){t[r]=`${this.context.currentVersion.major}.${this.context.currentVersion.minor}`}writeTables(e,t,r,i){const o=this._writeLayers(e,i,"tables");o.length&&(t[r]=o)}get thumbnailUrl(){return this.portalItem?.thumbnailUrl||null}set thumbnailUrl(e){e?(this._override("thumbnailUrl",e),this._thumbnailFilename=this._generateCustomThumbnailFilename(e)):this._clearThumbnailOverride()}get updatingFromView(){return!!this._updateFromPromise}load(e){return this.addResolvingPromise(x(this.context,this)),Promise.resolve(this)}loadAll(){return p(this,e=>{e(this.ground,this.basemap,this.layers,this.tables)})}read(e,t){t={...t,origin:this.context.origin};const r=this._getAuthoringPropsState();S(this,e,t=>super.read(e,t),t),this._restoreAuthoringPropsFromState(r)}write(e,t){if("loaded"!==this.loadStatus){const e=new n("webmap:not-loaded","Web map must be loaded before it can be serialized");throw l.getLogger(this).error("#toJSON()","Web map must be loaded before it can be serialized",this.loadError||this.loadStatus),e}return this._removeDanglingLayerRefs(),t={...t,origin:this.context.origin,restrictedWebMapWriting:!0,webmap:this},super.write(e,t)}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}async updateFrom(e,t){const r=this._updateFromInternal(e,t);this._updateFromPromise=r,await r;r===this._updateFromPromise&&(this._updateFromPromise=null)}getLayerJSONFromResourceInfo(e){const t=this.resourceInfo;return this._collectAllLayersJSON([...t?.baseMap?.baseMapLayers||[],...t?.operationalLayers||[],...this.basemap?.resourceInfo?.data?.baseMapLayers||[]]).find(t=>t.id===e.id)}async updateItemThumbnail(){this.thumbnailUrl&&this._isOverridden("thumbnailUrl")&&(await(this.portalItem?.updateThumbnail({thumbnail:this.thumbnailUrl,filename:this._thumbnailFilename})),this._clearThumbnailOverride())}getThumbnailState(){let e=this.thumbnailUrl;return e&&(e=this._isOverridden("thumbnailUrl")?e:g(e,"w","8192")),{thumbnailUrl:e,filename:this._thumbnailFilename}}restoreThumbnailFromState(e){this.thumbnailUrl=e.thumbnailUrl,this._thumbnailFilename=e.filename}_collectAllLayersJSON(e){return e.reduce((e,t)=>(e.push(t),"GroupLayer"===t.layerType&&(e=e.concat(this._collectAllLayersJSON(t.layers||[]))),e),[])}_writeLayers(e,t,r){t={...t,layerContainerType:r};return e.map(e=>F(e,"tables"===r?null:this.getLayerJSONFromResourceInfo(e),t)).filter(o).toArray()}_validateJSON(e){const t=y.parse(e.version||"","webmap");return this.context.currentVersion.validate(t),e.version=`${t.major}.${t.minor}`,e}_removeDanglingLayerRefs(){const e=this.applicationProperties,t=e?.viewing?.search,r=e=>this.allLayers.some(t=>t.id===e);if(t?.layers&&(t.layers=t.layers.filter(e=>r(e.id))),t?.tables&&(t.tables=t.tables.filter(e=>this.tables.some(t=>t.id===e.id))),e){const t=e.editing?.locationTracking;t?.info&&!r(t.info.layerId)&&(e.editing=null)}const i="presentation"in this?this.presentation:null,o=i?.slides;o&&o.forEach(e=>{e.visibleLayers&&(e.visibleLayers=e.visibleLayers.filter(e=>r(e.id)))})}async _updateFromInternal(e,t){if(t??={},await d(()=>e.ready),this._updateInitialViewProperties(e,t),e.map===this)for(const r of e.allLayerViews)"visible"in r&&"visible"in r.layer&&r._isOverridden("visible")&&(r.layer.visible=r.visible),"featureEffect"in r&&"featureEffect"in r.layer&&r._isOverridden("featureEffect")&&(r.layer.featureEffect=r.featureEffect);await this._updateThumbnailUrl(e,t)}_updateInitialViewProperties(e,t){if(t.backgroundExcluded||(this.initialViewProperties.background=e.background?.clone()),this.initialViewProperties.spatialReference=e.spatialReference?.clone(),this.initialViewProperties.timeZone=e.timeZone,t.viewpointExcluded||(this.initialViewProperties.viewpoint=new i({rotation:e.rotation,scale:t.scalePreserved?e.scale:null,targetGeometry:this._getViewExtent(e)})),!t.widgetsExcluded)for(const r of e.registeredComponents)r.updateWebDocument(this)}_getViewExtent(e){const t=e.center.clone().normalize(),r=e.extent.clone(),i=r.width/2;return r.xmin=t.x-i,r.xmax=t.x+i,r}async _updateThumbnailUrl(e,t){if(t.thumbnailExcluded)return;const r=O(e,t.thumbnailSize),i=await e.takeScreenshot({format:"png",width:r.width,height:r.height});this._setAutoGeneratedThumbnail(i.dataUrl)}_setAutoGeneratedThumbnail(e){this.thumbnailUrl=e,this._thumbnailFilename=null}_clearThumbnailOverride(){this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"),this._thumbnailFilename=null}_generateCustomThumbnailFilename(e){if(f(e)){const t=b(e),r=t?.mediaType,i=r&&J.get(r.toLowerCase())||null,o=`thumbnail${Date.now()}`;return i?`${o}.${i}`:o}return null}_getAuthoringPropsState(){return{authoringApp:this.authoringApp,authoringAppVersion:this.authoringAppVersion,isAuthoringAppSetByUser:this._isAuthoringAppSetByUser,isAuthoringAppVersionSetByUser:this._isAuthoringAppVersionSetByUser}}_restoreAuthoringPropsFromState(e){e.isAuthoringAppSetByUser?this.authoringApp=e.authoringApp:this._isAuthoringAppSetByUser=!1,e.isAuthoringAppVersionSetByUser?this.authoringAppVersion=e.authoringAppVersion:this._isAuthoringAppVersionSetByUser=!1}};e([w()],C.prototype,"_updateFromPromise",void 0),e([w({type:L,json:{write:!0}})],C.prototype,"applicationProperties",void 0),e([w({type:String,json:{write:{allowNull:!0,ignoreOrigin:!0}}})],C.prototype,"authoringApp",null),e([E("authoringApp")],C.prototype,"writeAuthoringApp",null),e([w({type:String,json:{write:{allowNull:!0,ignoreOrigin:!0}}})],C.prototype,"authoringAppVersion",null),e([E("authoringAppVersion")],C.prototype,"writeAuthoringAppVersion",null),e([w({type:N,json:{write:{overridePolicy:e=>({enabled:!!(e&&e.length>0),ignoreOrigin:!0})}}})],C.prototype,"bookmarks",void 0),e([w({type:j,json:{name:"mapFloorInfo",write:!0}})],C.prototype,"floorInfo",void 0),e([w({type:k,nonNullable:!0,json:{read:{source:["background","initialState.timeExtent","initialState.viewpoint","mapRangeInfo","spatialReference","timeZone"]},write:{ignoreOrigin:!0,target:{background:{type:T},"initialState.timeExtent":{type:I},"initialState.viewpoint":{type:i},mapRangeInfo:{type:U},spatialReference:{type:_},"timeZone:":{type:String}}}}})],C.prototype,"initialViewProperties",void 0),e([B("initialViewProperties")],C.prototype,"readInitialViewProperties",null),e([E("initialViewProperties")],C.prototype,"writeInitialViewProperties",null),e([w({json:{read:!1,write:{target:"operationalLayers",ignoreOrigin:!0}}})],C.prototype,"layers",void 0),e([E("layers")],C.prototype,"writeLayers",null),e([w({type:v})],C.prototype,"portalItem",void 0),e([w()],C.prototype,"resourceInfo",void 0),e([w({readOnly:!0,type:y,json:{read:{source:"version"},write:{allowNull:!0,ignoreOrigin:!0,target:"version",isRequired:!0}}})],C.prototype,"sourceVersion",void 0),e([B("sourceVersion")],C.prototype,"readSourceVersion",null),e([E("sourceVersion")],C.prototype,"writeSourceVersion",null),e([w({json:{read:!1,write:{ignoreOrigin:!0}}})],C.prototype,"tables",void 0),e([E("tables")],C.prototype,"writeTables",null),e([w()],C.prototype,"thumbnailUrl",null),e([w()],C.prototype,"updatingFromView",null),e([w({type:P,json:{write:!0}})],C.prototype,"widgets",void 0),C=e([A("esri.WebDocument2D")],C);const W=C;export{W as default};
package/WebScene.d.ts CHANGED
@@ -147,7 +147,7 @@ export interface WebSceneProperties extends MapProperties, LoadableMixinProperti
147
147
  * });
148
148
  * ```
149
149
  *
150
- * [![webscene](https://developers.arcgis.com/javascript/latest/assets/references/core/views/webscene.png)](https://developers.arcgis.com/javascript/latest/sample-code/webscene-slides/)
150
+ * [![webscene](https://developers.arcgis.com/javascript/latest/assets/references/core/views/webscene.avif)](https://developers.arcgis.com/javascript/latest/sample-code/webscene-slides/)
151
151
  *
152
152
  * The WebScene defines the content of your scene and how the scene looks when it is [loaded](https://developers.arcgis.com/javascript/latest/references/core/WebScene/#loaded)
153
153
  * in your application. There are several common properties of a web scene that you will likely interact
package/WebScene.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{version as t}from"./kernel.js";import r from"./Map.js";import i from"./core/Collection.js";import o from"./core/Error.js";import{clone as s}from"./core/lang.js";import{LoadableMixin as a}from"./core/Loadable.js";import{loadAll as n}from"./core/loadAll.js";import l from"./core/Logger.js";import{destroyMaybe as p}from"./core/maybe.js";import{MultiOriginJSONSupportMixin as c,MultiOriginJSONSupport as d}from"./core/MultiOriginJSONSupport.js";import{EsriPromiseMixin as h}from"./core/Promise.js";import{debounce as u}from"./core/promiseUtils.js";import{on as m,watch as y}from"./core/reactiveUtils.js";import{urlToObject as w,addQueryParameter as f}from"./core/urlUtils.js";import g from"./core/Version.js";import b from"./core/Warning.js";import{property as v,subclass as _}from"./core/accessorSupport/decorators.js";import{updateOrigins as S}from"./core/accessorSupport/originUtils.js";import{readLoadable as A}from"./core/accessorSupport/read.js";import{isEarth as I}from"./geometry/ellipsoidUtils.js";import j from"./geometry/Extent.js";import L from"./geometry/HeightModelInfo.js";import{canProjectWithoutEngine as P}from"./geometry/projectionUtils.js";import R from"./geometry/SpatialReference.js";import{validateWebSceneError as U}from"./geometry/support/heightModelInfoUtils.js";import{fromJSON as V}from"./geometry/support/jsonUtils.js";import O from"./portal/Portal.js";import M from"./portal/PortalItem.js";import{createForItemWrite as E}from"./portal/support/jsonContext.js";import{toggleTypeKeyword as C,typeKeyword as T}from"./portal/support/portalItemUtils.js";import{hasDeveloperBasemapLayer as N}from"./support/basemapUtils.js";import{ensureType as x}from"./support/groundUtils.js";import F from"./support/MapFloorInfo.js";import{WebSceneTag as G}from"./support/tagSymbols.js";import{createSchemaValidationError as W}from"./support/webSceneUtils.js";import{isSpatialReferenceSupported as J}from"./views/support/spatialReferenceSupport.js";import k from"./webdoc/Widgets.js";import{updateItemWithResources as B,saveResources as $}from"./webdoc/support/resourceUtils.js";import{evaluateWriteErrors as q}from"./webdoc/support/saveUtils.js";import{getOptimalThumbnailSize as H}from"./webdoc/support/thumbnailUtils.js";import{addLayerUnsupportedError as D}from"./webdoc/support/unsupportedErrors.js";import{isCopyAllowed as z,initializeNewItem as K}from"./webdoc/support/webdocSaveUtils.js";import Q from"./webscene/ApplicationProperties.js";import X from"./webscene/Environment.js";import Y from"./webscene/InitialViewProperties.js";import Z from"./webscene/Presentation.js";import ee from"./webscene/TransportationNetwork.js";import{alphaCutoff as te}from"./webscene/support/AlphaCutoff.js";import{getLoader as re}from"./webscene/support/schemaValidatorLoader.js";import{supportsVisibleElevationLayersInSlides as ie,versionSupportsGround as oe,generateWebSceneVersions as se}from"./webscene/support/versionUtils.js";import{writer as ae}from"./core/accessorSupport/decorators/writer.js";import{reader as ne}from"./core/accessorSupport/decorators/reader.js";var le;const pe=new g(1,40,"webscene"),ce="Web Scene";let de=class extends(a(h(c(r)))){static{le=G}constructor(e){super(e),this[le]=!0,this._layersIdGCTimeoutId=void 0,this._updateFromPromise=null,this._afterLoadHooks=[],this.applicationProperties=null,this.clippingArea=null,this.clippingEnabled=!1,this.floorInfo=null,this.heightModelInfo=void 0,this.sourceVersion=null,this.transportationNetworks=null,this.presentation=new Z,this.initialViewProperties=new Y,this.portalItem=null,this.resourceInfo=null,this.widgets=null,this._debouncedSaveOperations=u(async(e,t,r)=>{switch(e){case 0:return this._saveImpl(t);case 1:return this._saveAsImpl(r,t)}}),this._loadContext={origin:"web-scene",initiator:this,hooks:{onAfterLoad:e=>this._afterLoadHooks.push(e)}},this._resourceReferences={portalItem:null,paths:[]},this.authoringApp=null,this.authoringAppVersion=null,this._isAuthoringAppSetByUser=!1,this._isAuthoringAppVersionSetByUser=!1}initialize(){if(this.when().catch(e=>{l.getLogger(this).error("#load()","Failed to load web scene",e)}),this.resourceInfo){let t;try{t=this._validateJSON(this.resourceInfo)}catch(e){return void this.addResolvingPromise(Promise.reject(e))}this.read(t),this.addResolvingPromise(this._validateSpatialReference()),this.addResolvingPromise(this._validateHeightModelInfo())}this.addHandles(m(()=>this.allLayers,"change",()=>this._scheduleLayersIdGC()))}destroy(){this._unscheduleLayersIdGC(),this.presentation&&this.presentation.destroy(),this.portalItem=p(this.portalItem)}writeClippingArea(e,t){t.clippingArea||(t.clippingArea={}),t.clippingArea.geometry=e.toJSON()}readClippingEnabled(e,t){return!!t.clippingArea&&!!t.clippingArea.clip}writeClippingEnabled(e,t){this.clippingArea&&(t.clippingArea||(t.clippingArea={}),t.clippingArea.clip=e)}writeLayers(e,t,r,i){t[r]=this._layersToJSON(e,"operational-layers",i)}get loaded(){return super.loaded}readSourceVersion(e,t){const[r,i]=t.version.split(".");return new g(parseInt(r,10),parseInt(i,10))}writeSourceVersion(e,t,r){t[r]=`${pe.major}.${pe.minor}`}writeTables(e,t,r,i){const o=this._layersToJSON(e,"tables",i);o.length&&(t[r]=o)}get thumbnailUrl(){return this.portalItem?.thumbnailUrl??null}set thumbnailUrl(e){e?this._override("thumbnailUrl",e):(this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"))}set authoringApp(e){this._isAuthoringAppSetByUser=!0,this._set("authoringApp",e)}writeAuthoringApp(e,t){e&&this._isAuthoringAppSetByUser?t.authoringApp=e:t.authoringApp="ArcGIS API for JavaScript"}set authoringAppVersion(e){this._isAuthoringAppVersionSetByUser=!0,this._set("authoringAppVersion",e)}writeAuthoringAppVersion(e,r){e&&this._isAuthoringAppVersionSetByUser?r.authoringAppVersion=e:r.authoringAppVersion=t}get ground(){return this._get("ground")}set ground(e){const t=x(e);null!=t&&this._set("ground",t)}writeGround(e,t,r,i){t[r]=e?e.write({},i):{transparency:0,layers:[]}}readInitialViewProperties(e,t,r){const{viewingMode:i,spatialReference:o}=t,s=new Y,a={...t.initialState};return void 0!==o&&(a.spatialReference=o),void 0!==i&&(a.viewingMode=i),s.read(a,r),s}get spatialReference(){return this.initialViewProperties?.spatialReference??R.WebMercator}get viewingMode(){return this.initialViewProperties?.viewingMode??"global"}load(e){const t=this.ground;return this.addResolvingPromise(this._loadFromSource().then(()=>{t&&t!==this.ground&&t.destroy(),this._validateFeatureLayerSymbolVisibility()})),Promise.resolve(this)}loadAll(){return n(this,e=>{const t=this.presentation&&this.presentation.slides;e(this.ground,this.basemap,this.layers,t&&t.map(e=>e.basemap),this.tables)})}read(e,t){t??=this._loadContext,t.origin="web-scene";const r=this._isAuthoringAppVersionSetByUser,i=this._isAuthoringAppSetByUser;if(A(this,e,t=>super.read(e,t),t),i||(this._isAuthoringAppSetByUser=!1),r||(this._isAuthoringAppVersionSetByUser=!1),e.baseMap&&Array.isArray(e.baseMap.elevationLayers)&&ie(this.sourceVersion)){const t=e.baseMap.elevationLayers.map(e=>({id:e.id})),r=this.presentation.slides,i=t.filter(e=>!r.some(t=>t.visibleLayers.some(t=>t.id===e.id)));r.forEach(e=>e.visibleLayers.addMany(i))}}_writeBasemapElevationLayers(e){const t=e.ground?.layers;!e.baseMap&&t?.length&&(e.baseMap={title:"Basemap",baseMapLayers:[]}),e.baseMap&&(e.baseMap.elevationLayers=s(t))}_layersToJSON(e,t,r){const i={...r,layerContainerType:t};return e.map(e=>this._verifyWritableLayer(e,r)?e.write({},i):null).filter(e=>!!e).toArray()}_verifyWritableLayer(e,t){return!!e.persistenceEnabled&&("write"in e||(D(t,e),!1))}write(e,t){if("loaded"!==this.loadStatus){const e=new o("webscene:not-loaded","Web scene must be loaded before it can be serialized");throw l.getLogger(this).error("#toJSON()","Web scene must be loaded before it can be serialized",this.loadError||this.loadStatus),e}this._runLayersIdGC();const r=!t?.messages;t={messages:[],...t,origin:"web-scene"};const i=super.write(e,t);if(r){const e=t.messages?.filter(e=>"web-document-write:property-required"===e.name)??[];if(e.length){const t=new o("web-document:property-required","One or more properties that are required in the webscene JSON are missing, see details for the specific errors",{errors:e});throw l.getLogger(this).error("#toJSON()","One or more properties that are required in the webscene JSON are missing",e),t}}return this._writeBasemapElevationLayers(i),i}async save(e){return this._debouncedSaveOperations(0,e)}async _saveImpl(e){if(!this.portalItem)throw new o("webscene:portal-item-not-set","Portal item to save to has not been set on the WebScene");if(this.portalItem?.type!==ce)throw new o("webscene:portal-item-wrong-type",`Portal item needs to have type "${ce}"`);const t=this._updateFromPromise;await this._ensureLoadBeforeSave();const r=this._enableVerifyItemRelativeUrls(E(this.portalItem,"web-scene",!0)),i=this.write({},r);return await Promise.all(r.resources.pendingOperations),await this._verifySave(i,r,0,e),this._updateTypeKeywords(this.portalItem),await B(this.portalItem,i,this._resourceReferences,r),S(r),t&&await t,await this._saveThumbnail(),this.portalItem}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}async _saveAsImpl(e,t){let r=M.from(e);if(!r)throw new o("webscene:portal-item-required","saveAs requires a portal item to save to");r.id&&(r=r.clone(),r.id=null);const i=r.portal||O.getDefault();await this._ensureLoadBeforeSave(),r.type=ce,r.portal=i;const s=this._enableVerifyItemRelativeUrls(E(r,"web-scene",!0)),a=this.write({},s);await Promise.all(s.resources.pendingOperations),await this._verifySaveAs(a,s,t);const n=this.thumbnailUrl,l=!this._isOverridden("thumbnailUrl");this._updateTypeKeywords(r),await i.signIn();const p=this.portalItem,c={item:p,authenticated:!(!p?.id||!p.portal.user)},{copyAllowed:h,itemReloaded:u}=await z(c,i);if(c.authenticated||=u,!h)throw new o(`${s.name}:save-as-copy-not-allowed`,"Owner of this map does not allow others to save a copy");const m={...t,copyAllResources:!0};return await K(r,c,a,m)&&(this._resourceReferences.portalItem=r),await $(this._resourceReferences,s),this.portalItem=r,d.prototype.read.call(this,{version:a.version,authoringApp:a.authoringApp,authoringAppVersion:a.authoringAppVersion},{name:"web-scene",ignoreDefaults:!0,url:r.itemUrl?w(r.itemUrl):void 0}),S(s),n&&(this.thumbnailUrl=l?f(n,"w","8192"):n),s.portalItem=r,await this._saveThumbnail(),r}async _saveThumbnail(){this._isOverridden("thumbnailUrl")&&(await(this.portalItem?.updateThumbnail({thumbnail:this.thumbnailUrl})),this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"))}async _verifySave(e,t,r,i){if(!I(this.spatialReference))throw new o("webscene:unsupported-spatial-reference","Webscenes using spatial reference systems from Mars or Moon can not be saved currently.");const{ignoreUnsupported:s,requiredPropertyChecksDisabled:a,strictSchemaValidationEnabled:n}=i||{};q(t,{errorName:"webscene:save"},{ignoreUnsupported:s,supplementalUnsupportedErrors:["scenemodification:unsupported"],requiredPropertyChecksDisabled:a});const p=re();if(n&&p){const t=(await p()).validate(e);if(!t.length)return;const i=`webscene did not validate:\n${t.join("\n")}`;l.getLogger(this).error(`${1===r?"saveAs":"save"}(): ${i}`);const s=t.map(e=>new o("webscene:schema-validation",e));throw W(s)}}_verifySaveAs(e,t,r){return this._verifySave(e,t,1,r)}verifySaveAs(e){const t=this._enableVerifyItemRelativeUrls({origin:"web-scene",messages:[]}),r=this.write({},t);return this._verifySaveAs(r,t,e)}canNotSaveAs(){return!1}async updateFrom(e,t={}){const r=this._updateFrom(e,t);this._updateFromPromise=r,await r;this._updateFromPromise===r&&(this._updateFromPromise=null)}async _updateFrom(e,t={}){if(await e.whenReady(),!t.environmentExcluded&&e.environment&&(this.initialViewProperties.environment=X.prototype.clone.apply(e.environment)),!t.viewpointExcluded&&e.viewpoint&&(this.initialViewProperties.viewpoint=e.viewpoint.clone()),this.initialViewProperties.spatialReference=e.spatialReference.clone(),this.initialViewProperties.viewingMode=e.viewingMode,this.initialViewProperties.timeExtent=e.timeExtent?.clone()??null,this.initialViewProperties.analyses.updateFrom(e),null!=e.clippingArea?e.clippingArea!==this.clippingArea&&(this.clippingArea=e.clippingArea.clone(),this.clippingEnabled=!0):this.clippingEnabled=!1,e.heightModelInfo&&(this.heightModelInfo=e.heightModelInfo.clone()),e.map===this)for(const r of e.allLayerViews){const e="visible";e in r&&e in r.layer&&r._isOverridden(e)&&(r.layer[e]=r[e])}if(!t.widgetsExcluded)for(const r of e.persistableViewModels)r.updateWebDocument(this);(!1===t.thumbnailExcluded||null==t.thumbnailExcluded&&!t.viewpointExcluded)&&await this.updateThumbnail(e,{size:t.thumbnailSize})}async updateThumbnail(e,t){const r=H(e,t?.size),i=await e.takeScreenshot({format:"jpg",width:r.width,height:r.height,disableDecorations:!0});this.thumbnailUrl=i.dataUrl}async _loadFromSource(){this.resourceInfo?await this._loadFromJSON(this.resourceInfo):this.portalItem?.id?await this._loadFromItem(this.portalItem):await this._loadObjectsWithLayers(),await this._afterLoad()}async _afterLoad(){for(;this._afterLoadHooks.length;){const e=this._afterLoadHooks.slice();this._afterLoadHooks.length=0,await Promise.allSettled(e.map(e=>e(this._loadContext)))}}_readAndLoadFromJSON(e){const t=this._loadContext,r=this._validateJSON(e);return this.read(r,t),this._loadFromJSON(r)}_extractOperationalLayers(e){const t=[];if(!oe(this.sourceVersion)&&e.baseMap&&Array.isArray(e.baseMap.elevationLayers))for(const o of e.baseMap.elevationLayers)t.push(o);const r=[],i=e=>(e.layers&&(e.layers=e.layers.filter(i)),"ArcGISTiledElevationServiceLayer"!==e.layerType||(oe(this.sourceVersion)||r.push(e),!1));return{operationalLayers:e.operationalLayers?e.operationalLayers.filter(i):[],operationalElevationLayers:r,basemapElevationLayers:t}}async _loadFromJSON(e){const t=new i;await this._validateSpatialReference(),await this._validateHeightModelInfo();const{populateOperationalLayers:r}=await import("./layers/support/layersCreator.js"),{operationalLayers:o,operationalElevationLayers:s,basemapElevationLayers:a}=this._extractOperationalLayers(e),n=[],l={context:{...this._loadContext,layerContainerType:"operational-layers"}};if(this.portalItem&&(l.context.portal=this.portalItem.portal||O.getDefault()),a.length>0){const e={...l,context:{...l.context,layerContainerType:"ground"}};e.defaultLayerType="ArcGISTiledElevationServiceLayer",n.push(r(this.ground.layers,a,e))}if(s.length>0){const e={...l,context:{...l.context,layerContainerType:"ground"}};e.defaultLayerType="ArcGISTiledElevationServiceLayer",n.push(r(t,s,e))}o&&o.length>0&&n.push(r(this.layers,o,l)),e.tables?.length&&n.push(r(this.tables,e.tables,{...l,context:{...l.context,layerContainerType:"tables"},defaultLayerType:"ArcGISFeatureLayer"})),await Promise.allSettled(n),await this._loadObjectsWithLayers(),this.ground.layers.addMany(t.filter(e=>"base-elevation"===e.type||"elevation"===e.type))}async _ensureLoadBeforeSave(){await this.load(),await this._loadObjectsWithLayers();const e=[],t=[...this.allLayers.items];for(const{basemap:r}of this.presentation.slides.items)r&&(t.push(...r.baseLayers.items),t.push(...r.groundLayers.items),t.push(...r.referenceLayers.items));for(const r of t)if("beforeSave"in r&&"function"==typeof r.beforeSave){const t=r.beforeSave();t&&e.push(t)}await Promise.allSettled(e)}async _loadObjectsWithLayers(){const e=[];this.ground&&e.push(this.ground.load()),this.basemap&&e.push(this.basemap.load()),this.presentation.slides.forEach(t=>{t.basemap&&e.push(t.basemap.load())}),await Promise.allSettled(e)}async _loadFromItem(e){if(await e.load().catch(e=>{throw new o("webscene:load-portal-item","Failed to load portal item",{error:e})}),"Web Scene"!==e.type)throw new o("webscene:invalid-portal-item","Invalid portal item type '${type}', expected 'Web Scene'",{type:e.type});const t=await e.fetchData();this.resourceInfo=t;const r=this._loadContext;r.url=w(e.itemUrl),r.portal=e.portal||O.getDefault(),r.portalItem=e,r.readResourcePaths=[],await this._readAndLoadFromJSON(t),this._resourceReferences={portalItem:e,paths:r.readResourcePaths??[]}}_validateSpatialReference(){const e=this.initialViewProperties,t=this._sceneSpatialReference;let r;if("local"!==e.viewingMode){if(!J(t,1))return Promise.reject(new o("webscene:unsupported-spatial-reference","Unsupported spatial reference (${spatialReference.wkid}) in global mode, only Web Mercator, WGS84 GCS or CGCS2000 are supported",{spatialReference:t,viewingMode:e.viewingMode}));r=e=>!e||P(e,t)}else{if(!J(t,2))return Promise.reject(new o("webscene:unsupported-spatial-reference","Unsupported spatial reference (${spatialReference.wkid}) in local mode, only projected coordinate systems are supported",{spatialReference:t,viewingMode:e.viewingMode}));r=e=>!e||e.equals(t)}const i=e=>e?.camera?.position.spatialReference??e?.targetGeometry?.spatialReference,s=e.viewpoint,a=i(s);if(a&&!r(a))return Promise.reject(new o("webscene:incompatible-camera-spatial-reference","Camera spatial reference (${cameraSpatialReference.wkid}) is incompatible with the scene spatial reference (${sceneSpatialReference.wkid})",{cameraSpatialReference:a,sceneSpatialReference:t,viewingMode:e.viewingMode}));const n=this.presentation.slides.find(e=>!r(i(e.viewpoint)));if(n){const r=i(n.viewpoint);return Promise.reject(new o("webscene:incompatible-slide-spatial-reference","Slide spatial reference (${slideSpatialReference.wkid}) is incompatible with the scene spatial reference (${sceneSpatialReference.wkid})",{slideSpatialReference:r,sceneSpatialReference:t,viewingMode:e.viewingMode}))}return Promise.resolve()}_validateHeightModelInfo(){const e=this._sceneSpatialReference,t=U(this.heightModelInfo,e);return t?Promise.reject(t):Promise.resolve()}_validateFeatureLayerSymbolVisibility(){this.sourceVersion?.greaterEqual(1,35)||this.layers.forEach(e=>{"feature"===e.type&&e.addHandles(y(()=>e.loaded,()=>{"on-the-ground"===e.elevationInfo?.mode&&"simple"===e.renderer?.type&&"polygon-3d"===e.renderer.symbol?.type&&e.renderer.symbol.symbolLayers.some(t=>"fill"===t.type&&null!=t.material&&((!t.material.color||t.material.color.a*e.opacity<te)&&(e.loadWarnings.push(new b("feature-layer:invisible-draped-symbols","FeatureLayer has fully transparent symbols which will no longer render or highlight",{layer:e})),!0)))},{once:!0,sync:!0}))})}_validateJSON(e){const t=g.parse(e.version||"","webscene");return pe.validate(t),e.version=`${t.major}.${t.minor}`,1===t.major&&t.minor<=2&&(e.spatialReference=R.WebMercator.toJSON()),e}_updateTypeKeywords(e){C(e,T.LOCAL_SCENE,"local"===this.initialViewProperties.viewingMode),C(e,T.DEVELOPER_BASEMAP,N(this.basemap)||this.presentation.slides.some(({basemap:e})=>!!e&&N(e))),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t))}get _sceneSpatialReference(){return this.initialViewProperties.spatialReference||R.WebMercator}get _verifyItemRelativeRootPath(){return this.portalItem?.itemUrl?w(this.portalItem.itemUrl).path:null}_enableVerifyItemRelativeUrls(e){const t=this._verifyItemRelativeRootPath;return t&&(e.verifyItemRelativeUrls={rootPath:t,writtenUrls:[]}),e}_unscheduleLayersIdGC(){this._layersIdGCTimeoutId&&(clearTimeout(this._layersIdGCTimeoutId),this._layersIdGCTimeoutId=0)}_scheduleLayersIdGC(){this._unscheduleLayersIdGC(),this._layersIdGCTimeoutId=setTimeout(()=>{this._layersIdGCTimeoutId=0,this._runLayersIdGC()},3e3)}_runLayersIdGC(){this._unscheduleLayersIdGC();const e=this.applicationProperties?.viewing?.search,t=e=>this.allLayers.some(t=>t.id===e&&t.persistenceEnabled);e?.layers&&(e.layers=e.layers.filter(e=>t(e.id)));const r=this.presentation&&this.presentation.slides;r&&r.forEach(e=>{e.visibleLayers&&(e.visibleLayers=e.visibleLayers.filter(e=>t(e.id)))})}static fromJSON(e){if(!e)throw new o("webscene:empty-resource","Expected a JSON resource but got nothing");return new this({resourceInfo:e})}static{this.version=`${pe.major}.${pe.minor}`}};e([v({type:Q,json:{write:!0}})],de.prototype,"applicationProperties",void 0),e([v({type:j,json:{read:{source:"clippingArea.geometry",reader:V},write:{target:"clippingArea.geometry"}}})],de.prototype,"clippingArea",void 0),e([ae("clippingArea")],de.prototype,"writeClippingArea",null),e([v({type:Boolean,json:{write:{target:"clippingArea.clip"}}})],de.prototype,"clippingEnabled",void 0),e([ne("clippingEnabled",["clippingArea"])],de.prototype,"readClippingEnabled",null),e([ae("clippingEnabled")],de.prototype,"writeClippingEnabled",null),e([v({type:F,json:{read:{source:"mapFloorInfo"},write:{target:"mapFloorInfo"}}})],de.prototype,"floorInfo",void 0),e([v({type:L,json:{write:!0}})],de.prototype,"heightModelInfo",void 0),e([v({json:{write:{target:"operationalLayers",ignoreOrigin:!0}}})],de.prototype,"layers",void 0),e([ae("layers")],de.prototype,"writeLayers",null),e([v({readOnly:!0,type:g,json:{type:se(pe).map(e=>e.toString()),write:{ignoreOrigin:!0,target:"version",isRequired:!0,overridePolicy:()=>({enabled:!0,allowNull:!0,ignoreOrigin:!0})}}})],de.prototype,"sourceVersion",void 0),e([ne("sourceVersion",["version"])],de.prototype,"readSourceVersion",null),e([ae("sourceVersion")],de.prototype,"writeSourceVersion",null),e([v({json:{read:!1,write:{enabled:!0,ignoreOrigin:!0}}})],de.prototype,"tables",void 0),e([ae("tables")],de.prototype,"writeTables",null),e([v()],de.prototype,"thumbnailUrl",null),e([v({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],de.prototype,"authoringApp",null),e([ae("authoringApp")],de.prototype,"writeAuthoringApp",null),e([v({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],de.prototype,"authoringAppVersion",null),e([ae("authoringAppVersion")],de.prototype,"writeAuthoringAppVersion",null),e([v({json:{write:{isRequired:!0,enabled:!0,overridePolicy:()=>({isRequired:!0,enabled:!0,allowNull:!0,ignoreOrigin:!0})}}})],de.prototype,"ground",null),e([ae("ground")],de.prototype,"writeGround",null),e([v({type:i.ofType(ee),json:{write:!0}})],de.prototype,"transportationNetworks",void 0),e([v({type:Z,nonNullable:!0,json:{write:{ignoreOrigin:!0,writer:(e,t,r,i)=>{if(e.slides&&e.slides.length>0){const r={...i,isPresentation:!0};t.presentation=e.write({},r)}}}}})],de.prototype,"presentation",void 0),e([v({type:Y,nonNullable:!0,json:{write:{target:"initialState",isRequired:!0,ignoreOrigin:!0},default:()=>new Y({viewingMode:"global",spatialReference:R.WebMercator})}})],de.prototype,"initialViewProperties",void 0),e([ne("initialViewProperties",["initialState","spatialReference","viewingMode"])],de.prototype,"readInitialViewProperties",null),e([v({type:R,json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],de.prototype,"spatialReference",null),e([v({type:["local","global"],json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],de.prototype,"viewingMode",null),e([v({type:M})],de.prototype,"portalItem",void 0),e([v()],de.prototype,"resourceInfo",void 0),e([v({type:k,json:{write:!0}})],de.prototype,"widgets",void 0),de=e([_("esri.WebScene")],de);const he=de;export{he as default};
2
+ import{__decorate as e}from"tslib";import{version as t}from"./kernel.js";import r from"./Map.js";import i from"./core/Collection.js";import o from"./core/Error.js";import{clone as s}from"./core/lang.js";import{LoadableMixin as a}from"./core/Loadable.js";import{loadAll as n}from"./core/loadAll.js";import l from"./core/Logger.js";import{destroyMaybe as p}from"./core/maybe.js";import{MultiOriginJSONSupportMixin as c,MultiOriginJSONSupport as d}from"./core/MultiOriginJSONSupport.js";import{EsriPromiseMixin as h}from"./core/Promise.js";import{debounce as u}from"./core/promiseUtils.js";import{on as m,watch as y}from"./core/reactiveUtils.js";import{urlToObject as w,addQueryParameter as f}from"./core/urlUtils.js";import g from"./core/Version.js";import b from"./core/Warning.js";import{property as v,subclass as _}from"./core/accessorSupport/decorators.js";import{updateOrigins as S}from"./core/accessorSupport/originUtils.js";import{readLoadable as A}from"./core/accessorSupport/read.js";import{isEarth as I}from"./geometry/ellipsoidUtils.js";import j from"./geometry/Extent.js";import L from"./geometry/HeightModelInfo.js";import{canProjectWithoutEngine as P}from"./geometry/projectionUtils.js";import R from"./geometry/SpatialReference.js";import{validateWebSceneError as U}from"./geometry/support/heightModelInfoUtils.js";import{fromJSON as O}from"./geometry/support/jsonUtils.js";import V from"./portal/Portal.js";import M from"./portal/PortalItem.js";import{createForItemWrite as E}from"./portal/support/jsonContext.js";import{toggleTypeKeyword as C,typeKeyword as T}from"./portal/support/portalItemUtils.js";import{hasDeveloperBasemapLayer as N}from"./support/basemapUtils.js";import{ensureType as x}from"./support/groundUtils.js";import F from"./support/MapFloorInfo.js";import{WebSceneTag as G}from"./support/tagSymbols.js";import{createSchemaValidationError as W}from"./support/webSceneUtils.js";import{isSpatialReferenceSupported as J}from"./views/support/spatialReferenceSupport.js";import k from"./webdoc/Widgets.js";import{updateItemWithResources as B,saveResources as $}from"./webdoc/support/resourceUtils.js";import{evaluateWriteErrors as q}from"./webdoc/support/saveUtils.js";import{getOptimalThumbnailSize as H}from"./webdoc/support/thumbnailUtils.js";import{addLayerUnsupportedError as D}from"./webdoc/support/unsupportedErrors.js";import{isCopyAllowed as z,initializeNewItem as K}from"./webdoc/support/webdocSaveUtils.js";import Q from"./webscene/ApplicationProperties.js";import X from"./webscene/Environment.js";import Y from"./webscene/InitialViewProperties.js";import Z from"./webscene/Presentation.js";import ee from"./webscene/TransportationNetwork.js";import{alphaCutoff as te}from"./webscene/support/AlphaCutoff.js";import{getLoader as re}from"./webscene/support/schemaValidatorLoader.js";import{supportsVisibleElevationLayersInSlides as ie,versionSupportsGround as oe,generateWebSceneVersions as se}from"./webscene/support/versionUtils.js";import{writer as ae}from"./core/accessorSupport/decorators/writer.js";import{reader as ne}from"./core/accessorSupport/decorators/reader.js";var le;const pe=new g(1,40,"webscene"),ce="Web Scene";let de=class extends(a(h(c(r)))){static{le=G}constructor(e){super(e),this[le]=!0,this._layersIdGCTimeoutId=void 0,this._updateFromPromise=null,this._afterLoadHooks=[],this.applicationProperties=null,this.clippingArea=null,this.clippingEnabled=!1,this.floorInfo=null,this.heightModelInfo=void 0,this.sourceVersion=null,this.transportationNetworks=null,this.presentation=new Z,this.initialViewProperties=new Y,this.portalItem=null,this.resourceInfo=null,this.widgets=null,this._debouncedSaveOperations=u(async(e,t,r)=>{switch(e){case 0:return this._saveImpl(t);case 1:return this._saveAsImpl(r,t)}}),this._loadContext={origin:"web-scene",initiator:this,hooks:{onAfterLoad:e=>this._afterLoadHooks.push(e)}},this._resourceReferences={portalItem:null,paths:[]},this.authoringApp=null,this.authoringAppVersion=null,this._isAuthoringAppSetByUser=!1,this._isAuthoringAppVersionSetByUser=!1}initialize(){if(this.when().catch(e=>{l.getLogger(this).error("#load()","Failed to load web scene",e)}),this.resourceInfo){let t;try{t=this._validateJSON(this.resourceInfo)}catch(e){return void this.addResolvingPromise(Promise.reject(e))}this.read(t),this.addResolvingPromise(this._validateSpatialReference()),this.addResolvingPromise(this._validateHeightModelInfo())}this.addHandles(m(()=>this.allLayers,"change",()=>this._scheduleLayersIdGC()))}destroy(){this._unscheduleLayersIdGC(),this.presentation&&this.presentation.destroy(),this.portalItem=p(this.portalItem)}writeClippingArea(e,t){t.clippingArea||(t.clippingArea={}),t.clippingArea.geometry=e.toJSON()}readClippingEnabled(e,t){return!!t.clippingArea&&!!t.clippingArea.clip}writeClippingEnabled(e,t){this.clippingArea&&(t.clippingArea||(t.clippingArea={}),t.clippingArea.clip=e)}writeLayers(e,t,r,i){t[r]=this._layersToJSON(e,"operational-layers",i)}get loaded(){return super.loaded}readSourceVersion(e,t){const[r,i]=t.version.split(".");return new g(parseInt(r,10),parseInt(i,10))}writeSourceVersion(e,t,r){t[r]=`${pe.major}.${pe.minor}`}writeTables(e,t,r,i){const o=this._layersToJSON(e,"tables",i);o.length&&(t[r]=o)}get thumbnailUrl(){return this.portalItem?.thumbnailUrl??null}set thumbnailUrl(e){e?this._override("thumbnailUrl",e):(this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"))}set authoringApp(e){this._isAuthoringAppSetByUser=!0,this._set("authoringApp",e)}writeAuthoringApp(e,t){e&&this._isAuthoringAppSetByUser?t.authoringApp=e:t.authoringApp="ArcGIS API for JavaScript"}set authoringAppVersion(e){this._isAuthoringAppVersionSetByUser=!0,this._set("authoringAppVersion",e)}writeAuthoringAppVersion(e,r){e&&this._isAuthoringAppVersionSetByUser?r.authoringAppVersion=e:r.authoringAppVersion=t}get ground(){return this._get("ground")}set ground(e){const t=x(e);null!=t&&this._set("ground",t)}writeGround(e,t,r,i){t[r]=e?e.write({},i):{transparency:0,layers:[]}}readInitialViewProperties(e,t,r){const{viewingMode:i,spatialReference:o}=t,s=new Y,a={...t.initialState};return void 0!==o&&(a.spatialReference=o),void 0!==i&&(a.viewingMode=i),s.read(a,r),s}get spatialReference(){return this.initialViewProperties?.spatialReference??R.WebMercator}get viewingMode(){return this.initialViewProperties?.viewingMode??"global"}load(e){const t=this.ground;return this.addResolvingPromise(this._loadFromSource().then(()=>{t&&t!==this.ground&&t.destroy(),this._validateFeatureLayerSymbolVisibility()})),Promise.resolve(this)}loadAll(){return n(this,e=>{const t=this.presentation&&this.presentation.slides;e(this.ground,this.basemap,this.layers,t&&t.map(e=>e.basemap),this.tables)})}read(e,t){t??=this._loadContext,t.origin="web-scene";const r=this._isAuthoringAppVersionSetByUser,i=this._isAuthoringAppSetByUser;if(A(this,e,t=>super.read(e,t),t),i||(this._isAuthoringAppSetByUser=!1),r||(this._isAuthoringAppVersionSetByUser=!1),e.baseMap&&Array.isArray(e.baseMap.elevationLayers)&&ie(this.sourceVersion)){const t=e.baseMap.elevationLayers.map(e=>({id:e.id})),r=this.presentation.slides,i=t.filter(e=>!r.some(t=>t.visibleLayers.some(t=>t.id===e.id)));r.forEach(e=>e.visibleLayers.addMany(i))}}_writeBasemapElevationLayers(e){const t=e.ground?.layers;!e.baseMap&&t?.length&&(e.baseMap={title:"Basemap",baseMapLayers:[]}),e.baseMap&&(e.baseMap.elevationLayers=s(t))}_layersToJSON(e,t,r){const i={...r,layerContainerType:t};return e.map(e=>this._verifyWritableLayer(e,r)?e.write({},i):null).filter(e=>!!e).toArray()}_verifyWritableLayer(e,t){return!!e.persistenceEnabled&&("write"in e||(D(t,e),!1))}write(e,t){if("loaded"!==this.loadStatus){const e=new o("webscene:not-loaded","Web scene must be loaded before it can be serialized");throw l.getLogger(this).error("#toJSON()","Web scene must be loaded before it can be serialized",this.loadError||this.loadStatus),e}this._runLayersIdGC();const r=!t?.messages;t={messages:[],...t,origin:"web-scene"};const i=super.write(e,t);if(r){const e=t.messages?.filter(e=>"web-document-write:property-required"===e.name)??[];if(e.length){const t=new o("web-document:property-required","One or more properties that are required in the webscene JSON are missing, see details for the specific errors",{errors:e});throw l.getLogger(this).error("#toJSON()","One or more properties that are required in the webscene JSON are missing",e),t}}return this._writeBasemapElevationLayers(i),i}async save(e){return this._debouncedSaveOperations(0,e)}async _saveImpl(e){if(!this.portalItem)throw new o("webscene:portal-item-not-set","Portal item to save to has not been set on the WebScene");if(this.portalItem?.type!==ce)throw new o("webscene:portal-item-wrong-type",`Portal item needs to have type "${ce}"`);const t=this._updateFromPromise;await this._ensureLoadBeforeSave();const r=this._enableVerifyItemRelativeUrls(E(this.portalItem,"web-scene",!0)),i=this.write({},r);return await Promise.all(r.resources.pendingOperations),await this._verifySave(i,r,0,e),this._updateTypeKeywords(this.portalItem),await B(this.portalItem,i,this._resourceReferences,r),S(r),t&&await t,await this._saveThumbnail(),this.portalItem}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}async _saveAsImpl(e,t){let r=M.from(e);if(!r)throw new o("webscene:portal-item-required","saveAs requires a portal item to save to");r.id&&(r=r.clone(),r.id=null);const i=r.portal||V.getDefault();await this._ensureLoadBeforeSave(),r.type=ce,r.portal=i;const s=this._enableVerifyItemRelativeUrls(E(r,"web-scene",!0)),a=this.write({},s);await Promise.all(s.resources.pendingOperations),await this._verifySaveAs(a,s,t);const n=this.thumbnailUrl,l=!this._isOverridden("thumbnailUrl");this._updateTypeKeywords(r),await i.signIn();const p=this.portalItem,c={item:p,authenticated:!(!p?.id||!p.portal.user)},{copyAllowed:h,itemReloaded:u}=await z(c,i);if(c.authenticated||=u,!h)throw new o(`${s.name}:save-as-copy-not-allowed`,"Owner of this map does not allow others to save a copy");const m={...t,copyAllResources:!0};return await K(r,c,a,m)&&(this._resourceReferences.portalItem=r),await $(this._resourceReferences,s),this.portalItem=r,d.prototype.read.call(this,{version:a.version,authoringApp:a.authoringApp,authoringAppVersion:a.authoringAppVersion},{name:"web-scene",ignoreDefaults:!0,url:r.itemUrl?w(r.itemUrl):void 0}),S(s),n&&(this.thumbnailUrl=l?f(n,"w","8192"):n),s.portalItem=r,await this._saveThumbnail(),r}async _saveThumbnail(){this._isOverridden("thumbnailUrl")&&(await(this.portalItem?.updateThumbnail({thumbnail:this.thumbnailUrl})),this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"))}async _verifySave(e,t,r,i){if(!I(this.spatialReference))throw new o("webscene:unsupported-spatial-reference","Webscenes using spatial reference systems from Mars or Moon can not be saved currently.");const{ignoreUnsupported:s,requiredPropertyChecksDisabled:a,strictSchemaValidationEnabled:n}=i||{};q(t,{errorName:"webscene:save"},{ignoreUnsupported:s,supplementalUnsupportedErrors:["scenemodification:unsupported"],requiredPropertyChecksDisabled:a});const p=re();if(n&&p){const t=(await p()).validate(e);if(!t.length)return;const i=`webscene did not validate:\n${t.join("\n")}`;l.getLogger(this).error(`${1===r?"saveAs":"save"}(): ${i}`);const s=t.map(e=>new o("webscene:schema-validation",e));throw W(s)}}_verifySaveAs(e,t,r){return this._verifySave(e,t,1,r)}verifySaveAs(e){const t=this._enableVerifyItemRelativeUrls({origin:"web-scene",messages:[]}),r=this.write({},t);return this._verifySaveAs(r,t,e)}canNotSaveAs(){return!1}async updateFrom(e,t={}){const r=this._updateFrom(e,t);this._updateFromPromise=r,await r;this._updateFromPromise===r&&(this._updateFromPromise=null)}async _updateFrom(e,t={}){if(await e.whenReady(),!t.environmentExcluded&&e.environment&&(this.initialViewProperties.environment=X.prototype.clone.apply(e.environment)),!t.viewpointExcluded&&e.viewpoint&&(this.initialViewProperties.viewpoint=e.viewpoint.clone()),this.initialViewProperties.spatialReference=e.spatialReference.clone(),this.initialViewProperties.viewingMode=e.viewingMode,this.initialViewProperties.timeExtent=e.timeExtent?.clone()??null,this.initialViewProperties.analyses.updateFrom(e),null!=e.clippingArea?e.clippingArea!==this.clippingArea&&(this.clippingArea=e.clippingArea.clone(),this.clippingEnabled=!0):this.clippingEnabled=!1,e.heightModelInfo&&(this.heightModelInfo=e.heightModelInfo.clone()),e.map===this)for(const r of e.allLayerViews){const e="visible";e in r&&e in r.layer&&r._isOverridden(e)&&(r.layer[e]=r[e])}if(!t.widgetsExcluded)for(const r of e.registeredComponents)r.updateWebDocument(this);(!1===t.thumbnailExcluded||null==t.thumbnailExcluded&&!t.viewpointExcluded)&&await this.updateThumbnail(e,{size:t.thumbnailSize})}async updateThumbnail(e,t){const r=H(e,t?.size),i=await e.takeScreenshot({format:"jpg",width:r.width,height:r.height,disableDecorations:!0});this.thumbnailUrl=i.dataUrl}async _loadFromSource(){this.resourceInfo?await this._loadFromJSON(this.resourceInfo):this.portalItem?.id?await this._loadFromItem(this.portalItem):await this._loadObjectsWithLayers(),await this._afterLoad()}async _afterLoad(){for(;this._afterLoadHooks.length;){const e=this._afterLoadHooks.slice();this._afterLoadHooks.length=0,await Promise.allSettled(e.map(e=>e(this._loadContext)))}}_readAndLoadFromJSON(e){const t=this._loadContext,r=this._validateJSON(e);return this.read(r,t),this._loadFromJSON(r)}_extractOperationalLayers(e){const t=[];if(!oe(this.sourceVersion)&&e.baseMap&&Array.isArray(e.baseMap.elevationLayers))for(const o of e.baseMap.elevationLayers)t.push(o);const r=[],i=e=>(e.layers&&(e.layers=e.layers.filter(i)),"ArcGISTiledElevationServiceLayer"!==e.layerType||(oe(this.sourceVersion)||r.push(e),!1));return{operationalLayers:e.operationalLayers?e.operationalLayers.filter(i):[],operationalElevationLayers:r,basemapElevationLayers:t}}async _loadFromJSON(e){const t=new i;await this._validateSpatialReference(),await this._validateHeightModelInfo();const{populateOperationalLayers:r}=await import("./layers/support/layersCreator.js"),{operationalLayers:o,operationalElevationLayers:s,basemapElevationLayers:a}=this._extractOperationalLayers(e),n=[],l={context:{...this._loadContext,layerContainerType:"operational-layers"}};if(this.portalItem&&(l.context.portal=this.portalItem.portal||V.getDefault()),a.length>0){const e={...l,context:{...l.context,layerContainerType:"ground"}};e.defaultLayerType="ArcGISTiledElevationServiceLayer",n.push(r(this.ground.layers,a,e))}if(s.length>0){const e={...l,context:{...l.context,layerContainerType:"ground"}};e.defaultLayerType="ArcGISTiledElevationServiceLayer",n.push(r(t,s,e))}o&&o.length>0&&n.push(r(this.layers,o,l)),e.tables?.length&&n.push(r(this.tables,e.tables,{...l,context:{...l.context,layerContainerType:"tables"},defaultLayerType:"ArcGISFeatureLayer"})),await Promise.allSettled(n),await this._loadObjectsWithLayers(),this.ground.layers.addMany(t.filter(e=>"base-elevation"===e.type||"elevation"===e.type))}async _ensureLoadBeforeSave(){await this.load(),await this._loadObjectsWithLayers();const e=[],t=[...this.allLayers.items];for(const{basemap:r}of this.presentation.slides.items)r&&(t.push(...r.baseLayers.items),t.push(...r.groundLayers.items),t.push(...r.referenceLayers.items));for(const r of t)if("beforeSave"in r&&"function"==typeof r.beforeSave){const t=r.beforeSave();t&&e.push(t)}await Promise.allSettled(e)}async _loadObjectsWithLayers(){const e=[];this.ground&&e.push(this.ground.load()),this.basemap&&e.push(this.basemap.load()),this.presentation.slides.forEach(t=>{t.basemap&&e.push(t.basemap.load())}),await Promise.allSettled(e)}async _loadFromItem(e){if(await e.load().catch(e=>{throw new o("webscene:load-portal-item","Failed to load portal item",{error:e})}),"Web Scene"!==e.type)throw new o("webscene:invalid-portal-item","Invalid portal item type '${type}', expected 'Web Scene'",{type:e.type});const t=await e.fetchData();this.resourceInfo=t;const r=this._loadContext;r.url=w(e.itemUrl),r.portal=e.portal||V.getDefault(),r.portalItem=e,r.readResourcePaths=[],await this._readAndLoadFromJSON(t),this._resourceReferences={portalItem:e,paths:r.readResourcePaths??[]}}_validateSpatialReference(){const e=this.initialViewProperties,t=this._sceneSpatialReference;let r;if("local"!==e.viewingMode){if(!J(t,1))return Promise.reject(new o("webscene:unsupported-spatial-reference","Unsupported spatial reference (${spatialReference.wkid}) in global mode, only Web Mercator, WGS84 GCS or CGCS2000 are supported",{spatialReference:t,viewingMode:e.viewingMode}));r=e=>!e||P(e,t)}else{if(!J(t,2))return Promise.reject(new o("webscene:unsupported-spatial-reference","Unsupported spatial reference (${spatialReference.wkid}) in local mode, only projected coordinate systems are supported",{spatialReference:t,viewingMode:e.viewingMode}));r=e=>!e||e.equals(t)}const i=e=>e?.camera?.position.spatialReference??e?.targetGeometry?.spatialReference,s=e.viewpoint,a=i(s);if(a&&!r(a))return Promise.reject(new o("webscene:incompatible-camera-spatial-reference","Camera spatial reference (${cameraSpatialReference.wkid}) is incompatible with the scene spatial reference (${sceneSpatialReference.wkid})",{cameraSpatialReference:a,sceneSpatialReference:t,viewingMode:e.viewingMode}));const n=this.presentation.slides.find(e=>!r(i(e.viewpoint)));if(n){const r=i(n.viewpoint);return Promise.reject(new o("webscene:incompatible-slide-spatial-reference","Slide spatial reference (${slideSpatialReference.wkid}) is incompatible with the scene spatial reference (${sceneSpatialReference.wkid})",{slideSpatialReference:r,sceneSpatialReference:t,viewingMode:e.viewingMode}))}return Promise.resolve()}_validateHeightModelInfo(){const e=this._sceneSpatialReference,t=U(this.heightModelInfo,e);return t?Promise.reject(t):Promise.resolve()}_validateFeatureLayerSymbolVisibility(){this.sourceVersion?.greaterEqual(1,35)||this.layers.forEach(e=>{"feature"===e.type&&e.addHandles(y(()=>e.loaded,()=>{"on-the-ground"===e.elevationInfo?.mode&&"simple"===e.renderer?.type&&"polygon-3d"===e.renderer.symbol?.type&&e.renderer.symbol.symbolLayers.some(t=>"fill"===t.type&&null!=t.material&&((!t.material.color||t.material.color.a*e.opacity<te)&&(e.loadWarnings.push(new b("feature-layer:invisible-draped-symbols","FeatureLayer has fully transparent symbols which will no longer render or highlight",{layer:e})),!0)))},{once:!0,sync:!0}))})}_validateJSON(e){const t=g.parse(e.version||"","webscene");return pe.validate(t),e.version=`${t.major}.${t.minor}`,1===t.major&&t.minor<=2&&(e.spatialReference=R.WebMercator.toJSON()),e}_updateTypeKeywords(e){C(e,T.LOCAL_SCENE,"local"===this.initialViewProperties.viewingMode),C(e,T.DEVELOPER_BASEMAP,N(this.basemap)||this.presentation.slides.some(({basemap:e})=>!!e&&N(e))),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t))}get _sceneSpatialReference(){return this.initialViewProperties.spatialReference||R.WebMercator}get _verifyItemRelativeRootPath(){return this.portalItem?.itemUrl?w(this.portalItem.itemUrl).path:null}_enableVerifyItemRelativeUrls(e){const t=this._verifyItemRelativeRootPath;return t&&(e.verifyItemRelativeUrls={rootPath:t,writtenUrls:[]}),e}_unscheduleLayersIdGC(){this._layersIdGCTimeoutId&&(clearTimeout(this._layersIdGCTimeoutId),this._layersIdGCTimeoutId=0)}_scheduleLayersIdGC(){this._unscheduleLayersIdGC(),this._layersIdGCTimeoutId=setTimeout(()=>{this._layersIdGCTimeoutId=0,this._runLayersIdGC()},3e3)}_runLayersIdGC(){this._unscheduleLayersIdGC();const e=this.applicationProperties?.viewing?.search,t=e=>this.allLayers.some(t=>t.id===e&&t.persistenceEnabled);e?.layers&&(e.layers=e.layers.filter(e=>t(e.id)));const r=this.presentation&&this.presentation.slides;r&&r.forEach(e=>{e.visibleLayers&&(e.visibleLayers=e.visibleLayers.filter(e=>t(e.id)))})}static fromJSON(e){if(!e)throw new o("webscene:empty-resource","Expected a JSON resource but got nothing");return new this({resourceInfo:e})}static{this.version=`${pe.major}.${pe.minor}`}};e([v({type:Q,json:{write:!0}})],de.prototype,"applicationProperties",void 0),e([v({type:j,json:{read:{source:"clippingArea.geometry",reader:O},write:{target:"clippingArea.geometry"}}})],de.prototype,"clippingArea",void 0),e([ae("clippingArea")],de.prototype,"writeClippingArea",null),e([v({type:Boolean,json:{write:{target:"clippingArea.clip"}}})],de.prototype,"clippingEnabled",void 0),e([ne("clippingEnabled",["clippingArea"])],de.prototype,"readClippingEnabled",null),e([ae("clippingEnabled")],de.prototype,"writeClippingEnabled",null),e([v({type:F,json:{read:{source:"mapFloorInfo"},write:{target:"mapFloorInfo"}}})],de.prototype,"floorInfo",void 0),e([v({type:L,json:{write:!0}})],de.prototype,"heightModelInfo",void 0),e([v({json:{write:{target:"operationalLayers",ignoreOrigin:!0}}})],de.prototype,"layers",void 0),e([ae("layers")],de.prototype,"writeLayers",null),e([v({readOnly:!0,type:g,json:{type:se(pe).map(e=>e.toString()),write:{ignoreOrigin:!0,target:"version",isRequired:!0,overridePolicy:()=>({enabled:!0,allowNull:!0,ignoreOrigin:!0})}}})],de.prototype,"sourceVersion",void 0),e([ne("sourceVersion",["version"])],de.prototype,"readSourceVersion",null),e([ae("sourceVersion")],de.prototype,"writeSourceVersion",null),e([v({json:{read:!1,write:{enabled:!0,ignoreOrigin:!0}}})],de.prototype,"tables",void 0),e([ae("tables")],de.prototype,"writeTables",null),e([v()],de.prototype,"thumbnailUrl",null),e([v({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],de.prototype,"authoringApp",null),e([ae("authoringApp")],de.prototype,"writeAuthoringApp",null),e([v({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],de.prototype,"authoringAppVersion",null),e([ae("authoringAppVersion")],de.prototype,"writeAuthoringAppVersion",null),e([v({json:{write:{isRequired:!0,enabled:!0,overridePolicy:()=>({isRequired:!0,enabled:!0,allowNull:!0,ignoreOrigin:!0})}}})],de.prototype,"ground",null),e([ae("ground")],de.prototype,"writeGround",null),e([v({type:i.ofType(ee),json:{write:!0}})],de.prototype,"transportationNetworks",void 0),e([v({type:Z,nonNullable:!0,json:{write:{ignoreOrigin:!0,writer:(e,t,r,i)=>{if(e.slides&&e.slides.length>0){const r={...i,isPresentation:!0};t.presentation=e.write({},r)}}}}})],de.prototype,"presentation",void 0),e([v({type:Y,nonNullable:!0,json:{write:{target:"initialState",isRequired:!0,ignoreOrigin:!0},default:()=>new Y({viewingMode:"global",spatialReference:R.WebMercator})}})],de.prototype,"initialViewProperties",void 0),e([ne("initialViewProperties",["initialState","spatialReference","viewingMode"])],de.prototype,"readInitialViewProperties",null),e([v({type:R,json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],de.prototype,"spatialReference",null),e([v({type:["local","global"],json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],de.prototype,"viewingMode",null),e([v({type:M})],de.prototype,"portalItem",void 0),e([v()],de.prototype,"resourceInfo",void 0),e([v({type:k,json:{write:!0}})],de.prototype,"widgets",void 0),de=e([_("esri.WebScene")],de);const he=de;export{he as default};
@@ -86,7 +86,7 @@ export interface AreaMeasurementAnalysisProperties extends AnalysisProperties, P
86
86
  * 2. If the vertices do not form a planar surface, the measurement polygon is projected to a horizontal plane
87
87
  * and the area and perimeter are computed from the projected geometry.
88
88
  *
89
- * ![area-measurement-3d-types](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/area-measurement-3d-types.png)
89
+ * ![area-measurement-3d-types](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/area-measurement-3d-types.avif)
90
90
  *
91
91
  * Use the [Area Measurement 3D component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-area-measurement-3d/) to display a user
92
92
  * interface for the area measurement analysis.
@@ -82,7 +82,7 @@ export interface DirectLineMeasurementAnalysisProperties extends AnalysisPropert
82
82
  * and in the [analysis results](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/DirectLineMeasurementAnalysisView3D/#result)
83
83
  * only the horizontal and vertical distances are calculated.
84
84
  *
85
- * ![measurement-line-3d](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/direct-line-measurement-3d.png)
85
+ * ![measurement-line-3d](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/direct-line-measurement-3d.avif)
86
86
  *
87
87
  * Use the [Direct Line Measurement 3D component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-direct-line-measurement-3d/) to
88
88
  * display a user interface for the direct line measurement analysis.
@@ -15,7 +15,7 @@ export interface LengthDimensionProperties extends Partial<Pick<LengthDimension,
15
15
  * LengthDimension enables the measurement of linear distances between the specified [start](https://developers.arcgis.com/javascript/latest/references/core/analysis/LengthDimension/#startPoint) and [end](https://developers.arcgis.com/javascript/latest/references/core/analysis/LengthDimension/#endPoint) points.
16
16
  * Depending on the [measure type](https://developers.arcgis.com/javascript/latest/references/core/analysis/LengthDimension/#measureType), either the direct, horizontal, or vertical distance between these points is measured.
17
17
  *
18
- * <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/analysis/dimension-length-measure-type-separate.jpg" alt="length-dimension-measure-types" style="max-width:650px;"/>
18
+ * <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/analysis/dimension-length-measure-type-separate.avif" alt="length-dimension-measure-types" style="max-width:650px;"/>
19
19
  *
20
20
  * Length dimensions can be displayed by adding them to a [DimensionAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/DimensionAnalysis/).
21
21
  *
@@ -81,7 +81,7 @@ export default class LengthDimension extends LengthDimensionSuperclass {
81
81
  * If either vertical or horizontal mode is used, the [orientation](https://developers.arcgis.com/javascript/latest/references/core/analysis/LengthDimension/#orientation) is not applied
82
82
  * and the [offset](https://developers.arcgis.com/javascript/latest/references/core/analysis/LengthDimension/#offset) direction is relative to the input points (on a plane derived from them).
83
83
  *
84
- * <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/analysis/dimension-length-measure-type.jpg" alt="length-dimension-measure-types" style="max-width:250px;"/>
84
+ * <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/analysis/dimension-length-measure-type.avif" alt="length-dimension-measure-types" style="max-width:250px;"/>
85
85
  *
86
86
  * @default "direct"
87
87
  */
@@ -89,7 +89,7 @@ export default class LengthDimension extends LengthDimensionSuperclass {
89
89
  /**
90
90
  * Styling option that controls the shortest distance from the [startPoint](https://developers.arcgis.com/javascript/latest/references/core/analysis/LengthDimension/#startPoint) or [endPoint](https://developers.arcgis.com/javascript/latest/references/core/analysis/LengthDimension/#endPoint) to the dimension line in meters.
91
91
  *
92
- * <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/analysis/dimension-length-offset.jpg" alt="length-dimension-offset" style="max-width:250px;"/>
92
+ * <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/analysis/dimension-length-offset.avif" alt="length-dimension-offset" style="max-width:250px;"/>
93
93
  *
94
94
  * @default 0
95
95
  */
@@ -103,7 +103,7 @@ export default class LengthDimension extends LengthDimensionSuperclass {
103
103
  * viewing from its start point. When the start and end points are vertically aligned,
104
104
  * increasing the orientation rotates the dimension clockwise relative to compass north.
105
105
  *
106
- * <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/analysis/dimension-length-orientation.jpg" alt="length-dimension-orientation" style="max-width:500px;"/>
106
+ * <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/analysis/dimension-length-orientation.avif" alt="length-dimension-orientation" style="max-width:500px;"/>
107
107
  *
108
108
  * @default 0
109
109
  */
@@ -59,20 +59,20 @@ export interface ShadowCastAnalysisProperties extends AnalysisProperties, Partia
59
59
  * within the selected time range. Areas that receive less shading than the minimum show no shadow. In the image below,
60
60
  * on May 1, 2021, shadows are displayed only where shading exceeds 4 hours between 10AM and 4PM.
61
61
  *
62
- * [![minimum duration mode](https://developers.arcgis.com/javascript/latest/assets/references/core/analysis/shadow-cast-analysis-threshold.png)](https://developers.arcgis.com/javascript/latest/sample-code/shadow-cast/)
62
+ * [![minimum duration mode](https://developers.arcgis.com/javascript/latest/assets/references/core/analysis/shadow-cast-analysis-threshold.avif)](https://developers.arcgis.com/javascript/latest/sample-code/shadow-cast/)
63
63
  *
64
64
  * **Total shadow duration** mode displays the cumulative duration of shadow within the selected time range using opacity:
65
65
  * areas that receive no shadow remain fully transparent, while areas receiving the highest accumulated shadow duration
66
66
  * use a default opacity of 0.7. Intermediate values are interpolated. This mode can visualize shadows continuously or
67
67
  * in 1-hour intervals.
68
68
  *
69
- * [![total duration mode](https://developers.arcgis.com/javascript/latest/assets/references/core/analysis/shadow-cast-analysis-duration.png)](https://developers.arcgis.com/javascript/latest/sample-code/shadow-cast/)
69
+ * [![total duration mode](https://developers.arcgis.com/javascript/latest/assets/references/core/analysis/shadow-cast-analysis-duration.avif)](https://developers.arcgis.com/javascript/latest/sample-code/shadow-cast/)
70
70
  *
71
71
  * **Discrete shadows** mode displays individual shadows at regular intervals within the selected time range.
72
72
  * For example, with a time range from 10AM to 11AM and an interval set to 30 minutes, the shadows at 10AM, 10:30AM and
73
73
  * 11:00AM will be displayed.
74
74
  *
75
- * [![discrete mode](https://developers.arcgis.com/javascript/latest/assets/references/core/analysis/shadow-cast-analysis-discrete.png)](https://developers.arcgis.com/javascript/latest/sample-code/shadow-cast/)
75
+ * [![discrete mode](https://developers.arcgis.com/javascript/latest/assets/references/core/analysis/shadow-cast-analysis-discrete.avif)](https://developers.arcgis.com/javascript/latest/sample-code/shadow-cast/)
76
76
  *
77
77
  * By default, the analysis also displays a tooltip next to the pointer that reports the total shadow duration at that
78
78
  * location, rounded to 15‑minute increments. This allows you to inspect precise shadow durations anywhere within the
@@ -24,7 +24,7 @@ export interface SliceAnalysisProperties extends AnalysisProperties, Partial<Pic
24
24
  * SliceAnalysis can be used to programmatically create a plane that slices through 3D features in a
25
25
  * 3D [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
26
26
  *
27
- * ![slice](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/slice.gif)
27
+ * ![slice](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/slice.webm)
28
28
  *
29
29
  * A slice takes a [SlicePlane](https://developers.arcgis.com/javascript/latest/references/core/analysis/SlicePlane/)
30
30
  * as an input, which can be set through the [shape](https://developers.arcgis.com/javascript/latest/references/core/analysis/SliceAnalysis/#shape) property. If the shape has a tilt angle other than `0`, the angle
@@ -13,7 +13,7 @@ export interface SlicePlaneProperties extends Partial<Pick<SlicePlane, "heading"
13
13
  * or [SliceAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/SliceAnalysis/).
14
14
  * The slice plane is defined by a position, heading and tilt. Its size is defined by width and height.
15
15
  *
16
- * [![slice-plane](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/slice-plane.png)](https://developers.arcgis.com/javascript/latest/sample-code/building-scene-layer-slice/)
16
+ * [![slice-plane](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/slice-plane.avif)](https://developers.arcgis.com/javascript/latest/sample-code/building-scene-layer-slice/)
17
17
  *
18
18
  * When working with a [SliceAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/SliceAnalysis/), the plane can be set or retrieved from the
19
19
  * [SliceAnalysis.shape](https://developers.arcgis.com/javascript/latest/references/core/analysis/SliceAnalysis/#shape) property.
@@ -10,6 +10,7 @@ import type FeatureLayer from "../../layers/FeatureLayer.js";
10
10
  import type SubtypeGroupLayer from "../../layers/SubtypeGroupLayer.js";
11
11
  import type Relationship from "../../layers/support/Relationship.js";
12
12
  import type UtilityNetwork from "../../networks/UtilityNetwork.js";
13
+ import type Portal from "../../portal/Portal.js";
13
14
  import type Query from "../../rest/support/Query.js";
14
15
  import type { AbortOptions } from "../../core/promiseUtils.js";
15
16
  import type { ProjectOptions } from "../../geometry/operators/types.js";
@@ -84,6 +85,29 @@ export function findUtilityNetwork(map: MapClass, layer: any): UtilityNetwork |
84
85
  */
85
86
  export function queryAllJSON(layer: FeatureLayer | SubtypeGroupLayer, query: Query, options?: RequestOptions): Promise<unknown>;
86
87
 
88
+ /**
89
+ * Returns the URL of the ArcGIS Enterprise portal that owns the given service.
90
+ *
91
+ * @param serviceUrl - The URL of the service.
92
+ * @param options - Optional abort options for cancelling the request.
93
+ * @returns A promise that resolves to the owning portal URL, or `null` if it cannot be determined.
94
+ * @internal
95
+ * @internal
96
+ */
97
+ export function getOwningPortalUrl(serviceUrl: string, options?: AbortOptions | null | undefined): Promise<string | null>;
98
+
99
+ /**
100
+ * Returns whether a portal user has a given user type extension.
101
+ *
102
+ * @param portal - The portal that the user belongs to.
103
+ * @param userName - The username to evaluate.
104
+ * @param userTypeExtensionName - The user type extension name to check.
105
+ * @returns A promise that resolves to `true` when the user has the extension, otherwise `false`.
106
+ * @internal
107
+ * @internal
108
+ */
109
+ export function hasUserTypeExtension(portal: Portal, userName: string, userTypeExtensionName: string): Promise<boolean>;
110
+
87
111
  /**
88
112
  * Finds an item in the specified map or generates a new value if it does not exist.
89
113
  *
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{getOrCreateMapValue as e}from"../../core/MapUtils.js";import r from"../../core/ReactiveMap.js";import{initializeProjection as t}from"../../geometry/projectionUtils.js";import{queryAllJSON as a}from"../../layers/support/featureQueryAll.js";import{findRelatedLayer as o,findUtilityNetwork as s,isFeatureSupportedLayer as i,isRelatableFeatureSupportedLayer as p,isRelatableLayer as l}from"../../popup/support/featureUtils.js";const u=o,m=p,n=l,f=i,y=s,c=a,j=e;function d(){return new r}const L=t;export{d as createReactiveMap,u as findRelatedLayer,y as findUtilityNetwork,j as getOrCreateMapValue,L as initializeProjection,f as isFeatureSupportedLayer,m as isRelatableFeatureSupportedLayer,n as isRelatableLayer,c as queryAllJSON};
2
+ import{getOrCreateMapValue as r}from"../../core/MapUtils.js";import e from"../../core/ReactiveMap.js";import{initializeProjection as t}from"../../geometry/projectionUtils.js";import{queryAllJSON as a}from"../../layers/support/featureQueryAll.js";import{getOwningPortalUrl as o}from"../../layers/support/layerUtils.js";import{findRelatedLayer as s,findUtilityNetwork as i,isFeatureSupportedLayer as p,isRelatableFeatureSupportedLayer as l,isRelatableLayer as u}from"../../popup/support/featureUtils.js";import{hasUserTypeExtension as m}from"../../portal/support/utils.js";const n=s,f=l,y=u,j=p,c=i,U=a,d=o,g=m,L=r;function R(){return new e}const w=t;export{R as createReactiveMap,n as findRelatedLayer,c as findUtilityNetwork,L as getOrCreateMapValue,d as getOwningPortalUrl,g as hasUserTypeExtension,w as initializeProjection,j as isFeatureSupportedLayer,f as isRelatableFeatureSupportedLayer,y as isRelatableLayer,U as queryAllJSON};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- const t=[];function e(t){return 0===t.length?'""':t.startsWith('"')||t.startsWith(".")||t[0]>="0"&&t[0]<="9"?t:'"'+t.trim()+'"'}function n(t){let n="",r="",u=!1;for(let l=0;l<t.length;l++){const s=t[l];u?'"'===s?'"'===t[l+1]?(n+=`\\${s}`,l+=1):u=!1:n+=s:/\s/.test(s)||(","===s?(r+=""!==n?e(n)+",":",",n=""):")"===s||"]"===s?(r+=""!==n?e(n)+"]}":"]}",n=""):"("===s||"["===s?(r+='{ "entity": "'+n.toUpperCase().trim()+'", "values":[',n=""):'"'===s?(u=!0,n=""):n+=s)}return JSON.parse(r)}function r(e){try{for(let n=0;n<t.length;n++)if(t[n].spatialReferenceWkt===e)return t[n].unit;const r=l(n(e));if(null===r)return null;let s=null;for(const t of r.values)if("object"==typeof t&&("UNIT"===t.entity||"ANGLEUNIT"===t.entity||"LENGTHUNIT"===t.entity)){s=t;break}if(null===s)return null;const i=u("GEOGCS"===r.entity||"GEOGCRS"===r.entity?"angular":"linear",s.values[1],s.values[2]);return t.push({spatialReferenceWkt:e,unit:i}),t.length>10&&t.shift(),i}catch(r){return null}}function u(t,e,n){if(null!=n)try{if("EPSG"===n.values[0]){return{type:t,wkid:Number.parseInt(n.values[1],10),factor:e}}}catch(r){}return{type:t,factor:e}}function l(t){if(null===t)return null;switch(t.entity){case"GEOGCRS":case"GEOGCS":case"PROJCRS":case"PROJCS":return t}const e=[];for(const n of t.values)if("object"==typeof n&&void 0!==n.entity)switch(n.entity){case"GEOGCRS":case"GEOGCS":case"PROJCRS":case"PROJCS":return n;default:e.push(n)}for(const n of e){const t=l(n);if(null!=t)return t}return null}export{r as findSpatialReferenceUnitFromWkt};
2
+ const t=[];function e(t){return 0===t.length?'""':t.startsWith('"')||t.startsWith(".")||t[0]>="0"&&t[0]<="9"?t:'"'+t.trim()+'"'}function n(t){let n="",r="",u=!1;for(let l=0;l<t.length;l++){const s=t[l];u?'"'===s?'"'===t[l+1]?(n+=`\\${s}`,l+=1):u=!1:n+=s:/\s/.test(s)||(","===s?(r+=""!==n?e(n)+",":",",n=""):")"===s||"]"===s?(r+=""!==n?e(n)+"]}":"]}",n=""):"("===s||"["===s?(r+='{ "entity": "'+n.toUpperCase().trim()+'", "values":[',n=""):'"'===s?(u=!0,n=""):n+=s)}return JSON.parse(r)}function r(e){try{for(let n=0;n<t.length;n++)if(t[n].spatialReferenceWkt===e)return t[n].unit;const r=l(n(e));if(null===r)return null;let s=null;for(const t of r.values)if("object"==typeof t&&("UNIT"===t.entity||"ANGLEUNIT"===t.entity||"LENGTHUNIT"===t.entity)){s=t;break}if(null===s)return null;const i=u("GEOGCS"===r.entity||"GEOGCRS"===r.entity?"angular":"linear",s.values[1],s.values[2]);return t.push({spatialReferenceWkt:e,unit:i}),t.length>10&&t.shift(),i}catch(r){return null}}function u(t,e,n){if(null!=n)try{if("EPSG"===n.values[0]){return{type:t,wkid:Number.parseInt(n.values[1],10),factor:e}}}catch(r){}return{type:t,factor:e}}function l(t){if(null===t)return null;switch(t.entity){case"GEOGCRS":case"GEOGCS":case"PROJCRS":case"PROJCS":return t}const e=[];for(const n of t.values)if("object"==typeof n&&void 0!==n.entity)switch(n.entity){case"GEOGCRS":case"GEOGCS":case"PROJCRS":case"PROJCS":return n;default:e.push(n)}for(const n of e){const t=l(n);if(null!=t)return t}return null}export{r as findSpatialReferenceUnitFromWkt,n as parseWkt};