@arcgis/core 5.0.0-next.54 → 5.0.0-next.56

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 (530) hide show
  1. package/Color.d.ts +12 -4
  2. package/Ground.d.ts +4 -6
  3. package/Ground.js +1 -1
  4. package/WebScene.js +1 -1
  5. package/applications/Components/SelectionOperation.d.ts +5 -0
  6. package/applications/Components/SketchTooltipControls.d.ts +5 -0
  7. package/applications/Components/actionUtils.d.ts +5 -0
  8. package/applications/Components/analysisUtils.d.ts +5 -0
  9. package/applications/Components/arcadeEditorUtils.d.ts +5 -0
  10. package/applications/Components/arcadeFeatureUtils.d.ts +5 -0
  11. package/applications/Components/basemapUtils.d.ts +5 -0
  12. package/applications/Components/drawUtils.d.ts +13 -1
  13. package/applications/Components/featureUtils.d.ts +5 -0
  14. package/applications/Components/fontUtils.d.ts +5 -0
  15. package/applications/Components/formatUtils.d.ts +5 -0
  16. package/applications/Components/getDefaultUnits.d.ts +5 -0
  17. package/applications/Components/gfxUtils.d.ts +5 -0
  18. package/applications/Components/imageryUtils.d.ts +5 -0
  19. package/applications/Components/layerOriginUtils.d.ts +5 -0
  20. package/applications/Components/layersEffectsJsonUtils.d.ts +5 -0
  21. package/applications/Components/previewSymbol2D.d.ts +5 -0
  22. package/applications/Components/reactiveUtils.d.ts +6 -0
  23. package/applications/Components/sanitizerUtils.d.ts +5 -0
  24. package/applications/Components/stringUtils.d.ts +6 -2
  25. package/applications/Components/styleUtils.d.ts +5 -0
  26. package/applications/Components/svgUtils.d.ts +5 -0
  27. package/applications/Components/testUtils.d.ts +5 -0
  28. package/applications/Components/viewUtils.d.ts +5 -0
  29. package/applications/Components/webStyleSymbolUtils.d.ts +5 -0
  30. package/applications/Excalibur/videoViewUtils.d.ts +5 -0
  31. package/applications/ExperienceBuilder/sketchUtils.d.ts +5 -0
  32. package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +10 -0
  33. package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +10 -0
  34. package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +11 -1
  35. package/applications/KnowledgeStudio/reshape.d.ts +5 -0
  36. package/applications/KnowledgeStudio/resourceSerializationUtils.d.ts +5 -0
  37. package/applications/MapViewer/layerUtils.d.ts +5 -0
  38. package/applications/MapViewer/mediaUtils.d.ts +5 -0
  39. package/applications/MapViewer/templateUtils.d.ts +5 -0
  40. package/applications/PortalApp/layerUtils.d.ts +5 -0
  41. package/applications/SceneViewer/colorUtils.d.ts +5 -0
  42. package/applications/SceneViewer/devEnvironmentUtils.d.ts +5 -0
  43. package/applications/SceneViewer/layerUtils.d.ts +5 -0
  44. package/applications/SceneViewer/sceneViewerUtils.d.ts +6 -2
  45. package/applications/SceneViewer/symbolUtils.d.ts +5 -0
  46. package/applications/Urban/meshUtils.d.ts +5 -0
  47. package/applications/WebEditor/sketchUtils.d.ts +5 -0
  48. package/arcade.d.ts +22 -0
  49. package/assets/esri/core/workers/RemoteClient.js +1 -1
  50. package/assets/esri/core/workers/chunks/{308fb48d080e01499a26.js → 436f206898306df019ac.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{f2e8abb556a380cc2941.js → 492d575894c7905bb70c.js} +1 -1
  52. package/assets/esri/core/workers/chunks/5340887a4a48bde3407a.js +1 -0
  53. package/assets/esri/core/workers/chunks/5873c7b65d0fb04998fb.js +1 -0
  54. package/assets/esri/core/workers/chunks/82ced9254b27707522ef.js +1 -0
  55. package/assets/esri/core/workers/chunks/8628bf45a33af786cd49.js +1 -0
  56. package/assets/esri/core/workers/chunks/{d63cf90d1356d1f10138.js → 8f4c480c418eba299c2b.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{fa92a7c11befbad8739f.js → b4f944ef6c174b20b619.js} +1 -1
  58. package/assets/esri/core/workers/chunks/c531c0e3d420a1be0ad2.js +316 -0
  59. package/assets/esri/core/workers/chunks/d9736c783513e9c9b22f.js +1 -0
  60. package/assets/esri/core/workers/chunks/{18cc131fd63d8c15df54.js → da2c41ac0f82f32013c1.js} +8 -8
  61. package/assets/esri/core/workers/chunks/{cc67f066c3c0c2a1a37c.js → dd99b77a7c0a052507bb.js} +1 -1
  62. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  63. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  64. package/chunks/ChapmanAtmosphere.glsl.js +10 -9
  65. package/chunks/GlowComposition.glsl.js +1 -1
  66. package/chunks/HUDMaterial.glsl.js +1 -1
  67. package/chunks/Haze.glsl.js +4 -4
  68. package/chunks/LineCallout.glsl.js +2 -2
  69. package/chunks/Precipitation.glsl.js +1 -1
  70. package/chunks/RasterColorizer.glsl.js +10 -10
  71. package/chunks/Terrain.glsl.js +1 -1
  72. package/chunks/Viewshed.glsl.js +1 -1
  73. package/chunks/lyr3DMain.js +1 -1
  74. package/chunks/vec32.js +1 -1
  75. package/config.d.ts +19 -1
  76. package/config.js +1 -1
  77. package/core/Error.d.ts +3 -4
  78. package/core/Error.js +1 -1
  79. package/core/Warning.js +1 -1
  80. package/core/accessorSupport/decorators.d.ts +11 -0
  81. package/core/accessorSupport/types.d.ts +2 -0
  82. package/core/has.js +1 -1
  83. package/core/lang.d.ts +6 -0
  84. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  85. package/core/libs/gl-matrix-2/vec3.js +1 -1
  86. package/core/promiseUtils.d.ts +5 -0
  87. package/core/quantity.d.ts +5 -0
  88. package/core/reactiveUtils.d.ts +142 -0
  89. package/core/scheduling.d.ts +26 -5
  90. package/core/scheduling.js +1 -1
  91. package/core/sql/WhereClause.d.ts +2 -13
  92. package/core/sql/{WhereGrammar.d.ts → types.d.ts} +22 -1
  93. package/core/sql.d.ts +8 -0
  94. package/core/string.js +1 -1
  95. package/core/types.d.ts +30 -1
  96. package/core/units.d.ts +8 -0
  97. package/core/urlUtils.d.ts +7 -0
  98. package/core/workers/loaderConfig.js +1 -1
  99. package/core/workers/workerFactory.js +1 -1
  100. package/core/workers.d.ts +26 -0
  101. package/form/elements/inputs.d.ts +55 -0
  102. package/form/elements.d.ts +43 -0
  103. package/geometry/coordinateFormatter.d.ts +33 -0
  104. package/geometry/geometryEngine.d.ts +16 -0
  105. package/geometry/operators/affineTransformOperator.d.ts +5 -0
  106. package/geometry/operators/alphaShapeOperator.d.ts +9 -0
  107. package/geometry/operators/areaOperator.d.ts +7 -0
  108. package/geometry/operators/autoCompleteOperator.d.ts +5 -0
  109. package/geometry/operators/boundaryOperator.d.ts +5 -0
  110. package/geometry/operators/bufferOperator.d.ts +11 -0
  111. package/geometry/operators/centroidOperator.d.ts +14 -0
  112. package/geometry/operators/clipOperator.d.ts +7 -0
  113. package/geometry/operators/containsOperator.d.ts +9 -0
  114. package/geometry/operators/convexHullOperator.d.ts +9 -0
  115. package/geometry/operators/crossesOperator.d.ts +7 -0
  116. package/geometry/operators/cutOperator.d.ts +18 -0
  117. package/geometry/operators/densifyOperator.d.ts +21 -0
  118. package/geometry/operators/differenceOperator.d.ts +7 -0
  119. package/geometry/operators/disjointOperator.d.ts +8 -0
  120. package/geometry/operators/distanceOperator.d.ts +8 -0
  121. package/geometry/operators/equalsOperator.d.ts +5 -0
  122. package/geometry/operators/extendOperator.d.ts +8 -0
  123. package/geometry/operators/generalizeOperator.d.ts +7 -0
  124. package/geometry/operators/geodesicBufferOperator.d.ts +13 -0
  125. package/geometry/operators/geodesicProximityOperator.d.ts +13 -0
  126. package/geometry/operators/geodeticAreaOperator.d.ts +11 -0
  127. package/geometry/operators/geodeticDensifyOperator.d.ts +12 -0
  128. package/geometry/operators/geodeticDistanceOperator.d.ts +14 -0
  129. package/geometry/operators/geodeticLengthOperator.d.ts +11 -0
  130. package/geometry/operators/geodeticUtilsOperator.d.ts +11 -0
  131. package/geometry/operators/graphicBufferOperator.d.ts +7 -0
  132. package/geometry/operators/integrateOperator.d.ts +9 -0
  133. package/geometry/operators/intersectionOperator.d.ts +7 -0
  134. package/geometry/operators/intersectsOperator.d.ts +9 -0
  135. package/geometry/operators/isNearOperator.d.ts +7 -0
  136. package/geometry/operators/labelPointOperator.d.ts +14 -0
  137. package/geometry/operators/lengthOperator.d.ts +7 -0
  138. package/geometry/operators/linesToPolygonsOperator.d.ts +5 -0
  139. package/geometry/operators/locateBetweenOperator.d.ts +10 -0
  140. package/geometry/operators/minimumBoundingCircleOperator.d.ts +13 -0
  141. package/geometry/operators/multiPartToSinglePartOperator.d.ts +7 -0
  142. package/geometry/operators/offsetOperator.d.ts +44 -0
  143. package/geometry/operators/overlapsOperator.d.ts +7 -0
  144. package/geometry/operators/polygonOverlayOperator.d.ts +6 -0
  145. package/geometry/operators/polygonSlicerOperator.d.ts +5 -0
  146. package/geometry/operators/projectOperator.d.ts +41 -0
  147. package/geometry/operators/proximityOperator.d.ts +8 -0
  148. package/geometry/operators/relateOperator.d.ts +7 -0
  149. package/geometry/operators/reshapeOperator.d.ts +5 -0
  150. package/geometry/operators/shapePreservingProjectOperator.d.ts +27 -0
  151. package/geometry/operators/simplifyOGCOperator.d.ts +8 -0
  152. package/geometry/operators/simplifyOperator.d.ts +9 -0
  153. package/geometry/operators/support/geographicTransformationUtils.d.ts +11 -0
  154. package/geometry/operators/symmetricDifferenceOperator.d.ts +12 -0
  155. package/geometry/operators/touchesOperator.d.ts +7 -0
  156. package/geometry/operators/unionOperator.d.ts +7 -0
  157. package/geometry/operators/withinOperator.d.ts +9 -0
  158. package/geometry/projection/projectPointToVector.js +1 -1
  159. package/geometry/support/geodesicUtils.d.ts +8 -0
  160. package/geometry/support/jsonUtils.d.ts +7 -0
  161. package/geometry/support/meshUtils.d.ts +5 -0
  162. package/geometry/support/normalizeUtils.d.ts +7 -0
  163. package/geometry/support/webMercatorUtils.d.ts +12 -0
  164. package/geometry/types.d.ts +10 -1
  165. package/geometry.d.ts +38 -0
  166. package/interfaces.d.ts +52 -58
  167. package/intl.d.ts +111 -0
  168. package/kernel.d.ts +5 -0
  169. package/kernel.js +1 -1
  170. package/layers/BaseDynamicLayer.d.ts +1 -1
  171. package/layers/CSVLayer.d.ts +2 -2
  172. package/layers/CatalogLayer.d.ts +2 -2
  173. package/layers/FeatureLayer.d.ts +8 -4
  174. package/layers/GeoJSONLayer.d.ts +2 -1
  175. package/layers/ILyr3DWasmPerSceneView.js +1 -1
  176. package/layers/Layer.d.ts +1 -1
  177. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  178. package/layers/OGCFeatureLayer.d.ts +1 -1
  179. package/layers/ParquetLayer.d.ts +1 -1
  180. package/layers/RouteLayer.js +1 -1
  181. package/layers/SceneLayer.d.ts +2 -1
  182. package/layers/StreamLayer.d.ts +6 -5
  183. package/layers/SubtypeGroupLayer.d.ts +3 -4
  184. package/layers/VectorTileLayer.d.ts +1 -1
  185. package/layers/WFSLayer.d.ts +2 -1
  186. package/layers/WMSLayer.d.ts +2 -2
  187. package/layers/catalog/catalogUtils.d.ts +6 -0
  188. package/layers/ogc/wcsUtils.d.ts +6 -0
  189. package/layers/ogc/wfsUtils.d.ts +6 -0
  190. package/layers/orientedImagery/transformations/imageToWorld.d.ts +10 -0
  191. package/layers/orientedImagery/transformations/rectifyMapPoint.js +1 -1
  192. package/layers/orientedImagery/transformations/worldToImage.d.ts +10 -0
  193. package/layers/orientedImagery/types.d.ts +1 -1
  194. package/layers/support/SubtypeSublayer.d.ts +13 -0
  195. package/layers/support/arcadeUtils.d.ts +5 -0
  196. package/layers/support/csvUtils.d.ts +6 -0
  197. package/layers/support/fieldUtils.d.ts +9 -0
  198. package/layers/support/parquetUtils.d.ts +6 -0
  199. package/layers/support/rasterFunctionConstants.d.ts +9 -0
  200. package/layers/support/rasterFunctionUtils.d.ts +7 -0
  201. package/package.json +1 -1
  202. package/pointCloudRenderers.d.ts +44 -0
  203. package/popup/content.d.ts +48 -0
  204. package/rasterRenderers.d.ts +46 -0
  205. package/renderers/support/AuthoringInfo.d.ts +1 -1
  206. package/renderers/support/jsonUtils.d.ts +7 -0
  207. package/renderers/support/utils.d.ts +5 -0
  208. package/renderers/visualVariables/SizeVariable.d.ts +0 -3
  209. package/renderers/visualVariables/VisualVariable.d.ts +1 -1
  210. package/renderers/visualVariables/support/VisualVariableLegendOptions.d.ts +1 -1
  211. package/renderers.d.ts +46 -0
  212. package/request.d.ts +17 -0
  213. package/rest/closestFacility.d.ts +21 -0
  214. package/rest/featureService/utils.d.ts +5 -0
  215. package/rest/find.d.ts +21 -0
  216. package/rest/geometryService.d.ts +14 -0
  217. package/rest/geoprocessor.d.ts +16 -0
  218. package/rest/identify.d.ts +19 -0
  219. package/rest/imageService.d.ts +10 -0
  220. package/rest/knowledgeGraphService.d.ts +39 -0
  221. package/rest/lastMileDelivery.d.ts +12 -0
  222. package/rest/locator.d.ts +24 -0
  223. package/rest/networkService.d.ts +5 -0
  224. package/rest/networks/queryAssociations.d.ts +7 -0
  225. package/rest/networks/support/NetworkElement.d.ts +1 -1
  226. package/rest/networks/synthesizeAssociationGeometries.d.ts +7 -0
  227. package/rest/networks/trace.d.ts +6 -0
  228. package/rest/places.d.ts +34 -0
  229. package/rest/print.d.ts +74 -0
  230. package/rest/query.d.ts +33 -0
  231. package/rest/route.d.ts +18 -0
  232. package/rest/serviceArea.d.ts +18 -0
  233. package/rest/support/AreasAndLengthsParameters.d.ts +2 -2
  234. package/rest/support/AttachmentQuery.d.ts +0 -1
  235. package/rest/support/AttributeBinsQuery.d.ts +3 -3
  236. package/rest/support/AutoIntervalBinParameters.d.ts +4 -4
  237. package/rest/support/DateBinParameters.d.ts +2 -2
  238. package/rest/support/DateBinTimeInterval.d.ts +1 -1
  239. package/rest/support/DensifyParameters.d.ts +1 -1
  240. package/rest/support/DirectionsFeature.d.ts +1 -1
  241. package/rest/support/GPMessage.d.ts +1 -1
  242. package/rest/support/LastMileDeliveryParameters.d.ts +1 -1
  243. package/rest/support/QuantizationParameters.d.ts +3 -3
  244. package/rest/support/Query.d.ts +0 -1
  245. package/rest/support/QueryMixin.d.ts +1 -1
  246. package/rest/support/RelationshipQuery.d.ts +0 -1
  247. package/rest/support/interfaces.d.ts +1 -2
  248. package/rest/symbolService.d.ts +9 -0
  249. package/smartMapping/heuristics/binLevel.d.ts +12 -0
  250. package/smartMapping/heuristics/scaleRange.d.ts +15 -0
  251. package/smartMapping/heuristics/sizeRange.d.ts +12 -0
  252. package/smartMapping/labels/bins.d.ts +13 -0
  253. package/smartMapping/labels/clusters.d.ts +17 -1
  254. package/smartMapping/popup/clusters.d.ts +21 -0
  255. package/smartMapping/popup/templates.d.ts +18 -0
  256. package/smartMapping/raster/renderers/classBreaks.d.ts +7 -0
  257. package/smartMapping/raster/renderers/colormap.d.ts +7 -0
  258. package/smartMapping/raster/renderers/flow.d.ts +19 -0
  259. package/smartMapping/raster/renderers/rgb.d.ts +7 -0
  260. package/smartMapping/raster/renderers/shadedRelief.d.ts +7 -0
  261. package/smartMapping/raster/renderers/stretch.d.ts +7 -0
  262. package/smartMapping/raster/renderers/uniqueValue.d.ts +7 -0
  263. package/smartMapping/raster/renderers/vectorField.d.ts +20 -0
  264. package/smartMapping/raster/support/colorRamps.d.ts +7 -0
  265. package/smartMapping/raster/support/utils.d.ts +5 -0
  266. package/smartMapping/renderers/color.d.ts +17 -0
  267. package/smartMapping/renderers/dotDensity.d.ts +21 -0
  268. package/smartMapping/renderers/heatmap.d.ts +17 -0
  269. package/smartMapping/renderers/location.d.ts +10 -0
  270. package/smartMapping/renderers/opacity.d.ts +19 -0
  271. package/smartMapping/renderers/pieChart.d.ts +19 -0
  272. package/smartMapping/renderers/predominance.d.ts +27 -0
  273. package/smartMapping/renderers/relationship.d.ts +48 -0
  274. package/smartMapping/renderers/size.d.ts +18 -0
  275. package/smartMapping/renderers/support/rendererUtils.d.ts +8 -0
  276. package/smartMapping/renderers/support/spikeUtils.d.ts +6 -0
  277. package/smartMapping/renderers/type.d.ts +18 -0
  278. package/smartMapping/renderers/univariateColorSize.d.ts +29 -0
  279. package/smartMapping/statistics/classBreaks.d.ts +14 -0
  280. package/smartMapping/statistics/heatmapStatistics.d.ts +15 -0
  281. package/smartMapping/statistics/histogram.d.ts +17 -0
  282. package/smartMapping/statistics/predominantCategories.d.ts +6 -0
  283. package/smartMapping/statistics/summaryStatistics.d.ts +15 -0
  284. package/smartMapping/statistics/summaryStatisticsForAge.d.ts +8 -1
  285. package/smartMapping/statistics/support/ageUtils.d.ts +8 -0
  286. package/smartMapping/statistics/support/predominanceUtils.d.ts +8 -1
  287. package/smartMapping/statistics/types.d.ts +6 -1
  288. package/smartMapping/statistics/uniqueValues.d.ts +13 -0
  289. package/smartMapping/symbology/color.d.ts +8 -0
  290. package/smartMapping/symbology/dotDensity.d.ts +7 -0
  291. package/smartMapping/symbology/flow.d.ts +8 -0
  292. package/smartMapping/symbology/heatmap.d.ts +8 -0
  293. package/smartMapping/symbology/location.d.ts +8 -0
  294. package/smartMapping/symbology/pieChart.d.ts +7 -0
  295. package/smartMapping/symbology/predominance.d.ts +7 -0
  296. package/smartMapping/symbology/relationship.d.ts +7 -0
  297. package/smartMapping/symbology/size.d.ts +7 -0
  298. package/smartMapping/symbology/support/colorRamps.d.ts +7 -0
  299. package/smartMapping/symbology/type.d.ts +8 -0
  300. package/support/groundUtils.js +1 -1
  301. package/support/popupUtils.d.ts +5 -0
  302. package/support/revision.js +1 -1
  303. package/support/timeUtils.d.ts +9 -0
  304. package/symbols/CIMSymbol.d.ts +1 -1
  305. package/symbols/ExtrudeSymbol3DLayer.d.ts +2 -2
  306. package/symbols/FillSymbol3DLayer.d.ts +1 -1
  307. package/symbols/LineSymbol3DLayer.d.ts +2 -2
  308. package/symbols/ObjectSymbol3DLayer.d.ts +2 -2
  309. package/symbols/PathSymbol3DLayer.d.ts +2 -2
  310. package/symbols/TextSymbol.d.ts +2 -2
  311. package/symbols/support/Symbol3DFillMaterial.d.ts +1 -1
  312. package/symbols/support/Symbol3DFillMaterial.js +1 -1
  313. package/symbols/support/Symbol3DHalo.d.ts +8 -4
  314. package/symbols/support/Symbol3DHalo.js +1 -1
  315. package/symbols/support/cimConversionUtils.d.ts +9 -0
  316. package/symbols/support/cimSymbolUtils.d.ts +10 -0
  317. package/symbols/support/jsonUtils.d.ts +7 -0
  318. package/symbols/support/symbolUtils.d.ts +5 -0
  319. package/symbols.d.ts +59 -0
  320. package/tables/elements.d.ts +41 -0
  321. package/time/TimeExtent.d.ts +1 -1
  322. package/time/TimeInterval.d.ts +1 -1
  323. package/unionTypes.d.ts +5 -0
  324. package/versionManagement/utils.d.ts +5 -0
  325. package/versionManagement/versionAdapters/utils.d.ts +5 -0
  326. package/views/2d/MapViewConstraints.d.ts +18 -10
  327. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
  328. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  329. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  330. package/views/2d/layers/RouteLayerView2D.js +1 -1
  331. package/views/2d/layers/TileLayerView2D.js +1 -1
  332. package/views/2d/layers/support/RouteLayerInteraction.js +1 -1
  333. package/views/2d/layers/support/RouteLayerWaypointVisualization.js +5 -0
  334. package/views/2d/layers/types.d.ts +6 -0
  335. package/views/2d/types.d.ts +3 -1
  336. package/views/3d/analysis/DirectLineMeasurement/types.d.ts +5 -0
  337. package/views/3d/analysis/LineOfSight/types.d.ts +5 -0
  338. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementError.d.ts +1 -1
  339. package/views/3d/analysis/VolumeMeasurement/types.d.ts +5 -0
  340. package/views/3d/environment/ChapmanApproximation.glsl.js +9 -10
  341. package/views/3d/environment/ChapmanAtmosphere.glsl.js +1 -1
  342. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  343. package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
  344. package/views/3d/environment/CloudsParameters.js +1 -1
  345. package/views/3d/environment/EnvironmentManager.js +1 -1
  346. package/views/3d/environment/SceneViewEnvironment.d.ts +1 -1
  347. package/views/3d/environment/types.d.ts +13 -0
  348. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  349. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  350. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  351. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  352. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  353. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  354. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  355. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  356. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  357. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  358. package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +1 -1
  359. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  360. package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
  361. package/views/3d/terrain/TerrainSurface.js +1 -1
  362. package/views/3d/webgl/ManagedFBO.d.ts +4 -5
  363. package/views/3d/webgl/RenderNode.d.ts +1 -1
  364. package/views/3d/{webgl-engine/lighting/SceneLighting.d.ts → webgl/types.d.ts} +4 -6
  365. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  366. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +2 -2
  367. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +2 -2
  368. package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +1 -1
  369. package/views/3d/webgl-engine/core/shaderLibrary/raster/RasterColorizer.glsl.js +1 -1
  370. package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +1 -1
  371. package/views/3d/webgl-engine/core/shaderModules/Float4sPassUniform.js +1 -1
  372. package/views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js +1 -1
  373. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  374. package/views/3d/webgl-engine/effects/haze/Haze.glsl.js +1 -1
  375. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  376. package/views/3d/webgl-engine/effects/haze/HazeTechnique.js +1 -1
  377. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechnique.js +1 -1
  378. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  379. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  380. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  381. package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
  382. package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
  383. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +8 -8
  384. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +5 -5
  385. package/views/3d/webgl.d.ts +6 -0
  386. package/views/BreakpointsOwner.d.ts +16 -16
  387. package/views/IBreakpointsOwner.d.ts +15 -15
  388. package/views/MapView.d.ts +1 -1
  389. package/views/PopupView.d.ts +2 -2
  390. package/views/SceneView.d.ts +14 -17
  391. package/views/SelectionManager.d.ts +1 -0
  392. package/views/SelectionManager.js +1 -1
  393. package/views/VideoView.d.ts +1 -2
  394. package/views/VideoView.js +1 -1
  395. package/views/View.d.ts +8 -11
  396. package/views/View2D.d.ts +1 -2
  397. package/views/analysis/AreaMeasurement/types.d.ts +6 -0
  398. package/views/analysis/DistanceMeasurement/types.d.ts +5 -0
  399. package/views/analysis/ElevationProfile/ElevationProfileError.d.ts +4 -4
  400. package/views/analysis/ElevationProfile/types.d.ts +6 -0
  401. package/views/analysis/types.d.ts +5 -0
  402. package/views/draw/DrawOperation.js +1 -1
  403. package/views/draw/PolygonDrawAction.d.ts +1 -1
  404. package/views/draw/PolygonDrawAction.js +1 -1
  405. package/views/draw/PolylineDrawAction.d.ts +1 -1
  406. package/views/draw/PolylineDrawAction.js +1 -1
  407. package/views/draw/support/GraphicMover.js +1 -1
  408. package/views/draw/types.d.ts +3 -1
  409. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  410. package/views/interactive/sketch/Units.d.ts +5 -1
  411. package/views/interactive/snapping/GridSnappingEngine.js +1 -1
  412. package/views/layers/BuildingSceneLayerView.d.ts +1 -1
  413. package/views/layers/ImageryLayerViewMixin.d.ts +2 -3
  414. package/views/layers/LayerView.d.ts +1 -1
  415. package/views/layers/support/highlightUtils.js +1 -1
  416. package/views/support/colorUtils.d.ts +5 -0
  417. package/views/support/selectionUtils.js +1 -1
  418. package/views/types.d.ts +69 -1
  419. package/views/ui/types.d.ts +12 -1
  420. package/webscene/Environment.d.ts +2 -2
  421. package/webscene/support/FeatureReference.d.ts +1 -1
  422. package/webscene/types.d.ts +10 -1
  423. package/widgets/BasemapGallery.d.ts +1 -1
  424. package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +1 -1
  425. package/widgets/BasemapLayerList.d.ts +1 -1
  426. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +1 -1
  427. package/widgets/BatchAttributeForm.d.ts +1 -1
  428. package/widgets/Bookmarks.d.ts +1 -2
  429. package/widgets/BuildingExplorer.d.ts +1 -1
  430. package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +1 -1
  431. package/widgets/CatalogLayerList.d.ts +1 -1
  432. package/widgets/Compass.d.ts +1 -1
  433. package/widgets/CoordinateConversion.d.ts +1 -2
  434. package/widgets/Daylight.d.ts +1 -1
  435. package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +1 -2
  436. package/widgets/DirectionalPad/{utils.d.ts → types.d.ts} +3 -1
  437. package/widgets/Directions.d.ts +1 -2
  438. package/widgets/Editor/EditorViewModel.d.ts +1 -2
  439. package/widgets/Editor/SplitFeatureWorkflow.d.ts +1 -2
  440. package/widgets/Editor/SplitFeatureWorkflowData.d.ts +1 -1
  441. package/widgets/Editor/types.d.ts +8 -1
  442. package/widgets/Editor/workflowUtils.js +1 -1
  443. package/widgets/Editor.d.ts +2 -3
  444. package/widgets/Feature/types.d.ts +5 -1
  445. package/widgets/Feature.d.ts +1 -1
  446. package/widgets/FeatureForm/FeatureFormViewModel.d.ts +2 -2
  447. package/widgets/FeatureForm/FieldInput.d.ts +1 -1
  448. package/widgets/FeatureForm.d.ts +1 -1
  449. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  450. package/widgets/FeatureTemplates.d.ts +1 -1
  451. package/widgets/Features/FeaturesViewModel.d.ts +2 -2
  452. package/widgets/Features.d.ts +1 -2
  453. package/widgets/FloorFilter.d.ts +1 -1
  454. package/widgets/Home/HomeViewModel.d.ts +1 -1
  455. package/widgets/Home.d.ts +1 -1
  456. package/widgets/LayerList/ListItemPanel.d.ts +1 -1
  457. package/widgets/LayerList/types.d.ts +2 -2
  458. package/widgets/LayerList.d.ts +1 -1
  459. package/widgets/Legend.d.ts +1 -1
  460. package/widgets/Locate/LocateViewModel.d.ts +2 -2
  461. package/widgets/Locate.d.ts +1 -1
  462. package/widgets/Popup/types.d.ts +2 -0
  463. package/widgets/Popup.d.ts +1 -2
  464. package/widgets/Print.d.ts +1 -1
  465. package/widgets/Search/types.d.ts +5 -0
  466. package/widgets/Search.d.ts +1 -1
  467. package/widgets/ShadowCast/DurationOptions.d.ts +1 -1
  468. package/widgets/ShadowCast/ShadowCastViewModel.d.ts +1 -1
  469. package/widgets/ShadowCast/{ShadowVisualizationType.d.ts → types.d.ts} +4 -1
  470. package/widgets/ShadowCast.d.ts +1 -1
  471. package/widgets/Sketch/types.d.ts +1 -1
  472. package/widgets/Slice.d.ts +1 -1
  473. package/widgets/TableList.d.ts +1 -1
  474. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +1 -1
  475. package/widgets/Track.d.ts +1 -1
  476. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.d.ts +1 -1
  477. package/widgets/UtilityNetworkTrace/{support/ResultAreaHandler.d.ts → types.d.ts} +2 -2
  478. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  479. package/widgets/Weather/WeatherViewModel.d.ts +2 -2
  480. package/widgets/Weather.d.ts +1 -1
  481. package/widgets/smartMapping/support/utils.d.ts +6 -0
  482. package/widgets/support/GoTo.d.ts +1 -1
  483. package/widgets/support/SelectionList/FeatureItem.js +1 -1
  484. package/widgets/support/SelectionList/LayerItem.js +1 -1
  485. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  486. package/widgets/support/SelectionList.js +1 -1
  487. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  488. package/widgets/support/forms/types.d.ts +2 -0
  489. package/widgets/support/symbolPreviewUtils.js +1 -1
  490. package/widgets/support/{goToUtils.d.ts → types.d.ts} +8 -1
  491. package/widgets/support/widget.d.ts +11 -0
  492. package/assets/esri/core/workers/chunks/0d1e8d5d9abee38e275e.js +0 -316
  493. package/assets/esri/core/workers/chunks/316f3e93aa0db48ef129.js +0 -1
  494. package/assets/esri/core/workers/chunks/73c3ee2697265b0f7208.js +0 -1
  495. package/assets/esri/core/workers/chunks/cd2ea924cb91cdb6dde9.js +0 -1
  496. package/assets/esri/core/workers/chunks/d57577c02fb2932e8305.js +0 -1
  497. package/assets/esri/core/workers/chunks/ec7e6427d99cf3148a61.js +0 -1
  498. package/colorUtils.d.ts +0 -13
  499. package/core/Logger.d.ts +0 -29
  500. package/core/Message.d.ts +0 -2
  501. package/core/Message.js +0 -5
  502. package/core/accessorSupport/PropertyOrigin.d.ts +0 -2
  503. package/core/sql/sql92grammar.d.ts +0 -12
  504. package/core/string.d.ts +0 -3
  505. package/core/time.d.ts +0 -2
  506. package/core/timeUtils.d.ts +0 -2
  507. package/views/2d/ViewStateManager.d.ts +0 -2
  508. package/views/2d/layers/support/clusterUtils.d.ts +0 -6
  509. package/views/3d/environment/lightingUtils.d.ts +0 -4
  510. package/views/3d/environment/weather.d.ts +0 -9
  511. package/views/3d/glTF/internal/resourceUtils.d.ts +0 -10
  512. package/views/3d/interactive/visualElements/DrapedVisualElementResources.d.ts +0 -2
  513. package/views/3d/support/QualityProfile.d.ts +0 -2
  514. package/views/SceneViewHitTestResult.d.ts +0 -64
  515. package/views/ViewingMode.d.ts +0 -2
  516. package/views/draw/DrawingMode.d.ts +0 -2
  517. package/views/draw/support/drawUtils.d.ts +0 -7
  518. package/views/ui/Padding.d.ts +0 -11
  519. package/views/viewType.d.ts +0 -2
  520. package/views/webgl/enums.d.ts +0 -38
  521. package/webscene/support/featureReferenceUtils.d.ts +0 -4
  522. package/widgets/DirectionalPad/constants.d.ts +0 -2
  523. package/widgets/Editor/support/splitFeatureUtils.d.ts +0 -7
  524. package/widgets/Feature/support/arcadeFeatureUtils.d.ts +0 -4
  525. package/widgets/Popup/actions.d.ts +0 -4
  526. package/widgets/ShadowCast/DurationMode.d.ts +0 -3
  527. package/widgets/support/Heading.d.ts +0 -7
  528. package/widgets/support/forms/formUtils.d.ts +0 -2
  529. /package/views/animation/{easing.d.ts → types.d.ts} +0 -0
  530. /package/views/draw/{DrawingMode.js → drawingModes.js} +0 -0
package/Color.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import type { TupleRgb, TupleRgba } from "./colorUtils.js";
2
1
  import type { Color as ColorJSON } from "./portal/jsonTypes.js";
3
2
 
4
3
  export interface HexOutputOptions {
@@ -88,7 +87,7 @@ export default class Color {
88
87
  * @returns Returns a new Color object.
89
88
  * @example let redColor = Color.fromArray([201, 0, 19]);
90
89
  */
91
- static fromArray(a: ColorJSON | number[] | readonly number[] | Readonly<TupleRgba>, t?: Color): Color;
90
+ static fromArray(a: ColorJSON | readonly number[], t?: Color): Color;
92
91
  /**
93
92
  * Creates a Color from hexadecimal string.
94
93
  *
@@ -261,11 +260,20 @@ export default class Color {
261
260
  *
262
261
  * @returns A 3-component array of rgb values.
263
262
  */
264
- toRgb(): TupleRgb;
263
+ toRgb(): [
264
+ number,
265
+ number,
266
+ number
267
+ ];
265
268
  /**
266
269
  * Returns a 4-component array of rgba values that represent the Color instance.
267
270
  *
268
271
  * @returns A 4-component array of rgba values.
269
272
  */
270
- toRgba(): TupleRgba;
273
+ toRgba(): [
274
+ number,
275
+ number,
276
+ number,
277
+ number
278
+ ];
271
279
  }
package/Ground.d.ts CHANGED
@@ -40,9 +40,8 @@ export interface GroundProperties extends LoadableMixinProperties, JSONSupportMi
40
40
  navigationConstraint?: NavigationConstraintProperties | null;
41
41
  /**
42
42
  * The color of the ground surface, displayed underneath the basemap.
43
- * If this is null, a grid is displayed instead. The alpha value in the
44
- * color is ignored. Use the [opacity](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#opacity) property to control the
45
- * opacity of the ground.
43
+ * If this is null, a grid is displayed instead. The alpha value in the color is ignored. Use the
44
+ * [opacity](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#opacity) property to control the opacity of the ground.
46
45
  *
47
46
  * @since 4.8
48
47
  */
@@ -148,9 +147,8 @@ export default class Ground extends GroundSuperclass {
148
147
  accessor opacity: number;
149
148
  /**
150
149
  * The color of the ground surface, displayed underneath the basemap.
151
- * If this is null, a grid is displayed instead. The alpha value in the
152
- * color is ignored. Use the [opacity](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#opacity) property to control the
153
- * opacity of the ground.
150
+ * If this is null, a grid is displayed instead. The alpha value in the color is ignored. Use the
151
+ * [opacity](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#opacity) property to control the opacity of the ground.
154
152
  *
155
153
  * @since 4.8
156
154
  */
package/Ground.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as r}from"tslib";import e from"./Color.js";import t from"./core/Collection.js";import o from"./core/CollectionFlattener.js";import{referenceSetter as s}from"./core/collectionUtils.js";import{typeCast as a}from"./core/compilerUtils.js";import i from"./core/Error.js";import{JSONSupportMixin as n}from"./core/JSONSupport.js";import{clone as l}from"./core/lang.js";import{Loadable as p}from"./core/Loadable.js";import{loadAll as c}from"./core/loadAll.js";import y from"./core/Logger.js";import{destroyMaybe as u}from"./core/maybe.js";import{isAbortError as d,throwIfAborted as m}from"./core/promiseUtils.js";import{property as h,subclass as f}from"./core/accessorSupport/decorators.js";import{Integer as g}from"./core/accessorSupport/ensureType.js";import{NavigationConstraint as v}from"./ground/NavigationConstraint.js";import{GroundSymbol as j}from"./support/groundInstanceUtils.js";import{transparencyToOpacity as w,opacityToTransparency as C}from"./webdoc/support/opacityUtils.js";import{writer as L}from"./core/accessorSupport/decorators/writer.js";var S,I;let b=I=class extends(n(p)){static{S=j}constructor(r){super(r),this[S]=!0,this.parent=null,this.opacity=1,this.surfaceColor=null,this.navigationConstraint=null,this.layers=new t;const e=r=>{const{parent:e}=r;e&&e!==this&&"remove"in e&&e.remove?.(r),r.parent=this,"elevation"!==r.type&&"base-elevation"!==r.type&&y.getLogger(this).error(`Layer '${r.title}, id:${r.id}' of type '${r.type}' is not supported as a ground layer and will therefore be ignored. Only layers of type 'elevation' are supported.`)},s=r=>{r.parent=null};this.addHandles([this.layers.on("after-add",r=>e(r.item)),this.layers.on("after-remove",r=>s(r.item))]),this.allLayers=new o({getCollections:()=>[this.layers,this.parent?.basemap?.groundLayers]})}removeChildLayer(r){this.layers.remove(r)}initialize(){this.when().catch(r=>{d(r)||y.getLogger(this).error("#load()","Failed to load ground",r)}),this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)}get integratedMeshGround(){const r=this.parent?.basemap?.groundLayers.at(0);return r?.replacesTerrain?r:null}destroy(){const r=this.layers.removeAll();for(const e of r)u(e);this.layers.destroy()}normalizeCtorArgs(r){return r&&"resourceInfo"in r&&(this._set("resourceInfo",r.resourceInfo),delete(r={...r}).resourceInfo),r}get loaded(){return super.loaded}get layers(){return this._get("layers")}set layers(r){this._set("layers",s(r,this._get("layers")))}writeLayers(r,e,t,o){const s=[];r?(o={...o,layerContainerType:"ground"},r.forEach(r=>{if("write"in r){const e={};a(r)().write(e,o)&&s.push(e)}else o?.messages&&o.messages.push(new i("layer:unsupported",`Layers (${r.title}, ${r.id}) of type '${r.declaredClass}' cannot be persisted in the ground`,{layer:r}))}),e.layers=s):e.layers=s}load(r){return this.addResolvingPromise(this._loadFromSource(r)),Promise.resolve(this)}loadAll(){return c(this,r=>{r(this.layers)})}async queryElevation(r,e){await this.load({signal:e?.signal});const{queryAll:t}=await import("./layers/support/ElevationQuery.js");m(e);return t(this.layers.filter(A).toArray(),r,e)}async createElevationSampler(r,e){await this.load({signal:e?.signal});const{createSampler:t}=await import("./layers/support/ElevationQuery.js");m(e);return t(this.layers.filter(A).toArray(),r,e)}clone(){const r={opacity:this.opacity,surfaceColor:l(this.surfaceColor),navigationConstraint:l(this.navigationConstraint),layers:this.layers.slice()};return this.loaded&&(r.loadStatus="loaded"),new I({resourceInfo:this.resourceInfo}).set(r)}read(r,e){this.resourceInfo||this._set("resourceInfo",{data:r,context:e}),super.read(r,e)}_loadFromSource(r){const e=this.resourceInfo;return e?this._loadLayersFromJSON(e.data,e.context,r):Promise.resolve()}async _loadLayersFromJSON(r,e,t){const o=e?.origin||"web-scene",s=e?.portal||null,a=e?.url||null,{populateOperationalLayers:i}=await import("./layers/support/layersCreator.js");m(t);const n=[];if(r.layers&&Array.isArray(r.layers)){const e={context:{origin:o,url:a,portal:s,layerContainerType:"ground"},defaultLayerType:"ArcGISTiledElevationServiceLayer"};n.push(i(this.layers,r.layers,e))}await Promise.allSettled(n)}};function A(r){return r&&"createElevationSampler"in r}r([h()],b.prototype,"parent",void 0),r([h()],b.prototype,"integratedMeshGround",null),r([h({json:{read:!1,write:{isRequired:!0}}})],b.prototype,"layers",null),r([h()],b.prototype,"allLayers",void 0),r([L("layers")],b.prototype,"writeLayers",null),r([h({readOnly:!0})],b.prototype,"resourceInfo",void 0),r([h({type:Number,nonNullable:!0,range:{min:0,max:1},json:{type:g,read:{reader:w,source:"transparency"},write:{writer:(r,e)=>{e.transparency=C(r)},target:"transparency"}}})],b.prototype,"opacity",void 0),r([h({type:e,json:{type:[g],write:(r,e)=>{e.surfaceColor=r.toJSON().slice(0,3)}}})],b.prototype,"surfaceColor",void 0),r([h({type:v,json:{write:!0}})],b.prototype,"navigationConstraint",void 0),b=I=r([f("esri.Ground")],b);const _=b;export{_ as default};
5
+ import{__decorate as r}from"tslib";import e from"./Color.js";import o from"./core/Collection.js";import t from"./core/CollectionFlattener.js";import{referenceSetter as s}from"./core/collectionUtils.js";import{typeCast as a}from"./core/compilerUtils.js";import i from"./core/Error.js";import has from"./core/has.js";import{JSONSupportMixin as n}from"./core/JSONSupport.js";import{clone as l}from"./core/lang.js";import{Loadable as p}from"./core/Loadable.js";import{loadAll as c}from"./core/loadAll.js";import u from"./core/Logger.js";import{destroyMaybe as y}from"./core/maybe.js";import{isAbortError as d,throwIfAborted as m}from"./core/promiseUtils.js";import{property as h,subclass as f}from"./core/accessorSupport/decorators.js";import{Integer as g}from"./core/accessorSupport/ensureType.js";import{NavigationConstraint as v}from"./ground/NavigationConstraint.js";import{GroundSymbol as j}from"./support/groundInstanceUtils.js";import{transparencyToOpacity as w,opacityToTransparency as C}from"./webdoc/support/opacityUtils.js";import{writer as L}from"./core/accessorSupport/decorators/writer.js";var S,I;let b=I=class extends(n(p)){static{S=j}constructor(r){super(r),this[S]=!0,this.parent=null,this.opacity=1,this.surfaceColor=null,this.undergroundColor=has("enable-feature:oit-ground")?void 0:new e("white"),this.navigationConstraint=null,this.layers=new o;const s=r=>{const{parent:e}=r;e&&e!==this&&"remove"in e&&e.remove?.(r),r.parent=this,"elevation"!==r.type&&"base-elevation"!==r.type&&u.getLogger(this).error(`Layer '${r.title}, id:${r.id}' of type '${r.type}' is not supported as a ground layer and will therefore be ignored. Only layers of type 'elevation' are supported.`)},a=r=>{r.parent=null};this.addHandles([this.layers.on("after-add",r=>s(r.item)),this.layers.on("after-remove",r=>a(r.item))]),this.allLayers=new t({getCollections:()=>[this.layers,this.parent?.basemap?.groundLayers]})}removeChildLayer(r){this.layers.remove(r)}initialize(){this.when().catch(r=>{d(r)||u.getLogger(this).error("#load()","Failed to load ground",r)}),this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)}get integratedMeshGround(){const r=this.parent?.basemap?.groundLayers.at(0);return r?.replacesTerrain?r:null}destroy(){const r=this.layers.removeAll();for(const e of r)y(e);this.layers.destroy()}normalizeCtorArgs(r){return r&&"resourceInfo"in r&&(this._set("resourceInfo",r.resourceInfo),delete(r={...r}).resourceInfo),r}get loaded(){return super.loaded}get layers(){return this._get("layers")}set layers(r){this._set("layers",s(r,this._get("layers")))}writeLayers(r,e,o,t){const s=[];r?(t={...t,layerContainerType:"ground"},r.forEach(r=>{if("write"in r){const e={};a(r)().write(e,t)&&s.push(e)}else t?.messages&&t.messages.push(new i("layer:unsupported",`Layers (${r.title}, ${r.id}) of type '${r.declaredClass}' cannot be persisted in the ground`,{layer:r}))}),e.layers=s):e.layers=s}load(r){return this.addResolvingPromise(this._loadFromSource(r)),Promise.resolve(this)}loadAll(){return c(this,r=>r(this.layers))}async queryElevation(r,e){await this.load({signal:e?.signal});const{queryAll:o}=await import("./layers/support/ElevationQuery.js");m(e);return o(this.layers.filter(A).toArray(),r,e)}async createElevationSampler(r,e){await this.load({signal:e?.signal});const{createSampler:o}=await import("./layers/support/ElevationQuery.js");m(e);return o(this.layers.filter(A).toArray(),r,e)}clone(){const r={opacity:this.opacity,surfaceColor:l(this.surfaceColor),undergroundColor:l(this.undergroundColor),navigationConstraint:l(this.navigationConstraint),layers:this.layers.slice()};return this.loaded&&(r.loadStatus="loaded"),new I({resourceInfo:this.resourceInfo}).set(r)}read(r,e){this.resourceInfo||this._set("resourceInfo",{data:r,context:e}),super.read(r,e)}_loadFromSource(r){const e=this.resourceInfo;return e?this._loadLayersFromJSON(e.data,e.context,r):Promise.resolve()}async _loadLayersFromJSON(r,e,o){const t=e?.origin||"web-scene",s=e?.portal||null,a=e?.url||null,{populateOperationalLayers:i}=await import("./layers/support/layersCreator.js");m(o);const n=[];if(r.layers&&Array.isArray(r.layers)){const e={context:{origin:t,url:a,portal:s,layerContainerType:"ground"},defaultLayerType:"ArcGISTiledElevationServiceLayer"};n.push(i(this.layers,r.layers,e))}await Promise.allSettled(n)}};function A(r){return r&&"createElevationSampler"in r}r([h()],b.prototype,"parent",void 0),r([h()],b.prototype,"integratedMeshGround",null),r([h({json:{read:!1,write:{isRequired:!0}}})],b.prototype,"layers",null),r([h()],b.prototype,"allLayers",void 0),r([L("layers")],b.prototype,"writeLayers",null),r([h({readOnly:!0})],b.prototype,"resourceInfo",void 0),r([h({type:Number,nonNullable:!0,range:{min:0,max:1},json:{type:g,read:{reader:w,source:"transparency"},write:{writer:(r,e)=>{e.transparency=C(r)},target:"transparency"}}})],b.prototype,"opacity",void 0),r([h({type:e,json:{type:[g],write:(r,e)=>{e.surfaceColor=r.toJSON().slice(0,3)}}})],b.prototype,"surfaceColor",void 0),r([h({type:e})],b.prototype,"undergroundColor",void 0),r([h({type:v,json:{write:!0}})],b.prototype,"navigationConstraint",void 0),b=I=r([f("esri.Ground")],b);const _=b;export{_ as default};
package/WebScene.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- 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{MultiOriginJSONMixin 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/Warning.js";import{property as b,subclass as v}from"./core/accessorSupport/decorators.js";import{updateOrigins as _}from"./core/accessorSupport/originUtils.js";import{readLoadable as S}from"./core/accessorSupport/read.js";import A from"./geometry/Extent.js";import I from"./geometry/HeightModelInfo.js";import{canProjectWithoutEngine as j}from"./geometry/projectionUtils.js";import L from"./geometry/SpatialReference.js";import{validateWebSceneError as R}from"./geometry/support/heightModelInfoUtils.js";import{fromJSON as P}from"./geometry/support/jsonUtils.js";import{isEarth as U}from"./geometry/support/spatialReferenceUtils.js";import V from"./portal/Portal.js";import O from"./portal/PortalItem.js";import{createForItemWrite as M}from"./portal/support/jsonContext.js";import{toggleTypeKeyword as E,typeKeyword as C}from"./portal/support/portalItemUtils.js";import{hasDeveloperBasemapLayer as T}from"./support/basemapUtils.js";import{ensureType as N}from"./support/groundUtils.js";import x from"./support/MapFloorInfo.js";import{WebSceneTag as G}from"./support/tagSymbols.js";import{createSchemaValidationError as F}from"./support/webSceneUtils.js";import{isSpatialReferenceSupported as W}from"./views/support/spatialReferenceSupport.js";import $ from"./webdoc/Widgets.js";import{updateItemWithResources as J,saveResources as k}from"./webdoc/support/resourceUtils.js";import{evaluateWriteErrors as B}from"./webdoc/support/saveUtils.js";import{getOptimalThumbnailSize as q}from"./webdoc/support/thumbnailUtils.js";import{isCopyAllowed as H,initializeNewItem as D}from"./webdoc/support/webdocSaveUtils.js";import z from"./webscene/ApplicationProperties.js";import K from"./webscene/Environment.js";import Q from"./webscene/InitialViewProperties.js";import X from"./webscene/Presentation.js";import Y from"./webscene/TransportationNetwork.js";import{Version as Z}from"./webscene/Version.js";import{alphaCutoff as ee}from"./webscene/support/AlphaCutoff.js";import{getLoader as te}from"./webscene/support/schemaValidatorLoader.js";import{writer as re}from"./core/accessorSupport/decorators/writer.js";import{reader as ie}from"./core/accessorSupport/decorators/reader.js";var oe;const se=new Z(1,39),ae=()=>{const e=8,t=[],r=se.major;for(let i=e;i<=se.minor;i++)t.push(`${r}.${i}`);return t},ne="Web Scene";let le=class extends(a(h(c(r)))){static{oe=G}constructor(e){super(e),this[oe]=!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 X,this.initialViewProperties=new Q,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 Z(parseInt(r,10),parseInt(i,10))}writeSourceVersion(e,t,r){t[r]=`${se.major}.${se.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=N(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 Q,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??L.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(S(this,e,t=>super.read(e,t),t),i||(this._isAuthoringAppSetByUser=!1),r||(this._isAuthoringAppVersionSetByUser=!1),e.baseMap&&Array.isArray(e.baseMap.elevationLayers)&&this.sourceVersion?.supportsVisibleElevationLayersInSlides){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||(t?.messages?.push(new o("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted in web scenes`,{layer: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!==ne)throw new o("webscene:portal-item-wrong-type",`Portal item needs to have type "${ne}"`);const t=this._updateFromPromise;await this._ensureLoadBeforeSave();const r=this._enableVerifyItemRelativeUrls(M(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 J(this.portalItem,i,this._resourceReferences,r),_(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=O.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=ne,r.portal=i;const s=this._enableVerifyItemRelativeUrls(M(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 H(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 D(r,c,a,m)&&(this._resourceReferences.portalItem=r),await k(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),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(!U(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||{};B(t,{errorName:"webscene:save"},{ignoreUnsupported:s,supplementalUnsupportedErrors:["scenemodification:unsupported"],requiredPropertyChecksDisabled:a});const p=te();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 F(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=K.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=q(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(!this.sourceVersion?.supportsGround&&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||(this.sourceVersion?.supportsGround||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(!W(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||j(e,t)}else{if(!W(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=R(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<ee)&&(e.loadWarnings.push(new g("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=Z.parse(e.version||"","webscene");return se.validate(t),e.version=`${t.major}.${t.minor}`,1===t.major&&t.minor<=2&&(e.spatialReference=L.WebMercator.toJSON()),e}_updateTypeKeywords(e){E(e,C.LOCAL_SCENE,"local"===this.initialViewProperties.viewingMode),E(e,C.DEVELOPER_BASEMAP,T(this.basemap)||this.presentation.slides.some(({basemap:e})=>!!e&&T(e))),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t))}get _sceneSpatialReference(){return this.initialViewProperties.spatialReference||L.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=`${se.major}.${se.minor}`}};e([b({type:z,json:{write:!0}})],le.prototype,"applicationProperties",void 0),e([b({type:A,json:{read:{source:"clippingArea.geometry",reader:P},write:{target:"clippingArea.geometry"}}})],le.prototype,"clippingArea",void 0),e([re("clippingArea")],le.prototype,"writeClippingArea",null),e([b({type:Boolean,json:{write:{target:"clippingArea.clip"}}})],le.prototype,"clippingEnabled",void 0),e([ie("clippingEnabled",["clippingArea"])],le.prototype,"readClippingEnabled",null),e([re("clippingEnabled")],le.prototype,"writeClippingEnabled",null),e([b({type:x,json:{read:{source:"mapFloorInfo"},write:{target:"mapFloorInfo"}}})],le.prototype,"floorInfo",void 0),e([b({type:I,json:{write:!0}})],le.prototype,"heightModelInfo",void 0),e([b({json:{write:{target:"operationalLayers",ignoreOrigin:!0}}})],le.prototype,"layers",void 0),e([re("layers")],le.prototype,"writeLayers",null),e([b({readOnly:!0,type:Z,json:{type:ae(),write:{ignoreOrigin:!0,target:"version",isRequired:!0,overridePolicy:()=>({enabled:!0,allowNull:!0,ignoreOrigin:!0})}}})],le.prototype,"sourceVersion",void 0),e([ie("sourceVersion",["version"])],le.prototype,"readSourceVersion",null),e([re("sourceVersion")],le.prototype,"writeSourceVersion",null),e([b({json:{read:!1,write:{enabled:!0,ignoreOrigin:!0}}})],le.prototype,"tables",void 0),e([re("tables")],le.prototype,"writeTables",null),e([b()],le.prototype,"thumbnailUrl",null),e([b({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],le.prototype,"authoringApp",null),e([re("authoringApp")],le.prototype,"writeAuthoringApp",null),e([b({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],le.prototype,"authoringAppVersion",null),e([re("authoringAppVersion")],le.prototype,"writeAuthoringAppVersion",null),e([b({json:{write:{isRequired:!0,enabled:!0,overridePolicy:()=>({isRequired:!0,enabled:!0,allowNull:!0,ignoreOrigin:!0})}}})],le.prototype,"ground",null),e([re("ground")],le.prototype,"writeGround",null),e([b({type:i.ofType(Y),json:{write:!0}})],le.prototype,"transportationNetworks",void 0),e([b({type:X,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)}}}}})],le.prototype,"presentation",void 0),e([b({type:Q,nonNullable:!0,json:{write:{target:"initialState",isRequired:!0,ignoreOrigin:!0},default:()=>new Q({viewingMode:"global",spatialReference:L.WebMercator})}})],le.prototype,"initialViewProperties",void 0),e([ie("initialViewProperties",["initialState","spatialReference","viewingMode"])],le.prototype,"readInitialViewProperties",null),e([b({type:L,json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],le.prototype,"spatialReference",null),e([b({type:["local","global"],json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],le.prototype,"viewingMode",null),e([b({type:O})],le.prototype,"portalItem",void 0),e([b()],le.prototype,"resourceInfo",void 0),e([b({type:$,json:{write:!0}})],le.prototype,"widgets",void 0),le=e([v("esri.WebScene")],le);const pe=le;export{pe as default};
5
+ import{__decorate as e}from"tslib";import t from"./Color.js";import{version as r}from"./kernel.js";import i from"./Map.js";import o from"./core/Collection.js";import s from"./core/Error.js";import{clone as a}from"./core/lang.js";import{LoadableMixin as n}from"./core/Loadable.js";import{loadAll as l}from"./core/loadAll.js";import p from"./core/Logger.js";import{destroyMaybe as d}from"./core/maybe.js";import{MultiOriginJSONMixin as c,MultiOriginJSONSupport as h}from"./core/MultiOriginJSONSupport.js";import{EsriPromiseMixin as u}from"./core/Promise.js";import{debounce as m}from"./core/promiseUtils.js";import{on as y,watch as w}from"./core/reactiveUtils.js";import{urlToObject as f,addQueryParameter as g}from"./core/urlUtils.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 I from"./geometry/Extent.js";import j from"./geometry/HeightModelInfo.js";import{canProjectWithoutEngine as L}from"./geometry/projectionUtils.js";import R from"./geometry/SpatialReference.js";import{validateWebSceneError as P}from"./geometry/support/heightModelInfoUtils.js";import{fromJSON as U}from"./geometry/support/jsonUtils.js";import{isEarth as V}from"./geometry/support/spatialReferenceUtils.js";import O from"./portal/Portal.js";import M from"./portal/PortalItem.js";import{createForItemWrite as C}from"./portal/support/jsonContext.js";import{toggleTypeKeyword as E,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 G from"./support/MapFloorInfo.js";import{WebSceneTag as F}from"./support/tagSymbols.js";import{createSchemaValidationError as W}from"./support/webSceneUtils.js";import{isSpatialReferenceSupported as $}from"./views/support/spatialReferenceSupport.js";import J from"./webdoc/Widgets.js";import{updateItemWithResources as k,saveResources as B}from"./webdoc/support/resourceUtils.js";import{evaluateWriteErrors as q}from"./webdoc/support/saveUtils.js";import{getOptimalThumbnailSize as H}from"./webdoc/support/thumbnailUtils.js";import{isCopyAllowed as D,initializeNewItem as z}from"./webdoc/support/webdocSaveUtils.js";import K from"./webscene/ApplicationProperties.js";import Q from"./webscene/Environment.js";import X from"./webscene/InitialViewProperties.js";import Y from"./webscene/Presentation.js";import Z from"./webscene/TransportationNetwork.js";import{Version as ee}from"./webscene/Version.js";import{alphaCutoff as te}from"./webscene/support/AlphaCutoff.js";import{getLoader as re}from"./webscene/support/schemaValidatorLoader.js";import{writer as ie}from"./core/accessorSupport/decorators/writer.js";import{reader as oe}from"./core/accessorSupport/decorators/reader.js";var se;const ae=new ee(1,39),ne=()=>{const e=8,t=[],r=ae.major;for(let i=e;i<=ae.minor;i++)t.push(`${r}.${i}`);return t},le="Web Scene";let pe=class extends(n(u(c(i)))){static{se=F}constructor(e){super(e),this[se]=!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 Y,this.initialViewProperties=new X,this.portalItem=null,this.resourceInfo=null,this.widgets=null,this._debouncedSaveOperations=m(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=>{p.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(y(()=>this.allLayers,"change",()=>this._scheduleLayersIdGC()))}destroy(){this._unscheduleLayersIdGC(),this.presentation&&this.presentation.destroy(),this.portalItem=d(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 ee(parseInt(r,10),parseInt(i,10))}writeSourceVersion(e,t,r){t[r]=`${ae.major}.${ae.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,t){e&&this._isAuthoringAppVersionSetByUser?t.authoringAppVersion=e:t.authoringAppVersion=r}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 X,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(),this._validateUndergroundColor()})),Promise.resolve(this)}loadAll(){return l(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)&&this.sourceVersion?.supportsVisibleElevationLayersInSlides){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=a(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||(t?.messages?.push(new s("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted in web scenes`,{layer:e})),!1))}write(e,t){if("loaded"!==this.loadStatus){const e=new s("webscene:not-loaded","Web scene must be loaded before it can be serialized");throw p.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 s("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 p.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 s("webscene:portal-item-not-set","Portal item to save to has not been set on the WebScene");if(this.portalItem?.type!==le)throw new s("webscene:portal-item-wrong-type",`Portal item needs to have type "${le}"`);const t=this._updateFromPromise;await this._ensureLoadBeforeSave();const r=this._enableVerifyItemRelativeUrls(C(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 k(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 s("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=le,r.portal=i;const o=this._enableVerifyItemRelativeUrls(C(r,"web-scene",!0)),a=this.write({},o);await Promise.all(o.resources.pendingOperations),await this._verifySaveAs(a,o,t);const n=this.thumbnailUrl,l=!this._isOverridden("thumbnailUrl");this._updateTypeKeywords(r),await i.signIn();const p=this.portalItem,d={item:p,authenticated:!(!p?.id||!p.portal.user)},{copyAllowed:c,itemReloaded:u}=await D(d,i);if(d.authenticated||=u,!c)throw new s(`${o.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 z(r,d,a,m)&&(this._resourceReferences.portalItem=r),await B(this._resourceReferences,o),this.portalItem=r,h.prototype.read.call(this,{version:a.version,authoringApp:a.authoringApp,authoringAppVersion:a.authoringAppVersion},{name:"web-scene",ignoreDefaults:!0,url:r.itemUrl?f(r.itemUrl):void 0}),S(o),n&&(this.thumbnailUrl=l?g(n,"w","8192"):n),o.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(!V(this.spatialReference))throw new s("webscene:unsupported-spatial-reference","Webscenes using spatial reference systems from Mars or Moon can not be saved currently.");const{ignoreUnsupported:o,requiredPropertyChecksDisabled:a,strictSchemaValidationEnabled:n}=i||{};q(t,{errorName:"webscene:save"},{ignoreUnsupported:o,supplementalUnsupportedErrors:["scenemodification:unsupported"],requiredPropertyChecksDisabled:a});const l=re();if(n&&l){const t=(await l()).validate(e);if(!t.length)return;const i=`webscene did not validate:\n${t.join("\n")}`;p.getLogger(this).error(`${1===r?"saveAs":"save"}(): ${i}`);const o=t.map(e=>new s("webscene:schema-validation",e));throw W(o)}}_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=Q.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(!this.sourceVersion?.supportsGround&&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||(this.sourceVersion?.supportsGround||r.push(e),!1));return{operationalLayers:e.operationalLayers?e.operationalLayers.filter(i):[],operationalElevationLayers:r,basemapElevationLayers:t}}async _loadFromJSON(e){const t=new o;await this._validateSpatialReference(),await this._validateHeightModelInfo();const{populateOperationalLayers:r}=await import("./layers/support/layersCreator.js"),{operationalLayers:i,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))}i&&i.length>0&&n.push(r(this.layers,i,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 s("webscene:load-portal-item","Failed to load portal item",{error:e})}),"Web Scene"!==e.type)throw new s("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=f(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(!$(t,1))return Promise.reject(new s("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||L(e,t)}else{if(!$(t,2))return Promise.reject(new s("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,o=e.viewpoint,a=i(o);if(a&&!r(a))return Promise.reject(new s("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 s("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=P(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(w(()=>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}))})}_validateUndergroundColor(){void 0===this.ground.undergroundColor&&this.sourceVersion?.lessThan(1,39)&&(this.ground.undergroundColor=new t("white"))}_validateJSON(e){const t=ee.parse(e.version||"","webscene");return ae.validate(t),e.version=`${t.major}.${t.minor}`,1===t.major&&t.minor<=2&&(e.spatialReference=R.WebMercator.toJSON()),e}_updateTypeKeywords(e){E(e,T.LOCAL_SCENE,"local"===this.initialViewProperties.viewingMode),E(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?f(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 s("webscene:empty-resource","Expected a JSON resource but got nothing");return new this({resourceInfo:e})}static{this.version=`${ae.major}.${ae.minor}`}};e([v({type:K,json:{write:!0}})],pe.prototype,"applicationProperties",void 0),e([v({type:I,json:{read:{source:"clippingArea.geometry",reader:U},write:{target:"clippingArea.geometry"}}})],pe.prototype,"clippingArea",void 0),e([ie("clippingArea")],pe.prototype,"writeClippingArea",null),e([v({type:Boolean,json:{write:{target:"clippingArea.clip"}}})],pe.prototype,"clippingEnabled",void 0),e([oe("clippingEnabled",["clippingArea"])],pe.prototype,"readClippingEnabled",null),e([ie("clippingEnabled")],pe.prototype,"writeClippingEnabled",null),e([v({type:G,json:{read:{source:"mapFloorInfo"},write:{target:"mapFloorInfo"}}})],pe.prototype,"floorInfo",void 0),e([v({type:j,json:{write:!0}})],pe.prototype,"heightModelInfo",void 0),e([v({json:{write:{target:"operationalLayers",ignoreOrigin:!0}}})],pe.prototype,"layers",void 0),e([ie("layers")],pe.prototype,"writeLayers",null),e([v({readOnly:!0,type:ee,json:{type:ne(),write:{ignoreOrigin:!0,target:"version",isRequired:!0,overridePolicy:()=>({enabled:!0,allowNull:!0,ignoreOrigin:!0})}}})],pe.prototype,"sourceVersion",void 0),e([oe("sourceVersion",["version"])],pe.prototype,"readSourceVersion",null),e([ie("sourceVersion")],pe.prototype,"writeSourceVersion",null),e([v({json:{read:!1,write:{enabled:!0,ignoreOrigin:!0}}})],pe.prototype,"tables",void 0),e([ie("tables")],pe.prototype,"writeTables",null),e([v()],pe.prototype,"thumbnailUrl",null),e([v({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],pe.prototype,"authoringApp",null),e([ie("authoringApp")],pe.prototype,"writeAuthoringApp",null),e([v({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],pe.prototype,"authoringAppVersion",null),e([ie("authoringAppVersion")],pe.prototype,"writeAuthoringAppVersion",null),e([v({json:{write:{isRequired:!0,enabled:!0,overridePolicy:()=>({isRequired:!0,enabled:!0,allowNull:!0,ignoreOrigin:!0})}}})],pe.prototype,"ground",null),e([ie("ground")],pe.prototype,"writeGround",null),e([v({type:o.ofType(Z),json:{write:!0}})],pe.prototype,"transportationNetworks",void 0),e([v({type:Y,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)}}}}})],pe.prototype,"presentation",void 0),e([v({type:X,nonNullable:!0,json:{write:{target:"initialState",isRequired:!0,ignoreOrigin:!0},default:()=>new X({viewingMode:"global",spatialReference:R.WebMercator})}})],pe.prototype,"initialViewProperties",void 0),e([oe("initialViewProperties",["initialState","spatialReference","viewingMode"])],pe.prototype,"readInitialViewProperties",null),e([v({type:R,json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],pe.prototype,"spatialReference",null),e([v({type:["local","global"],json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],pe.prototype,"viewingMode",null),e([v({type:M})],pe.prototype,"portalItem",void 0),e([v()],pe.prototype,"resourceInfo",void 0),e([v({type:J,json:{write:!0}})],pe.prototype,"widgets",void 0),pe=e([_("esri.WebScene")],pe);const de=pe;export{de as default};
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Utilities for creating a SelectionOperation class instance.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js";
2
7
 
3
8
  /** @internal */
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Utilites for creating a SketchTooltipControls class instance.
3
+ *
4
+ * @internal
5
+ */
1
6
 
2
7
  /** @internal */
3
8
  export interface VisibleElements {
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Action utils for Components.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type Graphic from "../../Graphic.js";
2
7
  import type MapView from "../../views/MapView.js";
3
8
  import type SceneView from "../../views/SceneView.js";
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Analysis utility functions for Web Components.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type MapView from "../../views/MapView.js";
2
7
  import type SceneView from "../../views/SceneView.js";
3
8
  import type ElevationProfileAnalysisView2D from "../../views/2d/analysis/ElevationProfileAnalysisView2D.js";
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Arcade editor utils for Components.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type ImageryLayer from "../../layers/ImageryLayer.js";
2
7
  import type ImageryTileLayer from "../../layers/ImageryTileLayer.js";
3
8
  import type VoxelLayer from "../../layers/VoxelLayer.js";
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Arcade feature utils for Components.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type Graphic from "../../Graphic.js";
2
7
  import type ExpressionInfo from "../../popup/ExpressionInfo.js";
3
8
 
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Basemap utils for Components.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type Basemap from "../../Basemap.js";
2
7
 
3
8
  /**
@@ -1,4 +1,16 @@
1
- import type { MoveGeometries } from "../../views/draw/support/drawUtils.js";
1
+ /**
2
+ * Draw utils for Components.
3
+ *
4
+ * @internal
5
+ */
6
+ import type Extent from "../../geometry/Extent.js";
7
+ import type Multipoint from "../../geometry/Multipoint.js";
8
+ import type Point from "../../geometry/Point.js";
9
+ import type Polygon from "../../geometry/Polygon.js";
10
+ import type Polyline from "../../geometry/Polyline.js";
11
+
12
+ /** @internal */
13
+ export type MoveGeometries = Extent | Multipoint | Point | Polygon | Polyline;
2
14
 
3
15
  /**
4
16
  * performs translation of given geometry
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Feature utils for Components.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type WebScene from "../../WebScene.js";
2
7
  import type MapClass from "../../Map.js";
3
8
  import type FeatureLayer from "../../layers/FeatureLayer.js";
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Font utils for Components.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type Font from "../../symbols/Font.js";
2
7
  import type { FontProperties } from "../../symbols/Font.js";
3
8
 
@@ -1,3 +1,8 @@
1
+ /**
2
+ * format utils for Components. Used by the Coordinate Conversion component
3
+ *
4
+ * @internal
5
+ */
1
6
  import type Format from "../../widgets/CoordinateConversion/support/Format.js";
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Extract default units from map of view.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js";
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Background theme utils for Components.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type Color from "../../Color.js";
2
7
 
3
8
  /** @internal */
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Imagery utility functions for Web Components.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type Extent from "../../geometry/Extent.js";
2
7
  import type Multipoint from "../../geometry/Multipoint.js";
3
8
  import type Point from "../../geometry/Point.js";
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Layer origin utils for Components.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type Layer from "../../layers/Layer.js";
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Layers Effects json utils for Components.
3
+ *
4
+ * @internal
5
+ */
1
6
 
2
7
  /**
3
8
  * Converts the effect property to its JSON value.
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Background theme utils for Components.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type { Symbol2DUnion } from "../../symbols/support/typeUtils.js";
2
7
 
3
8
  /**
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Utilities related to reactivity that we're not quite ready to expose in the public API but which are useful for
3
+ * internal component development.
4
+ *
5
+ * @internal
6
+ */
1
7
 
2
8
  /**
3
9
  * @deprecated
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Sanitiziing utils for Components.
3
+ *
4
+ * @internal
5
+ */
1
6
 
2
7
  /**
3
8
  * The rendering sanitizer for use in Components.
@@ -1,4 +1,8 @@
1
- import type { ReplaceCallback } from "../../core/string.js";
1
+ /**
2
+ * String utils for Components.
3
+ *
4
+ * @internal
5
+ */
2
6
 
3
7
  /**
4
8
  * Escapes special characters in a string used in a regular expression.
@@ -20,7 +24,7 @@ export function escapeRegExpString(regExpString: string, except?: string): strin
20
24
  * @returns A string with the keys replaced.
21
25
  * @internal
22
26
  */
23
- export function replace(template: string, map: object | ReplaceCallback | null | undefined): string;
27
+ export function replace(template: string, map: object | ((substring: string) => string) | null | undefined): string;
24
28
 
25
29
  /**
26
30
  * Remove all HTML tags from a string, leaving plain text content.
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Style utils for Components.
3
+ *
4
+ * @internal
5
+ */
1
6
 
2
7
  /**
3
8
  * Return the symbol URL for a given style item in the preferred format.
@@ -1,3 +1,8 @@
1
+ /**
2
+ * SVG utils for Components.
3
+ *
4
+ * @internal
5
+ */
1
6
 
2
7
  /**
3
8
  * Calculates and returns the bounding box for a given shape.
@@ -1,3 +1,8 @@
1
+ /**
2
+ * View utils for components
3
+ *
4
+ * @internal
5
+ */
1
6
  import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js";
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ /**
2
+ * View utils for components
3
+ *
4
+ * @internal
5
+ */
1
6
  import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js";
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Web Style Symbol utils for Components.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type { AbortOptions } from "../../core/promiseUtils.js";
2
7
  import type { Symbol2D3DUnion } from "../../symbols/support/typeUtils.js";
3
8
 
@@ -1,3 +1,8 @@
1
+ /**
2
+ * VideoView utilities for the Excalibur application.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type VideoLayer from "../../layers/VideoLayer.js";
2
7
  import type VideoView from "../../views/VideoView.js";
3
8
 
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Sketch utilities for the experience builder application.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type Sketch from "../../widgets/Sketch.js";
2
7
  import type { CustomActionProps, CustomToolOptions } from "../../widgets/Sketch/types.js";
3
8
 
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Utils for knowledge studio supporting access to utilities shared between Studio and the SDK
3
+ *
4
+ * NOTE TO DEVS
5
+ * MINIMIZE USE OF INTERNAL SDK ACCESS!
6
+ * To the maximum extent possible, ArcGIS Knowledge Studio should use the same public interface as
7
+ * PS/3rd party developers.
8
+ *
9
+ * @internal
10
+ */
1
11
  import type Graphic from "../../Graphic.js";
2
12
  import type FeatureLayer from "../../layers/FeatureLayer.js";
3
13
  import type KnowledgeGraphLayer from "../../layers/KnowledgeGraphLayer.js";
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Utils for knowledge studio supporting access to utilities shared between Studio and the SDK
3
+ *
4
+ * NOTE TO DEVS
5
+ * MINIMIZE USE OF INTERNAL SDK ACCESS!
6
+ * To the maximum extent possible, ArcGIS Knowledge Studio should use the same public interface as
7
+ * PS/3rd part developers.
8
+ *
9
+ * @internal
10
+ */
1
11
  import type WebLinkChart from "../../WebLinkChart.js";
2
12
  import type Extent from "../../geometry/Extent.js";
3
13
  import type Point from "../../geometry/Point.js";
@@ -1,8 +1,18 @@
1
+ /**
2
+ * Utils for knowledge studio supporting access to internal layer properties needed for in-memory state serialization
3
+ *
4
+ * NOTE TO DEVS
5
+ * MINIMIZE USE OF INTERNAL SDK ACCESS!
6
+ * To the maximum extent possible, ArcGIS Knowledge Studio should use the same public interface as
7
+ * PS/3rd part developers.
8
+ *
9
+ * @internal
10
+ */
1
11
  import type KnowledgeGraphLayer from "../../layers/KnowledgeGraphLayer.js";
2
12
  import type LinkChartLayer from "../../layers/LinkChartLayer.js";
3
13
  import type KnowledgeGraphSublayer from "../../layers/knowledgeGraph/KnowledgeGraphSublayer.js";
4
14
  import type { InclusionListDefinition } from "./generalSharedKgUtils.js";
5
- import type { OriginName } from "../../core/accessorSupport/PropertyOrigin.js";
15
+ import type { OriginName } from "../../core/accessorSupport/types.js";
6
16
 
7
17
  /**
8
18
  * @param layer - The layer to get the inclusion definition from.
@@ -1,3 +1,8 @@
1
+ /**
2
+ * A utility method for getting a Reshape instance with support for connected reshaping.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type Graphic from "../../Graphic.js";
2
7
  import type Point from "../../geometry/Point.js";
3
8
  import type FeatureLayer from "../../layers/FeatureLayer.js";
@@ -1,3 +1,8 @@
1
+ /**
2
+ * @beta
3
+ * @since 4.32
4
+ * @internal
5
+ */
1
6
  import type KnowledgeGraph from "../../rest/knowledgeGraph/KnowledgeGraph.js";
2
7
  import type { AbortOptions } from "../../core/promiseUtils.js";
3
8
  import type { InclusionListDefinition } from "../../layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js";
@@ -1,3 +1,8 @@
1
+ /**
2
+ * General layer utilities for the map viewer application.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type Layer from "../../layers/Layer.js";
2
7
  import type { FeatureLayerBase } from "../../layers/mixins/FeatureLayerBase.js";
3
8
 
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Media layer utilities for the map viewer application.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type Extent from "../../geometry/Extent.js";
2
7
  import type ControlPointsGeoreference from "../../layers/support/ControlPointsGeoreference.js";
3
8
  import type MapView from "../../views/MapView.js";
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Table template utilities for the map viewer application.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type CSVLayer from "../../layers/CSVLayer.js";
2
7
  import type FeatureLayer from "../../layers/FeatureLayer.js";
3
8
  import type GeoJSONLayer from "../../layers/GeoJSONLayer.js";
@@ -1,3 +1,8 @@
1
+ /**
2
+ * General layer utilities for the portal application.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type FeatureLayer from "../../layers/FeatureLayer.js";
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Color utilities for the Scene Viewer application.
3
+ *
4
+ * @internal
5
+ */
1
6
  import type Color from "../../Color.js";
2
7
 
3
8
  /**