@arcgis/core 5.1.0-next.60 → 5.1.0-next.61

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 (101) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{ab223c508f3dd562e7d3.js → 32e9e92bbbd000fbbaf7.js} +2 -2
  3. package/assets/esri/core/workers/chunks/{68475eba323b4aa892a3.js → 354351ab3fc79dedf9a8.js} +1 -1
  4. package/assets/esri/core/workers/chunks/45f1e682668cffc00b44.js +1 -0
  5. package/assets/esri/core/workers/chunks/{6172715b2b2853819d8a.js → 5eeb6d3a7b815d41621e.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{2f74147597805828cb38.js → 5ff41f43e57be0557541.js} +22 -29
  7. package/assets/esri/core/workers/chunks/{6355de3ee89916b74dae.js → 6b32b3f98872771ff81e.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{8083dface1ca2dbd12b2.js → 811b378fa5bf8a4d3d66.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{8432ffc33843e898bab7.js → 8166ad6bbd7d7a8f91cf.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{58614f12796dbba013f4.js → 9d289cee96e7c7fe1029.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{c4da2ca1dee0c44051d0.js → 9d7ffd83f69d6e639f09.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{0622e238693c257abacb.js → 9eef3cd5f519c8ae88c0.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{2541ac6e0ed1184edc9b.js → af3bd661b355eed3da21.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{e4144ccc85ad4c76a9b7.js → af40e2e6eaf3d2226812.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{0fd191f9c10b3b7c83f4.js → c319c3b85cdec73a9f45.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{7e1ef2a55f8d123f31e2.js → cbb50415f7de8746ee1a.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{48d289db3145ce6c02bb.js → d4368e281c12fa7c17c5.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{266933f1139ed0e8919f.js → e645f992ec6f935ee3a5.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{bf4bad2c9a541cd425f5.js → e9dd60d0220036545ebb.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{a226ba96d9a3ecc14e3e.js → f550fc8c078ebd47d7a3.js} +1 -1
  21. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  22. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable.json +1 -1
  23. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_en.json +1 -1
  24. package/chunks/GlowComposition.glsl.js +4 -5
  25. package/chunks/ShadowHighlight.glsl.js +5 -5
  26. package/config.js +1 -1
  27. package/geometry/libtess.js +1 -1
  28. package/geometry/support/curves/bezierCurveUtils.js +1 -1
  29. package/geometry/support/curves/circularArcUtils.js +1 -1
  30. package/geometry/support/curves/ellipticArc4Utils.js +1 -1
  31. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  32. package/kernel.js +1 -1
  33. package/layers/CSVLayer.d.ts +38 -6
  34. package/layers/CatalogLayer.d.ts +39 -8
  35. package/layers/FeatureLayer.d.ts +25 -23
  36. package/layers/GeoJSONLayer.d.ts +36 -6
  37. package/layers/ParquetLayer.d.ts +58 -0
  38. package/layers/SubtypeGroupLayer.d.ts +27 -25
  39. package/layers/WFSLayer.d.ts +51 -8
  40. package/layers/catalog/CatalogFootprintLayer.d.ts +37 -7
  41. package/layers/graphics/sources/csv/csv.js +1 -1
  42. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +41 -17
  43. package/layers/mixins/ArcGISImageService.d.ts +58 -0
  44. package/layers/support/csvUtils.js +1 -1
  45. package/package.json +3 -3
  46. package/popup/Feature.d.ts +25 -32
  47. package/support/revision.js +1 -1
  48. package/views/2d/analysis/analysisViewModuleImportUtils.js +1 -1
  49. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  50. package/views/2d/layerViewModuleImportUtils.js +1 -1
  51. package/views/3d/FocusAreasView.js +1 -1
  52. package/views/3d/analysis/analysisViewModuleImportUtils.js +1 -1
  53. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  54. package/views/3d/layerViewModuleImportUtils.js +1 -1
  55. package/views/3d/layers/I3SMeshView3D.js +1 -1
  56. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  57. package/views/3d/layers/graphics/tessellationUtils.js +1 -1
  58. package/views/3d/support/renderInfoUtils/polygon.js +1 -1
  59. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +6 -11
  60. package/views/3d/webgl-engine/effects/focusArea/FocusAreaOutlineItem.js +1 -1
  61. package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
  62. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  63. package/views/3d/webgl-engine/effects/highlight/{ScreenSpaceShadowHighlight.glsl.js → ShadowHighlightBuffer.glsl.js} +1 -1
  64. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.js +2 -0
  65. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBufferTechnique.js +2 -0
  66. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  67. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  68. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  69. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  70. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  71. package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
  72. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  73. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  74. package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
  75. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +11 -11
  76. package/views/3d/webgl-engine/shaders/ReceiveShadowsConfiguration.js +1 -1
  77. package/views/3d/webgl-engine/shaders/ditherNoise.glsl.js +2 -0
  78. package/views/3d/webgl.js +1 -1
  79. package/views/SceneView.js +1 -1
  80. package/views/draw/plugins/TangentArcSegmentPlugin.js +1 -1
  81. package/views/support/AnalysisViewManager.js +1 -1
  82. package/widgets/ElevationProfile/support/ElevationProfileView.js +1 -1
  83. package/widgets/ElevationProfile/support/ElevationProfileView3D.js +1 -1
  84. package/widgets/FeatureTable/ColumnVisibilityMenuVisibleElements.d.ts +27 -0
  85. package/widgets/FeatureTable/ColumnVisibilityMenuVisibleElements.js +2 -0
  86. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +10 -1
  87. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  88. package/widgets/FeatureTable/TableMenuVisibleElements.d.ts +0 -1
  89. package/widgets/FeatureTable/TableMenuVisibleElements.js +1 -1
  90. package/widgets/FeatureTable/VisibleElements.d.ts +23 -1
  91. package/widgets/FeatureTable/VisibleElements.js +1 -1
  92. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  93. package/widgets/FeatureTable.d.ts +10 -1
  94. package/widgets/FeatureTable.js +1 -1
  95. package/widgets/Widget.js +1 -1
  96. package/assets/esri/core/workers/chunks/16806f5044a9da553b66.js +0 -1
  97. package/views/3d/webgl-engine/effects/highlight/ScreenSpaceShadowHighlightRenderNode.js +0 -2
  98. package/views/3d/webgl-engine/effects/highlight/ScreenSpaceShadowHighlightTechnique.js +0 -2
  99. package/views/3d/webgl-engine/shaders/Dithering.glsl.js +0 -4
  100. /package/assets/esri/core/workers/chunks/{ab223c508f3dd562e7d3.js.LICENSE.txt → 32e9e92bbbd000fbbaf7.js.LICENSE.txt} +0 -0
  101. /package/chunks/{ScreenSpaceShadowHighlight.glsl.js → ShadowHighlightBuffer.glsl.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../Camera.js";import i from"../Viewpoint.js";import r from"../core/Collection.js";import{byId as s}from"../core/domUtils.js";import n from"../core/Error.js";import{on as a}from"../core/events.js";import{destroyHandle as o,makeHandle as l}from"../core/handleUtils.js";import has from"../core/has.js";import p from"../core/Logger.js";import{mapCollectionAsync as h}from"../core/mapCollectionUtils.js";import{destroyMaybe as d,maybeProperty as u}from"../core/maybe.js";import{ignoreAbortErrors as c,throwIfDestroyed as g,throwIfAborted as m,createAbortError as y}from"../core/promiseUtils.js";import f from"../core/ReactiveSet.js";import{on as w,watch as v,initial as _,sync as b,whenOnce as M,syncAndInitial as S}from"../core/reactiveUtils.js";import{setFrameDuration as V,cleanupScheduling as j}from"../core/scheduling.js";import{createScreenPoint as C,createScreenPointArray as T}from"../core/screenUtils.js";import{cleanupWhereClauseCache as R}from"../core/sql.js";import{getMetersPerUnitForSR as x}from"../core/units.js";import{property as A,cast as O,subclass as E}from"../core/accessorSupport/decorators.js";import{ensureType as L,ensureClass as H}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as I}from"../core/accessorSupport/overrideDefaultsFrom.js";import{runUntracked as F}from"../core/accessorSupport/tracking.js";import{drainNotificationQueue as P}from"../core/accessorSupport/trackingUtils.js";import{create as D}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{cleanupPooledRBush as U}from"../core/libs/rbush/PooledRBush.js";import{initialize as G}from"../core/workers/workers.js";import z from"../geometry/Extent.js";import W from"../geometry/HeightModelInfo.js";import q from"../geometry/Point.js";import{project as k,canProjectWithoutEngine as B}from"../geometry/projectionUtils.js";import N from"../geometry/SpatialReference.js";import{cleanupSpatialReferenceEllipsoidUtils as Q}from"../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingRect as Z}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as Y}from"../geometry/projection/projectPointToVector.js";import{toExtent as $,create as J}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as K}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as X}from"../geometry/support/scaleUtils.js";import{makeDehydratedPoint as ee}from"../layers/graphics/dehydratedPoint.js";import{isImageryTileLayer as te,isTiledLayer as ie,isVoxelLayer as re,isIntegratedMeshLayer as se,isGaussianSplatLayer as ne}from"../layers/support/layerUtils.js";import{TilemapCache as ae}from"../layers/support/TilemapCache.js";import{clearDefaultPortalInstance as oe}from"../portal/portalDefault.js";import{WebSceneTag as le}from"../support/tagSymbols.js";import{BreakpointsOwner as pe}from"./BreakpointsOwner.js";import{DOMContainer as he}from"./DOMContainer.js";import{PopupView as de}from"./PopupView.js";import ue from"./View.js";import ce from"./ViewAnimation.js";import{stringFromViewingMode as ge,viewingModeFromString as me}from"./ViewingMode.js";import{GroundView3D as ye}from"./3d/GroundView3D.js";import{layerView3DImporter as fe}from"./3d/layerViewModuleImportUtils.js";import{importAnalysisViewModule as we}from"./3d/analysis/analysisViewModuleImportUtils.js";import{cleanupIntersectionUtils as ve}from"./3d/camera/intersectionUtils.js";import _e from"./3d/constraints/Constraints.js";import be from"./3d/environment/Environment.js";import{EnvironmentManager as Me}from"./3d/environment/EnvironmentManager.js";import Se from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as Ve}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as je}from"./3d/layers/graphics/Labeler.js";import Ce from"./3d/layers/i3s/I3SLodHandling.js";import{cleanupStageLayerElevationProvider as Te}from"./3d/layers/support/StageLayerElevationProvider.js";import{ScreenSizePerspective as Re}from"./3d/state/ScreenSizePerspective.js";import xe from"./3d/state/ViewState.js";import{ViewStateManager as Ae,cleanupViewStateManager as Oe}from"./3d/state/ViewStateManager.js";import{cleanupPointToPointAnimationController as Ee}from"./3d/state/controllers/PointToPointAnimationController.js";import{SceneIntersectionHelper as Le}from"./3d/state/helpers/SceneIntersectionHelper.js";import{cleanupNavigationUtils as He}from"./3d/state/utils/navigationUtils.js";import Ie from"./3d/support/Attribution3D.js";import{CombinedElevationProvider as Fe}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as Pe}from"./3d/support/debugFlags.js";import{getElevationAtPoint as De}from"./3d/support/ElevationProvider.js";import{toMap as Ue,hitTest as Ge}from"./3d/support/hitTest.js";import{popupHitTest as ze}from"./3d/support/popupHitTest.js";import{getDefaultQualityProfileName as We,getQualityProfileSettings as qe}from"./3d/support/QualityProfile.js";import ke from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as Be}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as Ne}from"./3d/support/ResourceController.js";import Qe from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as Ze}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as Ye}from"./3d/support/ViewSlice.js";import{PointsOfInterest as $e}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import Je from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as Ke,getTiledLayerInfo as Xe,checkIfTileInfoSupportedForView as et}from"./3d/terrain/terrainUtils.js";import{clearTilePerLayerInfo as tt}from"./3d/terrain/TilePerLayerInfo.js";import{cleanupTileRenderer as it}from"./3d/terrain/TileRenderer.js";import{Stage as rt}from"./3d/webgl-engine/Stage.js";import{olidEnabled as st}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{cleanupRenderOccluded as nt}from"./3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js";import{defaultTolerance as at}from"./3d/webgl-engine/lib/Intersector.js";import{cleanupShadowmap as ot}from"./3d/webgl-engine/lib/ShadowMap.js";import{terrainId as lt}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{cleanupEdgeProcessing as pt}from"./3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js";import ht from"./support/AnalysisViewManager.js";import{cleanupDrapedUtils as dt}from"./support/drapedUtils.js";import{occludeesSupported as ut}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as ct,createScreenPointFromSupportedEvent as gt}from"./support/screenUtils.js";import{isSpatialReferenceSupported as mt}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as yt,destroyTextureCompressionWorker as ft}from"./support/TextureCompressionHelper.js";import wt from"./ui/DefaultUI.js";import vt from"./ui/3d/DefaultUI3D.js";import _t from"../webscene/Environment.js";import{clearVNodeCache as bt}from"../widgets/support/vnodeCache.js";var Mt;const St=Symbol(),Vt=Symbol();let jt=class extends(pe(de(he(ue)))){static{Mt=this}constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=Ne(this),this.deconflictor=new Ve({view:this}),this.attribution3D=new Ie({view:this}),this.labeler=new je({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.basemapTerrain=null,this.elevationProvider=new Fe({view:this}),this._canvas=null,this.constraints=new _e,this._environment=new be,this.environmentManager=new Me,this.floors=new r,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new ht({importAnalysisViewModule:e=>we(e),view:this}),this.groundView=null,this.map=null,this._featureTileTreeClients=new f,this._featureTiles=null,this._featureTreeDebugger=null,this.state=new xe({view:this}),this.slice=new Ye,this.spatialReference=null,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new vt,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,G();const t=()=>this._updatingChanged();this.addHandles(o(h(()=>this.map?.allLayers,async e=>{try{await e.when()}catch{}finally{t()}}))),this.addHandles([w(()=>this.map?.allLayers,"after-changes",t,{onListenerAdd:t,onListenerRemove:t,sync:!0}),this.allLayerViews.on("after-changes",e=>this._updateUpdatingMonitors(e)),v(()=>this.scene,e=>e?.load().catch(()=>{}))]),this.inputManager=new Se({view:this}),this.stateManager=new Ae({view:this}),this.screenSizePerspective=new Re({view:this})}initialize(){if(has("enable-feature:esri-compress-textures")&&has("wasm-simd")){const e=yt(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new ye({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add(()=>this.qualitySettings.memoryLimit,e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)},_),this.updatingHandles.add(()=>this.qualitySettings.additionalCacheMemory,e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)},_),this.updatingHandles.add(()=>this.qualitySettings.frameRate??0,e=>V(e>0?1e3/Math.ceil(e):0),_),this.addHandles([v(()=>this.spatialReference,()=>this.notifyChange("clippingArea"),b),v(()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration}),()=>this._updateSlice(),b)])}destroy(){this.destroyed||(ft(this),this.updatingHandles.removeAll(),this.basemapTerrain?.clearHandles(),this.elevationProvider.destroy(),this.ui.removeAllHandles(),this.layerViewManager.clearHandles(),this.invalidate(),this.layerViewManager.clear(),this._set("analysisViewManager",d(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=d(this.sharedSymbolResources),this._set("labeler",d(this.labeler)),this._set("deconflictor",d(this.deconflictor)),this._resourceController=d(this._resourceController),this._set("stateManager",d(this.stateManager)),this._set("inputManager",d(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles("updatingMonitors"),this._set("environmentManager",d(this.environmentManager)),this._set("environment",d(this.environment)),this.groundView=d(this.groundView),this.slice.destroy(),this._updatingObjectsWithProgress.length=0,this._updatingObjects.length=0,this.ui?.destroy(),this._set("ui",null),this._set("renderCanvas",null),this._set("canvas",null),this._canvas=null,this.screenSizePerspective.destroy(),this.attribution3D.destroy())}get stage(){return this._stage}get renderSpatialReference(){return this.renderCoordsHelper?.spatialReference}get groundSpatialReference(){return this.basemapTerrain?.spatialReference}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get animation(){return this.state?.animation}get overlayManager(){return this.basemapTerrain?.overlayManager}get camera(){return this.stateManager?.camera}set camera(e){this.stateManager&&(this.stateManager.camera=e)}get contentCamera(){return this.stateManager?.contentCamera}set contentCamera(e){this.stateManager&&(this.stateManager.contentCamera=e)}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get canvas(){return this._canvas}get center(){return this.stateManager?.center}set center(e){this.stateManager&&(this.stateManager.center=L(q,e))}get clippingArea(){if("global"===this.viewingMode)return null;const e=this.map;let t=this._userClippingArea||u(e,"clippingArea");return!this._userClippingArea&&!u(e,"clippingEnabled")||null==t?(this._clippingArea=null,null):t instanceof z?this.spatialReference&&(t=Ct(t,this.spatialReference),null==t)?(p.getLogger(this).error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(t=t.clone(),null==t.intersection(this._groundAndLayersExtent)&&(t.xmin=t.xmax,t.ymin=t.ymax),t.zmin=void 0,t.zmax=void 0,t.equals(this._clippingArea)||(this._clippingArea=t),this._clippingArea):(p.getLogger(this).error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&null!=e?p.getLogger(this).error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(1===this.state.viewingMode)return null;const e=this.renderSpatialReference,t=this.dataExtent;return null==t||null==e||t.spatialReference.equals(e)?t:Ct(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent;const t=this.spatialReference||N.WGS84,i=Ct(this.clippingArea,t);null!=i&&(e=null!=e?e.intersection(i):i);const r=this._get("dataExtent");return null!=e&&e.equals(r)?r:e}get _groundAndLayersExtent(){const e=this.spatialReference||N.WGS84;let t;const i=i=>{const r=Ct(i,e);null!=r&&(null!=t?t.union(r):t=r.clone())},{groundView:r}=this,s=r?.spatialReference,n=r?.fullGroundExtent;s&&n&&i(new z({xmin:n[0],ymin:n[1],zmin:0,xmax:n[2],ymax:n[3],zmax:0,spatialReference:s}));const a=e=>{null==e.fullExtent||"graphics"===e.type&&e.internal||i(e.fullExtent)};if(this.map?.allLayers.forEach(e=>a(e)),null==t)return null;t.hasZ?(t.zmin=Math.min(0,t.zmin??0),t.zmax=Math.max(0,t.zmax??0)):(t.zmin=0,t.zmax=0);const o=this._get("_groundAndLayersExtent");return t.equals(o)?o:t}get environment(){return this._environment}set environment(e){if(this._environment===e)return;const{_environment:t}=this;this._environment=null,t?.destroy(),this._environment=e,this.notifyChange("environment")}castEnvironment(e){return e?e instanceof be?e:e instanceof _t?this.environment?.cloneWithWebsceneEnvironment(e)??be.fromWebsceneEnvironment(e):L(be,e):new be}get extent(){return this.stateManager?.extent}set extent(e){this.stateManager&&(this.stateManager.extent=e)}get screenCenter(){return this.stateManager?.screenCenter}get frustum(){return this.stateManager?.frustum}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.groundView?.layerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get _layerToLayerviewMapping(){return Mt._layerToLayerview}static{this._layerToLayerview=ue._layerToLayerview.concat([["view.map.ground.layers","view.groundView.layerViews"]])}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||(this.toolViewManager?.interacting??!1)}get stationary(){return!this.animation&&!this.resizing&&(this.state?.stationary??!0)}get navigating(){return this.state?.navigating??!1}get scene(){return this.map&&le in this.map?this.map:null}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get featureTiles(){return this._featureTiles}set qualityProfile(e){const t=qe(e);t&&this._get("qualityProfile")!==e&&(this.qualitySettings=new ke(t),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||We()}_updateSlice(){null!=this.stage&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return!!this.viewingMode&&!!this.stateManager?.preinit(this.spatialReference)}get resolution(){const{scale:e,spatialReference:t}=this;return t?F(()=>X(e,t)):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get terrainLevel(){const e=this.basemapTerrain?.tilingScheme,t=this.scale;if(!e||!t)return null;const i=e.levelAtScale(t)+this.qualitySettings.tiledSurface.lodBias,r=e.getMaxLod();return i<=0?null:Math.max(0,Math.min(i,r||1/0))}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?W.deriveUnitFromSR(e,this.spatialReference):null}get alphaCompositingEnabled(){return this._get("alphaCompositingEnabled")}set alphaCompositingEnabled(e){this._stage&&p.getLogger(this).warn("alphaCompositingEnabled cannot be changed after the view has become ready"),this._set("alphaCompositingEnabled",e)}get updating(){if(this.destroying||this.destroyed)return!1;let e=0,t=this.layerViewManager.updating,i=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach(r=>{if(r.isFulfilled()){if(r.updating){if(t=!0,r.suspended||Ke(r))return;++i,e+=r.updatingProgress}}else++i});for(const s of this._updatingObjects)if(null!=s&&s.updating){const t=.1;i+=t,e+=.5*t}for(const s of this._updatingObjectsWithProgress)null!=s&&s.updating&&(++i,e+=s.updatingProgress);const r=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||i>0||this.updatingHandles.updating||!this.ready||!this.stationary||r||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some(e=>!e.isFulfilled())),t?(this._numUpdating=Math.max(i,this._numUpdating),e+=this._numUpdating-i):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=t?0:1,this._get("updatingProgress")!==e){const i=performance.now();if(e<1){const t=Math.min((i-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set("updatingProgress",e),this._lastUpdateTime=t&&e<1?i:0}return t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get viewingMode(){const e=this._predeterminedViewingMode;if(null!=e)return ge(e);const t=this.spatialReference;return t?null!=this.defaultsFromMap?.viewingMode&&t.equals(this.defaultsFromMap.spatialReference)?ge(this.defaultsFromMap.viewingMode):mt(t,1)?"global":"local":"global"}set viewingMode(e){this.ready?p.getLogger(this).error("#viewingMode","viewingMode cannot be set once view is ready"):this._overrideIfSome("viewingMode",e)}get viewpoint(){return this.stateManager?.viewpoint}set viewpoint(e){this.stateManager&&(this.stateManager.viewpoint=e)}get visibleArea(){return this.stateManager?.visibleArea}get zoom(){return this.stateManager.zoom}set zoom(e){this.stateManager&&(this.stateManager.zoom=e)}get resourceController(){return this._resourceController}get quality(){return this._resourceController?.memoryController?.memoryFactor??1}get resolutionScale(){return Math.sqrt(Math.min(1,this.quality/.75))}get performanceInfo(){return new Qe(this)}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return p.getLogger(this).error("#toMap()","Scene view cannot be used before it is ready"),null;const i=ct(e)?gt(this,e):e;return Ue(this,i,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return p.getLogger(this).error("#toScreen()","Scene view cannot be used before it is ready"),null;let t=e;return null==e.z&&(t=At,t.x=e.x,t.y=e.y,t.z=De(this.elevationProvider,e)??0,t.spatialReference=e.spatialReference),Y(t,Tt,this.renderSpatialReference),this.state.camera.projectToScreen(Tt,Rt),C(Rt[0],Rt[1])}pixelSizeAt(e,t){if(!this.ready)return p.getLogger(this).error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null;if(!e)return 0;const i=this.renderSpatialReference;Y(e,Tt,i);const r=this.state.camera.computeScreenPixelSizeAt(Tt);return t&&i!==t?r*x(i)/x(t):r}overlayPixelSizeInMapUnits(e){return this.overlayManager?.overlayPixelSizeInMapUnits(e,()=>this.pixelSizeAt(e))??1}hitTest(e,t){if(!this.ready)return p.getLogger(this).error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=ct(e)?gt(this,e):e;return Ge(this,i,t,this._defaultHitTestOptions)}async popupHitTest(e){return ze(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async zoomIn(){if(this.canZoomIn)return c(this.goTo({zoomFactor:2}))}async zoomOut(){if(this.canZoomOut)return c(this.goTo({zoomFactor:.5}))}async whenAnalysisView(e){if(null==e.parent)throw new n("view:no-analysisview-for-analysis","The analysis does not exist in view.analyses",{analysis:e});switch(e.parent.type){case"line-of-sight":case"dimension":case"viewshed":return(await this.whenLayerView(e.parent)).whenAnalysisView();default:return this.analysisViewManager.whenAnalysisView(e)}}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=(await this.stage.renderView.takeScreenshot(t))[0];return(await import("./support/screenshotUtils.js")).encode(i,t,this._pixelFormat())}async _takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=(await this.stage.renderView.takeScreenshot(t))[0];return(await import("./support/screenshotUtils.js")).encodeData(i,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){const t=await this._completeSettings(e);t.olidColor=!0,await this.whenReady();const i=await this.stage.renderView.takeScreenshot(t),{encodeData:r}=await import("./support/screenshotUtils.js");return[r(i[0],this._pixelFormat()),r(i[1],this._pixelFormat())]}async _completeSettings(e){const{toRenderSettings:t,screenshotSuperSampleSettings:i}=await import("./support/screenshotUtils.js"),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,i(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!st())throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true");const{encode:t}=await import("./support/screenshotUtils.js"),i=await this._completeSettings(e);i.olidColor=!0,await this.whenReady();const r=await this.stage.renderView.takeScreenshot(i),s=t(r[0],i,this._pixelFormat()),a=await this._completeSettings(e);a.format="png";return[s,t(r[1],a,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){const e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true")}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}getAttributionItems(){return super.getAttributionItems().concat(this.attribution3D.attributionItems)}importLayerView(e){return fe.importLayerView(e)}hasLayerViewModule(e){return fe.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.scene?.initialViewProperties?.spatialReference||this.defaultsFromMap?.spatialReference||this.defaultsFromMap?.ready&&this._initialDefaultSpatialReference||null}getSurface(){return this.surface}get _predeterminedViewingMode(){const e=this._isOverridden("viewingMode")?this._get("viewingMode"):this.scene?.initialViewProperties?.viewingMode;return null!=e?me(e):null}getSpatialReferenceSupport(e,t){const i=this._predeterminedViewingMode;if(null!=i)return this._validateSpatialReferenceForViewingMode(e,t,i)?{constraints:this._makeSpatialReferenceConstraints(e,t,i)}:null;const r=this._validateSpatialReferenceForViewingMode(e,t,2),s=this._validateSpatialReferenceForViewingMode(e,t,1);return r||s?r&&s?{constraints:this._makeSpatialReferenceConstraints(e,t,null)}:r?{constraints:this._makeSpatialReferenceConstraints(e,t,2)}:{constraints:this._makeSpatialReferenceConstraints(e,t,1)}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!mt(e,i)&&(null==t||(!!te(t)||(!ie(t)||null!=Xe(t,e,i))&&(!re(t)||1!==i)))}_makeSpatialReferenceConstraints(e,t,i){if(null==t)return[{spatialReference:e,viewingMode:i}];const{isWebMercator:r,isWGS84:s}=e;if(te(t)&&(r||s)){return!s||2===i||null===et(t.tileInfo,t.fullExtent,e,1)?[{spatialReference:e,viewingMode:i},{spatialReference:N.WebMercator,viewingMode:i}]:[{spatialReference:r?N.WGS84:N.WebMercator,viewingMode:i}]}return ie(t)||re(t)||!r&&!s?ie(t)&&r&&1!==i?[{spatialReference:e,viewingMode:i},{spatialReference:N.WGS84,viewingMode:2}]:[{spatialReference:e,viewingMode:i}]:[{spatialReference:e,viewingMode:i},{spatialReference:r?N.WGS84:N.WebMercator,viewingMode:i}]}_validateSpatialReference(e){const t=null!=this.getSpatialReferenceSupport(e),i=this._predeterminedViewingMode;return t||(null!=i?p.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${ge(i)} viewing mode.`):e.isGeographic&&p.getLogger(this).warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}trackGraphicState(e){if(!e.graphic)return p.getLogger(this).error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let i=null,r=!1;const s=t=>{!r&&null!=t&&"processor"in t&&"graphics-3d"===t.processor?.type&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return null!=t?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then(e=>s(e),()=>{}).catch(()=>{}),l(()=>{r=!0,null!=i&&(i.remove(),i=null)})}maskOccludee(e){if(!e)return p.getLogger(this).error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let i=null,r=!1;const s=t=>{!r&&null!=t&&ut(t)&&(i=t.maskOccludee(e))};return null!=t?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then(e=>s(e),()=>{}).catch(()=>{}),l(()=>{r=!0,null!=i&&(i.remove(),i=null)})}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter(e=>"media-3d"!==e.type).find(t=>t.layer===e.layer):null}graphicChanged(e){null!=this.graphicsView&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await M(()=>this.graphicsView),this.graphicsView):e.layer&&this.map?t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise((t,i)=>{const r=this.map.allLayers.on("change",s=>{s.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))})}):this.whenLayerView(e.layer):null}enableFeatureTiles(){const e=Symbol();return this._featureTileTreeClients.add(e),l(()=>this._featureTileTreeClients.delete(e))}async _importModule(e,t){const i=new AbortController;this._importControllers.set(e,i),this._updatingChanged();try{const r=await Ot[e]();if(t&&(g(this),m(i.signal),await t(i.signal)),this.destroyed)throw y();return m(i.signal),r}catch{return null}finally{this._importControllers.delete(e),this._updatingChanged()}}_abortImport(e){this._importControllers.get(e)?.abort(),this._importControllers.delete(e),this._updatingChanged()}_initBasemapTerrain(){this._set("basemapTerrain",new Je({view:this})),this.elevationProvider.register(0,this.basemapTerrain)}_exitBasemapTerrain(){const{basemapTerrain:e,elevationProvider:t}=this;e&&(this._set("basemapTerrain",null),t.unregister(e),e.destroy())}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new $e({view:this})),this.addHandles([this.updatingHandles.add(()=>Pe.FEATURE_TILE_TREE_SHOW_TILES,e=>{e&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then(({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&Pe.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))}):e||(this._featureTreeDebugger=d(this._featureTreeDebugger))},S),this.updatingHandles.add(()=>({basemapExtent:this.groundView?.groundExtent,basemapSpatialReference:this.groundView?.spatialReference,clippingArea:this.clippingArea,featureTiles:this._featureTiles}),({basemapExtent:e,basemapSpatialReference:t,clippingArea:i,featureTiles:r})=>{if(!r)return;const s=!!e;if(i||s)if(s&&t){const s=e&&t?k($(e,t),this.spatialReference):null;r.filterExtent=i?i.intersection(s):s}else r.filterExtent=i;else r.filterExtent=null},S),this.updatingHandles.add(()=>this._featureTileTreeClients.size>0,e=>{e?this.updatingHandles.consumePromise(this._ensureFeatureTileTree()):this._featureTiles=d(this._featureTiles)},b)],St),this.stateManager.init()}async _ensureFeatureTileTree(){if(this._featureTiles||this._importControllers.has("FeatureTileTree3D"))return;const e=(await this.updatingHandles.addPromise(this._importModule("FeatureTileTree3D")))?.FeatureTileTree3D;e&&(this._featureTiles=new e({renderCoordsHelper:this.renderCoordsHelper,pointsOfInterest:this.pointsOfInterest,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}),this._updatingChanged())}_exitTerrain(){this.stateManager.exit(),this.removeHandles(Vt),this.removeHandles(St),this._featureTiles=d(this.featureTiles),this._set("pointsOfInterest",d(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem()}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference,t=this.state.isGlobal,i=K(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",Be.create(this.state.viewingMode,i)),t||this.addHandles(v(()=>this.groundView?.groundExtent,e=>{const t=this.renderCoordsHelper.spatialReference;null==e||0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!Z(e,this.groundView.spatialReference,xt,t)||(this.renderCoordsHelper.extent=xt)},b),Vt),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(at/this.renderCoordsHelper.unitInMeters))}else this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.removeHandles(Vt),this._set("renderCoordsHelper",null)}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){null!=e&&4===e.type||(this.removeHandles("updatingMonitors"),this.allLayerViews.forEach(e=>{e.destroyed||(this.addHandles(v(()=>[e.updating,e.updatingProgress],()=>this._updatingChanged(),b),"updatingMonitors"),e.when(()=>this._updatingChanged(),()=>this._updatingChanged()))}),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,i){if(!this.overlay||!this.overlay.hasVisibleItems)return i;const r=e.getContext("2d",{willReadFrequently:!0});return r.putImageData(i,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,i.width,i.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled,canvas:this.renderCanvas,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,i)=>this._renderScreenshotOverlay(e,t,i)}},t=new Le(this.state.viewingMode,e=>this.stage.layers.forEach(e),this);this._set("sceneIntersectionHelper",t);const i=s(this.surface);this._stage=new rt({view:this,options:e,container:i}),this.notifyChange("stage"),this._updateSlice(),this.addHandles([this.on("pointer-move",()=>this.stage?.renderer.resetAnimation()),a(this.stage.renderView.canvas,"webglcontextlost",e=>{this.fatalError=new n("webgl-context-lost",e.statusMessage||"WebGL context lost")})],"stage"),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(at/this.renderCoordsHelper.unitInMeters),this._set("canvas",this.stage.renderView.canvas)}_exitStage(){this.sceneIntersectionHelper?.destroy(),this._set("sceneIntersectionHelper",null),this._stage=d(this.stage),this._set("stage",null),this.removeHandles("stage"),this._set("canvas",null)}_initSurface(){this._exitSurface(),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new Ze({view:this,resourceController:this._resourceController})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitTerrain(),this._exitStage())}async _ensureGraphicsView(){if(this.graphicsView||this._importControllers.has("GraphicsView3D")||0===this.graphics.length)return;this.removeHandles("GraphicsView3D");const e=(await this.updatingHandles.addPromise(this._importModule("GraphicsView3D",e=>M(()=>this.groundView?.ready,e))))?.default;e&&this._set("graphicsView",new e({view:this,getGraphics:()=>this.graphics})),this._updatingChanged()}_disposeGraphicsView(){this._abortImport("GraphicsView3D"),this.removeHandles("GraphicsView3D"),this.graphicsView&&(this.removeHandles(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_disposeFocusAreasView(){this._abortImport("FocusAreasView"),this.removeHandles("FocusAreasView"),this.focusAreasView=d(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has("FocusAreasView")||0===e)return;this.removeHandles("FocusAreasView");const t=(await this.updatingHandles.addPromise(this._importModule("FocusAreasView")))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){1===me(this.viewingMode)&&(this._clippingArea=null),this._initSurface(),this._set("ready",!0),this.addHandles(w(()=>this.graphics,"after-changes",()=>this._ensureGraphicsView()),"GraphicsView3D"),this._ensureGraphicsView(),this.addHandles(v(()=>this.map?.focusAreas?.areas.length??0,e=>this._ensureFocusAreasView(e),{initial:!0}),"FocusAreasView");const e=this.scene?.initialViewProperties??null,t=e?.environment;t&&(this._overrideDefaultEnvironmentOnly?I(this.environment,t):this.environment=this.environment.cloneWithWebsceneEnvironment(t)),this.timeExtent=e?.timeExtent,e?.analyses.applyTo(this),this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const i=this._resolveWhenReady;this._resolveWhenReady=[],i.forEach(e=>e(this))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set("ready",!1)}get _defaultToMapOptions(){const e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(lt);for(const t of this.allLayerViews)(se(t.layer)||ne(t.layer))&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){const e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(lt);for(const t of this.allLayerViews)se(t.layer)&&t.layer.opacity<1&&e.exclude.add(t.uid);return e}static{this.type="3d"}static clearStatics(){bt(),P(),R(),pt(),Oe(),ve(),Te(),Q(),dt(),oe(),it(),ot(),Ee(),He(),U(),j(),nt(),tt(),Ce.cleanupI3SLodHandling(),ae.cleanupTilemapCache(),xe.cleanupViewstate(),Je.cleanupTerrainSurface()}};function Ct(e,t){return null!=e&&B(e.spatialReference,t)?k(e,t):null}e([A()],jt.prototype,"_userClippingArea",void 0),e([A()],jt.prototype,"_resourceController",void 0),e([A()],jt.prototype,"stage",null),e([A({readOnly:!0})],jt.prototype,"deconflictor",void 0),e([A({readOnly:!0})],jt.prototype,"labeler",void 0),e([A({type:ce,readOnly:!0})],jt.prototype,"animation",null),e([A({readOnly:!0})],jt.prototype,"basemapTerrain",void 0),e([A({readOnly:!0})],jt.prototype,"overlayManager",null),e([A({readOnly:!0})],jt.prototype,"elevationProvider",void 0),e([A()],jt.prototype,"camera",null),e([A({type:t})],jt.prototype,"contentCamera",null),e([A({readOnly:!0})],jt.prototype,"canvas",null),e([A({type:q,useTypeForAutocast:!1})],jt.prototype,"center",null),e([A({type:z})],jt.prototype,"clippingArea",null),e([A({type:_e,nonNullable:!0})],jt.prototype,"constraints",void 0),e([A({type:z,readOnly:!0})],jt.prototype,"renderDataExtent",null),e([A({readOnly:!0})],jt.prototype,"tileInfo",null),e([A({type:z,readOnly:!0})],jt.prototype,"dataExtent",null),e([A({type:z,readOnly:!0})],jt.prototype,"_groundAndLayersExtent",null),e([A({type:be})],jt.prototype,"environment",null),e([O("environment")],jt.prototype,"castEnvironment",null),e([A({readOnly:!0})],jt.prototype,"environmentManager",void 0),e([A({type:z})],jt.prototype,"extent",null),e([A({type:r})],jt.prototype,"floors",void 0),e([A()],jt.prototype,"screenCenter",null),e([A()],jt.prototype,"frustum",null),e([A({type:Number,readOnly:!0})],jt.prototype,"fullOpacity",void 0),e([A({readOnly:!0})],jt.prototype,"graphicsView",void 0),e([A()],jt.prototype,"analysisViewManager",void 0),e([A()],jt.prototype,"groundView",void 0),e([A({readOnly:!0})],jt.prototype,"layerviewCollections",null),e([A({type:Boolean})],jt.prototype,"initialExtentRequired",null),e([A()],jt.prototype,"defaultsFromMapSettings",null),e([A()],jt.prototype,"interacting",null),e([A()],jt.prototype,"stationary",null),e([A()],jt.prototype,"navigating",null),e([A()],jt.prototype,"map",void 0),e([A()],jt.prototype,"padding",null),e([A({type:$e,readOnly:!0})],jt.prototype,"pointsOfInterest",void 0),e([A()],jt.prototype,"_featureTiles",void 0),e([A()],jt.prototype,"featureTiles",null),e([A()],jt.prototype,"_featureTreeDebugger",void 0),e([A({constructOnly:!0})],jt.prototype,"deactivatedWebGLExtensions",void 0),e([A({constructOnly:!0})],jt.prototype,"debugWebGLExtensions",void 0),e([A({constructOnly:!0})],jt.prototype,"renderCanvas",void 0),e([A({constructOnly:!0})],jt.prototype,"state",void 0),e([A()],jt.prototype,"screenSizePerspective",void 0),e([A({readOnly:!0})],jt.prototype,"inputManager",void 0),e([A({readOnly:!0})],jt.prototype,"stateManager",void 0),e([A({type:["low","medium","high"]})],jt.prototype,"qualityProfile",null),e([A({type:ke,get(){let e=this._get("qualitySettings");if(!e){const t=qe(this.qualityProfile);e=new ke(t)}return e}})],jt.prototype,"qualitySettings",void 0),e([A()],jt.prototype,"slice",void 0),e([A({readOnly:!0})],jt.prototype,"typeSpecificPreconditionsReady",null),e([A({readOnly:!0})],jt.prototype,"renderCoordsHelper",void 0),e([A({readOnly:!0})],jt.prototype,"sceneIntersectionHelper",void 0),e([A({type:Number,readOnly:!0})],jt.prototype,"resolution",null),e([A({type:Number})],jt.prototype,"scale",null),e([A({readOnly:!0,type:Number})],jt.prototype,"terrainLevel",null),e([A()],jt.prototype,"heightModelInfo",null),e([A({type:N})],jt.prototype,"spatialReference",void 0),e([A({type:Boolean,value:!1})],jt.prototype,"alphaCompositingEnabled",null),e([A({constructOnly:!0})],jt.prototype,"preserveDrawingBufferEnabled",void 0),e([A({type:Boolean})],jt.prototype,"supersampleScreenshotsEnabled",void 0),e([A({readOnly:!0})],jt.prototype,"type",void 0),e([A(),O(e=>e instanceof wt?e:H(vt,e))],jt.prototype,"ui",void 0),e([A({type:Boolean,readOnly:!0})],jt.prototype,"updating",null),e([A()],jt.prototype,"_updatingObjects",null),e([A()],jt.prototype,"_updatingObjectsWithProgress",null),e([A({type:Number,readOnly:!0})],jt.prototype,"updatingProgress",void 0),e([A({type:["global","local"]})],jt.prototype,"viewingMode",null),e([A({type:i})],jt.prototype,"viewpoint",null),e([A({readOnly:!0})],jt.prototype,"visibleArea",null),e([A({type:Number})],jt.prototype,"zoom",null),e([A({readOnly:!0})],jt.prototype,"quality",null),e([A({readOnly:!0})],jt.prototype,"resolutionScale",null),e([A()],jt.prototype,"focusAreasView",void 0),e([A()],jt.prototype,"_defaultToMapOptions",null),e([A()],jt.prototype,"_defaultHitTestOptions",null),jt=Mt=e([E("esri.views.SceneView")],jt);const Tt=D(),Rt=T(),xt=J(),At=ee(0,0,0,N.WebMercator),Ot={GraphicsView3D:()=>import("./3d/layers/GraphicsView3D.js"),FocusAreasView:()=>import("./3d/FocusAreasView.js"),FeatureTileTree3D:()=>import("./3d/layers/support/FeatureTileTree3D.js")},Et=jt;export{Et as default};
2
+ import{__decorate as e}from"tslib";import t from"../Camera.js";import i from"../Viewpoint.js";import r from"../core/Collection.js";import{byId as s}from"../core/domUtils.js";import n from"../core/Error.js";import{on as a}from"../core/events.js";import{destroyHandle as o,makeHandle as l}from"../core/handleUtils.js";import has from"../core/has.js";import p from"../core/Logger.js";import{mapCollectionAsync as h}from"../core/mapCollectionUtils.js";import{destroyMaybe as d,maybeProperty as u}from"../core/maybe.js";import{ignoreAbortErrors as c,throwIfDestroyed as g,throwIfAborted as m,createAbortError as y}from"../core/promiseUtils.js";import f from"../core/ReactiveSet.js";import{on as w,watch as v,initial as _,sync as b,whenOnce as M,syncAndInitial as S}from"../core/reactiveUtils.js";import{setFrameDuration as V,cleanupScheduling as j}from"../core/scheduling.js";import{createScreenPoint as C,createScreenPointArray as T}from"../core/screenUtils.js";import{cleanupWhereClauseCache as R}from"../core/sql.js";import{getMetersPerUnitForSR as x}from"../core/units.js";import{property as A,cast as O,subclass as E}from"../core/accessorSupport/decorators.js";import{ensureType as L,ensureClass as H}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as I}from"../core/accessorSupport/overrideDefaultsFrom.js";import{runUntracked as F}from"../core/accessorSupport/tracking.js";import{drainNotificationQueue as P}from"../core/accessorSupport/trackingUtils.js";import{create as D}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{cleanupPooledRBush as U}from"../core/libs/rbush/PooledRBush.js";import{initialize as G}from"../core/workers/workers.js";import z from"../geometry/Extent.js";import W from"../geometry/HeightModelInfo.js";import q from"../geometry/Point.js";import{project as k,canProjectWithoutEngine as B}from"../geometry/projectionUtils.js";import N from"../geometry/SpatialReference.js";import{cleanupSpatialReferenceEllipsoidUtils as Q}from"../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingRect as Z}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as Y}from"../geometry/projection/projectPointToVector.js";import{toExtent as $,create as J}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as K}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as X}from"../geometry/support/scaleUtils.js";import{makeDehydratedPoint as ee}from"../layers/graphics/dehydratedPoint.js";import{isImageryTileLayer as te,isTiledLayer as ie,isVoxelLayer as re,isIntegratedMeshLayer as se,isGaussianSplatLayer as ne}from"../layers/support/layerUtils.js";import{TilemapCache as ae}from"../layers/support/TilemapCache.js";import{clearDefaultPortalInstance as oe}from"../portal/portalDefault.js";import{WebSceneTag as le}from"../support/tagSymbols.js";import{BreakpointsOwner as pe}from"./BreakpointsOwner.js";import{DOMContainer as he}from"./DOMContainer.js";import{PopupView as de}from"./PopupView.js";import ue from"./View.js";import ce from"./ViewAnimation.js";import{stringFromViewingMode as ge,viewingModeFromString as me}from"./ViewingMode.js";import{GroundView3D as ye}from"./3d/GroundView3D.js";import{layerView3DImporter as fe}from"./3d/layerViewModuleImportUtils.js";import{importAnalysisViewModule as we}from"./3d/analysis/analysisViewModuleImportUtils.js";import{cleanupIntersectionUtils as ve}from"./3d/camera/intersectionUtils.js";import _e from"./3d/constraints/Constraints.js";import be from"./3d/environment/Environment.js";import{EnvironmentManager as Me}from"./3d/environment/EnvironmentManager.js";import Se from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as Ve}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as je}from"./3d/layers/graphics/Labeler.js";import Ce from"./3d/layers/i3s/I3SLodHandling.js";import{cleanupStageLayerElevationProvider as Te}from"./3d/layers/support/StageLayerElevationProvider.js";import{ScreenSizePerspective as Re}from"./3d/state/ScreenSizePerspective.js";import xe from"./3d/state/ViewState.js";import{ViewStateManager as Ae,cleanupViewStateManager as Oe}from"./3d/state/ViewStateManager.js";import{cleanupPointToPointAnimationController as Ee}from"./3d/state/controllers/PointToPointAnimationController.js";import{SceneIntersectionHelper as Le}from"./3d/state/helpers/SceneIntersectionHelper.js";import{cleanupNavigationUtils as He}from"./3d/state/utils/navigationUtils.js";import Ie from"./3d/support/Attribution3D.js";import{CombinedElevationProvider as Fe}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as Pe}from"./3d/support/debugFlags.js";import{getElevationAtPoint as De}from"./3d/support/ElevationProvider.js";import{toMap as Ue,hitTest as Ge}from"./3d/support/hitTest.js";import{popupHitTest as ze}from"./3d/support/popupHitTest.js";import{getDefaultQualityProfileName as We,getQualityProfileSettings as qe}from"./3d/support/QualityProfile.js";import ke from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as Be}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as Ne}from"./3d/support/ResourceController.js";import Qe from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as Ze}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as Ye}from"./3d/support/ViewSlice.js";import{PointsOfInterest as $e}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import Je from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as Ke,getTiledLayerInfo as Xe,checkIfTileInfoSupportedForView as et}from"./3d/terrain/terrainUtils.js";import{clearTilePerLayerInfo as tt}from"./3d/terrain/TilePerLayerInfo.js";import{cleanupTileRenderer as it}from"./3d/terrain/TileRenderer.js";import{Stage as rt}from"./3d/webgl-engine/Stage.js";import{olidEnabled as st}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{cleanupRenderOccluded as nt}from"./3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js";import{defaultTolerance as at}from"./3d/webgl-engine/lib/Intersector.js";import{cleanupShadowmap as ot}from"./3d/webgl-engine/lib/ShadowMap.js";import{terrainId as lt}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{cleanupEdgeProcessing as pt}from"./3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js";import ht from"./support/AnalysisViewManager.js";import{cleanupDrapedUtils as dt}from"./support/drapedUtils.js";import{occludeesSupported as ut}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as ct,createScreenPointFromSupportedEvent as gt}from"./support/screenUtils.js";import{isSpatialReferenceSupported as mt}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as yt,destroyTextureCompressionWorker as ft}from"./support/TextureCompressionHelper.js";import wt from"./ui/DefaultUI.js";import vt from"./ui/3d/DefaultUI3D.js";import _t from"../webscene/Environment.js";import{clearVNodeCache as bt}from"../widgets/support/vnodeCache.js";var Mt;const St=Symbol(),Vt=Symbol();let jt=class extends(pe(de(he(ue)))){static{Mt=this}constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=Ne(this),this.deconflictor=new Ve({view:this}),this.attribution3D=new Ie({view:this}),this.labeler=new je({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.basemapTerrain=null,this.elevationProvider=new Fe({view:this}),this._canvas=null,this.constraints=new _e,this._environment=new be,this.environmentManager=new Me,this.floors=new r,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new ht({importAnalysisViewModule:e=>we(e),view:this}),this.groundView=null,this.map=null,this._featureTileTreeClients=new f,this._featureTiles=null,this._featureTreeDebugger=null,this.state=new xe({view:this}),this.slice=new Ye,this.spatialReference=null,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new vt,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,G();const t=()=>this._updatingChanged();this.addHandles(o(h(()=>this.map?.allLayers,async e=>{try{await e.when()}catch{}finally{t()}}))),this.addHandles([w(()=>this.map?.allLayers,"after-changes",t,{onListenerAdd:t,onListenerRemove:t,sync:!0}),this.allLayerViews.on("after-changes",e=>this._updateUpdatingMonitors(e)),v(()=>this.scene,e=>e?.load().catch(()=>{}))]),this.inputManager=new Se({view:this}),this.stateManager=new Ae({view:this}),this.screenSizePerspective=new Re({view:this})}initialize(){if(has("enable-feature:esri-compress-textures")&&has("wasm-simd")){const e=yt(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new ye({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add(()=>this.qualitySettings.memoryLimit,e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)},_),this.updatingHandles.add(()=>this.qualitySettings.additionalCacheMemory,e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)},_),this.updatingHandles.add(()=>this.qualitySettings.frameRate??0,e=>V(e>0?1e3/Math.ceil(e):0),_),this.addHandles([v(()=>this.spatialReference,()=>this.notifyChange("clippingArea"),b),v(()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration}),()=>this._updateSlice(),b)])}destroy(){this.destroyed||(ft(this),this.updatingHandles.removeAll(),this.basemapTerrain?.clearHandles(),this.elevationProvider.destroy(),this.ui.removeAllHandles(),this.layerViewManager.clearHandles(),this.invalidate(),this.layerViewManager.clear(),this._set("analysisViewManager",d(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=d(this.sharedSymbolResources),this._set("labeler",d(this.labeler)),this._set("deconflictor",d(this.deconflictor)),this._resourceController=d(this._resourceController),this._set("stateManager",d(this.stateManager)),this._set("inputManager",d(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles("updatingMonitors"),this._set("environmentManager",d(this.environmentManager)),this._set("environment",d(this.environment)),this.groundView=d(this.groundView),this.slice.destroy(),this._updatingObjectsWithProgress.length=0,this._updatingObjects.length=0,this.ui?.destroy(),this._set("ui",null),this._set("renderCanvas",null),this._set("canvas",null),this._canvas=null,this.screenSizePerspective.destroy(),this.attribution3D.destroy())}get stage(){return this._stage}get renderSpatialReference(){return this.renderCoordsHelper?.spatialReference}get groundSpatialReference(){return this.basemapTerrain?.spatialReference}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get animation(){return this.state?.animation}get overlayManager(){return this.basemapTerrain?.overlayManager}get camera(){return this.stateManager?.camera}set camera(e){this.stateManager&&(this.stateManager.camera=e)}get contentCamera(){return this.stateManager?.contentCamera}set contentCamera(e){this.stateManager&&(this.stateManager.contentCamera=e)}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get canvas(){return this._canvas}get center(){return this.stateManager?.center}set center(e){this.stateManager&&(this.stateManager.center=L(q,e))}get clippingArea(){if("global"===this.viewingMode)return null;const e=this.map;let t=this._userClippingArea||u(e,"clippingArea");return!this._userClippingArea&&!u(e,"clippingEnabled")||null==t?(this._clippingArea=null,null):t instanceof z?this.spatialReference&&(t=Ct(t,this.spatialReference),null==t)?(p.getLogger(this).error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(t=t.clone(),null==t.intersection(this._groundAndLayersExtent)&&(t.xmin=t.xmax,t.ymin=t.ymax),t.zmin=void 0,t.zmax=void 0,t.equals(this._clippingArea)||(this._clippingArea=t),this._clippingArea):(p.getLogger(this).error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&null!=e?p.getLogger(this).error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(1===this.state.viewingMode)return null;const e=this.renderSpatialReference,t=this.dataExtent;return null==t||null==e||t.spatialReference.equals(e)?t:Ct(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent;const t=this.spatialReference||N.WGS84,i=Ct(this.clippingArea,t);null!=i&&(e=null!=e?e.intersection(i):i);const r=this._get("dataExtent");return null!=e&&e.equals(r)?r:e}get _groundAndLayersExtent(){const e=this.spatialReference||N.WGS84;let t;const i=i=>{const r=Ct(i,e);null!=r&&(null!=t?t.union(r):t=r.clone())},{groundView:r}=this,s=r?.spatialReference,n=r?.fullGroundExtent;s&&n&&i(new z({xmin:n[0],ymin:n[1],zmin:0,xmax:n[2],ymax:n[3],zmax:0,spatialReference:s}));const a=e=>{null==e.fullExtent||"graphics"===e.type&&e.internal||i(e.fullExtent)};if(this.map?.allLayers.forEach(e=>a(e)),null==t)return null;t.hasZ?(t.zmin=Math.min(0,t.zmin??0),t.zmax=Math.max(0,t.zmax??0)):(t.zmin=0,t.zmax=0);const o=this._get("_groundAndLayersExtent");return t.equals(o)?o:t}get environment(){return this._environment}set environment(e){if(this._environment===e)return;const{_environment:t}=this;this._environment=null,t?.destroy(),this._environment=e,this.notifyChange("environment")}castEnvironment(e){return e?e instanceof be?e:e instanceof _t?this.environment?.cloneWithWebsceneEnvironment(e)??be.fromWebsceneEnvironment(e):L(be,e):new be}get extent(){return this.stateManager?.extent}set extent(e){this.stateManager&&(this.stateManager.extent=e)}get screenCenter(){return this.stateManager?.screenCenter}get frustum(){return this.stateManager?.frustum}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.groundView?.layerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get _layerToLayerviewMapping(){return Mt._layerToLayerview}static{this._layerToLayerview=ue._layerToLayerview.concat([["view.map.ground.layers","view.groundView.layerViews"]])}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||(this.toolViewManager?.interacting??!1)}get stationary(){return!this.animation&&!this.resizing&&(this.state?.stationary??!0)}get navigating(){return this.state?.navigating??!1}get scene(){return this.map&&le in this.map?this.map:null}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get featureTiles(){return this._featureTiles}set qualityProfile(e){const t=qe(e);t&&this._get("qualityProfile")!==e&&(this.qualitySettings=new ke(t),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||We()}_updateSlice(){null!=this.stage&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return!!this.viewingMode&&!!this.stateManager?.preinit(this.spatialReference)}get resolution(){const{scale:e,spatialReference:t}=this;return t?F(()=>X(e,t)):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get terrainLevel(){const e=this.basemapTerrain?.tilingScheme,t=this.scale;if(!e||!t)return null;const i=e.levelAtScale(t)+this.qualitySettings.tiledSurface.lodBias,r=e.getMaxLod();return i<=0?null:Math.max(0,Math.min(i,r||1/0))}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?W.deriveUnitFromSR(e,this.spatialReference):null}get alphaCompositingEnabled(){return this._get("alphaCompositingEnabled")}set alphaCompositingEnabled(e){this._stage&&p.getLogger(this).warn("alphaCompositingEnabled cannot be changed after the view has become ready"),this._set("alphaCompositingEnabled",e)}get updating(){if(this.destroying||this.destroyed)return!1;let e=0,t=this.layerViewManager.updating,i=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach(r=>{if(r.isFulfilled()){if(r.updating){if(t=!0,r.suspended||Ke(r))return;++i,e+=r.updatingProgress}}else++i});for(const s of this._updatingObjects)if(null!=s&&s.updating){const t=.1;i+=t,e+=.5*t}for(const s of this._updatingObjectsWithProgress)null!=s&&s.updating&&(++i,e+=s.updatingProgress);const r=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||i>0||this.updatingHandles.updating||!this.ready||!this.stationary||r||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some(e=>!e.isFulfilled())),t?(this._numUpdating=Math.max(i,this._numUpdating),e+=this._numUpdating-i):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=t?0:1,this._get("updatingProgress")!==e){const i=performance.now();if(e<1){const t=Math.min((i-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set("updatingProgress",e),this._lastUpdateTime=t&&e<1?i:0}return t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager,this.focusAreasView]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get viewingMode(){const e=this._predeterminedViewingMode;if(null!=e)return ge(e);const t=this.spatialReference;return t?null!=this.defaultsFromMap?.viewingMode&&t.equals(this.defaultsFromMap.spatialReference)?ge(this.defaultsFromMap.viewingMode):mt(t,1)?"global":"local":"global"}set viewingMode(e){this.ready?p.getLogger(this).error("#viewingMode","viewingMode cannot be set once view is ready"):this._overrideIfSome("viewingMode",e)}get viewpoint(){return this.stateManager?.viewpoint}set viewpoint(e){this.stateManager&&(this.stateManager.viewpoint=e)}get visibleArea(){return this.stateManager?.visibleArea}get zoom(){return this.stateManager.zoom}set zoom(e){this.stateManager&&(this.stateManager.zoom=e)}get resourceController(){return this._resourceController}get quality(){return this._resourceController?.memoryController?.memoryFactor??1}get resolutionScale(){return Math.sqrt(Math.min(1,this.quality/.75))}get performanceInfo(){return new Qe(this)}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return p.getLogger(this).error("#toMap()","Scene view cannot be used before it is ready"),null;const i=ct(e)?gt(this,e):e;return Ue(this,i,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return p.getLogger(this).error("#toScreen()","Scene view cannot be used before it is ready"),null;let t=e;return null==e.z&&(t=At,t.x=e.x,t.y=e.y,t.z=De(this.elevationProvider,e)??0,t.spatialReference=e.spatialReference),Y(t,Tt,this.renderSpatialReference),this.state.camera.projectToScreen(Tt,Rt),C(Rt[0],Rt[1])}pixelSizeAt(e,t){if(!this.ready)return p.getLogger(this).error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null;if(!e)return 0;const i=this.renderSpatialReference;Y(e,Tt,i);const r=this.state.camera.computeScreenPixelSizeAt(Tt);return t&&i!==t?r*x(i)/x(t):r}overlayPixelSizeInMapUnits(e){return this.overlayManager?.overlayPixelSizeInMapUnits(e,()=>this.pixelSizeAt(e))??1}hitTest(e,t){if(!this.ready)return p.getLogger(this).error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=ct(e)?gt(this,e):e;return Ge(this,i,t,this._defaultHitTestOptions)}async popupHitTest(e){return ze(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async zoomIn(){if(this.canZoomIn)return c(this.goTo({zoomFactor:2}))}async zoomOut(){if(this.canZoomOut)return c(this.goTo({zoomFactor:.5}))}async whenAnalysisView(e){if(null==e.parent)throw new n("view:no-analysisview-for-analysis","The analysis does not exist in view.analyses",{analysis:e});switch(e.parent.type){case"line-of-sight":case"dimension":case"viewshed":return(await this.whenLayerView(e.parent)).whenAnalysisView();default:return this.analysisViewManager.whenAnalysisView(e)}}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=(await this.stage.renderView.takeScreenshot(t))[0];return(await import("./support/screenshotUtils.js")).encode(i,t,this._pixelFormat())}async _takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=(await this.stage.renderView.takeScreenshot(t))[0];return(await import("./support/screenshotUtils.js")).encodeData(i,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){const t=await this._completeSettings(e);t.olidColor=!0,await this.whenReady();const i=await this.stage.renderView.takeScreenshot(t),{encodeData:r}=await import("./support/screenshotUtils.js");return[r(i[0],this._pixelFormat()),r(i[1],this._pixelFormat())]}async _completeSettings(e){const{toRenderSettings:t,screenshotSuperSampleSettings:i}=await import("./support/screenshotUtils.js"),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,i(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!st())throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true");const{encode:t}=await import("./support/screenshotUtils.js"),i=await this._completeSettings(e);i.olidColor=!0,await this.whenReady();const r=await this.stage.renderView.takeScreenshot(i),s=t(r[0],i,this._pixelFormat()),a=await this._completeSettings(e);a.format="png";return[s,t(r[1],a,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){const e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true")}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}getAttributionItems(){return super.getAttributionItems().concat(this.attribution3D.attributionItems)}importLayerView(e){return fe.importLayerView(e)}hasLayerViewModule(e){return fe.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.scene?.initialViewProperties?.spatialReference||this.defaultsFromMap?.spatialReference||this.defaultsFromMap?.ready&&this._initialDefaultSpatialReference||null}getSurface(){return this.surface}get _predeterminedViewingMode(){const e=this._isOverridden("viewingMode")?this._get("viewingMode"):this.scene?.initialViewProperties?.viewingMode;return null!=e?me(e):null}getSpatialReferenceSupport(e,t){const i=this._predeterminedViewingMode;if(null!=i)return this._validateSpatialReferenceForViewingMode(e,t,i)?{constraints:this._makeSpatialReferenceConstraints(e,t,i)}:null;const r=this._validateSpatialReferenceForViewingMode(e,t,2),s=this._validateSpatialReferenceForViewingMode(e,t,1);return r||s?r&&s?{constraints:this._makeSpatialReferenceConstraints(e,t,null)}:r?{constraints:this._makeSpatialReferenceConstraints(e,t,2)}:{constraints:this._makeSpatialReferenceConstraints(e,t,1)}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!mt(e,i)&&(null==t||(!!te(t)||(!ie(t)||null!=Xe(t,e,i))&&(!re(t)||1!==i)))}_makeSpatialReferenceConstraints(e,t,i){if(null==t)return[{spatialReference:e,viewingMode:i}];const{isWebMercator:r,isWGS84:s}=e;if(te(t)&&(r||s)){return!s||2===i||null===et(t.tileInfo,t.fullExtent,e,1)?[{spatialReference:e,viewingMode:i},{spatialReference:N.WebMercator,viewingMode:i}]:[{spatialReference:r?N.WGS84:N.WebMercator,viewingMode:i}]}return ie(t)||re(t)||!r&&!s?ie(t)&&r&&1!==i?[{spatialReference:e,viewingMode:i},{spatialReference:N.WGS84,viewingMode:2}]:[{spatialReference:e,viewingMode:i}]:[{spatialReference:e,viewingMode:i},{spatialReference:r?N.WGS84:N.WebMercator,viewingMode:i}]}_validateSpatialReference(e){const t=null!=this.getSpatialReferenceSupport(e),i=this._predeterminedViewingMode;return t||(null!=i?p.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${ge(i)} viewing mode.`):e.isGeographic&&p.getLogger(this).warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}trackGraphicState(e){if(!e.graphic)return p.getLogger(this).error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let i=null,r=!1;const s=t=>{!r&&null!=t&&"processor"in t&&"graphics-3d"===t.processor?.type&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return null!=t?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then(e=>s(e),()=>{}).catch(()=>{}),l(()=>{r=!0,null!=i&&(i.remove(),i=null)})}maskOccludee(e){if(!e)return p.getLogger(this).error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let i=null,r=!1;const s=t=>{!r&&null!=t&&ut(t)&&(i=t.maskOccludee(e))};return null!=t?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then(e=>s(e),()=>{}).catch(()=>{}),l(()=>{r=!0,null!=i&&(i.remove(),i=null)})}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter(e=>"media-3d"!==e.type).find(t=>t.layer===e.layer):null}graphicChanged(e){null!=this.graphicsView&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await M(()=>this.graphicsView),this.graphicsView):e.layer&&this.map?t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise((t,i)=>{const r=this.map.allLayers.on("change",s=>{s.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))})}):this.whenLayerView(e.layer):null}enableFeatureTiles(){const e=Symbol();return this._featureTileTreeClients.add(e),l(()=>this._featureTileTreeClients.delete(e))}async _importModule(e,t){const i=new AbortController;this._importControllers.set(e,i),this._updatingChanged();try{const r=await Ot[e]();if(t&&(g(this),m(i.signal),await t(i.signal)),this.destroyed)throw y();return m(i.signal),r}catch{return null}finally{this._importControllers.delete(e),this._updatingChanged()}}_abortImport(e){this._importControllers.get(e)?.abort(),this._importControllers.delete(e),this._updatingChanged()}_initBasemapTerrain(){this._set("basemapTerrain",new Je({view:this})),this.elevationProvider.register(0,this.basemapTerrain)}_exitBasemapTerrain(){const{basemapTerrain:e,elevationProvider:t}=this;e&&(this._set("basemapTerrain",null),t.unregister(e),e.destroy())}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new $e({view:this})),this.addHandles([this.updatingHandles.add(()=>Pe.FEATURE_TILE_TREE_SHOW_TILES,e=>{e&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then(({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&Pe.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))}):e||(this._featureTreeDebugger=d(this._featureTreeDebugger))},S),this.updatingHandles.add(()=>({basemapExtent:this.groundView?.groundExtent,basemapSpatialReference:this.groundView?.spatialReference,clippingArea:this.clippingArea,featureTiles:this._featureTiles}),({basemapExtent:e,basemapSpatialReference:t,clippingArea:i,featureTiles:r})=>{if(!r)return;const s=!!e;if(i||s)if(s&&t){const s=e&&t?k($(e,t),this.spatialReference):null;r.filterExtent=i?i.intersection(s):s}else r.filterExtent=i;else r.filterExtent=null},S),this.updatingHandles.add(()=>this._featureTileTreeClients.size>0,e=>{e?this.updatingHandles.consumePromise(this._ensureFeatureTileTree()):this._featureTiles=d(this._featureTiles)},b)],St),this.stateManager.init()}async _ensureFeatureTileTree(){if(this._featureTiles||this._importControllers.has("FeatureTileTree3D"))return;const e=(await this.updatingHandles.addPromise(this._importModule("FeatureTileTree3D")))?.FeatureTileTree3D;e&&(this._featureTiles=new e({renderCoordsHelper:this.renderCoordsHelper,pointsOfInterest:this.pointsOfInterest,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}),this._updatingChanged())}_exitTerrain(){this.stateManager.exit(),this.removeHandles(Vt),this.removeHandles(St),this._featureTiles=d(this.featureTiles),this._set("pointsOfInterest",d(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem()}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference,t=this.state.isGlobal,i=K(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",Be.create(this.state.viewingMode,i)),t||this.addHandles(v(()=>this.groundView?.groundExtent,e=>{const t=this.renderCoordsHelper.spatialReference;null==e||0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!Z(e,this.groundView.spatialReference,xt,t)||(this.renderCoordsHelper.extent=xt)},b),Vt),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(at/this.renderCoordsHelper.unitInMeters))}else this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.removeHandles(Vt),this._set("renderCoordsHelper",null)}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){null!=e&&4===e.type||(this.removeHandles("updatingMonitors"),this.allLayerViews.forEach(e=>{e.destroyed||(this.addHandles(v(()=>[e.updating,e.updatingProgress],()=>this._updatingChanged(),b),"updatingMonitors"),e.when(()=>this._updatingChanged(),()=>this._updatingChanged()))}),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,i){if(!this.overlay||!this.overlay.hasVisibleItems)return i;const r=e.getContext("2d",{willReadFrequently:!0});return r.putImageData(i,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,i.width,i.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled,canvas:this.renderCanvas,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,i)=>this._renderScreenshotOverlay(e,t,i)}},t=new Le(this.state.viewingMode,e=>this.stage.layers.forEach(e),this);this._set("sceneIntersectionHelper",t);const i=s(this.surface);this._stage=new rt({view:this,options:e,container:i}),this.notifyChange("stage"),this._updateSlice(),this.addHandles([this.on("pointer-move",()=>this.stage?.renderer.resetAnimation()),a(this.stage.renderView.canvas,"webglcontextlost",e=>{this.fatalError=new n("webgl-context-lost",e.statusMessage||"WebGL context lost")})],"stage"),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(at/this.renderCoordsHelper.unitInMeters),this._set("canvas",this.stage.renderView.canvas)}_exitStage(){this.sceneIntersectionHelper?.destroy(),this._set("sceneIntersectionHelper",null),this._stage=d(this.stage),this._set("stage",null),this.removeHandles("stage"),this._set("canvas",null)}_initSurface(){this._exitSurface(),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new Ze({view:this,resourceController:this._resourceController})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitTerrain(),this._exitStage())}async _ensureGraphicsView(){if(this.graphicsView||this._importControllers.has("GraphicsView3D")||0===this.graphics.length)return;this.removeHandles("GraphicsView3D");const e=(await this.updatingHandles.addPromise(this._importModule("GraphicsView3D",e=>M(()=>this.groundView?.ready,e))))?.default;e&&this._set("graphicsView",new e({view:this,getGraphics:()=>this.graphics})),this._updatingChanged()}_disposeGraphicsView(){this._abortImport("GraphicsView3D"),this.removeHandles("GraphicsView3D"),this.graphicsView&&(this.removeHandles(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_disposeFocusAreasView(){this._abortImport("FocusAreasView"),this.removeHandles("FocusAreasView"),this.focusAreasView=d(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has("FocusAreasView")||0===e)return;this.removeHandles("FocusAreasView");const t=(await this.updatingHandles.addPromise(this._importModule("FocusAreasView")))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){1===me(this.viewingMode)&&(this._clippingArea=null),this._initSurface(),this._set("ready",!0),this.addHandles(w(()=>this.graphics,"after-changes",()=>this._ensureGraphicsView()),"GraphicsView3D"),this._ensureGraphicsView(),this.addHandles(this.updatingHandles.add(()=>this.map?.focusAreas?.areas.length??0,e=>this._ensureFocusAreasView(e),{initial:!0}),"FocusAreasView");const e=this.scene?.initialViewProperties??null,t=e?.environment;t&&(this._overrideDefaultEnvironmentOnly?I(this.environment,t):this.environment=this.environment.cloneWithWebsceneEnvironment(t)),this.timeExtent=e?.timeExtent,e?.analyses.applyTo(this),this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const i=this._resolveWhenReady;this._resolveWhenReady=[],i.forEach(e=>e(this))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set("ready",!1)}get _defaultToMapOptions(){const e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(lt);for(const t of this.allLayerViews)(se(t.layer)||ne(t.layer))&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){const e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(lt);for(const t of this.allLayerViews)se(t.layer)&&t.layer.opacity<1&&e.exclude.add(t.uid);return e}static{this.type="3d"}static clearStatics(){bt(),P(),R(),pt(),Oe(),ve(),Te(),Q(),dt(),oe(),it(),ot(),Ee(),He(),U(),j(),nt(),tt(),Ce.cleanupI3SLodHandling(),ae.cleanupTilemapCache(),xe.cleanupViewstate(),Je.cleanupTerrainSurface()}};function Ct(e,t){return null!=e&&B(e.spatialReference,t)?k(e,t):null}e([A()],jt.prototype,"_userClippingArea",void 0),e([A()],jt.prototype,"_resourceController",void 0),e([A()],jt.prototype,"stage",null),e([A({readOnly:!0})],jt.prototype,"deconflictor",void 0),e([A({readOnly:!0})],jt.prototype,"labeler",void 0),e([A({type:ce,readOnly:!0})],jt.prototype,"animation",null),e([A({readOnly:!0})],jt.prototype,"basemapTerrain",void 0),e([A({readOnly:!0})],jt.prototype,"overlayManager",null),e([A({readOnly:!0})],jt.prototype,"elevationProvider",void 0),e([A()],jt.prototype,"camera",null),e([A({type:t})],jt.prototype,"contentCamera",null),e([A({readOnly:!0})],jt.prototype,"canvas",null),e([A({type:q,useTypeForAutocast:!1})],jt.prototype,"center",null),e([A({type:z})],jt.prototype,"clippingArea",null),e([A({type:_e,nonNullable:!0})],jt.prototype,"constraints",void 0),e([A({type:z,readOnly:!0})],jt.prototype,"renderDataExtent",null),e([A({readOnly:!0})],jt.prototype,"tileInfo",null),e([A({type:z,readOnly:!0})],jt.prototype,"dataExtent",null),e([A({type:z,readOnly:!0})],jt.prototype,"_groundAndLayersExtent",null),e([A({type:be})],jt.prototype,"environment",null),e([O("environment")],jt.prototype,"castEnvironment",null),e([A({readOnly:!0})],jt.prototype,"environmentManager",void 0),e([A({type:z})],jt.prototype,"extent",null),e([A({type:r})],jt.prototype,"floors",void 0),e([A()],jt.prototype,"screenCenter",null),e([A()],jt.prototype,"frustum",null),e([A({type:Number,readOnly:!0})],jt.prototype,"fullOpacity",void 0),e([A({readOnly:!0})],jt.prototype,"graphicsView",void 0),e([A()],jt.prototype,"analysisViewManager",void 0),e([A()],jt.prototype,"groundView",void 0),e([A({readOnly:!0})],jt.prototype,"layerviewCollections",null),e([A({type:Boolean})],jt.prototype,"initialExtentRequired",null),e([A()],jt.prototype,"defaultsFromMapSettings",null),e([A()],jt.prototype,"interacting",null),e([A()],jt.prototype,"stationary",null),e([A()],jt.prototype,"navigating",null),e([A()],jt.prototype,"map",void 0),e([A()],jt.prototype,"padding",null),e([A({type:$e,readOnly:!0})],jt.prototype,"pointsOfInterest",void 0),e([A()],jt.prototype,"_featureTiles",void 0),e([A()],jt.prototype,"featureTiles",null),e([A()],jt.prototype,"_featureTreeDebugger",void 0),e([A({constructOnly:!0})],jt.prototype,"deactivatedWebGLExtensions",void 0),e([A({constructOnly:!0})],jt.prototype,"debugWebGLExtensions",void 0),e([A({constructOnly:!0})],jt.prototype,"renderCanvas",void 0),e([A({constructOnly:!0})],jt.prototype,"state",void 0),e([A()],jt.prototype,"screenSizePerspective",void 0),e([A({readOnly:!0})],jt.prototype,"inputManager",void 0),e([A({readOnly:!0})],jt.prototype,"stateManager",void 0),e([A({type:["low","medium","high"]})],jt.prototype,"qualityProfile",null),e([A({type:ke,get(){let e=this._get("qualitySettings");if(!e){const t=qe(this.qualityProfile);e=new ke(t)}return e}})],jt.prototype,"qualitySettings",void 0),e([A()],jt.prototype,"slice",void 0),e([A({readOnly:!0})],jt.prototype,"typeSpecificPreconditionsReady",null),e([A({readOnly:!0})],jt.prototype,"renderCoordsHelper",void 0),e([A({readOnly:!0})],jt.prototype,"sceneIntersectionHelper",void 0),e([A({type:Number,readOnly:!0})],jt.prototype,"resolution",null),e([A({type:Number})],jt.prototype,"scale",null),e([A({readOnly:!0,type:Number})],jt.prototype,"terrainLevel",null),e([A()],jt.prototype,"heightModelInfo",null),e([A({type:N})],jt.prototype,"spatialReference",void 0),e([A({type:Boolean,value:!1})],jt.prototype,"alphaCompositingEnabled",null),e([A({constructOnly:!0})],jt.prototype,"preserveDrawingBufferEnabled",void 0),e([A({type:Boolean})],jt.prototype,"supersampleScreenshotsEnabled",void 0),e([A({readOnly:!0})],jt.prototype,"type",void 0),e([A(),O(e=>e instanceof wt?e:H(vt,e))],jt.prototype,"ui",void 0),e([A({type:Boolean,readOnly:!0})],jt.prototype,"updating",null),e([A()],jt.prototype,"_updatingObjects",null),e([A()],jt.prototype,"_updatingObjectsWithProgress",null),e([A({type:Number,readOnly:!0})],jt.prototype,"updatingProgress",void 0),e([A({type:["global","local"]})],jt.prototype,"viewingMode",null),e([A({type:i})],jt.prototype,"viewpoint",null),e([A({readOnly:!0})],jt.prototype,"visibleArea",null),e([A({type:Number})],jt.prototype,"zoom",null),e([A({readOnly:!0})],jt.prototype,"quality",null),e([A({readOnly:!0})],jt.prototype,"resolutionScale",null),e([A()],jt.prototype,"focusAreasView",void 0),e([A()],jt.prototype,"_defaultToMapOptions",null),e([A()],jt.prototype,"_defaultHitTestOptions",null),jt=Mt=e([E("esri.views.SceneView")],jt);const Tt=D(),Rt=T(),xt=J(),At=ee(0,0,0,N.WebMercator),Ot={GraphicsView3D:()=>import("./3d/layers/GraphicsView3D.js"),FocusAreasView:()=>import("./3d/FocusAreasView.js"),FeatureTileTree3D:()=>import("./3d/layers/support/FeatureTileTree3D.js")},Et=jt;export{Et as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{watch as e,syncAndInitial as n}from"../../../core/reactiveUtils.js";import{property as i,subclass as r}from"../../../core/accessorSupport/decorators.js";import{dot as o,cross as s}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{create as c}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{calculateBezierCurveTangent as a}from"../../../geometry/support/curves/bezierCurveUtils.js";import{interpolateCircle as p}from"../../../geometry/support/curves/circleUtils.js";import{calculateCircularArcTangent as l}from"../../../geometry/support/curves/circularArcUtils.js";import{isCoordinate as u,isCircularArc as f,isEllipticArc4 as h,isEllipticArc7 as d,isBezierCurve as m}from"../../../geometry/support/curves/curveUtils.js";import{deriveCircleFromEllipticArc4 as v,calculateEllipticArc4Tangent as _}from"../../../geometry/support/curves/ellipticArc4Utils.js";import{calculateEllipticArc7Tangent as L}from"../../../geometry/support/curves/ellipticArc7Utils.js";import{pointNear as g}from"../../../layers/graphics/dehydratedFeatureComparison.js";import{PluginBase as P}from"./PluginBase.js";const A=Symbol("left-vertex"),y=Symbol("left-left-vertex"),S=Symbol("right-vertex"),x=c();let w=class extends P{constructor(){super(...arguments),this.placementState="placing-end"}get _availableAnchorCount(){return this._curveLeftVertex&&this._curveLeftLeftVertex?2:this._curveLeftVertex||this._curveLeftLeftVertex?1:0}get _automaticRestart(){return!this.ownPlacedLeftAnchor&&!this.ownPlacedLeftLeftAnchor}start(t,i){super.start(t,i);if(this._session.preserveSharedRedoAfterOperation=!0,this.ownPlacedLeftAnchor=i?.ownPlacedLeftAnchor??null,this.ownPlacedLeftLeftAnchor=i?.ownPlacedLeftLeftAnchor??null,this._refreshAnchorInfo(),this._restoreOwnPlacedAnchorsIfNeeded(),this.placementState=this._resolveState(i?.placementState),this.curveEndPoint="placing-end"===this.placementState?i?.curveEndPoint??null:null,!this._primaryInteractiveHandle){const i="primary";this._primaryInteractiveHandle=t.createInteractiveHandle({defaultCaptureMode:"capture-always",role:i,snappingEnabled:!0}),this.addHandles([e(()=>this._primaryInteractiveHandle?.outputMapPosition??t.positionOfLastUserInput,t=>{t&&!this._isComplete&&this.updateGeometry(t)},n)],this._ownHandlesKey)}this._session.automaticRestart=this._automaticRestart;const r=this._primaryInteractiveHandle?.outputMapPosition??t.positionOfLastUserInput;r&&this.updateGeometry(r)}updateGeometry(t){if(!this._isComplete)switch(this.placementState){case"placing-left-left":return void this._session?.appendOrReplacePoint(y,t);case"placing-left":return void this._session?.appendOrReplacePoint(A,t);case"placing-end":return this.curveEndPoint=t,void this._updateStagedGeometry()}}async completeStep(){if(!this._primaryInteractiveHandle?.outputMapPosition||this._isComplete||!this._session)return;if(!this._isCurrentStepValid())return;const t=this._session.peekUndoStep(),e=this.suspend();if(e){t?t.placementState===e.placementState&&(t.curveEndPoint=e.curveEndPoint,t.ownPlacedLeftAnchor=e.ownPlacedLeftAnchor,t.ownPlacedLeftLeftAnchor=e.ownPlacedLeftLeftAnchor):this._session.pushUndoStep(e);try{switch(this._session.preserveSharedRedoAfterOperation=!1,this.placementState){case"placing-left-left":this._curveLeftLeftVertex=this._session.getInformationAboutPoint(-1,-1),this.ownPlacedLeftLeftAnchor=this._curveLeftLeftVertex,this._session.groupGeometryChanges(),this._applyState("placing-left");break;case"placing-left":this._curveLeftVertex=this._session.getInformationAboutPoint(-1,-1),this.ownPlacedLeftAnchor=this._curveLeftVertex,this._session.groupGeometryChanges(),this._applyState("placing-end");break;case"placing-end":this._updateStagedGeometry(),this._commitArcSegment()}}finally{this._session.preserveSharedRedoAfterOperation=!0}this._session.pushUndoStep(this.suspend())}}suspend(){const{curveEndPoint:t,ownPlacedLeftAnchor:e,ownPlacedLeftLeftAnchor:n,placementState:i}=this;return{curveEndPoint:t,ownPlacedLeftAnchor:e,ownPlacedLeftLeftAnchor:n,placementState:i}}_applyState(t){this.placementState=t,this._session.automaticRestart=this._automaticRestart}_resolveState(t){const e=this._availableAnchorCount;switch(t){case"placing-left-left":case"placing-end":default:return e>=2?"placing-end":1===e?"placing-left":"placing-left-left";case"placing-left":return e>=2?"placing-end":0===e?"placing-left-left":"placing-left"}}_restoreOwnPlacedAnchorsIfNeeded(){const t=this._session;if(!t)return;const e=this.ownPlacedLeftLeftAnchor?.point;e&&!this._hasAnchorPoint(e)&&(t.appendOrReplacePoint(y,e),t.groupGeometryChanges(),this._refreshAnchorInfo());const n=this.ownPlacedLeftAnchor?.point;n&&!this._hasAnchorPoint(n)&&(t.appendOrReplacePoint(A,n),t.groupGeometryChanges(),this._refreshAnchorInfo())}_hasAnchorPoint(t){const e=this._curveLeftVertex?.point,n=this._curveLeftLeftVertex?.point;return!!(e&&g(e,t)||n&&g(n,t))}_refreshAnchorInfo(){const t=this._session;if(!t)return this._curveLeftVertex=null,void(this._curveLeftLeftVertex=null);const e=t.lastPointAddedBySession?.pointIndex,n=null!=e&&e>=2?t.getInformationAboutPoint(e-1,-1):null,i=null!=e&&e>=2?t.getInformationAboutPoint(e-2,-1):null;if(n?.point&&i?.point)return this._curveLeftVertex=n,void(this._curveLeftLeftVertex=i);this._curveLeftVertex=t.getInformationAboutPoint(-1,-1),this._curveLeftLeftVertex=t.getInformationAboutPoint(-2,-1)}_isCurrentStepValid(){const t=this._session;if(!t)return!1;if("placing-left-left"===this.placementState){const e=t.getInformationAboutPoint(-1,-1)?.point,n=t.getInformationAboutPoint(-2,-1)?.point;return!!e&&!(n&&g(e,n))}if("placing-left"===this.placementState){const e=t.getInformationAboutPoint(-1,-1)?.point,n=t.getInformationAboutPoint(-2,-1)?.point;return!(!e||!n)&&!g(e,n)}if("placing-end"===this.placementState){if(!this.curveEndPoint||!this.curveDefinition)return!1;this._refreshAnchorInfo();const t=this._curveLeftVertex?.point;return!!t&&!g(this.curveEndPoint,t)}return!0}_updateStagedGeometry(){const{_session:t,_isComplete:e,curveEndPoint:n}=this;if(e||!t||!n)return;if(this._refreshAnchorInfo(),!this._curveLeftVertex||!this._curveLeftLeftVertex)return void(this.curveDefinition=null);const i=this._curveLeftVertex.point,r=b(this._curveLeftVertex,this._curveLeftLeftVertex);if(!r||!i)return void(this.curveDefinition=null);const c=r,a=[n.x,n.y],l=[a[0]-i.x,a[1]-i.y],u=I([i.x,i.y],a,c);if(!u)return void(this.curveDefinition=null);const f={a:[a,u,o(c,l)<0?0:1,s(x,c,l)[2]>0?0:1]},h=v([i.x,i.y],f),d=p(h,.5);this.curveDefinition={c:[a,d]},this._session?.appendOrReplaceCurve(S,this.curveDefinition)}_commitArcSegment(){this.curveEndPoint&&this.curveDefinition&&(this._isComplete=!0,this._context?.requestComplete())}};function I([t,e],[n,i],[r,o]){const s=n-t,c=i-e,a=s*s+c*c,p=-o,l=r,u=p*s+l*c;if(V(u*u,a))return null;const f=a/(2*u);return[t+f*p,e+f*l]}function V(t,e){return t<1e-8*e}function b(t,e){if(!t.point||!e.point)return null;const n=t.curveInfo,i=[e.point.x,e.point.y];if(!n||u(n)){return C([t.point.x,t.point.y],i)}return f(n)?l(i,n):h(n)?_(i,n):d(n)?L(i,n):m(n)?a(i,n):null}function C(t,e){return[t[0]-e[0],t[1]-e[1]]}t([i()],w.prototype,"_primaryInteractiveHandle",void 0),t([i()],w.prototype,"_curveLeftVertex",void 0),t([i()],w.prototype,"_curveLeftLeftVertex",void 0),t([i()],w.prototype,"_availableAnchorCount",null),t([i()],w.prototype,"_automaticRestart",null),t([i()],w.prototype,"curveDefinition",void 0),t([i()],w.prototype,"curveEndPoint",void 0),t([i()],w.prototype,"ownPlacedLeftLeftAnchor",void 0),t([i()],w.prototype,"ownPlacedLeftAnchor",void 0),t([i()],w.prototype,"placementState",void 0),w=t([r("esri.views.draw.plugins.TangentArcSegmentPlugin")],w);export{w as TangentArcSegmentPlugin,I as centerFromTwoPointsAndTangent};
2
+ import{__decorate as t}from"tslib";import{watch as e,syncAndInitial as n}from"../../../core/reactiveUtils.js";import{property as i,subclass as r}from"../../../core/accessorSupport/decorators.js";import{dot as o,cross as s}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{create as c}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{calculateBezierCurveTangent as a}from"../../../geometry/support/curves/bezierCurveUtils.js";import{interpolateCircle as p}from"../../../geometry/support/curves/circleUtils.js";import{calculateCircularArcTangent as l}from"../../../geometry/support/curves/circularArcUtils.js";import{isCoordinate as u,isCircularArc as f,isEllipticArc4 as h,isEllipticArc7 as d,isBezierCurve as m}from"../../../geometry/support/curves/curveUtils.js";import{deriveCircleFromEllipticArc4 as v,calculateEllipticArc4Tangent as _}from"../../../geometry/support/curves/ellipticArc4Utils.js";import{calculateEllipticArc7Tangent as L}from"../../../geometry/support/curves/ellipticArc7Utils.js";import{pointNear as g}from"../../../layers/graphics/dehydratedFeatureComparison.js";import{PluginBase as A}from"./PluginBase.js";const y=Symbol("left-vertex"),P=Symbol("left-left-vertex"),S=Symbol("right-vertex"),x=c();let w=class extends A{constructor(){super(...arguments),this.placementState="placing-end"}get _availableAnchorCount(){return this._curveLeftVertex&&this._curveLeftLeftVertex?2:this._curveLeftVertex||this._curveLeftLeftVertex?1:0}get _automaticRestart(){return!this.ownPlacedLeftAnchor&&!this.ownPlacedLeftLeftAnchor}start(t,i){super.start(t,i);this._session.preserveSharedRedoAfterOperation=!0,this.ownPlacedLeftAnchor=i?.ownPlacedLeftAnchor,this.ownPlacedLeftLeftAnchor=i?.ownPlacedLeftLeftAnchor,this._refreshAnchorInfo(),this._restoreOwnPlacedAnchorsIfNeeded(),this.placementState=this._resolveState(i?.placementState),this.curveEndpoint="placing-end"===this.placementState?i?.curveEndpoint:null,this._primaryInteractiveHandle||(this._primaryInteractiveHandle=t.createInteractiveHandle({defaultCaptureMode:"capture-always",role:"primary",snappingEnabled:!0}),this.addHandles([e(()=>this._primaryInteractiveHandle?.outputMapPosition??t.positionOfLastUserInput,t=>{t&&!this._isComplete&&this.updateGeometry(t)},n)],this._ownHandlesKey)),this._session.automaticRestart=this._automaticRestart;const r=this._primaryInteractiveHandle?.outputMapPosition??t.positionOfLastUserInput;r&&this.updateGeometry(r)}updateGeometry(t){if(!this._isComplete)switch(this.placementState){case"placing-left-left":return void this._session?.appendOrReplacePoint(P,t);case"placing-left":return void this._session?.appendOrReplacePoint(y,t);case"placing-end":return this.curveEndpoint=t,void this._updateStagedGeometry()}}async completeStep(){if(!this._primaryInteractiveHandle?.outputMapPosition||this._isComplete||!this._session||!this._isCurrentStepValid())return;const t=this._session.peekUndoStep(),e=this.suspend();if(e){t?t.placementState===e.placementState&&(t.curveEndpoint=e.curveEndpoint,t.ownPlacedLeftAnchor=e.ownPlacedLeftAnchor,t.ownPlacedLeftLeftAnchor=e.ownPlacedLeftLeftAnchor):this._session.pushUndoStep(e);try{switch(this._session.preserveSharedRedoAfterOperation=!1,this.placementState){case"placing-left-left":this._curveLeftLeftVertex=this._session.getInformationAboutPoint(-1,-1),this.ownPlacedLeftLeftAnchor=this._curveLeftLeftVertex,this._session.groupGeometryChanges(),this._applyState("placing-left");break;case"placing-left":this._curveLeftVertex=this._session.getInformationAboutPoint(-1,-1),this.ownPlacedLeftAnchor=this._curveLeftVertex,this._session.groupGeometryChanges(),this._applyState("placing-end");break;case"placing-end":this._updateStagedGeometry(),this._commitArcSegment()}}finally{this._session.preserveSharedRedoAfterOperation=!0}this._session.pushUndoStep(this.suspend())}}suspend(){const{curveEndpoint:t,ownPlacedLeftAnchor:e,ownPlacedLeftLeftAnchor:n,placementState:i}=this;return{curveEndpoint:t,ownPlacedLeftAnchor:e,ownPlacedLeftLeftAnchor:n,placementState:i}}_applyState(t){this.placementState=t,this._session.automaticRestart=this._automaticRestart}_resolveState(t){const e=this._availableAnchorCount;switch(t){case"placing-left-left":case"placing-end":default:return e>=2?"placing-end":1===e?"placing-left":"placing-left-left";case"placing-left":return e>=2?"placing-end":0===e?"placing-left-left":"placing-left"}}_restoreOwnPlacedAnchorsIfNeeded(){const t=this._session;if(!t)return;const e=this.ownPlacedLeftLeftAnchor?.point;e&&!this._hasAnchorPoint(e)&&(t.appendOrReplacePoint(P,e),t.groupGeometryChanges(),this._refreshAnchorInfo());const n=this.ownPlacedLeftAnchor?.point;n&&!this._hasAnchorPoint(n)&&(t.appendOrReplacePoint(y,n),t.groupGeometryChanges(),this._refreshAnchorInfo())}_hasAnchorPoint(t){const e=this._curveLeftVertex?.point,n=this._curveLeftLeftVertex?.point;return!!(e&&g(e,t)||n&&g(n,t))}_refreshAnchorInfo(){const t=this._session;if(!t)return this._curveLeftVertex=null,void(this._curveLeftLeftVertex=null);const e=t.lastPointAddedBySession?.pointIndex,n=null!=e&&e>=2?t.getInformationAboutPoint(e-1,-1):null,i=null!=e&&e>=2?t.getInformationAboutPoint(e-2,-1):null;if(n?.point&&i?.point)return this._curveLeftVertex=n,void(this._curveLeftLeftVertex=i);this._curveLeftVertex=t.getInformationAboutPoint(-1,-1),this._curveLeftLeftVertex=t.getInformationAboutPoint(-2,-1)}_isCurrentStepValid(){const t=this._session;if(!t)return!1;if("placing-left-left"===this.placementState){const e=t.getInformationAboutPoint(-1,-1)?.point;if(!e)return!1;const n=t.getInformationAboutPoint(-2,-1)?.point;return!(n&&g(e,n))}if("placing-left"===this.placementState){const e=t.getInformationAboutPoint(-1,-1)?.point,n=t.getInformationAboutPoint(-2,-1)?.point;return!(!e||!n)&&!g(e,n)}if("placing-end"===this.placementState){if(!this.curveEndpoint||!this.curveDefinition)return!1;this._refreshAnchorInfo();const t=this._curveLeftVertex?.point;return!!t&&!g(this.curveEndpoint,t)}return!0}_updateStagedGeometry(){const{_session:t,_isComplete:e,curveEndpoint:n}=this;if(e||!t||!n)return;if(this._refreshAnchorInfo(),!this._curveLeftVertex||!this._curveLeftLeftVertex)return void(this.curveDefinition=null);const i=this._curveLeftVertex.point,r=b(this._curveLeftVertex,this._curveLeftLeftVertex);if(!r||!i)return void(this.curveDefinition=null);const c=[n.x,n.y],a=[c[0]-i.x,c[1]-i.y],l=I([i.x,i.y],c,r);if(!l)return void(this.curveDefinition=null);const u={a:[c,l,o(r,a)<0?0:1,s(x,r,a)[2]>0?0:1]},f=v([i.x,i.y],u),h=p(f,.5);this.curveDefinition={c:[c,h]},this._session?.appendOrReplaceCurve(S,this.curveDefinition)}_commitArcSegment(){this.curveEndpoint&&this.curveDefinition&&(this._isComplete=!0,this._context?.requestComplete())}};function I([t,e],[n,i],[r,o]){const s=n-t,c=i-e,a=s*s+c*c,p=-o,l=r,u=p*s+l*c;if(V(u*u,a))return null;const f=a/(2*u);return[t+f*p,e+f*l]}function V(t,e){return t<1e-8*e}function b(t,e){if(!t.point||!e.point)return null;const n=t.curveInfo,i=[e.point.x,e.point.y];if(!n||u(n)){return C([t.point.x,t.point.y],i)}return f(n)?l(i,n):h(n)?_(i,n):d(n)?L(i,n):m(n)?a(i,n):null}function C(t,e){return[t[0]-e[0],t[1]-e[1]]}t([i()],w.prototype,"_primaryInteractiveHandle",void 0),t([i()],w.prototype,"_curveLeftVertex",void 0),t([i()],w.prototype,"_curveLeftLeftVertex",void 0),t([i()],w.prototype,"_availableAnchorCount",null),t([i()],w.prototype,"_automaticRestart",null),t([i()],w.prototype,"curveDefinition",void 0),t([i()],w.prototype,"curveEndpoint",void 0),t([i()],w.prototype,"ownPlacedLeftLeftAnchor",void 0),t([i()],w.prototype,"ownPlacedLeftAnchor",void 0),t([i()],w.prototype,"placementState",void 0),w=t([r("esri.views.draw.plugins.TangentArcSegmentPlugin")],w);export{w as TangentArcSegmentPlugin,I as centerFromTwoPointsAndTangent};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import s from"../../core/Accessor.js";import{createTask as t}from"../../core/asyncUtils.js";import i from"../../core/Collection.js";import a from"../../core/Error.js";import{makeHandle as o}from"../../core/handleUtils.js";import"../../core/has.js";import n from"../../core/Logger.js";import{removeMaybe as r,destroyMaybe as l,abortMaybe as c}from"../../core/maybe.js";import{createAbortError as h,isAborted as w,onAbort as d}from"../../core/promiseUtils.js";import{schedule as y}from"../../core/scheduling.js";import{property as m}from"../../core/accessorSupport/decorators/property.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";const _=Symbol("analyses-owner-handles");let u=class extends s{constructor(e){super(e),this._allAnalysisViews=new i,this._creatingViewCount=0,this._attachedToViewResolver=v(),this._items=new Map,this._moduleMap=new Map,this._scheduledUpdateHandle=null,this._emitOnView=(e,s)=>this.view.emit(e,s)}destroy(){this._disconnectOwners(),this._attachedToViewResolver.reject(h("AnalysisViewManager was destroyed")),this._set("view",null)}attach(){this._connectOwners(),this._attachedToViewResolver.resolve()}detach(){this._disconnectOwners(),this._attachedToViewResolver.reject(h()),this._attachedToViewResolver=v()}get updating(){return!this.view.ready||0!==this._creatingViewCount||this._allAnalysisViews.some(e=>e.updating)}get testInfo(){}async whenAnalysisView(e){await this._attachedToViewResolver.promise;const s=this._items.get(e);if(null==s||1===s.state.list){throw new a("AnalysisViewManager:no-analysis-view-for-analysis","The analysis does not exist in view.analyses",{analysis:e})}return s.createAnalysisViewTask.promise}_connectOwners(){this.addHandles(this._connectAnalysesCollection(this.view.analyses),_)}_disconnectOwners(){this.removeHandles(_),this._update(),this._creatingViewCount=0}_connectAnalysesCollection(e){for(const i of e)this._addAnalysis(i);const s=e.on("after-add",e=>this._addAnalysis(e.item)),t=e.on("after-remove",e=>this._removeAnalysis(e.item));return o(()=>{s.remove(),t.remove();for(const s of e)this._removeAnalysis(s)})}_addAnalysis(e){const s=this._items.get(e);if(null==s){const s={state:{view:0,list:0},analysis:e,view:null,createAnalysisViewTask:null};this._items.set(e,s),s.createAnalysisViewTask=t(t=>this._createAnalysisViewPromise(s,t).then(s=>(this._emitOnView("analysis-view-create",{analysis:e,analysisView:s}),s),s=>{throw this._emitOnView("analysis-view-create-error",{analysis:e,error:s}),s}))}else s.state.list=0}_removeAnalysis(e){const s=this._items.get(e);null!=s?(s.state.list=1,this._scheduleUpdate()):n.getLogger(this).error("Trying to remove analysis which was not added")}_scheduleUpdate(){null==this._scheduledUpdateHandle&&(this._scheduledUpdateHandle=y(()=>this._update()))}_update(){this._scheduledUpdateHandle=r(this._scheduledUpdateHandle),this._items.forEach(e=>{if(1!==e.state.list)return;const{analysis:s,view:t}=e;switch(this._items.delete(s),e.state.view){case 0:e.createAnalysisViewTask=c(e.createAnalysisViewTask);break;case 1:null!=t&&(this._allAnalysisViews.remove(t),e.view=l(t),e.createAnalysisViewTask=null,this._emitOnView("analysis-view-destroy",{analysis:s,analysisView:t}))}})}async _createAnalysisViewPromise(e,s){const{analysis:t}=e;if(this._creatingViewCount+=1,!this._moduleMap.has(t.type))try{this._moduleMap.set(t.type,await this.importAnalysisViewModule(t))}catch(n){throw this._creatingViewCount-=1,new a("AnalysisViewManager:no-analysis-view-for-analysis",`Analysis of type "${t.type}" is not supported`)}if(w(s))throw this._creatingViewCount-=1,h("AnalysisView creation aborted");const i=new(this._moduleMap.get(t.type).default)({analysis:t,view:this.view});let o=!0;d(s,()=>{o&&this._destroyAnalysisView(t,i)});try{await i.when()}catch(n){throw o=!1,this._destroyAnalysisView(t,i),n}if(w(s))throw h();return o=!1,e.view=i,e.state.view=1,this._allAnalysisViews.add(i),this._creatingViewCount-=1,i}_destroyAnalysisView(e,s){s.destroyed||(this._creatingViewCount-=1,s.destroy(),this._emitOnView("analysis-view-destroy",{analysis:e,analysisView:s}))}};e([m()],u.prototype,"updating",null),e([m({constructOnly:!0})],u.prototype,"importAnalysisViewModule",void 0),e([m({constructOnly:!0})],u.prototype,"view",void 0),e([m()],u.prototype,"_allAnalysisViews",void 0),e([m()],u.prototype,"_creatingViewCount",void 0),u=e([p("esri.views.support.AnalysisViewManager")],u);const V=u;function v(){const e=Promise.withResolvers();return e.promise.catch(()=>{}),e}export{V as default};
2
+ import{__decorate as e}from"tslib";import s from"../../core/Accessor.js";import{createTask as t}from"../../core/asyncUtils.js";import i from"../../core/Collection.js";import a from"../../core/Error.js";import{makeHandle as o}from"../../core/handleUtils.js";import"../../core/has.js";import n from"../../core/Logger.js";import{removeMaybe as r,destroyMaybe as l,abortMaybe as c}from"../../core/maybe.js";import{createAbortError as h,isAborted as w,onAbort as d}from"../../core/promiseUtils.js";import{schedule as y}from"../../core/scheduling.js";import{property as m}from"../../core/accessorSupport/decorators/property.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";const _=Symbol("analyses-owner-handles");let u=class extends s{constructor(e){super(e),this._allAnalysisViews=new i,this._creatingViewCount=0,this._attachedToViewResolver=v(),this._items=new Map,this._moduleMap=new Map,this._scheduledUpdateHandle=null,this._emitOnView=(e,s)=>this.view.emit(e,s)}destroy(){this._disconnectOwners(),this._attachedToViewResolver.reject(h("AnalysisViewManager was destroyed")),this._set("view",null)}attach(){this._connectOwners(),this._attachedToViewResolver.resolve()}detach(){this._disconnectOwners(),this._attachedToViewResolver.reject(h()),this._attachedToViewResolver=v()}get updating(){return!this.view.ready||0!==this._creatingViewCount||this._allAnalysisViews.some(e=>e.updating)}get testInfo(){}async whenAnalysisView(e){await this._attachedToViewResolver.promise;const s=this._items.get(e);if(null==s||1===s.state.list){throw new a("AnalysisViewManager:no-analysis-view-for-analysis","The analysis does not exist in view.analyses",{analysis:e})}return s.createAnalysisViewTask.promise}_connectOwners(){this.addHandles(this._connectAnalysesCollection(this.view.analyses),_)}_disconnectOwners(){this.removeHandles(_),this._update(),this._creatingViewCount=0}_connectAnalysesCollection(e){for(const i of e)this._addAnalysis(i);const s=e.on("after-add",e=>this._addAnalysis(e.item)),t=e.on("after-remove",e=>this._removeAnalysis(e.item));return o(()=>{s.remove(),t.remove();for(const s of e)this._removeAnalysis(s)})}_addAnalysis(e){const s=this._items.get(e);if(null==s){const s={state:{view:0,list:0},analysis:e,view:null,createAnalysisViewTask:null};this._items.set(e,s),s.createAnalysisViewTask=t(t=>this._createAnalysisViewPromise(s,t).then(s=>(this._emitOnView("analysis-view-create",{analysis:e,analysisView:s}),s),s=>{throw this._emitOnView("analysis-view-create-error",{analysis:e,error:s}),s}))}else s.state.list=0}_removeAnalysis(e){const s=this._items.get(e);null!=s?(s.state.list=1,this._scheduleUpdate()):n.getLogger(this).error("Trying to remove analysis which was not added")}_scheduleUpdate(){null==this._scheduledUpdateHandle&&(this._scheduledUpdateHandle=y(()=>this._update()))}_update(){this._scheduledUpdateHandle=r(this._scheduledUpdateHandle),this._items.forEach(e=>{if(1!==e.state.list)return;const{analysis:s,view:t}=e;switch(this._items.delete(s),e.state.view){case 0:e.createAnalysisViewTask=c(e.createAnalysisViewTask);break;case 1:null!=t&&(this._allAnalysisViews.remove(t),e.view=l(t),e.createAnalysisViewTask=null,this._emitOnView("analysis-view-destroy",{analysis:s,analysisView:t}))}})}async _createAnalysisViewPromise(e,s){const{analysis:t}=e;if(this._creatingViewCount+=1,!this._moduleMap.has(t.type))try{this._moduleMap.set(t.type,await this.importAnalysisViewModule(t))}catch(n){throw this._creatingViewCount-=1,new a("AnalysisViewManager:no-analysis-view-for-analysis",`Analysis of type "${t.type}" is not supported`)}if(w(s))throw this._creatingViewCount-=1,h("AnalysisView creation aborted");const i=new(this._moduleMap.get(t.type).default)({analysis:t,view:this.view});let o=!0;d(s,()=>{o&&this._destroyAnalysisView(t,i,e)});try{await i.when()}catch(n){throw o=!1,this._destroyAnalysisView(t,i,e),n}if(w(s))throw h();return o=!1,e.view=i,e.state.view=1,this._allAnalysisViews.add(i),this._creatingViewCount-=1,i}_destroyAnalysisView(e,s,t){s.destroyed||(this._creatingViewCount-=1,s.destroy(),1===t.state.view&&this._emitOnView("analysis-view-destroy",{analysis:e,analysisView:s}))}};e([m()],u.prototype,"updating",null),e([m({constructOnly:!0})],u.prototype,"importAnalysisViewModule",void 0),e([m({constructOnly:!0})],u.prototype,"view",void 0),e([m()],u.prototype,"_allAnalysisViews",void 0),e([m()],u.prototype,"_creatingViewCount",void 0),u=e([p("esri.views.support.AnalysisViewManager")],u);const V=u;function v(){const e=Promise.withResolvers();return e.promise.catch(()=>{}),e}export{V as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as i}from"tslib";import o from"../../../core/Accessor.js";import{createTask as t}from"../../../core/asyncUtils.js";import{abortMaybe as e,destroyMaybe as s}from"../../../core/maybe.js";import{whenOrAbort as l}from"../../../core/promiseUtils.js";import{watch as r,syncAndInitial as a}from"../../../core/reactiveUtils.js";import{property as n,subclass as m}from"../../../core/accessorSupport/decorators.js";let p=class extends o{constructor(i){super(i),this._implementation=null,this._loadingTask=null}initialize(){this.addHandles(r(()=>({tool:this.tool,view:this.tool.viewModel.view,visible:this.tool.visible&&!!this.tool.viewModel.view?.ready}),({tool:i,view:o,visible:t})=>{null!=o&&t?this._show(o,i):this._hide()},a))}destroy(){this._hide()}_show(i,o){this._loadingTask=e(this._loadingTask),this._loadingTask=t(async t=>{if("2d"===i.type){const e=import("./ElevationProfileView2D.js"),s=(await l(e,t)).ElevationProfileView2D;this._implementation=new s(i,o)}else if("3d"===i.type){const e=import("./ElevationProfileView3D.js"),s=(await l(e,t)).ElevationProfileView3D;this._implementation=new s(i,o)}})}_hide(){this._loadingTask=e(this._loadingTask),this._implementation=s(this._implementation)}};i([n()],p.prototype,"tool",void 0),p=i([m("esri.widgets.ElevationProfile.support.ElevationProfileView")],p);export{p as ElevationProfileView};
2
+ import{__decorate as i}from"tslib";import o from"../../../core/Accessor.js";import{createTask as t}from"../../../core/asyncUtils.js";import{abortMaybe as e,destroyMaybe as s}from"../../../core/maybe.js";import{whenOrAbort as l}from"../../../core/promiseUtils.js";import{watch as r,syncAndInitial as a}from"../../../core/reactiveUtils.js";import{property as n,subclass as m}from"../../../core/accessorSupport/decorators.js";let p=class extends o{constructor(i){super(i),this._implementation=null,this._loadingTask=null}initialize(){this.addHandles(r(()=>({tool:this.tool,view:this.tool.viewModel.view,visible:this.tool.visible&&!!this.tool.viewModel.view?.ready}),({tool:i,view:o,visible:t})=>{null!=o&&t?this._show(o,i):this._hide()},a))}destroy(){this._hide()}_show(i,o){this._loadingTask=e(this._loadingTask),this._loadingTask=t(async t=>{if("2d"===i.type){const e=import("./ElevationProfileView2D.js"),s=(await l(e,t)).ElevationProfileView2D;this._implementation=new s(i,o)}else if("3d"===i.type){const e=import("./ElevationProfileView3D.js"),s=(await l(e,t)).ElevationProfileView3D;this._implementation=new s(i,o)}})}_hide(){this._loadingTask=e(this._loadingTask),this._implementation=s(this._implementation)}};i([n()],p.prototype,"tool",void 0),i([n()],p.prototype,"_implementation",void 0),p=i([m("esri.widgets.ElevationProfile.support.ElevationProfileView")],p);export{p as ElevationProfileView};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../../core/Handles.js";import{destroyMaybe as t}from"../../../core/maybe.js";import{watch as i,syncAndInitial as s}from"../../../core/reactiveUtils.js";import{HoveredPoints as o}from"./HoveredPoints.js";import{InputRepresentation3D as n}from"./InputRepresentation3D.js";import{ProfileLines3D as r}from"./ProfileLines3D.js";class h{constructor(t,h){this._handles=new e,this._inputRepresentation=new n({view:t}),this._hoveredPoints=new o({view:t}),this._profileLines=new r({view:t}),this._handles.add([i(()=>h.viewModel.hoveredPoints,e=>this._hoveredPoints.update(e),s),i(()=>{const{state:e,editable:t,highlightEnabled:i,viewModel:s}=h,o=s.input;return o&&(o.commitProperty("geometry"),o.commitProperty("layer")),{input:o,state:e,editable:t,highlightEnabled:i}},e=>this._updateInputRepresentation(e),s),i(()=>h.viewModel.chartData,e=>this._profileLines.update(e),s),i(()=>h.viewModel.input?.geometry,()=>{this._profileLines.remove()},s)])}destroy(){this._handles=t(this._handles),this._inputRepresentation=t(this._inputRepresentation),this._hoveredPoints=t(this._hoveredPoints),this._profileLines=t(this._profileLines)}_updateInputRepresentation({input:e,state:t,editable:i,highlightEnabled:s}){const o=this._inputRepresentation;if(!s)return o.remove();"selected"===t?o.showHighlight(e):"created"!==t||i?o.remove():o.showReshaping(e)}}export{h as ElevationProfileView3D};
2
+ import e from"../../../core/Handles.js";import{destroyMaybe as t}from"../../../core/maybe.js";import{watch as i,syncAndInitial as s}from"../../../core/reactiveUtils.js";import{HoveredPoints as o}from"./HoveredPoints.js";import{InputRepresentation3D as n}from"./InputRepresentation3D.js";import{ProfileLines3D as r}from"./ProfileLines3D.js";class h{constructor(t,h){this._handles=new e,this._inputRepresentation=new n({view:t}),this._hoveredPoints=new o({view:t}),this._profileLines=new r({view:t}),this._handles.add([i(()=>h.viewModel.hoveredPoints,e=>this._hoveredPoints.update(e),s),i(()=>h.viewModel.input?.geometry,()=>{this._profileLines.remove()},s),i(()=>{const{state:e,editable:t,highlightEnabled:i,viewModel:s}=h,o=s.input;return o&&(o.commitProperty("geometry"),o.commitProperty("layer")),{input:o,state:e,editable:t,highlightEnabled:i}},e=>this._updateInputRepresentation(e),s),i(()=>h.viewModel.chartData,e=>this._profileLines.update(e),s)])}destroy(){this._handles=t(this._handles),this._inputRepresentation=t(this._inputRepresentation),this._hoveredPoints=t(this._hoveredPoints),this._profileLines=t(this._profileLines)}_updateInputRepresentation({input:e,state:t,editable:i,highlightEnabled:s}){const o=this._inputRepresentation;if(!s)return o.remove();"selected"===t?o.showHighlight(e):"created"!==t||i?o.remove():o.showReshaping(e)}}export{h as ElevationProfileView3D};
@@ -0,0 +1,27 @@
1
+ import type Accessor from "../../core/Accessor.js";
2
+
3
+ /** @since 5.1 */
4
+ export interface ColumnVisibilityMenuVisibleElementsProperties extends Partial<Pick<ColumnVisibilityMenuVisibleElements, "filter" | "header">> {}
5
+
6
+ /**
7
+ * Controls the visibility of specific elements within the column visibility menu.
8
+ *
9
+ * @since 5.1
10
+ */
11
+ export default class ColumnVisibilityMenuVisibleElements extends Accessor {
12
+ constructor(properties?: ColumnVisibilityMenuVisibleElementsProperties);
13
+ /**
14
+ * Indicates whether to display the filter in the column visibility menu.
15
+ *
16
+ * @default true
17
+ * @since 5.1
18
+ */
19
+ accessor filter: boolean;
20
+ /**
21
+ * Indicates whether to display the header of the column visibility menu.
22
+ *
23
+ * @default true
24
+ * @since 5.1
25
+ */
26
+ accessor header: boolean;
27
+ }
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import o from"../../core/Accessor.js";import{property as t,subclass as r}from"../../core/accessorSupport/decorators.js";let s=class extends o{constructor(e){super(e),this.filter=!0,this.header=!0}};e([t({type:Boolean,nonNullable:!0})],s.prototype,"filter",void 0),e([t({type:Boolean,nonNullable:!0})],s.prototype,"header",void 0),s=e([r("esri.widgets.FeatureTable.ColumnVisibilityMenuVisibleElements")],s);const l=s;export{l as default};
@@ -33,7 +33,7 @@ import type { ExtentProperties } from "../../geometry/Extent.js";
33
33
  import type { TableTemplateProperties } from "./support/TableTemplate.js";
34
34
  import type { TimeExtentProperties } from "../../time/TimeExtent.js";
35
35
 
36
- export interface FeatureTableViewModelProperties extends GridViewModelProperties, Partial<Pick<FeatureTableViewModel, "actionColumnConfig" | "attachmentsEnabled" | "autoRefreshEnabled" | "autoSaveEnabled" | "columnPerformanceModeEnabled" | "columnReorderingEnabled" | "definitionExpression" | "editingEnabled" | "filterBySelectionEnabled" | "highlightEnabled" | "initialSize" | "layer" | "layers" | "maxSize" | "menuConfig" | "multipleSelectionEnabled" | "multipleSortPriority" | "multiSortEnabled" | "outFields" | "pageIndex" | "pageSize" | "paginationEnabled" | "relatedRecordsEnabled" | "returnGeometryEnabled" | "returnMEnabled" | "returnZEnabled" | "selectionManager" | "syncTemplateOnChangesEnabled" | "syncViewSelection" | "tableController" | "tableParent" | "timeZone" | "view">> {
36
+ export interface FeatureTableViewModelProperties extends GridViewModelProperties, Partial<Pick<FeatureTableViewModel, "actionColumnConfig" | "attachmentsEnabled" | "autoRefreshEnabled" | "autoSaveEnabled" | "columnPerformanceModeEnabled" | "columnReorderingEnabled" | "definitionExpression" | "editingEnabled" | "filterBySelectionEnabled" | "filterByViewExtent" | "highlightEnabled" | "initialSize" | "layer" | "layers" | "maxSize" | "menuConfig" | "multipleSelectionEnabled" | "multipleSortPriority" | "multiSortEnabled" | "outFields" | "pageIndex" | "pageSize" | "paginationEnabled" | "relatedRecordsEnabled" | "returnGeometryEnabled" | "returnMEnabled" | "returnZEnabled" | "selectionManager" | "syncTemplateOnChangesEnabled" | "syncViewSelection" | "tableController" | "tableParent" | "timeZone" | "view">> {
37
37
  /**
38
38
  * Use this property to configure how columns display within the table in regard to visibility, column order, and sorting.
39
39
  *
@@ -491,6 +491,15 @@ export default class FeatureTableViewModel extends GridViewModel {
491
491
  * @since 4.30
492
492
  */
493
493
  accessor filterBySelectionEnabled: boolean;
494
+ /**
495
+ * Indicates that the table should only display rows for features that are currently in the view's extent.
496
+ * This property has no effect if the table has not been provided a view. If this property is true, the view's extent
497
+ * will overwrite the current value of [FeatureTable.filterGeometry](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/#filterGeometry).
498
+ *
499
+ * @default false
500
+ * @since 5.1
501
+ */
502
+ accessor filterByViewExtent: boolean;
494
503
  /**
495
504
  * Set this property to filter the features displayed in the table. It accepts a [Geometry](https://developers.arcgis.com/javascript/latest/references/core/geometry/Geometry/), e.g. [Extent](https://developers.arcgis.com/javascript/latest/references/core/geometry/Extent/), and uses it as a spatial filter. When modifying this property, the FeatureTable will completely refresh and re-query for all features.
496
505
  *