@arcgis/core 5.2.0-next.27 → 5.2.0-next.29
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.
- package/WebLinkChart.js +1 -1
- package/WebMap.js +1 -1
- package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +40 -2
- package/applications/KnowledgeStudio/generalSharedKgUtils.js +1 -1
- package/arcade/Dictionary.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/Pixel.js +1 -1
- package/arcade/deepClone.js +1 -1
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/functions/geometry.js +1 -1
- package/arcade/languageUtils.js +1 -1
- package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
- package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0197e459fdb04dfb28ef.js +1 -0
- package/assets/esri/core/workers/chunks/{f7344d855f1092383abe.js → 15aa9b85976069acf4f3.js} +1 -1
- package/assets/esri/core/workers/chunks/{5ee887fc6e1e0e70e02f.js → 1664434dc7a67c8ce453.js} +1 -1
- package/assets/esri/core/workers/chunks/17b98787a0698f584882.js +1 -0
- package/assets/esri/core/workers/chunks/1837f97f720d255a1694.js +1 -0
- package/assets/esri/core/workers/chunks/1b9c68e8431bb4608209.js +1 -0
- package/assets/esri/core/workers/chunks/1bbf5f5da5842b93f638.js +1 -0
- package/assets/esri/core/workers/chunks/1bd7b7f4ee7ea6cb7ef9.js +1 -0
- package/assets/esri/core/workers/chunks/1e386475937e02b3f523.js +1 -0
- package/assets/esri/core/workers/chunks/209460f8aae3f9f8c9b8.js +1 -0
- package/assets/esri/core/workers/chunks/{316a3d5c7842b445e29e.js → 20ffeb09bb30400de110.js} +1 -1
- package/assets/esri/core/workers/chunks/21122f3f3e19a7fd7d33.js +1 -0
- package/assets/esri/core/workers/chunks/{25fd4d5d3af887536b3b.js → 2628136bf9f47d238a24.js} +1 -1
- package/assets/esri/core/workers/chunks/{bf9eca7dd107bdb06614.js → 2665337e1b665e7e2b70.js} +1 -1
- package/assets/esri/core/workers/chunks/2b044c8fab2055a8818d.js +1 -0
- package/assets/esri/core/workers/chunks/2b2b042a6d6949b06127.js +1 -0
- package/assets/esri/core/workers/chunks/2c15c227d057292d4fa8.js +1 -0
- package/assets/esri/core/workers/chunks/2f02880a7f081eb210cd.js +1 -0
- package/assets/esri/core/workers/chunks/2fc3e43b64300014dddc.js +1 -0
- package/assets/esri/core/workers/chunks/{31c4128b23968575feca.js → 31d92ba9089617aa59ab.js} +1 -1
- package/assets/esri/core/workers/chunks/32740b075d7a890d7888.js +1 -0
- package/assets/esri/core/workers/chunks/38b69fba9ae4ccbae6b7.js +1 -0
- package/assets/esri/core/workers/chunks/390f2beee8e3f2a302e4.js +1 -0
- package/assets/esri/core/workers/chunks/3c342e662c13a05f4caf.js +1 -0
- package/assets/esri/core/workers/chunks/{d670e134348954ce465d.js → 3d1e5bfd88771d4a0bf6.js} +1 -1
- package/assets/esri/core/workers/chunks/3eee32db0e9a5086b9a8.js +1 -0
- package/assets/esri/core/workers/chunks/43847d66726fd0bcbbb7.js +1 -0
- package/assets/esri/core/workers/chunks/4545cf12ad0824ce6b41.js +1 -0
- package/assets/esri/core/workers/chunks/45e4b9069263adeae394.js +1 -0
- package/assets/esri/core/workers/chunks/47290f27375c76bcc9c7.js +1 -0
- package/assets/esri/core/workers/chunks/{4e16d7fa2e6f11d082b5.js → 4ba4fd8fa31169760fee.js} +1 -1
- package/assets/esri/core/workers/chunks/{268ee59800e64baa9682.js → 4be0c64bbf2449d57ea5.js} +1 -1
- package/assets/esri/core/workers/chunks/5115059b012ef84407cf.js +1 -0
- package/assets/esri/core/workers/chunks/{e8e7cd26c43f231cdea2.js → 5189413a83faf3480e29.js} +1 -1
- package/assets/esri/core/workers/chunks/5c63b38160c7d063b8af.js +1 -0
- package/assets/esri/core/workers/chunks/5cccb8b06014ccef30f8.js +1 -0
- package/assets/esri/core/workers/chunks/{0098544169e429dd98d2.js → 689673173ca1c0e098fe.js} +1 -1
- package/assets/esri/core/workers/chunks/697e0ce10d77b90d4fee.js +1 -0
- package/assets/esri/core/workers/chunks/6991ba1b204668e7d4da.js +1 -0
- package/assets/esri/core/workers/chunks/{ccffaba50674adba7a0f.js → 6b56971783bf4c31a563.js} +1 -1
- package/assets/esri/core/workers/chunks/70c94bcfa20453134037.js +1 -0
- package/assets/esri/core/workers/chunks/{8f93e6fc11a158d4f1ee.js → 7335a762412bc8c15a2f.js} +1 -1
- package/assets/esri/core/workers/chunks/759686b896f51f0fe6a9.js +1 -0
- package/assets/esri/core/workers/chunks/7656900713e55036c3c1.js +1 -0
- package/assets/esri/core/workers/chunks/{b2b342b06d502fc61ea5.js → 76789f46b2c65d219cf9.js} +1 -1
- package/assets/esri/core/workers/chunks/774615303c1cc9a77e20.js +1 -0
- package/assets/esri/core/workers/chunks/7b290ac2e8a567ecae4a.js +1 -0
- package/assets/esri/core/workers/chunks/7ff37a4f315f7621462b.js +1 -0
- package/assets/esri/core/workers/chunks/8ad5e80e911419c1685a.js +1 -0
- package/assets/esri/core/workers/chunks/{a3ecde3794a7db3cf283.js → 8d90bef1091204fba0f1.js} +1 -1
- package/assets/esri/core/workers/chunks/8f16a358ed83d2264415.js +1 -0
- package/assets/esri/core/workers/chunks/{a454df829a72ab02c860.js → 8fd63cb38036f331a803.js} +1 -1
- package/assets/esri/core/workers/chunks/{bbcad2fde838819ffc7b.js → 906f4c0fa8135e6c2f03.js} +1 -1
- package/assets/esri/core/workers/chunks/989937c120bdd676ec1e.js +1 -0
- package/assets/esri/core/workers/chunks/9ba705a6ddabca0f77b1.js +1 -0
- package/assets/esri/core/workers/chunks/{87011d2fe14c54e296af.js → 9fe71d49c888fd871312.js} +1 -1
- package/assets/esri/core/workers/chunks/a14e5607c5c091c77e3d.js +1 -0
- package/assets/esri/core/workers/chunks/a2be8784f2cfdbb42681.js +1 -0
- package/assets/esri/core/workers/chunks/a6379a8df8c08b729b9c.js +1 -0
- package/assets/esri/core/workers/chunks/a988fd54912969b812ce.js +1 -0
- package/assets/esri/core/workers/chunks/a9db775210ebeee41738.js +1 -0
- package/assets/esri/core/workers/chunks/acbc14395c31f6da509e.js +1 -0
- package/assets/esri/core/workers/chunks/{11d1af758e2140095b10.js → aec82b94787821153d2b.js} +1 -1
- package/assets/esri/core/workers/chunks/b18b6bb85e52b03b85e3.js +680 -0
- package/assets/esri/core/workers/chunks/b624796ff4a9d4c406bf.js +1 -0
- package/assets/esri/core/workers/chunks/b7458bd3a2f590f32111.js +1 -0
- package/assets/esri/core/workers/chunks/bb1fad01d9f070e7d795.js +1 -0
- package/assets/esri/core/workers/chunks/{a9d477f90e5046400dd5.js → bcb2092c87d8d21c6458.js} +1 -1
- package/assets/esri/core/workers/chunks/{3e94ed4d57ee7d870cba.js → c6f5688074ae89c37add.js} +1 -1
- package/assets/esri/core/workers/chunks/caf150028aeac91b8d80.js +1 -0
- package/assets/esri/core/workers/chunks/cb30e8a66d6dcfebd439.js +1 -0
- package/assets/esri/core/workers/chunks/d7c0ab622caf495dbcef.js +1 -0
- package/assets/esri/core/workers/chunks/e181d0f5562878b3dc01.js +1 -0
- package/assets/esri/core/workers/chunks/{fd629872b5c07853f695.js → e4015870412edd69453c.js} +1 -1
- package/assets/esri/core/workers/chunks/{d07068c44d560e4ce02e.js → e5d2fab228d54b18a8a8.js} +1 -1
- package/assets/esri/core/workers/chunks/e774303efefee31952d0.js +1 -0
- package/assets/esri/core/workers/chunks/e98a8f80023c6023e72c.js +1 -0
- package/assets/esri/core/workers/chunks/f10a339b16d84b650012.js +2 -0
- package/assets/esri/core/workers/chunks/f1d211904d5a1de93cb3.js +1 -0
- package/assets/esri/core/workers/chunks/f847a4846c427f671455.js +1 -0
- package/assets/esri/core/workers/chunks/fe42fa2144691b9186fd.js +1 -0
- package/assets/esri/images/portal/gaussiansplatlayer16.png +0 -0
- package/assets/esri/images/portal/knowledgegraphlayer16.png +0 -0
- package/assets/esri/images/portal/propresentation16.png +0 -0
- package/assets/esri/images/portal/urbanproject16.png +0 -0
- package/assets/esri/images/support/loading-throb.gif +0 -0
- package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
- package/assets/esri/libs/basisu/basis_encoder.wasm +0 -0
- package/assets/esri/libs/dxtEncoder/dxt_encoder.wasm +0 -0
- package/assets/esri/themes/base/icons/style.scss +0 -0
- package/assets/esri/themes/base/icons/variables.scss +0 -0
- package/assets/esri/themes/base/images/files/archive-32.svg +0 -0
- package/assets/esri/themes/base/images/files/cad-32.svg +0 -0
- package/assets/esri/themes/base/images/files/code-32.svg +0 -0
- package/assets/esri/themes/base/images/files/csv-32.svg +0 -0
- package/assets/esri/themes/base/images/files/excel-32.svg +0 -0
- package/assets/esri/themes/base/images/files/generic-32.svg +0 -0
- package/assets/esri/themes/base/images/files/gpx-32.svg +0 -0
- package/assets/esri/themes/base/images/files/image-32.svg +0 -0
- package/assets/esri/themes/base/images/files/pdf-32.svg +0 -0
- package/assets/esri/themes/base/images/files/report-32.svg +0 -0
- package/assets/esri/themes/base/images/files/sound-32.svg +0 -0
- package/assets/esri/themes/base/images/files/text-32.svg +0 -0
- package/assets/esri/themes/base/images/files/video-32.svg +0 -0
- package/assets/esri/themes/base/images/files/word-32.svg +0 -0
- package/assets/esri/themes/base/images/files/zip-32.svg +0 -0
- package/assets/esri/themes/base/images/loading-throb.gif +0 -0
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +24 -0
- package/assets/esri/themes/base/widgets/_Bookmarks.scss +0 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/GlowComposition.glsl.js +5 -5
- package/chunks/OITBlend.glsl.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/config.js +1 -1
- package/core/AsyncUpdate.js +1 -1
- package/core/Loadable.js +1 -1
- package/core/colorUtils.js +1 -1
- package/core/date.js +1 -1
- package/core/has.js +1 -1
- package/core/workers/WorkerHandle.js +1 -1
- package/core/workers/workerFactory.js +1 -1
- package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
- package/form/elements/AttachmentElement.d.ts +4 -1
- package/form/elements/inputs/attachments/AttachmentInput.d.ts +1 -0
- package/form/elements/inputs/attachments/AudioInput.d.ts +1 -0
- package/form/elements/inputs/attachments/DocumentInput.d.ts +3 -0
- package/form/elements/inputs/attachments/ImageInput.d.ts +1 -0
- package/form/elements/inputs/attachments/VideoInput.d.ts +1 -0
- package/geometry/Mesh.js +1 -1
- package/geometry/support/meshUtils/loadExternal.js +1 -1
- package/identity/OAuthCredential.js +1 -1
- package/kernel.js +1 -1
- package/layers/AnnotationFeatureLayer.d.ts +2 -4
- package/layers/AnnotationFeatureLayer.js +1 -1
- package/layers/DimensionFeatureLayer.d.ts +0 -2
- package/layers/DimensionFeatureLayer.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/PointCloudLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/graphics/sources/MemorySource.js +1 -1
- package/layers/graphics/sources/ParquetSource.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/mixins/EditBusLayer.js +1 -1
- package/layers/mixins/SceneService.js +1 -1
- package/layers/support/KMLSublayer.js +1 -1
- package/layers/support/ParquetFilesData.js +1 -1
- package/layers/support/TitleCreator.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/parquetUtils.js +1 -1
- package/linkChart/guards.js +2 -0
- package/linkChart/utils.js +1 -1
- package/networks/CircuitManager.d.ts +44 -0
- package/networks/support/CircuitExportJobInfo.d.ts +1 -1
- package/networks/support/CircuitVerifyJobInfo.d.ts +1 -1
- package/networks/support/jsonTypes.d.ts +2 -0
- package/package.json +5 -5
- package/rest/featureService/types.d.ts +4 -7
- package/rest/knowledgeGraph/ReplicaDefinition.d.ts +62 -6
- package/rest/networks/circuits/support/CircuitVerifyResult.d.ts +1 -1
- package/rest/networks/circuits/support/ExportCircuitsParameters.d.ts +1 -1
- package/rest/networks/circuits/support/VerifyCircuitsParameters.d.ts +17 -3
- package/rest/networks/unitIdentifiers/support/UnitQueryResult.d.ts +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerBinningAdapter.js +1 -1
- package/support/ArcadeExpression.js +1 -1
- package/support/basemapUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMOperators.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/symbols/support/cimSymbolUtils.js +1 -1
- package/versionManagement/VersionManagementService.js +1 -1
- package/versionManagement/VersionManager.js +1 -1
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
- package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
- package/views/2d/engine/ParentChildStage.js +1 -1
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/ThrottledCanvas.js +2 -0
- package/views/2d/engine/webgl/Profiler.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/FeatureMeshFactory.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/util/AnnotationMatcher.js +1 -1
- package/views/2d/engine/webgl/util/DictionaryMatcher.js +1 -1
- package/views/2d/engine/webgl/util/DimensionMatcher.js +1 -1
- package/views/2d/engine/webgl/util/IntervalMatcher.js +1 -1
- package/views/2d/engine/webgl/util/LabelMatcher.js +1 -1
- package/views/2d/engine/webgl/util/MapMatcher.js +1 -1
- package/views/2d/engine/webgl/util/Matcher.js +1 -1
- package/views/2d/engine/webgl/util/createMatcher.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
- package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
- package/views/2d/layers/support/annodime/DimensionInfo.js +1 -1
- package/views/2d/layers/support/annodime/MatcherGeometryOverride.js +2 -0
- package/views/2d/layers/support/annodime/PrivateDimensionEffect.js +1 -1
- package/views/2d/layers/support/annodime/PrivateMatcherGeometryOverrideEffect.js +2 -0
- package/views/2d/layers/support/annodime/TileObjectId.js +2 -0
- package/views/2d/layers/support/annodime/annotationGraphic.js +1 -1
- package/views/2d/layers/support/annodime/debugUtils.js +2 -0
- package/views/2d/layers/support/annodime/dimensionStyleDefaults.js +2 -0
- package/views/2d/layers/support/annodime/dimensionSymbols.js +1 -1
- package/views/2d/layers/support/annodime/dimensionUtils.js +1 -1
- package/views/2d/layers/support/annodime/utils.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/camera/constraintUtils/surfaceCollision.js +1 -1
- package/views/3d/camera/constraintUtils.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/glTF/loader.js +1 -1
- package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerWorkerHandle.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/state/GoToOperation.js +1 -1
- package/views/3d/state/SurfaceCollisionConstraint.js +1 -1
- package/views/3d/state/ViewState.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
- package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/webgl/ManagedFBO.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl/RenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/3d/webgl.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View2D.js +1 -1
- package/views/Viewport2DBaseMixin.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/support/editingSessionUtils.js +1 -1
- package/views/interactive/sketch/SketchLabelOptions.d.ts +0 -6
- package/views/layers/AnnotationFeatureLayerView.d.ts +0 -7
- package/views/layers/DimensionFeatureLayerView.d.ts +0 -7
- package/views/popupAdapter.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/views/webgl/BufferObject.js +1 -1
- package/webdoc/support/webdocSaveUtils.js +1 -1
- package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
- package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/interfaceUtils.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Directions/DirectionsViewModel.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +1 -13
- package/widgets/Editor.d.ts +11 -13
- package/widgets/Editor.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/LinkChartLayoutSwitcher/LinkChartLayoutSwitcherViewModel.js +1 -1
- package/widgets/Locate/LocateViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
- package/widgets/OrientedImageryViewer/support/MediaPrefetcher.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/Popup/PopupViewModel.d.ts +0 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/Print/PrintViewModel.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/ScaleBar/ScaleBarViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.d.ts +0 -12
- package/widgets/Sketch.d.ts +0 -12
- package/widgets/TableList/ListItem.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
- package/widgets/Widget.js +1 -1
- package/widgets/support/geolocationUtils.js +1 -1
- package/widgets/support/tests.js +1 -1
- package/assets/esri/core/workers/chunks/04070767356c12026369.js +0 -1
- package/assets/esri/core/workers/chunks/045f178fecc23839bfa8.js +0 -680
- package/assets/esri/core/workers/chunks/073ee52705ea326fecfb.js +0 -1
- package/assets/esri/core/workers/chunks/0e81b6aa64d5491870b2.js +0 -1
- package/assets/esri/core/workers/chunks/126a8c26618425790804.js +0 -1
- package/assets/esri/core/workers/chunks/1a7c0a1dc6ecc93ea03a.js +0 -1
- package/assets/esri/core/workers/chunks/1cb1f125dccbf8c8cac9.js +0 -1
- package/assets/esri/core/workers/chunks/1f03e34520746e432719.js +0 -1
- package/assets/esri/core/workers/chunks/292498a9c7d462d215c6.js +0 -1
- package/assets/esri/core/workers/chunks/2ed81f1e490cb7e73405.js +0 -1
- package/assets/esri/core/workers/chunks/32f26757e36704923286.js +0 -1
- package/assets/esri/core/workers/chunks/33e86dd1a54e447fa0e3.js +0 -1
- package/assets/esri/core/workers/chunks/35c87b0a4d4ee7ce302d.js +0 -1
- package/assets/esri/core/workers/chunks/36b904912cea1744d1c6.js +0 -1
- package/assets/esri/core/workers/chunks/3a35779cae6a11cde51b.js +0 -1
- package/assets/esri/core/workers/chunks/3b7060d264888bf298b1.js +0 -1
- package/assets/esri/core/workers/chunks/3df5394b17e9659ecb8f.js +0 -1
- package/assets/esri/core/workers/chunks/4adfe7f8a8efe2cd8e80.js +0 -1
- package/assets/esri/core/workers/chunks/511b9c12a7479d39dac0.js +0 -1
- package/assets/esri/core/workers/chunks/5396a894e6f8030ca088.js +0 -1
- package/assets/esri/core/workers/chunks/5728d8440aca205e4f53.js +0 -1
- package/assets/esri/core/workers/chunks/66392ff750c28064040a.js +0 -1
- package/assets/esri/core/workers/chunks/668d84dc512b3085a960.js +0 -1
- package/assets/esri/core/workers/chunks/6849282c4a5cd733779d.js +0 -1
- package/assets/esri/core/workers/chunks/6adc17e6e287a365ad8d.js +0 -1
- package/assets/esri/core/workers/chunks/6db5ee9c589265b23b60.js +0 -1
- package/assets/esri/core/workers/chunks/76ed8e455f6bd79e561c.js +0 -1
- package/assets/esri/core/workers/chunks/7c34eb94e2c74602aeab.js +0 -1
- package/assets/esri/core/workers/chunks/831455798b177678720c.js +0 -1
- package/assets/esri/core/workers/chunks/88b08b386926ec889573.js +0 -1
- package/assets/esri/core/workers/chunks/8bd4c43c34aacf3b07da.js +0 -1
- package/assets/esri/core/workers/chunks/8ca88cfc0b9f84dc5832.js +0 -1
- package/assets/esri/core/workers/chunks/928b18e13e015330d44b.js +0 -1
- package/assets/esri/core/workers/chunks/937e347d130d469518ce.js +0 -1
- package/assets/esri/core/workers/chunks/93b40245378ced43ca08.js +0 -1
- package/assets/esri/core/workers/chunks/98dfe31e8ed9b522eaff.js +0 -1
- package/assets/esri/core/workers/chunks/a18cb809dd56c5537b3b.js +0 -1
- package/assets/esri/core/workers/chunks/a195f569eada3a8736be.js +0 -1
- package/assets/esri/core/workers/chunks/a40ede4d3375184f21fe.js +0 -1
- package/assets/esri/core/workers/chunks/a8167ab9fd846d699be5.js +0 -1
- package/assets/esri/core/workers/chunks/af96cbc4fb7bef726635.js +0 -1
- package/assets/esri/core/workers/chunks/b87aca8ad281870ae970.js +0 -1
- package/assets/esri/core/workers/chunks/ceb5bd9f2afaa2ea0808.js +0 -1
- package/assets/esri/core/workers/chunks/d25c37f169577a33db46.js +0 -1
- package/assets/esri/core/workers/chunks/d374cb2d17a2d11c500f.js +0 -1
- package/assets/esri/core/workers/chunks/dadf85890961bcc205eb.js +0 -1
- package/assets/esri/core/workers/chunks/db279d5d9c7deec554bb.js +0 -1
- package/assets/esri/core/workers/chunks/de0c94defb90e1805081.js +0 -1
- package/assets/esri/core/workers/chunks/e1340232962cf576d37e.js +0 -1
- package/assets/esri/core/workers/chunks/e38d1ba15babc238b151.js +0 -1
- package/assets/esri/core/workers/chunks/e73bb7c8de7412d9975c.js +0 -1
- package/assets/esri/core/workers/chunks/f23351a04643c464be84.js +0 -1
- package/assets/esri/core/workers/chunks/f3d331da3c61af5c5a2f.js +0 -1
- package/assets/esri/core/workers/chunks/f5125925f83c979edde7.js +0 -2
- package/assets/esri/core/workers/chunks/f912c173c58ae4299cbe.js +0 -1
- package/assets/esri/core/workers/chunks/f93facf47aba9b128fcc.js +0 -1
- package/assets/esri/core/workers/chunks/fae147d03ed723ab234d.js +0 -1
- package/views/2d/engine/ManagedCanvas.js +0 -2
- package/views/2d/layers/features/support/FeatureSetReaderAnnotationJSON.js +0 -2
- package/views/2d/layers/features/support/FeatureSetReaderDimensionJSON.js +0 -2
- package/views/2d/layers/support/annodime/annotationUtils.js +0 -2
- package/views/3d/state/controllers/SurfaceCollisionCorrectionController.js +0 -2
- /package/assets/esri/core/workers/chunks/{f5125925f83c979edde7.js.LICENSE.txt → f10a339b16d84b650012.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__addDisposableResource as e,__disposeResources as t,__decorate as r}from"tslib";import s from"../PopupTemplate.js";import i from"../request.js";import{ClonableMixin as o}from"../core/Clonable.js";import a from"../core/Collection.js";import n from"../core/Error.js";import{disposable as l,makeHandle as p}from"../core/handleUtils.js";import{MultiOriginJSONSupportMixin as u}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,whenOrAbort as y,onAbort as m}from"../core/promiseUtils.js";import{watch as h,sync as c}from"../core/reactiveUtils.js";import{join as f}from"../core/urlUtils.js";import{property as b,subclass as v}from"../core/accessorSupport/decorators.js";import g from"./Layer.js";import{APIKeyMixin as
|
|
2
|
+
import{__addDisposableResource as e,__disposeResources as t,__decorate as r}from"tslib";import s from"../PopupTemplate.js";import i from"../request.js";import{ClonableMixin as o}from"../core/Clonable.js";import a from"../core/Collection.js";import n from"../core/Error.js";import{disposable as l,makeHandle as p}from"../core/handleUtils.js";import{MultiOriginJSONSupportMixin as u}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,whenOrAbort as y,onAbort as m}from"../core/promiseUtils.js";import{watch as h,sync as c}from"../core/reactiveUtils.js";import{join as f}from"../core/urlUtils.js";import{property as b,subclass as v}from"../core/accessorSupport/decorators.js";import g from"../geometry/SpatialReference.js";import S from"./Layer.js";import{APIKeyMixin as j}from"./mixins/APIKeyMixin.js";import{ArcGISService as L}from"./mixins/ArcGISService.js";import{BlendLayer as E}from"./mixins/BlendLayer.js";import{CustomParametersMixin as I}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as F}from"./mixins/EditBusLayer.js";import{FeatureLayerBase as w}from"./mixins/FeatureLayerBase.js";import{OperationalLayer as T}from"./mixins/OperationalLayer.js";import{PortalLayer as x}from"./mixins/PortalLayer.js";import{RefreshableLayer as P}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as _}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as O}from"./mixins/TemporalLayer.js";import C from"./support/AnnotationFeatureSublayer.js";import{parse as A,cleanTitle as q,titleFromUrlAndName as D}from"./support/arcgisLayerUrl.js";import{barrierWeight as U,id as k,popupEnabled as M}from"./support/commonProperties.js";import{ensureLayerCredential as R,createQuery as G,getFieldDomain as N,hasDataChanged as Q}from"./support/featureLayerUtils.js";import{defineFieldProperties as H}from"./support/fieldProperties.js";import{fixTimeInfoFields as J}from"./support/fieldUtils.js";import{serviceSupportsSpatialReference as $}from"./support/versionUtils.js";import B from"../rest/support/Query.js";import{createPopupTemplate as K}from"../support/popupUtils.js";import{reader as V}from"../core/accessorSupport/decorators/reader.js";const W="annotation-feature-layer",Z=H(),z=a.ofType(C);let X=class extends(w(E(O(F(_(P(L(T(x(u(I(j(o(S)))))))))))))){constructor(e){super(e),this._sublayerLookup=new Map,this.barrierWeight="high",this.fields=null,this.fieldsIndex=null,this.operationalLayerType="ArcGISAnnotationLayer",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.source=null,this.sublayers=new z,this.sublayerTitleMode="item-title",this.supportedSourceTypes=new Set(["Annotation Layer"]),this.type="annotation-feature",this._dataElementPromise=null,this.addHandles(h(()=>this.sublayers,(e,t)=>this._handleSublayersChange(e,t),c))}destroy(){this.source?.destroy()}load(e){const t=e?.signal,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(d).then(async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(t);null!=e&&(this.layerId=e)}if(!this.url)throw new n(`${W}:missing-url`,"AnnotationFeatureLayer must be created with a url");return this.initLayerProperties(await this.createGraphicsSource(t))}).then(()=>R(this,"load",e));return this.addResolvingPromise(r),Promise.resolve(this)}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get effectiveEditingEnabled(){return!1}get defaultPopupTemplate(){return this.createPopupTemplate()}readSublayers(e,t){const r=new z(t.subtypes.map(({code:e})=>new C({subtypeCode:e})).reverse());if(this.visibleLayers){const e=new Set(this.visibleLayers);r.forEach(t=>{t.visible=e.has(t.subtypeCode)})}return r}readTitleFromService(e,t){const{url:r}=this,s=t.name||A(r)?.title;switch(this.sublayerTitleMode){case"item-title":if(r)return D(r,s);break;case"item-title-and-service-name":{let e=this.portalItem?.title;if(e&&e!==s)return e=q(e),s?`${e} - ${q(s)}`:e;break}}return s?q(s):void 0}readTitleFromPortalItem(e){return"item-title"===this.sublayerTitleMode?e:void 0}get visibleLayers(){return 0===this.sublayers.length?this._get("visibleLayers")??null:Array.from(new Set(this.sublayers?.toArray().filter(e=>e.visible).map(e=>e.subtypeCode).sort((e,t)=>e-t)??null))}set visibleLayers(e){this._set("visibleLayers",e)}createPopupTemplate(e){return K(this,e)}async createGraphicsSource(r){const s={stack:[],error:void 0,hasError:!1};try{const{default:t}=await y(import("./graphics/sources/FeatureLayerSource.js"),r),i=new t({layer:this,supportedSourceTypes:this.supportedSourceTypes});e(s,l(m(r,()=>i.cancelLoad())??p()),!1);return await i.load({signal:r}),i}catch(i){s.error=i,s.hasError=!0}finally{t(s)}}createQuery(){const e=G(this);return e.where=this.definitionExpression||"1=1",e}async fetchDataElement(e){if(this._dataElementPromise)return this._dataElementPromise;if(!this.url)throw new Error("InternalError: A URL is required to retrieve the data element for this layer.");const t=f(this.url,"queryDataElements"),r={f:"json",layers:this.layerId};return this._dataElementPromise=i(t,{...e,responseType:"json",query:r}).then(e=>{const t=e.data.layerDataElements,r=this.layerId,s=t.find(e=>e.layerId===r);if(!s)throw new n("fetchDataElement:not-available","A data element for this layer could not be retrieved.");return s.dataElement}),this._dataElementPromise}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){return N(this,e,t,this.getField(e)?.domain??null)}async queryFeatures(e,t){const r=await this.load(),s=await r.source.queryFeatures(B.from(e)??r.createQuery(),t);if(s?.features)for(const i of s.features){const e=this.findSublayerForFeature(i);i.origin=e?.graphicOrigin,i.layer=i.sourceLayer=this}return s}async queryObjectIds(e,t){const r=await this.load();return r.source.queryObjectIds(B.from(e)??r.createQuery(),t)}async queryFeatureCount(e,t){const r=await this.load();return r.source.queryFeatureCount(B.from(e)??r.createQuery(),t)}async queryExtent(e,t){const r=await this.load();return r.source.queryExtent(B.from(e)??r.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&$(this,e)}async initLayerProperties(e){this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),J(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return Q(this)}_verifySource(){if(this.version&&this.version<10.8)throw new n(W+":unsupported-version","The feature service must be version 10.8 or above.");const e=["ZOrder","AnnotationClassID","Element","SymbolID","Status"],t=e.filter(e=>!this.fieldsIndex.has(e));if(this.fieldsIndex.has("FeatureID")||this.fieldsIndex.has("FeatureGlobalID")||t.unshift("FeatureID","FeatureGlobalID"),t.length)throw new n(W+":missing-fields","There are missing fields to operate properly",{requiredFields:e,missingFields:t})}_fetchFirstValidLayerId(e){return i(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(e=>{const t=e.data;if(!t)return;this.applyPreferredHost(t);const r=[...t.layers||[],...t.tables||[]];return r.find(({type:e})=>!e||this.supportedSourceTypes.has(e))?.id})}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach(e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),e.on("after-remove",({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)})],"sublayers-owner"))}};r([b({type:g,json:{origins:{service:{read:{source:"sourceSpatialReference"}}}}})],X.prototype,"attributeSpatialReference",void 0),r([b(U)],X.prototype,"barrierWeight",void 0),r([b({json:{write:!0}})],X.prototype,"editingEnabled",null),r([b({readOnly:!0})],X.prototype,"effectiveEditingEnabled",null),r([b({...Z.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],X.prototype,"fields",void 0),r([b(Z.fieldsIndex)],X.prototype,"fieldsIndex",void 0),r([b(k)],X.prototype,"id",void 0),r([b({type:["ArcGISAnnotationLayer"]})],X.prototype,"operationalLayerType",void 0),r([b(Z.outFields)],X.prototype,"outFields",void 0),r([b(M)],X.prototype,"popupEnabled",void 0),r([b({type:s,json:{name:"popupInfo",write:!0}})],X.prototype,"popupTemplate",void 0),r([b({readOnly:!0})],X.prototype,"defaultPopupTemplate",null),r([b({clonable:!1,readOnly:!0})],X.prototype,"source",void 0),r([b({type:z})],X.prototype,"sublayers",void 0),r([V("service","sublayers",["subtypes"])],X.prototype,"readSublayers",null),r([b({type:String})],X.prototype,"sublayerTitleMode",void 0),r([V("service","title",["name"])],X.prototype,"readTitleFromService",null),r([V("portal-item","title")],X.prototype,"readTitleFromPortalItem",null),r([b({json:{read:!1},value:"annotation-feature",readOnly:!0})],X.prototype,"type",void 0),r([b({type:[Number],json:{write:{ignoreOrigin:!0}}})],X.prototype,"visibleLayers",null),X=r([v("esri.layers.AnnotationFeatureLayer")],X);const Y=X;export{Y as default};
|
|
@@ -76,8 +76,6 @@ export interface DimensionFeatureLayerEvents extends EditBusLayerEvents, Refresh
|
|
|
76
76
|
* > **Known Limitations**
|
|
77
77
|
* > The following features are not currently supported at this release. Future releases will see increased functionality and support for additional features.
|
|
78
78
|
* > * Editing
|
|
79
|
-
* > * [DimensionFeatureLayerView.featureEffect](https://developers.arcgis.com/javascript/latest/references/core/views/layers/DimensionFeatureLayerView/#featureEffect)
|
|
80
|
-
* > * [DimensionFeatureLayerView.filter](https://developers.arcgis.com/javascript/latest/references/core/views/layers/DimensionFeatureLayerView/#filter)
|
|
81
79
|
*
|
|
82
80
|
* @beta
|
|
83
81
|
* @since 5.1
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__addDisposableResource as e,__disposeResources as r,__decorate as t}from"tslib";import i from"../PopupTemplate.js";import
|
|
2
|
+
import{__addDisposableResource as e,__disposeResources as r,__decorate as t}from"tslib";import i from"../PopupTemplate.js";import s from"../request.js";import{ClonableMixin as o}from"../core/Clonable.js";import a from"../core/Error.js";import{disposable as n,makeHandle as l}from"../core/handleUtils.js";import{MultiOriginJSONSupportMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as u,whenOrAbort as d,onAbort as m}from"../core/promiseUtils.js";import{join as c}from"../core/urlUtils.js";import{property as h,subclass as y}from"../core/accessorSupport/decorators.js";import f from"../geometry/SpatialReference.js";import E from"../graphic/DimensionFeatureGraphicOrigin.js";import g from"./Layer.js";import{APIKeyMixin as v}from"./mixins/APIKeyMixin.js";import{ArcGISService as j}from"./mixins/ArcGISService.js";import{BlendLayer as S}from"./mixins/BlendLayer.js";import{CustomParametersMixin as T}from"./mixins/CustomParametersMixin.js";import{FeatureLayerBase as I}from"./mixins/FeatureLayerBase.js";import{OperationalLayer as b}from"./mixins/OperationalLayer.js";import{PortalLayer as L}from"./mixins/PortalLayer.js";import{RefreshableLayer as P}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as w}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as F}from"./mixins/TemporalLayer.js";import{parse as D,cleanTitle as x,titleFromUrlAndName as O}from"./support/arcgisLayerUrl.js";import{barrierWeight as M,id as q,popupEnabled as N}from"./support/commonProperties.js";import{ensureLayerCredential as G,createQuery as U,getFieldDomain as _,hasDataChanged as A}from"./support/featureLayerUtils.js";import{defineFieldProperties as R}from"./support/fieldProperties.js";import{fixTimeInfoFields as X}from"./support/fieldUtils.js";import{serviceSupportsSpatialReference as Y}from"./support/versionUtils.js";import C from"../rest/support/Query.js";import{createPopupTemplate as Q}from"../support/popupUtils.js";import{reader as H}from"../core/accessorSupport/decorators/reader.js";const J="dimension-feature-layer",k=R();let B=class extends(I(S(F(w(P(j(b(L(p(T(v(o(g))))))))))))){constructor(e){super(e),this.barrierWeight="high",this.fields=null,this.fieldsIndex=null,this.graphicOrigin=new E(this),this.operationalLayerType="ArcGISDimensionLayer",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.source=null,this.sublayerTitleMode="item-title",this.supportedSourceTypes=new Set(["Dimension Layer"]),this.type="dimension-feature",this._dataElementPromise=null}destroy(){this.source?.destroy()}load(e){const r=e?.signal,t=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(u).then(async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(r);null!=e&&(this.layerId=e)}if(!this.url)throw new a(`${J}:missing-url`,"DimensionFeatureLayer must be created with a url");return this.initLayerProperties(await this.createGraphicsSource(r))}).then(()=>G(this,"load",e));return this.addResolvingPromise(t),Promise.resolve(this)}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get effectiveEditingEnabled(){return!1}get defaultPopupTemplate(){return this.createPopupTemplate()}readTitleFromService(e,r){const{url:t}=this,i=r.name||D(t)?.title;switch(this.sublayerTitleMode){case"item-title":if(t)return O(t,i);break;case"item-title-and-service-name":{let e=this.portalItem?.title;if(e&&e!==i)return e=x(e),i?`${e} - ${x(i)}`:e;break}}return i?x(i):void 0}readTitleFromPortalItem(e){return"item-title"===this.sublayerTitleMode?e:void 0}createPopupTemplate(e){return Q(this,e)}async createGraphicsSource(t){const i={stack:[],error:void 0,hasError:!1};try{const{default:r}=await d(import("./graphics/sources/FeatureLayerSource.js"),t),s=new r({layer:this,supportedSourceTypes:this.supportedSourceTypes});e(i,n(m(t,()=>s.cancelLoad())??l()),!1);return await s.load({signal:t}),s}catch(s){i.error=s,i.hasError=!0}finally{r(i)}}createQuery(){const e=U(this);return e.where=this.definitionExpression||"1=1",e}async fetchDataElement(e){if(this._dataElementPromise)return this._dataElementPromise;if(!this.url)throw new Error("InternalError: A URL is required to retrieve the data element for this layer.");const r=c(this.url,"queryDataElements"),t={f:"json",layers:this.layerId};return this._dataElementPromise=s(r,{...e,responseType:"json",query:t}).then(e=>{const r=e.data.layerDataElements,t=this.layerId,i=r.find(e=>e.layerId===t);if(!i)throw new a("fetchDataElement:not-available","A data element for this layer could not be retrieved.");return i.dataElement}),this._dataElementPromise}getFieldDomain(e,r){return _(this,e,r,this.getField(e)?.domain??null)}async queryFeatures(e,r){const t=await this.load(),i=await t.source.queryFeatures(C.from(e)??t.createQuery(),r),s=this.graphicOrigin;if(i?.features)for(const o of i.features)o.layer=o.sourceLayer=t,o.origin=s;return i}async queryObjectIds(e,r){const t=await this.load();return t.source.queryObjectIds(C.from(e)??t.createQuery(),r)}async queryFeatureCount(e,r){const t=await this.load();return t.source.queryFeatureCount(C.from(e)??t.createQuery(),r)}async queryExtent(e,r){const t=await this.load();return t.source.queryExtent(C.from(e)??t.createQuery(),r)}serviceSupportsSpatialReference(e){return this.loaded&&Y(this,e)}async initLayerProperties(e){this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),X(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return A(this)}_verifySource(){if(this.version&&this.version<10.8)throw new a(J+":unsupported-version","The feature service must be version 10.8 or above.");const e=["DIMLENGTH","BEGINX","BEGINY","ENDX","ENDY","DIMX","DIMY","TEXTX","TEXTY","DIMTYPE","EXTANGLE","STYLEID","USECUSTOMLENGTH","CUSTOMLENGTH","DIMDISPLAY","EXTDISPLAY","MARKERDISPLAY","TEXTANGLE"],r=e.filter(e=>!this.fieldsIndex.has(e));if(r.length)throw new a(J+":missing-fields","There are missing fields to operate properly",{requiredFields:e,missingFields:r})}_fetchFirstValidLayerId(e){return s(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(e=>{const r=e.data;if(!r)return;this.applyPreferredHost(r);const t=[...r.layers||[],...r.tables||[]];return t.find(({type:e})=>!e||this.supportedSourceTypes.has(e))?.id})}};t([h({type:f,json:{origins:{service:{read:{source:"sourceSpatialReference"}}}}})],B.prototype,"attributeSpatialReference",void 0),t([h(M)],B.prototype,"barrierWeight",void 0),t([h({json:{write:!0}})],B.prototype,"editingEnabled",null),t([h({readOnly:!0})],B.prototype,"effectiveEditingEnabled",null),t([h({...k.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],B.prototype,"fields",void 0),t([h(k.fieldsIndex)],B.prototype,"fieldsIndex",void 0),t([h({readOnly:!0,clonable:!1})],B.prototype,"graphicOrigin",void 0),t([h(q)],B.prototype,"id",void 0),t([h({type:["ArcGISDimensionLayer"]})],B.prototype,"operationalLayerType",void 0),t([h(k.outFields)],B.prototype,"outFields",void 0),t([h(N)],B.prototype,"popupEnabled",void 0),t([h({type:i,json:{name:"popupInfo",write:!0}})],B.prototype,"popupTemplate",void 0),t([h({readOnly:!0})],B.prototype,"defaultPopupTemplate",null),t([h({clonable:!1,readOnly:!0})],B.prototype,"source",void 0),t([h({type:String})],B.prototype,"sublayerTitleMode",void 0),t([H("service","title",["name"])],B.prototype,"readTitleFromService",null),t([H("portal-item","title")],B.prototype,"readTitleFromPortalItem",null),t([h({json:{read:!1},value:"dimension-feature",readOnly:!0})],B.prototype,"type",void 0),B=t([y("esri.layers.DimensionFeatureLayer")],B);const $=B;export{$ as default};
|
package/layers/LinkChartLayer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{serializationUtilsModuleWrapper as t}from"../applications/KnowledgeStudio/resourceSerializationUtils.js";import i from"../core/Collection.js";import{deprecated as a}from"../core/deprecate.js";import n from"../core/Error.js";import o from"../core/Logger.js";import{getOrCreateMapValue as s}from"../core/MapUtils.js";import{MultiOriginJSONSupportMixin as r}from"../core/MultiOriginJSONSupport.js";import{throwIfAborted as l,isAbortError as h,createAbortError as d}from"../core/promiseUtils.js";import{watch as p,sync as c}from"../core/reactiveUtils.js";import{property as u,subclass as y}from"../core/accessorSupport/decorators.js";import{idToName as g}from"../core/accessorSupport/PropertyOrigin.js";import m from"../geometry/Extent.js";import f from"../geometry/Point.js";import L from"../geometry/Polyline.js";import{polygonCentroidPoint as w}from"../geometry/support/centroid.js";import k from"./Layer.js";import{convertFromGeometry as b}from"./graphics/featureConversionUtils.js";import{systemOidFieldName as M,systemOriginIdFieldName as C,systemDestinationIdFieldName as T,systemLayoutGeometryFieldName as v,systemAggregationCountFieldName as E}from"./knowledgeGraph/constants.js";import{IdealEdgeLengthTypeOptions as N}from"./knowledgeGraph/IdealEdgeLengthTypeOptions.js";import{KnowledgeGraphLayerDataManager as S}from"./knowledgeGraph/KnowledgeGraphLayerDataManager.js";import D from"./knowledgeGraph/KnowledgeGraphSublayer.js";import{getTitleFromServerUrl as x,getUserKGSPrivileges as I,createCapabilitiesFromKnowledgeGraph as _,initializeLayersFromClientData as R}from"./knowledgeGraph/layerUtils.js";import A from"./knowledgeGraph/SessionMemoryStorage.js";import{convertLayoutTypeToWebSupportedFormat as j,getRelationshipEndNodeIds as P}from"./knowledgeGraph/supportUtils.js";import{BlendLayer as G}from"./mixins/BlendLayer.js";import{OperationalLayer as U}from"./mixins/OperationalLayer.js";import{ScaleRangeLayer as F}from"./mixins/ScaleRangeLayer.js";import{url as z}from"./support/commonProperties.js";import{LCChronologicalLayout as O,LCSimpleLayout as B,LCSmartTreeLayout as H,LCRadialTreeLayout as Q,LCHierarchicalLayout as V,LCCommunityLayout as W,LCForceDirectedLayout as $,load as K}from"../libs/linkchartlayout/LinkChartLayout.js";import J from"../linkChart/LayoutSettings.js";import Z from"../linkChart/RootedLayoutSettings.js";import{getCreationDatesForResources as q}from"../linkChart/utils.js";import{fetchKnowledgeGraph as X}from"../rest/knowledgeGraphService.js";import{timeZoneProperty as Y}from"../time/timeZoneUtils.js";let ee=class extends(U(G(F(r(k))))){constructor(e){if(super(e),this.url=null,this.dataPreloadedInLocalCache=!1,this.initializationLinkChartConfig=null,this.membershipModified=!0,this._currentLinkChartConfig={layoutMode:"organic-standard"},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new(i.ofType(D)),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new m({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="LinkChartLayer",this.sublayerIdsCache=new Map,this.tables=new(i.ofType(D)),this.type="link-chart",this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1,this.chronologicalAuxiliaryGraphics=null,this._originalInclusionList=e?.initializationInclusionModeDefinition,e?.dataPreloadedInLocalCache&&!e?.initializationInclusionModeDefinition)throw new n("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it");this.addHandles(p(()=>this.layers.concat(this.tables),(e,t)=>this._handleSublayersChange(e,t),c))}normalizeCtorArgs(e){if(!e)return{};const{url:t,dataPreloadedInLocalCache:i,initializationLinkChartConfig:a}=e;let{title:n}=e;return!n&&e?.url&&(n=x(e.url)),{url:t,title:n,dataPreloadedInLocalCache:i,initializationLinkChartConfig:a}}_initializeLayerProperties(e){const t=new Set;let i=[],a=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new n("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.inclusionModeDefinition?.generateAllSublayers?(i=e.knowledgeGraph.dataModel.entityTypes??[],a=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach((n,s)=>{const r=this._graphTypeLookup.get(s);if(!r)return o.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(s);"relationship"===r.type?t.has(s)||(t.add(s),a.push(r)):"entity"===r.type?t.has(s)||(t.add(s),i.push(r)):(o.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(s))}):(i=e.knowledgeGraph.dataModel.entityTypes??[],a=e.knowledgeGraph.dataModel.relationshipTypes??[]);const s=new S({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=i,this.memberRelationshipTypes=a,this.dataManager=s}load(e){const i=async()=>{const e=[],t=[];this.loadLayerAssumingLocalCache(),this._layersLoadedFromAuthoritativeItem()||await R(this),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(e=>{e.useAllData=!1}),await this._initializeDiagram(),this.layers.forEach(i=>{t.push(i.refreshCachedQueryEngine()),e.push(new Promise(e=>{i.on("layerview-create",()=>{e(null)})}))}),this.tables.forEach(e=>{t.push(e.refreshCachedQueryEngine())}),await Promise.all(t)};return this.addResolvingPromise(new Promise(a=>{X(this.url).then(async n=>{n.dataModel.entityTypes?.forEach(e=>{e.name&&this._graphTypeLookup.set(e.name,e)}),n.dataModel.relationshipTypes?.forEach(e=>{e.name&&this._graphTypeLookup.set(e.name,e)});const o=this.linkChart?.linkChartProperties;6===o?.originIdOf("entitiesUrl")&&(this.membershipModified=!1,q([o.entitiesUrl??"",o.relationshipsUrl??""],this.linkChart?.portalItem?.itemUrl??"").then(e=>{this.linkChart?.linkChartProperties.setCreationDatesForResources(e)}),this._originalInclusionList=await t.fetchAndConvertSerializedLinkChart({entitiesUrl:o?.entitiesUrl,relationshipsUrl:o?.relationshipsUrl},{signal:e?.signal}),this._alignLayersDataModelAndInclusionDefinition(n.dataModel),this.initializationLinkChartConfig={layoutSettings:o?.layoutSettings??void 0,layoutMode:j(o.layoutType)}),this._initializeLayerProperties({knowledgeGraph:n,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach(e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}));const{edit:r,fullEdit:h,updateItem:d}=await I(n.serviceDefinition.serviceItemId,this.url,e);if(this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",h),this._set("userHasUpdateItemPrivileges",d),this.read({dateFieldsTimeReference:n.serviceDefinition.dateFieldsTimeReference},{origin:"service"}),this.dataPreloadedInLocalCache){const e=A.getInstance();for(const[t,i]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions??[])for(const a of i.members?.values()??[]){const i=e.readFromStoreById(`${t}__${a.id}`);if(i){s(this.dataManager.sublayerCaches,t,()=>new Map).set(a.id,i)}}await i()}else{const t="geographic-organic-standard"===this.initializationLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,t,!0).then(async()=>{l(e),await i()}))}a(null)})})),Promise.resolve(this)}set initializationInclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("initializationInclusionModeDefinition",e):o.getLogger(this).error("#initializationInclusionModeDefinition","initializationInclusionModeDefinition cannot be changed after the layer is loaded.")}get linkChart(){return this.parent}get sublayerCapabilities(){return _(this.knowledgeGraph)}async addRecords(e,t){let i=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(i=await P(e,this.dataManager.knowledgeGraph));const a=e.concat(i).filter(e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id));a.length>0&&(this.membershipModified=!0),await this._handleNewRecords(a,t)}async createSublayerForNamedType(e){await this.load();const t=this._graphTypeLookup.get(e);if(!t)throw new n("knowledge-graph:missing-type","The specified type does not exist in the knowledge graph.");if(this.dataManager.sublayerCaches.has(e))throw new n("knowledge-graph:duplicate-type","The specified type already exists as a sublayer.");this.dataManager.sublayerCaches.set(e,new Map),s(this.sublayerIdsCache,e,()=>new Set);const i=this._createSublayer(t);return"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.set(e,{useAllData:!1,members:new Map}),i.geometryType?this.layers.push(i):this.tables.push(i),await R(this,[e]),this._refreshNamedTypes(),i}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:i=!1,overrideMembershipCheck:a=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1,overrideMembershipCheck:!1}){let n=[];for(const l of e)(a||!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(l.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(l.typeName)?.members?.has(l.id))&&n.push(l);if(t){const e=new Set,t=[];for(const i of n)if(this.dataManager.nodeConnectionsLookup.has(i.id))for(const t of this.dataManager.nodeConnectionsLookup.get(i.id))e.add(t);for(const i of e)if(this.dataManager.memberIdTypeLookup.has(i))for(const e of this.dataManager.memberIdTypeLookup.get(i))this.dataManager.relationshipTypeNames.has(e)&&t.push({id:i,typeName:e});n=n.concat(t)}const o=this._currentLinkChartConfig.layoutSettings?.rootedLayoutSettings?.rootEntities;if(o?.length){const e=new Set(n.map(({id:e})=>e)),t=o.filter(({id:t})=>!e.has(t));if(t.length!==o.length){this._currentLinkChartConfig.layoutSettings.rootedLayoutSettings.rootEntities=t;const e=this.linkChart?.linkChartProperties;e?.layoutSettings?.rootedLayoutSettings&&(e.layoutSettings.rootedLayoutSettings.rootEntities=t)}}this.dataManager.removeFromLayer(n);for(const l of n)this.sublayerIdsCache.get(l.typeName)?.delete(l.id),this.dataManager.relationshipTypeNames.has(l.typeName)?this.relationshipLinkChartDiagramLookup.delete(l.id):this.entityLinkChartDiagramLookup.delete(l.id);const s=i?void 0:this.getCurrentNodeLocations();await this._calculateLayoutWithSublayerTimeInfo(this._currentLinkChartConfig.layoutMode,{layoutSettings:this._currentLinkChartConfig.layoutSettings,lockedEntityLocations:s}),n.length>0&&(this.membershipModified=!0);const r=[];return this.layers.forEach(e=>{r.push(e.refreshCachedQueryEngine())}),await Promise.all(r),this._refreshNamedTypes(),n}async expand(e,t){let i=[];try{const a=await this.dataManager.getConnectedRecordIds(e,t?.relationshipTypeNames,t);i=a.filter(e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)),await this._handleNewRecords(i,t),a.length>0&&(this.membershipModified=!0),l(t?.signal)}catch(a){throw h(a)&&i.length>0&&await this.removeRecords(i,{overrideMembershipCheck:!0}),a}return{records:i}}loadLayerAssumingLocalCache(){const e=[...this.memberRelationshipTypes,...this.memberEntityTypes];this.layers.length||0===this.originIdOf("tables")?0===this.originIdOf("layers")?this._createSublayers(e,this.layers,e=>!!e.geometryType):this._updateSublayers(e,this.layers):this.layers=new i,this.tables.length||0===this.originIdOf("layers")?0===this.originIdOf("tables")?this._createSublayers(e,this.tables,e=>!e.geometryType):this._updateSublayers(e,this.tables):this.tables=new i,this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{const i=s(this.sublayerIdsCache,t,()=>new Set);e.members?.forEach(({id:e,linkChartLocation:a})=>{if(i.add(e),a){const i="coords"in a&&"lengths"in a?a:b(a);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e,i):this.entityLinkChartDiagramLookup.set(e,i)}})})}async calculateLinkChartLayout(e="organic-standard",t){const i=[],a=[],r=[];this.dataManager.sublayerCaches.forEach((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach(e=>{i.push({typeName:t,feature:e})}):this.dataManager.relationshipTypeNames.has(t)&&e.forEach(e=>{a.push({typeName:t,feature:e})})}),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;const h=new Map,p=new Map,c=new Map,u=new Map,y=new Uint8Array(i.length),g=new Float64Array(i.length),k=new Float64Array(i.length),N=new Float64Array(i.length),S=new Float64Array(i.length),D=new Uint32Array(a.length),x=new Uint32Array(a.length),I=new Float64Array(a.length),_=new Float64Array(a.length),R=[],A="organic-standard";let j=!1;const P=new m({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let G,U="organic-standard",F=0,z=0;const J=O.apply;switch(U="geographic-organic-standard"===e?A:e,U){case"organic-standard":G=$.apply;break;case"organic-community":G=W.apply;break;case"hierarchical-bottom-to-top":G=V.apply;break;case"radial-root-centric":G=Q.apply;break;case"tree-left-to-right":G=H.apply;break;default:G=B.apply}let Z=!1;const q=new Set(t?.layoutSettings?.rootedLayoutSettings?.rootEntities?.map(({id:e})=>e));i.forEach(({typeName:i,feature:a})=>{if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e&&t?.lockedEntityLocations?.has(a.attributes[M])){"geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(i)?y[F]=2:y[F]=0;const n=t.lockedEntityLocations.get(a.attributes[M]);g[F]=n.x,k[F]=n.y}else if("geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(i)){y[F]=2;let e=null;const t=a.attributes[this.dataManager.geographicLookup.get(i).name],n=this.dataManager.geographicLookup.get(i)?.geometryType;switch(n){case"esriGeometryPoint":g[F]=t?.x,k[F]=t?.y;break;case"esriGeometryPolygon":{const i=t?w(t):null;e=i?f.fromJSON(i):null,null!=e?.x&&null!=e?.y?(g[F]=e.x,k[F]=e.y):y[F]=1;break}case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(g[F]=e.x,k[F]=e.y):y[F]=1;break;default:y[F]=1}(null==g[F]||null==k[F]||Number.isNaN(g[F])||Number.isNaN(k[F]))&&(y[F]=1,g[F]=0,k[F]=0)}else if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){!Z&&t?.lockedEntityLocations?.has(a.attributes[M])&&(Z=!0);const e=t?.timeInfoByTypeName?.get(i),n=e?.startField,o=n&&e?.startField?a.attributes[n]:null;N[F]=o?new Date(o).getTime():NaN;const s=e?.endField,r=s&&e?.endField?a.attributes[s]:null;S[F]=r?new Date(r).getTime():NaN,g[F]=0,k[F]=0,y[F]=1}else y[F]=1,g[F]=0,k[F]=0;q.has(a.attributes[M])&&(y[F]|=4),u.set(a.attributes[M],F),R[F]={feature:a,typeName:i},F++}),Z&&o.getLogger(this).warn("Locked node locations are not supported for chronological layout at this time. Requested node locations were ignored");let X=!1;const Y=new Map;a.forEach(i=>{const a=i.feature.attributes[C],n=i.feature.attributes[T],o=u.get(a),s=u.get(n),l=t?.timeInfoByTypeName?.get(i.typeName),h=t?.timeInfoByTypeName?l?.startField:null,d=h?i.feature.attributes[h]:null,p=l?.endField,c=p?i.feature.attributes[p]:null;if(void 0!==o&&void 0!==s){let t=a+"-"+n;"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(t=t+"-"+d+"-"+c);const l=Y.get(t),h=l?.has(i.typeName);h||(D[z]=o,x[z]=s,"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(I[z]=d?new Date(d).getTime():NaN,_[z]=c?new Date(c).getTime():NaN),void 0===l?Y.set(t,new Map([[i.typeName,z]])):l.set(i.typeName,z),z++),r.push(i)}else X=!0,this.relationshipLinkChartDiagramLookup.set(a,null)}),X&&o.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null");const ee=this._validateOrganicLayoutSettings(e,t?.layoutSettings?.organicLayoutSettings),te=this._convertValidatedOrganicSettingsToCalculationSettings(ee);await K();let ie=1,ae=null;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){let i;({status:ie,links:ae,graphics:i}=J(()=>t?.signal?.aborted??!1,y,g,k,N,S,D.subarray(0,z),x.subarray(0,z),I.subarray(0,z),_.subarray(0,z),"chronological-multi-timeline"===e,t?.layoutSettings?.chronologicalLayoutSettings)),0===ie&&(this.chronologicalAuxiliaryGraphics=i)}else({status:ie,links:ae}=G(()=>t?.signal?.aborted??!1,y,g,k,D.subarray(0,z),x.subarray(0,z),te.computationBudgetTime,te.idealEdgeLengthMultiplier,te.repulsionRadiusMultiplier));if(l(t?.signal),1===ie)throw new n("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");if(2===ie)throw d();for(let n=0;n<R.length;n++){if(k[n]>84.9999?k[n]=84.9999:k[n]<-84.9999&&(k[n]=-84.9999),g[n]>179.9999?g[n]=179.9999:g[n]<-179.9999&&(g[n]=-179.9999),R[n].feature.attributes[v]=new f(g[n],k[n]),h.has(R[n].typeName)){const e=h.get(R[n].typeName);e?.set(R[n].feature.attributes[M],R[n].feature)}else{const e=new Map;e.set(R[n].feature.attributes[M],R[n].feature),h.set(R[n].typeName,e)}c.set(R[n].feature.attributes[M],R[n].feature);const e=b(R[n].feature.attributes[v]);this.entityLinkChartDiagramLookup.set(R[n].feature.attributes[M],R[n].feature.attributes[v]?e:null);const t=s(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,R[n].typeName,()=>({useAllData:!1,members:new Map}));s(t.members,R[n].feature.attributes[M],()=>({id:R[n].feature.attributes[M],linkChartLocation:void 0})).linkChartLocation=R[n].feature.attributes[v];const{x:i,y:a}=R[n].feature.attributes[v];if(j)P.xmin=Math.min(P.xmin,i),P.xmax=Math.max(P.xmax,i),P.ymin=Math.min(P.ymin,a),P.ymax=Math.max(P.ymax,a);else{const e=1e-7;P.xmin=i-e,P.xmax=i+e,P.ymin=a-e,P.ymax=a+e,j=!0}}if(this.linkChartExtent.xmin=P.xmin,this.linkChartExtent.xmax=P.xmax,this.linkChartExtent.ymin=P.ymin,this.linkChartExtent.ymax=P.ymax,!ae)throw new n("knowledge-graph:layout-failed","Attempting to retrieve link geometry from diagram engine failed");const ne=new Map,oe=new Map,se=new Map,re=new Set;for(let n=0;n<r.length;n++){const i=[],a=r[n],l=a.feature.attributes[C],h=a.feature.attributes[T];let d=l+"-"+h;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){const e=t?.timeInfoByTypeName?.get(a.typeName),i=t?.timeInfoByTypeName?e?.startField:null,n=i?a.feature.attributes[i]:null,o=e?.endField;d+="-"+n+"-"+(o?a.feature.attributes[o]:null)}const y=Y.get(d).get(a.typeName),g=0===y?0:ae?.vertexEndIndex[y-1];if(!re.has(y)){if(re.add(y),2===ae.types[y]){const e=[ae.vertices[2*g],ae.vertices[2*g+1]],t=[ae.vertices[2*(g+1)],ae.vertices[2*(g+1)+1]],a=[.5*(e[0]+t[0]),.5*(e[1]+t[1])],n=[a[0]-e[0],a[1]-e[1]],o=[a[0]+n[1],a[1]-n[0]],s=[a[0]-n[1],a[1]+n[0]];i.push(e),i.push(o),i.push(t),i.push(s),i.push(e)}else{if(0!==ae.types[y]){o.getLogger(this).warn("A relationship generated an unsupported link geometry type. It will not be rendered");continue}for(let e=g;e<ae.vertexEndIndex[y];e++)i.push([ae.vertices[2*e],ae.vertices[2*e+1]])}if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e){const e=R[u.get(l)]?.feature.attributes[v],t=R[u.get(h)]?.feature.attributes[v];i[0][0]===e.x&&i[0][1]===e.y||(i[0]=[e.x,e.y]),i[i.length-1][0]===t.x&&i[i.length-1][1]===t.y||(i[i.length-1]=[t.x,t.y])}for(let e=1;e<i.length-1;e++)i[e][1]>85.5?i[e][1]=85.5:i[e][1]<-85.5&&(i[e][1]=-85.5),i[e][0]>179.9999?i[e][0]=179.9999:i[e][0]<-179.9999&&(i[e][0]=-179.9999);ne.has(d)?ne.get(d).push(i):ne.set(d,[i])}const m=ne.get(d);oe.has(d)||(oe.set(d,new Map),se.set(d,new Map));const f=oe.get(d),w=se.get(d);f.has(a.typeName)||(f.set(a.typeName,m.shift()),w.set(a.typeName,0));const k=f.get(a.typeName);w.set(a.typeName,w.get(a.typeName)+1);const E=new L({paths:[k]});if(a.feature.attributes[v]=E,p.has(a.typeName)){const e=p.get(a.typeName);e?.set(a.feature.attributes[M],a.feature)}else{const e=new Map;e.set(a.feature.attributes[M],a.feature),p.set(a.typeName,e)}c.set(a.feature.attributes[M],a.feature);const N=b(a.feature.attributes[v]);this.relationshipLinkChartDiagramLookup.set(a.feature.attributes[M],a.feature.attributes[v]?N:null);const S=s(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,a.typeName,()=>({useAllData:!1,members:new Map}));s(S.members,a.feature.attributes[M],()=>({id:a.feature.attributes[M],linkChartLocation:void 0})).linkChartLocation=N}for(const n of r)n.feature.attributes[E]=se.get(n.feature.attributes[C]+"-"+n.feature.attributes[T])?.get(n.typeName)??null;return this._currentLinkChartConfig={layoutMode:e,layoutSettings:t?.layoutSettings?.clone()},{nodes:h,links:p,idMap:c}}async applyNewLinkChartLayout(e="organic-standard",t){let{lockedNodeLocations:i,lockedEntityLocations:n,rootEntityIds:s,...r}=t??{};!n&&i?(a(o.getLogger(this),"lockedNodeLocations is deprecated in 5.0. Use lockedEntityLocations instead.",{replacement:"Use lockedEntityLocations instead.",version:"5.0"}),n=i):n&&i&&a(o.getLogger(this),"Both lockedNodeLocations (deprecated in 5.0) and lockedEntityLocations are defined. Use lockedEntityLocations only instead.",{replacement:"Use lockedEntityLocations instead.",version:"5.0"});const l=r.layoutSettings?.rootedLayoutSettings?.rootEntities;if(!l&&s){a(o.getLogger(this),"rootEntityIds is deprecated in 5.1. Use layoutSettings.rootedLayoutSettings.rootEntities instead.",{replacement:"Use layoutSettings.rootedLayoutSettings.rootEntities instead.",version:"5.1"});const e=[];for(const t of s){const i=this.dataManager.memberIdTypeLookup.get(t),a=Array.from(i??[]).find(e=>this.dataManager.entityTypeNames.has(e));a&&e.push({id:t,typeName:a})}r.layoutSettings=r.layoutSettings??new J,r.layoutSettings.rootedLayoutSettings=r.layoutSettings.rootedLayoutSettings??new Z,r.layoutSettings.rootedLayoutSettings.rootEntities=e}else l&&s&&a(o.getLogger(this),"Both rootEntityIds (deprecated in 5.1) and layoutSettings.rootedLayoutSettings.rootEntities are defined. Use layoutSettings.rootedLayoutSettings.rootEntities only instead.",{replacement:"Use layoutSettings.rootedLayoutSettings.rootEntities instead.",version:"5.1"});const h=[];await this._calculateLayoutWithSublayerTimeInfo(e,{...r,lockedEntityLocations:n}),this.layers.forEach(e=>{h.push(e.refreshCachedQueryEngine())}),this.membershipModified=!0,await Promise.all(h),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;for(const[t,i]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.entries()??[])this.dataManager.relationshipTypeNames.has(t)||i?.members?.forEach(t=>{const i=t.linkChartLocation;let a;const n=t.id;i&&(a="x"in i?{x:i.x,y:i.y}:{x:i.coords[0],y:i.coords[1]},e.set(n,new f({x:a.x,y:a.y})))});return e}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach(e=>{t.push(e.refreshCachedQueryEngine())}),await Promise.all(t),this._refreshNamedTypes()}async connectBetweenEntities(e,t){if(!e.length)return{records:[]};let i=[];try{let a=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(a=a.concat(Array.from(t.keys())))}i=await this.dataManager.getRelationshipsBetweenNodes(e,a,t),await this._handleNewRecords(i,t),l(t)}catch(a){throw h(a)&&this.removeRecords(i),a}return{records:i}}async connectFromEntities(e,t){if(!e.length)return{records:[]};let i=[];try{let a=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(a=a.concat(Array.from(t.keys())))}let n=[];for(const e of this.dataManager.entityTypeNames){const t=this.sublayerIdsCache.get(e);t&&(n=n.concat(Array.from(t)))}i=await this.dataManager.getRelationshipsFromNodes(e,n,a,t),await this._handleNewRecords(i,t),i.length>0&&(this.membershipModified=!0),l(t)}catch(a){throw h(a)&&this.removeRecords(i),a}return{records:i}}getCurrentLayout(){return this._currentLinkChartConfig.layoutMode}async _calculateLayoutWithSublayerTimeInfo(e="organic-standard",t){const i=new Map;this.layers.forEach(e=>{i.set(e.objectType.name,e.timeInfo)}),await this.calculateLinkChartLayout(e,{timeInfoByTypeName:i,...t}),this.linkChart?.handleChronologicalOverlay()}async _handleNewRecords(e,t){const i=new Set,a=[],n=this.layers.concat(this.tables);for(const r of e){if(!this._graphTypeLookup.has(r.typeName))continue;!1===n.some(e=>e.objectType.name===r.typeName)&&(this.dataManager.sublayerCaches.set(r.typeName,new Map),i.add(r.typeName));s(this.sublayerIdsCache,r.typeName,()=>new Set).add(r.id),a.push(r)}this.dataManager.addToLayer(a);for(const s of i){const e=this._graphTypeLookup.get(s);if(e){const t=this._createSublayer(e);"entity"===e.type?this.dataManager.entityTypeNames.add(s):this.dataManager.relationshipTypeNames.add(s),t.geometryType?this.layers.push(t):this.tables.push(t)}}await R(this,Array.from(i),t),await this.dataManager.refreshCacheContent(e.map(e=>e.id),void 0,void 0,void 0,t);const o={layoutSettings:this._currentLinkChartConfig.layoutSettings,lockedEntityLocations:new Map};for(const[s,r]of this.entityLinkChartDiagramLookup.entries())r&&o.lockedEntityLocations.set(s,new f(r.coords[0],r.coords[1]));await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,o)}_createSublayers(e,t,i){e.forEach(e=>{const a=this._createSublayer(e);i(a)&&t.push(a),this._updateSublayerCaches(e)})}_updateSublayers(e,t){t.forEach(t=>{t.parentCompositeLayer=this;const i=e.find(e=>e.type===t.graphType&&e.name===t.graphTypeName);i&&(t.objectType=i,t.read({title:i.name},{origin:"service"}),this._updateSublayerCaches(i))})}_updateSublayerCaches({name:e}){if(!e)return;const t=this.dataManager.sublayerCaches;t.has(e)||t.set(e,new Map)}_layersLoadedFromAuthoritativeItem(){const e=this.originIdOf("layers");return e>=3&&e<7}async _initializeDiagram(){this.initializationLinkChartConfig?this.initializationLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{e?.members?.forEach(e=>{const i=e.linkChartLocation;let a;const n=e.id;if(!i)return;a="x"in i?{x:i.x,y:i.y}:{x:i.coords[0],y:i.coords[1]};const o=b(a);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(n,o):this.entityLinkChartDiagramLookup.set(n,o),this.linkChartExtent.xmin>a.x&&(this.linkChartExtent.xmin=a.x),this.linkChartExtent.xmax<a.x&&(this.linkChartExtent.xmax=a.x),this.linkChartExtent.ymin>a.y&&(this.linkChartExtent.ymin=a.y),this.linkChartExtent.ymax<a.y&&(this.linkChartExtent.ymax=a.y)})}),this.memberRelationshipTypes.forEach(e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach(e=>{const t=this.relationshipLinkChartDiagramLookup.get(e.attributes[C]),i=this.relationshipLinkChartDiagramLookup.get(e.attributes[T]);if(t&&i){const a=b(new L({paths:[[[t.coords[0],t.coords[1]],[i.coords[0],i.coords[1]]]]}));this.relationshipLinkChartDiagramLookup.set(e.attributes[M],a)}else this.relationshipLinkChartDiagramLookup.set(e.attributes[M],null)})})):await this._calculateLayoutWithSublayerTimeInfo(this.initializationLinkChartConfig.layoutMode,{lockedEntityLocations:this.getCurrentNodeLocations(),...this.initializationLinkChartConfig}):await this._calculateLayoutWithSublayerTimeInfo("organic-standard",{lockedEntityLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}_validateOrganicLayoutSettings(e,t){const i=e=>"number"==typeof e&&!isNaN(e),a=e=>i(e)&&e>=1,n=e=>i(e)&&e>=1,s=e=>Object.values(N).includes(e),r=e=>i(e)&&e>=0,l={};if(!new Set(["organic-standard","organic-community","geographic-organic-standard","chronological-multi-timeline","chronological-mono-timeline"]).has(e)||!t)return l;const{computationBudgetTime:h,autoRepulsionRadius:d,repulsionRadiusMultiplier:p,absoluteIdealEdgeLength:c,multiplicativeIdealEdgeLength:u,idealEdgeLengthType:y}=t;return n(h)?l.computationBudgetTime=h:h&&o.getLogger(this).warn("Invalid layout computationBudgetTime setting, will revert to default setting"),l.autoRepulsionRadius=d,!d&&a(p)?l.repulsionRadiusMultiplier=p:d||(l.autoRepulsionRadius=!0,o.getLogger(this).warn("Invalid layout repulsionRadiusMultiplier setting, will revert to default setting")),"geographic-organic-standard"===e&&(s(y)?l.idealEdgeLengthType=y:void 0!==y&&o.getLogger(this).warn('Invalid layout idealEdgeLengthType setting, will revert to "multiplier" setting'),"absolute-value"===y&&r(c)?l.absoluteIdealEdgeLength=c:"absolute-value"===y&&void 0!==c?o.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting"):"multiplier"===y&&r(u)?l.multiplicativeIdealEdgeLength=u:"multiplier"===y&&void 0!==u&&o.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting")),l}_convertValidatedOrganicSettingsToCalculationSettings(e){let t=e.idealEdgeLengthType===N.ABSOLUTE?e.absoluteIdealEdgeLength:e.multiplicativeIdealEdgeLength;return e.idealEdgeLengthType===N.ABSOLUTE&&(void 0===t?t=-1:t*=-1),{computationBudgetTime:e.computationBudgetTime??void 0,repulsionRadiusMultiplier:e.repulsionRadiusMultiplier&&!e.autoRepulsionRadius?e.repulsionRadiusMultiplier:void 0,idealEdgeLengthMultiplier:t}}_createSublayer(e){return new D({objectType:e,parentCompositeLayer:this,graphType:e.type})}_handleSublayersChange(e,t){if(t&&(t.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner")),e){const t=[];e.forEach(e=>{e.parent=this,t.push(this._createVisibleRefreshHandle(e))}),this.addHandles([...t,e.on("after-add",({item:e})=>{e.parent=this,this.addHandles(this._createVisibleRefreshHandle(e),"sublayers-owner")}),e.on("after-remove",({item:e})=>{e.parent=null})],"sublayers-owner")}}_createVisibleRefreshHandle(e){return p(()=>e.visible,(t,i)=>{!0===t&&!1===i&&e.emit("refresh",{dataChanged:!0})})}_alignLayersDataModelAndInclusionDefinition(e){const t=new Set((e.entityTypes??[]).map(e=>e.name).concat((e.relationshipTypes??[]).map(e=>e.name))),a=new Set((e.entityTypes??[]).map(e=>e.name)),n=new Set((e.relationshipTypes??[]).map(e=>e.name));if(this.layers){for(const i of this.layers)!i.graphType&&t.has(i.graphTypeName)&&(i.graphType=a.has(i.graphTypeName)?"entity":"relationship");const e=this.layers.filter(e=>t.has(e.graphTypeName)&&("entity"===e.graphType?a.has(e.graphTypeName):n.has(e.graphTypeName)));this.setAtOrigin("layers",e,g(this.originIdOf("layers")))}else this.layers=new i;if(this.layers&&this._originalInclusionList){const e=new Set(this._originalInclusionList.namedTypeDefinitions.keys()),t=this.tables?.map(e=>e.graphTypeName)??[],i=this.layers.map(e=>e.graphTypeName).concat(t);for(const n of i)e.has(n)||this._originalInclusionList.namedTypeDefinitions.set(n,{useAllData:!1,members:new Map});const a=[];for(const n of this._originalInclusionList.namedTypeDefinitions.keys())i.includes(n)||(o.getLogger(this).warn(`A named type, ${n}, was in the serialized feature collection but did not have a sublayer config in the item, so will be removed`),a.push(n));for(const n of a)this._originalInclusionList.namedTypeDefinitions.delete(n)}}};e([u(z)],ee.prototype,"url",void 0),e([u()],ee.prototype,"dataPreloadedInLocalCache",void 0),e([u()],ee.prototype,"initializationLinkChartConfig",void 0),e([u()],ee.prototype,"membershipModified",void 0),e([u()],ee.prototype,"dataManager",void 0),e([u()],ee.prototype,"initializationInclusionModeDefinition",null),e([u()],ee.prototype,"knowledgeGraph",void 0),e([u({type:i.ofType(D),json:{write:{ignoreOrigin:!0}}})],ee.prototype,"layers",void 0),e([u({readOnly:!0})],ee.prototype,"linkChart",null),e([u()],ee.prototype,"entityLinkChartDiagramLookup",void 0),e([u()],ee.prototype,"relationshipLinkChartDiagramLookup",void 0),e([u()],ee.prototype,"linkChartExtent",void 0),e([u()],ee.prototype,"memberEntityTypes",void 0),e([u()],ee.prototype,"memberRelationshipTypes",void 0),e([u({type:["LinkChartLayer"]})],ee.prototype,"operationalLayerType",void 0),e([u()],ee.prototype,"sublayerCapabilities",null),e([u()],ee.prototype,"sublayerIdsCache",void 0),e([u({type:i.ofType(D),json:{write:{ignoreOrigin:!0}}})],ee.prototype,"tables",void 0),e([u({json:{read:!1}})],ee.prototype,"type",void 0),e([u({readOnly:!0})],ee.prototype,"userHasEditingPrivileges",void 0),e([u({readOnly:!0})],ee.prototype,"userHasFullEditingPrivileges",void 0),e([u({readOnly:!0})],ee.prototype,"userHasUpdateItemPrivileges",void 0),e([u({json:{read:!1}})],ee.prototype,"chronologicalAuxiliaryGraphics",void 0),e([u(Y("dateFieldsTimeReference"))],ee.prototype,"dateFieldsTimeZone",void 0),ee=e([y("esri.layers.LinkChartLayer")],ee);const te=ee;export{te as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{serializationUtilsModuleWrapper as t}from"../applications/KnowledgeStudio/resourceSerializationUtils.js";import i from"../core/Collection.js";import{deprecated as a}from"../core/deprecate.js";import n from"../core/Error.js";import o from"../core/Logger.js";import{getOrCreateMapValue as s}from"../core/MapUtils.js";import{MultiOriginJSONSupportMixin as r}from"../core/MultiOriginJSONSupport.js";import{throwIfAborted as l,isAbortError as h,createAbortError as d}from"../core/promiseUtils.js";import{watch as p,sync as c}from"../core/reactiveUtils.js";import{property as u,subclass as y}from"../core/accessorSupport/decorators.js";import{idToName as g}from"../core/accessorSupport/PropertyOrigin.js";import m from"../geometry/Extent.js";import f from"../geometry/Point.js";import L from"../geometry/Polyline.js";import{polygonCentroidPoint as w}from"../geometry/support/centroid.js";import k from"./Layer.js";import{convertFromGeometry as b}from"./graphics/featureConversionUtils.js";import{systemOidFieldName as M,systemOriginIdFieldName as C,systemDestinationIdFieldName as T,systemLayoutGeometryFieldName as v,systemAggregationCountFieldName as E}from"./knowledgeGraph/constants.js";import{IdealEdgeLengthTypeOptions as N}from"./knowledgeGraph/IdealEdgeLengthTypeOptions.js";import{KnowledgeGraphLayerDataManager as S}from"./knowledgeGraph/KnowledgeGraphLayerDataManager.js";import D from"./knowledgeGraph/KnowledgeGraphSublayer.js";import{getTitleFromServerUrl as x,getUserKGSPrivileges as I,createCapabilitiesFromKnowledgeGraph as _,initializeLayersFromClientData as R}from"./knowledgeGraph/layerUtils.js";import A from"./knowledgeGraph/SessionMemoryStorage.js";import{convertLayoutTypeToWebSupportedFormat as j,getRelationshipEndNodeIds as P}from"./knowledgeGraph/supportUtils.js";import{BlendLayer as G}from"./mixins/BlendLayer.js";import{OperationalLayer as U}from"./mixins/OperationalLayer.js";import{ScaleRangeLayer as F}from"./mixins/ScaleRangeLayer.js";import{url as z}from"./support/commonProperties.js";import{LCChronologicalLayout as O,LCSimpleLayout as B,LCSmartTreeLayout as H,LCRadialTreeLayout as Q,LCHierarchicalLayout as V,LCCommunityLayout as W,LCForceDirectedLayout as $,load as K}from"../libs/linkchartlayout/LinkChartLayout.js";import J from"../linkChart/LayoutSettings.js";import Z from"../linkChart/RootedLayoutSettings.js";import{getCreationDatesForResources as q}from"../linkChart/utils.js";import{fetchKnowledgeGraph as X}from"../rest/knowledgeGraphService.js";import{timeZoneProperty as Y}from"../time/timeZoneUtils.js";let ee=class extends(U(G(F(r(k))))){constructor(e){if(super(e),this.url=null,this.dataPreloadedInLocalCache=!1,this.initializationLinkChartConfig=null,this.membershipModified=!0,this._currentLinkChartConfig={layoutMode:"organic-standard"},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new(i.ofType(D)),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new m({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="LinkChartLayer",this.sublayerIdsCache=new Map,this.tables=new(i.ofType(D)),this.type="link-chart",this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1,this.chronologicalAuxiliaryGraphics=null,this._originalInclusionList=e?.initializationInclusionModeDefinition,e?.dataPreloadedInLocalCache&&!e?.initializationInclusionModeDefinition)throw new n("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it");this.addHandles(p(()=>this.layers.concat(this.tables),(e,t)=>this._handleSublayersChange(e,t),c))}normalizeCtorArgs(e){if(!e)return{};const{url:t,dataPreloadedInLocalCache:i,initializationLinkChartConfig:a}=e;let{title:n}=e;return!n&&e?.url&&(n=x(e.url)),{url:t,title:n,dataPreloadedInLocalCache:i,initializationLinkChartConfig:a}}_initializeLayerProperties(e){const t=new Set;let i=[],a=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new n("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.inclusionModeDefinition?.generateAllSublayers?(i=e.knowledgeGraph.dataModel.entityTypes??[],a=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach((n,s)=>{const r=this._graphTypeLookup.get(s);if(!r)return o.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(s);"relationship"===r.type?t.has(s)||(t.add(s),a.push(r)):"entity"===r.type?t.has(s)||(t.add(s),i.push(r)):(o.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(s))}):(i=e.knowledgeGraph.dataModel.entityTypes??[],a=e.knowledgeGraph.dataModel.relationshipTypes??[]);const s=new S({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=i,this.memberRelationshipTypes=a,this.dataManager=s}load(e){const i=async()=>{const e=[],t=[];this.loadLayerAssumingLocalCache(),this._layersLoadedFromAuthoritativeItem()||await R(this),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(e=>{e.useAllData=!1}),await this._initializeDiagram(),this.layers.forEach(i=>{t.push(i.refreshCachedQueryEngine()),e.push(new Promise(e=>{i.on("layerview-create",()=>{e(null)})}))}),this.tables.forEach(e=>{t.push(e.refreshCachedQueryEngine())}),await Promise.all(t)};return this.addResolvingPromise(new Promise(a=>{X(this.url).then(async n=>{n.dataModel.entityTypes?.forEach(e=>{e.name&&this._graphTypeLookup.set(e.name,e)}),n.dataModel.relationshipTypes?.forEach(e=>{e.name&&this._graphTypeLookup.set(e.name,e)});const o=this.linkChart?.linkChartProperties;6===o?.originIdOf("entitiesUrl")&&(this.membershipModified=!1,q([o.entitiesUrl??"",o.relationshipsUrl??""],this.linkChart?.portalItem?.itemUrl??"").then(e=>{this.linkChart?.linkChartProperties?.setCreationDatesForResources?.(e)},()=>{}),this._originalInclusionList=await t.fetchAndConvertSerializedLinkChart({entitiesUrl:o?.entitiesUrl,relationshipsUrl:o?.relationshipsUrl},{signal:e?.signal}),this._alignLayersDataModelAndInclusionDefinition(n.dataModel),this.initializationLinkChartConfig={layoutSettings:o?.layoutSettings??void 0,layoutMode:j(o.layoutType)}),this._initializeLayerProperties({knowledgeGraph:n,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach(e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}));const{edit:r,fullEdit:h,updateItem:d}=await I(n.serviceDefinition.serviceItemId,this.url,e);if(this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",h),this._set("userHasUpdateItemPrivileges",d),this.read({dateFieldsTimeReference:n.serviceDefinition.dateFieldsTimeReference},{origin:"service"}),this.dataPreloadedInLocalCache){const e=A.getInstance();for(const[t,i]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions??[])for(const a of i.members?.values()??[]){const i=e.readFromStoreById(`${t}__${a.id}`);if(i){s(this.dataManager.sublayerCaches,t,()=>new Map).set(a.id,i)}}await i()}else{const t="geographic-organic-standard"===this.initializationLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,t,!0).then(async()=>{l(e),await i()}))}a(null)})})),Promise.resolve(this)}set initializationInclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("initializationInclusionModeDefinition",e):o.getLogger(this).error("#initializationInclusionModeDefinition","initializationInclusionModeDefinition cannot be changed after the layer is loaded.")}get linkChart(){return this.parent}get sublayerCapabilities(){return _(this.knowledgeGraph)}async addRecords(e,t){let i=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(i=await P(e,this.dataManager.knowledgeGraph));const a=e.concat(i).filter(e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id));a.length>0&&(this.membershipModified=!0),await this._handleNewRecords(a,t)}async createSublayerForNamedType(e){await this.load();const t=this._graphTypeLookup.get(e);if(!t)throw new n("knowledge-graph:missing-type","The specified type does not exist in the knowledge graph.");if(this.dataManager.sublayerCaches.has(e))throw new n("knowledge-graph:duplicate-type","The specified type already exists as a sublayer.");this.dataManager.sublayerCaches.set(e,new Map),s(this.sublayerIdsCache,e,()=>new Set);const i=this._createSublayer(t);return"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.set(e,{useAllData:!1,members:new Map}),i.geometryType?this.layers.push(i):this.tables.push(i),await R(this,[e]),this._refreshNamedTypes(),i}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:i=!1,overrideMembershipCheck:a=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1,overrideMembershipCheck:!1}){let n=[];for(const l of e)(a||!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(l.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(l.typeName)?.members?.has(l.id))&&n.push(l);if(t){const e=new Set,t=[];for(const i of n)if(this.dataManager.nodeConnectionsLookup.has(i.id))for(const t of this.dataManager.nodeConnectionsLookup.get(i.id))e.add(t);for(const i of e)if(this.dataManager.memberIdTypeLookup.has(i))for(const e of this.dataManager.memberIdTypeLookup.get(i))this.dataManager.relationshipTypeNames.has(e)&&t.push({id:i,typeName:e});n=n.concat(t)}const o=this._currentLinkChartConfig.layoutSettings?.rootedLayoutSettings?.rootEntities;if(o?.length){const e=new Set(n.map(({id:e})=>e)),t=o.filter(({id:t})=>!e.has(t));if(t.length!==o.length){this._currentLinkChartConfig.layoutSettings.rootedLayoutSettings.rootEntities=t;const e=this.linkChart?.linkChartProperties;e?.layoutSettings?.rootedLayoutSettings&&(e.layoutSettings.rootedLayoutSettings.rootEntities=t)}}this.dataManager.removeFromLayer(n);for(const l of n)this.sublayerIdsCache.get(l.typeName)?.delete(l.id),this.dataManager.relationshipTypeNames.has(l.typeName)?this.relationshipLinkChartDiagramLookup.delete(l.id):this.entityLinkChartDiagramLookup.delete(l.id);const s=i?void 0:this.getCurrentNodeLocations();await this._calculateLayoutWithSublayerTimeInfo(this._currentLinkChartConfig.layoutMode,{layoutSettings:this._currentLinkChartConfig.layoutSettings,lockedEntityLocations:s}),n.length>0&&(this.membershipModified=!0);const r=[];return this.layers.forEach(e=>{r.push(e.refreshCachedQueryEngine())}),await Promise.all(r),this._refreshNamedTypes(),n}async expand(e,t){let i=[];try{const a=await this.dataManager.getConnectedRecordIds(e,t?.relationshipTypeNames,t);i=a.filter(e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)),await this._handleNewRecords(i,t),a.length>0&&(this.membershipModified=!0),l(t?.signal)}catch(a){throw h(a)&&i.length>0&&await this.removeRecords(i,{overrideMembershipCheck:!0}),a}return{records:i}}loadLayerAssumingLocalCache(){const e=[...this.memberRelationshipTypes,...this.memberEntityTypes];this.layers.length||0===this.originIdOf("tables")?0===this.originIdOf("layers")?this._createSublayers(e,this.layers,e=>!!e.geometryType):this._updateSublayers(e,this.layers):this.layers=new i,this.tables.length||0===this.originIdOf("layers")?0===this.originIdOf("tables")?this._createSublayers(e,this.tables,e=>!e.geometryType):this._updateSublayers(e,this.tables):this.tables=new i,this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{const i=s(this.sublayerIdsCache,t,()=>new Set);e.members?.forEach(({id:e,linkChartLocation:a})=>{if(i.add(e),a){const i="coords"in a&&"lengths"in a?a:b(a);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e,i):this.entityLinkChartDiagramLookup.set(e,i)}})})}async calculateLinkChartLayout(e="organic-standard",t){const i=[],a=[],r=[];this.dataManager.sublayerCaches.forEach((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach(e=>{i.push({typeName:t,feature:e})}):this.dataManager.relationshipTypeNames.has(t)&&e.forEach(e=>{a.push({typeName:t,feature:e})})}),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;const h=new Map,p=new Map,c=new Map,u=new Map,y=new Uint8Array(i.length),g=new Float64Array(i.length),k=new Float64Array(i.length),N=new Float64Array(i.length),S=new Float64Array(i.length),D=new Uint32Array(a.length),x=new Uint32Array(a.length),I=new Float64Array(a.length),_=new Float64Array(a.length),R=[],A="organic-standard";let j=!1;const P=new m({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let G,U="organic-standard",F=0,z=0;const J=O.apply;switch(U="geographic-organic-standard"===e?A:e,U){case"organic-standard":G=$.apply;break;case"organic-community":G=W.apply;break;case"hierarchical-bottom-to-top":G=V.apply;break;case"radial-root-centric":G=Q.apply;break;case"tree-left-to-right":G=H.apply;break;default:G=B.apply}let Z=!1;const q=new Set(t?.layoutSettings?.rootedLayoutSettings?.rootEntities?.map(({id:e})=>e));i.forEach(({typeName:i,feature:a})=>{if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e&&t?.lockedEntityLocations?.has(a.attributes[M])){"geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(i)?y[F]=2:y[F]=0;const n=t.lockedEntityLocations.get(a.attributes[M]);g[F]=n.x,k[F]=n.y}else if("geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(i)){y[F]=2;let e=null;const t=a.attributes[this.dataManager.geographicLookup.get(i).name],n=this.dataManager.geographicLookup.get(i)?.geometryType;switch(n){case"esriGeometryPoint":g[F]=t?.x,k[F]=t?.y;break;case"esriGeometryPolygon":{const i=t?w(t):null;e=i?f.fromJSON(i):null,null!=e?.x&&null!=e?.y?(g[F]=e.x,k[F]=e.y):y[F]=1;break}case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(g[F]=e.x,k[F]=e.y):y[F]=1;break;default:y[F]=1}(null==g[F]||null==k[F]||Number.isNaN(g[F])||Number.isNaN(k[F]))&&(y[F]=1,g[F]=0,k[F]=0)}else if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){!Z&&t?.lockedEntityLocations?.has(a.attributes[M])&&(Z=!0);const e=t?.timeInfoByTypeName?.get(i),n=e?.startField,o=n&&e?.startField?a.attributes[n]:null;N[F]=o?new Date(o).getTime():NaN;const s=e?.endField,r=s&&e?.endField?a.attributes[s]:null;S[F]=r?new Date(r).getTime():NaN,g[F]=0,k[F]=0,y[F]=1}else y[F]=1,g[F]=0,k[F]=0;q.has(a.attributes[M])&&(y[F]|=4),u.set(a.attributes[M],F),R[F]={feature:a,typeName:i},F++}),Z&&o.getLogger(this).warn("Locked node locations are not supported for chronological layout at this time. Requested node locations were ignored");let X=!1;const Y=new Map;a.forEach(i=>{const a=i.feature.attributes[C],n=i.feature.attributes[T],o=u.get(a),s=u.get(n),l=t?.timeInfoByTypeName?.get(i.typeName),h=t?.timeInfoByTypeName?l?.startField:null,d=h?i.feature.attributes[h]:null,p=l?.endField,c=p?i.feature.attributes[p]:null;if(void 0!==o&&void 0!==s){let t=a+"-"+n;"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(t=t+"-"+d+"-"+c);const l=Y.get(t),h=l?.has(i.typeName);h||(D[z]=o,x[z]=s,"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(I[z]=d?new Date(d).getTime():NaN,_[z]=c?new Date(c).getTime():NaN),void 0===l?Y.set(t,new Map([[i.typeName,z]])):l.set(i.typeName,z),z++),r.push(i)}else X=!0,this.relationshipLinkChartDiagramLookup.set(a,null)}),X&&o.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null");const ee=this._validateOrganicLayoutSettings(e,t?.layoutSettings?.organicLayoutSettings),te=this._convertValidatedOrganicSettingsToCalculationSettings(ee);await K();let ie=1,ae=null;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){let i;({status:ie,links:ae,graphics:i}=J(()=>t?.signal?.aborted??!1,y,g,k,N,S,D.subarray(0,z),x.subarray(0,z),I.subarray(0,z),_.subarray(0,z),"chronological-multi-timeline"===e,t?.layoutSettings?.chronologicalLayoutSettings)),0===ie&&(this.chronologicalAuxiliaryGraphics=i)}else({status:ie,links:ae}=G(()=>t?.signal?.aborted??!1,y,g,k,D.subarray(0,z),x.subarray(0,z),te.computationBudgetTime,te.idealEdgeLengthMultiplier,te.repulsionRadiusMultiplier));if(l(t?.signal),1===ie)throw new n("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");if(2===ie)throw d();for(let n=0;n<R.length;n++){if(k[n]>84.9999?k[n]=84.9999:k[n]<-84.9999&&(k[n]=-84.9999),g[n]>179.9999?g[n]=179.9999:g[n]<-179.9999&&(g[n]=-179.9999),R[n].feature.attributes[v]=new f(g[n],k[n]),h.has(R[n].typeName)){const e=h.get(R[n].typeName);e?.set(R[n].feature.attributes[M],R[n].feature)}else{const e=new Map;e.set(R[n].feature.attributes[M],R[n].feature),h.set(R[n].typeName,e)}c.set(R[n].feature.attributes[M],R[n].feature);const e=b(R[n].feature.attributes[v]);this.entityLinkChartDiagramLookup.set(R[n].feature.attributes[M],R[n].feature.attributes[v]?e:null);const t=s(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,R[n].typeName,()=>({useAllData:!1,members:new Map}));s(t.members,R[n].feature.attributes[M],()=>({id:R[n].feature.attributes[M],linkChartLocation:void 0})).linkChartLocation=R[n].feature.attributes[v];const{x:i,y:a}=R[n].feature.attributes[v];if(j)P.xmin=Math.min(P.xmin,i),P.xmax=Math.max(P.xmax,i),P.ymin=Math.min(P.ymin,a),P.ymax=Math.max(P.ymax,a);else{const e=1e-7;P.xmin=i-e,P.xmax=i+e,P.ymin=a-e,P.ymax=a+e,j=!0}}if(this.linkChartExtent.xmin=P.xmin,this.linkChartExtent.xmax=P.xmax,this.linkChartExtent.ymin=P.ymin,this.linkChartExtent.ymax=P.ymax,!ae)throw new n("knowledge-graph:layout-failed","Attempting to retrieve link geometry from diagram engine failed");const ne=new Map,oe=new Map,se=new Map,re=new Set;for(let n=0;n<r.length;n++){const i=[],a=r[n],l=a.feature.attributes[C],h=a.feature.attributes[T];let d=l+"-"+h;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){const e=t?.timeInfoByTypeName?.get(a.typeName),i=t?.timeInfoByTypeName?e?.startField:null,n=i?a.feature.attributes[i]:null,o=e?.endField;d+="-"+n+"-"+(o?a.feature.attributes[o]:null)}const y=Y.get(d).get(a.typeName),g=0===y?0:ae?.vertexEndIndex[y-1];if(!re.has(y)){if(re.add(y),2===ae.types[y]){const e=[ae.vertices[2*g],ae.vertices[2*g+1]],t=[ae.vertices[2*(g+1)],ae.vertices[2*(g+1)+1]],a=[.5*(e[0]+t[0]),.5*(e[1]+t[1])],n=[a[0]-e[0],a[1]-e[1]],o=[a[0]+n[1],a[1]-n[0]],s=[a[0]-n[1],a[1]+n[0]];i.push(e),i.push(o),i.push(t),i.push(s),i.push(e)}else{if(0!==ae.types[y]){o.getLogger(this).warn("A relationship generated an unsupported link geometry type. It will not be rendered");continue}for(let e=g;e<ae.vertexEndIndex[y];e++)i.push([ae.vertices[2*e],ae.vertices[2*e+1]])}if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e){const e=R[u.get(l)]?.feature.attributes[v],t=R[u.get(h)]?.feature.attributes[v];i[0][0]===e.x&&i[0][1]===e.y||(i[0]=[e.x,e.y]),i[i.length-1][0]===t.x&&i[i.length-1][1]===t.y||(i[i.length-1]=[t.x,t.y])}for(let e=1;e<i.length-1;e++)i[e][1]>85.5?i[e][1]=85.5:i[e][1]<-85.5&&(i[e][1]=-85.5),i[e][0]>179.9999?i[e][0]=179.9999:i[e][0]<-179.9999&&(i[e][0]=-179.9999);ne.has(d)?ne.get(d).push(i):ne.set(d,[i])}const m=ne.get(d);oe.has(d)||(oe.set(d,new Map),se.set(d,new Map));const f=oe.get(d),w=se.get(d);f.has(a.typeName)||(f.set(a.typeName,m.shift()),w.set(a.typeName,0));const k=f.get(a.typeName);w.set(a.typeName,w.get(a.typeName)+1);const E=new L({paths:[k]});if(a.feature.attributes[v]=E,p.has(a.typeName)){const e=p.get(a.typeName);e?.set(a.feature.attributes[M],a.feature)}else{const e=new Map;e.set(a.feature.attributes[M],a.feature),p.set(a.typeName,e)}c.set(a.feature.attributes[M],a.feature);const N=b(a.feature.attributes[v]);this.relationshipLinkChartDiagramLookup.set(a.feature.attributes[M],a.feature.attributes[v]?N:null);const S=s(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,a.typeName,()=>({useAllData:!1,members:new Map}));s(S.members,a.feature.attributes[M],()=>({id:a.feature.attributes[M],linkChartLocation:void 0})).linkChartLocation=N}for(const n of r)n.feature.attributes[E]=se.get(n.feature.attributes[C]+"-"+n.feature.attributes[T])?.get(n.typeName)??null;return this._currentLinkChartConfig={layoutMode:e,layoutSettings:t?.layoutSettings?.clone()},{nodes:h,links:p,idMap:c}}async applyNewLinkChartLayout(e="organic-standard",t){let{lockedNodeLocations:i,lockedEntityLocations:n,rootEntityIds:s,...r}=t??{};!n&&i?(a(o.getLogger(this),"lockedNodeLocations is deprecated in 5.0. Use lockedEntityLocations instead.",{replacement:"Use lockedEntityLocations instead.",version:"5.0"}),n=i):n&&i&&a(o.getLogger(this),"Both lockedNodeLocations (deprecated in 5.0) and lockedEntityLocations are defined. Use lockedEntityLocations only instead.",{replacement:"Use lockedEntityLocations instead.",version:"5.0"});const l=r.layoutSettings?.rootedLayoutSettings?.rootEntities;if(!l&&s){a(o.getLogger(this),"rootEntityIds is deprecated in 5.1. Use layoutSettings.rootedLayoutSettings.rootEntities instead.",{replacement:"Use layoutSettings.rootedLayoutSettings.rootEntities instead.",version:"5.1"});const e=[];for(const t of s){const i=this.dataManager.memberIdTypeLookup.get(t),a=Array.from(i??[]).find(e=>this.dataManager.entityTypeNames.has(e));a&&e.push({id:t,typeName:a})}r.layoutSettings=r.layoutSettings??new J,r.layoutSettings.rootedLayoutSettings=r.layoutSettings.rootedLayoutSettings??new Z,r.layoutSettings.rootedLayoutSettings.rootEntities=e}else l&&s&&a(o.getLogger(this),"Both rootEntityIds (deprecated in 5.1) and layoutSettings.rootedLayoutSettings.rootEntities are defined. Use layoutSettings.rootedLayoutSettings.rootEntities only instead.",{replacement:"Use layoutSettings.rootedLayoutSettings.rootEntities instead.",version:"5.1"});const h=[];await this._calculateLayoutWithSublayerTimeInfo(e,{...r,lockedEntityLocations:n}),this.layers.forEach(e=>{h.push(e.refreshCachedQueryEngine())}),this.membershipModified=!0,await Promise.all(h),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;for(const[t,i]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.entries()??[])this.dataManager.relationshipTypeNames.has(t)||i?.members?.forEach(t=>{const i=t.linkChartLocation;let a;const n=t.id;i&&(a="x"in i?{x:i.x,y:i.y}:{x:i.coords[0],y:i.coords[1]},e.set(n,new f({x:a.x,y:a.y})))});return e}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach(e=>{t.push(e.refreshCachedQueryEngine())}),await Promise.all(t),this._refreshNamedTypes()}async connectBetweenEntities(e,t){if(!e.length)return{records:[]};let i=[];try{let a=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(a=a.concat(Array.from(t.keys())))}i=await this.dataManager.getRelationshipsBetweenNodes(e,a,t),await this._handleNewRecords(i,t),l(t)}catch(a){throw h(a)&&this.removeRecords(i),a}return{records:i}}async connectFromEntities(e,t){if(!e.length)return{records:[]};let i=[];try{let a=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(a=a.concat(Array.from(t.keys())))}let n=[];for(const e of this.dataManager.entityTypeNames){const t=this.sublayerIdsCache.get(e);t&&(n=n.concat(Array.from(t)))}i=await this.dataManager.getRelationshipsFromNodes(e,n,a,t),await this._handleNewRecords(i,t),i.length>0&&(this.membershipModified=!0),l(t)}catch(a){throw h(a)&&this.removeRecords(i),a}return{records:i}}getCurrentLayout(){return this._currentLinkChartConfig.layoutMode}async _calculateLayoutWithSublayerTimeInfo(e="organic-standard",t){const i=new Map;this.layers.forEach(e=>{i.set(e.objectType.name,e.timeInfo)}),await this.calculateLinkChartLayout(e,{timeInfoByTypeName:i,...t}),this.linkChart?.handleChronologicalOverlay()}async _handleNewRecords(e,t){const i=new Set,a=[],n=this.layers.concat(this.tables);for(const r of e){if(!this._graphTypeLookup.has(r.typeName))continue;!1===n.some(e=>e.objectType.name===r.typeName)&&(this.dataManager.sublayerCaches.set(r.typeName,new Map),i.add(r.typeName));s(this.sublayerIdsCache,r.typeName,()=>new Set).add(r.id),a.push(r)}this.dataManager.addToLayer(a);for(const s of i){const e=this._graphTypeLookup.get(s);if(e){const t=this._createSublayer(e);"entity"===e.type?this.dataManager.entityTypeNames.add(s):this.dataManager.relationshipTypeNames.add(s),t.geometryType?this.layers.push(t):this.tables.push(t)}}await R(this,Array.from(i),t),await this.dataManager.refreshCacheContent(e.map(e=>e.id),void 0,void 0,void 0,t);const o={layoutSettings:this._currentLinkChartConfig.layoutSettings,lockedEntityLocations:new Map};for(const[s,r]of this.entityLinkChartDiagramLookup.entries())r&&o.lockedEntityLocations.set(s,new f(r.coords[0],r.coords[1]));await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,o)}_createSublayers(e,t,i){e.forEach(e=>{const a=this._createSublayer(e);i(a)&&t.push(a),this._updateSublayerCaches(e)})}_updateSublayers(e,t){t.forEach(t=>{t.parentCompositeLayer=this;const i=e.find(e=>e.type===t.graphType&&e.name===t.graphTypeName);i&&(t.objectType=i,t.read({title:i.name},{origin:"service"}),this._updateSublayerCaches(i))})}_updateSublayerCaches({name:e}){if(!e)return;const t=this.dataManager.sublayerCaches;t.has(e)||t.set(e,new Map)}_layersLoadedFromAuthoritativeItem(){const e=this.originIdOf("layers");return e>=3&&e<7}async _initializeDiagram(){this.initializationLinkChartConfig?this.initializationLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{e?.members?.forEach(e=>{const i=e.linkChartLocation;let a;const n=e.id;if(!i)return;a="x"in i?{x:i.x,y:i.y}:{x:i.coords[0],y:i.coords[1]};const o=b(a);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(n,o):this.entityLinkChartDiagramLookup.set(n,o),this.linkChartExtent.xmin>a.x&&(this.linkChartExtent.xmin=a.x),this.linkChartExtent.xmax<a.x&&(this.linkChartExtent.xmax=a.x),this.linkChartExtent.ymin>a.y&&(this.linkChartExtent.ymin=a.y),this.linkChartExtent.ymax<a.y&&(this.linkChartExtent.ymax=a.y)})}),this.memberRelationshipTypes.forEach(e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach(e=>{const t=this.relationshipLinkChartDiagramLookup.get(e.attributes[C]),i=this.relationshipLinkChartDiagramLookup.get(e.attributes[T]);if(t&&i){const a=b(new L({paths:[[[t.coords[0],t.coords[1]],[i.coords[0],i.coords[1]]]]}));this.relationshipLinkChartDiagramLookup.set(e.attributes[M],a)}else this.relationshipLinkChartDiagramLookup.set(e.attributes[M],null)})})):await this._calculateLayoutWithSublayerTimeInfo(this.initializationLinkChartConfig.layoutMode,{lockedEntityLocations:this.getCurrentNodeLocations(),...this.initializationLinkChartConfig}):await this._calculateLayoutWithSublayerTimeInfo("organic-standard",{lockedEntityLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}_validateOrganicLayoutSettings(e,t){const i=e=>"number"==typeof e&&!isNaN(e),a=e=>i(e)&&e>=1,n=e=>i(e)&&e>=1,s=e=>Object.values(N).includes(e),r=e=>i(e)&&e>=0,l={};if(!new Set(["organic-standard","organic-community","geographic-organic-standard","chronological-multi-timeline","chronological-mono-timeline"]).has(e)||!t)return l;const{computationBudgetTime:h,autoRepulsionRadius:d,repulsionRadiusMultiplier:p,absoluteIdealEdgeLength:c,multiplicativeIdealEdgeLength:u,idealEdgeLengthType:y}=t;return n(h)?l.computationBudgetTime=h:h&&o.getLogger(this).warn("Invalid layout computationBudgetTime setting, will revert to default setting"),l.autoRepulsionRadius=d,!d&&a(p)?l.repulsionRadiusMultiplier=p:d||(l.autoRepulsionRadius=!0,o.getLogger(this).warn("Invalid layout repulsionRadiusMultiplier setting, will revert to default setting")),"geographic-organic-standard"===e&&(s(y)?l.idealEdgeLengthType=y:void 0!==y&&o.getLogger(this).warn('Invalid layout idealEdgeLengthType setting, will revert to "multiplier" setting'),"absolute-value"===y&&r(c)?l.absoluteIdealEdgeLength=c:"absolute-value"===y&&void 0!==c?o.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting"):"multiplier"===y&&r(u)?l.multiplicativeIdealEdgeLength=u:"multiplier"===y&&void 0!==u&&o.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting")),l}_convertValidatedOrganicSettingsToCalculationSettings(e){let t=e.idealEdgeLengthType===N.ABSOLUTE?e.absoluteIdealEdgeLength:e.multiplicativeIdealEdgeLength;return e.idealEdgeLengthType===N.ABSOLUTE&&(void 0===t?t=-1:t*=-1),{computationBudgetTime:e.computationBudgetTime??void 0,repulsionRadiusMultiplier:e.repulsionRadiusMultiplier&&!e.autoRepulsionRadius?e.repulsionRadiusMultiplier:void 0,idealEdgeLengthMultiplier:t}}_createSublayer(e){return new D({objectType:e,parentCompositeLayer:this,graphType:e.type})}_handleSublayersChange(e,t){if(t&&(t.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner")),e){const t=[];e.forEach(e=>{e.parent=this,t.push(this._createVisibleRefreshHandle(e))}),this.addHandles([...t,e.on("after-add",({item:e})=>{e.parent=this,this.addHandles(this._createVisibleRefreshHandle(e),"sublayers-owner")}),e.on("after-remove",({item:e})=>{e.parent=null})],"sublayers-owner")}}_createVisibleRefreshHandle(e){return p(()=>e.visible,(t,i)=>{!0===t&&!1===i&&e.emit("refresh",{dataChanged:!0})})}_alignLayersDataModelAndInclusionDefinition(e){const t=new Set((e.entityTypes??[]).map(e=>e.name).concat((e.relationshipTypes??[]).map(e=>e.name))),a=new Set((e.entityTypes??[]).map(e=>e.name)),n=new Set((e.relationshipTypes??[]).map(e=>e.name));if(this.layers){for(const i of this.layers)!i.graphType&&t.has(i.graphTypeName)&&(i.graphType=a.has(i.graphTypeName)?"entity":"relationship");const e=this.layers.filter(e=>t.has(e.graphTypeName)&&("entity"===e.graphType?a.has(e.graphTypeName):n.has(e.graphTypeName)));this.setAtOrigin("layers",e,g(this.originIdOf("layers")))}else this.layers=new i;if(this.layers&&this._originalInclusionList){const e=new Set(this._originalInclusionList.namedTypeDefinitions.keys()),t=this.tables?.map(e=>e.graphTypeName)??[],i=this.layers.map(e=>e.graphTypeName).concat(t);for(const n of i)e.has(n)||this._originalInclusionList.namedTypeDefinitions.set(n,{useAllData:!1,members:new Map});const a=[];for(const n of this._originalInclusionList.namedTypeDefinitions.keys())i.includes(n)||(o.getLogger(this).warn(`A named type, ${n}, was in the serialized feature collection but did not have a sublayer config in the item, so will be removed`),a.push(n));for(const n of a)this._originalInclusionList.namedTypeDefinitions.delete(n)}}};e([u(z)],ee.prototype,"url",void 0),e([u()],ee.prototype,"dataPreloadedInLocalCache",void 0),e([u()],ee.prototype,"initializationLinkChartConfig",void 0),e([u()],ee.prototype,"membershipModified",void 0),e([u()],ee.prototype,"dataManager",void 0),e([u()],ee.prototype,"initializationInclusionModeDefinition",null),e([u()],ee.prototype,"knowledgeGraph",void 0),e([u({type:i.ofType(D),json:{write:{ignoreOrigin:!0}}})],ee.prototype,"layers",void 0),e([u({readOnly:!0})],ee.prototype,"linkChart",null),e([u()],ee.prototype,"entityLinkChartDiagramLookup",void 0),e([u()],ee.prototype,"relationshipLinkChartDiagramLookup",void 0),e([u()],ee.prototype,"linkChartExtent",void 0),e([u()],ee.prototype,"memberEntityTypes",void 0),e([u()],ee.prototype,"memberRelationshipTypes",void 0),e([u({type:["LinkChartLayer"]})],ee.prototype,"operationalLayerType",void 0),e([u()],ee.prototype,"sublayerCapabilities",null),e([u()],ee.prototype,"sublayerIdsCache",void 0),e([u({type:i.ofType(D),json:{write:{ignoreOrigin:!0}}})],ee.prototype,"tables",void 0),e([u({json:{read:!1}})],ee.prototype,"type",void 0),e([u({readOnly:!0})],ee.prototype,"userHasEditingPrivileges",void 0),e([u({readOnly:!0})],ee.prototype,"userHasFullEditingPrivileges",void 0),e([u({readOnly:!0})],ee.prototype,"userHasUpdateItemPrivileges",void 0),e([u({json:{read:!1}})],ee.prototype,"chronologicalAuxiliaryGraphics",void 0),e([u(Y("dateFieldsTimeReference"))],ee.prototype,"dateFieldsTimeZone",void 0),ee=e([y("esri.layers.LinkChartLayer")],ee);const te=ee;export{te as default};
|
package/layers/ParquetLayer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import i from"../core/Collection.js";import{deprecatedProperty as o}from"../core/deprecate.js";import s from"../core/Error.js";import has from"../core/has.js";import a from"../core/Logger.js";import{MultiOriginJSONSupportMixin as p}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as n}from"../core/object.js";import{on as l}from"../core/reactiveUtils.js";import{getFilename as u}from"../core/urlUtils.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{writer as y}from"../core/accessorSupport/decorators/writer.js";import c from"../geometry/Extent.js";import f from"../geometry/SpatialReference.js";import h from"../graphic/ParquetGraphicOrigin.js";import g from"./Layer.js";import{ParquetSource as j}from"./graphics/sources/ParquetSource.js";import{BlendLayer as w}from"./mixins/BlendLayer.js";import{CustomParametersMixin as b}from"./mixins/CustomParametersMixin.js";import{FeatureEffectLayer as v}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as O}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as x}from"./mixins/OperationalLayer.js";import{OrderedLayer as q}from"./mixins/OrderedLayer.js";import{ScaleRangeLayer as I}from"./mixins/ScaleRangeLayer.js";import{labelsVisible as E,legendEnabled as F,popupEnabled as P}from"./support/commonProperties.js";import L from"./support/FeatureTemplate.js";import T from"./support/Field.js";import{defineFieldProperties as S}from"./support/fieldProperties.js";import{fixRendererFields as _}from"./support/fieldUtils.js";import R from"./support/GeometryEncodingLocation.js";import D from"./support/GeometryEncodingWkb.js";import z from"./support/LabelClass.js";import{reader as U}from"./support/labelingInfo.js";import C from"./support/ParquetFilesData.js";import Q from"./support/ParquetPortalItemData.js";import{parquetGeometryTypeKebabDict as k}from"./support/parquetUtils.js";import{rendererTypes as G}from"../renderers/support/typeUtils.js";import J from"../rest/support/Query.js";import{createPopupTemplate as M}from"../support/popupUtils.js";const N=S(),V="__OBJECTID",A={types:{key:"type",base:null,typeMap:{wkb:D,location:R}},json:{name:"layerDefinition.geometryEncoding",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryEncoding"}}}}};let B=class extends(O(v(w(q(I(x(p(b(r(g)))))))))){constructor(e){super(e),this._emptyUrls=new i,this.copyright=null,this.definitionExpression=null,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.geometryEncoding=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new h(this),this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=V,this.operationalLayerType="ParquetLayer",this.outFields=null,this.persistenceEnabled=!!has("parquetlayer-persistence-enabled"),this.popupTemplate=null,this.source=null,this.spatialReference=null,this.templates=null,this.type="parquet",this.data=null}initialize(){this.addHandles(l(()=>this.source,"source-changed",()=>{this.emit("refresh",{dataChanged:!0})}))}destroy(){this.source?.destroy()}async load(e){return this.addResolvingPromise(this._load(e)),this}get capabilities(){return this.source?.capabilities}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,r,i){const o=e.filter(e=>!(e.name===V&&"oid"===e.type)).map(e=>e.toJSON(i));n(r,o,t)}get isTable(){return null==this.geometryEncoding&&null==this.displayOptimization}set renderer(e){_(e,this.fieldsIndex),this._set("renderer",e)}get title(){let e=this._get("title");if(e&&"defaults"!==this.originOf("title"))return e;switch(this.data?.type){case"files":{const t=this.data.urls?.at(0);e=t?u(t,["parquet"]):null;break}case"portal-item":e=this.data.portalItem?.title}return e||"Parquet"}set title(e){this._set("title",e)}writeData(e,t,r,i){if(!e)return;if("portal-item"===e.type&&"Parquet Feature Layer"!==e.portalItem?.type)return void i.messages?.push(new s("parquet-layer:unsupported-data",`Portal item with type '${e.portalItem?.type}' is not supported in web maps`,{layer:this,itemId:e.portalItem?.id}));const o=e.write({},i);o&&(t.source=o)}get urls(){return"files"===this.data?.type?this.data.urls:this._emptyUrls}set urls(e){o(a.getLogger(this),"urls",{replacement:"data",version:"5.1",warnOnce:!0}),this.data=new C({urls:this._normalizeUrls(e)})}createPopupTemplate(e){return M(this,e)}createQuery(){const e=new J;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}async createSource(e){const t=new j({layer:this});return await t.load(e),t}getFieldDomain(e,t){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,t){await this.load();const r=await this.source.queryFeatures(this._normalizeQuery(e),t),i=this.graphicOrigin;if(r?.features)for(const o of r.features)o.layer=o.sourceLayer=this,o.origin=i;return r}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),t)}async queryFeatureCount(e,t){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),t)}async queryExtent(e,t){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),t)}_normalizeQuery(e){return J.from(e)??this.createQuery()}_normalizeUrls(e){return Array.isArray(e)?new i(e):e??new i}async _load(e){"portal-item"===this.data?.type&&await this.data.portalItem.load();const t=await this.createSource(e);this._set("source",t),this.read(t.sourceJSON,{origin:"service"}),["fields"].forEach(e=>this.revertToOrigin(e,"service")),_(this.renderer,this.fieldsIndex),null==this.spatialReference&&(this.spatialReference=f.WGS84)}};e([d({readOnly:!0,json:{read:!1,write:!1}})],B.prototype,"capabilities",null),e([d({type:String})],B.prototype,"copyright",void 0),e([d({readOnly:!0})],B.prototype,"defaultPopupTemplate",null),e([d({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],B.prototype,"definitionExpression",void 0),e([d()],B.prototype,"displayOptimization",void 0),e([d({type:[T],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],B.prototype,"fields",void 0),e([y("fields")],B.prototype,"writeFields",null),e([d(N.fieldsIndex)],B.prototype,"fieldsIndex",void 0),e([d(A)],B.prototype,"geometryEncoding",void 0),e([d({type:c,json:{name:"extent"}})],B.prototype,"fullExtent",void 0),e([d({type:k.apiValues,json:{name:"layerDefinition.geometryType",read:{reader:k.read},write:{writer:k.write,ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryType",reader:k.read}}}}})],B.prototype,"geometryType",void 0),e([d({readOnly:!0,clonable:!1})],B.prototype,"graphicOrigin",void 0),e([d(E)],B.prototype,"labelsVisible",void 0),e([d({type:[z],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:U},write:!0}})],B.prototype,"labelingInfo",void 0),e([d(F)],B.prototype,"legendEnabled",void 0),e([d()],B.prototype,"file",void 0),e([d({type:String,readOnly:!0})],B.prototype,"objectIdField",void 0),e([d({type:["ParquetLayer"]})],B.prototype,"operationalLayerType",void 0),e([d(N.outFields)],B.prototype,"outFields",void 0),e([d(P)],B.prototype,"popupEnabled",void 0),e([d({type:t,json:{name:"popupInfo",write:!0}})],B.prototype,"popupTemplate",void 0),e([d({types:G,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{read:{source:"drawingInfo.renderer"}}}}})],B.prototype,"renderer",null),e([d({type:j,readOnly:!0,cast:null,json:{read:!1}})],B.prototype,"source",void 0),e([d({type:f,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"extent.spatialReference"}}}}})],B.prototype,"spatialReference",void 0),e([d({type:[L]})],B.prototype,"templates",void 0),e([d()],B.prototype,"title",null),e([d({json:{read:!1},readOnly:!0})],B.prototype,"type",void 0),e([d({types:{key:"type",base:null,typeMap:{files:C,"portal-item":Q}},json:{name:"source",origins:{"web-map":{write:{target:"source",ignoreOrigin:!0}}}}})],B.prototype,"data",void 0),e([y("web-map","data")],B.prototype,"writeData",null),e([d({type:i.ofType(String),json:{read:!1,write:!1}})],B.prototype,"urls",null),B=e([m("esri.layers.ParquetLayer")],B);export{B as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import r from"../request.js";import{ClonableMixin as o}from"../core/Clonable.js";import i from"../core/Error.js";import{clone as s}from"../core/lang.js";import n from"../core/Logger.js";import{MultiOriginJSONSupportMixin as a}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as p}from"../core/object.js";import{throwIfAbortError as l}from"../core/promiseUtils.js";import{join as d}from"../core/urlUtils.js";import{property as u,subclass as m}from"../core/accessorSupport/decorators.js";import c from"../graphic/PointCloudGraphicOrigin.js";import y from"./Layer.js";import{APIKeyMixin as f}from"./mixins/APIKeyMixin.js";import{ArcGISService as h}from"./mixins/ArcGISService.js";import{CustomParametersMixin as g}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as v}from"./mixins/OperationalLayer.js";import{PortalLayer as w}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as j}from"./mixins/ScaleRangeLayer.js";import{SceneService as I,updateExtentFromPageObb as
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import r from"../request.js";import{ClonableMixin as o}from"../core/Clonable.js";import i from"../core/Error.js";import{clone as s}from"../core/lang.js";import n from"../core/Logger.js";import{MultiOriginJSONSupportMixin as a}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as p}from"../core/object.js";import{throwIfAbortError as l}from"../core/promiseUtils.js";import{join as d}from"../core/urlUtils.js";import{property as u,subclass as m}from"../core/accessorSupport/decorators.js";import c from"../graphic/PointCloudGraphicOrigin.js";import y from"./Layer.js";import{APIKeyMixin as f}from"./mixins/APIKeyMixin.js";import{ArcGISService as h}from"./mixins/ArcGISService.js";import{CustomParametersMixin as g}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as v}from"./mixins/OperationalLayer.js";import{PortalLayer as w}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as j}from"./mixins/ScaleRangeLayer.js";import{SceneService as I,updateExtentFromPageObb as P}from"./mixins/SceneService.js";import{types as b}from"./pointCloudFilters/typeUtils.js";import{popupEnabled as x,elevationInfo as S,legendEnabled as T}from"./support/commonProperties.js";import F from"./support/Field.js";import{defineFieldProperties as _}from"./support/fieldProperties.js";import L from"../popup/ExpressionInfo.js";import{types as C}from"../renderers/support/pointCloud/typeUtils.js";import{logInvalidElevationInfoWarning as R,elevationModeRequiredMessage as E,featureExpressionUnsupportedMessage as O}from"../support/elevationInfoUtils.js";import{createPopupTemplate as N}from"../support/popupUtils.js";import{reader as A}from"../core/accessorSupport/decorators/reader.js";import{writer as U}from"../core/accessorSupport/decorators/writer.js";const K=_();let V=class extends(I(h(v(w(j(a(g(f(o(y)))))))))){constructor(...e){super(...e),this.operationalLayerType="PointCloudLayer",this.popupEnabled=!0,this.popupTemplate=null,this.opacity=1,this.filters=[],this.fields=null,this.fieldsIndex=null,this.outFields=null,this.path=null,this.legendEnabled=!0,this.renderer=null,this.type="point-cloud",this.graphicOrigin=new c(this),this.rootPagePromise=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}get defaultPopupTemplate(){return this.attributeStorageInfo?this.createPopupTemplate():null}getFieldDomain(e){const t=this.fieldsIndex.get(e);return t?.domain?t.domain:null}readServiceFields(e,t,r){return Array.isArray(e)?e.map(e=>{const t=new F;return"FieldTypeInteger"===e.type&&((e=s(e)).type="esriFieldTypeInteger"),t.read(e,r),t}):Array.isArray(t.attributeStorageInfo)?t.attributeStorageInfo.map(e=>new F({name:e.name,type:"ELEVATION"===e.name?"double":"integer"})):null}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}writeRenderer(e,t,r,o){p("layerDefinition.drawingInfo.renderer",e.write({},o),t)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(l),await this._fetchService(e?.signal),await this._fetchRootPageAndUpdateExtent(e?.signal)}async _fetchRootPageAndUpdateExtent(e){this.rootPagePromise=this._fetchRootPage(e),this.rootPagePromise.catch(()=>{});const{fullExtent:t}=this;if(null!=t&&!t.hasZ){const e=await this.rootPagePromise;P(t,e?.nodes?.[0]?.obb)}}async _fetchRootPage(e){const t=`${this.parsedUrl?.path??""}/nodepages/0`;try{return(await r(t,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data}catch(o){throw new i("pointcloudlayer:root-page-missing","Root page missing.",{error:o,url:t})}}createPopupTemplate(e){const t=N(this,e);return t&&(this._formatPopupTemplateReturnsField(t),this._formatPopupTemplateRGBField(t)),t}_formatPopupTemplateReturnsField(e){const t=this.fieldsIndex.get("RETURNS");if(!t)return;const r=e.fieldInfos?.find(e=>e.fieldName===t.name);if(!r)return;const o=new L({name:"pcl-returns-decoded",title:t.alias||t.name,expression:`\n var returnValue = $feature.${t.name};\n return (returnValue % 16) + " / " + Floor(returnValue / 16);\n `});e.expressionInfos=[...e.expressionInfos||[],o],r.fieldName="expression/pcl-returns-decoded"}_formatPopupTemplateRGBField(e){const t=this.fieldsIndex.get("RGB");if(!t)return;const r=e.fieldInfos?.find(e=>e.fieldName===t.name);if(!r)return;const o=new L({name:"pcl-rgb-decoded",title:t.alias||t.name,expression:`\n var rgb = $feature.${t.name};\n var red = Floor(rgb / 65536, 0);\n var green = Floor((rgb - (red * 65536)) / 256,0);\n var blue = rgb - (red * 65536) - (green * 256);\n\n return "rgb(" + red + "," + green + "," + blue + ")";\n `});e.expressionInfos=[...e.expressionInfos||[],o],r.fieldName="expression/pcl-rgb-decoded"}async queryCachedStatistics(e,t){if(await this.load(t),!this.attributeStorageInfo)throw new i("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const o=this.fieldsIndex.get(e);if(!o)throw new i("pointcloudlayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const i of this.attributeStorageInfo)if(i.name===o.name){const e=d(this.parsedUrl?.path??"",`./statistics/${i.key}`);return r(e,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then(e=>e.data)}throw new i("pointcloudlayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"};return this._debouncedSaveOperations(0,e)}validateLayer(e){if(e.layerType&&"PointCloud"!==e.layerType)throw new i("pointcloudlayer:layer-type-not-supported","PointCloudLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new i("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"});if(this.version.major>2)throw new i("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"})}hasCachedStatistics(e){return null!=this.attributeStorageInfo&&this.attributeStorageInfo.some(t=>t.name===e)}_getTypeKeywords(){return["PointCloud"]}_validateElevationInfo(e){R(n.getLogger(this),E("Point cloud layers","absolute-height",e)),R(n.getLogger(this),O("Point cloud layers",e))}};e([u({type:["PointCloudLayer"]})],V.prototype,"operationalLayerType",void 0),e([u(x)],V.prototype,"popupEnabled",void 0),e([u({type:t,json:{name:"popupInfo",write:!0}})],V.prototype,"popupTemplate",void 0),e([u({readOnly:!0,json:{read:!1}})],V.prototype,"defaultPopupTemplate",null),e([u({readOnly:!0,json:{write:!1,read:!1,origins:{"web-document":{write:!1,read:!1}}}})],V.prototype,"opacity",void 0),e([u({type:["show","hide"]})],V.prototype,"listMode",void 0),e([u({types:[b],json:{origins:{service:{read:{source:"filters"}}},name:"layerDefinition.filters",write:!0}})],V.prototype,"filters",void 0),e([u({type:[F]})],V.prototype,"fields",void 0),e([u(K.fieldsIndex)],V.prototype,"fieldsIndex",void 0),e([A("service","fields",["fields","attributeStorageInfo"])],V.prototype,"readServiceFields",null),e([u(K.outFields)],V.prototype,"outFields",void 0),e([u({readOnly:!0})],V.prototype,"attributeStorageInfo",void 0),e([u(S)],V.prototype,"elevationInfo",null),e([u({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],V.prototype,"path",void 0),e([u(T)],V.prototype,"legendEnabled",void 0),e([u({types:C,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:{target:{"layerDefinition.drawingInfo.renderer":{types:C},"layerDefinition.drawingInfo.transparency":{type:Number}}}}})],V.prototype,"renderer",void 0),e([U("renderer")],V.prototype,"writeRenderer",null),e([u({json:{read:!1},readOnly:!0})],V.prototype,"type",void 0),e([u({readOnly:!0})],V.prototype,"graphicOrigin",void 0),V=e([m("esri.layers.PointCloudLayer")],V);const $=V;export{$ as default};
|
package/layers/SceneLayer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../Graphic.js";import r from"../PopupTemplate.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Collection.js";import o from"../core/Error.js";import{abortHandle as a}from"../core/handleUtils.js";import n from"../core/Logger.js";import{destroyMaybe as l}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,throwIfAborted as u,isAbortError as y,throwIfNotAbortError as c}from"../core/promiseUtils.js";import{whenOnce as m}from"../core/reactiveUtils.js";import{property as h,subclass as f}from"../core/accessorSupport/decorators.js";import{getProperties as g}from"../core/accessorSupport/utils.js";import v from"../geometry/Point.js";import{projectAsync as w}from"../geometry/projectionUtils.js";import b from"../graphic/SceneGraphicOrigin.js";import I from"./Layer.js";import{NoModelError as L,MultipleModelsError as j}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as F}from"./mixins/APIKeyMixin.js";import{ArcGISService as S}from"./mixins/ArcGISService.js";import{CustomParametersMixin as T}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as O}from"./mixins/EditBusLayer.js";import{OperationalLayer as _}from"./mixins/OperationalLayer.js";import{PortalLayer as x}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as P}from"./mixins/ScaleRangeLayer.js";import{SceneService as A}from"./mixins/SceneService.js";import{useViewTimeProperty as E}from"./mixins/TemporalLayer.js";import{isHostedAgolService as U}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as D}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as q}from"./support/capabilities.js";import{elevationInfo as R,labelsVisible as C,legendEnabled as Q,popupEnabled as N,attributeTableTemplate as G,screenSizePerspectiveEnabled as k}from"./support/commonProperties.js";import{getFieldDomain as M,computeEffectiveEditingEnabled as V,getGlobalIdToObjectIdMap as K}from"./support/featureLayerUtils.js";import z from"./support/FeatureReductionSelection.js";import{defineFieldProperties as $}from"./support/fieldProperties.js";import H from"./support/FieldsIndex.js";import{fixRendererFields as W,fixTimeInfoFields as B,unpackFieldNames as Z}from"./support/fieldUtils.js";import{I3SNodePageDefinition as J,I3SMaterialDefinition as X,I3STextureSetDefinition as Y,I3SGeometryDefinition as ee}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as te,isFileSupported as re}from"./support/infoFor3D.js";import ie from"./support/LabelClass.js";import{reader as se}from"./support/labelingInfo.js";import oe from"./support/LayerFloorInfo.js";import{layersLoaderMap as ae}from"./support/layersLoader.js";import{getMeshTransformForMetersToSpatialReference as ne}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as le}from"./support/RangeInfo.js";import pe from"./support/SceneFilter.js";import{cacheIsOutOfSync as de}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ue}from"./support/sceneLayerStatistics.js";import{SceneServiceTimeInfo as ye}from"./support/SceneServiceTimeInfo.js";import ce from"./support/TimeInfo.js";import{loadStyleRenderer as me}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as he}from"../renderers/support/typeUtils.js";import fe from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as ge,elevationModeUnsupportedMessage as ve,featureExpressionUnsupportedMessage as we}from"../support/elevationInfoUtils.js";import{createPopupTemplate as be}from"../support/popupUtils.js";import{extractZipFiles as Ie}from"../support/zipUtils.js";import Le from"../time/TimeExtent.js";import je from"../time/TimeInterval.js";import{queryAttributesFromCachedAttributesId as Fe}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as Se,getFetchPopupTemplate as Te}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Oe}from"../webdoc/support/opacityUtils.js";import{reader as _e}from"../core/accessorSupport/decorators/reader.js";const xe=new Set(["3DObject","Point"]),Pe=$();let Ae=class extends(O(A(S(_(x(P(p(T(F(i(I))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.graphicOrigin=new b(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new s,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0,this.serviceTimeInfo=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=l(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?M(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new H(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:J.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&V(this.associatedLayer)}get geometryType(){return Ue[this.profile]||"mesh"}set renderer(e){W(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:q;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:l,supportsM:p,isVersioned:d,supportsAttachment:u},operations:{supportsEditing:y,supportsAdd:c,supportsUpdate:m,supportsDelete:h,supportsQuery:f,supportsQueryAttachments:g,supportsAsyncConvert3D:v},attachment:w}=e,b=e.operations.supportsChangeTracking,I=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:I&&a,supportsUploadWithItemId:o},data:{supportsAttachment:u,supportsZ:l,supportsM:p,isVersioned:d,queryFormats:e.data.queryFormats,sourceFormats:e.data.sourceFormats},operations:{supportsQuery:f,supportsQueryAttachments:g,supportsEditing:y&&b,supportsAdd:I&&c&&b,supportsDelete:I&&h&&b,supportsUpdate:m&&b,supportsAsyncConvert3D:v},attachment:w}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&Ee[r]?Ee[r]:(n.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}get timeInfo(){const e=this.associatedLayer?.timeInfo;if(null==e)return null;const t=e.clone();return B(t,this.fieldsIndex),t}set timeInfo(e){B(e,this.fieldsIndex),this._override("timeInfo",e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override("timeExtent",e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override("timeOffset",e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override("datesInUnknownTimezone",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=e?.signal;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(d),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await me(this,{origin:"service"},t),W(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){n.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new fe;return"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryModels(e,t){const[r,{queryModels:i}]=await Promise.all([this._getAssociatedLayerForQuery(),import("./scene/modelQuerySupport.js")]);return i(this,r,e,t)}async queryModel(e,t){const[r,{queryModel:i}]=await Promise.all([this._getAssociatedLayerForQuery(),import("./scene/modelQuerySupport.js")]);return i(this,r,e,t)}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=Z(this.fieldsIndex,await Se(this,Te(this)));return Fe(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new o("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new t;return s.attributes=i[0],s.layer=this,s.sourceLayer=this,s.origin=this.graphicOrigin,s}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(n.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return be(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new o("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(0,e)}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");let i=t;await this.load();const s=this.associatedLayer;if(!s)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");await s.load();const{globalIdField:a}=s,n=!!s.infoFor3D,l=i?.globalIdUsed??!0;if(n&&null==a)throw new o(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(n&&!l)throw new o(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return U(s.url)&&n&&null!=e.deleteFeatures&&null!=a&&(i={...i,globalIdToObjectId:await K(s,e.deleteFeatures,a)}),r(this,s.source,e,i)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};const r=e=>{throw n.getLogger(this).error(".convertMesh()",e.message),e};await this.load(t),this.infoFor3D||r(new o("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e);u(t);const s=i.reduce((e,t)=>te(this.infoFor3D,t)?e+1:e,0);0===s&&r(new L),s>1&&r(new j);const a=this.spatialReference,l=t.origin,p=await w(l??t.defaultOrigin??new v({x:0,y:0,z:0,spatialReference:a}),a,t),d=a.isGeographic?"local":"georeferenced",{createWithExternalSource:y}=await import("../geometry/support/meshUtils.js");u(t);const c=y(p,{type:"client",files:i},{vertexSpace:d,transform:ne(a),unitConversionDisabled:!0}),[m]=await this.uploadAssets([c],{...t,useAssetOrigin:!l});return m}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;if(!t)return e;return(await Ie(e)).filter(e=>re(t,e))}validateLayer(e){if(e.layerType&&!xe.has(e.layerType))throw new o("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new o("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new o("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new o("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new o("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new o("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=g(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(2===o||3===o)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");if(null==this.associatedLayer?.infoFor3D||!e||!U(this.associatedLayer?.url)||!de(this))return;g(this).setAtOrigin("fullExtent",e.clone(),2)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await D(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await ae.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,apiKey:this.apiKey,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){y(t)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles(a(e));try{await m(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(r){return void c(r)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?n.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):n.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&ge(n.getLogger(this),ve("Mesh scene layers","relative-to-scene",e)),ge(n.getLogger(this),we("Scene layers",e))}async fetchStatistics(e,t){return await ue({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}async loadTimeInfoFromService(e){const{serviceTimeInfo:t}=this;if(null==t)return;const{startTimeField:r,endTimeField:i}=t;if(null==r&&null==i)return;if(de({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;const s=async t=>{let i=null;try{const r=await this.fetchStatistics(t,e);i=r?.stats}catch{}if(null==i)return null;const{minTimeStr:s,min:o,maxTimeStr:a,max:n}=i,l=t===r?s??o:a??n;return null!=l?new Date(l):null},[o,a]=await Promise.all([s(r),s(i)]);if(null!=r&&null==o||null!=i&&null==a)return;const n=new Le({start:o,end:a});this.setAtOrigin("timeInfo",new ce({endField:i,startField:r,fullTimeExtent:n}),"service")}};e([h({types:{key:"type",base:null,typeMap:{selection:z}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:{allowNull:!0}},"portal-item":{name:"layerDefinition.featureReduction",write:{allowNull:!0}}}}})],Ae.prototype,"featureReduction",void 0),e([h({type:[le],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}},clonable:!1})],Ae.prototype,"rangeInfos",void 0),e([h({json:{read:!1}})],Ae.prototype,"associatedLayer",void 0),e([h({type:["show","hide"]})],Ae.prototype,"listMode",void 0),e([h({type:["ArcGISSceneServiceLayer"]})],Ae.prototype,"operationalLayerType",void 0),e([h({json:{read:!1},readOnly:!0})],Ae.prototype,"type",void 0),e([h({...Pe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"fields",void 0),e([h()],Ae.prototype,"types",null),e([h()],Ae.prototype,"typeIdField",null),e([h()],Ae.prototype,"templates",null),e([h()],Ae.prototype,"formTemplate",null),e([h({readOnly:!0})],Ae.prototype,"graphicOrigin",void 0),e([h({readOnly:!0,clonable:!1})],Ae.prototype,"fieldsIndex",null),e([h({type:oe,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Ae.prototype,"floorInfo",void 0),e([h(Pe.outFields)],Ae.prototype,"outFields",void 0),e([h({type:J,readOnly:!0,json:{read:!1},clonable:!1})],Ae.prototype,"nodePages",void 0),e([_e("service","nodePages",["nodePages","pointNodePages"])],Ae.prototype,"readNodePages",null),e([h({type:[X],readOnly:!0,clonable:!1})],Ae.prototype,"materialDefinitions",void 0),e([h({type:[Y],readOnly:!0,clonable:!1})],Ae.prototype,"textureSetDefinitions",void 0),e([h({type:[ee],readOnly:!0,clonable:!1})],Ae.prototype,"geometryDefinitions",void 0),e([h({readOnly:!0})],Ae.prototype,"serviceUpdateTimeStamp",void 0),e([h({readOnly:!0})],Ae.prototype,"attributeStorageInfo",void 0),e([h({readOnly:!0})],Ae.prototype,"statisticsInfo",void 0),e([h({type:s.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Ae.prototype,"excludeObjectIds",void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Ae.prototype,"definitionExpression",void 0),e([h({type:pe,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Ae.prototype,"filter",void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Ae.prototype,"path",void 0),e([h(R)],Ae.prototype,"elevationInfo",null),e([h({readOnly:!0,json:{read:!1}})],Ae.prototype,"effectiveCapabilities",null),e([h({readOnly:!0})],Ae.prototype,"effectiveEditingEnabled",null),e([h({type:String})],Ae.prototype,"geometryType",null),e([h(C)],Ae.prototype,"labelsVisible",void 0),e([h({type:[ie],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:se},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:se},write:!0}})],Ae.prototype,"labelingInfo",void 0),e([h(Q)],Ae.prototype,"legendEnabled",void 0),e([h({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?Oe(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Ae.prototype,"opacity",void 0),e([h({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"priority",void 0),e([h({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"semantic",void 0),e([h({types:he,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Ae.prototype,"renderer",null),e([h({json:{read:!1}})],Ae.prototype,"cachedDrawingInfo",void 0),e([_e("service","cachedDrawingInfo")],Ae.prototype,"readCachedDrawingInfo",null),e([h({readOnly:!0,json:{read:!1}})],Ae.prototype,"capabilities",null),e([h({type:Boolean,json:{read:!1}})],Ae.prototype,"editingEnabled",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Ae.prototype,"infoFor3D",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Ae.prototype,"relationships",null),e([h(N)],Ae.prototype,"popupEnabled",void 0),e([h({type:r,json:{name:"popupInfo",write:!0}})],Ae.prototype,"popupTemplate",void 0),e([h({readOnly:!0,json:{read:!1}})],Ae.prototype,"defaultPopupTemplate",null),e([h(G)],Ae.prototype,"attributeTableTemplate",void 0),e([h({type:String,json:{read:!1}})],Ae.prototype,"objectIdField",void 0),e([_e("service","objectIdField",["objectIdField","fields"])],Ae.prototype,"readObjectIdField",null),e([h({type:String,json:{read:!1}})],Ae.prototype,"globalIdField",void 0),e([_e("service","globalIdField",["globalIdField","fields"])],Ae.prototype,"readGlobalIdField",null),e([h({readOnly:!0,type:String,json:{read:!1}})],Ae.prototype,"displayField",null),e([h({type:String,json:{read:!1}})],Ae.prototype,"profile",void 0),e([_e("service","profile",["store.profile"])],Ae.prototype,"readProfile",null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Ae.prototype,"normalReferenceFrame",void 0),e([h(k)],Ae.prototype,"screenSizePerspectiveEnabled",void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"serviceItemId",void 0),e([h(E)],Ae.prototype,"useViewTime",null),e([h({type:ce,json:{read:!1,write:!1}})],Ae.prototype,"timeInfo",null),e([h({type:Le,json:{read:!1,write:!1}})],Ae.prototype,"timeExtent",null),e([h({type:je,json:{read:!1,write:!1}})],Ae.prototype,"timeOffset",null),e([h({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],Ae.prototype,"datesInUnknownTimezone",null),e([h({type:ye,readOnly:!0,json:{read:{source:"timeInfo"}},clonable:!1})],Ae.prototype,"serviceTimeInfo",void 0),Ae=e([f("esri.layers.SceneLayer")],Ae);const Ee={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Ue={"mesh-pyramids":"mesh",points:"point"},De=Ae;export{De as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../Graphic.js";import r from"../PopupTemplate.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Collection.js";import o from"../core/Error.js";import{abortHandle as a}from"../core/handleUtils.js";import n from"../core/Logger.js";import{destroyMaybe as l}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,throwIfAborted as u,isAbortError as y,throwIfNotAbortError as c}from"../core/promiseUtils.js";import{whenOnce as m}from"../core/reactiveUtils.js";import{property as h,subclass as f}from"../core/accessorSupport/decorators.js";import{getProperties as g}from"../core/accessorSupport/utils.js";import v from"../geometry/Point.js";import{projectAsync as w}from"../geometry/projectionUtils.js";import b from"../graphic/SceneGraphicOrigin.js";import I from"./Layer.js";import{NoModelError as L,MultipleModelsError as j}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as F}from"./mixins/APIKeyMixin.js";import{ArcGISService as S}from"./mixins/ArcGISService.js";import{CustomParametersMixin as T}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as O}from"./mixins/EditBusLayer.js";import{OperationalLayer as _}from"./mixins/OperationalLayer.js";import{PortalLayer as x}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as P}from"./mixins/ScaleRangeLayer.js";import{SceneService as A}from"./mixins/SceneService.js";import{useViewTimeProperty as E}from"./mixins/TemporalLayer.js";import{isHostedAgolService as U}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as D}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as q}from"./support/capabilities.js";import{elevationInfo as R,labelsVisible as C,legendEnabled as Q,popupEnabled as N,attributeTableTemplate as G,screenSizePerspectiveEnabled as k}from"./support/commonProperties.js";import{getFieldDomain as M,computeEffectiveEditingEnabled as V,getGlobalIdToObjectIdMap as K}from"./support/featureLayerUtils.js";import z from"./support/FeatureReductionSelection.js";import{defineFieldProperties as $}from"./support/fieldProperties.js";import H from"./support/FieldsIndex.js";import{fixRendererFields as W,fixTimeInfoFields as B,unpackFieldNames as Z}from"./support/fieldUtils.js";import{I3SNodePageDefinition as J,I3SMaterialDefinition as X,I3STextureSetDefinition as Y,I3SGeometryDefinition as ee}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as te,isFileSupported as re}from"./support/infoFor3D.js";import ie from"./support/LabelClass.js";import{reader as se}from"./support/labelingInfo.js";import oe from"./support/LayerFloorInfo.js";import{layersLoaderMap as ae}from"./support/layersLoader.js";import{getMeshTransformForMetersToSpatialReference as ne}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as le}from"./support/RangeInfo.js";import pe from"./support/SceneFilter.js";import{cacheIsOutOfSync as de}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ue}from"./support/sceneLayerStatistics.js";import{SceneServiceTimeInfo as ye}from"./support/SceneServiceTimeInfo.js";import ce from"./support/TimeInfo.js";import{loadStyleRenderer as me}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as he}from"../renderers/support/typeUtils.js";import fe from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as ge,elevationModeUnsupportedMessage as ve,featureExpressionUnsupportedMessage as we}from"../support/elevationInfoUtils.js";import{createPopupTemplate as be}from"../support/popupUtils.js";import{extractZipFiles as Ie}from"../support/zipUtils.js";import Le from"../time/TimeExtent.js";import je from"../time/TimeInterval.js";import{queryAttributesFromCachedAttributesId as Fe}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as Se,getFetchPopupTemplate as Te}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Oe}from"../webdoc/support/opacityUtils.js";import{reader as _e}from"../core/accessorSupport/decorators/reader.js";const xe=new Set(["3DObject","Point"]),Pe=$();let Ae=class extends(O(A(S(_(x(P(p(T(F(i(I))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.graphicOrigin=new b(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new s,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0,this.serviceTimeInfo=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=l(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?M(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new H(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:J.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&V(this.associatedLayer)}get geometryType(){return Ue[this.profile]||"mesh"}set renderer(e){W(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:q;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:l,supportsM:p,isVersioned:d,supportsAttachment:u},operations:{supportsEditing:y,supportsAdd:c,supportsUpdate:m,supportsDelete:h,supportsQuery:f,supportsQueryAttachments:g,supportsAsyncConvert3D:v},attachment:w}=e,b=e.operations.supportsChangeTracking,I=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:I&&a,supportsUploadWithItemId:o},data:{supportsAttachment:u,supportsZ:l,supportsM:p,isVersioned:d,queryFormats:e.data.queryFormats,sourceFormats:e.data.sourceFormats},operations:{supportsQuery:f,supportsQueryAttachments:g,supportsEditing:y&&b,supportsAdd:I&&c&&b,supportsDelete:I&&h&&b,supportsUpdate:m&&b,supportsAsyncConvert3D:v},attachment:w}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&Ee[r]?Ee[r]:(n.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}get timeInfo(){const e=this.associatedLayer?.timeInfo;if(null==e)return null;const t=e.clone();return B(t,this.fieldsIndex),t}set timeInfo(e){B(e,this.fieldsIndex),this._override("timeInfo",e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override("timeExtent",e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override("timeOffset",e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override("datesInUnknownTimezone",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=e?.signal;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(d),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await me(this,{origin:"service"},t),W(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){n.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new fe;return"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryModels(e,t){const[r,{queryModels:i}]=await Promise.all([this._getAssociatedLayerForQuery(),import("./scene/modelQuerySupport.js")]);return i(this,r,e,t)}async queryModel(e,t){const[r,{queryModel:i}]=await Promise.all([this._getAssociatedLayerForQuery(),import("./scene/modelQuerySupport.js")]);return i(this,r,e,t)}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=Z(this.fieldsIndex,await Se(this,Te(this)));return Fe(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new o("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new t;return s.attributes=i[0],s.layer=this,s.sourceLayer=this,s.origin=this.graphicOrigin,s}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(n.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return be(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new o("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(0,e)}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");let i=t;await this.load();const s=this.associatedLayer;if(!s)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");await s.load();const{globalIdField:a}=s,n=!!s.infoFor3D,l=i?.globalIdUsed??!0;if(n&&null==a)throw new o(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(n&&!l)throw new o(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return U(s.url)&&n&&null!=e.deleteFeatures&&null!=a&&(i={...i,globalIdToObjectId:await K(s,e.deleteFeatures,a)}),r(this,s.source,e,i)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};const r=e=>{throw n.getLogger(this).error(".convertMesh()",e.message),e};await this.load(t),this.infoFor3D||r(new o("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e);u(t);const s=i.reduce((e,t)=>te(this.infoFor3D,t)?e+1:e,0);0===s&&r(new L),s>1&&r(new j);const a=this.spatialReference,l=t.origin,p=await w(l??t.defaultOrigin??new v({x:0,y:0,z:0,spatialReference:a}),a,t),d=a.isGeographic?"local":"georeferenced",{createWithExternalSource:y}=await import("../geometry/support/meshUtils.js");u(t);const c=y(p,{type:"client",files:i},{vertexSpace:d,transform:ne(a),unitConversionDisabled:!0}),[m]=await this.uploadAssets([c],{...t,useAssetOrigin:!l});return m}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;if(!t)return e;return(await Ie(e)).filter(e=>re(t,e))}validateLayer(e){if(e.layerType&&!xe.has(e.layerType))throw new o("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new o("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new o("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new o("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new o("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new o("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=g(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(2===o||3===o)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");if(null==this.associatedLayer?.infoFor3D||!e||!U(this.associatedLayer?.url)||!de(this))return;g(this).setAtOrigin("fullExtent",e.clone(),2)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await D(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await ae.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,apiKey:this.apiKey,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){y(t)||this._logWarningOnPopupEnabled().catch(()=>{})}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles(a(e));try{await m(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(r){return void c(r)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?n.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):n.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&ge(n.getLogger(this),ve("Mesh scene layers","relative-to-scene",e)),ge(n.getLogger(this),we("Scene layers",e))}async fetchStatistics(e,t){return await ue({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}async loadTimeInfoFromService(e){const{serviceTimeInfo:t}=this;if(null==t)return;const{startTimeField:r,endTimeField:i}=t;if(null==r&&null==i)return;if(de({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;const s=async t=>{let i=null;try{const r=await this.fetchStatistics(t,e);i=r?.stats}catch{}if(null==i)return null;const{minTimeStr:s,min:o,maxTimeStr:a,max:n}=i,l=t===r?s??o:a??n;return null!=l?new Date(l):null},[o,a]=await Promise.all([s(r),s(i)]);if(null!=r&&null==o||null!=i&&null==a)return;const n=new Le({start:o,end:a});this.setAtOrigin("timeInfo",new ce({endField:i,startField:r,fullTimeExtent:n}),"service")}};e([h({types:{key:"type",base:null,typeMap:{selection:z}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:{allowNull:!0}},"portal-item":{name:"layerDefinition.featureReduction",write:{allowNull:!0}}}}})],Ae.prototype,"featureReduction",void 0),e([h({type:[le],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}},clonable:!1})],Ae.prototype,"rangeInfos",void 0),e([h({json:{read:!1}})],Ae.prototype,"associatedLayer",void 0),e([h({type:["show","hide"]})],Ae.prototype,"listMode",void 0),e([h({type:["ArcGISSceneServiceLayer"]})],Ae.prototype,"operationalLayerType",void 0),e([h({json:{read:!1},readOnly:!0})],Ae.prototype,"type",void 0),e([h({...Pe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"fields",void 0),e([h()],Ae.prototype,"types",null),e([h()],Ae.prototype,"typeIdField",null),e([h()],Ae.prototype,"templates",null),e([h()],Ae.prototype,"formTemplate",null),e([h({readOnly:!0})],Ae.prototype,"graphicOrigin",void 0),e([h({readOnly:!0,clonable:!1})],Ae.prototype,"fieldsIndex",null),e([h({type:oe,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Ae.prototype,"floorInfo",void 0),e([h(Pe.outFields)],Ae.prototype,"outFields",void 0),e([h({type:J,readOnly:!0,json:{read:!1},clonable:!1})],Ae.prototype,"nodePages",void 0),e([_e("service","nodePages",["nodePages","pointNodePages"])],Ae.prototype,"readNodePages",null),e([h({type:[X],readOnly:!0,clonable:!1})],Ae.prototype,"materialDefinitions",void 0),e([h({type:[Y],readOnly:!0,clonable:!1})],Ae.prototype,"textureSetDefinitions",void 0),e([h({type:[ee],readOnly:!0,clonable:!1})],Ae.prototype,"geometryDefinitions",void 0),e([h({readOnly:!0})],Ae.prototype,"serviceUpdateTimeStamp",void 0),e([h({readOnly:!0})],Ae.prototype,"attributeStorageInfo",void 0),e([h({readOnly:!0})],Ae.prototype,"statisticsInfo",void 0),e([h({type:s.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Ae.prototype,"excludeObjectIds",void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Ae.prototype,"definitionExpression",void 0),e([h({type:pe,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Ae.prototype,"filter",void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Ae.prototype,"path",void 0),e([h(R)],Ae.prototype,"elevationInfo",null),e([h({readOnly:!0,json:{read:!1}})],Ae.prototype,"effectiveCapabilities",null),e([h({readOnly:!0})],Ae.prototype,"effectiveEditingEnabled",null),e([h({type:String})],Ae.prototype,"geometryType",null),e([h(C)],Ae.prototype,"labelsVisible",void 0),e([h({type:[ie],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:se},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:se},write:!0}})],Ae.prototype,"labelingInfo",void 0),e([h(Q)],Ae.prototype,"legendEnabled",void 0),e([h({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?Oe(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Ae.prototype,"opacity",void 0),e([h({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"priority",void 0),e([h({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"semantic",void 0),e([h({types:he,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Ae.prototype,"renderer",null),e([h({json:{read:!1}})],Ae.prototype,"cachedDrawingInfo",void 0),e([_e("service","cachedDrawingInfo")],Ae.prototype,"readCachedDrawingInfo",null),e([h({readOnly:!0,json:{read:!1}})],Ae.prototype,"capabilities",null),e([h({type:Boolean,json:{read:!1}})],Ae.prototype,"editingEnabled",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Ae.prototype,"infoFor3D",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Ae.prototype,"relationships",null),e([h(N)],Ae.prototype,"popupEnabled",void 0),e([h({type:r,json:{name:"popupInfo",write:!0}})],Ae.prototype,"popupTemplate",void 0),e([h({readOnly:!0,json:{read:!1}})],Ae.prototype,"defaultPopupTemplate",null),e([h(G)],Ae.prototype,"attributeTableTemplate",void 0),e([h({type:String,json:{read:!1}})],Ae.prototype,"objectIdField",void 0),e([_e("service","objectIdField",["objectIdField","fields"])],Ae.prototype,"readObjectIdField",null),e([h({type:String,json:{read:!1}})],Ae.prototype,"globalIdField",void 0),e([_e("service","globalIdField",["globalIdField","fields"])],Ae.prototype,"readGlobalIdField",null),e([h({readOnly:!0,type:String,json:{read:!1}})],Ae.prototype,"displayField",null),e([h({type:String,json:{read:!1}})],Ae.prototype,"profile",void 0),e([_e("service","profile",["store.profile"])],Ae.prototype,"readProfile",null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Ae.prototype,"normalReferenceFrame",void 0),e([h(k)],Ae.prototype,"screenSizePerspectiveEnabled",void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"serviceItemId",void 0),e([h(E)],Ae.prototype,"useViewTime",null),e([h({type:ce,json:{read:!1,write:!1}})],Ae.prototype,"timeInfo",null),e([h({type:Le,json:{read:!1,write:!1}})],Ae.prototype,"timeExtent",null),e([h({type:je,json:{read:!1,write:!1}})],Ae.prototype,"timeOffset",null),e([h({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],Ae.prototype,"datesInUnknownTimezone",null),e([h({type:ye,readOnly:!0,json:{read:{source:"timeInfo"}},clonable:!1})],Ae.prototype,"serviceTimeInfo",void 0),Ae=e([f("esri.layers.SceneLayer")],Ae);const Ee={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Ue={"mesh-pyramids":"mesh",points:"point"},De=Ae;export{De as default};
|